@owlmeans/viable-sdk 0.1.18-rc.8 → 0.1.18
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/README.md +29 -11
- package/agent-meta/manifest.json +16 -0
- package/agent-meta/skills/viable-sdk/SKILL.md +1033 -0
- package/build/api/collect/types.d.ts +30 -0
- package/build/api/collect/types.d.ts.map +1 -0
- package/build/api/collect/types.js +2 -0
- package/build/api/collect/types.js.map +1 -0
- package/build/api/collect.d.ts +14 -0
- package/build/api/collect.d.ts.map +1 -0
- package/build/api/collect.js +132 -0
- package/build/api/collect.js.map +1 -0
- package/build/api/consts.local.d.ts +21 -0
- package/build/api/consts.local.d.ts.map +1 -0
- package/build/api/consts.local.js +25 -0
- package/build/api/consts.local.js.map +1 -0
- package/build/api/index.d.ts +5 -0
- package/build/api/index.d.ts.map +1 -1
- package/build/api/index.js +2 -0
- package/build/api/index.js.map +1 -1
- package/build/api/remote.d.ts +13 -6
- package/build/api/remote.d.ts.map +1 -1
- package/build/api/remote.js +302 -35
- package/build/api/remote.js.map +1 -1
- package/build/api/transport/types.d.ts +14 -0
- package/build/api/transport/types.d.ts.map +1 -0
- package/build/api/transport/types.js +2 -0
- package/build/api/transport/types.js.map +1 -0
- package/build/api/transport.d.ts +4 -0
- package/build/api/transport.d.ts.map +1 -0
- package/build/api/transport.js +32 -0
- package/build/api/transport.js.map +1 -0
- package/build/api/types.d.ts +9 -0
- package/build/api/types.d.ts.map +1 -0
- package/build/api/types.js +2 -0
- package/build/api/types.js.map +1 -0
- package/build/api/types.local.d.ts +3 -0
- package/build/api/types.local.d.ts.map +1 -0
- package/build/api/types.local.js +2 -0
- package/build/api/types.local.js.map +1 -0
- package/build/consts.d.ts +29 -14
- package/build/consts.d.ts.map +1 -1
- package/build/consts.js +30 -14
- package/build/consts.js.map +1 -1
- package/build/context/consts.local.d.ts +18 -0
- package/build/context/consts.local.d.ts.map +1 -0
- package/build/context/consts.local.js +18 -0
- package/build/context/consts.local.js.map +1 -0
- package/build/context/index.d.ts +3 -7
- package/build/context/index.d.ts.map +1 -1
- package/build/context/index.js +58 -25
- package/build/context/index.js.map +1 -1
- package/build/context/types.d.ts +26 -0
- package/build/context/types.d.ts.map +1 -0
- package/build/context/types.js +2 -0
- package/build/context/types.js.map +1 -0
- package/build/executor/boot-check.d.ts +1 -40
- package/build/executor/boot-check.d.ts.map +1 -1
- package/build/executor/boot-check.js +22 -19
- package/build/executor/boot-check.js.map +1 -1
- package/build/executor/consts.d.ts +55 -0
- package/build/executor/consts.d.ts.map +1 -0
- package/build/executor/consts.js +66 -0
- package/build/executor/consts.js.map +1 -0
- package/build/executor/consts.local.d.ts +63 -0
- package/build/executor/consts.local.d.ts.map +1 -0
- package/build/executor/consts.local.js +69 -0
- package/build/executor/consts.local.js.map +1 -0
- package/build/executor/env/types.d.ts +40 -0
- package/build/executor/env/types.d.ts.map +1 -0
- package/build/executor/env/types.js +2 -0
- package/build/executor/env/types.js.map +1 -0
- package/build/executor/env.d.ts +11 -20
- package/build/executor/env.d.ts.map +1 -1
- package/build/executor/env.js +39 -59
- package/build/executor/env.js.map +1 -1
- package/build/executor/errors.d.ts +15 -0
- package/build/executor/errors.d.ts.map +1 -1
- package/build/executor/errors.js +19 -2
- package/build/executor/errors.js.map +1 -1
- package/build/executor/files/types.d.ts +106 -0
- package/build/executor/files/types.d.ts.map +1 -0
- package/build/executor/files/types.js +2 -0
- package/build/executor/files/types.js.map +1 -0
- package/build/executor/files.d.ts +2 -50
- package/build/executor/files.d.ts.map +1 -1
- package/build/executor/files.js +225 -68
- package/build/executor/files.js.map +1 -1
- package/build/executor/git/types.d.ts +19 -0
- package/build/executor/git/types.d.ts.map +1 -0
- package/build/executor/git/types.js +2 -0
- package/build/executor/git/types.js.map +1 -0
- package/build/executor/git.d.ts +4 -36
- package/build/executor/git.d.ts.map +1 -1
- package/build/executor/git.js +206 -241
- package/build/executor/git.js.map +1 -1
- package/build/executor/glob/types.d.ts +12 -0
- package/build/executor/glob/types.d.ts.map +1 -0
- package/build/executor/glob/types.js +2 -0
- package/build/executor/glob/types.js.map +1 -0
- package/build/executor/glob.d.ts +4 -0
- package/build/executor/glob.d.ts.map +1 -0
- package/build/executor/glob.js +11 -0
- package/build/executor/glob.js.map +1 -0
- package/build/executor/health/types.d.ts +39 -0
- package/build/executor/health/types.d.ts.map +1 -0
- package/build/executor/health/types.js +2 -0
- package/build/executor/health/types.js.map +1 -0
- package/build/executor/health.d.ts +3 -83
- package/build/executor/health.d.ts.map +1 -1
- package/build/executor/health.js +76 -91
- package/build/executor/health.js.map +1 -1
- package/build/executor/index.d.ts +14 -15
- package/build/executor/index.d.ts.map +1 -1
- package/build/executor/index.js +36 -18
- package/build/executor/index.js.map +1 -1
- package/build/executor/integrity/types.d.ts +25 -0
- package/build/executor/integrity/types.d.ts.map +1 -0
- package/build/executor/integrity/types.js +2 -0
- package/build/executor/integrity/types.js.map +1 -0
- package/build/executor/integrity.d.ts +5 -15
- package/build/executor/integrity.d.ts.map +1 -1
- package/build/executor/integrity.js +28 -39
- package/build/executor/integrity.js.map +1 -1
- package/build/executor/layout/types.d.ts +69 -0
- package/build/executor/layout/types.d.ts.map +1 -0
- package/build/executor/layout/types.js +2 -0
- package/build/executor/layout/types.js.map +1 -0
- package/build/executor/layout.d.ts +9 -56
- package/build/executor/layout.d.ts.map +1 -1
- package/build/executor/layout.js +35 -82
- package/build/executor/layout.js.map +1 -1
- package/build/executor/shell/types.d.ts +76 -0
- package/build/executor/shell/types.d.ts.map +1 -0
- package/build/executor/shell/types.js +2 -0
- package/build/executor/shell/types.js.map +1 -0
- package/build/executor/shell.d.ts +3 -78
- package/build/executor/shell.d.ts.map +1 -1
- package/build/executor/shell.js +61 -91
- package/build/executor/shell.js.map +1 -1
- package/build/executor/spawn/types.d.ts +98 -0
- package/build/executor/spawn/types.d.ts.map +1 -0
- package/build/executor/spawn/types.js +2 -0
- package/build/executor/spawn/types.js.map +1 -0
- package/build/executor/spawn.d.ts +3 -103
- package/build/executor/spawn.d.ts.map +1 -1
- package/build/executor/spawn.js +192 -274
- package/build/executor/spawn.js.map +1 -1
- package/build/executor/types.d.ts +123 -0
- package/build/executor/types.d.ts.map +1 -0
- package/build/executor/types.js +2 -0
- package/build/executor/types.js.map +1 -0
- package/build/executor/types.local.d.ts +6 -0
- package/build/executor/types.local.d.ts.map +1 -0
- package/build/executor/types.local.js +2 -0
- package/build/executor/types.local.js.map +1 -0
- package/build/index.d.ts +14 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +5 -1
- package/build/index.js.map +1 -1
- package/build/project/consts.d.ts +17 -0
- package/build/project/consts.d.ts.map +1 -0
- package/build/project/consts.js +17 -0
- package/build/project/consts.js.map +1 -0
- package/build/project/consts.local.d.ts +4 -0
- package/build/project/consts.local.d.ts.map +1 -0
- package/build/project/consts.local.js +4 -0
- package/build/project/consts.local.js.map +1 -0
- package/build/project/dotenv/types.d.ts +39 -0
- package/build/project/dotenv/types.d.ts.map +1 -0
- package/build/project/dotenv/types.js +2 -0
- package/build/project/dotenv/types.js.map +1 -0
- package/build/project/dotenv.d.ts +4 -0
- package/build/project/dotenv.d.ts.map +1 -0
- package/build/project/dotenv.js +56 -0
- package/build/project/dotenv.js.map +1 -0
- package/build/project/env/types.d.ts +40 -0
- package/build/project/env/types.d.ts.map +1 -0
- package/build/project/env/types.js +2 -0
- package/build/project/env/types.js.map +1 -0
- package/build/project/env.d.ts +2 -98
- package/build/project/env.d.ts.map +1 -1
- package/build/project/env.js +63 -215
- package/build/project/env.js.map +1 -1
- package/build/project/marker/types.d.ts +33 -0
- package/build/project/marker/types.d.ts.map +1 -0
- package/build/project/marker/types.js +2 -0
- package/build/project/marker/types.js.map +1 -0
- package/build/project/marker.d.ts +4 -25
- package/build/project/marker.d.ts.map +1 -1
- package/build/project/marker.js +40 -43
- package/build/project/marker.js.map +1 -1
- package/build/project/probe/types.d.ts +22 -0
- package/build/project/probe/types.d.ts.map +1 -0
- package/build/project/probe/types.js +2 -0
- package/build/project/probe/types.js.map +1 -0
- package/build/project/probe.d.ts +4 -0
- package/build/project/probe.d.ts.map +1 -0
- package/build/project/probe.js +39 -0
- package/build/project/probe.js.map +1 -0
- package/build/project/report/types.d.ts +18 -0
- package/build/project/report/types.d.ts.map +1 -0
- package/build/project/report/types.js +2 -0
- package/build/project/report/types.js.map +1 -0
- package/build/project/report.d.ts +7 -0
- package/build/project/report.d.ts.map +1 -0
- package/build/project/report.js +68 -0
- package/build/project/report.js.map +1 -0
- package/build/project/setup/types.d.ts +32 -0
- package/build/project/setup/types.d.ts.map +1 -0
- package/build/project/setup/types.js +2 -0
- package/build/project/setup/types.js.map +1 -0
- package/build/project/setup.d.ts +4 -53
- package/build/project/setup.d.ts.map +1 -1
- package/build/project/setup.js +112 -175
- package/build/project/setup.js.map +1 -1
- package/build/project/types.d.ts +37 -0
- package/build/project/types.d.ts.map +1 -0
- package/build/project/types.js +2 -0
- package/build/project/types.js.map +1 -0
- package/build/run/consts.local.d.ts +3 -0
- package/build/run/consts.local.d.ts.map +1 -0
- package/build/run/consts.local.js +26 -0
- package/build/run/consts.local.js.map +1 -0
- package/build/run/index.d.ts +11 -69
- package/build/run/index.d.ts.map +1 -1
- package/build/run/index.js +9 -147
- package/build/run/index.js.map +1 -1
- package/build/run/local/types.d.ts +39 -0
- package/build/run/local/types.d.ts.map +1 -0
- package/build/run/local/types.js +2 -0
- package/build/run/local/types.js.map +1 -0
- package/build/run/local.d.ts +3 -0
- package/build/run/local.d.ts.map +1 -0
- package/build/run/local.js +130 -0
- package/build/run/local.js.map +1 -0
- package/build/run/process/types.d.ts +15 -0
- package/build/run/process/types.d.ts.map +1 -0
- package/build/run/process/types.js +2 -0
- package/build/run/process/types.js.map +1 -0
- package/build/run/process.d.ts +4 -0
- package/build/run/process.d.ts.map +1 -0
- package/build/run/process.js +20 -0
- package/build/run/process.js.map +1 -0
- package/build/run/serve.d.ts +14 -9
- package/build/run/serve.d.ts.map +1 -1
- package/build/run/serve.js +1 -25
- package/build/run/serve.js.map +1 -1
- package/build/run/state/types.d.ts +35 -0
- package/build/run/state/types.d.ts.map +1 -0
- package/build/run/state/types.js +2 -0
- package/build/run/state/types.js.map +1 -0
- package/build/run/state.d.ts +3 -62
- package/build/run/state.d.ts.map +1 -1
- package/build/run/state.js +96 -123
- package/build/run/state.js.map +1 -1
- package/build/run/types.d.ts +78 -0
- package/build/run/types.d.ts.map +1 -0
- package/build/run/types.js +2 -0
- package/build/run/types.js.map +1 -0
- package/build/session/consts.local.d.ts +5 -0
- package/build/session/consts.local.d.ts.map +1 -0
- package/build/session/consts.local.js +5 -0
- package/build/session/consts.local.js.map +1 -0
- package/build/session/index.d.ts +5 -10
- package/build/session/index.d.ts.map +1 -1
- package/build/session/index.js +84 -15
- package/build/session/index.js.map +1 -1
- package/build/session/questions.d.ts +16 -0
- package/build/session/questions.d.ts.map +1 -0
- package/build/session/questions.js +17 -0
- package/build/session/questions.js.map +1 -0
- package/build/session/queue.d.ts +61 -0
- package/build/session/queue.d.ts.map +1 -0
- package/build/session/queue.js +156 -0
- package/build/session/queue.js.map +1 -0
- package/build/session/tasks.d.ts +11 -30
- package/build/session/tasks.d.ts.map +1 -1
- package/build/session/tasks.js +18 -78
- package/build/session/tasks.js.map +1 -1
- package/build/session/types.d.ts +20 -0
- package/build/session/types.d.ts.map +1 -0
- package/build/session/types.js +2 -0
- package/build/session/types.js.map +1 -0
- package/build/task/consts.d.ts +12 -0
- package/build/task/consts.d.ts.map +1 -0
- package/build/task/consts.js +12 -0
- package/build/task/consts.js.map +1 -0
- package/build/task/consts.local.d.ts +19 -0
- package/build/task/consts.local.d.ts.map +1 -0
- package/build/task/consts.local.js +72 -0
- package/build/task/consts.local.js.map +1 -0
- package/build/task/driver.d.ts +1 -28
- package/build/task/driver.d.ts.map +1 -1
- package/build/task/driver.js +2 -9
- package/build/task/driver.js.map +1 -1
- package/build/task/envelope/types.d.ts +29 -0
- package/build/task/envelope/types.d.ts.map +1 -0
- package/build/task/envelope/types.js +2 -0
- package/build/task/envelope/types.js.map +1 -0
- package/build/task/envelope.d.ts +4 -34
- package/build/task/envelope.d.ts.map +1 -1
- package/build/task/envelope.js +103 -165
- package/build/task/envelope.js.map +1 -1
- package/build/task/index.d.ts +5 -0
- package/build/task/index.d.ts.map +1 -1
- package/build/task/index.js +2 -0
- package/build/task/index.js.map +1 -1
- package/build/task/inquiry/types.d.ts +38 -0
- package/build/task/inquiry/types.d.ts.map +1 -0
- package/build/task/inquiry/types.js +2 -0
- package/build/task/inquiry/types.js.map +1 -0
- package/build/task/inquiry.d.ts +5 -0
- package/build/task/inquiry.d.ts.map +1 -0
- package/build/task/inquiry.js +188 -0
- package/build/task/inquiry.js.map +1 -0
- package/build/task/types.d.ts +48 -0
- package/build/task/types.d.ts.map +1 -0
- package/build/task/types.js +2 -0
- package/build/task/types.js.map +1 -0
- package/build/tools/account/types.d.ts +24 -0
- package/build/tools/account/types.d.ts.map +1 -0
- package/build/tools/account/types.js +2 -0
- package/build/tools/account/types.js.map +1 -0
- package/build/tools/account.d.ts +4 -0
- package/build/tools/account.d.ts.map +1 -0
- package/build/tools/account.js +72 -0
- package/build/tools/account.js.map +1 -0
- package/build/tools/blueprints/types.d.ts +5 -0
- package/build/tools/blueprints/types.d.ts.map +1 -0
- package/build/tools/blueprints/types.js +2 -0
- package/build/tools/blueprints/types.js.map +1 -0
- package/build/tools/blueprints.d.ts +4 -0
- package/build/tools/blueprints.d.ts.map +1 -0
- package/build/tools/blueprints.js +23 -0
- package/build/tools/blueprints.js.map +1 -0
- package/build/tools/catalogue/types.d.ts +8 -0
- package/build/tools/catalogue/types.d.ts.map +1 -0
- package/build/tools/catalogue/types.js +2 -0
- package/build/tools/catalogue/types.js.map +1 -0
- package/build/tools/catalogue.d.ts +8 -6
- package/build/tools/catalogue.d.ts.map +1 -1
- package/build/tools/catalogue.js +2565 -213
- package/build/tools/catalogue.js.map +1 -1
- package/build/tools/config/types.d.ts +19 -0
- package/build/tools/config/types.d.ts.map +1 -0
- package/build/tools/config/types.js +2 -0
- package/build/tools/config/types.js.map +1 -0
- package/build/tools/config.d.ts +4 -0
- package/build/tools/config.d.ts.map +1 -0
- package/build/tools/config.js +42 -0
- package/build/tools/config.js.map +1 -0
- package/build/tools/consts.d.ts +61 -0
- package/build/tools/consts.d.ts.map +1 -0
- package/build/tools/consts.js +515 -0
- package/build/tools/consts.js.map +1 -0
- package/build/tools/consts.local.d.ts +131 -0
- package/build/tools/consts.local.d.ts.map +1 -0
- package/build/tools/consts.local.js +236 -0
- package/build/tools/consts.local.js.map +1 -0
- package/build/tools/control/types.d.ts +17 -0
- package/build/tools/control/types.d.ts.map +1 -0
- package/build/tools/control/types.js +2 -0
- package/build/tools/control/types.js.map +1 -0
- package/build/tools/control.d.ts +4 -0
- package/build/tools/control.d.ts.map +1 -0
- package/build/tools/control.js +44 -0
- package/build/tools/control.js.map +1 -0
- package/build/tools/feed/types.d.ts +21 -0
- package/build/tools/feed/types.d.ts.map +1 -0
- package/build/tools/feed/types.js +2 -0
- package/build/tools/feed/types.js.map +1 -0
- package/build/tools/feed.d.ts +4 -0
- package/build/tools/feed.d.ts.map +1 -0
- package/build/tools/feed.js +75 -0
- package/build/tools/feed.js.map +1 -0
- package/build/tools/git/types.d.ts +25 -0
- package/build/tools/git/types.d.ts.map +1 -0
- package/build/tools/git/types.js +2 -0
- package/build/tools/git/types.js.map +1 -0
- package/build/tools/git.d.ts +4 -0
- package/build/tools/git.d.ts.map +1 -0
- package/build/tools/git.js +83 -0
- package/build/tools/git.js.map +1 -0
- package/build/tools/handover/types.d.ts +49 -0
- package/build/tools/handover/types.d.ts.map +1 -0
- package/build/tools/handover/types.js +2 -0
- package/build/tools/handover/types.js.map +1 -0
- package/build/tools/handover.d.ts +8 -0
- package/build/tools/handover.d.ts.map +1 -0
- package/build/tools/handover.js +138 -0
- package/build/tools/handover.js.map +1 -0
- package/build/tools/host/types.d.ts +34 -0
- package/build/tools/host/types.d.ts.map +1 -0
- package/build/tools/host/types.js +2 -0
- package/build/tools/host/types.js.map +1 -0
- package/build/tools/host.d.ts +4 -0
- package/build/tools/host.d.ts.map +1 -0
- package/build/tools/host.js +13 -0
- package/build/tools/host.js.map +1 -0
- package/build/tools/iam/types.d.ts +44 -0
- package/build/tools/iam/types.d.ts.map +1 -0
- package/build/tools/iam/types.js +2 -0
- package/build/tools/iam/types.js.map +1 -0
- package/build/tools/iam.d.ts +4 -0
- package/build/tools/iam.d.ts.map +1 -0
- package/build/tools/iam.js +229 -0
- package/build/tools/iam.js.map +1 -0
- package/build/tools/index.d.ts +27 -1
- package/build/tools/index.d.ts.map +1 -1
- package/build/tools/index.js +14 -1
- package/build/tools/index.js.map +1 -1
- package/build/tools/inflight/types.d.ts +47 -0
- package/build/tools/inflight/types.d.ts.map +1 -0
- package/build/tools/inflight/types.js +2 -0
- package/build/tools/inflight/types.js.map +1 -0
- package/build/tools/inflight.d.ts +3 -0
- package/build/tools/inflight.d.ts.map +1 -0
- package/build/tools/inflight.js +88 -0
- package/build/tools/inflight.js.map +1 -0
- package/build/tools/kits/types.d.ts +12 -0
- package/build/tools/kits/types.d.ts.map +1 -0
- package/build/tools/kits/types.js +2 -0
- package/build/tools/kits/types.js.map +1 -0
- package/build/tools/kits.d.ts +4 -0
- package/build/tools/kits.d.ts.map +1 -0
- package/build/tools/kits.js +33 -0
- package/build/tools/kits.js.map +1 -0
- package/build/tools/mcp.d.ts +13 -19
- package/build/tools/mcp.d.ts.map +1 -1
- package/build/tools/mcp.js +117 -38
- package/build/tools/mcp.js.map +1 -1
- package/build/tools/platform.d.ts +14 -0
- package/build/tools/platform.d.ts.map +1 -0
- package/build/tools/platform.js +90 -0
- package/build/tools/platform.js.map +1 -0
- package/build/tools/production/types.d.ts +22 -0
- package/build/tools/production/types.d.ts.map +1 -0
- package/build/tools/production/types.js +2 -0
- package/build/tools/production/types.js.map +1 -0
- package/build/tools/production.d.ts +4 -0
- package/build/tools/production.d.ts.map +1 -0
- package/build/tools/production.js +80 -0
- package/build/tools/production.js.map +1 -0
- package/build/tools/refusal/types.d.ts +95 -0
- package/build/tools/refusal/types.d.ts.map +1 -0
- package/build/tools/refusal/types.js +2 -0
- package/build/tools/refusal/types.js.map +1 -0
- package/build/tools/refusal.d.ts +4 -0
- package/build/tools/refusal.d.ts.map +1 -0
- package/build/tools/refusal.js +663 -0
- package/build/tools/refusal.js.map +1 -0
- package/build/tools/settings/types.d.ts +42 -0
- package/build/tools/settings/types.d.ts.map +1 -0
- package/build/tools/settings/types.js +2 -0
- package/build/tools/settings/types.js.map +1 -0
- package/build/tools/settings.d.ts +4 -0
- package/build/tools/settings.d.ts.map +1 -0
- package/build/tools/settings.js +71 -0
- package/build/tools/settings.js.map +1 -0
- package/build/tools/status/types.d.ts +25 -0
- package/build/tools/status/types.d.ts.map +1 -0
- package/build/tools/status/types.js +2 -0
- package/build/tools/status/types.js.map +1 -0
- package/build/tools/status.d.ts +4 -0
- package/build/tools/status.d.ts.map +1 -0
- package/build/tools/status.js +183 -0
- package/build/tools/status.js.map +1 -0
- package/build/tools/stories/types.d.ts +48 -0
- package/build/tools/stories/types.d.ts.map +1 -0
- package/build/tools/stories/types.js +2 -0
- package/build/tools/stories/types.js.map +1 -0
- package/build/tools/stories.d.ts +8 -0
- package/build/tools/stories.d.ts.map +1 -0
- package/build/tools/stories.js +79 -0
- package/build/tools/stories.js.map +1 -0
- package/build/tools/types.d.ts +177 -26
- package/build/tools/types.d.ts.map +1 -1
- package/build/tools/types.js +1 -32
- package/build/tools/types.js.map +1 -1
- package/build/types.d.ts +391 -26
- package/build/types.d.ts.map +1 -1
- package/build/utils.d.ts +8 -0
- package/build/utils.d.ts.map +1 -0
- package/build/utils.js +12 -0
- package/build/utils.js.map +1 -0
- package/package.json +30 -34
- package/build/harness/index.d.ts +0 -28
- package/build/harness/index.d.ts.map +0 -1
- package/build/harness/index.js +0 -83
- package/build/harness/index.js.map +0 -1
- package/build/harness/templates.d.ts +0 -30
- package/build/harness/templates.d.ts.map +0 -1
- package/build/harness/templates.js +0 -154
- package/build/harness/templates.js.map +0 -1
- package/build/tools/jobs.d.ts +0 -12
- package/build/tools/jobs.d.ts.map +0 -1
- package/build/tools/jobs.js +0 -47
- package/build/tools/jobs.js.map +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SubProject } from '@owlmeans/viable-common';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type { LocalFileHelper } from './files.js';
|
|
2
|
+
import type { LocalFileHelper } from './files/types.js';
|
|
3
|
+
import type { LocalShellHelper } from './shell/types.js';
|
|
5
4
|
/**
|
|
6
5
|
* The shell half of the local executor — every `SlotShellCommand`, against a directory.
|
|
7
6
|
*
|
|
@@ -9,81 +8,7 @@ import type { LocalFileHelper } from './files.js';
|
|
|
9
8
|
* success**. It is not a transcript — a command that fails returns the diagnostics a fixer or a
|
|
10
9
|
* person can act on, and a command that succeeds returns nothing at all.
|
|
11
10
|
*/
|
|
12
|
-
/**
|
|
13
|
-
* The one reason a script refuses that is NOT a verdict about the code.
|
|
14
|
-
*
|
|
15
|
-
* A build with nothing to build on is an ordinary no-op that the next trigger repeats correctly —
|
|
16
|
-
* it happens between attaching to a fresh clone and the first install. It must not be reported as
|
|
17
|
-
* a failed build, or the connector announces broken code during a window in which nothing was
|
|
18
|
-
* even attempted.
|
|
19
|
-
*/
|
|
20
|
-
export declare const NOT_INSTALLED_REASON = "cannot run: the target's dependencies are not installed yet";
|
|
21
11
|
/** Whether a refusal describes the code, or merely a window in which nothing ran. */
|
|
22
12
|
export declare const isBuildVerdict: (reason: string | null) => boolean;
|
|
23
|
-
export declare const createLocalShellHelper: (fileHelper: LocalFileHelper, subproject?: SubProject) =>
|
|
24
|
-
bun: (args?: string, options?: {
|
|
25
|
-
subproject?: SubProject;
|
|
26
|
-
}) => Promise<string | null>;
|
|
27
|
-
/**
|
|
28
|
-
* Throw the lockfile away and install again.
|
|
29
|
-
*
|
|
30
|
-
* The truncate is the point. `bun install` on its own reproduces whatever the lockfile says,
|
|
31
|
-
* and a target's lockfile was written the day the project was created — so a framework
|
|
32
|
-
* package republished afterwards is invisible to it no matter how often the target is
|
|
33
|
-
* rebuilt. Emptied rather than deleted, matching initialization: bun reads an empty file as
|
|
34
|
-
* "no lockfile", so a failed install leaves a state the next attempt resolves cleanly instead
|
|
35
|
-
* of one where a stale lock has come back.
|
|
36
|
-
*/
|
|
37
|
-
reinstall: () => Promise<string | null>;
|
|
38
|
-
buildCommon: () => Promise<string | null>;
|
|
39
|
-
validate: (subprojectOverride?: SubProject) => Promise<string | null>;
|
|
40
|
-
/** The buildability check for the UI: the browser bundle really built, or the reason it did not. */
|
|
41
|
-
validateWithRenderer: () => Promise<string | null>;
|
|
42
|
-
/**
|
|
43
|
-
* Rebuild the whole target, in dependency order.
|
|
44
|
-
*
|
|
45
|
-
* The libraries first, because everything else resolves them from `node_modules` at RUN time
|
|
46
|
-
* and follows each to its `build/index.js` — a bundle built before them starts with
|
|
47
|
-
* `Cannot find package '<slug>-backend'`, a message about a dependency for a build that never
|
|
48
|
-
* happened. The remaining three are independent, so all of them run and their problems are
|
|
49
|
-
* reported together rather than one round trip at a time.
|
|
50
|
-
*/
|
|
51
|
-
build: () => Promise<string | null>;
|
|
52
|
-
/** Build the api only — the type check the frontend renderer build cannot give it. */
|
|
53
|
-
validateBackend: () => Promise<string | null>;
|
|
54
|
-
/**
|
|
55
|
-
* Reconcile the target's database with its code.
|
|
56
|
-
*
|
|
57
|
-
* The target owns its own structure: every `@owlmeans/postgres` resource creates and updates
|
|
58
|
-
* its table while the context initializes. So a sync is not a command run against the source
|
|
59
|
-
* tree — it is *check that the database is there, then restart the backend* — and there is
|
|
60
|
-
* nothing to generate and no migration file to apply.
|
|
61
|
-
*
|
|
62
|
-
* A local target's database is the developer's. The platform provisions none, so an absent
|
|
63
|
-
* URL is reported by NAME rather than repaired: it is a line the person has to write, and
|
|
64
|
-
* "database unavailable" would send them looking at a server instead.
|
|
65
|
-
*/
|
|
66
|
-
dbSync: () => Promise<string | null>;
|
|
67
|
-
/**
|
|
68
|
-
* Answering, not enforcing.
|
|
69
|
-
*
|
|
70
|
-
* The connector refuses on its own before every spawn regardless; this exists so a caller can
|
|
71
|
-
* ask BEFORE letting a merge reach a build, and report the violations to the person whose
|
|
72
|
-
* repository they belong to.
|
|
73
|
-
*/
|
|
74
|
-
integrity: () => Promise<SlotShellResult>;
|
|
75
|
-
/**
|
|
76
|
-
* Start a real boot in isolation and return at once.
|
|
77
|
-
*
|
|
78
|
-
* A second start joins the running check rather than spawning another instance onto the port.
|
|
79
|
-
* The verdict is read with {@link bootCheckStatus}; `wait` is the legacy blocking path for a
|
|
80
|
-
* caller that predates the job.
|
|
81
|
-
*/
|
|
82
|
-
bootCheck: (options?: {
|
|
83
|
-
skipBuild?: boolean;
|
|
84
|
-
wait?: boolean;
|
|
85
|
-
}) => Promise<BootCheckReport | null>;
|
|
86
|
-
bootCheckStatus: () => Promise<BootCheckStatus>;
|
|
87
|
-
};
|
|
88
|
-
export type LocalShellHelper = ReturnType<typeof createLocalShellHelper>;
|
|
13
|
+
export declare const createLocalShellHelper: (fileHelper: LocalFileHelper, subproject?: SubProject) => LocalShellHelper;
|
|
89
14
|
//# sourceMappingURL=shell.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../src/executor/shell.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../src/executor/shell.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAwH,MAAM,yBAAyB,CAAA;AAQ1K,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAOxD;;;;;;GAMG;AAEH,qFAAqF;AACrF,eAAO,MAAM,cAAc,WAAY,MAAM,GAAG,IAAI,KAAG,OACG,CAAA;AAqB1D,eAAO,MAAM,sBAAsB,eAAgB,eAAe,eAAe,UAAU,KAAG,gBAwP7F,CAAA"}
|
package/build/executor/shell.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import fs from 'fs-extra';
|
|
2
2
|
import { randomUUID } from 'node:crypto';
|
|
3
3
|
import p from 'node:path';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { TARGET_BOOTCHECK_MARKER, TARGET_BOOTCHECK_PORT, TARGET_BOOTCHECK_SCHEMA, targetIntegrityHelper } from '@owlmeans/viable-common';
|
|
5
|
+
import { makeProjectEnvHelper } from '../project/env.js';
|
|
6
|
+
import { probeHelper } from '../project/probe.js';
|
|
7
|
+
import { ROOT_ENV_FILE } from '../project/consts.js';
|
|
8
|
+
import { makeRunStateHelper } from '../run/state.js';
|
|
7
9
|
import { createBootCheckJob, runBootCheck } from './boot-check.js';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { makeTargetEnvHelper } from './env.js';
|
|
11
|
+
import { integrityHelper } from './integrity.js';
|
|
12
|
+
import { makeLayoutHelper } from './layout.js';
|
|
13
|
+
import { spawnHelper } from './spawn.js';
|
|
14
|
+
import { NOT_INSTALLED_REASON } from './consts.js';
|
|
12
15
|
/**
|
|
13
16
|
* The shell half of the local executor — every `SlotShellCommand`, against a directory.
|
|
14
17
|
*
|
|
@@ -16,15 +19,6 @@ import { runCommand, runScript } from './spawn.js';
|
|
|
16
19
|
* success**. It is not a transcript — a command that fails returns the diagnostics a fixer or a
|
|
17
20
|
* person can act on, and a command that succeeds returns nothing at all.
|
|
18
21
|
*/
|
|
19
|
-
/**
|
|
20
|
-
* The one reason a script refuses that is NOT a verdict about the code.
|
|
21
|
-
*
|
|
22
|
-
* A build with nothing to build on is an ordinary no-op that the next trigger repeats correctly —
|
|
23
|
-
* it happens between attaching to a fresh clone and the first install. It must not be reported as
|
|
24
|
-
* a failed build, or the connector announces broken code during a window in which nothing was
|
|
25
|
-
* even attempted.
|
|
26
|
-
*/
|
|
27
|
-
export const NOT_INSTALLED_REASON = "cannot run: the target's dependencies are not installed yet";
|
|
28
22
|
/** Whether a refusal describes the code, or merely a window in which nothing ran. */
|
|
29
23
|
export const isBuildVerdict = (reason) => reason == null || !reason.includes(NOT_INSTALLED_REASON);
|
|
30
24
|
/**
|
|
@@ -45,6 +39,9 @@ const jobFor = (dir) => {
|
|
|
45
39
|
};
|
|
46
40
|
export const createLocalShellHelper = (fileHelper, subproject) => {
|
|
47
41
|
const root = p.resolve(fileHelper.getRootPath());
|
|
42
|
+
const layout = makeLayoutHelper(root);
|
|
43
|
+
const targetEnv = makeTargetEnvHelper(root);
|
|
44
|
+
const projectEnv = makeProjectEnvHelper(root);
|
|
48
45
|
/**
|
|
49
46
|
* Refuse to run anything in a tree that is no longer the generated application.
|
|
50
47
|
*
|
|
@@ -57,11 +54,11 @@ export const createLocalShellHelper = (fileHelper, subproject) => {
|
|
|
57
54
|
* answers with. A caller needs no new branch to notice.
|
|
58
55
|
*/
|
|
59
56
|
const refusal = async (prefix = 'Refused') => {
|
|
60
|
-
const report = await verifyTarget(root);
|
|
57
|
+
const report = await integrityHelper.verifyTarget(root);
|
|
61
58
|
return report.ok
|
|
62
59
|
? null
|
|
63
60
|
: `${prefix}: the project in this directory is not a Viable application\n`
|
|
64
|
-
+ formatIntegrityReport(report);
|
|
61
|
+
+ targetIntegrityHelper.formatIntegrityReport(report);
|
|
65
62
|
};
|
|
66
63
|
/**
|
|
67
64
|
* Everything that must be true before a script may be spawned, in order.
|
|
@@ -83,7 +80,7 @@ export const createLocalShellHelper = (fileHelper, subproject) => {
|
|
|
83
80
|
const refused = await refusal(`${script} refused`);
|
|
84
81
|
if (refused != null)
|
|
85
82
|
return refused;
|
|
86
|
-
return await runScript(script, cwd, env);
|
|
83
|
+
return await spawnHelper.runScript(script, cwd, env);
|
|
87
84
|
};
|
|
88
85
|
/**
|
|
89
86
|
* Build every package this tree consumes through its `build/` output, in dependency order.
|
|
@@ -95,17 +92,21 @@ export const createLocalShellHelper = (fileHelper, subproject) => {
|
|
|
95
92
|
* read once the output is current.
|
|
96
93
|
*/
|
|
97
94
|
const buildLibraries = async () => {
|
|
98
|
-
for (const cwd of libraryPaths(
|
|
95
|
+
for (const cwd of layout.libraryPaths()) {
|
|
99
96
|
const error = await runTargetScript('build', cwd);
|
|
100
97
|
if (error != null) {
|
|
101
|
-
|
|
98
|
+
// The publisher's own `buildLibraries` leaves this marker on a library build failure;
|
|
99
|
+
// matching it here is what lets `anchorDiagnostics` tell a library failure apart from a
|
|
100
|
+
// subsequent `validate()` on the caller's own subproject, whether the fixer ran against a
|
|
101
|
+
// slot or a local connector target — both report a bare `src/...` path otherwise.
|
|
102
|
+
return `${error}\nexit 1: bun run build (${p.basename(cwd)})`;
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
105
|
return null;
|
|
105
106
|
};
|
|
106
107
|
const buildWorker = async () => {
|
|
107
|
-
const dir = workerPath(
|
|
108
|
-
if (dir == null || !hasWorker(
|
|
108
|
+
const dir = layout.workerPath();
|
|
109
|
+
if (dir == null || !layout.hasWorker()) {
|
|
109
110
|
return null;
|
|
110
111
|
}
|
|
111
112
|
return await runTargetScript('build', dir);
|
|
@@ -115,19 +116,17 @@ export const createLocalShellHelper = (fileHelper, subproject) => {
|
|
|
115
116
|
const refused = await refusal();
|
|
116
117
|
if (refused != null)
|
|
117
118
|
return refused;
|
|
118
|
-
|
|
119
|
-
|
|
119
|
+
// A connector target is agent-writable. Bun's default hardlink backend makes every file in
|
|
120
|
+
// node_modules share an inode with the machine cache, so an accidental dependency edit can
|
|
121
|
+
// poison every later install on that machine. Copy the registry payload into the target and
|
|
122
|
+
// refresh it for the initial install; this also prevents a stale development cache from
|
|
123
|
+
// winning over the immutable package body named by the lockfile.
|
|
124
|
+
const cmd = `bun ${args ?? 'install --force --backend=copyfile'}`;
|
|
125
|
+
return await spawnHelper.runCommand(cmd, {
|
|
126
|
+
cwd: fileHelper.getRootPath(options?.subproject ?? subproject),
|
|
127
|
+
env: options?.env,
|
|
128
|
+
});
|
|
120
129
|
},
|
|
121
|
-
/**
|
|
122
|
-
* Throw the lockfile away and install again.
|
|
123
|
-
*
|
|
124
|
-
* The truncate is the point. `bun install` on its own reproduces whatever the lockfile says,
|
|
125
|
-
* and a target's lockfile was written the day the project was created — so a framework
|
|
126
|
-
* package republished afterwards is invisible to it no matter how often the target is
|
|
127
|
-
* rebuilt. Emptied rather than deleted, matching initialization: bun reads an empty file as
|
|
128
|
-
* "no lockfile", so a failed install leaves a state the next attempt resolves cleanly instead
|
|
129
|
-
* of one where a stale lock has come back.
|
|
130
|
-
*/
|
|
131
130
|
reinstall: async () => {
|
|
132
131
|
const refused = await refusal();
|
|
133
132
|
if (refused != null)
|
|
@@ -138,7 +137,7 @@ export const createLocalShellHelper = (fileHelper, subproject) => {
|
|
|
138
137
|
catch {
|
|
139
138
|
// No lockfile to clear is not a failure — a tree may predate one, or have had it removed.
|
|
140
139
|
}
|
|
141
|
-
return await runCommand('bun install', { cwd: root });
|
|
140
|
+
return await spawnHelper.runCommand('bun install --force --backend=copyfile', { cwd: root });
|
|
142
141
|
},
|
|
143
142
|
buildCommon: async () => {
|
|
144
143
|
const refused = await refusal();
|
|
@@ -154,88 +153,59 @@ export const createLocalShellHelper = (fileHelper, subproject) => {
|
|
|
154
153
|
if (libraries != null) {
|
|
155
154
|
return libraries;
|
|
156
155
|
}
|
|
156
|
+
// The same missing-cwd trap `runTargetScript` already refuses for a build — a role a
|
|
157
|
+
// recorded topology never mapped, or an empty/v1 tree — but `validate` spawns directly and
|
|
158
|
+
// had no such guard, so it answered `ENOENT … '/bin/sh'` about a package that was simply
|
|
159
|
+
// never there.
|
|
160
|
+
const cwd = fileHelper.getRootPath(subprojectOverride ?? subproject);
|
|
161
|
+
if (!await fs.pathExists(cwd)) {
|
|
162
|
+
return `validate cannot run: ${cwd} does not exist — the target project was never initialized in this directory`;
|
|
163
|
+
}
|
|
157
164
|
// The diagnostics are on stdout; `tsc`'s stderr is about the compiler, not about the code.
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
165
|
+
// A crash or a killed process can leave `stdout` empty on failure — falsy, but not `null` —
|
|
166
|
+
// and a fixer reading that as a diagnostic with nothing to repair loops on it forever.
|
|
167
|
+
const result = await spawnHelper.runCommand('bunx tsc --noEmit', { cwd, stdoutOnly: true });
|
|
168
|
+
return result === '' ? `validate: tsc produced no output for ${cwd}` : result;
|
|
162
169
|
},
|
|
163
|
-
|
|
164
|
-
validateWithRenderer: async () => await buildLibraries() ?? await runTargetScript('build', webPath(root), await frontendEnv(root)),
|
|
165
|
-
/**
|
|
166
|
-
* Rebuild the whole target, in dependency order.
|
|
167
|
-
*
|
|
168
|
-
* The libraries first, because everything else resolves them from `node_modules` at RUN time
|
|
169
|
-
* and follows each to its `build/index.js` — a bundle built before them starts with
|
|
170
|
-
* `Cannot find package '<slug>-backend'`, a message about a dependency for a build that never
|
|
171
|
-
* happened. The remaining three are independent, so all of them run and their problems are
|
|
172
|
-
* reported together rather than one round trip at a time.
|
|
173
|
-
*/
|
|
170
|
+
validateWithRenderer: async () => await buildLibraries() ?? await runTargetScript('build', layout.webPath(), await targetEnv.frontendEnv()),
|
|
174
171
|
build: async () => {
|
|
175
172
|
const libraries = await buildLibraries();
|
|
176
173
|
if (libraries != null) {
|
|
177
174
|
return libraries;
|
|
178
175
|
}
|
|
179
176
|
const errors = [
|
|
180
|
-
await runTargetScript('build', apiPath(
|
|
177
|
+
await runTargetScript('build', layout.apiPath()),
|
|
181
178
|
await buildWorker(),
|
|
182
|
-
await runTargetScript('build', webPath(
|
|
179
|
+
await runTargetScript('build', layout.webPath(), await targetEnv.frontendEnv()),
|
|
183
180
|
].filter((error) => error != null);
|
|
184
181
|
return errors.length > 0 ? errors.join('\n') : null;
|
|
185
182
|
},
|
|
186
|
-
|
|
187
|
-
validateBackend: async () => await buildLibraries() ?? await runTargetScript('build', apiPath(root)),
|
|
188
|
-
/**
|
|
189
|
-
* Reconcile the target's database with its code.
|
|
190
|
-
*
|
|
191
|
-
* The target owns its own structure: every `@owlmeans/postgres` resource creates and updates
|
|
192
|
-
* its table while the context initializes. So a sync is not a command run against the source
|
|
193
|
-
* tree — it is *check that the database is there, then restart the backend* — and there is
|
|
194
|
-
* nothing to generate and no migration file to apply.
|
|
195
|
-
*
|
|
196
|
-
* A local target's database is the developer's. The platform provisions none, so an absent
|
|
197
|
-
* URL is reported by NAME rather than repaired: it is a line the person has to write, and
|
|
198
|
-
* "database unavailable" would send them looking at a server instead.
|
|
199
|
-
*/
|
|
183
|
+
validateBackend: async () => await buildLibraries() ?? await runTargetScript('build', layout.apiPath()),
|
|
200
184
|
dbSync: async () => {
|
|
201
|
-
const values = await readEnvFile(
|
|
185
|
+
const values = await projectEnv.readEnvFile(ROOT_ENV_FILE);
|
|
202
186
|
const url = values.DATABASE_URL ?? '';
|
|
203
187
|
if (url === '') {
|
|
204
188
|
return `DATABASE_URL is not set in ${ROOT_ENV_FILE}. A local target uses a database on `
|
|
205
189
|
+ `this machine and the platform provisions none — set it and run this again.`;
|
|
206
190
|
}
|
|
207
|
-
const endpoint = serviceEndpoint(url);
|
|
191
|
+
const endpoint = probeHelper.serviceEndpoint(url);
|
|
208
192
|
if (endpoint == null) {
|
|
209
193
|
return `DATABASE_URL in ${ROOT_ENV_FILE} is not a URL naming a host and a port.`;
|
|
210
194
|
}
|
|
211
|
-
if (!await probePort(endpoint.host, endpoint.port)) {
|
|
195
|
+
if (!await probeHelper.probePort(endpoint.host, endpoint.port)) {
|
|
212
196
|
return `Nothing is listening at ${endpoint.host}:${endpoint.port} — `
|
|
213
197
|
+ `the database DATABASE_URL names is not reachable from this machine.`;
|
|
214
198
|
}
|
|
215
|
-
return await
|
|
199
|
+
return await makeRunStateHelper(root).restartApi();
|
|
216
200
|
},
|
|
217
|
-
/**
|
|
218
|
-
* Answering, not enforcing.
|
|
219
|
-
*
|
|
220
|
-
* The connector refuses on its own before every spawn regardless; this exists so a caller can
|
|
221
|
-
* ask BEFORE letting a merge reach a build, and report the violations to the person whose
|
|
222
|
-
* repository they belong to.
|
|
223
|
-
*/
|
|
224
201
|
integrity: async () => {
|
|
225
|
-
const report = await verifyTarget(root);
|
|
202
|
+
const report = await integrityHelper.verifyTarget(root);
|
|
226
203
|
return {
|
|
227
|
-
result: report.ok ? null : formatIntegrityReport(report),
|
|
204
|
+
result: report.ok ? null : targetIntegrityHelper.formatIntegrityReport(report),
|
|
228
205
|
ok: report.ok,
|
|
229
206
|
violations: report.violations.map(violation => `${violation.path}: ${violation.detail}`),
|
|
230
207
|
};
|
|
231
208
|
},
|
|
232
|
-
/**
|
|
233
|
-
* Start a real boot in isolation and return at once.
|
|
234
|
-
*
|
|
235
|
-
* A second start joins the running check rather than spawning another instance onto the port.
|
|
236
|
-
* The verdict is read with {@link bootCheckStatus}; `wait` is the legacy blocking path for a
|
|
237
|
-
* caller that predates the job.
|
|
238
|
-
*/
|
|
239
209
|
bootCheck: async (options = {}) => {
|
|
240
210
|
const job = jobFor(root);
|
|
241
211
|
job.start(async () => {
|
|
@@ -245,7 +215,7 @@ export const createLocalShellHelper = (fileHelper, subproject) => {
|
|
|
245
215
|
if (refused != null) {
|
|
246
216
|
return { ok: false, phase: 'build', error: refused };
|
|
247
217
|
}
|
|
248
|
-
const values = await readEnvFile(
|
|
218
|
+
const values = await projectEnv.readEnvFile(ROOT_ENV_FILE);
|
|
249
219
|
if ((values.DATABASE_URL ?? '') === '') {
|
|
250
220
|
// Without a database the check cannot connect, and reporting that as a boot failure
|
|
251
221
|
// would blame the generated code for a target that was never configured.
|
|
@@ -257,16 +227,16 @@ export const createLocalShellHelper = (fileHelper, subproject) => {
|
|
|
257
227
|
return await runBootCheck({
|
|
258
228
|
port: TARGET_BOOTCHECK_PORT,
|
|
259
229
|
marker: TARGET_BOOTCHECK_MARKER,
|
|
260
|
-
cwd: apiPath(
|
|
230
|
+
cwd: layout.apiPath(),
|
|
261
231
|
env: {
|
|
262
|
-
...await backendEnv(
|
|
232
|
+
...await targetEnv.backendEnv(),
|
|
263
233
|
BACKEND_PORT: `${TARGET_BOOTCHECK_PORT}`,
|
|
264
234
|
DATABASE_SCHEMA: TARGET_BOOTCHECK_SCHEMA,
|
|
265
235
|
},
|
|
266
236
|
bootId: randomUUID(),
|
|
267
237
|
...(options.skipBuild === true
|
|
268
238
|
? {}
|
|
269
|
-
: { build: async () => await buildLibraries() ?? await runTargetScript('build', apiPath(
|
|
239
|
+
: { build: async () => await buildLibraries() ?? await runTargetScript('build', layout.apiPath()) }),
|
|
270
240
|
});
|
|
271
241
|
});
|
|
272
242
|
if (options.wait !== true)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell.js","sourceRoot":"","sources":["../../src/executor/shell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,CAAC,MAAM,WAAW,CAAA;AAEzB,OAAO,
|
|
1
|
+
{"version":3,"file":"shell.js","sourceRoot":"","sources":["../../src/executor/shell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,CAAC,MAAM,WAAW,CAAA;AAEzB,OAAO,EAAc,uBAAuB,EAAE,qBAAqB,EAAE,uBAAuB,EAAwB,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAE1K,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,kBAAkB,E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|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { ChildProcess } from 'node:child_process';
|
|
2
|
+
import type { RunOptions } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Everything that starts, bounds or ends a child process on the developer's machine.
|
|
5
|
+
*
|
|
6
|
+
* Shared by the shell commands, the boot check and the local run so the three cannot disagree
|
|
7
|
+
* about what a failure looks like or when a port is free.
|
|
8
|
+
*/
|
|
9
|
+
export interface SpawnHelper {
|
|
10
|
+
/**
|
|
11
|
+
* Compose a failed command's output into the text a fixer reads.
|
|
12
|
+
*
|
|
13
|
+
* Never interpolate the `ExecException` beside `stderr`: its string form is
|
|
14
|
+
* `Error: Command failed: <cmd>\n<stderr>`, so the naive `${stdout} ${error} ${stderr}` shape
|
|
15
|
+
* emitted every diagnostic twice and prefixed a runner sentence that is not a diagnostic at all.
|
|
16
|
+
* Both survive into the fix conversation — the duplicate doubles the prompt for nothing, and the
|
|
17
|
+
* preamble is what a model latches onto when it cannot see a real cause. Say it once, and say
|
|
18
|
+
* what actually ran only when there is nothing else to report.
|
|
19
|
+
*/
|
|
20
|
+
failureOutput: (error: unknown, stdout: string, stderr: string, cmd: string) => string;
|
|
21
|
+
/**
|
|
22
|
+
* Run a shell command and answer "error text, or null".
|
|
23
|
+
*
|
|
24
|
+
* The one contract every shell command here shares. A caller never has to know whether the child
|
|
25
|
+
* exited non-zero, failed to spawn or produced nothing — those are all one answer.
|
|
26
|
+
*/
|
|
27
|
+
runCommand: (cmd: string, options: RunOptions) => Promise<string | null>;
|
|
28
|
+
/**
|
|
29
|
+
* Run one of the target's own `scripts.*`, bounded.
|
|
30
|
+
*
|
|
31
|
+
* `spawn` rather than `exec` because a build's output is unbounded and streaming it costs nothing,
|
|
32
|
+
* and because a wedged `bunx` resolving forever must die rather than hold the caller open. The
|
|
33
|
+
* timeout is reported as a verdict, not thrown, so it reaches the same channel a failed build does.
|
|
34
|
+
*/
|
|
35
|
+
runScript: (script: string, cwd: string, env?: Record<string, string>) => Promise<string | null>;
|
|
36
|
+
/**
|
|
37
|
+
* Bound one whole dispatch, whatever it is.
|
|
38
|
+
*
|
|
39
|
+
* Every operation below already bounds itself, but one that wedges AROUND its own bound — a lock
|
|
40
|
+
* nothing releases, a promise that never settles — holds the caller open with nothing to report,
|
|
41
|
+
* and the caller's timeout becomes the only limit. Reaching this means the operation failed to
|
|
42
|
+
* bound itself, not that it needed longer.
|
|
43
|
+
*/
|
|
44
|
+
withDeadline: <T>(label: string, ms: number, fn: () => Promise<T>) => Promise<T>;
|
|
45
|
+
/** Whether anything answers a TCP connect on a local port. */
|
|
46
|
+
probeListening: (port: number, timeoutMs?: number) => Promise<boolean>;
|
|
47
|
+
/**
|
|
48
|
+
* Wait until nothing answers on a local port.
|
|
49
|
+
*
|
|
50
|
+
* The child spawned here is a shell wrapping `bun`, so the shell's exit is not proof the target is
|
|
51
|
+
* gone: a signal the shell dies from and `bun` survives leaves an orphan that still owns the port.
|
|
52
|
+
* Whether the port answers is the only fact that decides whether a replacement can bind, so a
|
|
53
|
+
* restart waits on that and never on an exit event.
|
|
54
|
+
*/
|
|
55
|
+
waitForPortFree: (port: number, timeoutMs?: number, pollMs?: number) => Promise<boolean>;
|
|
56
|
+
/**
|
|
57
|
+
* Terminate a detached child's whole process group and wait until it is actually gone.
|
|
58
|
+
*
|
|
59
|
+
* Awaiting matters: the caller restarts right after, and a process still holding the port makes
|
|
60
|
+
* the replacement lose the bind and exit — leaving nothing listening and no error anyone reads.
|
|
61
|
+
*/
|
|
62
|
+
killGroupAndWait: (proc: ChildProcess, options?: {
|
|
63
|
+
term?: number;
|
|
64
|
+
kill?: number;
|
|
65
|
+
}) => Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Take a port back from a leftover running the same command.
|
|
68
|
+
*
|
|
69
|
+
* A connector that was killed — a host restart, a Ctrl-C, a crashed run — leaves its DETACHED
|
|
70
|
+
* children alive, because detaching them is what keeps a build from dying with the tool that
|
|
71
|
+
* started it. What survives holds the target's port, and every later attempt then fails with the
|
|
72
|
+
* target's own "the api port is already in use", which reads as a defect in the generated app.
|
|
73
|
+
*
|
|
74
|
+
* Matched by the marker the spawn carries, never by the port alone: a process this connector did
|
|
75
|
+
* not start is not ours to signal, whatever it is sitting on.
|
|
76
|
+
*/
|
|
77
|
+
reclaimPort: (port: number, marker: string) => Promise<boolean>;
|
|
78
|
+
/**
|
|
79
|
+
* The pids whose command line carries a marker.
|
|
80
|
+
*
|
|
81
|
+
* `/proc` rather than `ps`, for the same reason the publisher reads it: no shell, no parsing of a
|
|
82
|
+
* format that differs per platform. Somewhere without `/proc` simply has nothing to reclaim, which
|
|
83
|
+
* is the honest answer there.
|
|
84
|
+
*/
|
|
85
|
+
findProcesses: (needles: string | string[]) => Promise<number[]>;
|
|
86
|
+
/**
|
|
87
|
+
* Signal a process GROUP, falling back to the process.
|
|
88
|
+
*
|
|
89
|
+
* The negative pid is the point: a child spawned detached through a shell survives a signal aimed
|
|
90
|
+
* at the shell's own pid, and what survives is the `bun` process holding the port.
|
|
91
|
+
*/
|
|
92
|
+
signalGroup: (pid: number | undefined, signal: NodeJS.Signals) => boolean;
|
|
93
|
+
/** Whether a recorded pid is still a live process. */
|
|
94
|
+
isAlive: (pid: number | undefined) => boolean;
|
|
95
|
+
/** Resolve after `ms`, without holding the process open. */
|
|
96
|
+
delay: (ms: number) => Promise<void>;
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/executor/spawn/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;OASG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EA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