conductor-remote 1.9.0 → 1.10.0
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/bin/cli.js +21 -6
- package/dist/assets/{index-McPNxH2y.js → index-CLtJdWE2.js} +20 -20
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/dist-node/scripts/qr.js +400 -0
- package/dist-node/scripts/service.js +467 -0
- package/dist-node/src/autoupdate.js +160 -0
- package/dist-node/src/config.js +60 -0
- package/dist-node/src/db.js +36 -0
- package/dist-node/src/git.js +98 -0
- package/dist-node/src/icons.js +56 -0
- package/dist-node/src/pkg-root.js +20 -0
- package/dist-node/src/reads.js +108 -0
- package/dist-node/src/server.js +188 -0
- package/dist-node/src/sidecar.js +186 -0
- package/dist-node/src/transcript.js +83 -0
- package/dist-node/src/writes.js +144 -0
- package/package.json +5 -5
- package/scripts/dev.ts +0 -75
- package/scripts/devtools-recon.js +0 -42
- package/scripts/gen-icons.ts +0 -22
- package/scripts/qr.ts +0 -393
- package/scripts/service.ts +0 -485
- package/src/autoupdate.ts +0 -179
- package/src/config.ts +0 -81
- package/src/db.ts +0 -38
- package/src/git.ts +0 -116
- package/src/icons.ts +0 -66
- package/src/reads.ts +0 -178
- package/src/server.ts +0 -194
- package/src/sidecar.ts +0 -194
- package/src/transcript.ts +0 -111
- package/src/writes.ts +0 -179
package/bin/cli.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// conductor-remote CLI entrypoint.
|
|
3
3
|
//
|
|
4
|
-
// Runs on plain Node ≥24 with zero flags
|
|
5
|
-
//
|
|
6
|
-
//
|
|
4
|
+
// Runs on plain Node ≥24 with zero flags. The published tarball ships compiled JS
|
|
5
|
+
// under dist-node/ (Node REFUSES to type-strip .ts under node_modules, so an
|
|
6
|
+
// installed package can't run raw sources); a dev checkout has no dist-node/ and
|
|
7
|
+
// runs the .ts sources directly, since type-stripping works outside node_modules.
|
|
8
|
+
// resolveEntry() prefers compiled, falls back to source — one entrypoint, both worlds.
|
|
7
9
|
//
|
|
8
10
|
// The one remaining wrinkle is node:sqlite, still flagged experimental in 24.
|
|
9
11
|
// We silence *only* that warning here (instead of re-execing node with
|
|
10
12
|
// --disable-warning) so the entrypoint stays a shebang + import.
|
|
11
|
-
import { readFileSync } from 'node:fs'
|
|
13
|
+
import { existsSync, readFileSync } from 'node:fs'
|
|
14
|
+
import { fileURLToPath } from 'node:url'
|
|
12
15
|
|
|
13
16
|
const emitWarning = process.emitWarning.bind(process)
|
|
14
17
|
process.emitWarning = (warning, ...rest) => {
|
|
@@ -27,6 +30,18 @@ if (major < REQUIRED_MAJOR) {
|
|
|
27
30
|
process.exit(1)
|
|
28
31
|
}
|
|
29
32
|
|
|
33
|
+
// Under node_modules (installed package) Node can't type-strip, so run compiled dist-node/; outside it
|
|
34
|
+
// (dev checkout) run the live .ts source so edits take effect without a build. Each falls back to the
|
|
35
|
+
// other if its preferred artifact is missing.
|
|
36
|
+
function resolveEntry(compiledRel, sourceRel) {
|
|
37
|
+
const order = import.meta.url.includes('/node_modules/') ? [compiledRel, sourceRel] : [sourceRel, compiledRel]
|
|
38
|
+
for (const rel of order) {
|
|
39
|
+
const url = new URL(rel, import.meta.url)
|
|
40
|
+
if (existsSync(fileURLToPath(url))) return url.href
|
|
41
|
+
}
|
|
42
|
+
return new URL(order[0], import.meta.url).href
|
|
43
|
+
}
|
|
44
|
+
|
|
30
45
|
const [cmd, ...rest] = process.argv.slice(2)
|
|
31
46
|
|
|
32
47
|
function version() {
|
|
@@ -65,12 +80,12 @@ function usage() {
|
|
|
65
80
|
switch (cmd) {
|
|
66
81
|
case undefined:
|
|
67
82
|
case 'start':
|
|
68
|
-
await import('../src/server.ts')
|
|
83
|
+
await import(resolveEntry('../dist-node/src/server.js', '../src/server.ts'))
|
|
69
84
|
break
|
|
70
85
|
case 'service':
|
|
71
86
|
// service.ts reads its subcommand from argv[2]; re-shape argv so `service install` → `install`.
|
|
72
87
|
process.argv = [process.argv[0], process.argv[1], ...rest]
|
|
73
|
-
await import('../scripts/service.ts')
|
|
88
|
+
await import(resolveEntry('../dist-node/scripts/service.js', '../scripts/service.ts'))
|
|
74
89
|
break
|
|
75
90
|
case '-v':
|
|
76
91
|
case '--version':
|