@sveltejs/kit 1.0.0-next.350 → 1.0.0-next.353
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/assets/client/start.js +11 -12
- package/assets/server/index.js +10 -1
- package/dist/chunks/error.js +673 -0
- package/dist/chunks/index.js +15519 -1138
- package/dist/chunks/index2.js +177 -101
- package/dist/chunks/sync.js +180 -9
- package/dist/chunks/write_tsconfig.js +108 -3
- package/dist/cli.js +45 -830
- package/dist/vite.js +3009 -0
- package/package.json +5 -2
- package/dist/chunks/constants.js +0 -663
- package/dist/chunks/filesystem.js +0 -110
- package/dist/chunks/index3.js +0 -183
- package/dist/chunks/index4.js +0 -215
- package/dist/chunks/index5.js +0 -15748
- package/dist/chunks/misc.js +0 -78
- package/dist/chunks/object.js +0 -83
- package/dist/chunks/plugin.js +0 -555
package/assets/client/start.js
CHANGED
|
@@ -110,6 +110,15 @@ function normalize_path(path, trailing_slash) {
|
|
|
110
110
|
return path;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
class LoadURL extends URL {
|
|
114
|
+
/** @returns {string} */
|
|
115
|
+
get hash() {
|
|
116
|
+
throw new Error(
|
|
117
|
+
'url.hash is inaccessible from load. Consider accessing hash from the page store within the script tag of your component.'
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
113
122
|
/** @param {HTMLDocument} doc */
|
|
114
123
|
function get_base_uri(doc) {
|
|
115
124
|
let baseURI = doc.baseURI;
|
|
@@ -939,6 +948,7 @@ function create_client({ target, session, base, trailing_slash }) {
|
|
|
939
948
|
}
|
|
940
949
|
|
|
941
950
|
const session = $session;
|
|
951
|
+
const load_url = new LoadURL(url);
|
|
942
952
|
|
|
943
953
|
if (module.load) {
|
|
944
954
|
/** @type {import('types').LoadEvent} */
|
|
@@ -948,18 +958,7 @@ function create_client({ target, session, base, trailing_slash }) {
|
|
|
948
958
|
props: props || {},
|
|
949
959
|
get url() {
|
|
950
960
|
node.uses.url = true;
|
|
951
|
-
|
|
952
|
-
return new Proxy(url, {
|
|
953
|
-
get: (target, property) => {
|
|
954
|
-
if (property === 'hash') {
|
|
955
|
-
throw new Error(
|
|
956
|
-
'url.hash is inaccessible from load. Consider accessing hash from the page store within the script tag of your component.'
|
|
957
|
-
);
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
return Reflect.get(target, property, target);
|
|
961
|
-
}
|
|
962
|
-
});
|
|
961
|
+
return load_url;
|
|
963
962
|
},
|
|
964
963
|
get session() {
|
|
965
964
|
node.uses.session = true;
|
package/assets/server/index.js
CHANGED
|
@@ -2001,6 +2001,15 @@ function normalize_path(path, trailing_slash) {
|
|
|
2001
2001
|
return path;
|
|
2002
2002
|
}
|
|
2003
2003
|
|
|
2004
|
+
class LoadURL extends URL {
|
|
2005
|
+
/** @returns {string} */
|
|
2006
|
+
get hash() {
|
|
2007
|
+
throw new Error(
|
|
2008
|
+
'url.hash is inaccessible from load. Consider accessing hash from the page store within the script tag of your component.'
|
|
2009
|
+
);
|
|
2010
|
+
}
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2004
2013
|
/**
|
|
2005
2014
|
* @param {string} hostname
|
|
2006
2015
|
* @param {string} [constraint]
|
|
@@ -2103,7 +2112,7 @@ async function load_node({
|
|
|
2103
2112
|
} else if (module.load) {
|
|
2104
2113
|
/** @type {import('types').LoadEvent} */
|
|
2105
2114
|
const load_input = {
|
|
2106
|
-
url: state.prerendering ? create_prerendering_url_proxy(event.url) : event.url,
|
|
2115
|
+
url: state.prerendering ? create_prerendering_url_proxy(event.url) : new LoadURL(event.url),
|
|
2107
2116
|
params: event.params,
|
|
2108
2117
|
props: shadow.body || {},
|
|
2109
2118
|
routeId: event.routeId,
|