@sveltejs/kit 1.0.0-next.3 → 1.0.0-next.301

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.
Files changed (68) hide show
  1. package/README.md +12 -9
  2. package/assets/app/env.js +20 -0
  3. package/assets/app/navigation.js +24 -0
  4. package/assets/app/paths.js +1 -0
  5. package/assets/app/stores.js +97 -0
  6. package/assets/client/singletons.js +13 -0
  7. package/assets/client/start.js +1650 -0
  8. package/assets/components/error.svelte +19 -3
  9. package/assets/env.js +8 -0
  10. package/assets/paths.js +13 -0
  11. package/assets/server/index.js +2845 -0
  12. package/dist/chunks/amp_hook.js +56 -0
  13. package/dist/chunks/cert.js +28154 -0
  14. package/dist/chunks/constants.js +663 -0
  15. package/dist/chunks/filesystem.js +110 -0
  16. package/dist/chunks/index.js +520 -0
  17. package/dist/chunks/index2.js +1325 -0
  18. package/dist/chunks/index3.js +118 -0
  19. package/dist/chunks/index4.js +185 -0
  20. package/dist/chunks/index5.js +251 -0
  21. package/dist/chunks/index6.js +15585 -0
  22. package/dist/chunks/index7.js +4207 -0
  23. package/dist/chunks/misc.js +77 -0
  24. package/dist/chunks/multipart-parser.js +449 -0
  25. package/dist/chunks/object.js +83 -0
  26. package/dist/chunks/sync.js +930 -0
  27. package/dist/chunks/url.js +56 -0
  28. package/dist/cli.js +1026 -67
  29. package/dist/hooks.js +28 -0
  30. package/dist/install-fetch.js +6518 -0
  31. package/dist/node.js +94 -0
  32. package/package.json +92 -52
  33. package/svelte-kit.js +2 -0
  34. package/types/ambient.d.ts +298 -0
  35. package/types/index.d.ts +262 -0
  36. package/types/internal.d.ts +317 -0
  37. package/types/private.d.ts +273 -0
  38. package/CHANGELOG.md +0 -165
  39. package/assets/renderer/index.js +0 -2492
  40. package/assets/renderer/index.js.map +0 -1
  41. package/assets/runtime/app/navigation.js +0 -47
  42. package/assets/runtime/app/navigation.js.map +0 -1
  43. package/assets/runtime/app/stores.js +0 -78
  44. package/assets/runtime/app/stores.js.map +0 -1
  45. package/assets/runtime/internal/singletons.js +0 -10
  46. package/assets/runtime/internal/singletons.js.map +0 -1
  47. package/assets/runtime/internal/start.js +0 -517
  48. package/assets/runtime/internal/start.js.map +0 -1
  49. package/dist/api.js +0 -38
  50. package/dist/api.js.map +0 -1
  51. package/dist/cli.js.map +0 -1
  52. package/dist/create_app.js +0 -550
  53. package/dist/create_app.js.map +0 -1
  54. package/dist/index.js +0 -10708
  55. package/dist/index.js.map +0 -1
  56. package/dist/index2.js +0 -509
  57. package/dist/index2.js.map +0 -1
  58. package/dist/index3.js +0 -62
  59. package/dist/index3.js.map +0 -1
  60. package/dist/index4.js +0 -563
  61. package/dist/index4.js.map +0 -1
  62. package/dist/index5.js +0 -276
  63. package/dist/index5.js.map +0 -1
  64. package/dist/package.js +0 -235
  65. package/dist/package.js.map +0 -1
  66. package/dist/utils.js +0 -58
  67. package/dist/utils.js.map +0 -1
  68. package/svelte-kit +0 -3
@@ -1,13 +1,29 @@
1
+ <script context="module">
2
+ /** @type {import('@sveltejs/kit').ErrorLoad} */
3
+ export function load({ error, status }) {
4
+ return {
5
+ props: { error, status }
6
+ };
7
+ }
8
+ </script>
9
+
1
10
  <script>
11
+ /** @type {number} */
2
12
  export let status;
13
+
14
+ /** @type {Error & {frame?: string} & {loc?: object}} */
3
15
  export let error;
4
16
  </script>
5
17
 
6
18
  <h1>{status}</h1>
7
19
 
8
- <p>{error.message}</p>
20
+ <pre>{error.message}</pre>
9
21
 
10
- <!-- TODO figure out what to do with stacktraces in prod -->
22
+ <!-- TODO figure out what to do with frames/stacktraces in prod -->
23
+ <!-- frame is populated by Svelte in its CompileError and is a Rollup/Vite convention -->
24
+ {#if error.frame}
25
+ <pre>{error.frame}</pre>
26
+ {/if}
11
27
  {#if error.stack}
12
28
  <pre>{error.stack}</pre>
13
- {/if}
29
+ {/if}
package/assets/env.js ADDED
@@ -0,0 +1,8 @@
1
+ let prerendering = false;
2
+
3
+ /** @param {boolean} value */
4
+ function set_prerendering(value) {
5
+ prerendering = value;
6
+ }
7
+
8
+ export { prerendering, set_prerendering };
@@ -0,0 +1,13 @@
1
+ /** @type {string} */
2
+ let base = '';
3
+
4
+ /** @type {string} */
5
+ let assets = '';
6
+
7
+ /** @param {{ base: string, assets: string }} paths */
8
+ function set_paths(paths) {
9
+ base = paths.base;
10
+ assets = paths.assets || base;
11
+ }
12
+
13
+ export { assets, base, set_paths };