vike 0.4.222-commit-fab3841 → 0.4.223-commit-6f064ad
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/node/plugin/index.js +5 -3
- package/dist/cjs/node/plugin/plugins/baseUrls.js +3 -1
- package/dist/cjs/node/plugin/plugins/buildApp.js +5 -2
- package/dist/cjs/node/plugin/plugins/buildConfig/fixServerAssets.js +49 -19
- package/dist/cjs/node/plugin/plugins/buildConfig.js +3 -1
- package/dist/cjs/node/plugin/plugins/commonConfig.js +17 -1
- package/dist/cjs/node/plugin/plugins/devConfig/determineOptimizeDeps.js +1 -1
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/assertExtensions.js +4 -4
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.js +6 -1
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/crawlPlusFiles.js +10 -9
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/transpileAndExecuteFile.js +8 -5
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +24 -52
- package/dist/cjs/node/plugin/shared/findPageFiles.js +3 -3
- package/dist/cjs/node/prerender/runPrerender.js +3 -1
- package/dist/cjs/node/runtime/renderPage/logErrorHint.js +7 -1
- package/dist/cjs/shared/getPageContextUrlComputed.js +1 -1
- package/dist/cjs/shared/page-configs/serialize/serializeConfigValues.js +16 -6
- package/dist/cjs/utils/PROJECT_VERSION.js +1 -1
- package/dist/cjs/utils/findFile.js +1 -1
- package/dist/esm/client/client-routing-runtime/index.d.ts +1 -0
- package/dist/esm/client/client-routing-runtime/index.js +1 -0
- package/dist/esm/client/client-routing-runtime/renderPageClientSide.d.ts +8 -0
- package/dist/esm/client/client-routing-runtime/renderPageClientSide.js +10 -1
- package/dist/esm/node/plugin/index.d.ts +2 -1
- package/dist/esm/node/plugin/index.js +1 -0
- package/dist/esm/node/plugin/plugins/baseUrls.js +3 -1
- package/dist/esm/node/plugin/plugins/buildApp.js +5 -2
- package/dist/esm/node/plugin/plugins/buildConfig/fixServerAssets.js +49 -19
- package/dist/esm/node/plugin/plugins/buildConfig.js +3 -1
- package/dist/esm/node/plugin/plugins/commonConfig.d.ts +14 -6
- package/dist/esm/node/plugin/plugins/commonConfig.js +17 -1
- package/dist/esm/node/plugin/plugins/devConfig/determineOptimizeDeps.js +1 -1
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/assertExtensions.js +4 -4
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.js +6 -1
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/crawlPlusFiles.js +9 -8
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/transpileAndExecuteFile.js +8 -5
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.d.ts +3 -3
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +25 -53
- package/dist/esm/node/plugin/shared/findPageFiles.js +3 -3
- package/dist/esm/node/prerender/runPrerender.js +3 -1
- package/dist/esm/node/runtime/renderPage/logErrorHint.js +7 -1
- package/dist/esm/shared/getPageContextUrlComputed.js +1 -1
- package/dist/esm/shared/page-configs/PageConfig.d.ts +3 -2
- package/dist/esm/shared/page-configs/serialize/serializeConfigValues.d.ts +2 -0
- package/dist/esm/shared/page-configs/serialize/serializeConfigValues.js +16 -6
- package/dist/esm/utils/PROJECT_VERSION.d.ts +1 -1
- package/dist/esm/utils/PROJECT_VERSION.js +1 -1
- package/dist/esm/utils/findFile.js +1 -1
- package/dist/esm/utils/projectInfo.d.ts +1 -1
- package/package.json +2 -2
|
@@ -3,10 +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.version = void 0;
|
|
6
|
+
exports.version = exports.getVikeConfig = void 0;
|
|
7
7
|
exports.plugin = plugin;
|
|
8
8
|
exports.ssr = plugin;
|
|
9
9
|
exports.default = plugin;
|
|
10
|
+
var commonConfig_js_1 = require("./plugins/commonConfig.js");
|
|
11
|
+
Object.defineProperty(exports, "getVikeConfig", { enumerable: true, get: function () { return commonConfig_js_1.getVikeConfigPublic; } });
|
|
10
12
|
var utils_js_1 = require("./utils.js");
|
|
11
13
|
Object.defineProperty(exports, "version", { enumerable: true, get: function () { return utils_js_1.PROJECT_VERSION; } });
|
|
12
14
|
const utils_js_2 = require("./utils.js");
|
|
@@ -23,7 +25,7 @@ const extractExportNamesPlugin_js_1 = require("./plugins/extractExportNamesPlugi
|
|
|
23
25
|
const suppressRollupWarning_js_1 = require("./plugins/suppressRollupWarning.js");
|
|
24
26
|
const setGlobalContext_js_1 = require("./plugins/setGlobalContext.js");
|
|
25
27
|
const index_js_3 = require("./plugins/buildEntry/index.js");
|
|
26
|
-
const
|
|
28
|
+
const commonConfig_js_2 = require("./plugins/commonConfig.js");
|
|
27
29
|
const baseUrls_js_1 = require("./plugins/baseUrls.js");
|
|
28
30
|
const envVars_js_1 = require("./plugins/envVars.js");
|
|
29
31
|
const picocolors_1 = __importDefault(require("@brillout/picocolors"));
|
|
@@ -38,7 +40,7 @@ const buildApp_js_1 = require("./plugins/buildApp.js");
|
|
|
38
40
|
// Return `PluginInterop` instead of `Plugin` to avoid type mismatch upon different Vite versions
|
|
39
41
|
function plugin(vikeVitePluginOptions = {}) {
|
|
40
42
|
const plugins = [
|
|
41
|
-
...(0,
|
|
43
|
+
...(0, commonConfig_js_2.commonConfig)(vikeVitePluginOptions),
|
|
42
44
|
(0, index_js_2.importUserCode)(),
|
|
43
45
|
...(0, index_js_1.devConfig)(),
|
|
44
46
|
...(0, buildConfig_js_1.buildConfig)(),
|
|
@@ -4,6 +4,7 @@ exports.baseUrls = baseUrls;
|
|
|
4
4
|
const resolveBase_js_1 = require("../../shared/resolveBase.js");
|
|
5
5
|
const utils_js_1 = require("../utils.js");
|
|
6
6
|
const getVikeConfig_js_1 = require("./importUserCode/v1-design/getVikeConfig.js");
|
|
7
|
+
const commonConfig_js_1 = require("./commonConfig.js");
|
|
7
8
|
function baseUrls() {
|
|
8
9
|
let basesResolved;
|
|
9
10
|
return {
|
|
@@ -13,7 +14,8 @@ function baseUrls() {
|
|
|
13
14
|
const isDev = config._isDev;
|
|
14
15
|
(0, utils_js_1.assert)(typeof isDev === 'boolean');
|
|
15
16
|
const baseViteOriginal = config.base ?? '/__UNSET__'; // '/__UNSET__' because Vite resolves `_baseViteOriginal: null` to `undefined`
|
|
16
|
-
|
|
17
|
+
const vike = (0, commonConfig_js_1.getVikeConfigPublic)(config);
|
|
18
|
+
basesResolved = (0, resolveBase_js_1.resolveBase)(baseViteOriginal, vike.config.baseServer ?? null, vike.config.baseAssets ?? null);
|
|
17
19
|
// We cannot define these in configResolved() because Vite picks up the env variables before any configResolved() hook is called
|
|
18
20
|
process.env.BASE_SERVER = basesResolved.baseServer;
|
|
19
21
|
process.env.BASE_ASSETS = basesResolved.baseAssets;
|
|
@@ -7,6 +7,7 @@ const getOutDirs_js_1 = require("../shared/getOutDirs.js");
|
|
|
7
7
|
const utils_js_1 = require("../utils.js");
|
|
8
8
|
const getVikeConfig_js_1 = require("./importUserCode/v1-design/getVikeConfig.js");
|
|
9
9
|
const getFullBuildInlineConfig_js_1 = require("../shared/getFullBuildInlineConfig.js");
|
|
10
|
+
const commonConfig_js_1 = require("./commonConfig.js");
|
|
10
11
|
function buildApp() {
|
|
11
12
|
let config;
|
|
12
13
|
// `builder.buildApp` can be overriden by another plugin e.g vike-vercel https://github.com/vikejs/vike/pull/2184#issuecomment-2659425195
|
|
@@ -17,7 +18,8 @@ function buildApp() {
|
|
|
17
18
|
name: 'vike:buildApp',
|
|
18
19
|
apply: 'build',
|
|
19
20
|
config(config) {
|
|
20
|
-
|
|
21
|
+
const vike = (0, commonConfig_js_1.getVikeConfigPublic)(config);
|
|
22
|
+
if (!vike.config.viteEnvironmentAPI)
|
|
21
23
|
return;
|
|
22
24
|
return {
|
|
23
25
|
builder: {
|
|
@@ -62,7 +64,8 @@ function buildApp() {
|
|
|
62
64
|
config = _config;
|
|
63
65
|
},
|
|
64
66
|
async writeBundle() {
|
|
65
|
-
|
|
67
|
+
const vike = (0, commonConfig_js_1.getVikeConfigPublic)(config);
|
|
68
|
+
if (!vike.config.viteEnvironmentAPI)
|
|
66
69
|
return;
|
|
67
70
|
const vikeConfig = await (0, getVikeConfig_js_1.getVikeConfig)(config);
|
|
68
71
|
if (!(0, context_js_1.isPrerenderAutoRunEnabled)(vikeConfig))
|
|
@@ -35,8 +35,8 @@ async function fixServerAssets(config) {
|
|
|
35
35
|
const outDirs = (0, getOutDirs_js_1.getOutDirs)(config);
|
|
36
36
|
const clientManifest = await loadManifest(outDirs.outDirClient);
|
|
37
37
|
const serverManifest = await loadManifest(outDirs.outDirServer);
|
|
38
|
-
const { clientManifestMod, serverManifestMod,
|
|
39
|
-
await copyAssets(
|
|
38
|
+
const { clientManifestMod, serverManifestMod, filesToMove, filesToRemove } = addServerAssets(clientManifest, serverManifest);
|
|
39
|
+
await copyAssets(filesToMove, filesToRemove, config);
|
|
40
40
|
return { clientManifestMod, serverManifestMod };
|
|
41
41
|
}
|
|
42
42
|
async function loadManifest(outDir) {
|
|
@@ -47,15 +47,15 @@ async function loadManifest(outDir) {
|
|
|
47
47
|
(0, utils_js_1.assert)(manifest);
|
|
48
48
|
return manifest;
|
|
49
49
|
}
|
|
50
|
-
async function copyAssets(
|
|
50
|
+
async function copyAssets(filesToMove, filesToRemove, config) {
|
|
51
51
|
const { outDirClient, outDirServer } = (0, getOutDirs_js_1.getOutDirs)(config);
|
|
52
52
|
const assetsDir = (0, getAssetsDir_js_1.getAssetsDir)(config);
|
|
53
53
|
const assetsDirServer = path_1.default.posix.join(outDirServer, assetsDir);
|
|
54
|
-
if (!
|
|
54
|
+
if (!filesToMove.length && !filesToRemove.length && !(0, fs_2.existsSync)(assetsDirServer))
|
|
55
55
|
return;
|
|
56
56
|
(0, utils_js_1.assert)((0, fs_2.existsSync)(assetsDirServer));
|
|
57
57
|
const concurrencyLimit = (0, utils_js_1.pLimit)(10);
|
|
58
|
-
await Promise.all(
|
|
58
|
+
await Promise.all(filesToMove.map((file) => concurrencyLimit(async () => {
|
|
59
59
|
const source = path_1.default.posix.join(outDirServer, file);
|
|
60
60
|
const target = path_1.default.posix.join(outDirClient, file);
|
|
61
61
|
await promises_1.default.mkdir(path_1.default.posix.dirname(target), { recursive: true });
|
|
@@ -91,19 +91,20 @@ function addServerAssets(clientManifest, serverManifest) {
|
|
|
91
91
|
(0, utils_js_1.assert)(!entriesServer.has(pageId));
|
|
92
92
|
entriesServer.set(pageId, { key, ...resources });
|
|
93
93
|
}
|
|
94
|
-
let
|
|
94
|
+
let filesToMove = [];
|
|
95
95
|
let filesToRemove = [];
|
|
96
|
+
// Copy page assets
|
|
96
97
|
for (const [pageId, entryClient] of entriesClient.entries()) {
|
|
97
98
|
const entryServer = entriesServer.get(pageId);
|
|
98
99
|
if (!entryServer)
|
|
99
100
|
continue;
|
|
100
|
-
const
|
|
101
|
+
const cssToMove = [];
|
|
101
102
|
const cssToRemove = [];
|
|
102
|
-
const
|
|
103
|
+
const assetsToMove = [];
|
|
103
104
|
const assetsToRemove = [];
|
|
104
105
|
entryServer.css.forEach((cssServer) => {
|
|
105
106
|
if (!entryClient.css.some((cssClient) => cssServer.hash === cssClient.hash)) {
|
|
106
|
-
|
|
107
|
+
cssToMove.push(cssServer.src);
|
|
107
108
|
}
|
|
108
109
|
else {
|
|
109
110
|
cssToRemove.push(cssServer.src);
|
|
@@ -111,17 +112,17 @@ function addServerAssets(clientManifest, serverManifest) {
|
|
|
111
112
|
});
|
|
112
113
|
entryServer.assets.forEach((assetServer) => {
|
|
113
114
|
if (!entryClient.assets.some((assetClient) => assetServer.hash === assetClient.hash)) {
|
|
114
|
-
|
|
115
|
+
assetsToMove.push(assetServer.src);
|
|
115
116
|
}
|
|
116
117
|
else {
|
|
117
118
|
assetsToRemove.push(assetServer.src);
|
|
118
119
|
}
|
|
119
120
|
});
|
|
120
|
-
if (
|
|
121
|
+
if (cssToMove.length) {
|
|
121
122
|
const { key } = entryClient;
|
|
122
|
-
|
|
123
|
+
filesToMove.push(...cssToMove);
|
|
123
124
|
(_a = clientManifest[key]).css ?? (_a.css = []);
|
|
124
|
-
clientManifest[key].css?.push(...
|
|
125
|
+
clientManifest[key].css?.push(...cssToMove);
|
|
125
126
|
}
|
|
126
127
|
if (cssToRemove.length) {
|
|
127
128
|
const { key } = entryServer;
|
|
@@ -129,11 +130,11 @@ function addServerAssets(clientManifest, serverManifest) {
|
|
|
129
130
|
(_b = serverManifest[key]).css ?? (_b.css = []);
|
|
130
131
|
serverManifest[key].css = serverManifest[key].css.filter((entry) => !cssToRemove.includes(entry));
|
|
131
132
|
}
|
|
132
|
-
if (
|
|
133
|
+
if (assetsToMove.length) {
|
|
133
134
|
const { key } = entryClient;
|
|
134
|
-
|
|
135
|
+
filesToMove.push(...assetsToMove);
|
|
135
136
|
(_c = clientManifest[key]).assets ?? (_c.assets = []);
|
|
136
|
-
clientManifest[key].assets?.push(...
|
|
137
|
+
clientManifest[key].assets?.push(...assetsToMove);
|
|
137
138
|
}
|
|
138
139
|
if (assetsToRemove.length) {
|
|
139
140
|
const { key } = entryServer;
|
|
@@ -142,11 +143,40 @@ function addServerAssets(clientManifest, serverManifest) {
|
|
|
142
143
|
serverManifest[key].assets = serverManifest[key].assets.filter((entry) => !assetsToRemove.includes(entry));
|
|
143
144
|
}
|
|
144
145
|
}
|
|
146
|
+
// Also copy assets of virtual:@brillout/vite-plugin-server-entry:serverEntry
|
|
147
|
+
{
|
|
148
|
+
const filesClientAll = [];
|
|
149
|
+
for (const key in clientManifest) {
|
|
150
|
+
const entry = clientManifest[key];
|
|
151
|
+
filesClientAll.push(entry.file);
|
|
152
|
+
filesClientAll.push(...(entry.assets ?? []));
|
|
153
|
+
filesClientAll.push(...(entry.css ?? []));
|
|
154
|
+
}
|
|
155
|
+
for (const key in serverManifest) {
|
|
156
|
+
const entry = serverManifest[key];
|
|
157
|
+
if (!entry.isEntry)
|
|
158
|
+
continue;
|
|
159
|
+
const resources = collectResources(entry, serverManifest);
|
|
160
|
+
const css = resources.css.map((css) => css.src).filter((file) => !filesClientAll.includes(file));
|
|
161
|
+
const assets = resources.assets.map((asset) => asset.src).filter((file) => !filesClientAll.includes(file));
|
|
162
|
+
filesToMove.push(...css, ...assets);
|
|
163
|
+
if (css.length > 0 || assets.length > 0) {
|
|
164
|
+
(0, utils_js_1.assert)(!clientManifest[key]);
|
|
165
|
+
clientManifest[key] = {
|
|
166
|
+
...entry,
|
|
167
|
+
css,
|
|
168
|
+
assets,
|
|
169
|
+
dynamicImports: undefined,
|
|
170
|
+
imports: undefined
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
145
175
|
const clientManifestMod = clientManifest;
|
|
146
176
|
const serverManifestMod = serverManifest;
|
|
147
|
-
|
|
148
|
-
filesToRemove = (0, utils_js_1.unique)(filesToRemove).filter((file) => !
|
|
149
|
-
return { clientManifestMod, serverManifestMod,
|
|
177
|
+
filesToMove = (0, utils_js_1.unique)(filesToMove);
|
|
178
|
+
filesToRemove = (0, utils_js_1.unique)(filesToRemove).filter((file) => !filesToMove.includes(file));
|
|
179
|
+
return { clientManifestMod, serverManifestMod, filesToMove, filesToRemove };
|
|
150
180
|
}
|
|
151
181
|
function getPageId(key) {
|
|
152
182
|
// Normalize from:
|
|
@@ -22,6 +22,7 @@ const getFilePath_js_1 = require("../shared/getFilePath.js");
|
|
|
22
22
|
const getConfigValueBuildTime_js_1 = require("../../../shared/page-configs/getConfigValueBuildTime.js");
|
|
23
23
|
const getOutDirs_js_1 = require("../shared/getOutDirs.js");
|
|
24
24
|
const viteIsSSR_js_1 = require("../shared/viteIsSSR.js");
|
|
25
|
+
const commonConfig_js_1 = require("./commonConfig.js");
|
|
25
26
|
// @ts-ignore Shimmed by dist-cjs-fixup.js for CJS build.
|
|
26
27
|
const importMetaUrl = `file://${__filename}`;
|
|
27
28
|
const require_ = (0, module_1.createRequire)(importMetaUrl);
|
|
@@ -63,11 +64,12 @@ function buildConfig() {
|
|
|
63
64
|
order: 'post',
|
|
64
65
|
handler(config) {
|
|
65
66
|
(0, utils_js_1.onSetupBuild)();
|
|
67
|
+
const vike = (0, commonConfig_js_1.getVikeConfigPublic)(config);
|
|
66
68
|
return {
|
|
67
69
|
build: {
|
|
68
70
|
outDir: (0, getOutDirs_js_1.resolveOutDir)(config),
|
|
69
71
|
manifest: manifestTempFile,
|
|
70
|
-
copyPublicDir:
|
|
72
|
+
copyPublicDir: vike.config.viteEnvironmentAPI
|
|
71
73
|
? // Already set by buildApp() plugin
|
|
72
74
|
undefined
|
|
73
75
|
: !(0, viteIsSSR_js_1.viteIsSSR)(config)
|
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.commonConfig = commonConfig;
|
|
7
|
+
exports.getVikeConfigPublic = getVikeConfigPublic;
|
|
7
8
|
const vite_1 = require("vite");
|
|
8
9
|
const utils_js_1 = require("../utils.js");
|
|
9
10
|
const buildConfig_js_1 = require("./buildConfig.js");
|
|
@@ -35,7 +36,7 @@ function commonConfig(vikeVitePluginOptions) {
|
|
|
35
36
|
_isDev: isDev,
|
|
36
37
|
_root: root,
|
|
37
38
|
_vikeVitePluginOptions: vikeVitePluginOptions,
|
|
38
|
-
|
|
39
|
+
_vike: {
|
|
39
40
|
pages: vikeConfig.pages,
|
|
40
41
|
config: vikeConfig.global.config
|
|
41
42
|
},
|
|
@@ -173,3 +174,18 @@ function temp_supportOldInterface(config) {
|
|
|
173
174
|
}
|
|
174
175
|
(0, utils_js_1.assert)(false);
|
|
175
176
|
}
|
|
177
|
+
// TODO/soon rename:
|
|
178
|
+
// - `getVikeConfig()` => `resolveVikeConfig()` ?
|
|
179
|
+
// - `getVikeConfigPublic()` => `getVikeConfig()`
|
|
180
|
+
// - `VikeConfigPublic` => `VikeConfig` ?
|
|
181
|
+
// - `VikeConfigObject` => `VikeConfigInternal` ?
|
|
182
|
+
/**
|
|
183
|
+
* Get all the information Vike knows about the app in your Vite plugin.
|
|
184
|
+
*
|
|
185
|
+
* https://vike.dev/getVikeConfig
|
|
186
|
+
*/
|
|
187
|
+
function getVikeConfigPublic(config) {
|
|
188
|
+
const vikeConfig = config._vike;
|
|
189
|
+
(0, utils_js_1.assert)(vikeConfig);
|
|
190
|
+
return vikeConfig;
|
|
191
|
+
}
|
|
@@ -50,7 +50,7 @@ async function getPageDeps(config, pageConfigs) {
|
|
|
50
50
|
sources
|
|
51
51
|
.filter((c) => !c.isOverriden)
|
|
52
52
|
.forEach((configValueSource) => {
|
|
53
|
-
if (!configValueSource.
|
|
53
|
+
if (!configValueSource.valueIsLoadedWithImport && !configValueSource.valueIsFilePath)
|
|
54
54
|
return;
|
|
55
55
|
const { definedAtFilePath, configEnv } = configValueSource;
|
|
56
56
|
if (!configEnv.client)
|
package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/assertExtensions.js
CHANGED
|
@@ -68,8 +68,8 @@ function getConfigRequireValue(plusFile) {
|
|
|
68
68
|
const confVal = (0, getVikeConfig_js_1.getConfVal)(plusFile, 'require');
|
|
69
69
|
if (!confVal)
|
|
70
70
|
return null;
|
|
71
|
-
(0, utils_js_1.assert)(confVal.
|
|
72
|
-
const require = confVal.
|
|
71
|
+
(0, utils_js_1.assert)(confVal.valueIsLoaded);
|
|
72
|
+
const require = confVal.value;
|
|
73
73
|
const { filePathToShowToUserResolved } = plusFile.filePath;
|
|
74
74
|
(0, utils_js_1.assert)(filePathToShowToUserResolved);
|
|
75
75
|
(0, utils_js_1.assertUsage)((0, isObjectOfStrings_js_1.isObjectOfStrings)(require), `The setting ${picocolors_1.default.bold('require')} defined at ${filePathToShowToUserResolved} should be an object with string values (${picocolors_1.default.bold('Record<string, string>')}).`);
|
|
@@ -79,8 +79,8 @@ function getNameValue(plusFile) {
|
|
|
79
79
|
const confVal = (0, getVikeConfig_js_1.getConfVal)(plusFile, 'name');
|
|
80
80
|
if (!confVal)
|
|
81
81
|
return null;
|
|
82
|
-
(0, utils_js_1.assert)(confVal.
|
|
83
|
-
const name = confVal.
|
|
82
|
+
(0, utils_js_1.assert)(confVal.valueIsLoaded);
|
|
83
|
+
const name = confVal.value;
|
|
84
84
|
const filePathToShowToUser = getFilePathToShowToUser(plusFile);
|
|
85
85
|
(0, utils_js_1.assertUsage)(typeof name === 'string', `The setting ${picocolors_1.default.bold('name')} defined at ${filePathToShowToUser} should be a string.`);
|
|
86
86
|
return name;
|
|
@@ -33,7 +33,12 @@ const configDefinitionsBuiltIn = {
|
|
|
33
33
|
cumulative: true
|
|
34
34
|
},
|
|
35
35
|
route: {
|
|
36
|
-
env: {
|
|
36
|
+
env: {
|
|
37
|
+
server: true,
|
|
38
|
+
client: 'if-client-routing',
|
|
39
|
+
// For vite-plugin-vercel
|
|
40
|
+
config: true
|
|
41
|
+
},
|
|
37
42
|
eager: true
|
|
38
43
|
},
|
|
39
44
|
guard: {
|
package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/crawlPlusFiles.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.isPlusFile = isPlusFile;
|
|
|
8
8
|
exports.getPlusFileValueConfigName = getPlusFileValueConfigName;
|
|
9
9
|
const utils_js_1 = require("../../../../utils.js");
|
|
10
10
|
const path_1 = __importDefault(require("path"));
|
|
11
|
-
const
|
|
11
|
+
const tinyglobby_1 = require("tinyglobby");
|
|
12
12
|
const child_process_1 = require("child_process");
|
|
13
13
|
const util_1 = require("util");
|
|
14
14
|
const transpileAndExecuteFile_js_1 = require("./transpileAndExecuteFile.js");
|
|
@@ -40,10 +40,10 @@ async function crawlPlusFiles(userRootDir, outDirAbsoluteFilesystem) {
|
|
|
40
40
|
// Crawl
|
|
41
41
|
const filesGit = !isGitCrawlDisabled() && (await gitLsFiles(userRootDir, outDirRelativeFromUserRootDir));
|
|
42
42
|
const filesGitNothingFound = !filesGit || filesGit.length === 0;
|
|
43
|
-
const filesGlob = (filesGitNothingFound || debug.isActivated) && (await
|
|
43
|
+
const filesGlob = (filesGitNothingFound || debug.isActivated) && (await tinyglobby(userRootDir, outDirRelativeFromUserRootDir));
|
|
44
44
|
let files = !filesGitNothingFound
|
|
45
45
|
? filesGit
|
|
46
|
-
: // Fallback to
|
|
46
|
+
: // Fallback to tinyglobby for users that dynamically generate plus files. (Assuming that no plus file is found because of the user's .gitignore list.)
|
|
47
47
|
filesGlob;
|
|
48
48
|
(0, utils_js_1.assert)(files);
|
|
49
49
|
if (debug.isActivated)
|
|
@@ -52,7 +52,7 @@ async function crawlPlusFiles(userRootDir, outDirAbsoluteFilesystem) {
|
|
|
52
52
|
files = files.filter((filePath) => !(0, transpileAndExecuteFile_js_1.isTemporaryBuildFile)(filePath));
|
|
53
53
|
// Normalize
|
|
54
54
|
const plusFiles = files.map((filePath) => {
|
|
55
|
-
// Both `$ git-ls files` and
|
|
55
|
+
// Both `$ git-ls files` and tinyglobby return posix paths
|
|
56
56
|
(0, utils_js_1.assertPosixPath)(filePath);
|
|
57
57
|
(0, utils_js_1.assert)(!filePath.startsWith(userRootDir));
|
|
58
58
|
const filePathAbsoluteUserRootDir = path_1.default.posix.join('/', filePath);
|
|
@@ -61,7 +61,7 @@ async function crawlPlusFiles(userRootDir, outDirAbsoluteFilesystem) {
|
|
|
61
61
|
});
|
|
62
62
|
return plusFiles;
|
|
63
63
|
}
|
|
64
|
-
// Same as
|
|
64
|
+
// Same as tinyglobby() but using `$ git ls-files`
|
|
65
65
|
async function gitLsFiles(userRootDir, outDirRelativeFromUserRootDir) {
|
|
66
66
|
if (gitIsNotUsable)
|
|
67
67
|
return null;
|
|
@@ -128,15 +128,16 @@ async function gitLsFiles(userRootDir, outDirRelativeFromUserRootDir) {
|
|
|
128
128
|
}
|
|
129
129
|
return files;
|
|
130
130
|
}
|
|
131
|
-
// Same as gitLsFiles() but using
|
|
132
|
-
async function
|
|
131
|
+
// Same as gitLsFiles() but using tinyglobby
|
|
132
|
+
async function tinyglobby(userRootDir, outDirRelativeFromUserRootDir) {
|
|
133
133
|
const pattern = `**/+*.${utils_js_1.scriptFileExtensions}`;
|
|
134
134
|
const options = {
|
|
135
135
|
ignore: getIgnoreAsPatterns(outDirRelativeFromUserRootDir),
|
|
136
136
|
cwd: userRootDir,
|
|
137
|
-
dot: false
|
|
137
|
+
dot: false,
|
|
138
|
+
expandDirectories: false
|
|
138
139
|
};
|
|
139
|
-
const files = await (0,
|
|
140
|
+
const files = await (0, tinyglobby_1.glob)(pattern, options);
|
|
140
141
|
// Make build deterministic, in order to get a stable generated hash for dist/client/assets/entries/entry-client-routing.${hash}.js
|
|
141
142
|
// https://github.com/vikejs/vike/pull/1750
|
|
142
143
|
files.sort();
|
|
@@ -168,14 +168,17 @@ async function transpileWithEsbuild(filePath, userRootDir, transformImports) {
|
|
|
168
168
|
// - vike@0.4.162 started soft-requiring Vike extensions to set the name config.
|
|
169
169
|
// - In practice, it seems like it requires some (non-trivial?) refactoring.
|
|
170
170
|
isVikeExtensionImport;
|
|
171
|
+
// Externalize npm package imports
|
|
171
172
|
(0, utils_js_1.assertPosixPath)(importPathResolved);
|
|
172
|
-
const
|
|
173
|
+
const isNpmPkgImport = importPathResolved.includes('/node_modules/') ||
|
|
174
|
+
// Linked npm packages
|
|
175
|
+
!importPathResolved.startsWith(userRootDir);
|
|
173
176
|
const isExternal = isPointerImport ||
|
|
174
177
|
// Performance: npm package imports can be externalized. (We could as well let esbuild transpile /node_modules/ code but it's useless as /node_modules/ code is already built. It would unnecessarily slow down transpilation.)
|
|
175
|
-
|
|
178
|
+
isNpmPkgImport;
|
|
176
179
|
if (!isExternal) {
|
|
177
180
|
// User-land config code (i.e. not runtime code) => let esbuild transpile it
|
|
178
|
-
(0, utils_js_1.assert)(!isPointerImport && !
|
|
181
|
+
(0, utils_js_1.assert)(!isPointerImport && !isNpmPkgImport);
|
|
179
182
|
if (debug.isActivated)
|
|
180
183
|
debug('onResolved()', { args, resolved, isPointerImport, isExternal });
|
|
181
184
|
return resolved;
|
|
@@ -194,7 +197,7 @@ async function transpileWithEsbuild(filePath, userRootDir, transformImports) {
|
|
|
194
197
|
userRootDir
|
|
195
198
|
});
|
|
196
199
|
// We assuming that path aliases always resolve inside `userRootDir`.
|
|
197
|
-
if (filePathAbsoluteUserRootDir && !
|
|
200
|
+
if (filePathAbsoluteUserRootDir && !isNpmPkgImport) {
|
|
198
201
|
// `importPathOriginal` is a path alias.
|
|
199
202
|
// - We have to use esbuild's path alias resolution, because:
|
|
200
203
|
// - Vike doesn't resolve path aliases at all.
|
|
@@ -216,7 +219,7 @@ async function transpileWithEsbuild(filePath, userRootDir, transformImports) {
|
|
|
216
219
|
// Import of runtime code => handled by Vike
|
|
217
220
|
isPointerImport ||
|
|
218
221
|
// Import of config code => loaded by Node.js at build-time
|
|
219
|
-
|
|
222
|
+
isNpmPkgImport);
|
|
220
223
|
pointerImports[importPathTranspiled] = isPointerImport;
|
|
221
224
|
return { external: true, path: importPathTranspiled };
|
|
222
225
|
});
|
|
@@ -358,8 +358,8 @@ function temp_interopVikeVitePlugin(pageConfigGlobal, vikeVitePluginOptions, use
|
|
|
358
358
|
locationId: '/',
|
|
359
359
|
plusFile: null,
|
|
360
360
|
isOverriden: configDef.cumulative ? false : sources.length > 0,
|
|
361
|
-
|
|
362
|
-
|
|
361
|
+
valueIsLoadedWithImport: false,
|
|
362
|
+
valueIsDefinedByPlusValueFile: false
|
|
363
363
|
});
|
|
364
364
|
});
|
|
365
365
|
}
|
|
@@ -423,20 +423,10 @@ function getPlusFilesOrdered(configName, plusFilesRelevant) {
|
|
|
423
423
|
const plusFilesConfig = plusFilesForConfigName.filter((plusFile) => plusFile.isConfigFile &&
|
|
424
424
|
// We consider extensions (e.g. vike-react) later (i.e. with less priority)
|
|
425
425
|
!plusFile.isExtensionConfig);
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
const plusFileWinner = plusFilesValue[0] ?? plusFilesConfig[0];
|
|
431
|
-
if (plusFileWinner) {
|
|
432
|
-
const plusFilesOverriden = [...plusFilesValue, ...plusFilesConfig].filter((f) => f !== plusFileWinner);
|
|
433
|
-
// A user-land conflict of plusFiles with the same `locationId` (we are iterating over `plusFilesRelevant: PlusFilesByLocationId`) means that the user has superfluously defined the config twice; the user should remove such redundancy as it makes things unnecessarily ambiguous.
|
|
434
|
-
assertOverwrittenConfigFile(plusFileWinner, plusFilesOverriden, configName);
|
|
435
|
-
[plusFileWinner, ...plusFilesOverriden].forEach((plusFile) => {
|
|
436
|
-
(0, utils_js_1.assert)(plusFile.filePath.filePathAbsoluteUserRootDir); // ensure it's a user-land plus file
|
|
437
|
-
populate(plusFile);
|
|
438
|
-
});
|
|
439
|
-
}
|
|
426
|
+
[...plusFilesValue, ...plusFilesConfig].forEach((plusFile) => {
|
|
427
|
+
(0, utils_js_1.assert)(plusFile.filePath.filePathAbsoluteUserRootDir); // ensure it's a user-land plus file
|
|
428
|
+
populate(plusFile);
|
|
429
|
+
});
|
|
440
430
|
}
|
|
441
431
|
// ==========================
|
|
442
432
|
// Side-effect configs (next)
|
|
@@ -488,8 +478,8 @@ function getConfigValueSource(configName, plusFile, configDef, userRootDir, isHi
|
|
|
488
478
|
let valueFilePath;
|
|
489
479
|
if (plusFile.isConfigFile) {
|
|
490
480
|
// Defined over pointer import
|
|
491
|
-
(0, utils_js_1.assert)(confVal.
|
|
492
|
-
const pointerImport = (0, resolvePointerImport_js_1.resolvePointerImport)(confVal.
|
|
481
|
+
(0, utils_js_1.assert)(confVal.valueIsLoaded);
|
|
482
|
+
const pointerImport = (0, resolvePointerImport_js_1.resolvePointerImport)(confVal.value, plusFile.filePath, userRootDir, configName);
|
|
493
483
|
const configDefinedAt = (0, getConfigDefinedAt_js_1.getConfigDefinedAt)('Config', configName, definedAtFilePath_);
|
|
494
484
|
(0, utils_js_1.assertUsage)(pointerImport, `${configDefinedAt} should be an import`);
|
|
495
485
|
valueFilePath = pointerImport.fileExportPath.filePathAbsoluteVite;
|
|
@@ -510,8 +500,8 @@ function getConfigValueSource(configName, plusFile, configDef, userRootDir, isHi
|
|
|
510
500
|
value: valueFilePath,
|
|
511
501
|
valueIsFilePath: true,
|
|
512
502
|
configEnv: configDef.env,
|
|
513
|
-
|
|
514
|
-
|
|
503
|
+
valueIsLoadedWithImport: false,
|
|
504
|
+
valueIsDefinedByPlusValueFile: false,
|
|
515
505
|
isOverriden,
|
|
516
506
|
definedAtFilePath
|
|
517
507
|
};
|
|
@@ -519,8 +509,7 @@ function getConfigValueSource(configName, plusFile, configDef, userRootDir, isHi
|
|
|
519
509
|
}
|
|
520
510
|
// +config.js
|
|
521
511
|
if (plusFile.isConfigFile) {
|
|
522
|
-
(0, utils_js_1.assert)(confVal.
|
|
523
|
-
const { configValue } = confVal;
|
|
512
|
+
(0, utils_js_1.assert)(confVal.valueIsLoaded);
|
|
524
513
|
// Defined over pointer import
|
|
525
514
|
const pointerImport = plusFile.pointerImportsByConfigName[configName];
|
|
526
515
|
if (pointerImport) {
|
|
@@ -536,8 +525,8 @@ function getConfigValueSource(configName, plusFile, configDef, userRootDir, isHi
|
|
|
536
525
|
...configValueSourceCommon,
|
|
537
526
|
...value,
|
|
538
527
|
configEnv: resolveConfigEnv(configDef.env, pointerImport.fileExportPath),
|
|
539
|
-
|
|
540
|
-
|
|
528
|
+
valueIsLoadedWithImport: true,
|
|
529
|
+
valueIsDefinedByPlusValueFile: false,
|
|
541
530
|
isOverriden,
|
|
542
531
|
definedAtFilePath: pointerImport.fileExportPath
|
|
543
532
|
};
|
|
@@ -547,10 +536,10 @@ function getConfigValueSource(configName, plusFile, configDef, userRootDir, isHi
|
|
|
547
536
|
const configValueSource = {
|
|
548
537
|
...configValueSourceCommon,
|
|
549
538
|
valueIsLoaded: true,
|
|
550
|
-
value:
|
|
539
|
+
value: confVal.value,
|
|
551
540
|
configEnv: configDef.env,
|
|
552
|
-
|
|
553
|
-
|
|
541
|
+
valueIsLoadedWithImport: false,
|
|
542
|
+
valueIsDefinedByPlusValueFile: false,
|
|
554
543
|
isOverriden,
|
|
555
544
|
definedAtFilePath: definedAtFilePath_
|
|
556
545
|
};
|
|
@@ -559,22 +548,13 @@ function getConfigValueSource(configName, plusFile, configDef, userRootDir, isHi
|
|
|
559
548
|
// Defined by value file, i.e. +{configName}.js
|
|
560
549
|
if (!plusFile.isConfigFile) {
|
|
561
550
|
const configEnvResolved = resolveConfigEnv(configDef.env, plusFile.filePath);
|
|
562
|
-
|
|
563
|
-
(0, utils_js_1.assert)(valueAlreadyLoaded === !!configEnvResolved.config);
|
|
564
|
-
const value = valueAlreadyLoaded
|
|
565
|
-
? {
|
|
566
|
-
valueIsLoaded: true,
|
|
567
|
-
value: confVal.configValue
|
|
568
|
-
}
|
|
569
|
-
: {
|
|
570
|
-
valueIsLoaded: false
|
|
571
|
-
};
|
|
551
|
+
(0, utils_js_1.assert)(confVal.valueIsLoaded === !!configEnvResolved.config);
|
|
572
552
|
const configValueSource = {
|
|
573
553
|
...configValueSourceCommon,
|
|
574
|
-
...
|
|
554
|
+
...confVal,
|
|
575
555
|
configEnv: configEnvResolved,
|
|
576
|
-
|
|
577
|
-
|
|
556
|
+
valueIsLoadedWithImport: !confVal.valueIsLoaded || !(0, serializeConfigValues_js_1.isJsonValue)(confVal.value),
|
|
557
|
+
valueIsDefinedByPlusValueFile: true,
|
|
578
558
|
isOverriden,
|
|
579
559
|
definedAtFilePath: {
|
|
580
560
|
...plusFile.filePath,
|
|
@@ -588,14 +568,6 @@ function getConfigValueSource(configName, plusFile, configDef, userRootDir, isHi
|
|
|
588
568
|
}
|
|
589
569
|
(0, utils_js_1.assert)(false);
|
|
590
570
|
}
|
|
591
|
-
function assertOverwrittenConfigFile(plusFileWinner, plusFilesOverriden, configName) {
|
|
592
|
-
plusFilesOverriden.forEach((plusFileLoser) => {
|
|
593
|
-
const loserFilePath = plusFileLoser.filePath.filePathToShowToUser;
|
|
594
|
-
const winnerFilePath = plusFileWinner.filePath.filePathToShowToUser;
|
|
595
|
-
const confName = picocolors_1.default.cyan(configName);
|
|
596
|
-
(0, utils_js_1.assertWarning)(false, `The value of the config ${confName} defined at ${loserFilePath} is always overwritten by the value defined at ${winnerFilePath}, remove the superfluous value defined at ${loserFilePath}`, { onlyOnce: true });
|
|
597
|
-
});
|
|
598
|
-
}
|
|
599
571
|
function isDefiningPage(plusFiles) {
|
|
600
572
|
for (const plusFile of plusFiles) {
|
|
601
573
|
const configNames = getDefiningConfigNames(plusFile);
|
|
@@ -629,8 +601,8 @@ function getConfigDefinitions(plusFilesRelevant, filter) {
|
|
|
629
601
|
const confVal = getConfVal(plusFile, 'meta');
|
|
630
602
|
if (!confVal)
|
|
631
603
|
return;
|
|
632
|
-
(0, utils_js_1.assert)(confVal.
|
|
633
|
-
const meta = confVal.
|
|
604
|
+
(0, utils_js_1.assert)(confVal.valueIsLoaded);
|
|
605
|
+
const meta = confVal.value;
|
|
634
606
|
assertMetaUsage(meta, `Config ${picocolors_1.default.cyan('meta')} defined at ${plusFile.filePath.filePathToShowToUser}`);
|
|
635
607
|
// Set configDef._userEffectDefinedAtFilePath
|
|
636
608
|
Object.entries(meta).forEach(([configName, configDef]) => {
|
|
@@ -926,8 +898,8 @@ function getConfVal(plusFile, configName) {
|
|
|
926
898
|
if (!configNames.includes(configName))
|
|
927
899
|
return null;
|
|
928
900
|
if (plusFile.isNotLoaded)
|
|
929
|
-
return {
|
|
930
|
-
const confVal = {
|
|
901
|
+
return { valueIsLoaded: false };
|
|
902
|
+
const confVal = { value: plusFile.fileExportsByConfigName[configName], valueIsLoaded: true };
|
|
931
903
|
return confVal;
|
|
932
904
|
}
|
|
933
905
|
function resolveConfigEnv(configEnv, filePath) {
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.findPageFiles = findPageFiles;
|
|
7
|
-
const
|
|
7
|
+
const tinyglobby_1 = require("tinyglobby");
|
|
8
8
|
const utils_js_1 = require("../utils.js");
|
|
9
9
|
const picocolors_1 = __importDefault(require("@brillout/picocolors"));
|
|
10
10
|
const getOutDirs_js_1 = require("./getOutDirs.js");
|
|
@@ -12,11 +12,11 @@ async function findPageFiles(config, fileTypes, isDev) {
|
|
|
12
12
|
const cwd = config.root;
|
|
13
13
|
const { outDirRoot } = (0, getOutDirs_js_1.getOutDirs)(config);
|
|
14
14
|
const timeBase = new Date().getTime();
|
|
15
|
-
let pageFiles = await (0,
|
|
15
|
+
let pageFiles = await (0, tinyglobby_1.glob)(fileTypes.map((fileType) => `**/*${fileType}.${utils_js_1.scriptFileExtensions}`), { ignore: ['**/node_modules/**', `${outDirRoot}/**`], cwd, dot: false, expandDirectories: false });
|
|
16
16
|
pageFiles = pageFiles.map((p) => '/' + (0, utils_js_1.toPosixPath)(p));
|
|
17
17
|
const time = new Date().getTime() - timeBase;
|
|
18
18
|
if (isDev) {
|
|
19
|
-
// We only warn in dev, because while building it's expected to take a long time as
|
|
19
|
+
// We only warn in dev, because while building it's expected to take a long time as tinyglobby is competing for resources with other tasks
|
|
20
20
|
(0, utils_js_1.assertWarning)(time < 1.5 * 1000, `Finding your page files ${picocolors_1.default.cyan('**/*.page.*')} took an unexpected long time (${time}ms). Reach out to the vike maintainer.`, {
|
|
21
21
|
onlyOnce: 'slow-page-files-search'
|
|
22
22
|
});
|
|
@@ -68,6 +68,7 @@ const resolvePrerenderConfig_js_1 = require("./resolvePrerenderConfig.js");
|
|
|
68
68
|
const getOutDirs_js_1 = require("../plugin/shared/getOutDirs.js");
|
|
69
69
|
const context_js_2 = require("../cli/context.js");
|
|
70
70
|
const isViteCliCall_js_1 = require("../plugin/shared/isViteCliCall.js");
|
|
71
|
+
const commonConfig_js_1 = require("../plugin/plugins/commonConfig.js");
|
|
71
72
|
async function runPrerenderFromAPI(options = {}) {
|
|
72
73
|
return await runPrerender(options, 'prerender()');
|
|
73
74
|
// - We purposely propagate the error to the user land, so that the error interrupts the user land. It's also, I guess, a nice-to-have that the user has control over the error.
|
|
@@ -98,7 +99,8 @@ async function runPrerenderFromAutoRun(viteConfig, config) {
|
|
|
98
99
|
(0, logErrorHint_js_1.logErrorHint)(err);
|
|
99
100
|
process.exit(1);
|
|
100
101
|
}
|
|
101
|
-
|
|
102
|
+
const vike = (0, commonConfig_js_1.getVikeConfigPublic)(config);
|
|
103
|
+
vike.prerenderContext = prerenderContextPublic;
|
|
102
104
|
const forceExit = (0, context_js_2.isVikeCli)() || (0, isViteCliCall_js_1.isViteCliCall)();
|
|
103
105
|
return { forceExit };
|
|
104
106
|
}
|
|
@@ -29,13 +29,19 @@ const errorsMisc = [
|
|
|
29
29
|
mustMentionNodeModules: false
|
|
30
30
|
}
|
|
31
31
|
];
|
|
32
|
+
const reactInvalidEelement = 'https://vike.dev/broken-npm-package#react-invalid-component';
|
|
32
33
|
const errorsReact = [
|
|
33
34
|
{
|
|
34
35
|
errMsg: 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components)',
|
|
35
|
-
link:
|
|
36
|
+
link: reactInvalidEelement,
|
|
36
37
|
// The stack trace can be user-land while the import is coming from node_modules
|
|
37
38
|
mustMentionNodeModules: false
|
|
38
39
|
},
|
|
40
|
+
{
|
|
41
|
+
errMsg: 'Objects are not valid as a React child',
|
|
42
|
+
link: reactInvalidEelement,
|
|
43
|
+
mustMentionNodeModules: false
|
|
44
|
+
},
|
|
39
45
|
{
|
|
40
46
|
// React's "Invalid hook call.", see https://github.com/vikejs/vike/discussions/1637#discussioncomment-9424712
|
|
41
47
|
errMsg: "Cannot read properties of null (reading 'useContext')"
|