everything-dev 1.53.2 → 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
package/dist/config.cjs
CHANGED
|
@@ -1,138 +1,201 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_process_env = require('./env/process-env.cjs');
|
|
2
3
|
const require_http_client = require('./http-client.cjs');
|
|
3
4
|
const require_api_contract = require('./api-contract.cjs');
|
|
4
5
|
const require_dag = require('./dag.cjs');
|
|
5
|
-
const require_fastkv = require('./fastkv.cjs');
|
|
6
6
|
const require_merge = require('./merge.cjs');
|
|
7
|
-
const require_network = require('./network.cjs');
|
|
8
7
|
const require_types = require('./types.cjs');
|
|
8
|
+
const require_schema = require('./descriptor/schema.cjs');
|
|
9
|
+
const require_resolve = require('./descriptor/resolve.cjs');
|
|
10
|
+
const require_fastkv = require('./fastkv.cjs');
|
|
11
|
+
const require_network = require('./network.cjs');
|
|
12
|
+
const require_version_manifest_resolve = require('./version-manifest-resolve.cjs');
|
|
13
|
+
let node_async_hooks = require("node:async_hooks");
|
|
9
14
|
let node_fs = require("node:fs");
|
|
10
15
|
let node_path = require("node:path");
|
|
16
|
+
let node_url = require("node:url");
|
|
17
|
+
let effect = require("effect");
|
|
18
|
+
let every_plugin_ui_manifest_contract = require("every-plugin/ui/manifest/contract");
|
|
11
19
|
|
|
12
20
|
//#region src/config.ts
|
|
21
|
+
const warnOutsideEffect = (...args) => {
|
|
22
|
+
console.warn(...args);
|
|
23
|
+
};
|
|
13
24
|
const LOCAL_PREFIX = "local:";
|
|
14
25
|
const DEFAULT_HOST_PORT = 3e3;
|
|
15
26
|
const RESOLVED_CONFIG_FILENAME = "bos.resolved-config.json";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
suppressConfigWarnings = false;
|
|
30
|
-
}
|
|
31
|
-
function drainConfigWarnings() {
|
|
32
|
-
const warnings = [...configWarnings];
|
|
33
|
-
configWarnings = [];
|
|
34
|
-
return warnings;
|
|
27
|
+
const MISSING_CONFIG_MESSAGE = "No config found (bos.app.ts or bos.config.json)";
|
|
28
|
+
const DEV_OVERLAY_FILENAME = "bos.dev.ts";
|
|
29
|
+
const warningCapture = new node_async_hooks.AsyncLocalStorage();
|
|
30
|
+
/**
|
|
31
|
+
* @internal — runs `fn` with config warnings captured into `sink` instead of
|
|
32
|
+
* the console. Plumbing for the resolution session; not part of the public
|
|
33
|
+
* config surface.
|
|
34
|
+
*/
|
|
35
|
+
function runWithConfigWarningSink(sink, fn) {
|
|
36
|
+
return warningCapture.run({
|
|
37
|
+
sink,
|
|
38
|
+
previous: warningCapture.getStore()
|
|
39
|
+
}, fn);
|
|
35
40
|
}
|
|
36
41
|
function emitConfigWarning(message) {
|
|
37
|
-
|
|
42
|
+
const capture = warningCapture.getStore();
|
|
43
|
+
if (capture) capture.sink.push(message);
|
|
38
44
|
else console.warn(message);
|
|
39
45
|
}
|
|
40
46
|
const configPathCache = /* @__PURE__ */ new Map();
|
|
47
|
+
/**
|
|
48
|
+
* @internal — clears the findConfigPath memo. Plumbing for tests and the
|
|
49
|
+
* resolution session; not part of the public config surface.
|
|
50
|
+
*/
|
|
51
|
+
function resetConfigPathCache() {
|
|
52
|
+
configPathCache.clear();
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Reads the local authored config without resolving the extends chain or
|
|
56
|
+
* touching the network — the build-surface factories (generated rsbuild
|
|
57
|
+
* configs) consume it for their APP_NAME/APP_ACCOUNT defines.
|
|
58
|
+
*/
|
|
59
|
+
async function readAuthoredConfigInput(cwd) {
|
|
60
|
+
const configPath = findConfigPath(cwd);
|
|
61
|
+
if (!configPath || configPath.startsWith("bos://")) return null;
|
|
62
|
+
return readConfigInput(configPath, (0, node_path.dirname)(configPath));
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The authored config entry inside exactly `dir` — no upward walk. Unlike
|
|
66
|
+
* `findConfigPath` this never escapes the given directory, for write targets
|
|
67
|
+
* and nested-local-path resolution where a parent's config must not be
|
|
68
|
+
* picked up. Prefers the authored `bos.app.ts` descriptor (the canonical
|
|
69
|
+
* form) over a legacy `bos.config.json`.
|
|
70
|
+
*/
|
|
71
|
+
function localConfigEntryPath(dir) {
|
|
72
|
+
const appPath = (0, node_path.join)(dir, "bos.app.ts");
|
|
73
|
+
if ((0, node_fs.existsSync)(appPath)) return appPath;
|
|
74
|
+
const jsonPath = (0, node_path.join)(dir, "bos.config.json");
|
|
75
|
+
return (0, node_fs.existsSync)(jsonPath) ? jsonPath : null;
|
|
76
|
+
}
|
|
77
|
+
/** `localConfigEntryPath` + the form-aware read (`BosConfigInput`). */
|
|
78
|
+
async function readLocalAuthoredConfigInput(dir) {
|
|
79
|
+
const entry = localConfigEntryPath(dir);
|
|
80
|
+
if (!entry) return null;
|
|
81
|
+
return readConfigInput(entry, (0, node_path.dirname)(entry));
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The authored `bos.app.ts` descriptor is the canonical form — when both
|
|
85
|
+
* forms coexist (e.g. a generated `bos.config.json` write-back beside the
|
|
86
|
+
* authored descriptor), the authored file wins. JSON-form-only children are
|
|
87
|
+
* unaffected: with no `bos.app.ts`, the JSON file is the entry.
|
|
88
|
+
*/
|
|
41
89
|
function findConfigPath(cwd) {
|
|
42
|
-
const cacheKey = cwd ?? process.cwd();
|
|
90
|
+
const cacheKey = (0, node_path.resolve)(cwd ?? process.cwd());
|
|
43
91
|
const cached = configPathCache.get(cacheKey);
|
|
44
92
|
if (cached !== void 0) return cached;
|
|
45
93
|
let dir = cacheKey;
|
|
46
|
-
while (
|
|
47
|
-
const
|
|
48
|
-
if ((0, node_fs.existsSync)(
|
|
49
|
-
configPathCache.set(cacheKey,
|
|
50
|
-
return
|
|
94
|
+
while (true) {
|
|
95
|
+
const appPath = (0, node_path.join)(dir, "bos.app.ts");
|
|
96
|
+
if ((0, node_fs.existsSync)(appPath)) {
|
|
97
|
+
configPathCache.set(cacheKey, appPath);
|
|
98
|
+
return appPath;
|
|
99
|
+
}
|
|
100
|
+
const jsonPath = (0, node_path.join)(dir, "bos.config.json");
|
|
101
|
+
if ((0, node_fs.existsSync)(jsonPath)) {
|
|
102
|
+
configPathCache.set(cacheKey, jsonPath);
|
|
103
|
+
return jsonPath;
|
|
51
104
|
}
|
|
52
|
-
|
|
105
|
+
const parent = (0, node_path.dirname)(dir);
|
|
106
|
+
if (parent === dir) break;
|
|
107
|
+
dir = parent;
|
|
53
108
|
}
|
|
54
109
|
configPathCache.set(cacheKey, null);
|
|
55
110
|
return null;
|
|
56
111
|
}
|
|
57
|
-
function
|
|
58
|
-
return
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if (!
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
const runtimeEnv = env === "staging" ? "production" : env;
|
|
87
|
-
try {
|
|
88
|
-
suppressWarnings();
|
|
89
|
-
const extendedChain = [];
|
|
90
|
-
const parsed = await resolveConfigWithExtends(configPath, baseDir, /* @__PURE__ */ new Set(), extendedChain, env);
|
|
91
|
-
const config = await resolveConfigComposableEntries(require_types.BosConfigSchema.parse(parsed), baseDir, runtimeEnv);
|
|
92
|
-
cachedConfig = config;
|
|
93
|
-
projectRoot = baseDir;
|
|
94
|
-
const runtime = await buildRuntimeConfig(config, baseDir, runtimeEnv, { plugins: await resolveRuntimePlugins(config.plugins ?? {}, baseDir, runtimeEnv, options?.remotePlugins) });
|
|
95
|
-
const warnings = drainConfigWarnings();
|
|
96
|
-
resumeWarnings();
|
|
97
|
-
return {
|
|
98
|
-
config,
|
|
99
|
-
runtime,
|
|
100
|
-
source: {
|
|
101
|
-
path: configPath,
|
|
102
|
-
extended: extendedChain.length > 0 ? extendedChain : void 0,
|
|
103
|
-
remote: extendedChain.some((entry) => entry.startsWith("bos://"))
|
|
104
|
-
},
|
|
105
|
-
warnings: warnings.length > 0 ? warnings : void 0
|
|
106
|
-
};
|
|
107
|
-
} catch (error) {
|
|
108
|
-
resumeWarnings();
|
|
109
|
-
if (error instanceof Error) throw new Error(`Failed to load config from ${configPath}: ${error.message}`, { cause: error });
|
|
110
|
-
throw new Error(`Failed to load config from ${configPath}: ${String(error)}`);
|
|
112
|
+
function isAppDescriptorPath(configPath) {
|
|
113
|
+
return configPath.endsWith(".app.ts") || configPath.endsWith(".app.js");
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Materialize an authored bos.app.ts descriptor into the authoring-shape
|
|
117
|
+
* `BosConfigInput` the config pipeline consumes. Import-extends is honored
|
|
118
|
+
* two ways: the parent descriptor value can be imported directly (an
|
|
119
|
+
* inlined parent, resolved through `resolveApp`), or `extends` can name a
|
|
120
|
+
* published config (`bos://…`) / a local file, which flows into the JSON
|
|
121
|
+
* extends chain unchanged.
|
|
122
|
+
*/
|
|
123
|
+
async function loadAppDescriptorConfig(resolvedPath) {
|
|
124
|
+
return parseAppDescriptorModule(await import(
|
|
125
|
+
/* webpackIgnore: true */
|
|
126
|
+
(0, node_url.pathToFileURL)(resolvedPath).href
|
|
127
|
+
), resolvedPath);
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* @internal — parses an already-imported app descriptor module into the
|
|
131
|
+
* authoring-shape `BosConfigInput`. Plumbing for the resolution session's
|
|
132
|
+
* injectable module loader; not part of the public config surface.
|
|
133
|
+
*/
|
|
134
|
+
function parseAppDescriptorModule(mod, sourcePath) {
|
|
135
|
+
if (!mod.default) throw new Error(`${sourcePath ?? "App descriptor module"} must default-export an App() descriptor`);
|
|
136
|
+
const descriptor = require_schema.AppDescriptorSchema.parse(mod.default);
|
|
137
|
+
const registry = {};
|
|
138
|
+
for (const value of Object.values(mod)) {
|
|
139
|
+
const parsed = require_schema.AppDescriptorSchema.safeParse(value);
|
|
140
|
+
if (parsed.success) registry[parsed.data.name] = parsed.data;
|
|
111
141
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
const
|
|
115
|
-
if (
|
|
116
|
-
return
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
};
|
|
142
|
+
const extendsRef = descriptor.extends;
|
|
143
|
+
if (typeof extendsRef === "string" && registry[extendsRef] !== void 0 || extendsRef !== void 0 && typeof extendsRef !== "string") return require_resolve.resolveApp(descriptor.name, registry);
|
|
144
|
+
const input = require_resolve.toConfigInput(descriptor);
|
|
145
|
+
if (extendsRef !== void 0) input.extends = extendsRef;
|
|
146
|
+
return input;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* @internal — validates an already-imported `bos.dev.ts` module as a
|
|
150
|
+
* `Partial<AppDescriptor>` dev overlay. Plumbing for the resolution session's
|
|
151
|
+
* injectable module loader; not part of the public config surface.
|
|
152
|
+
*/
|
|
153
|
+
function parseDevOverlayModule(mod, sourcePath) {
|
|
154
|
+
const source = sourcePath ?? "bos.dev.ts";
|
|
155
|
+
if (!mod?.default) throw new DevOverlayError({
|
|
156
|
+
path: source,
|
|
157
|
+
message: `${source} must default-export a dev overlay (Partial<AppDescriptor>)`
|
|
158
|
+
});
|
|
159
|
+
const parsed = require_schema.AppDescriptorSchema.partial().safeParse(mod.default);
|
|
160
|
+
if (!parsed.success) throw new DevOverlayError({
|
|
161
|
+
path: source,
|
|
162
|
+
message: `${source} is not a valid dev overlay: ${parsed.error.message}`,
|
|
163
|
+
cause: parsed.error
|
|
164
|
+
});
|
|
165
|
+
return parsed.data;
|
|
166
|
+
}
|
|
167
|
+
var ConfigLoadError = class extends effect.Schema.TaggedError()("ConfigLoadError", {
|
|
168
|
+
path: effect.Schema.String,
|
|
169
|
+
message: effect.Schema.String,
|
|
170
|
+
cause: effect.Schema.optional(effect.Schema.Unknown)
|
|
171
|
+
}) {};
|
|
172
|
+
var CircularExtendsError = class extends effect.Schema.TaggedError()("CircularExtendsError", {
|
|
173
|
+
chain: effect.Schema.Array(effect.Schema.String),
|
|
174
|
+
message: effect.Schema.String
|
|
175
|
+
}) {};
|
|
176
|
+
var ConfigNotfoundError = class extends effect.Schema.TaggedError()("ConfigNotfoundError", { message: effect.Schema.String }) {};
|
|
177
|
+
var ConfigExtendsError = class extends effect.Schema.TaggedError()("ConfigExtendsError", {
|
|
178
|
+
message: effect.Schema.String,
|
|
179
|
+
cause: effect.Schema.optional(effect.Schema.Unknown)
|
|
180
|
+
}) {};
|
|
181
|
+
var ConfigVersionManifestError = class extends effect.Schema.TaggedError()("ConfigVersionManifestError", {
|
|
182
|
+
message: effect.Schema.String,
|
|
183
|
+
cause: effect.Schema.optional(effect.Schema.Unknown)
|
|
184
|
+
}) {};
|
|
185
|
+
var DevOverlayError = class extends effect.Schema.TaggedError()("DevOverlayError", {
|
|
186
|
+
path: effect.Schema.String,
|
|
187
|
+
message: effect.Schema.String,
|
|
188
|
+
cause: effect.Schema.optional(effect.Schema.Unknown)
|
|
189
|
+
}) {};
|
|
190
|
+
function defaultConfigEnv() {
|
|
191
|
+
return process.env.NODE_ENV === "production" ? "production" : "development";
|
|
129
192
|
}
|
|
130
193
|
function parseRuntimeOverrideTargets(value) {
|
|
131
194
|
if (!value) return [];
|
|
132
195
|
return [...new Set(value.split(",").map((entry) => entry.trim()).filter(Boolean))].map((entry) => {
|
|
133
196
|
if (entry === "ui" || entry === "api" || entry === "plugins") return entry;
|
|
134
197
|
if (entry.startsWith("plugins.") && entry.length > 8) return entry;
|
|
135
|
-
throw new
|
|
198
|
+
throw new ConfigExtendsError({ message: `Invalid runtime override target: ${entry}` });
|
|
136
199
|
});
|
|
137
200
|
}
|
|
138
201
|
function isRuntimeOverrideAllowed(allowedTargets, target) {
|
|
@@ -140,16 +203,20 @@ function isRuntimeOverrideAllowed(allowedTargets, target) {
|
|
|
140
203
|
if (target.startsWith("plugins.")) return allowedTargets.includes("plugins.*");
|
|
141
204
|
return false;
|
|
142
205
|
}
|
|
143
|
-
async function buildRuntimePluginsForConfig(config, baseDir, env) {
|
|
144
|
-
const plugins = await resolveRuntimePlugins(config.plugins ?? {}, baseDir, env);
|
|
206
|
+
async function buildRuntimePluginsForConfig(config, baseDir, env, remotePlugins) {
|
|
207
|
+
const plugins = await resolveRuntimePlugins(config.plugins ?? {}, baseDir, env, remotePlugins);
|
|
145
208
|
return Object.keys(plugins).length > 0 ? plugins : void 0;
|
|
146
209
|
}
|
|
147
210
|
function getEntryAssociatedUi(entry) {
|
|
148
|
-
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
211
|
+
const flat = require_merge.isPlainObject(entry.ui) ? entry.ui : void 0;
|
|
212
|
+
const nested = (() => {
|
|
213
|
+
if (!require_merge.isPlainObject(entry.app)) return void 0;
|
|
214
|
+
const app = entry.app;
|
|
215
|
+
return require_merge.isPlainObject(app.ui) ? app.ui : void 0;
|
|
216
|
+
})();
|
|
217
|
+
const ui = flat ?? nested;
|
|
218
|
+
if (!ui) return void 0;
|
|
219
|
+
if ("shared" in ui) throw new ConfigExtendsError({ message: "app.ui.shared is no longer supported. Move shared deps to app.api.shared, app.auth.shared, or plugins.*.shared." });
|
|
153
220
|
return ui;
|
|
154
221
|
}
|
|
155
222
|
function mergeAssociatedUi(parentUi, childUi) {
|
|
@@ -222,7 +289,7 @@ function resolveBosConfigPath(configDir) {
|
|
|
222
289
|
if ((0, node_fs.existsSync)(resolvedPath)) return resolvedPath;
|
|
223
290
|
return (0, node_path.join)(configDir, "bos.config.json");
|
|
224
291
|
}
|
|
225
|
-
function readBosConfigForBuild(configDir) {
|
|
292
|
+
async function readBosConfigForBuild(configDir) {
|
|
226
293
|
const resolvedPath = getResolvedConfigPath(configDir);
|
|
227
294
|
if ((0, node_fs.existsSync)(resolvedPath)) try {
|
|
228
295
|
const raw = JSON.parse((0, node_fs.readFileSync)(resolvedPath, "utf-8"));
|
|
@@ -231,11 +298,18 @@ function readBosConfigForBuild(configDir) {
|
|
|
231
298
|
return configData;
|
|
232
299
|
}
|
|
233
300
|
} catch (e) {
|
|
234
|
-
console.warn(`[Config] Failed to parse _resolved.json, falling back to
|
|
301
|
+
console.warn(`[Config] Failed to parse _resolved.json, falling back to the authored config: ${e}`);
|
|
235
302
|
}
|
|
303
|
+
const authored = await readLocalAuthoredConfigInput(configDir);
|
|
304
|
+
if (authored) return authored;
|
|
236
305
|
const bosConfigPath = (0, node_path.join)(configDir, "bos.config.json");
|
|
237
306
|
return JSON.parse((0, node_fs.readFileSync)(bosConfigPath, "utf-8"));
|
|
238
307
|
}
|
|
308
|
+
/**
|
|
309
|
+
* @internal — splits an extends ref into its config path and optional
|
|
310
|
+
* `#target` suffix. Plumbing for the resolution session; not part of the
|
|
311
|
+
* public config surface.
|
|
312
|
+
*/
|
|
239
313
|
function parseExtendsTarget(ref) {
|
|
240
314
|
const hashIndex = ref.indexOf("#");
|
|
241
315
|
if (hashIndex === -1) return { configPath: ref };
|
|
@@ -246,6 +320,10 @@ function parseExtendsTarget(ref) {
|
|
|
246
320
|
targetPath: targetPath.length > 0 ? targetPath : void 0
|
|
247
321
|
};
|
|
248
322
|
}
|
|
323
|
+
/**
|
|
324
|
+
* @internal — resolves the base directory a config path extends from.
|
|
325
|
+
* Plumbing for the resolution session; not part of the public config surface.
|
|
326
|
+
*/
|
|
249
327
|
function getConfigBaseDir(configPath, baseDir) {
|
|
250
328
|
if (configPath.startsWith("bos://")) return baseDir;
|
|
251
329
|
return (0, node_path.dirname)((0, node_path.isAbsolute)(configPath) ? configPath : (0, node_path.resolve)(baseDir, configPath));
|
|
@@ -253,7 +331,7 @@ function getConfigBaseDir(configPath, baseDir) {
|
|
|
253
331
|
function asComposableEntry(value) {
|
|
254
332
|
if (value === void 0) return {};
|
|
255
333
|
if (typeof value === "string") return { extends: value };
|
|
256
|
-
if (!require_merge.isPlainObject(value)) throw new
|
|
334
|
+
if (!require_merge.isPlainObject(value)) throw new ConfigExtendsError({ message: `Expected config entry object, received ${typeof value}` });
|
|
257
335
|
return value;
|
|
258
336
|
}
|
|
259
337
|
function getTargetedEntry(config, targetPath) {
|
|
@@ -263,19 +341,25 @@ function getTargetedEntry(config, targetPath) {
|
|
|
263
341
|
}
|
|
264
342
|
if (targetPath.startsWith("plugins.")) {
|
|
265
343
|
const pluginId = targetPath.slice(8);
|
|
266
|
-
if (pluginId.length === 0) throw new
|
|
344
|
+
if (pluginId.length === 0) throw new ConfigExtendsError({ message: `Invalid plugin target path: ${targetPath}` });
|
|
267
345
|
return asComposableEntry(config.plugins?.[pluginId]);
|
|
268
346
|
}
|
|
269
|
-
throw new
|
|
347
|
+
throw new ConfigExtendsError({ message: `Unsupported extends target path: ${targetPath}` });
|
|
270
348
|
}
|
|
271
349
|
function getAssociatedUi(config, _targetPath) {
|
|
272
350
|
if (!require_merge.isPlainObject(config.app?.ui)) return;
|
|
273
351
|
const ui = config.app.ui;
|
|
274
|
-
if ("shared" in ui) throw new
|
|
352
|
+
if ("shared" in ui) throw new ConfigExtendsError({ message: "app.ui.shared is no longer supported. Move shared deps to app.api.shared, app.auth.shared, or plugins.*.shared." });
|
|
275
353
|
return ui;
|
|
276
354
|
}
|
|
355
|
+
function applyNullOverrides(target, source) {
|
|
356
|
+
for (const [key, value] of Object.entries(source)) if (value === null) target[key] = null;
|
|
357
|
+
else if (require_merge.isPlainObject(value) && require_merge.isPlainObject(target[key])) applyNullOverrides(target[key], value);
|
|
358
|
+
}
|
|
277
359
|
function mergeComposableEntries(parent, child) {
|
|
278
|
-
|
|
360
|
+
const merged = require_merge.bosConfigMerger({ ...child }, parent);
|
|
361
|
+
applyNullOverrides(merged, child);
|
|
362
|
+
return merged;
|
|
279
363
|
}
|
|
280
364
|
function stripUnsafeLocalDevelopment(entry, allowLocalPaths) {
|
|
281
365
|
if (!entry || allowLocalPaths) return entry;
|
|
@@ -294,11 +378,15 @@ async function resolveComposableReference(source, baseDir, env, defaultTargetPat
|
|
|
294
378
|
let extendsError;
|
|
295
379
|
const extendsRef = source.extends ? require_merge.resolveExtendsRef(source.extends, env) : void 0;
|
|
296
380
|
if (extendsRef) {
|
|
381
|
+
const { resolveMergedConfigInput } = await Promise.resolve().then(() => require("./resolution/session.cjs"));
|
|
297
382
|
const parsed = parseExtendsTarget(extendsRef);
|
|
298
383
|
targetPath = parsed.targetPath ?? defaultTargetPath;
|
|
299
384
|
const extendsBaseDir = getConfigBaseDir(parsed.configPath, baseDir);
|
|
300
385
|
try {
|
|
301
|
-
const extendedConfig = await
|
|
386
|
+
const extendedConfig = await resolveMergedConfigInput(parsed.configPath, {
|
|
387
|
+
baseDir: extendsBaseDir,
|
|
388
|
+
env
|
|
389
|
+
});
|
|
302
390
|
resolvedEntry = mergeComposableEntries(resolvedEntry, getTargetedEntry(extendedConfig, targetPath));
|
|
303
391
|
providerBaseDir = extendsBaseDir;
|
|
304
392
|
associatedUi = mergeAssociatedUi(associatedUi, getAssociatedUi(extendedConfig, targetPath));
|
|
@@ -310,10 +398,14 @@ async function resolveComposableReference(source, baseDir, env, defaultTargetPat
|
|
|
310
398
|
const localDevelopmentPath = localDevelopment ? (0, node_path.resolve)(baseDir, localDevelopment.slice(6).trim()) : void 0;
|
|
311
399
|
const hasUsableLocalDevelopment = Boolean(localDevelopmentPath && (0, node_fs.existsSync)(localDevelopmentPath));
|
|
312
400
|
if (localDevelopmentPath) {
|
|
401
|
+
const { resolveMergedConfigInput } = await Promise.resolve().then(() => require("./resolution/session.cjs"));
|
|
313
402
|
const localPath = localDevelopmentPath;
|
|
314
|
-
const localConfigPath = (
|
|
315
|
-
if (
|
|
316
|
-
const localConfig = await
|
|
403
|
+
const localConfigPath = localConfigEntryPath(localPath);
|
|
404
|
+
if (localConfigPath) {
|
|
405
|
+
const localConfig = await resolveMergedConfigInput(localConfigPath, {
|
|
406
|
+
baseDir: localPath,
|
|
407
|
+
env
|
|
408
|
+
});
|
|
317
409
|
resolvedEntry = mergeComposableEntries(resolvedEntry, getTargetedEntry(localConfig, targetPath));
|
|
318
410
|
providerBaseDir = localPath;
|
|
319
411
|
associatedUi = mergeAssociatedUi(associatedUi, getAssociatedUi(localConfig, targetPath));
|
|
@@ -329,14 +421,16 @@ async function resolveComposableReference(source, baseDir, env, defaultTargetPat
|
|
|
329
421
|
entry: stripUnsafeLocalDevelopment(resolvedEntry, allowLocalPaths || Boolean(localDevelopment)),
|
|
330
422
|
providerBaseDir,
|
|
331
423
|
targetPath,
|
|
332
|
-
associatedUi: stripUnsafeLocalDevelopment(associatedUi, allowLocalPaths)
|
|
424
|
+
associatedUi: stripUnsafeLocalDevelopment(associatedUi, allowLocalPaths || Boolean(localDevelopment))
|
|
333
425
|
};
|
|
334
426
|
}
|
|
335
427
|
function resolveDevelopmentTarget(development, production, baseDir, forceSource, target, extendsRef) {
|
|
336
428
|
if (forceSource === "remote") return resolveRuntimeTarget(production, baseDir, "remote");
|
|
337
429
|
if (!development) {
|
|
338
|
-
if (production && target)
|
|
339
|
-
|
|
430
|
+
if (production && target) {
|
|
431
|
+
if (extendsRef) emitConfigWarning(`[Config] Resolving "${target}" from ${extendsRef}`);
|
|
432
|
+
else emitConfigWarning(`[Config] No development target for "${target}", using production`);
|
|
433
|
+
}
|
|
340
434
|
return resolveRuntimeTarget(production, baseDir, "remote");
|
|
341
435
|
}
|
|
342
436
|
const devTarget = resolveRuntimeTarget(development, baseDir);
|
|
@@ -346,7 +440,7 @@ function resolveDevelopmentTarget(development, production, baseDir, forceSource,
|
|
|
346
440
|
}
|
|
347
441
|
return devTarget;
|
|
348
442
|
}
|
|
349
|
-
|
|
443
|
+
const buildRuntimeConfigEffect = effect.Effect.fn("buildRuntimeConfig")(function* (config, baseDir, env, options) {
|
|
350
444
|
const uiConfig = config.app.ui;
|
|
351
445
|
const apiConfig = config.app.api;
|
|
352
446
|
const authConfig = config.app.auth;
|
|
@@ -356,11 +450,40 @@ async function buildRuntimeConfig(config, baseDir, env, options) {
|
|
|
356
450
|
const authRuntime = authConfig ? env === "development" ? resolveDevelopmentTarget(authConfig.development, authConfig.production, baseDir, options?.authSource, "app.auth", authExtendsRef) : resolveRuntimeTarget(authConfig.production, baseDir, "remote") : void 0;
|
|
357
451
|
const hostConfig = config.app.host;
|
|
358
452
|
const hostRuntime = env === "development" ? resolveDevelopmentTarget(hostConfig.development, hostConfig.production, baseDir, options?.hostSource, "app.host") : resolveRuntimeTarget(hostConfig.production, baseDir, "remote");
|
|
359
|
-
const hostListeningUrl = env === "development" ? resolveDevelopmentHostUrl(hostConfig.development) : `http://localhost:${DEFAULT_HOST_PORT}`;
|
|
453
|
+
const hostListeningUrl = env === "development" ? resolveDevelopmentHostUrl(hostConfig.development) : `http://localhost:${require_process_env.getProcessEnv("PORT") ?? DEFAULT_HOST_PORT}`;
|
|
360
454
|
const hostIsRemote = hostRuntime.source === "remote";
|
|
361
455
|
const uiIsRemote = uiRuntime.source === "remote";
|
|
362
456
|
const apiIsRemote = apiRuntime.source === "remote";
|
|
363
457
|
const resolvedApiName = resolvePluginRuntimeName(apiConfig.name, apiRuntime.localPath, "api");
|
|
458
|
+
const authEntry = yield* effect.Effect.tryPromise({
|
|
459
|
+
try: async () => {
|
|
460
|
+
if (!authConfig || !authRuntime) return void 0;
|
|
461
|
+
if (!authRuntime.localPath && !authRuntime.url) return void 0;
|
|
462
|
+
let authName = resolvePluginRuntimeName(authConfig.name, authRuntime.localPath, "auth");
|
|
463
|
+
if (authRuntime.source === "remote" && authRuntime.url && !authRuntime.localPath && typeof authConfig.name !== "string") authName = await resolveRemotePluginRuntimeName(authRuntime.url, authName);
|
|
464
|
+
return {
|
|
465
|
+
name: authName,
|
|
466
|
+
extendsRef: authExtendsRef,
|
|
467
|
+
url: authRuntime.url,
|
|
468
|
+
entry: authRuntime.url ? `${authRuntime.url}/mf-manifest.json` : "/mf-manifest.json",
|
|
469
|
+
localPath: authRuntime.localPath,
|
|
470
|
+
port: authRuntime.port,
|
|
471
|
+
source: authRuntime.source,
|
|
472
|
+
proxy: authConfig.proxy,
|
|
473
|
+
variables: authConfig.variables,
|
|
474
|
+
secrets: authConfig.secrets,
|
|
475
|
+
integrity: authRuntime.source === "remote" ? authConfig.integrity : void 0,
|
|
476
|
+
shared: authConfig.shared,
|
|
477
|
+
ui: buildRuntimeUiConfig("auth", env, getEntryAssociatedUi(authConfig), baseDir, authName, options?.authSource)
|
|
478
|
+
};
|
|
479
|
+
},
|
|
480
|
+
catch: (cause) => new ConfigExtendsError({
|
|
481
|
+
message: String(cause),
|
|
482
|
+
cause
|
|
483
|
+
})
|
|
484
|
+
});
|
|
485
|
+
const runtimePlugins = { ...options?.plugins && Object.keys(options.plugins).length > 0 ? options.plugins : void 0 };
|
|
486
|
+
if (authEntry && !runtimePlugins.auth) runtimePlugins.auth = authEntry;
|
|
364
487
|
const result = {
|
|
365
488
|
env,
|
|
366
489
|
account: config.account,
|
|
@@ -374,7 +497,7 @@ async function buildRuntimeConfig(config, baseDir, env, options) {
|
|
|
374
497
|
url: hostListeningUrl,
|
|
375
498
|
entry: `${hostListeningUrl}/mf-manifest.json`,
|
|
376
499
|
localPath: hostRuntime.localPath,
|
|
377
|
-
port: env === "development" ? parsePort(hostListeningUrl) : DEFAULT_HOST_PORT,
|
|
500
|
+
port: env === "development" ? parsePort(hostListeningUrl) : Number(require_process_env.getProcessEnv("PORT")) || DEFAULT_HOST_PORT,
|
|
378
501
|
secrets: hostConfig.secrets,
|
|
379
502
|
integrity: hostIsRemote ? hostConfig.integrity : void 0,
|
|
380
503
|
source: hostRuntime.source,
|
|
@@ -384,6 +507,7 @@ async function buildRuntimeConfig(config, baseDir, env, options) {
|
|
|
384
507
|
name: resolvePluginRuntimeName(uiConfig.name, uiRuntime.localPath, "ui"),
|
|
385
508
|
url: uiRuntime.url,
|
|
386
509
|
entry: uiRuntime.url ? `${uiRuntime.url}/mf-manifest.json` : "/mf-manifest.json",
|
|
510
|
+
publicUrl: typeof uiConfig.publicUrl === "string" ? uiConfig.publicUrl : void 0,
|
|
387
511
|
localPath: uiRuntime.localPath,
|
|
388
512
|
port: uiRuntime.port,
|
|
389
513
|
ssrUrl: uiIsRemote ? uiConfig.ssr : void 0,
|
|
@@ -405,123 +529,190 @@ async function buildRuntimeConfig(config, baseDir, env, options) {
|
|
|
405
529
|
shared: apiConfig.shared,
|
|
406
530
|
dependsOn: apiConfig.dependsOn ? normalizeStringArray(apiConfig.dependsOn) : void 0
|
|
407
531
|
},
|
|
408
|
-
auth:
|
|
409
|
-
|
|
410
|
-
if (!authRuntime.localPath && !authRuntime.url) return void 0;
|
|
411
|
-
return {
|
|
412
|
-
name: resolvePluginRuntimeName(authConfig.name, authRuntime.localPath, "auth"),
|
|
413
|
-
extendsRef: authExtendsRef,
|
|
414
|
-
url: authRuntime.url,
|
|
415
|
-
entry: authRuntime.url ? `${authRuntime.url}/mf-manifest.json` : "/mf-manifest.json",
|
|
416
|
-
localPath: authRuntime.localPath,
|
|
417
|
-
port: authRuntime.port,
|
|
418
|
-
source: authRuntime.source,
|
|
419
|
-
proxy: authConfig.proxy,
|
|
420
|
-
variables: authConfig.variables,
|
|
421
|
-
secrets: authConfig.secrets,
|
|
422
|
-
integrity: authRuntime.source === "remote" ? authConfig.integrity : void 0,
|
|
423
|
-
shared: authConfig.shared
|
|
424
|
-
};
|
|
425
|
-
})(),
|
|
426
|
-
plugins: options?.plugins && Object.keys(options.plugins).length > 0 ? options.plugins : void 0
|
|
532
|
+
auth: authEntry,
|
|
533
|
+
plugins: Object.keys(runtimePlugins).length > 0 ? runtimePlugins : void 0
|
|
427
534
|
};
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
535
|
+
yield* effect.Effect.tryPromise({
|
|
536
|
+
try: async () => {
|
|
537
|
+
try {
|
|
538
|
+
if (result.api.source !== "remote" || !result.api.url) return;
|
|
539
|
+
const manifest = await require_api_contract.fetchApiPluginManifest(result.api.url);
|
|
540
|
+
const manifestPluginEntries = [];
|
|
541
|
+
if (manifest.plugins?.length) {
|
|
542
|
+
for (const node of require_dag.manifestPluginsToNodes(manifest.plugins)) if (!result.plugins?.[node.key]) {
|
|
543
|
+
manifestPluginEntries.push({
|
|
544
|
+
key: node.key,
|
|
545
|
+
config: {
|
|
546
|
+
name: node.name,
|
|
547
|
+
url: node.url,
|
|
548
|
+
entry: node.entry,
|
|
549
|
+
source: "remote",
|
|
550
|
+
dependsOn: node.dependsOn,
|
|
551
|
+
secrets: node.secrets,
|
|
552
|
+
variables: node.variables
|
|
553
|
+
}
|
|
554
|
+
});
|
|
555
|
+
if (node.secrets) {
|
|
556
|
+
for (const secretName of node.secrets) if (!require_process_env.getProcessEnv(secretName)) warnOutsideEffect(`[Config] Plugin "${node.key}" (discovered from manifest) expects secret "${secretName}" but it is not set in the environment.`);
|
|
557
|
+
}
|
|
445
558
|
}
|
|
446
|
-
});
|
|
447
|
-
if (node.secrets) {
|
|
448
|
-
for (const secretName of node.secrets) if (!process.env[secretName]) console.warn(`[Config] Plugin "${node.key}" (discovered from manifest) expects secret "${secretName}" but it is not set in the environment.`);
|
|
449
559
|
}
|
|
560
|
+
if (manifest.dependsOn?.length) {
|
|
561
|
+
const existing = new Set(result.api.dependsOn ?? []);
|
|
562
|
+
for (const dep of manifest.dependsOn) if (!existing.has(dep)) result.api.dependsOn = [...result.api.dependsOn ?? [], dep];
|
|
563
|
+
}
|
|
564
|
+
if (manifestPluginEntries.length > 0) {
|
|
565
|
+
if (!result.plugins) result.plugins = {};
|
|
566
|
+
for (const { key, config: pluginConfig } of manifestPluginEntries) if (!result.plugins[key]) result.plugins[key] = pluginConfig;
|
|
567
|
+
}
|
|
568
|
+
} catch (error) {
|
|
569
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
570
|
+
warnOutsideEffect(`[Config] Failed to fetch API plugin manifest for discovery: ${message}`);
|
|
450
571
|
}
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
|
|
572
|
+
},
|
|
573
|
+
catch: (cause) => new ConfigExtendsError({
|
|
574
|
+
message: String(cause),
|
|
575
|
+
cause
|
|
576
|
+
})
|
|
577
|
+
});
|
|
578
|
+
yield* effect.Effect.tryPromise({
|
|
579
|
+
try: () => deriveVersionManifestFields(result, config, env),
|
|
580
|
+
catch: (cause) => new ConfigVersionManifestError({
|
|
581
|
+
message: String(cause),
|
|
582
|
+
cause
|
|
583
|
+
})
|
|
584
|
+
});
|
|
585
|
+
return result;
|
|
586
|
+
});
|
|
587
|
+
/**
|
|
588
|
+
* Version-manifest derivation (atomic-deploys 04): for every remote slot,
|
|
589
|
+
* resolve its `pin` (fetch + SRI-verify the pinned manifest, process-cached
|
|
590
|
+
* per pin) and stamp the derived entry-level fields — `entryUrl` (hashed
|
|
591
|
+
* container entry), the browser-manifest `entry`, and entry-level
|
|
592
|
+
* `integrity`/`ssrIntegrity`/`ssrEntryUrl` — so consumers load immutable
|
|
593
|
+
* hashed bytes without knowing the pointer indirection.
|
|
594
|
+
*
|
|
595
|
+
* Hard break: outside development every remote slot MUST pin a version
|
|
596
|
+
* manifest — an unpinned remote slot fails resolution loudly (the deploy
|
|
597
|
+
* train pins every workspace it uploads; a manifest-less slot means a
|
|
598
|
+
* pre-atomic-deploy config).
|
|
599
|
+
*/
|
|
600
|
+
async function deriveVersionManifestFields(result, config, env) {
|
|
601
|
+
if (env === "development") return;
|
|
602
|
+
const derive = async (label, slotConfig, slot, apply) => {
|
|
603
|
+
if (!slot || slot.source !== "remote" || !slot.url) return;
|
|
604
|
+
const slotWithProduction = slotConfig;
|
|
605
|
+
if (!slotWithProduction || slotWithProduction.production === void 0) return;
|
|
606
|
+
const rawPin = slotConfig?.pin;
|
|
607
|
+
const pin = rawPin && typeof rawPin.manifest === "string" && rawPin.manifest && typeof rawPin.integrity === "string" && rawPin.integrity ? {
|
|
608
|
+
manifest: rawPin.manifest,
|
|
609
|
+
integrity: rawPin.integrity
|
|
610
|
+
} : void 0;
|
|
611
|
+
if (!pin) throw new Error(`slot "${label}" (${slot.url}) pins no version manifest — remote slots must pin a version manifest outside development (pre-atomic-deploy config; redeploy required)`);
|
|
612
|
+
apply(await require_version_manifest_resolve.resolveSlotVersion({
|
|
613
|
+
base: slot.remoteUrl ?? slot.url,
|
|
614
|
+
pin
|
|
615
|
+
}));
|
|
616
|
+
};
|
|
617
|
+
const applyUi = (ui, r) => {
|
|
618
|
+
if (!ui) return;
|
|
619
|
+
ui.entryUrl = r.entryUrl;
|
|
620
|
+
ui.entry = r.browserManifestUrl ?? ui.entry;
|
|
621
|
+
ui.browserManifestUrl = r.browserManifestUrl;
|
|
622
|
+
ui.integrity = r.entryIntegrity;
|
|
623
|
+
ui.ssrEntryUrl = r.ssrEntryUrl;
|
|
624
|
+
ui.ssrIntegrity = r.ssrIntegrity ?? ui.ssrIntegrity;
|
|
625
|
+
};
|
|
626
|
+
await derive("app.host", config.app.host, result.host, (r) => {
|
|
627
|
+
result.host.entryUrl = r.entryUrl;
|
|
628
|
+
result.host.integrity = r.entryIntegrity;
|
|
629
|
+
});
|
|
630
|
+
await derive("app.ui", config.app.ui, result.ui, (r) => applyUi(result.ui, r));
|
|
631
|
+
await derive("app.api", config.app.api, result.api, (r) => {
|
|
632
|
+
result.api.entryUrl = r.entryUrl;
|
|
633
|
+
result.api.integrity = r.entryIntegrity;
|
|
634
|
+
});
|
|
635
|
+
if (result.auth) {
|
|
636
|
+
await derive("app.auth", config.app.auth, result.auth, (r) => {
|
|
637
|
+
result.auth.entryUrl = r.entryUrl;
|
|
638
|
+
result.auth.integrity = r.entryIntegrity;
|
|
639
|
+
});
|
|
640
|
+
await derive("app.auth.ui", getEntryAssociatedUi(config.app.auth), result.auth.ui, (r) => applyUi(result.auth.ui, r));
|
|
459
641
|
}
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
642
|
+
for (const [key, plugin] of Object.entries(result.plugins ?? {})) {
|
|
643
|
+
let pluginConfig = config.plugins?.[key];
|
|
644
|
+
const isAuthMirror = key === "auth" && result.auth && (plugin === result.auth || plugin.url === result.auth.url);
|
|
645
|
+
if ((!pluginConfig || typeof pluginConfig === "string") && isAuthMirror) pluginConfig = config.app.auth;
|
|
646
|
+
if (!pluginConfig || typeof pluginConfig === "string") continue;
|
|
647
|
+
await derive(`plugins.${key}`, pluginConfig, plugin, (r) => {
|
|
648
|
+
plugin.entryUrl = r.entryUrl;
|
|
649
|
+
plugin.integrity = r.entryIntegrity;
|
|
650
|
+
});
|
|
651
|
+
await derive(`plugins.${key}.ui`, getEntryAssociatedUi(pluginConfig), plugin.ui, (r) => applyUi(plugin.ui, r));
|
|
463
652
|
}
|
|
464
|
-
return result;
|
|
465
653
|
}
|
|
466
|
-
async function
|
|
654
|
+
async function buildRuntimeConfig(config, baseDir, env, options) {
|
|
655
|
+
return effect.Effect.runPromise(buildRuntimeConfigEffect(config, baseDir, env, options));
|
|
656
|
+
}
|
|
657
|
+
async function readConfigInput(configPath, baseDir) {
|
|
467
658
|
if (configPath.startsWith("bos://")) return require_fastkv.fetchBosConfigFromFastKv(configPath);
|
|
468
659
|
const resolvedPath = (0, node_path.isAbsolute)(configPath) ? configPath : (0, node_path.resolve)(baseDir, configPath);
|
|
660
|
+
if (isAppDescriptorPath(resolvedPath)) return loadAppDescriptorConfig(resolvedPath);
|
|
469
661
|
return JSON.parse((0, node_fs.readFileSync)(resolvedPath, "utf-8"));
|
|
470
662
|
}
|
|
471
|
-
async function resolveConfigWithExtends(configPath, baseDir, visited, chain, env = "development") {
|
|
472
|
-
if (visited.has(configPath)) throw new Error(`Circular extends detected: ${[...visited, configPath].join(" -> ")}`);
|
|
473
|
-
const config = await loadConfigFile(configPath, baseDir);
|
|
474
|
-
chain.push(configPath);
|
|
475
|
-
if (!config.extends) return config;
|
|
476
|
-
const extendsRef = require_merge.resolveExtendsRef(config.extends, env);
|
|
477
|
-
if (!extendsRef) return config;
|
|
478
|
-
const parsedParentRef = parseExtendsTarget(extendsRef);
|
|
479
|
-
const nextVisited = new Set(visited);
|
|
480
|
-
nextVisited.add(configPath);
|
|
481
|
-
const parentBaseDir = getConfigBaseDir(parsedParentRef.configPath, baseDir);
|
|
482
|
-
return require_merge.mergeBosConfigWithExtends(await resolveConfigWithExtends(parsedParentRef.configPath, parentBaseDir, nextVisited, chain, env), config);
|
|
483
|
-
}
|
|
484
663
|
function normalizePluginEntry(raw) {
|
|
485
664
|
if (raw === null || raw === false) return raw;
|
|
486
665
|
if (typeof raw === "string") return { extends: raw };
|
|
487
666
|
return raw;
|
|
488
667
|
}
|
|
489
|
-
|
|
668
|
+
const resolveRuntimePluginsEffect = effect.Effect.fn("resolveRuntimePlugins")(function* (plugins, baseDir, env, remotePlugins) {
|
|
490
669
|
const entries = Object.entries(plugins).map(([pluginId, rawInput]) => ({
|
|
491
670
|
pluginId,
|
|
492
671
|
normalized: normalizePluginEntry(rawInput)
|
|
493
672
|
})).filter((entry) => entry.normalized !== null && entry.normalized !== false);
|
|
494
|
-
const resolved =
|
|
495
|
-
const resolvedReference =
|
|
673
|
+
const resolved = yield* effect.Effect.forEach(entries, ({ pluginId, normalized }) => effect.Effect.gen(function* () {
|
|
674
|
+
const resolvedReference = yield* effect.Effect.tryPromise({
|
|
675
|
+
try: () => resolveComposableReference(normalized, baseDir, env, `plugins.${pluginId}`),
|
|
676
|
+
catch: (cause) => new ConfigExtendsError({
|
|
677
|
+
message: String(cause),
|
|
678
|
+
cause
|
|
679
|
+
})
|
|
680
|
+
});
|
|
496
681
|
const forceSource = remotePlugins === void 0 ? void 0 : remotePlugins.length === 0 || remotePlugins.includes(pluginId) ? "remote" : void 0;
|
|
497
682
|
const pluginRuntime = buildRuntimePluginConfig(pluginId, env, resolvedReference, forceSource);
|
|
498
683
|
if (!pluginRuntime.localPath && !pluginRuntime.url) {
|
|
499
684
|
if (forceSource === "remote") emitConfigWarning(`[Config] Plugin "${pluginId}" has no production URL in bos.config.json and cannot be resolved as remote. Add a "production" field or remove it from --remote-plugins.`);
|
|
500
685
|
return null;
|
|
501
686
|
}
|
|
502
|
-
if (pluginRuntime.source === "remote" && pluginRuntime.url && !pluginRuntime.localPath && typeof resolvedReference.entry.name !== "string") pluginRuntime.name =
|
|
687
|
+
if (pluginRuntime.source === "remote" && pluginRuntime.url && !pluginRuntime.localPath && typeof resolvedReference.entry.name !== "string") pluginRuntime.name = yield* effect.Effect.tryPromise({
|
|
688
|
+
try: () => resolveRemotePluginRuntimeName(pluginRuntime.url, pluginRuntime.name),
|
|
689
|
+
catch: (cause) => new ConfigExtendsError({
|
|
690
|
+
message: String(cause),
|
|
691
|
+
cause
|
|
692
|
+
})
|
|
693
|
+
});
|
|
503
694
|
return [pluginId, pluginRuntime];
|
|
504
|
-
}));
|
|
695
|
+
}), { concurrency: "unbounded" });
|
|
505
696
|
const out = {};
|
|
506
697
|
for (const entry of resolved) if (entry) out[entry[0]] = entry[1];
|
|
507
698
|
return out;
|
|
699
|
+
});
|
|
700
|
+
function resolveRuntimePlugins(plugins, baseDir, env, remotePlugins) {
|
|
701
|
+
return effect.Effect.runPromise(resolveRuntimePluginsEffect(plugins, baseDir, env, remotePlugins));
|
|
508
702
|
}
|
|
509
703
|
async function resolveRemotePluginRuntimeName(baseUrl, fallback) {
|
|
510
|
-
const manifest = await require_http_client.fetchJsonOrNull(`${baseUrl.replace(/\/$/, "")}/plugin.manifest.json`, { retries:
|
|
704
|
+
const manifest = await require_http_client.fetchJsonOrNull(`${baseUrl.replace(/\/$/, "")}/plugin.manifest.json`, { retries: 2 });
|
|
511
705
|
return typeof manifest?.plugin?.name === "string" && manifest.plugin.name.length > 0 ? manifest.plugin.name : fallback;
|
|
512
706
|
}
|
|
513
707
|
function buildRuntimePluginConfig(pluginId, env, resolved, forceSource) {
|
|
514
708
|
const source = resolved.entry;
|
|
515
709
|
const development = typeof source.development === "string" ? source.development : void 0;
|
|
516
710
|
const production = typeof source.production === "string" ? source.production : void 0;
|
|
517
|
-
if (production?.startsWith("bos://")) throw new
|
|
711
|
+
if (production?.startsWith("bos://")) throw new ConfigExtendsError({ message: `Plugin "${pluginId}" has unsupported production target "${production}". Use extends: "bos://account/domain" for plugin configs or a CDN URL for production.` });
|
|
518
712
|
const pluginExtendsRef = source.extends ? require_merge.resolveExtendsRef(source.extends, env) : void 0;
|
|
519
713
|
const runtimeTarget = env === "development" ? resolveDevelopmentTarget(development, production, resolved.providerBaseDir, forceSource, `plugins.${pluginId}`, pluginExtendsRef) : resolveRuntimeTarget(production, resolved.providerBaseDir, "remote");
|
|
520
714
|
const apiName = resolvePluginRuntimeName(source.name, runtimeTarget.localPath, pluginId);
|
|
521
|
-
const
|
|
522
|
-
const uiDevelopment = typeof uiConfig?.development === "string" ? uiConfig.development : void 0;
|
|
523
|
-
const uiProduction = typeof uiConfig?.production === "string" ? uiConfig.production : void 0;
|
|
524
|
-
const uiRuntime = uiConfig && (uiDevelopment || uiProduction) ? env === "development" ? resolveDevelopmentTarget(uiDevelopment, uiProduction, resolved.providerBaseDir, forceSource, `plugins.${pluginId}.ui`) : resolveRuntimeTarget(uiProduction, resolved.providerBaseDir, "remote") : void 0;
|
|
715
|
+
const ui = buildRuntimeUiConfig(pluginId, env, resolved.associatedUi, resolved.providerBaseDir, apiName, forceSource);
|
|
525
716
|
const routes = source.routes;
|
|
526
717
|
return {
|
|
527
718
|
name: apiName,
|
|
@@ -537,19 +728,55 @@ function buildRuntimePluginConfig(pluginId, env, resolved, forceSource) {
|
|
|
537
728
|
shared: source.shared,
|
|
538
729
|
connectSrc: normalizeStringArray(source.connectSrc),
|
|
539
730
|
integrity: runtimeTarget.source === "remote" ? source.integrity : void 0,
|
|
540
|
-
ui
|
|
541
|
-
name: typeof uiConfig?.name === "string" ? uiConfig.name : `${apiName}-ui`,
|
|
542
|
-
url: uiRuntime.url,
|
|
543
|
-
entry: uiRuntime.url ? `${uiRuntime.url.replace(/\/$/, "")}/mf-manifest.json` : "/mf-manifest.json",
|
|
544
|
-
source: uiRuntime.source,
|
|
545
|
-
localPath: uiRuntime.localPath,
|
|
546
|
-
port: uiRuntime.port,
|
|
547
|
-
integrity: uiRuntime.source === "remote" && typeof uiConfig?.integrity === "string" ? uiConfig.integrity : void 0
|
|
548
|
-
} : void 0,
|
|
731
|
+
ui,
|
|
549
732
|
routes,
|
|
550
733
|
dependsOn: source.dependsOn ? normalizeStringArray(source.dependsOn) : void 0
|
|
551
734
|
};
|
|
552
735
|
}
|
|
736
|
+
/**
|
|
737
|
+
* Resolve a plugin entry's associated ui surface (`plugins.<id>.ui` / legacy
|
|
738
|
+
* `plugins.<id>.app.ui`) into the runtime ui config. Extracted so app-slot
|
|
739
|
+
* entries (app.auth) resolve their ui the same way.
|
|
740
|
+
*/
|
|
741
|
+
function buildRuntimeUiConfig(pluginId, env, uiConfig, providerBaseDir, apiName, forceSource) {
|
|
742
|
+
const uiDevelopment = typeof uiConfig?.development === "string" ? uiConfig.development : void 0;
|
|
743
|
+
const uiProduction = typeof uiConfig?.production === "string" ? uiConfig.production : void 0;
|
|
744
|
+
const uiRuntime = uiConfig && (uiDevelopment || uiProduction) ? env === "development" ? resolveDevelopmentTarget(uiDevelopment, uiProduction, providerBaseDir, forceSource, `plugins.${pluginId}.ui`) : resolveRuntimeTarget(uiProduction, providerBaseDir, "remote") : void 0;
|
|
745
|
+
if (!uiRuntime) return void 0;
|
|
746
|
+
if (uiRuntime.source === "remote" && !uiRuntime.url) return void 0;
|
|
747
|
+
return {
|
|
748
|
+
name: resolveUiRuntimeName(uiConfig, uiRuntime.localPath, apiName),
|
|
749
|
+
url: uiRuntime.url,
|
|
750
|
+
entry: uiRuntime.url ? `${uiRuntime.url.replace(/\/$/, "")}/mf-manifest.json` : "/mf-manifest.json",
|
|
751
|
+
source: uiRuntime.source,
|
|
752
|
+
publicUrl: typeof uiConfig?.publicUrl === "string" ? uiConfig.publicUrl : void 0,
|
|
753
|
+
localPath: uiRuntime.localPath,
|
|
754
|
+
port: uiRuntime.port,
|
|
755
|
+
integrity: uiRuntime.source === "remote" && typeof uiConfig?.integrity === "string" ? uiConfig.integrity : void 0,
|
|
756
|
+
ssrUrl: uiRuntime.source === "remote" && typeof uiConfig?.ssr === "string" ? uiConfig.ssr : uiRuntime.source === "local" ? uiRuntime.url : void 0,
|
|
757
|
+
ssrIntegrity: uiRuntime.source === "remote" && typeof uiConfig?.ssrIntegrity === "string" ? uiConfig.ssrIntegrity : void 0
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
/**
|
|
761
|
+
* MF container identity must match the build: folder-form plugin ui sources
|
|
762
|
+
* build under the sanitized plugin workspace package name (the generated
|
|
763
|
+
* rsbuild config imports the plugin's package.json), so derive the same
|
|
764
|
+
* value here — an authored `ui.name` is only a fallback, and can never
|
|
765
|
+
* override what the container actually registers under.
|
|
766
|
+
*/
|
|
767
|
+
function resolveUiRuntimeName(uiConfig, localPath, apiName) {
|
|
768
|
+
if (localPath) {
|
|
769
|
+
const uiPkgPath = (0, node_path.join)(localPath, "package.json");
|
|
770
|
+
const pkgPath = (0, node_fs.existsSync)(uiPkgPath) ? uiPkgPath : (0, node_path.join)((0, node_path.dirname)(localPath), "package.json");
|
|
771
|
+
try {
|
|
772
|
+
const pkg = JSON.parse((0, node_fs.readFileSync)(pkgPath, "utf-8"));
|
|
773
|
+
if (typeof pkg.name === "string" && pkg.name.length > 0) return (0, every_plugin_ui_manifest_contract.sanitizeContainerName)(pkg.name);
|
|
774
|
+
} catch (e) {
|
|
775
|
+
console.warn(`[Config] Could not read package.json at ${pkgPath}: ${e}`);
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
return typeof uiConfig?.name === "string" ? uiConfig.name : `${apiName}-ui`;
|
|
779
|
+
}
|
|
553
780
|
function resolvePluginRuntimeName(explicitName, localPath, fallback) {
|
|
554
781
|
if (explicitName) return explicitName;
|
|
555
782
|
if (!localPath) return fallback;
|
|
@@ -595,7 +822,7 @@ function resolveRuntimeTarget(value, baseDir, defaultSource = "remote") {
|
|
|
595
822
|
};
|
|
596
823
|
if (value.startsWith(LOCAL_PREFIX)) {
|
|
597
824
|
const localTarget = value?.slice(6).trim();
|
|
598
|
-
if (!localTarget) throw new
|
|
825
|
+
if (!localTarget) throw new ConfigExtendsError({ message: `Invalid local development target: ${value}` });
|
|
599
826
|
const localPath = (0, node_path.resolve)(baseDir, localTarget);
|
|
600
827
|
if (!(0, node_fs.existsSync)(localPath)) return {
|
|
601
828
|
source: "local",
|
|
@@ -640,27 +867,39 @@ function parsePort(url) {
|
|
|
640
867
|
//#endregion
|
|
641
868
|
exports.BOS_CONFIG_ORDER = require_merge.BOS_CONFIG_ORDER;
|
|
642
869
|
exports.BosConfigSchema = require_types.BosConfigSchema;
|
|
870
|
+
exports.CircularExtendsError = CircularExtendsError;
|
|
871
|
+
exports.ConfigExtendsError = ConfigExtendsError;
|
|
872
|
+
exports.ConfigLoadError = ConfigLoadError;
|
|
873
|
+
exports.ConfigNotfoundError = ConfigNotfoundError;
|
|
874
|
+
exports.ConfigVersionManifestError = ConfigVersionManifestError;
|
|
875
|
+
exports.DEV_OVERLAY_FILENAME = DEV_OVERLAY_FILENAME;
|
|
876
|
+
exports.DevOverlayError = DevOverlayError;
|
|
877
|
+
exports.MISSING_CONFIG_MESSAGE = MISSING_CONFIG_MESSAGE;
|
|
643
878
|
exports.buildRuntimeConfig = buildRuntimeConfig;
|
|
879
|
+
exports.buildRuntimeConfigEffect = buildRuntimeConfigEffect;
|
|
644
880
|
exports.buildRuntimePluginsForConfig = buildRuntimePluginsForConfig;
|
|
645
|
-
exports.
|
|
646
|
-
exports.drainConfigWarnings = drainConfigWarnings;
|
|
881
|
+
exports.defaultConfigEnv = defaultConfigEnv;
|
|
647
882
|
exports.findConfigPath = findConfigPath;
|
|
648
|
-
exports.
|
|
883
|
+
exports.getConfigBaseDir = getConfigBaseDir;
|
|
649
884
|
exports.getHostDevelopmentPort = getHostDevelopmentPort;
|
|
650
|
-
exports.getProjectRoot = getProjectRoot;
|
|
651
885
|
exports.getResolvedConfigPath = getResolvedConfigPath;
|
|
886
|
+
exports.isAppDescriptorPath = isAppDescriptorPath;
|
|
652
887
|
exports.isLocalDevelopmentTarget = isLocalDevelopmentTarget;
|
|
653
888
|
exports.isRuntimeOverrideAllowed = isRuntimeOverrideAllowed;
|
|
654
|
-
exports.
|
|
889
|
+
exports.loadAppDescriptorConfig = loadAppDescriptorConfig;
|
|
655
890
|
exports.loadGeneratedResolvedConfig = loadGeneratedResolvedConfig;
|
|
656
|
-
exports.
|
|
657
|
-
exports.loadRemoteConfig = loadRemoteConfig;
|
|
658
|
-
exports.loadResolvedConfig = loadResolvedConfig;
|
|
891
|
+
exports.localConfigEntryPath = localConfigEntryPath;
|
|
659
892
|
exports.mergeBosConfigWithExtends = require_merge.mergeBosConfigWithExtends;
|
|
893
|
+
exports.parseAppDescriptorModule = parseAppDescriptorModule;
|
|
894
|
+
exports.parseDevOverlayModule = parseDevOverlayModule;
|
|
895
|
+
exports.parseExtendsTarget = parseExtendsTarget;
|
|
660
896
|
exports.parsePort = parsePort;
|
|
661
897
|
exports.parseRuntimeOverrideTargets = parseRuntimeOverrideTargets;
|
|
898
|
+
exports.readAuthoredConfigInput = readAuthoredConfigInput;
|
|
662
899
|
exports.readBosConfigForBuild = readBosConfigForBuild;
|
|
900
|
+
exports.readLocalAuthoredConfigInput = readLocalAuthoredConfigInput;
|
|
663
901
|
exports.rebuildOrderedConfig = require_merge.rebuildOrderedConfig;
|
|
902
|
+
exports.resetConfigPathCache = resetConfigPathCache;
|
|
664
903
|
exports.resolveBosConfigPath = resolveBosConfigPath;
|
|
665
904
|
exports.resolveComposableReference = resolveComposableReference;
|
|
666
905
|
exports.resolveConfigComposableEntries = resolveConfigComposableEntries;
|
|
@@ -668,7 +907,7 @@ exports.resolveDevelopmentHostUrl = resolveDevelopmentHostUrl;
|
|
|
668
907
|
exports.resolveExtendsRef = require_merge.resolveExtendsRef;
|
|
669
908
|
exports.resolveLocalDevelopmentPath = resolveLocalDevelopmentPath;
|
|
670
909
|
exports.resolvePluginRuntimeName = resolvePluginRuntimeName;
|
|
671
|
-
exports.
|
|
672
|
-
exports.
|
|
910
|
+
exports.resolveUiRuntimeName = resolveUiRuntimeName;
|
|
911
|
+
exports.runWithConfigWarningSink = runWithConfigWarningSink;
|
|
673
912
|
exports.writeResolvedConfig = writeResolvedConfig;
|
|
674
913
|
//# sourceMappingURL=config.cjs.map
|