vike 0.4.195-commit-486b49a → 0.4.195-commit-f7e91ba
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/cjs/__internal/index.js +3 -4
- package/dist/cjs/node/cli/onLoad.js +1 -2
- package/dist/cjs/node/createPageRenderer.js +1 -2
- package/dist/cjs/node/plugin/index.js +3 -3
- package/dist/cjs/node/plugin/onLoad.js +1 -2
- package/dist/cjs/node/plugin/plugins/autoFullBuild.js +1 -2
- package/dist/cjs/node/plugin/plugins/baseUrls.js +1 -2
- package/dist/cjs/node/plugin/plugins/buildConfig/fixServerAssets.js +2 -3
- package/dist/cjs/node/plugin/plugins/buildConfig.js +4 -4
- package/dist/cjs/node/plugin/plugins/commonConfig/assertResolveAlias.js +1 -2
- package/dist/cjs/node/plugin/plugins/commonConfig.js +1 -2
- package/dist/cjs/node/plugin/plugins/config/assertVikeConfig.js +1 -2
- package/dist/cjs/node/plugin/plugins/config/index.js +1 -2
- package/dist/cjs/node/plugin/plugins/config/pickFirst.js +1 -2
- package/dist/cjs/node/plugin/plugins/config/resolveBase.js +2 -3
- package/dist/cjs/node/plugin/plugins/devConfig/determineFsAllowList.js +1 -2
- package/dist/cjs/node/plugin/plugins/devConfig/determineOptimizeDeps.js +1 -2
- package/dist/cjs/node/plugin/plugins/devConfig/index.js +1 -2
- package/dist/cjs/node/plugin/plugins/distFileNames.js +1 -2
- package/dist/cjs/node/plugin/plugins/envVars.js +1 -2
- package/dist/cjs/node/plugin/plugins/extractAssetsPlugin.js +2 -2
- package/dist/cjs/node/plugin/plugins/extractExportNamesPlugin.js +3 -3
- package/dist/cjs/node/plugin/plugins/fileEnv.js +109 -88
- package/dist/cjs/node/plugin/plugins/importBuild/getVikeManifest.js +1 -2
- package/dist/cjs/node/plugin/plugins/importBuild/index.js +2 -3
- package/dist/cjs/node/plugin/plugins/importUserCode/addImportStatement.js +1 -2
- package/dist/cjs/node/plugin/plugins/importUserCode/getVirtualFileImportUserCode.js +1 -3
- package/dist/cjs/node/plugin/plugins/importUserCode/index.js +1 -2
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/assertExtensions.js +2 -3
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getConfigFileExport.js +1 -2
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/crawlPlusFiles.js +1 -2
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/filesystemRouting.js +8 -9
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/loadFileAtConfigTime.js +3 -4
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/resolvePointerImport.js +3 -4
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/transformFileImports.js +3 -4
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/transpileAndExecuteFile.js +4 -5
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +6 -6
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVirtualFilePageConfigValuesAll.js +1 -2
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVirtualFilePageConfigs.js +1 -2
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/isRuntimeEnvMatch.js +1 -2
- package/dist/cjs/node/plugin/plugins/packageJsonFile.js +1 -2
- package/dist/cjs/node/plugin/plugins/previewConfig.js +1 -2
- package/dist/cjs/node/plugin/plugins/removeRequireHookPlugin.js +1 -2
- package/dist/cjs/node/plugin/plugins/setGlobalContext.js +1 -2
- package/dist/cjs/node/plugin/plugins/suppressRollupWarning.js +1 -2
- package/dist/cjs/node/plugin/plugins/workaroundCssModuleHmr.js +1 -2
- package/dist/cjs/node/plugin/resolveClientEntriesDev.js +1 -2
- package/dist/cjs/node/plugin/shared/addSsrMiddleware.js +1 -2
- package/dist/cjs/node/plugin/shared/findPageFiles.js +1 -2
- package/dist/cjs/node/plugin/shared/getAssetsDir.js +1 -2
- package/dist/cjs/node/plugin/shared/getFilePath.js +8 -9
- package/dist/cjs/node/plugin/shared/getHttpRequestAsyncStore.js +2 -3
- package/dist/cjs/node/plugin/shared/isAsset.js +1 -2
- package/dist/cjs/node/plugin/shared/isViteCliCall.js +2 -3
- package/dist/cjs/node/plugin/shared/loggerNotProd/errorWithCodeSnippet.js +4 -5
- package/dist/cjs/node/plugin/shared/loggerNotProd/log.js +4 -5
- package/dist/cjs/node/plugin/shared/loggerNotProd.js +6 -7
- package/dist/cjs/node/plugin/shared/loggerVite/removeSuperfluousViteLog.js +3 -4
- package/dist/cjs/node/plugin/shared/loggerVite.js +1 -2
- package/dist/cjs/node/plugin/shared/parseEsModule.js +2 -3
- package/dist/cjs/node/plugin/shared/rollupIsEsm.js +1 -2
- package/dist/cjs/node/plugin/shared/rollupSourceMap.js +2 -3
- package/dist/cjs/node/prerender/runPrerender.js +4 -5
- package/dist/cjs/node/runtime/globalContext/loadImportBuild.js +2 -3
- package/dist/cjs/node/runtime/globalContext.js +13 -14
- package/dist/cjs/node/runtime/html/injectAssets/getHtmlTags.js +1 -2
- package/dist/cjs/node/runtime/html/injectAssets/getViteDevScript.js +1 -2
- package/dist/cjs/node/runtime/html/injectAssets/inferHtmlTags.js +4 -4
- package/dist/cjs/node/runtime/html/injectAssets/injectAssets__public.js +1 -2
- package/dist/cjs/node/runtime/html/injectAssets/injectHtmlTags.js +6 -7
- package/dist/cjs/node/runtime/html/injectAssets/mergeScriptTags.js +1 -2
- package/dist/cjs/node/runtime/html/injectAssets/sanitizeJson.js +1 -2
- package/dist/cjs/node/runtime/html/injectAssets.js +2 -3
- package/dist/cjs/node/runtime/html/renderHtml.js +5 -6
- package/dist/cjs/node/runtime/html/serializePageContextClientSide.js +2 -3
- package/dist/cjs/node/runtime/html/stream/react-streaming.js +3 -4
- package/dist/cjs/node/runtime/html/stream.js +21 -22
- package/dist/cjs/node/runtime/onLoad.js +1 -2
- package/dist/cjs/node/runtime/page-files/getPageFilesExports.js +1 -2
- package/dist/cjs/node/runtime/renderPage/analyzePage.js +1 -2
- package/dist/cjs/node/runtime/renderPage/assertArguments.js +1 -2
- package/dist/cjs/node/runtime/renderPage/createHttpResponse/assertNoInfiniteHttpRedirect.js +1 -2
- package/dist/cjs/node/runtime/renderPage/createHttpResponse/getCacheControl.js +1 -2
- package/dist/cjs/node/runtime/renderPage/createHttpResponse.js +5 -6
- package/dist/cjs/node/runtime/renderPage/debugPageFiles.js +1 -2
- package/dist/cjs/node/runtime/renderPage/executeOnBeforeRenderAndDataHooks.js +1 -2
- package/dist/cjs/node/runtime/renderPage/executeOnRenderHtmlHook.js +1 -2
- package/dist/cjs/node/runtime/renderPage/getEarlyHints.js +1 -2
- package/dist/cjs/node/runtime/renderPage/getHttpResponseBody.js +2 -3
- package/dist/cjs/node/runtime/renderPage/getPageAssets/getManifestEntry.js +1 -2
- package/dist/cjs/node/runtime/renderPage/getPageAssets/retrieveAssetsDev.js +1 -2
- package/dist/cjs/node/runtime/renderPage/getPageAssets/retrieveAssetsProd.js +1 -2
- package/dist/cjs/node/runtime/renderPage/getPageAssets/sortPageAssetsForEarlyHintsHeader.js +1 -2
- package/dist/cjs/node/runtime/renderPage/getPageAssets.js +2 -3
- package/dist/cjs/node/runtime/renderPage/handleErrorWithoutErrorPage.js +1 -2
- package/dist/cjs/node/runtime/renderPage/handlePageContextRequestUrl.js +1 -2
- package/dist/cjs/node/runtime/renderPage/inferMediaType.js +1 -2
- package/dist/cjs/node/runtime/renderPage/isNewError.js +2 -3
- package/dist/cjs/node/runtime/renderPage/loadUserFilesServerSide.js +1 -2
- package/dist/cjs/node/runtime/renderPage/log404/index.js +2 -3
- package/dist/cjs/node/runtime/renderPage/logErrorHint.js +2 -3
- package/dist/cjs/node/runtime/renderPage/loggerProd.js +2 -3
- package/dist/cjs/node/runtime/renderPage/loggerRuntime.js +2 -2
- package/dist/cjs/node/runtime/renderPage/preparePageContextForUserConsumptionServerSide.js +1 -2
- package/dist/cjs/node/runtime/renderPage/renderPageAlreadyRouted.js +5 -6
- package/dist/cjs/node/runtime/renderPage/resolveRedirects.js +2 -3
- package/dist/cjs/node/runtime/renderPage.js +2 -2
- package/dist/cjs/node/shared/assertPluginManifest.js +1 -2
- package/dist/cjs/node/shared/assertRuntimeManifest.js +1 -2
- package/dist/cjs/node/shared/assertV1Design.js +1 -2
- package/dist/cjs/node/shared/extractAssetsQuery.js +2 -3
- package/dist/cjs/node/shared/getConfigVike.js +1 -2
- package/dist/cjs/node/shared/isErrorDebug.js +1 -2
- package/dist/cjs/node/shared/prependEntriesDir.js +1 -2
- package/dist/cjs/node/shared/virtual-files/virtualFileImportUserCode.js +2 -2
- package/dist/cjs/node/shared/virtual-files/virtualFilePageConfigValuesAll.js +2 -3
- package/dist/cjs/shared/addIs404ToPageProps.js +1 -2
- package/dist/cjs/shared/assertHookReturnedObject.js +1 -2
- package/dist/cjs/shared/assertOnBeforeRenderHookReturn.js +1 -2
- package/dist/cjs/shared/assertPageContextProvidedByUser.js +1 -2
- package/dist/cjs/shared/assertPageFilePath.js +1 -2
- package/dist/cjs/shared/determinePageIdOld.js +1 -2
- package/dist/cjs/shared/error-page.js +3 -4
- package/dist/cjs/shared/getPageContextRequestUrl.js +2 -2
- package/dist/cjs/shared/getPageContextUrlComputed.js +2 -3
- package/dist/cjs/shared/getPageFiles/analyzeClientSide.js +1 -2
- package/dist/cjs/shared/getPageFiles/analyzePageClientSide/analyzeExports.js +1 -2
- package/dist/cjs/shared/getPageFiles/analyzePageClientSide/determineClientEntry.js +2 -3
- package/dist/cjs/shared/getPageFiles/analyzePageClientSide/getExportNames.js +1 -2
- package/dist/cjs/shared/getPageFiles/analyzePageClientSide.js +2 -3
- package/dist/cjs/shared/getPageFiles/analyzePageServerSide.js +1 -2
- package/dist/cjs/shared/getPageFiles/assert_exports_old_design.js +3 -3
- package/dist/cjs/shared/getPageFiles/fileTypes.js +3 -3
- package/dist/cjs/shared/getPageFiles/getAllPageIdFiles.js +2 -3
- package/dist/cjs/shared/getPageFiles/getExports.js +1 -2
- package/dist/cjs/shared/getPageFiles/getPageFileObject.js +1 -2
- package/dist/cjs/shared/getPageFiles/parseGlobResults.js +1 -2
- package/dist/cjs/shared/getPageFiles/setPageFiles.js +3 -4
- package/dist/cjs/shared/hooks/executeHook.js +4 -5
- package/dist/cjs/shared/hooks/getHook.js +6 -7
- package/dist/cjs/shared/modifyUrl.js +1 -2
- package/dist/cjs/shared/page-configs/assertPlusFileExport.js +1 -2
- package/dist/cjs/shared/page-configs/findPageConfig.js +1 -2
- package/dist/cjs/shared/page-configs/getConfigDefinedAt.js +3 -4
- package/dist/cjs/shared/page-configs/getConfigValue.js +2 -3
- package/dist/cjs/shared/page-configs/getConfigValueBuildTime.js +1 -2
- package/dist/cjs/shared/page-configs/getExportPath.js +1 -2
- package/dist/cjs/shared/page-configs/helpers.js +3 -4
- package/dist/cjs/shared/page-configs/loadConfigValues.js +1 -2
- package/dist/cjs/shared/page-configs/serialize/parsePageConfigs.js +2 -3
- package/dist/cjs/shared/page-configs/serialize/serializeConfigValues.js +1 -2
- package/dist/cjs/shared/route/abort.js +9 -10
- package/dist/cjs/shared/route/debug.js +1 -2
- package/dist/cjs/shared/route/deduceRouteStringFromFilesystemPath.js +1 -2
- package/dist/cjs/shared/route/executeGuardHook.js +1 -2
- package/dist/cjs/shared/route/executeOnBeforeRouteHook.js +1 -2
- package/dist/cjs/shared/route/index.js +1 -2
- package/dist/cjs/shared/route/loadPageRoutes.js +1 -2
- package/dist/cjs/shared/route/resolvePrecedence.js +1 -2
- package/dist/cjs/shared/route/resolveRoute.js +1 -2
- package/dist/cjs/shared/route/resolveRouteFunction.js +4 -5
- package/dist/cjs/shared/route/resolveRouteString.js +6 -7
- package/dist/cjs/shared/route/resolveUrlPathname.js +1 -2
- package/dist/cjs/shared/sortPageContext.js +1 -2
- package/dist/cjs/types/defineConfig.js +1 -2
- package/dist/cjs/utils/PROJECT_VERSION.js +1 -1
- package/dist/cjs/utils/assert.js +10 -11
- package/dist/cjs/utils/assertIsBrowser.js +1 -2
- package/dist/cjs/utils/assertIsNotBrowser.js +1 -2
- package/dist/cjs/utils/assertIsNotProductionRuntime.js +6 -6
- package/dist/cjs/utils/assertKeys.js +1 -2
- package/dist/cjs/utils/assertNodeEnv.js +5 -6
- package/dist/cjs/utils/assertNodeVersion.js +1 -2
- package/dist/cjs/utils/assertRoutingType.js +3 -4
- package/dist/cjs/utils/assertSingleInstance.js +3 -4
- package/dist/cjs/utils/assertVersion.js +2 -3
- package/dist/cjs/utils/augmentType.js +1 -2
- package/dist/cjs/utils/capitalizeFirstLetter.js +1 -2
- package/dist/cjs/utils/cast.js +2 -3
- package/dist/cjs/utils/changeEnumerable.js +1 -2
- package/dist/cjs/utils/checkType.js +2 -3
- package/dist/cjs/utils/compareString.js +1 -2
- package/dist/cjs/utils/createErrorWithCleanStackTrace.js +1 -2
- package/dist/cjs/utils/debug.js +2 -3
- package/dist/cjs/utils/deepEqual.js +1 -2
- package/dist/cjs/utils/escapeHtml.js +1 -2
- package/dist/cjs/utils/escapeRegex.js +1 -2
- package/dist/cjs/utils/filesystemPathHandling.js +2 -3
- package/dist/cjs/utils/findFile.js +1 -2
- package/dist/cjs/utils/findPackageJson.js +1 -2
- package/dist/cjs/utils/formatHintLog.js +1 -2
- package/dist/cjs/utils/freezePartial.js +1 -2
- package/dist/cjs/utils/genPromise.js +1 -2
- package/dist/cjs/utils/getCurrentUrl.js +1 -2
- package/dist/cjs/utils/getFileExtension.js +1 -2
- package/dist/cjs/utils/getGlobalObject.js +2 -3
- package/dist/cjs/utils/getMostSimilar.js +1 -2
- package/dist/cjs/utils/getOutDirs.js +2 -3
- package/dist/cjs/utils/getPropAccessNotation.js +1 -2
- package/dist/cjs/utils/getRandomId.js +1 -2
- package/dist/cjs/utils/getTerminWidth.js +1 -2
- package/dist/cjs/utils/getValuePrintable.js +1 -2
- package/dist/cjs/utils/hasProp.js +1 -2
- package/dist/cjs/utils/humanizeTime.js +1 -2
- package/dist/cjs/utils/includes.js +1 -2
- package/dist/cjs/utils/injectRollupInputs.js +2 -3
- package/dist/cjs/utils/isArray.js +1 -2
- package/dist/cjs/utils/isArrayOfStrings.js +1 -2
- package/dist/cjs/utils/isBrowser.js +1 -2
- package/dist/cjs/utils/isCallable.js +1 -2
- package/dist/cjs/utils/isDev.js +2 -3
- package/dist/cjs/utils/isFilePathAbsoluteFilesystem.js +2 -3
- package/dist/cjs/utils/isHtml.js +1 -2
- package/dist/cjs/utils/isNodeJS.js +1 -2
- package/dist/cjs/utils/isNpmPackage.js +5 -6
- package/dist/cjs/utils/isObject.js +1 -2
- package/dist/cjs/utils/isObjectOfStrings.js +1 -2
- package/dist/cjs/utils/isObjectWithKeys.js +1 -2
- package/dist/cjs/utils/isPlainObject.js +1 -2
- package/dist/cjs/utils/isPromise.js +1 -2
- package/dist/cjs/utils/isPropertyGetter.js +1 -2
- package/dist/cjs/utils/isReact.js +1 -2
- package/dist/cjs/utils/isSameErrorMessage.js +1 -2
- package/dist/cjs/utils/isScriptFile.js +4 -4
- package/dist/cjs/utils/isVikeReactApp.js +1 -2
- package/dist/cjs/utils/isVitest.js +1 -2
- package/dist/cjs/utils/joinEnglish.js +1 -2
- package/dist/cjs/utils/normalizeHeaders.js +1 -2
- package/dist/cjs/utils/objectAssign.js +1 -2
- package/dist/cjs/utils/objectDefineProperty.js +1 -2
- package/dist/cjs/utils/objectEntries.js +1 -2
- package/dist/cjs/utils/objectEntriesForEach.js +1 -2
- package/dist/cjs/utils/objectFromEntries.js +1 -2
- package/dist/cjs/utils/objectKeys.js +1 -2
- package/dist/cjs/utils/onPageVisibilityChange.js +2 -3
- package/dist/cjs/utils/pLimit.js +1 -2
- package/dist/cjs/utils/parseUrl-extras.js +8 -9
- package/dist/cjs/utils/parseUrl.js +11 -12
- package/dist/cjs/utils/path-shim.js +1 -2
- package/dist/cjs/utils/redirectHard.js +1 -2
- package/dist/cjs/utils/removeEmptyLines.js +1 -2
- package/dist/cjs/utils/removeFileExtention.js +1 -2
- package/dist/cjs/utils/requireResolve.js +1 -2
- package/dist/cjs/utils/sleep.js +1 -2
- package/dist/cjs/utils/slice.js +1 -2
- package/dist/cjs/utils/sorter.js +5 -6
- package/dist/cjs/utils/stringifyStringArray.js +1 -2
- package/dist/cjs/utils/stripAnsi.js +1 -2
- package/dist/cjs/utils/throttle.js +1 -2
- package/dist/cjs/utils/trimWithAnsi.js +2 -3
- package/dist/cjs/utils/truncateString.js +1 -2
- package/dist/cjs/utils/unique.js +1 -2
- package/dist/cjs/utils/urlToFile.js +2 -2
- package/dist/cjs/utils/virtual-files.js +3 -4
- package/dist/cjs/utils/viteIsSSR.js +2 -3
- package/dist/cjs/utils/warnIfErrorIsNotObject.js +1 -2
- package/dist/esm/client/client-routing-runtime/installClientRouter.js +2 -4
- package/dist/esm/client/client-routing-runtime/navigate.js +3 -1
- package/dist/esm/client/client-routing-runtime/renderPageClientSide.d.ts +2 -0
- package/dist/esm/client/client-routing-runtime/renderPageClientSide.js +14 -2
- package/dist/esm/client/client-routing-runtime/skipLink.js +1 -1
- package/dist/esm/client/client-routing-runtime/utils.d.ts +1 -0
- package/dist/esm/client/client-routing-runtime/utils.js +1 -0
- package/dist/esm/node/plugin/plugins/fileEnv.js +109 -87
- package/dist/esm/node/plugin/plugins/importUserCode/getVirtualFileImportUserCode.js +0 -1
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/debug.d.ts +2 -2
- package/dist/esm/node/runtime/html/stream.d.ts +0 -1
- package/dist/esm/node/runtime/index-deprecated.d.ts +1 -1
- package/dist/esm/node/runtime/renderPage/getHttpResponseBody.d.ts +0 -1
- package/dist/esm/node/runtime/renderPage/renderPageAlreadyRouted.d.ts +6 -6
- package/dist/esm/utils/PROJECT_VERSION.d.ts +1 -1
- package/dist/esm/utils/PROJECT_VERSION.js +1 -1
- package/dist/esm/utils/debugGlob.d.ts +2 -2
- package/dist/esm/utils/genPromise.d.ts +1 -1
- package/dist/esm/utils/projectInfo.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getVikeManifest =
|
|
3
|
+
exports.getVikeManifest = getVikeManifest;
|
|
4
4
|
const utils_js_1 = require("../../utils.js");
|
|
5
5
|
const assertPluginManifest_js_1 = require("../../../shared/assertPluginManifest.js");
|
|
6
6
|
const extractExportNamesPlugin_js_1 = require("../extractExportNamesPlugin.js");
|
|
@@ -15,4 +15,3 @@ function getVikeManifest(configVike) {
|
|
|
15
15
|
(0, assertPluginManifest_js_1.assertPluginManifest)(manifest);
|
|
16
16
|
return manifest;
|
|
17
17
|
}
|
|
18
|
-
exports.getVikeManifest = getVikeManifest;
|
|
@@ -3,7 +3,8 @@ 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.
|
|
6
|
+
exports.importBuild = importBuild;
|
|
7
|
+
exports.set_ASSETS_MAP = set_ASSETS_MAP;
|
|
7
8
|
const plugin_1 = require("@brillout/vite-plugin-server-entry/plugin");
|
|
8
9
|
const utils_js_1 = require("../../utils.js");
|
|
9
10
|
const path_1 = __importDefault(require("path"));
|
|
@@ -36,7 +37,6 @@ function importBuild() {
|
|
|
36
37
|
})
|
|
37
38
|
];
|
|
38
39
|
}
|
|
39
|
-
exports.importBuild = importBuild;
|
|
40
40
|
function getEntryCode(config, configVike) {
|
|
41
41
|
const importPath = getImportPath(config);
|
|
42
42
|
const vikeManifest = (0, getVikeManifest_js_1.getVikeManifest)(configVike);
|
|
@@ -73,7 +73,6 @@ async function set_ASSETS_MAP(options, bundle) {
|
|
|
73
73
|
(0, utils_js_1.assert)(serverEntryFileContentPatched !== chunkFileContent);
|
|
74
74
|
await promises_1.default.writeFile(chunkFilePath, serverEntryFileContentPatched);
|
|
75
75
|
}
|
|
76
|
-
exports.set_ASSETS_MAP = set_ASSETS_MAP;
|
|
77
76
|
function find_ASSETS_MAP(bundle) {
|
|
78
77
|
let chunkPath;
|
|
79
78
|
for (const filePath in bundle) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addImportStatement =
|
|
3
|
+
exports.addImportStatement = addImportStatement;
|
|
4
4
|
/**
|
|
5
5
|
* Naming:
|
|
6
6
|
* `import { someExport as someImport } from './some-file'`
|
|
@@ -27,4 +27,3 @@ function addImportStatement(importStatements, importPath, exportName) {
|
|
|
27
27
|
importStatements.push(importStatement);
|
|
28
28
|
return { importName };
|
|
29
29
|
}
|
|
30
|
-
exports.addImportStatement = addImportStatement;
|
|
@@ -3,7 +3,7 @@ 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.getVirtualFileImportUserCode =
|
|
6
|
+
exports.getVirtualFileImportUserCode = getVirtualFileImportUserCode;
|
|
7
7
|
const utils_js_1 = require("../../utils.js");
|
|
8
8
|
const virtualFileImportUserCode_js_1 = require("../../../shared/virtual-files/virtualFileImportUserCode.js");
|
|
9
9
|
const vite_1 = require("vite");
|
|
@@ -20,7 +20,6 @@ async function getVirtualFileImportUserCode(id, options, configVike, config, isD
|
|
|
20
20
|
const code = await getCode(config, configVike, isForClientSide, isClientRouting, isPrerendering, isDev, id);
|
|
21
21
|
return code;
|
|
22
22
|
}
|
|
23
|
-
exports.getVirtualFileImportUserCode = getVirtualFileImportUserCode;
|
|
24
23
|
async function getCode(config, configVike, isForClientSide, isClientRouting, isPrerendering, isDev, id) {
|
|
25
24
|
const { command } = config;
|
|
26
25
|
(0, utils_js_1.assert)(command === 'serve' || command === 'build');
|
|
@@ -78,7 +77,6 @@ ${await (0, getVirtualFilePageConfigs_js_1.getVirtualFilePageConfigs)(isForClien
|
|
|
78
77
|
fileTypes_js_1.fileTypes
|
|
79
78
|
.filter((fileType) => fileType !== '.css')
|
|
80
79
|
.forEach((fileType) => {
|
|
81
|
-
(0, utils_js_1.assert)(fileType !== '.css');
|
|
82
80
|
const { includeImport, includeExportNames } = determineInjection({
|
|
83
81
|
fileType,
|
|
84
82
|
isForClientSide,
|
|
@@ -3,7 +3,7 @@ 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.importUserCode =
|
|
6
|
+
exports.importUserCode = importUserCode;
|
|
7
7
|
const vite_1 = require("vite");
|
|
8
8
|
const getConfigVike_js_1 = require("../../../shared/getConfigVike.js");
|
|
9
9
|
const getVirtualFilePageConfigValuesAll_js_1 = require("./v1-design/getVirtualFilePageConfigValuesAll.js");
|
|
@@ -68,7 +68,6 @@ function importUserCode() {
|
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
-
exports.importUserCode = importUserCode;
|
|
72
71
|
function handleFileAddRemove(server, config) {
|
|
73
72
|
server.watcher.prependListener('add', (f) => listener(f, false));
|
|
74
73
|
server.watcher.prependListener('unlink', (f) => listener(f, true));
|
|
@@ -3,7 +3,8 @@ 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.
|
|
6
|
+
exports.assertExtensionsConventions = assertExtensionsConventions;
|
|
7
|
+
exports.assertExtensionsPeerDependencies = assertExtensionsPeerDependencies;
|
|
7
8
|
const picocolors_1 = __importDefault(require("@brillout/picocolors"));
|
|
8
9
|
const isObjectOfStrings_js_1 = require("../../../../../utils/isObjectOfStrings.js");
|
|
9
10
|
const utils_js_1 = require("../../../utils.js");
|
|
@@ -14,7 +15,6 @@ function assertExtensionsConventions(interfaceFile) {
|
|
|
14
15
|
assertExtensionName(interfaceFile);
|
|
15
16
|
assertConfigExportPath(interfaceFile);
|
|
16
17
|
}
|
|
17
|
-
exports.assertExtensionsConventions = assertExtensionsConventions;
|
|
18
18
|
function assertConfigExportPath(interfaceFile) {
|
|
19
19
|
const { importPathAbsolute } = interfaceFile.filePath;
|
|
20
20
|
(0, utils_js_1.assert)(importPathAbsolute);
|
|
@@ -88,7 +88,6 @@ function assertExtensionsPeerDependencies(interfaceFilesRelevantList) {
|
|
|
88
88
|
});
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
-
exports.assertExtensionsPeerDependencies = assertExtensionsPeerDependencies;
|
|
92
91
|
function getConfigRequireValue(interfaceFile) {
|
|
93
92
|
const require = (0, getVikeConfig_js_1.getConfigValueInterfaceFile)(interfaceFile, 'require');
|
|
94
93
|
if (!require)
|
|
@@ -3,7 +3,7 @@ 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.getConfigFileExport =
|
|
6
|
+
exports.getConfigFileExport = getConfigFileExport;
|
|
7
7
|
const picocolors_1 = __importDefault(require("@brillout/picocolors"));
|
|
8
8
|
const assertPlusFileExport_js_1 = require("../../../../../shared/page-configs/assertPlusFileExport.js");
|
|
9
9
|
const utils_js_1 = require("../../../utils.js");
|
|
@@ -15,4 +15,3 @@ function getConfigFileExport(fileExports, filePathToShowToUser) {
|
|
|
15
15
|
(0, utils_js_1.assertUsage)((0, utils_js_1.isObject)(fileExport), `The ${exportName} of ${filePathToShowToUser} should be an object (but it's ${picocolors_1.default.cyan(`typeof exportedValue === ${JSON.stringify(typeof fileExport)}`)} instead)`);
|
|
16
16
|
return fileExport;
|
|
17
17
|
}
|
|
18
|
-
exports.getConfigFileExport = getConfigFileExport;
|
package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/crawlPlusFiles.js
CHANGED
|
@@ -3,7 +3,7 @@ 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.crawlPlusFiles =
|
|
6
|
+
exports.crawlPlusFiles = crawlPlusFiles;
|
|
7
7
|
const utils_js_1 = require("../../../../utils.js");
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const promises_1 = __importDefault(require("fs/promises"));
|
|
@@ -70,7 +70,6 @@ async function crawlPlusFiles(userRootDir, outDirAbsoluteFilesystem, isDev, craw
|
|
|
70
70
|
});
|
|
71
71
|
return plusFiles;
|
|
72
72
|
}
|
|
73
|
-
exports.crawlPlusFiles = crawlPlusFiles;
|
|
74
73
|
// Same as fastGlob() but using `$ git ls-files`
|
|
75
74
|
async function gitLsFiles(userRootDir, outDirRelativeFromUserRootDir) {
|
|
76
75
|
if (gitIsNotUsable)
|
package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/filesystemRouting.js
CHANGED
|
@@ -3,7 +3,14 @@ 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.
|
|
6
|
+
exports.getFilesystemRouteString = getFilesystemRouteString;
|
|
7
|
+
exports.getFilesystemRouteDefinedBy = getFilesystemRouteDefinedBy;
|
|
8
|
+
exports.isInherited = isInherited;
|
|
9
|
+
exports.getLocationId = getLocationId;
|
|
10
|
+
exports.sortAfterInheritanceOrder = sortAfterInheritanceOrder;
|
|
11
|
+
exports.isGlobalLocation = isGlobalLocation;
|
|
12
|
+
exports.applyFilesystemRoutingRootEffect = applyFilesystemRoutingRootEffect;
|
|
13
|
+
exports.getLogicalPath = getLogicalPath;
|
|
7
14
|
const picocolors_1 = __importDefault(require("@brillout/picocolors"));
|
|
8
15
|
const utils_js_1 = require("../../../../utils.js");
|
|
9
16
|
(0, utils_js_1.assertIsNotProductionRuntime)();
|
|
@@ -22,12 +29,10 @@ filePathAbsoluteUserRootDir) {
|
|
|
22
29
|
assertLocationId(locationId);
|
|
23
30
|
return locationId;
|
|
24
31
|
}
|
|
25
|
-
exports.getLocationId = getLocationId;
|
|
26
32
|
/** Filesystem Routing: get the URL */
|
|
27
33
|
function getFilesystemRouteString(locationId) {
|
|
28
34
|
return getLogicalPath(locationId, ['renderer', 'pages', 'src', 'index'], true);
|
|
29
35
|
}
|
|
30
|
-
exports.getFilesystemRouteString = getFilesystemRouteString;
|
|
31
36
|
/** Filesystem Inheritance: get the apply root */
|
|
32
37
|
function getInheritanceRoot(locationId) {
|
|
33
38
|
return getLogicalPath(locationId, ['renderer']);
|
|
@@ -40,12 +45,10 @@ function getLogicalPath(locationId, ignoredDirs, removeParenthesesDirs) {
|
|
|
40
45
|
assertIsPath(logicalPath);
|
|
41
46
|
return logicalPath;
|
|
42
47
|
}
|
|
43
|
-
exports.getLogicalPath = getLogicalPath;
|
|
44
48
|
/** Whether configs defined in `locationId` apply in every `locationIds` */
|
|
45
49
|
function isGlobalLocation(locationId, locationIds) {
|
|
46
50
|
return locationIds.every((locId) => isInherited(locationId, locId) || locationIsRendererDir(locId));
|
|
47
51
|
}
|
|
48
|
-
exports.isGlobalLocation = isGlobalLocation;
|
|
49
52
|
function sortAfterInheritanceOrder(locationId1, locationId2, locationIdPage) {
|
|
50
53
|
assertLocationId(locationId1);
|
|
51
54
|
assertLocationId(locationId2);
|
|
@@ -80,7 +83,6 @@ function sortAfterInheritanceOrder(locationId1, locationId2, locationIdPage) {
|
|
|
80
83
|
}
|
|
81
84
|
return locationId1 > locationId2 ? locationId1First : locationId2First;
|
|
82
85
|
}
|
|
83
|
-
exports.sortAfterInheritanceOrder = sortAfterInheritanceOrder;
|
|
84
86
|
function locationIsRendererDir(locationId) {
|
|
85
87
|
return locationId.split('/').includes('renderer');
|
|
86
88
|
}
|
|
@@ -90,7 +92,6 @@ function isInherited(locationId1, locationId2) {
|
|
|
90
92
|
const inheritanceRoot2 = getInheritanceRoot(locationId2);
|
|
91
93
|
return startsWith(inheritanceRoot2, inheritanceRoot1);
|
|
92
94
|
}
|
|
93
|
-
exports.isInherited = isInherited;
|
|
94
95
|
function removeIgnoredDirectories(somePath, ignoredDirs, removeParenthesesDirs) {
|
|
95
96
|
(0, utils_js_1.assertPosixPath)(somePath);
|
|
96
97
|
somePath = somePath
|
|
@@ -145,7 +146,6 @@ function getFilesystemRouteDefinedBy(locationId) {
|
|
|
145
146
|
const routeFilesystemDefinedBy = locationId + '/';
|
|
146
147
|
return routeFilesystemDefinedBy;
|
|
147
148
|
}
|
|
148
|
-
exports.getFilesystemRouteDefinedBy = getFilesystemRouteDefinedBy;
|
|
149
149
|
function applyFilesystemRoutingRootEffect(routeFilesystem, filesystemRoutingRootEffect) {
|
|
150
150
|
const { before, after } = filesystemRoutingRootEffect;
|
|
151
151
|
(0, utils_js_1.assert)(after.startsWith('/'));
|
|
@@ -154,7 +154,6 @@ function applyFilesystemRoutingRootEffect(routeFilesystem, filesystemRoutingRoot
|
|
|
154
154
|
routeFilesystem = '/' + routeFilesystem.split('/').filter(Boolean).join('/');
|
|
155
155
|
return routeFilesystem;
|
|
156
156
|
}
|
|
157
|
-
exports.applyFilesystemRoutingRootEffect = applyFilesystemRoutingRootEffect;
|
|
158
157
|
function assertLocationId(locationId) {
|
|
159
158
|
(0, utils_js_1.assert)(locationId.startsWith('/'));
|
|
160
159
|
(0, utils_js_1.assert)(!locationId.endsWith('/') || locationId === '/');
|
package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/loadFileAtConfigTime.js
CHANGED
|
@@ -4,7 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.loadImportedFile = loadImportedFile;
|
|
8
|
+
exports.loadValueFile = loadValueFile;
|
|
9
|
+
exports.loadConfigFile = loadConfigFile;
|
|
8
10
|
const utils_js_1 = require("../../../../utils.js");
|
|
9
11
|
const transpileAndExecuteFile_js_1 = require("./transpileAndExecuteFile.js");
|
|
10
12
|
const assertPlusFileExport_js_1 = require("../../../../../../shared/page-configs/assertPlusFileExport.js");
|
|
@@ -23,7 +25,6 @@ async function loadImportedFile(import_, userRootDir, importedFilesLoaded) {
|
|
|
23
25
|
const fileExport = fileExports[import_.fileExportName];
|
|
24
26
|
return fileExport;
|
|
25
27
|
}
|
|
26
|
-
exports.loadImportedFile = loadImportedFile;
|
|
27
28
|
// Load +{configName}.js
|
|
28
29
|
async function loadValueFile(interfaceValueFile, configName, userRootDir) {
|
|
29
30
|
const { fileExports } = await (0, transpileAndExecuteFile_js_1.transpileAndExecuteFile)(interfaceValueFile.filePath, userRootDir, false);
|
|
@@ -34,7 +35,6 @@ async function loadValueFile(interfaceValueFile, configName, userRootDir) {
|
|
|
34
35
|
interfaceValueFile.fileExportsByConfigName[configName_] = { configValue };
|
|
35
36
|
});
|
|
36
37
|
}
|
|
37
|
-
exports.loadValueFile = loadValueFile;
|
|
38
38
|
// Load +config.js, including all its extends pointer imports
|
|
39
39
|
async function loadConfigFile(configFilePath, userRootDir, visited, isExtensionConfig) {
|
|
40
40
|
const { filePathAbsoluteFilesystem } = configFilePath;
|
|
@@ -51,7 +51,6 @@ async function loadConfigFile(configFilePath, userRootDir, visited, isExtensionC
|
|
|
51
51
|
};
|
|
52
52
|
return { configFile, extendsConfigs };
|
|
53
53
|
}
|
|
54
|
-
exports.loadConfigFile = loadConfigFile;
|
|
55
54
|
function assertNoInfiniteLoop(visited, filePathAbsoluteFilesystem) {
|
|
56
55
|
const idx = visited.indexOf(filePathAbsoluteFilesystem);
|
|
57
56
|
if (idx === -1)
|
package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/resolvePointerImport.js
CHANGED
|
@@ -3,7 +3,9 @@ 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.
|
|
6
|
+
exports.resolvePointerImportOfConfig = resolvePointerImportOfConfig;
|
|
7
|
+
exports.resolvePointerImport = resolvePointerImport;
|
|
8
|
+
exports.clearFilesEnvMap = clearFilesEnvMap;
|
|
7
9
|
const picocolors_1 = __importDefault(require("@brillout/picocolors"));
|
|
8
10
|
const utils_js_1 = require("../../../../utils.js");
|
|
9
11
|
const transformFileImports_js_1 = require("./transformFileImports.js");
|
|
@@ -26,7 +28,6 @@ function resolvePointerImportOfConfig(configValue, importerFilePath, userRootDir
|
|
|
26
28
|
fileExportPathToShowToUser
|
|
27
29
|
};
|
|
28
30
|
}
|
|
29
|
-
exports.resolvePointerImportOfConfig = resolvePointerImportOfConfig;
|
|
30
31
|
function resolvePointerImport(pointerImportData, importerFilePath, userRootDir) {
|
|
31
32
|
const { importPath } = pointerImportData;
|
|
32
33
|
const filePathAbsoluteFilesystem = resolveImportPathWithNode(pointerImportData, importerFilePath);
|
|
@@ -70,7 +71,6 @@ function resolvePointerImport(pointerImportData, importerFilePath, userRootDir)
|
|
|
70
71
|
}
|
|
71
72
|
return filePath;
|
|
72
73
|
}
|
|
73
|
-
exports.resolvePointerImport = resolvePointerImport;
|
|
74
74
|
function resolveImportPathWithNode(pointerImportData, importerFilePath) {
|
|
75
75
|
const importerFilePathAbsolute = importerFilePath.filePathAbsoluteFilesystem;
|
|
76
76
|
(0, utils_js_1.assertPosixPath)(importerFilePathAbsolute);
|
|
@@ -126,4 +126,3 @@ function assertFileEnv(filePathAbsoluteFilesystem, importPath, configEnv, config
|
|
|
126
126
|
function clearFilesEnvMap() {
|
|
127
127
|
filesEnvMap.clear();
|
|
128
128
|
}
|
|
129
|
-
exports.clearFilesEnvMap = clearFilesEnvMap;
|
package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/transformFileImports.js
CHANGED
|
@@ -3,7 +3,9 @@ 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.
|
|
6
|
+
exports.transformFileImports = transformFileImports;
|
|
7
|
+
exports.parsePointerImportData = parsePointerImportData;
|
|
8
|
+
exports.isPointerImportData = isPointerImportData;
|
|
7
9
|
// Playground: https://github.com/brillout/acorn-playground
|
|
8
10
|
// Notes about `with { type: 'pointer' }`
|
|
9
11
|
// - It works well with TypeScript: it doesn't complain upon `with { type: 'unknown-to-typescript' }` and go-to-definition & types are preserved: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-3.html#import-attributes
|
|
@@ -105,7 +107,6 @@ skipWarnings) {
|
|
|
105
107
|
const codeMod = spliceMany(code, spliceOperations);
|
|
106
108
|
return codeMod;
|
|
107
109
|
}
|
|
108
|
-
exports.transformFileImports = transformFileImports;
|
|
109
110
|
function getImports(code) {
|
|
110
111
|
const { body } = (0, acorn_1.parse)(code, {
|
|
111
112
|
ecmaVersion: 'latest',
|
|
@@ -130,7 +131,6 @@ function serializePointerImportData({ importPath, exportName, importStringWasGen
|
|
|
130
131
|
function isPointerImportData(str) {
|
|
131
132
|
return str.startsWith(import_ + SEP) || str.startsWith(zeroWidthSpace + import_ + SEP);
|
|
132
133
|
}
|
|
133
|
-
exports.isPointerImportData = isPointerImportData;
|
|
134
134
|
function parsePointerImportData(importString) {
|
|
135
135
|
if (!isPointerImportData(importString)) {
|
|
136
136
|
return null;
|
|
@@ -152,7 +152,6 @@ function parsePointerImportData(importString) {
|
|
|
152
152
|
const importPath = parts.slice(0, -1).join(SEP);
|
|
153
153
|
return { importPath, exportName, importStringWasGenerated, importString };
|
|
154
154
|
}
|
|
155
|
-
exports.parsePointerImportData = parsePointerImportData;
|
|
156
155
|
function spliceMany(str, operations) {
|
|
157
156
|
let strMod = '';
|
|
158
157
|
let endPrev;
|
|
@@ -3,7 +3,10 @@ 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.
|
|
6
|
+
exports.transpileAndExecuteFile = transpileAndExecuteFile;
|
|
7
|
+
exports.getConfigBuildErrorFormatted = getConfigBuildErrorFormatted;
|
|
8
|
+
exports.getConfigExecutionErrorIntroMsg = getConfigExecutionErrorIntroMsg;
|
|
9
|
+
exports.isTemporaryBuildFile = isTemporaryBuildFile;
|
|
7
10
|
const esbuild_1 = require("esbuild");
|
|
8
11
|
const fs_1 = __importDefault(require("fs"));
|
|
9
12
|
const path_1 = __importDefault(require("path"));
|
|
@@ -36,7 +39,6 @@ async function transpileAndExecuteFile(filePath, userRootDir, isConfigFile) {
|
|
|
36
39
|
return { fileExports };
|
|
37
40
|
}
|
|
38
41
|
}
|
|
39
|
-
exports.transpileAndExecuteFile = transpileAndExecuteFile;
|
|
40
42
|
async function transpileFile(filePath, transformImports, userRootDir) {
|
|
41
43
|
const { filePathAbsoluteFilesystem, filePathToShowToUserResolved } = filePath;
|
|
42
44
|
(0, utils_js_1.assertPosixPath)(filePathAbsoluteFilesystem);
|
|
@@ -276,7 +278,6 @@ function getConfigBuildErrorFormatted(err) {
|
|
|
276
278
|
(0, utils_js_1.assert)(typeof err[formatted] === 'string');
|
|
277
279
|
return err[formatted];
|
|
278
280
|
}
|
|
279
|
-
exports.getConfigBuildErrorFormatted = getConfigBuildErrorFormatted;
|
|
280
281
|
async function formatBuildErr(err, filePath) {
|
|
281
282
|
(0, utils_js_1.assert)((0, utils_js_1.isObject)(err) && err.errors);
|
|
282
283
|
const msgEsbuild = (await (0, esbuild_1.formatMessages)(err.errors, {
|
|
@@ -295,7 +296,6 @@ function getConfigExecutionErrorIntroMsg(err) {
|
|
|
295
296
|
const errIntroMsg = execErrIntroMsg.get(err);
|
|
296
297
|
return errIntroMsg ?? null;
|
|
297
298
|
}
|
|
298
|
-
exports.getConfigExecutionErrorIntroMsg = getConfigExecutionErrorIntroMsg;
|
|
299
299
|
function getTemporaryBuildFilePath(filePathAbsoluteFilesystem) {
|
|
300
300
|
(0, utils_js_1.assertPosixPath)(filePathAbsoluteFilesystem);
|
|
301
301
|
const dirname = path_1.default.posix.dirname(filePathAbsoluteFilesystem);
|
|
@@ -310,7 +310,6 @@ function isTemporaryBuildFile(filePath) {
|
|
|
310
310
|
const fileName = path_1.default.posix.basename(filePath);
|
|
311
311
|
return /\.build-[a-z0-9]{12}\.mjs$/.test(fileName);
|
|
312
312
|
}
|
|
313
|
-
exports.isTemporaryBuildFile = isTemporaryBuildFile;
|
|
314
313
|
function isHeaderFile(filePath) {
|
|
315
314
|
(0, utils_js_1.assertPosixPath)(filePath);
|
|
316
315
|
const fileExtensions = getFileExtensions(filePath);
|
|
@@ -3,7 +3,12 @@ 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.
|
|
6
|
+
exports.vikeConfigDependencies = void 0;
|
|
7
|
+
exports.getVikeConfig = getVikeConfig;
|
|
8
|
+
exports.reloadVikeConfig = reloadVikeConfig;
|
|
9
|
+
exports.isVikeConfigFile = isVikeConfigFile;
|
|
10
|
+
exports.isV1Design = isV1Design;
|
|
11
|
+
exports.getConfigValueInterfaceFile = getConfigValueInterfaceFile;
|
|
7
12
|
const utils_js_1 = require("../../../utils.js");
|
|
8
13
|
const path_1 = __importDefault(require("path"));
|
|
9
14
|
const configDefinitionsBuiltIn_js_1 = require("./getVikeConfig/configDefinitionsBuiltIn.js");
|
|
@@ -35,7 +40,6 @@ function reloadVikeConfig(userRootDir, outDirRoot) {
|
|
|
35
40
|
vikeConfigPromise = loadVikeConfig_withErrorHandling(userRootDir, outDirRoot, true, true);
|
|
36
41
|
handleReloadSideEffects();
|
|
37
42
|
}
|
|
38
|
-
exports.reloadVikeConfig = reloadVikeConfig;
|
|
39
43
|
async function handleReloadSideEffects() {
|
|
40
44
|
wasConfigInvalid = !!isConfigInvalid_js_1.isConfigInvalid;
|
|
41
45
|
const vikeConfigPromisePrevious = vikeConfigPromise;
|
|
@@ -76,14 +80,12 @@ async function getVikeConfig(config, isDev, { crawlWithGit, tolerateInvalidConfi
|
|
|
76
80
|
}
|
|
77
81
|
return await vikeConfigPromise;
|
|
78
82
|
}
|
|
79
|
-
exports.getVikeConfig = getVikeConfig;
|
|
80
83
|
async function isV1Design(config, isDev) {
|
|
81
84
|
const vikeConfig = await getVikeConfig(config, isDev);
|
|
82
85
|
const { pageConfigs } = vikeConfig;
|
|
83
86
|
const isV1Design = pageConfigs.length > 0;
|
|
84
87
|
return isV1Design;
|
|
85
88
|
}
|
|
86
|
-
exports.isV1Design = isV1Design;
|
|
87
89
|
async function loadInterfaceFiles(userRootDir, outDirRoot, isDev, crawlWithGit) {
|
|
88
90
|
const plusFiles = await findPlusFiles(userRootDir, outDirRoot, isDev, crawlWithGit);
|
|
89
91
|
const configFiles = [];
|
|
@@ -923,7 +925,6 @@ function determineIsErrorPage(routeFilesystem) {
|
|
|
923
925
|
function isVikeConfigFile(filePath) {
|
|
924
926
|
return !!getConfigName(filePath);
|
|
925
927
|
}
|
|
926
|
-
exports.isVikeConfigFile = isVikeConfigFile;
|
|
927
928
|
function getConfigEnvValue(val, errMsgIntro) {
|
|
928
929
|
const errInvalidValue = `${errMsgIntro} an invalid value ${picocolors_1.default.cyan(JSON.stringify(val))}`;
|
|
929
930
|
// Legacy outdated values
|
|
@@ -1007,4 +1008,3 @@ function sortConfigValueSources(configValueSources, locationIdPage) {
|
|
|
1007
1008
|
function getConfigValueInterfaceFile(interfaceFile, configName) {
|
|
1008
1009
|
return interfaceFile.fileExportsByConfigName[configName]?.configValue;
|
|
1009
1010
|
}
|
|
1010
|
-
exports.getConfigValueInterfaceFile = getConfigValueInterfaceFile;
|
package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVirtualFilePageConfigValuesAll.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getVirtualFilePageConfigValuesAll =
|
|
3
|
+
exports.getVirtualFilePageConfigValuesAll = getVirtualFilePageConfigValuesAll;
|
|
4
4
|
const utils_js_1 = require("../../../utils.js");
|
|
5
5
|
const virtualFilePageConfigValuesAll_js_1 = require("../../../../shared/virtual-files/virtualFilePageConfigValuesAll.js");
|
|
6
6
|
const getVikeConfig_js_1 = require("./getVikeConfig.js");
|
|
@@ -29,7 +29,6 @@ async function getVirtualFilePageConfigValuesAll(id, isDev, config) {
|
|
|
29
29
|
(0, debug_js_1.debug)(id, isForClientSide ? 'CLIENT-SIDE' : 'SERVER-SIDE', code);
|
|
30
30
|
return code;
|
|
31
31
|
}
|
|
32
|
-
exports.getVirtualFilePageConfigValuesAll = getVirtualFilePageConfigValuesAll;
|
|
33
32
|
function getLoadConfigValuesAll(pageConfig, isForClientSide, pageId, includeAssetsImportedByServer, isDev) {
|
|
34
33
|
const lines = [];
|
|
35
34
|
const importStatements = [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getVirtualFilePageConfigs =
|
|
3
|
+
exports.getVirtualFilePageConfigs = getVirtualFilePageConfigs;
|
|
4
4
|
const virtualFilePageConfigValuesAll_js_1 = require("../../../../shared/virtual-files/virtualFilePageConfigValuesAll.js");
|
|
5
5
|
const debug_js_1 = require("./debug.js");
|
|
6
6
|
const getVikeConfig_js_1 = require("./getVikeConfig.js");
|
|
@@ -10,7 +10,6 @@ async function getVirtualFilePageConfigs(isForClientSide, isDev, id, isClientRou
|
|
|
10
10
|
const { pageConfigs, pageConfigGlobal } = await (0, getVikeConfig_js_1.getVikeConfig)(config, isDev, { tolerateInvalidConfig: true });
|
|
11
11
|
return getCode(pageConfigs, pageConfigGlobal, isForClientSide, isDev, id, isClientRouting);
|
|
12
12
|
}
|
|
13
|
-
exports.getVirtualFilePageConfigs = getVirtualFilePageConfigs;
|
|
14
13
|
function getCode(pageConfigs, pageConfigGlobal, isForClientSide, isDev, id, isClientRouting) {
|
|
15
14
|
const lines = [];
|
|
16
15
|
const importStatements = [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isRuntimeEnvMatch =
|
|
3
|
+
exports.isRuntimeEnvMatch = isRuntimeEnvMatch;
|
|
4
4
|
function isRuntimeEnvMatch(configEnv, runtime) {
|
|
5
5
|
// Runtime
|
|
6
6
|
if (!runtime.isForClientSide) {
|
|
@@ -21,4 +21,3 @@ function isRuntimeEnvMatch(configEnv, runtime) {
|
|
|
21
21
|
return false;
|
|
22
22
|
return true;
|
|
23
23
|
}
|
|
24
|
-
exports.isRuntimeEnvMatch = isRuntimeEnvMatch;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Reproduction: https://github.com/brillout/vite-plugin-ssr-server-import-syntax
|
|
9
9
|
*/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.packageJsonFile =
|
|
11
|
+
exports.packageJsonFile = packageJsonFile;
|
|
12
12
|
const rollupIsEsm_js_1 = require("../shared/rollupIsEsm.js");
|
|
13
13
|
const utils_js_1 = require("../utils.js");
|
|
14
14
|
function packageJsonFile() {
|
|
@@ -34,7 +34,6 @@ function packageJsonFile() {
|
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
exports.packageJsonFile = packageJsonFile;
|
|
38
37
|
function getPackageJsonContent(isEsm) {
|
|
39
38
|
if (isEsm) {
|
|
40
39
|
return `{ "type": "module" }`;
|
|
@@ -3,7 +3,7 @@ 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.previewConfig =
|
|
6
|
+
exports.previewConfig = previewConfig;
|
|
7
7
|
const utils_js_1 = require("../utils.js");
|
|
8
8
|
const getConfigVike_js_1 = require("../../shared/getConfigVike.js");
|
|
9
9
|
const fs_1 = __importDefault(require("fs"));
|
|
@@ -67,4 +67,3 @@ function previewConfig() {
|
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
exports.previewConfig = previewConfig;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Because it injects `require('module')` into the build which chokes bundlers, such as Cloudflare Workers's webpack-based bundler.
|
|
4
4
|
// The minimal added value of deduping React is not worth the trouble; we simply remove Vite's deduping functionality for production.
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.removeRequireHookPlugin =
|
|
6
|
+
exports.removeRequireHookPlugin = removeRequireHookPlugin;
|
|
7
7
|
function removeRequireHookPlugin() {
|
|
8
8
|
return {
|
|
9
9
|
name: 'vike:removeRequireHookPlugin',
|
|
@@ -15,4 +15,3 @@ function removeRequireHookPlugin() {
|
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
exports.removeRequireHookPlugin = removeRequireHookPlugin;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setGlobalContext =
|
|
3
|
+
exports.setGlobalContext = setGlobalContext;
|
|
4
4
|
const globalContext_js_1 = require("../../runtime/globalContext.js");
|
|
5
5
|
const utils_js_1 = require("../utils.js");
|
|
6
6
|
function setGlobalContext() {
|
|
@@ -26,4 +26,3 @@ function setGlobalContext() {
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
exports.setGlobalContext = setGlobalContext;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Suppress Rollup warnings `Generated an empty chunk: "index.page.server"`
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.suppressRollupWarning =
|
|
4
|
+
exports.suppressRollupWarning = suppressRollupWarning;
|
|
5
5
|
function suppressRollupWarning() {
|
|
6
6
|
return {
|
|
7
7
|
name: 'vike:suppressRollupWarning',
|
|
@@ -28,7 +28,6 @@ function suppressRollupWarning() {
|
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
exports.suppressRollupWarning = suppressRollupWarning;
|
|
32
31
|
/** Suppress warning about Rollup removing the React Server Components `"use client";` directives */
|
|
33
32
|
function suppressUseClientDirective(warning) {
|
|
34
33
|
return warning.code === 'MODULE_LEVEL_DIRECTIVE' && warning.message.includes('"use client"');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.workaroundCssModuleHmr =
|
|
3
|
+
exports.workaroundCssModuleHmr = workaroundCssModuleHmr;
|
|
4
4
|
function workaroundCssModuleHmr() {
|
|
5
5
|
return {
|
|
6
6
|
name: 'vike:workaroundCssModuleHmr',
|
|
@@ -13,4 +13,3 @@ function workaroundCssModuleHmr() {
|
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
exports.workaroundCssModuleHmr = workaroundCssModuleHmr;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveClientEntriesDev =
|
|
3
|
+
exports.resolveClientEntriesDev = resolveClientEntriesDev;
|
|
4
4
|
const utils_js_1 = require("./utils.js");
|
|
5
5
|
const module_1 = require("module");
|
|
6
6
|
const path_1 = require("path");
|
|
@@ -56,4 +56,3 @@ async function resolveClientEntriesDev(clientEntry, viteDevServer) {
|
|
|
56
56
|
(0, utils_js_1.assertPosixPath)(filePath);
|
|
57
57
|
return filePath;
|
|
58
58
|
}
|
|
59
|
-
exports.resolveClientEntriesDev = resolveClientEntriesDev;
|
|
@@ -3,7 +3,7 @@ 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.addSsrMiddleware =
|
|
6
|
+
exports.addSsrMiddleware = addSsrMiddleware;
|
|
7
7
|
const renderPage_js_1 = require("../../runtime/renderPage.js");
|
|
8
8
|
const utils_js_1 = require("../utils.js");
|
|
9
9
|
const picocolors_1 = __importDefault(require("@brillout/picocolors"));
|
|
@@ -54,4 +54,3 @@ function addSsrMiddleware(middlewares, config, isPreview) {
|
|
|
54
54
|
httpResponse.pipe(res);
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
-
exports.addSsrMiddleware = addSsrMiddleware;
|
|
@@ -3,7 +3,7 @@ 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.findPageFiles =
|
|
6
|
+
exports.findPageFiles = findPageFiles;
|
|
7
7
|
const fast_glob_1 = __importDefault(require("fast-glob"));
|
|
8
8
|
const utils_js_1 = require("../utils.js");
|
|
9
9
|
const picocolors_1 = __importDefault(require("@brillout/picocolors"));
|
|
@@ -22,4 +22,3 @@ async function findPageFiles(config, fileTypes, isDev) {
|
|
|
22
22
|
}
|
|
23
23
|
return pageFiles;
|
|
24
24
|
}
|
|
25
|
-
exports.findPageFiles = findPageFiles;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAssetsDir =
|
|
3
|
+
exports.getAssetsDir = getAssetsDir;
|
|
4
4
|
const utils_js_1 = require("../utils.js");
|
|
5
5
|
function getAssetsDir(config) {
|
|
6
6
|
let { assetsDir } = config.build;
|
|
@@ -8,4 +8,3 @@ function getAssetsDir(config) {
|
|
|
8
8
|
assetsDir = assetsDir.split(/\/|\\/).filter(Boolean).join('/');
|
|
9
9
|
return assetsDir;
|
|
10
10
|
}
|
|
11
|
-
exports.getAssetsDir = getAssetsDir;
|