@sveltejs/kit 1.0.0-next.248 → 1.0.0-next.249
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/index2.js +6 -7
- package/dist/chunks/index3.js +1 -0
- package/dist/chunks/index4.js +6 -1
- package/dist/cli.js +4 -2
- package/package.json +1 -1
- package/types/config.d.ts +1 -0
- package/types/internal.d.ts +1 -0
package/dist/chunks/index2.js
CHANGED
|
@@ -455,17 +455,16 @@ function create_manifest_data({
|
|
|
455
455
|
}
|
|
456
456
|
});
|
|
457
457
|
|
|
458
|
-
if (
|
|
459
|
-
|
|
460
|
-
throw new Error(`Files and directories prefixed with __ are reserved (saw ${file})`);
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
return;
|
|
458
|
+
if (basename.startsWith('__') && !specials.has(name)) {
|
|
459
|
+
throw new Error(`Files and directories prefixed with __ are reserved (saw ${file})`);
|
|
464
460
|
}
|
|
465
461
|
|
|
466
|
-
if (basename[0] === '.' && basename !== '.well-known') return null;
|
|
467
462
|
if (!is_dir && !/^(\.[a-z0-9]+)+$/i.test(ext)) return null; // filter out tmp files etc
|
|
468
463
|
|
|
464
|
+
if (!config.kit.routes(file)) {
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
|
|
469
468
|
const segment = is_dir ? basename : name;
|
|
470
469
|
|
|
471
470
|
if (/\]\[/.test(segment)) {
|
package/dist/chunks/index3.js
CHANGED
|
@@ -626,6 +626,7 @@ async function build(config) {
|
|
|
626
626
|
const build_data = {
|
|
627
627
|
app_dir: config.kit.appDir,
|
|
628
628
|
manifest_data: options.manifest_data,
|
|
629
|
+
service_worker: options.service_worker_entry_file ? 'service_worker.js' : null, // TODO make file configurable?
|
|
629
630
|
client,
|
|
630
631
|
server,
|
|
631
632
|
static: options.manifest_data.assets.map((asset) => posixify(asset.file)),
|
package/dist/chunks/index4.js
CHANGED
|
@@ -47,10 +47,15 @@ function generate_manifest(
|
|
|
47
47
|
? (path) => `() => import('${path}')`
|
|
48
48
|
: (path) => `() => Promise.resolve().then(() => require('${path}'))`;
|
|
49
49
|
|
|
50
|
+
const assets = build_data.manifest_data.assets.map((asset) => asset.file);
|
|
51
|
+
if (build_data.service_worker) {
|
|
52
|
+
assets.push(build_data.service_worker);
|
|
53
|
+
}
|
|
54
|
+
|
|
50
55
|
// prettier-ignore
|
|
51
56
|
return `{
|
|
52
57
|
appDir: ${s(build_data.app_dir)},
|
|
53
|
-
assets: new Set(${s(
|
|
58
|
+
assets: new Set(${s(assets)}),
|
|
54
59
|
_: {
|
|
55
60
|
mime: ${s(get_mime_lookup(build_data.manifest_data))},
|
|
56
61
|
entry: ${s(build_data.client.entry)},
|
package/dist/cli.js
CHANGED
|
@@ -676,6 +676,8 @@ const options = object(
|
|
|
676
676
|
|
|
677
677
|
router: boolean(true),
|
|
678
678
|
|
|
679
|
+
routes: fun((filepath) => !/(?:(?:^_|\/_)|(?:^\.|\/\.)(?!well-known))/.test(filepath)),
|
|
680
|
+
|
|
679
681
|
serviceWorker: object({
|
|
680
682
|
register: boolean(true),
|
|
681
683
|
files: fun((filename) => !/\.DS_STORE/.test(filename))
|
|
@@ -986,7 +988,7 @@ async function launch(port, https) {
|
|
|
986
988
|
exec(`${cmd} ${https ? 'https' : 'http'}://localhost:${port}`);
|
|
987
989
|
}
|
|
988
990
|
|
|
989
|
-
const prog = sade('svelte-kit').version('1.0.0-next.
|
|
991
|
+
const prog = sade('svelte-kit').version('1.0.0-next.249');
|
|
990
992
|
|
|
991
993
|
prog
|
|
992
994
|
.command('dev')
|
|
@@ -1144,7 +1146,7 @@ async function check_port(port) {
|
|
|
1144
1146
|
function welcome({ port, host, https, open, loose, allow, cwd }) {
|
|
1145
1147
|
if (open) launch(port, https);
|
|
1146
1148
|
|
|
1147
|
-
console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.
|
|
1149
|
+
console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.249'}\n`));
|
|
1148
1150
|
|
|
1149
1151
|
const protocol = https ? 'https:' : 'http:';
|
|
1150
1152
|
const exposed = typeof host !== 'undefined' && host !== 'localhost' && host !== '127.0.0.1';
|
package/package.json
CHANGED
package/types/config.d.ts
CHANGED
package/types/internal.d.ts
CHANGED