@sveltejs/kit 1.0.0-next.330 → 1.0.0-next.331
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/dist/chunks/index.js +1 -1
- package/dist/chunks/index2.js +3 -1
- package/dist/chunks/index6.js +2 -0
- package/dist/cli.js +6 -6
- package/package.json +2 -2
- package/types/private.d.ts +5 -1
package/dist/chunks/index.js
CHANGED
package/dist/chunks/index2.js
CHANGED
|
@@ -1200,7 +1200,6 @@ async function prerender({ config, entries, files, log }) {
|
|
|
1200
1200
|
const dest = `${config.kit.outDir}/output/prerendered/${category}/${file}`;
|
|
1201
1201
|
|
|
1202
1202
|
if (written.has(file)) return;
|
|
1203
|
-
written.add(file);
|
|
1204
1203
|
|
|
1205
1204
|
if (response_type === REDIRECT) {
|
|
1206
1205
|
const location = response.headers.get('location');
|
|
@@ -1221,6 +1220,8 @@ async function prerender({ config, entries, files, log }) {
|
|
|
1221
1220
|
`<meta http-equiv="refresh" content=${escape_html_attr(`0;url=${location}`)}>`
|
|
1222
1221
|
);
|
|
1223
1222
|
|
|
1223
|
+
written.add(file);
|
|
1224
|
+
|
|
1224
1225
|
if (!prerendered.redirects.has(decoded)) {
|
|
1225
1226
|
prerendered.redirects.set(decoded, {
|
|
1226
1227
|
status: response.status,
|
|
@@ -1242,6 +1243,7 @@ async function prerender({ config, entries, files, log }) {
|
|
|
1242
1243
|
|
|
1243
1244
|
log.info(`${response.status} ${decoded}`);
|
|
1244
1245
|
writeFileSync(dest, body);
|
|
1246
|
+
written.add(file);
|
|
1245
1247
|
|
|
1246
1248
|
if (is_html) {
|
|
1247
1249
|
prerendered.pages.set(decoded, {
|
package/dist/chunks/index6.js
CHANGED
|
@@ -15632,6 +15632,7 @@ async function watch(config, cwd = process.cwd()) {
|
|
|
15632
15632
|
let timeout;
|
|
15633
15633
|
|
|
15634
15634
|
const watcher = chokidar.watch(lib, { ignoreInitial: true });
|
|
15635
|
+
const ready = new Promise((resolve) => watcher.on('ready', resolve));
|
|
15635
15636
|
|
|
15636
15637
|
watcher.on('all', async (type, path) => {
|
|
15637
15638
|
const file = analyze(config, relative(lib, path));
|
|
@@ -15699,6 +15700,7 @@ async function watch(config, cwd = process.cwd()) {
|
|
|
15699
15700
|
|
|
15700
15701
|
return {
|
|
15701
15702
|
watcher,
|
|
15703
|
+
ready,
|
|
15702
15704
|
settled: () =>
|
|
15703
15705
|
new Promise((fulfil, reject) => {
|
|
15704
15706
|
fulfillers.push(fulfil);
|
package/dist/cli.js
CHANGED
|
@@ -870,15 +870,15 @@ async function launch(port, https, base) {
|
|
|
870
870
|
exec(`${cmd} ${https ? 'https' : 'http'}://localhost:${port}${base}`);
|
|
871
871
|
}
|
|
872
872
|
|
|
873
|
-
const prog = sade('svelte-kit').version('1.0.0-next.
|
|
873
|
+
const prog = sade('svelte-kit').version('1.0.0-next.331');
|
|
874
874
|
|
|
875
875
|
prog
|
|
876
876
|
.command('dev')
|
|
877
877
|
.describe('Start a development server')
|
|
878
|
-
.option('-p, --port', 'Port')
|
|
879
|
-
.option('-o, --open', 'Open a browser tab')
|
|
880
|
-
.option('--host', 'Host (only use this on trusted networks)')
|
|
881
|
-
.option('--https', 'Use self-signed HTTPS certificate')
|
|
878
|
+
.option('-p, --port', 'Port', 3000)
|
|
879
|
+
.option('-o, --open', 'Open a browser tab', false)
|
|
880
|
+
.option('--host', 'Host (only use this on trusted networks)', 'localhost')
|
|
881
|
+
.option('--https', 'Use self-signed HTTPS certificate', false)
|
|
882
882
|
.option('-H', 'no longer supported, use --https instead') // TODO remove for 1.0
|
|
883
883
|
.action(async ({ port, host, https, open, H }) => {
|
|
884
884
|
try {
|
|
@@ -1049,7 +1049,7 @@ async function check_port(port) {
|
|
|
1049
1049
|
function welcome({ port, host, https, open, base, loose, allow, cwd }) {
|
|
1050
1050
|
if (open) launch(port, https, base);
|
|
1051
1051
|
|
|
1052
|
-
console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.
|
|
1052
|
+
console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.331'}\n`));
|
|
1053
1053
|
|
|
1054
1054
|
const protocol = https ? 'https:' : 'http:';
|
|
1055
1055
|
const exposed = typeof host !== 'undefined' && host !== 'localhost' && host !== '127.0.0.1';
|
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.331",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/sveltejs/kit",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
},
|
|
78
78
|
"types": "types/index.d.ts",
|
|
79
79
|
"engines": {
|
|
80
|
-
"node": ">=
|
|
80
|
+
"node": ">=16"
|
|
81
81
|
},
|
|
82
82
|
"scripts": {
|
|
83
83
|
"build": "rollup -c && node scripts/cp.js src/runtime/components assets/components && npm run types",
|
package/types/private.d.ts
CHANGED
|
@@ -27,7 +27,11 @@ export interface AdapterEntry {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export type BodyValidator<T> = {
|
|
30
|
-
[P in keyof T]: T[P] extends
|
|
30
|
+
[P in keyof T]: T[P] extends { [k: string]: infer V }
|
|
31
|
+
? BodyValidator<V> // recurse when T[P] is an object
|
|
32
|
+
: T[P] extends BigInt | Function | Symbol
|
|
33
|
+
? never
|
|
34
|
+
: T[P];
|
|
31
35
|
};
|
|
32
36
|
|
|
33
37
|
// Based on https://github.com/josh-hemphill/csp-typed-directives/blob/latest/src/csp.types.ts
|