vike 0.4.154 → 0.4.155

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.
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.importBuild = void 0;
7
- const plugin_js_1 = require("@brillout/vite-plugin-import-build/plugin.js");
7
+ const plugin_js_1 = require("@brillout/vite-plugin-server-entry/plugin.js");
8
8
  const utils_js_1 = require("../../utils.js");
9
9
  const path_1 = __importDefault(require("path"));
10
10
  const module_1 = require("module");
@@ -33,7 +33,7 @@ function importBuild() {
33
33
  await replace_ASSETS_MAP(options, bundle);
34
34
  }
35
35
  },
36
- (0, plugin_js_1.importBuild)({
36
+ (0, plugin_js_1.serverEntryPlugin)({
37
37
  getImporterCode: () => {
38
38
  return getEntryCode(config, configVike);
39
39
  },
@@ -68,7 +68,7 @@ async function replace_ASSETS_MAP(options, bundle) {
68
68
  const { dir } = options;
69
69
  (0, utils_js_1.assert)(dir);
70
70
  // I guess importBuild won't be found in the bundle when using @vitejs/plugin-legacy
71
- const importBuildEntry = (0, plugin_js_1.findImportBuildBundleEntry)(bundle);
71
+ const importBuildEntry = (0, plugin_js_1.findServerEntry)(bundle);
72
72
  const importBuildFilePath = path_1.default.join(dir, importBuildEntry.fileName);
73
73
  const assetsJsonFilePath = path_1.default.join(dir, '..', 'assets.json');
74
74
  const [assetsJsonString, importBuildFileContent] = await Promise.all([
@@ -101,7 +101,7 @@ async function runPrerender(options, manuallyTriggered) {
101
101
  }
102
102
  const { partial = false, noExtraDir = false, parallel = true } = prerenderConfig || {};
103
103
  const concurrencyLimit = (0, pLimit_js_1.pLimit)(parallel === false || parallel === 0 ? 1 : parallel === true || parallel === undefined ? (0, os_1.cpus)().length : parallel);
104
- (0, assertPathIsFilesystemAbsolute_js_1.assertPathIsFilesystemAbsolute)(outDirRoot); // Needed for loadServerBuild(outDir) of @brillout/vite-plugin-import-build
104
+ (0, assertPathIsFilesystemAbsolute_js_1.assertPathIsFilesystemAbsolute)(outDirRoot); // Needed for loadImportBuild(outDir) of @brillout/vite-plugin-server-entry
105
105
  await (0, globalContext_js_1.initGlobalContext)(true, outDirRoot);
106
106
  const renderContext = await (0, renderPageAlreadyRouted_js_1.getRenderContext)();
107
107
  renderContext.pageFilesAll.forEach(assertExportNames);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.setImportBuildGetters = exports.loadImportBuild = void 0;
4
- const loadServerBuild_js_1 = require("@brillout/vite-plugin-import-build/loadServerBuild.js");
4
+ const importServerEntry_js_1 = require("@brillout/vite-plugin-server-entry/importServerEntry.js");
5
5
  const utils_js_1 = require("../utils.js");
6
6
  const buildGetters = (globalThis.__vike_buildGetters = globalThis.__vike_buildGetters || {
7
7
  getters: null
@@ -12,7 +12,7 @@ function setImportBuildGetters(getters) {
12
12
  exports.setImportBuildGetters = setImportBuildGetters;
13
13
  async function loadImportBuild(outDir) {
14
14
  if (!buildGetters.getters) {
15
- await (0, loadServerBuild_js_1.loadServerBuild)(outDir);
15
+ await (0, importServerEntry_js_1.importServerEntry)(outDir);
16
16
  (0, utils_js_1.assert)(buildGetters.getters);
17
17
  }
18
18
  const [pageFiles, clientManifest, pluginManifest] = await Promise.all([
@@ -264,7 +264,7 @@ function includesNodeModules(str) {
264
264
  return true;
265
265
  }
266
266
  function normalize(packageNames) {
267
- const result = (0, utils_js_1.unique)(packageNames.filter(utils_js_1.isNotNullish));
267
+ const result = (0, utils_js_1.unique)(packageNames.filter(utils_js_1.isNotNullish).filter((packageName) => packageName !== '@brillout/import'));
268
268
  if (result.length === 0)
269
269
  return false;
270
270
  return result;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PROJECT_VERSION = exports.projectInfo = void 0;
4
4
  const assertSingleInstance_js_1 = require("./assertSingleInstance.js");
5
- const PROJECT_VERSION = '0.4.154';
5
+ const PROJECT_VERSION = '0.4.155';
6
6
  exports.PROJECT_VERSION = PROJECT_VERSION;
7
7
  const projectInfo = {
8
8
  projectName: 'Vike',
@@ -1,5 +1,5 @@
1
1
  export { importBuild };
2
- import { importBuild as importBuild_, findImportBuildBundleEntry } from '@brillout/vite-plugin-import-build/plugin.js';
2
+ import { serverEntryPlugin, findServerEntry } from '@brillout/vite-plugin-server-entry/plugin.js';
3
3
  import { assert, getOutDirs, projectInfo, toPosixPath, viteIsSSR } from '../../utils.js';
4
4
  import path from 'path';
5
5
  import { createRequire } from 'module';
@@ -28,7 +28,7 @@ function importBuild() {
28
28
  await replace_ASSETS_MAP(options, bundle);
29
29
  }
30
30
  },
31
- importBuild_({
31
+ serverEntryPlugin({
32
32
  getImporterCode: () => {
33
33
  return getEntryCode(config, configVike);
34
34
  },
@@ -62,7 +62,7 @@ async function replace_ASSETS_MAP(options, bundle) {
62
62
  const { dir } = options;
63
63
  assert(dir);
64
64
  // I guess importBuild won't be found in the bundle when using @vitejs/plugin-legacy
65
- const importBuildEntry = findImportBuildBundleEntry(bundle);
65
+ const importBuildEntry = findServerEntry(bundle);
66
66
  const importBuildFilePath = path.join(dir, importBuildEntry.fileName);
67
67
  const assetsJsonFilePath = path.join(dir, '..', 'assets.json');
68
68
  const [assetsJsonString, importBuildFileContent] = await Promise.all([
@@ -73,7 +73,7 @@ async function runPrerender(options, manuallyTriggered) {
73
73
  }
74
74
  const { partial = false, noExtraDir = false, parallel = true } = prerenderConfig || {};
75
75
  const concurrencyLimit = pLimit(parallel === false || parallel === 0 ? 1 : parallel === true || parallel === undefined ? cpus().length : parallel);
76
- assertPathIsFilesystemAbsolute(outDirRoot); // Needed for loadServerBuild(outDir) of @brillout/vite-plugin-import-build
76
+ assertPathIsFilesystemAbsolute(outDirRoot); // Needed for loadImportBuild(outDir) of @brillout/vite-plugin-server-entry
77
77
  await initGlobalContext(true, outDirRoot);
78
78
  const renderContext = await getRenderContext();
79
79
  renderContext.pageFilesAll.forEach(assertExportNames);
@@ -1,6 +1,6 @@
1
1
  export { loadImportBuild };
2
2
  export { setImportBuildGetters };
3
- import { loadServerBuild } from '@brillout/vite-plugin-import-build/loadServerBuild.js';
3
+ import { importServerEntry } from '@brillout/vite-plugin-server-entry/importServerEntry.js';
4
4
  import { assert } from '../utils.js';
5
5
  const buildGetters = (globalThis.__vike_buildGetters = globalThis.__vike_buildGetters || {
6
6
  getters: null
@@ -10,7 +10,7 @@ function setImportBuildGetters(getters) {
10
10
  }
11
11
  async function loadImportBuild(outDir) {
12
12
  if (!buildGetters.getters) {
13
- await loadServerBuild(outDir);
13
+ await importServerEntry(outDir);
14
14
  assert(buildGetters.getters);
15
15
  }
16
16
  const [pageFiles, clientManifest, pluginManifest] = await Promise.all([
@@ -259,7 +259,7 @@ function includesNodeModules(str) {
259
259
  return true;
260
260
  }
261
261
  function normalize(packageNames) {
262
- const result = unique(packageNames.filter(isNotNullish));
262
+ const result = unique(packageNames.filter(isNotNullish).filter((packageName) => packageName !== '@brillout/import'));
263
263
  if (result.length === 0)
264
264
  return false;
265
265
  return result;
@@ -1,13 +1,13 @@
1
1
  export { projectInfo };
2
2
  export type { ProjectTag };
3
3
  export { PROJECT_VERSION };
4
- declare const PROJECT_VERSION: "0.4.154";
4
+ declare const PROJECT_VERSION: "0.4.155";
5
5
  type PackageName = typeof projectInfo.npmPackageName;
6
6
  type ProjectVersion = typeof projectInfo.projectVersion;
7
7
  type ProjectTag = `[${PackageName}]` | `[${PackageName}@${ProjectVersion}]`;
8
8
  declare const projectInfo: {
9
9
  projectName: "Vike";
10
- projectVersion: "0.4.154";
10
+ projectVersion: "0.4.155";
11
11
  npmPackageName: "vike";
12
12
  githubRepository: "https://github.com/vikejs/vike";
13
13
  };
@@ -1,7 +1,7 @@
1
1
  export { projectInfo };
2
2
  export { PROJECT_VERSION };
3
3
  import { onProjectInfo } from './assertSingleInstance.js';
4
- const PROJECT_VERSION = '0.4.154';
4
+ const PROJECT_VERSION = '0.4.155';
5
5
  const projectInfo = {
6
6
  projectName: 'Vike',
7
7
  projectVersion: PROJECT_VERSION,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike",
3
- "version": "0.4.154",
3
+ "version": "0.4.155",
4
4
  "scripts": {
5
5
  "dev": "tsc --watch",
6
6
  "build": "rimraf dist/ && pnpm run build:esm && pnpm run build:cjs",
@@ -16,7 +16,7 @@
16
16
  "@brillout/json-serializer": "^0.5.8",
17
17
  "@brillout/picocolors": "^1.0.10",
18
18
  "@brillout/require-shim": "^0.1.2",
19
- "@brillout/vite-plugin-import-build": "^0.3.4",
19
+ "@brillout/vite-plugin-server-entry": "^0.4.1",
20
20
  "acorn": "^8.0.0",
21
21
  "cac": "^6.0.0",
22
22
  "es-module-lexer": "^1.0.0",
@@ -173,7 +173,7 @@
173
173
  "@brillout/json-serializer": "^0.5.8",
174
174
  "@brillout/picocolors": "^1.0.10",
175
175
  "@brillout/require-shim": "^0.1.2",
176
- "@brillout/vite-plugin-import-build": "^0.3.1",
176
+ "@brillout/vite-plugin-server-entry": "^0.4.0",
177
177
  "acorn": "^8.11.2",
178
178
  "cac": "^6.7.14",
179
179
  "es-module-lexer": "^1.4.1",