@sveltejs/kit 1.0.0-next.263 → 1.0.0-next.264
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/client/start.js +0 -4
- package/assets/server/index.js +2 -2
- package/dist/chunks/index.js +1 -1
- package/dist/chunks/index7.js +11 -9
- package/dist/cli.js +11 -11
- package/package.json +1 -1
package/assets/client/start.js
CHANGED
|
@@ -1464,10 +1464,6 @@ class Renderer {
|
|
|
1464
1464
|
* }} opts
|
|
1465
1465
|
*/
|
|
1466
1466
|
async function start({ paths, target, session, route, spa, trailing_slash, hydrate }) {
|
|
1467
|
-
if (import.meta.env.DEV && !target) {
|
|
1468
|
-
throw new Error('Missing target element. See https://kit.svelte.dev/docs#configuration-target');
|
|
1469
|
-
}
|
|
1470
|
-
|
|
1471
1467
|
const renderer = new Renderer({
|
|
1472
1468
|
Root,
|
|
1473
1469
|
fallback,
|
package/assets/server/index.js
CHANGED
|
@@ -2311,7 +2311,7 @@ function get_page_config(leaf, options) {
|
|
|
2311
2311
|
// TODO remove for 1.0
|
|
2312
2312
|
if ('ssr' in leaf) {
|
|
2313
2313
|
throw new Error(
|
|
2314
|
-
'`export const ssr` has been removed — use the handle hook instead: https://kit.svelte.dev/docs#
|
|
2314
|
+
'`export const ssr` has been removed — use the handle hook instead: https://kit.svelte.dev/docs/hooks#handle'
|
|
2315
2315
|
);
|
|
2316
2316
|
}
|
|
2317
2317
|
|
|
@@ -2482,7 +2482,7 @@ async function respond(request, options, state = {}) {
|
|
|
2482
2482
|
});
|
|
2483
2483
|
} else {
|
|
2484
2484
|
const verb = allowed.length === 0 ? 'enabled' : 'allowed';
|
|
2485
|
-
const body = `${parameter}=${method_override} is not ${verb}. See https://kit.svelte.dev/docs#
|
|
2485
|
+
const body = `${parameter}=${method_override} is not ${verb}. See https://kit.svelte.dev/docs/configuration#methodoverride`;
|
|
2486
2486
|
|
|
2487
2487
|
return new Response(body, {
|
|
2488
2488
|
status: 400
|
package/dist/chunks/index.js
CHANGED
|
@@ -211,7 +211,7 @@ async function create_plugin(config, cwd) {
|
|
|
211
211
|
if (/** @type {any} */ (hooks).getContext) {
|
|
212
212
|
// TODO remove this for 1.0
|
|
213
213
|
throw new Error(
|
|
214
|
-
'The getContext hook has been removed. See https://kit.svelte.dev/docs
|
|
214
|
+
'The getContext hook has been removed. See https://kit.svelte.dev/docs/hooks'
|
|
215
215
|
);
|
|
216
216
|
}
|
|
217
217
|
|
package/dist/chunks/index7.js
CHANGED
|
@@ -15296,14 +15296,16 @@ async function make_package(config, cwd = process.cwd()) {
|
|
|
15296
15296
|
const svelte_ext = config.extensions.find((ext) => file.endsWith(ext)); // unlike `ext`, could be e.g. `.svelte.md`
|
|
15297
15297
|
|
|
15298
15298
|
if (!config.kit.package.files(normalized)) {
|
|
15299
|
-
const
|
|
15300
|
-
const
|
|
15301
|
-
|
|
15302
|
-
fs.
|
|
15303
|
-
|
|
15304
|
-
|
|
15305
|
-
|
|
15306
|
-
fs.
|
|
15299
|
+
const base = svelte_ext ? file : file.slice(0, -ext.length);
|
|
15300
|
+
for (const e of ['.d.ts', '.d.mts', '.d.cts']) {
|
|
15301
|
+
const dts_path = path.join(package_dir, base + e);
|
|
15302
|
+
if (fs.existsSync(dts_path)) {
|
|
15303
|
+
fs.unlinkSync(dts_path);
|
|
15304
|
+
|
|
15305
|
+
const dir = path.dirname(dts_path);
|
|
15306
|
+
if (fs.readdirSync(dir).length === 0) {
|
|
15307
|
+
fs.rmdirSync(dir);
|
|
15308
|
+
}
|
|
15307
15309
|
}
|
|
15308
15310
|
}
|
|
15309
15311
|
continue;
|
|
@@ -15573,7 +15575,7 @@ async function try_load_svelte2tsx() {
|
|
|
15573
15575
|
return await import('svelte2tsx');
|
|
15574
15576
|
} catch (e) {
|
|
15575
15577
|
throw new Error(
|
|
15576
|
-
'You need svelte2tsx and typescript if you want to generate type definitions. Install it through your package manager, or disable generation which is highly discouraged. See https://kit.svelte.dev/docs
|
|
15578
|
+
'You need svelte2tsx and typescript if you want to generate type definitions. Install it through your package manager, or disable generation which is highly discouraged. See https://kit.svelte.dev/docs/packaging'
|
|
15577
15579
|
);
|
|
15578
15580
|
}
|
|
15579
15581
|
}
|
package/dist/cli.js
CHANGED
|
@@ -466,7 +466,7 @@ const options = object(
|
|
|
466
466
|
message += ', rather than the name of an adapter';
|
|
467
467
|
}
|
|
468
468
|
|
|
469
|
-
throw new Error(`${message}. See https://kit.svelte.dev/docs
|
|
469
|
+
throw new Error(`${message}. See https://kit.svelte.dev/docs/adapters`);
|
|
470
470
|
}
|
|
471
471
|
|
|
472
472
|
return input;
|
|
@@ -480,7 +480,7 @@ const options = object(
|
|
|
480
480
|
if (input) {
|
|
481
481
|
if (input.startsWith('/') || input.endsWith('/')) {
|
|
482
482
|
throw new Error(
|
|
483
|
-
"config.kit.appDir cannot start or end with '/'. See https://kit.svelte.dev/docs
|
|
483
|
+
"config.kit.appDir cannot start or end with '/'. See https://kit.svelte.dev/docs/configuration"
|
|
484
484
|
);
|
|
485
485
|
}
|
|
486
486
|
} else {
|
|
@@ -589,7 +589,7 @@ const options = object(
|
|
|
589
589
|
|
|
590
590
|
if (input !== '' && (input.endsWith('/') || !input.startsWith('/'))) {
|
|
591
591
|
throw new Error(
|
|
592
|
-
`${keypath} option must be a root-relative path that starts but doesn't end with '/'. See https://kit.svelte.dev/docs#
|
|
592
|
+
`${keypath} option must be a root-relative path that starts but doesn't end with '/'. See https://kit.svelte.dev/docs/configuration#paths`
|
|
593
593
|
);
|
|
594
594
|
}
|
|
595
595
|
|
|
@@ -601,13 +601,13 @@ const options = object(
|
|
|
601
601
|
if (input) {
|
|
602
602
|
if (!/^[a-z]+:\/\//.test(input)) {
|
|
603
603
|
throw new Error(
|
|
604
|
-
`${keypath} option must be an absolute path, if specified. See https://kit.svelte.dev/docs#
|
|
604
|
+
`${keypath} option must be an absolute path, if specified. See https://kit.svelte.dev/docs/configuration#paths`
|
|
605
605
|
);
|
|
606
606
|
}
|
|
607
607
|
|
|
608
608
|
if (input.endsWith('/')) {
|
|
609
609
|
throw new Error(
|
|
610
|
-
`${keypath} option must not end with '/'. See https://kit.svelte.dev/docs#
|
|
610
|
+
`${keypath} option must not end with '/'. See https://kit.svelte.dev/docs/configuration#paths`
|
|
611
611
|
);
|
|
612
612
|
}
|
|
613
613
|
}
|
|
@@ -681,7 +681,7 @@ const options = object(
|
|
|
681
681
|
// TODO remove this for 1.0
|
|
682
682
|
ssr: error(
|
|
683
683
|
(keypath) =>
|
|
684
|
-
`${keypath} has been removed — use the handle hook instead: https://kit.svelte.dev/docs#
|
|
684
|
+
`${keypath} has been removed — use the handle hook instead: https://kit.svelte.dev/docs/hooks#handle'`
|
|
685
685
|
),
|
|
686
686
|
|
|
687
687
|
// TODO remove this for 1.0
|
|
@@ -904,7 +904,7 @@ async function load_config({ cwd = process.cwd() } = {}) {
|
|
|
904
904
|
|
|
905
905
|
if (!fs__default.existsSync(config_file)) {
|
|
906
906
|
throw new Error(
|
|
907
|
-
'You need to create a svelte.config.js file. See https://kit.svelte.dev/docs
|
|
907
|
+
'You need to create a svelte.config.js file. See https://kit.svelte.dev/docs/configuration'
|
|
908
908
|
);
|
|
909
909
|
}
|
|
910
910
|
|
|
@@ -929,7 +929,7 @@ async function load_config({ cwd = process.cwd() } = {}) {
|
|
|
929
929
|
function validate_config(config) {
|
|
930
930
|
if (typeof config !== 'object') {
|
|
931
931
|
throw new Error(
|
|
932
|
-
'svelte.config.js must have a configuration object as its default export. See https://kit.svelte.dev/docs
|
|
932
|
+
'svelte.config.js must have a configuration object as its default export. See https://kit.svelte.dev/docs/configuration'
|
|
933
933
|
);
|
|
934
934
|
}
|
|
935
935
|
|
|
@@ -995,7 +995,7 @@ async function launch(port, https) {
|
|
|
995
995
|
exec(`${cmd} ${https ? 'https' : 'http'}://localhost:${port}`);
|
|
996
996
|
}
|
|
997
997
|
|
|
998
|
-
const prog = sade('svelte-kit').version('1.0.0-next.
|
|
998
|
+
const prog = sade('svelte-kit').version('1.0.0-next.264');
|
|
999
999
|
|
|
1000
1000
|
prog
|
|
1001
1001
|
.command('dev')
|
|
@@ -1066,7 +1066,7 @@ prog
|
|
|
1066
1066
|
|
|
1067
1067
|
// prettier-ignore
|
|
1068
1068
|
console.log(
|
|
1069
|
-
`See ${$.bold().cyan('https://kit.svelte.dev/docs
|
|
1069
|
+
`See ${$.bold().cyan('https://kit.svelte.dev/docs/adapters')} to learn how to configure your app to run on the platform of your choosing`
|
|
1070
1070
|
);
|
|
1071
1071
|
} catch (error) {
|
|
1072
1072
|
handle_error(error);
|
|
@@ -1153,7 +1153,7 @@ async function check_port(port) {
|
|
|
1153
1153
|
function welcome({ port, host, https, open, loose, allow, cwd }) {
|
|
1154
1154
|
if (open) launch(port, https);
|
|
1155
1155
|
|
|
1156
|
-
console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.
|
|
1156
|
+
console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.264'}\n`));
|
|
1157
1157
|
|
|
1158
1158
|
const protocol = https ? 'https:' : 'http:';
|
|
1159
1159
|
const exposed = typeof host !== 'undefined' && host !== 'localhost' && host !== '127.0.0.1';
|