@sveltejs/kit 1.0.0-next.320 → 1.0.0-next.321

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.
@@ -169,7 +169,7 @@ async function preview({ port, host, config, https: use_https = false }) {
169
169
  });
170
170
 
171
171
  return new Promise((fulfil) => {
172
- http_server.listen(port, host || '0.0.0.0', () => {
172
+ http_server.listen(port, host, () => {
173
173
  fulfil(http_server);
174
174
  });
175
175
  });
@@ -419,6 +419,10 @@ function trace(file, path, tree, extensions) {
419
419
  const node = tree.get(parts.join('/'));
420
420
  const layout = node?.layouts[layout_id];
421
421
 
422
+ if (layout?.file && layouts.indexOf(layout.file) > -1) {
423
+ throw new Error(`Recursive layout detected: ${layout.file} -> ${layouts.join(' -> ')}`);
424
+ }
425
+
422
426
  // any segment that has neither a __layout nor an __error can be discarded.
423
427
  // in other words these...
424
428
  // layouts: [a, , b, c]
package/dist/cli.js CHANGED
@@ -459,7 +459,7 @@ const options = object(
459
459
 
460
460
  if (input !== '' && (input.endsWith('/') || !input.startsWith('/'))) {
461
461
  throw new Error(
462
- `${keypath} option must be a root-relative path that starts but doesn't end with '/'. See https://kit.svelte.dev/docs/configuration#paths`
462
+ `${keypath} option must either be the empty string or a root-relative path that starts but doesn't end with '/'. See https://kit.svelte.dev/docs/configuration#paths`
463
463
  );
464
464
  }
465
465
 
@@ -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.320');
873
+ const prog = sade('svelte-kit').version('1.0.0-next.321');
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.320'}\n`));
1052
+ console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.321'}\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.320",
3
+ "version": "1.0.0-next.321",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sveltejs/kit",