vike 0.4.226-commit-8f5c172 → 0.4.227-commit-68a216b
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/cli/entry.js +13 -8
- package/dist/cjs/node/plugin/plugins/build/pluginModuleBanner.js +4 -1
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +1 -1
- package/dist/cjs/node/plugin/plugins/previewConfig.js +10 -6
- package/dist/cjs/node/prerender/resolvePrerenderConfig.js +1 -0
- package/dist/cjs/node/prerender/runPrerender.js +5 -1
- package/dist/cjs/utils/PROJECT_VERSION.js +1 -1
- package/dist/cjs/utils/assert.js +2 -5
- package/dist/esm/node/cli/entry.js +13 -8
- package/dist/esm/node/plugin/plugins/build/pluginModuleBanner.js +4 -1
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +1 -1
- package/dist/esm/node/plugin/plugins/previewConfig.js +10 -6
- package/dist/esm/node/prerender/resolvePrerenderConfig.d.ts +1 -0
- package/dist/esm/node/prerender/resolvePrerenderConfig.js +1 -0
- package/dist/esm/node/prerender/runPrerender.js +5 -1
- package/dist/esm/shared/page-configs/Config.d.ts +10 -0
- package/dist/esm/utils/PROJECT_VERSION.d.ts +1 -1
- package/dist/esm/utils/PROJECT_VERSION.js +1 -1
- package/dist/esm/utils/assert.js +2 -5
- package/package.json +1 -1
|
@@ -62,14 +62,19 @@ async function cmdDev() {
|
|
|
62
62
|
const startTime = performance.now();
|
|
63
63
|
try {
|
|
64
64
|
const { viteServer } = await (0, index_js_1.dev)();
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
65
|
+
if (viteServer.httpServer) {
|
|
66
|
+
await viteServer.listen();
|
|
67
|
+
const info = viteServer.config.logger.info;
|
|
68
|
+
const startupDurationString = picocolors_1.default.dim(`ready in ${picocolors_1.default.reset(picocolors_1.default.bold(String(Math.ceil(performance.now() - startTime))))} ms`);
|
|
69
|
+
const hasExistingLogs = process.stdout.bytesWritten > 0 || process.stderr.bytesWritten > 0;
|
|
70
|
+
info(` ${picocolors_1.default.yellow(`${picocolors_1.default.bold('Vike')} v${utils_js_1.PROJECT_VERSION}`)} ${startupDurationString}\n`, {
|
|
71
|
+
clear: !hasExistingLogs
|
|
72
|
+
});
|
|
73
|
+
viteServer.printUrls();
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
// vike-server => middleware mode => `viteServer.httpServer === null`
|
|
77
|
+
}
|
|
73
78
|
viteServer.bindCLIShortcuts({ print: true });
|
|
74
79
|
}
|
|
75
80
|
catch (err) {
|
|
@@ -4,6 +4,7 @@ exports.pluginModuleBanner = pluginModuleBanner;
|
|
|
4
4
|
const utils_js_1 = require("../../utils.js");
|
|
5
5
|
const virtual_files_js_1 = require("../../../shared/virtual-files.js");
|
|
6
6
|
const isViteServerBuild_js_1 = require("../../shared/isViteServerBuild.js");
|
|
7
|
+
const rollupSourceMap_js_1 = require("../../shared/rollupSourceMap.js");
|
|
7
8
|
// Rollup's banner feature doesn't work with Vite: https://github.com/vitejs/vite/issues/8412
|
|
8
9
|
// But, anyways, we want to prepend the banner at the beginning of each module, not at the beginning of each file (I believe that's what Rollup's banner feature does).
|
|
9
10
|
const vikeModuleBannerPlaceholder = 'vikeModuleBannerPlaceholder';
|
|
@@ -44,7 +45,9 @@ function pluginModuleBanner() {
|
|
|
44
45
|
id = (0, virtual_files_js_1.removeVirtualIdTag)(id);
|
|
45
46
|
if (id.startsWith(config.root))
|
|
46
47
|
id = id.slice(config.root.length + 1);
|
|
47
|
-
|
|
48
|
+
// No need to insert a new line; Rollup formats the code and will insert a new line.
|
|
49
|
+
const codeNew = `${vikeModuleBannerPlaceholder}(${JSON.stringify(id)}); ${code}`;
|
|
50
|
+
return (0, rollupSourceMap_js_1.sourceMapPassthrough)(codeNew);
|
|
48
51
|
}
|
|
49
52
|
}
|
|
50
53
|
};
|
|
@@ -901,7 +901,7 @@ function assertKnownConfig(configName, configNamesKnownRelevant, configDefinitio
|
|
|
901
901
|
if (configNamesKnownAll.includes(configName)) {
|
|
902
902
|
(0, utils_js_1.assertUsage)(false, `${sourceName} sets the value of the config ${configNameColored} which is a custom config that is defined with ${picocolors_1.default.underline('https://vike.dev/meta')} at a path that doesn't apply to ${locationId} — see ${picocolors_1.default.underline('https://vike.dev/config#inheritance')}`, { exitOnError });
|
|
903
903
|
}
|
|
904
|
-
const errMsg = `${sourceName} sets an unknown config ${
|
|
904
|
+
const errMsg = `${sourceName} sets an unknown Vike config, see ${picocolors_1.default.underline('https://vike.dev/cli')} for the list of CLI options.`;
|
|
905
905
|
// Missing vike-{react,vue,solid} installation
|
|
906
906
|
{
|
|
907
907
|
const ui = ['vike-react', 'vike-vue', 'vike-solid'];
|
|
@@ -38,20 +38,24 @@ function previewConfig() {
|
|
|
38
38
|
config.appType = 'mpa'
|
|
39
39
|
*/
|
|
40
40
|
return () => {
|
|
41
|
-
|
|
41
|
+
const prerenderConfigGlobal = (0, resolvePrerenderConfig_js_1.resolvePrerenderConfigGlobal)(config._vikeConfigObject);
|
|
42
|
+
const { isPrerenderingEnabledForAllPages, isPrerenderingEnabled } = prerenderConfigGlobal;
|
|
43
|
+
assertDist(isPrerenderingEnabledForAllPages);
|
|
42
44
|
// We cannot re-use Vite's static middleware: https://github.com/vitejs/vite/pull/14836#issuecomment-1788540300
|
|
43
45
|
addStaticAssetsMiddleware(server.middlewares);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
(0, addSsrMiddleware_js_1.addSsrMiddleware)(server.middlewares, config, true, prerenderConfigGlobal.isPrerenderingEnabled);
|
|
46
|
+
if (!isPrerenderingEnabledForAllPages) {
|
|
47
|
+
(0, addSsrMiddleware_js_1.addSsrMiddleware)(server.middlewares, config, true, isPrerenderingEnabled);
|
|
47
48
|
}
|
|
48
49
|
addStatic404Middleware(server.middlewares);
|
|
49
50
|
};
|
|
50
51
|
}
|
|
51
52
|
};
|
|
52
|
-
function assertDist() {
|
|
53
|
+
function assertDist(isPrerenderingEnabledForAllPages) {
|
|
53
54
|
const { outDirRoot, outDirClient, outDirServer } = (0, getOutDirs_js_1.getOutDirs)(config);
|
|
54
|
-
[outDirRoot, outDirClient
|
|
55
|
+
const dirS = [outDirRoot, outDirClient];
|
|
56
|
+
if (!isPrerenderingEnabledForAllPages)
|
|
57
|
+
dirS.push(outDirServer);
|
|
58
|
+
dirS.forEach((outDirAny) => {
|
|
55
59
|
(0, utils_js_1.assertUsage)(fs_1.default.existsSync(outDirAny), `Cannot run ${picocolors_1.default.cyan('$ vike preview')}: your app isn't built (the build directory ${picocolors_1.default.cyan(outDirAny)} is missing). Make sure to run ${picocolors_1.default.cyan('$ vike build')} before running ${picocolors_1.default.cyan('$ vike preview')}.`);
|
|
56
60
|
});
|
|
57
61
|
}
|
|
@@ -12,6 +12,7 @@ function resolvePrerenderConfigGlobal(vikeConfig) {
|
|
|
12
12
|
const prerenderConfigGlobal = {
|
|
13
13
|
partial: pickFirst(prerenderSettings.map((c) => c.partial)) ?? false,
|
|
14
14
|
noExtraDir: pickFirst(prerenderSettings.map((c) => c.noExtraDir)) ?? false,
|
|
15
|
+
keepDistServer: pickFirst(prerenderSettings.map((c) => c.keepDistServer)) ?? false,
|
|
15
16
|
parallel: pickFirst(prerenderSettings.map((c) => c.parallel)) ?? true,
|
|
16
17
|
disableAutoRun: pickFirst(prerenderSettings.map((c) => c.disableAutoRun)) ?? false
|
|
17
18
|
};
|
|
@@ -69,6 +69,7 @@ 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
71
|
const commonConfig_js_1 = require("../plugin/plugins/commonConfig.js");
|
|
72
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
72
73
|
async function runPrerenderFromAPI(options = {}) {
|
|
73
74
|
return await runPrerender(options, 'prerender()');
|
|
74
75
|
// - 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.
|
|
@@ -116,7 +117,7 @@ async function runPrerender(options = {}, standaloneTrigger) {
|
|
|
116
117
|
const vikeConfig = await (0, getVikeConfig_js_1.getVikeConfig)(viteConfig);
|
|
117
118
|
const vike = (0, commonConfig_js_1.getVikeConfigPublic)(viteConfig);
|
|
118
119
|
(0, utils_js_1.assert)(vike.prerenderContext.isPrerenderingEnabled);
|
|
119
|
-
const { outDirClient } = (0, getOutDirs_js_1.getOutDirs)(viteConfig);
|
|
120
|
+
const { outDirClient, outDirServer } = (0, getOutDirs_js_1.getOutDirs)(viteConfig);
|
|
120
121
|
const { root } = viteConfig;
|
|
121
122
|
const prerenderConfigGlobal = (0, resolvePrerenderConfig_js_1.resolvePrerenderConfigGlobal)(vikeConfig);
|
|
122
123
|
validatePrerenderConfig(prerenderConfigGlobal);
|
|
@@ -160,6 +161,9 @@ async function runPrerender(options = {}, standaloneTrigger) {
|
|
|
160
161
|
await warnMissingPages(prerenderContext.prerenderedPageContexts, globalContext, doNotPrerenderList, partial);
|
|
161
162
|
const prerenderContextPublic = makePublic(prerenderContext);
|
|
162
163
|
(0, utils_js_1.objectAssign)(vike.prerenderContext, prerenderContextPublic);
|
|
164
|
+
if (prerenderConfigGlobal.isPrerenderingEnabledForAllPages && !prerenderConfigGlobal.keepDistServer) {
|
|
165
|
+
node_fs_1.default.rmSync(outDirServer, { recursive: true });
|
|
166
|
+
}
|
|
163
167
|
return { viteConfig };
|
|
164
168
|
}
|
|
165
169
|
async function collectDoNoPrerenderList(pageConfigs, doNotPrerenderList, defaultLocalValue, concurrencyLimit, globalContext) {
|
package/dist/cjs/utils/assert.js
CHANGED
|
@@ -98,12 +98,9 @@ function assertWarning(condition, msg, { onlyOnce, showStackTrace }) {
|
|
|
98
98
|
if (onlyOnce) {
|
|
99
99
|
const { alreadyLogged } = globalObject;
|
|
100
100
|
const key = onlyOnce === true ? msg : onlyOnce;
|
|
101
|
-
if (alreadyLogged.has(key))
|
|
101
|
+
if (alreadyLogged.has(key))
|
|
102
102
|
return;
|
|
103
|
-
|
|
104
|
-
else {
|
|
105
|
-
alreadyLogged.add(key);
|
|
106
|
-
}
|
|
103
|
+
alreadyLogged.add(key);
|
|
107
104
|
}
|
|
108
105
|
globalObject.onBeforeLog?.();
|
|
109
106
|
if (showStackTrace) {
|
|
@@ -24,14 +24,19 @@ async function cmdDev() {
|
|
|
24
24
|
const startTime = performance.now();
|
|
25
25
|
try {
|
|
26
26
|
const { viteServer } = await dev();
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
if (viteServer.httpServer) {
|
|
28
|
+
await viteServer.listen();
|
|
29
|
+
const info = viteServer.config.logger.info;
|
|
30
|
+
const startupDurationString = pc.dim(`ready in ${pc.reset(pc.bold(String(Math.ceil(performance.now() - startTime))))} ms`);
|
|
31
|
+
const hasExistingLogs = process.stdout.bytesWritten > 0 || process.stderr.bytesWritten > 0;
|
|
32
|
+
info(` ${pc.yellow(`${pc.bold('Vike')} v${PROJECT_VERSION}`)} ${startupDurationString}\n`, {
|
|
33
|
+
clear: !hasExistingLogs
|
|
34
|
+
});
|
|
35
|
+
viteServer.printUrls();
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
// vike-server => middleware mode => `viteServer.httpServer === null`
|
|
39
|
+
}
|
|
35
40
|
viteServer.bindCLIShortcuts({ print: true });
|
|
36
41
|
}
|
|
37
42
|
catch (err) {
|
|
@@ -2,6 +2,7 @@ export { pluginModuleBanner };
|
|
|
2
2
|
import { assert } from '../../utils.js';
|
|
3
3
|
import { removeVirtualIdTag } from '../../../shared/virtual-files.js';
|
|
4
4
|
import { isViteServerBuild, isViteServerBuild_safe } from '../../shared/isViteServerBuild.js';
|
|
5
|
+
import { sourceMapPassthrough } from '../../shared/rollupSourceMap.js';
|
|
5
6
|
// Rollup's banner feature doesn't work with Vite: https://github.com/vitejs/vite/issues/8412
|
|
6
7
|
// But, anyways, we want to prepend the banner at the beginning of each module, not at the beginning of each file (I believe that's what Rollup's banner feature does).
|
|
7
8
|
const vikeModuleBannerPlaceholder = 'vikeModuleBannerPlaceholder';
|
|
@@ -42,7 +43,9 @@ function pluginModuleBanner() {
|
|
|
42
43
|
id = removeVirtualIdTag(id);
|
|
43
44
|
if (id.startsWith(config.root))
|
|
44
45
|
id = id.slice(config.root.length + 1);
|
|
45
|
-
|
|
46
|
+
// No need to insert a new line; Rollup formats the code and will insert a new line.
|
|
47
|
+
const codeNew = `${vikeModuleBannerPlaceholder}(${JSON.stringify(id)}); ${code}`;
|
|
48
|
+
return sourceMapPassthrough(codeNew);
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
51
|
};
|
|
@@ -896,7 +896,7 @@ function assertKnownConfig(configName, configNamesKnownRelevant, configDefinitio
|
|
|
896
896
|
if (configNamesKnownAll.includes(configName)) {
|
|
897
897
|
assertUsage(false, `${sourceName} sets the value of the config ${configNameColored} which is a custom config that is defined with ${pc.underline('https://vike.dev/meta')} at a path that doesn't apply to ${locationId} — see ${pc.underline('https://vike.dev/config#inheritance')}`, { exitOnError });
|
|
898
898
|
}
|
|
899
|
-
const errMsg = `${sourceName} sets an unknown config ${
|
|
899
|
+
const errMsg = `${sourceName} sets an unknown Vike config, see ${pc.underline('https://vike.dev/cli')} for the list of CLI options.`;
|
|
900
900
|
// Missing vike-{react,vue,solid} installation
|
|
901
901
|
{
|
|
902
902
|
const ui = ['vike-react', 'vike-vue', 'vike-solid'];
|
|
@@ -33,20 +33,24 @@ function previewConfig() {
|
|
|
33
33
|
config.appType = 'mpa'
|
|
34
34
|
*/
|
|
35
35
|
return () => {
|
|
36
|
-
|
|
36
|
+
const prerenderConfigGlobal = resolvePrerenderConfigGlobal(config._vikeConfigObject);
|
|
37
|
+
const { isPrerenderingEnabledForAllPages, isPrerenderingEnabled } = prerenderConfigGlobal;
|
|
38
|
+
assertDist(isPrerenderingEnabledForAllPages);
|
|
37
39
|
// We cannot re-use Vite's static middleware: https://github.com/vitejs/vite/pull/14836#issuecomment-1788540300
|
|
38
40
|
addStaticAssetsMiddleware(server.middlewares);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
addSsrMiddleware(server.middlewares, config, true, prerenderConfigGlobal.isPrerenderingEnabled);
|
|
41
|
+
if (!isPrerenderingEnabledForAllPages) {
|
|
42
|
+
addSsrMiddleware(server.middlewares, config, true, isPrerenderingEnabled);
|
|
42
43
|
}
|
|
43
44
|
addStatic404Middleware(server.middlewares);
|
|
44
45
|
};
|
|
45
46
|
}
|
|
46
47
|
};
|
|
47
|
-
function assertDist() {
|
|
48
|
+
function assertDist(isPrerenderingEnabledForAllPages) {
|
|
48
49
|
const { outDirRoot, outDirClient, outDirServer } = getOutDirs(config);
|
|
49
|
-
[outDirRoot, outDirClient
|
|
50
|
+
const dirS = [outDirRoot, outDirClient];
|
|
51
|
+
if (!isPrerenderingEnabledForAllPages)
|
|
52
|
+
dirS.push(outDirServer);
|
|
53
|
+
dirS.forEach((outDirAny) => {
|
|
50
54
|
assertUsage(fs.existsSync(outDirAny), `Cannot run ${pc.cyan('$ vike preview')}: your app isn't built (the build directory ${pc.cyan(outDirAny)} is missing). Make sure to run ${pc.cyan('$ vike build')} before running ${pc.cyan('$ vike preview')}.`);
|
|
51
55
|
});
|
|
52
56
|
}
|
|
@@ -5,6 +5,7 @@ import type { PageConfigBuildTime } from '../../shared/page-configs/PageConfig.j
|
|
|
5
5
|
declare function resolvePrerenderConfigGlobal(vikeConfig: VikeConfigObject): {
|
|
6
6
|
partial: boolean;
|
|
7
7
|
noExtraDir: boolean;
|
|
8
|
+
keepDistServer: boolean;
|
|
8
9
|
parallel: number | boolean;
|
|
9
10
|
disableAutoRun: boolean;
|
|
10
11
|
} & {
|
|
@@ -10,6 +10,7 @@ function resolvePrerenderConfigGlobal(vikeConfig) {
|
|
|
10
10
|
const prerenderConfigGlobal = {
|
|
11
11
|
partial: pickFirst(prerenderSettings.map((c) => c.partial)) ?? false,
|
|
12
12
|
noExtraDir: pickFirst(prerenderSettings.map((c) => c.noExtraDir)) ?? false,
|
|
13
|
+
keepDistServer: pickFirst(prerenderSettings.map((c) => c.keepDistServer)) ?? false,
|
|
13
14
|
parallel: pickFirst(prerenderSettings.map((c) => c.parallel)) ?? true,
|
|
14
15
|
disableAutoRun: pickFirst(prerenderSettings.map((c) => c.disableAutoRun)) ?? false
|
|
15
16
|
};
|
|
@@ -31,6 +31,7 @@ import { getOutDirs } from '../plugin/shared/getOutDirs.js';
|
|
|
31
31
|
import { isVikeCli } from '../cli/context.js';
|
|
32
32
|
import { isViteCliCall } from '../plugin/shared/isViteCliCall.js';
|
|
33
33
|
import { getVikeConfigPublic } from '../plugin/plugins/commonConfig.js';
|
|
34
|
+
import fs from 'node:fs';
|
|
34
35
|
async function runPrerenderFromAPI(options = {}) {
|
|
35
36
|
return await runPrerender(options, 'prerender()');
|
|
36
37
|
// - 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.
|
|
@@ -78,7 +79,7 @@ async function runPrerender(options = {}, standaloneTrigger) {
|
|
|
78
79
|
const vikeConfig = await getVikeConfig(viteConfig);
|
|
79
80
|
const vike = getVikeConfigPublic(viteConfig);
|
|
80
81
|
assert(vike.prerenderContext.isPrerenderingEnabled);
|
|
81
|
-
const { outDirClient } = getOutDirs(viteConfig);
|
|
82
|
+
const { outDirClient, outDirServer } = getOutDirs(viteConfig);
|
|
82
83
|
const { root } = viteConfig;
|
|
83
84
|
const prerenderConfigGlobal = resolvePrerenderConfigGlobal(vikeConfig);
|
|
84
85
|
validatePrerenderConfig(prerenderConfigGlobal);
|
|
@@ -122,6 +123,9 @@ async function runPrerender(options = {}, standaloneTrigger) {
|
|
|
122
123
|
await warnMissingPages(prerenderContext.prerenderedPageContexts, globalContext, doNotPrerenderList, partial);
|
|
123
124
|
const prerenderContextPublic = makePublic(prerenderContext);
|
|
124
125
|
objectAssign(vike.prerenderContext, prerenderContextPublic);
|
|
126
|
+
if (prerenderConfigGlobal.isPrerenderingEnabledForAllPages && !prerenderConfigGlobal.keepDistServer) {
|
|
127
|
+
fs.rmSync(outDirServer, { recursive: true });
|
|
128
|
+
}
|
|
125
129
|
return { viteConfig };
|
|
126
130
|
}
|
|
127
131
|
async function collectDoNoPrerenderList(pageConfigs, doNotPrerenderList, defaultLocalValue, concurrencyLimit, globalContext) {
|
|
@@ -308,6 +308,16 @@ type ConfigBuiltIn = {
|
|
|
308
308
|
* @default true
|
|
309
309
|
*/
|
|
310
310
|
enable?: boolean | null;
|
|
311
|
+
/**
|
|
312
|
+
* If you pre-render all your pages then Vike removes the `dist/server/` directory after pre-rendering has finished.
|
|
313
|
+
*
|
|
314
|
+
* If you set this setting to `true` then Vike won't remove the `dist/server/` directory.
|
|
315
|
+
*
|
|
316
|
+
* https://vike.dev/prerender#keepDistServer
|
|
317
|
+
*
|
|
318
|
+
* @default false
|
|
319
|
+
*/
|
|
320
|
+
keepDistServer?: boolean;
|
|
311
321
|
};
|
|
312
322
|
/**
|
|
313
323
|
* Install Vike extensions.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PROJECT_VERSION: "0.4.
|
|
1
|
+
export declare const PROJECT_VERSION: "0.4.227-commit-68a216b";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Automatically updated by @brillout/release-me
|
|
2
|
-
export const PROJECT_VERSION = '0.4.
|
|
2
|
+
export const PROJECT_VERSION = '0.4.227-commit-68a216b';
|
package/dist/esm/utils/assert.js
CHANGED
|
@@ -93,12 +93,9 @@ function assertWarning(condition, msg, { onlyOnce, showStackTrace }) {
|
|
|
93
93
|
if (onlyOnce) {
|
|
94
94
|
const { alreadyLogged } = globalObject;
|
|
95
95
|
const key = onlyOnce === true ? msg : onlyOnce;
|
|
96
|
-
if (alreadyLogged.has(key))
|
|
96
|
+
if (alreadyLogged.has(key))
|
|
97
97
|
return;
|
|
98
|
-
|
|
99
|
-
else {
|
|
100
|
-
alreadyLogged.add(key);
|
|
101
|
-
}
|
|
98
|
+
alreadyLogged.add(key);
|
|
102
99
|
}
|
|
103
100
|
globalObject.onBeforeLog?.();
|
|
104
101
|
if (showStackTrace) {
|