vike 0.4.239-commit-86a0513 → 0.4.239-commit-95ab407

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.
@@ -543,35 +543,37 @@ function isProd() {
543
543
  }
544
544
  function isProdOptional() {
545
545
  const vikeApiOperation = getVikeApiOperation()?.operation ?? null;
546
- const yes =
547
546
  // setGlobalContext_prodBuildEntry() was called
548
- !!globalObject.prodBuildEntry ||
549
- globalObject.isPrerendering === true ||
550
- // Vike CLI & Vike API
551
- (!!vikeApiOperation && vikeApiOperation !== 'dev') ||
552
- // Vite command
553
- globalObject.isProductionAccordingToVite === true ||
554
- // getGlobalContextAsync(isProduction)
555
- globalObject.isProductionAccordingToUser === true ||
556
- // vite-plugin-vercel
557
- globalObject.isProductionAccordingToPhotonVercel === true;
558
- assert(typeof yes === 'boolean');
559
- const no = !!globalObject.viteDevServer ||
560
- // Vike CLI & Vike API
561
- vikeApiOperation === 'dev' ||
562
- // Vite command
563
- globalObject.isProductionAccordingToVite === false ||
564
- // getGlobalContextAsync(isProduction)
565
- globalObject.isProductionAccordingToUser === false ||
566
- // @cloudflare/vite-plugin
567
- isNonRunnableDev() === true;
568
- assert(typeof no === 'boolean');
547
+ const yes1 = !!globalObject.prodBuildEntry;
548
+ const yes2 = globalObject.isPrerendering === true;
549
+ // Vike CLI & Vike API
550
+ const yes3 = !!vikeApiOperation && vikeApiOperation !== 'dev';
551
+ // Vite command
552
+ const yes4 = globalObject.isProductionAccordingToVite === true;
553
+ // getGlobalContextAsync(isProduction)
554
+ const yes5 = globalObject.isProductionAccordingToUser === true;
555
+ // vite-plugin-vercel
556
+ const yes6 = globalObject.isProductionAccordingToPhotonVercel === true;
557
+ const yes = yes1 || yes2 || yes3 || yes4 || yes5 || yes6;
558
+ const no1 = !!globalObject.viteDevServer;
559
+ // Vike CLI & Vike API
560
+ const no2 = vikeApiOperation === 'dev';
561
+ // Vite command
562
+ const no3 = globalObject.isProductionAccordingToVite === false;
563
+ // getGlobalContextAsync(isProduction)
564
+ const no4 = globalObject.isProductionAccordingToUser === false;
565
+ // @cloudflare/vite-plugin
566
+ const no5 = isNonRunnableDev() === true;
567
+ const no = no1 || no2 || no3 || no4 || no5;
568
+ const debug = { yes1, yes2, yes3, yes4, yes5, yes6, no1, no2, no3, no4, no5 };
569
+ assert(typeof yes === 'boolean', debug);
570
+ assert(typeof no === 'boolean', debug);
569
571
  if (yes) {
570
- assert(no === false);
572
+ assert(no === false, debug);
571
573
  return true;
572
574
  }
573
575
  if (no) {
574
- assert(yes === false);
576
+ assert(yes === false, debug);
575
577
  return false;
576
578
  }
577
579
  return null;
@@ -3,6 +3,7 @@ import { createViteRPC, assertIsNotProductionRuntime, isRunnableDevEnvironment,
3
3
  import { retrievePageAssetsDev } from '../../runtime/renderPage/getPageAssets/retrievePageAssetsDev.js';
4
4
  import { getViteConfigRuntime } from '../shared/getViteConfigRuntime.js';
5
5
  import { getMagicString } from '../shared/getMagicString.js';
6
+ // TODO/now: move to vite/index.ts
6
7
  assertIsNotProductionRuntime();
7
8
  /* We cannot use [`filter.id`](https://rolldown.rs/plugins/hook-filters) because Vite's optimizeDeps bundles the package `vike` into node_modules/.vite/deps_ssr/chunk-WBC5FHD7.js
8
9
  const distFileIsNonRunnableDev = requireResolveDistFile('dist/esm/utils/isNonRunnableDev.js')
@@ -1 +1 @@
1
- export declare const PROJECT_VERSION: "0.4.239-commit-86a0513";
1
+ export declare const PROJECT_VERSION: "0.4.239-commit-95ab407";
@@ -1,2 +1,2 @@
1
1
  // Automatically updated by @brillout/release-me
2
- export const PROJECT_VERSION = '0.4.239-commit-86a0513';
2
+ export const PROJECT_VERSION = '0.4.239-commit-95ab407';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike",
3
- "version": "0.4.239-commit-86a0513",
3
+ "version": "0.4.239-commit-95ab407",
4
4
  "repository": "https://github.com/vikejs/vike",
5
5
  "exports": {
6
6
  "./server": {
@@ -117,7 +117,7 @@
117
117
  "@brillout/json-serializer": "^0.5.20",
118
118
  "@brillout/picocolors": "^1.0.26",
119
119
  "@brillout/require-shim": "^0.1.2",
120
- "@brillout/vite-plugin-server-entry": "0.7.14-commit-9aaa9d4",
120
+ "@brillout/vite-plugin-server-entry": "^0.7.15",
121
121
  "acorn": "^8.0.0",
122
122
  "cac": "^6.0.0",
123
123
  "es-module-lexer": "^1.0.0",