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

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 (82) 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 +1523 -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 +2797 -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 +508 -0
  17. package/dist/chunks/index2.js +1307 -0
  18. package/dist/chunks/index3.js +118 -0
  19. package/dist/chunks/index4.js +196 -0
  20. package/dist/chunks/index5.js +242 -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/sync.js +999 -0
  27. package/dist/chunks/url.js +56 -0
  28. package/dist/cli.js +1018 -85
  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 -54
  33. package/svelte-kit.js +2 -0
  34. package/types/ambient.d.ts +303 -0
  35. package/types/index.d.ts +166 -0
  36. package/types/internal.d.ts +318 -0
  37. package/types/private.d.ts +357 -0
  38. package/CHANGELOG.md +0 -332
  39. package/assets/runtime/app/navigation.js +0 -23
  40. package/assets/runtime/app/navigation.js.map +0 -1
  41. package/assets/runtime/app/paths.js +0 -2
  42. package/assets/runtime/app/paths.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 -15
  46. package/assets/runtime/internal/singletons.js.map +0 -1
  47. package/assets/runtime/internal/start.js +0 -591
  48. package/assets/runtime/internal/start.js.map +0 -1
  49. package/assets/runtime/utils-85ebcc60.js +0 -18
  50. package/assets/runtime/utils-85ebcc60.js.map +0 -1
  51. package/dist/api.js +0 -44
  52. package/dist/api.js.map +0 -1
  53. package/dist/build.js +0 -246
  54. package/dist/build.js.map +0 -1
  55. package/dist/cli.js.map +0 -1
  56. package/dist/colors.js +0 -37
  57. package/dist/colors.js.map +0 -1
  58. package/dist/create_app.js +0 -580
  59. package/dist/create_app.js.map +0 -1
  60. package/dist/index.js +0 -368
  61. package/dist/index.js.map +0 -1
  62. package/dist/index2.js +0 -12035
  63. package/dist/index2.js.map +0 -1
  64. package/dist/index3.js +0 -549
  65. package/dist/index3.js.map +0 -1
  66. package/dist/index4.js +0 -74
  67. package/dist/index4.js.map +0 -1
  68. package/dist/index5.js +0 -464
  69. package/dist/index5.js.map +0 -1
  70. package/dist/index6.js +0 -735
  71. package/dist/index6.js.map +0 -1
  72. package/dist/logging.js +0 -43
  73. package/dist/logging.js.map +0 -1
  74. package/dist/package.js +0 -432
  75. package/dist/package.js.map +0 -1
  76. package/dist/renderer.js +0 -2425
  77. package/dist/renderer.js.map +0 -1
  78. package/dist/standard.js +0 -101
  79. package/dist/standard.js.map +0 -1
  80. package/dist/utils.js +0 -58
  81. package/dist/utils.js.map +0 -1
  82. package/svelte-kit +0 -3
@@ -0,0 +1,357 @@
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, 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
+ 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
+ config: ValidatedConfig;
39
+ prerendered: Prerendered;
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
+ *
61
+ * @param dest
62
+ */
63
+ writePrerendered(
64
+ dest: string,
65
+ opts?: {
66
+ fallback?: string;
67
+ }
68
+ ): string[];
69
+ /**
70
+ * @param dest the destination folder to which files should be copied
71
+ * @returns an array of paths corresponding to the files that have been created by the copy
72
+ */
73
+ writeServer(dest: string): string[];
74
+ /**
75
+ * @param dest the destination folder to which files should be copied
76
+ * @returns an array of paths corresponding to the files that have been created by the copy
77
+ */
78
+ writeStatic(dest: string): string[];
79
+ /**
80
+ * @param from the source file or folder
81
+ * @param to the destination file or folder
82
+ * @param opts.filter a function to determine whether a file or folder should be copied
83
+ * @param opts.replace a map of strings to replace
84
+ * @returns an array of paths corresponding to the files that have been created by the copy
85
+ */
86
+ copy(
87
+ from: string,
88
+ to: string,
89
+ opts?: {
90
+ filter?: (basename: string) => boolean;
91
+ replace?: Record<string, string>;
92
+ }
93
+ ): string[];
94
+ }
95
+
96
+ // Based on https://github.com/josh-hemphill/csp-typed-directives/blob/latest/src/csp.types.ts
97
+ //
98
+ // MIT License
99
+ //
100
+ // Copyright (c) 2021-present, Joshua Hemphill
101
+ // Copyright (c) 2021, Tecnico Corporation
102
+ //
103
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
104
+ // of this software and associated documentation files (the "Software"), to deal
105
+ // in the Software without restriction, including without limitation the rights
106
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
107
+ // copies of the Software, and to permit persons to whom the Software is
108
+ // furnished to do so, subject to the following conditions:
109
+ //
110
+ // The above copyright notice and this permission notice shall be included in all
111
+ // copies or substantial portions of the Software.
112
+ //
113
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
114
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
115
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
116
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
117
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
118
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
119
+ // SOFTWARE.
120
+
121
+ export namespace Csp {
122
+ type ActionSource = 'strict-dynamic' | 'report-sample';
123
+ type BaseSource = 'self' | 'unsafe-eval' | 'unsafe-hashes' | 'unsafe-inline' | 'none';
124
+ type CryptoSource = `${'nonce' | 'sha256' | 'sha384' | 'sha512'}-${string}`;
125
+ type FrameSource = HostSource | SchemeSource | 'self' | 'none';
126
+ type HostNameScheme = `${string}.${string}` | 'localhost';
127
+ type HostSource = `${HostProtocolSchemes}${HostNameScheme}${PortScheme}`;
128
+ type HostProtocolSchemes = `${string}://` | '';
129
+ type HttpDelineator = '/' | '?' | '#' | '\\';
130
+ type PortScheme = `:${number}` | '' | ':*';
131
+ type SchemeSource = 'http:' | 'https:' | 'data:' | 'mediastream:' | 'blob:' | 'filesystem:';
132
+ type Source = HostSource | SchemeSource | CryptoSource | BaseSource;
133
+ type Sources = Source[];
134
+ type UriPath = `${HttpDelineator}${string}`;
135
+ }
136
+
137
+ export interface CspDirectives {
138
+ 'child-src'?: Csp.Sources;
139
+ 'default-src'?: Array<Csp.Source | Csp.ActionSource>;
140
+ 'frame-src'?: Csp.Sources;
141
+ 'worker-src'?: Csp.Sources;
142
+ 'connect-src'?: Csp.Sources;
143
+ 'font-src'?: Csp.Sources;
144
+ 'img-src'?: Csp.Sources;
145
+ 'manifest-src'?: Csp.Sources;
146
+ 'media-src'?: Csp.Sources;
147
+ 'object-src'?: Csp.Sources;
148
+ 'prefetch-src'?: Csp.Sources;
149
+ 'script-src'?: Array<Csp.Source | Csp.ActionSource>;
150
+ 'script-src-elem'?: Csp.Sources;
151
+ 'script-src-attr'?: Csp.Sources;
152
+ 'style-src'?: Array<Csp.Source | Csp.ActionSource>;
153
+ 'style-src-elem'?: Csp.Sources;
154
+ 'style-src-attr'?: Csp.Sources;
155
+ 'base-uri'?: Array<Csp.Source | Csp.ActionSource>;
156
+ sandbox?: Array<
157
+ | 'allow-downloads-without-user-activation'
158
+ | 'allow-forms'
159
+ | 'allow-modals'
160
+ | 'allow-orientation-lock'
161
+ | 'allow-pointer-lock'
162
+ | 'allow-popups'
163
+ | 'allow-popups-to-escape-sandbox'
164
+ | 'allow-presentation'
165
+ | 'allow-same-origin'
166
+ | 'allow-scripts'
167
+ | 'allow-storage-access-by-user-activation'
168
+ | 'allow-top-navigation'
169
+ | 'allow-top-navigation-by-user-activation'
170
+ >;
171
+ 'form-action'?: Array<Csp.Source | Csp.ActionSource>;
172
+ 'frame-ancestors'?: Array<Csp.HostSource | Csp.SchemeSource | Csp.FrameSource>;
173
+ 'navigate-to'?: Array<Csp.Source | Csp.ActionSource>;
174
+ 'report-uri'?: Csp.UriPath[];
175
+ 'report-to'?: string[];
176
+
177
+ 'require-trusted-types-for'?: Array<'script'>;
178
+ 'trusted-types'?: Array<'none' | 'allow-duplicates' | '*' | string>;
179
+ 'upgrade-insecure-requests'?: boolean;
180
+
181
+ /** @deprecated */
182
+ 'require-sri-for'?: Array<'script' | 'style' | 'script style'>;
183
+
184
+ /** @deprecated */
185
+ 'block-all-mixed-content'?: boolean;
186
+
187
+ /** @deprecated */
188
+ 'plugin-types'?: Array<`${string}/${string}` | 'none'>;
189
+
190
+ /** @deprecated */
191
+ referrer?: Array<
192
+ | 'no-referrer'
193
+ | 'no-referrer-when-downgrade'
194
+ | 'origin'
195
+ | 'origin-when-cross-origin'
196
+ | 'same-origin'
197
+ | 'strict-origin'
198
+ | 'strict-origin-when-cross-origin'
199
+ | 'unsafe-url'
200
+ | 'none'
201
+ >;
202
+ }
203
+
204
+ export type Either<T, U> = Only<T, U> | Only<U, T>;
205
+
206
+ export interface ErrorLoadInput<Params = Record<string, string>> extends LoadInput<Params> {
207
+ status?: number;
208
+ error?: Error;
209
+ }
210
+
211
+ export interface Fallthrough {
212
+ fallthrough: true;
213
+ }
214
+
215
+ export type HttpMethod = 'get' | 'head' | 'post' | 'put' | 'delete' | 'patch';
216
+
217
+ export interface JSONObject {
218
+ [key: string]: JSONValue;
219
+ }
220
+
221
+ export type JSONValue =
222
+ | string
223
+ | number
224
+ | boolean
225
+ | null
226
+ | undefined
227
+ | ToJSON
228
+ | JSONValue[]
229
+ | JSONObject;
230
+
231
+ export interface LoadInput<Params = Record<string, string>, Props = Record<string, any>> {
232
+ url: URL;
233
+ params: Params;
234
+ props: Props;
235
+ fetch(info: RequestInfo, init?: RequestInit): Promise<Response>;
236
+ session: App.Session;
237
+ stuff: Partial<App.Stuff>;
238
+ }
239
+
240
+ export interface LoadOutput<Props = Record<string, any>> {
241
+ status?: number;
242
+ error?: string | Error;
243
+ redirect?: string;
244
+ props?: Props;
245
+ stuff?: Partial<App.Stuff>;
246
+ maxage?: number;
247
+ }
248
+
249
+ export interface Logger {
250
+ (msg: string): void;
251
+ success(msg: string): void;
252
+ error(msg: string): void;
253
+ warn(msg: string): void;
254
+ minor(msg: string): void;
255
+ info(msg: string): void;
256
+ }
257
+
258
+ export type MaybePromise<T> = T | Promise<T>;
259
+
260
+ export type Only<T, U> = { [P in keyof T]: T[P] } & { [P in Exclude<keyof U, keyof T>]?: never };
261
+
262
+ export interface Prerendered {
263
+ pages: Map<
264
+ string,
265
+ {
266
+ /** The location of the .html file relative to the output directory */
267
+ file: string;
268
+ }
269
+ >;
270
+ assets: Map<
271
+ string,
272
+ {
273
+ /** The MIME type of the asset */
274
+ type: string;
275
+ }
276
+ >;
277
+ redirects: Map<
278
+ string,
279
+ {
280
+ status: number;
281
+ location: string;
282
+ }
283
+ >;
284
+ /** An array of prerendered paths (without trailing slashes, regardless of the trailingSlash config) */
285
+ paths: string[];
286
+ }
287
+
288
+ export interface PrerenderErrorHandler {
289
+ (details: {
290
+ status: number;
291
+ path: string;
292
+ referrer: string | null;
293
+ referenceType: 'linked' | 'fetched';
294
+ }): void;
295
+ }
296
+
297
+ export type PrerenderOnErrorValue = 'fail' | 'continue' | PrerenderErrorHandler;
298
+
299
+ export interface RequestEvent<Params = Record<string, string>> {
300
+ request: Request;
301
+ url: URL;
302
+ params: Params;
303
+ locals: App.Locals;
304
+ platform: Readonly<App.Platform>;
305
+ }
306
+
307
+ export interface RequestOptions {
308
+ platform?: App.Platform;
309
+ }
310
+
311
+ export interface ResolveOptions {
312
+ ssr?: boolean;
313
+ transformPage?: ({ html }: { html: string }) => MaybePromise<string>;
314
+ }
315
+
316
+ /** `string[]` is only for set-cookie, everything else must be type of `string` */
317
+ export type ResponseHeaders = Record<string, string | number | string[]>;
318
+
319
+ export interface RouteDefinition {
320
+ type: 'page' | 'endpoint';
321
+ pattern: RegExp;
322
+ segments: RouteSegment[];
323
+ methods: HttpMethod[];
324
+ }
325
+
326
+ export interface RouteSegment {
327
+ content: string;
328
+ dynamic: boolean;
329
+ rest: boolean;
330
+ }
331
+
332
+ export class Server {
333
+ constructor(manifest: SSRManifest);
334
+ respond(request: Request, options?: RequestOptions): Promise<Response>;
335
+ }
336
+
337
+ export interface SSRManifest {
338
+ appDir: string;
339
+ assets: Set<string>;
340
+ /** private fields */
341
+ _: {
342
+ mime: Record<string, string>;
343
+ entry: {
344
+ file: string;
345
+ js: string[];
346
+ css: string[];
347
+ };
348
+ nodes: SSRNodeLoader[];
349
+ routes: SSRRoute[];
350
+ };
351
+ }
352
+
353
+ export interface ToJSON {
354
+ toJSON(...args: any[]): Exclude<JSONValue, ToJSON>;
355
+ }
356
+
357
+ 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":""}