every-plugin 3.0.0-rc.15 → 3.0.0-rc.16

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 (65) hide show
  1. package/dist/build/artifact-names.cjs +8 -5
  2. package/dist/build/artifact-names.cjs.map +1 -1
  3. package/dist/build/artifact-names.d.cts +7 -5
  4. package/dist/build/artifact-names.d.cts.map +1 -1
  5. package/dist/build/artifact-names.d.mts +7 -5
  6. package/dist/build/artifact-names.d.mts.map +1 -1
  7. package/dist/build/artifact-names.mjs +8 -5
  8. package/dist/build/artifact-names.mjs.map +1 -1
  9. package/dist/build/ui/stubs.cjs +2 -7
  10. package/dist/build/ui/stubs.cjs.map +1 -1
  11. package/dist/build/ui/stubs.d.cts.map +1 -1
  12. package/dist/build/ui/stubs.d.mts.map +1 -1
  13. package/dist/build/ui/stubs.mjs +2 -7
  14. package/dist/build/ui/stubs.mjs.map +1 -1
  15. package/dist/errors.cjs +11 -1
  16. package/dist/errors.cjs.map +1 -1
  17. package/dist/errors.d.cts +15 -1
  18. package/dist/errors.d.cts.map +1 -1
  19. package/dist/errors.d.mts +15 -1
  20. package/dist/errors.d.mts.map +1 -1
  21. package/dist/errors.mjs +11 -2
  22. package/dist/errors.mjs.map +1 -1
  23. package/dist/index.cjs +1 -0
  24. package/dist/index.d.cts +2 -2
  25. package/dist/index.d.mts +2 -2
  26. package/dist/index.mjs +2 -2
  27. package/dist/runtime/mf-config.cjs +1 -1
  28. package/dist/runtime/mf-config.mjs +1 -1
  29. package/dist/ui/manifest/construct.cjs +13 -38
  30. package/dist/ui/manifest/construct.cjs.map +1 -1
  31. package/dist/ui/manifest/construct.d.cts +4 -13
  32. package/dist/ui/manifest/construct.d.cts.map +1 -1
  33. package/dist/ui/manifest/construct.d.mts +4 -13
  34. package/dist/ui/manifest/construct.d.mts.map +1 -1
  35. package/dist/ui/manifest/construct.mjs +14 -39
  36. package/dist/ui/manifest/construct.mjs.map +1 -1
  37. package/dist/ui/manifest/descriptor.cjs +1 -1
  38. package/dist/ui/manifest/descriptor.mjs +1 -1
  39. package/dist/ui/manifest/index.d.cts +3 -3
  40. package/dist/ui/manifest/index.d.mts +3 -3
  41. package/dist/ui/manifest/mount-registry.cjs +6 -13
  42. package/dist/ui/manifest/mount-registry.cjs.map +1 -1
  43. package/dist/ui/manifest/mount-registry.d.cts +29 -36
  44. package/dist/ui/manifest/mount-registry.d.cts.map +1 -1
  45. package/dist/ui/manifest/mount-registry.d.mts +29 -36
  46. package/dist/ui/manifest/mount-registry.d.mts.map +1 -1
  47. package/dist/ui/manifest/mount-registry.mjs +6 -13
  48. package/dist/ui/manifest/mount-registry.mjs.map +1 -1
  49. package/dist/version-manifest.cjs +25 -0
  50. package/dist/version-manifest.cjs.map +1 -1
  51. package/dist/version-manifest.d.cts +13 -1
  52. package/dist/version-manifest.d.cts.map +1 -1
  53. package/dist/version-manifest.d.mts +13 -1
  54. package/dist/version-manifest.d.mts.map +1 -1
  55. package/dist/version-manifest.mjs +24 -1
  56. package/dist/version-manifest.mjs.map +1 -1
  57. package/package.json +1 -1
  58. package/skills/plugin-client/SKILL.md +2 -2
  59. package/src/build/artifact-names.ts +8 -5
  60. package/src/build/ui/stubs.ts +2 -7
  61. package/src/errors.ts +10 -0
  62. package/src/ui/manifest/construct.ts +20 -65
  63. package/src/ui/manifest/index.ts +0 -2
  64. package/src/ui/manifest/mount-registry.ts +20 -20
  65. package/src/version-manifest.ts +27 -0
@@ -34,13 +34,16 @@ function uiEntryFilename(input) {
34
34
  }
35
35
  const HASH_SEGMENT_PATTERN = /\.[a-f0-9]{8,}\./;
36
36
  /**
37
- * Serving classification for bundle objects: anything whose name carries a
38
- * content-hash segment (including hashed entrypoints like
39
- * `remoteEntry.8f3a….js`) is immutable by construction; fixed-name
40
- * entrypoints and non-hashed files a redeploy replaces in place must
41
- * revalidate.
37
+ * Serving classification for bundle objects: anything under a version
38
+ * directory (`versions/<dirId>/…`, #826) or a `versions/<id>.json` manifest
39
+ * is immutable by construction — the directory name is content-addressed and
40
+ * the upload service refuses conflicting writes under `versions/`; likewise
41
+ * any name carrying a content-hash segment (including hashed entrypoints
42
+ * like `remoteEntry.8f3a….js`). Fixed-name entrypoints and non-hashed files
43
+ * a redeploy replaces in place must revalidate.
42
44
  */
43
45
  function isImmutableBundlePath(name) {
46
+ if (name === "versions" || name.startsWith("versions/")) return true;
44
47
  const base = name.split("/").pop() ?? name;
45
48
  return HASH_SEGMENT_PATTERN.test(base);
46
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"artifact-names.cjs","names":["crypto","z"],"sources":["../../src/build/artifact-names.ts"],"sourcesContent":["import crypto from \"node:crypto\";\nimport { z } from \"zod\";\n\n/** Dev-mode entry names: the in-memory dev server serves these exact names,\n * and dev consumers (the host's html shell, the compose client payload, the\n * readiness probe) append them — dev has no build report to discover hashed\n * names from. */\nexport const DEV_ENTRY_FILENAME = \"remoteEntry.js\";\nexport const DEV_SERVER_ENTRY_FILENAME = \"remoteEntry.server.js\";\n/** Fixed-name build outputs that get additive immutable hashed copies. */\nexport const MF_MANIFEST_FILENAME = \"mf-manifest.json\";\nexport const STYLE_FILENAME = \"style.css\";\nexport const HASHED_ENTRY_PATTERN = \"remoteEntry.[contenthash].js\";\nexport const HASHED_SERVER_ENTRY_PATTERN = \"remoteEntry.server.[contenthash].js\";\n\n/** The dev-stack signal: everything a dev server spawns (watch or no-watch\n * one-shot builds) serves the fixed dev entry names, because every dev\n * consumer appends them and no build report exists to discover hashed names\n * from. Every other invocation — local builds, host-test production builds,\n * regression container builds, deploys — is a build and emits content-hashed\n * entries + build reports. NODE_ENV cannot carry this decision (vitest runs\n * as \"test\", bundler CLIs default \"production\" even for dev watches), and\n * DEPLOY=true only marks deploy builds — so the dev server stamps its own\n * children. */\nexport function isBuildInvocation(): boolean {\n return process.env.BOS_DEV_SERVER !== \"1\";\n}\n\nexport function uiEntryFilename(input: { isBuild: boolean; server?: boolean }): string {\n if (!input.isBuild) return input.server ? DEV_SERVER_ENTRY_FILENAME : DEV_ENTRY_FILENAME;\n return input.server ? HASHED_SERVER_ENTRY_PATTERN : HASHED_ENTRY_PATTERN;\n}\n\nconst HASH_SEGMENT_PATTERN = /\\.[a-f0-9]{8,}\\./;\n\n/**\n * Serving classification for bundle objects: anything whose name carries a\n * content-hash segment (including hashed entrypoints like\n * `remoteEntry.8f3a….js`) is immutable by construction; fixed-name\n * entrypoints and non-hashed files a redeploy replaces in place must\n * revalidate.\n */\nexport function isImmutableBundlePath(name: string): boolean {\n const base = name.split(\"/\").pop() ?? name;\n return HASH_SEGMENT_PATTERN.test(base);\n}\n\nexport function cacheControlOf(name: string): string {\n return isImmutableBundlePath(name)\n ? \"public, max-age=31536000, immutable\"\n : \"public, max-age=0, must-revalidate\";\n}\n\n/** Short content hash used to mint additive hashed copies of fixed-name artifacts. */\nexport function contentHashOf(content: string | Uint8Array): string {\n return crypto.createHash(\"sha256\").update(content).digest(\"hex\").slice(0, 16);\n}\n\nexport function hashedArtifactName(base: string, hash: string, ext: string): string {\n return `${base}.${hash}.${ext.replace(/^\\./, \"\")}`;\n}\n\n/** Find the content-hashed entry asset for a base name (\"remoteEntry\", \"remoteEntry.server\"). */\nexport function findHashedEntry(assetNames: string[], base: string): string | null {\n const hashed = assetNames.find((name) => {\n const rest = name.startsWith(`${base}.`) ? name.slice(base.length + 1) : null;\n if (rest === null) return false;\n const hash = rest.slice(0, -3);\n return name.endsWith(\".js\") && /^[a-f0-9]{8,}$/.test(hash);\n });\n return hashed ?? null;\n}\n\nexport const BuildEntryReportSchema = z.object({\n entry: z.string().min(1),\n browserManifest: z.string().min(1).optional(),\n css: z.string().min(1).optional(),\n /**\n * Shared-singleton `name → version` this build embedded — resolved from the\n * building workspace's node_modules at config time and stamped by both the\n * rspack and rsbuild build paths. The deploy leg records it into the\n * workspace's version manifest, so a slot's pin carries shared-dep\n * semantics and consumers can detect a build skew before loading (#546).\n */\n shared: z.record(z.string(), z.string()).optional(),\n});\nexport type BuildEntryReport = z.infer<typeof BuildEntryReportSchema>;\n\nexport interface ArtifactCopy {\n from: string;\n to: string;\n}\n\n/**\n * The additive-copy plan for one compiled dist root: each supplied fixed-name\n * artifact gets an immutable hashed copy. The hashed entry itself needs no\n * copy — the build report carries its name to the deploy leg. Returns null\n * when the build predates hashed entry names (only fixed names emitted).\n */\nexport function planArtifactCopies(input: {\n assetNames: string[];\n entryBase: string;\n contents?: Record<string, string | Uint8Array | undefined>;\n}): { copies: Array<ArtifactCopy>; report: BuildEntryReport } | null {\n const entry = findHashedEntry(input.assetNames, input.entryBase);\n if (!entry) return null;\n\n const copies: Array<ArtifactCopy> = [];\n const report: BuildEntryReport = { entry };\n\n const hashedCopy = (fixedName: string, reportField: \"browserManifest\" | \"css\") => {\n const content = input.contents?.[fixedName];\n if (content === undefined) return;\n const dot = fixedName.lastIndexOf(\".\");\n const base = fixedName.slice(0, dot);\n const ext = fixedName.slice(dot + 1);\n const hashed = hashedArtifactName(base, contentHashOf(content), ext);\n copies.push({ from: fixedName, to: hashed });\n report[reportField] = hashed;\n };\n hashedCopy(MF_MANIFEST_FILENAME, \"browserManifest\");\n hashedCopy(STYLE_FILENAME, \"css\");\n\n return { copies, report };\n}\n"],"mappings":";;;;;;;;;;;AAOA,MAAa,qBAAqB;AAClC,MAAa,4BAA4B;;AAEzC,MAAa,uBAAuB;AACpC,MAAa,iBAAiB;AAC9B,MAAa,uBAAuB;AACpC,MAAa,8BAA8B;;;;;;;;;;AAW3C,SAAgB,oBAA6B;CAC3C,OAAO,QAAQ,IAAI,mBAAmB;AACxC;AAEA,SAAgB,gBAAgB,OAAuD;CACrF,IAAI,CAAC,MAAM,SAAS,OAAO,MAAM,SAAS,4BAA4B;CACtE,OAAO,MAAM,SAAS,8BAA8B;AACtD;AAEA,MAAM,uBAAuB;;;;;;;;AAS7B,SAAgB,sBAAsB,MAAuB;CAC3D,MAAM,OAAO,KAAK,MAAM,GAAG,CAAC,CAAC,IAAI,KAAK;CACtC,OAAO,qB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AAW;EACjC,IAAI,YAAY,QAAW;EAC3B,MAAM,MAAM,UAAU,YAAY,GAAG;EACrC,MAAM,OAAO,UAAU,MAAM,GAAG,GAAG;EACnC,MAAM,MAAM,UAAU,MAAM,MAAM,CAAC;EACnC,MAAM,SAAS,mBAAmB,MAAM,cAAc,OAAO,GAAG,GAAG;EACnE,OAAO,KAAK;GAAE,MAAM;GAAW,IAAI;EAAO,CAAC;EAC3C,OAAO,eAAe;CACxB;CACA,WAAW,sBAAsB,iBAAiB;CAClD,WAAW,gBAAgB,KAAK;CAEhC,OAAO;EAAE;EAAQ;CAAO;AAC1B"}
1
+ {"version":3,"file":"artifact-names.cjs","names":["crypto","z"],"sources":["../../src/build/artifact-names.ts"],"sourcesContent":["import crypto from \"node:crypto\";\nimport { z } from \"zod\";\n\n/** Dev-mode entry names: the in-memory dev server serves these exact names,\n * and dev consumers (the host's html shell, the compose client payload, the\n * readiness probe) append them — dev has no build report to discover hashed\n * names from. */\nexport const DEV_ENTRY_FILENAME = \"remoteEntry.js\";\nexport const DEV_SERVER_ENTRY_FILENAME = \"remoteEntry.server.js\";\n/** Fixed-name build outputs that get additive immutable hashed copies. */\nexport const MF_MANIFEST_FILENAME = \"mf-manifest.json\";\nexport const STYLE_FILENAME = \"style.css\";\nexport const HASHED_ENTRY_PATTERN = \"remoteEntry.[contenthash].js\";\nexport const HASHED_SERVER_ENTRY_PATTERN = \"remoteEntry.server.[contenthash].js\";\n\n/** The dev-stack signal: everything a dev server spawns (watch or no-watch\n * one-shot builds) serves the fixed dev entry names, because every dev\n * consumer appends them and no build report exists to discover hashed names\n * from. Every other invocation — local builds, host-test production builds,\n * regression container builds, deploys — is a build and emits content-hashed\n * entries + build reports. NODE_ENV cannot carry this decision (vitest runs\n * as \"test\", bundler CLIs default \"production\" even for dev watches), and\n * DEPLOY=true only marks deploy builds — so the dev server stamps its own\n * children. */\nexport function isBuildInvocation(): boolean {\n return process.env.BOS_DEV_SERVER !== \"1\";\n}\n\nexport function uiEntryFilename(input: { isBuild: boolean; server?: boolean }): string {\n if (!input.isBuild) return input.server ? DEV_SERVER_ENTRY_FILENAME : DEV_ENTRY_FILENAME;\n return input.server ? HASHED_SERVER_ENTRY_PATTERN : HASHED_ENTRY_PATTERN;\n}\n\nconst HASH_SEGMENT_PATTERN = /\\.[a-f0-9]{8,}\\./;\n\n/**\n * Serving classification for bundle objects: anything under a version\n * directory (`versions/<dirId>/…`, #826) or a `versions/<id>.json` manifest\n * is immutable by construction — the directory name is content-addressed and\n * the upload service refuses conflicting writes under `versions/`; likewise\n * any name carrying a content-hash segment (including hashed entrypoints\n * like `remoteEntry.8f3a….js`). Fixed-name entrypoints and non-hashed files\n * a redeploy replaces in place must revalidate.\n */\nexport function isImmutableBundlePath(name: string): boolean {\n if (name === \"versions\" || name.startsWith(\"versions/\")) return true;\n const base = name.split(\"/\").pop() ?? name;\n return HASH_SEGMENT_PATTERN.test(base);\n}\n\nexport function cacheControlOf(name: string): string {\n return isImmutableBundlePath(name)\n ? \"public, max-age=31536000, immutable\"\n : \"public, max-age=0, must-revalidate\";\n}\n\n/** Short content hash used to mint additive hashed copies of fixed-name artifacts. */\nexport function contentHashOf(content: string | Uint8Array): string {\n return crypto.createHash(\"sha256\").update(content).digest(\"hex\").slice(0, 16);\n}\n\nexport function hashedArtifactName(base: string, hash: string, ext: string): string {\n return `${base}.${hash}.${ext.replace(/^\\./, \"\")}`;\n}\n\n/** Find the content-hashed entry asset for a base name (\"remoteEntry\", \"remoteEntry.server\"). */\nexport function findHashedEntry(assetNames: string[], base: string): string | null {\n const hashed = assetNames.find((name) => {\n const rest = name.startsWith(`${base}.`) ? name.slice(base.length + 1) : null;\n if (rest === null) return false;\n const hash = rest.slice(0, -3);\n return name.endsWith(\".js\") && /^[a-f0-9]{8,}$/.test(hash);\n });\n return hashed ?? null;\n}\n\nexport const BuildEntryReportSchema = z.object({\n entry: z.string().min(1),\n browserManifest: z.string().min(1).optional(),\n css: z.string().min(1).optional(),\n /**\n * Shared-singleton `name → version` this build embedded — resolved from the\n * building workspace's node_modules at config time and stamped by both the\n * rspack and rsbuild build paths. The deploy leg records it into the\n * workspace's version manifest, so a slot's pin carries shared-dep\n * semantics and consumers can detect a build skew before loading (#546).\n */\n shared: z.record(z.string(), z.string()).optional(),\n});\nexport type BuildEntryReport = z.infer<typeof BuildEntryReportSchema>;\n\nexport interface ArtifactCopy {\n from: string;\n to: string;\n}\n\n/**\n * The additive-copy plan for one compiled dist root: each supplied fixed-name\n * artifact gets an immutable hashed copy. The hashed entry itself needs no\n * copy — the build report carries its name to the deploy leg. Returns null\n * when the build predates hashed entry names (only fixed names emitted).\n */\nexport function planArtifactCopies(input: {\n assetNames: string[];\n entryBase: string;\n contents?: Record<string, string | Uint8Array | undefined>;\n}): { copies: Array<ArtifactCopy>; report: BuildEntryReport } | null {\n const entry = findHashedEntry(input.assetNames, input.entryBase);\n if (!entry) return null;\n\n const copies: Array<ArtifactCopy> = [];\n const report: BuildEntryReport = { entry };\n\n const hashedCopy = (fixedName: string, reportField: \"browserManifest\" | \"css\") => {\n const content = input.contents?.[fixedName];\n if (content === undefined) return;\n const dot = fixedName.lastIndexOf(\".\");\n const base = fixedName.slice(0, dot);\n const ext = fixedName.slice(dot + 1);\n const hashed = hashedArtifactName(base, contentHashOf(content), ext);\n copies.push({ from: fixedName, to: hashed });\n report[reportField] = hashed;\n };\n hashedCopy(MF_MANIFEST_FILENAME, \"browserManifest\");\n hashedCopy(STYLE_FILENAME, \"css\");\n\n return { copies, report };\n}\n"],"mappings":";;;;;;;;;;;AAOA,MAAa,qBAAqB;AAClC,MAAa,4BAA4B;;AAEzC,MAAa,uBAAuB;AACpC,MAAa,iBAAiB;AAC9B,MAAa,uBAAuB;AACpC,MAAa,8BAA8B;;;;;;;;;;AAW3C,SAAgB,oBAA6B;CAC3C,OAAO,QAAQ,IAAI,mBAAmB;AACxC;AAEA,SAAgB,gBAAgB,OAAuD;CACrF,IAAI,CAAC,MAAM,SAAS,OAAO,MAAM,SA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AAC;;;;;;;AAcD,SAAgB,mBAAmB,OAIkC;CACnE,MAAM,QAAQ,gBAAgB,MAAM,YAAY,MAAM,SAAS;CAC/D,IAAI,CAAC,OAAO,OAAO;CAEnB,MAAM,SAA8B,CAAC;CACrC,MAAM,SAA2B,EAAE,MAAM;CAEzC,MAAM,cAAc,WAAmB,gBAA2C;EAChF,MAAM,UAAU,MAAM,WAAW;EACjC,IAAI,YAAY,QAAW;EAC3B,MAAM,MAAM,UAAU,YAAY,GAAG;EACrC,MAAM,OAAO,UAAU,MAAM,GAAG,GAAG;EACnC,MAAM,MAAM,UAAU,MAAM,MAAM,CAAC;EACnC,MAAM,SAAS,mBAAmB,MAAM,cAAc,OAAO,GAAG,GAAG;EACnE,OAAO,KAAK;GAAE,MAAM;GAAW,IAAI;EAAO,CAAC;EAC3C,OAAO,eAAe;CACxB;CACA,WAAW,sBAAsB,iBAAiB;CAClD,WAAW,gBAAgB,KAAK;CAEhC,OAAO;EAAE;EAAQ;CAAO;AAC1B"}
@@ -26,11 +26,13 @@ declare function uiEntryFilename(input: {
26
26
  server?: boolean;
27
27
  }): string;
28
28
  /**
29
- * Serving classification for bundle objects: anything whose name carries a
30
- * content-hash segment (including hashed entrypoints like
31
- * `remoteEntry.8f3a….js`) is immutable by construction; fixed-name
32
- * entrypoints and non-hashed files a redeploy replaces in place must
33
- * revalidate.
29
+ * Serving classification for bundle objects: anything under a version
30
+ * directory (`versions/<dirId>/…`, #826) or a `versions/<id>.json` manifest
31
+ * is immutable by construction — the directory name is content-addressed and
32
+ * the upload service refuses conflicting writes under `versions/`; likewise
33
+ * any name carrying a content-hash segment (including hashed entrypoints
34
+ * like `remoteEntry.8f3a….js`). Fixed-name entrypoints and non-hashed files
35
+ * a redeploy replaces in place must revalidate.
34
36
  */
35
37
  declare function isImmutableBundlePath(name: string): boolean;
36
38
  declare function cacheControlOf(name: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"artifact-names.d.cts","names":[],"sources":["../../src/build/artifact-names.ts"],"mappings":";;;;;;cAOa;cACA;;cAEA;cACA;cACA;cACA;;;;;;;;;;iBAWG;iBAIA,gBAAgB;EAAS;EAAkB;;;;;;;;;iBAc3C,sBAAsB;iBAKtB,eAAe;;iBAOf,cAAc,kBAAkB;iBAIhC,mBAAmB,cAAc,cAAc;;iBAK/C,gBAAgB,sBAAsB;cAUzC,wBAAsB,EAAA;;;;;GAYjC,EAAA,KAAA;KACU,mBAAmB,EAAE,aAAa;UAE7B;EACf;EACA;;;;;;;;iBASc,mBAAmB;EACjC;EACA;EACA,WAAW,wBAAwB;;EAC/B,QAAQ,MAAM;EAAe,QAAQ"}
1
+ {"version":3,"file":"artifact-names.d.cts","names":[],"sources":["../../src/build/artifact-names.ts"],"mappings":";;;;;;cAOa;cACA;;cAEA;cACA;cACA;cACA;;;;;;;;;;iBAWG;iBAIA,gBAAgB;EAAS;EAAkB;;;;;;;;;;;iBAgB3C,sBAAsB;iBAMtB,eAAe;;iBAOf,cAAc,kBAAkB;iBAIhC,mBAAmB,cAAc,cAAc;;iBAK/C,gBAAgB,sBAAsB;cAUzC,wBAAsB,EAAA;;;;;GAYjC,EAAA,KAAA;KACU,mBAAmB,EAAE,aAAa;UAE7B;EACf;EACA;;;;;;;;iBASc,mBAAmB;EACjC;EACA;EACA,WAAW,wBAAwB;;EAC/B,QAAQ,MAAM;EAAe,QAAQ"}
@@ -26,11 +26,13 @@ declare function uiEntryFilename(input: {
26
26
  server?: boolean;
27
27
  }): string;
28
28
  /**
29
- * Serving classification for bundle objects: anything whose name carries a
30
- * content-hash segment (including hashed entrypoints like
31
- * `remoteEntry.8f3a….js`) is immutable by construction; fixed-name
32
- * entrypoints and non-hashed files a redeploy replaces in place must
33
- * revalidate.
29
+ * Serving classification for bundle objects: anything under a version
30
+ * directory (`versions/<dirId>/…`, #826) or a `versions/<id>.json` manifest
31
+ * is immutable by construction — the directory name is content-addressed and
32
+ * the upload service refuses conflicting writes under `versions/`; likewise
33
+ * any name carrying a content-hash segment (including hashed entrypoints
34
+ * like `remoteEntry.8f3a….js`). Fixed-name entrypoints and non-hashed files
35
+ * a redeploy replaces in place must revalidate.
34
36
  */
35
37
  declare function isImmutableBundlePath(name: string): boolean;
36
38
  declare function cacheControlOf(name: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"artifact-names.d.mts","names":[],"sources":["../../src/build/artifact-names.ts"],"mappings":";;;;;;cAOa;cACA;;cAEA;cACA;cACA;cACA;;;;;;;;;;iBAWG;iBAIA,gBAAgB;EAAS;EAAkB;;;;;;;;;iBAc3C,sBAAsB;iBAKtB,eAAe;;iBAOf,cAAc,kBAAkB;iBAIhC,mBAAmB,cAAc,cAAc;;iBAK/C,gBAAgB,sBAAsB;cAUzC,wBAAsB,EAAA;;;;;GAYjC,EAAA,KAAA;KACU,mBAAmB,EAAE,aAAa;UAE7B;EACf;EACA;;;;;;;;iBASc,mBAAmB;EACjC;EACA;EACA,WAAW,wBAAwB;;EAC/B,QAAQ,MAAM;EAAe,QAAQ"}
1
+ {"version":3,"file":"artifact-names.d.mts","names":[],"sources":["../../src/build/artifact-names.ts"],"mappings":";;;;;;cAOa;cACA;;cAEA;cACA;cACA;cACA;;;;;;;;;;iBAWG;iBAIA,gBAAgB;EAAS;EAAkB;;;;;;;;;;;iBAgB3C,sBAAsB;iBAMtB,eAAe;;iBAOf,cAAc,kBAAkB;iBAIhC,mBAAmB,cAAc,cAAc;;iBAK/C,gBAAgB,sBAAsB;cAUzC,wBAAsB,EAAA;;;;;GAYjC,EAAA,KAAA;KACU,mBAAmB,EAAE,aAAa;UAE7B;EACf;EACA;;;;;;;;iBASc,mBAAmB;EACjC;EACA;EACA,WAAW,wBAAwB;;EAC/B,QAAQ,MAAM;EAAe,QAAQ"}
@@ -31,13 +31,16 @@ function uiEntryFilename(input) {
31
31
  }
32
32
  const HASH_SEGMENT_PATTERN = /\.[a-f0-9]{8,}\./;
33
33
  /**
34
- * Serving classification for bundle objects: anything whose name carries a
35
- * content-hash segment (including hashed entrypoints like
36
- * `remoteEntry.8f3a….js`) is immutable by construction; fixed-name
37
- * entrypoints and non-hashed files a redeploy replaces in place must
38
- * revalidate.
34
+ * Serving classification for bundle objects: anything under a version
35
+ * directory (`versions/<dirId>/…`, #826) or a `versions/<id>.json` manifest
36
+ * is immutable by construction — the directory name is content-addressed and
37
+ * the upload service refuses conflicting writes under `versions/`; likewise
38
+ * any name carrying a content-hash segment (including hashed entrypoints
39
+ * like `remoteEntry.8f3a….js`). Fixed-name entrypoints and non-hashed files
40
+ * a redeploy replaces in place must revalidate.
39
41
  */
40
42
  function isImmutableBundlePath(name) {
43
+ if (name === "versions" || name.startsWith("versions/")) return true;
41
44
  const base = name.split("/").pop() ?? name;
42
45
  return HASH_SEGMENT_PATTERN.test(base);
43
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"artifact-names.mjs","names":[],"sources":["../../src/build/artifact-names.ts"],"sourcesContent":["import crypto from \"node:crypto\";\nimport { z } from \"zod\";\n\n/** Dev-mode entry names: the in-memory dev server serves these exact names,\n * and dev consumers (the host's html shell, the compose client payload, the\n * readiness probe) append them — dev has no build report to discover hashed\n * names from. */\nexport const DEV_ENTRY_FILENAME = \"remoteEntry.js\";\nexport const DEV_SERVER_ENTRY_FILENAME = \"remoteEntry.server.js\";\n/** Fixed-name build outputs that get additive immutable hashed copies. */\nexport const MF_MANIFEST_FILENAME = \"mf-manifest.json\";\nexport const STYLE_FILENAME = \"style.css\";\nexport const HASHED_ENTRY_PATTERN = \"remoteEntry.[contenthash].js\";\nexport const HASHED_SERVER_ENTRY_PATTERN = \"remoteEntry.server.[contenthash].js\";\n\n/** The dev-stack signal: everything a dev server spawns (watch or no-watch\n * one-shot builds) serves the fixed dev entry names, because every dev\n * consumer appends them and no build report exists to discover hashed names\n * from. Every other invocation — local builds, host-test production builds,\n * regression container builds, deploys — is a build and emits content-hashed\n * entries + build reports. NODE_ENV cannot carry this decision (vitest runs\n * as \"test\", bundler CLIs default \"production\" even for dev watches), and\n * DEPLOY=true only marks deploy builds — so the dev server stamps its own\n * children. */\nexport function isBuildInvocation(): boolean {\n return process.env.BOS_DEV_SERVER !== \"1\";\n}\n\nexport function uiEntryFilename(input: { isBuild: boolean; server?: boolean }): string {\n if (!input.isBuild) return input.server ? DEV_SERVER_ENTRY_FILENAME : DEV_ENTRY_FILENAME;\n return input.server ? HASHED_SERVER_ENTRY_PATTERN : HASHED_ENTRY_PATTERN;\n}\n\nconst HASH_SEGMENT_PATTERN = /\\.[a-f0-9]{8,}\\./;\n\n/**\n * Serving classification for bundle objects: anything whose name carries a\n * content-hash segment (including hashed entrypoints like\n * `remoteEntry.8f3a….js`) is immutable by construction; fixed-name\n * entrypoints and non-hashed files a redeploy replaces in place must\n * revalidate.\n */\nexport function isImmutableBundlePath(name: string): boolean {\n const base = name.split(\"/\").pop() ?? name;\n return HASH_SEGMENT_PATTERN.test(base);\n}\n\nexport function cacheControlOf(name: string): string {\n return isImmutableBundlePath(name)\n ? \"public, max-age=31536000, immutable\"\n : \"public, max-age=0, must-revalidate\";\n}\n\n/** Short content hash used to mint additive hashed copies of fixed-name artifacts. */\nexport function contentHashOf(content: string | Uint8Array): string {\n return crypto.createHash(\"sha256\").update(content).digest(\"hex\").slice(0, 16);\n}\n\nexport function hashedArtifactName(base: string, hash: string, ext: string): string {\n return `${base}.${hash}.${ext.replace(/^\\./, \"\")}`;\n}\n\n/** Find the content-hashed entry asset for a base name (\"remoteEntry\", \"remoteEntry.server\"). */\nexport function findHashedEntry(assetNames: string[], base: string): string | null {\n const hashed = assetNames.find((name) => {\n const rest = name.startsWith(`${base}.`) ? name.slice(base.length + 1) : null;\n if (rest === null) return false;\n const hash = rest.slice(0, -3);\n return name.endsWith(\".js\") && /^[a-f0-9]{8,}$/.test(hash);\n });\n return hashed ?? null;\n}\n\nexport const BuildEntryReportSchema = z.object({\n entry: z.string().min(1),\n browserManifest: z.string().min(1).optional(),\n css: z.string().min(1).optional(),\n /**\n * Shared-singleton `name → version` this build embedded — resolved from the\n * building workspace's node_modules at config time and stamped by both the\n * rspack and rsbuild build paths. The deploy leg records it into the\n * workspace's version manifest, so a slot's pin carries shared-dep\n * semantics and consumers can detect a build skew before loading (#546).\n */\n shared: z.record(z.string(), z.string()).optional(),\n});\nexport type BuildEntryReport = z.infer<typeof BuildEntryReportSchema>;\n\nexport interface ArtifactCopy {\n from: string;\n to: string;\n}\n\n/**\n * The additive-copy plan for one compiled dist root: each supplied fixed-name\n * artifact gets an immutable hashed copy. The hashed entry itself needs no\n * copy — the build report carries its name to the deploy leg. Returns null\n * when the build predates hashed entry names (only fixed names emitted).\n */\nexport function planArtifactCopies(input: {\n assetNames: string[];\n entryBase: string;\n contents?: Record<string, string | Uint8Array | undefined>;\n}): { copies: Array<ArtifactCopy>; report: BuildEntryReport } | null {\n const entry = findHashedEntry(input.assetNames, input.entryBase);\n if (!entry) return null;\n\n const copies: Array<ArtifactCopy> = [];\n const report: BuildEntryReport = { entry };\n\n const hashedCopy = (fixedName: string, reportField: \"browserManifest\" | \"css\") => {\n const content = input.contents?.[fixedName];\n if (content === undefined) return;\n const dot = fixedName.lastIndexOf(\".\");\n const base = fixedName.slice(0, dot);\n const ext = fixedName.slice(dot + 1);\n const hashed = hashedArtifactName(base, contentHashOf(content), ext);\n copies.push({ from: fixedName, to: hashed });\n report[reportField] = hashed;\n };\n hashedCopy(MF_MANIFEST_FILENAME, \"browserManifest\");\n hashedCopy(STYLE_FILENAME, \"css\");\n\n return { copies, report };\n}\n"],"mappings":";;;;;;;;AAOA,MAAa,qBAAqB;AAClC,MAAa,4BAA4B;;AAEzC,MAAa,uBAAuB;AACpC,MAAa,iBAAiB;AAC9B,MAAa,uBAAuB;AACpC,MAAa,8BAA8B;;;;;;;;;;AAW3C,SAAgB,oBAA6B;CAC3C,OAAO,QAAQ,IAAI,mBAAmB;AACxC;AAEA,SAAgB,gBAAgB,OAAuD;CACrF,IAAI,CAAC,MAAM,SAAS,OAAO,MAAM,SAAS,4BAA4B;CACtE,OAAO,MAAM,SAAS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AAI,CAAC,OAAO,OAAO;CAEnB,MAAM,SAA8B,CAAC;CACrC,MAAM,SAA2B,EAAE,MAAM;CAEzC,MAAM,cAAc,WAAmB,gBAA2C;EAChF,MAAM,UAAU,MAAM,WAAW;EACjC,IAAI,YAAY,QAAW;EAC3B,MAAM,MAAM,UAAU,YAAY,GAAG;EACrC,MAAM,OAAO,UAAU,MAAM,GAAG,GAAG;EACnC,MAAM,MAAM,UAAU,MAAM,MAAM,CAAC;EACnC,MAAM,SAAS,mBAAmB,MAAM,cAAc,OAAO,GAAG,GAAG;EACnE,OAAO,KAAK;GAAE,MAAM;GAAW,IAAI;EAAO,CAAC;EAC3C,OAAO,eAAe;CACxB;CACA,WAAW,sBAAsB,iBAAiB;CAClD,WAAW,gBAAgB,KAAK;CAEhC,OAAO;EAAE;EAAQ;CAAO;AAC1B"}
1
+ {"version":3,"file":"artifact-names.mjs","names":[],"sources":["../../src/build/artifact-names.ts"],"sourcesContent":["import crypto from \"node:crypto\";\nimport { z } from \"zod\";\n\n/** Dev-mode entry names: the in-memory dev server serves these exact names,\n * and dev consumers (the host's html shell, the compose client payload, the\n * readiness probe) append them — dev has no build report to discover hashed\n * names from. */\nexport const DEV_ENTRY_FILENAME = \"remoteEntry.js\";\nexport const DEV_SERVER_ENTRY_FILENAME = \"remoteEntry.server.js\";\n/** Fixed-name build outputs that get additive immutable hashed copies. */\nexport const MF_MANIFEST_FILENAME = \"mf-manifest.json\";\nexport const STYLE_FILENAME = \"style.css\";\nexport const HASHED_ENTRY_PATTERN = \"remoteEntry.[contenthash].js\";\nexport const HASHED_SERVER_ENTRY_PATTERN = \"remoteEntry.server.[contenthash].js\";\n\n/** The dev-stack signal: everything a dev server spawns (watch or no-watch\n * one-shot builds) serves the fixed dev entry names, because every dev\n * consumer appends them and no build report exists to discover hashed names\n * from. Every other invocation — local builds, host-test production builds,\n * regression container builds, deploys — is a build and emits content-hashed\n * entries + build reports. NODE_ENV cannot carry this decision (vitest runs\n * as \"test\", bundler CLIs default \"production\" even for dev watches), and\n * DEPLOY=true only marks deploy builds — so the dev server stamps its own\n * children. */\nexport function isBuildInvocation(): boolean {\n return process.env.BOS_DEV_SERVER !== \"1\";\n}\n\nexport function uiEntryFilename(input: { isBuild: boolean; server?: boolean }): string {\n if (!input.isBuild) return input.server ? DEV_SERVER_ENTRY_FILENAME : DEV_ENTRY_FILENAME;\n return input.server ? HASHED_SERVER_ENTRY_PATTERN : HASHED_ENTRY_PATTERN;\n}\n\nconst HASH_SEGMENT_PATTERN = /\\.[a-f0-9]{8,}\\./;\n\n/**\n * Serving classification for bundle objects: anything under a version\n * directory (`versions/<dirId>/…`, #826) or a `versions/<id>.json` manifest\n * is immutable by construction — the directory name is content-addressed and\n * the upload service refuses conflicting writes under `versions/`; likewise\n * any name carrying a content-hash segment (including hashed entrypoints\n * like `remoteEntry.8f3a….js`). Fixed-name entrypoints and non-hashed files\n * a redeploy replaces in place must revalidate.\n */\nexport function isImmutableBundlePath(name: string): boolean {\n if (name === \"versions\" || name.startsWith(\"versions/\")) return true;\n const base = name.split(\"/\").pop() ?? name;\n return HASH_SEGMENT_PATTERN.test(base);\n}\n\nexport function cacheControlOf(name: string): string {\n return isImmutableBundlePath(name)\n ? \"public, max-age=31536000, immutable\"\n : \"public, max-age=0, must-revalidate\";\n}\n\n/** Short content hash used to mint additive hashed copies of fixed-name artifacts. */\nexport function contentHashOf(content: string | Uint8Array): string {\n return crypto.createHash(\"sha256\").update(content).digest(\"hex\").slice(0, 16);\n}\n\nexport function hashedArtifactName(base: string, hash: string, ext: string): string {\n return `${base}.${hash}.${ext.replace(/^\\./, \"\")}`;\n}\n\n/** Find the content-hashed entry asset for a base name (\"remoteEntry\", \"remoteEntry.server\"). */\nexport function findHashedEntry(assetNames: string[], base: string): string | null {\n const hashed = assetNames.find((name) => {\n const rest = name.startsWith(`${base}.`) ? name.slice(base.length + 1) : null;\n if (rest === null) return false;\n const hash = rest.slice(0, -3);\n return name.endsWith(\".js\") && /^[a-f0-9]{8,}$/.test(hash);\n });\n return hashed ?? null;\n}\n\nexport const BuildEntryReportSchema = z.object({\n entry: z.string().min(1),\n browserManifest: z.string().min(1).optional(),\n css: z.string().min(1).optional(),\n /**\n * Shared-singleton `name → version` this build embedded — resolved from the\n * building workspace's node_modules at config time and stamped by both the\n * rspack and rsbuild build paths. The deploy leg records it into the\n * workspace's version manifest, so a slot's pin carries shared-dep\n * semantics and consumers can detect a build skew before loading (#546).\n */\n shared: z.record(z.string(), z.string()).optional(),\n});\nexport type BuildEntryReport = z.infer<typeof BuildEntryReportSchema>;\n\nexport interface ArtifactCopy {\n from: string;\n to: string;\n}\n\n/**\n * The additive-copy plan for one compiled dist root: each supplied fixed-name\n * artifact gets an immutable hashed copy. The hashed entry itself needs no\n * copy — the build report carries its name to the deploy leg. Returns null\n * when the build predates hashed entry names (only fixed names emitted).\n */\nexport function planArtifactCopies(input: {\n assetNames: string[];\n entryBase: string;\n contents?: Record<string, string | Uint8Array | undefined>;\n}): { copies: Array<ArtifactCopy>; report: BuildEntryReport } | null {\n const entry = findHashedEntry(input.assetNames, input.entryBase);\n if (!entry) return null;\n\n const copies: Array<ArtifactCopy> = [];\n const report: BuildEntryReport = { entry };\n\n const hashedCopy = (fixedName: string, reportField: \"browserManifest\" | \"css\") => {\n const content = input.contents?.[fixedName];\n if (content === undefined) return;\n const dot = fixedName.lastIndexOf(\".\");\n const base = fixedName.slice(0, dot);\n const ext = fixedName.slice(dot + 1);\n const hashed = hashedArtifactName(base, contentHashOf(content), ext);\n copies.push({ from: fixedName, to: hashed });\n report[reportField] = hashed;\n };\n hashedCopy(MF_MANIFEST_FILENAME, \"browserManifest\");\n hashedCopy(STYLE_FILENAME, \"css\");\n\n return { copies, report };\n}\n"],"mappings":";;;;;;;;AAOA,MAAa,qBAAqB;AAClC,MAAa,4BAA4B;;AAEzC,MAAa,uBAAuB;AACpC,MAAa,iBAAiB;AAC9B,MAAa,uBAAuB;AACpC,MAAa,8BAA8B;;;;;;;;;;AAW3C,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CAAC,CAAC,CAAC,SAAS;;;;;;;;CAQhC,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS;AACpD,CAAC;;;;;;;AAcD,SAAgB,mBAAmB,OAIkC;CACnE,MAAM,QAAQ,gBAAgB,MAAM,YAAY,MAAM,SAAS;CAC/D,IAAI,CAAC,OAAO,OAAO;CAEnB,MAAM,SAA8B,CAAC;CACrC,MAAM,SAA2B,EAAE,MAAM;CAEzC,MAAM,cAAc,WAAmB,gBAA2C;EAChF,MAAM,UAAU,MAAM,WAAW;EACjC,IAAI,YAAY,QAAW;EAC3B,MAAM,MAAM,UAAU,YAAY,GAAG;EACrC,MAAM,OAAO,UAAU,MAAM,GAAG,GAAG;EACnC,MAAM,MAAM,UAAU,MAAM,MAAM,CAAC;EACnC,MAAM,SAAS,mBAAmB,MAAM,cAAc,OAAO,GAAG,GAAG;EACnE,OAAO,KAAK;GAAE,MAAM;GAAW,IAAI;EAAO,CAAC;EAC3C,OAAO,eAAe;CACxB;CACA,WAAW,sBAAsB,iBAAiB;CAClD,WAAW,gBAAgB,KAAK;CAEhC,OAAO;EAAE;EAAQ;CAAO;AAC1B"}
@@ -65,19 +65,14 @@ export type {
65
65
  ConstructedTree,
66
66
  ConstructInput,
67
67
  ConstructPluginRef,
68
- GateUser,
69
- HostContext,
70
68
  NavManifest,
71
69
  PluginManifest,
72
70
  ResolvedPlugin,
73
71
  RouteConfigModule,
74
72
  RouteOptionsBundle,
75
73
  } from "everything-dev/ui/manifest";
76
- export {
77
- CORE_UI_PLUGIN_KEY,
78
- ComposePayloadSchema,
79
- constructTree,
80
- } from "everything-dev/ui/manifest";
74
+ export { CORE_UI_PLUGIN_KEY, ComposePayloadSchema } from "everything-dev/ui/manifest";
75
+ export { constructTree } from "everything-dev/ui/compose";
81
76
  `,
82
77
  "src/globals.gen.ts": `// GENERATED FILE — do not edit. Regenerated from the installed framework version
83
78
  // by \`bos dev\` / \`bos build\` / \`bos typecheck\` (gitignored).
@@ -1 +1 @@
1
- {"version":3,"file":"stubs.cjs","names":["join","existsSync","readFileSync","dirname"],"sources":["../../../src/build/ui/stubs.ts"],"sourcesContent":["/**\n * The core ui's generated bootstrap stubs — the mechanical files an app must\n * never author or edit (ADR 0023): the web MF entry, the `./Hydrate`\n * bootstrap, the SSR router module, the `./compose` expose, and the ambient\n * globals. Emitted into the ui source root by the framework's code-artifact\n * generation pass, regenerated from the installed package version, and\n * gitignored (`*.gen.*`) — never synced, never hand-maintained.\n *\n * The generated hydrate/SSR stubs wire the app's AUTHORED seams into the\n * framework machinery: the router policy factory (`src/router.tsx`) and the\n * app override exports from `src/app.ts` (`apiConnectionError`, `appLocale`).\n * The seam files are scaffolded once by `bos init` and owned by the app; the\n * stubs themselves carry zero app-specific content.\n */\n\nimport { existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { dirname, join } from \"node:path\";\n\nexport const CORE_UI_STUBS: Record<string, string> = {\n \"src/entry.gen.ts\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nimport \"./styles.css\";\nimport { runEntry } from \"everything-dev/ui/entry\";\n\nrunEntry(() => import(\"./hydrate.gen\"));\n`,\n \"src/hydrate.gen.tsx\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nimport \"./styles.css\";\nimport { hydrate as coreHydrate } from \"everything-dev/ui/hydrate\";\nimport { apiConnectionError } from \"./app\";\nimport { createQueryClient, createRouter } from \"./router\";\n\nexport function hydrate() {\n return coreHydrate({\n routeConfig: () => import(\"./routeConfig.gen\"),\n manifest: () => import(\"./manifest.gen.json\"),\n createRouter,\n createQueryClient,\n apiConnectionError,\n });\n}\n\nexport default hydrate;\n`,\n \"src/router.server.gen.tsx\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nimport { createServerRouterModule } from \"everything-dev/ui/router-server\";\nimport { appLocale } from \"./app\";\nimport { createQueryClient, createRouter } from \"./router\";\nimport { routeTree } from \"./routeTree.gen\";\n\nconst routerModule = createServerRouterModule({\n defaultRouteTree: routeTree,\n createRouter,\n createQueryClient,\n locale: appLocale,\n});\n\nexport default routerModule;\n`,\n \"src/compose.gen.ts\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nexport type {\n ConstructedTree,\n ConstructInput,\n ConstructPluginRef,\n GateUser,\n HostContext,\n NavManifest,\n PluginManifest,\n ResolvedPlugin,\n RouteConfigModule,\n RouteOptionsBundle,\n} from \"everything-dev/ui/manifest\";\nexport {\n CORE_UI_PLUGIN_KEY,\n ComposePayloadSchema,\n constructTree,\n} from \"everything-dev/ui/manifest\";\n`,\n \"src/globals.gen.ts\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\n/// <reference types=\"@rsbuild/core/types\" />\n`,\n};\n\n/**\n * Emits the stub set into the ui source root. Returns the stub paths whose\n * content actually changed (empty when everything is already current) — the\n * same-content suppression keeps dev watchers from regen loops.\n */\nexport function emitCoreUiStubs(uiRoot: string): string[] {\n const written: string[] = [];\n for (const [relPath, content] of Object.entries(CORE_UI_STUBS)) {\n const fullPath = join(uiRoot, relPath);\n if (existsSync(fullPath) && readFileSync(fullPath, \"utf-8\") === content) continue;\n mkdirSync(dirname(fullPath), { recursive: true });\n writeFileSync(fullPath, content);\n written.push(relPath);\n }\n return written;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAa,gBAAwC;CACnD,oBAAoB;;;;;;;CAOpB,uBAAuB;;;;;;;;;;;;;;;;;;;CAmBvB,6BAA6B;;;;;;;;;;;;;;;;CAgB7B,sBAAsB;;;;;;;;;;;;;;;;;;;;CAoBtB,sBAAsB;;;;AAIxB;;;;;;AAOA,SAAgB,gBAAgB,QAA0B;CACxD,MAAM,UAAoB,CAAC;CAC3B,KAAK,MAAM,CAAC,SAAS,YAAY,OAAO,QAAQ,aAAa,GAAG;EAC9D,MAAM,eAAWA,gBAAK,QAAQ,OAAO;EACrC,QAAIC,oBAAW,QAAQ,SAAKC,sBAAa,UAAU,OAAO,MAAM,SAAS;EACzE,2BAAUC,mBAAQ,QAAQ,GAAG,EAAE,WAAW,KAAK,CAAC;EAChD,2BAAc,UAAU,OAAO;EAC/B,QAAQ,KAAK,OAAO;CACtB;CACA,OAAO;AACT"}
1
+ {"version":3,"file":"stubs.cjs","names":["join","existsSync","readFileSync","dirname"],"sources":["../../../src/build/ui/stubs.ts"],"sourcesContent":["/**\n * The core ui's generated bootstrap stubs — the mechanical files an app must\n * never author or edit (ADR 0023): the web MF entry, the `./Hydrate`\n * bootstrap, the SSR router module, the `./compose` expose, and the ambient\n * globals. Emitted into the ui source root by the framework's code-artifact\n * generation pass, regenerated from the installed package version, and\n * gitignored (`*.gen.*`) — never synced, never hand-maintained.\n *\n * The generated hydrate/SSR stubs wire the app's AUTHORED seams into the\n * framework machinery: the router policy factory (`src/router.tsx`) and the\n * app override exports from `src/app.ts` (`apiConnectionError`, `appLocale`).\n * The seam files are scaffolded once by `bos init` and owned by the app; the\n * stubs themselves carry zero app-specific content.\n */\n\nimport { existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { dirname, join } from \"node:path\";\n\nexport const CORE_UI_STUBS: Record<string, string> = {\n \"src/entry.gen.ts\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nimport \"./styles.css\";\nimport { runEntry } from \"everything-dev/ui/entry\";\n\nrunEntry(() => import(\"./hydrate.gen\"));\n`,\n \"src/hydrate.gen.tsx\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nimport \"./styles.css\";\nimport { hydrate as coreHydrate } from \"everything-dev/ui/hydrate\";\nimport { apiConnectionError } from \"./app\";\nimport { createQueryClient, createRouter } from \"./router\";\n\nexport function hydrate() {\n return coreHydrate({\n routeConfig: () => import(\"./routeConfig.gen\"),\n manifest: () => import(\"./manifest.gen.json\"),\n createRouter,\n createQueryClient,\n apiConnectionError,\n });\n}\n\nexport default hydrate;\n`,\n \"src/router.server.gen.tsx\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nimport { createServerRouterModule } from \"everything-dev/ui/router-server\";\nimport { appLocale } from \"./app\";\nimport { createQueryClient, createRouter } from \"./router\";\nimport { routeTree } from \"./routeTree.gen\";\n\nconst routerModule = createServerRouterModule({\n defaultRouteTree: routeTree,\n createRouter,\n createQueryClient,\n locale: appLocale,\n});\n\nexport default routerModule;\n`,\n \"src/compose.gen.ts\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nexport type {\n ConstructedTree,\n ConstructInput,\n ConstructPluginRef,\n NavManifest,\n PluginManifest,\n ResolvedPlugin,\n RouteConfigModule,\n RouteOptionsBundle,\n} from \"everything-dev/ui/manifest\";\nexport { CORE_UI_PLUGIN_KEY, ComposePayloadSchema } from \"everything-dev/ui/manifest\";\nexport { constructTree } from \"everything-dev/ui/compose\";\n`,\n \"src/globals.gen.ts\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\n/// <reference types=\"@rsbuild/core/types\" />\n`,\n};\n\n/**\n * Emits the stub set into the ui source root. Returns the stub paths whose\n * content actually changed (empty when everything is already current) — the\n * same-content suppression keeps dev watchers from regen loops.\n */\nexport function emitCoreUiStubs(uiRoot: string): string[] {\n const written: string[] = [];\n for (const [relPath, content] of Object.entries(CORE_UI_STUBS)) {\n const fullPath = join(uiRoot, relPath);\n if (existsSync(fullPath) && readFileSync(fullPath, \"utf-8\") === content) continue;\n mkdirSync(dirname(fullPath), { recursive: true });\n writeFileSync(fullPath, content);\n written.push(relPath);\n }\n return written;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAa,gBAAwC;CACnD,oBAAoB;;;;;;;CAOpB,uBAAuB;;;;;;;;;;;;;;;;;;;CAmBvB,6BAA6B;;;;;;;;;;;;;;;;CAgB7B,sBAAsB;;;;;;;;;;;;;;;CAetB,sBAAsB;;;;AAIxB;;;;;;AAOA,SAAgB,gBAAgB,QAA0B;CACxD,MAAM,UAAoB,CAAC;CAC3B,KAAK,MAAM,CAAC,SAAS,YAAY,OAAO,QAAQ,aAAa,GAAG;EAC9D,MAAM,eAAWA,gBAAK,QAAQ,OAAO;EACrC,QAAIC,oBAAW,QAAQ,SAAKC,sBAAa,UAAU,OAAO,MAAM,SAAS;EACzE,2BAAUC,mBAAQ,QAAQ,GAAG,EAAE,WAAW,KAAK,CAAC;EAChD,2BAAc,UAAU,OAAO;EAC/B,QAAQ,KAAK,OAAO;CACtB;CACA,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"stubs.d.cts","names":[],"sources":["../../../src/build/ui/stubs.ts"],"mappings":";;;;;;;;;;;;;;;cAkBa,eAAe;;;;;;iBA0EZ,gBAAgB"}
1
+ {"version":3,"file":"stubs.d.cts","names":[],"sources":["../../../src/build/ui/stubs.ts"],"mappings":";;;;;;;;;;;;;;;cAkBa,eAAe;;;;;;iBAqEZ,gBAAgB"}
@@ -1 +1 @@
1
- {"version":3,"file":"stubs.d.mts","names":[],"sources":["../../../src/build/ui/stubs.ts"],"mappings":";;;;;;;;;;;;;;;cAkBa,eAAe;;;;;;iBA0EZ,gBAAgB"}
1
+ {"version":3,"file":"stubs.d.mts","names":[],"sources":["../../../src/build/ui/stubs.ts"],"mappings":";;;;;;;;;;;;;;;cAkBa,eAAe;;;;;;iBAqEZ,gBAAgB"}
@@ -65,19 +65,14 @@ export type {
65
65
  ConstructedTree,
66
66
  ConstructInput,
67
67
  ConstructPluginRef,
68
- GateUser,
69
- HostContext,
70
68
  NavManifest,
71
69
  PluginManifest,
72
70
  ResolvedPlugin,
73
71
  RouteConfigModule,
74
72
  RouteOptionsBundle,
75
73
  } from "everything-dev/ui/manifest";
76
- export {
77
- CORE_UI_PLUGIN_KEY,
78
- ComposePayloadSchema,
79
- constructTree,
80
- } from "everything-dev/ui/manifest";
74
+ export { CORE_UI_PLUGIN_KEY, ComposePayloadSchema } from "everything-dev/ui/manifest";
75
+ export { constructTree } from "everything-dev/ui/compose";
81
76
  `,
82
77
  "src/globals.gen.ts": `// GENERATED FILE — do not edit. Regenerated from the installed framework version
83
78
  // by \`bos dev\` / \`bos build\` / \`bos typecheck\` (gitignored).
@@ -1 +1 @@
1
- {"version":3,"file":"stubs.mjs","names":[],"sources":["../../../src/build/ui/stubs.ts"],"sourcesContent":["/**\n * The core ui's generated bootstrap stubs — the mechanical files an app must\n * never author or edit (ADR 0023): the web MF entry, the `./Hydrate`\n * bootstrap, the SSR router module, the `./compose` expose, and the ambient\n * globals. Emitted into the ui source root by the framework's code-artifact\n * generation pass, regenerated from the installed package version, and\n * gitignored (`*.gen.*`) — never synced, never hand-maintained.\n *\n * The generated hydrate/SSR stubs wire the app's AUTHORED seams into the\n * framework machinery: the router policy factory (`src/router.tsx`) and the\n * app override exports from `src/app.ts` (`apiConnectionError`, `appLocale`).\n * The seam files are scaffolded once by `bos init` and owned by the app; the\n * stubs themselves carry zero app-specific content.\n */\n\nimport { existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { dirname, join } from \"node:path\";\n\nexport const CORE_UI_STUBS: Record<string, string> = {\n \"src/entry.gen.ts\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nimport \"./styles.css\";\nimport { runEntry } from \"everything-dev/ui/entry\";\n\nrunEntry(() => import(\"./hydrate.gen\"));\n`,\n \"src/hydrate.gen.tsx\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nimport \"./styles.css\";\nimport { hydrate as coreHydrate } from \"everything-dev/ui/hydrate\";\nimport { apiConnectionError } from \"./app\";\nimport { createQueryClient, createRouter } from \"./router\";\n\nexport function hydrate() {\n return coreHydrate({\n routeConfig: () => import(\"./routeConfig.gen\"),\n manifest: () => import(\"./manifest.gen.json\"),\n createRouter,\n createQueryClient,\n apiConnectionError,\n });\n}\n\nexport default hydrate;\n`,\n \"src/router.server.gen.tsx\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nimport { createServerRouterModule } from \"everything-dev/ui/router-server\";\nimport { appLocale } from \"./app\";\nimport { createQueryClient, createRouter } from \"./router\";\nimport { routeTree } from \"./routeTree.gen\";\n\nconst routerModule = createServerRouterModule({\n defaultRouteTree: routeTree,\n createRouter,\n createQueryClient,\n locale: appLocale,\n});\n\nexport default routerModule;\n`,\n \"src/compose.gen.ts\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nexport type {\n ConstructedTree,\n ConstructInput,\n ConstructPluginRef,\n GateUser,\n HostContext,\n NavManifest,\n PluginManifest,\n ResolvedPlugin,\n RouteConfigModule,\n RouteOptionsBundle,\n} from \"everything-dev/ui/manifest\";\nexport {\n CORE_UI_PLUGIN_KEY,\n ComposePayloadSchema,\n constructTree,\n} from \"everything-dev/ui/manifest\";\n`,\n \"src/globals.gen.ts\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\n/// <reference types=\"@rsbuild/core/types\" />\n`,\n};\n\n/**\n * Emits the stub set into the ui source root. Returns the stub paths whose\n * content actually changed (empty when everything is already current) — the\n * same-content suppression keeps dev watchers from regen loops.\n */\nexport function emitCoreUiStubs(uiRoot: string): string[] {\n const written: string[] = [];\n for (const [relPath, content] of Object.entries(CORE_UI_STUBS)) {\n const fullPath = join(uiRoot, relPath);\n if (existsSync(fullPath) && readFileSync(fullPath, \"utf-8\") === content) continue;\n mkdirSync(dirname(fullPath), { recursive: true });\n writeFileSync(fullPath, content);\n written.push(relPath);\n }\n return written;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAa,gBAAwC;CACnD,oBAAoB;;;;;;;CAOpB,uBAAuB;;;;;;;;;;;;;;;;;;;CAmBvB,6BAA6B;;;;;;;;;;;;;;;;CAgB7B,sBAAsB;;;;;;;;;;;;;;;;;;;;CAoBtB,sBAAsB;;;;AAIxB;;;;;;AAOA,SAAgB,gBAAgB,QAA0B;CACxD,MAAM,UAAoB,CAAC;CAC3B,KAAK,MAAM,CAAC,SAAS,YAAY,OAAO,QAAQ,aAAa,GAAG;EAC9D,MAAM,WAAW,KAAK,QAAQ,OAAO;EACrC,IAAI,WAAW,QAAQ,KAAK,aAAa,UAAU,OAAO,MAAM,SAAS;EACzE,UAAU,QAAQ,QAAQ,GAAG,EAAE,WAAW,KAAK,CAAC;EAChD,cAAc,UAAU,OAAO;EAC/B,QAAQ,KAAK,OAAO;CACtB;CACA,OAAO;AACT"}
1
+ {"version":3,"file":"stubs.mjs","names":[],"sources":["../../../src/build/ui/stubs.ts"],"sourcesContent":["/**\n * The core ui's generated bootstrap stubs — the mechanical files an app must\n * never author or edit (ADR 0023): the web MF entry, the `./Hydrate`\n * bootstrap, the SSR router module, the `./compose` expose, and the ambient\n * globals. Emitted into the ui source root by the framework's code-artifact\n * generation pass, regenerated from the installed package version, and\n * gitignored (`*.gen.*`) — never synced, never hand-maintained.\n *\n * The generated hydrate/SSR stubs wire the app's AUTHORED seams into the\n * framework machinery: the router policy factory (`src/router.tsx`) and the\n * app override exports from `src/app.ts` (`apiConnectionError`, `appLocale`).\n * The seam files are scaffolded once by `bos init` and owned by the app; the\n * stubs themselves carry zero app-specific content.\n */\n\nimport { existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { dirname, join } from \"node:path\";\n\nexport const CORE_UI_STUBS: Record<string, string> = {\n \"src/entry.gen.ts\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nimport \"./styles.css\";\nimport { runEntry } from \"everything-dev/ui/entry\";\n\nrunEntry(() => import(\"./hydrate.gen\"));\n`,\n \"src/hydrate.gen.tsx\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nimport \"./styles.css\";\nimport { hydrate as coreHydrate } from \"everything-dev/ui/hydrate\";\nimport { apiConnectionError } from \"./app\";\nimport { createQueryClient, createRouter } from \"./router\";\n\nexport function hydrate() {\n return coreHydrate({\n routeConfig: () => import(\"./routeConfig.gen\"),\n manifest: () => import(\"./manifest.gen.json\"),\n createRouter,\n createQueryClient,\n apiConnectionError,\n });\n}\n\nexport default hydrate;\n`,\n \"src/router.server.gen.tsx\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nimport { createServerRouterModule } from \"everything-dev/ui/router-server\";\nimport { appLocale } from \"./app\";\nimport { createQueryClient, createRouter } from \"./router\";\nimport { routeTree } from \"./routeTree.gen\";\n\nconst routerModule = createServerRouterModule({\n defaultRouteTree: routeTree,\n createRouter,\n createQueryClient,\n locale: appLocale,\n});\n\nexport default routerModule;\n`,\n \"src/compose.gen.ts\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nexport type {\n ConstructedTree,\n ConstructInput,\n ConstructPluginRef,\n NavManifest,\n PluginManifest,\n ResolvedPlugin,\n RouteConfigModule,\n RouteOptionsBundle,\n} from \"everything-dev/ui/manifest\";\nexport { CORE_UI_PLUGIN_KEY, ComposePayloadSchema } from \"everything-dev/ui/manifest\";\nexport { constructTree } from \"everything-dev/ui/compose\";\n`,\n \"src/globals.gen.ts\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\n/// <reference types=\"@rsbuild/core/types\" />\n`,\n};\n\n/**\n * Emits the stub set into the ui source root. Returns the stub paths whose\n * content actually changed (empty when everything is already current) — the\n * same-content suppression keeps dev watchers from regen loops.\n */\nexport function emitCoreUiStubs(uiRoot: string): string[] {\n const written: string[] = [];\n for (const [relPath, content] of Object.entries(CORE_UI_STUBS)) {\n const fullPath = join(uiRoot, relPath);\n if (existsSync(fullPath) && readFileSync(fullPath, \"utf-8\") === content) continue;\n mkdirSync(dirname(fullPath), { recursive: true });\n writeFileSync(fullPath, content);\n written.push(relPath);\n }\n return written;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAa,gBAAwC;CACnD,oBAAoB;;;;;;;CAOpB,uBAAuB;;;;;;;;;;;;;;;;;;;CAmBvB,6BAA6B;;;;;;;;;;;;;;;;CAgB7B,sBAAsB;;;;;;;;;;;;;;;CAetB,sBAAsB;;;;AAIxB;;;;;;AAOA,SAAgB,gBAAgB,QAA0B;CACxD,MAAM,UAAoB,CAAC;CAC3B,KAAK,MAAM,CAAC,SAAS,YAAY,OAAO,QAAQ,aAAa,GAAG;EAC9D,MAAM,WAAW,KAAK,QAAQ,OAAO;EACrC,IAAI,WAAW,QAAQ,KAAK,aAAa,UAAU,OAAO,MAAM,SAAS;EACzE,UAAU,QAAQ,QAAQ,GAAG,EAAE,WAAW,KAAK,CAAC;EAChD,cAAc,UAAU,OAAO;EAC/B,QAAQ,KAAK,OAAO;CACtB;CACA,OAAO;AACT"}
package/dist/errors.cjs CHANGED
@@ -69,6 +69,13 @@ const NOT_FOUND = {
69
69
  resourceId: zod.z.string().optional()
70
70
  })
71
71
  };
72
+ const CONFLICT = {
73
+ status: 409,
74
+ data: zod.z.object({
75
+ resource: zod.z.string().optional(),
76
+ detail: zod.z.string().optional()
77
+ })
78
+ };
72
79
  const FORBIDDEN = {
73
80
  status: 403,
74
81
  data: zod.z.object({
@@ -103,6 +110,7 @@ const PluginErrors = {
103
110
  SERVICE_UNAVAILABLE,
104
111
  BAD_REQUEST,
105
112
  NOT_FOUND,
113
+ CONFLICT,
106
114
  FORBIDDEN,
107
115
  TIMEOUT,
108
116
  CONNECTION_ERROR
@@ -119,11 +127,13 @@ const PluginErrors = {
119
127
  const PLUGIN_ERROR_STATUS_MAP = {
120
128
  ..._orpc_server.COMMON_ERROR_STATUS_MAP,
121
129
  TIMEOUT: 504,
122
- CONNECTION_ERROR: 502
130
+ CONNECTION_ERROR: 502,
131
+ CONFLICT: 409
123
132
  };
124
133
 
125
134
  //#endregion
126
135
  exports.BAD_REQUEST = BAD_REQUEST;
136
+ exports.CONFLICT = CONFLICT;
127
137
  exports.CONNECTION_ERROR = CONNECTION_ERROR;
128
138
  exports.FORBIDDEN = FORBIDDEN;
129
139
  exports.ModuleFederationError = require_errors.ModuleFederationError;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.cjs","names":["z","COMMON_ERROR_STATUS_MAP"],"sources":["../src/errors.ts"],"sourcesContent":["import { COMMON_ERROR_STATUS_MAP } from \"@orpc/server\";\nimport { z } from \"zod\";\n\n/**\n * Common error schemas for plugin contracts.\n * Import individually or use the grouped PluginErrors export.\n *\n * @example\n * ```typescript\n * import { NOT_FOUND, FORBIDDEN, UNAUTHORIZED } from \"every-plugin/errors\";\n *\n * export const contract = oc.router({\n * getData: oc.route(...)\n * .errors({ NOT_FOUND, FORBIDDEN, UNAUTHORIZED })\n * });\n * ```\n */\n\nexport const UNAUTHORIZED = {\n status: 401,\n data: z.object({\n apiKeyProvided: z.boolean(),\n provider: z.string().optional(),\n authType: z.enum([\"apiKey\", \"oauth\", \"token\"]).optional(),\n }),\n} as const;\n\nexport const RATE_LIMITED = {\n status: 429,\n data: z.object({\n retryAfter: z.number().int().min(1),\n remainingRequests: z.number().int().min(0).optional(),\n resetTime: z.string().datetime().optional(),\n limitType: z.enum([\"requests\", \"tokens\", \"bandwidth\"]).optional(),\n }),\n} as const;\n\nexport const SERVICE_UNAVAILABLE = {\n status: 503,\n data: z.object({\n retryAfter: z.number().int().optional(),\n maintenanceWindow: z.boolean().default(false),\n estimatedUptime: z.string().datetime().optional(),\n }),\n} as const;\n\nexport const BAD_REQUEST = {\n status: 400,\n data: z.object({\n invalidFields: z.array(z.string()).optional(),\n validationErrors: z\n .array(\n z.object({\n field: z.string(),\n message: z.string(),\n code: z.string().optional(),\n }),\n )\n .optional(),\n }),\n} as const;\n\nexport const NOT_FOUND = {\n status: 404,\n data: z.object({\n resource: z.string().optional(),\n resourceId: z.string().optional(),\n }),\n} as const;\n\nexport const FORBIDDEN = {\n status: 403,\n data: z.object({\n requiredPermissions: z.array(z.string()).optional(),\n action: z.string().optional(),\n }),\n} as const;\n\nexport const TIMEOUT = {\n status: 504,\n data: z.object({\n timeoutMs: z.number().int().min(0).optional(),\n operation: z.string().optional(),\n retryable: z.boolean().default(true),\n }),\n} as const;\n\nexport const CONNECTION_ERROR = {\n status: 502,\n data: z.object({\n errorCode: z.string().optional(),\n host: z.string().optional(),\n port: z.number().int().optional(),\n suggestion: z.string().optional(),\n }),\n} as const;\n\n/**\n * Grouped export for all plugin errors.\n * Use individual imports for cleaner code.\n */\nexport const PluginErrors = {\n UNAUTHORIZED,\n RATE_LIMITED,\n SERVICE_UNAVAILABLE,\n BAD_REQUEST,\n NOT_FOUND,\n FORBIDDEN,\n TIMEOUT,\n CONNECTION_ERROR,\n} as const;\n\n/**\n * Error-code -> HTTP-status map for handlers.\n *\n * oRPC v2 resolves statuses at the handler boundary via `errorStatusMap`\n * (default `COMMON_ERROR_STATUS_MAP`, where TIMEOUT is 408). Providing a\n * map REPLACES the default entirely, so the standard codes must be spread\n * back in. These custom entries preserve the v1 wire behavior:\n * TIMEOUT -> 504, CONNECTION_ERROR -> 502.\n */\nexport const PLUGIN_ERROR_STATUS_MAP: Record<string, number> = {\n ...COMMON_ERROR_STATUS_MAP,\n TIMEOUT: 504,\n CONNECTION_ERROR: 502,\n} as const;\n\nexport type { PluginLoadFailureInfo, PluginWarningInfo } from \"./runtime/errors\";\nexport {\n classifyPluginFailure,\n defaultMissingSecretWarnings,\n extractFromFiberFailure,\n formatORPCError,\n ModuleFederationError,\n PluginRuntimeError,\n toPluginRuntimeError,\n ValidationError,\n wrapORPCError,\n} from \"./runtime/errors\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkBA,MAAa,eAAe;CAC1B,QAAQ;CACR,MAAMA,MAAE,OAAO;EACb,gBAAgBA,MAAE,QAAQ;EAC1B,UAAUA,MAAE,OAAO,CAAC,CAAC,SAAS;EAC9B,UAAUA,MAAE,KAAK;GAAC;GAAU;GAAS;EAAO,CAAC,CAAC,CAAC,SAAS;CAC1D,CAAC;AACH;AAEA,MAAa,eAAe;CAC1B,QAAQ;CACR,MAAMA,MAAE,OAAO;EACb,YAAYA,MAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;EAClC,mBAAmBA,MAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;EACpD,WAAWA,MAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC1C,WAAWA,MAAE,KAAK;GAAC;GAAY;GAAU;EAAW,CAAC,CAAC,CAAC,SAAS;CAClE,CAAC;AACH;AAEA,MAAa,sBAAsB;CACjC,QAAQ;CACR,MAAMA,MAAE,OAAO;EACb,YAAYA,MAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;EACtC,mBAAmBA,MAAE,QAAQ,C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AAC,CAAC,SAAS;CAClC,CAAC;AACH;;;;;AAMA,MAAa,eAAe;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;;;AAWA,MAAa,0BAAkD;CAC7D,GAAGC;CACH,SAAS;CACT,kBAAkB;AACpB"}
1
+ {"version":3,"file":"errors.cjs","names":["z","COMMON_ERROR_STATUS_MAP"],"sources":["../src/errors.ts"],"sourcesContent":["import { COMMON_ERROR_STATUS_MAP } from \"@orpc/server\";\nimport { z } from \"zod\";\n\n/**\n * Common error schemas for plugin contracts.\n * Import individually or use the grouped PluginErrors export.\n *\n * @example\n * ```typescript\n * import { NOT_FOUND, FORBIDDEN, UNAUTHORIZED } from \"every-plugin/errors\";\n *\n * export const contract = oc.router({\n * getData: oc.route(...)\n * .errors({ NOT_FOUND, FORBIDDEN, UNAUTHORIZED })\n * });\n * ```\n */\n\nexport const UNAUTHORIZED = {\n status: 401,\n data: z.object({\n apiKeyProvided: z.boolean(),\n provider: z.string().optional(),\n authType: z.enum([\"apiKey\", \"oauth\", \"token\"]).optional(),\n }),\n} as const;\n\nexport const RATE_LIMITED = {\n status: 429,\n data: z.object({\n retryAfter: z.number().int().min(1),\n remainingRequests: z.number().int().min(0).optional(),\n resetTime: z.string().datetime().optional(),\n limitType: z.enum([\"requests\", \"tokens\", \"bandwidth\"]).optional(),\n }),\n} as const;\n\nexport const SERVICE_UNAVAILABLE = {\n status: 503,\n data: z.object({\n retryAfter: z.number().int().optional(),\n maintenanceWindow: z.boolean().default(false),\n estimatedUptime: z.string().datetime().optional(),\n }),\n} as const;\n\nexport const BAD_REQUEST = {\n status: 400,\n data: z.object({\n invalidFields: z.array(z.string()).optional(),\n validationErrors: z\n .array(\n z.object({\n field: z.string(),\n message: z.string(),\n code: z.string().optional(),\n }),\n )\n .optional(),\n }),\n} as const;\n\nexport const NOT_FOUND = {\n status: 404,\n data: z.object({\n resource: z.string().optional(),\n resourceId: z.string().optional(),\n }),\n} as const;\n\nexport const CONFLICT = {\n status: 409,\n data: z.object({\n resource: z.string().optional(),\n detail: z.string().optional(),\n }),\n} as const;\n\nexport const FORBIDDEN = {\n status: 403,\n data: z.object({\n requiredPermissions: z.array(z.string()).optional(),\n action: z.string().optional(),\n }),\n} as const;\n\nexport const TIMEOUT = {\n status: 504,\n data: z.object({\n timeoutMs: z.number().int().min(0).optional(),\n operation: z.string().optional(),\n retryable: z.boolean().default(true),\n }),\n} as const;\n\nexport const CONNECTION_ERROR = {\n status: 502,\n data: z.object({\n errorCode: z.string().optional(),\n host: z.string().optional(),\n port: z.number().int().optional(),\n suggestion: z.string().optional(),\n }),\n} as const;\n\n/**\n * Grouped export for all plugin errors.\n * Use individual imports for cleaner code.\n */\nexport const PluginErrors = {\n UNAUTHORIZED,\n RATE_LIMITED,\n SERVICE_UNAVAILABLE,\n BAD_REQUEST,\n NOT_FOUND,\n CONFLICT,\n FORBIDDEN,\n TIMEOUT,\n CONNECTION_ERROR,\n} as const;\n\n/**\n * Error-code -> HTTP-status map for handlers.\n *\n * oRPC v2 resolves statuses at the handler boundary via `errorStatusMap`\n * (default `COMMON_ERROR_STATUS_MAP`, where TIMEOUT is 408). Providing a\n * map REPLACES the default entirely, so the standard codes must be spread\n * back in. These custom entries preserve the v1 wire behavior:\n * TIMEOUT -> 504, CONNECTION_ERROR -> 502.\n */\nexport const PLUGIN_ERROR_STATUS_MAP: Record<string, number> = {\n ...COMMON_ERROR_STATUS_MAP,\n TIMEOUT: 504,\n CONNECTION_ERROR: 502,\n CONFLICT: 409,\n} as const;\n\nexport type { PluginLoadFailureInfo, PluginWarningInfo } from \"./runtime/errors\";\nexport {\n classifyPluginFailure,\n defaultMissingSecretWarnings,\n extractFromFiberFailure,\n formatORPCError,\n ModuleFederationError,\n PluginRuntimeError,\n toPluginRuntimeError,\n ValidationError,\n wrapORPCError,\n} from \"./runtime/errors\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkBA,MAAa,eAAe;CAC1B,QAAQ;CACR,MAAMA,M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;CAClC,CAAC;AACH;AAEA,MAAa,WAAW;CACtB,QAAQ;CACR,MAAMA,MAAE,OAAO;EACb,UAAUA,MAAE,OAAO,CAAC,CAAC,SAAS;EAC9B,QAAQA,MAAE,OAAO,CAAC,CAAC,SAAS;CAC9B,CAAC;AACH;AAEA,MAAa,YAAY;CACvB,QAAQ;CACR,MAAMA,MAAE,OAAO;EACb,qBAAqBA,MAAE,MAAMA,MAAE,OAAO,CAAC,CAAC,CAAC,SAAS;EAClD,QAAQA,MAAE,OAAO,CAAC,CAAC,SAAS;CAC9B,CAAC;AACH;AAEA,MAAa,UAAU;CACrB,QAAQ;CACR,MAAMA,MAAE,OAAO;EACb,WAAWA,MAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;EAC5C,WAAWA,MAAE,OAAO,CAAC,CAAC,SAAS;EAC/B,WAAWA,MAAE,QAAQ,CAAC,CAAC,QAAQ,IAAI;CACrC,CAAC;AACH;AAEA,MAAa,mBAAmB;CAC9B,QAAQ;CACR,MAAMA,MAAE,OAAO;EACb,WAAWA,MAAE,OAAO,CAAC,CAAC,SAAS;EAC/B,MAAMA,MAAE,OAAO,CAAC,CAAC,SAAS;EAC1B,MAAMA,MAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;EAChC,YAAYA,MAAE,OAAO,CAAC,CAAC,SAAS;CAClC,CAAC;AACH;;;;;AAMA,MAAa,eAAe;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;;;AAWA,MAAa,0BAAkD;CAC7D,GAAGC;CACH,SAAS;CACT,kBAAkB;CAClB,UAAU;AACZ"}
package/dist/errors.d.cts CHANGED
@@ -66,6 +66,13 @@ declare const NOT_FOUND: {
66
66
  resourceId: z.ZodOptional<z.ZodString>;
67
67
  }, z.core.$strip>;
68
68
  };
69
+ declare const CONFLICT: {
70
+ readonly status: 409;
71
+ readonly data: z.ZodObject<{
72
+ resource: z.ZodOptional<z.ZodString>;
73
+ detail: z.ZodOptional<z.ZodString>;
74
+ }, z.core.$strip>;
75
+ };
69
76
  declare const FORBIDDEN: {
70
77
  readonly status: 403;
71
78
  readonly data: z.ZodObject<{
@@ -146,6 +153,13 @@ declare const PluginErrors: {
146
153
  resourceId: z.ZodOptional<z.ZodString>;
147
154
  }, z.core.$strip>;
148
155
  };
156
+ readonly CONFLICT: {
157
+ readonly status: 409;
158
+ readonly data: z.ZodObject<{
159
+ resource: z.ZodOptional<z.ZodString>;
160
+ detail: z.ZodOptional<z.ZodString>;
161
+ }, z.core.$strip>;
162
+ };
149
163
  readonly FORBIDDEN: {
150
164
  readonly status: 403;
151
165
  readonly data: z.ZodObject<{
@@ -182,5 +196,5 @@ declare const PluginErrors: {
182
196
  */
183
197
  declare const PLUGIN_ERROR_STATUS_MAP: Record<string, number>;
184
198
  //#endregion
185
- export { BAD_REQUEST, CONNECTION_ERROR, FORBIDDEN, ModuleFederationError, NOT_FOUND, PLUGIN_ERROR_STATUS_MAP, PluginErrors, type PluginLoadFailureInfo, PluginRuntimeError, type PluginWarningInfo, RATE_LIMITED, SERVICE_UNAVAILABLE, TIMEOUT, UNAUTHORIZED, ValidationError, classifyPluginFailure, defaultMissingSecretWarnings, extractFromFiberFailure, formatORPCError, toPluginRuntimeError, wrapORPCError };
199
+ export { BAD_REQUEST, CONFLICT, CONNECTION_ERROR, FORBIDDEN, ModuleFederationError, NOT_FOUND, PLUGIN_ERROR_STATUS_MAP, PluginErrors, type PluginLoadFailureInfo, PluginRuntimeError, type PluginWarningInfo, RATE_LIMITED, SERVICE_UNAVAILABLE, TIMEOUT, UNAUTHORIZED, ValidationError, classifyPluginFailure, defaultMissingSecretWarnings, extractFromFiberFailure, formatORPCError, toPluginRuntimeError, wrapORPCError };
186
200
  //# sourceMappingURL=errors.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.cts","names":[],"sources":["../src/errors.ts"],"mappings":";;;;;;;;;;;;;;;;;cAkBa;WACX;WACA,MAAI,EAAA;;;;;;;;;;cAOO;WACX;WACA,MAAI,EAAA;;;;;;;;;;;cAQO;WACX;WACA,MAAI,EAAA;;;;;;cAOO;WACX;WACA,MAAI,EAAA;;;;;;;;;cAcO;WACX;WACA,MAAI,EAAA;;;;;cAMO;WACX;WACA,MAAI,EAAA;;;;;cAMO;WACX;WACA,MAAI,EAAA;;;;;;cAOO;WACX;WACA,MAAI,EAAA;;;;;;;;;;;cAYO;;aAlFH;;;;;;;;;;;;aASA;;;;;;;;;;;;;aAUA;;;;;;;;aASA;;;;;;;;;;;aAgBA;;;;;;;aAQA;;;;;;;aAQA;;;;;;;;aASA;;;;;;;;;;;;;;;;;;cAiCG,yBAAyB"}
1
+ {"version":3,"file":"errors.d.cts","names":[],"sources":["../src/errors.ts"],"mappings":";;;;;;;;;;;;;;;;;cAkBa;WACX;WACA,MAAI,EAAA;;;;;;;;;;cAOO;WACX;WACA,MAAI,EAAA;;;;;;;;;;;cAQO;WACX;WACA,MAAI,EAAA;;;;;;cAOO;WACX;WACA,MAAI,EAAA;;;;;;;;;cAcO;WACX;WACA,MAAI,EAAA;;;;;cAMO;WACX;WACA,MAAI,EAAA;;;;;cAMO;WACX;WACA,MAAI,EAAA;;;;;cAMO;WACX;WACA,MAAI,EAAA;;;;;;cAOO;WACX;WACA,MAAI,EAAA;;;;;;;;;;;cAYO;;aA1FH;;;;;;;;;;;;aASA;;;;;;;;;;;;;aAUA;;;;;;;;aASA;;;;;;;;;;;aAgBA;;;;;;;aAQA;;;;;;;aAQA;;;;;;;aAQA;;;;;;;;aASA;;;;;;;;;;;;;;;;;;cAkCG,yBAAyB"}
package/dist/errors.d.mts CHANGED
@@ -66,6 +66,13 @@ declare const NOT_FOUND: {
66
66
  resourceId: z.ZodOptional<z.ZodString>;
67
67
  }, z.core.$strip>;
68
68
  };
69
+ declare const CONFLICT: {
70
+ readonly status: 409;
71
+ readonly data: z.ZodObject<{
72
+ resource: z.ZodOptional<z.ZodString>;
73
+ detail: z.ZodOptional<z.ZodString>;
74
+ }, z.core.$strip>;
75
+ };
69
76
  declare const FORBIDDEN: {
70
77
  readonly status: 403;
71
78
  readonly data: z.ZodObject<{
@@ -146,6 +153,13 @@ declare const PluginErrors: {
146
153
  resourceId: z.ZodOptional<z.ZodString>;
147
154
  }, z.core.$strip>;
148
155
  };
156
+ readonly CONFLICT: {
157
+ readonly status: 409;
158
+ readonly data: z.ZodObject<{
159
+ resource: z.ZodOptional<z.ZodString>;
160
+ detail: z.ZodOptional<z.ZodString>;
161
+ }, z.core.$strip>;
162
+ };
149
163
  readonly FORBIDDEN: {
150
164
  readonly status: 403;
151
165
  readonly data: z.ZodObject<{
@@ -182,5 +196,5 @@ declare const PluginErrors: {
182
196
  */
183
197
  declare const PLUGIN_ERROR_STATUS_MAP: Record<string, number>;
184
198
  //#endregion
185
- export { BAD_REQUEST, CONNECTION_ERROR, FORBIDDEN, ModuleFederationError, NOT_FOUND, PLUGIN_ERROR_STATUS_MAP, PluginErrors, type PluginLoadFailureInfo, PluginRuntimeError, type PluginWarningInfo, RATE_LIMITED, SERVICE_UNAVAILABLE, TIMEOUT, UNAUTHORIZED, ValidationError, classifyPluginFailure, defaultMissingSecretWarnings, extractFromFiberFailure, formatORPCError, toPluginRuntimeError, wrapORPCError };
199
+ export { BAD_REQUEST, CONFLICT, CONNECTION_ERROR, FORBIDDEN, ModuleFederationError, NOT_FOUND, PLUGIN_ERROR_STATUS_MAP, PluginErrors, type PluginLoadFailureInfo, PluginRuntimeError, type PluginWarningInfo, RATE_LIMITED, SERVICE_UNAVAILABLE, TIMEOUT, UNAUTHORIZED, ValidationError, classifyPluginFailure, defaultMissingSecretWarnings, extractFromFiberFailure, formatORPCError, toPluginRuntimeError, wrapORPCError };
186
200
  //# sourceMappingURL=errors.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.mts","names":[],"sources":["../src/errors.ts"],"mappings":";;;;;;;;;;;;;;;;;cAkBa;WACX;WACA,MAAI,EAAA;;;;;;;;;;cAOO;WACX;WACA,MAAI,EAAA;;;;;;;;;;;cAQO;WACX;WACA,MAAI,EAAA;;;;;;cAOO;WACX;WACA,MAAI,EAAA;;;;;;;;;cAcO;WACX;WACA,MAAI,EAAA;;;;;cAMO;WACX;WACA,MAAI,EAAA;;;;;cAMO;WACX;WACA,MAAI,EAAA;;;;;;cAOO;WACX;WACA,MAAI,EAAA;;;;;;;;;;;cAYO;;aAlFH;;;;;;;;;;;;aASA;;;;;;;;;;;;;aAUA;;;;;;;;aASA;;;;;;;;;;;aAgBA;;;;;;;aAQA;;;;;;;aAQA;;;;;;;;aASA;;;;;;;;;;;;;;;;;;cAiCG,yBAAyB"}
1
+ {"version":3,"file":"errors.d.mts","names":[],"sources":["../src/errors.ts"],"mappings":";;;;;;;;;;;;;;;;;cAkBa;WACX;WACA,MAAI,EAAA;;;;;;;;;;cAOO;WACX;WACA,MAAI,EAAA;;;;;;;;;;;cAQO;WACX;WACA,MAAI,EAAA;;;;;;cAOO;WACX;WACA,MAAI,EAAA;;;;;;;;;cAcO;WACX;WACA,MAAI,EAAA;;;;;cAMO;WACX;WACA,MAAI,EAAA;;;;;cAMO;WACX;WACA,MAAI,EAAA;;;;;cAMO;WACX;WACA,MAAI,EAAA;;;;;;cAOO;WACX;WACA,MAAI,EAAA;;;;;;;;;;;cAYO;;aA1FH;;;;;;;;;;;;aASA;;;;;;;;;;;;;aAUA;;;;;;;;aASA;;;;;;;;;;;aAgBA;;;;;;;aAQA;;;;;;;aAQA;;;;;;;aAQA;;;;;;;;aASA;;;;;;;;;;;;;;;;;;cAkCG,yBAAyB"}
package/dist/errors.mjs CHANGED
@@ -68,6 +68,13 @@ const NOT_FOUND = {
68
68
  resourceId: z.string().optional()
69
69
  })
70
70
  };
71
+ const CONFLICT = {
72
+ status: 409,
73
+ data: z.object({
74
+ resource: z.string().optional(),
75
+ detail: z.string().optional()
76
+ })
77
+ };
71
78
  const FORBIDDEN = {
72
79
  status: 403,
73
80
  data: z.object({
@@ -102,6 +109,7 @@ const PluginErrors = {
102
109
  SERVICE_UNAVAILABLE,
103
110
  BAD_REQUEST,
104
111
  NOT_FOUND,
112
+ CONFLICT,
105
113
  FORBIDDEN,
106
114
  TIMEOUT,
107
115
  CONNECTION_ERROR
@@ -118,9 +126,10 @@ const PluginErrors = {
118
126
  const PLUGIN_ERROR_STATUS_MAP = {
119
127
  ...COMMON_ERROR_STATUS_MAP,
120
128
  TIMEOUT: 504,
121
- CONNECTION_ERROR: 502
129
+ CONNECTION_ERROR: 502,
130
+ CONFLICT: 409
122
131
  };
123
132
 
124
133
  //#endregion
125
- export { BAD_REQUEST, CONNECTION_ERROR, FORBIDDEN, ModuleFederationError, NOT_FOUND, PLUGIN_ERROR_STATUS_MAP, PluginErrors, PluginRuntimeError, RATE_LIMITED, SERVICE_UNAVAILABLE, TIMEOUT, UNAUTHORIZED, ValidationError, classifyPluginFailure, defaultMissingSecretWarnings, extractFromFiberFailure, formatORPCError, toPluginRuntimeError, wrapORPCError };
134
+ export { BAD_REQUEST, CONFLICT, CONNECTION_ERROR, FORBIDDEN, ModuleFederationError, NOT_FOUND, PLUGIN_ERROR_STATUS_MAP, PluginErrors, PluginRuntimeError, RATE_LIMITED, SERVICE_UNAVAILABLE, TIMEOUT, UNAUTHORIZED, ValidationError, classifyPluginFailure, defaultMissingSecretWarnings, extractFromFiberFailure, formatORPCError, toPluginRuntimeError, wrapORPCError };
126
135
  //# sourceMappingURL=errors.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.mjs","names":[],"sources":["../src/errors.ts"],"sourcesContent":["import { COMMON_ERROR_STATUS_MAP } from \"@orpc/server\";\nimport { z } from \"zod\";\n\n/**\n * Common error schemas for plugin contracts.\n * Import individually or use the grouped PluginErrors export.\n *\n * @example\n * ```typescript\n * import { NOT_FOUND, FORBIDDEN, UNAUTHORIZED } from \"every-plugin/errors\";\n *\n * export const contract = oc.router({\n * getData: oc.route(...)\n * .errors({ NOT_FOUND, FORBIDDEN, UNAUTHORIZED })\n * });\n * ```\n */\n\nexport const UNAUTHORIZED = {\n status: 401,\n data: z.object({\n apiKeyProvided: z.boolean(),\n provider: z.string().optional(),\n authType: z.enum([\"apiKey\", \"oauth\", \"token\"]).optional(),\n }),\n} as const;\n\nexport const RATE_LIMITED = {\n status: 429,\n data: z.object({\n retryAfter: z.number().int().min(1),\n remainingRequests: z.number().int().min(0).optional(),\n resetTime: z.string().datetime().optional(),\n limitType: z.enum([\"requests\", \"tokens\", \"bandwidth\"]).optional(),\n }),\n} as const;\n\nexport const SERVICE_UNAVAILABLE = {\n status: 503,\n data: z.object({\n retryAfter: z.number().int().optional(),\n maintenanceWindow: z.boolean().default(false),\n estimatedUptime: z.string().datetime().optional(),\n }),\n} as const;\n\nexport const BAD_REQUEST = {\n status: 400,\n data: z.object({\n invalidFields: z.array(z.string()).optional(),\n validationErrors: z\n .array(\n z.object({\n field: z.string(),\n message: z.string(),\n code: z.string().optional(),\n }),\n )\n .optional(),\n }),\n} as const;\n\nexport const NOT_FOUND = {\n status: 404,\n data: z.object({\n resource: z.string().optional(),\n resourceId: z.string().optional(),\n }),\n} as const;\n\nexport const FORBIDDEN = {\n status: 403,\n data: z.object({\n requiredPermissions: z.array(z.string()).optional(),\n action: z.string().optional(),\n }),\n} as const;\n\nexport const TIMEOUT = {\n status: 504,\n data: z.object({\n timeoutMs: z.number().int().min(0).optional(),\n operation: z.string().optional(),\n retryable: z.boolean().default(true),\n }),\n} as const;\n\nexport const CONNECTION_ERROR = {\n status: 502,\n data: z.object({\n errorCode: z.string().optional(),\n host: z.string().optional(),\n port: z.number().int().optional(),\n suggestion: z.string().optional(),\n }),\n} as const;\n\n/**\n * Grouped export for all plugin errors.\n * Use individual imports for cleaner code.\n */\nexport const PluginErrors = {\n UNAUTHORIZED,\n RATE_LIMITED,\n SERVICE_UNAVAILABLE,\n BAD_REQUEST,\n NOT_FOUND,\n FORBIDDEN,\n TIMEOUT,\n CONNECTION_ERROR,\n} as const;\n\n/**\n * Error-code -> HTTP-status map for handlers.\n *\n * oRPC v2 resolves statuses at the handler boundary via `errorStatusMap`\n * (default `COMMON_ERROR_STATUS_MAP`, where TIMEOUT is 408). Providing a\n * map REPLACES the default entirely, so the standard codes must be spread\n * back in. These custom entries preserve the v1 wire behavior:\n * TIMEOUT -> 504, CONNECTION_ERROR -> 502.\n */\nexport const PLUGIN_ERROR_STATUS_MAP: Record<string, number> = {\n ...COMMON_ERROR_STATUS_MAP,\n TIMEOUT: 504,\n CONNECTION_ERROR: 502,\n} as const;\n\nexport type { PluginLoadFailureInfo, PluginWarningInfo } from \"./runtime/errors\";\nexport {\n classifyPluginFailure,\n defaultMissingSecretWarnings,\n extractFromFiberFailure,\n formatORPCError,\n ModuleFederationError,\n PluginRuntimeError,\n toPluginRuntimeError,\n ValidationError,\n wrapORPCError,\n} from \"./runtime/errors\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,MAAa,eAAe;CAC1B,QAAQ;CACR,MAAM,EAAE,OAAO;EACb,gBAAgB,EAAE,QAAQ;EAC1B,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;EAC9B,UAAU,EAAE,KAAK;GAAC;GAAU;GAAS;EAAO,CAAC,CAAC,CAAC,SAAS;CAC1D,CAAC;AACH;AAEA,MAAa,eAAe;CAC1B,QAAQ;CACR,MAAM,EAAE,OAAO;EACb,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;EAClC,mBAAmB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;EACpD,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC1C,WAAW,EAAE,KAAK;GAAC;GAAY;GAAU;EAAW,CAAC,CAAC,CAAC,SAAS;CAClE,CAAC;AACH;AAEA,MAAa,sBAAsB;CACjC,QAAQ;CACR,MAAM,EAAE,OAAO;EACb,YAAY,EAAE,OAAO,CAAC,CA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AS;EAChC,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS;CAClC,CAAC;AACH;;;;;AAMA,MAAa,eAAe;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;;;AAWA,MAAa,0BAAkD;CAC7D,GAAG;CACH,SAAS;CACT,kBAAkB;AACpB"}
1
+ {"version":3,"file":"errors.mjs","names":[],"sources":["../src/errors.ts"],"sourcesContent":["import { COMMON_ERROR_STATUS_MAP } from \"@orpc/server\";\nimport { z } from \"zod\";\n\n/**\n * Common error schemas for plugin contracts.\n * Import individually or use the grouped PluginErrors export.\n *\n * @example\n * ```typescript\n * import { NOT_FOUND, FORBIDDEN, UNAUTHORIZED } from \"every-plugin/errors\";\n *\n * export const contract = oc.router({\n * getData: oc.route(...)\n * .errors({ NOT_FOUND, FORBIDDEN, UNAUTHORIZED })\n * });\n * ```\n */\n\nexport const UNAUTHORIZED = {\n status: 401,\n data: z.object({\n apiKeyProvided: z.boolean(),\n provider: z.string().optional(),\n authType: z.enum([\"apiKey\", \"oauth\", \"token\"]).optional(),\n }),\n} as const;\n\nexport const RATE_LIMITED = {\n status: 429,\n data: z.object({\n retryAfter: z.number().int().min(1),\n remainingRequests: z.number().int().min(0).optional(),\n resetTime: z.string().datetime().optional(),\n limitType: z.enum([\"requests\", \"tokens\", \"bandwidth\"]).optional(),\n }),\n} as const;\n\nexport const SERVICE_UNAVAILABLE = {\n status: 503,\n data: z.object({\n retryAfter: z.number().int().optional(),\n maintenanceWindow: z.boolean().default(false),\n estimatedUptime: z.string().datetime().optional(),\n }),\n} as const;\n\nexport const BAD_REQUEST = {\n status: 400,\n data: z.object({\n invalidFields: z.array(z.string()).optional(),\n validationErrors: z\n .array(\n z.object({\n field: z.string(),\n message: z.string(),\n code: z.string().optional(),\n }),\n )\n .optional(),\n }),\n} as const;\n\nexport const NOT_FOUND = {\n status: 404,\n data: z.object({\n resource: z.string().optional(),\n resourceId: z.string().optional(),\n }),\n} as const;\n\nexport const CONFLICT = {\n status: 409,\n data: z.object({\n resource: z.string().optional(),\n detail: z.string().optional(),\n }),\n} as const;\n\nexport const FORBIDDEN = {\n status: 403,\n data: z.object({\n requiredPermissions: z.array(z.string()).optional(),\n action: z.string().optional(),\n }),\n} as const;\n\nexport const TIMEOUT = {\n status: 504,\n data: z.object({\n timeoutMs: z.number().int().min(0).optional(),\n operation: z.string().optional(),\n retryable: z.boolean().default(true),\n }),\n} as const;\n\nexport const CONNECTION_ERROR = {\n status: 502,\n data: z.object({\n errorCode: z.string().optional(),\n host: z.string().optional(),\n port: z.number().int().optional(),\n suggestion: z.string().optional(),\n }),\n} as const;\n\n/**\n * Grouped export for all plugin errors.\n * Use individual imports for cleaner code.\n */\nexport const PluginErrors = {\n UNAUTHORIZED,\n RATE_LIMITED,\n SERVICE_UNAVAILABLE,\n BAD_REQUEST,\n NOT_FOUND,\n CONFLICT,\n FORBIDDEN,\n TIMEOUT,\n CONNECTION_ERROR,\n} as const;\n\n/**\n * Error-code -> HTTP-status map for handlers.\n *\n * oRPC v2 resolves statuses at the handler boundary via `errorStatusMap`\n * (default `COMMON_ERROR_STATUS_MAP`, where TIMEOUT is 408). Providing a\n * map REPLACES the default entirely, so the standard codes must be spread\n * back in. These custom entries preserve the v1 wire behavior:\n * TIMEOUT -> 504, CONNECTION_ERROR -> 502.\n */\nexport const PLUGIN_ERROR_STATUS_MAP: Record<string, number> = {\n ...COMMON_ERROR_STATUS_MAP,\n TIMEOUT: 504,\n CONNECTION_ERROR: 502,\n CONFLICT: 409,\n} as const;\n\nexport type { PluginLoadFailureInfo, PluginWarningInfo } from \"./runtime/errors\";\nexport {\n classifyPluginFailure,\n defaultMissingSecretWarnings,\n extractFromFiberFailure,\n formatORPCError,\n ModuleFederationError,\n PluginRuntimeError,\n toPluginRuntimeError,\n ValidationError,\n wrapORPCError,\n} from \"./runtime/errors\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,MAAa,eAAe;CAC1B,QAAQ;CACR,MAAM,E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Aa,WAAW;CACtB,QAAQ;CACR,MAAM,EAAE,OAAO;EACb,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;EAC9B,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS;CAC9B,CAAC;AACH;AAEA,MAAa,YAAY;CACvB,QAAQ;CACR,MAAM,EAAE,OAAO;EACb,qBAAqB,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS;EAClD,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS;CAC9B,CAAC;AACH;AAEA,MAAa,UAAU;CACrB,QAAQ;CACR,MAAM,EAAE,OAAO;EACb,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;EAC5C,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;EAC/B,WAAW,EAAE,QAAQ,CAAC,CAAC,QAAQ,IAAI;CACrC,CAAC;AACH;AAEA,MAAa,mBAAmB;CAC9B,QAAQ;CACR,MAAM,EAAE,OAAO;EACb,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;EAC/B,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS;EAC1B,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;EAChC,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS;CAClC,CAAC;AACH;;;;;AAMA,MAAa,eAAe;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;;;AAWA,MAAa,0BAAkD;CAC7D,GAAG;CACH,SAAS;CACT,kBAAkB;CAClB,UAAU;AACZ"}
package/dist/index.cjs CHANGED
@@ -9,6 +9,7 @@ const require_runtime_index = require("./runtime/index.cjs");
9
9
  require("@orpc/openapi/extensions/route");
10
10
 
11
11
  exports.BAD_REQUEST = require_errors$1.BAD_REQUEST;
12
+ exports.CONFLICT = require_errors$1.CONFLICT;
12
13
  exports.CONNECTION_ERROR = require_errors$1.CONNECTION_ERROR;
13
14
  exports.FORBIDDEN = require_errors$1.FORBIDDEN;
14
15
  exports.ModuleFederationError = require_errors.ModuleFederationError;
package/dist/index.d.cts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { remoteName } from "./identity.cjs";
2
2
  import { RpcClientConfig, RpcConnectionErrorCopy, createRpcClient } from "./client.cjs";
3
3
  import { ModuleFederationError, PluginLoadFailureInfo, PluginRuntimeError, PluginWarningInfo, ValidationError, classifyPluginFailure, defaultMissingSecretWarnings, extractFromFiberFailure, formatORPCError, toPluginRuntimeError, wrapORPCError } from "./runtime/errors.cjs";
4
- import { BAD_REQUEST, CONNECTION_ERROR, FORBIDDEN, NOT_FOUND, PLUGIN_ERROR_STATUS_MAP, PluginErrors, RATE_LIMITED, SERVICE_UNAVAILABLE, TIMEOUT, UNAUTHORIZED } from "./errors.cjs";
4
+ import { BAD_REQUEST, CONFLICT, CONNECTION_ERROR, FORBIDDEN, NOT_FOUND, PLUGIN_ERROR_STATUS_MAP, PluginErrors, RATE_LIMITED, SERVICE_UNAVAILABLE, TIMEOUT, UNAUTHORIZED } from "./errors.cjs";
5
5
  import { buildScoped, buildScopedContext } from "./effect-helpers.cjs";
6
6
  import { CreatePluginFn, CreatePluginWithPlugins, LoadedPluginWithBinding, Plugin, PluginConfigFor, PluginEnv, PluginIdTag, PluginInitializeInput, PluginWarningsFn, createPlugin, withPlugins } from "./plugin.cjs";
7
7
  import { AnyPlugin, EveryPlugin, InitializedPlugin, LoadedPlugin, ModuleClientEntry, ModuleEndpoint, ModuleSurface, ModuleTransport, PluginClientEntry, PluginClientType, PluginConfigInput, PluginContext, PluginContract, PluginEndpoint, PluginInstance, PluginMetadata, PluginRegistry, PluginRouterType, PluginRuntimeConfig, PluginSecrets, PluginServicesEntry, PluginSurface, PluginTransport, PluginVariables, RegisteredPlugins, SecretsConfig, UsePluginResult } from "./types.cjs";
8
8
  import { PluginRuntime, createPluginRuntime } from "./runtime/index.cjs";
9
9
  import "@orpc/openapi/extensions/route";
10
- export { type AnyPlugin, BAD_REQUEST, CONNECTION_ERROR, CreatePluginFn, CreatePluginWithPlugins, type EveryPlugin, FORBIDDEN, type InitializedPlugin, type LoadedPlugin, LoadedPluginWithBinding, type ModuleClientEntry, type ModuleEndpoint, ModuleFederationError, type ModuleSurface, type ModuleTransport, NOT_FOUND, PLUGIN_ERROR_STATUS_MAP, Plugin, type PluginClientEntry, type PluginClientType, PluginConfigFor, type PluginConfigInput, type PluginContext, type PluginContract, type PluginEndpoint, PluginEnv, PluginErrors, PluginIdTag, PluginInitializeInput, type PluginInstance, type PluginLoadFailureInfo, type PluginMetadata, type PluginRegistry, type PluginRouterType, PluginRuntime, type PluginRuntimeConfig, PluginRuntimeError, type PluginSecrets, type PluginServicesEntry, type PluginSurface, type PluginTransport, type PluginVariables, type PluginWarningInfo, PluginWarningsFn, RATE_LIMITED, type RegisteredPlugins, RpcClientConfig, RpcConnectionErrorCopy, SERVICE_UNAVAILABLE, type SecretsConfig, TIMEOUT, UNAUTHORIZED, type UsePluginResult, ValidationError, buildScoped, buildScopedContext, classifyPluginFailure, createPlugin, createPluginRuntime, createRpcClient, defaultMissingSecretWarnings, extractFromFiberFailure, formatORPCError, remoteName as getNormalizedRemoteName, toPluginRuntimeError, withPlugins, wrapORPCError };
10
+ export { type AnyPlugin, BAD_REQUEST, CONFLICT, CONNECTION_ERROR, CreatePluginFn, CreatePluginWithPlugins, type EveryPlugin, FORBIDDEN, type InitializedPlugin, type LoadedPlugin, LoadedPluginWithBinding, type ModuleClientEntry, type ModuleEndpoint, ModuleFederationError, type ModuleSurface, type ModuleTransport, NOT_FOUND, PLUGIN_ERROR_STATUS_MAP, Plugin, type PluginClientEntry, type PluginClientType, PluginConfigFor, type PluginConfigInput, type PluginContext, type PluginContract, type PluginEndpoint, PluginEnv, PluginErrors, PluginIdTag, PluginInitializeInput, type PluginInstance, type PluginLoadFailureInfo, type PluginMetadata, type PluginRegistry, type PluginRouterType, PluginRuntime, type PluginRuntimeConfig, PluginRuntimeError, type PluginSecrets, type PluginServicesEntry, type PluginSurface, type PluginTransport, type PluginVariables, type PluginWarningInfo, PluginWarningsFn, RATE_LIMITED, type RegisteredPlugins, RpcClientConfig, RpcConnectionErrorCopy, SERVICE_UNAVAILABLE, type SecretsConfig, TIMEOUT, UNAUTHORIZED, type UsePluginResult, ValidationError, buildScoped, buildScopedContext, classifyPluginFailure, createPlugin, createPluginRuntime, createRpcClient, defaultMissingSecretWarnings, extractFromFiberFailure, formatORPCError, remoteName as getNormalizedRemoteName, toPluginRuntimeError, withPlugins, wrapORPCError };
package/dist/index.d.mts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { remoteName } from "./identity.mjs";
2
2
  import { RpcClientConfig, RpcConnectionErrorCopy, createRpcClient } from "./client.mjs";
3
3
  import { ModuleFederationError, PluginLoadFailureInfo, PluginRuntimeError, PluginWarningInfo, ValidationError, classifyPluginFailure, defaultMissingSecretWarnings, extractFromFiberFailure, formatORPCError, toPluginRuntimeError, wrapORPCError } from "./runtime/errors.mjs";
4
- import { BAD_REQUEST, CONNECTION_ERROR, FORBIDDEN, NOT_FOUND, PLUGIN_ERROR_STATUS_MAP, PluginErrors, RATE_LIMITED, SERVICE_UNAVAILABLE, TIMEOUT, UNAUTHORIZED } from "./errors.mjs";
4
+ import { BAD_REQUEST, CONFLICT, CONNECTION_ERROR, FORBIDDEN, NOT_FOUND, PLUGIN_ERROR_STATUS_MAP, PluginErrors, RATE_LIMITED, SERVICE_UNAVAILABLE, TIMEOUT, UNAUTHORIZED } from "./errors.mjs";
5
5
  import { buildScoped, buildScopedContext } from "./effect-helpers.mjs";
6
6
  import { CreatePluginFn, CreatePluginWithPlugins, LoadedPluginWithBinding, Plugin, PluginConfigFor, PluginEnv, PluginIdTag, PluginInitializeInput, PluginWarningsFn, createPlugin, withPlugins } from "./plugin.mjs";
7
7
  import { AnyPlugin, EveryPlugin, InitializedPlugin, LoadedPlugin, ModuleClientEntry, ModuleEndpoint, ModuleSurface, ModuleTransport, PluginClientEntry, PluginClientType, PluginConfigInput, PluginContext, PluginContract, PluginEndpoint, PluginInstance, PluginMetadata, PluginRegistry, PluginRouterType, PluginRuntimeConfig, PluginSecrets, PluginServicesEntry, PluginSurface, PluginTransport, PluginVariables, RegisteredPlugins, SecretsConfig, UsePluginResult } from "./types.mjs";
8
8
  import { PluginRuntime, createPluginRuntime } from "./runtime/index.mjs";
9
9
  import "@orpc/openapi/extensions/route";
10
- export { type AnyPlugin, BAD_REQUEST, CONNECTION_ERROR, CreatePluginFn, CreatePluginWithPlugins, type EveryPlugin, FORBIDDEN, type InitializedPlugin, type LoadedPlugin, LoadedPluginWithBinding, type ModuleClientEntry, type ModuleEndpoint, ModuleFederationError, type ModuleSurface, type ModuleTransport, NOT_FOUND, PLUGIN_ERROR_STATUS_MAP, Plugin, type PluginClientEntry, type PluginClientType, PluginConfigFor, type PluginConfigInput, type PluginContext, type PluginContract, type PluginEndpoint, PluginEnv, PluginErrors, PluginIdTag, PluginInitializeInput, type PluginInstance, type PluginLoadFailureInfo, type PluginMetadata, type PluginRegistry, type PluginRouterType, PluginRuntime, type PluginRuntimeConfig, PluginRuntimeError, type PluginSecrets, type PluginServicesEntry, type PluginSurface, type PluginTransport, type PluginVariables, type PluginWarningInfo, PluginWarningsFn, RATE_LIMITED, type RegisteredPlugins, RpcClientConfig, RpcConnectionErrorCopy, SERVICE_UNAVAILABLE, type SecretsConfig, TIMEOUT, UNAUTHORIZED, type UsePluginResult, ValidationError, buildScoped, buildScopedContext, classifyPluginFailure, createPlugin, createPluginRuntime, createRpcClient, defaultMissingSecretWarnings, extractFromFiberFailure, formatORPCError, remoteName as getNormalizedRemoteName, toPluginRuntimeError, withPlugins, wrapORPCError };
10
+ export { type AnyPlugin, BAD_REQUEST, CONFLICT, CONNECTION_ERROR, CreatePluginFn, CreatePluginWithPlugins, type EveryPlugin, FORBIDDEN, type InitializedPlugin, type LoadedPlugin, LoadedPluginWithBinding, type ModuleClientEntry, type ModuleEndpoint, ModuleFederationError, type ModuleSurface, type ModuleTransport, NOT_FOUND, PLUGIN_ERROR_STATUS_MAP, Plugin, type PluginClientEntry, type PluginClientType, PluginConfigFor, type PluginConfigInput, type PluginContext, type PluginContract, type PluginEndpoint, PluginEnv, PluginErrors, PluginIdTag, PluginInitializeInput, type PluginInstance, type PluginLoadFailureInfo, type PluginMetadata, type PluginRegistry, type PluginRouterType, PluginRuntime, type PluginRuntimeConfig, PluginRuntimeError, type PluginSecrets, type PluginServicesEntry, type PluginSurface, type PluginTransport, type PluginVariables, type PluginWarningInfo, PluginWarningsFn, RATE_LIMITED, type RegisteredPlugins, RpcClientConfig, RpcConnectionErrorCopy, SERVICE_UNAVAILABLE, type SecretsConfig, TIMEOUT, UNAUTHORIZED, type UsePluginResult, ValidationError, buildScoped, buildScopedContext, classifyPluginFailure, createPlugin, createPluginRuntime, createRpcClient, defaultMissingSecretWarnings, extractFromFiberFailure, formatORPCError, remoteName as getNormalizedRemoteName, toPluginRuntimeError, withPlugins, wrapORPCError };
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  import { createRpcClient } from "./client.mjs";
2
2
  import { buildScoped, buildScopedContext } from "./effect-helpers.mjs";
3
3
  import { ModuleFederationError, PluginRuntimeError, ValidationError, classifyPluginFailure, defaultMissingSecretWarnings, extractFromFiberFailure, formatORPCError, toPluginRuntimeError, wrapORPCError } from "./runtime/errors.mjs";
4
- import { BAD_REQUEST, CONNECTION_ERROR, FORBIDDEN, NOT_FOUND, PLUGIN_ERROR_STATUS_MAP, PluginErrors, RATE_LIMITED, SERVICE_UNAVAILABLE, TIMEOUT, UNAUTHORIZED } from "./errors.mjs";
4
+ import { BAD_REQUEST, CONFLICT, CONNECTION_ERROR, FORBIDDEN, NOT_FOUND, PLUGIN_ERROR_STATUS_MAP, PluginErrors, RATE_LIMITED, SERVICE_UNAVAILABLE, TIMEOUT, UNAUTHORIZED } from "./errors.mjs";
5
5
  import { PluginIdTag, createPlugin, withPlugins } from "./plugin.mjs";
6
6
  import { remoteName } from "./identity.mjs";
7
7
  import { PluginRuntime, createPluginRuntime } from "./runtime/index.mjs";
8
8
  import "@orpc/openapi/extensions/route";
9
9
 
10
- export { BAD_REQUEST, CONNECTION_ERROR, FORBIDDEN, ModuleFederationError, NOT_FOUND, PLUGIN_ERROR_STATUS_MAP, PluginErrors, PluginIdTag, PluginRuntime, PluginRuntimeError, RATE_LIMITED, SERVICE_UNAVAILABLE, TIMEOUT, UNAUTHORIZED, ValidationError, buildScoped, buildScopedContext, classifyPluginFailure, createPlugin, createPluginRuntime, createRpcClient, defaultMissingSecretWarnings, extractFromFiberFailure, formatORPCError, remoteName as getNormalizedRemoteName, toPluginRuntimeError, withPlugins, wrapORPCError };
10
+ export { BAD_REQUEST, CONFLICT, CONNECTION_ERROR, FORBIDDEN, ModuleFederationError, NOT_FOUND, PLUGIN_ERROR_STATUS_MAP, PluginErrors, PluginIdTag, PluginRuntime, PluginRuntimeError, RATE_LIMITED, SERVICE_UNAVAILABLE, TIMEOUT, UNAUTHORIZED, ValidationError, buildScoped, buildScopedContext, classifyPluginFailure, createPlugin, createPluginRuntime, createRpcClient, defaultMissingSecretWarnings, extractFromFiberFailure, formatORPCError, remoteName as getNormalizedRemoteName, toPluginRuntimeError, withPlugins, wrapORPCError };
@@ -3,7 +3,7 @@ const require_shared_deps_spec = require("../shared-deps-spec.cjs");
3
3
  let node_fs = require("node:fs");
4
4
 
5
5
  //#region src/runtime/mf-config.ts
6
- const PLUGIN_VERSION = "3.0.0-rc.15";
6
+ const PLUGIN_VERSION = "3.0.0-rc.16";
7
7
  const MF_CORE_SHARED_DEPS = require_shared_deps_spec.buildMfCoreSharedDependencies({ ownVersion: PLUGIN_VERSION });
8
8
 
9
9
  //#endregion
@@ -2,7 +2,7 @@ import { buildMfCoreSharedDependencies } from "../shared-deps-spec.mjs";
2
2
  import { readFileSync } from "node:fs";
3
3
 
4
4
  //#region src/runtime/mf-config.ts
5
- const PLUGIN_VERSION = "3.0.0-rc.15";
5
+ const PLUGIN_VERSION = "3.0.0-rc.16";
6
6
  const MF_CORE_SHARED_DEPS = buildMfCoreSharedDependencies({ ownVersion: PLUGIN_VERSION });
7
7
 
8
8
  //#endregion