@wular/pnext 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/_chunks/{aliases-j47a10ce.js → aliases-pycbtjt1.js} +7 -5
- package/dist/server/_chunks/{analyze-arswqe6s.js → analyze-4d9e00g9.js} +17 -13
- package/dist/server/_chunks/{boot-af0mv3dy.js → boot-bhemypxz.js} +13 -11
- package/dist/server/_chunks/{build-spy3dxp4.js → build-c991dv65.js} +7 -5
- package/dist/server/_chunks/{build-t9h0hec3.js → build-kh5e3x48.js} +977 -1186
- package/dist/server/_chunks/{build-tier-m7yvqz61.js → build-tier-0a96kmx3.js} +59 -75
- package/dist/server/_chunks/{compile-53j02j27.js → compile-040r79gj.js} +2 -2
- package/dist/server/_chunks/{config-n2z7yxps.js → config-0tvz03a6.js} +6 -4
- package/dist/server/_chunks/{config-1yzwexq6.js → config-27rj7830.js} +12 -3
- package/dist/server/_chunks/{create-meec9hs6.js → create-9rvwshsp.js} +4 -3
- package/dist/server/_chunks/{dev-fjmqg6en.js → dev-ex9exynt.js} +2 -2
- package/dist/server/_chunks/{generate-n9sh6hzt.js → generate-myw9hef7.js} +5 -4
- package/dist/server/_chunks/{index-91x12ykq.js → index-0r5eqfc7.js} +6 -1
- package/dist/server/_chunks/{index-3xbr4eyv.js → index-0yjv5v47.js} +3 -3
- package/dist/server/_chunks/{index-ncnes8c6.js → index-11xpbfej.js} +2 -2
- package/dist/server/_chunks/{index-357na4a8.js → index-141vcwk6.js} +1 -1
- package/dist/server/_chunks/{index-nyrba2kr.js → index-1pzm1hdy.js} +11 -11
- package/dist/server/_chunks/{index-fkp000p1.js → index-29pq0kax.js} +2 -2
- package/dist/server/_chunks/{index-wpfhfbs4.js → index-38xpdxwd.js} +4 -4
- package/dist/server/_chunks/{index-tvqkq6e6.js → index-3e075kny.js} +1 -1
- package/dist/server/_chunks/{index-kq8kpzye.js → index-3ycf5ckv.js} +3 -3
- package/dist/server/_chunks/{index-20ppawv7.js → index-4da76t62.js} +3 -3
- package/dist/server/_chunks/{index-cf4rvxv6.js → index-52k54ykj.js} +1 -1
- package/dist/server/_chunks/{index-x93hv0sc.js → index-71885zaq.js} +23 -10
- package/dist/server/_chunks/{index-jepjvcrf.js → index-8ct7rqy3.js} +1 -1
- package/dist/server/_chunks/{index-sjpckxqn.js → index-9f49w76j.js} +1 -1
- package/dist/server/_chunks/{index-4hgjrqh7.js → index-9hz3s0m8.js} +2 -2
- package/dist/server/_chunks/{index-9n2914ww.js → index-akkrvjn6.js} +1 -1
- package/dist/server/_chunks/{index-9ych9ma8.js → index-b7j671dj.js} +2 -2
- package/dist/server/_chunks/index-bzd2ef7t.js +10 -0
- package/dist/server/_chunks/{index-p77b4kcx.js → index-cn86z041.js} +1 -1
- package/dist/server/_chunks/{index-hkdfj58q.js → index-cvr4z22m.js} +1 -1
- package/dist/server/_chunks/{index-y2jr2n72.js → index-d158y67j.js} +4 -4
- package/dist/server/_chunks/{index-yz54pxrh.js → index-d1jsmhhk.js} +4 -9
- package/dist/server/_chunks/{index-ggk2j965.js → index-dgr390q7.js} +56 -50
- package/dist/server/_chunks/{index-sctcgyvv.js → index-drwv61cc.js} +2 -2
- package/dist/server/_chunks/{index-9hx2641q.js → index-entm8bmz.js} +1 -1
- package/dist/server/_chunks/{index-jx7bqvw1.js → index-evhd413j.js} +1 -1
- package/dist/server/_chunks/{index-1011cscr.js → index-fjv96re1.js} +61 -29
- package/dist/server/_chunks/{index-c0g2wf3z.js → index-gcmj16xy.js} +1 -1
- package/dist/server/_chunks/{index-ytjvpbm2.js → index-gkndxkxf.js} +3 -3
- package/dist/server/_chunks/index-hdbwtdv2.js +352 -0
- package/dist/server/_chunks/{index-z84ab1w0.js → index-he6n2bvp.js} +3 -3
- package/dist/server/_chunks/{index-eajaspjk.js → index-j0m1jxqa.js} +1 -1
- package/dist/server/_chunks/{index-4q2gbfwk.js → index-j681c48a.js} +2 -2
- package/dist/server/_chunks/index-jbj7ehef.js +50 -0
- package/dist/server/_chunks/{index-8k7pfejn.js → index-jn9rbhrx.js} +7 -7
- package/dist/server/_chunks/index-jt8e1pje.js +12 -0
- package/dist/server/_chunks/{index-eeaanp2e.js → index-kdhxpwyq.js} +3 -3
- package/dist/server/_chunks/{index-6e4fqv30.js → index-m63czgq5.js} +2 -0
- package/dist/server/_chunks/{index-2dv4y4wd.js → index-n629dy38.js} +16 -10
- package/dist/server/_chunks/{index-sv8m6789.js → index-nf3df4jy.js} +5 -5
- package/dist/server/_chunks/{index-06nyqntx.js → index-q3r9z8mq.js} +1 -1
- package/dist/server/_chunks/{index-3b3at80h.js → index-qcrvt6er.js} +6 -3
- package/dist/server/_chunks/{index-egykcqg3.js → index-rgj5mx84.js} +1 -1
- package/dist/server/_chunks/{index-vvmmknm1.js → index-rjegyfx4.js} +19 -15
- package/dist/server/_chunks/{index-ym67zqxp.js → index-tf4j19ge.js} +1 -1
- package/dist/server/_chunks/{index-5gyr4emz.js → index-tq3b39a5.js} +4 -4
- package/dist/server/_chunks/{index-qn4z5s3c.js → index-typcbcsv.js} +3 -3
- package/dist/server/_chunks/{index-11sfk4hb.js → index-vmr35jjw.js} +1 -1
- package/dist/server/_chunks/{index-danncfhy.js → index-wm36rj4v.js} +1 -1
- package/dist/server/_chunks/{index-3tf1xjsp.js → index-x2m17v9c.js} +11 -11
- package/dist/server/_chunks/{index-z4z9zv3b.js → index-x9c55pzy.js} +141 -3
- package/dist/server/_chunks/{index-k1g3epw0.js → index-xh1nbk46.js} +10 -10
- package/dist/server/_chunks/{index-0374j2b9.js → index-y4d02znn.js} +1 -1
- package/dist/server/_chunks/{index-qm6kmhqs.js → index-y7mzvq2q.js} +1 -1
- package/dist/server/_chunks/{index-rn8dyr1f.js → index-yrjkqtfj.js} +8 -48
- package/dist/server/_chunks/{index-tq0pc7eg.js → index-zfrwq472.js} +3 -3
- package/dist/server/_chunks/{loader-7yw0j98z.js → loader-5en7wpt5.js} +12 -10
- package/dist/server/_chunks/{modules-jn8bmbn8.js → modules-t92favpj.js} +14 -12
- package/dist/server/_chunks/{pipeline-yy9jhydf.js → pipeline-4t9q43ht.js} +25 -21
- package/dist/server/_chunks/{production-jar9ztm3.js → production-385bw8df.js} +14 -3
- package/dist/server/_chunks/{proxy-config-j84dgksn.js → proxy-config-60gprphe.js} +7 -5
- package/dist/server/_chunks/{proxy-w1d0wmsn.js → proxy-gfhmktbk.js} +12 -10
- package/dist/server/_chunks/{router-k1reahfn.js → router-xnrva921.js} +10 -7
- package/dist/server/_chunks/{routes-2s277fc6.js → routes-ht868pdc.js} +12 -10
- package/dist/server/_chunks/{run-pvd8bs1t.js → run-d40d63ag.js} +5 -4
- package/dist/server/_chunks/{server-mt4a994c.js → server-2p8fgqq2.js} +38 -34
- package/dist/server/_chunks/{tsconfig-defaults-1nb3308g.js → tsconfig-defaults-bcn34eqb.js} +5 -4
- package/dist/server/_chunks/{typegen-0qr0459b.js → typegen-dvtcjtaw.js} +15 -13
- package/dist/server/cli/index.js +12 -15
- package/dist/server/cli/start.js +35 -14
- package/dist/server/compat/next/cache.js +5 -5
- package/dist/server/compat/next/config-headers.js +8 -6
- package/dist/server/compat/next/config-loader.js +1 -1
- package/dist/server/compat/next/dist/server/web/spec-extension/revalidate.js +5 -5
- package/dist/server/compat/next/dist/server/web/spec-extension/unstable-cache.js +5 -5
- package/dist/server/compat/next/dist/server/web/spec-extension/unstable-no-store.js +5 -5
- package/dist/server/compat/next/dynamic.js +3 -14
- package/dist/server/compat/next/font/cache.js +6 -4
- package/dist/server/compat/next/font/local.js +7 -5
- package/dist/server/compat/next/font/runtime.js +7 -5
- package/dist/server/compat/next/headers.js +4 -4
- package/dist/server/compat/next/image/config.js +2 -2
- package/dist/server/compat/next/image/optimizer.js +3 -3
- package/dist/server/compat/next/image/static-metadata.js +4 -4
- package/dist/server/compat/next/legacy-request-apis.js +3 -3
- package/dist/server/compat/next/link-transform.js +4 -3
- package/dist/server/compat/next/navigation.js +5 -4
- package/dist/server/compat/next/redirects.js +8 -6
- package/dist/server/compat/next/resource-hints.js +2 -2
- package/dist/server/compat/next/rewrites.js +7 -5
- package/dist/server/compat/next/root-params.js +3 -3
- package/dist/server/compat/next/route-state.js +2 -2
- package/dist/server/compat/next/script.js +2 -2
- package/dist/server/compat/next/server.js +5 -5
- package/dist/server/generation.json +1 -1
- package/package.json +1 -1
- package/reference/compat.md +1 -1
- package/reference/config.md +2 -2
- package/reference/dev.md +1 -1
- package/reference/getting-started.md +1 -1
- package/reference/rendering.md +4 -4
- package/src/api/dynamic.tsx +84 -4
- package/src/cli/adapters/vercel-warm.ts +40 -29
- package/src/cli/adapters/vercel.ts +95 -1262
- package/src/cli/analyze.ts +3 -2
- package/src/cli/build/cache.ts +6 -6
- package/src/cli/build.ts +33 -33
- package/src/cli/index.ts +4 -6
- package/src/cli/serve/pipeline.ts +16 -10
- package/src/cli/serve/standalone-worker.ts +8 -0
- package/src/cli/serve/standalone.ts +703 -0
- package/src/cli/start.ts +29 -8
- package/src/client/build.ts +1 -1
- package/src/client/reference-stub.ts +2 -34
- package/src/compat/actions/extensions.ts +3 -2
- package/src/compat/bundler/require-context.ts +2 -1
- package/src/compat/bundler/webpack-loaders.ts +3 -2
- package/src/compat/bundler/worker.ts +2 -2
- package/src/compat/css/inline-css.ts +1 -1
- package/src/compat/export/build-complete.ts +1 -1
- package/src/compat/export/emit.ts +4 -4
- package/src/compat/export/standalone.ts +30 -65
- package/src/compat/image-optimizer/optimize.ts +1 -1
- package/src/compat/lifecycle/instrumentation-client.ts +4 -3
- package/src/compat/metadata-artifacts.ts +1 -1
- package/src/compat/next/config-loader.ts +3 -0
- package/src/compat/next/dynamic.tsx +10 -23
- package/src/compat/next/font/cache.ts +2 -1
- package/src/compat/next/font/runtime.ts +1 -1
- package/src/compat/register/image.ts +1 -1
- package/src/compat/typecheck/check.ts +6 -4
- package/src/config.ts +28 -5
- package/src/css/assets.ts +1 -1
- package/src/css/build.ts +16 -9
- package/src/dev/client-chunk-store.ts +2 -1
- package/src/dev/restart/client-key.ts +2 -1
- package/src/dev/restart/global-css.ts +2 -1
- package/src/dev/restart/route-bundle-key.ts +2 -1
- package/src/dev/restart/route-facts.ts +2 -1
- package/src/dev/server.ts +8 -7
- package/src/out-paths.ts +10 -0
- package/src/render/renderer.ts +1 -1
- package/src/resolve/dynamic.ts +4 -0
- package/src/resolve/engine.ts +2 -12
- package/src/resolve/scan-facts.ts +185 -1
- package/src/routing/metadata-files.ts +1 -1
- package/src/runtime/loader.ts +5 -3
- package/src/runtime/module-cache.ts +2 -1
- package/src/runtime/modules.ts +50 -16
- package/src/runtime/prebundle.ts +23 -3
- package/src/runtime/production.ts +105 -40
- package/src/runtime/release-graph.ts +21 -13
- package/src/runtime/vendor-build.ts +45 -23
- package/src/types.ts +2 -3
- package/src/utils/directive.ts +40 -0
- package/src/utils/fs.ts +7 -2
- package/src/utils/resource-query.ts +12 -0
- package/dist/server/_chunks/index-tqn2qnnn.js +0 -241
- package/dist/server/_chunks/index-y36a0ybw.js +0 -57
- package/src/cli/serve/entry.ts +0 -52
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
devServerModuleHref,
|
|
4
4
|
registerServerRuntime
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-0yjv5v47.js";
|
|
6
6
|
import {
|
|
7
7
|
pathToFileHref
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-71885zaq.js";
|
|
9
9
|
import {
|
|
10
10
|
runWithRequest
|
|
11
11
|
} from "./index-grta8ap3.js";
|
|
@@ -291,7 +291,7 @@ async function staticProxyMatchers(file) {
|
|
|
291
291
|
return cached.matchers;
|
|
292
292
|
let matchers;
|
|
293
293
|
try {
|
|
294
|
-
const { staticProxyConfig } = await import("./proxy-config-
|
|
294
|
+
const { staticProxyConfig } = await import("./proxy-config-60gprphe.js");
|
|
295
295
|
const config = staticProxyConfig(file, readFileSync(file, "utf8"));
|
|
296
296
|
if (config)
|
|
297
297
|
matchers = proxyMatchers(config);
|
|
@@ -3,7 +3,7 @@ import { join as __pnextJoin } from "node:path";
|
|
|
3
3
|
const __PNEXT_PACKAGE_ROOT__ = __pnextJoin(import.meta.dirname, "../../..");
|
|
4
4
|
import {
|
|
5
5
|
frozenDirListing
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-hdbwtdv2.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/fs.ts
|
|
9
9
|
import { existsSync, readdirSync, readFileSync } from "fs";
|
|
@@ -230,10 +230,10 @@ function serializeBuildManifest(data) {
|
|
|
230
230
|
return `${JSON.stringify(stored, null, 2)}
|
|
231
231
|
`;
|
|
232
232
|
}
|
|
233
|
-
function resolveManifest(data, outPath, root) {
|
|
233
|
+
function resolveManifest(data, outPath, root, framework = frameworkRoot) {
|
|
234
234
|
if (path.isAbsolute(data.root))
|
|
235
235
|
return data;
|
|
236
|
-
const absolute = (file) => file.startsWith(frameworkPrefix) ? path.join(
|
|
236
|
+
const absolute = (file) => file.startsWith(frameworkPrefix) ? path.join(framework, file.slice(frameworkPrefix.length)) : path.join(root, file);
|
|
237
237
|
return {
|
|
238
238
|
...mapSourcePaths(data, absolute),
|
|
239
239
|
root,
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import { join as __pnextJoin } from "node:path";
|
|
3
3
|
const __PNEXT_PACKAGE_ROOT__ = __pnextJoin(import.meta.dirname, "../../..");
|
|
4
|
+
import {
|
|
5
|
+
standaloneOutSegment
|
|
6
|
+
} from "./index-bzd2ef7t.js";
|
|
4
7
|
import {
|
|
5
8
|
attachRelease,
|
|
6
|
-
|
|
9
|
+
buildIndexFile,
|
|
10
|
+
linkStandaloneOrigins,
|
|
7
11
|
readBuildIndex,
|
|
8
|
-
releaseConfig
|
|
9
|
-
|
|
12
|
+
releaseConfig,
|
|
13
|
+
releaseSourceRoot,
|
|
14
|
+
servingReleaseDir
|
|
15
|
+
} from "./index-hdbwtdv2.js";
|
|
10
16
|
import {
|
|
11
17
|
setLegacyRequestAPIs
|
|
12
18
|
} from "./index-grta8ap3.js";
|
|
@@ -115,7 +121,7 @@ async function resolveConfigSource(config, root, options) {
|
|
|
115
121
|
if (!config.compat?.next)
|
|
116
122
|
return {};
|
|
117
123
|
if (!configSource) {
|
|
118
|
-
await import("./config-
|
|
124
|
+
await import("./config-0tvz03a6.js").then((module) => module.registerConfigSource());
|
|
119
125
|
}
|
|
120
126
|
if (!configSource)
|
|
121
127
|
return {};
|
|
@@ -123,7 +129,7 @@ async function resolveConfigSource(config, root, options) {
|
|
|
123
129
|
}
|
|
124
130
|
async function loadConfig(rootInput = process.cwd(), options = {}) {
|
|
125
131
|
const root = canonicalRoot(path2.resolve(rootInput));
|
|
126
|
-
const released = options.serve ?
|
|
132
|
+
const released = options.serve ? servingReleaseDir() : undefined;
|
|
127
133
|
if (released)
|
|
128
134
|
return loadReleasedConfig(root, released, options);
|
|
129
135
|
await loadEnv(root, options);
|
|
@@ -144,6 +150,10 @@ async function loadConfig(rootInput = process.cwd(), options = {}) {
|
|
|
144
150
|
const sourceOverrides = stripUndefined(await resolveConfigSource(config, root, options));
|
|
145
151
|
const merged = { ...defaultConfig, ...config, ...sourceOverrides };
|
|
146
152
|
const outRootPath = path2.resolve(root, merged.outDir);
|
|
153
|
+
const release = path2.join(outRootPath, standaloneOutSegment);
|
|
154
|
+
if (options.serve && existsSync(buildIndexFile(release))) {
|
|
155
|
+
return loadReleasedConfig(root, release, { ...options, warnings: false });
|
|
156
|
+
}
|
|
147
157
|
const appPath = await resolveAppPath(root, config, options.dev ? undefined : path2.join(outRootPath, "pnext-pages-compat"));
|
|
148
158
|
const workspaceRoot = canonicalRoot(config.workspaceRoot ? path2.resolve(root, config.workspaceRoot) : findWorkspaceRoot(root) ?? root);
|
|
149
159
|
return {
|
|
@@ -160,7 +170,7 @@ async function loadConfig(rootInput = process.cwd(), options = {}) {
|
|
|
160
170
|
workspaceRoot,
|
|
161
171
|
appPath,
|
|
162
172
|
publicPath: path2.resolve(root, "public"),
|
|
163
|
-
outPath:
|
|
173
|
+
outPath: path2.join(outRootPath, options.dev ? devOutSegment : standaloneOutSegment),
|
|
164
174
|
outRootPath,
|
|
165
175
|
typesPath: path2.join(outRootPath, "types"),
|
|
166
176
|
checksPath: path2.join(outRootPath, "typecheck", "checks")
|
|
@@ -168,7 +178,9 @@ async function loadConfig(rootInput = process.cwd(), options = {}) {
|
|
|
168
178
|
}
|
|
169
179
|
async function loadReleasedConfig(root, outPath, options) {
|
|
170
180
|
const index = readBuildIndex(outPath);
|
|
171
|
-
|
|
181
|
+
linkStandaloneOrigins(outPath);
|
|
182
|
+
const sourceRoot = releaseSourceRoot(outPath, index.config.outPath);
|
|
183
|
+
const config = releaseConfig(index.config, sourceRoot, outPath);
|
|
172
184
|
await loadEnv(root, options);
|
|
173
185
|
setLegacyRequestAPIs(typeof config.compat?.next === "object" && config.compat.next.legacyRequestAPIs === true);
|
|
174
186
|
setCacheComponents(false);
|
|
@@ -235,6 +247,7 @@ function frameworkRuntimeAliasEntries() {
|
|
|
235
247
|
};
|
|
236
248
|
return frameworkRuntimeAliases;
|
|
237
249
|
}
|
|
250
|
+
var frameworkRuntimeSpecifiers = () => Object.keys(frameworkRuntimeAliasEntries());
|
|
238
251
|
function resolveRuntimeModule(specifier) {
|
|
239
252
|
return fileURLToPath(import.meta.resolve(specifier));
|
|
240
253
|
}
|
|
@@ -252,14 +265,14 @@ async function resolveAppPath(root, config, pagesBase) {
|
|
|
252
265
|
const hasPages = existsSync(pagesPath);
|
|
253
266
|
if (existsSync(rootApp)) {
|
|
254
267
|
if (hasPages) {
|
|
255
|
-
const { materializePagesApp: materializePagesApp2 } = await import("./router-
|
|
268
|
+
const { materializePagesApp: materializePagesApp2 } = await import("./router-xnrva921.js");
|
|
256
269
|
const hybrid = await materializePagesApp2(root, pagesBase);
|
|
257
270
|
if (hybrid)
|
|
258
271
|
return hybrid;
|
|
259
272
|
}
|
|
260
273
|
return rootApp;
|
|
261
274
|
}
|
|
262
|
-
const { materializePagesApp } = await import("./router-
|
|
275
|
+
const { materializePagesApp } = await import("./router-xnrva921.js");
|
|
263
276
|
const pagesApp = await materializePagesApp(root, pagesBase);
|
|
264
277
|
if (pagesApp)
|
|
265
278
|
return pagesApp;
|
|
@@ -268,4 +281,4 @@ async function resolveAppPath(root, config, pagesBase) {
|
|
|
268
281
|
return path2.join(root, "src", "app");
|
|
269
282
|
}
|
|
270
283
|
|
|
271
|
-
export { DEFAULT_OUT_DIR, registerConfigSource, loadConfig, devOutSegment, pathToFileHref, publicEnvDefines, frameworkRuntimeAliasEntries, pnextAliases };
|
|
284
|
+
export { DEFAULT_OUT_DIR, registerConfigSource, loadConfig, devOutSegment, pathToFileHref, publicEnvDefines, frameworkRuntimeAliasEntries, frameworkRuntimeSpecifiers, pnextAliases };
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
} from "./index-v1ags1na.js";
|
|
5
5
|
import {
|
|
6
6
|
getNextConfig
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-m63czgq5.js";
|
|
8
8
|
import {
|
|
9
9
|
ensureDir,
|
|
10
10
|
toPosixPath
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-4da76t62.js";
|
|
12
12
|
|
|
13
13
|
// src/compat/typed-routes/generate.ts
|
|
14
14
|
import { existsSync as existsSync2 } from "fs";
|
|
@@ -3,11 +3,11 @@ import { join as __pnextJoin } from "node:path";
|
|
|
3
3
|
const __PNEXT_PACKAGE_ROOT__ = __pnextJoin(import.meta.dirname, "../../..");
|
|
4
4
|
import {
|
|
5
5
|
getNextConfig
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-m63czgq5.js";
|
|
7
7
|
import {
|
|
8
8
|
includeTypes,
|
|
9
9
|
writeFileAtomic
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-4da76t62.js";
|
|
11
11
|
|
|
12
12
|
// src/compat/tsconfig-defaults.ts
|
|
13
13
|
import { existsSync, readdirSync } from "fs";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/out-paths.ts
|
|
3
|
+
import path from "path";
|
|
4
|
+
var standaloneOutSegment = "standalone";
|
|
5
|
+
function outCachePath(outPath) {
|
|
6
|
+
const owner = path.basename(outPath) === standaloneOutSegment ? path.dirname(outPath) : outPath;
|
|
7
|
+
return path.join(owner, "cache");
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { standaloneOutSegment, outCachePath };
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
cssModuleScopePath,
|
|
7
7
|
ensureDir,
|
|
8
8
|
readText
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-4da76t62.js";
|
|
10
10
|
import {
|
|
11
11
|
productionRelease
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-hdbwtdv2.js";
|
|
13
13
|
import {
|
|
14
14
|
getCssExtensions
|
|
15
15
|
} from "./index-zqpqyg8p.js";
|
|
@@ -34,7 +34,7 @@ import { readFile, writeFile } from "fs/promises";
|
|
|
34
34
|
import path from "path";
|
|
35
35
|
var build;
|
|
36
36
|
async function globalCssHref(config) {
|
|
37
|
-
const sources = productionRelease(config)?.globalCss ?? (await (build ??= import("./build-
|
|
37
|
+
const sources = productionRelease(config)?.globalCss ?? (await (build ??= import("./build-c991dv65.js"))).globalCssSources(config);
|
|
38
38
|
return sources.length > 0 ? assetHref(config, "global.css") : undefined;
|
|
39
39
|
}
|
|
40
40
|
var emittedAssets = new Map;
|
|
@@ -79,7 +79,7 @@ function routeCssHref(route, config) {
|
|
|
79
79
|
return assets.map((asset) => assetHref(config, asset));
|
|
80
80
|
}
|
|
81
81
|
async function emitFontCssStylesheet(config, routeId, fontCss, baseAsset, options) {
|
|
82
|
-
const outDir = path.join(config.outPath, options.dev ? "cache" : "
|
|
82
|
+
const outDir = path.join(config.outPath, options.dev ? "cache" : "static", "assets");
|
|
83
83
|
await ensureDir(outDir);
|
|
84
84
|
const baseFile = baseAsset ? path.join(outDir, baseAsset) : undefined;
|
|
85
85
|
const baseCss = baseFile && existsSync(baseFile) ? await readFile(baseFile, "utf8") : "";
|
|
@@ -6,6 +6,9 @@ import {
|
|
|
6
6
|
findWorkspaceRoot,
|
|
7
7
|
readPackageJson
|
|
8
8
|
} from "./index-pym1cezq.js";
|
|
9
|
+
import {
|
|
10
|
+
splitResourceQuery
|
|
11
|
+
} from "./index-jt8e1pje.js";
|
|
9
12
|
import {
|
|
10
13
|
onExtensionHostReset
|
|
11
14
|
} from "./index-zqpqyg8p.js";
|
|
@@ -104,14 +107,6 @@ function tsConfigFileFor(root) {
|
|
|
104
107
|
tsConfigFiles.set(key, file);
|
|
105
108
|
return file;
|
|
106
109
|
}
|
|
107
|
-
function splitResourceQuery(specifier) {
|
|
108
|
-
const offset = specifier.startsWith("#") ? 1 : 0;
|
|
109
|
-
const match = /[?#]/.exec(specifier.slice(offset));
|
|
110
|
-
if (!match)
|
|
111
|
-
return { path: specifier, query: "" };
|
|
112
|
-
const index = offset + match.index;
|
|
113
|
-
return { path: specifier.slice(0, index), query: specifier.slice(index) };
|
|
114
|
-
}
|
|
115
110
|
function resolveFrom(dir, specifier, conditions, tsConfigRoot) {
|
|
116
111
|
const { path: request } = splitResourceQuery(specifier);
|
|
117
112
|
const tsconfig = tsConfigRoot ? tsConfigFileFor(tsConfigRoot) : undefined;
|
|
@@ -957,4 +952,4 @@ function stripTrailingCommas(source) {
|
|
|
957
952
|
return output;
|
|
958
953
|
}
|
|
959
954
|
|
|
960
|
-
export { cachedExistsSync, clearResolverFsCache,
|
|
955
|
+
export { cachedExistsSync, clearResolverFsCache, setResolveExtensions, setExternalPackagePolicy, getExternalPackagePolicy, setExternalLoadResolver, resolveExternalLoadTarget, packageNameOfSpecifier, packageNameForFile, externalPackageImportTarget, setTsConfigPath, setModuleAliases, resolveModuleAlias, resolveImport, resolveConfiguredTsPath, configuredTsPathPatterns, resolutionRootForFile, resolveNestedPackageFromImporter, provideEntryResolution, providedEntryResolution, resolvePackageSpecifier, resolveVendorPackageSpecifier, clearAppTreeResolutions, resolvePackageImportSpecifier, resolveRuntimeSpecifier, isPackageSubpathUnexported, resolveLinkedPackageSpecifier, isEsmModuleFile, isEsmModuleEntry, isCommonJsModuleSource, isWorkspacePackage, workspacePackageRoots };
|