vike 0.4.158 → 0.4.159
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.
|
@@ -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.
|
|
5
|
+
const PROJECT_VERSION = '0.4.159';
|
|
6
6
|
exports.PROJECT_VERSION = PROJECT_VERSION;
|
|
7
7
|
const projectInfo = {
|
|
8
8
|
projectName: 'Vike',
|
|
@@ -3,33 +3,26 @@ export { PageContextServer };
|
|
|
3
3
|
export { PageContextClient };
|
|
4
4
|
export { PageContextWithServerRouting };
|
|
5
5
|
export { PageContextClientWithServerRouting };
|
|
6
|
-
export { PageContextBuiltInServer };
|
|
7
6
|
export { PageContextBuiltInServerInternal };
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
7
|
+
export { PageContextBuiltInServer_deprecated as PageContextBuiltInServer };
|
|
8
|
+
export { PageContextBuiltInClientWithClientRouting_deprecated as PageContextBuiltInClientWithClientRouting };
|
|
9
|
+
export { PageContextBuiltInClientWithServerRouting_deprecated as PageContextBuiltInClientWithServerRouting };
|
|
10
10
|
import type { PageContextUrlComputedPropsInternal, PageContextUrlComputedPropsClient, PageContextUrlComputedPropsServer } from './addUrlComputedProps.js';
|
|
11
11
|
import type { ConfigEntries, ExportsAll } from './getPageFiles/getExports.js';
|
|
12
12
|
import type { Config } from './page-configs/Config.js';
|
|
13
13
|
import type { PageContextConfig } from './page-configs/Config/PageContextConfig.js';
|
|
14
14
|
import type { AbortStatusCode } from './route/abort.js';
|
|
15
|
-
type PageContextServer = PageContextBuiltInServer & Vike.PageContext;
|
|
16
|
-
type PageContext = PageContextClient | PageContextServer
|
|
17
|
-
type PageContextClient = PageContextBuiltInClientWithClientRouting & Vike.PageContext;
|
|
18
|
-
type PageContextWithServerRouting = PageContextClientWithServerRouting | PageContextServer
|
|
19
|
-
type PageContextClientWithServerRouting = PageContextBuiltInClientWithServerRouting & Vike.PageContext;
|
|
20
|
-
|
|
21
|
-
*
|
|
22
|
-
* https://vike.dev/pageContext
|
|
23
|
-
*/
|
|
24
|
-
type PageContextBuiltInServer<Page = [never]> = PageContextBuiltInCommon<Page> & PageContextUrlComputedPropsServer;
|
|
25
|
-
/** For Vike internal use */
|
|
26
|
-
type PageContextBuiltInServerInternal<Page = [never]> = PageContextBuiltInCommon<Page> & PageContextUrlComputedPropsInternal;
|
|
27
|
-
type PageContextBuiltInCommon<Page = [never]> = {
|
|
15
|
+
type PageContextServer<Data = unknown> = PageContextBuiltInServer<Data> & Vike.PageContext;
|
|
16
|
+
type PageContext<Data = unknown> = PageContextClient<Data> | PageContextServer<Data>;
|
|
17
|
+
type PageContextClient<Data = unknown> = PageContextBuiltInClientWithClientRouting<Data> & Vike.PageContext;
|
|
18
|
+
type PageContextWithServerRouting<Data = unknown> = PageContextClientWithServerRouting<Data> | PageContextServer<Data>;
|
|
19
|
+
type PageContextClientWithServerRouting<Data = unknown> = PageContextBuiltInClientWithServerRouting<Data> & Vike.PageContext;
|
|
20
|
+
type PageContextBuiltInCommon<Data> = {
|
|
28
21
|
/** The `export { Page }` of your `.page.js` file.
|
|
29
22
|
*
|
|
30
23
|
* https://vike.dev/Page
|
|
31
24
|
*/
|
|
32
|
-
Page:
|
|
25
|
+
Page: Config['Page'];
|
|
33
26
|
/** Route Parameters, e.g. `pageContext.routeParams.productId` for a Route String `/product/@productId`.
|
|
34
27
|
*
|
|
35
28
|
* https://vike.dev/route-string
|
|
@@ -39,7 +32,7 @@ type PageContextBuiltInCommon<Page = [never]> = {
|
|
|
39
32
|
*
|
|
40
33
|
* https://vike.dev/data
|
|
41
34
|
*/
|
|
42
|
-
data
|
|
35
|
+
data: Data;
|
|
43
36
|
/** The page's configuration values.
|
|
44
37
|
*
|
|
45
38
|
* https://vike.dev/config
|
|
@@ -100,11 +93,8 @@ type PageContextBuiltInCommon<Page = [never]> = {
|
|
|
100
93
|
/** @deprecated */
|
|
101
94
|
pageExports: Record<string, unknown>;
|
|
102
95
|
};
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
* https://vike.dev/pageContext
|
|
106
|
-
*/
|
|
107
|
-
type PageContextBuiltInClientWithClientRouting<Page = unknown> = Partial<PageContextBuiltInCommon<Page>> & Pick<PageContextBuiltInCommon<Page>, 'Page' | 'pageExports' | 'config' | 'configEntries' | 'exports' | 'exportsAll' | 'abortReason'> & {
|
|
96
|
+
type PageContextBuiltInServer<Data> = PageContextBuiltInCommon<Data> & PageContextUrlComputedPropsServer;
|
|
97
|
+
type PageContextBuiltInClientWithClientRouting<Data> = Partial<PageContextBuiltInCommon<Data>> & Pick<PageContextBuiltInCommon<Data>, 'Page' | 'pageExports' | 'config' | 'configEntries' | 'exports' | 'exportsAll' | 'abortReason' | 'data'> & {
|
|
108
98
|
/** Whether the current page is already rendered to HTML */
|
|
109
99
|
isHydration: boolean;
|
|
110
100
|
/**
|
|
@@ -114,11 +104,7 @@ type PageContextBuiltInClientWithClientRouting<Page = unknown> = Partial<PageCon
|
|
|
114
104
|
*/
|
|
115
105
|
isBackwardNavigation: boolean | null;
|
|
116
106
|
} & PageContextUrlComputedPropsClient;
|
|
117
|
-
|
|
118
|
-
*
|
|
119
|
-
* https://vike.dev/pageContext
|
|
120
|
-
*/
|
|
121
|
-
type PageContextBuiltInClientWithServerRouting<Page = unknown> = Partial<PageContextBuiltInCommon<Page>> & Pick<PageContextBuiltInCommon<Page>, 'Page' | 'pageExports' | 'exports' | 'abortReason'> & {
|
|
107
|
+
type PageContextBuiltInClientWithServerRouting<Data> = Partial<PageContextBuiltInCommon<Data>> & Pick<PageContextBuiltInCommon<Data>, 'Page' | 'pageExports' | 'exports' | 'abortReason' | 'data'> & {
|
|
122
108
|
/**
|
|
123
109
|
* Whether the current page is already rendered to HTML.
|
|
124
110
|
*
|
|
@@ -132,3 +118,44 @@ type PageContextBuiltInClientWithServerRouting<Page = unknown> = Partial<PageCon
|
|
|
132
118
|
*/
|
|
133
119
|
isBackwardNavigation: null;
|
|
134
120
|
};
|
|
121
|
+
/** For Vike internal use */
|
|
122
|
+
type PageContextBuiltInServerInternal = Omit<PageContextBuiltInCommon<unknown> & PageContextUrlComputedPropsInternal, 'data'>;
|
|
123
|
+
/** @deprecated
|
|
124
|
+
* Replace:
|
|
125
|
+
* ```
|
|
126
|
+
* import type { PageContextBuiltInServer } from 'vike/types'
|
|
127
|
+
* ```
|
|
128
|
+
* With:
|
|
129
|
+
* ```
|
|
130
|
+
* import { PageContextServer } from 'vike/types'
|
|
131
|
+
* ```
|
|
132
|
+
*
|
|
133
|
+
* See https://vike.dev/pageContext#typescript
|
|
134
|
+
*/
|
|
135
|
+
type PageContextBuiltInServer_deprecated<Page = never> = PageContextBuiltInServer<unknown>;
|
|
136
|
+
/** @deprecated
|
|
137
|
+
* Replace:
|
|
138
|
+
* ```
|
|
139
|
+
* import type { PageContextBuiltInClientWithClientRouting } from 'vike/types'
|
|
140
|
+
* ```
|
|
141
|
+
* With:
|
|
142
|
+
* ```
|
|
143
|
+
* import { PageContextClient } from 'vike/types'
|
|
144
|
+
* ```
|
|
145
|
+
*
|
|
146
|
+
* See https://vike.dev/pageContext#typescript
|
|
147
|
+
*/
|
|
148
|
+
type PageContextBuiltInClientWithClientRouting_deprecated<Page = never> = PageContextBuiltInClientWithClientRouting<unknown>;
|
|
149
|
+
/** @deprecated
|
|
150
|
+
* Replace:
|
|
151
|
+
* ```
|
|
152
|
+
* import type { PageContextBuiltInClientWithServerRouting } from 'vike/types'
|
|
153
|
+
* ```
|
|
154
|
+
* With:
|
|
155
|
+
* ```
|
|
156
|
+
* import { PageContextClientWithServerRouting as PageContextClient } from 'vike/types'
|
|
157
|
+
* ```
|
|
158
|
+
*
|
|
159
|
+
* See https://vike.dev/pageContext#typescript
|
|
160
|
+
*/
|
|
161
|
+
type PageContextBuiltInClientWithServerRouting_deprecated<Page = never> = PageContextBuiltInClientWithServerRouting<unknown>;
|
|
@@ -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.
|
|
4
|
+
declare const PROJECT_VERSION: "0.4.159";
|
|
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.
|
|
10
|
+
projectVersion: "0.4.159";
|
|
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.
|
|
4
|
+
const PROJECT_VERSION = '0.4.159';
|
|
5
5
|
const projectInfo = {
|
|
6
6
|
projectName: 'Vike',
|
|
7
7
|
projectVersion: PROJECT_VERSION,
|