vike 0.4.159-commit-d73533a → 0.4.160-commit-a1101c1

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.
@@ -552,7 +552,7 @@ function isDefiningPageConfig(configName) {
552
552
  }
553
553
  function getConfigDefinitions(interfaceFilesRelevant) {
554
554
  const configDefinitions = { ...configDefinitionsBuiltIn_js_1.configDefinitionsBuiltIn };
555
- Object.entries(interfaceFilesRelevant).forEach(([_locationId, interfaceFiles]) => {
555
+ Object.entries(interfaceFilesRelevant).reverse().forEach(([_locationId, interfaceFiles]) => {
556
556
  interfaceFiles.forEach((interfaceFile) => {
557
557
  const configMeta = interfaceFile.fileExportsByConfigName['meta'];
558
558
  if (!configMeta)
@@ -91,7 +91,7 @@ async function getHtmlTags(pageContext, injectToStream, injectFilter) {
91
91
  const positionJavaScriptEntry = (() => {
92
92
  if (pageContext._pageContextPromise) {
93
93
  (0, utils_js_1.assertWarning)(!injectToStream, "[getHtmlTags()] We recommend against using streaming and a pageContext promise at the same time as progressive hydration won't work", { onlyOnce: true });
94
- // If there is a pageContext._pageContextPromise (which is resolved after the stream has ended) then the pageContext JSON data needs to await for it: https://vike.dev/stream#initial-data-after-stream-end
94
+ // If there is a pageContext._pageContextPromise (which is resolved after the stream has ended) then the pageContext JSON data needs to await for it: https://vike.dev/streaming#initial-data-after-stream-end
95
95
  return 'HTML_END';
96
96
  }
97
97
  if (injectToStream) {
@@ -186,7 +186,7 @@ async function renderTemplate(templateContent, pageContext) {
186
186
  const varType = typeof templateVar;
187
187
  const streamNote = ['boolean', 'number', 'bigint', 'symbol'].includes(varType)
188
188
  ? null
189
- : '(See https://vike.dev/stream for HTML streaming.)';
189
+ : '(See https://vike.dev/streaming for HTML streaming.)';
190
190
  (0, utils_js_1.assertUsage)(varType === 'string', getErrMsg(picocolors_1.default.cyan(`typeof htmlVar === "${varType}"`), streamNote));
191
191
  }
192
192
  {
@@ -631,7 +631,7 @@ exports.isStream = isStream;
631
631
  const __streamPipeWeb = '__streamPipeWeb';
632
632
  /** @deprecated */
633
633
  function pipeWebStream(pipe) {
634
- (0, utils_js_1.assertWarning)(false, 'pipeWebStream() is outdated, use stampPipe() instead. See https://vike.dev/stream', {
634
+ (0, utils_js_1.assertWarning)(false, 'pipeWebStream() is outdated, use stampPipe() instead. See https://vike.dev/streaming', {
635
635
  onlyOnce: true,
636
636
  showStackTrace: true
637
637
  });
@@ -668,7 +668,7 @@ exports.isStreamPipeWeb = isStreamPipeWeb;
668
668
  const __streamPipeNode = '__streamPipeNode';
669
669
  /** @deprecated */
670
670
  function pipeNodeStream(pipe) {
671
- (0, utils_js_1.assertWarning)(false, 'pipeNodeStream() is outdated, use stampPipe() instead. See https://vike.dev/stream', {
671
+ (0, utils_js_1.assertWarning)(false, 'pipeNodeStream() is outdated, use stampPipe() instead. See https://vike.dev/streaming', {
672
672
  onlyOnce: true,
673
673
  showStackTrace: true
674
674
  });
@@ -125,11 +125,11 @@ function processHookReturnValue(hookReturnValue, renderHook) {
125
125
  const val = hookReturnValue.pageContext;
126
126
  const errBegin = `${errPrefix} returned ${picocolors_1.default.cyan('{ pageContext }')}, but ${picocolors_1.default.cyan('pageContext')}`;
127
127
  if ((0, utils_js_1.isPromise)(val) || (0, utils_js_1.isCallable)(val)) {
128
- (0, utils_js_1.assertWarning)(!(0, utils_js_1.isPromise)(val), `${errBegin} is a promise which is deprecated in favor of async functions, see https://vike.dev/stream#initial-data-after-stream-end`, { onlyOnce: true });
128
+ (0, utils_js_1.assertWarning)(!(0, utils_js_1.isPromise)(val), `${errBegin} is a promise which is deprecated in favor of async functions, see https://vike.dev/streaming#initial-data-after-stream-end`, { onlyOnce: true });
129
129
  pageContextPromise = val;
130
130
  }
131
131
  else {
132
- (0, utils_js_1.assertUsage)((0, utils_js_1.isObject)(val), `${errBegin} should be an object or an async function, see https://vike.dev/stream#initial-data-after-stream-end`);
132
+ (0, utils_js_1.assertUsage)((0, utils_js_1.isObject)(val), `${errBegin} should be an object or an async function, see https://vike.dev/streaming#initial-data-after-stream-end`);
133
133
  (0, assertPageContextProvidedByUser_js_1.assertPageContextProvidedByUser)(val, renderHook);
134
134
  pageContextProvidedByRenderHook = val;
135
135
  }
@@ -8,7 +8,7 @@ const stream_js_1 = require("../html/stream.js");
8
8
  const utils_js_1 = require("../utils.js");
9
9
  const renderHtml_js_1 = require("../html/renderHtml.js");
10
10
  const picocolors_1 = __importDefault(require("@brillout/picocolors"));
11
- const streamDocs = 'See https://vike.dev/stream for more information.';
11
+ const streamDocs = 'See https://vike.dev/streaming for more information.';
12
12
  function getHttpResponseBody(htmlRender, renderHook) {
13
13
  if (typeof htmlRender !== 'string') {
14
14
  (0, utils_js_1.assertUsage)(false, getErrMsg(htmlRender, renderHook, 'body', `Use ${picocolors_1.default.cyan('pageContext.httpResponse.pipe()')} instead`));
@@ -44,7 +44,7 @@ async function loadUserFilesServerSide(pageContext) {
44
44
  // TODO/v1-release: remove
45
45
  Object.assign(pageContextAddendum, {
46
46
  _getPageAssets: async () => {
47
- (0, utils_js_1.assertWarning)(false, 'pageContext._getPageAssets() deprecated, see https://vike.dev/preload', {
47
+ (0, utils_js_1.assertWarning)(false, 'pageContext._getPageAssets() deprecated, see https://vike.dev/preloading', {
48
48
  onlyOnce: true,
49
49
  showStackTrace: true
50
50
  });
@@ -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.159-commit-d73533a';
5
+ const PROJECT_VERSION = '0.4.160-commit-a1101c1';
6
6
  exports.PROJECT_VERSION = PROJECT_VERSION;
7
7
  const projectInfo = {
8
8
  projectName: 'Vike',
@@ -547,7 +547,7 @@ function isDefiningPageConfig(configName) {
547
547
  }
548
548
  function getConfigDefinitions(interfaceFilesRelevant) {
549
549
  const configDefinitions = { ...configDefinitionsBuiltIn };
550
- Object.entries(interfaceFilesRelevant).forEach(([_locationId, interfaceFiles]) => {
550
+ Object.entries(interfaceFilesRelevant).reverse().forEach(([_locationId, interfaceFiles]) => {
551
551
  interfaceFiles.forEach((interfaceFile) => {
552
552
  const configMeta = interfaceFile.fileExportsByConfigName['meta'];
553
553
  if (!configMeta)
@@ -86,7 +86,7 @@ async function getHtmlTags(pageContext, injectToStream, injectFilter) {
86
86
  const positionJavaScriptEntry = (() => {
87
87
  if (pageContext._pageContextPromise) {
88
88
  assertWarning(!injectToStream, "[getHtmlTags()] We recommend against using streaming and a pageContext promise at the same time as progressive hydration won't work", { onlyOnce: true });
89
- // If there is a pageContext._pageContextPromise (which is resolved after the stream has ended) then the pageContext JSON data needs to await for it: https://vike.dev/stream#initial-data-after-stream-end
89
+ // If there is a pageContext._pageContextPromise (which is resolved after the stream has ended) then the pageContext JSON data needs to await for it: https://vike.dev/streaming#initial-data-after-stream-end
90
90
  return 'HTML_END';
91
91
  }
92
92
  if (injectToStream) {
@@ -181,7 +181,7 @@ async function renderTemplate(templateContent, pageContext) {
181
181
  const varType = typeof templateVar;
182
182
  const streamNote = ['boolean', 'number', 'bigint', 'symbol'].includes(varType)
183
183
  ? null
184
- : '(See https://vike.dev/stream for HTML streaming.)';
184
+ : '(See https://vike.dev/streaming for HTML streaming.)';
185
185
  assertUsage(varType === 'string', getErrMsg(pc.cyan(`typeof htmlVar === "${varType}"`), streamNote));
186
186
  }
187
187
  {
@@ -634,7 +634,7 @@ function isStream(something) {
634
634
  const __streamPipeWeb = '__streamPipeWeb';
635
635
  /** @deprecated */
636
636
  function pipeWebStream(pipe) {
637
- assertWarning(false, 'pipeWebStream() is outdated, use stampPipe() instead. See https://vike.dev/stream', {
637
+ assertWarning(false, 'pipeWebStream() is outdated, use stampPipe() instead. See https://vike.dev/streaming', {
638
638
  onlyOnce: true,
639
639
  showStackTrace: true
640
640
  });
@@ -669,7 +669,7 @@ function isStreamPipeWeb(thing) {
669
669
  const __streamPipeNode = '__streamPipeNode';
670
670
  /** @deprecated */
671
671
  function pipeNodeStream(pipe) {
672
- assertWarning(false, 'pipeNodeStream() is outdated, use stampPipe() instead. See https://vike.dev/stream', {
672
+ assertWarning(false, 'pipeNodeStream() is outdated, use stampPipe() instead. See https://vike.dev/streaming', {
673
673
  onlyOnce: true,
674
674
  showStackTrace: true
675
675
  });
@@ -119,11 +119,11 @@ function processHookReturnValue(hookReturnValue, renderHook) {
119
119
  const val = hookReturnValue.pageContext;
120
120
  const errBegin = `${errPrefix} returned ${pc.cyan('{ pageContext }')}, but ${pc.cyan('pageContext')}`;
121
121
  if (isPromise(val) || isCallable(val)) {
122
- assertWarning(!isPromise(val), `${errBegin} is a promise which is deprecated in favor of async functions, see https://vike.dev/stream#initial-data-after-stream-end`, { onlyOnce: true });
122
+ assertWarning(!isPromise(val), `${errBegin} is a promise which is deprecated in favor of async functions, see https://vike.dev/streaming#initial-data-after-stream-end`, { onlyOnce: true });
123
123
  pageContextPromise = val;
124
124
  }
125
125
  else {
126
- assertUsage(isObject(val), `${errBegin} should be an object or an async function, see https://vike.dev/stream#initial-data-after-stream-end`);
126
+ assertUsage(isObject(val), `${errBegin} should be an object or an async function, see https://vike.dev/streaming#initial-data-after-stream-end`);
127
127
  assertPageContextProvidedByUser(val, renderHook);
128
128
  pageContextProvidedByRenderHook = val;
129
129
  }
@@ -4,7 +4,7 @@ import { isStream, getStreamName, inferStreamName, isStreamWritableWeb, isStream
4
4
  import { assert, assertUsage, assertWarning } from '../utils.js';
5
5
  import { getHtmlString } from '../html/renderHtml.js';
6
6
  import pc from '@brillout/picocolors';
7
- const streamDocs = 'See https://vike.dev/stream for more information.';
7
+ const streamDocs = 'See https://vike.dev/streaming for more information.';
8
8
  function getHttpResponseBody(htmlRender, renderHook) {
9
9
  if (typeof htmlRender !== 'string') {
10
10
  assertUsage(false, getErrMsg(htmlRender, renderHook, 'body', `Use ${pc.cyan('pageContext.httpResponse.pipe()')} instead`));
@@ -42,7 +42,7 @@ async function loadUserFilesServerSide(pageContext) {
42
42
  // TODO/v1-release: remove
43
43
  Object.assign(pageContextAddendum, {
44
44
  _getPageAssets: async () => {
45
- assertWarning(false, 'pageContext._getPageAssets() deprecated, see https://vike.dev/preload', {
45
+ assertWarning(false, 'pageContext._getPageAssets() deprecated, see https://vike.dev/preloading', {
46
46
  onlyOnce: true,
47
47
  showStackTrace: true
48
48
  });
@@ -201,7 +201,7 @@ type OnRenderHtmlSync = (pageContext: PageContextServer) => DocumentHtml | {
201
201
  pageContext: OnRenderHtmlPageContextReturn | (() => Promise<OnRenderHtmlPageContextReturn> | OnRenderHtmlPageContextReturn);
202
202
  };
203
203
  type OnRenderHtmlPageContextReturn = Partial<Vike.PageContext & {
204
- /** See https://vike.dev/stream */
204
+ /** See https://vike.dev/streaming */
205
205
  enableEagerStreaming: boolean;
206
206
  }>;
207
207
  /** @deprecated Use a sync route() with an async guard() instead */
@@ -1,7 +1,7 @@
1
1
  export { projectInfo };
2
2
  export { PROJECT_VERSION };
3
- declare const PROJECT_VERSION: "0.4.159-commit-d73533a";
3
+ declare const PROJECT_VERSION: "0.4.160-commit-a1101c1";
4
4
  declare const projectInfo: {
5
5
  projectName: "Vike";
6
- projectVersion: "0.4.159-commit-d73533a";
6
+ projectVersion: "0.4.160-commit-a1101c1";
7
7
  };
@@ -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.159-commit-d73533a';
4
+ const PROJECT_VERSION = '0.4.160-commit-a1101c1';
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.159-commit-d73533a",
3
+ "version": "0.4.160-commit-a1101c1",
4
4
  "scripts": {
5
5
  "dev": "tsc --watch",
6
6
  "build": "rimraf dist/ && pnpm run build:esm && pnpm run build:cjs",