@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.
Files changed (172) hide show
  1. package/dist/server/_chunks/{aliases-j47a10ce.js → aliases-pycbtjt1.js} +7 -5
  2. package/dist/server/_chunks/{analyze-arswqe6s.js → analyze-4d9e00g9.js} +17 -13
  3. package/dist/server/_chunks/{boot-af0mv3dy.js → boot-bhemypxz.js} +13 -11
  4. package/dist/server/_chunks/{build-spy3dxp4.js → build-c991dv65.js} +7 -5
  5. package/dist/server/_chunks/{build-t9h0hec3.js → build-kh5e3x48.js} +977 -1186
  6. package/dist/server/_chunks/{build-tier-m7yvqz61.js → build-tier-0a96kmx3.js} +59 -75
  7. package/dist/server/_chunks/{compile-53j02j27.js → compile-040r79gj.js} +2 -2
  8. package/dist/server/_chunks/{config-n2z7yxps.js → config-0tvz03a6.js} +6 -4
  9. package/dist/server/_chunks/{config-1yzwexq6.js → config-27rj7830.js} +12 -3
  10. package/dist/server/_chunks/{create-meec9hs6.js → create-9rvwshsp.js} +4 -3
  11. package/dist/server/_chunks/{dev-fjmqg6en.js → dev-ex9exynt.js} +2 -2
  12. package/dist/server/_chunks/{generate-n9sh6hzt.js → generate-myw9hef7.js} +5 -4
  13. package/dist/server/_chunks/{index-91x12ykq.js → index-0r5eqfc7.js} +6 -1
  14. package/dist/server/_chunks/{index-3xbr4eyv.js → index-0yjv5v47.js} +3 -3
  15. package/dist/server/_chunks/{index-ncnes8c6.js → index-11xpbfej.js} +2 -2
  16. package/dist/server/_chunks/{index-357na4a8.js → index-141vcwk6.js} +1 -1
  17. package/dist/server/_chunks/{index-nyrba2kr.js → index-1pzm1hdy.js} +11 -11
  18. package/dist/server/_chunks/{index-fkp000p1.js → index-29pq0kax.js} +2 -2
  19. package/dist/server/_chunks/{index-wpfhfbs4.js → index-38xpdxwd.js} +4 -4
  20. package/dist/server/_chunks/{index-tvqkq6e6.js → index-3e075kny.js} +1 -1
  21. package/dist/server/_chunks/{index-kq8kpzye.js → index-3ycf5ckv.js} +3 -3
  22. package/dist/server/_chunks/{index-20ppawv7.js → index-4da76t62.js} +3 -3
  23. package/dist/server/_chunks/{index-cf4rvxv6.js → index-52k54ykj.js} +1 -1
  24. package/dist/server/_chunks/{index-x93hv0sc.js → index-71885zaq.js} +23 -10
  25. package/dist/server/_chunks/{index-jepjvcrf.js → index-8ct7rqy3.js} +1 -1
  26. package/dist/server/_chunks/{index-sjpckxqn.js → index-9f49w76j.js} +1 -1
  27. package/dist/server/_chunks/{index-4hgjrqh7.js → index-9hz3s0m8.js} +2 -2
  28. package/dist/server/_chunks/{index-9n2914ww.js → index-akkrvjn6.js} +1 -1
  29. package/dist/server/_chunks/{index-9ych9ma8.js → index-b7j671dj.js} +2 -2
  30. package/dist/server/_chunks/index-bzd2ef7t.js +10 -0
  31. package/dist/server/_chunks/{index-p77b4kcx.js → index-cn86z041.js} +1 -1
  32. package/dist/server/_chunks/{index-hkdfj58q.js → index-cvr4z22m.js} +1 -1
  33. package/dist/server/_chunks/{index-y2jr2n72.js → index-d158y67j.js} +4 -4
  34. package/dist/server/_chunks/{index-yz54pxrh.js → index-d1jsmhhk.js} +4 -9
  35. package/dist/server/_chunks/{index-ggk2j965.js → index-dgr390q7.js} +56 -50
  36. package/dist/server/_chunks/{index-sctcgyvv.js → index-drwv61cc.js} +2 -2
  37. package/dist/server/_chunks/{index-9hx2641q.js → index-entm8bmz.js} +1 -1
  38. package/dist/server/_chunks/{index-jx7bqvw1.js → index-evhd413j.js} +1 -1
  39. package/dist/server/_chunks/{index-1011cscr.js → index-fjv96re1.js} +61 -29
  40. package/dist/server/_chunks/{index-c0g2wf3z.js → index-gcmj16xy.js} +1 -1
  41. package/dist/server/_chunks/{index-ytjvpbm2.js → index-gkndxkxf.js} +3 -3
  42. package/dist/server/_chunks/index-hdbwtdv2.js +352 -0
  43. package/dist/server/_chunks/{index-z84ab1w0.js → index-he6n2bvp.js} +3 -3
  44. package/dist/server/_chunks/{index-eajaspjk.js → index-j0m1jxqa.js} +1 -1
  45. package/dist/server/_chunks/{index-4q2gbfwk.js → index-j681c48a.js} +2 -2
  46. package/dist/server/_chunks/index-jbj7ehef.js +50 -0
  47. package/dist/server/_chunks/{index-8k7pfejn.js → index-jn9rbhrx.js} +7 -7
  48. package/dist/server/_chunks/index-jt8e1pje.js +12 -0
  49. package/dist/server/_chunks/{index-eeaanp2e.js → index-kdhxpwyq.js} +3 -3
  50. package/dist/server/_chunks/{index-6e4fqv30.js → index-m63czgq5.js} +2 -0
  51. package/dist/server/_chunks/{index-2dv4y4wd.js → index-n629dy38.js} +16 -10
  52. package/dist/server/_chunks/{index-sv8m6789.js → index-nf3df4jy.js} +5 -5
  53. package/dist/server/_chunks/{index-06nyqntx.js → index-q3r9z8mq.js} +1 -1
  54. package/dist/server/_chunks/{index-3b3at80h.js → index-qcrvt6er.js} +6 -3
  55. package/dist/server/_chunks/{index-egykcqg3.js → index-rgj5mx84.js} +1 -1
  56. package/dist/server/_chunks/{index-vvmmknm1.js → index-rjegyfx4.js} +19 -15
  57. package/dist/server/_chunks/{index-ym67zqxp.js → index-tf4j19ge.js} +1 -1
  58. package/dist/server/_chunks/{index-5gyr4emz.js → index-tq3b39a5.js} +4 -4
  59. package/dist/server/_chunks/{index-qn4z5s3c.js → index-typcbcsv.js} +3 -3
  60. package/dist/server/_chunks/{index-11sfk4hb.js → index-vmr35jjw.js} +1 -1
  61. package/dist/server/_chunks/{index-danncfhy.js → index-wm36rj4v.js} +1 -1
  62. package/dist/server/_chunks/{index-3tf1xjsp.js → index-x2m17v9c.js} +11 -11
  63. package/dist/server/_chunks/{index-z4z9zv3b.js → index-x9c55pzy.js} +141 -3
  64. package/dist/server/_chunks/{index-k1g3epw0.js → index-xh1nbk46.js} +10 -10
  65. package/dist/server/_chunks/{index-0374j2b9.js → index-y4d02znn.js} +1 -1
  66. package/dist/server/_chunks/{index-qm6kmhqs.js → index-y7mzvq2q.js} +1 -1
  67. package/dist/server/_chunks/{index-rn8dyr1f.js → index-yrjkqtfj.js} +8 -48
  68. package/dist/server/_chunks/{index-tq0pc7eg.js → index-zfrwq472.js} +3 -3
  69. package/dist/server/_chunks/{loader-7yw0j98z.js → loader-5en7wpt5.js} +12 -10
  70. package/dist/server/_chunks/{modules-jn8bmbn8.js → modules-t92favpj.js} +14 -12
  71. package/dist/server/_chunks/{pipeline-yy9jhydf.js → pipeline-4t9q43ht.js} +25 -21
  72. package/dist/server/_chunks/{production-jar9ztm3.js → production-385bw8df.js} +14 -3
  73. package/dist/server/_chunks/{proxy-config-j84dgksn.js → proxy-config-60gprphe.js} +7 -5
  74. package/dist/server/_chunks/{proxy-w1d0wmsn.js → proxy-gfhmktbk.js} +12 -10
  75. package/dist/server/_chunks/{router-k1reahfn.js → router-xnrva921.js} +10 -7
  76. package/dist/server/_chunks/{routes-2s277fc6.js → routes-ht868pdc.js} +12 -10
  77. package/dist/server/_chunks/{run-pvd8bs1t.js → run-d40d63ag.js} +5 -4
  78. package/dist/server/_chunks/{server-mt4a994c.js → server-2p8fgqq2.js} +38 -34
  79. package/dist/server/_chunks/{tsconfig-defaults-1nb3308g.js → tsconfig-defaults-bcn34eqb.js} +5 -4
  80. package/dist/server/_chunks/{typegen-0qr0459b.js → typegen-dvtcjtaw.js} +15 -13
  81. package/dist/server/cli/index.js +12 -15
  82. package/dist/server/cli/start.js +35 -14
  83. package/dist/server/compat/next/cache.js +5 -5
  84. package/dist/server/compat/next/config-headers.js +8 -6
  85. package/dist/server/compat/next/config-loader.js +1 -1
  86. package/dist/server/compat/next/dist/server/web/spec-extension/revalidate.js +5 -5
  87. package/dist/server/compat/next/dist/server/web/spec-extension/unstable-cache.js +5 -5
  88. package/dist/server/compat/next/dist/server/web/spec-extension/unstable-no-store.js +5 -5
  89. package/dist/server/compat/next/dynamic.js +3 -14
  90. package/dist/server/compat/next/font/cache.js +6 -4
  91. package/dist/server/compat/next/font/local.js +7 -5
  92. package/dist/server/compat/next/font/runtime.js +7 -5
  93. package/dist/server/compat/next/headers.js +4 -4
  94. package/dist/server/compat/next/image/config.js +2 -2
  95. package/dist/server/compat/next/image/optimizer.js +3 -3
  96. package/dist/server/compat/next/image/static-metadata.js +4 -4
  97. package/dist/server/compat/next/legacy-request-apis.js +3 -3
  98. package/dist/server/compat/next/link-transform.js +4 -3
  99. package/dist/server/compat/next/navigation.js +5 -4
  100. package/dist/server/compat/next/redirects.js +8 -6
  101. package/dist/server/compat/next/resource-hints.js +2 -2
  102. package/dist/server/compat/next/rewrites.js +7 -5
  103. package/dist/server/compat/next/root-params.js +3 -3
  104. package/dist/server/compat/next/route-state.js +2 -2
  105. package/dist/server/compat/next/script.js +2 -2
  106. package/dist/server/compat/next/server.js +5 -5
  107. package/dist/server/generation.json +1 -1
  108. package/package.json +1 -1
  109. package/reference/compat.md +1 -1
  110. package/reference/config.md +2 -2
  111. package/reference/dev.md +1 -1
  112. package/reference/getting-started.md +1 -1
  113. package/reference/rendering.md +4 -4
  114. package/src/api/dynamic.tsx +84 -4
  115. package/src/cli/adapters/vercel-warm.ts +40 -29
  116. package/src/cli/adapters/vercel.ts +95 -1262
  117. package/src/cli/analyze.ts +3 -2
  118. package/src/cli/build/cache.ts +6 -6
  119. package/src/cli/build.ts +33 -33
  120. package/src/cli/index.ts +4 -6
  121. package/src/cli/serve/pipeline.ts +16 -10
  122. package/src/cli/serve/standalone-worker.ts +8 -0
  123. package/src/cli/serve/standalone.ts +703 -0
  124. package/src/cli/start.ts +29 -8
  125. package/src/client/build.ts +1 -1
  126. package/src/client/reference-stub.ts +2 -34
  127. package/src/compat/actions/extensions.ts +3 -2
  128. package/src/compat/bundler/require-context.ts +2 -1
  129. package/src/compat/bundler/webpack-loaders.ts +3 -2
  130. package/src/compat/bundler/worker.ts +2 -2
  131. package/src/compat/css/inline-css.ts +1 -1
  132. package/src/compat/export/build-complete.ts +1 -1
  133. package/src/compat/export/emit.ts +4 -4
  134. package/src/compat/export/standalone.ts +30 -65
  135. package/src/compat/image-optimizer/optimize.ts +1 -1
  136. package/src/compat/lifecycle/instrumentation-client.ts +4 -3
  137. package/src/compat/metadata-artifacts.ts +1 -1
  138. package/src/compat/next/config-loader.ts +3 -0
  139. package/src/compat/next/dynamic.tsx +10 -23
  140. package/src/compat/next/font/cache.ts +2 -1
  141. package/src/compat/next/font/runtime.ts +1 -1
  142. package/src/compat/register/image.ts +1 -1
  143. package/src/compat/typecheck/check.ts +6 -4
  144. package/src/config.ts +28 -5
  145. package/src/css/assets.ts +1 -1
  146. package/src/css/build.ts +16 -9
  147. package/src/dev/client-chunk-store.ts +2 -1
  148. package/src/dev/restart/client-key.ts +2 -1
  149. package/src/dev/restart/global-css.ts +2 -1
  150. package/src/dev/restart/route-bundle-key.ts +2 -1
  151. package/src/dev/restart/route-facts.ts +2 -1
  152. package/src/dev/server.ts +8 -7
  153. package/src/out-paths.ts +10 -0
  154. package/src/render/renderer.ts +1 -1
  155. package/src/resolve/dynamic.ts +4 -0
  156. package/src/resolve/engine.ts +2 -12
  157. package/src/resolve/scan-facts.ts +185 -1
  158. package/src/routing/metadata-files.ts +1 -1
  159. package/src/runtime/loader.ts +5 -3
  160. package/src/runtime/module-cache.ts +2 -1
  161. package/src/runtime/modules.ts +50 -16
  162. package/src/runtime/prebundle.ts +23 -3
  163. package/src/runtime/production.ts +105 -40
  164. package/src/runtime/release-graph.ts +21 -13
  165. package/src/runtime/vendor-build.ts +45 -23
  166. package/src/types.ts +2 -3
  167. package/src/utils/directive.ts +40 -0
  168. package/src/utils/fs.ts +7 -2
  169. package/src/utils/resource-query.ts +12 -0
  170. package/dist/server/_chunks/index-tqn2qnnn.js +0 -241
  171. package/dist/server/_chunks/index-y36a0ybw.js +0 -57
  172. package/src/cli/serve/entry.ts +0 -52
@@ -14,37 +14,37 @@ import {
14
14
  treeSegmentFile,
15
15
  validateBuild,
16
16
  warnNextMetadataBuildIssues
17
- } from "./index-4q2gbfwk.js";
17
+ } from "./index-j681c48a.js";
18
18
  import {
19
19
  writeTsconfigDefaults
20
- } from "./index-9ych9ma8.js";
20
+ } from "./index-b7j671dj.js";
21
21
  import {
22
22
  generateTypedRoutes
23
- } from "./index-4hgjrqh7.js";
23
+ } from "./index-9hz3s0m8.js";
24
24
  import {
25
25
  scanRootParamTypes
26
26
  } from "./index-v1ags1na.js";
27
27
  import {
28
28
  discoverStaticMetadataFiles
29
- } from "./index-3tf1xjsp.js";
29
+ } from "./index-x2m17v9c.js";
30
30
  import {
31
31
  deploymentId,
32
32
  turbopackLoaderRules
33
- } from "./index-danncfhy.js";
34
- import"./index-jepjvcrf.js";
33
+ } from "./index-wm36rj4v.js";
34
+ import"./index-8ct7rqy3.js";
35
35
  import {
36
36
  nextCompatEnabled,
37
37
  reactCompatEnabled,
38
38
  reactCompilerOptions
39
- } from "./index-eeaanp2e.js";
39
+ } from "./index-kdhxpwyq.js";
40
40
  import {
41
41
  findProxyFile,
42
42
  proxyExternalLoadTarget
43
- } from "./index-kq8kpzye.js";
43
+ } from "./index-3ycf5ckv.js";
44
44
  import {
45
45
  devServerModuleHref
46
- } from "./index-3xbr4eyv.js";
47
- import"./index-y2jr2n72.js";
46
+ } from "./index-0yjv5v47.js";
47
+ import"./index-d158y67j.js";
48
48
  import"./index-web361b8.js";
49
49
  import {
50
50
  preferredRegionForRoute
@@ -52,16 +52,16 @@ import {
52
52
  import {
53
53
  fontLinkHeaderValue,
54
54
  takeFontHeaderPreloads
55
- } from "./index-ytjvpbm2.js";
56
- import"./index-3b3at80h.js";
55
+ } from "./index-gkndxkxf.js";
56
+ import"./index-qcrvt6er.js";
57
57
  import"./index-knp0s912.js";
58
- import"./index-c0g2wf3z.js";
58
+ import"./index-gcmj16xy.js";
59
59
  import"./index-fn1chkkd.js";
60
60
  import"./index-ye9hmsvf.js";
61
61
  import"./index-6q7zvrap.js";
62
62
  import {
63
63
  takeResourceHintHeader
64
- } from "./index-ym67zqxp.js";
64
+ } from "./index-tf4j19ge.js";
65
65
  import"./index-stbk3jhn.js";
66
66
  import {
67
67
  aliasGenerateStaticParams,
@@ -74,14 +74,14 @@ import {
74
74
  prerenderFailureFooter,
75
75
  takeCacheLifeStash,
76
76
  writeBuildFlags
77
- } from "./index-eajaspjk.js";
77
+ } from "./index-j0m1jxqa.js";
78
78
  import"./index-z88qv16t.js";
79
79
  import"./index-fp8r0sqs.js";
80
- import"./index-9n2914ww.js";
80
+ import"./index-akkrvjn6.js";
81
81
  import"./index-bcws5eh2.js";
82
82
  import {
83
83
  getNextConfig
84
- } from "./index-6e4fqv30.js";
84
+ } from "./index-m63czgq5.js";
85
85
  import"./index-cjgqs13g.js";
86
86
  import"./index-jks0x0a1.js";
87
87
  import"./index-6b009mt0.js";
@@ -92,18 +92,19 @@ import {
92
92
  emitCustomServerShim
93
93
  } from "./index-8kcxdfya.js";
94
94
  import"./index-yhxkxghe.js";
95
- import"./index-fkp000p1.js";
96
- import"./index-p77b4kcx.js";
95
+ import"./index-29pq0kax.js";
96
+ import"./index-cn86z041.js";
97
97
  import {
98
98
  listFiles,
99
99
  toPosixPath
100
- } from "./index-20ppawv7.js";
100
+ } from "./index-4da76t62.js";
101
101
  import"./index-vz0km5qk.js";
102
102
  import {
103
103
  pathToFileHref
104
- } from "./index-x93hv0sc.js";
104
+ } from "./index-71885zaq.js";
105
+ import"./index-bzd2ef7t.js";
105
106
  import"./index-jcsjq3d1.js";
106
- import"./index-tqn2qnnn.js";
107
+ import"./index-hdbwtdv2.js";
107
108
  import"./index-ras0sdab.js";
108
109
  import {
109
110
  legacyRequestAPIs
@@ -112,6 +113,7 @@ import"./index-kresp2n8.js";
112
113
  import"./index-e3a6yx84.js";
113
114
  import"./index-7wc9n8be.js";
114
115
  import"./index-pym1cezq.js";
116
+ import"./index-jt8e1pje.js";
115
117
  import {
116
118
  onExtensionHostReset,
117
119
  registerBuildCompleteHooks,
@@ -187,7 +189,7 @@ function collectOutputs(config, manifest) {
187
189
  };
188
190
  const prerenderedRoutes = new Set;
189
191
  for (const [relative, metadata] of Object.entries(manifest.staticFiles ?? {})) {
190
- const filePath = path.join(config.outPath, "public", relative);
192
+ const filePath = path.join(config.outPath, "static", relative);
191
193
  if (!existsSync(filePath))
192
194
  continue;
193
195
  if (metadata.routeId)
@@ -413,6 +415,7 @@ async function validateTypesOffThread(config) {
413
415
  const input = {
414
416
  root: config.root,
415
417
  outPath: config.outPath,
418
+ outRootPath: config.outRootPath,
416
419
  compat: config.compat,
417
420
  nextConfig: cloneable({
418
421
  typescript: next.typescript,
@@ -527,12 +530,12 @@ function appDiagnostic(file, config) {
527
530
  return false;
528
531
  if (resolved.includes(`${path3.sep}node_modules${path3.sep}`))
529
532
  return false;
530
- if (resolved.startsWith(path3.resolve(config.outPath) + path3.sep))
533
+ if (resolved.startsWith(path3.resolve(config.outRootPath) + path3.sep))
531
534
  return false;
532
535
  return true;
533
536
  }
534
537
  function generatedProjectPath(config) {
535
- return path3.resolve(config.outPath, "typecheck", "tsconfig.json");
538
+ return path3.resolve(config.outRootPath, "typecheck", "tsconfig.json");
536
539
  }
537
540
  function reactTypePaths(root, basePaths, compatPreact) {
538
541
  const react = resolveTypesDir("react", root);
@@ -580,7 +583,7 @@ function resolvePackageDir(name, root) {
580
583
  return;
581
584
  }
582
585
  async function writeTypecheckProject(config, native) {
583
- const dir = path3.join(config.outPath, "typecheck");
586
+ const dir = path3.join(config.outRootPath, "typecheck");
584
587
  await mkdir3(dir, { recursive: true });
585
588
  const reactTypes = resolveTypesDir("react", config.root);
586
589
  const hasReactTypes = reactTypes !== undefined;
@@ -644,7 +647,7 @@ async function writeTypecheckProject(config, native) {
644
647
  return project;
645
648
  }
646
649
  function preactTypeShimPath(config) {
647
- return path3.join(config.outPath, "typecheck", "preact-compat.d.ts");
650
+ return path3.join(config.outRootPath, "typecheck", "preact-compat.d.ts");
648
651
  }
649
652
  function preactTypeShim(preact, react) {
650
653
  const preactTypes = JSON.stringify(path3.join(preact, "src", "index.d.ts"));
@@ -2003,7 +2006,7 @@ function toRouteMeta(metadata) {
2003
2006
  async function writeStaticMetadataArtifacts(outPath, root, relative, metadata) {
2004
2007
  if (!metadata)
2005
2008
  return;
2006
- const source = path5.join(outPath, "public", relative);
2009
+ const source = path5.join(outPath, "static", relative);
2007
2010
  const outputBase = path5.join(root, "server", "app", toPosixPath(relative));
2008
2011
  await mkdir5(path5.dirname(outputBase), { recursive: true });
2009
2012
  const routeMeta = JSON.stringify(toRouteMeta(metadata));
@@ -2128,12 +2131,12 @@ async function findFiles(root, targetName) {
2128
2131
  }
2129
2132
 
2130
2133
  // src/compat/export/emit.ts
2131
- import { copyFile, mkdir as mkdir7, readFile as readFile3, rm as rm2, writeFile as writeFile7 } from "fs/promises";
2134
+ import { copyFile, mkdir as mkdir7, readFile as readFile3, rm, writeFile as writeFile7 } from "fs/promises";
2132
2135
  import path7 from "path";
2133
2136
 
2134
2137
  // src/compat/export/standalone.ts
2135
2138
  import { existsSync as existsSync3, readFileSync } from "fs";
2136
- import { mkdir as mkdir6, rm, writeFile as writeFile6 } from "fs/promises";
2139
+ import { mkdir as mkdir6, writeFile as writeFile6 } from "fs/promises";
2137
2140
  import path6 from "path";
2138
2141
  var ENTRY_FILE = /(?:^|[\\/])(page|route)\.(?:js|jsx|ts|tsx|mjs|cjs)$/;
2139
2142
  async function emitStandalone({
@@ -2144,50 +2147,31 @@ async function emitStandalone({
2144
2147
  await log.step("standalone output", () => writeStandalone(config, manifest));
2145
2148
  }
2146
2149
  async function writeStandalone(config, manifest) {
2147
- const standaloneDir = path6.join(config.root, ".next", "standalone");
2148
- await rm(standaloneDir, { recursive: true, force: true });
2149
- await mkdir6(standaloneDir, { recursive: true });
2150
- await writeServerEntry(config, standaloneDir);
2150
+ const standaloneDir = config.outPath;
2151
+ await writeFile6(path6.join(standaloneDir, "server.js"), standaloneServerSource());
2151
2152
  await writeTraceFiles(config, standaloneDir);
2152
2153
  await writeMiddlewareManifest(manifest, standaloneDir);
2153
2154
  }
2154
- async function writeServerEntry(config, standaloneDir) {
2155
- await writeFile6(path6.join(standaloneDir, "package.json"), `${JSON.stringify({ name: "pnext-standalone", version: "0.0.0", type: "commonjs", private: true }, null, 2)}
2156
- `);
2157
- await writeFile6(path6.join(standaloneDir, "server.js"), standaloneServerSource(config));
2158
- }
2159
- function standaloneServerSource(config) {
2160
- const cliPath = path6.resolve(__PNEXT_PACKAGE_ROOT__ + "/src/compat/export", "..", "..", "cli", "index.ts");
2161
- return `'use strict';
2162
- // pnext standalone launcher. Generated by pnext build; see
2163
- // src/compat/export/standalone.ts. Spawned as \`node server.js\` from the moved
2164
- // standalone directory; re-execs the real pnext server under Bun.
2165
- const { spawn } = require('node:child_process');
2166
-
2167
- const PNEXT_CLI = ${JSON.stringify(cliPath)};
2168
- const PNEXT_ROOT = ${JSON.stringify(config.root)};
2169
- const port = String(process.env.PORT || '3000');
2170
- const hostname = process.env.HOSTNAME || '0.0.0.0';
2155
+ function standaloneServerSource() {
2156
+ return `// pnext standalone launcher, generated by pnext build (src/compat/export/standalone.ts).
2157
+ import { spawn } from 'node:child_process';
2171
2158
 
2172
- const child = spawn(
2173
- 'bun',
2174
- ['--conditions=react-server', PNEXT_CLI, 'start', '--port', port, '--hostname', hostname],
2175
- {
2176
- cwd: PNEXT_ROOT,
2177
- env: {
2178
- ...process.env,
2179
- // Suppresses \`pnext start\`'s "output: standalone" warning (Next gates the
2180
- // same warning on this private env being set by its standalone server).
2181
- __NEXT_PRIVATE_STANDALONE_CONFIG: '1',
2182
- PNEXT_COMPAT: 'next',
2183
- BROWSER: 'none',
2184
- NODE_ENV: 'production',
2185
- PORT: port,
2186
- HOSTNAME: hostname,
2187
- },
2188
- stdio: ['ignore', 'inherit', 'inherit'],
2189
- }
2190
- );
2159
+ const port = Number(process.env.PORT || '3000');
2160
+ const hostname = process.env.HOSTNAME || '0.0.0.0';
2161
+ const entry = new URL('./server/entry.js', import.meta.url).href;
2162
+ const boot = \`const { start } = await import(\${JSON.stringify(entry)}); await start(\${JSON.stringify({ port, hostname })});\`;
2163
+
2164
+ const child = spawn('bun', ['--conditions=react-server', '-e', boot], {
2165
+ env: {
2166
+ ...process.env,
2167
+ // Suppresses \`pnext start\`'s "output: standalone" warning (Next gates the
2168
+ // same warning on this private env being set by its standalone server).
2169
+ __NEXT_PRIVATE_STANDALONE_CONFIG: '1',
2170
+ BROWSER: 'none',
2171
+ NODE_ENV: 'production',
2172
+ },
2173
+ stdio: ['ignore', 'inherit', 'inherit'],
2174
+ });
2191
2175
 
2192
2176
  child.on('error', (error) => {
2193
2177
  console.error('pnext standalone: failed to start the pnext server:', error);
@@ -2279,7 +2263,7 @@ var COMMON_SEGMENTS = ["_full", "_head", "_index", "_tree"];
2279
2263
  var RUNTIME_ASSET_DIR = "_next/static/chunks";
2280
2264
  var EXPORT_MODE_SCRIPT = "<script>window.__PNEXT_OUTPUT_EXPORT__=true;</script>";
2281
2265
  async function emitStaticExport({ config, manifest, log }) {
2282
- await log.step("build manifest", () => writeBuildManifests(path7.join(config.outPath, "public")));
2266
+ await log.step("build manifest", () => writeBuildManifests(path7.join(config.outPath, "static")));
2283
2267
  const output = getNextConfig().output;
2284
2268
  if (output === "standalone") {
2285
2269
  await emitStandalone({ config, manifest, log });
@@ -2291,7 +2275,7 @@ async function emitStaticExport({ config, manifest, log }) {
2291
2275
  }
2292
2276
  async function writeExportTree(config, manifest) {
2293
2277
  const outDir = exportOutDir(config);
2294
- await rm2(outDir, { recursive: true, force: true });
2278
+ await rm(outDir, { recursive: true, force: true });
2295
2279
  await mkdir7(outDir, { recursive: true });
2296
2280
  const assets = await copyRuntimeAssets(config, outDir);
2297
2281
  await copyPublicTree(config, outDir, assets);
@@ -2302,7 +2286,7 @@ async function writeExportTree(config, manifest) {
2302
2286
  await writeNotFoundArtifacts(config, outDir);
2303
2287
  }
2304
2288
  async function copyRuntimeAssets(config, outDir) {
2305
- const assetsDir = path7.join(config.outPath, "public", "assets");
2289
+ const assetsDir = path7.join(config.outPath, "static", "assets");
2306
2290
  const assets = new Set;
2307
2291
  for (const file of await listFiles(assetsDir)) {
2308
2292
  const relative = toPosixPath(path7.relative(assetsDir, file));
@@ -2314,7 +2298,7 @@ async function copyRuntimeAssets(config, outDir) {
2314
2298
  return assets;
2315
2299
  }
2316
2300
  async function copyPublicTree(config, outDir, assets) {
2317
- const publicDir = path7.join(config.outPath, "public");
2301
+ const publicDir = path7.join(config.outPath, "static");
2318
2302
  for (const file of await listFiles(publicDir)) {
2319
2303
  const relative = toPosixPath(path7.relative(publicDir, file));
2320
2304
  if (relative.startsWith("assets/"))
@@ -2359,7 +2343,7 @@ function exportPages(config, manifest) {
2359
2343
  const route = metadata.routeId ? routeById.get(metadata.routeId) : undefined;
2360
2344
  if (route?.kind !== "page")
2361
2345
  continue;
2362
- const htmlFile = path7.join(config.outPath, "public", ...relative.split("/"));
2346
+ const htmlFile = path7.join(config.outPath, "static", ...relative.split("/"));
2363
2347
  pages.push({
2364
2348
  route,
2365
2349
  htmlFile,
@@ -3,8 +3,8 @@ import {
3
3
  compileMdx,
4
4
  mdxOptionsFromConfig,
5
5
  resolveMdxComponents
6
- } from "./index-qm6kmhqs.js";
7
- import"./index-6e4fqv30.js";
6
+ } from "./index-y7mzvq2q.js";
7
+ import"./index-m63czgq5.js";
8
8
  import"./index-cjgqs13g.js";
9
9
  import"./index-jks0x0a1.js";
10
10
  import"./index-6b009mt0.js";
@@ -1,21 +1,23 @@
1
1
  // @bun
2
2
  import {
3
3
  registerConfigSource
4
- } from "./index-ncnes8c6.js";
5
- import"./index-6e4fqv30.js";
4
+ } from "./index-11xpbfej.js";
5
+ import"./index-m63czgq5.js";
6
6
  import"./index-cjgqs13g.js";
7
7
  import"./index-jks0x0a1.js";
8
8
  import"./index-6b009mt0.js";
9
9
  import"./index-4zzebszd.js";
10
10
  import"./index-sq3kvz3g.js";
11
11
  import"./index-ckkdpht5.js";
12
- import"./index-x93hv0sc.js";
13
- import"./index-tqn2qnnn.js";
12
+ import"./index-71885zaq.js";
13
+ import"./index-bzd2ef7t.js";
14
+ import"./index-hdbwtdv2.js";
14
15
  import"./index-grta8ap3.js";
15
16
  import"./index-kresp2n8.js";
16
17
  import"./index-e3a6yx84.js";
17
18
  import"./index-7wc9n8be.js";
18
19
  import"./index-pym1cezq.js";
20
+ import"./index-jt8e1pje.js";
19
21
  import"./index-rt9qq1va.js";
20
22
  export {
21
23
  registerConfigSource
@@ -3,25 +3,34 @@ import {
3
3
  DEFAULT_OUT_DIR,
4
4
  devOutSegment,
5
5
  frameworkRuntimeAliasEntries,
6
+ frameworkRuntimeSpecifiers,
6
7
  loadConfig,
7
8
  pathToFileHref,
8
9
  pnextAliases,
9
10
  publicEnvDefines,
10
11
  registerConfigSource
11
- } from "./index-x93hv0sc.js";
12
- import"./index-tqn2qnnn.js";
12
+ } from "./index-71885zaq.js";
13
+ import {
14
+ outCachePath,
15
+ standaloneOutSegment
16
+ } from "./index-bzd2ef7t.js";
17
+ import"./index-hdbwtdv2.js";
13
18
  import"./index-grta8ap3.js";
14
19
  import"./index-kresp2n8.js";
15
20
  import"./index-e3a6yx84.js";
16
21
  import"./index-pym1cezq.js";
22
+ import"./index-jt8e1pje.js";
17
23
  import"./index-rt9qq1va.js";
18
24
  export {
19
25
  DEFAULT_OUT_DIR,
20
26
  devOutSegment,
21
27
  frameworkRuntimeAliasEntries,
28
+ frameworkRuntimeSpecifiers,
22
29
  loadConfig,
30
+ outCachePath,
23
31
  pathToFileHref,
24
32
  pnextAliases,
25
33
  publicEnvDefines,
26
- registerConfigSource
34
+ registerConfigSource,
35
+ standaloneOutSegment
27
36
  };
@@ -3,18 +3,19 @@ import { join as __pnextJoin } from "node:path";
3
3
  const __PNEXT_PACKAGE_ROOT__ = __pnextJoin(import.meta.dirname, "../../..");
4
4
  import {
5
5
  latestPnextVersionRange
6
- } from "./index-jx7bqvw1.js";
6
+ } from "./index-evhd413j.js";
7
7
  import {
8
8
  formatDuration
9
9
  } from "./index-73z4esab.js";
10
- import"./index-20ppawv7.js";
11
- import"./index-tqn2qnnn.js";
10
+ import"./index-4da76t62.js";
11
+ import"./index-hdbwtdv2.js";
12
12
  import {
13
13
  bold,
14
14
  cyan,
15
15
  dim,
16
16
  green
17
17
  } from "./index-6kp9r0d9.js";
18
+ import"./index-jt8e1pje.js";
18
19
  import"./index-rt9qq1va.js";
19
20
 
20
21
  // src/cli/create.ts
@@ -35,8 +35,8 @@ function nameDevProcess() {
35
35
  async function dev(options = {}) {
36
36
  nameDevProcess();
37
37
  const [{ loadConfig }, { startDevServer }] = await Promise.all([
38
- import("./config-1yzwexq6.js"),
39
- import("./server-mt4a994c.js")
38
+ import("./config-27rj7830.js"),
39
+ import("./server-2p8fgqq2.js")
40
40
  ]);
41
41
  markBoot("dev:imports");
42
42
  const config = await loadConfig(options.root, { dev: true });
@@ -1,20 +1,21 @@
1
1
  // @bun
2
2
  import {
3
3
  generateTypedRoutes
4
- } from "./index-4hgjrqh7.js";
4
+ } from "./index-9hz3s0m8.js";
5
5
  import"./index-v1ags1na.js";
6
- import"./index-6e4fqv30.js";
6
+ import"./index-m63czgq5.js";
7
7
  import"./index-cjgqs13g.js";
8
8
  import"./index-jks0x0a1.js";
9
9
  import"./index-6b009mt0.js";
10
10
  import"./index-4zzebszd.js";
11
11
  import"./index-sq3kvz3g.js";
12
12
  import"./index-ckkdpht5.js";
13
- import"./index-20ppawv7.js";
14
- import"./index-tqn2qnnn.js";
13
+ import"./index-4da76t62.js";
14
+ import"./index-hdbwtdv2.js";
15
15
  import"./index-kresp2n8.js";
16
16
  import"./index-e3a6yx84.js";
17
17
  import"./index-7wc9n8be.js";
18
+ import"./index-jt8e1pje.js";
18
19
  import"./index-rt9qq1va.js";
19
20
  export {
20
21
  generateTypedRoutes
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  dynamicCallFacts,
7
7
  rewriteFacts
8
- } from "./index-z4z9zv3b.js";
8
+ } from "./index-x9c55pzy.js";
9
9
 
10
10
  // src/resolve/dynamic.ts
11
11
  function sourceHasDynamicImport(source) {
@@ -178,6 +178,7 @@ function deferredDynamicImportSpecifiers(source, file) {
178
178
  optionConsts.set(constMatch[1], constMatch[2]);
179
179
  }
180
180
  const facts = dynamicCallFacts(source, file);
181
+ const rendered = new Set;
181
182
  for (const call of dynamicCallsFromSource(source, dynamicNames)) {
182
183
  const target = loaderImportTargetForCall(call, facts);
183
184
  if (!target)
@@ -194,7 +195,11 @@ ${named}`;
194
195
  const visible = /\bload\s*:\s*['"]visible['"]/.test(options) && !/\bssr\s*:\s*true\b/.test(options);
195
196
  if (ssrFalse || visible)
196
197
  deferred.add(target.specifier);
198
+ else
199
+ rendered.add(target.specifier);
197
200
  }
201
+ for (const specifier of rendered)
202
+ deferred.delete(specifier);
198
203
  return deferred;
199
204
  }
200
205
  function topLevelArgCount(args) {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  productionRelease,
4
4
  releaseModuleHref
5
- } from "./index-tqn2qnnn.js";
5
+ } from "./index-hdbwtdv2.js";
6
6
  import {
7
7
  __require
8
8
  } from "./index-rt9qq1va.js";
@@ -11,7 +11,7 @@ import {
11
11
  import { setBasePathPrefix, setDefaultPrefetchMode, setTrailingSlashUrls } from "../../../src/routing/href.ts";
12
12
  var modules;
13
13
  var loader;
14
- var compiler = () => modules ??= import("./modules-jn8bmbn8.js");
14
+ var compiler = () => modules ??= import("./modules-t92favpj.js");
15
15
  function serverBundleTargetForRuntime(runtime) {
16
16
  return runtime === "edge" || runtime === "experimental-edge" ? "edge" : "server";
17
17
  }
@@ -26,7 +26,7 @@ function applyServerHrefConfig(config) {
26
26
  async function registerServerRuntime(config, sourceFiles = []) {
27
27
  if (productionRelease(config))
28
28
  return applyServerHrefConfig(config);
29
- (await (loader ??= import("./loader-7yw0j98z.js"))).registerServerRuntime(config, sourceFiles);
29
+ (await (loader ??= import("./loader-5en7wpt5.js"))).registerServerRuntime(config, sourceFiles);
30
30
  }
31
31
  async function devServerModuleHref(config, file, version, options = {}) {
32
32
  const served = productionRelease(config);
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  loadNextConfig
4
- } from "./index-6e4fqv30.js";
4
+ } from "./index-m63czgq5.js";
5
5
  import {
6
6
  registerConfigSource
7
- } from "./index-x93hv0sc.js";
7
+ } from "./index-71885zaq.js";
8
8
 
9
9
  // src/compat/register/config.ts
10
10
  function registerConfigSource2() {
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  getNextConfig
4
- } from "./index-6e4fqv30.js";
4
+ } from "./index-m63czgq5.js";
5
5
 
6
6
  // src/compat/next/image/config.ts
7
7
  var DEFAULTS = {
@@ -5,20 +5,20 @@ import {
5
5
  devDynamicSplitEnabled,
6
6
  rewriteDeferredDynamicImports,
7
7
  rewriteLiteralDynamicCalls
8
- } from "./index-91x12ykq.js";
8
+ } from "./index-0r5eqfc7.js";
9
9
  import {
10
10
  ISLAND_BOUNDARY_ERROR_DIGEST_ATTRIBUTE,
11
11
  ISLAND_BOUNDARY_ERROR_ELEMENT,
12
12
  ISLAND_BOUNDARY_ERROR_MESSAGE_ATTRIBUTE,
13
13
  ISLAND_STATIC_CHILDREN_ATTRIBUTE,
14
14
  clientEntryName
15
- } from "./index-3tf1xjsp.js";
15
+ } from "./index-x2m17v9c.js";
16
16
  import {
17
17
  findLayouts
18
- } from "./index-jepjvcrf.js";
18
+ } from "./index-8ct7rqy3.js";
19
19
  import {
20
20
  cssModuleClientPlugin
21
- } from "./index-2dv4y4wd.js";
21
+ } from "./index-n629dy38.js";
22
22
  import {
23
23
  createVerboseLogger,
24
24
  formatDuration
@@ -26,10 +26,10 @@ import {
26
26
  import {
27
27
  assetContentHash,
28
28
  withAssetPrefix
29
- } from "./index-y2jr2n72.js";
29
+ } from "./index-d158y67j.js";
30
30
  import {
31
31
  frameworkFingerprint
32
- } from "./index-c0g2wf3z.js";
32
+ } from "./index-gcmj16xy.js";
33
33
  import {
34
34
  readSourceSync,
35
35
  readSourceText
@@ -39,14 +39,14 @@ import {
39
39
  listFiles,
40
40
  readText,
41
41
  writeText
42
- } from "./index-20ppawv7.js";
42
+ } from "./index-4da76t62.js";
43
43
  import {
44
44
  traceEnabled
45
45
  } from "./index-vz0km5qk.js";
46
46
  import {
47
47
  frameworkRuntimeAliasEntries,
48
48
  publicEnvDefines
49
- } from "./index-x93hv0sc.js";
49
+ } from "./index-71885zaq.js";
50
50
  import {
51
51
  dim
52
52
  } from "./index-6kp9r0d9.js";
@@ -56,12 +56,12 @@ import {
56
56
  } from "./index-ras0sdab.js";
57
57
  import {
58
58
  scanFacts
59
- } from "./index-z4z9zv3b.js";
59
+ } from "./index-x9c55pzy.js";
60
60
  import {
61
61
  getExternalPackagePolicy,
62
62
  resolveImport,
63
63
  resolveLinkedPackageSpecifier
64
- } from "./index-yz54pxrh.js";
64
+ } from "./index-d1jsmhhk.js";
65
65
  import {
66
66
  applyClientSourceAsyncPreTransforms,
67
67
  applyClientSourceTransforms,
@@ -3482,7 +3482,7 @@ async function staticImageModuleSource(config, file) {
3482
3482
  const compat = await getAssetExtensions().staticAssetModule({ sourcePath, bytes, emit });
3483
3483
  const source = compat ?? coreStaticAssetModule(sourcePath, bytes, emit);
3484
3484
  for (const relative of emitted) {
3485
- const target = path5.join(config.outPath, "public", ...relative.split("/"));
3485
+ const target = path5.join(config.outPath, "static", ...relative.split("/"));
3486
3486
  await mkdir(path5.dirname(target), { recursive: true });
3487
3487
  if (!existsSync3(target))
3488
3488
  await copyFile(sourcePath, target);
@@ -8,10 +8,10 @@ import {
8
8
  pathnameSegments,
9
9
  slotConventionFile,
10
10
  slotDirectoriesIn
11
- } from "./index-p77b4kcx.js";
11
+ } from "./index-cn86z041.js";
12
12
  import {
13
13
  toPosixPath
14
- } from "./index-20ppawv7.js";
14
+ } from "./index-4da76t62.js";
15
15
  import {
16
16
  getRenderExtensions
17
17
  } from "./index-zqpqyg8p.js";
@@ -1,20 +1,20 @@
1
1
  // @bun
2
2
  import {
3
3
  scanRoutes
4
- } from "./index-8k7pfejn.js";
4
+ } from "./index-jn9rbhrx.js";
5
5
  import {
6
6
  ensureDir,
7
7
  includeTypes,
8
8
  toPosixPath,
9
9
  writeFileAtomic
10
- } from "./index-20ppawv7.js";
10
+ } from "./index-4da76t62.js";
11
11
  import {
12
12
  bootstrapCompatBoot,
13
13
  generateCompatRouteTypes
14
- } from "./index-5gyr4emz.js";
14
+ } from "./index-tq3b39a5.js";
15
15
  import {
16
16
  loadConfig
17
- } from "./index-x93hv0sc.js";
17
+ } from "./index-71885zaq.js";
18
18
 
19
19
  // src/cli/typegen.ts
20
20
  import { existsSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  findProxyFile
4
- } from "./index-kq8kpzye.js";
4
+ } from "./index-3ycf5ckv.js";
5
5
  import {
6
6
  loadNative
7
7
  } from "./index-7wc9n8be.js";