palmier 0.9.27 → 0.9.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/command-runners.d.ts +20 -0
- package/dist/command-runners.js +119 -0
- package/dist/commands/run.js +24 -185
- package/dist/commands/serve.js +4 -0
- package/dist/pwa/assets/{index-D6UTaQKv.js → index-B405SEvB.js} +24 -24
- package/dist/pwa/assets/{web-CUvlxJZT.js → web-BtNEakaJ.js} +1 -1
- package/dist/pwa/assets/{web-BKAJDrnk.js → web-DqJat-O8.js} +1 -1
- package/dist/pwa/assets/{web-DwDstsPq.js → web-SpprOq9I.js} +1 -1
- package/dist/pwa/index.html +1 -1
- package/dist/rpc-handler.js +6 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{W as t}from"./index-
|
|
1
|
+
import{W as t}from"./index-B405SEvB.js";class s extends t{constructor(){super(),this.handleVisibilityChange=()=>{const e={isActive:document.hidden!==!0};this.notifyListeners("appStateChange",e),document.hidden?this.notifyListeners("pause",null):this.notifyListeners("resume",null)},document.addEventListener("visibilitychange",this.handleVisibilityChange,!1)}exitApp(){throw this.unimplemented("Not implemented on web.")}async getInfo(){throw this.unimplemented("Not implemented on web.")}async getLaunchUrl(){return{url:""}}async getState(){return{isActive:document.hidden!==!0}}async minimizeApp(){throw this.unimplemented("Not implemented on web.")}async toggleBackButtonHandler(){throw this.unimplemented("Not implemented on web.")}async getAppLanguage(){return{value:navigator.language.split("-")[0].toLowerCase()}}}export{s as AppWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{W as p}from"./index-
|
|
1
|
+
import{W as p}from"./index-B405SEvB.js";class f extends p{constructor(){super(...arguments),this.group="CapacitorStorage"}async configure({group:e}){typeof e=="string"&&(this.group=e)}async get(e){return{value:this.impl.getItem(this.applyPrefix(e.key))}}async set(e){this.impl.setItem(this.applyPrefix(e.key),e.value)}async remove(e){this.impl.removeItem(this.applyPrefix(e.key))}async keys(){return{keys:this.rawKeys().map(t=>t.substring(this.prefix.length))}}async clear(){for(const e of this.rawKeys())this.impl.removeItem(e)}async migrate(){var e;const t=[],s=[],n="_cap_",o=Object.keys(this.impl).filter(i=>i.indexOf(n)===0);for(const i of o){const r=i.substring(n.length),a=(e=this.impl.getItem(i))!==null&&e!==void 0?e:"",{value:l}=await this.get({key:r});typeof l=="string"?s.push(r):(await this.set({key:r,value:a}),t.push(r))}return{migrated:t,existing:s}}async removeOld(){const e="_cap_",t=Object.keys(this.impl).filter(s=>s.indexOf(e)===0);for(const s of t)this.impl.removeItem(s)}get impl(){return window.localStorage}get prefix(){return this.group==="NativeStorage"?"":`${this.group}.`}rawKeys(){return Object.keys(this.impl).filter(e=>e.indexOf(this.prefix)===0)}applyPrefix(e){return this.prefix+e}}export{f as PreferencesWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{W as i}from"./index-
|
|
1
|
+
import{W as i}from"./index-B405SEvB.js";function o(){const t=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection;let n="unknown";const e=t?t.type||t.effectiveType:null;if(e&&typeof e=="string")switch(e){case"bluetooth":case"cellular":n="cellular";break;case"none":n="none";break;case"ethernet":case"wifi":case"wimax":n="wifi";break;case"other":case"unknown":n="unknown";break;case"slow-2g":case"2g":case"3g":n="cellular";break;case"4g":n="wifi";break}return n}class s extends i{constructor(){super(),this.handleOnline=()=>{const e={connected:!0,connectionType:o()};this.notifyListeners("networkStatusChange",e)},this.handleOffline=()=>{const n={connected:!1,connectionType:"none"};this.notifyListeners("networkStatusChange",n)},typeof window<"u"&&(window.addEventListener("online",this.handleOnline),window.addEventListener("offline",this.handleOffline))}async getStatus(){if(!window.navigator)throw this.unavailable("Browser does not support the Network Information API");const n=window.navigator.onLine,e=o();return{connected:n,connectionType:n?e:"none"}}}const r=new s;export{r as Network,s as NetworkWeb};
|
package/dist/pwa/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
9
9
|
<title>Palmier</title>
|
|
10
10
|
<meta name="description" content="Run tasks from anywhere, approve actions on the go, and let your agents use your phone’s built-in capabilities when needed." />
|
|
11
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-B405SEvB.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/assets/index-BpsVmTp9.css">
|
|
13
13
|
<link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
|
|
14
14
|
<body>
|
package/dist/rpc-handler.js
CHANGED
|
@@ -14,6 +14,7 @@ import { currentVersion, performUpdate, performAgentUpdate } from "./update-chec
|
|
|
14
14
|
import { saveConfig } from "./config.js";
|
|
15
15
|
import { parseReportFiles, parseTaskOutcome, stripPalmierMarkers } from "./commands/run.js";
|
|
16
16
|
import { clearTaskQueue } from "./event-queues.js";
|
|
17
|
+
import { reconcileCommandRunner, stopCommandRunner } from "./command-runners.js";
|
|
17
18
|
import { buildLanUrl } from "./network.js";
|
|
18
19
|
export function parseResultFrontmatter(raw) {
|
|
19
20
|
const fmMatch = raw.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);
|
|
@@ -232,6 +233,7 @@ export function createRpcHandler(config, nc) {
|
|
|
232
233
|
writeTaskFile(taskDir, task);
|
|
233
234
|
appendTaskList(config.projectRoot, id);
|
|
234
235
|
getPlatform().installTaskTimer(config, task);
|
|
236
|
+
reconcileCommandRunner(config, task);
|
|
235
237
|
return flattenTask(task);
|
|
236
238
|
}
|
|
237
239
|
case "task.update": {
|
|
@@ -291,11 +293,14 @@ export function createRpcHandler(config, nc) {
|
|
|
291
293
|
// installTaskTimer overwrites in-place (schtasks /f, systemd unit rewrite)
|
|
292
294
|
// without killing a running task process.
|
|
293
295
|
getPlatform().installTaskTimer(config, existing);
|
|
296
|
+
// Start/stop/restart the command process to match the new enabled state.
|
|
297
|
+
reconcileCommandRunner(config, existing);
|
|
294
298
|
return flattenTask(existing);
|
|
295
299
|
}
|
|
296
300
|
case "task.delete": {
|
|
297
301
|
const params = request.params;
|
|
298
302
|
getPlatform().removeTaskTimer(params.id);
|
|
303
|
+
stopCommandRunner(params.id);
|
|
299
304
|
clearTaskQueue(params.id);
|
|
300
305
|
removeFromTaskList(config.projectRoot, params.id);
|
|
301
306
|
return { ok: true, task_id: params.id };
|
|
@@ -629,6 +634,7 @@ export function createRpcHandler(config, nc) {
|
|
|
629
634
|
getPlatform().removeTaskTimer(params.task_id);
|
|
630
635
|
}
|
|
631
636
|
catch { /* best-effort */ }
|
|
637
|
+
stopCommandRunner(params.task_id);
|
|
632
638
|
clearTaskQueue(params.task_id);
|
|
633
639
|
try {
|
|
634
640
|
fs.rmSync(deleteTaskDir, { recursive: true, force: true });
|