wherdr 1.3.4 → 2.0.1
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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/072bjdot.js +2 -0
- package/.output/public/_nuxt/8FAMamJX.js +1 -0
- package/.output/public/_nuxt/{AgentView.DzFWBd2A.css → AgentView.CfD2RWZY.css} +1 -1
- package/.output/public/_nuxt/BDNMzG2s.js +1 -0
- package/.output/public/_nuxt/BX8KVYfd.js +1 -0
- package/.output/public/_nuxt/{CJKsMzIp.js → BYZVrreW.js} +1 -1
- package/.output/public/_nuxt/C2aT0CgA.js +62 -0
- package/.output/public/_nuxt/CanLPS0U.js +105 -0
- package/.output/public/_nuxt/DGXKTg7D.js +31 -0
- package/.output/public/_nuxt/{DMLmW6JM.js → DOsw6KCR.js} +41 -42
- package/.output/public/_nuxt/DTiR5P9E.js +25 -0
- package/.output/public/_nuxt/{w7Rm7unj.js → DYKfeNM-.js} +1 -1
- package/.output/public/_nuxt/DZ7VvF3e.js +1 -0
- package/.output/public/_nuxt/DZGKxROq.js +6 -0
- package/.output/public/_nuxt/DeLLm2j1.js +23 -0
- package/.output/public/_nuxt/DumNBIyF.js +1 -0
- package/.output/public/_nuxt/ScQ9FtVj.js +1 -0
- package/.output/public/_nuxt/TS7GZUPU.js +9 -0
- package/.output/public/_nuxt/board.DK5EU4sL.css +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/b6ed1ddd-d6d6-4137-beab-2548b20dd998.json +1 -0
- package/.output/public/_nuxt/entry.BhiYrGAW.css +2 -0
- package/.output/public/_nuxt/settings.Cdb21nNw.css +1 -0
- package/.output/public/sw.js +1 -1
- package/.output/server/chunks/_/branding.mjs +1 -1
- package/.output/server/chunks/_/changes.mjs +4 -4
- package/.output/server/chunks/_/fileDownload.mjs +278 -0
- package/.output/server/chunks/_/files.mjs +44 -17
- package/.output/server/chunks/_/machineOrder.mjs +1 -1
- package/.output/server/chunks/_/onboarding.mjs +1 -1
- package/.output/server/chunks/_/package.mjs +9 -3
- package/.output/server/chunks/_/plugins.mjs +92 -125
- package/.output/server/chunks/_/restart.mjs +1 -1
- package/.output/server/chunks/_/selfupdate.mjs +1 -1
- package/.output/server/chunks/_/updates.mjs +1 -1
- package/.output/server/chunks/_/worktrees.mjs +1 -1
- package/.output/server/chunks/_/ws.mjs +43 -6
- package/.output/server/chunks/nitro/nitro.mjs +14073 -10658
- package/.output/server/chunks/raw/check-doc-links.mjs +5 -0
- package/.output/server/chunks/raw/check-leaks.mjs +1 -1
- package/.output/server/chunks/raw/check-release-notes.mjs +5 -0
- package/.output/server/chunks/raw/herdr-plugin.mjs +1 -1
- package/.output/server/chunks/raw/install-claude-statusline.mjs +1 -1
- package/.output/server/chunks/raw/prerelease-summary.mjs +5 -0
- package/.output/server/chunks/raw/prerelease.mjs +7 -0
- package/.output/server/chunks/raw/reveal.mjs +1 -1
- package/.output/server/chunks/raw/test-affected.mjs +5 -0
- package/.output/server/chunks/routes/api/_..._.mjs +6 -5
- package/.output/server/chunks/routes/api/agents.post.mjs +6 -5
- package/.output/server/chunks/routes/api/ask-tab.post.mjs +6 -5
- package/.output/server/chunks/routes/api/attach.post.mjs +6 -5
- package/.output/server/chunks/routes/api/auth/disable.post.mjs +6 -5
- package/.output/server/chunks/routes/api/auth/lock-all.post.mjs +6 -5
- package/.output/server/chunks/routes/api/auth/lock.post.mjs +6 -5
- package/.output/server/chunks/routes/api/auth/login/options.post.mjs +6 -5
- package/.output/server/chunks/routes/api/auth/login/verify.post.mjs +6 -5
- package/.output/server/chunks/routes/api/auth/max-session.post.mjs +6 -5
- package/.output/server/chunks/routes/api/auth/register/options.post.mjs +6 -5
- package/.output/server/chunks/routes/api/auth/register/verify.post.mjs +6 -5
- package/.output/server/chunks/routes/api/auth/status.get.mjs +6 -5
- package/.output/server/chunks/routes/api/changes.get.mjs +7 -6
- package/.output/server/chunks/routes/api/chat/image.get.mjs +7 -6
- package/.output/server/chunks/routes/api/chat.get.mjs +20 -7
- package/.output/server/chunks/routes/api/choose.post.mjs +31 -17
- package/.output/server/chunks/routes/api/claude-setup.post.mjs +42 -0
- package/.output/server/chunks/routes/api/claude-statusline.post.mjs +7 -6
- package/.output/server/chunks/routes/api/clear-queued-input.post.mjs +42 -0
- package/.output/server/chunks/routes/api/close/status.get.mjs +7 -6
- package/.output/server/chunks/routes/api/close.post.mjs +6 -5
- package/.output/server/chunks/routes/api/codex-update.post.mjs +7 -6
- package/.output/server/chunks/routes/api/commands.get.mjs +7 -6
- package/.output/server/chunks/routes/api/config.get.mjs +10 -13
- package/.output/server/chunks/routes/api/dirs.get.mjs +7 -6
- package/.output/server/chunks/routes/api/dismiss-stopped.post.mjs +7 -6
- package/.output/server/chunks/routes/api/dismiss.post.mjs +7 -6
- package/.output/server/chunks/routes/api/effort.post.mjs +7 -6
- package/.output/server/chunks/routes/api/efforts.get.mjs +7 -6
- package/.output/server/chunks/routes/api/file.post.mjs +7 -6
- package/.output/server/chunks/routes/api/files/download.get.mjs +12 -31
- package/.output/server/chunks/routes/api/files/download.head.mjs +41 -0
- package/.output/server/chunks/routes/api/files/read.get.mjs +8 -7
- package/.output/server/chunks/routes/api/files.get.mjs +7 -6
- package/.output/server/chunks/routes/api/health.get.mjs +6 -5
- package/.output/server/chunks/routes/api/input.post.mjs +7 -6
- package/.output/server/chunks/routes/api/interrupt.post.mjs +24 -21
- package/.output/server/chunks/routes/api/isgit.get.mjs +8 -8
- package/.output/server/chunks/routes/api/machine/awake.get.mjs +7 -6
- package/.output/server/chunks/routes/api/machine/awake.post.mjs +7 -6
- package/.output/server/chunks/routes/api/machine/order.get.mjs +6 -5
- package/.output/server/chunks/routes/api/machine/order.post.mjs +6 -5
- package/.output/server/chunks/routes/api/machine/reconnect.post.mjs +40 -0
- package/.output/server/chunks/routes/api/machine/rename.post.mjs +7 -6
- package/.output/server/chunks/routes/api/machine/status.post.mjs +39 -0
- package/.output/server/chunks/routes/api/menu-left.post.mjs +40 -0
- package/.output/server/chunks/routes/api/menu.post.mjs +7 -6
- package/.output/server/chunks/routes/api/model.post.mjs +7 -6
- package/.output/server/chunks/routes/api/models.get.mjs +7 -6
- package/.output/server/chunks/routes/api/nav.post.mjs +7 -6
- package/.output/server/chunks/routes/api/onboarding.get.mjs +6 -5
- package/.output/server/chunks/routes/api/onboarding.post.mjs +6 -5
- package/.output/server/chunks/routes/api/phone.get.mjs +8 -10
- package/.output/server/chunks/routes/api/phone.post.mjs +8 -10
- package/.output/server/chunks/routes/api/plugins/actions.get.mjs +6 -10
- package/.output/server/chunks/routes/api/plugins/invoke.post.mjs +6 -10
- package/.output/server/chunks/routes/api/plugins/projects.get.mjs +10 -9
- package/.output/server/chunks/routes/api/plugins/projects.post.mjs +11 -8
- package/.output/server/chunks/routes/api/prompt.post.mjs +22 -13
- package/.output/server/chunks/routes/api/push/quiet.post.mjs +7 -6
- package/.output/server/chunks/routes/api/push/subscribe.post.mjs +7 -7
- package/.output/server/chunks/routes/api/push/test.post.mjs +7 -6
- package/.output/server/chunks/routes/api/push/unsubscribe.post.mjs +7 -6
- package/.output/server/chunks/routes/api/quotas.get.mjs +7 -6
- package/.output/server/chunks/routes/api/rename.post.mjs +6 -5
- package/.output/server/chunks/routes/api/requeue.post.mjs +7 -6
- package/.output/server/chunks/routes/api/restart.get.mjs +6 -5
- package/.output/server/chunks/routes/api/restart.post.mjs +6 -5
- package/.output/server/chunks/routes/api/reveal.post.mjs +91 -8
- package/.output/server/chunks/routes/api/screen-key.post.mjs +7 -6
- package/.output/server/chunks/routes/api/screen.get.mjs +7 -6
- package/.output/server/chunks/routes/api/search.get.mjs +7 -6
- package/.output/server/chunks/routes/api/seen.post.mjs +7 -6
- package/.output/server/chunks/routes/api/sessions.get.mjs +7 -6
- package/.output/server/chunks/routes/api/sessions.post.mjs +7 -6
- package/.output/server/chunks/routes/api/settings-tab.post.mjs +7 -6
- package/.output/server/chunks/routes/api/{plugins/thread-limits.get.mjs → settings.get.mjs} +10 -9
- package/.output/server/chunks/routes/api/settings.post.mjs +40 -0
- package/.output/server/chunks/routes/api/space.post.mjs +34 -18
- package/.output/server/chunks/routes/api/state.get.mjs +7 -6
- package/.output/server/chunks/routes/api/tasks/action.post.mjs +39 -0
- package/.output/server/chunks/routes/api/{plugins/profiles.get.mjs → tasks/add.post.mjs} +12 -16
- package/.output/server/chunks/routes/api/tasks/after.post.mjs +39 -0
- package/.output/server/chunks/routes/api/tasks/approve.post.mjs +39 -0
- package/.output/server/chunks/routes/api/{project/report.get.mjs → tasks/archived.get.mjs} +12 -14
- package/.output/server/chunks/routes/api/{index.get.mjs → tasks/autopilot.get.mjs} +13 -14
- package/.output/server/chunks/routes/api/tasks/autopilot.post.mjs +39 -0
- package/.output/server/chunks/routes/api/{gitroot.get.mjs → tasks/board-settings.get.mjs} +12 -14
- package/.output/server/chunks/routes/api/tasks/board-settings.post.mjs +39 -0
- package/.output/server/chunks/routes/api/tasks/coordinator.get.mjs +40 -0
- package/.output/server/chunks/routes/api/tasks/coordinator.post.mjs +39 -0
- package/.output/server/chunks/routes/api/tasks/details.get.mjs +40 -0
- package/.output/server/chunks/routes/api/tasks/limit.post.mjs +39 -0
- package/.output/server/chunks/routes/api/tasks/links.get.mjs +39 -0
- package/.output/server/chunks/routes/api/tasks/models.get.mjs +40 -0
- package/.output/server/chunks/routes/api/tasks/pick.post.mjs +39 -0
- package/.output/server/chunks/routes/api/tasks/question.post.mjs +39 -0
- package/.output/server/chunks/routes/api/tasks/scheduled.get.mjs +40 -0
- package/.output/server/chunks/routes/api/{project → tasks}/settings.get.mjs +10 -12
- package/.output/server/chunks/routes/api/tasks/start.get.mjs +40 -0
- package/.output/server/chunks/routes/api/tasks/tell.post.mjs +39 -0
- package/.output/server/chunks/routes/api/tasks.get.mjs +39 -0
- package/.output/server/chunks/routes/api/unqueue.post.mjs +7 -6
- package/.output/server/chunks/routes/api/update/status.get.mjs +6 -5
- package/.output/server/chunks/routes/api/update.get.mjs +8 -10
- package/.output/server/chunks/routes/api/update.post.mjs +8 -10
- package/.output/server/chunks/routes/api/upload.post.mjs +7 -6
- package/.output/server/chunks/routes/api/worktrees/remove.post.mjs +6 -5
- package/.output/server/chunks/routes/api/worktrees.get.mjs +6 -5
- package/.output/server/chunks/routes/favicon.ico.get.mjs +6 -5
- package/.output/server/chunks/routes/icons/_name_.get.mjs +7 -6
- package/.output/server/chunks/routes/renderer.mjs +8 -7
- package/.output/server/chunks/routes/uploads/_...name_.get.mjs +7 -6
- package/.output/server/chunks/routes/ws/_..._.mjs +7 -6
- package/.output/server/chunks/routes/ws/events.mjs +9 -7
- package/.output/server/chunks/routes/ws/term.mjs +7 -6
- package/.output/server/chunks/virtual/precomputed.mjs +1 -1
- package/.output/server/index.mjs +7 -6
- package/.output/server/package.json +1 -1
- package/README.md +44 -1445
- package/bin/lib/commands.mjs +44 -9
- package/bin/lib/panel.mjs +3 -11
- package/bin/lib/service.mjs +41 -2
- package/bin/lib/skill.mjs +1 -1
- package/bin/lib/tailnet.d.mts +6 -3
- package/bin/lib/tailnet.mjs +70 -32
- package/bin/lib/userpath.d.mts +14 -0
- package/bin/lib/userpath.mjs +142 -0
- package/docs/README.md +58 -0
- package/docs/RELEASING.md +174 -0
- package/docs/board.md +169 -0
- package/docs/command.md +58 -0
- package/docs/configuration.md +39 -0
- package/docs/conversation.md +132 -0
- package/docs/development.md +38 -0
- package/docs/devices.md +58 -0
- package/docs/files.md +29 -0
- package/docs/herdr-projects-1x.md +278 -0
- package/docs/home.md +52 -0
- package/docs/installation.md +174 -0
- package/docs/machines.md +74 -0
- package/docs/migrate-from-1.x-docker.md +160 -0
- package/docs/networks.md +154 -0
- package/docs/notifications.md +83 -0
- package/docs/overview.md +71 -0
- package/docs/phone.md +26 -0
- package/docs/plugins.md +109 -0
- package/docs/quick-start.md +89 -0
- package/docs/quotas.md +65 -0
- package/docs/release-notes-2.0.0.md +84 -0
- package/docs/security.md +117 -0
- package/docs/terminal.md +15 -0
- package/docs/troubleshooting.md +45 -0
- package/package.json +9 -3
- package/skills/wherdr/SKILL.md +24 -173
- package/.output/public/_nuxt/BEJHMUrj.js +0 -1
- package/.output/public/_nuxt/BOtcEDnA.js +0 -1
- package/.output/public/_nuxt/BUaYhQ2r.js +0 -6
- package/.output/public/_nuxt/CJNhn9sA.js +0 -36
- package/.output/public/_nuxt/COCvtdHN.js +0 -89
- package/.output/public/_nuxt/Cl45J6_Q.js +0 -1
- package/.output/public/_nuxt/CndPDbMI.js +0 -2
- package/.output/public/_nuxt/Ctbx58Um.js +0 -23
- package/.output/public/_nuxt/Dl1PHLOB.js +0 -1
- package/.output/public/_nuxt/Nhex3_iH.js +0 -1
- package/.output/public/_nuxt/OpWX45i7.js +0 -89
- package/.output/public/_nuxt/builds/meta/4994f3a4-4126-4f57-a9e5-c7ebb25850bc.json +0 -1
- package/.output/public/_nuxt/dTj21DMs.js +0 -1
- package/.output/public/_nuxt/entry.BohTWE-n.css +0 -2
- package/.output/public/_nuxt/kwSoIiM7.js +0 -1
- package/.output/public/_nuxt/mkEwYka4.js +0 -1
- package/.output/server/chunks/_/pluginPolicy.mjs +0 -93
- package/.output/server/chunks/_/projectBoard.mjs +0 -363
- package/.output/server/chunks/_/projectDocs.mjs +0 -106
- package/.output/server/chunks/_/projectInbox.mjs +0 -135
- package/.output/server/chunks/_/projectThreads.mjs +0 -46
- package/.output/server/chunks/_/projectThreads2.mjs +0 -61
- package/.output/server/chunks/_/projectsActions.mjs +0 -143
- package/.output/server/chunks/_/projectsPlugin.mjs +0 -30
- package/.output/server/chunks/_/projectsPlugin2.mjs +0 -57
- package/.output/server/chunks/_/reveal.mjs +0 -115
- package/.output/server/chunks/raw/dev.wherdr.open.mjs +0 -7
- package/.output/server/chunks/raw/docker-entrypoint.mjs +0 -7
- package/.output/server/chunks/raw/install-host-open.mjs +0 -7
- package/.output/server/chunks/raw/wherdr-open.mjs +0 -7
- package/.output/server/chunks/routes/api/board.get.mjs +0 -148
- package/.output/server/chunks/routes/api/plugins/thread-limits.post.mjs +0 -45
- package/.output/server/chunks/routes/api/project/inbox.get.mjs +0 -44
- package/.output/server/chunks/routes/api/project/inbox.post.mjs +0 -44
- package/.output/server/chunks/routes/api/project/memory.get.mjs +0 -43
- package/.output/server/chunks/routes/api/project/routines.get.mjs +0 -44
- package/.output/server/chunks/routes/api/project/thread.get.mjs +0 -45
- package/.output/server/chunks/routes/api/project/thread.post.mjs +0 -47
- package/bin/install-docker-skill.sh +0 -20
|
@@ -17,18 +17,19 @@ import 'node:events';
|
|
|
17
17
|
import 'node:buffer';
|
|
18
18
|
import 'node:fs';
|
|
19
19
|
import 'node:path';
|
|
20
|
-
import 'web-push';
|
|
21
20
|
import 'node:os';
|
|
22
|
-
import 'node:child_process';
|
|
23
21
|
import 'node:net';
|
|
24
|
-
import 'node:
|
|
25
|
-
import 'node:readline';
|
|
22
|
+
import 'node:child_process';
|
|
26
23
|
import 'node:dns';
|
|
27
24
|
import 'node:util';
|
|
25
|
+
import 'web-push';
|
|
26
|
+
import 'node:string_decoder';
|
|
27
|
+
import 'node:fs/promises';
|
|
28
|
+
import 'node:readline';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
29
30
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
30
|
-
import '@simplewebauthn/server';
|
|
31
31
|
import 'node:url';
|
|
32
|
+
import '@simplewebauthn/server';
|
|
32
33
|
|
|
33
34
|
const order_get = defineApi(async () => ({ order: await readMachineOrder() }));
|
|
34
35
|
|
|
@@ -17,18 +17,19 @@ import 'node:events';
|
|
|
17
17
|
import 'node:buffer';
|
|
18
18
|
import 'node:fs';
|
|
19
19
|
import 'node:path';
|
|
20
|
-
import 'web-push';
|
|
21
20
|
import 'node:os';
|
|
22
|
-
import 'node:child_process';
|
|
23
21
|
import 'node:net';
|
|
24
|
-
import 'node:
|
|
25
|
-
import 'node:readline';
|
|
22
|
+
import 'node:child_process';
|
|
26
23
|
import 'node:dns';
|
|
27
24
|
import 'node:util';
|
|
25
|
+
import 'web-push';
|
|
26
|
+
import 'node:string_decoder';
|
|
27
|
+
import 'node:fs/promises';
|
|
28
|
+
import 'node:readline';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
29
30
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
30
|
-
import '@simplewebauthn/server';
|
|
31
31
|
import 'node:url';
|
|
32
|
+
import '@simplewebauthn/server';
|
|
32
33
|
|
|
33
34
|
const order_post = defineApi(async (_event, body) => {
|
|
34
35
|
const order = body.order;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { a as defineApi, H as HerdrError, aI as retryMachine } from '../../../nitro/nitro.mjs';
|
|
2
|
+
import 'node:http';
|
|
3
|
+
import 'node:https';
|
|
4
|
+
import 'node:crypto';
|
|
5
|
+
import 'stream';
|
|
6
|
+
import 'events';
|
|
7
|
+
import 'http';
|
|
8
|
+
import 'crypto';
|
|
9
|
+
import 'buffer';
|
|
10
|
+
import 'zlib';
|
|
11
|
+
import 'https';
|
|
12
|
+
import 'net';
|
|
13
|
+
import 'tls';
|
|
14
|
+
import 'url';
|
|
15
|
+
import 'node:events';
|
|
16
|
+
import 'node:buffer';
|
|
17
|
+
import 'node:fs';
|
|
18
|
+
import 'node:path';
|
|
19
|
+
import 'node:os';
|
|
20
|
+
import 'node:net';
|
|
21
|
+
import 'node:child_process';
|
|
22
|
+
import 'node:dns';
|
|
23
|
+
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
28
|
+
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
29
|
+
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
30
|
+
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
32
|
+
|
|
33
|
+
const reconnect_post = defineApi(async (_event, body) => {
|
|
34
|
+
if (typeof body.key !== "string") throw new HerdrError("bad_machine", "unknown remote machine");
|
|
35
|
+
retryMachine(body.key);
|
|
36
|
+
return { ok: true };
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export { reconnect_post as default };
|
|
40
|
+
//# sourceMappingURL=reconnect.post.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineApi,
|
|
1
|
+
import { a as defineApi, _ as MACHINE_KEY_RE, $ as getMachine, H as HerdrError, aJ as renameMachine } from '../../../nitro/nitro.mjs';
|
|
2
2
|
import 'node:http';
|
|
3
3
|
import 'node:https';
|
|
4
4
|
import 'node:crypto';
|
|
@@ -16,18 +16,19 @@ import 'node:events';
|
|
|
16
16
|
import 'node:buffer';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import 'node:path';
|
|
19
|
-
import 'web-push';
|
|
20
19
|
import 'node:os';
|
|
21
|
-
import 'node:child_process';
|
|
22
20
|
import 'node:net';
|
|
23
|
-
import 'node:
|
|
24
|
-
import 'node:readline';
|
|
21
|
+
import 'node:child_process';
|
|
25
22
|
import 'node:dns';
|
|
26
23
|
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
27
28
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
29
|
-
import '@simplewebauthn/server';
|
|
30
30
|
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
31
32
|
|
|
32
33
|
const rename_post = defineApi(async (_event, body) => {
|
|
33
34
|
const key = typeof body.key === "string" ? body.key : null;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { a as defineApi, H as HerdrError, aK as machineDiagnostic } from '../../../nitro/nitro.mjs';
|
|
2
|
+
import 'node:http';
|
|
3
|
+
import 'node:https';
|
|
4
|
+
import 'node:crypto';
|
|
5
|
+
import 'stream';
|
|
6
|
+
import 'events';
|
|
7
|
+
import 'http';
|
|
8
|
+
import 'crypto';
|
|
9
|
+
import 'buffer';
|
|
10
|
+
import 'zlib';
|
|
11
|
+
import 'https';
|
|
12
|
+
import 'net';
|
|
13
|
+
import 'tls';
|
|
14
|
+
import 'url';
|
|
15
|
+
import 'node:events';
|
|
16
|
+
import 'node:buffer';
|
|
17
|
+
import 'node:fs';
|
|
18
|
+
import 'node:path';
|
|
19
|
+
import 'node:os';
|
|
20
|
+
import 'node:net';
|
|
21
|
+
import 'node:child_process';
|
|
22
|
+
import 'node:dns';
|
|
23
|
+
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
28
|
+
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
29
|
+
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
30
|
+
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
32
|
+
|
|
33
|
+
const status_post = defineApi(async (_event, body) => {
|
|
34
|
+
if (typeof body.key !== "string") throw new HerdrError("bad_machine", "unknown remote machine");
|
|
35
|
+
return machineDiagnostic(body.key);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export { status_post as default };
|
|
39
|
+
//# sourceMappingURL=status.post.mjs.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { a as defineApi, P as PANE_RE, H as HerdrError, aL as closeLeftMenu } from '../../nitro/nitro.mjs';
|
|
2
|
+
import 'node:http';
|
|
3
|
+
import 'node:https';
|
|
4
|
+
import 'node:crypto';
|
|
5
|
+
import 'stream';
|
|
6
|
+
import 'events';
|
|
7
|
+
import 'http';
|
|
8
|
+
import 'crypto';
|
|
9
|
+
import 'buffer';
|
|
10
|
+
import 'zlib';
|
|
11
|
+
import 'https';
|
|
12
|
+
import 'net';
|
|
13
|
+
import 'tls';
|
|
14
|
+
import 'url';
|
|
15
|
+
import 'node:events';
|
|
16
|
+
import 'node:buffer';
|
|
17
|
+
import 'node:fs';
|
|
18
|
+
import 'node:path';
|
|
19
|
+
import 'node:os';
|
|
20
|
+
import 'node:net';
|
|
21
|
+
import 'node:child_process';
|
|
22
|
+
import 'node:dns';
|
|
23
|
+
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
28
|
+
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
29
|
+
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
30
|
+
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
32
|
+
|
|
33
|
+
const menuLeft_post = defineApi(async (event, b) => {
|
|
34
|
+
if (!PANE_RE.test(b.pane_id || "")) throw new HerdrError("bad_pane", "Invalid pane");
|
|
35
|
+
if (b.action !== "close" && b.action !== "send") throw new HerdrError("bad_action", "Invalid action");
|
|
36
|
+
return { ok: true, ...await closeLeftMenu(b.pane_id, b.action === "send") };
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export { menuLeft_post as default };
|
|
40
|
+
//# sourceMappingURL=menu-left.post.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineApi, P as PANE_RE, H as HerdrError,
|
|
1
|
+
import { a as defineApi, P as PANE_RE, H as HerdrError, aM as readMenu, aN as findEntry, aO as menuIdentity, aP as searchKeys, X as sleep, aQ as stepToward, aR as clickMovesOnly, e as watchScreen, y as transcripts, p as poll, h as herdr } from '../../nitro/nitro.mjs';
|
|
2
2
|
import 'node:http';
|
|
3
3
|
import 'node:https';
|
|
4
4
|
import 'node:crypto';
|
|
@@ -16,18 +16,19 @@ import 'node:events';
|
|
|
16
16
|
import 'node:buffer';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import 'node:path';
|
|
19
|
-
import 'web-push';
|
|
20
19
|
import 'node:os';
|
|
21
|
-
import 'node:child_process';
|
|
22
20
|
import 'node:net';
|
|
23
|
-
import 'node:
|
|
24
|
-
import 'node:readline';
|
|
21
|
+
import 'node:child_process';
|
|
25
22
|
import 'node:dns';
|
|
26
23
|
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
27
28
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
29
|
-
import '@simplewebauthn/server';
|
|
30
30
|
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
31
32
|
|
|
32
33
|
const STALE = "The menu changed in the meantime \u2014 check the current screen.";
|
|
33
34
|
const at = (m) => m && m.cursor !== null ? `${m.cursor}:${m.items[m.cursor].label}` : null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineApi, P as PANE_RE, H as HerdrError,
|
|
1
|
+
import { a as defineApi, P as PANE_RE, H as HerdrError, aS as setModel, f as findPane, at as refreshModel } from '../../nitro/nitro.mjs';
|
|
2
2
|
import 'node:http';
|
|
3
3
|
import 'node:https';
|
|
4
4
|
import 'node:crypto';
|
|
@@ -16,18 +16,19 @@ import 'node:events';
|
|
|
16
16
|
import 'node:buffer';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import 'node:path';
|
|
19
|
-
import 'web-push';
|
|
20
19
|
import 'node:os';
|
|
21
|
-
import 'node:child_process';
|
|
22
20
|
import 'node:net';
|
|
23
|
-
import 'node:
|
|
24
|
-
import 'node:readline';
|
|
21
|
+
import 'node:child_process';
|
|
25
22
|
import 'node:dns';
|
|
26
23
|
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
27
28
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
29
|
-
import '@simplewebauthn/server';
|
|
30
30
|
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
31
32
|
|
|
32
33
|
const model_post = defineApi(async (event, b) => {
|
|
33
34
|
if (!PANE_RE.test(b.pane_id || "")) throw new HerdrError("bad_pane", "Invalid pane");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineApi, i as getQuery, P as PANE_RE, H as HerdrError,
|
|
1
|
+
import { a as defineApi, i as getQuery, P as PANE_RE, H as HerdrError, aT as listModels } from '../../nitro/nitro.mjs';
|
|
2
2
|
import 'node:http';
|
|
3
3
|
import 'node:https';
|
|
4
4
|
import 'node:crypto';
|
|
@@ -16,18 +16,19 @@ import 'node:events';
|
|
|
16
16
|
import 'node:buffer';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import 'node:path';
|
|
19
|
-
import 'web-push';
|
|
20
19
|
import 'node:os';
|
|
21
|
-
import 'node:child_process';
|
|
22
20
|
import 'node:net';
|
|
23
|
-
import 'node:
|
|
24
|
-
import 'node:readline';
|
|
21
|
+
import 'node:child_process';
|
|
25
22
|
import 'node:dns';
|
|
26
23
|
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
27
28
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
29
|
-
import '@simplewebauthn/server';
|
|
30
30
|
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
31
32
|
|
|
32
33
|
const models_get = defineApi(async (event) => {
|
|
33
34
|
const q = getQuery(event);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineApi, P as PANE_RE, H as HerdrError, f as findPane, h as herdr, e as watchScreen,
|
|
1
|
+
import { a as defineApi, P as PANE_RE, H as HerdrError, f as findPane, h as herdr, e as watchScreen, aU as refreshNativeScreen, aV as TOP, aM as readMenu, aO as menuIdentity, b as screenChoices, aR as clickMovesOnly, g as choicesCache, p as poll } from '../../nitro/nitro.mjs';
|
|
2
2
|
import 'node:http';
|
|
3
3
|
import 'node:https';
|
|
4
4
|
import 'node:crypto';
|
|
@@ -16,18 +16,19 @@ import 'node:events';
|
|
|
16
16
|
import 'node:buffer';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import 'node:path';
|
|
19
|
-
import 'web-push';
|
|
20
19
|
import 'node:os';
|
|
21
|
-
import 'node:child_process';
|
|
22
20
|
import 'node:net';
|
|
23
|
-
import 'node:
|
|
24
|
-
import 'node:readline';
|
|
21
|
+
import 'node:child_process';
|
|
25
22
|
import 'node:dns';
|
|
26
23
|
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
27
28
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
29
|
-
import '@simplewebauthn/server';
|
|
30
30
|
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
31
32
|
|
|
32
33
|
const KEYS = /* @__PURE__ */ new Set(["up", "down", "enter", "esc", "left", "right"]);
|
|
33
34
|
const nav_post = defineApi(async (event, b) => {
|
|
@@ -17,18 +17,19 @@ import 'node:events';
|
|
|
17
17
|
import 'node:buffer';
|
|
18
18
|
import 'node:fs';
|
|
19
19
|
import 'node:path';
|
|
20
|
-
import 'web-push';
|
|
21
20
|
import 'node:os';
|
|
22
|
-
import 'node:child_process';
|
|
23
21
|
import 'node:net';
|
|
24
|
-
import 'node:
|
|
25
|
-
import 'node:readline';
|
|
22
|
+
import 'node:child_process';
|
|
26
23
|
import 'node:dns';
|
|
27
24
|
import 'node:util';
|
|
25
|
+
import 'web-push';
|
|
26
|
+
import 'node:string_decoder';
|
|
27
|
+
import 'node:fs/promises';
|
|
28
|
+
import 'node:readline';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
29
30
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
30
|
-
import '@simplewebauthn/server';
|
|
31
31
|
import 'node:url';
|
|
32
|
+
import '@simplewebauthn/server';
|
|
32
33
|
|
|
33
34
|
const onboarding_get = defineApi(() => readOnboarding());
|
|
34
35
|
|
|
@@ -17,18 +17,19 @@ import 'node:events';
|
|
|
17
17
|
import 'node:buffer';
|
|
18
18
|
import 'node:fs';
|
|
19
19
|
import 'node:path';
|
|
20
|
-
import 'web-push';
|
|
21
20
|
import 'node:os';
|
|
22
|
-
import 'node:child_process';
|
|
23
21
|
import 'node:net';
|
|
24
|
-
import 'node:
|
|
25
|
-
import 'node:readline';
|
|
22
|
+
import 'node:child_process';
|
|
26
23
|
import 'node:dns';
|
|
27
24
|
import 'node:util';
|
|
25
|
+
import 'web-push';
|
|
26
|
+
import 'node:string_decoder';
|
|
27
|
+
import 'node:fs/promises';
|
|
28
|
+
import 'node:readline';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
29
30
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
30
|
-
import '@simplewebauthn/server';
|
|
31
31
|
import 'node:url';
|
|
32
|
+
import '@simplewebauthn/server';
|
|
32
33
|
|
|
33
34
|
const onboarding_post = defineApi((_event, body) => {
|
|
34
35
|
if (typeof (body == null ? void 0 : body.done) !== "boolean") throw new HerdrError("bad_request", "done must be true or false");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineApi,
|
|
1
|
+
import { a as defineApi, aX as phoneStatus } from '../../nitro/nitro.mjs';
|
|
2
2
|
import 'node:http';
|
|
3
3
|
import 'node:https';
|
|
4
4
|
import 'node:crypto';
|
|
@@ -16,23 +16,21 @@ import 'node:events';
|
|
|
16
16
|
import 'node:buffer';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import 'node:path';
|
|
19
|
-
import 'web-push';
|
|
20
19
|
import 'node:os';
|
|
21
|
-
import 'node:child_process';
|
|
22
20
|
import 'node:net';
|
|
23
|
-
import 'node:
|
|
24
|
-
import 'node:readline';
|
|
21
|
+
import 'node:child_process';
|
|
25
22
|
import 'node:dns';
|
|
26
23
|
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
27
28
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
29
|
-
import '@simplewebauthn/server';
|
|
30
30
|
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
31
32
|
|
|
32
|
-
const phone_get = defineApi(async (
|
|
33
|
-
if (!phoneAccess(event)) return sendError(event, 403, { error: "Open wherdr on this computer (localhost) or unlock it", code: "phone_local" });
|
|
34
|
-
return phoneStatus();
|
|
35
|
-
});
|
|
33
|
+
const phone_get = defineApi(async () => phoneStatus());
|
|
36
34
|
|
|
37
35
|
export { phone_get as default };
|
|
38
36
|
//# sourceMappingURL=phone.get.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineApi,
|
|
1
|
+
import { a as defineApi, aY as phoneAction } from '../../nitro/nitro.mjs';
|
|
2
2
|
import 'node:http';
|
|
3
3
|
import 'node:https';
|
|
4
4
|
import 'node:crypto';
|
|
@@ -16,23 +16,21 @@ import 'node:events';
|
|
|
16
16
|
import 'node:buffer';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import 'node:path';
|
|
19
|
-
import 'web-push';
|
|
20
19
|
import 'node:os';
|
|
21
|
-
import 'node:child_process';
|
|
22
20
|
import 'node:net';
|
|
23
|
-
import 'node:
|
|
24
|
-
import 'node:readline';
|
|
21
|
+
import 'node:child_process';
|
|
25
22
|
import 'node:dns';
|
|
26
23
|
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
27
28
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
29
|
-
import '@simplewebauthn/server';
|
|
30
30
|
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
31
32
|
|
|
32
|
-
const phone_post = defineApi(async (
|
|
33
|
-
if (!phoneAccess(event)) return sendError(event, 403, { error: "Open wherdr on this computer (localhost) or unlock it", code: "phone_local" });
|
|
34
|
-
return phoneAction(body || {});
|
|
35
|
-
});
|
|
33
|
+
const phone_post = defineApi(async (_event, body) => phoneAction(body || {}));
|
|
36
34
|
|
|
37
35
|
export { phone_post as default };
|
|
38
36
|
//# sourceMappingURL=phone.post.mjs.map
|
|
@@ -17,23 +17,19 @@ import 'node:events';
|
|
|
17
17
|
import 'node:buffer';
|
|
18
18
|
import 'node:fs';
|
|
19
19
|
import 'node:path';
|
|
20
|
-
import 'web-push';
|
|
21
20
|
import 'node:os';
|
|
22
|
-
import 'node:child_process';
|
|
23
21
|
import 'node:net';
|
|
24
|
-
import 'node:
|
|
25
|
-
import 'node:readline';
|
|
22
|
+
import 'node:child_process';
|
|
26
23
|
import 'node:dns';
|
|
27
24
|
import 'node:util';
|
|
25
|
+
import 'web-push';
|
|
26
|
+
import 'node:string_decoder';
|
|
27
|
+
import 'node:fs/promises';
|
|
28
|
+
import 'node:readline';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
29
30
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
30
|
-
import '@simplewebauthn/server';
|
|
31
31
|
import 'node:url';
|
|
32
|
-
import '
|
|
33
|
-
import '../../../_/projectsPlugin.mjs';
|
|
34
|
-
import '../../../_/projectsPlugin2.mjs';
|
|
35
|
-
import '../../../_/pluginPolicy.mjs';
|
|
36
|
-
import '../../../_/projectsActions.mjs';
|
|
32
|
+
import '@simplewebauthn/server';
|
|
37
33
|
|
|
38
34
|
const actions_get = defineApi(async (event) => {
|
|
39
35
|
const q = getQuery(event);
|
|
@@ -17,23 +17,19 @@ import 'node:events';
|
|
|
17
17
|
import 'node:buffer';
|
|
18
18
|
import 'node:fs';
|
|
19
19
|
import 'node:path';
|
|
20
|
-
import 'web-push';
|
|
21
20
|
import 'node:os';
|
|
22
|
-
import 'node:child_process';
|
|
23
21
|
import 'node:net';
|
|
24
|
-
import 'node:
|
|
25
|
-
import 'node:readline';
|
|
22
|
+
import 'node:child_process';
|
|
26
23
|
import 'node:dns';
|
|
27
24
|
import 'node:util';
|
|
25
|
+
import 'web-push';
|
|
26
|
+
import 'node:string_decoder';
|
|
27
|
+
import 'node:fs/promises';
|
|
28
|
+
import 'node:readline';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
29
30
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
30
|
-
import '@simplewebauthn/server';
|
|
31
31
|
import 'node:url';
|
|
32
|
-
import '
|
|
33
|
-
import '../../../_/projectsPlugin.mjs';
|
|
34
|
-
import '../../../_/projectsPlugin2.mjs';
|
|
35
|
-
import '../../../_/pluginPolicy.mjs';
|
|
36
|
-
import '../../../_/projectsActions.mjs';
|
|
32
|
+
import '@simplewebauthn/server';
|
|
37
33
|
|
|
38
34
|
const invoke_post = defineApi((_event, b) => invokePluginAction(b));
|
|
39
35
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { a as defineApi, i as getQuery,
|
|
2
|
-
import { p as projectsPluginState } from '../../../_/projectsPlugin2.mjs';
|
|
1
|
+
import { a as defineApi, i as getQuery, _ as MACHINE_KEY_RE, H as HerdrError, $ as getMachine, b0 as projectsPluginState, b1 as projectsProgramVersion } from '../../../nitro/nitro.mjs';
|
|
3
2
|
import 'node:http';
|
|
4
3
|
import 'node:https';
|
|
5
4
|
import 'node:crypto';
|
|
@@ -17,26 +16,28 @@ import 'node:events';
|
|
|
17
16
|
import 'node:buffer';
|
|
18
17
|
import 'node:fs';
|
|
19
18
|
import 'node:path';
|
|
20
|
-
import 'web-push';
|
|
21
19
|
import 'node:os';
|
|
22
|
-
import 'node:child_process';
|
|
23
20
|
import 'node:net';
|
|
24
|
-
import 'node:
|
|
25
|
-
import 'node:readline';
|
|
21
|
+
import 'node:child_process';
|
|
26
22
|
import 'node:dns';
|
|
27
23
|
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
28
28
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
29
29
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
30
|
-
import '@simplewebauthn/server';
|
|
31
30
|
import 'node:url';
|
|
32
|
-
import '
|
|
31
|
+
import '@simplewebauthn/server';
|
|
33
32
|
|
|
34
33
|
const projects_get = defineApi(async (event) => {
|
|
35
34
|
const key = getQuery(event).machine;
|
|
36
35
|
if (typeof key !== "string" || key !== "" && !MACHINE_KEY_RE.test(key)) throw new HerdrError("bad_machine", "unknown machine");
|
|
37
36
|
const machine = getMachine(key);
|
|
38
37
|
if (!machine) throw new HerdrError("bad_machine", "unknown machine");
|
|
39
|
-
|
|
38
|
+
const state = await projectsPluginState(machine);
|
|
39
|
+
const program = state.status === "ready" ? await projectsProgramVersion(machine).catch(() => null) : null;
|
|
40
|
+
return { ...state, program };
|
|
40
41
|
});
|
|
41
42
|
|
|
42
43
|
export { projects_get as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { a as defineApi,
|
|
2
|
-
import { i as installProjectsPlugin } from '../../../_/projectsPlugin2.mjs';
|
|
1
|
+
import { a as defineApi, _ as MACHINE_KEY_RE, H as HerdrError, $ as getMachine, b1 as projectsProgramVersion, b2 as updateProjectsPlugin, b3 as installProjectsPlugin } from '../../../nitro/nitro.mjs';
|
|
3
2
|
import 'node:http';
|
|
4
3
|
import 'node:https';
|
|
5
4
|
import 'node:crypto';
|
|
@@ -17,25 +16,29 @@ import 'node:events';
|
|
|
17
16
|
import 'node:buffer';
|
|
18
17
|
import 'node:fs';
|
|
19
18
|
import 'node:path';
|
|
20
|
-
import 'web-push';
|
|
21
19
|
import 'node:os';
|
|
22
|
-
import 'node:child_process';
|
|
23
20
|
import 'node:net';
|
|
24
|
-
import 'node:
|
|
25
|
-
import 'node:readline';
|
|
21
|
+
import 'node:child_process';
|
|
26
22
|
import 'node:dns';
|
|
27
23
|
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
28
28
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
29
29
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
30
|
-
import '@simplewebauthn/server';
|
|
31
30
|
import 'node:url';
|
|
32
|
-
import '
|
|
31
|
+
import '@simplewebauthn/server';
|
|
33
32
|
|
|
34
33
|
const projects_post = defineApi(async (_event, body) => {
|
|
35
34
|
const key = body.machine;
|
|
36
35
|
if (typeof key !== "string" || key !== "" && !MACHINE_KEY_RE.test(key)) throw new HerdrError("bad_machine", "unknown machine");
|
|
37
36
|
const machine = getMachine(key);
|
|
38
37
|
if (!machine) throw new HerdrError("bad_machine", "unknown machine");
|
|
38
|
+
if (body.update === true) {
|
|
39
|
+
const program = await projectsProgramVersion(machine).catch(() => null);
|
|
40
|
+
return { output: await updateProjectsPlugin(machine, program) };
|
|
41
|
+
}
|
|
39
42
|
return { output: await installProjectsPlugin(machine) };
|
|
40
43
|
});
|
|
41
44
|
|