@sveltejs/kit 2.42.2 → 2.43.1

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 (33) hide show
  1. package/package.json +8 -2
  2. package/src/core/sync/write_server.js +2 -1
  3. package/src/exports/vite/dev/index.js +1 -1
  4. package/src/exports/vite/index.js +14 -52
  5. package/src/exports/vite/module_ids.js +0 -1
  6. package/src/runtime/app/paths/client.js +57 -0
  7. package/src/runtime/app/paths/index.js +1 -16
  8. package/src/runtime/app/paths/internal/client.js +3 -0
  9. package/src/runtime/app/paths/internal/server.js +24 -0
  10. package/src/runtime/app/paths/public.d.ts +29 -0
  11. package/src/runtime/app/paths/server.js +31 -0
  12. package/src/runtime/app/paths/types.d.ts +2 -65
  13. package/src/runtime/app/server/index.js +1 -1
  14. package/src/runtime/app/server/remote/form.js +4 -6
  15. package/src/runtime/app/server/remote/prerender.js +21 -16
  16. package/src/runtime/app/server/remote/query.js +9 -5
  17. package/src/runtime/app/server/remote/shared.js +22 -6
  18. package/src/runtime/client/client.js +3 -3
  19. package/src/runtime/client/remote-functions/command.svelte.js +1 -1
  20. package/src/runtime/client/remote-functions/form.svelte.js +1 -1
  21. package/src/runtime/client/remote-functions/prerender.svelte.js +1 -1
  22. package/src/runtime/client/remote-functions/query.svelte.js +1 -1
  23. package/src/runtime/client/utils.js +1 -1
  24. package/src/runtime/server/fetch.js +1 -1
  25. package/src/runtime/server/page/render.js +55 -46
  26. package/src/runtime/server/page/server_routing.js +1 -1
  27. package/src/runtime/server/remote.js +1 -1
  28. package/src/runtime/server/respond.js +1 -1
  29. package/src/types/global-private.d.ts +4 -0
  30. package/src/types/internal.d.ts +2 -1
  31. package/src/version.js +1 -1
  32. package/types/index.d.ts +26 -27
  33. package/types/index.d.ts.map +7 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/kit",
3
- "version": "2.42.2",
3
+ "version": "2.43.1",
4
4
  "description": "SvelteKit is the fastest way to build Svelte apps",
5
5
  "keywords": [
6
6
  "framework",
@@ -41,7 +41,7 @@
41
41
  "@types/set-cookie-parser": "^2.4.7",
42
42
  "dts-buddy": "^0.6.2",
43
43
  "rollup": "^4.14.2",
44
- "svelte": "^5.38.5",
44
+ "svelte": "^5.39.3",
45
45
  "svelte-preprocess": "^6.0.0",
46
46
  "typescript": "^5.3.3",
47
47
  "vite": "^6.3.5",
@@ -69,6 +69,12 @@
69
69
  "types",
70
70
  "svelte-kit.js"
71
71
  ],
72
+ "imports": {
73
+ "#app/paths": {
74
+ "browser": "./src/runtime/app/paths/client.js",
75
+ "default": "./src/runtime/app/paths/server.js"
76
+ }
77
+ },
72
78
  "exports": {
73
79
  "./package.json": "./package.json",
74
80
  ".": {
@@ -31,12 +31,13 @@ const server_template = ({
31
31
  }) => `
32
32
  import root from '../root.${isSvelte5Plus() ? 'js' : 'svelte'}';
33
33
  import { set_building, set_prerendering } from '__sveltekit/environment';
34
- import { set_assets } from '__sveltekit/paths';
34
+ import { set_assets } from '$app/paths/internal/server';
35
35
  import { set_manifest, set_read_implementation } from '__sveltekit/server';
36
36
  import { set_private_env, set_public_env } from '${runtime_directory}/shared-server.js';
37
37
 
38
38
  export const options = {
39
39
  app_template_contains_nonce: ${template.includes('%sveltekit.nonce%')},
40
+ async: ${s(!!config.compilerOptions?.experimental?.async)},
40
41
  csp: ${s(config.kit.csp)},
41
42
  csrf_check_origin: ${s(config.kit.csrf.checkOrigin && !config.kit.csrf.trustedOrigins.includes('*'))},
42
43
  csrf_trusted_origins: ${s(config.kit.csrf.trustedOrigins)},
@@ -522,7 +522,7 @@ export async function dev(vite, vite_config, svelte_config, get_remotes) {
522
522
  );
523
523
  set_fix_stack_trace(fix_stack_trace);
524
524
 
525
- const { set_assets } = await vite.ssrLoadModule('__sveltekit/paths');
525
+ const { set_assets } = await vite.ssrLoadModule('$app/paths/internal/server');
526
526
  set_assets(assets);
527
527
 
528
528
  const server = new Server(manifest);
@@ -36,7 +36,6 @@ import {
36
36
  env_static_public,
37
37
  service_worker,
38
38
  sveltekit_environment,
39
- sveltekit_paths,
40
39
  sveltekit_server
41
40
  } from './module_ids.js';
42
41
  import { import_peer } from '../../utils/import.js';
@@ -318,7 +317,7 @@ async function kit({ svelte_config }) {
318
317
  // because they for example use esbuild.build with `platform: 'browser'`
319
318
  'esm-env',
320
319
  // This forces `$app/*` modules to be bundled, since they depend on
321
- // virtual modules like `__sveltekit/paths` (this isn't a valid bare
320
+ // virtual modules like `__sveltekit/environment` (this isn't a valid bare
322
321
  // import, but it works with vite-node's externalization logic, which
323
322
  // uses basic concatenation)
324
323
  '@sveltejs/kit/src/runtime'
@@ -326,18 +325,26 @@ async function kit({ svelte_config }) {
326
325
  }
327
326
  };
328
327
 
328
+ const define = {
329
+ __SVELTEKIT_APP_DIR__: s(kit.appDir),
330
+ __SVELTEKIT_EMBEDDED__: s(kit.embedded),
331
+ __SVELTEKIT_EXPERIMENTAL__REMOTE_FUNCTIONS__: s(kit.experimental.remoteFunctions),
332
+ __SVELTEKIT_PATHS_ASSETS__: s(kit.paths.assets),
333
+ __SVELTEKIT_PATHS_BASE__: s(kit.paths.base),
334
+ __SVELTEKIT_PATHS_RELATIVE__: s(kit.paths.relative),
335
+ __SVELTEKIT_CLIENT_ROUTING__: s(kit.router.resolution === 'client'),
336
+ __SVELTEKIT_SERVER_TRACING_ENABLED__: s(kit.experimental.tracing.server)
337
+ };
338
+
329
339
  if (is_build) {
330
340
  if (!new_config.build) new_config.build = {};
331
341
  new_config.build.ssr = !secondary_build_started;
332
342
 
333
343
  new_config.define = {
344
+ ...define,
334
345
  __SVELTEKIT_ADAPTER_NAME__: s(kit.adapter?.name),
335
346
  __SVELTEKIT_APP_VERSION_FILE__: s(`${kit.appDir}/version.json`),
336
347
  __SVELTEKIT_APP_VERSION_POLL_INTERVAL__: s(kit.version.pollInterval),
337
- __SVELTEKIT_EMBEDDED__: s(kit.embedded),
338
- __SVELTEKIT_EXPERIMENTAL__REMOTE_FUNCTIONS__: s(kit.experimental.remoteFunctions),
339
- __SVELTEKIT_CLIENT_ROUTING__: s(kit.router.resolution === 'client'),
340
- __SVELTEKIT_SERVER_TRACING_ENABLED__: s(kit.experimental.tracing.server),
341
348
  __SVELTEKIT_PAYLOAD__: new_config.build.ssr
342
349
  ? '{}'
343
350
  : `globalThis.__sveltekit_${version_hash}`
@@ -348,11 +355,8 @@ async function kit({ svelte_config }) {
348
355
  }
349
356
  } else {
350
357
  new_config.define = {
358
+ ...define,
351
359
  __SVELTEKIT_APP_VERSION_POLL_INTERVAL__: '0',
352
- __SVELTEKIT_EMBEDDED__: s(kit.embedded),
353
- __SVELTEKIT_EXPERIMENTAL__REMOTE_FUNCTIONS__: s(kit.experimental.remoteFunctions),
354
- __SVELTEKIT_CLIENT_ROUTING__: s(kit.router.resolution === 'client'),
355
- __SVELTEKIT_SERVER_TRACING_ENABLED__: s(kit.experimental.tracing.server),
356
360
  __SVELTEKIT_PAYLOAD__: 'globalThis.__sveltekit_dev'
357
361
  };
358
362
 
@@ -460,48 +464,6 @@ async function kit({ svelte_config }) {
460
464
  case service_worker:
461
465
  return create_service_worker_module(svelte_config);
462
466
 
463
- // for internal use only. it's published as $app/paths externally
464
- // we use this alias so that we won't collide with user aliases
465
- case sveltekit_paths: {
466
- const { assets, base } = svelte_config.kit.paths;
467
-
468
- // use the values defined in `global`, but fall back to hard-coded values
469
- // for the sake of things like Vitest which may import this module
470
- // outside the context of a page
471
- if (browser) {
472
- return dedent`
473
- export const base = ${global}?.base ?? ${s(base)};
474
- export const assets = ${global}?.assets ?? ${assets ? s(assets) : 'base'};
475
- export const app_dir = ${s(kit.appDir)};
476
- `;
477
- }
478
-
479
- return dedent`
480
- export let base = ${s(base)};
481
- export let assets = ${assets ? s(assets) : 'base'};
482
- export const app_dir = ${s(kit.appDir)};
483
-
484
- export const relative = ${svelte_config.kit.paths.relative};
485
-
486
- const initial = { base, assets };
487
-
488
- export function override(paths) {
489
- base = paths.base;
490
- assets = paths.assets;
491
- }
492
-
493
- export function reset() {
494
- base = initial.base;
495
- assets = initial.assets;
496
- }
497
-
498
- /** @param {string} path */
499
- export function set_assets(path) {
500
- assets = initial.assets = path;
501
- }
502
- `;
503
- }
504
-
505
467
  case sveltekit_environment: {
506
468
  const { version } = svelte_config.kit;
507
469
 
@@ -9,7 +9,6 @@ export const env_dynamic_public = '\0virtual:env/dynamic/public';
9
9
  export const service_worker = '\0virtual:service-worker';
10
10
 
11
11
  export const sveltekit_environment = '\0virtual:__sveltekit/environment';
12
- export const sveltekit_paths = '\0virtual:__sveltekit/paths';
13
12
  export const sveltekit_server = '\0virtual:__sveltekit/server';
14
13
 
15
14
  export const app_server = posixify(
@@ -0,0 +1,57 @@
1
+ /** @import { Asset, RouteId, Pathname, ResolvedPathname } from '$app/types' */
2
+ /** @import { ResolveArgs } from './types.js' */
3
+ import { base, assets } from './internal/client.js';
4
+ import { resolve_route } from '../../../utils/routing.js';
5
+
6
+ /**
7
+ * Resolve the URL of an asset in your `static` directory, by prefixing it with [`config.kit.paths.assets`](https://svelte.dev/docs/kit/configuration#paths) if configured, or otherwise by prefixing it with the base path.
8
+ *
9
+ * During server rendering, the base path is relative and depends on the page currently being rendered.
10
+ *
11
+ * @example
12
+ * ```svelte
13
+ * <script>
14
+ * import { asset } from '$app/paths';
15
+ * </script>
16
+ *
17
+ * <img alt="a potato" src={asset('/potato.jpg')} />
18
+ * ```
19
+ * @since 2.26
20
+ *
21
+ * @param {Asset} file
22
+ * @returns {string}
23
+ */
24
+ export function asset(file) {
25
+ return (assets || base) + file;
26
+ }
27
+
28
+ /**
29
+ * Resolve a pathname by prefixing it with the base path, if any, or resolve a route ID by populating dynamic segments with parameters.
30
+ *
31
+ * During server rendering, the base path is relative and depends on the page currently being rendered.
32
+ *
33
+ * @example
34
+ * ```js
35
+ * import { resolve } from '$app/paths';
36
+ *
37
+ * // using a pathname
38
+ * const resolved = resolve(`/blog/hello-world`);
39
+ *
40
+ * // using a route ID plus parameters
41
+ * const resolved = resolve('/blog/[slug]', {
42
+ * slug: 'hello-world'
43
+ * });
44
+ * ```
45
+ * @since 2.26
46
+ *
47
+ * @template {RouteId | Pathname} T
48
+ * @param {ResolveArgs<T>} args
49
+ * @returns {ResolvedPathname}
50
+ */
51
+ export function resolve(...args) {
52
+ // The type error is correct here, and if someone doesn't pass params when they should there's a runtime error,
53
+ // but we don't want to adjust the internal resolve_route function to accept `undefined`, hence the type cast.
54
+ return base + resolve_route(args[0], /** @type {Record<string, string>} */ (args[1]));
55
+ }
56
+
57
+ export { base, assets, resolve as resolveRoute };
@@ -1,16 +1 @@
1
- import { base, assets } from '__sveltekit/paths';
2
- import { resolve_route } from '../../../utils/routing.js';
3
-
4
- /** @type {import('./types.d.ts').asset} */
5
- export function asset(file) {
6
- return (assets || base) + file;
7
- }
8
-
9
- /** @type {import('./types.d.ts').resolve} */
10
- export function resolve(id, params) {
11
- // The type error is correct here, and if someone doesn't pass params when they should there's a runtime error,
12
- // but we don't want to adjust the internal resolve_route function to accept `undefined`, hence the type cast.
13
- return base + resolve_route(id, /** @type {Record<string, string>} */ (params));
14
- }
15
-
16
- export { base, assets, resolve as resolveRoute };
1
+ export * from '#app/paths';
@@ -0,0 +1,3 @@
1
+ export const base = __SVELTEKIT_PAYLOAD__?.base ?? __SVELTEKIT_PATHS_BASE__;
2
+ export const assets = __SVELTEKIT_PAYLOAD__?.assets ?? base ?? __SVELTEKIT_PATHS_ASSETS__;
3
+ export const app_dir = __SVELTEKIT_APP_DIR__;
@@ -0,0 +1,24 @@
1
+ export let base = __SVELTEKIT_PATHS_BASE__;
2
+ export let assets = __SVELTEKIT_PATHS_ASSETS__ || base;
3
+ export const app_dir = __SVELTEKIT_APP_DIR__;
4
+ export const relative = __SVELTEKIT_PATHS_RELATIVE__;
5
+
6
+ const initial = { base, assets };
7
+
8
+ /**
9
+ * @param {{ base: string, assets: string }} paths
10
+ */
11
+ export function override(paths) {
12
+ base = paths.base;
13
+ assets = paths.assets;
14
+ }
15
+
16
+ export function reset() {
17
+ base = initial.base;
18
+ assets = initial.assets;
19
+ }
20
+
21
+ /** @param {string} path */
22
+ export function set_assets(path) {
23
+ assets = initial.assets = path;
24
+ }
@@ -0,0 +1,29 @@
1
+ import { RouteId, Pathname, ResolvedPathname } from '$app/types';
2
+ import { ResolveArgs } from './types.js';
3
+
4
+ export { resolve, asset } from './client.js';
5
+
6
+ /**
7
+ * A string that matches [`config.kit.paths.base`](https://svelte.dev/docs/kit/configuration#paths).
8
+ *
9
+ * Example usage: `<a href="{base}/your-page">Link</a>`
10
+ *
11
+ * @deprecated Use [`resolve(...)`](https://svelte.dev/docs/kit/$app-paths#resolve) instead
12
+ */
13
+ export let base: '' | `/${string}`;
14
+
15
+ /**
16
+ * An absolute path that matches [`config.kit.paths.assets`](https://svelte.dev/docs/kit/configuration#paths).
17
+ *
18
+ * > [!NOTE] If a value for `config.kit.paths.assets` is specified, it will be replaced with `'/_svelte_kit_assets'` during `vite dev` or `vite preview`, since the assets don't yet live at their eventual URL.
19
+ *
20
+ * @deprecated Use [`asset(...)`](https://svelte.dev/docs/kit/$app-paths#asset) instead
21
+ */
22
+ export let assets: '' | `https://${string}` | `http://${string}` | '/_svelte_kit_assets';
23
+
24
+ /**
25
+ * @deprecated Use [`resolve(...)`](https://svelte.dev/docs/kit/$app-paths#resolve) instead
26
+ */
27
+ export function resolveRoute<T extends RouteId | Pathname>(
28
+ ...args: ResolveArgs<T>
29
+ ): ResolvedPathname;
@@ -0,0 +1,31 @@
1
+ import { base, assets, relative } from './internal/server.js';
2
+ import { resolve_route } from '../../../utils/routing.js';
3
+ import { get_request_store } from '@sveltejs/kit/internal/server';
4
+
5
+ /** @type {import('./client.js').asset} */
6
+ export function asset(file) {
7
+ // @ts-expect-error we use the `resolve` mechanism, but with the 'wrong' input
8
+ return assets ? assets + file : resolve(file);
9
+ }
10
+
11
+ /** @type {import('./client.js').resolve} */
12
+ export function resolve(id, params) {
13
+ const resolved = resolve_route(id, /** @type {Record<string, string>} */ (params));
14
+
15
+ if (relative) {
16
+ const { event, state } = get_request_store();
17
+
18
+ if (state.prerendering?.fallback) {
19
+ return resolved;
20
+ }
21
+
22
+ const segments = event.url.pathname.slice(base.length).split('/').slice(2);
23
+ const prefix = segments.map(() => '..').join('/') || '.';
24
+
25
+ return prefix + resolved;
26
+ }
27
+
28
+ return resolved;
29
+ }
30
+
31
+ export { base, assets, resolve as resolveRoute };
@@ -1,70 +1,7 @@
1
- import { Asset, RouteId, RouteParams, Pathname, ResolvedPathname } from '$app/types';
1
+ import { Pathname, RouteId, RouteParams } from '$app/types';
2
2
 
3
- /**
4
- * A string that matches [`config.kit.paths.base`](https://svelte.dev/docs/kit/configuration#paths).
5
- *
6
- * Example usage: `<a href="{base}/your-page">Link</a>`
7
- *
8
- * @deprecated Use [`resolve(...)`](https://svelte.dev/docs/kit/$app-paths#resolve) instead
9
- */
10
- export let base: '' | `/${string}`;
11
-
12
- /**
13
- * An absolute path that matches [`config.kit.paths.assets`](https://svelte.dev/docs/kit/configuration#paths).
14
- *
15
- * > [!NOTE] If a value for `config.kit.paths.assets` is specified, it will be replaced with `'/_svelte_kit_assets'` during `vite dev` or `vite preview`, since the assets don't yet live at their eventual URL.
16
- *
17
- * @deprecated Use [`asset(...)`](https://svelte.dev/docs/kit/$app-paths#asset) instead
18
- */
19
- export let assets: '' | `https://${string}` | `http://${string}` | '/_svelte_kit_assets';
20
-
21
- type ResolveArgs<T extends RouteId | Pathname> = T extends RouteId
3
+ export type ResolveArgs<T extends RouteId | Pathname> = T extends RouteId
22
4
  ? RouteParams<T> extends Record<string, never>
23
5
  ? [route: T]
24
6
  : [route: T, params: RouteParams<T>]
25
7
  : [route: T];
26
-
27
- /**
28
- * Resolve a pathname by prefixing it with the base path, if any, or resolve a route ID by populating dynamic segments with parameters.
29
- *
30
- * During server rendering, the base path is relative and depends on the page currently being rendered.
31
- *
32
- * @example
33
- * ```js
34
- * import { resolve } from '$app/paths';
35
- *
36
- * // using a pathname
37
- * const resolved = resolve(`/blog/hello-world`);
38
- *
39
- * // using a route ID plus parameters
40
- * const resolved = resolve('/blog/[slug]', {
41
- * slug: 'hello-world'
42
- * });
43
- * ```
44
- * @since 2.26
45
- */
46
- export function resolve<T extends RouteId | Pathname>(...args: ResolveArgs<T>): ResolvedPathname;
47
-
48
- /**
49
- * Resolve the URL of an asset in your `static` directory, by prefixing it with [`config.kit.paths.assets`](https://svelte.dev/docs/kit/configuration#paths) if configured, or otherwise by prefixing it with the base path.
50
- *
51
- * During server rendering, the base path is relative and depends on the page currently being rendered.
52
- *
53
- * @example
54
- * ```svelte
55
- * <script>
56
- * import { asset } from '$app/paths';
57
- * </script>
58
- *
59
- * <img alt="a potato" src={asset('/potato.jpg')} />
60
- * ```
61
- * @since 2.26
62
- */
63
- export function asset(file: Asset): string;
64
-
65
- /**
66
- * @deprecated Use [`resolve(...)`](https://svelte.dev/docs/kit/$app-paths#resolve) instead
67
- */
68
- export function resolveRoute<T extends RouteId | Pathname>(
69
- ...args: ResolveArgs<T>
70
- ): ResolvedPathname;
@@ -1,5 +1,5 @@
1
1
  import { read_implementation, manifest } from '__sveltekit/server';
2
- import { base } from '__sveltekit/paths';
2
+ import { base } from '$app/paths';
3
3
  import { DEV } from 'esm-env';
4
4
  import { base64_decode } from '../../utils.js';
5
5
 
@@ -3,7 +3,7 @@
3
3
  /** @import { StandardSchemaV1 } from '@standard-schema/spec' */
4
4
  import { get_request_store } from '@sveltejs/kit/internal/server';
5
5
  import { DEV } from 'esm-env';
6
- import { run_remote_function } from './shared.js';
6
+ import { get_cache, run_remote_function } from './shared.js';
7
7
  import { convert_formdata, flatten_issues } from '../../../utils.js';
8
8
 
9
9
  /**
@@ -166,7 +166,7 @@ export function form(validate_or_fn, maybe_fn) {
166
166
  // We don't need to care about args or deduplicating calls, because uneval results are only relevant in full page reloads
167
167
  // where only one form submission is active at the same time
168
168
  if (!event.isRemoteRequest) {
169
- (state.remote_data ??= {})[__.id] = output;
169
+ get_cache(__, state)[''] ??= output;
170
170
  }
171
171
 
172
172
  return output;
@@ -189,8 +189,7 @@ export function form(validate_or_fn, maybe_fn) {
189
189
  Object.defineProperty(instance, property, {
190
190
  get() {
191
191
  try {
192
- const { remote_data } = get_request_store().state;
193
- return remote_data?.[__.id]?.[property] ?? {};
192
+ return get_cache(__)?.['']?.[property] ?? {};
194
193
  } catch {
195
194
  return undefined;
196
195
  }
@@ -201,8 +200,7 @@ export function form(validate_or_fn, maybe_fn) {
201
200
  Object.defineProperty(instance, 'result', {
202
201
  get() {
203
202
  try {
204
- const { remote_data } = get_request_store().state;
205
- return remote_data?.[__.id]?.result;
203
+ return get_cache(__)?.['']?.result;
206
204
  } catch {
207
205
  return undefined;
208
206
  }
@@ -4,10 +4,11 @@
4
4
  import { error, json } from '@sveltejs/kit';
5
5
  import { DEV } from 'esm-env';
6
6
  import { get_request_store } from '@sveltejs/kit/internal/server';
7
- import { create_remote_cache_key, stringify, stringify_remote_arg } from '../../../shared.js';
8
- import { app_dir, base } from '__sveltekit/paths';
7
+ import { stringify, stringify_remote_arg } from '../../../shared.js';
8
+ import { app_dir, base } from '$app/paths/internal/server';
9
9
  import {
10
10
  create_validator,
11
+ get_cache,
11
12
  get_response,
12
13
  parse_remote_response,
13
14
  run_remote_function
@@ -96,25 +97,29 @@ export function prerender(validate_or_fn, fn_or_options, maybe_options) {
96
97
 
97
98
  if (!state.prerendering && !DEV && !event.isRemoteRequest) {
98
99
  try {
99
- return await get_response(id, arg, state, async () => {
100
+ return await get_response(__, arg, state, async () => {
101
+ const key = stringify_remote_arg(arg, state.transport);
102
+ const cache = get_cache(__, state);
103
+
100
104
  // TODO adapters can provide prerendered data more efficiently than
101
105
  // fetching from the public internet
102
- const response = await fetch(new URL(url, event.url.origin).href);
103
-
104
- if (!response.ok) {
105
- throw new Error('Prerendered response not found');
106
- }
106
+ const promise = (cache[key] ??= fetch(new URL(url, event.url.origin).href).then(
107
+ async (response) => {
108
+ if (!response.ok) {
109
+ throw new Error('Prerendered response not found');
110
+ }
107
111
 
108
- const prerendered = await response.json();
112
+ const prerendered = await response.json();
109
113
 
110
- if (prerendered.type === 'error') {
111
- error(prerendered.status, prerendered.error);
112
- }
114
+ if (prerendered.type === 'error') {
115
+ error(prerendered.status, prerendered.error);
116
+ }
113
117
 
114
- // TODO can we redirect here?
118
+ return prerendered.result;
119
+ }
120
+ ));
115
121
 
116
- (state.remote_data ??= {})[create_remote_cache_key(id, payload)] = prerendered.result;
117
- return parse_remote_response(prerendered.result, state.transport);
122
+ return parse_remote_response(await promise, state.transport);
118
123
  });
119
124
  } catch {
120
125
  // not available prerendered, fallback to normal function
@@ -125,7 +130,7 @@ export function prerender(validate_or_fn, fn_or_options, maybe_options) {
125
130
  return /** @type {Promise<any>} */ (state.prerendering.remote_responses.get(url));
126
131
  }
127
132
 
128
- const promise = get_response(id, arg, state, () =>
133
+ const promise = get_response(__, arg, state, () =>
129
134
  run_remote_function(event, state, false, arg, validate, fn)
130
135
  );
131
136
 
@@ -4,7 +4,7 @@
4
4
  import { get_request_store } from '@sveltejs/kit/internal/server';
5
5
  import { create_remote_cache_key, stringify_remote_arg } from '../../../shared.js';
6
6
  import { prerendering } from '__sveltekit/environment';
7
- import { create_validator, get_response, run_remote_function } from './shared.js';
7
+ import { create_validator, get_cache, get_response, run_remote_function } from './shared.js';
8
8
 
9
9
  /**
10
10
  * Creates a remote query. When called from the browser, the function will be invoked on the server via a `fetch` call.
@@ -73,7 +73,7 @@ export function query(validate_or_fn, maybe_fn) {
73
73
  const { event, state } = get_request_store();
74
74
 
75
75
  /** @type {Promise<any> & Partial<RemoteQuery<any>>} */
76
- const promise = get_response(__.id, arg, state, () =>
76
+ const promise = get_response(__, arg, state, () =>
77
77
  run_remote_function(event, state, false, arg, validate, fn)
78
78
  );
79
79
 
@@ -90,8 +90,12 @@ export function query(validate_or_fn, maybe_fn) {
90
90
  );
91
91
  }
92
92
 
93
- const cache_key = create_remote_cache_key(__.id, stringify_remote_arg(arg, state.transport));
94
- refreshes[cache_key] = (state.remote_data ??= {})[cache_key] = Promise.resolve(value);
93
+ const cache = get_cache(__, state);
94
+ const key = stringify_remote_arg(arg, state.transport);
95
+
96
+ if (__.id) {
97
+ refreshes[__.id + '/' + key] = cache[key] = Promise.resolve(value);
98
+ }
95
99
  };
96
100
 
97
101
  promise.refresh = () => {
@@ -198,7 +202,7 @@ function batch(validate_or_fn, maybe_fn) {
198
202
  const { event, state } = get_request_store();
199
203
 
200
204
  /** @type {Promise<any> & Partial<RemoteQuery<any>>} */
201
- const promise = get_response(__.id, arg, state, () => {
205
+ const promise = get_response(__, arg, state, () => {
202
206
  // Collect all the calls to the same query in the same macrotask,
203
207
  // then execute them as one backend request.
204
208
  return new Promise((resolve, reject) => {
@@ -1,9 +1,9 @@
1
1
  /** @import { RequestEvent } from '@sveltejs/kit' */
2
- /** @import { ServerHooks, MaybePromise, RequestState } from 'types' */
2
+ /** @import { ServerHooks, MaybePromise, RequestState, RemoteInfo } from 'types' */
3
3
  import { parse } from 'devalue';
4
4
  import { error } from '@sveltejs/kit';
5
5
  import { with_request_store, get_request_store } from '@sveltejs/kit/internal/server';
6
- import { create_remote_cache_key, stringify_remote_arg } from '../../../shared.js';
6
+ import { stringify_remote_arg } from '../../../shared.js';
7
7
 
8
8
  /**
9
9
  * @param {any} validate_or_fn
@@ -62,19 +62,20 @@ export function create_validator(validate_or_fn, maybe_fn) {
62
62
  * Also saves an uneval'ed version of the result for later HTML inlining for hydration.
63
63
  *
64
64
  * @template {MaybePromise<any>} T
65
- * @param {string} id
65
+ * @param {RemoteInfo} info
66
66
  * @param {any} arg
67
67
  * @param {RequestState} state
68
68
  * @param {() => Promise<T>} get_result
69
69
  * @returns {Promise<T>}
70
70
  */
71
- export async function get_response(id, arg, state, get_result) {
71
+ export async function get_response(info, arg, state, get_result) {
72
72
  // wait a beat, in case `myQuery().set(...)` is immediately called
73
73
  // eslint-disable-next-line @typescript-eslint/await-thenable
74
74
  await 0;
75
75
 
76
- const cache_key = create_remote_cache_key(id, stringify_remote_arg(arg, state.transport));
77
- return ((state.remote_data ??= {})[cache_key] ??= get_result());
76
+ const cache = get_cache(info, state);
77
+
78
+ return (cache[stringify_remote_arg(arg, state.transport)] ??= get_result());
78
79
  }
79
80
 
80
81
  /**
@@ -141,3 +142,18 @@ export async function run_remote_function(event, state, allow_cookies, arg, vali
141
142
  const validated = await with_request_store({ event: cleansed, state }, () => validate(arg));
142
143
  return with_request_store({ event: cleansed, state }, () => fn(validated));
143
144
  }
145
+
146
+ /**
147
+ * @param {RemoteInfo} info
148
+ * @param {RequestState} state
149
+ */
150
+ export function get_cache(info, state = get_request_store().state) {
151
+ let cache = state.remote_data?.get(info);
152
+
153
+ if (cache === undefined) {
154
+ cache = {};
155
+ (state.remote_data ??= new Map()).set(info, cache);
156
+ }
157
+
158
+ return cache;
159
+ }
@@ -26,7 +26,7 @@ import {
26
26
  create_updated_store,
27
27
  load_css
28
28
  } from './utils.js';
29
- import { base } from '__sveltekit/paths';
29
+ import { base } from '$app/paths';
30
30
  import * as devalue from 'devalue';
31
31
  import {
32
32
  HISTORY_INDEX,
@@ -291,8 +291,8 @@ export async function start(_app, _target, hydrate) {
291
291
  );
292
292
  }
293
293
 
294
- if (__SVELTEKIT_PAYLOAD__.data) {
295
- remote_responses = __SVELTEKIT_PAYLOAD__?.data;
294
+ if (__SVELTEKIT_PAYLOAD__?.data) {
295
+ remote_responses = __SVELTEKIT_PAYLOAD__.data;
296
296
  }
297
297
 
298
298
  // detect basic auth credentials in the current URL
@@ -1,7 +1,7 @@
1
1
  /** @import { RemoteCommand, RemoteQueryOverride } from '@sveltejs/kit' */
2
2
  /** @import { RemoteFunctionResponse } from 'types' */
3
3
  /** @import { Query } from './query.svelte.js' */
4
- import { app_dir, base } from '__sveltekit/paths';
4
+ import { app_dir, base } from '$app/paths/internal/client';
5
5
  import * as devalue from 'devalue';
6
6
  import { HttpError } from '@sveltejs/kit/internal';
7
7
  import { app } from '../client.js';
@@ -2,7 +2,7 @@
2
2
  /** @import { RemoteFormInput, RemoteForm, RemoteQueryOverride } from '@sveltejs/kit' */
3
3
  /** @import { RemoteFunctionResponse } from 'types' */
4
4
  /** @import { Query } from './query.svelte.js' */
5
- import { app_dir, base } from '__sveltekit/paths';
5
+ import { app_dir, base } from '$app/paths/internal/client';
6
6
  import * as devalue from 'devalue';
7
7
  import { DEV } from 'esm-env';
8
8
  import { HttpError } from '@sveltejs/kit/internal';
@@ -1,5 +1,5 @@
1
1
  /** @import { RemoteFunctionResponse } from 'types' */
2
- import { app_dir, base } from '__sveltekit/paths';
2
+ import { app_dir, base } from '$app/paths/internal/client';
3
3
  import { version } from '__sveltekit/environment';
4
4
  import * as devalue from 'devalue';
5
5
  import { DEV } from 'esm-env';
@@ -1,6 +1,6 @@
1
1
  /** @import { RemoteQueryFunction } from '@sveltejs/kit' */
2
2
  /** @import { RemoteFunctionResponse } from 'types' */
3
- import { app_dir, base } from '__sveltekit/paths';
3
+ import { app_dir, base } from '$app/paths/internal/client';
4
4
  import { app, goto, remote_responses, started } from '../client.js';
5
5
  import { tick } from 'svelte';
6
6
  import { create_remote_function, remote_request } from './shared.svelte.js';
@@ -1,6 +1,6 @@
1
1
  import { BROWSER, DEV } from 'esm-env';
2
2
  import { writable } from 'svelte/store';
3
- import { assets } from '__sveltekit/paths';
3
+ import { assets } from '$app/paths';
4
4
  import { version } from '__sveltekit/environment';
5
5
  import { PRELOAD_PRIORITIES } from './constants.js';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import * as set_cookie_parser from 'set-cookie-parser';
2
2
  import { respond } from './respond.js';
3
- import * as paths from '__sveltekit/paths';
3
+ import * as paths from '$app/paths/internal/server';
4
4
  import { read_implementation } from '__sveltekit/server';
5
5
  import { has_prerendered_path } from './utils.js';
6
6
 
@@ -2,7 +2,7 @@ import * as devalue from 'devalue';
2
2
  import { readable, writable } from 'svelte/store';
3
3
  import { DEV } from 'esm-env';
4
4
  import { text } from '@sveltejs/kit';
5
- import * as paths from '__sveltekit/paths';
5
+ import * as paths from '$app/paths/internal/server';
6
6
  import { hash } from '../../../utils/hash.js';
7
7
  import { serialize_data } from './serialize_data.js';
8
8
  import { s } from '../../../utils/misc.js';
@@ -168,10 +168,6 @@ export async function render_response({
168
168
  state: {}
169
169
  };
170
170
 
171
- // use relative paths during rendering, so that the resulting HTML is as
172
- // portable as possible, but reset afterwards
173
- if (paths.relative) paths.override({ base, assets });
174
-
175
171
  const render_opts = {
176
172
  context: new Map([
177
173
  [
@@ -183,48 +179,55 @@ export async function render_response({
183
179
  ])
184
180
  };
185
181
 
186
- if (DEV) {
187
- const fetch = globalThis.fetch;
188
- let warned = false;
189
- globalThis.fetch = (info, init) => {
190
- if (typeof info === 'string' && !SCHEME.test(info)) {
191
- throw new Error(
192
- `Cannot call \`fetch\` eagerly during server-side rendering with relative URL (${info}) — put your \`fetch\` calls inside \`onMount\` or a \`load\` function instead`
193
- );
194
- } else if (!warned) {
195
- console.warn(
196
- 'Avoid calling `fetch` eagerly during server-side rendering — put your `fetch` calls inside `onMount` or a `load` function instead'
197
- );
198
- warned = true;
182
+ const fetch = globalThis.fetch;
183
+
184
+ try {
185
+ if (DEV) {
186
+ let warned = false;
187
+ globalThis.fetch = (info, init) => {
188
+ if (typeof info === 'string' && !SCHEME.test(info)) {
189
+ throw new Error(
190
+ `Cannot call \`fetch\` eagerly during server-side rendering with relative URL (${info}) — put your \`fetch\` calls inside \`onMount\` or a \`load\` function instead`
191
+ );
192
+ } else if (!warned) {
193
+ console.warn(
194
+ 'Avoid calling `fetch` eagerly during server-side rendering — put your `fetch` calls inside `onMount` or a `load` function instead'
195
+ );
196
+ warned = true;
197
+ }
198
+
199
+ return fetch(info, init);
200
+ };
201
+ }
202
+
203
+ rendered = await with_request_store({ event, state: event_state }, async () => {
204
+ // use relative paths during rendering, so that the resulting HTML is as
205
+ // portable as possible, but reset afterwards
206
+ if (paths.relative) paths.override({ base, assets });
207
+
208
+ const rendered = options.root.render(props, render_opts);
209
+
210
+ // TODO 3.0 remove options.async
211
+ if (options.async) {
212
+ // we reset this synchronously, rather than after async rendering is complete,
213
+ // to avoid cross-talk between requests. This is a breaking change for
214
+ // anyone who opts into async SSR, since `base` and `assets` will no
215
+ // longer be relative to the current pathname.
216
+ // TODO 3.0 remove `base` and `assets` in favour of `resolve(...)` and `asset(...)`
217
+ paths.reset();
199
218
  }
200
219
 
201
- return fetch(info, init);
202
- };
220
+ // eslint-disable-next-line
221
+ const { head, html, css } = options.async ? await rendered : rendered;
203
222
 
204
- try {
205
- rendered = with_request_store({ event, state: event_state }, () => {
206
- const result = options.root.render(props, render_opts);
207
- // Svelte 5.39.0 changed the properties lazily start the rendering to be able to have the same signature for sync and async render.
208
- // 5.39.1 extended that to the old class components. Rendering isn't started until one of the properties is accessed, so we do that here,
209
- // else we might get errors about missing request store context
210
- result.html;
211
- return result;
212
- });
213
- } finally {
223
+ return { head, html, css };
224
+ });
225
+ } finally {
226
+ if (DEV) {
214
227
  globalThis.fetch = fetch;
215
- paths.reset();
216
- }
217
- } else {
218
- try {
219
- rendered = with_request_store({ event, state: event_state }, () => {
220
- const result = options.root.render(props, render_opts);
221
- // See comment above
222
- result.html;
223
- return result;
224
- });
225
- } finally {
226
- paths.reset();
227
228
  }
229
+
230
+ paths.reset(); // just in case `options.root.render(...)` failed
228
231
  }
229
232
 
230
233
  for (const { node } of branch) {
@@ -467,16 +470,22 @@ export async function render_response({
467
470
  args.push(`{\n${indent}\t${hydrate.join(`,\n${indent}\t`)}\n${indent}}`);
468
471
  }
469
472
 
470
- const { remote_data } = event_state;
473
+ const { remote_data: remote_cache } = event_state;
471
474
 
472
475
  let serialized_remote_data = '';
473
476
 
474
- if (remote_data) {
477
+ if (remote_cache) {
475
478
  /** @type {Record<string, any>} */
476
479
  const remote = {};
477
480
 
478
- for (const key in remote_data) {
479
- remote[key] = await remote_data[key];
481
+ for (const [info, cache] of remote_cache) {
482
+ // remote functions without an `id` aren't exported, and thus
483
+ // cannot be called from the client
484
+ if (!info.id) continue;
485
+
486
+ for (const key in cache) {
487
+ remote[key ? info.id + '/' + key : info.id] = await cache[key];
488
+ }
480
489
  }
481
490
 
482
491
  // TODO this is repeated in a few places — dedupe it
@@ -1,4 +1,4 @@
1
- import { base, assets, relative } from '__sveltekit/paths';
1
+ import { base, assets, relative } from '$app/paths/internal/server';
2
2
  import { text } from '@sveltejs/kit';
3
3
  import { s } from '../../../utils/misc.js';
4
4
  import { exec } from '../../../utils/routing.js';
@@ -4,7 +4,7 @@
4
4
  import { json, error } from '@sveltejs/kit';
5
5
  import { HttpError, Redirect, SvelteKitError } from '@sveltejs/kit/internal';
6
6
  import { with_request_store, merge_tracing } from '@sveltejs/kit/internal/server';
7
- import { app_dir, base } from '__sveltekit/paths';
7
+ import { app_dir, base } from '$app/paths/internal/server';
8
8
  import { is_form_content_type } from '../../utils/http.js';
9
9
  import { parse_remote_arg, stringify } from '../shared.js';
10
10
  import { handle_error_and_jsonify } from './utils.js';
@@ -3,7 +3,7 @@ import { DEV } from 'esm-env';
3
3
  import { json, text } from '@sveltejs/kit';
4
4
  import { Redirect, SvelteKitError } from '@sveltejs/kit/internal';
5
5
  import { merge_tracing, with_request_store } from '@sveltejs/kit/internal/server';
6
- import { base, app_dir } from '__sveltekit/paths';
6
+ import { base, app_dir } from '$app/paths/internal/server';
7
7
  import { is_endpoint_request, render_endpoint } from './endpoint.js';
8
8
  import { render_page } from './page/index.js';
9
9
  import { render_response } from './page/render.js';
@@ -1,8 +1,12 @@
1
1
  declare global {
2
2
  const __SVELTEKIT_ADAPTER_NAME__: string;
3
+ const __SVELTEKIT_APP_DIR__: string;
3
4
  const __SVELTEKIT_APP_VERSION_FILE__: string;
4
5
  const __SVELTEKIT_APP_VERSION_POLL_INTERVAL__: number;
5
6
  const __SVELTEKIT_EMBEDDED__: boolean;
7
+ const __SVELTEKIT_PATHS_ASSETS__: string;
8
+ const __SVELTEKIT_PATHS_BASE__: string;
9
+ const __SVELTEKIT_PATHS_RELATIVE__: boolean;
6
10
  /** True if `config.kit.experimental.instrumentation.server` is `true` */
7
11
  const __SVELTEKIT_SERVER_TRACING_ENABLED__: boolean;
8
12
  /** true if corresponding config option is set to true */
@@ -441,6 +441,7 @@ export type SSRNodeLoader = () => Promise<SSRNode>;
441
441
 
442
442
  export interface SSROptions {
443
443
  app_template_contains_nonce: boolean;
444
+ async: boolean;
444
445
  csp: ValidatedConfig['kit']['csp'];
445
446
  csrf_check_origin: boolean;
446
447
  csrf_trusted_origins: string[];
@@ -597,7 +598,7 @@ export interface RequestState {
597
598
  record_span: RecordSpan;
598
599
  };
599
600
  form_instances?: Map<any, any>;
600
- remote_data?: Record<string, MaybePromise<any>>;
601
+ remote_data?: Map<RemoteInfo, Record<string, MaybePromise<any>>>;
601
602
  refreshes?: Record<string, Promise<any>>;
602
603
  is_endpoint_request?: boolean;
603
604
  }
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // generated during release, do not modify
2
2
 
3
3
  /** @type {string} */
4
- export const VERSION = '2.42.2';
4
+ export const VERSION = '2.43.1';
package/types/index.d.ts CHANGED
@@ -2930,7 +2930,7 @@ declare module '$app/navigation' {
2930
2930
  }
2931
2931
 
2932
2932
  declare module '$app/paths' {
2933
- import type { Asset, RouteId, RouteParams, Pathname, ResolvedPathname } from '$app/types';
2933
+ import type { RouteId, Pathname, ResolvedPathname, RouteParams, Asset } from '$app/types';
2934
2934
  /**
2935
2935
  * A string that matches [`config.kit.paths.base`](https://svelte.dev/docs/kit/configuration#paths).
2936
2936
  *
@@ -2949,12 +2949,34 @@ declare module '$app/paths' {
2949
2949
  */
2950
2950
  export let assets: '' | `https://${string}` | `http://${string}` | '/_svelte_kit_assets';
2951
2951
 
2952
+ /**
2953
+ * @deprecated Use [`resolve(...)`](https://svelte.dev/docs/kit/$app-paths#resolve) instead
2954
+ */
2955
+ export function resolveRoute<T extends RouteId | Pathname>(
2956
+ ...args: ResolveArgs<T>
2957
+ ): ResolvedPathname;
2952
2958
  type ResolveArgs<T extends RouteId | Pathname> = T extends RouteId
2953
2959
  ? RouteParams<T> extends Record<string, never>
2954
2960
  ? [route: T]
2955
2961
  : [route: T, params: RouteParams<T>]
2956
2962
  : [route: T];
2957
-
2963
+ /**
2964
+ * Resolve the URL of an asset in your `static` directory, by prefixing it with [`config.kit.paths.assets`](https://svelte.dev/docs/kit/configuration#paths) if configured, or otherwise by prefixing it with the base path.
2965
+ *
2966
+ * During server rendering, the base path is relative and depends on the page currently being rendered.
2967
+ *
2968
+ * @example
2969
+ * ```svelte
2970
+ * <script>
2971
+ * import { asset } from '$app/paths';
2972
+ * </script>
2973
+ *
2974
+ * <img alt="a potato" src={asset('/potato.jpg')} />
2975
+ * ```
2976
+ * @since 2.26
2977
+ *
2978
+ * */
2979
+ export function asset(file: Asset): string;
2958
2980
  /**
2959
2981
  * Resolve a pathname by prefixing it with the base path, if any, or resolve a route ID by populating dynamic segments with parameters.
2960
2982
  *
@@ -2973,32 +2995,9 @@ declare module '$app/paths' {
2973
2995
  * });
2974
2996
  * ```
2975
2997
  * @since 2.26
2976
- */
2977
- export function resolve<T extends RouteId | Pathname>(...args: ResolveArgs<T>): ResolvedPathname;
2978
-
2979
- /**
2980
- * Resolve the URL of an asset in your `static` directory, by prefixing it with [`config.kit.paths.assets`](https://svelte.dev/docs/kit/configuration#paths) if configured, or otherwise by prefixing it with the base path.
2981
2998
  *
2982
- * During server rendering, the base path is relative and depends on the page currently being rendered.
2983
- *
2984
- * @example
2985
- * ```svelte
2986
- * <script>
2987
- * import { asset } from '$app/paths';
2988
- * </script>
2989
- *
2990
- * <img alt="a potato" src={asset('/potato.jpg')} />
2991
- * ```
2992
- * @since 2.26
2993
- */
2994
- export function asset(file: Asset): string;
2995
-
2996
- /**
2997
- * @deprecated Use [`resolve(...)`](https://svelte.dev/docs/kit/$app-paths#resolve) instead
2998
- */
2999
- export function resolveRoute<T extends RouteId | Pathname>(
3000
- ...args: ResolveArgs<T>
3001
- ): ResolvedPathname;
2999
+ * */
3000
+ export function resolve<T extends RouteId | Pathname>(...args: ResolveArgs<T>): ResolvedPathname;
3002
3001
 
3003
3002
  export {};
3004
3003
  }
@@ -145,10 +145,10 @@
145
145
  "replaceState",
146
146
  "base",
147
147
  "assets",
148
+ "resolveRoute",
148
149
  "ResolveArgs",
149
- "resolve",
150
150
  "asset",
151
- "resolveRoute",
151
+ "resolve",
152
152
  "read",
153
153
  "getRequestEvent",
154
154
  "RemotePrerenderInputsGenerator",
@@ -171,7 +171,9 @@
171
171
  "../src/runtime/app/environment/types.d.ts",
172
172
  "../src/runtime/app/forms.js",
173
173
  "../src/runtime/client/client.js",
174
+ "../src/runtime/app/paths/public.d.ts",
174
175
  "../src/runtime/app/paths/types.d.ts",
176
+ "../src/runtime/app/paths/client.js",
175
177
  "../src/runtime/app/server/index.js",
176
178
  "../src/exports/internal/event.js",
177
179
  "../src/runtime/app/state/index.js",
@@ -195,8 +197,10 @@
195
197
  null,
196
198
  null,
197
199
  null,
200
+ null,
201
+ null,
198
202
  null
199
203
  ],
200
- "mappings": ";;;;;;;;;;;kBAkCiBA,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAiCZC,cAAcA;;;;;;aAMdC,cAAcA;;;;;;;;MAQrBC,aAAaA;;;;;OAKJC,YAAYA;;kBAETC,aAAaA;;;;;;MAMzBC,qBAAqBA;;;;;;;;;;;kBAWTC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA8IPC,MAAMA;;;;;;;;;;;kBAWNC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA4DPC,QAAQA;;;;;;;;kBAQRC,SAASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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