everything-dev 2.0.0-rc.6 → 2.0.0-rc.7

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.
Files changed (116) hide show
  1. package/README.md +2 -2
  2. package/dist/build.cjs +1 -1
  3. package/dist/build.mjs +1 -1
  4. package/dist/bundle-cache.cjs +1 -1
  5. package/dist/bundle-cache.cjs.map +1 -1
  6. package/dist/bundle-cache.mjs +1 -1
  7. package/dist/bundle-cache.mjs.map +1 -1
  8. package/dist/cli.cjs +2 -2
  9. package/dist/cli.cjs.map +1 -1
  10. package/dist/cli.mjs +1 -1
  11. package/dist/cli.mjs.map +1 -1
  12. package/dist/commands/deploy.cjs +111 -1
  13. package/dist/commands/deploy.cjs.map +1 -1
  14. package/dist/commands/deploy.mjs +112 -2
  15. package/dist/commands/deploy.mjs.map +1 -1
  16. package/dist/commands/smoke.cjs +41 -0
  17. package/dist/commands/smoke.cjs.map +1 -0
  18. package/dist/commands/smoke.mjs +41 -0
  19. package/dist/commands/smoke.mjs.map +1 -0
  20. package/dist/commands/upgrade.cjs +2 -2
  21. package/dist/commands/upgrade.cjs.map +1 -1
  22. package/dist/commands/upgrade.mjs +1 -1
  23. package/dist/commands/upgrade.mjs.map +1 -1
  24. package/dist/contract.cjs +27 -1
  25. package/dist/contract.cjs.map +1 -1
  26. package/dist/contract.d.cts +65 -1
  27. package/dist/contract.d.mts +65 -1
  28. package/dist/contract.meta.cjs +13 -1
  29. package/dist/contract.meta.cjs.map +1 -1
  30. package/dist/contract.meta.d.cts +23 -1
  31. package/dist/contract.meta.d.mts +23 -1
  32. package/dist/contract.meta.mjs +13 -1
  33. package/dist/contract.meta.mjs.map +1 -1
  34. package/dist/contract.mjs +26 -2
  35. package/dist/contract.mjs.map +1 -1
  36. package/dist/dev-log-pipeline.cjs +6 -0
  37. package/dist/dev-log-pipeline.cjs.map +1 -1
  38. package/dist/dev-log-pipeline.mjs +6 -0
  39. package/dist/dev-log-pipeline.mjs.map +1 -1
  40. package/dist/dev-program.cjs +20 -3
  41. package/dist/dev-program.cjs.map +1 -1
  42. package/dist/dev-program.mjs +20 -4
  43. package/dist/dev-program.mjs.map +1 -1
  44. package/dist/dev-session.cjs +1 -0
  45. package/dist/dev-session.cjs.map +1 -1
  46. package/dist/dev-session.mjs +1 -0
  47. package/dist/dev-session.mjs.map +1 -1
  48. package/dist/fastkv.cjs +21 -3
  49. package/dist/fastkv.cjs.map +1 -1
  50. package/dist/fastkv.d.cts +14 -1
  51. package/dist/fastkv.d.mts +14 -1
  52. package/dist/fastkv.mjs +21 -5
  53. package/dist/fastkv.mjs.map +1 -1
  54. package/dist/{mf.cjs → federation.cjs} +6 -13
  55. package/dist/federation.cjs.map +1 -0
  56. package/dist/{mf.d.cts → federation.d.cts} +2 -2
  57. package/dist/{mf.d.mts → federation.d.mts} +2 -2
  58. package/dist/{mf.mjs → federation.mjs} +6 -13
  59. package/dist/federation.mjs.map +1 -0
  60. package/dist/http-client.cjs +70 -53
  61. package/dist/http-client.cjs.map +1 -1
  62. package/dist/http-client.mjs +70 -54
  63. package/dist/http-client.mjs.map +1 -1
  64. package/dist/image-deploy.cjs +9 -0
  65. package/dist/image-deploy.cjs.map +1 -1
  66. package/dist/image-deploy.mjs +9 -1
  67. package/dist/image-deploy.mjs.map +1 -1
  68. package/dist/index.cjs +4 -0
  69. package/dist/index.d.cts +3 -3
  70. package/dist/index.d.mts +3 -3
  71. package/dist/index.mjs +3 -3
  72. package/dist/orchestrator.cjs +39 -35
  73. package/dist/orchestrator.cjs.map +1 -1
  74. package/dist/orchestrator.mjs +39 -35
  75. package/dist/orchestrator.mjs.map +1 -1
  76. package/dist/plugin.cjs +2 -0
  77. package/dist/plugin.cjs.map +1 -1
  78. package/dist/plugin.d.cts +24 -0
  79. package/dist/plugin.d.mts +24 -0
  80. package/dist/plugin.mjs +2 -0
  81. package/dist/plugin.mjs.map +1 -1
  82. package/dist/process-registry.cjs +1 -1
  83. package/dist/process-registry.mjs +1 -1
  84. package/dist/publish.cjs +3 -3
  85. package/dist/publish.cjs.map +1 -1
  86. package/dist/publish.mjs +4 -4
  87. package/dist/publish.mjs.map +1 -1
  88. package/dist/resolver.cjs +293 -0
  89. package/dist/resolver.cjs.map +1 -0
  90. package/dist/resolver.d.cts +99 -0
  91. package/dist/resolver.d.mts +99 -0
  92. package/dist/resolver.mjs +284 -0
  93. package/dist/resolver.mjs.map +1 -0
  94. package/dist/smoke.cjs +262 -0
  95. package/dist/smoke.cjs.map +1 -0
  96. package/dist/smoke.mjs +260 -0
  97. package/dist/smoke.mjs.map +1 -0
  98. package/dist/version-manifest-resolve.cjs +3 -3
  99. package/dist/version-manifest-resolve.cjs.map +1 -1
  100. package/dist/version-manifest-resolve.mjs +1 -1
  101. package/dist/version-manifest-resolve.mjs.map +1 -1
  102. package/dist/workspace.cjs +1 -1
  103. package/dist/workspace.mjs +1 -1
  104. package/package.json +9 -9
  105. package/dist/bundle-fs-resolve.cjs +0 -235
  106. package/dist/bundle-fs-resolve.cjs.map +0 -1
  107. package/dist/bundle-fs-resolve.d.cts +0 -82
  108. package/dist/bundle-fs-resolve.d.mts +0 -82
  109. package/dist/bundle-fs-resolve.mjs +0 -228
  110. package/dist/bundle-fs-resolve.mjs.map +0 -1
  111. package/dist/bundle-path.cjs +0 -48
  112. package/dist/bundle-path.cjs.map +0 -1
  113. package/dist/bundle-path.mjs +0 -45
  114. package/dist/bundle-path.mjs.map +0 -1
  115. package/dist/mf.cjs.map +0 -1
  116. package/dist/mf.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"image-deploy.mjs","names":[],"sources":["../src/image-deploy.ts"],"sourcesContent":["import { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { run } from \"./utils/run\";\nimport { colors, icons } from \"./utils/theme\";\n\nexport interface ResolvedImageRef {\n image: string;\n source: \"ci\" | \"env\" | \"repository\";\n}\n\n/**\n * Image reference resolution precedence (ADR 0021): `ci.image` in\n * bos.config.json → `BOS_IMAGE` env → derived from `repository`.\n */\nexport function resolveImageRef(input: {\n ciImage?: string;\n repository?: string;\n env?: Record<string, string | undefined>;\n}): ResolvedImageRef | undefined {\n const envImage = input.env?.BOS_IMAGE;\n if (input.ciImage) return { image: input.ciImage, source: \"ci\" };\n if (envImage) return { image: envImage, source: \"env\" };\n\n const repo = input.repository\n ?.replace(/^https?:\\/\\/(www\\.)?github\\.com\\//i, \"\")\n .replace(/\\.git$/i, \"\")\n .replace(/\\/+$/, \"\")\n .toLowerCase();\n if (!repo?.includes(\"/\") || repo.split(\"/\").length !== 2) return undefined;\n return { image: `ghcr.io/${repo}`, source: \"repository\" };\n}\n\nexport async function hasDocker(): Promise<boolean> {\n try {\n const result = await run(\"docker\", [\"info\", \"--format\", \"{{.ServerVersion}}\"], {\n capture: true,\n });\n return result?.exitCode === 0;\n } catch {\n return false;\n }\n}\n\nfunction parseDigest(pushOutput: string): string | undefined {\n const match = pushOutput.match(/digest:\\s*(sha256:[a-f0-9]+)/i);\n return match?.[1];\n}\n\nconst SEMVER_PATTERN = /^(\\d+)\\.(\\d+)\\.(\\d+)(?:-([0-9A-Za-z.-]+))?$/;\n\n/**\n * The runtime framework version baked into the image is the workspace source's\n * `everything-dev` package version — the image builds from `configDir`, so that\n * file is the truth. Missing (child repos without the workspace) → undefined.\n */\nfunction readFrameworkVersion(configDir: string): string | undefined {\n try {\n const raw = readFileSync(\n join(configDir, \"packages\", \"everything-dev\", \"package.json\"),\n \"utf-8\",\n );\n const pkg = JSON.parse(raw) as { version?: unknown };\n return typeof pkg.version === \"string\" && SEMVER_PATTERN.test(pkg.version)\n ? pkg.version\n : undefined;\n } catch {\n return undefined;\n }\n}\n\nexport interface ImageTags {\n /** Exact refs to build and push, in push order (latest excluded). */\n tags: string[];\n /** Push `:latest` after the pinned tags. */\n pushLatest: boolean;\n /** Human-readable reason when `latest` is held. */\n latestHoldReason?: string;\n /** Push `:rc` after the pinned tags — the floating prerelease-train ref. */\n pushRc: boolean;\n}\n\n/**\n * Tag scheme (ADR 0021): `sha-<short>` always; the exact `v<version>` tag; a\n * floating major tag (`v2`) on stable releases only. `latest` is held during\n * prereleases (npm's `rc` dist-tag analog) so existing deployments pinned to\n * `:latest` keep serving the last stable image — and `:rc` is the floating\n * ref for the prerelease train (npm's `rc` dist-tag mirror): it moves on\n * every prerelease deploy and freezes at the last rc-train build once the\n * workspace releases a stable version.\n */\nexport function computeImageTags(input: { shortSha: string; version?: string }): ImageTags {\n const tags = [`sha-${input.shortSha}`];\n const match = input.version?.trim().match(SEMVER_PATTERN);\n if (!match) {\n return { tags, pushLatest: true, pushRc: false };\n }\n const [, major, minor, patch, prerelease] = match;\n const exact = prerelease\n ? `v${major}.${minor}.${patch}-${prerelease}`\n : `v${major}.${minor}.${patch}`;\n if (prerelease) {\n return {\n tags: [...tags, exact],\n pushLatest: false,\n latestHoldReason: `${exact} is a prerelease — :latest still serves the last stable image`,\n pushRc: true,\n };\n }\n return { tags: [...tags, exact, `v${major}`], pushLatest: true, pushRc: false };\n}\n\nexport interface ImageDeployResult {\n image: string;\n /** Primary pinned tag (the sha tag). */\n tag: string;\n /** All tags pushed, including the primary. */\n tags: string[];\n latestPushed: boolean;\n /** Whether the floating `:rc` prerelease-train ref was pushed. */\n rcPushed: boolean;\n digest?: string;\n}\n\nexport type DeployImagePlan =\n | { kind: \"prebuilt\"; image: string; digest: string }\n | { kind: \"build\"; image: string }\n | { kind: \"skip\"; reason: string };\n\nconst DIGEST_PATTERN = /^sha256:[a-f0-9]{64}$/;\n\n/** A Railway pin is `FROM image@<digest>` — anything else cannot resolve. */\nexport function isValidImageDigest(digest: string): boolean {\n return DIGEST_PATTERN.test(digest);\n}\n\n/**\n * Decide the image leg's source: a digest handed over from a pre-pushed image\n * (the CI image job) wins; otherwise the local docker build runs when the\n * toolchain and Dockerfile are present (ADR 0021, as amended).\n */\nexport function resolveDeployImagePlan(input: {\n imageRef: ResolvedImageRef | undefined;\n imageDigest?: string;\n hasDocker: boolean;\n hasDockerfile: boolean;\n}): DeployImagePlan {\n if (!input.imageRef) {\n return {\n kind: \"skip\",\n reason: \"set ci.image in bos.config.json (or BOS_IMAGE) to build and push the runtime image\",\n };\n }\n if (input.imageDigest) {\n return { kind: \"prebuilt\", image: input.imageRef.image, digest: input.imageDigest };\n }\n if (!input.hasDocker) {\n return { kind: \"skip\", reason: \"docker is not available\" };\n }\n if (!input.hasDockerfile) {\n return { kind: \"skip\", reason: \"no Dockerfile at the config root\" };\n }\n return { kind: \"build\", image: input.imageRef.image };\n}\n\n/**\n * Image leg (ADR 0021): build the runtime stage, tag `sha-<short>` + version\n * tags, push them, capture the digest, then push the floating refs — `:latest`\n * unless the version is a prerelease, and `:rc` when it is. Callers skip the\n * leg with a notice when no image is configured (child repos get\n * build+upload+publish only).\n */\nexport async function buildAndPushImage(input: {\n image: string;\n configDir: string;\n verbose?: boolean;\n}): Promise<ImageDeployResult> {\n const shaResult = await run(\"git\", [\"rev-parse\", \"--short=7\", \"HEAD\"], {\n cwd: input.configDir,\n capture: true,\n });\n const shortSha = shaResult?.stdout.trim();\n if (!shaResult || shaResult.exitCode !== 0 || !shortSha) {\n const detail = shaResult?.stderr.trim();\n throw new Error(\n `Failed to resolve the current git SHA in ${input.configDir} (exit code ${shaResult?.exitCode ?? \"unknown\"}${detail ? `: ${detail}` : \"\"})`,\n );\n }\n\n const version = readFrameworkVersion(input.configDir);\n const { tags, pushLatest, latestHoldReason, pushRc } = computeImageTags({\n shortSha,\n version,\n });\n const refs = tags.map((tag) => `${input.image}:${tag}`);\n const latestRef = `${input.image}:latest`;\n const rcRef = `${input.image}:rc`;\n const buildRefs = pushLatest ? [...refs, latestRef] : [...refs];\n if (pushRc) buildRefs.push(rcRef);\n\n console.log(\n ` Building runtime image ${colors.cyan(buildRefs.join(\", \"))}${pushLatest ? \"\" : colors.yellow(\" (latest held)\")}`,\n );\n await run(\n \"docker\",\n [\"build\", \"--target\", \"runtime\", ...buildRefs.flatMap((ref) => [\"-t\", ref]), \".\"],\n { cwd: input.configDir },\n );\n\n console.log(` Pushing ${colors.cyan(refs.join(\", \"))}...`);\n let digest: string | undefined;\n for (const ref of refs) {\n const push = await run(\"docker\", [\"push\", ref], {\n cwd: input.configDir,\n capture: true,\n });\n if (!push || push.exitCode !== 0) {\n throw new Error(`docker push ${ref} failed with exit code ${push?.exitCode ?? \"unknown\"}`);\n }\n digest ??= parseDigest(push.stdout);\n if (input.verbose && push.stdout.trim()) {\n console.log(colors.dim(push.stdout.trim()));\n }\n }\n\n const pushFloating = async (ref: string): Promise<boolean> => {\n const push = await run(\"docker\", [\"push\", ref], {\n cwd: input.configDir,\n capture: true,\n });\n if (!push || push.exitCode !== 0) {\n throw new Error(`docker push ${ref} failed with exit code ${push?.exitCode ?? \"unknown\"}`);\n }\n digest ??= parseDigest(push.stdout);\n if (input.verbose && push.stdout.trim()) {\n console.log(colors.dim(push.stdout.trim()));\n }\n return true;\n };\n\n let latestPushed = false;\n if (pushLatest) {\n latestPushed = await pushFloating(latestRef);\n } else {\n console.log(colors.yellow(` latest held: ${latestHoldReason}`));\n }\n const rcPushed = pushRc ? await pushFloating(rcRef) : false;\n\n if (!digest) {\n console.log(colors.yellow(\" Could not capture the image digest from push output\"));\n }\n\n return { image: input.image, tag: tags[0]!, tags, latestPushed, rcPushed, digest };\n}\n\n/**\n * Railway leg (ADR 0021, amended): image-backed deploy. The service's source\n * is a Docker image ref (connected once in the dashboard — `:rc` during the\n * prerelease train), and `redeploy --from-source` pulls and deploys whatever\n * that ref points at. The image leg pushes `:rc` (and the `sha-<short>` /\n * version tags) immediately before this step, so the pulled bytes are exactly\n * what this train validated. Railway skips the build entirely for\n * Docker-image sources — nothing is uploaded, nothing is built on Railway,\n * and the digest-pin Dockerfile mechanism this replaces is gone (the CLI v5\n * dropped RAILWAY_DOCKERFILE_PATH, its snapshot respects .gitignore so\n * generated Dockerfiles never shipped, and its Metal builder rejected the\n * repo Dockerfile's cache-mount ids).\n */\nexport async function deployImageToRailway(input: {\n service: string;\n configDir: string;\n}): Promise<void> {\n console.log(` Deploying to Railway service ${colors.cyan(input.service)} (image-backed)...`);\n // The probe is authoritative: runners don't ship the CLI, and a spawn\n // failure resolves (reject:false) as exitCode 1 with empty output — the\n // 2026-10-13 deploy surfaced exactly that as a silent instant failure.\n let version: string | undefined;\n try {\n version = (await run(\"railway\", [\"--version\"], { cwd: input.configDir, capture: true }))\n ?.stdout;\n } catch {\n version = undefined;\n }\n if (!version?.trim()) {\n throw new Error(\"Railway CLI not found. Install it: npm i -g @railway/cli\");\n }\n console.log(` ${colors.dim(`railway ${version.trim()}`)}`);\n\n // Stream the CLI's output live — a silent exit (empty stdout+stderr, seen\n // on the 2026-10-13 deploy) must still be diagnosable from the workflow log.\n const collected = { stdout: \"\", stderr: \"\" };\n const result = await run(\n \"railway\",\n [\"redeploy\", \"--service\", input.service, \"--from-source\", \"--yes\"],\n {\n cwd: input.configDir,\n capture: true,\n onChunk: (stream, chunk) => {\n collected[stream] += chunk.toString(\"utf-8\");\n for (const line of chunk.toString(\"utf-8\").split(\"\\n\")) {\n if (line.trim()) console.log(` ${colors.dim(line.trim())}`);\n }\n },\n },\n );\n if (!result || result.exitCode !== 0) {\n const exitCode = result?.exitCode ?? \"unknown\";\n const tail = (stream: string, text: string) =>\n text.trim()\n ? `\\nrailway ${stream} (tail):\\n${text.trim().split(\"\\n\").slice(-20).join(\"\\n\")}`\n : \"\";\n throw new Error(\n `railway redeploy failed with exit code ${exitCode}` +\n tail(\"stdout\", collected.stdout) +\n tail(\"stderr\", collected.stderr),\n );\n }\n console.log(colors.green(` ${icons.ok} Railway deploy complete`));\n}\n"],"mappings":";;;;;;;;;;AAcA,SAAgB,gBAAgB,OAIC;CAC/B,MAAM,WAAW,MAAM,KAAK;CAC5B,IAAI,MAAM,SAAS,OAAO;EAAE,OAAO,MAAM;EAAS,QAAQ;CAAK;CAC/D,IAAI,UAAU,OAAO;EAAE,OAAO;EAAU,QAAQ;CAAM;CAEtD,MAAM,OAAO,MAAM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,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,MAC5E;EACN,MAAM,IAAI,MACR,0CAA0C,aACxC,KAAK,UAAU,UAAU,MAAM,IAC/B,KAAK,UAAU,UAAU,MAAM,CACnC;CACF;CACA,QAAQ,IAAI,OAAO,MAAM,KAAK,MAAM,GAAG,yBAAyB,CAAC;AACnE"}
1
+ {"version":3,"file":"image-deploy.mjs","names":[],"sources":["../src/image-deploy.ts"],"sourcesContent":["import { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { run } from \"./utils/run\";\nimport { colors, icons } from \"./utils/theme\";\n\nexport interface ResolvedImageRef {\n image: string;\n source: \"ci\" | \"env\" | \"repository\";\n}\n\n/**\n * Image reference resolution precedence (ADR 0021): `ci.image` in\n * bos.config.json → `BOS_IMAGE` env → derived from `repository`.\n */\nexport function resolveImageRef(input: {\n ciImage?: string;\n repository?: string;\n env?: Record<string, string | undefined>;\n}): ResolvedImageRef | undefined {\n const envImage = input.env?.BOS_IMAGE;\n if (input.ciImage) return { image: input.ciImage, source: \"ci\" };\n if (envImage) return { image: envImage, source: \"env\" };\n\n const repo = input.repository\n ?.replace(/^https?:\\/\\/(www\\.)?github\\.com\\//i, \"\")\n .replace(/\\.git$/i, \"\")\n .replace(/\\/+$/, \"\")\n .toLowerCase();\n if (!repo?.includes(\"/\") || repo.split(\"/\").length !== 2) return undefined;\n return { image: `ghcr.io/${repo}`, source: \"repository\" };\n}\n\n/** Compose the runnable image ref: `image@sha256:…` when a digest exists,\n * `image` alone otherwise. Never docker-run the bare ref in a deploy flow —\n * the implicit `:latest` is held to the last stable release during\n * prereleases (ADR 0021), which boots a different framework build than the\n * one this train pinned. */\nexport function imageRefWithDigest(image: string, digest?: string): string {\n return digest ? `${image}@${digest}` : image;\n}\n\nexport async function hasDocker(): Promise<boolean> {\n try {\n const result = await run(\"docker\", [\"info\", \"--format\", \"{{.ServerVersion}}\"], {\n capture: true,\n });\n return result?.exitCode === 0;\n } catch {\n return false;\n }\n}\n\nfunction parseDigest(pushOutput: string): string | undefined {\n const match = pushOutput.match(/digest:\\s*(sha256:[a-f0-9]+)/i);\n return match?.[1];\n}\n\nconst SEMVER_PATTERN = /^(\\d+)\\.(\\d+)\\.(\\d+)(?:-([0-9A-Za-z.-]+))?$/;\n\n/**\n * The runtime framework version baked into the image is the workspace source's\n * `everything-dev` package version — the image builds from `configDir`, so that\n * file is the truth. Missing (child repos without the workspace) → undefined.\n */\nfunction readFrameworkVersion(configDir: string): string | undefined {\n try {\n const raw = readFileSync(\n join(configDir, \"packages\", \"everything-dev\", \"package.json\"),\n \"utf-8\",\n );\n const pkg = JSON.parse(raw) as { version?: unknown };\n return typeof pkg.version === \"string\" && SEMVER_PATTERN.test(pkg.version)\n ? pkg.version\n : undefined;\n } catch {\n return undefined;\n }\n}\n\nexport interface ImageTags {\n /** Exact refs to build and push, in push order (latest excluded). */\n tags: string[];\n /** Push `:latest` after the pinned tags. */\n pushLatest: boolean;\n /** Human-readable reason when `latest` is held. */\n latestHoldReason?: string;\n /** Push `:rc` after the pinned tags — the floating prerelease-train ref. */\n pushRc: boolean;\n}\n\n/**\n * Tag scheme (ADR 0021): `sha-<short>` always; the exact `v<version>` tag; a\n * floating major tag (`v2`) on stable releases only. `latest` is held during\n * prereleases (npm's `rc` dist-tag analog) so existing deployments pinned to\n * `:latest` keep serving the last stable image — and `:rc` is the floating\n * ref for the prerelease train (npm's `rc` dist-tag mirror): it moves on\n * every prerelease deploy and freezes at the last rc-train build once the\n * workspace releases a stable version.\n */\nexport function computeImageTags(input: { shortSha: string; version?: string }): ImageTags {\n const tags = [`sha-${input.shortSha}`];\n const match = input.version?.trim().match(SEMVER_PATTERN);\n if (!match) {\n return { tags, pushLatest: true, pushRc: false };\n }\n const [, major, minor, patch, prerelease] = match;\n const exact = prerelease\n ? `v${major}.${minor}.${patch}-${prerelease}`\n : `v${major}.${minor}.${patch}`;\n if (prerelease) {\n return {\n tags: [...tags, exact],\n pushLatest: false,\n latestHoldReason: `${exact} is a prerelease — :latest still serves the last stable image`,\n pushRc: true,\n };\n }\n return { tags: [...tags, exact, `v${major}`], pushLatest: true, pushRc: false };\n}\n\nexport interface ImageDeployResult {\n image: string;\n /** Primary pinned tag (the sha tag). */\n tag: string;\n /** All tags pushed, including the primary. */\n tags: string[];\n latestPushed: boolean;\n /** Whether the floating `:rc` prerelease-train ref was pushed. */\n rcPushed: boolean;\n digest?: string;\n}\n\nexport type DeployImagePlan =\n | { kind: \"prebuilt\"; image: string; digest: string }\n | { kind: \"build\"; image: string }\n | { kind: \"skip\"; reason: string };\n\nconst DIGEST_PATTERN = /^sha256:[a-f0-9]{64}$/;\n\n/** A Railway pin is `FROM image@<digest>` — anything else cannot resolve. */\nexport function isValidImageDigest(digest: string): boolean {\n return DIGEST_PATTERN.test(digest);\n}\n\n/**\n * Decide the image leg's source: a digest handed over from a pre-pushed image\n * (the CI image job) wins; otherwise the local docker build runs when the\n * toolchain and Dockerfile are present (ADR 0021, as amended).\n */\nexport function resolveDeployImagePlan(input: {\n imageRef: ResolvedImageRef | undefined;\n imageDigest?: string;\n hasDocker: boolean;\n hasDockerfile: boolean;\n}): DeployImagePlan {\n if (!input.imageRef) {\n return {\n kind: \"skip\",\n reason: \"set ci.image in bos.config.json (or BOS_IMAGE) to build and push the runtime image\",\n };\n }\n if (input.imageDigest) {\n return { kind: \"prebuilt\", image: input.imageRef.image, digest: input.imageDigest };\n }\n if (!input.hasDocker) {\n return { kind: \"skip\", reason: \"docker is not available\" };\n }\n if (!input.hasDockerfile) {\n return { kind: \"skip\", reason: \"no Dockerfile at the config root\" };\n }\n return { kind: \"build\", image: input.imageRef.image };\n}\n\n/**\n * Image leg (ADR 0021): build the runtime stage, tag `sha-<short>` + version\n * tags, push them, capture the digest, then push the floating refs — `:latest`\n * unless the version is a prerelease, and `:rc` when it is. Callers skip the\n * leg with a notice when no image is configured (child repos get\n * build+upload+publish only).\n */\nexport async function buildAndPushImage(input: {\n image: string;\n configDir: string;\n verbose?: boolean;\n}): Promise<ImageDeployResult> {\n const shaResult = await run(\"git\", [\"rev-parse\", \"--short=7\", \"HEAD\"], {\n cwd: input.configDir,\n capture: true,\n });\n const shortSha = shaResult?.stdout.trim();\n if (!shaResult || shaResult.exitCode !== 0 || !shortSha) {\n const detail = shaResult?.stderr.trim();\n throw new Error(\n `Failed to resolve the current git SHA in ${input.configDir} (exit code ${shaResult?.exitCode ?? \"unknown\"}${detail ? `: ${detail}` : \"\"})`,\n );\n }\n\n const version = readFrameworkVersion(input.configDir);\n const { tags, pushLatest, latestHoldReason, pushRc } = computeImageTags({\n shortSha,\n version,\n });\n const refs = tags.map((tag) => `${input.image}:${tag}`);\n const latestRef = `${input.image}:latest`;\n const rcRef = `${input.image}:rc`;\n const buildRefs = pushLatest ? [...refs, latestRef] : [...refs];\n if (pushRc) buildRefs.push(rcRef);\n\n console.log(\n ` Building runtime image ${colors.cyan(buildRefs.join(\", \"))}${pushLatest ? \"\" : colors.yellow(\" (latest held)\")}`,\n );\n await run(\n \"docker\",\n [\"build\", \"--target\", \"runtime\", ...buildRefs.flatMap((ref) => [\"-t\", ref]), \".\"],\n { cwd: input.configDir },\n );\n\n console.log(` Pushing ${colors.cyan(refs.join(\", \"))}...`);\n let digest: string | undefined;\n for (const ref of refs) {\n const push = await run(\"docker\", [\"push\", ref], {\n cwd: input.configDir,\n capture: true,\n });\n if (!push || push.exitCode !== 0) {\n throw new Error(`docker push ${ref} failed with exit code ${push?.exitCode ?? \"unknown\"}`);\n }\n digest ??= parseDigest(push.stdout);\n if (input.verbose && push.stdout.trim()) {\n console.log(colors.dim(push.stdout.trim()));\n }\n }\n\n const pushFloating = async (ref: string): Promise<boolean> => {\n const push = await run(\"docker\", [\"push\", ref], {\n cwd: input.configDir,\n capture: true,\n });\n if (!push || push.exitCode !== 0) {\n throw new Error(`docker push ${ref} failed with exit code ${push?.exitCode ?? \"unknown\"}`);\n }\n digest ??= parseDigest(push.stdout);\n if (input.verbose && push.stdout.trim()) {\n console.log(colors.dim(push.stdout.trim()));\n }\n return true;\n };\n\n let latestPushed = false;\n if (pushLatest) {\n latestPushed = await pushFloating(latestRef);\n } else {\n console.log(colors.yellow(` latest held: ${latestHoldReason}`));\n }\n const rcPushed = pushRc ? await pushFloating(rcRef) : false;\n\n if (!digest) {\n console.log(colors.yellow(\" Could not capture the image digest from push output\"));\n }\n\n return { image: input.image, tag: tags[0]!, tags, latestPushed, rcPushed, digest };\n}\n\n/**\n * Railway leg (ADR 0021, amended): image-backed deploy. The service's source\n * is a Docker image ref (connected once in the dashboard — `:rc` during the\n * prerelease train), and `redeploy --from-source` pulls and deploys whatever\n * that ref points at. The image leg pushes `:rc` (and the `sha-<short>` /\n * version tags) immediately before this step, so the pulled bytes are exactly\n * what this train validated. Railway skips the build entirely for\n * Docker-image sources — nothing is uploaded, nothing is built on Railway,\n * and the digest-pin Dockerfile mechanism this replaces is gone (the CLI v5\n * dropped RAILWAY_DOCKERFILE_PATH, its snapshot respects .gitignore so\n * generated Dockerfiles never shipped, and its Metal builder rejected the\n * repo Dockerfile's cache-mount ids).\n */\nexport async function deployImageToRailway(input: {\n service: string;\n configDir: string;\n}): Promise<void> {\n console.log(` Deploying to Railway service ${colors.cyan(input.service)} (image-backed)...`);\n // The probe is authoritative: runners don't ship the CLI, and a spawn\n // failure resolves (reject:false) as exitCode 1 with empty output — the\n // 2026-10-13 deploy surfaced exactly that as a silent instant failure.\n let version: string | undefined;\n try {\n version = (await run(\"railway\", [\"--version\"], { cwd: input.configDir, capture: true }))\n ?.stdout;\n } catch {\n version = undefined;\n }\n if (!version?.trim()) {\n throw new Error(\"Railway CLI not found. Install it: npm i -g @railway/cli\");\n }\n console.log(` ${colors.dim(`railway ${version.trim()}`)}`);\n\n // Stream the CLI's output live — a silent exit (empty stdout+stderr, seen\n // on the 2026-10-13 deploy) must still be diagnosable from the workflow log.\n const collected = { stdout: \"\", stderr: \"\" };\n const result = await run(\n \"railway\",\n [\"redeploy\", \"--service\", input.service, \"--from-source\", \"--yes\"],\n {\n cwd: input.configDir,\n capture: true,\n onChunk: (stream, chunk) => {\n collected[stream] += chunk.toString(\"utf-8\");\n for (const line of chunk.toString(\"utf-8\").split(\"\\n\")) {\n if (line.trim()) console.log(` ${colors.dim(line.trim())}`);\n }\n },\n },\n );\n if (!result || result.exitCode !== 0) {\n const exitCode = result?.exitCode ?? \"unknown\";\n const tail = (stream: string, text: string) =>\n text.trim()\n ? `\\nrailway ${stream} (tail):\\n${text.trim().split(\"\\n\").slice(-20).join(\"\\n\")}`\n : \"\";\n throw new Error(\n `railway redeploy failed with exit code ${exitCode}` +\n tail(\"stdout\", collected.stdout) +\n tail(\"stderr\", collected.stderr),\n );\n }\n console.log(colors.green(` ${icons.ok} Railway deploy complete`));\n}\n"],"mappings":";;;;;;;;;;AAcA,SAAgB,gBAAgB,OAIC;CAC/B,MAAM,WAAW,MAAM,KAAK;CAC5B,IAAI,MAAM,SAAS,OAAO;EAAE,OAAO,MAAM;EAAS,QAAQ;CAAK;CAC/D,IAAI,UAAU,OAAO;EAAE,OAAO;EAAU,QAAQ;CAAM;CAEtD,MAAM,OAAO,MAAM,YACf,QAAQ,sCAAsC,EAAE,CAAC,CAClD,QAAQ,WAAW,EAAE,CAAC,CACtB,QAAQ,QAAQ,EAAE,CAAC,CACnB,YAAY;CACf,IAAI,CAAC,MAAM,SAAS,GAAG,KAAK,KAAK,MAAM,GAAG,CAAC,CAAC,WAAW,GAAG,OAAO;CACjE,OAAO;EAAE,OAAO,WAAW;EAAQ,QAAQ;CAAa;AAC1D;;;;;;AAOA,SAAgB,mBAAmB,OAAe,QAAyB;CACzE,OAAO,SAAS,GAAG,MAAM,GAAG,WAAW;AACzC;AAEA,eAAsB,YAA8B;CAClD,IAAI;EAIF,QAAO,MAHc,IAAI,UAAU;GAAC;GAAQ;GAAY;EAAoB,GAAG,EAC7E,SAAS,KACX,CAAC,EACY,EAAE,aAAa;CAC9B,QAAQ;EACN,OAAO;CACT;AACF;AAEA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,CAAC,WAAW,GAAG;GAAE,KAAK,MAAM;GAAW,SAAS;EAAK,CAAC,EAAC,EACnF;CACN,QAAQ;EACN,UAAU;CACZ;CACA,IAAI,CAAC,SAAS,KAAK,GACjB,MAAM,IAAI,MAAM,0DAA0D;CAE5E,QAAQ,IAAI,KAAK,OAAO,IAAI,WAAW,QAAQ,KAAK,GAAG,GAAG;CAI1D,MAAM,YAAY;EAAE,QAAQ;EAAI,QAAQ;CAAG;CAC3C,MAAM,SAAS,MAAM,IACnB,WACA;EAAC;EAAY;EAAa,MAAM;EAAS;EAAiB;CAAO,GACjE;EACE,KAAK,MAAM;EACX,SAAS;EACT,UAAU,QAAQ,UAAU;GAC1B,UAAU,WAAW,MAAM,SAAS,OAAO;GAC3C,KAAK,MAAM,QAAQ,MAAM,SAAS,OAAO,CAAC,CAAC,MAAM,IAAI,GACnD,IAAI,KAAK,KAAK,GAAG,QAAQ,IAAI,KAAK,OAAO,IAAI,KAAK,KAAK,CAAC,GAAG;EAE/D;CACF,CACF;CACA,IAAI,CAAC,UAAU,OAAO,aAAa,GAAG;EACpC,MAAM,WAAW,QAAQ,YAAY;EACrC,MAAM,QAAQ,QAAgB,SAC5B,KAAK,KAAK,IACN,aAAa,OAAO,YAAY,KAAK,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,MAC5E;EACN,MAAM,IAAI,MACR,0CAA0C,aACxC,KAAK,UAAU,UAAU,MAAM,IAC/B,KAAK,UAAU,UAAU,MAAM,CACnC;CACF;CACA,QAAQ,IAAI,OAAO,MAAM,KAAK,MAAM,GAAG,yBAAyB,CAAC;AACnE"}
package/dist/index.cjs CHANGED
@@ -135,6 +135,8 @@ exports.SharedConfigSchema = require_types.SharedConfigSchema;
135
135
  exports.SharedDepConfigSchema = require_types.SharedDepConfigSchema;
136
136
  exports.SharedDepMapSchema = require_types.SharedDepMapSchema;
137
137
  exports.SlotPinSchema = require_types.SlotPinSchema;
138
+ exports.SmokeOptionsSchema = require_contract.SmokeOptionsSchema;
139
+ exports.SmokeResultSchema = require_contract.SmokeResultSchema;
138
140
  exports.SourceModeSchema = require_types.SourceModeSchema;
139
141
  exports.StartOptionsSchema = require_contract.StartOptionsSchema;
140
142
  exports.StartResultSchema = require_contract.StartResultSchema;
@@ -176,6 +178,7 @@ exports.defaultConfigEnv = require_config.defaultConfigEnv;
176
178
  exports.fetchBosConfigFromFastKv = require_fastkv.fetchBosConfigFromFastKv;
177
179
  exports.fetchConfigHistory = require_fastkv.fetchConfigHistory;
178
180
  exports.fetchDeployManifests = require_fastkv.fetchDeployManifests;
181
+ exports.fetchPublishedConfigFromFastKv = require_fastkv.fetchPublishedConfigFromFastKv;
179
182
  exports.fetchRemotePluginManifest = require_fastkv.fetchRemotePluginManifest;
180
183
  exports.findConfigPath = require_config.findConfigPath;
181
184
  exports.getConfigBaseDir = require_config.getConfigBaseDir;
@@ -202,6 +205,7 @@ exports.parseAppDescriptorModule = require_config.parseAppDescriptorModule;
202
205
  exports.parseBosUrl = require_fastkv.parseBosUrl;
203
206
  exports.parseDevOverlayModule = require_config.parseDevOverlayModule;
204
207
  exports.parseExtendsTarget = require_config.parseExtendsTarget;
208
+ exports.parseFastKvConfigValue = require_fastkv.parseFastKvConfigValue;
205
209
  exports.parsePort = require_config.parsePort;
206
210
  exports.parseRuntimeOverrideTargets = require_config.parseRuntimeOverrideTargets;
207
211
  exports.readAuthoredConfigInput = require_config.readAuthoredConfigInput;
package/dist/index.d.cts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { ApiPluginConfig, ApiPluginConfigSchema, BosConfig, BosConfigInput, BosConfigInputAppEntry, BosConfigInputSchema, BosConfigSchema, BosPluginRef, BosPluginRefSchema, BosStaging, BosStagingSchema, CdnConfig, CdnConfigSchema, CiConfig, CiConfigSchema, ClientRuntimeConfig, ClientRuntimeConfigSchema, ClientRuntimeInfo, ClientRuntimeInfoSchema, ComposableAppEntry, ComposableAppEntrySchema, DependencyNodeKind, DependencyNodeKindSchema, Extends, ExtendsConfig, ExtendsSchema, FederationEntry, FederationEntrySchema, HostConfig, HostConfigSchema, JsonObject, JsonObjectSchema, JsonPrimitive, JsonValue, JsonValueSchema, ParentStarterConfig, ParentStarterConfigSchema, PluginEntries, PluginEntryValue, PluginRuntimeUi, PluginUiConfig, PluginUiConfigSchema, PublishAuth, PublishAuthSchema, PublishConfig, PublishConfigSchema, RailwayCi, RailwayCiSchema, RuntimeConfig, RuntimeConfigSchema, RuntimeDependencyNode, RuntimeDependencyNodeSchema, RuntimeLineage, RuntimeLineageSchema, RuntimePluginConfig, RuntimePluginConfigSchema, SharedConfig, SharedConfigSchema, SharedDepConfig, SharedDepConfigSchema, SharedDepMapSchema, SlotPin, SlotPinSchema, SourceMode, SourceModeSchema, StarterLevel, StarterLevelConfig, StarterLevelConfigSchema, StarterLevelSchema, UiConfig, UiConfigSchema } from "./types.cjs";
2
- import { BosConfigResult, BuildOptions, BuildOptionsSchema, BuildResultSchema, ConfigOptionsSchema, ConfigResultSchema, DbDoctorOptions, DbDoctorOptionsSchema, DbDoctorResult, DbDoctorResultSchema, DbRepairOptions, DbRepairOptionsSchema, DbRepairResult, DbRepairResultSchema, DbStudioOptions, DbStudioOptionsSchema, DbStudioResult, DbStudioResultSchema, DeployManifestListEntrySchema, DeployOptions, DeployOptionsSchema, DeployResult, DeployResultSchema, DeployedVersionStatusSchema, DevOptions, DevOptionsSchema, DevResult, DevResultSchema, InfraExportOptions, InfraExportOptionsSchema, InfraExportResult, InfraExportResultSchema, InfraExportService, InfraExportServiceSchema, InitOptions, InitOptionsSchema, InitResult, InitResultSchema, KeyPublishOptions, KeyPublishOptionsSchema, KeyPublishResult, KeyPublishResultSchema, KillOptions, KillOptionsSchema, KillResult, KillResultSchema, LoginOptions, LoginOptionsSchema, LoginResult, LoginResultSchema, LogoutOptions, LogoutOptionsSchema, LogoutResult, LogoutResultSchema, LogsOptions, LogsOptionsSchema, LogsResult, LogsResultSchema, MfCheckOptions, MfCheckOptionsSchema, MfCheckRemoteResultSchema, MfCheckResult, MfCheckResultSchema, OverrideSection, OverrideSectionSchema, PhaseTiming, PhaseTimingSchema, PidEntry, PidEntrySchema, PluginAddOptions, PluginAddOptionsSchema, PluginAddResult, PluginAddResultSchema, PluginListResult, PluginListResultSchema, PluginPublishOptions, PluginPublishOptionsSchema, PluginPublishResult, PluginPublishResultSchema, PluginRemoveOptions, PluginRemoveOptionsSchema, PluginRemoveResult, PluginRemoveResultSchema, ProcessRole, ProcessRoleSchema, PsResult, PsResultSchema, PublishOptions, PublishOptionsSchema, PublishResult, PublishResultSchema, RegistryUseOptionsSchema, RegistryUseResultSchema, RollbackHistoryEntrySchema, RollbackOptionsSchema, RollbackResultSchema, RollbackSlotCheckSchema, RuntimeOverrideTarget, RuntimeOverrideTargetBaseSchema, RuntimeOverrideTargetSchema, StartOptions, StartOptionsSchema, StartResult, StartResultSchema, StatusResult, StatusResultSchema, SyncOptions, SyncOptionsSchema, SyncResult, SyncResultSchema, TypecheckOptions, TypecheckOptionsSchema, TypecheckResult, TypecheckResultSchema, TypecheckWorkspaceResult, TypecheckWorkspaceResultSchema, TypesGenOptions, TypesGenOptionsSchema, TypesGenResult, TypesGenResultSchema, UpgradeOptions, UpgradeOptionsSchema, UpgradeResult, UpgradeResultSchema, WorkspaceDeployResult, WorkspaceDeployResultSchema, bosContract, commandOptionSchemas } from "./contract.cjs";
2
+ import { BosConfigResult, BuildOptions, BuildOptionsSchema, BuildResultSchema, ConfigOptionsSchema, ConfigResultSchema, DbDoctorOptions, DbDoctorOptionsSchema, DbDoctorResult, DbDoctorResultSchema, DbRepairOptions, DbRepairOptionsSchema, DbRepairResult, DbRepairResultSchema, DbStudioOptions, DbStudioOptionsSchema, DbStudioResult, DbStudioResultSchema, DeployManifestListEntrySchema, DeployOptions, DeployOptionsSchema, DeployResult, DeployResultSchema, DeployedVersionStatusSchema, DevOptions, DevOptionsSchema, DevResult, DevResultSchema, InfraExportOptions, InfraExportOptionsSchema, InfraExportResult, InfraExportResultSchema, InfraExportService, InfraExportServiceSchema, InitOptions, InitOptionsSchema, InitResult, InitResultSchema, KeyPublishOptions, KeyPublishOptionsSchema, KeyPublishResult, KeyPublishResultSchema, KillOptions, KillOptionsSchema, KillResult, KillResultSchema, LoginOptions, LoginOptionsSchema, LoginResult, LoginResultSchema, LogoutOptions, LogoutOptionsSchema, LogoutResult, LogoutResultSchema, LogsOptions, LogsOptionsSchema, LogsResult, LogsResultSchema, MfCheckOptions, MfCheckOptionsSchema, MfCheckRemoteResultSchema, MfCheckResult, MfCheckResultSchema, OverrideSection, OverrideSectionSchema, PhaseTiming, PhaseTimingSchema, PidEntry, PidEntrySchema, PluginAddOptions, PluginAddOptionsSchema, PluginAddResult, PluginAddResultSchema, PluginListResult, PluginListResultSchema, PluginPublishOptions, PluginPublishOptionsSchema, PluginPublishResult, PluginPublishResultSchema, PluginRemoveOptions, PluginRemoveOptionsSchema, PluginRemoveResult, PluginRemoveResultSchema, ProcessRole, ProcessRoleSchema, PsResult, PsResultSchema, PublishOptions, PublishOptionsSchema, PublishResult, PublishResultSchema, RegistryUseOptionsSchema, RegistryUseResultSchema, RollbackHistoryEntrySchema, RollbackOptionsSchema, RollbackResultSchema, RollbackSlotCheckSchema, RuntimeOverrideTarget, RuntimeOverrideTargetBaseSchema, RuntimeOverrideTargetSchema, SmokeOptionsSchema, SmokeResultSchema, StartOptions, StartOptionsSchema, StartResult, StartResultSchema, StatusResult, StatusResultSchema, SyncOptions, SyncOptionsSchema, SyncResult, SyncResultSchema, TypecheckOptions, TypecheckOptionsSchema, TypecheckResult, TypecheckResultSchema, TypecheckWorkspaceResult, TypecheckWorkspaceResultSchema, TypesGenOptions, TypesGenOptionsSchema, TypesGenResult, TypesGenResultSchema, UpgradeOptions, UpgradeOptionsSchema, UpgradeResult, UpgradeResultSchema, WorkspaceDeployResult, WorkspaceDeployResultSchema, bosContract, commandOptionSchemas } from "./contract.cjs";
3
3
  import { CliCommandMeta, cliCommandMeta } from "./contract.meta.cjs";
4
- import { ConfigHistoryEntry, DeployManifestEntry, NetworkId, PluginManifest, buildRegistryConfigUrl, buildRegistryConfigUrlForNetwork, fetchBosConfigFromFastKv, fetchConfigHistory, fetchDeployManifests, fetchRemotePluginManifest, getFastKvBaseUrlForNetwork, getRegistryNamespaceForAccount, getRegistryNamespaceForNetwork, parseBosUrl } from "./fastkv.cjs";
4
+ import { ConfigHistoryEntry, DeployManifestEntry, NetworkId, PluginManifest, buildRegistryConfigUrl, buildRegistryConfigUrlForNetwork, fetchBosConfigFromFastKv, fetchConfigHistory, fetchDeployManifests, fetchPublishedConfigFromFastKv, fetchRemotePluginManifest, getFastKvBaseUrlForNetwork, getRegistryNamespaceForAccount, getRegistryNamespaceForNetwork, parseBosUrl, parseFastKvConfigValue } from "./fastkv.cjs";
5
5
  import { AnySchema, Context, Effect, Layer, LoadedPluginWithBinding, Plugin, PluginRuntime, RouterContract, Scope, createPlugin, createPluginRuntime, oc, z } from "./sdk.cjs";
6
6
  import { StartConfigSource, isRegistryStart, resolveStartConfigSource } from "./start-config-source.cjs";
7
7
  import { BOS_CONFIG_ORDER, BosEnv, mergeBosConfigWithExtends, rebuildOrderedConfig, resolveExtendsRef } from "./merge.cjs";
8
8
  import { BuildRuntimeConfigOptions, CircularExtendsError, ConfigExtendsError, ConfigLoadError, ConfigNotfoundError, ConfigVersionManifestError, DEV_OVERLAY_FILENAME, DevOverlayError, MISSING_CONFIG_MESSAGE, ResolvedComposableReference, buildRuntimeConfig, buildRuntimeConfigEffect, buildRuntimePluginsForConfig, defaultConfigEnv, findConfigPath, getConfigBaseDir, getHostDevelopmentPort, getResolvedConfigPath, isAppDescriptorPath, isLocalDevelopmentTarget, isRuntimeOverrideAllowed, loadAppDescriptorConfig, loadGeneratedResolvedConfig, localConfigEntryPath, parseAppDescriptorModule, parseDevOverlayModule, parseExtendsTarget, parsePort, parseRuntimeOverrideTargets, readAuthoredConfigInput, readBosConfigForBuild, readLocalAuthoredConfigInput, resetConfigPathCache, resolveBosConfigPath, resolveComposableReference, resolveConfigComposableEntries, resolveDevelopmentHostUrl, resolveLocalDevelopmentPath, resolvePluginRuntimeName, resolveUiRuntimeName, runWithConfigWarningSink, writeResolvedConfig } from "./config.cjs";
9
- export { type AnySchema, ApiPluginConfig, ApiPluginConfigSchema, BOS_CONFIG_ORDER, BosConfig, BosConfigInput, BosConfigInputAppEntry, BosConfigInputSchema, BosConfigResult, BosConfigSchema, type BosEnv, BosPluginRef, BosPluginRefSchema, BosStaging, BosStagingSchema, BuildOptions, BuildOptionsSchema, BuildResultSchema, BuildRuntimeConfigOptions, CdnConfig, CdnConfigSchema, CiConfig, CiConfigSchema, CircularExtendsError, CliCommandMeta, ClientRuntimeConfig, ClientRuntimeConfigSchema, ClientRuntimeInfo, ClientRuntimeInfoSchema, ComposableAppEntry, ComposableAppEntrySchema, ConfigExtendsError, ConfigHistoryEntry, ConfigLoadError, ConfigNotfoundError, ConfigOptionsSchema, ConfigResultSchema, ConfigVersionManifestError, Context, DEV_OVERLAY_FILENAME, DbDoctorOptions, DbDoctorOptionsSchema, DbDoctorResult, DbDoctorResultSchema, DbRepairOptions, DbRepairOptionsSchema, DbRepairResult, DbRepairResultSchema, DbStudioOptions, DbStudioOptionsSchema, DbStudioResult, DbStudioResultSchema, DependencyNodeKind, DependencyNodeKindSchema, DeployManifestEntry, DeployManifestListEntrySchema, DeployOptions, DeployOptionsSchema, DeployResult, DeployResultSchema, DeployedVersionStatusSchema, DevOptions, DevOptionsSchema, DevOverlayError, DevResult, DevResultSchema, Effect, Extends, ExtendsConfig, ExtendsSchema, FederationEntry, FederationEntrySchema, HostConfig, HostConfigSchema, InfraExportOptions, InfraExportOptionsSchema, InfraExportResult, InfraExportResultSchema, InfraExportService, InfraExportServiceSchema, InitOptions, InitOptionsSchema, InitResult, InitResultSchema, JsonObject, JsonObjectSchema, JsonPrimitive, JsonValue, JsonValueSchema, KeyPublishOptions, KeyPublishOptionsSchema, KeyPublishResult, KeyPublishResultSchema, KillOptions, KillOptionsSchema, KillResult, KillResultSchema, Layer, type LoadedPluginWithBinding, LoginOptions, LoginOptionsSchema, LoginResult, LoginResultSchema, LogoutOptions, LogoutOptionsSchema, LogoutResult, LogoutResultSchema, LogsOptions, LogsOptionsSchema, LogsResult, LogsResultSchema, MISSING_CONFIG_MESSAGE, MfCheckOptions, MfCheckOptionsSchema, MfCheckRemoteResultSchema, MfCheckResult, MfCheckResultSchema, NetworkId, OverrideSection, OverrideSectionSchema, ParentStarterConfig, ParentStarterConfigSchema, PhaseTiming, PhaseTimingSchema, PidEntry, PidEntrySchema, type Plugin, PluginAddOptions, PluginAddOptionsSchema, PluginAddResult, PluginAddResultSchema, PluginEntries, PluginEntryValue, PluginListResult, PluginListResultSchema, PluginManifest, PluginPublishOptions, PluginPublishOptionsSchema, PluginPublishResult, PluginPublishResultSchema, PluginRemoveOptions, PluginRemoveOptionsSchema, PluginRemoveResult, PluginRemoveResultSchema, PluginRuntime, PluginRuntimeUi, PluginUiConfig, PluginUiConfigSchema, ProcessRole, ProcessRoleSchema, PsResult, PsResultSchema, PublishAuth, PublishAuthSchema, PublishConfig, PublishConfigSchema, PublishOptions, PublishOptionsSchema, PublishResult, PublishResultSchema, RailwayCi, RailwayCiSchema, RegistryUseOptionsSchema, RegistryUseResultSchema, ResolvedComposableReference, RollbackHistoryEntrySchema, RollbackOptionsSchema, RollbackResultSchema, RollbackSlotCheckSchema, type RouterContract, RuntimeConfig, RuntimeConfigSchema, RuntimeDependencyNode, RuntimeDependencyNodeSchema, RuntimeLineage, RuntimeLineageSchema, RuntimeOverrideTarget, RuntimeOverrideTargetBaseSchema, RuntimeOverrideTargetSchema, RuntimePluginConfig, RuntimePluginConfigSchema, Scope, SharedConfig, SharedConfigSchema, SharedDepConfig, SharedDepConfigSchema, SharedDepMapSchema, SlotPin, SlotPinSchema, SourceMode, SourceModeSchema, StartConfigSource, StartOptions, StartOptionsSchema, StartResult, StartResultSchema, StarterLevel, StarterLevelConfig, StarterLevelConfigSchema, StarterLevelSchema, StatusResult, StatusResultSchema, SyncOptions, SyncOptionsSchema, SyncResult, SyncResultSchema, TypecheckOptions, TypecheckOptionsSchema, TypecheckResult, TypecheckResultSchema, TypecheckWorkspaceResult, TypecheckWorkspaceResultSchema, TypesGenOptions, TypesGenOptionsSchema, TypesGenResult, TypesGenResultSchema, UiConfig, UiConfigSchema, UpgradeOptions, UpgradeOptionsSchema, UpgradeResult, UpgradeResultSchema, WorkspaceDeployResult, WorkspaceDeployResultSchema, bosContract, buildRegistryConfigUrl, buildRegistryConfigUrlForNetwork, buildRuntimeConfig, buildRuntimeConfigEffect, buildRuntimePluginsForConfig, cliCommandMeta, commandOptionSchemas, createPlugin, createPluginRuntime, defaultConfigEnv, fetchBosConfigFromFastKv, fetchConfigHistory, fetchDeployManifests, fetchRemotePluginManifest, findConfigPath, getConfigBaseDir, getFastKvBaseUrlForNetwork, getHostDevelopmentPort, getRegistryNamespaceForAccount, getRegistryNamespaceForNetwork, getResolvedConfigPath, isAppDescriptorPath, isLocalDevelopmentTarget, isRegistryStart, isRuntimeOverrideAllowed, loadAppDescriptorConfig, loadGeneratedResolvedConfig, localConfigEntryPath, mergeBosConfigWithExtends, oc, parseAppDescriptorModule, parseBosUrl, parseDevOverlayModule, parseExtendsTarget, parsePort, parseRuntimeOverrideTargets, readAuthoredConfigInput, readBosConfigForBuild, readLocalAuthoredConfigInput, rebuildOrderedConfig, resetConfigPathCache, resolveBosConfigPath, resolveComposableReference, resolveConfigComposableEntries, resolveDevelopmentHostUrl, resolveExtendsRef, resolveLocalDevelopmentPath, resolvePluginRuntimeName, resolveStartConfigSource, resolveUiRuntimeName, runWithConfigWarningSink, writeResolvedConfig, z };
9
+ export { type AnySchema, ApiPluginConfig, ApiPluginConfigSchema, BOS_CONFIG_ORDER, BosConfig, BosConfigInput, BosConfigInputAppEntry, BosConfigInputSchema, BosConfigResult, BosConfigSchema, type BosEnv, BosPluginRef, BosPluginRefSchema, BosStaging, BosStagingSchema, BuildOptions, BuildOptionsSchema, BuildResultSchema, BuildRuntimeConfigOptions, CdnConfig, CdnConfigSchema, CiConfig, CiConfigSchema, CircularExtendsError, CliCommandMeta, ClientRuntimeConfig, ClientRuntimeConfigSchema, ClientRuntimeInfo, ClientRuntimeInfoSchema, ComposableAppEntry, ComposableAppEntrySchema, ConfigExtendsError, ConfigHistoryEntry, ConfigLoadError, ConfigNotfoundError, ConfigOptionsSchema, ConfigResultSchema, ConfigVersionManifestError, Context, DEV_OVERLAY_FILENAME, DbDoctorOptions, DbDoctorOptionsSchema, DbDoctorResult, DbDoctorResultSchema, DbRepairOptions, DbRepairOptionsSchema, DbRepairResult, DbRepairResultSchema, DbStudioOptions, DbStudioOptionsSchema, DbStudioResult, DbStudioResultSchema, DependencyNodeKind, DependencyNodeKindSchema, DeployManifestEntry, DeployManifestListEntrySchema, DeployOptions, DeployOptionsSchema, DeployResult, DeployResultSchema, DeployedVersionStatusSchema, DevOptions, DevOptionsSchema, DevOverlayError, DevResult, DevResultSchema, Effect, Extends, ExtendsConfig, ExtendsSchema, FederationEntry, FederationEntrySchema, HostConfig, HostConfigSchema, InfraExportOptions, InfraExportOptionsSchema, InfraExportResult, InfraExportResultSchema, InfraExportService, InfraExportServiceSchema, InitOptions, InitOptionsSchema, InitResult, InitResultSchema, JsonObject, JsonObjectSchema, JsonPrimitive, JsonValue, JsonValueSchema, KeyPublishOptions, KeyPublishOptionsSchema, KeyPublishResult, KeyPublishResultSchema, KillOptions, KillOptionsSchema, KillResult, KillResultSchema, Layer, type LoadedPluginWithBinding, LoginOptions, LoginOptionsSchema, LoginResult, LoginResultSchema, LogoutOptions, LogoutOptionsSchema, LogoutResult, LogoutResultSchema, LogsOptions, LogsOptionsSchema, LogsResult, LogsResultSchema, MISSING_CONFIG_MESSAGE, MfCheckOptions, MfCheckOptionsSchema, MfCheckRemoteResultSchema, MfCheckResult, MfCheckResultSchema, NetworkId, OverrideSection, OverrideSectionSchema, ParentStarterConfig, ParentStarterConfigSchema, PhaseTiming, PhaseTimingSchema, PidEntry, PidEntrySchema, type Plugin, PluginAddOptions, PluginAddOptionsSchema, PluginAddResult, PluginAddResultSchema, PluginEntries, PluginEntryValue, PluginListResult, PluginListResultSchema, PluginManifest, PluginPublishOptions, PluginPublishOptionsSchema, PluginPublishResult, PluginPublishResultSchema, PluginRemoveOptions, PluginRemoveOptionsSchema, PluginRemoveResult, PluginRemoveResultSchema, PluginRuntime, PluginRuntimeUi, PluginUiConfig, PluginUiConfigSchema, ProcessRole, ProcessRoleSchema, PsResult, PsResultSchema, PublishAuth, PublishAuthSchema, PublishConfig, PublishConfigSchema, PublishOptions, PublishOptionsSchema, PublishResult, PublishResultSchema, RailwayCi, RailwayCiSchema, RegistryUseOptionsSchema, RegistryUseResultSchema, ResolvedComposableReference, RollbackHistoryEntrySchema, RollbackOptionsSchema, RollbackResultSchema, RollbackSlotCheckSchema, type RouterContract, RuntimeConfig, RuntimeConfigSchema, RuntimeDependencyNode, RuntimeDependencyNodeSchema, RuntimeLineage, RuntimeLineageSchema, RuntimeOverrideTarget, RuntimeOverrideTargetBaseSchema, RuntimeOverrideTargetSchema, RuntimePluginConfig, RuntimePluginConfigSchema, Scope, SharedConfig, SharedConfigSchema, SharedDepConfig, SharedDepConfigSchema, SharedDepMapSchema, SlotPin, SlotPinSchema, SmokeOptionsSchema, SmokeResultSchema, SourceMode, SourceModeSchema, StartConfigSource, StartOptions, StartOptionsSchema, StartResult, StartResultSchema, StarterLevel, StarterLevelConfig, StarterLevelConfigSchema, StarterLevelSchema, StatusResult, StatusResultSchema, SyncOptions, SyncOptionsSchema, SyncResult, SyncResultSchema, TypecheckOptions, TypecheckOptionsSchema, TypecheckResult, TypecheckResultSchema, TypecheckWorkspaceResult, TypecheckWorkspaceResultSchema, TypesGenOptions, TypesGenOptionsSchema, TypesGenResult, TypesGenResultSchema, UiConfig, UiConfigSchema, UpgradeOptions, UpgradeOptionsSchema, UpgradeResult, UpgradeResultSchema, WorkspaceDeployResult, WorkspaceDeployResultSchema, bosContract, buildRegistryConfigUrl, buildRegistryConfigUrlForNetwork, buildRuntimeConfig, buildRuntimeConfigEffect, buildRuntimePluginsForConfig, cliCommandMeta, commandOptionSchemas, createPlugin, createPluginRuntime, defaultConfigEnv, fetchBosConfigFromFastKv, fetchConfigHistory, fetchDeployManifests, fetchPublishedConfigFromFastKv, fetchRemotePluginManifest, findConfigPath, getConfigBaseDir, getFastKvBaseUrlForNetwork, getHostDevelopmentPort, getRegistryNamespaceForAccount, getRegistryNamespaceForNetwork, getResolvedConfigPath, isAppDescriptorPath, isLocalDevelopmentTarget, isRegistryStart, isRuntimeOverrideAllowed, loadAppDescriptorConfig, loadGeneratedResolvedConfig, localConfigEntryPath, mergeBosConfigWithExtends, oc, parseAppDescriptorModule, parseBosUrl, parseDevOverlayModule, parseExtendsTarget, parseFastKvConfigValue, parsePort, parseRuntimeOverrideTargets, readAuthoredConfigInput, readBosConfigForBuild, readLocalAuthoredConfigInput, rebuildOrderedConfig, resetConfigPathCache, resolveBosConfigPath, resolveComposableReference, resolveConfigComposableEntries, resolveDevelopmentHostUrl, resolveExtendsRef, resolveLocalDevelopmentPath, resolvePluginRuntimeName, resolveStartConfigSource, resolveUiRuntimeName, runWithConfigWarningSink, writeResolvedConfig, z };
package/dist/index.d.mts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { ApiPluginConfig, ApiPluginConfigSchema, BosConfig, BosConfigInput, BosConfigInputAppEntry, BosConfigInputSchema, BosConfigSchema, BosPluginRef, BosPluginRefSchema, BosStaging, BosStagingSchema, CdnConfig, CdnConfigSchema, CiConfig, CiConfigSchema, ClientRuntimeConfig, ClientRuntimeConfigSchema, ClientRuntimeInfo, ClientRuntimeInfoSchema, ComposableAppEntry, ComposableAppEntrySchema, DependencyNodeKind, DependencyNodeKindSchema, Extends, ExtendsConfig, ExtendsSchema, FederationEntry, FederationEntrySchema, HostConfig, HostConfigSchema, JsonObject, JsonObjectSchema, JsonPrimitive, JsonValue, JsonValueSchema, ParentStarterConfig, ParentStarterConfigSchema, PluginEntries, PluginEntryValue, PluginRuntimeUi, PluginUiConfig, PluginUiConfigSchema, PublishAuth, PublishAuthSchema, PublishConfig, PublishConfigSchema, RailwayCi, RailwayCiSchema, RuntimeConfig, RuntimeConfigSchema, RuntimeDependencyNode, RuntimeDependencyNodeSchema, RuntimeLineage, RuntimeLineageSchema, RuntimePluginConfig, RuntimePluginConfigSchema, SharedConfig, SharedConfigSchema, SharedDepConfig, SharedDepConfigSchema, SharedDepMapSchema, SlotPin, SlotPinSchema, SourceMode, SourceModeSchema, StarterLevel, StarterLevelConfig, StarterLevelConfigSchema, StarterLevelSchema, UiConfig, UiConfigSchema } from "./types.mjs";
2
- import { BosConfigResult, BuildOptions, BuildOptionsSchema, BuildResultSchema, ConfigOptionsSchema, ConfigResultSchema, DbDoctorOptions, DbDoctorOptionsSchema, DbDoctorResult, DbDoctorResultSchema, DbRepairOptions, DbRepairOptionsSchema, DbRepairResult, DbRepairResultSchema, DbStudioOptions, DbStudioOptionsSchema, DbStudioResult, DbStudioResultSchema, DeployManifestListEntrySchema, DeployOptions, DeployOptionsSchema, DeployResult, DeployResultSchema, DeployedVersionStatusSchema, DevOptions, DevOptionsSchema, DevResult, DevResultSchema, InfraExportOptions, InfraExportOptionsSchema, InfraExportResult, InfraExportResultSchema, InfraExportService, InfraExportServiceSchema, InitOptions, InitOptionsSchema, InitResult, InitResultSchema, KeyPublishOptions, KeyPublishOptionsSchema, KeyPublishResult, KeyPublishResultSchema, KillOptions, KillOptionsSchema, KillResult, KillResultSchema, LoginOptions, LoginOptionsSchema, LoginResult, LoginResultSchema, LogoutOptions, LogoutOptionsSchema, LogoutResult, LogoutResultSchema, LogsOptions, LogsOptionsSchema, LogsResult, LogsResultSchema, MfCheckOptions, MfCheckOptionsSchema, MfCheckRemoteResultSchema, MfCheckResult, MfCheckResultSchema, OverrideSection, OverrideSectionSchema, PhaseTiming, PhaseTimingSchema, PidEntry, PidEntrySchema, PluginAddOptions, PluginAddOptionsSchema, PluginAddResult, PluginAddResultSchema, PluginListResult, PluginListResultSchema, PluginPublishOptions, PluginPublishOptionsSchema, PluginPublishResult, PluginPublishResultSchema, PluginRemoveOptions, PluginRemoveOptionsSchema, PluginRemoveResult, PluginRemoveResultSchema, ProcessRole, ProcessRoleSchema, PsResult, PsResultSchema, PublishOptions, PublishOptionsSchema, PublishResult, PublishResultSchema, RegistryUseOptionsSchema, RegistryUseResultSchema, RollbackHistoryEntrySchema, RollbackOptionsSchema, RollbackResultSchema, RollbackSlotCheckSchema, RuntimeOverrideTarget, RuntimeOverrideTargetBaseSchema, RuntimeOverrideTargetSchema, StartOptions, StartOptionsSchema, StartResult, StartResultSchema, StatusResult, StatusResultSchema, SyncOptions, SyncOptionsSchema, SyncResult, SyncResultSchema, TypecheckOptions, TypecheckOptionsSchema, TypecheckResult, TypecheckResultSchema, TypecheckWorkspaceResult, TypecheckWorkspaceResultSchema, TypesGenOptions, TypesGenOptionsSchema, TypesGenResult, TypesGenResultSchema, UpgradeOptions, UpgradeOptionsSchema, UpgradeResult, UpgradeResultSchema, WorkspaceDeployResult, WorkspaceDeployResultSchema, bosContract, commandOptionSchemas } from "./contract.mjs";
2
+ import { BosConfigResult, BuildOptions, BuildOptionsSchema, BuildResultSchema, ConfigOptionsSchema, ConfigResultSchema, DbDoctorOptions, DbDoctorOptionsSchema, DbDoctorResult, DbDoctorResultSchema, DbRepairOptions, DbRepairOptionsSchema, DbRepairResult, DbRepairResultSchema, DbStudioOptions, DbStudioOptionsSchema, DbStudioResult, DbStudioResultSchema, DeployManifestListEntrySchema, DeployOptions, DeployOptionsSchema, DeployResult, DeployResultSchema, DeployedVersionStatusSchema, DevOptions, DevOptionsSchema, DevResult, DevResultSchema, InfraExportOptions, InfraExportOptionsSchema, InfraExportResult, InfraExportResultSchema, InfraExportService, InfraExportServiceSchema, InitOptions, InitOptionsSchema, InitResult, InitResultSchema, KeyPublishOptions, KeyPublishOptionsSchema, KeyPublishResult, KeyPublishResultSchema, KillOptions, KillOptionsSchema, KillResult, KillResultSchema, LoginOptions, LoginOptionsSchema, LoginResult, LoginResultSchema, LogoutOptions, LogoutOptionsSchema, LogoutResult, LogoutResultSchema, LogsOptions, LogsOptionsSchema, LogsResult, LogsResultSchema, MfCheckOptions, MfCheckOptionsSchema, MfCheckRemoteResultSchema, MfCheckResult, MfCheckResultSchema, OverrideSection, OverrideSectionSchema, PhaseTiming, PhaseTimingSchema, PidEntry, PidEntrySchema, PluginAddOptions, PluginAddOptionsSchema, PluginAddResult, PluginAddResultSchema, PluginListResult, PluginListResultSchema, PluginPublishOptions, PluginPublishOptionsSchema, PluginPublishResult, PluginPublishResultSchema, PluginRemoveOptions, PluginRemoveOptionsSchema, PluginRemoveResult, PluginRemoveResultSchema, ProcessRole, ProcessRoleSchema, PsResult, PsResultSchema, PublishOptions, PublishOptionsSchema, PublishResult, PublishResultSchema, RegistryUseOptionsSchema, RegistryUseResultSchema, RollbackHistoryEntrySchema, RollbackOptionsSchema, RollbackResultSchema, RollbackSlotCheckSchema, RuntimeOverrideTarget, RuntimeOverrideTargetBaseSchema, RuntimeOverrideTargetSchema, SmokeOptionsSchema, SmokeResultSchema, StartOptions, StartOptionsSchema, StartResult, StartResultSchema, StatusResult, StatusResultSchema, SyncOptions, SyncOptionsSchema, SyncResult, SyncResultSchema, TypecheckOptions, TypecheckOptionsSchema, TypecheckResult, TypecheckResultSchema, TypecheckWorkspaceResult, TypecheckWorkspaceResultSchema, TypesGenOptions, TypesGenOptionsSchema, TypesGenResult, TypesGenResultSchema, UpgradeOptions, UpgradeOptionsSchema, UpgradeResult, UpgradeResultSchema, WorkspaceDeployResult, WorkspaceDeployResultSchema, bosContract, commandOptionSchemas } from "./contract.mjs";
3
3
  import { CliCommandMeta, cliCommandMeta } from "./contract.meta.mjs";
4
- import { ConfigHistoryEntry, DeployManifestEntry, NetworkId, PluginManifest, buildRegistryConfigUrl, buildRegistryConfigUrlForNetwork, fetchBosConfigFromFastKv, fetchConfigHistory, fetchDeployManifests, fetchRemotePluginManifest, getFastKvBaseUrlForNetwork, getRegistryNamespaceForAccount, getRegistryNamespaceForNetwork, parseBosUrl } from "./fastkv.mjs";
4
+ import { ConfigHistoryEntry, DeployManifestEntry, NetworkId, PluginManifest, buildRegistryConfigUrl, buildRegistryConfigUrlForNetwork, fetchBosConfigFromFastKv, fetchConfigHistory, fetchDeployManifests, fetchPublishedConfigFromFastKv, fetchRemotePluginManifest, getFastKvBaseUrlForNetwork, getRegistryNamespaceForAccount, getRegistryNamespaceForNetwork, parseBosUrl, parseFastKvConfigValue } from "./fastkv.mjs";
5
5
  import { AnySchema, Context, Effect, Layer, LoadedPluginWithBinding, Plugin, PluginRuntime, RouterContract, Scope, createPlugin, createPluginRuntime, oc, z } from "./sdk.mjs";
6
6
  import { StartConfigSource, isRegistryStart, resolveStartConfigSource } from "./start-config-source.mjs";
7
7
  import { BOS_CONFIG_ORDER, BosEnv, mergeBosConfigWithExtends, rebuildOrderedConfig, resolveExtendsRef } from "./merge.mjs";
8
8
  import { BuildRuntimeConfigOptions, CircularExtendsError, ConfigExtendsError, ConfigLoadError, ConfigNotfoundError, ConfigVersionManifestError, DEV_OVERLAY_FILENAME, DevOverlayError, MISSING_CONFIG_MESSAGE, ResolvedComposableReference, buildRuntimeConfig, buildRuntimeConfigEffect, buildRuntimePluginsForConfig, defaultConfigEnv, findConfigPath, getConfigBaseDir, getHostDevelopmentPort, getResolvedConfigPath, isAppDescriptorPath, isLocalDevelopmentTarget, isRuntimeOverrideAllowed, loadAppDescriptorConfig, loadGeneratedResolvedConfig, localConfigEntryPath, parseAppDescriptorModule, parseDevOverlayModule, parseExtendsTarget, parsePort, parseRuntimeOverrideTargets, readAuthoredConfigInput, readBosConfigForBuild, readLocalAuthoredConfigInput, resetConfigPathCache, resolveBosConfigPath, resolveComposableReference, resolveConfigComposableEntries, resolveDevelopmentHostUrl, resolveLocalDevelopmentPath, resolvePluginRuntimeName, resolveUiRuntimeName, runWithConfigWarningSink, writeResolvedConfig } from "./config.mjs";
9
- export { type AnySchema, ApiPluginConfig, ApiPluginConfigSchema, BOS_CONFIG_ORDER, BosConfig, BosConfigInput, BosConfigInputAppEntry, BosConfigInputSchema, BosConfigResult, BosConfigSchema, type BosEnv, BosPluginRef, BosPluginRefSchema, BosStaging, BosStagingSchema, BuildOptions, BuildOptionsSchema, BuildResultSchema, BuildRuntimeConfigOptions, CdnConfig, CdnConfigSchema, CiConfig, CiConfigSchema, CircularExtendsError, CliCommandMeta, ClientRuntimeConfig, ClientRuntimeConfigSchema, ClientRuntimeInfo, ClientRuntimeInfoSchema, ComposableAppEntry, ComposableAppEntrySchema, ConfigExtendsError, ConfigHistoryEntry, ConfigLoadError, ConfigNotfoundError, ConfigOptionsSchema, ConfigResultSchema, ConfigVersionManifestError, Context, DEV_OVERLAY_FILENAME, DbDoctorOptions, DbDoctorOptionsSchema, DbDoctorResult, DbDoctorResultSchema, DbRepairOptions, DbRepairOptionsSchema, DbRepairResult, DbRepairResultSchema, DbStudioOptions, DbStudioOptionsSchema, DbStudioResult, DbStudioResultSchema, DependencyNodeKind, DependencyNodeKindSchema, DeployManifestEntry, DeployManifestListEntrySchema, DeployOptions, DeployOptionsSchema, DeployResult, DeployResultSchema, DeployedVersionStatusSchema, DevOptions, DevOptionsSchema, DevOverlayError, DevResult, DevResultSchema, Effect, Extends, ExtendsConfig, ExtendsSchema, FederationEntry, FederationEntrySchema, HostConfig, HostConfigSchema, InfraExportOptions, InfraExportOptionsSchema, InfraExportResult, InfraExportResultSchema, InfraExportService, InfraExportServiceSchema, InitOptions, InitOptionsSchema, InitResult, InitResultSchema, JsonObject, JsonObjectSchema, JsonPrimitive, JsonValue, JsonValueSchema, KeyPublishOptions, KeyPublishOptionsSchema, KeyPublishResult, KeyPublishResultSchema, KillOptions, KillOptionsSchema, KillResult, KillResultSchema, Layer, type LoadedPluginWithBinding, LoginOptions, LoginOptionsSchema, LoginResult, LoginResultSchema, LogoutOptions, LogoutOptionsSchema, LogoutResult, LogoutResultSchema, LogsOptions, LogsOptionsSchema, LogsResult, LogsResultSchema, MISSING_CONFIG_MESSAGE, MfCheckOptions, MfCheckOptionsSchema, MfCheckRemoteResultSchema, MfCheckResult, MfCheckResultSchema, NetworkId, OverrideSection, OverrideSectionSchema, ParentStarterConfig, ParentStarterConfigSchema, PhaseTiming, PhaseTimingSchema, PidEntry, PidEntrySchema, type Plugin, PluginAddOptions, PluginAddOptionsSchema, PluginAddResult, PluginAddResultSchema, PluginEntries, PluginEntryValue, PluginListResult, PluginListResultSchema, PluginManifest, PluginPublishOptions, PluginPublishOptionsSchema, PluginPublishResult, PluginPublishResultSchema, PluginRemoveOptions, PluginRemoveOptionsSchema, PluginRemoveResult, PluginRemoveResultSchema, PluginRuntime, PluginRuntimeUi, PluginUiConfig, PluginUiConfigSchema, ProcessRole, ProcessRoleSchema, PsResult, PsResultSchema, PublishAuth, PublishAuthSchema, PublishConfig, PublishConfigSchema, PublishOptions, PublishOptionsSchema, PublishResult, PublishResultSchema, RailwayCi, RailwayCiSchema, RegistryUseOptionsSchema, RegistryUseResultSchema, ResolvedComposableReference, RollbackHistoryEntrySchema, RollbackOptionsSchema, RollbackResultSchema, RollbackSlotCheckSchema, type RouterContract, RuntimeConfig, RuntimeConfigSchema, RuntimeDependencyNode, RuntimeDependencyNodeSchema, RuntimeLineage, RuntimeLineageSchema, RuntimeOverrideTarget, RuntimeOverrideTargetBaseSchema, RuntimeOverrideTargetSchema, RuntimePluginConfig, RuntimePluginConfigSchema, Scope, SharedConfig, SharedConfigSchema, SharedDepConfig, SharedDepConfigSchema, SharedDepMapSchema, SlotPin, SlotPinSchema, SourceMode, SourceModeSchema, StartConfigSource, StartOptions, StartOptionsSchema, StartResult, StartResultSchema, StarterLevel, StarterLevelConfig, StarterLevelConfigSchema, StarterLevelSchema, StatusResult, StatusResultSchema, SyncOptions, SyncOptionsSchema, SyncResult, SyncResultSchema, TypecheckOptions, TypecheckOptionsSchema, TypecheckResult, TypecheckResultSchema, TypecheckWorkspaceResult, TypecheckWorkspaceResultSchema, TypesGenOptions, TypesGenOptionsSchema, TypesGenResult, TypesGenResultSchema, UiConfig, UiConfigSchema, UpgradeOptions, UpgradeOptionsSchema, UpgradeResult, UpgradeResultSchema, WorkspaceDeployResult, WorkspaceDeployResultSchema, bosContract, buildRegistryConfigUrl, buildRegistryConfigUrlForNetwork, buildRuntimeConfig, buildRuntimeConfigEffect, buildRuntimePluginsForConfig, cliCommandMeta, commandOptionSchemas, createPlugin, createPluginRuntime, defaultConfigEnv, fetchBosConfigFromFastKv, fetchConfigHistory, fetchDeployManifests, fetchRemotePluginManifest, findConfigPath, getConfigBaseDir, getFastKvBaseUrlForNetwork, getHostDevelopmentPort, getRegistryNamespaceForAccount, getRegistryNamespaceForNetwork, getResolvedConfigPath, isAppDescriptorPath, isLocalDevelopmentTarget, isRegistryStart, isRuntimeOverrideAllowed, loadAppDescriptorConfig, loadGeneratedResolvedConfig, localConfigEntryPath, mergeBosConfigWithExtends, oc, parseAppDescriptorModule, parseBosUrl, parseDevOverlayModule, parseExtendsTarget, parsePort, parseRuntimeOverrideTargets, readAuthoredConfigInput, readBosConfigForBuild, readLocalAuthoredConfigInput, rebuildOrderedConfig, resetConfigPathCache, resolveBosConfigPath, resolveComposableReference, resolveConfigComposableEntries, resolveDevelopmentHostUrl, resolveExtendsRef, resolveLocalDevelopmentPath, resolvePluginRuntimeName, resolveStartConfigSource, resolveUiRuntimeName, runWithConfigWarningSink, writeResolvedConfig, z };
9
+ export { type AnySchema, ApiPluginConfig, ApiPluginConfigSchema, BOS_CONFIG_ORDER, BosConfig, BosConfigInput, BosConfigInputAppEntry, BosConfigInputSchema, BosConfigResult, BosConfigSchema, type BosEnv, BosPluginRef, BosPluginRefSchema, BosStaging, BosStagingSchema, BuildOptions, BuildOptionsSchema, BuildResultSchema, BuildRuntimeConfigOptions, CdnConfig, CdnConfigSchema, CiConfig, CiConfigSchema, CircularExtendsError, CliCommandMeta, ClientRuntimeConfig, ClientRuntimeConfigSchema, ClientRuntimeInfo, ClientRuntimeInfoSchema, ComposableAppEntry, ComposableAppEntrySchema, ConfigExtendsError, ConfigHistoryEntry, ConfigLoadError, ConfigNotfoundError, ConfigOptionsSchema, ConfigResultSchema, ConfigVersionManifestError, Context, DEV_OVERLAY_FILENAME, DbDoctorOptions, DbDoctorOptionsSchema, DbDoctorResult, DbDoctorResultSchema, DbRepairOptions, DbRepairOptionsSchema, DbRepairResult, DbRepairResultSchema, DbStudioOptions, DbStudioOptionsSchema, DbStudioResult, DbStudioResultSchema, DependencyNodeKind, DependencyNodeKindSchema, DeployManifestEntry, DeployManifestListEntrySchema, DeployOptions, DeployOptionsSchema, DeployResult, DeployResultSchema, DeployedVersionStatusSchema, DevOptions, DevOptionsSchema, DevOverlayError, DevResult, DevResultSchema, Effect, Extends, ExtendsConfig, ExtendsSchema, FederationEntry, FederationEntrySchema, HostConfig, HostConfigSchema, InfraExportOptions, InfraExportOptionsSchema, InfraExportResult, InfraExportResultSchema, InfraExportService, InfraExportServiceSchema, InitOptions, InitOptionsSchema, InitResult, InitResultSchema, JsonObject, JsonObjectSchema, JsonPrimitive, JsonValue, JsonValueSchema, KeyPublishOptions, KeyPublishOptionsSchema, KeyPublishResult, KeyPublishResultSchema, KillOptions, KillOptionsSchema, KillResult, KillResultSchema, Layer, type LoadedPluginWithBinding, LoginOptions, LoginOptionsSchema, LoginResult, LoginResultSchema, LogoutOptions, LogoutOptionsSchema, LogoutResult, LogoutResultSchema, LogsOptions, LogsOptionsSchema, LogsResult, LogsResultSchema, MISSING_CONFIG_MESSAGE, MfCheckOptions, MfCheckOptionsSchema, MfCheckRemoteResultSchema, MfCheckResult, MfCheckResultSchema, NetworkId, OverrideSection, OverrideSectionSchema, ParentStarterConfig, ParentStarterConfigSchema, PhaseTiming, PhaseTimingSchema, PidEntry, PidEntrySchema, type Plugin, PluginAddOptions, PluginAddOptionsSchema, PluginAddResult, PluginAddResultSchema, PluginEntries, PluginEntryValue, PluginListResult, PluginListResultSchema, PluginManifest, PluginPublishOptions, PluginPublishOptionsSchema, PluginPublishResult, PluginPublishResultSchema, PluginRemoveOptions, PluginRemoveOptionsSchema, PluginRemoveResult, PluginRemoveResultSchema, PluginRuntime, PluginRuntimeUi, PluginUiConfig, PluginUiConfigSchema, ProcessRole, ProcessRoleSchema, PsResult, PsResultSchema, PublishAuth, PublishAuthSchema, PublishConfig, PublishConfigSchema, PublishOptions, PublishOptionsSchema, PublishResult, PublishResultSchema, RailwayCi, RailwayCiSchema, RegistryUseOptionsSchema, RegistryUseResultSchema, ResolvedComposableReference, RollbackHistoryEntrySchema, RollbackOptionsSchema, RollbackResultSchema, RollbackSlotCheckSchema, type RouterContract, RuntimeConfig, RuntimeConfigSchema, RuntimeDependencyNode, RuntimeDependencyNodeSchema, RuntimeLineage, RuntimeLineageSchema, RuntimeOverrideTarget, RuntimeOverrideTargetBaseSchema, RuntimeOverrideTargetSchema, RuntimePluginConfig, RuntimePluginConfigSchema, Scope, SharedConfig, SharedConfigSchema, SharedDepConfig, SharedDepConfigSchema, SharedDepMapSchema, SlotPin, SlotPinSchema, SmokeOptionsSchema, SmokeResultSchema, SourceMode, SourceModeSchema, StartConfigSource, StartOptions, StartOptionsSchema, StartResult, StartResultSchema, StarterLevel, StarterLevelConfig, StarterLevelConfigSchema, StarterLevelSchema, StatusResult, StatusResultSchema, SyncOptions, SyncOptionsSchema, SyncResult, SyncResultSchema, TypecheckOptions, TypecheckOptionsSchema, TypecheckResult, TypecheckResultSchema, TypecheckWorkspaceResult, TypecheckWorkspaceResultSchema, TypesGenOptions, TypesGenOptionsSchema, TypesGenResult, TypesGenResultSchema, UiConfig, UiConfigSchema, UpgradeOptions, UpgradeOptionsSchema, UpgradeResult, UpgradeResultSchema, WorkspaceDeployResult, WorkspaceDeployResultSchema, bosContract, buildRegistryConfigUrl, buildRegistryConfigUrlForNetwork, buildRuntimeConfig, buildRuntimeConfigEffect, buildRuntimePluginsForConfig, cliCommandMeta, commandOptionSchemas, createPlugin, createPluginRuntime, defaultConfigEnv, fetchBosConfigFromFastKv, fetchConfigHistory, fetchDeployManifests, fetchPublishedConfigFromFastKv, fetchRemotePluginManifest, findConfigPath, getConfigBaseDir, getFastKvBaseUrlForNetwork, getHostDevelopmentPort, getRegistryNamespaceForAccount, getRegistryNamespaceForNetwork, getResolvedConfigPath, isAppDescriptorPath, isLocalDevelopmentTarget, isRegistryStart, isRuntimeOverrideAllowed, loadAppDescriptorConfig, loadGeneratedResolvedConfig, localConfigEntryPath, mergeBosConfigWithExtends, oc, parseAppDescriptorModule, parseBosUrl, parseDevOverlayModule, parseExtendsTarget, parseFastKvConfigValue, parsePort, parseRuntimeOverrideTargets, readAuthoredConfigInput, readBosConfigForBuild, readLocalAuthoredConfigInput, rebuildOrderedConfig, resetConfigPathCache, resolveBosConfigPath, resolveComposableReference, resolveConfigComposableEntries, resolveDevelopmentHostUrl, resolveExtendsRef, resolveLocalDevelopmentPath, resolvePluginRuntimeName, resolveStartConfigSource, resolveUiRuntimeName, runWithConfigWarningSink, writeResolvedConfig, z };
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  import { BOS_CONFIG_ORDER, mergeBosConfigWithExtends, rebuildOrderedConfig, resolveExtendsRef } from "./merge.mjs";
2
2
  import { ApiPluginConfigSchema, BosConfigInputSchema, BosConfigSchema, BosPluginRefSchema, BosStagingSchema, CdnConfigSchema, CiConfigSchema, ClientRuntimeConfigSchema, ClientRuntimeInfoSchema, ComposableAppEntrySchema, DependencyNodeKindSchema, ExtendsSchema, FederationEntrySchema, HostConfigSchema, JsonObjectSchema, JsonValueSchema, ParentStarterConfigSchema, PluginUiConfigSchema, PublishAuthSchema, PublishConfigSchema, RailwayCiSchema, RuntimeConfigSchema, RuntimeDependencyNodeSchema, RuntimeLineageSchema, RuntimePluginConfigSchema, SharedConfigSchema, SharedDepConfigSchema, SharedDepMapSchema, SlotPinSchema, SourceModeSchema, StarterLevelConfigSchema, StarterLevelSchema, UiConfigSchema } from "./types.mjs";
3
- import { buildRegistryConfigUrl, buildRegistryConfigUrlForNetwork, fetchBosConfigFromFastKv, fetchConfigHistory, fetchDeployManifests, fetchRemotePluginManifest, getFastKvBaseUrlForNetwork, getRegistryNamespaceForAccount, getRegistryNamespaceForNetwork, parseBosUrl } from "./fastkv.mjs";
3
+ import { buildRegistryConfigUrl, buildRegistryConfigUrlForNetwork, fetchBosConfigFromFastKv, fetchConfigHistory, fetchDeployManifests, fetchPublishedConfigFromFastKv, fetchRemotePluginManifest, getFastKvBaseUrlForNetwork, getRegistryNamespaceForAccount, getRegistryNamespaceForNetwork, parseBosUrl, parseFastKvConfigValue } from "./fastkv.mjs";
4
4
  import { CircularExtendsError, ConfigExtendsError, ConfigLoadError, ConfigNotfoundError, ConfigVersionManifestError, DEV_OVERLAY_FILENAME, DevOverlayError, MISSING_CONFIG_MESSAGE, buildRuntimeConfig, buildRuntimeConfigEffect, buildRuntimePluginsForConfig, defaultConfigEnv, findConfigPath, getConfigBaseDir, getHostDevelopmentPort, getResolvedConfigPath, isAppDescriptorPath, isLocalDevelopmentTarget, isRuntimeOverrideAllowed, loadAppDescriptorConfig, loadGeneratedResolvedConfig, localConfigEntryPath, parseAppDescriptorModule, parseDevOverlayModule, parseExtendsTarget, parsePort, parseRuntimeOverrideTargets, readAuthoredConfigInput, readBosConfigForBuild, readLocalAuthoredConfigInput, resetConfigPathCache, resolveBosConfigPath, resolveComposableReference, resolveConfigComposableEntries, resolveDevelopmentHostUrl, resolveLocalDevelopmentPath, resolvePluginRuntimeName, resolveUiRuntimeName, runWithConfigWarningSink, writeResolvedConfig } from "./config.mjs";
5
5
  import { Context, Effect, Layer, PluginRuntime, Scope, createPlugin, createPluginRuntime, oc, z } from "./sdk.mjs";
6
- import { BuildOptionsSchema, BuildResultSchema, ConfigOptionsSchema, ConfigResultSchema, DbDoctorOptionsSchema, DbDoctorResultSchema, DbRepairOptionsSchema, DbRepairResultSchema, DbStudioOptionsSchema, DbStudioResultSchema, DeployManifestListEntrySchema, DeployOptionsSchema, DeployResultSchema, DeployedVersionStatusSchema, DevOptionsSchema, DevResultSchema, InfraExportOptionsSchema, InfraExportResultSchema, InfraExportServiceSchema, InitOptionsSchema, InitResultSchema, KeyPublishOptionsSchema, KeyPublishResultSchema, KillOptionsSchema, KillResultSchema, LoginOptionsSchema, LoginResultSchema, LogoutOptionsSchema, LogoutResultSchema, LogsOptionsSchema, LogsResultSchema, MfCheckOptionsSchema, MfCheckRemoteResultSchema, MfCheckResultSchema, OverrideSectionSchema, PhaseTimingSchema, PidEntrySchema, PluginAddOptionsSchema, PluginAddResultSchema, PluginListResultSchema, PluginPublishOptionsSchema, PluginPublishResultSchema, PluginRemoveOptionsSchema, PluginRemoveResultSchema, ProcessRoleSchema, PsResultSchema, PublishOptionsSchema, PublishResultSchema, RegistryUseOptionsSchema, RegistryUseResultSchema, RollbackHistoryEntrySchema, RollbackOptionsSchema, RollbackResultSchema, RollbackSlotCheckSchema, RuntimeOverrideTargetBaseSchema, RuntimeOverrideTargetSchema, StartOptionsSchema, StartResultSchema, StatusResultSchema, SyncOptionsSchema, SyncResultSchema, TypecheckOptionsSchema, TypecheckResultSchema, TypecheckWorkspaceResultSchema, TypesGenOptionsSchema, TypesGenResultSchema, UpgradeOptionsSchema, UpgradeResultSchema, WorkspaceDeployResultSchema, bosContract, commandOptionSchemas } from "./contract.mjs";
6
+ import { BuildOptionsSchema, BuildResultSchema, ConfigOptionsSchema, ConfigResultSchema, DbDoctorOptionsSchema, DbDoctorResultSchema, DbRepairOptionsSchema, DbRepairResultSchema, DbStudioOptionsSchema, DbStudioResultSchema, DeployManifestListEntrySchema, DeployOptionsSchema, DeployResultSchema, DeployedVersionStatusSchema, DevOptionsSchema, DevResultSchema, InfraExportOptionsSchema, InfraExportResultSchema, InfraExportServiceSchema, InitOptionsSchema, InitResultSchema, KeyPublishOptionsSchema, KeyPublishResultSchema, KillOptionsSchema, KillResultSchema, LoginOptionsSchema, LoginResultSchema, LogoutOptionsSchema, LogoutResultSchema, LogsOptionsSchema, LogsResultSchema, MfCheckOptionsSchema, MfCheckRemoteResultSchema, MfCheckResultSchema, OverrideSectionSchema, PhaseTimingSchema, PidEntrySchema, PluginAddOptionsSchema, PluginAddResultSchema, PluginListResultSchema, PluginPublishOptionsSchema, PluginPublishResultSchema, PluginRemoveOptionsSchema, PluginRemoveResultSchema, ProcessRoleSchema, PsResultSchema, PublishOptionsSchema, PublishResultSchema, RegistryUseOptionsSchema, RegistryUseResultSchema, RollbackHistoryEntrySchema, RollbackOptionsSchema, RollbackResultSchema, RollbackSlotCheckSchema, RuntimeOverrideTargetBaseSchema, RuntimeOverrideTargetSchema, SmokeOptionsSchema, SmokeResultSchema, StartOptionsSchema, StartResultSchema, StatusResultSchema, SyncOptionsSchema, SyncResultSchema, TypecheckOptionsSchema, TypecheckResultSchema, TypecheckWorkspaceResultSchema, TypesGenOptionsSchema, TypesGenResultSchema, UpgradeOptionsSchema, UpgradeResultSchema, WorkspaceDeployResultSchema, bosContract, commandOptionSchemas } from "./contract.mjs";
7
7
  import { cliCommandMeta } from "./contract.meta.mjs";
8
8
  import { isRegistryStart, resolveStartConfigSource } from "./start-config-source.mjs";
9
9
 
10
- export { ApiPluginConfigSchema, BOS_CONFIG_ORDER, BosConfigInputSchema, BosConfigSchema, BosPluginRefSchema, BosStagingSchema, BuildOptionsSchema, BuildResultSchema, CdnConfigSchema, CiConfigSchema, CircularExtendsError, ClientRuntimeConfigSchema, ClientRuntimeInfoSchema, ComposableAppEntrySchema, ConfigExtendsError, ConfigLoadError, ConfigNotfoundError, ConfigOptionsSchema, ConfigResultSchema, ConfigVersionManifestError, Context, DEV_OVERLAY_FILENAME, DbDoctorOptionsSchema, DbDoctorResultSchema, DbRepairOptionsSchema, DbRepairResultSchema, DbStudioOptionsSchema, DbStudioResultSchema, DependencyNodeKindSchema, DeployManifestListEntrySchema, DeployOptionsSchema, DeployResultSchema, DeployedVersionStatusSchema, DevOptionsSchema, DevOverlayError, DevResultSchema, Effect, ExtendsSchema, FederationEntrySchema, HostConfigSchema, InfraExportOptionsSchema, InfraExportResultSchema, InfraExportServiceSchema, InitOptionsSchema, InitResultSchema, JsonObjectSchema, JsonValueSchema, KeyPublishOptionsSchema, KeyPublishResultSchema, KillOptionsSchema, KillResultSchema, Layer, LoginOptionsSchema, LoginResultSchema, LogoutOptionsSchema, LogoutResultSchema, LogsOptionsSchema, LogsResultSchema, MISSING_CONFIG_MESSAGE, MfCheckOptionsSchema, MfCheckRemoteResultSchema, MfCheckResultSchema, OverrideSectionSchema, ParentStarterConfigSchema, PhaseTimingSchema, PidEntrySchema, PluginAddOptionsSchema, PluginAddResultSchema, PluginListResultSchema, PluginPublishOptionsSchema, PluginPublishResultSchema, PluginRemoveOptionsSchema, PluginRemoveResultSchema, PluginRuntime, PluginUiConfigSchema, ProcessRoleSchema, PsResultSchema, PublishAuthSchema, PublishConfigSchema, PublishOptionsSchema, PublishResultSchema, RailwayCiSchema, RegistryUseOptionsSchema, RegistryUseResultSchema, RollbackHistoryEntrySchema, RollbackOptionsSchema, RollbackResultSchema, RollbackSlotCheckSchema, RuntimeConfigSchema, RuntimeDependencyNodeSchema, RuntimeLineageSchema, RuntimeOverrideTargetBaseSchema, RuntimeOverrideTargetSchema, RuntimePluginConfigSchema, Scope, SharedConfigSchema, SharedDepConfigSchema, SharedDepMapSchema, SlotPinSchema, SourceModeSchema, StartOptionsSchema, StartResultSchema, StarterLevelConfigSchema, StarterLevelSchema, StatusResultSchema, SyncOptionsSchema, SyncResultSchema, TypecheckOptionsSchema, TypecheckResultSchema, TypecheckWorkspaceResultSchema, TypesGenOptionsSchema, TypesGenResultSchema, UiConfigSchema, UpgradeOptionsSchema, UpgradeResultSchema, WorkspaceDeployResultSchema, bosContract, buildRegistryConfigUrl, buildRegistryConfigUrlForNetwork, buildRuntimeConfig, buildRuntimeConfigEffect, buildRuntimePluginsForConfig, cliCommandMeta, commandOptionSchemas, createPlugin, createPluginRuntime, defaultConfigEnv, fetchBosConfigFromFastKv, fetchConfigHistory, fetchDeployManifests, fetchRemotePluginManifest, findConfigPath, getConfigBaseDir, getFastKvBaseUrlForNetwork, getHostDevelopmentPort, getRegistryNamespaceForAccount, getRegistryNamespaceForNetwork, getResolvedConfigPath, isAppDescriptorPath, isLocalDevelopmentTarget, isRegistryStart, isRuntimeOverrideAllowed, loadAppDescriptorConfig, loadGeneratedResolvedConfig, localConfigEntryPath, mergeBosConfigWithExtends, oc, parseAppDescriptorModule, parseBosUrl, parseDevOverlayModule, parseExtendsTarget, parsePort, parseRuntimeOverrideTargets, readAuthoredConfigInput, readBosConfigForBuild, readLocalAuthoredConfigInput, rebuildOrderedConfig, resetConfigPathCache, resolveBosConfigPath, resolveComposableReference, resolveConfigComposableEntries, resolveDevelopmentHostUrl, resolveExtendsRef, resolveLocalDevelopmentPath, resolvePluginRuntimeName, resolveStartConfigSource, resolveUiRuntimeName, runWithConfigWarningSink, writeResolvedConfig, z };
10
+ export { ApiPluginConfigSchema, BOS_CONFIG_ORDER, BosConfigInputSchema, BosConfigSchema, BosPluginRefSchema, BosStagingSchema, BuildOptionsSchema, BuildResultSchema, CdnConfigSchema, CiConfigSchema, CircularExtendsError, ClientRuntimeConfigSchema, ClientRuntimeInfoSchema, ComposableAppEntrySchema, ConfigExtendsError, ConfigLoadError, ConfigNotfoundError, ConfigOptionsSchema, ConfigResultSchema, ConfigVersionManifestError, Context, DEV_OVERLAY_FILENAME, DbDoctorOptionsSchema, DbDoctorResultSchema, DbRepairOptionsSchema, DbRepairResultSchema, DbStudioOptionsSchema, DbStudioResultSchema, DependencyNodeKindSchema, DeployManifestListEntrySchema, DeployOptionsSchema, DeployResultSchema, DeployedVersionStatusSchema, DevOptionsSchema, DevOverlayError, DevResultSchema, Effect, ExtendsSchema, FederationEntrySchema, HostConfigSchema, InfraExportOptionsSchema, InfraExportResultSchema, InfraExportServiceSchema, InitOptionsSchema, InitResultSchema, JsonObjectSchema, JsonValueSchema, KeyPublishOptionsSchema, KeyPublishResultSchema, KillOptionsSchema, KillResultSchema, Layer, LoginOptionsSchema, LoginResultSchema, LogoutOptionsSchema, LogoutResultSchema, LogsOptionsSchema, LogsResultSchema, MISSING_CONFIG_MESSAGE, MfCheckOptionsSchema, MfCheckRemoteResultSchema, MfCheckResultSchema, OverrideSectionSchema, ParentStarterConfigSchema, PhaseTimingSchema, PidEntrySchema, PluginAddOptionsSchema, PluginAddResultSchema, PluginListResultSchema, PluginPublishOptionsSchema, PluginPublishResultSchema, PluginRemoveOptionsSchema, PluginRemoveResultSchema, PluginRuntime, PluginUiConfigSchema, ProcessRoleSchema, PsResultSchema, PublishAuthSchema, PublishConfigSchema, PublishOptionsSchema, PublishResultSchema, RailwayCiSchema, RegistryUseOptionsSchema, RegistryUseResultSchema, RollbackHistoryEntrySchema, RollbackOptionsSchema, RollbackResultSchema, RollbackSlotCheckSchema, RuntimeConfigSchema, RuntimeDependencyNodeSchema, RuntimeLineageSchema, RuntimeOverrideTargetBaseSchema, RuntimeOverrideTargetSchema, RuntimePluginConfigSchema, Scope, SharedConfigSchema, SharedDepConfigSchema, SharedDepMapSchema, SlotPinSchema, SmokeOptionsSchema, SmokeResultSchema, SourceModeSchema, StartOptionsSchema, StartResultSchema, StarterLevelConfigSchema, StarterLevelSchema, StatusResultSchema, SyncOptionsSchema, SyncResultSchema, TypecheckOptionsSchema, TypecheckResultSchema, TypecheckWorkspaceResultSchema, TypesGenOptionsSchema, TypesGenResultSchema, UiConfigSchema, UpgradeOptionsSchema, UpgradeResultSchema, WorkspaceDeployResultSchema, bosContract, buildRegistryConfigUrl, buildRegistryConfigUrlForNetwork, buildRuntimeConfig, buildRuntimeConfigEffect, buildRuntimePluginsForConfig, cliCommandMeta, commandOptionSchemas, createPlugin, createPluginRuntime, defaultConfigEnv, fetchBosConfigFromFastKv, fetchConfigHistory, fetchDeployManifests, fetchPublishedConfigFromFastKv, fetchRemotePluginManifest, findConfigPath, getConfigBaseDir, getFastKvBaseUrlForNetwork, getHostDevelopmentPort, getRegistryNamespaceForAccount, getRegistryNamespaceForNetwork, getResolvedConfigPath, isAppDescriptorPath, isLocalDevelopmentTarget, isRegistryStart, isRuntimeOverrideAllowed, loadAppDescriptorConfig, loadGeneratedResolvedConfig, localConfigEntryPath, mergeBosConfigWithExtends, oc, parseAppDescriptorModule, parseBosUrl, parseDevOverlayModule, parseExtendsTarget, parseFastKvConfigValue, parsePort, parseRuntimeOverrideTargets, readAuthoredConfigInput, readBosConfigForBuild, readLocalAuthoredConfigInput, rebuildOrderedConfig, resetConfigPathCache, resolveBosConfigPath, resolveComposableReference, resolveConfigComposableEntries, resolveDevelopmentHostUrl, resolveExtendsRef, resolveLocalDevelopmentPath, resolvePluginRuntimeName, resolveStartConfigSource, resolveUiRuntimeName, runWithConfigWarningSink, writeResolvedConfig, z };
@@ -1,13 +1,13 @@
1
+ const require_http_client = require('./http-client.cjs');
1
2
  const require_service_descriptor = require('./service-descriptor.cjs');
2
3
  const require_dev_log_pipeline = require('./dev-log-pipeline.cjs');
3
- const require_mf = require('./mf.cjs');
4
+ const require_federation = require('./federation.cjs');
4
5
  const require_project_env = require('./env/project-env.cjs');
5
6
  let effect = require("effect");
6
7
  let node_child_process = require("node:child_process");
7
8
  let node_stream = require("node:stream");
8
9
 
9
10
  //#region src/orchestrator.ts
10
- const runFetch = (url, init) => fetch(url, init);
11
11
  process.on("unhandledRejection", (reason) => {
12
12
  console.error("[Orchestrator] Unhandled rejection:", reason);
13
13
  });
@@ -32,7 +32,7 @@ const encodeRuntimeConfig = (runtimeConfig) => effect.Schema.encodeUnknownEffect
32
32
  const probeHttpOk = (url, timeoutMs = 400) => effect.Effect.tryPromise({
33
33
  try: async () => {
34
34
  try {
35
- return (await runFetch(url, { signal: AbortSignal.timeout(timeoutMs) })).ok;
35
+ return (await fetch(url, { signal: AbortSignal.timeout(timeoutMs) })).ok;
36
36
  } catch {
37
37
  return false;
38
38
  }
@@ -40,6 +40,14 @@ const probeHttpOk = (url, timeoutMs = 400) => effect.Effect.tryPromise({
40
40
  catch: () => false
41
41
  });
42
42
  const LOCAL_PROBE_DEADLINE_MS = 9e4;
43
+ /** Remote-host boot budgets: every stage of the CDN-only boot is deadline-
44
+ * bounded so a hung connection or a wedged module load fails loud with the
45
+ * URL and stage — long before the smoke's 240s probe deadline turns the
46
+ * silence into a mystery. */
47
+ const MANIFEST_FETCH_DEADLINE = "10 seconds";
48
+ const LOAD_REMOTE_DEADLINE = "60 seconds";
49
+ const SERVER_READY_DEADLINE = "120 seconds";
50
+ const REMOTE_HOST_BOOT_DEADLINE = "180 seconds";
43
51
  const LOCAL_PROBE_INTERVAL_MS = 200;
44
52
  const cleanExitSignals = {
45
53
  SIGTERM: true,
@@ -130,37 +138,12 @@ const spawnRemoteHost = (descriptor, callbacks) => effect.Effect.gen(function* (
130
138
  callbacks.onLog(descriptor.key, `Remote: ${remoteUrl}`);
131
139
  const restoreConsole = patchConsole(descriptor.key, callbacks);
132
140
  callbacks.onLog(descriptor.key, "Loading Module Federation runtime...");
133
- const mfRuntime = yield* effect.Effect.tryPromise({
134
- try: () => import("@module-federation/enhanced/runtime"),
135
- catch: (cause) => new OrchestratorError({
136
- operation: "load module federation runtime",
137
- detail: cause instanceof Error ? cause.message : String(cause),
138
- cause
139
- })
140
- });
141
- const mfCore = yield* effect.Effect.tryPromise({
142
- try: () => import("@module-federation/runtime-core"),
143
- catch: (cause) => new OrchestratorError({
144
- operation: "load module federation core",
145
- detail: cause instanceof Error ? cause.message : String(cause),
146
- cause
147
- })
148
- });
149
- let mf = mfRuntime.getInstance();
150
- if (!mf) {
151
- mf = mfRuntime.createInstance({
152
- name: "cli-host",
153
- remotes: []
154
- });
155
- mfCore.setGlobalFederationInstance(mf);
156
- }
157
- require_mf.patchManifestFetchForSsrPublicPath(mf);
158
141
  const manifestUrl = `${remoteUrl.replace(/\/remoteEntry\.js$/, "").replace(/\/mf-manifest\.json$/, "").replace(/\/$/, "")}/mf-manifest.json`;
159
142
  const entryUrl = yield* effect.Effect.tryPromise({
160
143
  try: async () => {
161
144
  let res;
162
145
  try {
163
- res = await runFetch(manifestUrl, { signal: AbortSignal.timeout(1e4) });
146
+ res = await require_http_client.fetchRaw(manifestUrl, void 0, MANIFEST_FETCH_DEADLINE);
164
147
  } catch (e) {
165
148
  throw new OrchestratorError({
166
149
  operation: "fetch host manifest",
@@ -184,19 +167,25 @@ const spawnRemoteHost = (descriptor, callbacks) => effect.Effect.gen(function* (
184
167
  detail: `${manifestUrl} — ${String(cause)}`
185
168
  })
186
169
  });
187
- mf.registerRemotes([{
170
+ yield* effect.Effect.promise(() => require_federation.registerRemote({
188
171
  name: "host",
189
172
  entry: entryUrl
190
- }]);
173
+ }));
191
174
  callbacks.onLog(descriptor.key, `Loading host from ${entryUrl}...`);
192
175
  const hostModule = yield* effect.Effect.tryPromise({
193
- try: () => mf.loadRemote("host/Server"),
176
+ try: () => require_federation.loadRemoteModule("host/Server"),
194
177
  catch: (cause) => new OrchestratorError({
195
178
  operation: "load host module",
196
179
  detail: cause instanceof Error ? cause.message : String(cause),
197
180
  cause
198
181
  })
199
- });
182
+ }).pipe(effect.Effect.timeoutOrElse({
183
+ duration: LOAD_REMOTE_DEADLINE,
184
+ orElse: () => effect.Effect.fail(new OrchestratorError({
185
+ operation: "load host module",
186
+ detail: `timed out after ${LOAD_REMOTE_DEADLINE} — the module (or its shared dependencies) did not finish loading from ${entryUrl}`
187
+ }))
188
+ }));
200
189
  if (!hostModule?.runServer) return yield* new HostModuleInvalid();
201
190
  callbacks.onLog(descriptor.key, "Starting server...");
202
191
  const hostPort = runtimeConfig.host?.port;
@@ -213,7 +202,16 @@ const spawnRemoteHost = (descriptor, callbacks) => effect.Effect.gen(function* (
213
202
  detail: cause instanceof Error ? cause.message : String(cause),
214
203
  cause
215
204
  })
216
- });
205
+ }).pipe(effect.Effect.timeoutOrElse({
206
+ duration: SERVER_READY_DEADLINE,
207
+ orElse: () => effect.Effect.gen(function* () {
208
+ yield* effect.Effect.exit(effect.Effect.promise(() => serverHandle.shutdown()));
209
+ return yield* new OrchestratorError({
210
+ operation: "start server",
211
+ detail: `server did not become ready within ${SERVER_READY_DEADLINE}`
212
+ });
213
+ })
214
+ }));
217
215
  callbacks.onStatus(descriptor.key, "ready");
218
216
  return {
219
217
  name: descriptor.key,
@@ -494,7 +492,13 @@ const makeDevProcess = (pkg, callbacks, portOverride) => effect.Effect.gen(funct
494
492
  waitForExit: effect.Effect.never
495
493
  };
496
494
  }
497
- if (pkg === "host" && descriptor.source === "remote") return yield* spawnRemoteHost(descriptor, callbacks);
495
+ if (pkg === "host" && descriptor.source === "remote") return yield* spawnRemoteHost(descriptor, callbacks).pipe(effect.Effect.timeoutOrElse({
496
+ duration: REMOTE_HOST_BOOT_DEADLINE,
497
+ orElse: () => effect.Effect.fail(new OrchestratorError({
498
+ operation: "boot remote host",
499
+ detail: `remote host boot exceeded the ${REMOTE_HOST_BOOT_DEADLINE} overall deadline`
500
+ }))
501
+ }));
498
502
  if (descriptor.source === "remote" || !descriptor.localPath) return yield* spawnRemoteProbe(pkg, descriptor, callbacks);
499
503
  const resolvedDescriptor = portOverride ? {
500
504
  ...descriptor,