every-plugin 3.0.0-rc.15 → 3.0.0-rc.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build/artifact-names.cjs +8 -5
- package/dist/build/artifact-names.cjs.map +1 -1
- package/dist/build/artifact-names.d.cts +7 -5
- package/dist/build/artifact-names.d.cts.map +1 -1
- package/dist/build/artifact-names.d.mts +7 -5
- package/dist/build/artifact-names.d.mts.map +1 -1
- package/dist/build/artifact-names.mjs +8 -5
- package/dist/build/artifact-names.mjs.map +1 -1
- package/dist/build/ui/stubs.cjs +2 -7
- package/dist/build/ui/stubs.cjs.map +1 -1
- package/dist/build/ui/stubs.d.cts.map +1 -1
- package/dist/build/ui/stubs.d.mts.map +1 -1
- package/dist/build/ui/stubs.mjs +2 -7
- package/dist/build/ui/stubs.mjs.map +1 -1
- package/dist/client.cjs +15 -63
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +12 -11
- package/dist/client.d.cts.map +1 -1
- package/dist/client.d.mts +12 -11
- package/dist/client.d.mts.map +1 -1
- package/dist/client.mjs +16 -64
- package/dist/client.mjs.map +1 -1
- package/dist/errors.cjs +11 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.cts +15 -1
- package/dist/errors.d.cts.map +1 -1
- package/dist/errors.d.mts +15 -1
- package/dist/errors.d.mts.map +1 -1
- package/dist/errors.mjs +11 -2
- package/dist/errors.mjs.map +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +2 -2
- package/dist/runtime/mf-config.cjs +1 -1
- package/dist/runtime/mf-config.mjs +1 -1
- package/dist/ui/manifest/construct.cjs +13 -38
- package/dist/ui/manifest/construct.cjs.map +1 -1
- package/dist/ui/manifest/construct.d.cts +4 -13
- package/dist/ui/manifest/construct.d.cts.map +1 -1
- package/dist/ui/manifest/construct.d.mts +4 -13
- package/dist/ui/manifest/construct.d.mts.map +1 -1
- package/dist/ui/manifest/construct.mjs +14 -39
- package/dist/ui/manifest/construct.mjs.map +1 -1
- package/dist/ui/manifest/descriptor.cjs +1 -1
- package/dist/ui/manifest/descriptor.mjs +1 -1
- package/dist/ui/manifest/index.d.cts +3 -3
- package/dist/ui/manifest/index.d.mts +3 -3
- package/dist/ui/manifest/mount-registry.cjs +6 -13
- package/dist/ui/manifest/mount-registry.cjs.map +1 -1
- package/dist/ui/manifest/mount-registry.d.cts +29 -36
- package/dist/ui/manifest/mount-registry.d.cts.map +1 -1
- package/dist/ui/manifest/mount-registry.d.mts +29 -36
- package/dist/ui/manifest/mount-registry.d.mts.map +1 -1
- package/dist/ui/manifest/mount-registry.mjs +6 -13
- package/dist/ui/manifest/mount-registry.mjs.map +1 -1
- package/dist/version-manifest.cjs +70 -5
- package/dist/version-manifest.cjs.map +1 -1
- package/dist/version-manifest.d.cts +41 -1
- package/dist/version-manifest.d.cts.map +1 -1
- package/dist/version-manifest.d.mts +41 -1
- package/dist/version-manifest.d.mts.map +1 -1
- package/dist/version-manifest.mjs +66 -6
- package/dist/version-manifest.mjs.map +1 -1
- package/package.json +1 -1
- package/skills/plugin-client/SKILL.md +3 -3
- package/src/build/artifact-names.ts +8 -5
- package/src/build/ui/stubs.ts +2 -7
- package/src/client.ts +14 -111
- package/src/errors.ts +10 -0
- package/src/index.ts +2 -0
- package/src/ui/manifest/construct.ts +20 -65
- package/src/ui/manifest/index.ts +0 -2
- package/src/ui/manifest/mount-registry.ts +20 -20
- package/src/version-manifest.ts +77 -10
|
@@ -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
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
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
|
|
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,SAAS,4BAA4B;CACtE,OAAO,MAAM,SAAS,8BAA8B;AACtD;AAEA,MAAM,uBAAuB;;;;;;;;;;AAW7B,SAAgB,sBAAsB,MAAuB;CAC3D,IAAI,SAAS,cAAc,KAAK,WAAW,WAAW,GAAG,OAAO;CAChE,MAAM,OAAO,KAAK,MAAM,GAAG,CAAC,CAAC,IAAI,KAAK;CACtC,OAAO,qBAAqB,KAAK,IAAI;AACvC;AAEA,SAAgB,eAAe,MAAsB;CACnD,OAAO,sBAAsB,IAAI,IAC7B,wCACA;AACN;;AAGA,SAAgB,cAAc,SAAsC;CAClE,OAAOA,oBAAO,WAAW,QAAQ,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,GAAG,EAAE;AAC9E;AAEA,SAAgB,mBAAmB,MAAc,MAAc,KAAqB;CAClF,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,QAAQ,OAAO,EAAE;AACjD;;AAGA,SAAgB,gBAAgB,YAAsB,MAA6B;CAOjF,OANe,WAAW,MAAM,SAAS;EACvC,MAAM,OAAO,KAAK,WAAW,GAAG,KAAK,EAAE,IAAI,KAAK,MAAM,KAAK,SAAS,CAAC,IAAI;EACzE,IAAI,SAAS,MAAM,OAAO;EAC1B,MAAM,OAAO,KAAK,MAAM,GAAG,EAAE;EAC7B,OAAO,KAAK,SAAS,KAAK,KAAK,iBAAiB,KAAK,IAAI;CAC3D,CACY,KAAK;AACnB;AAEA,MAAa,yBAAyBC,MAAE,OAAO;CAC7C,OAAOA,MAAE,OAAO,CAAC,CAAC,IAAI,CAAC;CACvB,iBAAiBA,MAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;CAC5C,KAAKA,MAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;;;;;;;;CAQhC,QAAQA,MAAE,OAAOA,MAAE,OAAO,GAAGA,MAAE,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"}
|
|
@@ -26,11 +26,13 @@ declare function uiEntryFilename(input: {
|
|
|
26
26
|
server?: boolean;
|
|
27
27
|
}): string;
|
|
28
28
|
/**
|
|
29
|
-
* Serving classification for bundle objects: anything
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
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
|
|
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
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
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
|
|
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
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
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
|
|
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,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;;;;;;;;;;AAW7B,SAAgB,sBAAsB,MAAuB;CAC3D,IAAI,SAAS,cAAc,KAAK,WAAW,WAAW,GAAG,OAAO;CAChE,MAAM,OAAO,KAAK,MAAM,GAAG,CAAC,CAAC,IAAI,KAAK;CACtC,OAAO,qBAAqB,KAAK,IAAI;AACvC;AAEA,SAAgB,eAAe,MAAsB;CACnD,OAAO,sBAAsB,IAAI,IAC7B,wCACA;AACN;;AAGA,SAAgB,cAAc,SAAsC;CAClE,OAAO,OAAO,WAAW,QAAQ,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,GAAG,EAAE;AAC9E;AAEA,SAAgB,mBAAmB,MAAc,MAAc,KAAqB;CAClF,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,QAAQ,OAAO,EAAE;AACjD;;AAGA,SAAgB,gBAAgB,YAAsB,MAA6B;CAOjF,OANe,WAAW,MAAM,SAAS;EACvC,MAAM,OAAO,KAAK,WAAW,GAAG,KAAK,EAAE,IAAI,KAAK,MAAM,KAAK,SAAS,CAAC,IAAI;EACzE,IAAI,SAAS,MAAM,OAAO;EAC1B,MAAM,OAAO,KAAK,MAAM,GAAG,EAAE;EAC7B,OAAO,KAAK,SAAS,KAAK,KAAK,iBAAiB,KAAK,IAAI;CAC3D,CACY,KAAK;AACnB;AAEA,MAAa,yBAAyB,EAAE,OAAO;CAC7C,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;CACvB,iBAAiB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;CAC5C,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,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"}
|
package/dist/build/ui/stubs.cjs
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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;;;;;;
|
|
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;;;;;;
|
|
1
|
+
{"version":3,"file":"stubs.d.mts","names":[],"sources":["../../../src/build/ui/stubs.ts"],"mappings":";;;;;;;;;;;;;;;cAkBa,eAAe;;;;;;iBAqEZ,gBAAgB"}
|
package/dist/build/ui/stubs.mjs
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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/client.cjs
CHANGED
|
@@ -3,69 +3,21 @@ let _orpc_client = require("@orpc/client");
|
|
|
3
3
|
let _orpc_client_fetch = require("@orpc/client/fetch");
|
|
4
4
|
|
|
5
5
|
//#region src/client.ts
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
new Headers(overrides).forEach((value, key) => {
|
|
22
|
-
merged.set(key, value);
|
|
23
|
-
});
|
|
24
|
-
return merged;
|
|
25
|
-
}
|
|
26
|
-
function createRpcLink(config, headers) {
|
|
27
|
-
return new _orpc_client_fetch.RPCLink({
|
|
28
|
-
origin: config.hostUrl,
|
|
29
|
-
url: config.path,
|
|
30
|
-
interceptors: [(0, _orpc_client.onError)((error) => {
|
|
31
|
-
if (typeof globalThis.window === "undefined") return;
|
|
32
|
-
if (error && typeof error === "object" && "message" in error) {
|
|
33
|
-
const message = String(error.message).toLowerCase();
|
|
34
|
-
if (message.includes("fetch") || message.includes("network") || message.includes("failed to fetch")) import("sonner").then(({ toast }) => {
|
|
35
|
-
const message = config.connectionError?.() ?? {
|
|
36
|
-
title: "Unable to connect to API",
|
|
37
|
-
description: "The API is currently unavailable. Please try again later."
|
|
38
|
-
};
|
|
39
|
-
toast.error(message.title, {
|
|
40
|
-
id: "api-connection-error",
|
|
41
|
-
description: message.description
|
|
42
|
-
});
|
|
43
|
-
}).catch(() => {});
|
|
44
|
-
}
|
|
45
|
-
})],
|
|
46
|
-
fetch(fetchUrl, options) {
|
|
47
|
-
return fetchWithRateLimitRetry(fetchUrl, {
|
|
48
|
-
...options,
|
|
49
|
-
credentials: "include",
|
|
50
|
-
headers: headers ? mergeHeaders(headers, options?.headers) : options?.headers
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
function buildRpcClient(config, headers) {
|
|
56
|
-
if (!config.hostUrl) throw new Error("Missing runtime host URL");
|
|
57
|
-
return (0, _orpc_client.createORPCClient)(createRpcLink(config, headers));
|
|
58
|
-
}
|
|
59
|
-
function createRpcClient(config, headers) {
|
|
60
|
-
if (typeof globalThis.window !== "undefined" && !headers) {
|
|
61
|
-
const key = `${config.hostUrl}${config.path}`;
|
|
62
|
-
const memoized = browserClients.get(key);
|
|
63
|
-
if (memoized) return memoized;
|
|
64
|
-
const client = buildRpcClient(config, headers);
|
|
65
|
-
browserClients.set(key, client);
|
|
66
|
-
return client;
|
|
67
|
-
}
|
|
68
|
-
return buildRpcClient(config, headers);
|
|
6
|
+
/**
|
|
7
|
+
* Bare typed oRPC client over the RPC protocol — a thin convenience over
|
|
8
|
+
* `createORPCClient(new RPCLink({ origin, url }))`.
|
|
9
|
+
*
|
|
10
|
+
* Promise-native, so async/await callers call it directly and Effect callers
|
|
11
|
+
* lift calls with `Effect.tryPromise` (owning timeout/retry/cache in their
|
|
12
|
+
* service layer). Transport customization (headers, timeouts, retries, test
|
|
13
|
+
* doubles) is RPCLink's native surface — construct the link yourself and pass
|
|
14
|
+
* it to `createORPCClient` instead of growing config here.
|
|
15
|
+
*/
|
|
16
|
+
function createRpcClient(hostUrl, path = "/api/rpc") {
|
|
17
|
+
return (0, _orpc_client.createORPCClient)(new _orpc_client_fetch.RPCLink({
|
|
18
|
+
origin: hostUrl,
|
|
19
|
+
url: path
|
|
20
|
+
}));
|
|
69
21
|
}
|
|
70
22
|
|
|
71
23
|
//#endregion
|
package/dist/client.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.cjs","names":["
|
|
1
|
+
{"version":3,"file":"client.cjs","names":["createORPCClient","RPCLink"],"sources":["../src/client.ts"],"sourcesContent":["import { createORPCClient } from \"@orpc/client\";\nimport { RPCLink } from \"@orpc/client/fetch\";\nimport type { ContractRouterClient, RouterContract } from \"@orpc/contract\";\n\n/**\n * Bare typed oRPC client over the RPC protocol — a thin convenience over\n * `createORPCClient(new RPCLink({ origin, url }))`.\n *\n * Promise-native, so async/await callers call it directly and Effect callers\n * lift calls with `Effect.tryPromise` (owning timeout/retry/cache in their\n * service layer). Transport customization (headers, timeouts, retries, test\n * doubles) is RPCLink's native surface — construct the link yourself and pass\n * it to `createORPCClient` instead of growing config here.\n */\nexport function createRpcClient<T extends RouterContract = RouterContract>(\n hostUrl: string,\n path: `/${string}` = \"/api/rpc\",\n): ContractRouterClient<T> {\n return createORPCClient(new RPCLink({ origin: hostUrl, url: path })) as ContractRouterClient<T>;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAcA,SAAgB,gBACd,SACA,OAAqB,YACI;CACzB,WAAOA,+BAAiB,IAAIC,2BAAQ;EAAE,QAAQ;EAAS,KAAK;CAAK,CAAC,CAAC;AACrE"}
|
package/dist/client.d.cts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { ContractRouterClient, RouterContract } from "@orpc/contract";
|
|
2
2
|
//#region src/client.d.ts
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Bare typed oRPC client over the RPC protocol — a thin convenience over
|
|
5
|
+
* `createORPCClient(new RPCLink({ origin, url }))`.
|
|
6
|
+
*
|
|
7
|
+
* Promise-native, so async/await callers call it directly and Effect callers
|
|
8
|
+
* lift calls with `Effect.tryPromise` (owning timeout/retry/cache in their
|
|
9
|
+
* service layer). Transport customization (headers, timeouts, retries, test
|
|
10
|
+
* doubles) is RPCLink's native surface — construct the link yourself and pass
|
|
11
|
+
* it to `createORPCClient` instead of growing config here.
|
|
12
|
+
*/
|
|
13
|
+
declare function createRpcClient<T extends RouterContract = RouterContract>(hostUrl: string, path?: `/${string}`): ContractRouterClient<T>;
|
|
13
14
|
//#endregion
|
|
14
|
-
export {
|
|
15
|
+
export { createRpcClient };
|
|
15
16
|
//# sourceMappingURL=client.d.cts.map
|
package/dist/client.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.cts","names":[],"sources":["../src/client.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.cts","names":[],"sources":["../src/client.ts"],"mappings":";;;;;;;;;;;;iBAcgB,gBAAgB,UAAU,iBAAiB,gBACzD,iBACA,sBACC,qBAAqB"}
|
package/dist/client.d.mts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { ContractRouterClient, RouterContract } from "@orpc/contract";
|
|
2
2
|
//#region src/client.d.ts
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Bare typed oRPC client over the RPC protocol — a thin convenience over
|
|
5
|
+
* `createORPCClient(new RPCLink({ origin, url }))`.
|
|
6
|
+
*
|
|
7
|
+
* Promise-native, so async/await callers call it directly and Effect callers
|
|
8
|
+
* lift calls with `Effect.tryPromise` (owning timeout/retry/cache in their
|
|
9
|
+
* service layer). Transport customization (headers, timeouts, retries, test
|
|
10
|
+
* doubles) is RPCLink's native surface — construct the link yourself and pass
|
|
11
|
+
* it to `createORPCClient` instead of growing config here.
|
|
12
|
+
*/
|
|
13
|
+
declare function createRpcClient<T extends RouterContract = RouterContract>(hostUrl: string, path?: `/${string}`): ContractRouterClient<T>;
|
|
13
14
|
//#endregion
|
|
14
|
-
export {
|
|
15
|
+
export { createRpcClient };
|
|
15
16
|
//# sourceMappingURL=client.d.mts.map
|
package/dist/client.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.mts","names":[],"sources":["../src/client.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.mts","names":[],"sources":["../src/client.ts"],"mappings":";;;;;;;;;;;;iBAcgB,gBAAgB,UAAU,iBAAiB,gBACzD,iBACA,sBACC,qBAAqB"}
|
package/dist/client.mjs
CHANGED
|
@@ -1,70 +1,22 @@
|
|
|
1
|
-
import { createORPCClient
|
|
1
|
+
import { createORPCClient } from "@orpc/client";
|
|
2
2
|
import { RPCLink } from "@orpc/client/fetch";
|
|
3
3
|
|
|
4
4
|
//#region src/client.ts
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
new Headers(overrides).forEach((value, key) => {
|
|
21
|
-
merged.set(key, value);
|
|
22
|
-
});
|
|
23
|
-
return merged;
|
|
24
|
-
}
|
|
25
|
-
function createRpcLink(config, headers) {
|
|
26
|
-
return new RPCLink({
|
|
27
|
-
origin: config.hostUrl,
|
|
28
|
-
url: config.path,
|
|
29
|
-
interceptors: [onError((error) => {
|
|
30
|
-
if (typeof globalThis.window === "undefined") return;
|
|
31
|
-
if (error && typeof error === "object" && "message" in error) {
|
|
32
|
-
const message = String(error.message).toLowerCase();
|
|
33
|
-
if (message.includes("fetch") || message.includes("network") || message.includes("failed to fetch")) import("sonner").then(({ toast }) => {
|
|
34
|
-
const message = config.connectionError?.() ?? {
|
|
35
|
-
title: "Unable to connect to API",
|
|
36
|
-
description: "The API is currently unavailable. Please try again later."
|
|
37
|
-
};
|
|
38
|
-
toast.error(message.title, {
|
|
39
|
-
id: "api-connection-error",
|
|
40
|
-
description: message.description
|
|
41
|
-
});
|
|
42
|
-
}).catch(() => {});
|
|
43
|
-
}
|
|
44
|
-
})],
|
|
45
|
-
fetch(fetchUrl, options) {
|
|
46
|
-
return fetchWithRateLimitRetry(fetchUrl, {
|
|
47
|
-
...options,
|
|
48
|
-
credentials: "include",
|
|
49
|
-
headers: headers ? mergeHeaders(headers, options?.headers) : options?.headers
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
function buildRpcClient(config, headers) {
|
|
55
|
-
if (!config.hostUrl) throw new Error("Missing runtime host URL");
|
|
56
|
-
return createORPCClient(createRpcLink(config, headers));
|
|
57
|
-
}
|
|
58
|
-
function createRpcClient(config, headers) {
|
|
59
|
-
if (typeof globalThis.window !== "undefined" && !headers) {
|
|
60
|
-
const key = `${config.hostUrl}${config.path}`;
|
|
61
|
-
const memoized = browserClients.get(key);
|
|
62
|
-
if (memoized) return memoized;
|
|
63
|
-
const client = buildRpcClient(config, headers);
|
|
64
|
-
browserClients.set(key, client);
|
|
65
|
-
return client;
|
|
66
|
-
}
|
|
67
|
-
return buildRpcClient(config, headers);
|
|
5
|
+
/**
|
|
6
|
+
* Bare typed oRPC client over the RPC protocol — a thin convenience over
|
|
7
|
+
* `createORPCClient(new RPCLink({ origin, url }))`.
|
|
8
|
+
*
|
|
9
|
+
* Promise-native, so async/await callers call it directly and Effect callers
|
|
10
|
+
* lift calls with `Effect.tryPromise` (owning timeout/retry/cache in their
|
|
11
|
+
* service layer). Transport customization (headers, timeouts, retries, test
|
|
12
|
+
* doubles) is RPCLink's native surface — construct the link yourself and pass
|
|
13
|
+
* it to `createORPCClient` instead of growing config here.
|
|
14
|
+
*/
|
|
15
|
+
function createRpcClient(hostUrl, path = "/api/rpc") {
|
|
16
|
+
return createORPCClient(new RPCLink({
|
|
17
|
+
origin: hostUrl,
|
|
18
|
+
url: path
|
|
19
|
+
}));
|
|
68
20
|
}
|
|
69
21
|
|
|
70
22
|
//#endregion
|
package/dist/client.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.mjs","names":[],"sources":["../src/client.ts"],"sourcesContent":["import { createORPCClient
|
|
1
|
+
{"version":3,"file":"client.mjs","names":[],"sources":["../src/client.ts"],"sourcesContent":["import { createORPCClient } from \"@orpc/client\";\nimport { RPCLink } from \"@orpc/client/fetch\";\nimport type { ContractRouterClient, RouterContract } from \"@orpc/contract\";\n\n/**\n * Bare typed oRPC client over the RPC protocol — a thin convenience over\n * `createORPCClient(new RPCLink({ origin, url }))`.\n *\n * Promise-native, so async/await callers call it directly and Effect callers\n * lift calls with `Effect.tryPromise` (owning timeout/retry/cache in their\n * service layer). Transport customization (headers, timeouts, retries, test\n * doubles) is RPCLink's native surface — construct the link yourself and pass\n * it to `createORPCClient` instead of growing config here.\n */\nexport function createRpcClient<T extends RouterContract = RouterContract>(\n hostUrl: string,\n path: `/${string}` = \"/api/rpc\",\n): ContractRouterClient<T> {\n return createORPCClient(new RPCLink({ origin: hostUrl, url: path })) as ContractRouterClient<T>;\n}\n"],"mappings":";;;;;;;;;;;;;;AAcA,SAAgB,gBACd,SACA,OAAqB,YACI;CACzB,OAAO,iBAAiB,IAAI,QAAQ;EAAE,QAAQ;EAAS,KAAK;CAAK,CAAC,CAAC;AACrE"}
|