@sveltejs/kit 1.0.0-next.346 → 1.0.0-next.349
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/assets/server/index.js +24 -13
- package/dist/chunks/constants.js +1 -1
- package/dist/chunks/index.js +37 -34
- package/dist/chunks/index2.js +2 -0
- package/dist/chunks/index3.js +1 -2
- package/dist/chunks/index4.js +150 -198
- package/dist/chunks/index5.js +1 -3
- package/dist/chunks/multipart-parser.js +2 -8
- package/dist/chunks/plugin.js +41 -28
- package/dist/chunks/sync.js +4 -4
- package/dist/chunks/write_tsconfig.js +15 -14
- package/dist/cli.js +55 -158
- package/dist/node/polyfills.js +212 -72
- package/package.json +24 -9
- package/types/ambient.d.ts +1 -1
- package/types/index.d.ts +61 -59
- package/types/internal.d.ts +3 -0
- package/dist/chunks/cert.js +0 -28154
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltejs/kit",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.349",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/sveltejs/kit",
|
|
@@ -12,25 +12,40 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.46",
|
|
14
14
|
"chokidar": "^3.5.3",
|
|
15
|
-
"sade": "^1.
|
|
16
|
-
"vite": "^2.9.
|
|
15
|
+
"sade": "^1.8.1",
|
|
16
|
+
"vite": "^2.9.10"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
+
"@playwright/test": "^1.22.2",
|
|
20
|
+
"@rollup/plugin-replace": "^4.0.0",
|
|
19
21
|
"@types/connect": "^3.4.35",
|
|
20
|
-
"@types/cookie": "^0.5.
|
|
21
|
-
"@types/marked": "^4.0.
|
|
22
|
+
"@types/cookie": "^0.5.1",
|
|
23
|
+
"@types/marked": "^4.0.3",
|
|
22
24
|
"@types/mime": "^2.0.3",
|
|
23
|
-
"@types/
|
|
25
|
+
"@types/node": "^16.11.36",
|
|
26
|
+
"@types/sade": "^1.7.4",
|
|
24
27
|
"@types/set-cookie-parser": "^2.4.2",
|
|
25
28
|
"cookie": "^0.5.0",
|
|
29
|
+
"cross-env": "^7.0.3",
|
|
26
30
|
"devalue": "^2.0.1",
|
|
31
|
+
"eslint": "^8.16.0",
|
|
27
32
|
"kleur": "^4.1.4",
|
|
28
33
|
"locate-character": "^2.0.5",
|
|
34
|
+
"marked": "^4.0.16",
|
|
29
35
|
"mime": "^3.0.0",
|
|
30
|
-
"node-fetch": "^3.
|
|
31
|
-
"
|
|
36
|
+
"node-fetch": "^3.2.4",
|
|
37
|
+
"port-authority": "^1.2.0",
|
|
38
|
+
"rollup": "^2.75.3",
|
|
39
|
+
"selfsigned": "^2.0.1",
|
|
32
40
|
"set-cookie-parser": "^2.4.8",
|
|
33
|
-
"
|
|
41
|
+
"sirv": "^2.0.2",
|
|
42
|
+
"svelte": "^3.48.0",
|
|
43
|
+
"svelte-check": "^2.7.1",
|
|
44
|
+
"svelte-preprocess": "^4.10.6",
|
|
45
|
+
"svelte2tsx": "~0.5.10",
|
|
46
|
+
"tiny-glob": "^0.2.9",
|
|
47
|
+
"typescript": "^4.7.2",
|
|
48
|
+
"uvu": "^0.5.3"
|
|
34
49
|
},
|
|
35
50
|
"peerDependencies": {
|
|
36
51
|
"svelte": "^3.44.0"
|
package/types/ambient.d.ts
CHANGED
|
@@ -106,7 +106,7 @@ declare module '$app/navigation' {
|
|
|
106
106
|
opts?: { replaceState?: boolean; noscroll?: boolean; keepfocus?: boolean; state?: any }
|
|
107
107
|
): Promise<void>;
|
|
108
108
|
/**
|
|
109
|
-
* Causes any `load` functions belonging to the currently active page to re-run if they `fetch` the resource in question. Returns a `Promise` that resolves when the page is subsequently updated.
|
|
109
|
+
* Causes any `load` functions belonging to the currently active page to re-run if they `fetch` the resource in question, or re-fetches data from a page endpoint if the invalidated resource is the page itself. Returns a `Promise` that resolves when the page is subsequently updated.
|
|
110
110
|
* @param dependency The invalidated resource
|
|
111
111
|
*/
|
|
112
112
|
export function invalidate(dependency: string | ((href: string) => boolean)): Promise<void>;
|
package/types/index.d.ts
CHANGED
|
@@ -91,68 +91,70 @@ export interface Builder {
|
|
|
91
91
|
export interface Config {
|
|
92
92
|
compilerOptions?: CompileOptions;
|
|
93
93
|
extensions?: string[];
|
|
94
|
-
kit?:
|
|
95
|
-
adapter?: Adapter;
|
|
96
|
-
alias?: Record<string, string>;
|
|
97
|
-
appDir?: string;
|
|
98
|
-
browser?: {
|
|
99
|
-
hydrate?: boolean;
|
|
100
|
-
router?: boolean;
|
|
101
|
-
};
|
|
102
|
-
csp?: {
|
|
103
|
-
mode?: 'hash' | 'nonce' | 'auto';
|
|
104
|
-
directives?: CspDirectives;
|
|
105
|
-
};
|
|
106
|
-
endpointExtensions?: string[];
|
|
107
|
-
files?: {
|
|
108
|
-
assets?: string;
|
|
109
|
-
hooks?: string;
|
|
110
|
-
lib?: string;
|
|
111
|
-
params?: string;
|
|
112
|
-
routes?: string;
|
|
113
|
-
serviceWorker?: string;
|
|
114
|
-
template?: string;
|
|
115
|
-
};
|
|
116
|
-
floc?: boolean;
|
|
117
|
-
inlineStyleThreshold?: number;
|
|
118
|
-
methodOverride?: {
|
|
119
|
-
parameter?: string;
|
|
120
|
-
allowed?: string[];
|
|
121
|
-
};
|
|
122
|
-
outDir?: string;
|
|
123
|
-
package?: {
|
|
124
|
-
dir?: string;
|
|
125
|
-
emitTypes?: boolean;
|
|
126
|
-
exports?(filepath: string): boolean;
|
|
127
|
-
files?(filepath: string): boolean;
|
|
128
|
-
};
|
|
129
|
-
paths?: {
|
|
130
|
-
assets?: string;
|
|
131
|
-
base?: string;
|
|
132
|
-
};
|
|
133
|
-
prerender?: {
|
|
134
|
-
concurrency?: number;
|
|
135
|
-
crawl?: boolean;
|
|
136
|
-
default?: boolean;
|
|
137
|
-
enabled?: boolean;
|
|
138
|
-
entries?: Array<'*' | `/${string}`>;
|
|
139
|
-
onError?: PrerenderOnErrorValue;
|
|
140
|
-
};
|
|
141
|
-
routes?: (filepath: string) => boolean;
|
|
142
|
-
serviceWorker?: {
|
|
143
|
-
register?: boolean;
|
|
144
|
-
files?: (filepath: string) => boolean;
|
|
145
|
-
};
|
|
146
|
-
trailingSlash?: TrailingSlash;
|
|
147
|
-
version?: {
|
|
148
|
-
name?: string;
|
|
149
|
-
pollInterval?: number;
|
|
150
|
-
};
|
|
151
|
-
vite?: import('vite').UserConfig | (() => MaybePromise<import('vite').UserConfig>);
|
|
152
|
-
};
|
|
94
|
+
kit?: KitConfig;
|
|
153
95
|
preprocess?: any;
|
|
154
96
|
}
|
|
155
97
|
|
|
98
|
+
export interface KitConfig {
|
|
99
|
+
adapter?: Adapter;
|
|
100
|
+
alias?: Record<string, string>;
|
|
101
|
+
appDir?: string;
|
|
102
|
+
browser?: {
|
|
103
|
+
hydrate?: boolean;
|
|
104
|
+
router?: boolean;
|
|
105
|
+
};
|
|
106
|
+
csp?: {
|
|
107
|
+
mode?: 'hash' | 'nonce' | 'auto';
|
|
108
|
+
directives?: CspDirectives;
|
|
109
|
+
};
|
|
110
|
+
endpointExtensions?: string[];
|
|
111
|
+
files?: {
|
|
112
|
+
assets?: string;
|
|
113
|
+
hooks?: string;
|
|
114
|
+
lib?: string;
|
|
115
|
+
params?: string;
|
|
116
|
+
routes?: string;
|
|
117
|
+
serviceWorker?: string;
|
|
118
|
+
template?: string;
|
|
119
|
+
};
|
|
120
|
+
floc?: boolean;
|
|
121
|
+
inlineStyleThreshold?: number;
|
|
122
|
+
methodOverride?: {
|
|
123
|
+
parameter?: string;
|
|
124
|
+
allowed?: string[];
|
|
125
|
+
};
|
|
126
|
+
outDir?: string;
|
|
127
|
+
package?: {
|
|
128
|
+
dir?: string;
|
|
129
|
+
emitTypes?: boolean;
|
|
130
|
+
exports?(filepath: string): boolean;
|
|
131
|
+
files?(filepath: string): boolean;
|
|
132
|
+
};
|
|
133
|
+
paths?: {
|
|
134
|
+
assets?: string;
|
|
135
|
+
base?: string;
|
|
136
|
+
};
|
|
137
|
+
prerender?: {
|
|
138
|
+
concurrency?: number;
|
|
139
|
+
crawl?: boolean;
|
|
140
|
+
default?: boolean;
|
|
141
|
+
enabled?: boolean;
|
|
142
|
+
entries?: Array<'*' | `/${string}`>;
|
|
143
|
+
onError?: PrerenderOnErrorValue;
|
|
144
|
+
};
|
|
145
|
+
routes?: (filepath: string) => boolean;
|
|
146
|
+
serviceWorker?: {
|
|
147
|
+
register?: boolean;
|
|
148
|
+
files?: (filepath: string) => boolean;
|
|
149
|
+
};
|
|
150
|
+
trailingSlash?: TrailingSlash;
|
|
151
|
+
version?: {
|
|
152
|
+
name?: string;
|
|
153
|
+
pollInterval?: number;
|
|
154
|
+
};
|
|
155
|
+
vite?: import('vite').UserConfig | (() => MaybePromise<import('vite').UserConfig>);
|
|
156
|
+
}
|
|
157
|
+
|
|
156
158
|
export interface ExternalFetch {
|
|
157
159
|
(req: Request): Promise<Response>;
|
|
158
160
|
}
|
package/types/internal.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
GetSession,
|
|
6
6
|
Handle,
|
|
7
7
|
HandleError,
|
|
8
|
+
KitConfig,
|
|
8
9
|
Load,
|
|
9
10
|
RequestEvent,
|
|
10
11
|
RequestHandler,
|
|
@@ -319,5 +320,7 @@ export type StrictBody = string | Uint8Array;
|
|
|
319
320
|
|
|
320
321
|
export type ValidatedConfig = RecursiveRequired<Config>;
|
|
321
322
|
|
|
323
|
+
export type ValidatedKitConfig = RecursiveRequired<KitConfig>;
|
|
324
|
+
|
|
322
325
|
export * from './index';
|
|
323
326
|
export * from './private';
|