@sveltejs/kit 1.20.5 → 1.22.0
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.
- package/package.json +6 -5
- package/src/constants.js +12 -0
- package/src/core/config/options.js +2 -1
- package/src/core/env.js +15 -6
- package/src/core/generate_manifest/index.js +20 -4
- package/src/core/postbuild/analyse.js +10 -10
- package/src/core/sync/write_ambient.js +9 -5
- package/src/core/sync/write_server.js +1 -0
- package/src/exports/index.js +8 -1
- package/src/exports/public.d.ts +11 -2
- package/src/exports/vite/build/build_server.js +2 -1
- package/src/exports/vite/build/utils.js +0 -11
- package/src/exports/vite/utils.js +5 -3
- package/src/runtime/client/client.js +36 -21
- package/src/runtime/server/endpoint.js +3 -2
- package/src/runtime/server/index.js +14 -8
- package/src/runtime/server/page/serialize_data.js +6 -7
- package/src/runtime/server/respond.js +47 -4
- package/src/runtime/server/utils.js +2 -3
- package/src/types/internal.d.ts +1 -0
- package/src/types/synthetic/$env+dynamic+private.md +1 -1
- package/src/types/synthetic/$env+static+private.md +1 -1
- package/src/utils/env.js +33 -0
- package/src/utils/exports.js +1 -0
- package/src/version.js +4 -0
- package/types/index.d.ts +13 -2
- package/types/index.d.ts.map +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltejs/kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.0",
|
|
4
4
|
"description": "The fastest way to build Svelte apps",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"dts-buddy": "^0.0.10",
|
|
36
36
|
"marked": "^4.2.3",
|
|
37
37
|
"rollup": "^3.7.0",
|
|
38
|
-
"svelte": "^
|
|
39
|
-
"svelte-preprocess": "^5.0.
|
|
38
|
+
"svelte": "^4.0.3",
|
|
39
|
+
"svelte-preprocess": "^5.0.4",
|
|
40
40
|
"typescript": "^4.9.4",
|
|
41
41
|
"vite": "^4.3.6",
|
|
42
|
-
"vitest": "^0.
|
|
42
|
+
"vitest": "^0.32.2"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"svelte": "^3.54.0 || ^4.0.0-next.0",
|
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
"test:cross-platform:dev": "pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test:cross-platform:dev",
|
|
95
95
|
"test:cross-platform:build": "pnpm test:unit && pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test:cross-platform:build",
|
|
96
96
|
"test:unit": "vitest --config kit.vitest.config.js run",
|
|
97
|
-
"postinstall": "node postinstall.js"
|
|
97
|
+
"postinstall": "node postinstall.js",
|
|
98
|
+
"generate:version": "node scripts/generate-version.js"
|
|
98
99
|
}
|
|
99
100
|
}
|
package/src/constants.js
CHANGED
|
@@ -5,3 +5,15 @@
|
|
|
5
5
|
export const SVELTE_KIT_ASSETS = '/_svelte_kit_assets';
|
|
6
6
|
|
|
7
7
|
export const GENERATED_COMMENT = '// this file is generated — do not edit it\n';
|
|
8
|
+
|
|
9
|
+
export const ENDPOINT_METHODS = new Set([
|
|
10
|
+
'GET',
|
|
11
|
+
'POST',
|
|
12
|
+
'PUT',
|
|
13
|
+
'PATCH',
|
|
14
|
+
'DELETE',
|
|
15
|
+
'OPTIONS',
|
|
16
|
+
'HEAD'
|
|
17
|
+
]);
|
|
18
|
+
|
|
19
|
+
export const PAGE_METHODS = new Set(['GET', 'POST', 'HEAD']);
|
package/src/core/env.js
CHANGED
|
@@ -63,21 +63,30 @@ export function create_static_types(id, env) {
|
|
|
63
63
|
/**
|
|
64
64
|
* @param {EnvType} id
|
|
65
65
|
* @param {import('types').Env} env
|
|
66
|
-
* @param {
|
|
66
|
+
* @param {{
|
|
67
|
+
* public_prefix: string;
|
|
68
|
+
* private_prefix: string;
|
|
69
|
+
* }} prefixes
|
|
67
70
|
* @returns {string}
|
|
68
71
|
*/
|
|
69
|
-
export function create_dynamic_types(id, env,
|
|
72
|
+
export function create_dynamic_types(id, env, { public_prefix, private_prefix }) {
|
|
70
73
|
const properties = Object.keys(env[id])
|
|
71
74
|
.filter((k) => valid_identifier.test(k))
|
|
72
75
|
.map((k) => `${k}: string;`);
|
|
73
76
|
|
|
74
|
-
const
|
|
77
|
+
const public_prefixed = `[key: \`${public_prefix}\${string}\`]`;
|
|
78
|
+
const private_prefixed = `[key: \`${private_prefix}\${string}\`]`;
|
|
75
79
|
|
|
76
80
|
if (id === 'private') {
|
|
77
|
-
|
|
78
|
-
|
|
81
|
+
if (public_prefix) {
|
|
82
|
+
properties.push(`${public_prefixed}: undefined;`);
|
|
83
|
+
}
|
|
84
|
+
properties.push(`${private_prefixed}: string | undefined;`);
|
|
79
85
|
} else {
|
|
80
|
-
|
|
86
|
+
if (private_prefix) {
|
|
87
|
+
properties.push(`${private_prefixed}: undefined;`);
|
|
88
|
+
}
|
|
89
|
+
properties.push(`${public_prefixed}: string | undefined;`);
|
|
81
90
|
}
|
|
82
91
|
|
|
83
92
|
return dedent`
|
|
@@ -44,7 +44,7 @@ export function generate_manifest({ build_data, relative_path, routes }) {
|
|
|
44
44
|
);
|
|
45
45
|
|
|
46
46
|
/** @type {(path: string) => string} */
|
|
47
|
-
const loader = (path) => `() => import('${path}')`;
|
|
47
|
+
const loader = (path) => `__memo(() => import('${path}'))`;
|
|
48
48
|
|
|
49
49
|
const assets = build_data.manifest_data.assets.map((asset) => asset.file);
|
|
50
50
|
if (build_data.service_worker) {
|
|
@@ -65,8 +65,8 @@ export function generate_manifest({ build_data, relative_path, routes }) {
|
|
|
65
65
|
|
|
66
66
|
// prettier-ignore
|
|
67
67
|
// String representation of
|
|
68
|
-
/** @
|
|
69
|
-
|
|
68
|
+
/** @template {import('@sveltejs/kit').SSRManifest} T */
|
|
69
|
+
const manifest_expr = dedent`
|
|
70
70
|
{
|
|
71
71
|
appDir: ${s(build_data.app_dir)},
|
|
72
72
|
appPath: ${s(build_data.app_path)},
|
|
@@ -97,10 +97,26 @@ export function generate_manifest({ build_data, relative_path, routes }) {
|
|
|
97
97
|
}).filter(Boolean).join(',\n')}
|
|
98
98
|
],
|
|
99
99
|
matchers: async () => {
|
|
100
|
-
${Array.from(
|
|
100
|
+
${Array.from(
|
|
101
|
+
matchers,
|
|
102
|
+
type => `const { match: ${type} } = await import ('${(join_relative(relative_path, `/entries/matchers/${type}.js`))}')`
|
|
103
|
+
).join('\n')}
|
|
101
104
|
return { ${Array.from(matchers).join(', ')} };
|
|
102
105
|
}
|
|
103
106
|
}
|
|
104
107
|
}
|
|
105
108
|
`;
|
|
109
|
+
|
|
110
|
+
// Memoize the loaders to prevent Node from doing unnecessary work
|
|
111
|
+
// on every dynamic import call
|
|
112
|
+
return dedent`
|
|
113
|
+
(() => {
|
|
114
|
+
function __memo(fn) {
|
|
115
|
+
let value;
|
|
116
|
+
return () => value ??= (value = fn());
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return ${manifest_expr}
|
|
120
|
+
})()
|
|
121
|
+
`;
|
|
106
122
|
}
|
|
@@ -13,6 +13,8 @@ import { forked } from '../../utils/fork.js';
|
|
|
13
13
|
import { should_polyfill } from '../../utils/platform.js';
|
|
14
14
|
import { installPolyfills } from '../../exports/node/polyfills.js';
|
|
15
15
|
import { resolvePath } from '../../exports/index.js';
|
|
16
|
+
import { ENDPOINT_METHODS } from '../../constants.js';
|
|
17
|
+
import { filter_private_env, filter_public_env } from '../../utils/env.js';
|
|
16
18
|
|
|
17
19
|
export default forked(import.meta.url, analyse);
|
|
18
20
|
|
|
@@ -43,10 +45,9 @@ async function analyse({ manifest_path, env }) {
|
|
|
43
45
|
internal.set_building(true);
|
|
44
46
|
|
|
45
47
|
// set env, in case it's used in initialisation
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
internal.
|
|
49
|
-
internal.set_public_env(Object.fromEntries(entries.filter(([k]) => k.startsWith(prefix))));
|
|
48
|
+
const { publicPrefix: public_prefix, privatePrefix: private_prefix } = config.env;
|
|
49
|
+
internal.set_private_env(filter_private_env(env, { public_prefix, private_prefix }));
|
|
50
|
+
internal.set_public_env(filter_public_env(env, { public_prefix, private_prefix }));
|
|
50
51
|
|
|
51
52
|
/** @type {import('types').ServerMetadata} */
|
|
52
53
|
const metadata = {
|
|
@@ -92,12 +93,11 @@ async function analyse({ manifest_path, env }) {
|
|
|
92
93
|
prerender = mod.prerender;
|
|
93
94
|
}
|
|
94
95
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
if (mod.OPTIONS) api_methods.push('OPTIONS');
|
|
96
|
+
Object.values(mod).forEach((/** @type {import('types').HttpMethod} */ method) => {
|
|
97
|
+
if (mod[method] && ENDPOINT_METHODS.has(method)) {
|
|
98
|
+
api_methods.push(method);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
101
|
|
|
102
102
|
config = mod.config;
|
|
103
103
|
entries = mod.entries;
|
|
@@ -22,9 +22,12 @@ function read_description(filename) {
|
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* @param {import('types').Env} env
|
|
25
|
-
* @param {
|
|
25
|
+
* @param {{
|
|
26
|
+
* public_prefix: string;
|
|
27
|
+
* private_prefix: string;
|
|
28
|
+
* }} prefixes
|
|
26
29
|
*/
|
|
27
|
-
const template = (env,
|
|
30
|
+
const template = (env, prefixes) => `
|
|
28
31
|
${GENERATED_COMMENT}
|
|
29
32
|
|
|
30
33
|
/// <reference types="@sveltejs/kit" />
|
|
@@ -36,10 +39,10 @@ ${read_description('$env+static+public.md')}
|
|
|
36
39
|
${create_static_types('public', env)}
|
|
37
40
|
|
|
38
41
|
${read_description('$env+dynamic+private.md')}
|
|
39
|
-
${create_dynamic_types('private', env,
|
|
42
|
+
${create_dynamic_types('private', env, prefixes)}
|
|
40
43
|
|
|
41
44
|
${read_description('$env+dynamic+public.md')}
|
|
42
|
-
${create_dynamic_types('public', env,
|
|
45
|
+
${create_dynamic_types('public', env, prefixes)}
|
|
43
46
|
`;
|
|
44
47
|
|
|
45
48
|
/**
|
|
@@ -51,9 +54,10 @@ ${create_dynamic_types('public', env, prefix)}
|
|
|
51
54
|
*/
|
|
52
55
|
export function write_ambient(config, mode) {
|
|
53
56
|
const env = get_env(config.env, mode);
|
|
57
|
+
const { publicPrefix: public_prefix, privatePrefix: private_prefix } = config.env;
|
|
54
58
|
|
|
55
59
|
write_if_changed(
|
|
56
60
|
path.join(config.outDir, 'ambient.d.ts'),
|
|
57
|
-
template(env,
|
|
61
|
+
template(env, { public_prefix, private_prefix })
|
|
58
62
|
);
|
|
59
63
|
}
|
|
@@ -37,6 +37,7 @@ export const options = {
|
|
|
37
37
|
track_server_fetches: ${s(config.kit.dangerZone.trackServerFetches)},
|
|
38
38
|
embedded: ${config.kit.embedded},
|
|
39
39
|
env_public_prefix: '${config.kit.env.publicPrefix}',
|
|
40
|
+
env_private_prefix: '${config.kit.env.privatePrefix}',
|
|
40
41
|
hooks: null, // added lazily, via \`get_hooks\`
|
|
41
42
|
preload_strategy: ${s(config.kit.output.preloadStrategy)},
|
|
42
43
|
root,
|
package/src/exports/index.js
CHANGED
|
@@ -2,6 +2,8 @@ import { HttpError, Redirect, ActionFailure } from '../runtime/control.js';
|
|
|
2
2
|
import { BROWSER, DEV } from 'esm-env';
|
|
3
3
|
import { get_route_segments } from '../utils/routing.js';
|
|
4
4
|
|
|
5
|
+
export { VERSION } from '../version.js';
|
|
6
|
+
|
|
5
7
|
/**
|
|
6
8
|
* @overload
|
|
7
9
|
* @param {number} status
|
|
@@ -84,7 +86,12 @@ const encoder = new TextEncoder();
|
|
|
84
86
|
export function text(body, init) {
|
|
85
87
|
const headers = new Headers(init?.headers);
|
|
86
88
|
if (!headers.has('content-length')) {
|
|
87
|
-
|
|
89
|
+
const encoded = encoder.encode(body);
|
|
90
|
+
headers.set('content-length', encoded.byteLength.toString());
|
|
91
|
+
return new Response(encoded, {
|
|
92
|
+
...init,
|
|
93
|
+
headers
|
|
94
|
+
});
|
|
88
95
|
}
|
|
89
96
|
|
|
90
97
|
return new Response(body, {
|
package/src/exports/public.d.ts
CHANGED
|
@@ -372,6 +372,11 @@ export interface KitConfig {
|
|
|
372
372
|
* @default "PUBLIC_"
|
|
373
373
|
*/
|
|
374
374
|
publicPrefix?: string;
|
|
375
|
+
/**
|
|
376
|
+
* A prefix that signals that an environment variable is unsafe to expose to client-side code. Environment variables matching neither the public nor the private prefix will be discarded completely. See [`$env/static/private`](/docs/modules#$env-static-private) and [`$env/dynamic/private`](/docs/modules#$env-dynamic-private).
|
|
377
|
+
* @default ""
|
|
378
|
+
*/
|
|
379
|
+
privatePrefix?: string;
|
|
375
380
|
};
|
|
376
381
|
/**
|
|
377
382
|
* Where to find various files within your project.
|
|
@@ -449,7 +454,7 @@ export interface KitConfig {
|
|
|
449
454
|
/**
|
|
450
455
|
* SvelteKit will preload the JavaScript modules needed for the initial page to avoid import 'waterfalls', resulting in faster application startup. There
|
|
451
456
|
* are three strategies with different trade-offs:
|
|
452
|
-
* - `modulepreload` - uses `<link rel="modulepreload">`. This delivers the best results in Chromium-based browsers,
|
|
457
|
+
* - `modulepreload` - uses `<link rel="modulepreload">`. This delivers the best results in Chromium-based browsers, in Firefox 115+, and Safari 17+. It is ignored in older browsers.
|
|
453
458
|
* - `preload-js` - uses `<link rel="preload">`. Prevents waterfalls in Chromium and Safari, but Chromium will parse each module twice (once as a script, once as a module). Causes modules to be requested twice in Firefox. This is a good setting if you want to maximise performance for users on iOS devices at the cost of a very slight degradation for Chromium users.
|
|
454
459
|
* - `preload-mjs` - uses `<link rel="preload">` but with the `.mjs` extension which prevents double-parsing in Chromium. Some static webservers will fail to serve .mjs files with a `Content-Type: application/javascript` header, which will cause your application to break. If that doesn't apply to you, this is the option that will deliver the best performance for the largest number of users, until `modulepreload` is more widely supported.
|
|
455
460
|
* @default "modulepreload"
|
|
@@ -821,7 +826,7 @@ export interface NavigationTarget {
|
|
|
821
826
|
|
|
822
827
|
/**
|
|
823
828
|
* - `enter`: The app has hydrated
|
|
824
|
-
* - `form`: The user submitted a `<form>`
|
|
829
|
+
* - `form`: The user submitted a `<form>` with a GET method
|
|
825
830
|
* - `leave`: The user is leaving the app by closing the tab or using the back/forward buttons to go to a different document
|
|
826
831
|
* - `link`: Navigation was triggered by a link click
|
|
827
832
|
* - `goto`: Navigation was triggered by a `goto(...)` call or a redirect
|
|
@@ -1012,6 +1017,10 @@ export interface RequestEvent<
|
|
|
1012
1017
|
* related to the data request in this case. Use this property instead if the distinction is important to you.
|
|
1013
1018
|
*/
|
|
1014
1019
|
isDataRequest: boolean;
|
|
1020
|
+
/**
|
|
1021
|
+
* `true` for `+server.js` calls coming from SvelteKit without the overhead of actually making an HTTP request. This happens when you make same-origin `fetch` requests on the server.
|
|
1022
|
+
*/
|
|
1023
|
+
isSubRequest: boolean;
|
|
1015
1024
|
}
|
|
1016
1025
|
|
|
1017
1026
|
/**
|
|
@@ -50,7 +50,8 @@ export function build_server_nodes(out, kit, manifest_data, server_manifest, cli
|
|
|
50
50
|
|
|
51
51
|
if (node.component && client_manifest) {
|
|
52
52
|
exports.push(
|
|
53
|
-
|
|
53
|
+
'let component_cache;',
|
|
54
|
+
`export const component = async () => component_cache ??= (await import('../${
|
|
54
55
|
resolve_symlinks(server_manifest, node.component).chunk.file
|
|
55
56
|
}')).default;`
|
|
56
57
|
);
|
|
@@ -90,14 +90,3 @@ export function resolve_symlinks(manifest, file) {
|
|
|
90
90
|
export function assets_base(config) {
|
|
91
91
|
return (config.paths.assets || config.paths.base || '.') + '/';
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
const method_names = new Set(['GET', 'HEAD', 'PUT', 'POST', 'DELETE', 'PATCH', 'OPTIONS']);
|
|
95
|
-
|
|
96
|
-
// If we'd written this in TypeScript, it could be easy...
|
|
97
|
-
/**
|
|
98
|
-
* @param {string} str
|
|
99
|
-
* @returns {str is import('types').HttpMethod}
|
|
100
|
-
*/
|
|
101
|
-
export function is_http_method(str) {
|
|
102
|
-
return method_names.has(str);
|
|
103
|
-
}
|
|
@@ -2,6 +2,7 @@ import path from 'node:path';
|
|
|
2
2
|
import { loadEnv } from 'vite';
|
|
3
3
|
import { posixify } from '../../utils/filesystem.js';
|
|
4
4
|
import { negotiate } from '../../utils/http.js';
|
|
5
|
+
import { filter_private_env, filter_public_env } from '../../utils/env.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Transforms kit.alias to a valid vite.resolve.alias array.
|
|
@@ -56,11 +57,12 @@ function escape_for_regexp(str) {
|
|
|
56
57
|
* @param {string} mode
|
|
57
58
|
*/
|
|
58
59
|
export function get_env(env_config, mode) {
|
|
59
|
-
const
|
|
60
|
+
const { publicPrefix: public_prefix, privatePrefix: private_prefix } = env_config;
|
|
61
|
+
const env = loadEnv(mode, env_config.dir, '');
|
|
60
62
|
|
|
61
63
|
return {
|
|
62
|
-
public:
|
|
63
|
-
private:
|
|
64
|
+
public: filter_public_env(env, { public_prefix, private_prefix }),
|
|
65
|
+
private: filter_private_env(env, { public_prefix, private_prefix })
|
|
64
66
|
};
|
|
65
67
|
}
|
|
66
68
|
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import { DEV } from 'esm-env';
|
|
2
2
|
import { onMount, tick } from 'svelte';
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
decode_pathname,
|
|
4
|
+
add_data_suffix,
|
|
6
5
|
decode_params,
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
decode_pathname,
|
|
7
|
+
make_trackable,
|
|
8
|
+
normalize_path
|
|
9
9
|
} from '../../utils/url.js';
|
|
10
|
+
import {
|
|
11
|
+
initial_fetch,
|
|
12
|
+
lock_fetch,
|
|
13
|
+
native_fetch,
|
|
14
|
+
subsequent_fetch,
|
|
15
|
+
unlock_fetch
|
|
16
|
+
} from './fetcher.js';
|
|
17
|
+
import { parse } from './parse.js';
|
|
18
|
+
import * as storage from './session-storage.js';
|
|
10
19
|
import {
|
|
11
20
|
find_anchor,
|
|
12
21
|
get_base_uri,
|
|
@@ -15,25 +24,16 @@ import {
|
|
|
15
24
|
is_external_url,
|
|
16
25
|
scroll_state
|
|
17
26
|
} from './utils.js';
|
|
18
|
-
import * as storage from './session-storage.js';
|
|
19
|
-
import {
|
|
20
|
-
lock_fetch,
|
|
21
|
-
unlock_fetch,
|
|
22
|
-
initial_fetch,
|
|
23
|
-
subsequent_fetch,
|
|
24
|
-
native_fetch
|
|
25
|
-
} from './fetcher.js';
|
|
26
|
-
import { parse } from './parse.js';
|
|
27
27
|
|
|
28
28
|
import { base } from '__sveltekit/paths';
|
|
29
|
-
import { HttpError, Redirect } from '../control.js';
|
|
30
|
-
import { stores } from './singletons.js';
|
|
31
|
-
import { unwrap_promises } from '../../utils/promises.js';
|
|
32
29
|
import * as devalue from 'devalue';
|
|
33
|
-
import { INDEX_KEY, PRELOAD_PRIORITIES, SCROLL_KEY, SNAPSHOT_KEY } from './constants.js';
|
|
34
|
-
import { validate_page_exports } from '../../utils/exports.js';
|
|
35
30
|
import { compact } from '../../utils/array.js';
|
|
31
|
+
import { validate_page_exports } from '../../utils/exports.js';
|
|
32
|
+
import { unwrap_promises } from '../../utils/promises.js';
|
|
33
|
+
import { HttpError, Redirect } from '../control.js';
|
|
36
34
|
import { INVALIDATED_PARAM, validate_depends } from '../shared.js';
|
|
35
|
+
import { INDEX_KEY, PRELOAD_PRIORITIES, SCROLL_KEY, SNAPSHOT_KEY } from './constants.js';
|
|
36
|
+
import { stores } from './singletons.js';
|
|
37
37
|
|
|
38
38
|
let errored = false;
|
|
39
39
|
|
|
@@ -1555,9 +1555,7 @@ export function create_client(app, target) {
|
|
|
1555
1555
|
|
|
1556
1556
|
update_scroll_positions(current_history_index);
|
|
1557
1557
|
|
|
1558
|
-
|
|
1559
|
-
stores.page.set({ ...page, url });
|
|
1560
|
-
stores.page.notify();
|
|
1558
|
+
update_url(url);
|
|
1561
1559
|
|
|
1562
1560
|
if (!options.replace_state) return;
|
|
1563
1561
|
|
|
@@ -1670,6 +1668,14 @@ export function create_client(app, target) {
|
|
|
1670
1668
|
type: 'popstate',
|
|
1671
1669
|
delta
|
|
1672
1670
|
});
|
|
1671
|
+
} else {
|
|
1672
|
+
// since popstate event is also emitted when an anchor referencing the same
|
|
1673
|
+
// document is clicked, we have to check that the router isn't already handling
|
|
1674
|
+
// the navigation. otherwise we would be updating the page store twice.
|
|
1675
|
+
if (!hash_navigating) {
|
|
1676
|
+
const url = new URL(location.href);
|
|
1677
|
+
update_url(url);
|
|
1678
|
+
}
|
|
1673
1679
|
}
|
|
1674
1680
|
});
|
|
1675
1681
|
|
|
@@ -1702,6 +1708,15 @@ export function create_client(app, target) {
|
|
|
1702
1708
|
stores.navigating.set(null);
|
|
1703
1709
|
}
|
|
1704
1710
|
});
|
|
1711
|
+
|
|
1712
|
+
/**
|
|
1713
|
+
* @param {URL} url
|
|
1714
|
+
*/
|
|
1715
|
+
function update_url(url) {
|
|
1716
|
+
current.url = url;
|
|
1717
|
+
stores.page.set({ ...page, url });
|
|
1718
|
+
stores.page.notify();
|
|
1719
|
+
}
|
|
1705
1720
|
},
|
|
1706
1721
|
|
|
1707
1722
|
_hydrate: async ({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ENDPOINT_METHODS, PAGE_METHODS } from '../../constants.js';
|
|
1
2
|
import { negotiate } from '../../utils/http.js';
|
|
2
3
|
import { Redirect } from '../control.js';
|
|
3
4
|
import { method_not_allowed } from './utils.js';
|
|
@@ -79,8 +80,8 @@ export async function render_endpoint(event, mod, state) {
|
|
|
79
80
|
export function is_endpoint_request(event) {
|
|
80
81
|
const { method, headers } = event.request;
|
|
81
82
|
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
// These methods exist exclusively for endpoints
|
|
84
|
+
if (ENDPOINT_METHODS.has(method) && !PAGE_METHODS.has(method)) {
|
|
84
85
|
return true;
|
|
85
86
|
}
|
|
86
87
|
|
|
@@ -2,6 +2,7 @@ import { respond } from './respond.js';
|
|
|
2
2
|
import { set_private_env, set_public_env } from '../shared-server.js';
|
|
3
3
|
import { options, get_hooks } from '__SERVER__/internal.js';
|
|
4
4
|
import { DEV } from 'esm-env';
|
|
5
|
+
import { filter_private_env, filter_public_env } from '../../utils/env.js';
|
|
5
6
|
|
|
6
7
|
export class Server {
|
|
7
8
|
/** @type {import('types').SSROptions} */
|
|
@@ -26,14 +27,19 @@ export class Server {
|
|
|
26
27
|
// Take care: Some adapters may have to call `Server.init` per-request to set env vars,
|
|
27
28
|
// so anything that shouldn't be rerun should be wrapped in an `if` block to make sure it hasn't
|
|
28
29
|
// been done already.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
set_public_env(
|
|
30
|
+
// set env, in case it's used in initialisation
|
|
31
|
+
set_private_env(
|
|
32
|
+
filter_private_env(env, {
|
|
33
|
+
public_prefix: this.#options.env_public_prefix,
|
|
34
|
+
private_prefix: this.#options.env_private_prefix
|
|
35
|
+
})
|
|
36
|
+
);
|
|
37
|
+
set_public_env(
|
|
38
|
+
filter_public_env(env, {
|
|
39
|
+
public_prefix: this.#options.env_public_prefix,
|
|
40
|
+
private_prefix: this.#options.env_private_prefix
|
|
41
|
+
})
|
|
42
|
+
);
|
|
37
43
|
|
|
38
44
|
if (!this.#options.hooks) {
|
|
39
45
|
try {
|
|
@@ -46,7 +46,7 @@ export function serialize_data(fetched, filter, prerendering = false) {
|
|
|
46
46
|
|
|
47
47
|
let cache_control = null;
|
|
48
48
|
let age = null;
|
|
49
|
-
let
|
|
49
|
+
let varyAny = false;
|
|
50
50
|
|
|
51
51
|
for (const [key, value] of fetched.response.headers) {
|
|
52
52
|
if (filter(key, value)) {
|
|
@@ -54,8 +54,8 @@ export function serialize_data(fetched, filter, prerendering = false) {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
if (key === 'cache-control') cache_control = value;
|
|
57
|
-
if (key === 'age') age = value;
|
|
58
|
-
if (key === 'vary')
|
|
57
|
+
else if (key === 'age') age = value;
|
|
58
|
+
else if (key === 'vary' && value.trim() === '*') varyAny = true;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
const payload = {
|
|
@@ -89,10 +89,9 @@ export function serialize_data(fetched, filter, prerendering = false) {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
// Compute the time the response should be cached, taking into account max-age and age.
|
|
92
|
-
// Do not cache at all if a
|
|
93
|
-
// likely to get busted.
|
|
94
|
-
|
|
95
|
-
if (!prerendering && fetched.method === 'GET' && cache_control && !vary) {
|
|
92
|
+
// Do not cache at all if a `Vary: *` header is present, as this indicates that the
|
|
93
|
+
// cache is likely to get busted.
|
|
94
|
+
if (!prerendering && fetched.method === 'GET' && cache_control && !varyAny) {
|
|
96
95
|
const match = /s-maxage=(\d+)/g.exec(cache_control) ?? /max-age=(\d+)/g.exec(cache_control);
|
|
97
96
|
if (match) {
|
|
98
97
|
const ttl = +match[1] - +(age ?? '0');
|
|
@@ -5,7 +5,7 @@ import { render_page } from './page/index.js';
|
|
|
5
5
|
import { render_response } from './page/render.js';
|
|
6
6
|
import { respond_with_error } from './page/respond_with_error.js';
|
|
7
7
|
import { is_form_content_type } from '../../utils/http.js';
|
|
8
|
-
import { handle_fatal_error, redirect_response } from './utils.js';
|
|
8
|
+
import { handle_fatal_error, method_not_allowed, redirect_response } from './utils.js';
|
|
9
9
|
import {
|
|
10
10
|
decode_pathname,
|
|
11
11
|
decode_params,
|
|
@@ -42,6 +42,10 @@ const default_filter = () => false;
|
|
|
42
42
|
/** @type {import('types').RequiredResolveOptions['preload']} */
|
|
43
43
|
const default_preload = ({ type }) => type === 'js' || type === 'css';
|
|
44
44
|
|
|
45
|
+
const page_methods = new Set(['GET', 'HEAD', 'POST']);
|
|
46
|
+
|
|
47
|
+
const allowed_page_methods = new Set(['GET', 'HEAD', 'OPTIONS']);
|
|
48
|
+
|
|
45
49
|
/**
|
|
46
50
|
* @param {Request} request
|
|
47
51
|
* @param {import('types').SSROptions} options
|
|
@@ -169,7 +173,8 @@ export async function respond(request, options, manifest, state) {
|
|
|
169
173
|
}
|
|
170
174
|
},
|
|
171
175
|
url,
|
|
172
|
-
isDataRequest: is_data_request
|
|
176
|
+
isDataRequest: is_data_request,
|
|
177
|
+
isSubRequest: state.depth > 0
|
|
173
178
|
};
|
|
174
179
|
|
|
175
180
|
/** @type {import('types').RequiredResolveOptions} */
|
|
@@ -342,7 +347,6 @@ export async function respond(request, options, manifest, state) {
|
|
|
342
347
|
}
|
|
343
348
|
|
|
344
349
|
/**
|
|
345
|
-
*
|
|
346
350
|
* @param {import('@sveltejs/kit').RequestEvent} event
|
|
347
351
|
* @param {import('@sveltejs/kit').ResolveOptions} [opts]
|
|
348
352
|
*/
|
|
@@ -378,6 +382,8 @@ export async function respond(request, options, manifest, state) {
|
|
|
378
382
|
}
|
|
379
383
|
|
|
380
384
|
if (route) {
|
|
385
|
+
const method = /** @type {import('types').HttpMethod} */ (event.request.method);
|
|
386
|
+
|
|
381
387
|
/** @type {Response} */
|
|
382
388
|
let response;
|
|
383
389
|
|
|
@@ -394,13 +400,50 @@ export async function respond(request, options, manifest, state) {
|
|
|
394
400
|
} else if (route.endpoint && (!route.page || is_endpoint_request(event))) {
|
|
395
401
|
response = await render_endpoint(event, await route.endpoint(), state);
|
|
396
402
|
} else if (route.page) {
|
|
397
|
-
|
|
403
|
+
if (page_methods.has(method)) {
|
|
404
|
+
response = await render_page(event, route.page, options, manifest, state, resolve_opts);
|
|
405
|
+
} else {
|
|
406
|
+
const allowed_methods = new Set(allowed_page_methods);
|
|
407
|
+
const node = await manifest._.nodes[route.page.leaf]();
|
|
408
|
+
if (node?.server?.actions) {
|
|
409
|
+
allowed_methods.add('POST');
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
if (method === 'OPTIONS') {
|
|
413
|
+
// This will deny CORS preflight requests implicitly because we don't
|
|
414
|
+
// add the required CORS headers to the response.
|
|
415
|
+
response = new Response(null, {
|
|
416
|
+
status: 204,
|
|
417
|
+
headers: {
|
|
418
|
+
allow: Array.from(allowed_methods.values()).join(', ')
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
} else {
|
|
422
|
+
const mod = [...allowed_methods].reduce((acc, curr) => {
|
|
423
|
+
acc[curr] = true;
|
|
424
|
+
return acc;
|
|
425
|
+
}, /** @type {Record<string, any>} */ ({}));
|
|
426
|
+
response = method_not_allowed(mod, method);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
398
429
|
} else {
|
|
399
430
|
// a route will always have a page or an endpoint, but TypeScript
|
|
400
431
|
// doesn't know that
|
|
401
432
|
throw new Error('This should never happen');
|
|
402
433
|
}
|
|
403
434
|
|
|
435
|
+
// If the route contains a page and an endpoint, we need to add a
|
|
436
|
+
// `Vary: Accept` header to the response because of browser caching
|
|
437
|
+
if (request.method === 'GET' && route.page && route.endpoint) {
|
|
438
|
+
const vary = response.headers
|
|
439
|
+
.get('vary')
|
|
440
|
+
?.split(',')
|
|
441
|
+
?.map((v) => v.trim().toLowerCase());
|
|
442
|
+
if (!(vary?.includes('accept') || vary?.includes('*'))) {
|
|
443
|
+
response.headers.append('Vary', 'Accept');
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
404
447
|
return response;
|
|
405
448
|
}
|
|
406
449
|
|
|
@@ -4,6 +4,7 @@ import { coalesce_to_error } from '../../utils/error.js';
|
|
|
4
4
|
import { negotiate } from '../../utils/http.js';
|
|
5
5
|
import { HttpError } from '../control.js';
|
|
6
6
|
import { fix_stack_trace } from '../shared-server.js';
|
|
7
|
+
import { ENDPOINT_METHODS } from '../../constants.js';
|
|
7
8
|
|
|
8
9
|
/** @param {any} body */
|
|
9
10
|
export function is_pojo(body) {
|
|
@@ -34,9 +35,7 @@ export function method_not_allowed(mod, method) {
|
|
|
34
35
|
|
|
35
36
|
/** @param {Partial<Record<import('types').HttpMethod, any>>} mod */
|
|
36
37
|
export function allowed_methods(mod) {
|
|
37
|
-
const allowed =
|
|
38
|
-
(method) => method in mod
|
|
39
|
-
);
|
|
38
|
+
const allowed = Array.from(ENDPOINT_METHODS).filter((method) => method in mod);
|
|
40
39
|
|
|
41
40
|
if ('GET' in mod || 'HEAD' in mod) allowed.push('HEAD');
|
|
42
41
|
|
package/src/types/internal.d.ts
CHANGED
|
@@ -336,6 +336,7 @@ export interface SSROptions {
|
|
|
336
336
|
track_server_fetches: boolean;
|
|
337
337
|
embedded: boolean;
|
|
338
338
|
env_public_prefix: string;
|
|
339
|
+
env_private_prefix: string;
|
|
339
340
|
hooks: ServerHooks;
|
|
340
341
|
preload_strategy: ValidatedConfig['kit']['output']['preloadStrategy'];
|
|
341
342
|
root: SSRComponent['default'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
This module provides access to runtime environment variables, as defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/master/packages/adapter-node) (or running [`vite preview`](https://kit.svelte.dev/docs/cli)), this is equivalent to `process.env`. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env).
|
|
1
|
+
This module provides access to runtime environment variables, as defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/master/packages/adapter-node) (or running [`vite preview`](https://kit.svelte.dev/docs/cli)), this is equivalent to `process.env`. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://kit.svelte.dev/docs/configuration#env) (if configured).
|
|
2
2
|
|
|
3
3
|
This module cannot be imported into client-side code.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Environment variables [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env`. Like [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), this module cannot be imported into client-side code. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env).
|
|
1
|
+
Environment variables [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env`. Like [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), this module cannot be imported into client-side code. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://kit.svelte.dev/docs/configuration#env) (if configured).
|
|
2
2
|
|
|
3
3
|
_Unlike_ [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), the values exported from this module are statically injected into your bundle at build time, enabling optimisations like dead code elimination.
|
|
4
4
|
|
package/src/utils/env.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {Record<string, string>} env
|
|
3
|
+
* @param {{
|
|
4
|
+
* public_prefix: string;
|
|
5
|
+
* private_prefix: string;
|
|
6
|
+
* }} prefixes
|
|
7
|
+
* @returns {Record<string, string>}
|
|
8
|
+
*/
|
|
9
|
+
export function filter_private_env(env, { public_prefix, private_prefix }) {
|
|
10
|
+
return Object.fromEntries(
|
|
11
|
+
Object.entries(env).filter(
|
|
12
|
+
([k]) =>
|
|
13
|
+
k.startsWith(private_prefix) && (public_prefix === '' || !k.startsWith(public_prefix))
|
|
14
|
+
)
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @param {Record<string, string>} env
|
|
20
|
+
* @param {{
|
|
21
|
+
* public_prefix: string;
|
|
22
|
+
* private_prefix: string;
|
|
23
|
+
* }} prefixes
|
|
24
|
+
* @returns {Record<string, string>}
|
|
25
|
+
*/
|
|
26
|
+
export function filter_public_env(env, { public_prefix, private_prefix }) {
|
|
27
|
+
return Object.fromEntries(
|
|
28
|
+
Object.entries(env).filter(
|
|
29
|
+
([k]) =>
|
|
30
|
+
k.startsWith(public_prefix) && (private_prefix === '' || !k.startsWith(private_prefix))
|
|
31
|
+
)
|
|
32
|
+
);
|
|
33
|
+
}
|
package/src/utils/exports.js
CHANGED
package/src/version.js
ADDED
package/types/index.d.ts
CHANGED
|
@@ -326,6 +326,11 @@ declare module '@sveltejs/kit' {
|
|
|
326
326
|
* @default "PUBLIC_"
|
|
327
327
|
*/
|
|
328
328
|
publicPrefix?: string;
|
|
329
|
+
/**
|
|
330
|
+
* A prefix that signals that an environment variable is unsafe to expose to client-side code. Environment variables matching neither the public nor the private prefix will be discarded completely. See [`$env/static/private`](/docs/modules#$env-static-private) and [`$env/dynamic/private`](/docs/modules#$env-dynamic-private).
|
|
331
|
+
* @default ""
|
|
332
|
+
*/
|
|
333
|
+
privatePrefix?: string;
|
|
329
334
|
};
|
|
330
335
|
/**
|
|
331
336
|
* Where to find various files within your project.
|
|
@@ -403,7 +408,7 @@ declare module '@sveltejs/kit' {
|
|
|
403
408
|
/**
|
|
404
409
|
* SvelteKit will preload the JavaScript modules needed for the initial page to avoid import 'waterfalls', resulting in faster application startup. There
|
|
405
410
|
* are three strategies with different trade-offs:
|
|
406
|
-
* - `modulepreload` - uses `<link rel="modulepreload">`. This delivers the best results in Chromium-based browsers,
|
|
411
|
+
* - `modulepreload` - uses `<link rel="modulepreload">`. This delivers the best results in Chromium-based browsers, in Firefox 115+, and Safari 17+. It is ignored in older browsers.
|
|
407
412
|
* - `preload-js` - uses `<link rel="preload">`. Prevents waterfalls in Chromium and Safari, but Chromium will parse each module twice (once as a script, once as a module). Causes modules to be requested twice in Firefox. This is a good setting if you want to maximise performance for users on iOS devices at the cost of a very slight degradation for Chromium users.
|
|
408
413
|
* - `preload-mjs` - uses `<link rel="preload">` but with the `.mjs` extension which prevents double-parsing in Chromium. Some static webservers will fail to serve .mjs files with a `Content-Type: application/javascript` header, which will cause your application to break. If that doesn't apply to you, this is the option that will deliver the best performance for the largest number of users, until `modulepreload` is more widely supported.
|
|
409
414
|
* @default "modulepreload"
|
|
@@ -775,7 +780,7 @@ declare module '@sveltejs/kit' {
|
|
|
775
780
|
|
|
776
781
|
/**
|
|
777
782
|
* - `enter`: The app has hydrated
|
|
778
|
-
* - `form`: The user submitted a `<form>`
|
|
783
|
+
* - `form`: The user submitted a `<form>` with a GET method
|
|
779
784
|
* - `leave`: The user is leaving the app by closing the tab or using the back/forward buttons to go to a different document
|
|
780
785
|
* - `link`: Navigation was triggered by a link click
|
|
781
786
|
* - `goto`: Navigation was triggered by a `goto(...)` call or a redirect
|
|
@@ -966,6 +971,10 @@ declare module '@sveltejs/kit' {
|
|
|
966
971
|
* related to the data request in this case. Use this property instead if the distinction is important to you.
|
|
967
972
|
*/
|
|
968
973
|
isDataRequest: boolean;
|
|
974
|
+
/**
|
|
975
|
+
* `true` for `+server.js` calls coming from SvelteKit without the overhead of actually making an HTTP request. This happens when you make same-origin `fetch` requests on the server.
|
|
976
|
+
*/
|
|
977
|
+
isSubRequest: boolean;
|
|
969
978
|
}
|
|
970
979
|
|
|
971
980
|
/**
|
|
@@ -1784,6 +1793,7 @@ declare module '@sveltejs/kit' {
|
|
|
1784
1793
|
track_server_fetches: boolean;
|
|
1785
1794
|
embedded: boolean;
|
|
1786
1795
|
env_public_prefix: string;
|
|
1796
|
+
env_private_prefix: string;
|
|
1787
1797
|
hooks: ServerHooks;
|
|
1788
1798
|
preload_strategy: ValidatedConfig['kit']['output']['preloadStrategy'];
|
|
1789
1799
|
root: SSRComponent['default'];
|
|
@@ -1894,6 +1904,7 @@ declare module '@sveltejs/kit' {
|
|
|
1894
1904
|
* ```
|
|
1895
1905
|
* */
|
|
1896
1906
|
export function resolvePath(id: string, params: Record<string, string | undefined>): string;
|
|
1907
|
+
export const VERSION: string;
|
|
1897
1908
|
}
|
|
1898
1909
|
|
|
1899
1910
|
declare module '@sveltejs/kit/hooks' {
|
package/types/index.d.ts.map
CHANGED
|
@@ -108,6 +108,7 @@
|
|
|
108
108
|
"text",
|
|
109
109
|
"fail",
|
|
110
110
|
"resolvePath",
|
|
111
|
+
"VERSION",
|
|
111
112
|
"sequence",
|
|
112
113
|
"getRequest",
|
|
113
114
|
"setResponse",
|
|
@@ -137,6 +138,7 @@
|
|
|
137
138
|
"../src/types/private.d.ts",
|
|
138
139
|
"../src/types/internal.d.ts",
|
|
139
140
|
"../src/exports/index.js",
|
|
141
|
+
"../src/version.js",
|
|
140
142
|
"../src/exports/hooks/sequence.js",
|
|
141
143
|
"../src/exports/node/index.js",
|
|
142
144
|
"../src/exports/node/polyfills.js",
|
|
@@ -159,7 +161,8 @@
|
|
|
159
161
|
null,
|
|
160
162
|
null,
|
|
161
163
|
null,
|
|
164
|
+
null,
|
|
162
165
|
null
|
|
163
166
|
],
|
|
164
|
-
"mappings": ";;;;;;;;;;;kBA6BiBA,OAAOA;;;;;;;;;;;;;;;;;;;;;aAsBZC,iBAAiBA;;;;;aAKjBC,cAAcA;;;;;;;;;;;;;;;;;;;;;;;kBAuBTC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAuFPC,MAAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA6BNC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiDPC,SAASA
|
|
167
|
+
"mappings": ";;;;;;;;;;;kBA6BiBA,OAAOA;;;;;;;;;;;;;;;;;;;;;aAsBZC,iBAAiBA;;;;;aAKjBC,cAAcA;;;;;;;;;;;;;;;;;;;;;;;kBAuBTC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAuFPC,MAAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA6BNC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiDPC,SAASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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