@sveltejs/kit 1.0.0-next.247 → 1.0.0-next.248
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 +1 -1
- package/dist/chunks/index.js +1 -1
- package/dist/cli.js +14 -8
- package/package.json +1 -1
package/assets/server/index.js
CHANGED
|
@@ -1546,7 +1546,7 @@ async function load_node({
|
|
|
1546
1546
|
// handle fetch requests for static assets. e.g. prebaked data, etc.
|
|
1547
1547
|
// we need to support everything the browser's fetch supports
|
|
1548
1548
|
const prefix = options.paths.assets || options.paths.base;
|
|
1549
|
-
const filename = (
|
|
1549
|
+
const filename = decodeURIComponent(
|
|
1550
1550
|
resolved.startsWith(prefix) ? resolved.slice(prefix.length) : resolved
|
|
1551
1551
|
).slice(1);
|
|
1552
1552
|
const filename_html = `${filename}/index.html`; // path may also match path/index.html
|
package/dist/chunks/index.js
CHANGED
|
@@ -1441,7 +1441,7 @@ async function load_node({
|
|
|
1441
1441
|
// handle fetch requests for static assets. e.g. prebaked data, etc.
|
|
1442
1442
|
// we need to support everything the browser's fetch supports
|
|
1443
1443
|
const prefix = options.paths.assets || options.paths.base;
|
|
1444
|
-
const filename = (
|
|
1444
|
+
const filename = decodeURIComponent(
|
|
1445
1445
|
resolved.startsWith(prefix) ? resolved.slice(prefix.length) : resolved
|
|
1446
1446
|
).slice(1);
|
|
1447
1447
|
const filename_html = `${filename}/index.html`; // path may also match path/index.html
|
package/dist/cli.js
CHANGED
|
@@ -986,17 +986,20 @@ async function launch(port, https) {
|
|
|
986
986
|
exec(`${cmd} ${https ? 'https' : 'http'}://localhost:${port}`);
|
|
987
987
|
}
|
|
988
988
|
|
|
989
|
-
const prog = sade('svelte-kit').version('1.0.0-next.
|
|
989
|
+
const prog = sade('svelte-kit').version('1.0.0-next.248');
|
|
990
990
|
|
|
991
991
|
prog
|
|
992
992
|
.command('dev')
|
|
993
993
|
.describe('Start a development server')
|
|
994
994
|
.option('-p, --port', 'Port')
|
|
995
|
-
.option('-h, --host', 'Host (only use this on trusted networks)')
|
|
996
|
-
.option('-H, --https', 'Use self-signed HTTPS certificate')
|
|
997
995
|
.option('-o, --open', 'Open a browser tab')
|
|
998
|
-
.
|
|
996
|
+
.option('--host', 'Host (only use this on trusted networks)')
|
|
997
|
+
.option('--https', 'Use self-signed HTTPS certificate')
|
|
998
|
+
.option('-H', 'no longer supported, use --https instead') // TODO remove for 1.0
|
|
999
|
+
.action(async ({ port, host, https, open, H }) => {
|
|
999
1000
|
try {
|
|
1001
|
+
if (H) throw new Error('-H is no longer supported — use --https instead');
|
|
1002
|
+
|
|
1000
1003
|
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
|
|
1001
1004
|
const config = await load_config();
|
|
1002
1005
|
|
|
@@ -1065,11 +1068,14 @@ prog
|
|
|
1065
1068
|
.command('preview')
|
|
1066
1069
|
.describe('Serve an already-built app')
|
|
1067
1070
|
.option('-p, --port', 'Port', 3000)
|
|
1068
|
-
.option('-h, --host', 'Host (only use this on trusted networks)', 'localhost')
|
|
1069
|
-
.option('-H, --https', 'Use self-signed HTTPS certificate', false)
|
|
1070
1071
|
.option('-o, --open', 'Open a browser tab', false)
|
|
1071
|
-
.
|
|
1072
|
+
.option('--host', 'Host (only use this on trusted networks)', 'localhost')
|
|
1073
|
+
.option('--https', 'Use self-signed HTTPS certificate', false)
|
|
1074
|
+
.option('-H', 'no longer supported, use --https instead') // TODO remove for 1.0
|
|
1075
|
+
.action(async ({ port, host, https, open, H }) => {
|
|
1072
1076
|
try {
|
|
1077
|
+
if (H) throw new Error('-H is no longer supported — use --https instead');
|
|
1078
|
+
|
|
1073
1079
|
await check_port(port);
|
|
1074
1080
|
|
|
1075
1081
|
process.env.NODE_ENV = process.env.NODE_ENV || 'production';
|
|
@@ -1138,7 +1144,7 @@ async function check_port(port) {
|
|
|
1138
1144
|
function welcome({ port, host, https, open, loose, allow, cwd }) {
|
|
1139
1145
|
if (open) launch(port, https);
|
|
1140
1146
|
|
|
1141
|
-
console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.
|
|
1147
|
+
console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.248'}\n`));
|
|
1142
1148
|
|
|
1143
1149
|
const protocol = https ? 'https:' : 'http:';
|
|
1144
1150
|
const exposed = typeof host !== 'undefined' && host !== 'localhost' && host !== '127.0.0.1';
|