@sveltejs/kit 1.0.0-next.29 → 1.0.0-next.290

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