everything-dev 1.53.1 → 2.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -11
- package/dist/_virtual/_rolldown/runtime.cjs +17 -2
- package/dist/_virtual/_rolldown/runtime.mjs +36 -0
- package/dist/api/auth-middleware.cjs +161 -0
- package/dist/api/auth-middleware.cjs.map +1 -0
- package/dist/api/auth-middleware.d.cts +69 -0
- package/dist/api/auth-middleware.d.mts +69 -0
- package/dist/api/auth-middleware.mjs +160 -0
- package/dist/api/auth-middleware.mjs.map +1 -0
- package/dist/api-contract.cjs +250 -62
- package/dist/api-contract.cjs.map +1 -1
- package/dist/api-contract.mjs +246 -65
- package/dist/api-contract.mjs.map +1 -1
- package/dist/app.cjs +99 -26
- package/dist/app.cjs.map +1 -1
- package/dist/app.d.cts +3 -0
- package/dist/app.d.mts +3 -0
- package/dist/app.mjs +100 -27
- package/dist/app.mjs.map +1 -1
- package/dist/auth-login.cjs +163 -0
- package/dist/auth-login.cjs.map +1 -0
- package/dist/auth-login.mjs +162 -0
- package/dist/auth-login.mjs.map +1 -0
- package/dist/auth-session.cjs +64 -0
- package/dist/auth-session.cjs.map +1 -0
- package/dist/auth-session.mjs +58 -0
- package/dist/auth-session.mjs.map +1 -0
- package/dist/auth-types-gen.cjs +0 -1
- package/dist/auth-types-gen.cjs.map +1 -1
- package/dist/build.cjs +37 -173
- package/dist/build.cjs.map +1 -1
- package/dist/build.mjs +37 -171
- package/dist/build.mjs.map +1 -1
- package/dist/bundle-cache.cjs +74 -0
- package/dist/bundle-cache.cjs.map +1 -0
- package/dist/bundle-cache.d.cts +27 -0
- package/dist/bundle-cache.d.mts +27 -0
- package/dist/bundle-cache.mjs +68 -0
- package/dist/bundle-cache.mjs.map +1 -0
- package/dist/bundle-fs-resolve.cjs +209 -0
- package/dist/bundle-fs-resolve.cjs.map +1 -0
- package/dist/bundle-fs-resolve.d.cts +76 -0
- package/dist/bundle-fs-resolve.d.mts +76 -0
- package/dist/bundle-fs-resolve.mjs +202 -0
- package/dist/bundle-fs-resolve.mjs.map +1 -0
- package/dist/cdn-deploy.cjs +126 -0
- package/dist/cdn-deploy.cjs.map +1 -0
- package/dist/cdn-deploy.mjs +124 -0
- package/dist/cdn-deploy.mjs.map +1 -0
- package/dist/cli/db-doctor.cjs +19 -19
- package/dist/cli/db-doctor.cjs.map +1 -1
- package/dist/cli/db-doctor.mjs +18 -18
- package/dist/cli/db-doctor.mjs.map +1 -1
- package/dist/cli/db-repair.cjs +9 -32
- package/dist/cli/db-repair.cjs.map +1 -1
- package/dist/cli/db-repair.mjs +9 -32
- package/dist/cli/db-repair.mjs.map +1 -1
- package/dist/cli/framework-version.cjs +7 -3
- package/dist/cli/framework-version.cjs.map +1 -1
- package/dist/cli/framework-version.mjs +7 -3
- package/dist/cli/framework-version.mjs.map +1 -1
- package/dist/cli/infra.cjs +159 -251
- package/dist/cli/infra.cjs.map +1 -1
- package/dist/cli/infra.mjs +154 -242
- package/dist/cli/infra.mjs.map +1 -1
- package/dist/cli/init.cjs +624 -196
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.d.cts +61 -8
- package/dist/cli/init.d.mts +61 -8
- package/dist/cli/init.mjs +613 -194
- package/dist/cli/init.mjs.map +1 -1
- package/dist/cli/parse.cjs +8 -7
- package/dist/cli/parse.cjs.map +1 -1
- package/dist/cli/parse.mjs +9 -7
- package/dist/cli/parse.mjs.map +1 -1
- package/dist/cli/prompts.cjs +14 -1
- package/dist/cli/prompts.cjs.map +1 -1
- package/dist/cli/prompts.mjs +14 -1
- package/dist/cli/prompts.mjs.map +1 -1
- package/dist/cli/prune.cjs +220 -0
- package/dist/cli/prune.cjs.map +1 -0
- package/dist/cli/prune.mjs +220 -0
- package/dist/cli/prune.mjs.map +1 -0
- package/dist/cli/snapshot.cjs +2 -1
- package/dist/cli/snapshot.cjs.map +1 -1
- package/dist/cli/snapshot.mjs +2 -1
- package/dist/cli/snapshot.mjs.map +1 -1
- package/dist/cli/status.cjs +5 -4
- package/dist/cli/status.cjs.map +1 -1
- package/dist/cli/status.mjs +6 -5
- package/dist/cli/status.mjs.map +1 -1
- package/dist/cli/sync.cjs +156 -58
- package/dist/cli/sync.cjs.map +1 -1
- package/dist/cli/sync.mjs +158 -63
- package/dist/cli/sync.mjs.map +1 -1
- package/dist/cli/timing.cjs +0 -1
- package/dist/cli/timing.cjs.map +1 -1
- package/dist/cli/upgrade.cjs +95 -69
- package/dist/cli/upgrade.cjs.map +1 -1
- package/dist/cli/upgrade.mjs +97 -72
- package/dist/cli/upgrade.mjs.map +1 -1
- package/dist/cli/utils/helpers.cjs.map +1 -1
- package/dist/cli.cjs +320 -72
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +316 -68
- package/dist/cli.mjs.map +1 -1
- package/dist/code-artifacts.cjs +76 -8
- package/dist/code-artifacts.cjs.map +1 -1
- package/dist/code-artifacts.mjs +76 -10
- package/dist/code-artifacts.mjs.map +1 -1
- package/dist/commands/build.cjs +65 -0
- package/dist/commands/build.cjs.map +1 -0
- package/dist/commands/build.mjs +65 -0
- package/dist/commands/build.mjs.map +1 -0
- package/dist/commands/config.cjs +77 -0
- package/dist/commands/config.cjs.map +1 -0
- package/dist/commands/config.d.cts +8 -0
- package/dist/commands/config.d.mts +8 -0
- package/dist/commands/config.mjs +74 -0
- package/dist/commands/config.mjs.map +1 -0
- package/dist/commands/db.cjs +107 -0
- package/dist/commands/db.cjs.map +1 -0
- package/dist/commands/db.mjs +107 -0
- package/dist/commands/db.mjs.map +1 -0
- package/dist/commands/deploy.cjs +336 -0
- package/dist/commands/deploy.cjs.map +1 -0
- package/dist/commands/deploy.mjs +334 -0
- package/dist/commands/deploy.mjs.map +1 -0
- package/dist/commands/dev.cjs +75 -0
- package/dist/commands/dev.cjs.map +1 -0
- package/dist/commands/dev.mjs +73 -0
- package/dist/commands/dev.mjs.map +1 -0
- package/dist/commands/init.cjs +234 -0
- package/dist/commands/init.cjs.map +1 -0
- package/dist/commands/init.mjs +231 -0
- package/dist/commands/init.mjs.map +1 -0
- package/dist/commands/keys.cjs +255 -0
- package/dist/commands/keys.cjs.map +1 -0
- package/dist/commands/keys.mjs +253 -0
- package/dist/commands/keys.mjs.map +1 -0
- package/dist/commands/ops.cjs +199 -0
- package/dist/commands/ops.cjs.map +1 -0
- package/dist/commands/ops.mjs +197 -0
- package/dist/commands/ops.mjs.map +1 -0
- package/dist/commands/plugins.cjs +211 -0
- package/dist/commands/plugins.cjs.map +1 -0
- package/dist/commands/plugins.mjs +211 -0
- package/dist/commands/plugins.mjs.map +1 -0
- package/dist/commands/shared.cjs +8 -0
- package/dist/commands/shared.cjs.map +1 -0
- package/dist/commands/shared.d.cts +6 -0
- package/dist/commands/shared.d.mts +6 -0
- package/dist/commands/shared.mjs +8 -0
- package/dist/commands/shared.mjs.map +1 -0
- package/dist/commands/upgrade.cjs +325 -0
- package/dist/commands/upgrade.cjs.map +1 -0
- package/dist/commands/upgrade.mjs +323 -0
- package/dist/commands/upgrade.mjs.map +1 -0
- package/dist/components/dev-render.cjs +340 -0
- package/dist/components/dev-render.cjs.map +1 -0
- package/dist/components/dev-render.mjs +332 -0
- package/dist/components/dev-render.mjs.map +1 -0
- package/dist/config.cjs +460 -221
- package/dist/config.cjs.map +1 -1
- package/dist/config.d.cts +491 -48
- package/dist/config.d.mts +491 -48
- package/dist/config.mjs +439 -212
- package/dist/config.mjs.map +1 -1
- package/dist/contract.cjs +327 -50
- package/dist/contract.cjs.map +1 -1
- package/dist/contract.d.cts +1951 -1062
- package/dist/contract.d.mts +1951 -1062
- package/dist/contract.meta.cjs +107 -12
- package/dist/contract.meta.cjs.map +1 -1
- package/dist/contract.meta.d.cts +166 -8
- package/dist/contract.meta.d.mts +166 -8
- package/dist/contract.meta.mjs +107 -11
- package/dist/contract.meta.mjs.map +1 -1
- package/dist/contract.mjs +580 -327
- package/dist/contract.mjs.map +1 -1
- package/dist/dag.cjs +5 -3
- package/dist/dag.cjs.map +1 -1
- package/dist/dag.mjs +6 -3
- package/dist/dag.mjs.map +1 -1
- package/dist/db/binding.cjs +80 -0
- package/dist/db/binding.cjs.map +1 -0
- package/dist/db/binding.d.cts +39 -0
- package/dist/db/binding.d.mts +39 -0
- package/dist/db/binding.mjs +78 -0
- package/dist/db/binding.mjs.map +1 -0
- package/dist/db/bindings.cjs +78 -0
- package/dist/db/bindings.cjs.map +1 -0
- package/dist/db/bindings.d.cts +34 -0
- package/dist/db/bindings.d.mts +34 -0
- package/dist/db/bindings.mjs +76 -0
- package/dist/db/bindings.mjs.map +1 -0
- package/dist/db/core.cjs +204 -0
- package/dist/db/core.cjs.map +1 -0
- package/dist/db/core.d.cts +69 -0
- package/dist/db/core.d.mts +69 -0
- package/dist/db/core.mjs +192 -0
- package/dist/db/core.mjs.map +1 -0
- package/dist/db/driver.cjs +167 -0
- package/dist/db/driver.cjs.map +1 -0
- package/dist/db/driver.d.cts +50 -0
- package/dist/db/driver.d.mts +50 -0
- package/dist/db/driver.mjs +165 -0
- package/dist/db/driver.mjs.map +1 -0
- package/dist/db/drizzle-kit.cjs +177 -0
- package/dist/db/drizzle-kit.cjs.map +1 -0
- package/dist/db/drizzle-kit.d.cts +25 -0
- package/dist/db/drizzle-kit.d.mts +25 -0
- package/dist/db/drizzle-kit.mjs +175 -0
- package/dist/db/drizzle-kit.mjs.map +1 -0
- package/dist/db/errors.cjs +27 -0
- package/dist/db/errors.cjs.map +1 -0
- package/dist/db/errors.d.cts +16 -0
- package/dist/db/errors.d.mts +16 -0
- package/dist/db/errors.mjs +26 -0
- package/dist/db/errors.mjs.map +1 -0
- package/dist/db/identity.cjs +55 -0
- package/dist/db/identity.cjs.map +1 -0
- package/dist/db/identity.d.cts +40 -0
- package/dist/db/identity.d.mts +40 -0
- package/dist/db/identity.mjs +53 -0
- package/dist/db/identity.mjs.map +1 -0
- package/dist/db/index.cjs +43 -0
- package/dist/db/index.d.cts +9 -0
- package/dist/db/index.d.mts +9 -0
- package/dist/db/index.mjs +10 -0
- package/dist/db/run-migrations.cjs +343 -0
- package/dist/db/run-migrations.cjs.map +1 -0
- package/dist/db/run-migrations.d.cts +87 -0
- package/dist/db/run-migrations.d.mts +87 -0
- package/dist/db/run-migrations.mjs +341 -0
- package/dist/db/run-migrations.mjs.map +1 -0
- package/dist/delegate-signer.cjs +85 -0
- package/dist/delegate-signer.cjs.map +1 -0
- package/dist/delegate-signer.mjs +84 -0
- package/dist/delegate-signer.mjs.map +1 -0
- package/dist/deploy-diff.cjs +119 -0
- package/dist/deploy-diff.cjs.map +1 -0
- package/dist/deploy-diff.mjs +109 -0
- package/dist/deploy-diff.mjs.map +1 -0
- package/dist/descriptor/constructors.cjs +49 -0
- package/dist/descriptor/constructors.cjs.map +1 -0
- package/dist/descriptor/constructors.d.cts +27 -0
- package/dist/descriptor/constructors.d.mts +27 -0
- package/dist/descriptor/constructors.mjs +45 -0
- package/dist/descriptor/constructors.mjs.map +1 -0
- package/dist/descriptor/index.cjs +24 -0
- package/dist/descriptor/index.d.cts +5 -0
- package/dist/descriptor/index.d.mts +5 -0
- package/dist/descriptor/index.mjs +6 -0
- package/dist/descriptor/resolve.cjs +258 -0
- package/dist/descriptor/resolve.cjs.map +1 -0
- package/dist/descriptor/resolve.d.cts +50 -0
- package/dist/descriptor/resolve.d.mts +50 -0
- package/dist/descriptor/resolve.mjs +252 -0
- package/dist/descriptor/resolve.mjs.map +1 -0
- package/dist/descriptor/schema.cjs +109 -0
- package/dist/descriptor/schema.cjs.map +1 -0
- package/dist/descriptor/schema.d.cts +217 -0
- package/dist/descriptor/schema.d.mts +217 -0
- package/dist/descriptor/schema.mjs +102 -0
- package/dist/descriptor/schema.mjs.map +1 -0
- package/dist/descriptor/serialize.cjs +45 -0
- package/dist/descriptor/serialize.cjs.map +1 -0
- package/dist/descriptor/serialize.d.cts +7 -0
- package/dist/descriptor/serialize.d.mts +7 -0
- package/dist/descriptor/serialize.mjs +45 -0
- package/dist/descriptor/serialize.mjs.map +1 -0
- package/dist/dev-log-pipeline.cjs +273 -0
- package/dist/dev-log-pipeline.cjs.map +1 -0
- package/dist/dev-log-pipeline.mjs +267 -0
- package/dist/dev-log-pipeline.mjs.map +1 -0
- package/dist/dev-logs.cjs +39 -8
- package/dist/dev-logs.cjs.map +1 -1
- package/dist/dev-logs.mjs +37 -9
- package/dist/dev-logs.mjs.map +1 -1
- package/dist/dev-program.cjs +405 -0
- package/dist/dev-program.cjs.map +1 -0
- package/dist/dev-program.d.cts +10 -0
- package/dist/dev-program.d.mts +10 -0
- package/dist/dev-program.mjs +395 -0
- package/dist/dev-program.mjs.map +1 -0
- package/dist/dev-session-data.d.cts +27 -0
- package/dist/dev-session-data.d.mts +27 -0
- package/dist/dev-session.cjs +178 -105
- package/dist/dev-session.cjs.map +1 -1
- package/dist/dev-session.mjs +180 -105
- package/dist/dev-session.mjs.map +1 -1
- package/dist/env/process-env.cjs +16 -0
- package/dist/env/process-env.cjs.map +1 -0
- package/dist/env/process-env.mjs +13 -0
- package/dist/env/process-env.mjs.map +1 -0
- package/dist/env/project-env.cjs +144 -0
- package/dist/env/project-env.cjs.map +1 -0
- package/dist/env/project-env.d.cts +1 -0
- package/dist/env/project-env.d.mts +1 -0
- package/dist/env/project-env.mjs +132 -0
- package/dist/env/project-env.mjs.map +1 -0
- package/dist/fastkv.cjs +59 -12
- package/dist/fastkv.cjs.map +1 -1
- package/dist/fastkv.d.cts +42 -6
- package/dist/fastkv.d.mts +42 -6
- package/dist/fastkv.mjs +58 -13
- package/dist/fastkv.mjs.map +1 -1
- package/dist/fingerprint.cjs +57 -0
- package/dist/fingerprint.cjs.map +1 -0
- package/dist/fingerprint.d.cts +14 -0
- package/dist/fingerprint.d.mts +14 -0
- package/dist/fingerprint.mjs +55 -0
- package/dist/fingerprint.mjs.map +1 -0
- package/dist/http-client.cjs +17 -17
- package/dist/http-client.cjs.map +1 -1
- package/dist/http-client.mjs +17 -17
- package/dist/http-client.mjs.map +1 -1
- package/dist/image-deploy.cjs +186 -0
- package/dist/image-deploy.cjs.map +1 -0
- package/dist/image-deploy.mjs +182 -0
- package/dist/image-deploy.mjs.map +1 -0
- package/dist/index.cjs +66 -18
- package/dist/index.d.cts +8 -7
- package/dist/index.d.mts +8 -7
- package/dist/index.mjs +6 -5
- package/dist/infra/docker.cjs +77 -0
- package/dist/infra/docker.cjs.map +1 -0
- package/dist/infra/docker.d.cts +10 -0
- package/dist/infra/docker.d.mts +10 -0
- package/dist/infra/docker.mjs +69 -0
- package/dist/infra/docker.mjs.map +1 -0
- package/dist/infra/materializer.cjs +74 -0
- package/dist/infra/materializer.cjs.map +1 -0
- package/dist/infra/materializer.mjs +70 -0
- package/dist/infra/materializer.mjs.map +1 -0
- package/dist/infra/planner.cjs +135 -103
- package/dist/infra/planner.cjs.map +1 -1
- package/dist/infra/planner.mjs +137 -104
- package/dist/infra/planner.mjs.map +1 -1
- package/dist/infra/port-ownership.cjs +57 -0
- package/dist/infra/port-ownership.cjs.map +1 -0
- package/dist/infra/port-ownership.mjs +57 -0
- package/dist/infra/port-ownership.mjs.map +1 -0
- package/dist/infra/preflight.cjs +45 -33
- package/dist/infra/preflight.cjs.map +1 -1
- package/dist/infra/preflight.d.cts +1 -0
- package/dist/infra/preflight.d.mts +1 -0
- package/dist/infra/preflight.mjs +46 -34
- package/dist/infra/preflight.mjs.map +1 -1
- package/dist/infra/types.cjs.map +1 -1
- package/dist/infra/types.d.cts +2 -0
- package/dist/infra/types.d.mts +2 -0
- package/dist/infra/types.mjs.map +1 -1
- package/dist/integrity.cjs +50 -61
- package/dist/integrity.cjs.map +1 -1
- package/dist/integrity.d.cts +16 -10
- package/dist/integrity.d.mts +16 -10
- package/dist/integrity.mjs +50 -59
- package/dist/integrity.mjs.map +1 -1
- package/dist/internal/manifest-normalizer.cjs +8 -2
- package/dist/internal/manifest-normalizer.cjs.map +1 -1
- package/dist/internal/manifest-normalizer.mjs +9 -3
- package/dist/internal/manifest-normalizer.mjs.map +1 -1
- package/dist/merge.cjs +19 -1
- package/dist/merge.cjs.map +1 -1
- package/dist/merge.d.cts +1 -1
- package/dist/merge.d.mts +1 -1
- package/dist/merge.mjs +19 -2
- package/dist/merge.mjs.map +1 -1
- package/dist/mf.cjs +190 -3
- package/dist/mf.cjs.map +1 -1
- package/dist/mf.d.cts +24 -2
- package/dist/mf.d.mts +24 -2
- package/dist/mf.mjs +189 -4
- package/dist/mf.mjs.map +1 -1
- package/dist/near-cli.cjs +59 -91
- package/dist/near-cli.cjs.map +1 -1
- package/dist/near-cli.mjs +58 -90
- package/dist/near-cli.mjs.map +1 -1
- package/dist/near-signer.cjs +73 -0
- package/dist/near-signer.cjs.map +1 -0
- package/dist/near-signer.mjs +70 -0
- package/dist/near-signer.mjs.map +1 -0
- package/dist/network.cjs +0 -1
- package/dist/network.cjs.map +1 -1
- package/dist/orchestrator.cjs +256 -87
- package/dist/orchestrator.cjs.map +1 -1
- package/dist/orchestrator.mjs +248 -87
- package/dist/orchestrator.mjs.map +1 -1
- package/dist/platform-deploy.cjs +81 -0
- package/dist/platform-deploy.cjs.map +1 -0
- package/dist/platform-deploy.mjs +80 -0
- package/dist/platform-deploy.mjs.map +1 -0
- package/dist/plugin.cjs +54 -1389
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts +6 -896
- package/dist/plugin.d.mts +6 -896
- package/dist/plugin.mjs +53 -1387
- package/dist/plugin.mjs.map +1 -1
- package/dist/process-kill.cjs +44 -0
- package/dist/process-kill.cjs.map +1 -0
- package/dist/process-kill.mjs +43 -0
- package/dist/process-kill.mjs.map +1 -0
- package/dist/process-registry.cjs +64 -9
- package/dist/process-registry.cjs.map +1 -1
- package/dist/process-registry.mjs +61 -10
- package/dist/process-registry.mjs.map +1 -1
- package/dist/progress.cjs +45 -0
- package/dist/progress.cjs.map +1 -0
- package/dist/progress.d.cts +13 -0
- package/dist/progress.d.mts +13 -0
- package/dist/progress.mjs +42 -0
- package/dist/progress.mjs.map +1 -0
- package/dist/publish.cjs +513 -79
- package/dist/publish.cjs.map +1 -1
- package/dist/publish.mjs +515 -82
- package/dist/publish.mjs.map +1 -1
- package/dist/registry-use.cjs +41 -0
- package/dist/registry-use.cjs.map +1 -0
- package/dist/registry-use.mjs +40 -0
- package/dist/registry-use.mjs.map +1 -0
- package/dist/resolution/session.cjs +335 -0
- package/dist/resolution/session.cjs.map +1 -0
- package/dist/resolution/session.d.cts +105 -0
- package/dist/resolution/session.d.mts +105 -0
- package/dist/resolution/session.mjs +331 -0
- package/dist/resolution/session.mjs.map +1 -0
- package/dist/rollback.cjs +131 -0
- package/dist/rollback.cjs.map +1 -0
- package/dist/rollback.mjs +128 -0
- package/dist/rollback.mjs.map +1 -0
- package/dist/sdk.cjs +7 -7
- package/dist/sdk.d.cts +3 -3
- package/dist/sdk.d.mts +3 -3
- package/dist/sdk.mjs +2 -2
- package/dist/service-descriptor.cjs +67 -34
- package/dist/service-descriptor.cjs.map +1 -1
- package/dist/service-descriptor.d.cts +4 -1
- package/dist/service-descriptor.d.mts +3 -0
- package/dist/service-descriptor.mjs +63 -35
- package/dist/service-descriptor.mjs.map +1 -1
- package/dist/shared-deps.cjs +17 -16
- package/dist/shared-deps.cjs.map +1 -1
- package/dist/shared-deps.mjs +17 -16
- package/dist/shared-deps.mjs.map +1 -1
- package/dist/start-config-source.cjs +24 -0
- package/dist/start-config-source.cjs.map +1 -0
- package/dist/start-config-source.d.cts +29 -0
- package/dist/start-config-source.d.mts +29 -0
- package/dist/start-config-source.mjs +22 -0
- package/dist/start-config-source.mjs.map +1 -0
- package/dist/storage-upload.cjs +145 -0
- package/dist/storage-upload.cjs.map +1 -0
- package/dist/storage-upload.mjs +143 -0
- package/dist/storage-upload.mjs.map +1 -0
- package/dist/types.cjs +126 -20
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +867 -585
- package/dist/types.d.mts +867 -585
- package/dist/types.mjs +307 -208
- package/dist/types.mjs.map +1 -1
- package/dist/ui/api.cjs +105 -0
- package/dist/ui/api.cjs.map +1 -0
- package/dist/ui/api.d.cts +31 -0
- package/dist/ui/api.d.mts +31 -0
- package/dist/ui/api.mjs +99 -0
- package/dist/ui/api.mjs.map +1 -0
- package/dist/ui/auth-guards.cjs +50 -0
- package/dist/ui/auth-guards.cjs.map +1 -0
- package/dist/ui/auth-guards.d.cts +39 -0
- package/dist/ui/auth-guards.d.mts +39 -0
- package/dist/ui/auth-guards.mjs +48 -0
- package/dist/ui/auth-guards.mjs.map +1 -0
- package/dist/ui/auth.cjs +197 -0
- package/dist/ui/auth.cjs.map +1 -0
- package/dist/ui/auth.d.cts +56 -0
- package/dist/ui/auth.d.mts +56 -0
- package/dist/ui/auth.mjs +179 -0
- package/dist/ui/auth.mjs.map +1 -0
- package/dist/ui/entry.cjs +16 -0
- package/dist/ui/entry.cjs.map +1 -0
- package/dist/ui/entry.d.cts +12 -0
- package/dist/ui/entry.d.mts +12 -0
- package/dist/ui/entry.mjs +15 -0
- package/dist/ui/entry.mjs.map +1 -0
- package/dist/ui/head.cjs +14 -7
- package/dist/ui/head.cjs.map +1 -1
- package/dist/ui/head.mjs +15 -7
- package/dist/ui/head.mjs.map +1 -1
- package/dist/ui/hydrate.cjs +265 -0
- package/dist/ui/hydrate.cjs.map +1 -0
- package/dist/ui/hydrate.d.cts +48 -0
- package/dist/ui/hydrate.d.mts +48 -0
- package/dist/ui/hydrate.mjs +263 -0
- package/dist/ui/hydrate.mjs.map +1 -0
- package/dist/ui/i18n.cjs +153 -0
- package/dist/ui/i18n.cjs.map +1 -0
- package/dist/ui/i18n.d.cts +29 -0
- package/dist/ui/i18n.d.mts +29 -0
- package/dist/ui/i18n.mjs +140 -0
- package/dist/ui/i18n.mjs.map +1 -0
- package/dist/ui/index.cjs +19 -1
- package/dist/ui/index.d.cts +6 -3
- package/dist/ui/index.d.mts +6 -3
- package/dist/ui/index.mjs +5 -2
- package/dist/ui/locale.cjs +53 -0
- package/dist/ui/locale.cjs.map +1 -0
- package/dist/ui/locale.d.cts +18 -0
- package/dist/ui/locale.d.mts +18 -0
- package/dist/ui/locale.mjs +49 -0
- package/dist/ui/locale.mjs.map +1 -0
- package/dist/ui/manifest/index.cjs +25 -0
- package/dist/ui/manifest/index.cjs.map +1 -0
- package/dist/ui/manifest/index.d.cts +9 -0
- package/dist/ui/manifest/index.d.mts +9 -0
- package/dist/ui/manifest/index.mjs +13 -0
- package/dist/ui/manifest/index.mjs.map +1 -0
- package/dist/ui/manifest-generator.cjs +8 -0
- package/dist/ui/manifest-generator.d.cts +1 -0
- package/dist/ui/manifest-generator.d.mts +1 -0
- package/dist/ui/manifest-generator.mjs +3 -0
- package/dist/ui/message-catalogs.cjs +8 -0
- package/dist/ui/message-catalogs.cjs.map +1 -0
- package/dist/ui/message-catalogs.d.cts +5 -0
- package/dist/ui/message-catalogs.d.mts +5 -0
- package/dist/ui/message-catalogs.mjs +8 -0
- package/dist/ui/message-catalogs.mjs.map +1 -0
- package/dist/ui/metadata.cjs +0 -1
- package/dist/ui/metadata.cjs.map +1 -1
- package/dist/ui/metadata.d.cts +1 -1
- package/dist/ui/metadata.d.mts +1 -1
- package/dist/ui/plugin-path.cjs +37 -0
- package/dist/ui/plugin-path.cjs.map +1 -0
- package/dist/ui/plugin-path.d.cts +25 -0
- package/dist/ui/plugin-path.d.mts +25 -0
- package/dist/ui/plugin-path.mjs +35 -0
- package/dist/ui/plugin-path.mjs.map +1 -0
- package/dist/ui/router-client.cjs +61 -0
- package/dist/ui/router-client.cjs.map +1 -0
- package/dist/ui/router-client.d.cts +20 -0
- package/dist/ui/router-client.d.mts +20 -0
- package/dist/ui/router-client.mjs +60 -0
- package/dist/ui/router-client.mjs.map +1 -0
- package/dist/ui/router-defaults.cjs +48 -0
- package/dist/ui/router-defaults.cjs.map +1 -0
- package/dist/ui/router-defaults.d.cts +8 -0
- package/dist/ui/router-defaults.d.mts +8 -0
- package/dist/ui/router-defaults.mjs +45 -0
- package/dist/ui/router-defaults.mjs.map +1 -0
- package/dist/ui/router-error.cjs +70 -0
- package/dist/ui/router-error.cjs.map +1 -0
- package/dist/ui/router-error.d.cts +19 -0
- package/dist/ui/router-error.d.mts +19 -0
- package/dist/ui/router-error.mjs +69 -0
- package/dist/ui/router-error.mjs.map +1 -0
- package/dist/ui/router-server.cjs +153 -0
- package/dist/ui/router-server.cjs.map +1 -0
- package/dist/ui/router-server.d.cts +38 -0
- package/dist/ui/router-server.d.mts +38 -0
- package/dist/ui/router-server.mjs +152 -0
- package/dist/ui/router-server.mjs.map +1 -0
- package/dist/ui/router.cjs +4 -16
- package/dist/ui/router.cjs.map +1 -1
- package/dist/ui/router.mjs +4 -15
- package/dist/ui/router.mjs.map +1 -1
- package/dist/ui/runtime.cjs +5 -1
- package/dist/ui/runtime.cjs.map +1 -1
- package/dist/ui/runtime.d.cts +2 -1
- package/dist/ui/runtime.d.mts +2 -1
- package/dist/ui/runtime.mjs +5 -1
- package/dist/ui/runtime.mjs.map +1 -1
- package/dist/ui/slot.cjs +34 -0
- package/dist/ui/slot.cjs.map +1 -0
- package/dist/ui/slot.d.cts +43 -0
- package/dist/ui/slot.d.mts +43 -0
- package/dist/ui/slot.mjs +34 -0
- package/dist/ui/slot.mjs.map +1 -0
- package/dist/ui/tenant.cjs +300 -0
- package/dist/ui/tenant.cjs.map +1 -0
- package/dist/ui/tenant.d.cts +122 -0
- package/dist/ui/tenant.d.mts +122 -0
- package/dist/ui/tenant.mjs +279 -0
- package/dist/ui/tenant.mjs.map +1 -0
- package/dist/ui/types.d.cts +32 -2
- package/dist/ui/types.d.mts +32 -2
- package/dist/ui/version-check.cjs +47 -0
- package/dist/ui/version-check.cjs.map +1 -0
- package/dist/ui/version-check.d.cts +23 -0
- package/dist/ui/version-check.d.mts +23 -0
- package/dist/ui/version-check.mjs +46 -0
- package/dist/ui/version-check.mjs.map +1 -0
- package/dist/utils/banner.cjs +2 -2
- package/dist/utils/banner.cjs.map +1 -1
- package/dist/utils/banner.mjs +2 -2
- package/dist/utils/banner.mjs.map +1 -1
- package/dist/utils/linkify.cjs +1 -1
- package/dist/utils/linkify.cjs.map +1 -1
- package/dist/utils/linkify.mjs +1 -0
- package/dist/utils/linkify.mjs.map +1 -1
- package/dist/utils/run.cjs +6 -6
- package/dist/utils/run.cjs.map +1 -1
- package/dist/utils/run.mjs +6 -6
- package/dist/utils/run.mjs.map +1 -1
- package/dist/utils/save-config.cjs +12 -0
- package/dist/utils/save-config.cjs.map +1 -1
- package/dist/utils/save-config.mjs +12 -0
- package/dist/utils/save-config.mjs.map +1 -1
- package/dist/utils/snapshot-hash.cjs +10 -0
- package/dist/utils/snapshot-hash.cjs.map +1 -0
- package/dist/utils/snapshot-hash.mjs +10 -0
- package/dist/utils/snapshot-hash.mjs.map +1 -0
- package/dist/utils/string.cjs +0 -1
- package/dist/utils/string.cjs.map +1 -1
- package/dist/utils/theme.cjs +30 -12
- package/dist/utils/theme.cjs.map +1 -1
- package/dist/utils/theme.mjs +30 -11
- package/dist/utils/theme.mjs.map +1 -1
- package/dist/version-manifest-deploy.cjs +50 -0
- package/dist/version-manifest-deploy.cjs.map +1 -0
- package/dist/version-manifest-deploy.mjs +49 -0
- package/dist/version-manifest-deploy.mjs.map +1 -0
- package/dist/version-manifest-resolve.cjs +42 -0
- package/dist/version-manifest-resolve.cjs.map +1 -0
- package/dist/version-manifest-resolve.d.cts +38 -0
- package/dist/version-manifest-resolve.d.mts +38 -0
- package/dist/version-manifest-resolve.mjs +40 -0
- package/dist/version-manifest-resolve.mjs.map +1 -0
- package/dist/version-status.cjs +18 -0
- package/dist/version-status.cjs.map +1 -0
- package/dist/version-status.d.cts +22 -0
- package/dist/version-status.d.mts +22 -0
- package/dist/version-status.mjs +17 -0
- package/dist/version-status.mjs.map +1 -0
- package/dist/workspace-catalog.cjs +53 -0
- package/dist/workspace-catalog.cjs.map +1 -0
- package/dist/workspace-catalog.mjs +51 -0
- package/dist/workspace-catalog.mjs.map +1 -0
- package/dist/workspace.cjs +237 -0
- package/dist/workspace.cjs.map +1 -0
- package/dist/workspace.mjs +233 -0
- package/dist/workspace.mjs.map +1 -0
- package/package.json +179 -27
- package/skills/add-a-route/SKILL.md +132 -0
- package/skills/api-and-auth/SKILL.md +87 -21
- package/skills/api-and-auth/references/middleware.md +1 -1
- package/skills/cli-reference/SKILL.md +48 -21
- package/skills/code-style/SKILL.md +8 -0
- package/skills/dev-workflow/SKILL.md +50 -26
- package/skills/extends-config/SKILL.md +31 -19
- package/skills/init-upgrade/SKILL.md +29 -16
- package/skills/plugin-development/SKILL.md +46 -112
- package/skills/plugin-development/references/database.md +82 -0
- package/skills/plugin-development/references/request-context.md +67 -0
- package/skills/publish-sync/SKILL.md +99 -22
- package/skills/registry/SKILL.md +82 -0
- package/skills/super-app/SKILL.md +25 -15
- package/skills/talk-to-the-app/SKILL.md +138 -0
- package/skills/ui-integration/SKILL.md +93 -11
- package/dist/cli/db-studio.cjs +0 -131
- package/dist/cli/db-studio.cjs.map +0 -1
- package/dist/cli/db-studio.mjs +0 -127
- package/dist/cli/db-studio.mjs.map +0 -1
- package/dist/cli/init.d.cts.map +0 -1
- package/dist/cli/init.d.mts.map +0 -1
- package/dist/components/dev-view.cjs +0 -309
- package/dist/components/dev-view.cjs.map +0 -1
- package/dist/components/dev-view.mjs +0 -309
- package/dist/components/dev-view.mjs.map +0 -1
- package/dist/components/streaming-view.cjs +0 -134
- package/dist/components/streaming-view.cjs.map +0 -1
- package/dist/components/streaming-view.mjs +0 -132
- package/dist/components/streaming-view.mjs.map +0 -1
- package/dist/config.d.cts.map +0 -1
- package/dist/config.d.mts.map +0 -1
- package/dist/contract.d.cts.map +0 -1
- package/dist/contract.d.mts.map +0 -1
- package/dist/contract.meta.d.cts.map +0 -1
- package/dist/contract.meta.d.mts.map +0 -1
- package/dist/dag.d.cts.map +0 -1
- package/dist/dag.d.mts.map +0 -1
- package/dist/db.cjs +0 -81
- package/dist/db.cjs.map +0 -1
- package/dist/db.d.cts +0 -30
- package/dist/db.d.cts.map +0 -1
- package/dist/db.d.mts +0 -30
- package/dist/db.d.mts.map +0 -1
- package/dist/db.mjs +0 -75
- package/dist/db.mjs.map +0 -1
- package/dist/fastkv.d.cts.map +0 -1
- package/dist/fastkv.d.mts.map +0 -1
- package/dist/integrity.d.cts.map +0 -1
- package/dist/integrity.d.mts.map +0 -1
- package/dist/merge.d.cts.map +0 -1
- package/dist/merge.d.mts.map +0 -1
- package/dist/mf.d.cts.map +0 -1
- package/dist/mf.d.mts.map +0 -1
- package/dist/plugin.d.cts.map +0 -1
- package/dist/plugin.d.mts.map +0 -1
- package/dist/service-descriptor.d.cts.map +0 -1
- package/dist/service-descriptor.d.mts.map +0 -1
- package/dist/types.d.cts.map +0 -1
- package/dist/types.d.mts.map +0 -1
- package/dist/ui/head.d.cts.map +0 -1
- package/dist/ui/head.d.mts.map +0 -1
- package/dist/ui/metadata.d.cts.map +0 -1
- package/dist/ui/metadata.d.mts.map +0 -1
- package/dist/ui/router.d.cts.map +0 -1
- package/dist/ui/router.d.mts.map +0 -1
- package/dist/ui/runtime.d.cts.map +0 -1
- package/dist/ui/runtime.d.mts.map +0 -1
- package/dist/ui/types.d.cts.map +0 -1
- package/dist/ui/types.d.mts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapshot.cjs","names":[],"sources":["../../src/cli/snapshot.ts"],"sourcesContent":["import { existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\n\nexport interface SyncSnapshot {\n parentRef: string;\n timestamp: string;\n files: Record<string, string>;\n}\n\nconst SNAPSHOT_DIR = \".bos\";\nconst SNAPSHOT_FILE = \"sync-snapshot.json\";\n\nfunction snapshotPath(projectDir: string): string {\n return join(projectDir, SNAPSHOT_DIR, SNAPSHOT_FILE);\n}\n\nexport async function readSnapshot(projectDir: string): Promise<SyncSnapshot | null> {\n const path = snapshotPath(projectDir);\n if (!existsSync(path)) {\n return null;\n }\n try {\n const content = readFileSync(path, \"utf-8\");\n return JSON.parse(content) as SyncSnapshot;\n } catch {\n return null;\n }\n}\n\nexport async function writeSnapshot(\n projectDir: string,\n data: { parentRef: string; files: Record<string, string
|
|
1
|
+
{"version":3,"file":"snapshot.cjs","names":["join","existsSync","readFileSync"],"sources":["../../src/cli/snapshot.ts"],"sourcesContent":["import { existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\n\nexport interface SyncSnapshot {\n parentRef: string;\n timestamp: string;\n files: Record<string, string>;\n starter?: string;\n}\n\nconst SNAPSHOT_DIR = \".bos\";\nconst SNAPSHOT_FILE = \"sync-snapshot.json\";\n\nfunction snapshotPath(projectDir: string): string {\n return join(projectDir, SNAPSHOT_DIR, SNAPSHOT_FILE);\n}\n\nexport async function readSnapshot(projectDir: string): Promise<SyncSnapshot | null> {\n const path = snapshotPath(projectDir);\n if (!existsSync(path)) {\n return null;\n }\n try {\n const content = readFileSync(path, \"utf-8\");\n return JSON.parse(content) as SyncSnapshot;\n } catch {\n return null;\n }\n}\n\nexport async function writeSnapshot(\n projectDir: string,\n data: { parentRef: string; files: Record<string, string>; starter?: string },\n): Promise<void> {\n const dir = join(projectDir, SNAPSHOT_DIR);\n if (!existsSync(dir)) {\n mkdirSync(dir, { recursive: true });\n }\n\n const snapshot: SyncSnapshot = {\n parentRef: data.parentRef,\n timestamp: new Date().toISOString(),\n files: data.files,\n ...(data.starter ? { starter: data.starter } : {}),\n };\n\n writeFileSync(snapshotPath(projectDir), `${JSON.stringify(snapshot, null, 2)}\\n`);\n}\n"],"mappings":";;;;AAUA,MAAM,eAAe;AACrB,MAAM,gBAAgB;AAEtB,SAAS,aAAa,YAA4B;CAChD,WAAOA,gBAAK,YAAY,cAAc,aAAa;AACrD;AAEA,eAAsB,aAAa,YAAkD;CACnF,MAAM,OAAO,aAAa,UAAU;CACpC,IAAI,KAACC,oBAAW,IAAI,GAClB,OAAO;CAET,IAAI;EACF,MAAM,cAAUC,sBAAa,MAAM,OAAO;EAC1C,OAAO,KAAK,MAAM,OAAO;CAC3B,QAAQ;EACN,OAAO;CACT;AACF;AAEA,eAAsB,cACpB,YACA,MACe;CACf,MAAM,UAAMF,gBAAK,YAAY,YAAY;CACzC,IAAI,KAACC,oBAAW,GAAG,GACjB,uBAAU,KAAK,EAAE,WAAW,KAAK,CAAC;CAGpC,MAAM,WAAyB;EAC7B,WAAW,KAAK;EAChB,4BAAW,IAAI,KAAK,EAAC,CAAC,YAAY;EAClC,OAAO,KAAK;EACZ,GAAI,KAAK,UAAU,EAAE,SAAS,KAAK,QAAQ,IAAI,CAAC;CAClD;CAEA,2BAAc,aAAa,UAAU,GAAG,GAAG,KAAK,UAAU,UAAU,MAAM,CAAC,EAAE,GAAG;AAClF"}
|
package/dist/cli/snapshot.mjs
CHANGED
|
@@ -23,7 +23,8 @@ async function writeSnapshot(projectDir, data) {
|
|
|
23
23
|
const snapshot = {
|
|
24
24
|
parentRef: data.parentRef,
|
|
25
25
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
26
|
-
files: data.files
|
|
26
|
+
files: data.files,
|
|
27
|
+
...data.starter ? { starter: data.starter } : {}
|
|
27
28
|
};
|
|
28
29
|
writeFileSync(snapshotPath(projectDir), `${JSON.stringify(snapshot, null, 2)}\n`);
|
|
29
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapshot.mjs","names":[],"sources":["../../src/cli/snapshot.ts"],"sourcesContent":["import { existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\n\nexport interface SyncSnapshot {\n parentRef: string;\n timestamp: string;\n files: Record<string, string>;\n}\n\nconst SNAPSHOT_DIR = \".bos\";\nconst SNAPSHOT_FILE = \"sync-snapshot.json\";\n\nfunction snapshotPath(projectDir: string): string {\n return join(projectDir, SNAPSHOT_DIR, SNAPSHOT_FILE);\n}\n\nexport async function readSnapshot(projectDir: string): Promise<SyncSnapshot | null> {\n const path = snapshotPath(projectDir);\n if (!existsSync(path)) {\n return null;\n }\n try {\n const content = readFileSync(path, \"utf-8\");\n return JSON.parse(content) as SyncSnapshot;\n } catch {\n return null;\n }\n}\n\nexport async function writeSnapshot(\n projectDir: string,\n data: { parentRef: string; files: Record<string, string
|
|
1
|
+
{"version":3,"file":"snapshot.mjs","names":[],"sources":["../../src/cli/snapshot.ts"],"sourcesContent":["import { existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\n\nexport interface SyncSnapshot {\n parentRef: string;\n timestamp: string;\n files: Record<string, string>;\n starter?: string;\n}\n\nconst SNAPSHOT_DIR = \".bos\";\nconst SNAPSHOT_FILE = \"sync-snapshot.json\";\n\nfunction snapshotPath(projectDir: string): string {\n return join(projectDir, SNAPSHOT_DIR, SNAPSHOT_FILE);\n}\n\nexport async function readSnapshot(projectDir: string): Promise<SyncSnapshot | null> {\n const path = snapshotPath(projectDir);\n if (!existsSync(path)) {\n return null;\n }\n try {\n const content = readFileSync(path, \"utf-8\");\n return JSON.parse(content) as SyncSnapshot;\n } catch {\n return null;\n }\n}\n\nexport async function writeSnapshot(\n projectDir: string,\n data: { parentRef: string; files: Record<string, string>; starter?: string },\n): Promise<void> {\n const dir = join(projectDir, SNAPSHOT_DIR);\n if (!existsSync(dir)) {\n mkdirSync(dir, { recursive: true });\n }\n\n const snapshot: SyncSnapshot = {\n parentRef: data.parentRef,\n timestamp: new Date().toISOString(),\n files: data.files,\n ...(data.starter ? { starter: data.starter } : {}),\n };\n\n writeFileSync(snapshotPath(projectDir), `${JSON.stringify(snapshot, null, 2)}\\n`);\n}\n"],"mappings":";;;;AAUA,MAAM,eAAe;AACrB,MAAM,gBAAgB;AAEtB,SAAS,aAAa,YAA4B;CAChD,OAAO,KAAK,YAAY,cAAc,aAAa;AACrD;AAEA,eAAsB,aAAa,YAAkD;CACnF,MAAM,OAAO,aAAa,UAAU;CACpC,IAAI,CAAC,WAAW,IAAI,GAClB,OAAO;CAET,IAAI;EACF,MAAM,UAAU,aAAa,MAAM,OAAO;EAC1C,OAAO,KAAK,MAAM,OAAO;CAC3B,QAAQ;EACN,OAAO;CACT;AACF;AAEA,eAAsB,cACpB,YACA,MACe;CACf,MAAM,MAAM,KAAK,YAAY,YAAY;CACzC,IAAI,CAAC,WAAW,GAAG,GACjB,UAAU,KAAK,EAAE,WAAW,KAAK,CAAC;CAGpC,MAAM,WAAyB;EAC7B,WAAW,KAAK;EAChB,4BAAW,IAAI,KAAK,EAAC,CAAC,YAAY;EAClC,OAAO,KAAK;EACZ,GAAI,KAAK,UAAU,EAAE,SAAS,KAAK,QAAQ,IAAI,CAAC;CAClD;CAEA,cAAc,aAAa,UAAU,GAAG,GAAG,KAAK,UAAU,UAAU,MAAM,CAAC,EAAE,GAAG;AAClF"}
|
package/dist/cli/status.cjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const require_http_client = require('../http-client.cjs');
|
|
2
2
|
const require_fastkv = require('../fastkv.cjs');
|
|
3
|
+
const require_config = require('../config.cjs');
|
|
3
4
|
const require_snapshot = require('./snapshot.cjs');
|
|
4
5
|
const require_framework_version = require('./framework-version.cjs');
|
|
5
6
|
let node_fs = require("node:fs");
|
|
@@ -42,14 +43,14 @@ async function checkParentReachable(extendsRef) {
|
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
async function getStatus(projectDir) {
|
|
45
|
-
const
|
|
46
|
-
if (!
|
|
46
|
+
const authored = await require_config.readAuthoredConfigInput(projectDir);
|
|
47
|
+
if (!authored) return {
|
|
47
48
|
status: "error",
|
|
48
|
-
error:
|
|
49
|
+
error: `${require_config.MISSING_CONFIG_MESSAGE} in current directory`,
|
|
49
50
|
packages: [],
|
|
50
51
|
envFile: "missing"
|
|
51
52
|
};
|
|
52
|
-
const config =
|
|
53
|
+
const config = authored;
|
|
53
54
|
const packageNames = [...FRAMEWORK_PACKAGES];
|
|
54
55
|
for (const name of CATALOG_TOOL_PACKAGES) if (readInstalledVersion(projectDir, name)) packageNames.push(name);
|
|
55
56
|
const packages = await Promise.all(packageNames.map(async (name) => {
|
package/dist/cli/status.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.cjs","names":["fetchJsonOrNull","readInstalledFrameworkVersion","fetchBosConfigFromFastKv","resolveFrameworkPackage","readSnapshot"],"sources":["../../src/cli/status.ts"],"sourcesContent":["import { existsSync
|
|
1
|
+
{"version":3,"file":"status.cjs","names":["fetchJsonOrNull","readInstalledFrameworkVersion","existsSync","join","fetchBosConfigFromFastKv","readAuthoredConfigInput","MISSING_CONFIG_MESSAGE","resolveFrameworkPackage","readSnapshot"],"sources":["../../src/cli/status.ts"],"sourcesContent":["import { existsSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { MISSING_CONFIG_MESSAGE, readAuthoredConfigInput } from \"../config\";\nimport type { StatusResult } from \"../contract\";\nimport { fetchBosConfigFromFastKv } from \"../fastkv\";\nimport { fetchJsonOrNull } from \"../http-client\";\nimport { readInstalledFrameworkVersion, resolveFrameworkPackage } from \"./framework-version\";\nimport { readSnapshot } from \"./snapshot\";\n\nconst FRAMEWORK_PACKAGES = [\"everything-dev\", \"every-plugin\"];\n\nconst CATALOG_TOOL_PACKAGES = [\n \"@rspack/core\",\n \"@rspack/cli\",\n \"@rsbuild/core\",\n \"@rsbuild/plugin-react\",\n \"@module-federation/enhanced\",\n \"@module-federation/node\",\n \"@module-federation/rsbuild-plugin\",\n \"@module-federation/runtime-core\",\n \"@module-federation/sdk\",\n \"@module-federation/dts-plugin\",\n] as const;\n\nasync function fetchLatestNpmVersion(packageName: string): Promise<string | null> {\n return fetchJsonOrNull<{ version: string }>(`https://registry.npmjs.org/${packageName}/latest`, {\n headers: { Accept: \"application/json\" },\n retries: 0,\n }).then((data) => data?.version ?? null);\n}\n\nfunction readInstalledVersion(projectDir: string, packageName: string): string | undefined {\n return readInstalledFrameworkVersion(projectDir, packageName);\n}\n\nfunction checkEnvFile(projectDir: string): \"found\" | \"missing\" | \"example-only\" {\n if (existsSync(join(projectDir, \".env\"))) return \"found\";\n if (existsSync(join(projectDir, \".env.example\"))) return \"example-only\";\n return \"missing\";\n}\n\nasync function checkParentReachable(extendsRef: string | undefined): Promise<boolean | undefined> {\n if (!extendsRef?.startsWith(\"bos://\")) return undefined;\n try {\n const config = await fetchBosConfigFromFastKv(extendsRef);\n return config !== null;\n } catch {\n return false;\n }\n}\n\nexport async function getStatus(projectDir: string): Promise<StatusResult> {\n const authored = await readAuthoredConfigInput(projectDir);\n if (!authored) {\n return {\n status: \"error\",\n error: `${MISSING_CONFIG_MESSAGE} in current directory`,\n packages: [],\n envFile: \"missing\",\n };\n }\n\n const config = authored as Record<string, unknown>;\n\n const packageNames = [...FRAMEWORK_PACKAGES];\n for (const name of CATALOG_TOOL_PACKAGES) {\n if (readInstalledVersion(projectDir, name)) {\n packageNames.push(name);\n }\n }\n\n const packages = await Promise.all(\n packageNames.map(async (name) => {\n const resolved = resolveFrameworkPackage(projectDir, name);\n const latest = await fetchLatestNpmVersion(name);\n return {\n name,\n installed: resolved.installedVersion,\n latest: latest ?? undefined,\n isLinked: resolved.isLinked,\n specifier: resolved.specifier,\n };\n }),\n );\n\n const snapshot = await readSnapshot(projectDir);\n\n const extendsRef = config.extends as string | undefined;\n const parentReachable = await checkParentReachable(extendsRef);\n\n return {\n status: \"ok\",\n extends: extendsRef,\n account: config.account as string | undefined,\n domain: config.domain as string | undefined,\n packages,\n lastSync: snapshot?.timestamp,\n envFile: checkEnvFile(projectDir),\n parentReachable,\n };\n}\n"],"mappings":";;;;;;;;;AASA,MAAM,qBAAqB,CAAC,kBAAkB,cAAc;AAE5D,MAAM,wBAAwB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,eAAe,sBAAsB,aAA6C;CAChF,OAAOA,oCAAqC,8BAA8B,YAAY,UAAU;EAC9F,SAAS,EAAE,QAAQ,mBAAmB;EACtC,SAAS;CACX,CAAC,CAAC,CAAC,MAAM,SAAS,MAAM,WAAW,IAAI;AACzC;AAEA,SAAS,qBAAqB,YAAoB,aAAyC;CACzF,OAAOC,wDAA8B,YAAY,WAAW;AAC9D;AAEA,SAAS,aAAa,YAA0D;CAC9E,QAAIC,wBAAWC,gBAAK,YAAY,MAAM,CAAC,GAAG,OAAO;CACjD,QAAID,wBAAWC,gBAAK,YAAY,cAAc,CAAC,GAAG,OAAO;CACzD,OAAO;AACT;AAEA,eAAe,qBAAqB,YAA8D;CAChG,IAAI,CAAC,YAAY,WAAW,QAAQ,GAAG,OAAO;CAC9C,IAAI;EAEF,OAAO,MADcC,wCAAyB,UAAU,MACtC;CACpB,QAAQ;EACN,OAAO;CACT;AACF;AAEA,eAAsB,UAAU,YAA2C;CACzE,MAAM,WAAW,MAAMC,uCAAwB,UAAU;CACzD,IAAI,CAAC,UACH,OAAO;EACL,QAAQ;EACR,OAAO,GAAGC,sCAAuB;EACjC,UAAU,CAAC;EACX,SAAS;CACX;CAGF,MAAM,SAAS;CAEf,MAAM,eAAe,CAAC,GAAG,kBAAkB;CAC3C,KAAK,MAAM,QAAQ,uBACjB,IAAI,qBAAqB,YAAY,IAAI,GACvC,aAAa,KAAK,IAAI;CAI1B,MAAM,WAAW,MAAM,QAAQ,IAC7B,aAAa,IAAI,OAAO,SAAS;EAC/B,MAAM,WAAWC,kDAAwB,YAAY,IAAI;EACzD,MAAM,SAAS,MAAM,sBAAsB,IAAI;EAC/C,OAAO;GACL;GACA,WAAW,SAAS;GACpB,QAAQ,UAAU;GAClB,UAAU,SAAS;GACnB,WAAW,SAAS;EACtB;CACF,CAAC,CACH;CAEA,MAAM,WAAW,MAAMC,8BAAa,UAAU;CAE9C,MAAM,aAAa,OAAO;CAC1B,MAAM,kBAAkB,MAAM,qBAAqB,UAAU;CAE7D,OAAO;EACL,QAAQ;EACR,SAAS;EACT,SAAS,OAAO;EAChB,QAAQ,OAAO;EACf;EACA,UAAU,UAAU;EACpB,SAAS,aAAa,UAAU;EAChC;CACF;AACF"}
|
package/dist/cli/status.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { fetchJsonOrNull } from "../http-client.mjs";
|
|
2
2
|
import { fetchBosConfigFromFastKv } from "../fastkv.mjs";
|
|
3
|
+
import { MISSING_CONFIG_MESSAGE, readAuthoredConfigInput } from "../config.mjs";
|
|
3
4
|
import { readSnapshot } from "./snapshot.mjs";
|
|
4
5
|
import { readInstalledFrameworkVersion, resolveFrameworkPackage } from "./framework-version.mjs";
|
|
5
|
-
import { existsSync
|
|
6
|
+
import { existsSync } from "node:fs";
|
|
6
7
|
import { join } from "node:path";
|
|
7
8
|
|
|
8
9
|
//#region src/cli/status.ts
|
|
@@ -42,14 +43,14 @@ async function checkParentReachable(extendsRef) {
|
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
async function getStatus(projectDir) {
|
|
45
|
-
const
|
|
46
|
-
if (!
|
|
46
|
+
const authored = await readAuthoredConfigInput(projectDir);
|
|
47
|
+
if (!authored) return {
|
|
47
48
|
status: "error",
|
|
48
|
-
error:
|
|
49
|
+
error: `${MISSING_CONFIG_MESSAGE} in current directory`,
|
|
49
50
|
packages: [],
|
|
50
51
|
envFile: "missing"
|
|
51
52
|
};
|
|
52
|
-
const config =
|
|
53
|
+
const config = authored;
|
|
53
54
|
const packageNames = [...FRAMEWORK_PACKAGES];
|
|
54
55
|
for (const name of CATALOG_TOOL_PACKAGES) if (readInstalledVersion(projectDir, name)) packageNames.push(name);
|
|
55
56
|
const packages = await Promise.all(packageNames.map(async (name) => {
|
package/dist/cli/status.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.mjs","names":[],"sources":["../../src/cli/status.ts"],"sourcesContent":["import { existsSync
|
|
1
|
+
{"version":3,"file":"status.mjs","names":[],"sources":["../../src/cli/status.ts"],"sourcesContent":["import { existsSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { MISSING_CONFIG_MESSAGE, readAuthoredConfigInput } from \"../config\";\nimport type { StatusResult } from \"../contract\";\nimport { fetchBosConfigFromFastKv } from \"../fastkv\";\nimport { fetchJsonOrNull } from \"../http-client\";\nimport { readInstalledFrameworkVersion, resolveFrameworkPackage } from \"./framework-version\";\nimport { readSnapshot } from \"./snapshot\";\n\nconst FRAMEWORK_PACKAGES = [\"everything-dev\", \"every-plugin\"];\n\nconst CATALOG_TOOL_PACKAGES = [\n \"@rspack/core\",\n \"@rspack/cli\",\n \"@rsbuild/core\",\n \"@rsbuild/plugin-react\",\n \"@module-federation/enhanced\",\n \"@module-federation/node\",\n \"@module-federation/rsbuild-plugin\",\n \"@module-federation/runtime-core\",\n \"@module-federation/sdk\",\n \"@module-federation/dts-plugin\",\n] as const;\n\nasync function fetchLatestNpmVersion(packageName: string): Promise<string | null> {\n return fetchJsonOrNull<{ version: string }>(`https://registry.npmjs.org/${packageName}/latest`, {\n headers: { Accept: \"application/json\" },\n retries: 0,\n }).then((data) => data?.version ?? null);\n}\n\nfunction readInstalledVersion(projectDir: string, packageName: string): string | undefined {\n return readInstalledFrameworkVersion(projectDir, packageName);\n}\n\nfunction checkEnvFile(projectDir: string): \"found\" | \"missing\" | \"example-only\" {\n if (existsSync(join(projectDir, \".env\"))) return \"found\";\n if (existsSync(join(projectDir, \".env.example\"))) return \"example-only\";\n return \"missing\";\n}\n\nasync function checkParentReachable(extendsRef: string | undefined): Promise<boolean | undefined> {\n if (!extendsRef?.startsWith(\"bos://\")) return undefined;\n try {\n const config = await fetchBosConfigFromFastKv(extendsRef);\n return config !== null;\n } catch {\n return false;\n }\n}\n\nexport async function getStatus(projectDir: string): Promise<StatusResult> {\n const authored = await readAuthoredConfigInput(projectDir);\n if (!authored) {\n return {\n status: \"error\",\n error: `${MISSING_CONFIG_MESSAGE} in current directory`,\n packages: [],\n envFile: \"missing\",\n };\n }\n\n const config = authored as Record<string, unknown>;\n\n const packageNames = [...FRAMEWORK_PACKAGES];\n for (const name of CATALOG_TOOL_PACKAGES) {\n if (readInstalledVersion(projectDir, name)) {\n packageNames.push(name);\n }\n }\n\n const packages = await Promise.all(\n packageNames.map(async (name) => {\n const resolved = resolveFrameworkPackage(projectDir, name);\n const latest = await fetchLatestNpmVersion(name);\n return {\n name,\n installed: resolved.installedVersion,\n latest: latest ?? undefined,\n isLinked: resolved.isLinked,\n specifier: resolved.specifier,\n };\n }),\n );\n\n const snapshot = await readSnapshot(projectDir);\n\n const extendsRef = config.extends as string | undefined;\n const parentReachable = await checkParentReachable(extendsRef);\n\n return {\n status: \"ok\",\n extends: extendsRef,\n account: config.account as string | undefined,\n domain: config.domain as string | undefined,\n packages,\n lastSync: snapshot?.timestamp,\n envFile: checkEnvFile(projectDir),\n parentReachable,\n };\n}\n"],"mappings":";;;;;;;;;AASA,MAAM,qBAAqB,CAAC,kBAAkB,cAAc;AAE5D,MAAM,wBAAwB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,eAAe,sBAAsB,aAA6C;CAChF,OAAO,gBAAqC,8BAA8B,YAAY,UAAU;EAC9F,SAAS,EAAE,QAAQ,mBAAmB;EACtC,SAAS;CACX,CAAC,CAAC,CAAC,MAAM,SAAS,MAAM,WAAW,IAAI;AACzC;AAEA,SAAS,qBAAqB,YAAoB,aAAyC;CACzF,OAAO,8BAA8B,YAAY,WAAW;AAC9D;AAEA,SAAS,aAAa,YAA0D;CAC9E,IAAI,WAAW,KAAK,YAAY,MAAM,CAAC,GAAG,OAAO;CACjD,IAAI,WAAW,KAAK,YAAY,cAAc,CAAC,GAAG,OAAO;CACzD,OAAO;AACT;AAEA,eAAe,qBAAqB,YAA8D;CAChG,IAAI,CAAC,YAAY,WAAW,QAAQ,GAAG,OAAO;CAC9C,IAAI;EAEF,OAAO,MADc,yBAAyB,UAAU,MACtC;CACpB,QAAQ;EACN,OAAO;CACT;AACF;AAEA,eAAsB,UAAU,YAA2C;CACzE,MAAM,WAAW,MAAM,wBAAwB,UAAU;CACzD,IAAI,CAAC,UACH,OAAO;EACL,QAAQ;EACR,OAAO,GAAG,uBAAuB;EACjC,UAAU,CAAC;EACX,SAAS;CACX;CAGF,MAAM,SAAS;CAEf,MAAM,eAAe,CAAC,GAAG,kBAAkB;CAC3C,KAAK,MAAM,QAAQ,uBACjB,IAAI,qBAAqB,YAAY,IAAI,GACvC,aAAa,KAAK,IAAI;CAI1B,MAAM,WAAW,MAAM,QAAQ,IAC7B,aAAa,IAAI,OAAO,SAAS;EAC/B,MAAM,WAAW,wBAAwB,YAAY,IAAI;EACzD,MAAM,SAAS,MAAM,sBAAsB,IAAI;EAC/C,OAAO;GACL;GACA,WAAW,SAAS;GACpB,QAAQ,UAAU;GAClB,UAAU,SAAS;GACnB,WAAW,SAAS;EACtB;CACF,CAAC,CACH;CAEA,MAAM,WAAW,MAAM,aAAa,UAAU;CAE9C,MAAM,aAAa,OAAO;CAC1B,MAAM,kBAAkB,MAAM,qBAAqB,UAAU;CAE7D,OAAO;EACL,QAAQ;EACR,SAAS;EACT,SAAS,OAAO;EAChB,QAAQ,OAAO;EACf;EACA,UAAU,UAAU;EACpB,SAAS,aAAa,UAAU;EAChC;CACF;AACF"}
|
package/dist/cli/sync.cjs
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
const require_merge = require('../merge.cjs');
|
|
2
2
|
const require_config = require('../config.cjs');
|
|
3
|
-
const
|
|
4
|
-
const require_infra = require('./infra.cjs');
|
|
3
|
+
const require_snapshot_hash = require('../utils/snapshot-hash.cjs');
|
|
5
4
|
const require_snapshot = require('./snapshot.cjs');
|
|
6
5
|
const require_cli_init = require('./init.cjs');
|
|
6
|
+
const require_resolution_session = require('../resolution/session.cjs');
|
|
7
|
+
const require_workspace = require('../workspace.cjs');
|
|
8
|
+
const require_shared_deps = require('../shared-deps.cjs');
|
|
9
|
+
const require_materializer = require('../infra/materializer.cjs');
|
|
7
10
|
let node_fs = require("node:fs");
|
|
8
11
|
let node_path = require("node:path");
|
|
9
|
-
let node_crypto = require("node:crypto");
|
|
10
12
|
let glob = require("glob");
|
|
13
|
+
let yaml = require("yaml");
|
|
11
14
|
|
|
12
15
|
//#region src/cli/sync.ts
|
|
13
16
|
const FRAMEWORK_OWNED_SYNC_FILES = /* @__PURE__ */ new Set([
|
|
@@ -15,7 +18,6 @@ const FRAMEWORK_OWNED_SYNC_FILES = /* @__PURE__ */ new Set([
|
|
|
15
18
|
".gitignore",
|
|
16
19
|
"biome.json",
|
|
17
20
|
"bos.config.json",
|
|
18
|
-
"bunfig.toml",
|
|
19
21
|
"package.json",
|
|
20
22
|
".changeset/config.json",
|
|
21
23
|
".changeset/README.md",
|
|
@@ -26,22 +28,11 @@ const FRAMEWORK_OWNED_SYNC_FILES = /* @__PURE__ */ new Set([
|
|
|
26
28
|
"railway.toml",
|
|
27
29
|
"ui/package.json",
|
|
28
30
|
"ui/postcss.config.mjs",
|
|
29
|
-
"ui/rsbuild.config.ts",
|
|
30
31
|
"ui/tsconfig.json",
|
|
31
|
-
"ui/src/app.ts",
|
|
32
|
-
"ui/src/globals.d.ts",
|
|
33
|
-
"ui/src/hydrate.tsx",
|
|
34
|
-
"ui/src/lib/api.ts",
|
|
35
|
-
"ui/src/lib/auth.ts",
|
|
36
|
-
"ui/src/router.server.tsx",
|
|
37
|
-
"ui/src/router.tsx",
|
|
38
|
-
"ui/src/routes/__root.tsx",
|
|
39
32
|
"api/package.json",
|
|
40
33
|
"api/plugin.dev.ts",
|
|
41
34
|
"api/rspack.config.js",
|
|
42
|
-
"api/tsconfig.contract.json",
|
|
43
35
|
"api/tsconfig.json",
|
|
44
|
-
"api/src/lib/auth.ts",
|
|
45
36
|
"api/src/lib/context.ts",
|
|
46
37
|
"api/drizzle.config.ts",
|
|
47
38
|
"api/src/db/index.ts",
|
|
@@ -50,14 +41,45 @@ const FRAMEWORK_OWNED_SYNC_FILES = /* @__PURE__ */ new Set([
|
|
|
50
41
|
"api/src/global.d.ts",
|
|
51
42
|
"api/tests/types.d.ts"
|
|
52
43
|
]);
|
|
53
|
-
|
|
54
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Files the scaffold previously sync-owned but has retired (ADR 0023) — the
|
|
46
|
+
* generated `.gen` bootstrap stubs replaced them. During sync: a local copy
|
|
47
|
+
* whose hash still matches the sync snapshot is deleted silently; a
|
|
48
|
+
* hand-modified (or never-snapshotted) copy is backed up, then deleted. The
|
|
49
|
+
* app's authored ui files (router.tsx, app.ts, lib, routes, components) are
|
|
50
|
+
* NOT retired — they leave the sync list as app-owned files, untouched.
|
|
51
|
+
*/
|
|
52
|
+
const RETIRED_SYNC_FILES = /* @__PURE__ */ new Set([
|
|
53
|
+
"ui/src/entry.ts",
|
|
54
|
+
"ui/src/globals.d.ts",
|
|
55
|
+
"ui/src/hydrate.tsx",
|
|
56
|
+
"ui/src/router.server.tsx",
|
|
57
|
+
"ui/src/compose.ts"
|
|
58
|
+
]);
|
|
59
|
+
const AGENT_SYNC_GLOBS = [
|
|
60
|
+
".agents/skills/**",
|
|
61
|
+
"docs/agents/**",
|
|
62
|
+
"skills-lock.json"
|
|
63
|
+
];
|
|
64
|
+
function isFrameworkOwnedSyncFile(filePath) {
|
|
65
|
+
if (FRAMEWORK_OWNED_SYNC_FILES.has(filePath)) return true;
|
|
66
|
+
if (filePath.startsWith(".agents/skills/") || filePath.startsWith("docs/agents/") || filePath === "skills-lock.json") return true;
|
|
67
|
+
if (/^plugins\/[^/]+\/src\/lib\/context\.ts$/.test(filePath)) return true;
|
|
68
|
+
if (/^plugins\/[^/]+\/src\/db\/(index|layer|migrate)\.ts$/.test(filePath)) return true;
|
|
69
|
+
if (/^plugins\/[^/]+\/rspack\.config\.js$/.test(filePath)) return true;
|
|
70
|
+
if (/^plugins\/[^/]+\/drizzle\.config\.ts$/.test(filePath)) return true;
|
|
71
|
+
if (/^plugins\/[^/]+\/src\/global\.d\.ts$/.test(filePath)) return true;
|
|
72
|
+
if (/^plugins\/[^/]+\/tests\/types\.d\.ts$/.test(filePath)) return true;
|
|
73
|
+
if (/^plugins\/[^/]+\/tsconfig\.json$/.test(filePath)) return true;
|
|
74
|
+
if (/^plugins\/[^/]+\/tsconfig\.contract\.json$/.test(filePath)) return true;
|
|
75
|
+
return false;
|
|
55
76
|
}
|
|
56
77
|
function computeLocalHash(projectDir, filePath) {
|
|
57
78
|
const fullPath = (0, node_path.join)(projectDir, filePath);
|
|
58
79
|
if (!(0, node_fs.existsSync)(fullPath)) return null;
|
|
59
80
|
try {
|
|
60
|
-
|
|
81
|
+
const content = (0, node_fs.readFileSync)(fullPath);
|
|
82
|
+
return require_snapshot_hash.computeSnapshotHash(content);
|
|
61
83
|
} catch {
|
|
62
84
|
return null;
|
|
63
85
|
}
|
|
@@ -65,7 +87,8 @@ function computeLocalHash(projectDir, filePath) {
|
|
|
65
87
|
function backupFiles(projectDir, filePaths) {
|
|
66
88
|
const filesToBackup = filePaths.filter((f) => (0, node_fs.existsSync)((0, node_path.join)(projectDir, f)));
|
|
67
89
|
if (filesToBackup.length === 0) return null;
|
|
68
|
-
const
|
|
90
|
+
const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
91
|
+
const backupDir = (0, node_path.join)(projectDir, ".bos", "sync-backup", timestamp);
|
|
69
92
|
for (const filePath of filesToBackup) {
|
|
70
93
|
const src = (0, node_path.join)(projectDir, filePath);
|
|
71
94
|
const dest = (0, node_path.join)(backupDir, filePath);
|
|
@@ -74,9 +97,36 @@ function backupFiles(projectDir, filePaths) {
|
|
|
74
97
|
}
|
|
75
98
|
return backupDir;
|
|
76
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Migrate a child off the retired bootstrap stub files (ADR 0023): unmodified
|
|
102
|
+
* copies are deleted silently, hand-modified copies are backed up first. In
|
|
103
|
+
* dry-run the actions are reported without touching the tree.
|
|
104
|
+
*/
|
|
105
|
+
function retireSyncedFiles(projectDir, snapshotFiles, opts) {
|
|
106
|
+
const retired = [];
|
|
107
|
+
const retiredConflicted = [];
|
|
108
|
+
for (const destPath of RETIRED_SYNC_FILES) {
|
|
109
|
+
const localHash = computeLocalHash(projectDir, destPath);
|
|
110
|
+
if (localHash === null) continue;
|
|
111
|
+
if (localHash === snapshotFiles[destPath]) retired.push(destPath);
|
|
112
|
+
else retiredConflicted.push(destPath);
|
|
113
|
+
}
|
|
114
|
+
if (opts.dryRun || retired.length === 0 && retiredConflicted.length === 0) return {
|
|
115
|
+
retired,
|
|
116
|
+
retiredConflicted,
|
|
117
|
+
backupDir: null
|
|
118
|
+
};
|
|
119
|
+
const backupDir = backupFiles(projectDir, retiredConflicted);
|
|
120
|
+
for (const destPath of [...retired, ...retiredConflicted]) (0, node_fs.rmSync)((0, node_path.join)(projectDir, destPath));
|
|
121
|
+
return {
|
|
122
|
+
retired,
|
|
123
|
+
retiredConflicted,
|
|
124
|
+
backupDir
|
|
125
|
+
};
|
|
126
|
+
}
|
|
77
127
|
function mergeStringMaps(local, template) {
|
|
78
128
|
if (!local && !template) return void 0;
|
|
79
|
-
const merged = { ...local
|
|
129
|
+
const merged = { ...local };
|
|
80
130
|
for (const [name, value] of Object.entries(template ?? {})) merged[name] = value;
|
|
81
131
|
return Object.keys(merged).length > 0 ? merged : void 0;
|
|
82
132
|
}
|
|
@@ -88,12 +138,12 @@ function mergeWorkspacePackages(local, template) {
|
|
|
88
138
|
for (const entry of templatePackages) if (typeof entry === "string" && entry.length > 0) ordered.add(entry);
|
|
89
139
|
for (const entry of localPackages) if (typeof entry === "string" && entry.length > 0) ordered.add(entry);
|
|
90
140
|
if ([...ordered].some((e) => e.startsWith("plugins/") && e !== "plugins/*")) {
|
|
91
|
-
for (const entry of
|
|
141
|
+
for (const entry of ordered) if (entry.startsWith("plugins/") && entry !== "plugins/*") ordered.delete(entry);
|
|
92
142
|
ordered.add("plugins/*");
|
|
93
143
|
}
|
|
94
144
|
return ordered.size > 0 ? [...ordered] : void 0;
|
|
95
145
|
}
|
|
96
|
-
function mergePackageJson(filePath, local, template) {
|
|
146
|
+
function mergePackageJson(filePath, local, template, childScripts) {
|
|
97
147
|
const merged = {
|
|
98
148
|
...local,
|
|
99
149
|
...template
|
|
@@ -117,8 +167,8 @@ function mergePackageJson(filePath, local, template) {
|
|
|
117
167
|
if (mergedDeps) merged[depField] = mergedDeps;
|
|
118
168
|
else delete merged[depField];
|
|
119
169
|
}
|
|
120
|
-
if (local.scripts && typeof local.scripts === "object" || template.scripts && typeof template.scripts === "object") {
|
|
121
|
-
const mergedScripts = mergeStringMaps(local.scripts, template.scripts);
|
|
170
|
+
if (local.scripts && typeof local.scripts === "object" || template.scripts && typeof template.scripts === "object" || childScripts) {
|
|
171
|
+
const mergedScripts = mergeStringMaps(local.scripts, filePath === "package.json" && childScripts ? childScripts : template.scripts);
|
|
122
172
|
if (mergedScripts) merged.scripts = mergedScripts;
|
|
123
173
|
else delete merged.scripts;
|
|
124
174
|
}
|
|
@@ -145,10 +195,11 @@ function toSourcePath(sourceDir, destPath) {
|
|
|
145
195
|
const templatePath = destPath.replace(/^\.github\//, ".github/templates/");
|
|
146
196
|
if ((0, node_fs.existsSync)((0, node_path.join)(sourceDir, templatePath))) return templatePath;
|
|
147
197
|
}
|
|
148
|
-
|
|
198
|
+
const directPath = (0, node_path.join)(sourceDir, destPath);
|
|
199
|
+
if ((0, node_fs.existsSync)(directPath)) return destPath;
|
|
149
200
|
return null;
|
|
150
201
|
}
|
|
151
|
-
function buildSyncedFileContent(sourceDir, projectDir, filePath, explicitDestPath) {
|
|
202
|
+
function buildSyncedFileContent(sourceDir, projectDir, filePath, explicitDestPath, childScripts) {
|
|
152
203
|
const src = (0, node_path.join)(sourceDir, filePath);
|
|
153
204
|
const destPath = explicitDestPath ?? (filePath.startsWith(".github/templates/") ? filePath.replace(/^\.github\/templates\//, ".github/") : filePath);
|
|
154
205
|
const dest = (0, node_path.join)(projectDir, destPath);
|
|
@@ -156,7 +207,9 @@ function buildSyncedFileContent(sourceDir, projectDir, filePath, explicitDestPat
|
|
|
156
207
|
const localContent = (0, node_fs.existsSync)(dest) ? (0, node_fs.readFileSync)(dest, "utf-8") : null;
|
|
157
208
|
const templateContent = (0, node_fs.readFileSync)(src, "utf-8");
|
|
158
209
|
if (localContent) {
|
|
159
|
-
const
|
|
210
|
+
const local = JSON.parse(localContent);
|
|
211
|
+
const template = JSON.parse(templateContent);
|
|
212
|
+
const merged = require_merge.mergeBosConfigWithTemplate(local, template);
|
|
160
213
|
return `${JSON.stringify(merged, null, 2)}\n`;
|
|
161
214
|
}
|
|
162
215
|
}
|
|
@@ -164,17 +217,17 @@ function buildSyncedFileContent(sourceDir, projectDir, filePath, explicitDestPat
|
|
|
164
217
|
const localContent = (0, node_fs.existsSync)(dest) ? (0, node_fs.readFileSync)(dest, "utf-8") : null;
|
|
165
218
|
const templateContent = (0, node_fs.readFileSync)(src, "utf-8");
|
|
166
219
|
if (localContent) {
|
|
167
|
-
const merged = mergePackageJson(destPath, JSON.parse(localContent), JSON.parse(templateContent));
|
|
220
|
+
const merged = mergePackageJson(destPath, JSON.parse(localContent), JSON.parse(templateContent), childScripts);
|
|
168
221
|
return `${JSON.stringify(merged, null, 2)}\n`;
|
|
169
222
|
}
|
|
170
223
|
}
|
|
171
224
|
return (0, node_fs.readFileSync)(src);
|
|
172
225
|
}
|
|
173
|
-
function writeSyncedFile(sourceDir, projectDir, filePath, explicitDestPath) {
|
|
226
|
+
function writeSyncedFile(sourceDir, projectDir, filePath, explicitDestPath, childScripts) {
|
|
174
227
|
const destPath = explicitDestPath ?? (filePath.startsWith(".github/templates/") ? filePath.replace(/^\.github\/templates\//, ".github/") : filePath);
|
|
175
228
|
const dest = (0, node_path.join)(projectDir, destPath);
|
|
176
229
|
(0, node_fs.mkdirSync)((0, node_path.dirname)(dest), { recursive: true });
|
|
177
|
-
(0, node_fs.writeFileSync)(dest, buildSyncedFileContent(sourceDir, projectDir, filePath, destPath));
|
|
230
|
+
(0, node_fs.writeFileSync)(dest, buildSyncedFileContent(sourceDir, projectDir, filePath, destPath, childScripts));
|
|
178
231
|
}
|
|
179
232
|
async function getSelectedChildPlugins(projectDir, localConfig) {
|
|
180
233
|
if (!localConfig.plugins || typeof localConfig.plugins !== "object") return [];
|
|
@@ -191,7 +244,8 @@ async function getSelectedChildPlugins(projectDir, localConfig) {
|
|
|
191
244
|
selected.push(pluginKey);
|
|
192
245
|
continue;
|
|
193
246
|
}
|
|
194
|
-
|
|
247
|
+
const localPath = (0, node_path.join)(projectDir, rawEntry.slice(6).trim());
|
|
248
|
+
if ((0, node_fs.existsSync)(localPath) || pluginDirs.has(pluginKey)) selected.push(pluginKey);
|
|
195
249
|
continue;
|
|
196
250
|
}
|
|
197
251
|
if (!rawEntry || typeof rawEntry !== "object") {
|
|
@@ -204,22 +258,31 @@ async function getSelectedChildPlugins(projectDir, localConfig) {
|
|
|
204
258
|
selected.push(pluginKey);
|
|
205
259
|
continue;
|
|
206
260
|
}
|
|
207
|
-
|
|
261
|
+
const localPath = (0, node_path.join)(projectDir, development.slice(6).trim());
|
|
262
|
+
if ((0, node_fs.existsSync)(localPath) || pluginDirs.has(pluginKey)) selected.push(pluginKey);
|
|
208
263
|
}
|
|
209
264
|
return selected;
|
|
210
265
|
}
|
|
211
266
|
function hasPluginsWorkspace(projectDir) {
|
|
212
|
-
const
|
|
213
|
-
if (!
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
267
|
+
const root = require_workspace.findWorkspaceRoot(projectDir);
|
|
268
|
+
if (!root) return false;
|
|
269
|
+
const rel = (0, node_path.relative)(root.dir, projectDir);
|
|
270
|
+
const baseDir = rel.startsWith("..") || rel === "" ? root.dir : projectDir;
|
|
271
|
+
for (const manifest of ["pnpm-workspace.yaml", "package.json"]) {
|
|
272
|
+
const manifestPath = (0, node_path.join)(baseDir, manifest);
|
|
273
|
+
if (!(0, node_fs.existsSync)(manifestPath)) continue;
|
|
274
|
+
try {
|
|
275
|
+
const content = (0, node_fs.readFileSync)(manifestPath, "utf-8");
|
|
276
|
+
const packages = manifest === "pnpm-workspace.yaml" ? (0, yaml.parse)(content)?.packages : JSON.parse(content).workspaces;
|
|
277
|
+
if ((Array.isArray(packages) ? packages : Array.isArray(packages?.packages) ? packages.packages : []).includes("plugins/*")) return true;
|
|
278
|
+
} catch {
|
|
279
|
+
return false;
|
|
280
|
+
}
|
|
219
281
|
}
|
|
282
|
+
return false;
|
|
220
283
|
}
|
|
221
284
|
async function syncTemplate(projectDir, options) {
|
|
222
|
-
const localConfig = JSON.parse((0, node_fs.readFileSync)((0, node_path.join)(projectDir, "bos.config.json"), "utf-8"));
|
|
285
|
+
const localConfig = (0, node_fs.existsSync)((0, node_path.join)(projectDir, "bos.app.ts")) ? await require_config.loadAppDescriptorConfig((0, node_path.join)(projectDir, "bos.app.ts")) : JSON.parse((0, node_fs.readFileSync)((0, node_path.join)(projectDir, "bos.config.json"), "utf-8"));
|
|
223
286
|
let extendsRef;
|
|
224
287
|
if (typeof localConfig.extends === "string") extendsRef = localConfig.extends;
|
|
225
288
|
else if (require_merge.isPlainObject(localConfig.extends)) extendsRef = require_merge.resolveExtendsRef(localConfig.extends, "production");
|
|
@@ -252,8 +315,16 @@ async function syncTemplate(projectDir, options) {
|
|
|
252
315
|
const withApi = (0, node_fs.existsSync)((0, node_path.join)(projectDir, "api", "package.json"));
|
|
253
316
|
const withHost = (0, node_fs.existsSync)((0, node_path.join)(projectDir, "host", "package.json"));
|
|
254
317
|
const withPlugins = childPlugins.length > 0 || hasPluginsWorkspace(projectDir);
|
|
318
|
+
const childScripts = require_cli_init.buildChildRootScripts({
|
|
319
|
+
ui: withUi,
|
|
320
|
+
api: withApi,
|
|
321
|
+
host: withHost,
|
|
322
|
+
plugins: withPlugins
|
|
323
|
+
});
|
|
255
324
|
const destToSource = /* @__PURE__ */ new Map();
|
|
325
|
+
const tsFormChild = !(0, node_fs.existsSync)((0, node_path.join)(projectDir, "bos.config.json"));
|
|
256
326
|
for (const destPath of FRAMEWORK_OWNED_SYNC_FILES) {
|
|
327
|
+
if (destPath === "bos.config.json" && tsFormChild) continue;
|
|
257
328
|
if (destPath.startsWith("ui/") && !withUi) continue;
|
|
258
329
|
if (destPath.startsWith("api/") && !withApi) continue;
|
|
259
330
|
if (destPath.startsWith("host/") && !withHost) continue;
|
|
@@ -261,6 +332,18 @@ async function syncTemplate(projectDir, options) {
|
|
|
261
332
|
if (!sourcePath) continue;
|
|
262
333
|
destToSource.set(destPath, sourcePath);
|
|
263
334
|
}
|
|
335
|
+
for (const destPath of await (0, glob.glob)(AGENT_SYNC_GLOBS, {
|
|
336
|
+
cwd: sourceDir,
|
|
337
|
+
nodir: true,
|
|
338
|
+
dot: true,
|
|
339
|
+
absolute: false,
|
|
340
|
+
ignore: [
|
|
341
|
+
"**/node_modules/**",
|
|
342
|
+
"**/.git/**",
|
|
343
|
+
"**/dist/**",
|
|
344
|
+
"**/.bos/**"
|
|
345
|
+
]
|
|
346
|
+
})) destToSource.set(destPath, destPath);
|
|
264
347
|
for (const pluginKey of childPlugins) {
|
|
265
348
|
if (!(0, node_fs.existsSync)((0, node_path.join)(projectDir, "plugins", pluginKey, "src"))) continue;
|
|
266
349
|
for (const libFile of ["auth.ts", "context.ts"]) {
|
|
@@ -307,11 +390,9 @@ async function syncTemplate(projectDir, options) {
|
|
|
307
390
|
}
|
|
308
391
|
for (const pluginKey of childPlugins) {
|
|
309
392
|
if (!(0, node_fs.existsSync)((0, node_path.join)(projectDir, "plugins", pluginKey))) continue;
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
destToSource.set(`plugins/${pluginKey}/${tsconfigFile}`, sourceFile);
|
|
314
|
-
}
|
|
393
|
+
const sourceFile = "plugins/_template/tsconfig.json";
|
|
394
|
+
if (!(0, node_fs.existsSync)((0, node_path.join)(sourceDir, sourceFile))) continue;
|
|
395
|
+
destToSource.set(`plugins/${pluginKey}/tsconfig.json`, sourceFile);
|
|
315
396
|
}
|
|
316
397
|
const updated = [];
|
|
317
398
|
const skipped = [];
|
|
@@ -319,8 +400,12 @@ async function syncTemplate(projectDir, options) {
|
|
|
319
400
|
const conflicted = [];
|
|
320
401
|
const snapshotFiles = (await require_snapshot.readSnapshot(projectDir))?.files ?? {};
|
|
321
402
|
for (const [destPath, filePath] of destToSource.entries()) {
|
|
403
|
+
if (!(0, node_fs.existsSync)((0, node_path.join)(sourceDir, filePath))) {
|
|
404
|
+
skipped.push(destPath);
|
|
405
|
+
continue;
|
|
406
|
+
}
|
|
322
407
|
const localHash = computeLocalHash(projectDir, destPath);
|
|
323
|
-
const sourceHash =
|
|
408
|
+
const sourceHash = require_snapshot_hash.computeSnapshotHash(buildSyncedFileContent(sourceDir, projectDir, filePath, void 0, childScripts));
|
|
324
409
|
if (localHash === null) {
|
|
325
410
|
added.push(destPath);
|
|
326
411
|
continue;
|
|
@@ -354,32 +439,38 @@ async function syncTemplate(projectDir, options) {
|
|
|
354
439
|
if (options.dryRun) {
|
|
355
440
|
const agentsMdSourcePath = toSourcePath(sourceDir, "AGENTS.md");
|
|
356
441
|
if (agentsMdSourcePath) {
|
|
357
|
-
const
|
|
442
|
+
const agentsMdSourceContent = (0, node_fs.readFileSync)((0, node_path.join)(sourceDir, agentsMdSourcePath), "utf-8");
|
|
443
|
+
const skillsBlock = require_cli_init.extractSkillsBlock(agentsMdSourceContent);
|
|
358
444
|
if (skillsBlock) {
|
|
359
|
-
const
|
|
445
|
+
const expectedContent = require_cli_init.buildChildAgentsMd(skillsBlock, {
|
|
360
446
|
overrides,
|
|
361
447
|
plugins: childPlugins
|
|
362
|
-
})
|
|
448
|
+
});
|
|
449
|
+
const expectedHash = require_snapshot_hash.computeSnapshotHash(expectedContent);
|
|
363
450
|
if (computeLocalHash(projectDir, "AGENTS.md") !== expectedHash) updated.push("AGENTS.md");
|
|
364
451
|
}
|
|
365
452
|
}
|
|
453
|
+
const retirement = retireSyncedFiles(projectDir, snapshotFiles, { dryRun: true });
|
|
366
454
|
return {
|
|
367
455
|
status: "dry-run",
|
|
368
456
|
updated,
|
|
369
457
|
skipped,
|
|
370
458
|
added,
|
|
371
|
-
conflicted
|
|
459
|
+
conflicted,
|
|
460
|
+
retired: retirement.retired,
|
|
461
|
+
retiredConflicted: retirement.retiredConflicted
|
|
372
462
|
};
|
|
373
463
|
}
|
|
464
|
+
const retirement = retireSyncedFiles(projectDir, snapshotFiles, { dryRun: false });
|
|
374
465
|
const filesToWrite = [
|
|
375
466
|
...updated,
|
|
376
467
|
...added,
|
|
377
468
|
...conflicted
|
|
378
469
|
];
|
|
379
|
-
let backupDir;
|
|
470
|
+
let backupDir = retirement.backupDir ?? void 0;
|
|
380
471
|
if (filesToWrite.length > 0) {
|
|
381
|
-
backupDir = backupFiles(projectDir, filesToWrite) ??
|
|
382
|
-
for (const destPath of filesToWrite) writeSyncedFile(sourceDir, projectDir, destToSource.get(destPath) ?? destPath, destPath);
|
|
472
|
+
backupDir = backupFiles(projectDir, filesToWrite) ?? backupDir;
|
|
473
|
+
for (const destPath of filesToWrite) writeSyncedFile(sourceDir, projectDir, destToSource.get(destPath) ?? destPath, destPath, childScripts);
|
|
383
474
|
}
|
|
384
475
|
await require_cli_init.personalizeConfig(projectDir, {
|
|
385
476
|
extendsAccount,
|
|
@@ -396,8 +487,8 @@ async function syncTemplate(projectDir, options) {
|
|
|
396
487
|
configDir: projectDir,
|
|
397
488
|
hostMode: "local"
|
|
398
489
|
});
|
|
399
|
-
const syncedConfig = await
|
|
400
|
-
if (syncedConfig?.runtime)
|
|
490
|
+
const syncedConfig = await require_resolution_session.openResolution({ cwd: projectDir });
|
|
491
|
+
if (syncedConfig?.runtime) await require_materializer.materializeViaLayer(projectDir, syncedConfig.runtime);
|
|
401
492
|
const newSnapshotFiles = {};
|
|
402
493
|
for (const destPath of destToSource.keys()) {
|
|
403
494
|
const hash = computeLocalHash(projectDir, destPath);
|
|
@@ -405,13 +496,14 @@ async function syncTemplate(projectDir, options) {
|
|
|
405
496
|
}
|
|
406
497
|
const agentsMdSourcePath = toSourcePath(sourceDir, "AGENTS.md");
|
|
407
498
|
if (agentsMdSourcePath) {
|
|
408
|
-
const
|
|
499
|
+
const agentsMdSourceContent = (0, node_fs.readFileSync)((0, node_path.join)(sourceDir, agentsMdSourcePath), "utf-8");
|
|
500
|
+
const skillsBlock = require_cli_init.extractSkillsBlock(agentsMdSourceContent);
|
|
409
501
|
if (skillsBlock) {
|
|
410
502
|
const expectedContent = require_cli_init.buildChildAgentsMd(skillsBlock, {
|
|
411
503
|
overrides,
|
|
412
504
|
plugins: childPlugins
|
|
413
505
|
});
|
|
414
|
-
const expectedHash =
|
|
506
|
+
const expectedHash = require_snapshot_hash.computeSnapshotHash(expectedContent);
|
|
415
507
|
if (computeLocalHash(projectDir, "AGENTS.md") !== expectedHash) {
|
|
416
508
|
(0, node_fs.writeFileSync)((0, node_path.join)(projectDir, "AGENTS.md"), expectedContent);
|
|
417
509
|
updated.push("AGENTS.md");
|
|
@@ -424,7 +516,7 @@ async function syncTemplate(projectDir, options) {
|
|
|
424
516
|
files: newSnapshotFiles
|
|
425
517
|
});
|
|
426
518
|
if (!options.noInstall) {
|
|
427
|
-
await require_cli_init.
|
|
519
|
+
await require_cli_init.runPnpmInstall(require_workspace.findWorkspaceRoot(projectDir)?.dir ?? projectDir);
|
|
428
520
|
await require_cli_init.runTypesGen(projectDir);
|
|
429
521
|
}
|
|
430
522
|
return {
|
|
@@ -433,6 +525,9 @@ async function syncTemplate(projectDir, options) {
|
|
|
433
525
|
skipped,
|
|
434
526
|
added,
|
|
435
527
|
conflicted,
|
|
528
|
+
retired: retirement.retired,
|
|
529
|
+
retiredConflicted: retirement.retiredConflicted,
|
|
530
|
+
retiredBackupDir: retirement.backupDir ?? void 0,
|
|
436
531
|
backupDir
|
|
437
532
|
};
|
|
438
533
|
} finally {
|
|
@@ -441,6 +536,9 @@ async function syncTemplate(projectDir, options) {
|
|
|
441
536
|
}
|
|
442
537
|
|
|
443
538
|
//#endregion
|
|
539
|
+
exports.RETIRED_SYNC_FILES = RETIRED_SYNC_FILES;
|
|
540
|
+
exports.isFrameworkOwnedSyncFile = isFrameworkOwnedSyncFile;
|
|
444
541
|
exports.mergePackageJson = mergePackageJson;
|
|
542
|
+
exports.retireSyncedFiles = retireSyncedFiles;
|
|
445
543
|
exports.syncTemplate = syncTemplate;
|
|
446
544
|
//# sourceMappingURL=sync.cjs.map
|