@sveltejs/kit 1.0.0-next.30 → 1.0.0-next.300

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 (75) 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 +1614 -0
  8. package/assets/components/error.svelte +18 -2
  9. package/assets/env.js +8 -0
  10. package/assets/paths.js +13 -0
  11. package/assets/server/index.js +2847 -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 +521 -0
  17. package/dist/chunks/index2.js +1326 -0
  18. package/dist/chunks/index3.js +119 -0
  19. package/dist/chunks/index4.js +197 -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 +3 -0
  24. package/dist/chunks/multipart-parser.js +449 -0
  25. package/dist/chunks/object.js +83 -0
  26. package/dist/chunks/routing.js +39 -0
  27. package/dist/chunks/sync.js +1055 -0
  28. package/dist/chunks/url.js +56 -0
  29. package/dist/cli.js +1016 -91
  30. package/dist/hooks.js +28 -0
  31. package/dist/install-fetch.js +6518 -0
  32. package/dist/node.js +94 -0
  33. package/package.json +92 -54
  34. package/svelte-kit.js +2 -0
  35. package/types/ambient.d.ts +298 -0
  36. package/types/index.d.ts +262 -0
  37. package/types/internal.d.ts +321 -0
  38. package/types/private.d.ts +273 -0
  39. package/CHANGELOG.md +0 -338
  40. package/assets/runtime/app/navigation.js +0 -23
  41. package/assets/runtime/app/navigation.js.map +0 -1
  42. package/assets/runtime/app/paths.js +0 -2
  43. package/assets/runtime/app/paths.js.map +0 -1
  44. package/assets/runtime/app/stores.js +0 -78
  45. package/assets/runtime/app/stores.js.map +0 -1
  46. package/assets/runtime/internal/singletons.js +0 -15
  47. package/assets/runtime/internal/singletons.js.map +0 -1
  48. package/assets/runtime/internal/start.js +0 -591
  49. package/assets/runtime/internal/start.js.map +0 -1
  50. package/assets/runtime/utils-85ebcc60.js +0 -18
  51. package/assets/runtime/utils-85ebcc60.js.map +0 -1
  52. package/dist/api.js +0 -44
  53. package/dist/api.js.map +0 -1
  54. package/dist/cli.js.map +0 -1
  55. package/dist/create_app.js +0 -580
  56. package/dist/create_app.js.map +0 -1
  57. package/dist/index.js +0 -368
  58. package/dist/index.js.map +0 -1
  59. package/dist/index2.js +0 -12035
  60. package/dist/index2.js.map +0 -1
  61. package/dist/index3.js +0 -549
  62. package/dist/index3.js.map +0 -1
  63. package/dist/index4.js +0 -74
  64. package/dist/index4.js.map +0 -1
  65. package/dist/index5.js +0 -464
  66. package/dist/index5.js.map +0 -1
  67. package/dist/index6.js +0 -735
  68. package/dist/index6.js.map +0 -1
  69. package/dist/renderer.js +0 -2425
  70. package/dist/renderer.js.map +0 -1
  71. package/dist/standard.js +0 -101
  72. package/dist/standard.js.map +0 -1
  73. package/dist/utils.js +0 -58
  74. package/dist/utils.js.map +0 -1
  75. package/svelte-kit +0 -3
@@ -0,0 +1,273 @@
1
+ // This module contains types that are visible in the documentation,
2
+ // but which cannot be imported from `@sveltejs/kit`. Care should
3
+ // be taken to avoid breaking changes when editing this file
4
+
5
+ import { ValidatedConfig } from './internal';
6
+
7
+ export interface AdapterEntry {
8
+ /**
9
+ * A string that uniquely identifies an HTTP service (e.g. serverless function) and is used for deduplication.
10
+ * For example, `/foo/a-[b]` and `/foo/[c]` are different routes, but would both
11
+ * be represented in a Netlify _redirects file as `/foo/:param`, so they share an ID
12
+ */
13
+ id: string;
14
+
15
+ /**
16
+ * A function that compares the candidate route with the current route to determine
17
+ * if it should be treated as a fallback for the current route. For example, `/foo/[c]`
18
+ * is a fallback for `/foo/a-[b]`, and `/[...catchall]` is a fallback for all routes
19
+ */
20
+ filter: (route: RouteDefinition) => boolean;
21
+
22
+ /**
23
+ * A function that is invoked once the entry has been created. This is where you
24
+ * should write the function to the filesystem and generate redirect manifests.
25
+ */
26
+ complete: (entry: {
27
+ generateManifest: (opts: { relativePath: string; format?: 'esm' | 'cjs' }) => string;
28
+ }) => void;
29
+ }
30
+
31
+ // Based on https://github.com/josh-hemphill/csp-typed-directives/blob/latest/src/csp.types.ts
32
+ //
33
+ // MIT License
34
+ //
35
+ // Copyright (c) 2021-present, Joshua Hemphill
36
+ // Copyright (c) 2021, Tecnico Corporation
37
+ //
38
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
39
+ // of this software and associated documentation files (the "Software"), to deal
40
+ // in the Software without restriction, including without limitation the rights
41
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
42
+ // copies of the Software, and to permit persons to whom the Software is
43
+ // furnished to do so, subject to the following conditions:
44
+ //
45
+ // The above copyright notice and this permission notice shall be included in all
46
+ // copies or substantial portions of the Software.
47
+ //
48
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
49
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
50
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
51
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
52
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
53
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
54
+ // SOFTWARE.
55
+
56
+ export namespace Csp {
57
+ type ActionSource = 'strict-dynamic' | 'report-sample';
58
+ type BaseSource = 'self' | 'unsafe-eval' | 'unsafe-hashes' | 'unsafe-inline' | 'none';
59
+ type CryptoSource = `${'nonce' | 'sha256' | 'sha384' | 'sha512'}-${string}`;
60
+ type FrameSource = HostSource | SchemeSource | 'self' | 'none';
61
+ type HostNameScheme = `${string}.${string}` | 'localhost';
62
+ type HostSource = `${HostProtocolSchemes}${HostNameScheme}${PortScheme}`;
63
+ type HostProtocolSchemes = `${string}://` | '';
64
+ type HttpDelineator = '/' | '?' | '#' | '\\';
65
+ type PortScheme = `:${number}` | '' | ':*';
66
+ type SchemeSource = 'http:' | 'https:' | 'data:' | 'mediastream:' | 'blob:' | 'filesystem:';
67
+ type Source = HostSource | SchemeSource | CryptoSource | BaseSource;
68
+ type Sources = Source[];
69
+ type UriPath = `${HttpDelineator}${string}`;
70
+ }
71
+
72
+ export interface CspDirectives {
73
+ 'child-src'?: Csp.Sources;
74
+ 'default-src'?: Array<Csp.Source | Csp.ActionSource>;
75
+ 'frame-src'?: Csp.Sources;
76
+ 'worker-src'?: Csp.Sources;
77
+ 'connect-src'?: Csp.Sources;
78
+ 'font-src'?: Csp.Sources;
79
+ 'img-src'?: Csp.Sources;
80
+ 'manifest-src'?: Csp.Sources;
81
+ 'media-src'?: Csp.Sources;
82
+ 'object-src'?: Csp.Sources;
83
+ 'prefetch-src'?: Csp.Sources;
84
+ 'script-src'?: Array<Csp.Source | Csp.ActionSource>;
85
+ 'script-src-elem'?: Csp.Sources;
86
+ 'script-src-attr'?: Csp.Sources;
87
+ 'style-src'?: Array<Csp.Source | Csp.ActionSource>;
88
+ 'style-src-elem'?: Csp.Sources;
89
+ 'style-src-attr'?: Csp.Sources;
90
+ 'base-uri'?: Array<Csp.Source | Csp.ActionSource>;
91
+ sandbox?: Array<
92
+ | 'allow-downloads-without-user-activation'
93
+ | 'allow-forms'
94
+ | 'allow-modals'
95
+ | 'allow-orientation-lock'
96
+ | 'allow-pointer-lock'
97
+ | 'allow-popups'
98
+ | 'allow-popups-to-escape-sandbox'
99
+ | 'allow-presentation'
100
+ | 'allow-same-origin'
101
+ | 'allow-scripts'
102
+ | 'allow-storage-access-by-user-activation'
103
+ | 'allow-top-navigation'
104
+ | 'allow-top-navigation-by-user-activation'
105
+ >;
106
+ 'form-action'?: Array<Csp.Source | Csp.ActionSource>;
107
+ 'frame-ancestors'?: Array<Csp.HostSource | Csp.SchemeSource | Csp.FrameSource>;
108
+ 'navigate-to'?: Array<Csp.Source | Csp.ActionSource>;
109
+ 'report-uri'?: Csp.UriPath[];
110
+ 'report-to'?: string[];
111
+
112
+ 'require-trusted-types-for'?: Array<'script'>;
113
+ 'trusted-types'?: Array<'none' | 'allow-duplicates' | '*' | string>;
114
+ 'upgrade-insecure-requests'?: boolean;
115
+
116
+ /** @deprecated */
117
+ 'require-sri-for'?: Array<'script' | 'style' | 'script style'>;
118
+
119
+ /** @deprecated */
120
+ 'block-all-mixed-content'?: boolean;
121
+
122
+ /** @deprecated */
123
+ 'plugin-types'?: Array<`${string}/${string}` | 'none'>;
124
+
125
+ /** @deprecated */
126
+ referrer?: Array<
127
+ | 'no-referrer'
128
+ | 'no-referrer-when-downgrade'
129
+ | 'origin'
130
+ | 'origin-when-cross-origin'
131
+ | 'same-origin'
132
+ | 'strict-origin'
133
+ | 'strict-origin-when-cross-origin'
134
+ | 'unsafe-url'
135
+ | 'none'
136
+ >;
137
+ }
138
+
139
+ export interface ErrorLoadInput<Params extends Record<string, string> = Record<string, string>>
140
+ extends LoadInput<Params> {
141
+ status?: number;
142
+ error?: Error;
143
+ }
144
+
145
+ export type HttpMethod = 'get' | 'head' | 'post' | 'put' | 'delete' | 'patch';
146
+
147
+ export interface JSONObject {
148
+ [key: string]: JSONValue;
149
+ }
150
+
151
+ export type JSONValue =
152
+ | string
153
+ | number
154
+ | boolean
155
+ | null
156
+ | undefined
157
+ | ToJSON
158
+ | JSONValue[]
159
+ | JSONObject;
160
+
161
+ export interface LoadInput<
162
+ Params extends Record<string, string> = Record<string, string>,
163
+ Props extends Record<string, any> = Record<string, any>
164
+ > {
165
+ fetch(info: RequestInfo, init?: RequestInit): Promise<Response>;
166
+ params: Params;
167
+ props: Props;
168
+ routeId: string | null;
169
+ session: App.Session;
170
+ stuff: Partial<App.Stuff>;
171
+ url: URL;
172
+ }
173
+
174
+ export interface LoadOutput<Props extends Record<string, any> = Record<string, any>> {
175
+ status?: number;
176
+ error?: string | Error;
177
+ redirect?: string;
178
+ props?: Props;
179
+ stuff?: Partial<App.Stuff>;
180
+ maxage?: number;
181
+ }
182
+
183
+ export interface Logger {
184
+ (msg: string): void;
185
+ success(msg: string): void;
186
+ error(msg: string): void;
187
+ warn(msg: string): void;
188
+ minor(msg: string): void;
189
+ info(msg: string): void;
190
+ }
191
+
192
+ export type MaybePromise<T> = T | Promise<T>;
193
+
194
+ export type Only<T, U> = { [P in keyof T]: T[P] } & { [P in Exclude<keyof U, keyof T>]?: never };
195
+
196
+ export interface Prerendered {
197
+ pages: Map<
198
+ string,
199
+ {
200
+ /** The location of the .html file relative to the output directory */
201
+ file: string;
202
+ }
203
+ >;
204
+ assets: Map<
205
+ string,
206
+ {
207
+ /** The MIME type of the asset */
208
+ type: string;
209
+ }
210
+ >;
211
+ redirects: Map<
212
+ string,
213
+ {
214
+ status: number;
215
+ location: string;
216
+ }
217
+ >;
218
+ /** An array of prerendered paths (without trailing slashes, regardless of the trailingSlash config) */
219
+ paths: string[];
220
+ }
221
+
222
+ export interface PrerenderErrorHandler {
223
+ (details: {
224
+ status: number;
225
+ path: string;
226
+ referrer: string | null;
227
+ referenceType: 'linked' | 'fetched';
228
+ }): void;
229
+ }
230
+
231
+ export type PrerenderOnErrorValue = 'fail' | 'continue' | PrerenderErrorHandler;
232
+
233
+ export interface RequestEvent<Params extends Record<string, string> = Record<string, string>> {
234
+ clientAddress: string;
235
+ locals: App.Locals;
236
+ params: Params;
237
+ platform: Readonly<App.Platform>;
238
+ request: Request;
239
+ routeId: string | null;
240
+ url: URL;
241
+ }
242
+
243
+ export interface RequestOptions {
244
+ getClientAddress: () => string;
245
+ platform?: App.Platform;
246
+ }
247
+
248
+ export interface ResolveOptions {
249
+ ssr?: boolean;
250
+ transformPage?: ({ html }: { html: string }) => MaybePromise<string>;
251
+ }
252
+
253
+ /** `string[]` is only for set-cookie, everything else must be type of `string` */
254
+ export type ResponseHeaders = Record<string, string | number | string[]>;
255
+
256
+ export interface RouteDefinition {
257
+ type: 'page' | 'endpoint';
258
+ pattern: RegExp;
259
+ segments: RouteSegment[];
260
+ methods: HttpMethod[];
261
+ }
262
+
263
+ export interface RouteSegment {
264
+ content: string;
265
+ dynamic: boolean;
266
+ rest: boolean;
267
+ }
268
+
269
+ export interface ToJSON {
270
+ toJSON(...args: any[]): Exclude<JSONValue, ToJSON>;
271
+ }
272
+
273
+ export type TrailingSlash = 'never' | 'always' | 'ignore';
package/CHANGELOG.md DELETED
@@ -1,338 +0,0 @@
1
- # @sveltejs/kit
2
-
3
- ## 1.0.0-next.30
4
-
5
- ### Patch Changes
6
-
7
- - 00cbaf6: Rename _.config.js to _.config.cjs
8
-
9
- ## 1.0.0-next.29
10
-
11
- ### Patch Changes
12
-
13
- - 4c0edce: Use addEventListener instead of onload
14
-
15
- ## 1.0.0-next.28
16
-
17
- ### Patch Changes
18
-
19
- - 4353025: Prevent infinite loop when fetching bad URLs inside error responses
20
- - 2860065: Handle assets path when prerendering
21
-
22
- ## 1.0.0-next.27
23
-
24
- ### Patch Changes
25
-
26
- - Fail build if prerender errors
27
- - Hide logging behind --verbose option
28
-
29
- ## 1.0.0-next.26
30
-
31
- ### Patch Changes
32
-
33
- - Fix svelte-announcer CSS
34
-
35
- ## 1.0.0-next.25
36
-
37
- ### Patch Changes
38
-
39
- - Surface stack traces for endpoint/page rendering errors
40
-
41
- ## 1.0.0-next.24
42
-
43
- ### Patch Changes
44
-
45
- - 26643df: Account for config.paths when prerendering
46
-
47
- ## 1.0.0-next.23
48
-
49
- ### Patch Changes
50
-
51
- - 9b758aa: Upgrade to Snowpack 3
52
-
53
- ## 1.0.0-next.22
54
-
55
- ### Patch Changes
56
-
57
- - bb68595: use readFileSync instead of createReadStream
58
-
59
- ## 1.0.0-next.21
60
-
61
- ### Patch Changes
62
-
63
- - 217e4cc: Set paths to empty string before prerender
64
-
65
- ## 1.0.0-next.20
66
-
67
- ### Patch Changes
68
-
69
- - ccf4aa7: Implement prerender config
70
-
71
- ## 1.0.0-next.19
72
-
73
- ### Patch Changes
74
-
75
- - deda984: Make navigating store contain from and to properties
76
-
77
- ## 1.0.0-next.18
78
-
79
- ### Patch Changes
80
-
81
- - c29b61e: Announce page changes
82
- - 72da270: Reset focus properly
83
-
84
- ## 1.0.0-next.17
85
-
86
- ### Patch Changes
87
-
88
- - f7dea55: Set process.env.NODE_ENV when invoking via the CLI
89
-
90
- ## 1.0.0-next.16
91
-
92
- ### Patch Changes
93
-
94
- - Remove temporary logging
95
- - Add sveltekit:prefetch and sveltekit:noscroll
96
-
97
- ## 1.0.0-next.15
98
-
99
- ### Patch Changes
100
-
101
- - 6d1bb11: Fix AMP CSS
102
- - d8b53af: Ignore $layout and $error files when finding static paths
103
- - Better scroll tracking
104
-
105
- ## 1.0.0-next.14
106
-
107
- ### Patch Changes
108
-
109
- - Fix dev loader
110
-
111
- ## 1.0.0-next.13
112
-
113
- ### Patch Changes
114
-
115
- - 1ea4d6b: More robust CSS extraction
116
-
117
- ## 1.0.0-next.12
118
-
119
- ### Patch Changes
120
-
121
- - e7c88dd: Tweak AMP validation screen
122
-
123
- ## 1.0.0-next.11
124
-
125
- ### Patch Changes
126
-
127
- - a31f218: Fix SSR loader invalidation
128
-
129
- ## 1.0.0-next.10
130
-
131
- ### Patch Changes
132
-
133
- - 8b14d29: Omit svelte-data scripts from AMP pages
134
-
135
- ## 1.0.0-next.9
136
-
137
- ### Patch Changes
138
-
139
- - f5fa223: AMP support
140
- - 47f2ee1: Always remove trailing slashes
141
- - 1becb94: Replace preload with load
142
-
143
- ## 1.0.0-next.8
144
-
145
- ### Patch Changes
146
-
147
- - 15dd751: Use meta http-equiv=refresh
148
- - be7e031: Fix handling of static files
149
- - ed6b8fd: Implement \$app/env
150
-
151
- ## 1.0.0-next.7
152
-
153
- ### Patch Changes
154
-
155
- - 76705b0: make HMR work outside localhost
156
-
157
- ## 1.0.0-next.6
158
-
159
- ### Patch Changes
160
-
161
- - 0e45255: Move options behind kit namespace, change paths -> kit.files
162
- - fa7f2b2: Implement live bindings for SSR code
163
-
164
- ## 1.0.0-next.5
165
-
166
- ### Patch Changes
167
-
168
- - Return dependencies from render
169
-
170
- ## 1.0.0-next.4
171
-
172
- ### Patch Changes
173
-
174
- - af01b0d: Move renderer out of app assets folder
175
-
176
- ## 1.0.0-next.3
177
-
178
- ### Patch Changes
179
-
180
- - Add paths to manifest, for static prerendering
181
-
182
- ## 1.0.0-next.2
183
-
184
- ### Patch Changes
185
-
186
- - Fix typo causing misnamed assets folder
187
-
188
- ## 1.0.0-next.1
189
-
190
- ### Patch Changes
191
-
192
- - a4bc090: Transform exported functions correctly
193
- - 00bbf98: Fix nested layouts
194
-
195
- ## 0.0.31-next.0
196
-
197
- ### Patch Changes
198
-
199
- - ffd7bba: Fix SSR cache invalidation
200
-
201
- ## 0.0.30
202
-
203
- ### Patch Changes
204
-
205
- - Add back stores(), but with deprecation warning
206
- - Rename stores.preloading to stores.navigating
207
- - Rewrite routing logic
208
-
209
- ## 0.0.29
210
-
211
- ### Patch Changes
212
-
213
- - 10872cc: Normalize request.query
214
-
215
- ## 0.0.28
216
-
217
- ### Patch Changes
218
-
219
- - Add svelte-kit start command
220
-
221
- ## 0.0.27
222
-
223
- ### Patch Changes
224
-
225
- - rename CLI to svelte-kit
226
- - 0904e22: rename svelte CLI to svelte-kit
227
- - Validate route responses
228
- - Make paths and target configurable
229
-
230
- ## 0.0.26
231
-
232
- ### Patch Changes
233
-
234
- - b475ed4: Overhaul adapter API - fixes #166
235
- - Updated dependencies [b475ed4]
236
- - @sveltejs/app-utils@0.0.18
237
-
238
- ## 0.0.25
239
-
240
- ### Patch Changes
241
-
242
- - Updated dependencies [3bdf33b]
243
- - @sveltejs/app-utils@0.0.17
244
-
245
- ## 0.0.24
246
-
247
- ### Patch Changes
248
-
249
- - 67eaeea: Move app-utils stuff into subpackages
250
- - 7f8df30: Move kit runtime code, expose via \$app aliases
251
- - Updated dependencies [67eaeea]
252
- - @sveltejs/app-utils@0.0.16
253
-
254
- ## 0.0.23
255
-
256
- ### Patch Changes
257
-
258
- - a163000: Parse body on incoming requests
259
- - a346eab: Copy over latest Sapper router code
260
- - Updated dependencies [a163000]
261
- - @sveltejs/app-utils@0.0.15
262
-
263
- ## 0.0.22
264
-
265
- ### Patch Changes
266
-
267
- - Force bump version
268
-
269
- ## 0.0.21
270
-
271
- ### Patch Changes
272
-
273
- - Build setup entry point
274
- - Work around pkg.exports constraint
275
- - Respond with 500s if render fails
276
- - Updated dependencies [undefined]
277
- - Updated dependencies [undefined]
278
- - Updated dependencies [undefined]
279
- - @sveltejs/app-utils@0.0.14
280
-
281
- ## 0.0.20
282
-
283
- ### Patch Changes
284
-
285
- - Pass setup module to renderer
286
- - Bump Snowpack version
287
- - Updated dependencies [undefined]
288
- - Updated dependencies [96c06d8]
289
- - @sveltejs/app-utils@0.0.13
290
-
291
- ## 0.0.19
292
-
293
- ### Patch Changes
294
-
295
- - fa9d7ce: Handle import.meta in SSR module loader
296
- - 0320208: Rename 'server route' to 'endpoint'
297
- - b9444d2: Update to Snowpack 2.15
298
- - 5ca907c: Use shared mkdirp helper
299
- - Updated dependencies [0320208]
300
- - Updated dependencies [5ca907c]
301
- - @sveltejs/app-utils@0.0.12
302
-
303
- ## 0.0.18
304
-
305
- ### Patch Changes
306
-
307
- - Updated dependencies [undefined]
308
- - @sveltejs/app-utils@0.0.11
309
-
310
- ## 0.0.17
311
-
312
- ### Patch Changes
313
-
314
- - 19323e9: Update Snowpack
315
- - Updated dependencies [19323e9]
316
- - @sveltejs/app-utils@0.0.10
317
-
318
- ## 0.0.16
319
-
320
- ### Patch Changes
321
-
322
- - Updated dependencies [90a98ae]
323
- - @sveltejs/app-utils@0.0.9
324
-
325
- ## 0.0.15
326
-
327
- ### Patch Changes
328
-
329
- - Updated dependencies [undefined]
330
- - @sveltejs/app-utils@0.0.8
331
-
332
- ## 0.0.14
333
-
334
- ### Patch Changes
335
-
336
- - various
337
- - Updated dependencies [undefined]
338
- - @sveltejs/app-utils@0.0.7
@@ -1,23 +0,0 @@
1
- import { g as get_base_uri } from '../utils-85ebcc60.js';
2
- import { router, renderer } from '../internal/singletons.js';
3
-
4
- async function goto(href, opts) {
5
- return router.goto(href, opts);
6
- }
7
-
8
- function prefetch(href) {
9
- return renderer.prefetch(new URL(href, get_base_uri(document)));
10
- }
11
-
12
- async function prefetchRoutes(pathnames) {
13
- const path_routes = pathnames
14
- ? router.pages.filter((page) => pathnames.some((pathname) => page.pattern.test(pathname)))
15
- : router.pages;
16
-
17
- const promises = path_routes.map((r) => Promise.all(r.parts.map((load) => load())));
18
-
19
- await Promise.all(promises);
20
- }
21
-
22
- export { goto, prefetch, prefetchRoutes };
23
- //# sourceMappingURL=navigation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"navigation.js","sources":["../../../src/runtime/app/navigation/index.js"],"sourcesContent":["import { router, renderer } from '../../internal/singletons';\nimport { get_base_uri } from '../../internal/utils';\n\nexport async function goto(href, opts) {\n\treturn router.goto(href, opts);\n}\n\nexport function prefetch(href) {\n\treturn renderer.prefetch(new URL(href, get_base_uri(document)));\n}\n\nexport async function prefetchRoutes(pathnames) {\n\tconst path_routes = pathnames\n\t\t? router.pages.filter((page) => pathnames.some((pathname) => page.pattern.test(pathname)))\n\t\t: router.pages;\n\n\tconst promises = path_routes.map((r) => Promise.all(r.parts.map((load) => load())));\n\n\tawait Promise.all(promises);\n}\n"],"names":[],"mappings":";;;AAGO,eAAe,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE;AACvC,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAChC,CAAC;AACD;AACO,SAAS,QAAQ,CAAC,IAAI,EAAE;AAC/B,CAAC,OAAO,QAAQ,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AACjE,CAAC;AACD;AACO,eAAe,cAAc,CAAC,SAAS,EAAE;AAChD,CAAC,MAAM,WAAW,GAAG,SAAS;AAC9B,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC5F,IAAI,MAAM,CAAC,KAAK,CAAC;AACjB;AACA,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AACrF;AACA,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC7B;;;;"}
@@ -1,2 +0,0 @@
1
- export { assets, base } from '../internal/singletons.js';
2
- //# sourceMappingURL=paths.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"paths.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}