@sveltejs/kit 1.0.0-next.322 → 1.0.0-next.325
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 +7 -11
- package/dist/chunks/sync.js +11 -5
- package/dist/cli.js +4 -3
- package/package.json +1 -1
package/dist/chunks/index2.js
CHANGED
|
@@ -38,16 +38,12 @@ async function build_service_worker(
|
|
|
38
38
|
prerendered,
|
|
39
39
|
client_manifest
|
|
40
40
|
) {
|
|
41
|
-
|
|
42
|
-
const app_files = new Set();
|
|
41
|
+
const build = new Set();
|
|
43
42
|
for (const key in client_manifest) {
|
|
44
|
-
const { file, css } = client_manifest[key];
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
app_files.add(file);
|
|
49
|
-
});
|
|
50
|
-
}
|
|
43
|
+
const { file, css = [], assets = [] } = client_manifest[key];
|
|
44
|
+
build.add(file);
|
|
45
|
+
css.forEach((file) => build.add(file));
|
|
46
|
+
assets.forEach((file) => build.add(file));
|
|
51
47
|
}
|
|
52
48
|
|
|
53
49
|
const service_worker = `${config.kit.outDir}/generated/service-worker.js`;
|
|
@@ -63,7 +59,7 @@ async function build_service_worker(
|
|
|
63
59
|
};
|
|
64
60
|
|
|
65
61
|
export const build = [
|
|
66
|
-
${Array.from(
|
|
62
|
+
${Array.from(build)
|
|
67
63
|
.map((file) => `${s(`${config.kit.paths.base}/${config.kit.appDir}/${file}`)}`)
|
|
68
64
|
.join(',\n\t\t\t\t')}
|
|
69
65
|
];
|
|
@@ -460,7 +456,7 @@ async function build_server(
|
|
|
460
456
|
|
|
461
457
|
const default_config = {
|
|
462
458
|
build: {
|
|
463
|
-
target: '
|
|
459
|
+
target: 'node14.8'
|
|
464
460
|
},
|
|
465
461
|
ssr: {
|
|
466
462
|
// when developing against the Kit src code, we want to ensure that
|
package/dist/chunks/sync.js
CHANGED
|
@@ -412,6 +412,10 @@ function trace(file, path, tree, extensions) {
|
|
|
412
412
|
|
|
413
413
|
let layout_id = base.includes('@') ? base.split('@')[1] : DEFAULT;
|
|
414
414
|
|
|
415
|
+
if (parts.findIndex((part) => part.indexOf('@') > -1) > -1) {
|
|
416
|
+
throw new Error(`Invalid route ${file} - named layouts are not allowed in directories`);
|
|
417
|
+
}
|
|
418
|
+
|
|
415
419
|
// walk up the tree, find which __layout and __error components
|
|
416
420
|
// apply to this page
|
|
417
421
|
// eslint-disable-next-line
|
|
@@ -795,10 +799,12 @@ function write_tsconfig(config) {
|
|
|
795
799
|
compilerOptions: {
|
|
796
800
|
// generated options
|
|
797
801
|
baseUrl: config_relative('.'),
|
|
798
|
-
paths:
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
+
paths: fs__default.existsSync(config.kit.files.lib)
|
|
803
|
+
? {
|
|
804
|
+
$lib: [project_relative(config.kit.files.lib)],
|
|
805
|
+
'$lib/*': [project_relative(config.kit.files.lib + '/*')]
|
|
806
|
+
}
|
|
807
|
+
: {},
|
|
802
808
|
rootDirs: [config_relative('.'), './types'],
|
|
803
809
|
|
|
804
810
|
// essential options
|
|
@@ -837,7 +843,7 @@ function validate(config, out, user_file) {
|
|
|
837
843
|
if (extends_framework_config) {
|
|
838
844
|
const { paths: user_paths } = user_tsconfig.compilerOptions || {};
|
|
839
845
|
|
|
840
|
-
if (user_paths) {
|
|
846
|
+
if (user_paths && fs__default.existsSync(config.kit.files.lib)) {
|
|
841
847
|
/** @type {string[]} */
|
|
842
848
|
const lib = user_paths['$lib'] || [];
|
|
843
849
|
/** @type {string[]} */
|
package/dist/cli.js
CHANGED
|
@@ -870,7 +870,7 @@ 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.325');
|
|
874
874
|
|
|
875
875
|
prog
|
|
876
876
|
.command('dev')
|
|
@@ -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.325'}\n`));
|
|
1053
1053
|
|
|
1054
1054
|
const protocol = https ? 'https:' : 'http:';
|
|
1055
1055
|
const exposed = typeof host !== 'undefined' && host !== 'localhost' && host !== '127.0.0.1';
|
|
@@ -1057,7 +1057,8 @@ function welcome({ port, host, https, open, base, loose, allow, cwd }) {
|
|
|
1057
1057
|
Object.values(networkInterfaces()).forEach((interfaces) => {
|
|
1058
1058
|
if (!interfaces) return;
|
|
1059
1059
|
interfaces.forEach((details) => {
|
|
1060
|
-
|
|
1060
|
+
// @ts-ignore node18 returns a number
|
|
1061
|
+
if (details.family !== 'IPv4' && details.family !== 4) return;
|
|
1061
1062
|
|
|
1062
1063
|
// prettier-ignore
|
|
1063
1064
|
if (details.internal) {
|