@absolutejs/absolute 0.20.0-beta.179 → 0.20.0-beta.180

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/changelog.json +45 -0
  3. package/dist/angular/browser.js +2 -2
  4. package/dist/angular/browser.js.map +3 -3
  5. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  6. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  7. package/dist/angular/index.js +21 -6
  8. package/dist/angular/index.js.map +6 -6
  9. package/dist/angular/server.js +21 -6
  10. package/dist/angular/server.js.map +6 -6
  11. package/dist/build.js +5357 -4945
  12. package/dist/build.js.map +27 -24
  13. package/dist/cli/build-fntmf42w.js +495 -0
  14. package/dist/cli/{buildDepVendor-qvsh6dsj.js → buildDepVendor-qnwfct22.js} +5 -3
  15. package/dist/cli/buildReactServerComponents-fq6mw10d.js +13 -0
  16. package/dist/cli/{compile-p5yv6ecp.js → compile-54rb8szn.js} +94 -125
  17. package/dist/cli/config/server.js +10 -5
  18. package/dist/cli/{dev-2hbcsvkp.js → dev-6s6g5tnk.js} +13 -14
  19. package/dist/cli/{expoProject-1qtw97js.js → expoProject-acgfaj3f.js} +2 -1
  20. package/dist/cli/generatedDir-239r7csr.js +9 -0
  21. package/dist/cli/{index-cksezef8.js → index-0gd30trc.js} +105 -851
  22. package/dist/cli/index-2wvysvjc.js +40 -0
  23. package/dist/cli/index-42xjh6gg.js +282 -0
  24. package/dist/cli/{index-qw98g1p6.js → index-47e8fwha.js} +4 -1
  25. package/dist/cli/index-65kqn88a.js +8 -0
  26. package/dist/cli/{index-2bxfhs32.js → index-6f448d7m.js} +0 -26
  27. package/dist/cli/index-972xxwgj.js +16 -0
  28. package/dist/cli/index-aqe25w4h.js +39 -0
  29. package/dist/cli/index-assqancr.js +51 -0
  30. package/dist/cli/{index-2shf4aya.js → index-c8rcfe5a.js} +4 -6
  31. package/dist/cli/index-cba1cemz.js +8 -0
  32. package/dist/cli/{index-3ff5ztt3.js → index-djkrb7pc.js} +1 -7
  33. package/dist/cli/index-dkfwkpc8.js +138 -0
  34. package/dist/cli/{index-92g14j47.js → index-dw44xa4x.js} +2 -1
  35. package/dist/cli/index-evsnq0n2.js +17 -0
  36. package/dist/cli/index-fxwf3n2v.js +224 -0
  37. package/dist/cli/{index-zyd80s3h.js → index-js2hksgv.js} +21 -295
  38. package/dist/cli/{index-bp60baze.js → index-jyap0bhv.js} +1 -1
  39. package/dist/cli/{index-9dzdbbfc.js → index-kx2d067c.js} +8 -6
  40. package/dist/cli/index-pb31zan6.js +9 -0
  41. package/dist/cli/index-sq0478b0.js +281 -0
  42. package/dist/cli/index-va274tsf.js +7 -0
  43. package/dist/cli/{index-yd672jyq.js → index-w6xsk8cv.js} +4 -1
  44. package/dist/cli/index-w79snsxv.js +461 -0
  45. package/dist/cli/index-x1vvn549.js +835 -0
  46. package/dist/cli/index-xf9sfr8a.js +243 -0
  47. package/dist/cli/index-ycqdxy55.js +754 -0
  48. package/dist/cli/index-z74cqxz0.js +131 -0
  49. package/dist/cli/index.js +10 -9
  50. package/dist/cli/{islands-6zgb7501.js → islands-17tfx8jf.js} +6 -17
  51. package/dist/cli/{ls-0hfx323m.js → ls-0wr74w0b.js} +10 -58
  52. package/dist/cli/{mobile-93vaawcz.js → mobile-hpqpy61f.js} +11 -8
  53. package/dist/cli/{prerender-010z771p.js → prerender-w65xp6h8.js} +2 -1
  54. package/dist/cli/{rewriteImports-z6629aww.js → rewriteImports-np2d2kvc.js} +4 -11
  55. package/dist/cli/rewriteImportsPlugin-c6hcb3x6.js +12 -0
  56. package/dist/cli/{start-asxb79rc.js → start-mbn2zgs2.js} +6 -4
  57. package/dist/cli/staticAnalyzeSpaRoutes-2nev05m1.js +8 -0
  58. package/dist/cli/staticAnalyzeSpaRoutes-6vgzp0rs.js +8 -0
  59. package/dist/cli/staticAnalyzeSpaRoutes-f85q9dqk.js +8 -0
  60. package/dist/cli/staticAnalyzeSpaRoutes-yakmg22g.js +7 -0
  61. package/dist/cli/{typecheck-m2j4tkdk.js → typecheck-488txsfc.js} +92 -18
  62. package/dist/cli/vueCompiler-8bzdmf08.js +7 -0
  63. package/dist/client/chunks/{react-khr6ewhr.js → react-g8r290b8.js} +37 -2
  64. package/dist/client/chunks/react-g8r290b8.js.map +10 -0
  65. package/dist/client/chunks/vue-zcpmka32.js +85 -0
  66. package/dist/client/chunks/vue-zcpmka32.js.map +10 -0
  67. package/dist/client/index.js +58 -10
  68. package/dist/client/index.js.map +4 -4
  69. package/dist/dev/client/handlers/vue.ts +116 -0
  70. package/dist/index.js +2472 -2058
  71. package/dist/index.js.map +26 -23
  72. package/dist/islands/browser.js +2 -2
  73. package/dist/islands/browser.js.map +3 -3
  74. package/dist/islands/index.js +2 -2
  75. package/dist/islands/index.js.map +3 -3
  76. package/dist/react/browser.js +2 -2
  77. package/dist/react/browser.js.map +3 -3
  78. package/dist/react/index.js +42 -11
  79. package/dist/react/index.js.map +10 -10
  80. package/dist/react/server.js +42 -11
  81. package/dist/react/server.js.map +10 -10
  82. package/dist/src/angular/ssrRender.d.ts +2 -2
  83. package/dist/src/angular/staticAnalyzeSpaRoutes.d.ts +6 -1
  84. package/dist/src/build/generateManifest.d.ts +15 -0
  85. package/dist/src/build/manifestKeys.d.ts +22 -0
  86. package/dist/src/cli/add/dependencies.d.ts +1 -1
  87. package/dist/src/cli/scripts/typecheck.d.ts +11 -0
  88. package/dist/src/client/hydrators/react.d.ts +10 -0
  89. package/dist/src/client/hydrators/vue.d.ts +13 -0
  90. package/dist/src/client/islandRuntime.d.ts +1 -1
  91. package/dist/src/core/islandManifest.d.ts +4 -0
  92. package/dist/src/core/islandPageContext.d.ts +8 -2
  93. package/dist/src/core/lookup.d.ts +16 -1
  94. package/dist/src/dev/importCost/instrument.d.ts +1 -1
  95. package/dist/src/dev/manifestKeysRefresher.d.ts +6 -0
  96. package/dist/src/dev/spaRouteRefresh.d.ts +13 -0
  97. package/dist/src/mobile/androidConformance.d.ts +1 -1
  98. package/dist/src/react/staticAnalyzeSpaRoutes.d.ts +6 -1
  99. package/dist/src/svelte/staticAnalyzeSpaRoutes.d.ts +1 -0
  100. package/dist/src/utils/logger.d.ts +5 -0
  101. package/dist/src/utils/spaRouteManifest.d.ts +1 -0
  102. package/dist/src/vue/components/Image.d.ts +4 -4
  103. package/dist/src/vue/components/StreamSlot.d.ts +1 -1
  104. package/dist/src/vue/components/SuspenseSlot.d.ts +2 -2
  105. package/dist/src/vue/staticAnalyzeSpaRoutes.d.ts +4 -0
  106. package/dist/svelte/browser.js +2 -2
  107. package/dist/svelte/browser.js.map +3 -3
  108. package/dist/svelte/index.js +25 -9
  109. package/dist/svelte/index.js.map +8 -8
  110. package/dist/svelte/server.js +25 -9
  111. package/dist/svelte/server.js.map +8 -8
  112. package/dist/types/globals.d.ts +4 -0
  113. package/dist/types/index.d.ts +1 -0
  114. package/dist/types/island.d.ts +1 -1
  115. package/dist/types/manifest.d.ts +25 -0
  116. package/dist/vue/browser.js +2 -2
  117. package/dist/vue/browser.js.map +3 -3
  118. package/dist/vue/index.js +21 -6
  119. package/dist/vue/index.js.map +6 -6
  120. package/dist/vue/server.js +21 -6
  121. package/dist/vue/server.js.map +6 -6
  122. package/package.json +1 -1
  123. package/dist/client/chunks/react-khr6ewhr.js.map +0 -10
  124. package/dist/client/chunks/vue-db6ppn1f.js +0 -32
  125. package/dist/client/chunks/vue-db6ppn1f.js.map +0 -10
@@ -0,0 +1,835 @@
1
+ // @bun
2
+ import {
3
+ UNFOUND_INDEX
4
+ } from "./index-t8jmj8w1.js";
5
+ import {
6
+ normalizePath,
7
+ scanFileRoutes
8
+ } from "./index-47e8fwha.js";
9
+ import {
10
+ scanEntryPoints
11
+ } from "./index-972xxwgj.js";
12
+ import {
13
+ scanConventions
14
+ } from "./index-assqancr.js";
15
+ import {
16
+ ISLAND_BOOTSTRAP_MANIFEST_KEY,
17
+ getIslandManifestKey,
18
+ getIslandStyleManifestKey,
19
+ loadIslandRegistryBuildInfo
20
+ } from "./index-w6xsk8cv.js";
21
+ import {
22
+ toKebab,
23
+ toPascal
24
+ } from "./index-dw44xa4x.js";
25
+ import {
26
+ getNodeEnv
27
+ } from "./index-cba1cemz.js";
28
+
29
+ // src/react/serverComponents/constants.ts
30
+ var REACT_SERVER_CLIENT_MANIFEST_KEY = "ReactServerClient";
31
+ var REACT_SERVER_PAGE_MANIFEST_SUFFIX = "RSC";
32
+ var REACT_SERVER_PAYLOAD_GLOBAL = "__absoluteReactServerPayload";
33
+ var REACT_SERVER_RENDERER_MANIFEST_KEY = "ReactServerRenderer";
34
+ var REACT_SERVER_RUNTIME_FILE = "react-server-runtime.json";
35
+
36
+ // src/utils/fontAssets.ts
37
+ var FONT_PRELOAD_MANIFEST_PREFIX = "AbsoluteFontPreload";
38
+ var FONTS_REMOTE_CSS_MANIFEST_PREFIX = "AbsoluteFontsRemoteCSS";
39
+
40
+ // src/build/generateManifest.ts
41
+ import { extname } from "path";
42
+ var getManifestKey = (folder, pascalName, isClientComponent, isReact, isVue, isSvelte, isAngular) => {
43
+ if (folder === "indexes")
44
+ return `${pascalName}Index`;
45
+ if (isClientComponent)
46
+ return `${pascalName}Client`;
47
+ if (folder !== "pages")
48
+ return pascalName;
49
+ if (isReact)
50
+ return `${pascalName}Page`;
51
+ if (isVue || isSvelte || isAngular)
52
+ return pascalName;
53
+ return `${pascalName}Page`;
54
+ };
55
+ var getCssKey = (pascalName, segments) => {
56
+ const isFromVue = segments.some((seg) => seg === "vue");
57
+ if (isFromVue && segments.includes("css"))
58
+ return `${pascalName}CompiledCSS`;
59
+ const isFromReact = segments.some((seg) => seg === "react");
60
+ const isFromSvelte = segments.some((seg) => seg === "svelte");
61
+ const isFromAngular = segments.some((seg) => seg === "angular");
62
+ if (isFromReact || isFromVue || isFromSvelte || isFromAngular)
63
+ return `${pascalName}BundledCSS`;
64
+ return `${pascalName}CSS`;
65
+ };
66
+ var getArtifactBaseName = (fileName, hash) => {
67
+ const ext = extname(fileName);
68
+ const stem = ext ? fileName.slice(0, -ext.length) : fileName;
69
+ if (!hash)
70
+ return stem;
71
+ const hashSuffix = `.${hash}`;
72
+ if (stem.endsWith(hashSuffix))
73
+ return stem.slice(0, -hashSuffix.length);
74
+ return stem;
75
+ };
76
+ var islandFrameworkOf = (segment) => segment === "react" || segment === "svelte" || segment === "vue" || segment === "angular" ? segment : undefined;
77
+ var manifestKeyForOutput = (relativePath, hash = null) => {
78
+ const segments = relativePath.replace(/^\/+/, "").split("/");
79
+ const fileWithHash = segments.pop();
80
+ if (!fileWithHash)
81
+ return null;
82
+ const baseName = getArtifactBaseName(fileWithHash, hash);
83
+ if (!baseName)
84
+ return null;
85
+ const pascalName = toPascal(baseName);
86
+ const ext = extname(fileWithHash);
87
+ const islandIndex = segments.findIndex((seg) => seg === "islands");
88
+ const islandFramework = islandFrameworkOf(islandIndex > UNFOUND_INDEX ? segments[islandIndex + 1] : undefined);
89
+ if (ext === ".css") {
90
+ if (segments.includes("server"))
91
+ return null;
92
+ if (islandFramework)
93
+ return {
94
+ key: getIslandStyleManifestKey(islandFramework, pascalName),
95
+ warnOnDuplicate: false
96
+ };
97
+ return { key: getCssKey(pascalName, segments), warnOnDuplicate: true };
98
+ }
99
+ if (islandFramework)
100
+ return {
101
+ key: getIslandManifestKey(islandFramework, pascalName),
102
+ warnOnDuplicate: false
103
+ };
104
+ const idx = segments.findIndex((seg) => seg === "indexes" || seg === "pages" || seg === "client");
105
+ const folder = idx > UNFOUND_INDEX ? segments[idx] : segments[0];
106
+ const isReact = segments.some((seg) => seg === "react");
107
+ const isVue = segments.some((seg) => seg === "vue");
108
+ const isSvelte = segments.some((seg) => seg === "svelte");
109
+ const isAngular = segments.some((seg) => seg === "angular");
110
+ const isClientComponent = segments.includes("client");
111
+ return {
112
+ key: getManifestKey(folder, pascalName, isClientComponent, isReact, isVue, isSvelte, isAngular),
113
+ warnOnDuplicate: true
114
+ };
115
+ };
116
+
117
+ // src/build/islandBootstrap.ts
118
+ var DEFAULT_ISLAND_BOOTSTRAP_NAME = "absoluteIslandBootstrap";
119
+
120
+ // src/build/stylePreprocessor.ts
121
+ import { existsSync, readFileSync } from "fs";
122
+ import { readFile } from "fs/promises";
123
+ import { createRequire } from "module";
124
+ import {
125
+ dirname,
126
+ extname as extname2,
127
+ isAbsolute,
128
+ join,
129
+ relative,
130
+ resolve
131
+ } from "path";
132
+ import { fileURLToPath, pathToFileURL } from "url";
133
+ var CSS_EXTENSION_PATTERN = /\.css$/i;
134
+ var STYLE_EXTENSION_PATTERN = /\.(s[ac]ss|less|styl(?:us)?)$/i;
135
+ var STYLE_MODULE_EXTENSION_PATTERN = /\.module\.(s[ac]ss|less|styl(?:us)?)$/i;
136
+ var importOptionalPeer = new Function("specifier", "return import(specifier)");
137
+ var requireOptionalPeer = new Function("specifier", "return require(specifier)");
138
+ var requireFromCwd = createRequire(join(process.cwd(), "package.json"));
139
+ var isStyleModulePath = (filePath) => STYLE_MODULE_EXTENSION_PATTERN.test(filePath);
140
+ var getStyleLanguage = (filePathOrLanguage) => {
141
+ const normalized = filePathOrLanguage.toLowerCase();
142
+ if (normalized === "scss" || normalized.endsWith(".scss"))
143
+ return "scss";
144
+ if (normalized === "sass" || normalized.endsWith(".sass"))
145
+ return "sass";
146
+ if (normalized === "less" || normalized.endsWith(".less"))
147
+ return "less";
148
+ if (normalized === "styl" || normalized === "stylus" || normalized.endsWith(".styl") || normalized.endsWith(".stylus"))
149
+ return "stylus";
150
+ return null;
151
+ };
152
+ var missingDependencyError = (name, filePath) => new Error(`Unable to compile ${filePath}: install optional dependency "${name}" to use this stylesheet preprocessor.`);
153
+ var throwPreprocessorError = (error, filePath, language) => {
154
+ if (!(error instanceof Error)) {
155
+ throw new Error(`${language} compile failed in ${filePath}: ${String(error)}`);
156
+ }
157
+ const detail = error;
158
+ const sassLine = detail.span?.start?.line;
159
+ const sassCol = detail.span?.start?.column;
160
+ const line = detail.line ?? sassLine;
161
+ const column = detail.column ?? sassCol;
162
+ const location = typeof line === "number" ? `:${line}${typeof column === "number" ? `:${column}` : ""}` : "";
163
+ const message = detail.formatted ?? detail.message;
164
+ const wrapped = new Error(`${language} compile failed in ${filePath}${location}
165
+ ${message}`);
166
+ wrapped.cause = error;
167
+ throw wrapped;
168
+ };
169
+ var requireOptionalPeerSync = (specifier) => {
170
+ try {
171
+ return requireFromCwd(specifier);
172
+ } catch {
173
+ return requireOptionalPeer(specifier);
174
+ }
175
+ };
176
+ var normalizeLoadPaths = (filePath, paths = []) => [
177
+ dirname(filePath),
178
+ process.cwd(),
179
+ ...paths.map((path) => resolve(process.cwd(), path))
180
+ ];
181
+ var tsconfigAliasCache;
182
+ var stripJsonComments = (source) => source.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(^|[^:])\/\/.*$/gm, "$1");
183
+ var normalizeAliasEntries = (aliases) => Object.entries(aliases ?? {}).map(([pattern, value]) => ({
184
+ pattern,
185
+ replacements: Array.isArray(value) ? value : [value]
186
+ }));
187
+ var readTsconfigAliases = () => {
188
+ const cwd = process.cwd();
189
+ if (tsconfigAliasCache?.cwd === cwd)
190
+ return tsconfigAliasCache;
191
+ const tsconfigPath = resolve(cwd, "tsconfig.json");
192
+ const empty = { aliases: [], baseUrl: cwd, cwd };
193
+ if (!existsSync(tsconfigPath)) {
194
+ tsconfigAliasCache = empty;
195
+ return empty;
196
+ }
197
+ try {
198
+ const parsed = JSON.parse(stripJsonComments(readFileSync(tsconfigPath, "utf-8")));
199
+ const compilerOptions = parsed.compilerOptions ?? {};
200
+ const baseUrl = resolve(cwd, compilerOptions.baseUrl ?? ".");
201
+ tsconfigAliasCache = {
202
+ aliases: normalizeAliasEntries(compilerOptions.paths),
203
+ baseUrl,
204
+ cwd
205
+ };
206
+ } catch {
207
+ tsconfigAliasCache = empty;
208
+ }
209
+ return tsconfigAliasCache;
210
+ };
211
+ var getAliasEntries = (config) => {
212
+ const tsconfig = readTsconfigAliases();
213
+ return {
214
+ aliases: [
215
+ ...normalizeAliasEntries(config?.aliases),
216
+ ...tsconfig.aliases
217
+ ],
218
+ baseUrl: tsconfig.baseUrl
219
+ };
220
+ };
221
+ var aliasPatternToRegExp = (pattern) => new RegExp(`^${pattern.split("*").map((part) => part.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("(.+)")}$`);
222
+ var resolveAliasTargets = (specifier, config) => {
223
+ const { aliases, baseUrl } = getAliasEntries(config);
224
+ const targets = [];
225
+ for (const alias of aliases) {
226
+ const match = specifier.match(aliasPatternToRegExp(alias.pattern));
227
+ if (!match)
228
+ continue;
229
+ const wildcard = match[1] ?? "";
230
+ for (const replacement of alias.replacements) {
231
+ targets.push(resolve(baseUrl, replacement.replace("*", wildcard)));
232
+ }
233
+ }
234
+ return targets;
235
+ };
236
+ var getLanguageExtensions = (language) => {
237
+ if (language === "less")
238
+ return [".less", ".css"];
239
+ if (language === "stylus")
240
+ return [".styl", ".stylus", ".css"];
241
+ return [".scss", ".sass", ".css"];
242
+ };
243
+ var getCandidatePaths = (basePath, language) => {
244
+ const ext = extname2(basePath);
245
+ const paths = ext ? [basePath] : getLanguageExtensions(language).flatMap((extension) => [
246
+ `${basePath}${extension}`,
247
+ join(basePath, `index${extension}`)
248
+ ]);
249
+ if (language === "scss" || language === "sass") {
250
+ return paths.flatMap((path) => {
251
+ const dir = dirname(path);
252
+ const base = path.slice(dir.length + 1);
253
+ return [path, join(dir, `_${base}`)];
254
+ });
255
+ }
256
+ return paths;
257
+ };
258
+ var resolveImportPath = (specifier, fromDirectory, loadPaths, language, config) => {
259
+ const rawCandidates = [
260
+ ...resolveAliasTargets(specifier, config),
261
+ isAbsolute(specifier) ? specifier : resolve(fromDirectory, specifier),
262
+ ...loadPaths.map((path) => resolve(path, specifier))
263
+ ];
264
+ for (const candidate of rawCandidates.flatMap((path) => getCandidatePaths(path, language))) {
265
+ if (existsSync(candidate))
266
+ return candidate;
267
+ }
268
+ return null;
269
+ };
270
+ var isExternalCssUrl = (url) => /^(?:[a-z][a-z0-9+.-]*:|\/\/|#|\/)/i.test(url);
271
+ var splitCssUrl = (url) => {
272
+ const markerIndex = url.search(/[?#]/);
273
+ if (markerIndex === -1)
274
+ return { marker: "", path: url };
275
+ return {
276
+ marker: url.slice(markerIndex),
277
+ path: url.slice(0, markerIndex)
278
+ };
279
+ };
280
+ var rebaseCssUrls = (contents, sourceFile, entryFile) => {
281
+ const sourceDir = dirname(sourceFile);
282
+ const entryDir = dirname(entryFile);
283
+ if (sourceDir === entryDir)
284
+ return contents;
285
+ return contents.replace(/url\(\s*(['"]?)([^'")]+)\1\s*\)/gi, (match, quote, rawUrl) => {
286
+ const trimmedUrl = rawUrl.trim();
287
+ if (!trimmedUrl || isExternalCssUrl(trimmedUrl))
288
+ return match;
289
+ const { marker, path } = splitCssUrl(trimmedUrl);
290
+ const rebased = relative(entryDir, resolve(sourceDir, path)).replace(/\\/g, "/");
291
+ const normalized = rebased.startsWith(".") ? rebased : `./${rebased}`;
292
+ const nextQuote = quote || '"';
293
+ return `url(${nextQuote}${normalized}${marker}${nextQuote})`;
294
+ });
295
+ };
296
+ var rewriteAliasedStyleImports = (contents, sourceFile, loadPaths, language, config) => contents.replace(/(@(?:use|forward|import|require)\s+)(["'])([^"']+)\2/g, (match, prefix, quote, specifier) => {
297
+ if (specifier.startsWith(".") || isAbsolute(specifier) || isExternalCssUrl(specifier))
298
+ return match;
299
+ const resolved = resolveImportPath(specifier, dirname(sourceFile), loadPaths, language, config);
300
+ return resolved ? `${prefix}${quote}${resolved}${quote}` : match;
301
+ });
302
+ var preprocessLoadedStyle = (contents, sourceFile, entryFile, loadPaths = [], language, config) => {
303
+ const rebased = rebaseCssUrls(contents, sourceFile, entryFile);
304
+ return language ? rewriteAliasedStyleImports(rebased, sourceFile, loadPaths, language, config) : rebased;
305
+ };
306
+ var extractCssModuleExports = (css) => {
307
+ const exports = {};
308
+ const nextCss = css.replace(/:export\s*\{([^}]*)\}/g, (_, body) => {
309
+ for (const declaration of body.split(";")) {
310
+ const separator = declaration.indexOf(":");
311
+ if (separator === -1)
312
+ continue;
313
+ const key = declaration.slice(0, separator).trim();
314
+ const value = declaration.slice(separator + 1).trim();
315
+ if (key && value)
316
+ exports[key] = value;
317
+ }
318
+ return "";
319
+ });
320
+ return { css: nextCss, exports };
321
+ };
322
+ var getSassOptions = (config, language) => ({
323
+ ...config?.sass ?? {},
324
+ ...language === "scss" ? config?.scss ?? {} : {}
325
+ });
326
+ var getLessOptions = (config) => config?.less ?? {};
327
+ var getStylusOptions = (config) => config?.stylus ?? {};
328
+ var withAdditionalData = (contents, additionalData) => additionalData ? `${additionalData}
329
+ ${contents}` : contents;
330
+ var normalizePostcssModule = (mod) => {
331
+ if (mod && typeof mod === "object" && "default" in mod) {
332
+ return mod.default ?? mod;
333
+ }
334
+ return mod;
335
+ };
336
+ var loadPostcssConfigFile = async (configPath) => {
337
+ const resolved = resolve(process.cwd(), configPath);
338
+ const loaded = resolved.endsWith(".cjs") || resolved.endsWith(".cts") ? requireOptionalPeerSync(resolved) : await importOptionalPeer(`${new URL(`file://${resolved}`).href}?t=${Date.now()}`);
339
+ const config = normalizePostcssModule(loaded);
340
+ const value = typeof config === "function" ? await config({
341
+ cwd: process.cwd(),
342
+ env: getNodeEnv()
343
+ }) : config;
344
+ return normalizePostcssModule(value) ?? {};
345
+ };
346
+ var normalizePostcssPlugins = (plugins) => {
347
+ if (!plugins)
348
+ return [];
349
+ if (Array.isArray(plugins))
350
+ return plugins.filter(Boolean);
351
+ const resolved = [];
352
+ for (const [specifier, options] of Object.entries(plugins)) {
353
+ if (options === false)
354
+ continue;
355
+ const mod = normalizePostcssModule(requireOptionalPeerSync(specifier));
356
+ const plugin = typeof mod === "function" ? mod(options === true ? undefined : options) : mod;
357
+ if (plugin)
358
+ resolved.push(plugin);
359
+ }
360
+ return resolved;
361
+ };
362
+ var resolvePostcssConfig = async (config) => {
363
+ const inlineConfig = config?.postcss;
364
+ if (!inlineConfig)
365
+ return null;
366
+ const fileConfig = inlineConfig.config ? await loadPostcssConfigFile(inlineConfig.config) : {};
367
+ const plugins = [
368
+ ...normalizePostcssPlugins(fileConfig.plugins),
369
+ ...normalizePostcssPlugins(inlineConfig.plugins)
370
+ ];
371
+ if (plugins.length === 0)
372
+ return null;
373
+ return {
374
+ options: {
375
+ ...fileConfig.options ?? {},
376
+ ...inlineConfig.options ?? {}
377
+ },
378
+ plugins
379
+ };
380
+ };
381
+ var runPostcss = async (css, filePath, config) => {
382
+ const postcssConfig = await resolvePostcssConfig(config);
383
+ if (!postcssConfig)
384
+ return css;
385
+ let postcssModule;
386
+ try {
387
+ postcssModule = await importOptionalPeer("postcss");
388
+ } catch {
389
+ throw missingDependencyError("postcss", filePath);
390
+ }
391
+ const postcss = postcssModule.default ?? postcssModule;
392
+ const result = await postcss(postcssConfig.plugins).process(css, {
393
+ from: filePath,
394
+ map: false,
395
+ ...postcssConfig.options
396
+ });
397
+ return result.css;
398
+ };
399
+ var createSassImporter = (entryFile, loadPaths, language, config, deps) => ({
400
+ canonicalize(specifier, options) {
401
+ const fromDirectory = options.containingUrl ? dirname(fileURLToPath(options.containingUrl)) : dirname(entryFile);
402
+ const resolved = resolveImportPath(specifier, fromDirectory, loadPaths, language, config);
403
+ return resolved ? new URL(pathToFileURL(resolve(resolved)).href) : null;
404
+ },
405
+ load(canonicalUrl) {
406
+ const filePath = fileURLToPath(canonicalUrl);
407
+ deps?.add(filePath);
408
+ const fileLanguage = getStyleLanguage(filePath);
409
+ if (fileLanguage !== "scss" && fileLanguage !== "sass" && fileLanguage !== null)
410
+ return null;
411
+ return {
412
+ contents: preprocessLoadedStyle(readFileSync(filePath, "utf-8"), filePath, entryFile, loadPaths, language, config),
413
+ syntax: filePath.endsWith(".sass") ? "indented" : "scss"
414
+ };
415
+ }
416
+ });
417
+ var createLessFileManager = (entryFile, loadPaths, config, deps) => ({
418
+ install(less, pluginManager) {
419
+ const baseManager = new less.FileManager;
420
+ const manager = Object.create(baseManager);
421
+ manager.supports = (filename, currentDirectory) => Boolean(resolveImportPath(filename, resolve(currentDirectory), loadPaths, "less", config));
422
+ manager.loadFile = async (filename, currentDirectory) => {
423
+ const resolved = resolveImportPath(filename, resolve(currentDirectory), loadPaths, "less", config);
424
+ if (!resolved) {
425
+ throw new Error(`Unable to resolve Less import "${filename}"`);
426
+ }
427
+ deps?.add(resolved);
428
+ return {
429
+ contents: preprocessLoadedStyle(await readFile(resolved, "utf-8"), resolved, entryFile, loadPaths, "less", config),
430
+ filename: resolved
431
+ };
432
+ };
433
+ pluginManager.addFileManager(manager);
434
+ }
435
+ });
436
+ var renderStylus = async (contents, filePath, loadPaths, options, deps) => {
437
+ let stylus;
438
+ try {
439
+ const stylusModule = await importOptionalPeer("stylus");
440
+ stylus = stylusModule.default ?? stylusModule;
441
+ } catch {
442
+ throw missingDependencyError("stylus", filePath);
443
+ }
444
+ return new Promise((resolveCss, reject) => {
445
+ const renderer = stylus(contents);
446
+ renderer.set("filename", filePath);
447
+ for (const [key, value] of Object.entries(options.options ?? {})) {
448
+ renderer.set(key, value);
449
+ }
450
+ for (const path of loadPaths)
451
+ renderer.include(path);
452
+ renderer.render((error, css) => {
453
+ if (error) {
454
+ reject(error);
455
+ return;
456
+ }
457
+ if (deps) {
458
+ const stylusDeps = renderer.deps?.();
459
+ if (Array.isArray(stylusDeps)) {
460
+ for (const dep of stylusDeps)
461
+ deps.add(resolve(dep));
462
+ }
463
+ }
464
+ resolveCss(css ?? "");
465
+ });
466
+ });
467
+ };
468
+ var styleDependencyGraph = new Map;
469
+ var styleOutputHashes = new Map;
470
+ var recordStyleDeps = (entry, deps) => {
471
+ const key = resolve(entry);
472
+ const stripped = new Set;
473
+ for (const dep of deps) {
474
+ const resolved = resolve(dep);
475
+ if (resolved !== key)
476
+ stripped.add(resolved);
477
+ }
478
+ styleDependencyGraph.set(key, stripped);
479
+ };
480
+ var compileStyleSource = async (filePath, source, languageHint, config) => {
481
+ const language = getStyleLanguage(languageHint ?? filePath);
482
+ const rawContents = source ?? await readFile(filePath, "utf-8");
483
+ const deps = new Set;
484
+ if (language === "scss" || language === "sass") {
485
+ const options = getSassOptions(config, language);
486
+ const packageName = options.implementation ?? "sass";
487
+ let sass;
488
+ try {
489
+ sass = await importOptionalPeer(packageName);
490
+ } catch {
491
+ throw missingDependencyError(packageName, filePath);
492
+ }
493
+ const contents = withAdditionalData(rawContents, options.additionalData);
494
+ const loadPaths = normalizeLoadPaths(filePath, options.loadPaths);
495
+ try {
496
+ const result = sass.compileString(contents, {
497
+ importers: [
498
+ createSassImporter(filePath, loadPaths, language, config, deps)
499
+ ],
500
+ loadPaths,
501
+ style: "expanded",
502
+ syntax: language === "sass" ? "indented" : "scss",
503
+ url: new URL(pathToFileURL(resolve(filePath)).href)
504
+ });
505
+ const css = await runPostcss(result.css, filePath, config);
506
+ const loadedUrls = result.loadedUrls ?? [];
507
+ for (const url of loadedUrls) {
508
+ if (url.protocol !== "file:")
509
+ continue;
510
+ const dep = fileURLToPath(url);
511
+ if (resolve(dep) === resolve(filePath))
512
+ continue;
513
+ deps.add(dep);
514
+ }
515
+ recordStyleDeps(filePath, deps);
516
+ return css;
517
+ } catch (error) {
518
+ throwPreprocessorError(error, filePath, language);
519
+ }
520
+ }
521
+ if (language === "less") {
522
+ const options = getLessOptions(config);
523
+ let lessModule;
524
+ try {
525
+ lessModule = await importOptionalPeer("less");
526
+ } catch {
527
+ throw missingDependencyError("less", filePath);
528
+ }
529
+ const less = lessModule.render ? lessModule : lessModule.default;
530
+ const render = less?.render;
531
+ if (!render)
532
+ throw missingDependencyError("less", filePath);
533
+ const contents = withAdditionalData(rawContents, options.additionalData);
534
+ const loadPaths = normalizeLoadPaths(filePath, options.paths);
535
+ try {
536
+ const result = await render(contents, {
537
+ ...options.options ?? {},
538
+ filename: filePath,
539
+ paths: loadPaths,
540
+ plugins: [
541
+ ...options.options?.plugins ?? [],
542
+ createLessFileManager(filePath, loadPaths, config, deps)
543
+ ]
544
+ });
545
+ const css = await runPostcss(result.css, filePath, config);
546
+ recordStyleDeps(filePath, deps);
547
+ return css;
548
+ } catch (error) {
549
+ throwPreprocessorError(error, filePath, "less");
550
+ }
551
+ }
552
+ if (language === "stylus") {
553
+ const options = getStylusOptions(config);
554
+ const loadPaths = normalizeLoadPaths(filePath, options.paths);
555
+ const contents = withAdditionalData(preprocessLoadedStyle(rawContents, filePath, filePath, loadPaths, "stylus", config), options.additionalData);
556
+ try {
557
+ const css = await runPostcss(await renderStylus(contents, filePath, loadPaths, options, deps), filePath, config);
558
+ recordStyleDeps(filePath, deps);
559
+ return css;
560
+ } catch (error) {
561
+ throwPreprocessorError(error, filePath, "stylus");
562
+ }
563
+ }
564
+ return runPostcss(rawContents, filePath, config);
565
+ };
566
+ var createStylePreprocessorPlugin = (config) => ({
567
+ name: "absolute-style-preprocessor",
568
+ setup(build) {
569
+ const cssModuleSources = new Map;
570
+ build.onResolve({ filter: /^absolute-style-module:/ }, ({ path }) => ({
571
+ namespace: "absolute-style-module",
572
+ path: path.slice("absolute-style-module:".length)
573
+ }));
574
+ build.onLoad({ filter: /\.module\.css$/i, namespace: "absolute-style-module" }, async ({ path }) => {
575
+ const source = cssModuleSources.get(path);
576
+ if (!source) {
577
+ throw new Error(`Unable to resolve CSS module source for ${path}`);
578
+ }
579
+ return {
580
+ contents: source.css,
581
+ loader: "css"
582
+ };
583
+ });
584
+ build.onLoad({ filter: STYLE_EXTENSION_PATTERN }, async ({ path }) => {
585
+ if (isStyleModulePath(path)) {
586
+ const cssModulePath = path.replace(STYLE_EXTENSION_PATTERN, ".css");
587
+ const compiled = await compileStyleSource(path, undefined, undefined, config);
588
+ const { css, exports } = extractCssModuleExports(compiled);
589
+ cssModuleSources.set(cssModulePath, { css, exports });
590
+ const exportSource = Object.keys(exports).length > 0 ? `import styles from ${JSON.stringify(`absolute-style-module:${cssModulePath}`)}; export default Object.assign({}, styles, ${JSON.stringify(exports)});` : `export { default } from ${JSON.stringify(`absolute-style-module:${cssModulePath}`)};`;
591
+ return {
592
+ contents: exportSource,
593
+ loader: "js"
594
+ };
595
+ }
596
+ return {
597
+ contents: await compileStyleSource(path, undefined, undefined, config),
598
+ loader: "css"
599
+ };
600
+ });
601
+ build.onLoad({ filter: CSS_EXTENSION_PATTERN }, async ({ path }) => ({
602
+ contents: await compileStyleSource(path, undefined, undefined, config),
603
+ loader: "css"
604
+ }));
605
+ }
606
+ });
607
+ var stylePreprocessorPlugin = createStylePreprocessorPlugin();
608
+
609
+ // src/build/scanCssEntryPoints.ts
610
+ import { existsSync as existsSync2 } from "fs";
611
+ var {Glob } = globalThis.Bun;
612
+ var scanCssEntryPoints = async (dir, ignore) => {
613
+ if (!existsSync2(dir))
614
+ return [];
615
+ const entryPaths = [];
616
+ const glob = new Glob("**/*.{css,scss,sass,less,styl,stylus}");
617
+ for await (const file of glob.scan({ absolute: true, cwd: dir })) {
618
+ const normalized = normalizePath(file);
619
+ if (isStyleModulePath(normalized) || ignore?.some((pattern) => normalized.includes(pattern)))
620
+ continue;
621
+ entryPaths.push(file);
622
+ }
623
+ return entryPaths;
624
+ };
625
+
626
+ // src/build/manifestKeys.ts
627
+ import { existsSync as existsSync3, readFileSync as readFileSync2 } from "fs";
628
+ import { mkdir, readFile as readFile2, rename, rm, writeFile } from "fs/promises";
629
+ import { basename, dirname as dirname2, extname as extname3, join as join2, relative as relative2, resolve as resolve2 } from "path";
630
+ var GENERATED = ".absolutejs/generated";
631
+ var STYLE_EXTENSION = /\.(?:css|scss|sass|less|styl|stylus)$/;
632
+ var stemOf = (path) => basename(path, extname3(path));
633
+ var toPosix = (path) => normalizePath(path);
634
+ var asJs = (path) => toPosix(path).replace(/\.(?:vue|svelte|ts|tsx|jsx|js|mjs)$/, ".js");
635
+ var deriveManifestKeys = async (config, projectRoot = process.cwd()) => {
636
+ const definite = new Set;
637
+ const possible = new Set;
638
+ const patterns = ["Chunk${string}"];
639
+ const at = (dir) => dir === undefined ? undefined : resolve2(projectRoot, dir);
640
+ const fromRoot = (path) => toPosix(relative2(projectRoot, path));
641
+ const add = (target, outputPath) => {
642
+ const output = manifestKeyForOutput(outputPath);
643
+ if (output)
644
+ target.add(output.key);
645
+ };
646
+ const reactDir = at(config.reactDirectory);
647
+ const svelteDir = at(config.svelteDirectory);
648
+ const vueDir = at(config.vueDirectory);
649
+ const angularDir = at(config.angularDirectory);
650
+ const emberDir = at(config.emberDirectory);
651
+ const htmlDir = at(config.htmlDirectory);
652
+ const htmxDir = at(config.htmxDirectory);
653
+ const assetsDir = at(config.assetsDirectory);
654
+ const fileRoutes = scanFileRoutes(config).routes;
655
+ if (reactDir) {
656
+ const pagesDir = join2(reactDir, "pages");
657
+ const pages = existsSync3(pagesDir) ? (await scanConventions(pagesDir, "*.{jsx,tsx}")).pageFiles : [];
658
+ const names = [
659
+ ...pages.map((page) => basename(page).split(".")[0] ?? ""),
660
+ ...fileRoutes.filter((route) => route.framework === "react").map((route) => route.name)
661
+ ].filter(Boolean);
662
+ for (const name of names) {
663
+ add(definite, `${GENERATED}/react/indexes/${name}.js`);
664
+ add(possible, `${GENERATED}/react/indexes/${name}.css`);
665
+ }
666
+ }
667
+ const rscDir = at(config.reactServerComponentsDirectory);
668
+ if (rscDir && existsSync3(join2(rscDir, "pages"))) {
669
+ const { reactServerPageManifestKeys } = await import("./buildReactServerComponents-fq6mw10d.js");
670
+ const names = (await scanEntryPoints(join2(rscDir, "pages"), "*.{tsx,jsx,ts,js}")).map((page) => toPascal(stemOf(page)));
671
+ if (names.length > 0) {
672
+ definite.add(REACT_SERVER_CLIENT_MANIFEST_KEY);
673
+ definite.add(REACT_SERVER_RENDERER_MANIFEST_KEY);
674
+ }
675
+ for (const keys of reactServerPageManifestKeys(names).keys.values())
676
+ for (const key of keys)
677
+ definite.add(key);
678
+ }
679
+ if (svelteDir) {
680
+ const { pageFiles } = await scanConventions(join2(svelteDir, "pages"), "*.svelte");
681
+ for (const page of pageFiles) {
682
+ const name = stemOf(page);
683
+ definite.add(toPascal(name));
684
+ add(definite, `svelte/server/pages/${name}.js`);
685
+ add(definite, `${GENERATED}/svelte/indexes/pages/${name}.js`);
686
+ add(definite, `${GENERATED}/svelte/client/pages/${name}.js`);
687
+ add(possible, `${GENERATED}/svelte/indexes/pages/${name}.css`);
688
+ }
689
+ for (const route of fileRoutes.filter((entry) => entry.framework === "svelte")) {
690
+ for (const key of [
691
+ route.name,
692
+ `${route.name}Index`,
693
+ `${route.name}Client`
694
+ ])
695
+ possible.add(key);
696
+ }
697
+ }
698
+ if (vueDir) {
699
+ const { pageFiles } = await scanConventions(join2(vueDir, "pages"), "*.vue");
700
+ const cssDir = assetsDir ? basename(assetsDir) : "assets";
701
+ for (const page of pageFiles) {
702
+ const name = stemOf(page);
703
+ const mirrored = asJs(fromRoot(page));
704
+ definite.add(toPascal(name));
705
+ add(definite, `vue/server/sources/${mirrored}`);
706
+ add(definite, `${GENERATED}/vue/indexes/${name}.js`);
707
+ add(definite, `${GENERATED}/vue/client/sources/${mirrored}`);
708
+ add(possible, `${cssDir}/css/${toKebab(name)}-compiled.css`);
709
+ possible.add(`${name}Css`);
710
+ if (readFileSync2(page, "utf-8").includes("defineRoutes"))
711
+ possible.add(`${name}SpaManifest`);
712
+ }
713
+ }
714
+ if (angularDir) {
715
+ const { pageFiles } = await scanConventions(join2(angularDir, "pages"), "**/*.ts");
716
+ for (const page of pageFiles) {
717
+ const name = stemOf(page);
718
+ definite.add(toPascal(name));
719
+ add(definite, `angular/${asJs(fromRoot(page))}`);
720
+ add(definite, `${GENERATED}/angular/indexes/${name}.js`);
721
+ add(possible, `${GENERATED}/angular/indexes/${name}.css`);
722
+ }
723
+ }
724
+ if (emberDir) {
725
+ const { pageFiles } = await scanConventions(join2(emberDir, "pages"), "*.{gjs,gts,ts}");
726
+ for (const page of pageFiles) {
727
+ definite.add(toPascal(stemOf(page)));
728
+ possible.add(`${toPascal(stemOf(page))}Index`);
729
+ }
730
+ }
731
+ for (const dir of [htmlDir, htmxDir]) {
732
+ if (!dir)
733
+ continue;
734
+ for (const page of await scanEntryPoints(join2(dir, "pages"), "*.html"))
735
+ definite.add(basename(page, ".html"));
736
+ for (const script of await scanEntryPoints(join2(dir, "scripts"), "*.{js,ts}"))
737
+ add(definite, asJs(fromRoot(script)));
738
+ }
739
+ const stylesPath = typeof config.stylesConfig === "string" ? config.stylesConfig : config.stylesConfig?.path;
740
+ const stylesDir = at(stylesPath);
741
+ if (stylesDir) {
742
+ const ignore = typeof config.stylesConfig === "object" ? config.stylesConfig.ignore : undefined;
743
+ for (const sheet of await scanCssEntryPoints(stylesDir, ignore)) {
744
+ const path = toPosix(relative2(stylesDir, sheet)).replace(STYLE_EXTENSION, ".css");
745
+ add(definite, `${basename(stylesDir)}/${path}`);
746
+ }
747
+ }
748
+ const registryPath = at(config.islands?.registry);
749
+ const bootstrapPath = at(config.islands?.bootstrap);
750
+ if (registryPath && existsSync3(registryPath)) {
751
+ const { definitions } = await loadIslandRegistryBuildInfo(registryPath);
752
+ for (const { component, framework } of definitions) {
753
+ add(definite, `islands/${framework}/${component}.js`);
754
+ add(possible, `islands/${framework}/${component}.css`);
755
+ }
756
+ if (!bootstrapPath && definitions.length > 0)
757
+ add(definite, `islands/${DEFAULT_ISLAND_BOOTSTRAP_NAME}.js`);
758
+ }
759
+ if (bootstrapPath && existsSync3(bootstrapPath)) {
760
+ definite.add(ISLAND_BOOTSTRAP_MANIFEST_KEY);
761
+ add(definite, asJs(fromRoot(bootstrapPath)));
762
+ }
763
+ const frameworkDirs = [
764
+ reactDir,
765
+ svelteDir,
766
+ vueDir,
767
+ angularDir,
768
+ htmlDir,
769
+ htmxDir
770
+ ].filter((dir) => dir !== undefined && existsSync3(dir));
771
+ if (frameworkDirs.length > 0) {
772
+ const { scanWorkerReferences } = await import("./build-fntmf42w.js");
773
+ for (const worker of await scanWorkerReferences(frameworkDirs))
774
+ possible.add(toPascal(stemOf(worker)));
775
+ }
776
+ if (config.fonts) {
777
+ patterns.push(`${FONT_PRELOAD_MANIFEST_PREFIX}\${number}`, `${FONTS_REMOTE_CSS_MANIFEST_PREFIX}\${number}`);
778
+ }
779
+ for (const key of definite)
780
+ possible.delete(key);
781
+ return { definite, patterns, possible };
782
+ };
783
+ var MANIFEST_KEYS_DECLARATION = ".absolutejs/types/manifest.d.ts";
784
+ var PACKAGE = "@absolutejs/absolute";
785
+ var manifestKeysDeclarationSource = ({
786
+ definite,
787
+ patterns,
788
+ possible
789
+ }) => {
790
+ const keys = [...new Set([...definite, ...possible])].sort();
791
+ const members = [
792
+ ...keys.map((key) => ` ${JSON.stringify(key)}: true;`),
793
+ ...patterns.map((pattern) => ` [key: \`${pattern}\`]: true;`)
794
+ ];
795
+ return `// Generated by AbsoluteJS from the project's pages, styles and islands
796
+ // (absolute dev, absolute build, absolute typecheck). Do not edit.
797
+ export {};
798
+
799
+ declare module '${PACKAGE}' {
800
+ interface AbsoluteManifestKeys {
801
+ ${members.join(`
802
+ `)}
803
+ }
804
+ }
805
+ `;
806
+ };
807
+ var mergeKeys = (all) => {
808
+ const definite = new Set(all.flatMap((keys) => [...keys.definite]));
809
+ const possible = new Set(all.flatMap((keys) => [...keys.possible]).filter((key) => !definite.has(key)));
810
+ const patterns = [...new Set(all.flatMap((keys) => keys.patterns))];
811
+ return { definite, patterns, possible };
812
+ };
813
+ var writeManifestKeysDeclaration = async (configs, projectRoot = process.cwd()) => {
814
+ const path = join2(projectRoot, MANIFEST_KEYS_DECLARATION);
815
+ try {
816
+ const derived = mergeKeys(await Promise.all((Array.isArray(configs) ? configs : [configs]).map((config) => deriveManifestKeys(config, projectRoot))));
817
+ if (derived.definite.size === 0 && derived.possible.size === 0) {
818
+ await rm(path, { force: true });
819
+ return null;
820
+ }
821
+ const source = manifestKeysDeclarationSource(derived);
822
+ const current = existsSync3(path) ? await readFile2(path, "utf-8") : undefined;
823
+ if (current === source)
824
+ return path;
825
+ await mkdir(dirname2(path), { recursive: true });
826
+ const staging = `${path}.${process.pid}.tmp`;
827
+ await writeFile(staging, source);
828
+ await rename(staging, path);
829
+ return path;
830
+ } catch {
831
+ return existsSync3(path) ? path : null;
832
+ }
833
+ };
834
+
835
+ export { REACT_SERVER_CLIENT_MANIFEST_KEY, REACT_SERVER_PAGE_MANIFEST_SUFFIX, REACT_SERVER_PAYLOAD_GLOBAL, REACT_SERVER_RENDERER_MANIFEST_KEY, REACT_SERVER_RUNTIME_FILE, MANIFEST_KEYS_DECLARATION, writeManifestKeysDeclaration };