vike 0.4.217-commit-99ea561 → 0.4.218-commit-01a099d

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 (157) hide show
  1. package/dist/cjs/__internal/index.js +9 -8
  2. package/dist/cjs/node/api/build.js +20 -11
  3. package/dist/cjs/node/api/index.js +17 -7
  4. package/dist/cjs/node/api/prepareViteApiCall.js +109 -26
  5. package/dist/cjs/node/api/utils.js +2 -0
  6. package/dist/cjs/node/cli/entry.js +17 -7
  7. package/dist/cjs/node/plugin/index.js +6 -5
  8. package/dist/cjs/node/plugin/plugins/autoFullBuild.js +2 -3
  9. package/dist/cjs/node/plugin/plugins/baseUrls.js +20 -18
  10. package/dist/cjs/node/plugin/plugins/buildConfig.js +2 -2
  11. package/dist/cjs/node/plugin/plugins/{importBuild → buildEntry}/index.js +16 -17
  12. package/dist/cjs/node/plugin/plugins/commonConfig.js +6 -6
  13. package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.js +1 -3
  14. package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/crawlPlusFiles.js +7 -9
  15. package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +182 -7
  16. package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVirtualFilePageConfigs.js +2 -1
  17. package/dist/cjs/node/plugin/plugins/setGlobalContext.js +1 -1
  18. package/dist/cjs/node/plugin/plugins/{vite6HmrRegressionWorkaround.js → workaroundVite6HmrRegression.js} +3 -3
  19. package/dist/cjs/node/plugin/shared/getHttpRequestAsyncStore.js +17 -7
  20. package/dist/cjs/node/prerender/isPrerenderEnabled.js +8 -0
  21. package/dist/cjs/node/prerender/runPrerender.js +21 -12
  22. package/dist/cjs/node/runtime/globalContext.js +44 -21
  23. package/dist/cjs/node/runtime/html/injectAssets/getHtmlTags.js +2 -2
  24. package/dist/cjs/node/runtime/index-common.js +0 -15
  25. package/dist/cjs/node/runtime/onLoad.js +17 -3
  26. package/dist/cjs/node/runtime/renderPage/analyzePage.js +2 -2
  27. package/dist/cjs/node/runtime/renderPage/createHttpResponse/getCacheControl.js +2 -2
  28. package/dist/cjs/node/runtime/renderPage/loadUserFilesServerSide.js +1 -1
  29. package/dist/cjs/node/runtime/renderPage/renderPageAlreadyRouted.js +3 -3
  30. package/dist/cjs/node/runtime-dev/index.js +17 -7
  31. package/dist/cjs/node/shared/resolveBase.js +2 -2
  32. package/dist/cjs/shared/getPageFiles/analyzeClientSide.js +3 -3
  33. package/dist/cjs/shared/getPageFiles/{setPageFiles.js → getPageFiles.js} +2 -3
  34. package/dist/cjs/shared/getPageFiles.js +3 -9
  35. package/dist/cjs/shared/hooks/getHook.js +3 -3
  36. package/dist/cjs/shared/{getPageFiles/getExports.js → page-configs/getPageConfigUserFriendly.js} +113 -81
  37. package/dist/cjs/shared/page-configs/serialize/serializeConfigValues.js +79 -54
  38. package/dist/cjs/shared/route/loadPageRoutes.js +3 -3
  39. package/dist/cjs/shared/utils.js +1 -0
  40. package/dist/cjs/utils/PROJECT_VERSION.js +1 -1
  41. package/dist/cjs/utils/assert.js +4 -3
  42. package/dist/esm/__internal/index.d.ts +3 -5
  43. package/dist/esm/__internal/index.js +4 -5
  44. package/dist/esm/client/client-routing-runtime/createPageContext.js +7 -1
  45. package/dist/esm/client/client-routing-runtime/entry.d.ts +1 -1
  46. package/dist/esm/client/client-routing-runtime/entry.js +0 -1
  47. package/dist/esm/client/client-routing-runtime/getPageContextCurrent.d.ts +2 -2
  48. package/dist/esm/client/client-routing-runtime/getPageContextFromHooks.d.ts +4 -4
  49. package/dist/esm/client/client-routing-runtime/getPageContextFromHooks.js +1 -1
  50. package/dist/esm/client/client-routing-runtime/prefetch/getPrefetchSettings.d.ts +2 -2
  51. package/dist/esm/client/client-routing-runtime/prefetch.d.ts +2 -2
  52. package/dist/esm/client/client-routing-runtime/prefetch.js +2 -2
  53. package/dist/esm/client/server-routing-runtime/entry.d.ts +1 -1
  54. package/dist/esm/client/server-routing-runtime/entry.js +0 -1
  55. package/dist/esm/client/server-routing-runtime/getPageContext.d.ts +1 -1
  56. package/dist/esm/client/server-routing-runtime/getPageContext.js +8 -2
  57. package/dist/esm/client/shared/executeOnRenderClientHook.d.ts +2 -2
  58. package/dist/esm/client/shared/loadUserFilesClientSide.d.ts +2 -2
  59. package/dist/esm/client/shared/loadUserFilesClientSide.js +2 -2
  60. package/dist/esm/client/shared/preparePageContextForUserConsumptionClientSide.d.ts +2 -2
  61. package/dist/esm/node/api/build.js +3 -4
  62. package/dist/esm/node/api/prepareViteApiCall.d.ts +9 -3
  63. package/dist/esm/node/api/prepareViteApiCall.js +91 -21
  64. package/dist/esm/node/api/utils.d.ts +2 -0
  65. package/dist/esm/node/api/utils.js +2 -0
  66. package/dist/esm/node/cli/parseCli.d.ts +1 -1
  67. package/dist/esm/node/plugin/index.d.ts +1 -1
  68. package/dist/esm/node/plugin/index.js +6 -5
  69. package/dist/esm/node/plugin/plugins/autoFullBuild.js +2 -3
  70. package/dist/esm/node/plugin/plugins/baseUrls.d.ts +1 -2
  71. package/dist/esm/node/plugin/plugins/baseUrls.js +21 -19
  72. package/dist/esm/node/plugin/plugins/buildConfig.js +2 -2
  73. package/dist/esm/node/plugin/plugins/{importBuild → buildEntry}/getVikeManifest.d.ts +1 -1
  74. package/dist/esm/node/plugin/plugins/{importBuild → buildEntry}/index.d.ts +2 -2
  75. package/dist/esm/node/plugin/plugins/{importBuild → buildEntry}/index.js +16 -17
  76. package/dist/esm/node/plugin/plugins/commonConfig.d.ts +1 -1
  77. package/dist/esm/node/plugin/plugins/commonConfig.js +2 -2
  78. package/dist/esm/node/plugin/plugins/importUserCode/getVirtualFileImportUserCode.d.ts +1 -1
  79. package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.js +1 -3
  80. package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/crawlPlusFiles.js +8 -10
  81. package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.d.ts +99 -1
  82. package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +182 -7
  83. package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVirtualFilePageConfigs.js +2 -1
  84. package/dist/esm/node/plugin/plugins/setGlobalContext.js +1 -1
  85. package/dist/esm/node/plugin/plugins/workaroundVite6HmrRegression.d.ts +3 -0
  86. package/dist/esm/node/plugin/plugins/{vite6HmrRegressionWorkaround.js → workaroundVite6HmrRegression.js} +3 -3
  87. package/dist/esm/node/prerender/isPrerenderEnabled.d.ts +3 -0
  88. package/dist/esm/node/prerender/isPrerenderEnabled.js +6 -0
  89. package/dist/esm/node/prerender/runPrerender.d.ts +1 -2
  90. package/dist/esm/node/prerender/runPrerender.js +3 -4
  91. package/dist/esm/node/runtime/globalContext.d.ts +4 -4
  92. package/dist/esm/node/runtime/globalContext.js +44 -21
  93. package/dist/esm/node/runtime/html/injectAssets/getHtmlTags.js +1 -1
  94. package/dist/esm/node/runtime/index-common.d.ts +0 -1
  95. package/dist/esm/node/runtime/index-common.js +0 -15
  96. package/dist/esm/node/runtime/index-deprecated.d.ts +1 -0
  97. package/dist/esm/node/runtime/onLoad.js +16 -2
  98. package/dist/esm/node/runtime/renderPage/analyzePage.js +1 -1
  99. package/dist/esm/node/runtime/renderPage/createHttpResponse/getCacheControl.js +1 -1
  100. package/dist/esm/node/runtime/renderPage/executeOnBeforeRenderAndDataHooks.d.ts +2 -2
  101. package/dist/esm/node/runtime/renderPage/loadUserFilesServerSide.d.ts +1 -1
  102. package/dist/esm/node/runtime/renderPage/loadUserFilesServerSide.js +2 -2
  103. package/dist/esm/node/runtime/renderPage/preparePageContextForUserConsumptionServerSide.d.ts +2 -2
  104. package/dist/esm/node/runtime/renderPage/renderPageAlreadyRouted.d.ts +5 -5
  105. package/dist/esm/node/runtime/renderPage/renderPageAlreadyRouted.js +3 -3
  106. package/dist/esm/node/shared/resolveBase.js +2 -2
  107. package/dist/esm/shared/getPageFiles/analyzeClientSide.js +1 -1
  108. package/dist/esm/shared/getPageFiles/{setPageFiles.js → getPageFiles.js} +2 -3
  109. package/dist/esm/shared/getPageFiles.d.ts +2 -5
  110. package/dist/esm/shared/getPageFiles.js +1 -4
  111. package/dist/esm/shared/hooks/getHook.d.ts +3 -3
  112. package/dist/esm/shared/hooks/getHook.js +1 -1
  113. package/dist/esm/shared/page-configs/Config.d.ts +1 -1
  114. package/dist/esm/shared/page-configs/PageConfig.d.ts +7 -3
  115. package/dist/esm/shared/{getPageFiles/getExports.d.ts → page-configs/getPageConfigUserFriendly.d.ts} +23 -12
  116. package/dist/esm/shared/{getPageFiles/getExports.js → page-configs/getPageConfigUserFriendly.js} +112 -80
  117. package/dist/esm/shared/page-configs/serialize/serializeConfigValues.d.ts +28 -4
  118. package/dist/esm/shared/page-configs/serialize/serializeConfigValues.js +79 -54
  119. package/dist/esm/shared/route/executeGuardHook.d.ts +2 -2
  120. package/dist/esm/shared/route/loadPageRoutes.js +1 -1
  121. package/dist/esm/shared/types.d.ts +1 -1
  122. package/dist/esm/shared/utils.d.ts +1 -0
  123. package/dist/esm/shared/utils.js +1 -0
  124. package/dist/esm/types/index.d.ts +1 -1
  125. package/dist/esm/utils/PROJECT_VERSION.d.ts +1 -1
  126. package/dist/esm/utils/PROJECT_VERSION.js +1 -1
  127. package/dist/esm/utils/assert.js +4 -3
  128. package/dist/esm/utils/projectInfo.d.ts +1 -1
  129. package/package.json +2 -21
  130. package/__internal/loadImportBuild.js +0 -3
  131. package/__internal/setup.js +0 -3
  132. package/dist/cjs/node/plugin/plugins/commonConfig/pluginName.js +0 -4
  133. package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/resolveVikeConfigGlobal.js +0 -128
  134. package/dist/cjs/node/runtime/globalContext/loadImportBuild.js +0 -25
  135. package/dist/cjs/node/runtime/page-files/getPageFilesExports.js +0 -22
  136. package/dist/cjs/node/runtime/page-files/setup.js +0 -5
  137. package/dist/esm/client/client-routing-runtime/pageFiles.d.ts +0 -1
  138. package/dist/esm/client/client-routing-runtime/pageFiles.js +0 -4
  139. package/dist/esm/client/server-routing-runtime/pageFiles.d.ts +0 -1
  140. package/dist/esm/client/server-routing-runtime/pageFiles.js +0 -4
  141. package/dist/esm/node/plugin/plugins/commonConfig/pluginName.d.ts +0 -1
  142. package/dist/esm/node/plugin/plugins/commonConfig/pluginName.js +0 -1
  143. package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/resolveVikeConfigGlobal.d.ts +0 -104
  144. package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/resolveVikeConfigGlobal.js +0 -123
  145. package/dist/esm/node/plugin/plugins/vite6HmrRegressionWorkaround.d.ts +0 -3
  146. package/dist/esm/node/runtime/globalContext/loadImportBuild.d.ts +0 -18
  147. package/dist/esm/node/runtime/globalContext/loadImportBuild.js +0 -23
  148. package/dist/esm/node/runtime/page-files/getPageFilesExports.d.ts +0 -2
  149. package/dist/esm/node/runtime/page-files/getPageFilesExports.js +0 -20
  150. package/dist/esm/node/runtime/page-files/setup.d.ts +0 -1
  151. package/dist/esm/node/runtime/page-files/setup.js +0 -3
  152. package/dist/cjs/node/plugin/plugins/{importBuild → buildEntry}/getVikeManifest.js +0 -0
  153. package/dist/cjs/shared/page-configs/{getConfigValue.js → getConfigValueRuntime.js} +0 -0
  154. package/dist/esm/node/plugin/plugins/{importBuild → buildEntry}/getVikeManifest.js +0 -0
  155. package/dist/esm/shared/getPageFiles/{setPageFiles.d.ts → getPageFiles.d.ts} +1 -1
  156. /package/dist/esm/shared/page-configs/{getConfigValue.d.ts → getConfigValueRuntime.d.ts} +0 -0
  157. /package/dist/esm/shared/page-configs/{getConfigValue.js → getConfigValueRuntime.js} +0 -0
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getCacheControl = getCacheControl;
4
4
  const helpers_js_1 = require("../../../../shared/page-configs/helpers.js");
5
- const getConfigValue_js_1 = require("../../../../shared/page-configs/getConfigValue.js");
5
+ const getConfigValueRuntime_js_1 = require("../../../../shared/page-configs/getConfigValueRuntime.js");
6
6
  const defaultValue = 'no-store, max-age=0';
7
7
  function getCacheControl(pageId, pageConfigs, statusCode) {
8
8
  // TODO/v1-release: remove
@@ -11,7 +11,7 @@ function getCacheControl(pageId, pageConfigs, statusCode) {
11
11
  if (statusCode > 499)
12
12
  return defaultValue;
13
13
  const pageConfig = (0, helpers_js_1.getPageConfig)(pageId, pageConfigs);
14
- const configValue = (0, getConfigValue_js_1.getConfigValueRuntime)(pageConfig, 'cacheControl', 'string');
14
+ const configValue = (0, getConfigValueRuntime_js_1.getConfigValueRuntime)(pageConfig, 'cacheControl', 'string');
15
15
  const value = configValue?.value;
16
16
  if (value)
17
17
  return value;
@@ -101,7 +101,7 @@ async function loadPageUserFiles(pageFilesAll, pageConfig, pageId, isDev) {
101
101
  const pageFilesServerSide = (0, getPageFiles_js_1.getPageFilesServerSide)(pageFilesAll, pageId);
102
102
  const pageConfigLoaded = !pageConfig ? null : await (0, loadConfigValues_js_1.loadConfigValues)(pageConfig, isDev);
103
103
  await Promise.all(pageFilesServerSide.map((p) => p.loadFile?.()));
104
- const pageContextExports = (0, getPageFiles_js_1.getPageContextExports)(pageFilesServerSide, pageConfigLoaded);
104
+ const pageContextExports = (0, getPageFiles_js_1.getPageConfigUserFriendly)(pageFilesServerSide, pageConfigLoaded);
105
105
  return {
106
106
  pageContextExports,
107
107
  pageFilesLoaded: pageFilesServerSide
@@ -10,7 +10,7 @@ exports.getPageContextInitEnhanced = getPageContextInitEnhanced;
10
10
  exports.getRenderContext = getRenderContext;
11
11
  const error_page_js_1 = require("../../../shared/error-page.js");
12
12
  const renderHtml_js_1 = require("../html/renderHtml.js");
13
- const getPageFiles_js_1 = require("../../../shared/getPageFiles.js");
13
+ const getPageFiles_js_1 = require("../../../shared/getPageFiles/getPageFiles.js");
14
14
  const utils_js_1 = require("../utils.js");
15
15
  const serializePageContextClientSide_js_1 = require("../html/serializePageContextClientSide.js");
16
16
  const getPageContextUrlComputed_js_1 = require("../../../shared/getPageContextUrlComputed.js");
@@ -174,10 +174,10 @@ async function getRenderContext() {
174
174
  // pageConfigs is PageConfigRuntime[] but assertV1Design() requires PageConfigBuildTime[]
175
175
  pageConfigs.length > 0, pageFilesAll);
176
176
  const renderContext = {
177
- pageFilesAll: pageFilesAll,
177
+ pageFilesAll,
178
178
  pageConfigs,
179
179
  pageConfigGlobal,
180
- allPageIds: allPageIds,
180
+ allPageIds,
181
181
  pageRoutes,
182
182
  onBeforeRouteHook
183
183
  };
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.createDevMiddleware = void 0;
27
37
  const createDevMiddleware_ = async (...args) => {
@@ -9,12 +9,12 @@ const utils_js_1 = require("./utils.js");
9
9
  const picocolors_1 = __importDefault(require("@brillout/picocolors"));
10
10
  function resolveBaseFromResolvedConfig(baseServer, baseAssets, config) {
11
11
  let baseViteOriginal = config._baseViteOriginal;
12
- if (baseViteOriginal === '/__UNSET__')
13
- baseViteOriginal = null;
14
12
  (0, utils_js_1.assert)(baseViteOriginal === null || typeof baseViteOriginal == 'string');
15
13
  return resolveBase(baseViteOriginal, baseServer, baseAssets);
16
14
  }
17
15
  function resolveBase(baseViteOriginal, baseServerUnresolved, baseAssetsUnresolved) {
16
+ if (baseViteOriginal === '/__UNSET__')
17
+ baseViteOriginal = null;
18
18
  {
19
19
  const wrongBase = (val) => `should start with ${picocolors_1.default.cyan('/')}, ${picocolors_1.default.cyan('http://')}, or ${picocolors_1.default.cyan('https://')} (it's ${picocolors_1.default.cyan(val)} instead)`;
20
20
  (0, utils_js_1.assertUsage)(baseViteOriginal === null || (0, utils_js_1.isBaseAssets)(baseViteOriginal), `vite.config.js#base ${wrongBase(baseViteOriginal)}`);
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.analyzeClientSide = analyzeClientSide;
4
- const getConfigValue_js_1 = require("../page-configs/getConfigValue.js");
4
+ const getConfigValueRuntime_js_1 = require("../page-configs/getConfigValueRuntime.js");
5
5
  const analyzePageClientSide_js_1 = require("./analyzePageClientSide.js");
6
6
  function analyzeClientSide(pageConfig, pageFilesAll, pageId) {
7
7
  // V1 design
8
8
  if (pageConfig) {
9
- const isClientRouting = (0, getConfigValue_js_1.getConfigValueRuntime)(pageConfig, 'clientRouting', 'boolean')?.value ?? false;
10
- const isClientRuntimeLoaded = (0, getConfigValue_js_1.getConfigValueRuntime)(pageConfig, 'isClientRuntimeLoaded', 'boolean')?.value ?? false;
9
+ const isClientRouting = (0, getConfigValueRuntime_js_1.getConfigValueRuntime)(pageConfig, 'clientRouting', 'boolean')?.value ?? false;
10
+ const isClientRuntimeLoaded = (0, getConfigValueRuntime_js_1.getConfigValueRuntime)(pageConfig, 'isClientRuntimeLoaded', 'boolean')?.value ?? false;
11
11
  return { isClientRuntimeLoaded, isClientRouting };
12
12
  }
13
13
  else {
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getPageFilesAll = getPageFilesAll;
3
4
  exports.setPageFiles = setPageFiles;
4
5
  exports.setPageFilesAsync = setPageFilesAsync;
5
- exports.getPageFilesAll = getPageFilesAll;
6
6
  const utils_js_1 = require("../utils.js");
7
7
  const parseGlobResults_js_1 = require("./parseGlobResults.js");
8
8
  const getGlobalObject_js_1 = require("../../utils/getGlobalObject.js");
9
9
  const globalObject = (0, getGlobalObject_js_1.getGlobalObject)('setPageFiles.ts', {});
10
- // TODO:v1-design-release: rename setPageFiles() getPageFilesAll() parseGlobResult()
11
10
  function setPageFiles(pageFilesExports) {
12
11
  const { pageFiles, pageConfigs, pageConfigGlobal } = (0, parseGlobResults_js_1.parseGlobResults)(pageFilesExports);
13
12
  globalObject.pageFilesAll = pageFiles;
@@ -25,11 +24,11 @@ async function getPageFilesAll(isClientSide, isProduction) {
25
24
  (0, utils_js_1.assert)(isProduction === undefined);
26
25
  }
27
26
  else {
28
- (0, utils_js_1.assert)(globalObject.pageFilesGetter);
29
27
  (0, utils_js_1.assert)(typeof isProduction === 'boolean');
30
28
  if (!globalObject.pageFilesAll ||
31
29
  // We reload all glob imports in dev to make auto-reload work
32
30
  !isProduction) {
31
+ (0, utils_js_1.assert)(globalObject.pageFilesGetter);
33
32
  await globalObject.pageFilesGetter();
34
33
  }
35
34
  }
@@ -1,15 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getPageContextExports = exports.getPageFilesServerSide = exports.getPageFilesClientSide = exports.setPageFilesAsync = exports.setPageFiles = exports.getPageFilesAll = void 0;
4
- var setPageFiles_js_1 = require("./getPageFiles/setPageFiles.js");
5
- Object.defineProperty(exports, "getPageFilesAll", { enumerable: true, get: function () { return setPageFiles_js_1.getPageFilesAll; } });
6
- var setPageFiles_js_2 = require("./getPageFiles/setPageFiles.js");
7
- Object.defineProperty(exports, "setPageFiles", { enumerable: true, get: function () { return setPageFiles_js_2.setPageFiles; } });
8
- var setPageFiles_js_3 = require("./getPageFiles/setPageFiles.js");
9
- Object.defineProperty(exports, "setPageFilesAsync", { enumerable: true, get: function () { return setPageFiles_js_3.setPageFilesAsync; } });
3
+ exports.getPageConfigUserFriendly = exports.getPageFilesServerSide = exports.getPageFilesClientSide = void 0;
10
4
  var getAllPageIdFiles_js_1 = require("./getPageFiles/getAllPageIdFiles.js");
11
5
  Object.defineProperty(exports, "getPageFilesClientSide", { enumerable: true, get: function () { return getAllPageIdFiles_js_1.getPageFilesClientSide; } });
12
6
  var getAllPageIdFiles_js_2 = require("./getPageFiles/getAllPageIdFiles.js");
13
7
  Object.defineProperty(exports, "getPageFilesServerSide", { enumerable: true, get: function () { return getAllPageIdFiles_js_2.getPageFilesServerSide; } });
14
- var getExports_js_1 = require("./getPageFiles/getExports.js");
15
- Object.defineProperty(exports, "getPageContextExports", { enumerable: true, get: function () { return getExports_js_1.getPageContextExports; } });
8
+ var getPageConfigUserFriendly_js_1 = require("./page-configs/getPageConfigUserFriendly.js");
9
+ Object.defineProperty(exports, "getPageConfigUserFriendly", { enumerable: true, get: function () { return getPageConfigUserFriendly_js_1.getPageConfigUserFriendly; } });
@@ -11,7 +11,7 @@ exports.getHook_setIsPrerenderering = getHook_setIsPrerenderering;
11
11
  exports.getHookTimeoutDefault = getHookTimeoutDefault;
12
12
  const getGlobalObject_js_1 = require("../../utils/getGlobalObject.js");
13
13
  const helpers_js_1 = require("../page-configs/helpers.js");
14
- const getConfigValue_js_1 = require("../page-configs/getConfigValue.js");
14
+ const getConfigValueRuntime_js_1 = require("../page-configs/getConfigValueRuntime.js");
15
15
  const utils_js_1 = require("../utils.js");
16
16
  const picocolors_1 = __importDefault(require("@brillout/picocolors"));
17
17
  const globalObject = (0, getGlobalObject_js_1.getGlobalObject)('getHook.ts', {});
@@ -33,8 +33,8 @@ function getHook(pageContext, hookName) {
33
33
  return { hookFn, hookName, hookFilePath, hookTimeout };
34
34
  }
35
35
  function getHookFromPageConfig(pageConfig, hookName) {
36
- const configValue = (0, getConfigValue_js_1.getConfigValueRuntime)(pageConfig, hookName);
37
- const hooksTimeout = (0, getConfigValue_js_1.getConfigValueRuntime)(pageConfig, 'hooksTimeout')?.value;
36
+ const configValue = (0, getConfigValueRuntime_js_1.getConfigValueRuntime)(pageConfig, hookName);
37
+ const hooksTimeout = (0, getConfigValueRuntime_js_1.getConfigValueRuntime)(pageConfig, 'hooksTimeout')?.value;
38
38
  if (!configValue)
39
39
  return null;
40
40
  const hookFn = configValue.value;
@@ -3,17 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getPageContextExports = getPageContextExports;
7
- const isScriptFile_js_1 = require("../../utils/isScriptFile.js");
6
+ exports.getPageConfigUserFriendly = getPageConfigUserFriendly;
7
+ exports.getPageConfigUserFriendlyNew = getPageConfigUserFriendlyNew;
8
+ const assert_exports_old_design_js_1 = require("../getPageFiles/assert_exports_old_design.js");
9
+ const getConfigDefinedAt_js_1 = require("./getConfigDefinedAt.js");
10
+ const helpers_js_1 = require("./helpers.js");
8
11
  const utils_js_1 = require("../utils.js");
9
- const assert_exports_old_design_js_1 = require("./assert_exports_old_design.js");
10
- const getConfigDefinedAt_js_1 = require("../page-configs/getConfigDefinedAt.js");
11
- const helpers_js_1 = require("../page-configs/helpers.js");
12
12
  const picocolors_1 = __importDefault(require("@brillout/picocolors"));
13
- function getPageContextExports(pageFiles, pageConfig) {
14
- const configEntries = {};
13
+ function getPageConfigUserFriendly(pageFiles, pageConfig) {
15
14
  const config = {};
16
- const exportsAll = {};
15
+ const configEntries = {}; // TODO/v1-release: remove
16
+ const exportsAll = {}; // TODO/v1-release: remove
17
17
  // V0.4 design
18
18
  // TODO/v1-release: remove
19
19
  pageFiles.forEach((pageFile) => {
@@ -31,78 +31,26 @@ function getPageContextExports(pageFiles, pageConfig) {
31
31
  });
32
32
  });
33
33
  });
34
- // V1 design
35
- const source = {};
36
- const sources = {};
37
- const addSrc = (src, configName) => {
38
- source[configName] = src;
39
- sources[configName] ?? (sources[configName] = []);
40
- sources[configName].push(src);
41
- };
42
- const from = {
43
- configsStandard: {},
44
- configsCumulative: {},
45
- configsComputed: {}
46
- };
34
+ let source;
35
+ let sources;
36
+ let from;
47
37
  if (pageConfig) {
48
- Object.entries(pageConfig.configValues).forEach(([configName, configValue]) => {
49
- const { value } = configValue;
50
- const configValueFilePathToShowToUser = (0, helpers_js_1.getConfigValueFilePathToShowToUser)(configValue.definedAtData);
51
- const configDefinedAt = (0, getConfigDefinedAt_js_1.getConfigDefinedAtOptional)('Config', configName, configValue.definedAtData);
52
- config[configName] = config[configName] ?? value;
53
- configEntries[configName] = configEntries[configName] ?? [];
54
- // Currently each configName has only one entry. Adding an entry for each overriden config value isn't implemented yet. (This is an isomorphic file and it isn't clear whether this can/should be implemented on the client-side. We should load a minimum amount of code on the client-side.)
55
- (0, utils_js_1.assert)(configEntries[configName].length === 0);
56
- configEntries[configName].push({
57
- configValue: value,
58
- configDefinedAt,
59
- configDefinedByFile: configValueFilePathToShowToUser
60
- });
61
- if (configValue.type === 'standard') {
62
- const src = {
63
- type: 'configsStandard',
64
- value: configValue.value,
65
- definedAt: (0, getConfigDefinedAt_js_1.getDefinedAtString)(configValue.definedAtData, configName)
66
- };
67
- addSrc(src, configName);
68
- from.configsStandard[configName] = src;
69
- }
70
- if (configValue.type === 'cumulative') {
71
- const src = {
72
- type: 'configsCumulative',
73
- values: configValue.value.map((value, i) => {
74
- const definedAtFile = configValue.definedAtData[i];
75
- (0, utils_js_1.assert)(definedAtFile);
76
- const definedAt = (0, getConfigDefinedAt_js_1.getDefinedAtString)(definedAtFile, configName);
77
- return {
78
- value,
79
- definedAt
80
- };
81
- })
82
- };
83
- addSrc(src, configName);
84
- from.configsCumulative[configName] = src;
85
- }
86
- if (configValue.type === 'computed') {
87
- const src = {
88
- type: 'configsComputed',
89
- value: configValue.value
90
- };
91
- addSrc(src, configName);
92
- from.configsComputed[configName] = src;
93
- }
94
- // TODO/v1-release: remove
95
- const exportName = configName;
96
- exportsAll[exportName] = exportsAll[exportName] ?? [];
97
- exportsAll[exportName].push({
98
- exportValue: value,
99
- exportSource: configDefinedAt,
100
- filePath: configValueFilePathToShowToUser,
101
- _filePath: configValueFilePathToShowToUser,
102
- _fileType: null,
103
- _isFromDefaultExport: null
104
- });
105
- });
38
+ const res = getPageConfigUserFriendlyNew(pageConfig);
39
+ source = res.source;
40
+ sources = res.sources;
41
+ from = res.from;
42
+ Object.assign(config, res.config);
43
+ Object.assign(configEntries, res.configEntries);
44
+ Object.assign(exportsAll, res.exportsAll);
45
+ }
46
+ else {
47
+ source = {};
48
+ sources = {};
49
+ from = {
50
+ configsStandard: {},
51
+ configsCumulative: {},
52
+ configsComputed: {}
53
+ };
106
54
  }
107
55
  const pageExports = createObjectWithDeprecationWarning();
108
56
  const exports = {};
@@ -132,17 +80,101 @@ function getPageContextExports(pageFiles, pageConfig) {
132
80
  };
133
81
  return pageContextExports;
134
82
  }
83
+ // V1 design
84
+ function getPageConfigUserFriendlyNew(pageConfig) {
85
+ const config = {};
86
+ const configEntries = {}; // TODO/v1-release: remove
87
+ const exportsAll = {}; // TODO/v1-release: remove
88
+ const source = {};
89
+ const sources = {};
90
+ const from = {
91
+ configsStandard: {},
92
+ configsCumulative: {},
93
+ configsComputed: {}
94
+ };
95
+ const addSrc = (src, configName) => {
96
+ source[configName] = src;
97
+ sources[configName] ?? (sources[configName] = []);
98
+ sources[configName].push(src);
99
+ };
100
+ Object.entries(pageConfig.configValues).forEach(([configName, configValue]) => {
101
+ const { value } = configValue;
102
+ const configValueFilePathToShowToUser = (0, helpers_js_1.getConfigValueFilePathToShowToUser)(configValue.definedAtData);
103
+ const configDefinedAt = (0, getConfigDefinedAt_js_1.getConfigDefinedAtOptional)('Config', configName, configValue.definedAtData);
104
+ config[configName] = config[configName] ?? value;
105
+ configEntries[configName] = configEntries[configName] ?? [];
106
+ // Currently each configName has only one entry. Adding an entry for each overriden config value isn't implemented yet. (This is an isomorphic file and it isn't clear whether this can/should be implemented on the client-side. We should load a minimum amount of code on the client-side.)
107
+ (0, utils_js_1.assert)(configEntries[configName].length === 0);
108
+ configEntries[configName].push({
109
+ configValue: value,
110
+ configDefinedAt,
111
+ configDefinedByFile: configValueFilePathToShowToUser
112
+ });
113
+ if (configValue.type === 'standard') {
114
+ const src = {
115
+ type: 'configsStandard',
116
+ value: configValue.value,
117
+ definedAt: (0, getConfigDefinedAt_js_1.getDefinedAtString)(configValue.definedAtData, configName)
118
+ };
119
+ addSrc(src, configName);
120
+ from.configsStandard[configName] = src;
121
+ }
122
+ if (configValue.type === 'cumulative') {
123
+ const src = {
124
+ type: 'configsCumulative',
125
+ values: configValue.value.map((value, i) => {
126
+ const definedAtFile = configValue.definedAtData[i];
127
+ (0, utils_js_1.assert)(definedAtFile);
128
+ const definedAt = (0, getConfigDefinedAt_js_1.getDefinedAtString)(definedAtFile, configName);
129
+ return {
130
+ value,
131
+ definedAt
132
+ };
133
+ })
134
+ };
135
+ addSrc(src, configName);
136
+ from.configsCumulative[configName] = src;
137
+ }
138
+ if (configValue.type === 'computed') {
139
+ const src = {
140
+ type: 'configsComputed',
141
+ value: configValue.value
142
+ };
143
+ addSrc(src, configName);
144
+ from.configsComputed[configName] = src;
145
+ }
146
+ // TODO/v1-release: remove
147
+ const exportName = configName;
148
+ exportsAll[exportName] = exportsAll[exportName] ?? [];
149
+ exportsAll[exportName].push({
150
+ exportValue: value,
151
+ exportSource: configDefinedAt,
152
+ filePath: configValueFilePathToShowToUser,
153
+ _filePath: configValueFilePathToShowToUser,
154
+ _fileType: null,
155
+ _isFromDefaultExport: null
156
+ });
157
+ });
158
+ return {
159
+ config,
160
+ configEntries,
161
+ exportsAll,
162
+ source,
163
+ sources,
164
+ from
165
+ };
166
+ }
135
167
  function getExportValues(pageFile) {
136
168
  const { filePath, fileExports } = pageFile;
137
169
  (0, utils_js_1.assert)(fileExports); // assume pageFile.loadFile() was called
138
- (0, utils_js_1.assert)((0, isScriptFile_js_1.isScriptFile)(filePath));
170
+ (0, utils_js_1.assert)((0, utils_js_1.isScriptFile)(filePath));
139
171
  const exportValues = [];
140
172
  Object.entries(fileExports)
141
173
  .sort((0, utils_js_1.makeLast)(([exportName]) => exportName === 'default')) // `export { bla }` should override `export default { bla }`
142
174
  .forEach(([exportName, exportValue]) => {
143
175
  let isFromDefaultExport = exportName === 'default';
144
176
  if (isFromDefaultExport) {
145
- if ((0, isScriptFile_js_1.isTemplateFile)(filePath)) {
177
+ if ((0, utils_js_1.isTemplateFile)(filePath)) {
146
178
  exportName = 'Page';
147
179
  }
148
180
  else {
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.serializeConfigValues = serializeConfigValues;
7
+ exports.getConfigValuesBase = getConfigValuesBase;
7
8
  const assertSetup_js_1 = require("../../../utils/assertSetup.js");
8
9
  const utils_js_1 = require("../../../node/plugin/utils.js");
9
10
  const addImportStatement_js_1 = require("../../../node/plugin/plugins/importUserCode/addImportStatement.js");
@@ -20,74 +21,42 @@ const REPLACE_ME_AFTER = '__VIKE__REPLACE_ME_AFTER__';
20
21
  function serializeConfigValues(pageConfig, importStatements, isEnvMatch, { isEager }, tabspace) {
21
22
  const lines = [];
22
23
  tabspace += ' ';
23
- Object.entries(pageConfig.configValuesComputed ?? {}).forEach(([configName, configValuesComputed]) => {
24
- if (!isEnvMatch(configValuesComputed.configEnv))
25
- return;
26
- // Is there a use case for overriding computed values? If yes, then configValeSources has higher precedence
27
- if (pageConfig.configValueSources[configName])
28
- return;
29
- const valueData = serializeWithJson(configValuesComputed.value, configName, null, importStatements);
30
- const configValueBase = {
31
- type: 'computed',
32
- definedAtData: null
33
- };
34
- serializeConfigValue(configValueBase, valueData, configName, lines, tabspace);
35
- });
36
- Object.entries(pageConfig.configValueSources).forEach(([configName, sources]) => {
37
- const configDef = pageConfig.configDefinitions[configName];
38
- (0, utils_js_1.assert)(configDef);
39
- if (isEager !== !!configDef.eager)
40
- return;
41
- if (!configDef.cumulative) {
42
- const configValueSource = sources[0];
43
- (0, utils_js_1.assert)(configValueSource);
44
- (0, utils_js_1.assert)(sources.slice(1).every((s) => s.isOverriden === true));
45
- if (!isEnvMatch(configValueSource.configEnv))
46
- return;
47
- const { valueData, definedAtFile } = serializeConfigValueSource(configValueSource, configName, importStatements);
48
- const configValueBase = {
49
- type: 'standard',
50
- definedAtData: definedAtFile
51
- };
24
+ getConfigValuesBase(pageConfig, isEnvMatch, { isEager }).forEach((entry) => {
25
+ if (entry.configValueBase.type === 'computed') {
26
+ (0, utils_js_1.assert)('value' in entry); // Help TS
27
+ const { configValueBase, value, configName } = entry;
28
+ const valueData = getValueSerializedWithJson(value, configName, configValueBase.definedAtData, importStatements);
52
29
  serializeConfigValue(configValueBase, valueData, configName, lines, tabspace);
53
30
  }
54
- else {
31
+ if (entry.configValueBase.type === 'standard') {
32
+ (0, utils_js_1.assert)('sourceRelevant' in entry); // Help TS
33
+ const { configValueBase, sourceRelevant, configName } = entry;
34
+ const valueData = getValueSerializedFromSource(sourceRelevant, configName, importStatements);
35
+ serializeConfigValue(configValueBase, valueData, configName, lines, tabspace);
36
+ }
37
+ if (entry.configValueBase.type === 'cumulative') {
38
+ (0, utils_js_1.assert)('sourcesRelevant' in entry); // Help TS
39
+ const { configValueBase, sourcesRelevant, configName } = entry;
55
40
  const valueDataList = [];
56
- const definedAtData = [];
57
- sources
58
- .filter((s) => !s.isOverriden)
59
- .forEach((configValueSource) => {
60
- if (!isEnvMatch(configValueSource.configEnv))
61
- return;
62
- const { valueData, definedAtFile } = serializeConfigValueSource(configValueSource, configName, importStatements);
41
+ sourcesRelevant.forEach((source) => {
42
+ const valueData = getValueSerializedFromSource(source, configName, importStatements);
63
43
  valueDataList.push(valueData);
64
- definedAtData.push(definedAtFile);
65
44
  });
66
- if (valueDataList.length === 0)
67
- return;
68
- const configValueBase = {
69
- type: 'cumulative',
70
- definedAtData
71
- };
72
45
  serializeConfigValue(configValueBase, valueDataList, configName, lines, tabspace);
73
46
  }
74
47
  });
75
48
  return lines;
76
49
  }
77
- function serializeConfigValueSource(configValueSource, configName, importStatements) {
50
+ function getValueSerializedFromSource(configValueSource, configName, importStatements) {
78
51
  (0, utils_js_1.assert)(configValueSource.isOverriden === false);
79
52
  let valueData;
80
53
  if ('value' in configValueSource) {
81
- valueData = serializeWithJson(configValueSource.value, configName, configValueSource.definedAtFilePath, importStatements);
54
+ valueData = getValueSerializedWithJson(configValueSource.value, configName, configValueSource.definedAtFilePath, importStatements);
82
55
  }
83
56
  else {
84
- valueData = serializeWithImport(configValueSource, importStatements);
57
+ valueData = getValueSerializedWithImport(configValueSource, importStatements);
85
58
  }
86
- const definedAtFile = {
87
- filePathToShowToUser: configValueSource.definedAtFilePath.filePathToShowToUser,
88
- fileExportPathToShowToUser: configValueSource.definedAtFilePath.fileExportPathToShowToUser
89
- };
90
- return { valueData, definedAtFile };
59
+ return valueData;
91
60
  }
92
61
  function serializeConfigValue(configValueBase, valueData, configName, lines, tabspace) {
93
62
  lineAdd(`[${JSON.stringify(configName)}]: {`);
@@ -131,7 +100,7 @@ function serializeConfigValue(configValueBase, valueData, configName, lines, tab
131
100
  tabspace = tabspace.slice(2);
132
101
  }
133
102
  }
134
- function serializeWithImport(configValueSource, importStatements) {
103
+ function getValueSerializedWithImport(configValueSource, importStatements) {
135
104
  (0, utils_js_1.assert)(!configValueSource.valueIsFilePath);
136
105
  const { valueIsImportedAtRuntime, valueIsDefinedByPlusFile, definedAtFilePath } = configValueSource;
137
106
  (0, utils_js_1.assert)(valueIsImportedAtRuntime);
@@ -144,7 +113,7 @@ function serializeWithImport(configValueSource, importStatements) {
144
113
  valueAsJsCode: importName
145
114
  };
146
115
  }
147
- function serializeWithJson(value, configName, definedAtData, importStatements) {
116
+ function getValueSerializedWithJson(value, configName, definedAtData, importStatements) {
148
117
  const valueAsJsCode = valueToJson(value, configName, definedAtData, importStatements);
149
118
  return {
150
119
  type: 'js-serialized',
@@ -201,3 +170,59 @@ function logJsonSerializeError(err, configName, definedAtData) {
201
170
  (0, utils_js_1.assert)(configValueFilePathToShowToUser);
202
171
  (0, utils_js_1.assertUsage)(false, `${picocolors_1.default.cyan(configName)} defined by ${configValueFilePathToShowToUser} must be defined over a so-called "pointer import", see https://vike.dev/config#pointer-imports`);
203
172
  }
173
+ function getConfigValuesBase(pageConfig, isEnvMatch, { isEager } = {}) {
174
+ const fromComputed = Object.entries(pageConfig.configValuesComputed ?? {}).map(([configName, valueInfo]) => {
175
+ if (!isEnvMatch(valueInfo.configEnv))
176
+ return 'SKIP';
177
+ // Is there a use case for overriding computed values? If yes, then configValeSources has higher precedence
178
+ if (pageConfig.configValueSources[configName])
179
+ return 'SKIP';
180
+ const configValueBase = {
181
+ type: 'computed',
182
+ definedAtData: null
183
+ };
184
+ return { configValueBase, value: valueInfo.value, configName };
185
+ });
186
+ const fromSources = Object.entries(pageConfig.configValueSources).map(([configName, sources]) => {
187
+ const configDef = pageConfig.configDefinitions[configName];
188
+ (0, utils_js_1.assert)(configDef);
189
+ if (isEager !== undefined && isEager !== !!configDef.eager)
190
+ return 'SKIP';
191
+ if (!configDef.cumulative) {
192
+ const source = sources[0];
193
+ (0, utils_js_1.assert)(source);
194
+ (0, utils_js_1.assert)(sources.slice(1).every((s) => s.isOverriden === true));
195
+ if (!isEnvMatch(source.configEnv))
196
+ return 'SKIP';
197
+ const definedAtFile = getDefinedAtFileSource(source);
198
+ const configValueBase = {
199
+ type: 'standard',
200
+ definedAtData: definedAtFile
201
+ };
202
+ return { configValueBase, sourceRelevant: source, configName };
203
+ }
204
+ else {
205
+ const sourcesRelevant = sources.filter((source) => !source.isOverriden && isEnvMatch(source.configEnv));
206
+ if (sourcesRelevant.length === 0)
207
+ return 'SKIP';
208
+ const definedAtData = [];
209
+ sourcesRelevant.forEach((source) => {
210
+ const definedAtFile = getDefinedAtFileSource(source);
211
+ definedAtData.push(definedAtFile);
212
+ });
213
+ const configValueBase = {
214
+ type: 'cumulative',
215
+ definedAtData
216
+ };
217
+ return { configValueBase, sourcesRelevant, configName };
218
+ }
219
+ });
220
+ return [...fromComputed, ...fromSources].filter((r) => r !== 'SKIP');
221
+ }
222
+ function getDefinedAtFileSource(source) {
223
+ const definedAtFile = {
224
+ filePathToShowToUser: source.definedAtFilePath.filePathToShowToUser,
225
+ fileExportPathToShowToUser: source.definedAtFilePath.fileExportPathToShowToUser
226
+ };
227
+ return definedAtFile;
228
+ }
@@ -5,7 +5,7 @@ const error_page_js_1 = require("../error-page.js");
5
5
  const utils_js_1 = require("./utils.js");
6
6
  const deduceRouteStringFromFilesystemPath_js_1 = require("./deduceRouteStringFromFilesystemPath.js");
7
7
  const utils_js_2 = require("../utils.js");
8
- const getConfigValue_js_1 = require("../page-configs/getConfigValue.js");
8
+ const getConfigValueRuntime_js_1 = require("../page-configs/getConfigValueRuntime.js");
9
9
  const getConfigDefinedAt_js_1 = require("../page-configs/getConfigDefinedAt.js");
10
10
  const resolveRouteFunction_js_1 = require("./resolveRouteFunction.js");
11
11
  const getHook_js_1 = require("../hooks/getHook.js");
@@ -30,7 +30,7 @@ function getPageRoutes(filesystemRoots, pageFilesAll, pageConfigs, allPageIds) {
30
30
  let pageRoute = null;
31
31
  {
32
32
  const configName = 'route';
33
- const configValue = (0, getConfigValue_js_1.getConfigValueRuntime)(pageConfig, configName);
33
+ const configValue = (0, getConfigValueRuntime_js_1.getConfigValueRuntime)(pageConfig, configName);
34
34
  if (configValue) {
35
35
  const route = configValue.value;
36
36
  (0, utils_js_1.assert)(configValue.definedAtData);
@@ -46,7 +46,7 @@ function getPageRoutes(filesystemRoots, pageFilesAll, pageConfigs, allPageIds) {
46
46
  }
47
47
  else {
48
48
  (0, utils_js_1.assert)((0, utils_js_2.isCallable)(route));
49
- if ((0, getConfigValue_js_1.getConfigValueRuntime)(pageConfig, 'iKnowThePerformanceRisksOfAsyncRouteFunctions', 'boolean'))
49
+ if ((0, getConfigValueRuntime_js_1.getConfigValueRuntime)(pageConfig, 'iKnowThePerformanceRisksOfAsyncRouteFunctions', 'boolean'))
50
50
  (0, resolveRouteFunction_js_1.warnDeprecatedAllowKey)();
51
51
  pageRoute = {
52
52
  pageId,
@@ -42,3 +42,4 @@ __exportStar(require("../utils/escapeRegex.js"), exports);
42
42
  __exportStar(require("../utils/isArray.js"), exports);
43
43
  __exportStar(require("../utils/changeEnumerable.js"), exports);
44
44
  __exportStar(require("../utils/objectDefineProperty.js"), exports);
45
+ __exportStar(require("../utils/isScriptFile.js"), exports);
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PROJECT_VERSION = void 0;
4
4
  // Automatically updated by @brillout/release-me
5
- exports.PROJECT_VERSION = '0.4.217-commit-99ea561';
5
+ exports.PROJECT_VERSION = '0.4.218-commit-01a099d';