@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
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { TargetFileMap, TargetIntegrityReport } from '@owlmeans/viable-common';
|
|
2
|
+
/**
|
|
3
|
+
* Whether a directory still holds the generated application — the check in front of every spawn.
|
|
4
|
+
*
|
|
5
|
+
* The verdict is memoized for a couple of seconds, process-wide, and dropped wherever the
|
|
6
|
+
* connector itself changes the tree.
|
|
7
|
+
*/
|
|
8
|
+
export interface IntegrityHelper {
|
|
9
|
+
/** Read the manifest's files from a tree; a path that cannot be read comes back as `null`. */
|
|
10
|
+
readTargetFiles: (dir: string) => Promise<TargetFileMap>;
|
|
11
|
+
/** Verify the tree, reusing a verdict from the last couple of seconds. */
|
|
12
|
+
verifyTarget: (dir: string) => Promise<TargetIntegrityReport>;
|
|
13
|
+
/** Drop the memoized verdict — called wherever the connector itself changes the tree. */
|
|
14
|
+
forgetIntegrity: () => void;
|
|
15
|
+
/**
|
|
16
|
+
* The refusal text a build or shell command answers with, or `null` when the tree is fine.
|
|
17
|
+
*
|
|
18
|
+
* Text and not an exception, because "error text or null" is the contract every shell command
|
|
19
|
+
* already answers with — a caller needs no new branch to notice a refusal, and the diagnostics
|
|
20
|
+
* reach the person whose tree they belong to through the channel that already carries a failed
|
|
21
|
+
* build.
|
|
22
|
+
*/
|
|
23
|
+
integrityRefusal: (dir: string, prefix?: string) => Promise<string | null>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/executor/integrity/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAEnF;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,8FAA8F;IAC9F,eAAe,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,CAAC,CAAA;IACxD,0EAA0E;IAC1E,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAA;IAC7D,yFAAyF;IACzF,eAAe,EAAE,MAAM,IAAI,CAAA;IAC3B;;;;;;;OAOG;IACH,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;CAC3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/executor/integrity/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
1
|
+
import { type TargetFileMap } from '@owlmeans/viable-common';
|
|
2
|
+
import type { IntegrityHelper } from './integrity/types.js';
|
|
3
|
+
export declare const createIntegrityHelper: () => IntegrityHelper;
|
|
4
|
+
export declare const integrityHelper: IntegrityHelper;
|
|
5
|
+
/** @deprecated compat:factory-refactor — use `integrityHelper.readTargetFiles(…)` */
|
|
3
6
|
export declare const readTargetFiles: (dir: string) => Promise<TargetFileMap>;
|
|
4
|
-
/** Verify the tree, reusing a verdict from the last couple of seconds. */
|
|
5
|
-
export declare const verifyTarget: (dir: string) => Promise<TargetIntegrityReport>;
|
|
6
|
-
/** Drop the memoized verdict — called wherever the connector itself changes the tree. */
|
|
7
|
-
export declare const forgetIntegrity: () => void;
|
|
8
|
-
/**
|
|
9
|
-
* The refusal text a build or shell command answers with, or `null` when the tree is fine.
|
|
10
|
-
*
|
|
11
|
-
* Text and not an exception, because "error text or null" is the contract every shell command
|
|
12
|
-
* already answers with — a caller needs no new branch to notice a refusal, and the diagnostics
|
|
13
|
-
* reach the person whose tree they belong to through the channel that already carries a failed
|
|
14
|
-
* build.
|
|
15
|
-
*/
|
|
16
|
-
export declare const integrityRefusal: (dir: string, prefix?: string) => Promise<string | null>;
|
|
17
7
|
//# sourceMappingURL=integrity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrity.d.ts","sourceRoot":"","sources":["../../src/executor/integrity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integrity.d.ts","sourceRoot":"","sources":["../../src/executor/integrity.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoE,KAAK,aAAa,EAA8B,MAAM,yBAAyB,CAAA;AAE1J,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAqB3D,eAAO,MAAM,qBAAqB,QAAO,eA+BxC,CAAA;AAED,eAAO,MAAM,eAAe,iBAA0B,CAAA;AAEtD,qFAAqF;AACrF,eAAO,MAAM,eAAe,QAAe,MAAM,KAAG,OAAO,CAAC,aAAa,CAA+C,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import fs from 'fs-extra';
|
|
2
2
|
import p from 'node:path';
|
|
3
3
|
import { formatIntegrityReport, TARGET_INTEGRITY_FILES, verifyTargetShape } from '@owlmeans/viable-common';
|
|
4
|
+
import { VERDICT_TTL_MS } from './consts.local.js';
|
|
4
5
|
/**
|
|
5
6
|
* Whether this directory still holds the generated application.
|
|
6
7
|
*
|
|
@@ -15,45 +16,33 @@ import { formatIntegrityReport, TARGET_INTEGRITY_FILES, verifyTargetShape } from
|
|
|
15
16
|
* Deliberately structural and model-free: thirty-odd file reads and a list of exact strings. The
|
|
16
17
|
* question is not whether a program is good; it is whether this tree is the one we generated.
|
|
17
18
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
*
|
|
21
|
-
* Short on purpose. The check runs before every spawn — the build, the backend start, the boot
|
|
22
|
-
* check, every `bun` invocation — and several of those run back to back inside one operation. A
|
|
23
|
-
* longer window would let a write land between the check and the spawn it was meant to guard, so
|
|
24
|
-
* this is a de-duplication of one burst, not a cache.
|
|
25
|
-
*/
|
|
26
|
-
const VERDICT_TTL_MS = 2_000;
|
|
19
|
+
// Process-wide on purpose: every executor of this process shares the verdict, and every one of them
|
|
20
|
+
// forgets it when it changes the tree.
|
|
27
21
|
let _cached = null;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
* build.
|
|
51
|
-
*/
|
|
52
|
-
export const integrityRefusal = async (dir, prefix = 'Refused') => {
|
|
53
|
-
const report = await verifyTarget(dir);
|
|
54
|
-
return report.ok
|
|
55
|
-
? null
|
|
56
|
-
: `${prefix}: the project in this directory is not a Viable application\n`
|
|
57
|
-
+ formatIntegrityReport(report);
|
|
22
|
+
export const createIntegrityHelper = () => {
|
|
23
|
+
const readTargetFiles = async (dir) => {
|
|
24
|
+
const entries = await Promise.all(TARGET_INTEGRITY_FILES.map(async (file) => [file, await fs.readFile(p.join(dir, file), 'utf-8').catch(() => null)]));
|
|
25
|
+
return Object.fromEntries(entries);
|
|
26
|
+
};
|
|
27
|
+
const verifyTarget = async (dir) => {
|
|
28
|
+
if (_cached != null && _cached.root === dir && Date.now() - _cached.at < VERDICT_TTL_MS) {
|
|
29
|
+
return _cached.report;
|
|
30
|
+
}
|
|
31
|
+
const report = verifyTargetShape(await readTargetFiles(dir));
|
|
32
|
+
_cached = { at: Date.now(), root: dir, report };
|
|
33
|
+
return report;
|
|
34
|
+
};
|
|
35
|
+
const forgetIntegrity = () => { _cached = null; };
|
|
36
|
+
const integrityRefusal = async (dir, prefix = 'Refused') => {
|
|
37
|
+
const report = await verifyTarget(dir);
|
|
38
|
+
return report.ok
|
|
39
|
+
? null
|
|
40
|
+
: `${prefix}: the project in this directory is not a Viable application\n`
|
|
41
|
+
+ formatIntegrityReport(report);
|
|
42
|
+
};
|
|
43
|
+
return { readTargetFiles, verifyTarget, forgetIntegrity, integrityRefusal };
|
|
58
44
|
};
|
|
45
|
+
export const integrityHelper = createIntegrityHelper();
|
|
46
|
+
/** @deprecated compat:factory-refactor — use `integrityHelper.readTargetFiles(…)` */
|
|
47
|
+
export const readTargetFiles = async (dir) => await integrityHelper.readTargetFiles(dir);
|
|
59
48
|
//# sourceMappingURL=integrity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrity.js","sourceRoot":"","sources":["../../src/executor/integrity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,CAAC,MAAM,WAAW,CAAA;AAEzB,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"integrity.js","sourceRoot":"","sources":["../../src/executor/integrity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,CAAC,MAAM,WAAW,CAAA;AAEzB,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,iBAAiB,EAAkD,MAAM,yBAAyB,CAAA;AAC1J,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAGlD;;;;;;;;;;;;;GAaG;AAEH,oGAAoG;AACpG,uCAAuC;AACvC,IAAI,OAAO,GAAuE,IAAI,CAAA;AAEtF,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAoB,EAAE;IACzD,MAAM,eAAe,GAAG,KAAK,EAAE,GAAW,EAA0B,EAAE;QACpE,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,GAAG,CAAC,KAAK,EAAC,IAAI,EAAC,EAAE,CACxE,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAU,CAAC,CAAC,CAAA;QAEpF,OAAO,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;IACpC,CAAC,CAAA;IAED,MAAM,YAAY,GAAG,KAAK,EAAE,GAAW,EAAkC,EAAE;QACzE,IAAI,OAAO,IAAI,IAAI,IAAI,OAAO,CAAC,IAAI,KAAK,GAAG,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC;YACxF,OAAO,OAAO,CAAC,MAAM,CAAA;QACvB,CAAC;QAED,MAAM,MAAM,GAAG,iBAAiB,CAAC,MAAM,eAAe,CAAC,GAAG,CAAC,CAAC,CAAA;QAC5D,OAAO,GAAG,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAA;QAE/C,OAAO,MAAM,CAAA;IACf,CAAC,CAAA;IAED,MAAM,eAAe,GAAG,GAAS,EAAE,GAAG,OAAO,GAAG,IAAI,CAAA,CAAC,CAAC,CAAA;IAEtD,MAAM,gBAAgB,GAAG,KAAK,EAAE,GAAW,EAAE,MAAM,GAAG,SAAS,EAA0B,EAAE;QACzF,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,GAAG,CAAC,CAAA;QAEtC,OAAO,MAAM,CAAC,EAAE;YACd,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,GAAG,MAAM,+DAA+D;kBACtE,qBAAqB,CAAC,MAAM,CAAC,CAAA;IACrC,CAAC,CAAA;IAED,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAA;AAC7E,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,qBAAqB,EAAE,CAAA;AAEtD,qFAAqF;AACrF,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAAE,GAAW,EAA0B,EAAE,CAAC,MAAM,eAAe,CAAC,eAAe,CAAC,GAAG,CAAC,CAAA"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { SubProject, TargetLayout, TargetPaths } from '@owlmeans/viable-common';
|
|
2
|
+
/**
|
|
3
|
+
* Where a target project's packages live, in ONE directory.
|
|
4
|
+
*
|
|
5
|
+
* Every member reads the directory again, per call: a re-initialization replaces the tree under a
|
|
6
|
+
* running connector, and a remembered verdict would then resolve every path into a directory that
|
|
7
|
+
* no longer exists.
|
|
8
|
+
*/
|
|
9
|
+
export interface LayoutHelper {
|
|
10
|
+
/**
|
|
11
|
+
* Read the directory and say which layout its target project has.
|
|
12
|
+
*
|
|
13
|
+
* An empty or half-installed tree answers `V1`, matching the publisher: a project that has not
|
|
14
|
+
* been initialized yet resolves the paths it always did, and the answer flips by itself the
|
|
15
|
+
* moment a v2 tree lands.
|
|
16
|
+
*
|
|
17
|
+
* Deliberately un-memoized. It is two `stat`s against a page cache the process touches
|
|
18
|
+
* constantly, while a re-initialization replaces the tree wholesale under a running connector —
|
|
19
|
+
* a remembered verdict would then resolve every path into a directory that no longer exists,
|
|
20
|
+
* with a `posix_spawn` ENOENT as the only symptom.
|
|
21
|
+
*/
|
|
22
|
+
detectLayout: () => TargetLayout;
|
|
23
|
+
/** Where every role lives in this directory's target project. */
|
|
24
|
+
targetPaths: () => TargetPaths;
|
|
25
|
+
/** Absolute path of the package that runs as the target's HTTP server. */
|
|
26
|
+
apiPath: () => string;
|
|
27
|
+
/** Absolute path of the package whose `dist/` is served to a browser. */
|
|
28
|
+
webPath: () => string;
|
|
29
|
+
/**
|
|
30
|
+
* Absolute path of the package that runs as the target's queue worker, or `null` when this
|
|
31
|
+
* layout has no such package at all.
|
|
32
|
+
*
|
|
33
|
+
* A path, not a verdict: it answers where a worker WOULD live and says nothing about whether one
|
|
34
|
+
* is there. {@link LayoutHelper.hasWorker} is the disk read.
|
|
35
|
+
*/
|
|
36
|
+
workerPath: () => string | null;
|
|
37
|
+
/**
|
|
38
|
+
* Whether this target project has a queue worker.
|
|
39
|
+
*
|
|
40
|
+
* Read from disk rather than from a record, for the same reason the layout is: what runs is
|
|
41
|
+
* whatever was generated, a re-initialization can replace it under a running connector, and a
|
|
42
|
+
* remembered answer would supervise a package that is no longer there — or miss one that has
|
|
43
|
+
* just arrived. The manifest and not the directory, because a half-finished install leaves the
|
|
44
|
+
* directory behind.
|
|
45
|
+
*/
|
|
46
|
+
hasWorker: () => boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Resolve a wire-level subproject role to the directory it names in this tree.
|
|
49
|
+
*
|
|
50
|
+
* `SubProject` is a ROLE and stays one: the vocabulary on the wire is not rewritten, it is
|
|
51
|
+
* mapped, per layout. An unknown value — a role from a platform newer than this connector —
|
|
52
|
+
* falls back to the role's own name, which fails visibly rather than resolving to some other
|
|
53
|
+
* package's directory.
|
|
54
|
+
*/
|
|
55
|
+
subprojectDir: (role: SubProject) => string;
|
|
56
|
+
/**
|
|
57
|
+
* Absolute paths of the packages that must be built before anything that imports them, in
|
|
58
|
+
* dependency order — see `TargetPaths.libraries`.
|
|
59
|
+
*
|
|
60
|
+
* Every bundled package keeps its dependencies external, so `<slug>-common` and (on v2)
|
|
61
|
+
* `<slug>-backend` are resolved from `node_modules` at RUN time and followed to their `main`.
|
|
62
|
+
* Nothing else builds them: the api, web and worker builds each run inside their own directory.
|
|
63
|
+
* Missing directories are dropped — a build spawned into one that does not exist reports
|
|
64
|
+
* `ENOENT … posix_spawn '/bin/sh'`, which blames the toolchain for a tree that is simply
|
|
65
|
+
* incomplete.
|
|
66
|
+
*/
|
|
67
|
+
libraryPaths: () => string[];
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/executor/layout/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAEpF;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;;;;;OAWG;IACH,YAAY,EAAE,MAAM,YAAY,CAAA;IAChC,iEAAiE;IACjE,WAAW,EAAE,MAAM,WAAW,CAAA;IAC9B,0EAA0E;IAC1E,OAAO,EAAE,MAAM,MAAM,CAAA;IACrB,yEAAyE;IACzE,OAAO,EAAE,MAAM,MAAM,CAAA;IACrB;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,MAAM,GAAG,IAAI,CAAA;IAC/B;;;;;;;;OAQG;IACH,SAAS,EAAE,MAAM,OAAO,CAAA;IACxB;;;;;;;OAOG;IACH,aAAa,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,MAAM,CAAA;IAC3C;;;;;;;;;;OAUG;IACH,YAAY,EAAE,MAAM,MAAM,EAAE,CAAA;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/executor/layout/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,61 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { SubProject, TargetPaths } from '@owlmeans/viable-common';
|
|
1
|
+
import type { LayoutHelper } from './layout/types.js';
|
|
3
2
|
/**
|
|
4
|
-
*
|
|
3
|
+
* Where a target project's packages live, in THIS directory.
|
|
5
4
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* The tables — which role is which directory, what a full build runs, which packages must be
|
|
6
|
+
* built before anything imports them — belong to `@owlmeans/viable-common`, because the publisher
|
|
7
|
+
* answers the same questions over a pod volume. What lives here is the pair of filesystem probes
|
|
8
|
+
* that pick a layout and turn a package name into an absolute path.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* a remembered verdict would then resolve every path into a directory that no longer exists,
|
|
13
|
-
* with a `posix_spawn` ENOENT as the only symptom.
|
|
10
|
+
* Platform vs target: this describes a TARGET project's directory shape. Nothing about the SDK's
|
|
11
|
+
* own repository is v1 or v2.
|
|
14
12
|
*/
|
|
15
|
-
export declare const
|
|
16
|
-
/** Where every role lives in this directory's target project. */
|
|
17
|
-
export declare const targetPaths: (dir: string) => TargetPaths;
|
|
18
|
-
/** Absolute path of the package that runs as the target's HTTP server. */
|
|
19
|
-
export declare const apiPath: (dir: string) => string;
|
|
20
|
-
/** Absolute path of the package whose `dist/` is served to a browser. */
|
|
21
|
-
export declare const webPath: (dir: string) => string;
|
|
22
|
-
/**
|
|
23
|
-
* Absolute path of the package that runs as the target's queue worker, or `null` when this
|
|
24
|
-
* layout has no such package at all.
|
|
25
|
-
*
|
|
26
|
-
* A path, not a verdict: it answers where a worker WOULD live and says nothing about whether one
|
|
27
|
-
* is there. {@link hasWorker} is the disk read.
|
|
28
|
-
*/
|
|
29
|
-
export declare const workerPath: (dir: string) => string | null;
|
|
30
|
-
/**
|
|
31
|
-
* Whether this target project has a queue worker.
|
|
32
|
-
*
|
|
33
|
-
* Read from disk rather than from a record, for the same reason the layout is: what runs is
|
|
34
|
-
* whatever was generated, a re-initialization can replace it under a running connector, and a
|
|
35
|
-
* remembered answer would supervise a package that is no longer there — or miss one that has
|
|
36
|
-
* just arrived. The manifest and not the directory, because a half-finished install leaves the
|
|
37
|
-
* directory behind.
|
|
38
|
-
*/
|
|
39
|
-
export declare const hasWorker: (dir: string) => boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Resolve a wire-level subproject role to the directory it names in this tree.
|
|
42
|
-
*
|
|
43
|
-
* `SubProject` is a ROLE and stays one: the vocabulary on the wire is not rewritten, it is
|
|
44
|
-
* mapped, per layout. An unknown value — a role from a platform newer than this connector —
|
|
45
|
-
* falls back to the role's own name, which fails visibly rather than resolving to some other
|
|
46
|
-
* package's directory.
|
|
47
|
-
*/
|
|
48
|
-
export declare const subprojectDir: (dir: string, role: SubProject) => string;
|
|
49
|
-
/**
|
|
50
|
-
* Absolute paths of the packages that must be built before anything that imports them, in
|
|
51
|
-
* dependency order — see `TargetPaths.libraries`.
|
|
52
|
-
*
|
|
53
|
-
* Every bundled package keeps its dependencies external, so `<slug>-common` and (on v2)
|
|
54
|
-
* `<slug>-backend` are resolved from `node_modules` at RUN time and followed to their `main`.
|
|
55
|
-
* Nothing else builds them: the api, web and worker builds each run inside their own directory.
|
|
56
|
-
* Missing directories are dropped — a build spawned into one that does not exist reports
|
|
57
|
-
* `ENOENT … posix_spawn '/bin/sh'`, which blames the toolchain for a tree that is simply
|
|
58
|
-
* incomplete.
|
|
59
|
-
*/
|
|
60
|
-
export declare const libraryPaths: (dir: string) => string[];
|
|
13
|
+
export declare const makeLayoutHelper: (dir: string) => LayoutHelper;
|
|
61
14
|
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/executor/layout.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/executor/layout.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,QAAS,MAAM,KAAG,YAiD9C,CAAA"}
|
package/build/executor/layout.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import {
|
|
3
|
+
import { LAYOUTS, TargetLayout, slotLayoutHelper } from '@owlmeans/viable-common';
|
|
4
|
+
import { LAYOUT_MARKER_PATHS } from './consts.local.js';
|
|
4
5
|
/**
|
|
5
6
|
* Where a target project's packages live, in THIS directory.
|
|
6
7
|
*
|
|
@@ -12,87 +13,39 @@ import { LAYOUT_MARKERS, LAYOUTS, subprojectDirOf, TargetLayout } from '@owlmean
|
|
|
12
13
|
* Platform vs target: this describes a TARGET project's directory shape. Nothing about the SDK's
|
|
13
14
|
* own repository is v1 or v2.
|
|
14
15
|
*/
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
* moment a v2 tree lands.
|
|
22
|
-
*
|
|
23
|
-
* Deliberately un-memoized. It is two `stat`s against a page cache the process touches
|
|
24
|
-
* constantly, while a re-initialization replaces the tree wholesale under a running connector —
|
|
25
|
-
* a remembered verdict would then resolve every path into a directory that no longer exists,
|
|
26
|
-
* with a `posix_spawn` ENOENT as the only symptom.
|
|
27
|
-
*/
|
|
28
|
-
export const detectLayout = (dir) => {
|
|
29
|
-
for (const [layout, marker] of MARKERS) {
|
|
30
|
-
if (fs.existsSync(path.join(dir, marker))) {
|
|
31
|
-
return layout;
|
|
16
|
+
export const makeLayoutHelper = (dir) => {
|
|
17
|
+
const detectLayout = () => {
|
|
18
|
+
for (const [layout, marker] of LAYOUT_MARKER_PATHS) {
|
|
19
|
+
if (fs.existsSync(path.join(dir, marker))) {
|
|
20
|
+
return layout;
|
|
21
|
+
}
|
|
32
22
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
* Whether this target project has a queue worker.
|
|
61
|
-
*
|
|
62
|
-
* Read from disk rather than from a record, for the same reason the layout is: what runs is
|
|
63
|
-
* whatever was generated, a re-initialization can replace it under a running connector, and a
|
|
64
|
-
* remembered answer would supervise a package that is no longer there — or miss one that has
|
|
65
|
-
* just arrived. The manifest and not the directory, because a half-finished install leaves the
|
|
66
|
-
* directory behind.
|
|
67
|
-
*/
|
|
68
|
-
export const hasWorker = (dir) => {
|
|
69
|
-
const worker = workerPath(dir);
|
|
70
|
-
return worker != null && fs.existsSync(path.join(worker, 'package.json'));
|
|
71
|
-
};
|
|
72
|
-
/**
|
|
73
|
-
* Resolve a wire-level subproject role to the directory it names in this tree.
|
|
74
|
-
*
|
|
75
|
-
* `SubProject` is a ROLE and stays one: the vocabulary on the wire is not rewritten, it is
|
|
76
|
-
* mapped, per layout. An unknown value — a role from a platform newer than this connector —
|
|
77
|
-
* falls back to the role's own name, which fails visibly rather than resolving to some other
|
|
78
|
-
* package's directory.
|
|
79
|
-
*/
|
|
80
|
-
export const subprojectDir = (dir, role) => subprojectDirOf(detectLayout(dir), role);
|
|
81
|
-
/**
|
|
82
|
-
* Absolute paths of the packages that must be built before anything that imports them, in
|
|
83
|
-
* dependency order — see `TargetPaths.libraries`.
|
|
84
|
-
*
|
|
85
|
-
* Every bundled package keeps its dependencies external, so `<slug>-common` and (on v2)
|
|
86
|
-
* `<slug>-backend` are resolved from `node_modules` at RUN time and followed to their `main`.
|
|
87
|
-
* Nothing else builds them: the api, web and worker builds each run inside their own directory.
|
|
88
|
-
* Missing directories are dropped — a build spawned into one that does not exist reports
|
|
89
|
-
* `ENOENT … posix_spawn '/bin/sh'`, which blames the toolchain for a tree that is simply
|
|
90
|
-
* incomplete.
|
|
91
|
-
*/
|
|
92
|
-
export const libraryPaths = (dir) => {
|
|
93
|
-
const paths = targetPaths(dir);
|
|
94
|
-
return paths.libraries
|
|
95
|
-
.map(pkg => path.resolve(dir, paths.dir, pkg))
|
|
96
|
-
.filter(library => fs.existsSync(library));
|
|
23
|
+
return TargetLayout.V1;
|
|
24
|
+
};
|
|
25
|
+
const targetPaths = () => LAYOUTS[detectLayout()];
|
|
26
|
+
const apiPath = () => {
|
|
27
|
+
const paths = targetPaths();
|
|
28
|
+
return path.resolve(dir, paths.dir, paths.api);
|
|
29
|
+
};
|
|
30
|
+
const webPath = () => {
|
|
31
|
+
const paths = targetPaths();
|
|
32
|
+
return path.resolve(dir, paths.dir, paths.web);
|
|
33
|
+
};
|
|
34
|
+
const workerPath = () => {
|
|
35
|
+
const paths = targetPaths();
|
|
36
|
+
return paths.worker == null ? null : path.resolve(dir, paths.dir, paths.worker);
|
|
37
|
+
};
|
|
38
|
+
const hasWorker = () => {
|
|
39
|
+
const worker = workerPath();
|
|
40
|
+
return worker != null && fs.existsSync(path.join(worker, 'package.json'));
|
|
41
|
+
};
|
|
42
|
+
const subprojectDir = (role) => slotLayoutHelper.subprojectDirOf(detectLayout(), role);
|
|
43
|
+
const libraryPaths = () => {
|
|
44
|
+
const paths = targetPaths();
|
|
45
|
+
return paths.libraries
|
|
46
|
+
.map(pkg => path.resolve(dir, paths.dir, pkg))
|
|
47
|
+
.filter(library => fs.existsSync(library));
|
|
48
|
+
};
|
|
49
|
+
return { detectLayout, targetPaths, apiPath, webPath, workerPath, hasWorker, subprojectDir, libraryPaths };
|
|
97
50
|
};
|
|
98
51
|
//# sourceMappingURL=layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/executor/layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/executor/layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAGjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAGvD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAgB,EAAE;IAC5D,MAAM,YAAY,GAAG,GAAiB,EAAE;QACtC,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,mBAAmB,EAAE,CAAC;YACnD,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;gBAC1C,OAAO,MAAM,CAAA;YACf,CAAC;QACH,CAAC;QAED,OAAO,YAAY,CAAC,EAAE,CAAA;IACxB,CAAC,CAAA;IAED,MAAM,WAAW,GAAG,GAAgB,EAAE,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,CAAA;IAE9D,MAAM,OAAO,GAAG,GAAW,EAAE;QAC3B,MAAM,KAAK,GAAG,WAAW,EAAE,CAAA;QAE3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;IAChD,CAAC,CAAA;IAED,MAAM,OAAO,GAAG,GAAW,EAAE;QAC3B,MAAM,KAAK,GAAG,WAAW,EAAE,CAAA;QAE3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;IAChD,CAAC,CAAA;IAED,MAAM,UAAU,GAAG,GAAkB,EAAE;QACrC,MAAM,KAAK,GAAG,WAAW,EAAE,CAAA;QAE3B,OAAO,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACjF,CAAC,CAAA;IAED,MAAM,SAAS,GAAG,GAAY,EAAE;QAC9B,MAAM,MAAM,GAAG,UAAU,EAAE,CAAA;QAE3B,OAAO,MAAM,IAAI,IAAI,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAA;IAC3E,CAAC,CAAA;IAED,MAAM,aAAa,GAAG,CAAC,IAAgB,EAAU,EAAE,CACjD,gBAAgB,CAAC,eAAe,CAAC,YAAY,EAAE,EAAE,IAAI,CAAC,CAAA;IAExD,MAAM,YAAY,GAAG,GAAa,EAAE;QAClC,MAAM,KAAK,GAAG,WAAW,EAAE,CAAA;QAE3B,OAAO,KAAK,CAAC,SAAS;aACnB,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;aAC7C,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAA;IAC9C,CAAC,CAAA;IAED,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,CAAA;AAC5G,CAAC,CAAA"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { SlotShellResult, SubProject } from '@owlmeans/viable-common';
|
|
2
|
+
import type { BootCheckReport, BootCheckStatus } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* The shell half of the local executor — every `SlotShellCommand`, against a directory.
|
|
5
|
+
*
|
|
6
|
+
* The contract every method answers with is the publisher's: **error text, or `null` for
|
|
7
|
+
* success**. It is not a transcript — a command that fails returns the diagnostics a fixer or a
|
|
8
|
+
* person can act on, and a command that succeeds returns nothing at all.
|
|
9
|
+
*/
|
|
10
|
+
export interface LocalShellHelper {
|
|
11
|
+
bun: (args?: string, options?: {
|
|
12
|
+
subproject?: SubProject;
|
|
13
|
+
env?: Record<string, string>;
|
|
14
|
+
}) => Promise<string | null>;
|
|
15
|
+
/**
|
|
16
|
+
* Throw the lockfile away and install again.
|
|
17
|
+
*
|
|
18
|
+
* The truncate is the point. `bun install` on its own reproduces whatever the lockfile says,
|
|
19
|
+
* and a target's lockfile was written the day the project was created — so a framework
|
|
20
|
+
* package republished afterwards is invisible to it no matter how often the target is
|
|
21
|
+
* rebuilt. Emptied rather than deleted, matching initialization: bun reads an empty file as
|
|
22
|
+
* "no lockfile", so a failed install leaves a state the next attempt resolves cleanly instead
|
|
23
|
+
* of one where a stale lock has come back.
|
|
24
|
+
*/
|
|
25
|
+
reinstall: () => Promise<string | null>;
|
|
26
|
+
buildCommon: () => Promise<string | null>;
|
|
27
|
+
validate: (subprojectOverride?: SubProject) => Promise<string | null>;
|
|
28
|
+
/** The buildability check for the UI: the browser bundle really built, or the reason it did not. */
|
|
29
|
+
validateWithRenderer: () => Promise<string | null>;
|
|
30
|
+
/**
|
|
31
|
+
* Rebuild the whole target, in dependency order.
|
|
32
|
+
*
|
|
33
|
+
* The libraries first, because everything else resolves them from `node_modules` at RUN time
|
|
34
|
+
* and follows each to its `build/index.js` — a bundle built before them starts with
|
|
35
|
+
* `Cannot find package '<slug>-backend'`, a message about a dependency for a build that never
|
|
36
|
+
* happened. The remaining three are independent, so all of them run and their problems are
|
|
37
|
+
* reported together rather than one round trip at a time.
|
|
38
|
+
*/
|
|
39
|
+
build: () => Promise<string | null>;
|
|
40
|
+
/** Build the api only — the type check the frontend renderer build cannot give it. */
|
|
41
|
+
validateBackend: () => Promise<string | null>;
|
|
42
|
+
/**
|
|
43
|
+
* Reconcile the target's database with its code.
|
|
44
|
+
*
|
|
45
|
+
* The target owns its own structure: every `@owlmeans/postgres` resource creates and updates
|
|
46
|
+
* its table while the context initializes. So a sync is not a command run against the source
|
|
47
|
+
* tree — it is *check that the database is there, then restart the backend* — and there is
|
|
48
|
+
* nothing to generate and no migration file to apply.
|
|
49
|
+
*
|
|
50
|
+
* A local target's database is the developer's. The platform provisions none, so an absent
|
|
51
|
+
* URL is reported by NAME rather than repaired: it is a line the person has to write, and
|
|
52
|
+
* "database unavailable" would send them looking at a server instead.
|
|
53
|
+
*/
|
|
54
|
+
dbSync: () => Promise<string | null>;
|
|
55
|
+
/**
|
|
56
|
+
* Answering, not enforcing.
|
|
57
|
+
*
|
|
58
|
+
* The connector refuses on its own before every spawn regardless; this exists so a caller can
|
|
59
|
+
* ask BEFORE letting a merge reach a build, and report the violations to the person whose
|
|
60
|
+
* repository they belong to.
|
|
61
|
+
*/
|
|
62
|
+
integrity: () => Promise<SlotShellResult>;
|
|
63
|
+
/**
|
|
64
|
+
* Start a real boot in isolation and return at once.
|
|
65
|
+
*
|
|
66
|
+
* A second start joins the running check rather than spawning another instance onto the port.
|
|
67
|
+
* The verdict is read with {@link LocalShellHelper.bootCheckStatus}; `wait` is the legacy blocking path for a
|
|
68
|
+
* caller that predates the job.
|
|
69
|
+
*/
|
|
70
|
+
bootCheck: (options?: {
|
|
71
|
+
skipBuild?: boolean;
|
|
72
|
+
wait?: boolean;
|
|
73
|
+
}) => Promise<BootCheckReport | null>;
|
|
74
|
+
bootCheckStatus: () => Promise<BootCheckStatus>;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/executor/shell/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAEnE;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,UAAU,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IACnH;;;;;;;;;OASG;IACH,SAAS,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IACvC,WAAW,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IACzC,QAAQ,EAAE,CAAC,kBAAkB,CAAC,EAAE,UAAU,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IACrE,oGAAoG;IACpG,oBAAoB,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IAClD;;;;;;;;OAQG;IACH,KAAK,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IACnC,sFAAsF;IACtF,eAAe,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IAC7C;;;;;;;;;;;OAWG;IACH,MAAM,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IACpC;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAA;IACzC;;;;;;OAMG;IACH,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAAA;IACjG,eAAe,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAA;CAChD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/executor/shell/types.ts"],"names":[],"mappings":""}
|