@valbuild/tanstack-build 0.142.0 → 0.144.2

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.
@@ -1,4 +1,5 @@
1
- import { _ as _createForOfIteratorHelper, a as _asyncToGenerator, b as _regenerator, c as _toConsumableArray, d as _slicedToArray, e as _regeneratorValues, f as _objectSpread2, g as _defineProperty } from './regeneratorValues-3acdc3fe.esm.js';
1
+ import { _ as _createForOfIteratorHelper, a as _asyncToGenerator, b as _regenerator, c as _toConsumableArray, d as _slicedToArray, s as sha256Hex, e as _regeneratorValues, f as _objectSpread2, r as resolveAsset, g as assetModule, i as isAsset, h as _defineProperty } from './regeneratorValues-af449040.esm.js';
2
+ export { I as INLINE_LIMIT, j as base64Bytes, i as isAsset } from './regeneratorValues-af449040.esm.js';
2
3
  import { build } from '@rolldown/browser';
3
4
  import { E as ENTRY, T as TREE } from './projectPaths-5e4defea.esm.js';
4
5
  export { E as ENTRY, R as ROUTES_DIR, T as TREE } from './projectPaths-5e4defea.esm.js';
@@ -372,32 +373,6 @@ function _transformServerFns() {
372
373
  return _transformServerFns.apply(this, arguments);
373
374
  }
374
375
 
375
- // One sha256, used by the build hash and by asset content-addressing.
376
- //
377
- // `crypto.subtle` rather than node:crypto: the builder runs in a browser tab as
378
- // well as in Node, and this is the only digest available in both.
379
- function sha256Hex(_x) {
380
- return _sha256Hex.apply(this, arguments);
381
- }
382
- function _sha256Hex() {
383
- _sha256Hex = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(text) {
384
- var digest;
385
- return _regenerator().w(function (_context) {
386
- while (1) switch (_context.n) {
387
- case 0:
388
- _context.n = 1;
389
- return crypto.subtle.digest("SHA-256", new TextEncoder().encode(text));
390
- case 1:
391
- digest = _context.v;
392
- return _context.a(2, _toConsumableArray(new Uint8Array(digest)).map(function (_byte) {
393
- return _byte.toString(16).padStart(2, "0");
394
- }).join(""));
395
- }
396
- }, _callee);
397
- }));
398
- return _sha256Hex.apply(this, arguments);
399
- }
400
-
401
376
  var isCssModule = function isCssModule(path) {
402
377
  return /\.module\.css$/.test(path.split("?")[0]);
403
378
  };
@@ -478,6 +453,93 @@ var cssModuleExports = function cssModuleExports(names) {
478
453
  return "export default ".concat(JSON.stringify(names, null, 2), "\n");
479
454
  };
480
455
 
456
+ // `@import` inside a stylesheet.
457
+ /**
458
+ * A comment, or an `@import` with a quoted target -- `@import "x";`,
459
+ * `@import 'x' layer(base);`, `@import url("x") screen;`.
460
+ *
461
+ * Comments are matched so they can be skipped: an `@import` inside one is
462
+ * documentation, not an import. An unquoted `url(x)` is left for the browser,
463
+ * which is also what it does with one.
464
+ */
465
+ var IMPORT_OR_COMMENT = /\/\*[\s\S]*?\*\/|@import\s+(?:url\(\s*)?(["'])([^"']+)\1\s*\)?\s*([^;]*);/g;
466
+ var isTailwind = function isTailwind(specifier) {
467
+ return /^tailwindcss(\/|$)/.test(specifier);
468
+ };
469
+ var isUrl = function isUrl(specifier) {
470
+ return /^([a-z]+:)?\/\//i.test(specifier) || specifier.startsWith("data:");
471
+ };
472
+ var isRelative = function isRelative(specifier) {
473
+ return specifier.startsWith("./") || specifier.startsWith("../") || specifier.startsWith("/");
474
+ };
475
+
476
+ /**
477
+ * What an `@import`'s conditions do to the sheet it pulls in.
478
+ *
479
+ * `layer(name)` puts it in a cascade layer, `supports(...)` behind a feature
480
+ * query and anything left over is a media query -- so inlining has to keep
481
+ * each as the block it would have been, or the rules would apply everywhere.
482
+ */
483
+ function wrap(css, conditions) {
484
+ var rest = conditions.trim();
485
+ var layer = null;
486
+ var supports = null;
487
+ var layerMatch = /^layer(?:\(([^)]*)\))?/.exec(rest);
488
+ if (layerMatch) {
489
+ var _layerMatch$;
490
+ layer = ((_layerMatch$ = layerMatch[1]) !== null && _layerMatch$ !== void 0 ? _layerMatch$ : "").trim();
491
+ rest = rest.slice(layerMatch[0].length).trim();
492
+ }
493
+ var supportsMatch = /^supports\(((?:[^()]|\([^()]*\))*)\)/.exec(rest);
494
+ if (supportsMatch) {
495
+ supports = supportsMatch[1].trim();
496
+ rest = rest.slice(supportsMatch[0].length).trim();
497
+ }
498
+ var out = css;
499
+ if (layer !== null) out = "@layer".concat(layer ? " ".concat(layer) : "", " {\n").concat(out, "\n}");
500
+ if (supports !== null) out = "@supports (".concat(supports, ") {\n").concat(out, "\n}");
501
+ if (rest) out = "@media ".concat(rest, " {\n").concat(out, "\n}");
502
+ return out;
503
+ }
504
+
505
+ /**
506
+ * The stylesheet at `path`, with every `@import` it can resolve inlined.
507
+ *
508
+ * `path` is the project path of the sheet, or the specifier of a dependency's
509
+ * sheet. A dependency's own relative imports were flattened when it was read
510
+ * (see `collectDependencyCss`), so what is left in one is bare, if anything.
511
+ */
512
+ function expandCssImports(path, css, context) {
513
+ var fromDependency = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
514
+ return css.replace(IMPORT_OR_COMMENT, function (match, quote, specifier, conditions) {
515
+ if (quote === undefined || specifier === undefined) return match;
516
+ if (isTailwind(specifier) || isUrl(specifier)) return match;
517
+ if (isRelative(specifier)) {
518
+ if (fromDependency) {
519
+ context.warnings.push("'".concat(path, "' imports '").concat(specifier, "', which was not carried with it. ") + "Its own stylesheets are read when the vendor layer is built; " + "publish again from the CLI.");
520
+ return "";
521
+ }
522
+ var target = resolve(dirname(path), specifier);
523
+ var _text = context.files[target];
524
+ if (_text === undefined) {
525
+ context.warnings.push("'".concat(path, "' imports '").concat(specifier, "', and there is no '").concat(target, "' in the project."));
526
+ return "";
527
+ }
528
+ if (context.seen.has(target)) return "";
529
+ context.seen.add(target);
530
+ return wrap(expandCssImports(target, _text, context).trim(), conditions !== null && conditions !== void 0 ? conditions : "");
531
+ }
532
+ var text = context.dependencyCss[specifier];
533
+ if (text === undefined) {
534
+ context.warnings.push("'".concat(path, "' imports '").concat(specifier, "', a stylesheet this build does not carry. ") + "Is '".concat(specifier.startsWith("@") ? specifier.split("/").slice(0, 2).join("/") : specifier.split("/")[0], "' ") + "in package.json's dependencies?");
535
+ return "";
536
+ }
537
+ if (context.seen.has(specifier)) return "";
538
+ context.seen.add(specifier);
539
+ return wrap(expandCssImports(specifier, text, context, true).trim(), conditions !== null && conditions !== void 0 ? conditions : "");
540
+ });
541
+ }
542
+
481
543
  var CSS_EXTENSIONS = [".css"];
482
544
 
483
545
  /**
@@ -558,6 +620,7 @@ function _collectCss() {
558
620
  contributing,
559
621
  modules,
560
622
  warnings,
623
+ imports,
561
624
  walk,
562
625
  _walk,
563
626
  _args3 = arguments;
@@ -597,7 +660,7 @@ function _collectCss() {
597
660
  _context2.n = 4;
598
661
  break;
599
662
  case 3:
600
- sheets.push(text);
663
+ sheets.push(expandCssImports(bare, text, imports));
601
664
  case 4:
602
665
  contributing.push(bare);
603
666
  return _context2.a(2);
@@ -641,7 +704,7 @@ function _collectCss() {
641
704
  break;
642
705
  }
643
706
  visited.add(_bare);
644
- sheets.push(dependencyCss[_bare]);
707
+ sheets.push(expandCssImports(_bare, dependencyCss[_bare], imports, true));
645
708
  contributing.push(_bare);
646
709
  return _context2.a(3, 21);
647
710
  case 11:
@@ -721,7 +784,15 @@ function _collectCss() {
721
784
  sheets = [];
722
785
  contributing = [];
723
786
  modules = {};
724
- warnings = [];
787
+ warnings = []; // `@import`s inside the sheets. `seen` is the walk's own `visited`, so a
788
+ // stylesheet reached both from a module and from another sheet is emitted
789
+ // once, wherever it is reached first.
790
+ imports = {
791
+ files: files,
792
+ dependencyCss: dependencyCss,
793
+ seen: visited,
794
+ warnings: warnings
795
+ };
725
796
  _context3.n = 1;
726
797
  return walk(entry);
727
798
  case 1:
@@ -941,109 +1012,6 @@ function _compileTailwind() {
941
1012
  return _compileTailwind.apply(this, arguments);
942
1013
  }
943
1014
 
944
- /**
945
- * Extensions treated as assets.
946
- *
947
- * Deliberately a list rather than "anything not JS or CSS": an unknown
948
- * extension should fail as an unresolved import naming the file, not silently
949
- * become a URL to something the browser cannot use.
950
- */
951
- var ASSET_TYPES = {
952
- ".png": "image/png",
953
- ".jpg": "image/jpeg",
954
- ".jpeg": "image/jpeg",
955
- ".gif": "image/gif",
956
- ".webp": "image/webp",
957
- ".avif": "image/avif",
958
- ".svg": "image/svg+xml",
959
- ".ico": "image/x-icon",
960
- ".woff": "font/woff",
961
- ".woff2": "font/woff2",
962
- ".ttf": "font/ttf",
963
- ".otf": "font/otf",
964
- ".mp4": "video/mp4",
965
- ".webm": "video/webm",
966
- ".mp3": "audio/mpeg",
967
- ".wav": "audio/wav",
968
- ".pdf": "application/pdf",
969
- ".txt": "text/plain"
970
- };
971
- var extensionOf = function extensionOf(path) {
972
- var at = path.lastIndexOf(".");
973
- return at === -1 ? "" : path.slice(at).toLowerCase();
974
- };
975
- var isAsset = function isAsset(path) {
976
- return extensionOf(path) in ASSET_TYPES;
977
- };
978
- var mimeOf = function mimeOf(path) {
979
- var _ASSET_TYPES$extensio;
980
- return (_ASSET_TYPES$extensio = ASSET_TYPES[extensionOf(path)]) !== null && _ASSET_TYPES$extensio !== void 0 ? _ASSET_TYPES$extensio : "application/octet-stream";
981
- };
982
-
983
- /**
984
- * Below this many decoded bytes, an asset is inlined as a data URI.
985
- *
986
- * 4 kB, matching Vite's `assetsInlineLimit` default. The trade is the same one
987
- * Vite is making: an extra request costs more than 4 kB of base64 does, and
988
- * above that it stops being true.
989
- */
990
- var INLINE_LIMIT = 4096;
991
-
992
- /** Decoded byte length of base64, without decoding it. */
993
- function base64Bytes(base64) {
994
- var clean = base64.replace(/=+$/, "");
995
- return Math.floor(clean.length * 3 / 4);
996
- }
997
- /**
998
- * Where an asset import resolves to, for one target.
999
- *
1000
- * Server and client get the *same* URL. An asset is a URL in both, and SSR has
1001
- * to emit the same `src` the browser will hydrate against -- a server bundle
1002
- * with a different URL would be a hydration mismatch on every image.
1003
- */
1004
- function resolveAsset(_x, _x2) {
1005
- return _resolveAsset.apply(this, arguments);
1006
- }
1007
-
1008
- /** Where published assets are served from. Matched by the loader. */
1009
- function _resolveAsset() {
1010
- _resolveAsset = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(path, base64) {
1011
- var hash, name;
1012
- return _regenerator().w(function (_context) {
1013
- while (1) switch (_context.n) {
1014
- case 0:
1015
- if (!(base64Bytes(base64) <= INLINE_LIMIT)) {
1016
- _context.n = 1;
1017
- break;
1018
- }
1019
- return _context.a(2, {
1020
- url: "data:".concat(mimeOf(path), ";base64,").concat(base64)
1021
- });
1022
- case 1:
1023
- _context.n = 2;
1024
- return sha256Hex(base64);
1025
- case 2:
1026
- hash = _context.v.slice(0, 16);
1027
- name = "".concat(hash).concat(extensionOf(path));
1028
- return _context.a(2, {
1029
- url: "".concat(ASSET_BASE).concat(name),
1030
- file: {
1031
- name: name,
1032
- base64: base64
1033
- }
1034
- });
1035
- }
1036
- }, _callee);
1037
- }));
1038
- return _resolveAsset.apply(this, arguments);
1039
- }
1040
- var ASSET_BASE = "/_app/a/";
1041
-
1042
- /** The module a resolved asset import becomes. */
1043
- var assetModule = function assetModule(url) {
1044
- return "export default ".concat(JSON.stringify(url), "\n");
1045
- };
1046
-
1047
1015
  /** Cheap pre-filter: skip the parse unless one of these appears in the source. */
1048
1016
  var MARKERS = ["createIsomorphicFn", "createServerOnlyFn", "createClientOnlyFn", "createMiddleware", "ClientOnly"];
1049
1017
 
@@ -3213,6 +3181,8 @@ function _buildUserApp() {
3213
3181
  _context3.n = 4;
3214
3182
  break;
3215
3183
  case 7:
3184
+ Object.assign(assetFiles, input.dependencyAssets);
3185
+
3216
3186
  // Collected once rather than per target: the stylesheet is the same either
3217
3187
  // way, and only the client ever uses it. Whether a build produced one is
3218
3188
  // recorded in the head pointer at publish time, because the loader -- not the
@@ -3841,14 +3811,23 @@ var LEGACY_CONTROL_HOST = "platform.internal";
3841
3811
  * rewrites single lines of its `val.server.ts` and never regenerates it.
3842
3812
  */
3843
3813
  var PROPOSAL_BLOCK = "/*\n * THE PROPOSAL this isolate serves the address of, when it does: its name and\n * content branch, and the content it has saved (`VAL_OVERLAY`: the save's\n * commit, its Source by module and its `.val.ts` text by path). Val reads\n * that Source instead of the bundle's, commits a save to the proposal, and\n * names the save as its position. valbuild/home `docs/proposals.md`,\n * \"Saving\".\n *\n * Parsed here rather than with `proposalFromEnv` from @valbuild/server,\n * because this file is compiled against whatever @valbuild/tanstack the\n * PROJECT installed, and one from before proposals has no such export -- it\n * also ignores the `proposal` key below, and serves the base build, which\n * is the best an old app can do. A snapshot that does not parse is thrown,\n * not served as the base: a reviewer must not be shown the wrong content as\n * though it were the proposal.\n */\nconst proposal = (() => {\n const name = secret(\"VAL_PROPOSAL\");\n const branch = secret(\"VAL_BRANCH\");\n if (!name || !branch) return undefined;\n const overlay: {\n commit?: string | null;\n modules?: Record<string, unknown>;\n files?: Record<string, string>;\n } = JSON.parse(secret(\"VAL_OVERLAY\") ?? \"{}\");\n return {\n name,\n branch,\n commit: overlay.commit ?? null,\n modules: overlay.modules ?? {},\n files: overlay.files ?? {},\n };\n})();\n";
3814
+ /**
3815
+ * THE CONTENT VERSION the site serves, when it differs from the one this build
3816
+ * bundles (\`VAL_CONTENT\`). See valbuild/home \`docs/hosted-publishing.md\`,
3817
+ * step 2. A constant for the same reason as {@link PROPOSAL_BLOCK}, and it
3818
+ * arrives in files wired before it the same way: {@link rebakeContent}.
3819
+ */
3820
+ var CONTENT_BLOCK = "/*\n * THE CONTENT VERSION the site serves, when the platform says it differs from\n * the one this build bundles (`VAL_CONTENT`: its id, the publish that made\n * it, and the Source and Val files that differ). Val reads that Source instead\n * of the bundle's and names that publish as its position. valbuild/home\n * `docs/hosted-publishing.md`, step 2.\n *\n * Parsed here, like the proposal above, because this file is compiled against\n * whatever @valbuild/tanstack the PROJECT installed. One from before content\n * versions ignores the `contentVersion` key below and serves the bundle --\n * and never says it applied the version, which is how the platform knows not\n * to serve this build a version it does not bundle. A version that does not\n * parse is thrown, not served as the bundle.\n *\n * A version too large for one variable names others under `refs`\n * (`\"env://VAL_CONTENT_1\"`), each holding one module's Source or one file's\n * text. Only `refs` is resolved, never a string inside Source, and only\n * `VAL_CONTENT_<n>` is read: Source is text editors write, and resolving a\n * reference in there would read `VAL_SECRET` into a page. The same rules as\n * `contentFromEnv` in @valbuild/server.\n */\nconst contentVersion = (() => {\n const handed = secret(\"VAL_CONTENT\");\n if (!handed) return undefined;\n const isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === \"object\" && value !== null && !Array.isArray(value);\n const parsed: unknown = JSON.parse(handed);\n if (!isRecord(parsed)) throw new Error(\"Val: VAL_CONTENT is not an object\");\n const id = parsed.id;\n if (typeof id !== \"string\" || id === \"\") {\n throw new Error(\"Val: VAL_CONTENT has no id\");\n }\n const where = \"Val: content version \" + id;\n const nullableString = (key: string): string | null => {\n const value = parsed[key] ?? null;\n if (value !== null && typeof value !== \"string\") {\n throw new Error(where + \": \" + key + \" must be a string or null\");\n }\n return value;\n };\n const record = (value: unknown, name: string): Record<string, unknown> => {\n const found = value ?? {};\n if (!isRecord(found)) throw new Error(where + \": \" + name + \" must be an object\");\n return found;\n };\n const job = nullableString(\"job\");\n const commit = nullableString(\"commit\");\n const modules: Record<string, unknown> = { ...record(parsed.modules, \"modules\") };\n const filesIn = record(parsed.files, \"files\");\n const files: Record<string, string> = {};\n for (const [path, text] of Object.entries(filesIn)) {\n if (typeof text === \"string\") files[path] = text;\n }\n const refs = record(parsed.refs, \"refs\");\n const read = (kind: string, path: string, ref: unknown): string => {\n const at = where + \": refs.\" + kind + \"[\" + path + \"]\";\n if (typeof ref !== \"string\" || !ref.startsWith(\"env://\")) {\n throw new Error(at + \" is \" + String(ref) + \": only env://VAL_CONTENT_<n> is read\");\n }\n const name = ref.slice(\"env://\".length);\n if (!/^VAL_CONTENT_[0-9]+$/.test(name)) {\n throw new Error(at + \" names \" + name + \": only VAL_CONTENT_<n> is read\");\n }\n const value = secret(name);\n if (value === undefined) {\n throw new Error(at + \" names \" + name + \", which is not set\");\n }\n return value;\n };\n for (const [path, ref] of Object.entries(record(refs.modules, \"refs.modules\"))) {\n if (Object.prototype.hasOwnProperty.call(modules, path)) {\n throw new Error(where + \": \" + path + \" is in modules and refs.modules\");\n }\n modules[path] = JSON.parse(read(\"modules\", path, ref));\n }\n for (const [path, ref] of Object.entries(record(refs.files, \"refs.files\"))) {\n if (Object.prototype.hasOwnProperty.call(filesIn, path)) {\n throw new Error(where + \": \" + path + \" is in files and refs.files\");\n }\n files[path] = read(\"files\", path, ref);\n }\n if (job === null && commit === null) {\n throw new Error(where + \" must name a job or a commit, or it would be placed at the build it runs in\");\n }\n return { id, job, commit, modules, files };\n})();\n";
3844
3821
  /** Where {@link PROPOSAL_BLOCK} goes: right after this line. */
3845
3822
  var SERVED_BUILD_LINE = 'const servedBuild = secret("VAL_BUILD");\n';
3846
3823
  /** And the option that hands it to Val, after the build's. */
3847
3824
  var PROPOSAL_OPTION = " ...(proposal !== undefined ? { proposal } : {}),\n";
3825
+ /** And the content version's, after the proposal's. */
3826
+ var CONTENT_OPTION = " ...(contentVersion !== undefined ? { contentVersion } : {}),\n";
3848
3827
  var PUBLISH_BUILD_OPTION = " ...(servedBuild !== undefined ? { publishBuild: servedBuild } : {}),\n";
3849
3828
  var valServerSource = function valServerSource(_ref) {
3850
3829
  var git = _ref.git;
3851
- return "".concat(WIRED_MARKER, "\nimport {\n initValContent,\n initValServer,\n} from \"@valbuild/tanstack/server\";\nimport { config } from \"../../val.config\";\nimport valModules from \"../../val.modules\";\n/*\n * This build's own source, which a publish patches. A project with no\n * repository has no other copy of its `.val.ts` text: content keeps its\n * content as data. Ignored by a @valbuild/tanstack that predates it.\n */\nimport { FILES } from \"platform:project-source\";\n\n/**\n * A secret, as the platform hands it over at RUNTIME.\n *\n * Preferred over `process.env`, which the builder inlines as a literal into\n * this bundle: that puts the value in storage inside the code, copies it into\n * every isolate that loads it, and makes rotating it a republish.\n *\n * Falls back to the build-time value, so an app published before secrets\n * existed keeps working.\n */\nfunction secret(name: string): string | undefined {\n return (globalThis.__PLATFORM_SECRETS ?? {})[name] ?? process.env[name];\n}\n\n/**\n * The commit this build was made from, and the branch it commits to.\n *\n * Baked in rather than handed over at runtime, unlike a secret, because it is\n * not configuration -- it is a property OF THIS BUILD. Every read of a\n * `.val.ts` in http mode fetches that path from the content service at this\n * sha, so a build served with somebody else's commit renders and edits a\n * version of its files it was not compiled from. A secret can be rotated under\n * a running build; this cannot, and publishing again is how it changes.\n *\n * WHAT THIS IS NOT. It is not every read: a committed render reads the source\n * bundled into this build and asks the content service nothing. It is the\n * PUBLISH path -- turning pending patches into new `.val.ts` text means\n * fetching the current text to patch, and that is the read that happens at\n * this sha. The docblock used to say \"every read\", which sent readers looking\n * for a content call on the serving path that is not there.\n *\n * `null` when the source came from no commit -- a record assembled in a tab,\n * a fixture, or ANY build this platform makes, which is the common case rather\n * than the exception. Such a build has no repository to mirror commits into,\n * and does not need one: the content service is the store of record for\n * content and mints its own commit shas. Val is in http mode on credentials\n * alone.\n */\nconst BUILT_FROM = ").concat(git ? JSON.stringify(git) : "null", ";\n\n/**\n * The publish job this build was made for, when a Studio built it in a tab.\n *\n * A tab's build has no commit to bake -- the job's is minted at the seal, after\n * the build -- so this is how it says where it sits in the content service's\n * chain. Without it the service places it at whatever build is live, which is\n * a different build for a request this one is still serving when the pointer\n * moves. Set by the Studio (`rebakeGit`), `null` for any other build.\n */\nconst BUILT_FOR_JOB = null;\n\n/**\n * What puts Val in http mode: its content service owns the content.\n *\n * The same three things any deployed Val app is configured with. Note what is\n * NOT here: no `sourceFiles`, so patches are relayed to the content service\n * instead of being kept by this platform, and the browser uploads an image\n * straight there on a presigned URL instead of streaming it through here.\n *\n * `undefined` when a credential or the commit is missing, and deliberately not\n * a throw at module scope: that would take the isolate down with it, page\n * renders included. Val is left to refuse the request and name what it wanted\n * -- `VAL_ENV=app` is set on this build precisely so that a missing credential\n * is an error instead of a fall-through to `fs` mode, looking for a working\n * tree that is not in here.\n */\nconst apiKey = secret(\"VAL_API_KEY\");\nconst valSecret = secret(\"VAL_SECRET\");\n/*\n * Which content service, for a project that is not pointed at the real one.\n *\n * A secret rather than a baked literal, because unlike the commit this IS\n * configuration: the same build should be servable against a stand-in and\n * against production. It is what makes the editing path testable at all --\n * Val's own `e2e/mock-content-host` implements this wire protocol with no git\n * repository behind it -- and without it a build could only ever talk to\n * content.val.build.\n *\n * It does NOT redirect everything, and the gap is in Val rather than here:\n * `getSettings`, which remote FILES use, reads `process.env.VAL_CONTENT_URL`\n * at module scope inside @valbuild/server. This platform bundles its\n * dependencies separately from the app, so nothing it sets reaches that read --\n * the same reason `apiKey` has to be passed in rather than found. So patches,\n * commits and source reads go where this says, and remote file uploads still\n * address the real host.\n */\nconst valContentUrl = secret(\"VAL_CONTENT_URL\");\n/*\n * WHICH project's content this is, at the content service.\n *\n * Val's own name for the project (`org/name`), which is not the platform's\n * project id and cannot be derived from it. A repository that is deployed\n * anywhere else puts it in `val.config.ts`; one imported here need not have,\n * so it is configuration the platform can supply -- and it goes through\n * `secret` rather than `--env` for a second reason: a build-time literal\n * would have to be baked into the shared dependency layer, where\n * @valbuild/server reads `process.env.VAL_PROJECT`, and that layer is reused\n * by every project with the same dependencies.\n *\n * What the app configured wins over nothing at all, so a repository that does\n * name its project keeps working with no secret set.\n */\nconst valProject = secret(\"VAL_PROJECT\");\n/*\n * WHICH BUILD this is, as the platform running it says.\n *\n * Not baked like `BUILT_FROM`, because it cannot be: a build's hash is taken\n * of its output, this file included. The platform hands it over at runtime,\n * and Val sends it to the content service, which places this build's overlay\n * by it -- the one answer that holds for the minute after a publish in which\n * the edge still serves this build while the pointer already names the next.\n * Ignored by a @valbuild/tanstack that predates it.\n */\nconst servedBuild = secret(\"VAL_BUILD\");\n").concat(PROPOSAL_BLOCK, "const valConfig = {\n ...config,\n ...(valProject !== undefined ? { project: valProject } : {}),\n};\n/*\n * CREDENTIALS ALONE. A commit is not part of what puts Val in http mode.\n *\n * It used to be: `GIT !== null` was in this condition, and a build with no\n * commit fell through to `undefined` -- which meant every site this platform\n * seeded was silently unable to edit, because a shared build cannot know a\n * commit. The binding that worked around it (`VAL_GIT_COMMIT` /\n * `VAL_GIT_BRANCH` out of the project's secrets) is gone with it: it named a\n * commit in the TEMPLATE's repository, which was true only for as long as\n * seeding and repository creation shared a template, and it was one more thing\n * in KV that could go stale.\n *\n * The commit is optional NOW, and it is still sent where there is one -- see\n * the note at the spread below. What is gone is the binding that supplied one\n * from KV, so there is one source per environment and no precedence rule\n * between a baked value and a bound one.\n */\nconst http =\n apiKey !== undefined && valSecret !== undefined\n ? {\n apiKey,\n valSecret,\n /*\n * BOTH SPELLINGS OF THE COMMIT, because the APP decides which one is\n * read and this file cannot know which app it is being written into.\n *\n * `ValHttpMode` has been renamed in both directions. Up to 0.132 it\n * took `gitCommit`/`gitBranch`; 0.133.0 replaced that pair with a\n * nested `git`; the version this package ships beside flattens it\n * back again. The generated file is compiled against whatever\n * `@valbuild/tanstack` the PROJECT installed -- the starter pins\n * 0.133.0 -- and a platform writing this file has no say in that. So\n * this is not one rename behind or ahead: it is on both sides of one at\n * once, and will be until every app it publishes has moved.\n *\n * Sending only the wrong one is SILENT, which is why this is belt and\n * braces rather than a version check. An unknown key on the options\n * object is ignored, so the commit is simply dropped and a build wired\n * FROM A COMMIT runs as though it had none -- which means a publish\n * produces no mirrored `.val.ts`, so a save commits and hands over\n * nothing, and the site keeps serving its old content with the patches\n * already consumed. Nothing reports it. valbuild/home's loop is the one\n * thing that sees it, and it was bisected there: 25/25 with the key the\n * installed version reads, 21/23 without, failing at exactly \"the save\n * left the file it rewrote pending\".\n *\n * Whichever version is installed reads its own key and ignores the\n * other two. Drop this to one spelling when every app this platform\n * publishes is past the rename -- not before, and not on the say-so of\n * a compiler in the Val repository, which is looking at a different\n * version of `@valbuild/tanstack` than the app is.\n */\n ...(BUILT_FROM !== null\n ? {\n git: BUILT_FROM,\n gitCommit: BUILT_FROM.commit,\n gitBranch: BUILT_FROM.branch,\n }\n : {}),\n ...(valContentUrl !== undefined ? { valContentUrl } : {}),\n projectSource: FILES,\n ...(BUILT_FOR_JOB !== null ? { publishJob: BUILT_FOR_JOB } : {}),\n ...(servedBuild !== undefined ? { publishBuild: servedBuild } : {}),\n").concat(PROPOSAL_OPTION, " }\n : undefined;\n\nconst { valApiHandler, draftMode } = initValServer(\n valModules,\n valConfig,\n {\n ...(http ? { http } : {}),\n },\n);\n\nconst content = initValContent(valConfig, valModules, {\n draftMode,\n /*\n * The SAME object the API got.\n *\n * These readers resolve content through a Val server of their own rather than\n * by calling the API over HTTP, so the mode question is put to them\n * separately -- configuring only `initValServer` left them inferring `fs`\n * mode, looking for a working tree that is not in here. `gitCommit` is the\n * field that would be silently wrong rather than loudly missing: two\n * different shas means the API edits one version of a file while the page\n * renders another.\n */\n ...(http ? { http } : {}),\n});\n\nconst {\n fetchValStega: fetchVal,\n fetchValKeyStega: fetchValKey,\n fetchValRouteStega: fetchValRoute,\n fetchValRouteUrl,\n} = content;\n\n/**\n * The draft a page renders with in preview: `<ValProvider draft>`, read in the\n * site layout's loader. The starter imports it from this file, so a file\n * without it fails the build with a missing export.\n *\n * Asked of the result rather than destructured, because this file is compiled\n * against whatever `@valbuild/tanstack` the PROJECT installed, and one from\n * before 0.140 has no such reader. There it is \"no draft\", which is the\n * render that version had anyway -- and it is still a function either way, so\n * a page that calls it compiles against both.\n */\nconst fetchValDraft = async () =>\n \"fetchValDraft\" in content && typeof content.fetchValDraft === \"function\"\n ? content.fetchValDraft()\n : null;\n\n/**\n * A build that is MEANT to edit and cannot, refusing instead of pretending to.\n *\n * `BUILT_FROM` being non-null says this build came from a commit, so it was\n * made to edit against a content service. If the credentials for that service are not\n * here, the configuration is broken -- and the failure that was reaching people\n * was not an error at all. Val picks its storage mode by inference, so an\n * isolate with no api key lands in a mode that ACCEPTS the write and keeps it\n * in the isolate. Cloudflare starts an isolate per concurrent request, so the\n * save answers 200 and the next request, served by a different isolate, has\n * never heard of it. The edit is simply gone, and nothing anywhere said so.\n *\n * That is the worst available outcome: a person is told their work is saved\n * when it is not. Refusing is strictly better, and naming the missing secret\n * turns an evening of reading logs into one line in a response body.\n *\n * WHY HERE rather than relying on `VAL_ENV=app`: that is a build-time\n * substitution into the shared dependency layer, so whether a build fails\n * loudly depends on which layer it happens to be pinned to. This file is\n * written on every build, by the platform, and cannot be missing from one.\n *\n * Only the editing API. Page renders do not come through here, and a site whose\n * content cannot be edited should still serve the content it has.\n */\nconst editingApiHandler =\n http === undefined\n ? async () => {\n const missing = [\n apiKey === undefined ? \"VAL_API_KEY\" : null,\n valSecret === undefined ? \"VAL_SECRET\" : null,\n /*\n * A build from no commit is listed the same way, because from the\n * outside the two are one state. It is not a secret somebody can set\n * -- a commit is a property OF THE BUILD, and the only cure is\n * publishing this project's own repository over whatever is serving\n * it. Named anyway, because \"it was built from no commit\" is the\n * sentence that ends the search.\n */\n BUILT_FROM === null ? \"a commit (this build was made from none)\" : null,\n ].filter(Boolean);\n return Response.json(\n {\n error:\n \"This site cannot be edited. Its content lives in a content service, and \" +\n missing.join(\", \") +\n \" \" +\n (missing.length > 1 ? \"are\" : \"is\") +\n \" missing, so there is nothing to edit against. Editing is refused rather \" +\n \"than kept in this isolate's memory, where it would be lost without being \" +\n \"reported.\" +\n (BUILT_FROM === null\n ? \" A build made from no commit is usually one SEEDED from a template: \" +\n \"publish this project's own repository to replace it.\"\n : \" This build was made from commit \" + BUILT_FROM.commit.slice(0, 8) + \".\"),\n missing,\n },\n { status: 503 },\n );\n }\n : valApiHandler;\n\nexport {\n editingApiHandler as valApiHandler,\n draftMode,\n fetchVal,\n fetchValKey,\n fetchValRoute,\n fetchValRouteUrl,\n fetchValDraft,\n};\n");
3830
+ return "".concat(WIRED_MARKER, "\nimport {\n initValContent,\n initValServer,\n} from \"@valbuild/tanstack/server\";\nimport { config } from \"../../val.config\";\nimport valModules from \"../../val.modules\";\n/*\n * This build's own source, which a publish patches. A project with no\n * repository has no other copy of its `.val.ts` text: content keeps its\n * content as data. Ignored by a @valbuild/tanstack that predates it.\n */\nimport { FILES } from \"platform:project-source\";\n\n/**\n * A secret, as the platform hands it over at RUNTIME.\n *\n * Preferred over `process.env`, which the builder inlines as a literal into\n * this bundle: that puts the value in storage inside the code, copies it into\n * every isolate that loads it, and makes rotating it a republish.\n *\n * Falls back to the build-time value, so an app published before secrets\n * existed keeps working.\n */\nfunction secret(name: string): string | undefined {\n return (globalThis.__PLATFORM_SECRETS ?? {})[name] ?? process.env[name];\n}\n\n/**\n * The commit this build was made from, and the branch it commits to.\n *\n * Baked in rather than handed over at runtime, unlike a secret, because it is\n * not configuration -- it is a property OF THIS BUILD. Every read of a\n * `.val.ts` in http mode fetches that path from the content service at this\n * sha, so a build served with somebody else's commit renders and edits a\n * version of its files it was not compiled from. A secret can be rotated under\n * a running build; this cannot, and publishing again is how it changes.\n *\n * WHAT THIS IS NOT. It is not every read: a committed render reads the source\n * bundled into this build and asks the content service nothing. It is the\n * PUBLISH path -- turning pending patches into new `.val.ts` text means\n * fetching the current text to patch, and that is the read that happens at\n * this sha. The docblock used to say \"every read\", which sent readers looking\n * for a content call on the serving path that is not there.\n *\n * `null` when the source came from no commit -- a record assembled in a tab,\n * a fixture, or ANY build this platform makes, which is the common case rather\n * than the exception. Such a build has no repository to mirror commits into,\n * and does not need one: the content service is the store of record for\n * content and mints its own commit shas. Val is in http mode on credentials\n * alone.\n */\nconst BUILT_FROM = ").concat(git ? JSON.stringify(git) : "null", ";\n\n/**\n * The publish job this build was made for, when a Studio built it in a tab.\n *\n * A tab's build has no commit to bake -- the job's is minted at the seal, after\n * the build -- so this is how it says where it sits in the content service's\n * chain. Without it the service places it at whatever build is live, which is\n * a different build for a request this one is still serving when the pointer\n * moves. Set by the Studio (`rebakeGit`), `null` for any other build.\n */\nconst BUILT_FOR_JOB = null;\n\n/**\n * What puts Val in http mode: its content service owns the content.\n *\n * The same three things any deployed Val app is configured with. Note what is\n * NOT here: no `sourceFiles`, so patches are relayed to the content service\n * instead of being kept by this platform, and the browser uploads an image\n * straight there on a presigned URL instead of streaming it through here.\n *\n * `undefined` when a credential or the commit is missing, and deliberately not\n * a throw at module scope: that would take the isolate down with it, page\n * renders included. Val is left to refuse the request and name what it wanted\n * -- `VAL_ENV=app` is set on this build precisely so that a missing credential\n * is an error instead of a fall-through to `fs` mode, looking for a working\n * tree that is not in here.\n */\nconst apiKey = secret(\"VAL_API_KEY\");\nconst valSecret = secret(\"VAL_SECRET\");\n/*\n * Which content service, for a project that is not pointed at the real one.\n *\n * A secret rather than a baked literal, because unlike the commit this IS\n * configuration: the same build should be servable against a stand-in and\n * against production. It is what makes the editing path testable at all --\n * Val's own `e2e/mock-content-host` implements this wire protocol with no git\n * repository behind it -- and without it a build could only ever talk to\n * content.val.build.\n *\n * It does NOT redirect everything, and the gap is in Val rather than here:\n * `getSettings`, which remote FILES use, reads `process.env.VAL_CONTENT_URL`\n * at module scope inside @valbuild/server. This platform bundles its\n * dependencies separately from the app, so nothing it sets reaches that read --\n * the same reason `apiKey` has to be passed in rather than found. So patches,\n * commits and source reads go where this says, and remote file uploads still\n * address the real host.\n */\nconst valContentUrl = secret(\"VAL_CONTENT_URL\");\n/*\n * WHICH project's content this is, at the content service.\n *\n * Val's own name for the project (`org/name`), which is not the platform's\n * project id and cannot be derived from it. A repository that is deployed\n * anywhere else puts it in `val.config.ts`; one imported here need not have,\n * so it is configuration the platform can supply -- and it goes through\n * `secret` rather than `--env` for a second reason: a build-time literal\n * would have to be baked into the shared dependency layer, where\n * @valbuild/server reads `process.env.VAL_PROJECT`, and that layer is reused\n * by every project with the same dependencies.\n *\n * What the app configured wins over nothing at all, so a repository that does\n * name its project keeps working with no secret set.\n */\nconst valProject = secret(\"VAL_PROJECT\");\n/*\n * WHICH BUILD this is, as the platform running it says.\n *\n * Not baked like `BUILT_FROM`, because it cannot be: a build's hash is taken\n * of its output, this file included. The platform hands it over at runtime,\n * and Val sends it to the content service, which places this build's overlay\n * by it -- the one answer that holds for the minute after a publish in which\n * the edge still serves this build while the pointer already names the next.\n * Ignored by a @valbuild/tanstack that predates it.\n */\nconst servedBuild = secret(\"VAL_BUILD\");\n").concat(PROPOSAL_BLOCK).concat(CONTENT_BLOCK, "const valConfig = {\n ...config,\n ...(valProject !== undefined ? { project: valProject } : {}),\n};\n/*\n * CREDENTIALS ALONE. A commit is not part of what puts Val in http mode.\n *\n * It used to be: `GIT !== null` was in this condition, and a build with no\n * commit fell through to `undefined` -- which meant every site this platform\n * seeded was silently unable to edit, because a shared build cannot know a\n * commit. The binding that worked around it (`VAL_GIT_COMMIT` /\n * `VAL_GIT_BRANCH` out of the project's secrets) is gone with it: it named a\n * commit in the TEMPLATE's repository, which was true only for as long as\n * seeding and repository creation shared a template, and it was one more thing\n * in KV that could go stale.\n *\n * The commit is optional NOW, and it is still sent where there is one -- see\n * the note at the spread below. What is gone is the binding that supplied one\n * from KV, so there is one source per environment and no precedence rule\n * between a baked value and a bound one.\n */\nconst http =\n apiKey !== undefined && valSecret !== undefined\n ? {\n apiKey,\n valSecret,\n /*\n * BOTH SPELLINGS OF THE COMMIT, because the APP decides which one is\n * read and this file cannot know which app it is being written into.\n *\n * `ValHttpMode` has been renamed in both directions. Up to 0.132 it\n * took `gitCommit`/`gitBranch`; 0.133.0 replaced that pair with a\n * nested `git`; the version this package ships beside flattens it\n * back again. The generated file is compiled against whatever\n * `@valbuild/tanstack` the PROJECT installed -- the starter pins\n * 0.133.0 -- and a platform writing this file has no say in that. So\n * this is not one rename behind or ahead: it is on both sides of one at\n * once, and will be until every app it publishes has moved.\n *\n * Sending only the wrong one is SILENT, which is why this is belt and\n * braces rather than a version check. An unknown key on the options\n * object is ignored, so the commit is simply dropped and a build wired\n * FROM A COMMIT runs as though it had none -- which means a publish\n * produces no mirrored `.val.ts`, so a save commits and hands over\n * nothing, and the site keeps serving its old content with the patches\n * already consumed. Nothing reports it. valbuild/home's loop is the one\n * thing that sees it, and it was bisected there: 25/25 with the key the\n * installed version reads, 21/23 without, failing at exactly \"the save\n * left the file it rewrote pending\".\n *\n * Whichever version is installed reads its own key and ignores the\n * other two. Drop this to one spelling when every app this platform\n * publishes is past the rename -- not before, and not on the say-so of\n * a compiler in the Val repository, which is looking at a different\n * version of `@valbuild/tanstack` than the app is.\n */\n ...(BUILT_FROM !== null\n ? {\n git: BUILT_FROM,\n gitCommit: BUILT_FROM.commit,\n gitBranch: BUILT_FROM.branch,\n }\n : {}),\n ...(valContentUrl !== undefined ? { valContentUrl } : {}),\n projectSource: FILES,\n ...(BUILT_FOR_JOB !== null ? { publishJob: BUILT_FOR_JOB } : {}),\n ...(servedBuild !== undefined ? { publishBuild: servedBuild } : {}),\n").concat(PROPOSAL_OPTION).concat(CONTENT_OPTION, " }\n : undefined;\n\nconst { valApiHandler, draftMode } = initValServer(\n valModules,\n valConfig,\n {\n ...(http ? { http } : {}),\n },\n);\n\nconst content = initValContent(valConfig, valModules, {\n draftMode,\n /*\n * The SAME object the API got.\n *\n * These readers resolve content through a Val server of their own rather than\n * by calling the API over HTTP, so the mode question is put to them\n * separately -- configuring only `initValServer` left them inferring `fs`\n * mode, looking for a working tree that is not in here. `gitCommit` is the\n * field that would be silently wrong rather than loudly missing: two\n * different shas means the API edits one version of a file while the page\n * renders another.\n */\n ...(http ? { http } : {}),\n});\n\nconst {\n fetchValStega: fetchVal,\n fetchValKeyStega: fetchValKey,\n fetchValRouteStega: fetchValRoute,\n fetchValRouteUrl,\n} = content;\n\n/**\n * The draft a page renders with in preview: `<ValProvider draft>`, read in the\n * site layout's loader. The starter imports it from this file, so a file\n * without it fails the build with a missing export.\n *\n * Asked of the result rather than destructured, because this file is compiled\n * against whatever `@valbuild/tanstack` the PROJECT installed, and one from\n * before 0.140 has no such reader. There it is \"no draft\", which is the\n * render that version had anyway -- and it is still a function either way, so\n * a page that calls it compiles against both.\n */\nconst fetchValDraft = async () =>\n \"fetchValDraft\" in content && typeof content.fetchValDraft === \"function\"\n ? content.fetchValDraft()\n : null;\n\n/**\n * A build that is MEANT to edit and cannot, refusing instead of pretending to.\n *\n * `BUILT_FROM` being non-null says this build came from a commit, so it was\n * made to edit against a content service. If the credentials for that service are not\n * here, the configuration is broken -- and the failure that was reaching people\n * was not an error at all. Val picks its storage mode by inference, so an\n * isolate with no api key lands in a mode that ACCEPTS the write and keeps it\n * in the isolate. Cloudflare starts an isolate per concurrent request, so the\n * save answers 200 and the next request, served by a different isolate, has\n * never heard of it. The edit is simply gone, and nothing anywhere said so.\n *\n * That is the worst available outcome: a person is told their work is saved\n * when it is not. Refusing is strictly better, and naming the missing secret\n * turns an evening of reading logs into one line in a response body.\n *\n * WHY HERE rather than relying on `VAL_ENV=app`: that is a build-time\n * substitution into the shared dependency layer, so whether a build fails\n * loudly depends on which layer it happens to be pinned to. This file is\n * written on every build, by the platform, and cannot be missing from one.\n *\n * Only the editing API. Page renders do not come through here, and a site whose\n * content cannot be edited should still serve the content it has.\n */\nconst editingApiHandler =\n http === undefined\n ? async () => {\n const missing = [\n apiKey === undefined ? \"VAL_API_KEY\" : null,\n valSecret === undefined ? \"VAL_SECRET\" : null,\n /*\n * A build from no commit is listed the same way, because from the\n * outside the two are one state. It is not a secret somebody can set\n * -- a commit is a property OF THE BUILD, and the only cure is\n * publishing this project's own repository over whatever is serving\n * it. Named anyway, because \"it was built from no commit\" is the\n * sentence that ends the search.\n */\n BUILT_FROM === null ? \"a commit (this build was made from none)\" : null,\n ].filter(Boolean);\n return Response.json(\n {\n error:\n \"This site cannot be edited. Its content lives in a content service, and \" +\n missing.join(\", \") +\n \" \" +\n (missing.length > 1 ? \"are\" : \"is\") +\n \" missing, so there is nothing to edit against. Editing is refused rather \" +\n \"than kept in this isolate's memory, where it would be lost without being \" +\n \"reported.\" +\n (BUILT_FROM === null\n ? \" A build made from no commit is usually one SEEDED from a template: \" +\n \"publish this project's own repository to replace it.\"\n : \" This build was made from commit \" + BUILT_FROM.commit.slice(0, 8) + \".\"),\n missing,\n },\n { status: 503 },\n );\n }\n : valApiHandler;\n\nexport {\n editingApiHandler as valApiHandler,\n draftMode,\n fetchVal,\n fetchValKey,\n fetchValRoute,\n fetchValRouteUrl,\n fetchValDraft,\n};\n");
3852
3831
  };
3853
3832
 
3854
3833
  /**
@@ -3945,6 +3924,28 @@ function rebakeProposal(source) {
3945
3924
  });
3946
3925
  }
3947
3926
 
3927
+ /**
3928
+ * `source` able to serve a content version: {@link CONTENT_BLOCK} and its
3929
+ * option added after the proposal's, to a file wired before they existed.
3930
+ * Idempotent, and only where both places are exactly as generated -- a file
3931
+ * somebody edited is left as it is, and serves the bundle's content.
3932
+ */
3933
+ function rebakeContent(source) {
3934
+ if (source.includes("const contentVersion = (() => {")) return source;
3935
+ var once = function once(needle) {
3936
+ var at = source.indexOf(needle);
3937
+ return at !== -1 && source.indexOf(needle, at + 1) === -1;
3938
+ };
3939
+ if (!once(PROPOSAL_BLOCK) || !once(PROPOSAL_OPTION)) return source;
3940
+ var withBlock = source.replace(PROPOSAL_BLOCK, function () {
3941
+ return PROPOSAL_BLOCK + CONTENT_BLOCK;
3942
+ });
3943
+ // The option once, whatever left it there: two would hand Val the same key twice.
3944
+ return withBlock.includes(CONTENT_OPTION) ? withBlock : withBlock.replace(PROPOSAL_OPTION, function () {
3945
+ return PROPOSAL_OPTION + CONTENT_OPTION;
3946
+ });
3947
+ }
3948
+
3948
3949
  /** `source` with its job set, or `source` itself when it cannot carry one. */
3949
3950
  function rebakeJob(source, job) {
3950
3951
  var line = "const BUILT_FOR_JOB = ".concat(job === null ? "null" : JSON.stringify(job), ";");
@@ -4028,7 +4029,7 @@ job) {
4028
4029
  if (!BUILT_FROM_LINE.test(source)) return files;
4029
4030
  var withGit = source.replace(BUILT_FROM_LINE, "const BUILT_FROM = ".concat(git === null ? "null" : JSON.stringify(git), ";"));
4030
4031
  var withJob = job === undefined ? withGit : rebakeJob(withGit, job);
4031
- return _objectSpread2(_objectSpread2({}, files), {}, _defineProperty({}, VAL_SERVER, rebakeProposal(withJob)));
4032
+ return _objectSpread2(_objectSpread2({}, files), {}, _defineProperty({}, VAL_SERVER, rebakeContent(rebakeProposal(withJob))));
4032
4033
  }
4033
4034
 
4034
4035
  /** Is this a Val project at all? */
@@ -4138,4 +4139,4 @@ function wireUp(files, options) {
4138
4139
  };
4139
4140
  }
4140
4141
 
4141
- export { ENTRY_CHUNK, INLINE_LIMIT, PROJECT_SOURCE, PUBLIC_PREFIX, VAL_SERVER_PATH, aliasMap, bakedGit, bakedJob, base64Bytes, blobSha, buildUserApp, fetchBuildTarget, fetchBuildTargetRev, isAsset, isValProject, isWired, publishArtifacts, publishPayload, rebakeGit, resolveInFiles, scanCandidates, treeSha, treeShaOfText, usesTailwind, wireUp, wiredValServer };
4142
+ export { ENTRY_CHUNK, PROJECT_SOURCE, PUBLIC_PREFIX, VAL_SERVER_PATH, aliasMap, bakedGit, bakedJob, blobSha, buildUserApp, fetchBuildTarget, fetchBuildTargetRev, isValProject, isWired, publishArtifacts, publishPayload, rebakeGit, resolveInFiles, scanCandidates, treeSha, treeShaOfText, usesTailwind, wireUp, wiredValServer };