one 1.1.281 → 1.1.282
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/cleanUrl.js +1 -1
- package/dist/cjs/cleanUrl.js.map +1 -1
- package/dist/cjs/cleanUrl.native.js +1 -1
- package/dist/cjs/cleanUrl.native.js.map +1 -1
- package/dist/cjs/createHandleRequest.js +1 -1
- package/dist/cjs/createHandleRequest.js.map +1 -1
- package/dist/cjs/createHandleRequest.native.js +1 -1
- package/dist/cjs/createHandleRequest.native.js.map +1 -1
- package/dist/esm/cleanUrl.js +1 -1
- package/dist/esm/cleanUrl.js.map +1 -1
- package/dist/esm/cleanUrl.mjs +1 -1
- package/dist/esm/cleanUrl.mjs.map +1 -1
- package/dist/esm/cleanUrl.native.js +1 -1
- package/dist/esm/cleanUrl.native.js.map +1 -1
- package/dist/esm/createHandleRequest.js +1 -1
- package/dist/esm/createHandleRequest.js.map +1 -1
- package/dist/esm/createHandleRequest.mjs +1 -1
- package/dist/esm/createHandleRequest.mjs.map +1 -1
- package/dist/esm/createHandleRequest.native.js +1 -1
- package/dist/esm/createHandleRequest.native.js.map +1 -1
- package/package.json +5 -5
- package/src/cleanUrl.ts +1 -1
- package/src/createHandleRequest.ts +5 -1
- package/types/createHandleRequest.d.ts.map +1 -1
package/dist/cjs/cleanUrl.js
CHANGED
@@ -23,7 +23,7 @@ var import_constants = require("./router/constants"), import_removeSearch = requ
|
|
23
23
|
function cleanUrl(path) {
|
24
24
|
return (0, import_removeSearch.removeSearch)(path).replaceAll("/", "_").replace(/_$/, "");
|
25
25
|
}
|
26
|
-
const clientSideSearch = typeof window < "u" ?
|
26
|
+
const clientSideSearch = typeof window < "u" ? `?cache=${import_constants.CACHE_KEY}` : "", clientSideURL = typeof window < "u" ? import_constants.CLIENT_BASE_URL : "";
|
27
27
|
function getPreloadPath(currentPath) {
|
28
28
|
return `${clientSideURL}/assets/${cleanUrl(currentPath.slice(1))}_preload.js${clientSideSearch}`;
|
29
29
|
}
|
package/dist/cjs/cleanUrl.js.map
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/cleanUrl.ts"],
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAA2C,+BAC3C,sBAA6B;AAEtB,SAAS,SAAS,MAAc;AACrC,aACE,kCAAa,IAAI,EACd,WAAW,KAAK,GAAG,EAEnB,QAAQ,MAAM,EAAE;AAEvB;AAEA,MAAM,mBAAmB,OAAO,SAAW,MAAc,
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAA2C,+BAC3C,sBAA6B;AAEtB,SAAS,SAAS,MAAc;AACrC,aACE,kCAAa,IAAI,EACd,WAAW,KAAK,GAAG,EAEnB,QAAQ,MAAM,EAAE;AAEvB;AAEA,MAAM,mBAAmB,OAAO,SAAW,MAAc,UAAU,0BAAS,KAAK,IAC3E,gBAAgB,OAAO,SAAW,MAAc,mCAAkB;AAEjE,SAAS,eAAe,aAAqB;AAClD,SAAO,GAAG,aAAa,WAAW,SAAS,YAAY,MAAM,CAAC,CAAC,CAAC,cAAc,gBAAgB;AAChG;AAEO,SAAS,cAAc,aAAqB;AACjD,SAAO,GAAG,aAAa,WAAW,SAAS,YAAY,MAAM,CAAC,CAAC,CAAC,kBAAkB,gBAAgB;AACpG;",
|
5
5
|
"names": []
|
6
6
|
}
|
@@ -24,7 +24,7 @@ var import_constants = require("./router/constants"), import_removeSearch = requ
|
|
24
24
|
function cleanUrl(path) {
|
25
25
|
return (0, import_removeSearch.removeSearch)(path).replaceAll("/", "_").replace(/_$/, "");
|
26
26
|
}
|
27
|
-
var clientSideSearch = typeof window < "u" ?
|
27
|
+
var clientSideSearch = typeof window < "u" ? `?cache=${import_constants.CACHE_KEY}` : "", clientSideURL = typeof window < "u" ? import_constants.CLIENT_BASE_URL : "";
|
28
28
|
function getPreloadPath(currentPath) {
|
29
29
|
return `${clientSideURL}/assets/${cleanUrl(currentPath.slice(1))}_preload.js${clientSideSearch}`;
|
30
30
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/Users/n8/vxrn/packages/one/src/cleanUrl.ts"],
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;;;;;;;uBAA2C,+BAC3C,sBAA6B;AAEtB,SAASA,SAASC,MAAY;AACnC,aACEC,kCAAaD,IAAAA,EACVE,WAAW,KAAK,GAAA,EAEhBC,QAAQ,MAAM,EAAA;AAErB;AAEA,IAAMC,mBAAmB,OAAOC,SAAW,MAAc,
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;;;;;;;uBAA2C,+BAC3C,sBAA6B;AAEtB,SAASA,SAASC,MAAY;AACnC,aACEC,kCAAaD,IAAAA,EACVE,WAAW,KAAK,GAAA,EAEhBC,QAAQ,MAAM,EAAA;AAErB;AAEA,IAAMC,mBAAmB,OAAOC,SAAW,MAAc,UAAUC,0BAAAA,KAAc,IAC3EC,gBAAgB,OAAOF,SAAW,MAAcG,mCAAkB;AAEjE,SAASC,eAAeC,aAAmB;AAChD,SAAO,GAAGH,aAAAA,WAAwBR,SAASW,YAAYC,MAAM,CAAA,CAAA,CAAA,cAAiBP,gBAAAA;AAChF;AAEO,SAASQ,cAAcF,aAAmB;AAC/C,SAAO,GAAGH,aAAAA,WAAwBR,SAASW,YAAYC,MAAM,CAAA,CAAA,CAAA,kBAAqBP,gBAAAA;AACpF;",
|
5
5
|
"names": ["cleanUrl", "path", "removeSearch", "replaceAll", "replace", "clientSideSearch", "window", "CACHE_KEY", "clientSideURL", "CLIENT_BASE_URL", "getPreloadPath", "currentPath", "slice", "getLoaderPath"]
|
6
6
|
}
|
@@ -64,7 +64,7 @@ function createHandleRequest(options, handlers) {
|
|
64
64
|
if (request.method !== "GET")
|
65
65
|
return null;
|
66
66
|
if (handlers.handleLoader && pathname.endsWith("_vxrn_loader.js")) {
|
67
|
-
const originalUrl = pathname.replace("_vxrn_loader.js", "").replace(/^\/assets/, ""), finalUrl = new URL(originalUrl, url.origin);
|
67
|
+
const originalUrl = pathname.replace("_vxrn_loader.js", "").replace(/^\/assets/, "").replace("_", "/"), finalUrl = new URL(originalUrl, url.origin);
|
68
68
|
for (const route of pageRoutes) {
|
69
69
|
if (!route.workingRegex.test(finalUrl.pathname))
|
70
70
|
continue;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/createHandleRequest.ts"],
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,wBAA2B,+BAC3B,8BAAqC,yCACrC,qBAA4B;AAH5B;AAeO,SAAS,oBACd,SACA,UAKA;AACA,MAAI,YAAY;AACd,UAAM,IAAI,MAAM,mDAAmD;AAGrE,QAAM,eAAW,gCAAY;AAC7B,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,oBAAoB;AAGtC,QAAM,eACJ,SAAS,UAAU,OAAO,CAAC,KAAK,SAC9B,IAAI,IAAI,IAAI,IAAI,EAAE,GAAG,KAAK,eAAe,IAAI,OAAO,IAAI,UAAU,EAAE,GAC7D,MACN,CAAC,CAAC,GAED,gBAAgB,OAAO,OAAO,YAAY,GAK1C,iBAAiB,CAAC,GAGlB,aAAa,SAAS,WAAW,IAAI,CAAC,WAAW;AAAA,IACrD,GAAG;AAAA,IACH,cAAc,IAAI,OAAO,MAAM,UAAU;AAAA,EAC3C,EAAE;AAEF,SAAO;AAAA,IACL;AAAA,IACA,SAAS,eAA6B,SAAmD;AACvF,YAAM,YAAY,QAAQ,OAAO,IAC3B,MAAM,IAAI;AAAA,QACd,aAAa;AAAA,QACb,QAAQ,QAAQ,IAAI,MAAM,IAAI,UAAU,QAAQ,QAAQ,IAAI,MAAM,CAAC,KAAK;AAAA,MAC1E,GACM,EAAE,UAAU,OAAO,IAAI;AAE7B,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AK,OAAO,QAAQ,MAAM,MAAM,GAAG;AACvD,YAAM,WAAW,OAAO,UAAU,GAAG;AACrC,aAAO,QAAQ,IAAI;AAAA,IACrB;AAEF,SAAO;AACT;AAGA,SAAS,eAAe,UAAkB,OAA0B;AAElE,QAAM,QADQ,IAAI,OAAO,MAAM,UAAU,EACrB,KAAK,QAAQ;AACjC,SAAK,QACE,OAAO;AAAA,IACZ,OAAO,QAAQ,MAAM,SAAS,EAAE,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,OAAO,MAAM,SAAS,GAAG,CAAC,CAAC;AAAA,EACpF,IAHmB,CAAC;AAItB;",
|
5
5
|
"names": []
|
6
6
|
}
|
@@ -74,7 +74,7 @@ function createHandleRequest(options, handlers) {
|
|
74
74
|
if (handlers.handleLoader) {
|
75
75
|
var isClientRequestingNewRoute = pathname.endsWith("_vxrn_loader.js");
|
76
76
|
if (isClientRequestingNewRoute) {
|
77
|
-
var originalUrl = pathname.replace("_vxrn_loader.js", "").replace(/^\/assets/, ""), finalUrl = new URL(originalUrl, url.origin), _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
77
|
+
var originalUrl = pathname.replace("_vxrn_loader.js", "").replace(/^\/assets/, "").replace("_", "/"), finalUrl = new URL(originalUrl, url.origin), _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
78
78
|
try {
|
79
79
|
for (var _iterator = pageRoutes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
80
80
|
var route = _step.value;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/Users/n8/vxrn/packages/one/src/createHandleRequest.ts"],
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AACA;;;;;wBAA2B,+BAC3B,8BAAqC,yCACrC,qBAA4B;AAF5B;AAcO,SAASA,oBACdC,SACAC,UAIC;AAED,MAAI,Y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AiC,CAAC,GAClC6B,QAAQ,IAAIxD,OAAOuD,OAAO9C,YAAY,EAAEgD,KAAK5C,IAAII,QAAQ;AAC/D,MAAIuC,SAAAA,QAAAA,MAAOE,QAAQ;QACZ,4BAAA,IAAA,oBAAA,IAAA,iBAAA;;AAAL,eAAK,YAAsBvD,OAAOwD,QAAQH,MAAME,MAAM,EAAA,OAAA,QAAA,EAAA,GAAjD,OAAA,EAAA,6BAAA,QAAA,UAAA,KAAA,GAAA,OAAA,4BAAA,IAAoD;AAApD,YAAM,CAACE,KAAKC,KAAAA,IAAZ,MAAA,OACGC,WAAWP,OAAOQ,UAAUH,GAAAA;AAClCjC,eAAOmC,QAAAA,IAAYD;MACrB;;AAHK,0BAAA,IAAA,iBAAA;;;SAAA,6BAAA,UAAA,UAAA,QAAA,UAAA,OAAA;;YAAA;gBAAA;;;EAIP;AACA,SAAOlC;AACT;AAGA,SAASC,eAAeX,UAAkBT,OAAwB;AAChE,MAAMiB,QAAQ,IAAIzB,OAAOQ,MAAMP,UAAU,GACnCuD,QAAQ/B,MAAMgC,KAAKxC,QAAAA;AACzB,SAAKuC,QACErD,OAAO6D,YACZ7D,OAAOwD,QAAQnD,MAAMuD,SAAS,EAAExD,IAAI,SAAA,OAAA;QAAC,CAACqD,KAAKC,KAAAA,IAAM,OAAaL;WAAR;MAACK;OAAOL,gBAAAA,MAAME,YAAM,QAAZF,kBAAAA,SAAAA,SAAAA,cAAeI,GAAAA;;QAF5D,CAAC;AAItB;",
|
5
5
|
"names": ["createHandleRequest", "options", "handlers", "env", "Error", "manifest", "getManifest", "apiRoutesMap", "apiRoutes", "reduce", "acc", "cur", "page", "compiledRegex", "RegExp", "namedRegex", "apiRoutesList", "Object", "values", "activeRequests", "pageRoutes", "map", "route", "workingRegex", "handler", "request", "urlString", "url", "URL", "headers", "get", "pathname", "search", "process", "NODE_ENV", "startsWith", "handleAPI", "apiRoute", "find", "regex", "test", "params", "getRouteParams", "loaderProps", "path", "err", "isResponse", "method", "handleLoader", "isClientRequestingNewRoute", "endsWith", "originalUrl", "replace", "finalUrl", "origin", "Headers", "set", "loaderResponse", "getLoaderParams", "Response", "console", "error", "routes", "handleSSR", "promise", "reject", "resolve", "promiseWithResolvers", "ssrResponse", "config", "match", "exec", "groups", "entries", "key", "value", "namedKey", "routeKeys", "fromEntries"]
|
6
6
|
}
|
package/dist/esm/cleanUrl.js
CHANGED
@@ -3,7 +3,7 @@ import { removeSearch } from "./utils/removeSearch";
|
|
3
3
|
function cleanUrl(path) {
|
4
4
|
return removeSearch(path).replaceAll("/", "_").replace(/_$/, "");
|
5
5
|
}
|
6
|
-
const clientSideSearch = typeof window < "u" ?
|
6
|
+
const clientSideSearch = typeof window < "u" ? `?cache=${CACHE_KEY}` : "", clientSideURL = typeof window < "u" ? CLIENT_BASE_URL : "";
|
7
7
|
function getPreloadPath(currentPath) {
|
8
8
|
return `${clientSideURL}/assets/${cleanUrl(currentPath.slice(1))}_preload.js${clientSideSearch}`;
|
9
9
|
}
|
package/dist/esm/cleanUrl.js.map
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/cleanUrl.ts"],
|
4
|
-
"mappings": "AAAA,SAAS,WAAW,uBAAuB;AAC3C,SAAS,oBAAoB;AAEtB,SAAS,SAAS,MAAc;AACrC,SACE,aAAa,IAAI,EACd,WAAW,KAAK,GAAG,EAEnB,QAAQ,MAAM,EAAE;AAEvB;AAEA,MAAM,mBAAmB,OAAO,SAAW,MAAc,
|
4
|
+
"mappings": "AAAA,SAAS,WAAW,uBAAuB;AAC3C,SAAS,oBAAoB;AAEtB,SAAS,SAAS,MAAc;AACrC,SACE,aAAa,IAAI,EACd,WAAW,KAAK,GAAG,EAEnB,QAAQ,MAAM,EAAE;AAEvB;AAEA,MAAM,mBAAmB,OAAO,SAAW,MAAc,UAAU,SAAS,KAAK,IAC3E,gBAAgB,OAAO,SAAW,MAAc,kBAAkB;AAEjE,SAAS,eAAe,aAAqB;AAClD,SAAO,GAAG,aAAa,WAAW,SAAS,YAAY,MAAM,CAAC,CAAC,CAAC,cAAc,gBAAgB;AAChG;AAEO,SAAS,cAAc,aAAqB;AACjD,SAAO,GAAG,aAAa,WAAW,SAAS,YAAY,MAAM,CAAC,CAAC,CAAC,kBAAkB,gBAAgB;AACpG;",
|
5
5
|
"names": []
|
6
6
|
}
|
package/dist/esm/cleanUrl.mjs
CHANGED
@@ -3,7 +3,7 @@ import { removeSearch } from "./utils/removeSearch.mjs";
|
|
3
3
|
function cleanUrl(path) {
|
4
4
|
return removeSearch(path).replaceAll("/", "_").replace(/_$/, "");
|
5
5
|
}
|
6
|
-
const clientSideSearch = typeof window < "u" ?
|
6
|
+
const clientSideSearch = typeof window < "u" ? `?cache=${CACHE_KEY}` : "",
|
7
7
|
clientSideURL = typeof window < "u" ? CLIENT_BASE_URL : "";
|
8
8
|
function getPreloadPath(currentPath) {
|
9
9
|
return `${clientSideURL}/assets/${cleanUrl(currentPath.slice(1))}_preload.js${clientSideSearch}`;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["CACHE_KEY","CLIENT_BASE_URL","removeSearch","cleanUrl","path","replaceAll","replace","clientSideSearch","window","clientSideURL","getPreloadPath","currentPath","slice","getLoaderPath"],"sources":["../../src/cleanUrl.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,SAAA,EAAWC,eAAA,QAAuB;AAC3C,SAASC,YAAA,QAAoB;AAEtB,SAASC,SAASC,IAAA,EAAc;EACrC,OACEF,YAAA,CAAaE,IAAI,EACdC,UAAA,CAAW,KAAK,GAAG,EAEnBC,OAAA,CAAQ,MAAM,EAAE;AAEvB;AAEA,MAAMC,gBAAA,GAAmB,OAAOC,MAAA,GAAW,MAAc,
|
1
|
+
{"version":3,"names":["CACHE_KEY","CLIENT_BASE_URL","removeSearch","cleanUrl","path","replaceAll","replace","clientSideSearch","window","clientSideURL","getPreloadPath","currentPath","slice","getLoaderPath"],"sources":["../../src/cleanUrl.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,SAAA,EAAWC,eAAA,QAAuB;AAC3C,SAASC,YAAA,QAAoB;AAEtB,SAASC,SAASC,IAAA,EAAc;EACrC,OACEF,YAAA,CAAaE,IAAI,EACdC,UAAA,CAAW,KAAK,GAAG,EAEnBC,OAAA,CAAQ,MAAM,EAAE;AAEvB;AAEA,MAAMC,gBAAA,GAAmB,OAAOC,MAAA,GAAW,MAAc,UAAUR,SAAS,KAAK;EAC3ES,aAAA,GAAgB,OAAOD,MAAA,GAAW,MAAcP,eAAA,GAAkB;AAEjE,SAASS,eAAeC,WAAA,EAAqB;EAClD,OAAO,GAAGF,aAAa,WAAWN,QAAA,CAASQ,WAAA,CAAYC,KAAA,CAAM,CAAC,CAAC,CAAC,cAAcL,gBAAgB;AAChG;AAEO,SAASM,cAAcF,WAAA,EAAqB;EACjD,OAAO,GAAGF,aAAa,WAAWN,QAAA,CAASQ,WAAA,CAAYC,KAAA,CAAM,CAAC,CAAC,CAAC,kBAAkBL,gBAAgB;AACpG","ignoreList":[]}
|
@@ -3,7 +3,7 @@ import { removeSearch } from "./utils/removeSearch.native.js";
|
|
3
3
|
function cleanUrl(path) {
|
4
4
|
return removeSearch(path).replaceAll("/", "_").replace(/_$/, "");
|
5
5
|
}
|
6
|
-
var clientSideSearch = typeof window < "u" ?
|
6
|
+
var clientSideSearch = typeof window < "u" ? `?cache=${CACHE_KEY}` : "",
|
7
7
|
clientSideURL = typeof window < "u" ? CLIENT_BASE_URL : "";
|
8
8
|
function getPreloadPath(currentPath) {
|
9
9
|
return `${clientSideURL}/assets/${cleanUrl(currentPath.slice(1))}_preload.js${clientSideSearch}`;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["CACHE_KEY","CLIENT_BASE_URL","removeSearch","cleanUrl","path","replaceAll","replace","clientSideSearch","window","clientSideURL","getPreloadPath","currentPath","slice","getLoaderPath"],"sources":["../../src/cleanUrl.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,SAAA,EAAWC,eAAA,QAAuB;AAC3C,SAASC,YAAA,QAAoB;AAEtB,SAASC,SAASC,IAAA,EAAc;EACrC,OACEF,YAAA,CAAaE,IAAI,EACdC,UAAA,CAAW,KAAK,GAAG,EAEnBC,OAAA,CAAQ,MAAM,EAAE;AAEvB;AAEA,IAAAC,gBAAM,UAAmBC,MAAO,MAAW,
|
1
|
+
{"version":3,"names":["CACHE_KEY","CLIENT_BASE_URL","removeSearch","cleanUrl","path","replaceAll","replace","clientSideSearch","window","clientSideURL","getPreloadPath","currentPath","slice","getLoaderPath"],"sources":["../../src/cleanUrl.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,SAAA,EAAWC,eAAA,QAAuB;AAC3C,SAASC,YAAA,QAAoB;AAEtB,SAASC,SAASC,IAAA,EAAc;EACrC,OACEF,YAAA,CAAaE,IAAI,EACdC,UAAA,CAAW,KAAK,GAAG,EAEnBC,OAAA,CAAQ,MAAM,EAAE;AAEvB;AAEA,IAAAC,gBAAM,UAAmBC,MAAO,MAAW,aAAcR,SAAU,EAAS,KAAK;EAAAS,aAC3E,UAAgBD,MAAO,MAAW,GAAAP,eAAc,KAAkB;AAEjE,SAASS,eAAeC,WAAA,EAAqB;EAClD,OAAO,GAAGF,aAAa,WAAWN,QAAA,CAASQ,WAAA,CAAYC,KAAA,CAAM,CAAC,CAAC,CAAC,cAAcL,gBAAgB;AAChG;AAEO,SAASM,cAAcF,WAAA,EAAqB;EACjD,OAAO,GAAGF,aAAa,WAAWN,QAAA,CAASQ,WAAA,CAAYC,KAAA,CAAM,CAAC,CAAC,CAAC,kBAAkBL,gBAAgB;AACpG","ignoreList":[]}
|
@@ -46,7 +46,7 @@ function createHandleRequest(options, handlers) {
|
|
46
46
|
if (request.method !== "GET")
|
47
47
|
return null;
|
48
48
|
if (handlers.handleLoader && pathname.endsWith("_vxrn_loader.js")) {
|
49
|
-
const originalUrl = pathname.replace("_vxrn_loader.js", "").replace(/^\/assets/, ""), finalUrl = new URL(originalUrl, url.origin);
|
49
|
+
const originalUrl = pathname.replace("_vxrn_loader.js", "").replace(/^\/assets/, "").replace("_", "/"), finalUrl = new URL(originalUrl, url.origin);
|
50
50
|
for (const route of pageRoutes) {
|
51
51
|
if (!route.workingRegex.test(finalUrl.pathname))
|
52
52
|
continue;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/createHandleRequest.ts"],
|
4
|
-
"mappings": "AACA,SAAS,kBAAkB;AAC3B,SAAS,4BAA4B;AACrC,SAAS,mBAAmB;AAYrB,SAAS,oBACd,SACA,UAKA;AACA,MAAI,YAAY;AACd,UAAM,IAAI,MAAM,mDAAmD;AAGrE,QAAM,WAAW,YAAY;AAC7B,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,oBAAoB;AAGtC,QAAM,eACJ,SAAS,UAAU,OAAO,CAAC,KAAK,SAC9B,IAAI,IAAI,IAAI,IAAI,EAAE,GAAG,KAAK,eAAe,IAAI,OAAO,IAAI,UAAU,EAAE,GAC7D,MACN,CAAC,CAAC,GAED,gBAAgB,OAAO,OAAO,YAAY,GAK1C,iBAAiB,CAAC,GAGlB,aAAa,SAAS,WAAW,IAAI,CAAC,WAAW;AAAA,IACrD,GAAG;AAAA,IACH,cAAc,IAAI,OAAO,MAAM,UAAU;AAAA,EAC3C,EAAE;AAEF,SAAO;AAAA,IACL;AAAA,IACA,SAAS,eAA6B,SAAmD;AACvF,YAAM,YAAY,QAAQ,OAAO,IAC3B,MAAM,IAAI;AAAA,QACd,aAAa;AAAA,QACb,QAAQ,QAAQ,IAAI,MAAM,IAAI,UAAU,QAAQ,QAAQ,IAAI,MAAM,CAAC,KAAK;AAAA,MAC1E,GACM,EAAE,UAAU,OAAO,IAAI;AAE7B,UAAI,QAAQ,IAAI,aAAa,gBACvB,eAAe,QAAQ;AACzB,eAAO,MAAM,eAAe,QAAQ;AAIxC,UAAI,aAAa,gBAAgB,SAAS,WAAW,IAAI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QAAM,QADQ,IAAI,OAAO,MAAM,UAAU,EACrB,KAAK,QAAQ;AACjC,SAAK,QACE,OAAO;AAAA,IACZ,OAAO,QAAQ,MAAM,SAAS,EAAE,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,OAAO,MAAM,SAAS,GAAG,CAAC,CAAC;AAAA,EACpF,IAHmB,CAAC;AAItB;",
|
5
5
|
"names": []
|
6
6
|
}
|
@@ -48,7 +48,7 @@ function createHandleRequest(options, handlers) {
|
|
48
48
|
}
|
49
49
|
if (request.method !== "GET") return null;
|
50
50
|
if (handlers.handleLoader && pathname.endsWith("_vxrn_loader.js")) {
|
51
|
-
const originalUrl = pathname.replace("_vxrn_loader.js", "").replace(/^\/assets/, ""),
|
51
|
+
const originalUrl = pathname.replace("_vxrn_loader.js", "").replace(/^\/assets/, "").replace("_", "/"),
|
52
52
|
finalUrl = new URL(originalUrl, url.origin);
|
53
53
|
for (const route of pageRoutes) {
|
54
54
|
if (!route.workingRegex.test(finalUrl.pathname)) continue;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["isResponse","promiseWithResolvers","getManifest","createHandleRequest","options","handlers","import","meta","env","Error","manifest","apiRoutesMap","apiRoutes","reduce","acc","cur","page","compiledRegex","RegExp","namedRegex","apiRoutesList","Object","values","activeRequests","pageRoutes","map","route","workingRegex","handler","request","urlString","url","URL","headers","get","pathname","search","process","NODE_ENV","startsWith","handleAPI","apiRoute","find","test","params","getRouteParams","loaderProps","path","err","method","handleLoader","endsWith","originalUrl","replace","finalUrl","origin","Headers","set","loaderResponse","getLoaderParams","Response","console","error","routes","handleSSR","promise","reject","resolve","ssrResponse","config","match","exec","groups","key","value","entries","namedKey","routeKeys","fromEntries"],"sources":["../../src/createHandleRequest.ts"],"sourcesContent":[null],"mappings":"AACA,SAASA,UAAA,QAAkB;AAC3B,SAASC,oBAAA,QAA4B;AACrC,SAASC,WAAA,QAAmB;AAYrB,SAASC,oBACdC,OAAA,EACAC,QAAA,EAKA;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MAGT,IAAIlC,QAAA,CAASmC,SAAA,EAAW;QACtB,MAAMC,QAAA,GAAWrB,aAAA,CAAcsB,IAAA,CAAMhB,KAAA,IACrBA,KAAA,CAAMT,aAAA,CACP0B,IAAA,CAAKR,QAAQ,CAC3B;QAED,IAAIM,QAAA,EAAU;UACZ,MAAMG,MAAA,GAASC,cAAA,CAAeV,QAAA,EAAUM,QAAQ;UAEhD,IAAI;YACF,OAAO,MAAMpC,QAAA,CAASmC,SAAA,CAAU;cAC9BX,OAAA;cACAH,KAAA,EAAOe,QAAA;cACPV,GAAA;cACAe,WAAA,EAAa;gBACXC,IAAA,EAAMZ,QAAA;gBACNS;cACF;YACF,CAAC;UACH,SAASI,GAAA,EAAK;YACZ,IAAIhD,UAAA,CAAWgD,GAAG,GAChB,OAAOA,GAAA;YAET,MAAMA,GAAA;UACR;QACF;MACF;MAEA,IAAInB,OAAA,CAAQoB,MAAA,KAAW,OACrB,OAAO;MAGT,IAAI5C,QAAA,CAAS6C,YAAA,IACwBf,QAAA,CAASgB,QAAA,CAAS,iBAAiB,GAEtC;QAC9B,MAAMC,WAAA,GAAcjB,QAAA,
|
1
|
+
{"version":3,"names":["isResponse","promiseWithResolvers","getManifest","createHandleRequest","options","handlers","import","meta","env","Error","manifest","apiRoutesMap","apiRoutes","reduce","acc","cur","page","compiledRegex","RegExp","namedRegex","apiRoutesList","Object","values","activeRequests","pageRoutes","map","route","workingRegex","handler","request","urlString","url","URL","headers","get","pathname","search","process","NODE_ENV","startsWith","handleAPI","apiRoute","find","test","params","getRouteParams","loaderProps","path","err","method","handleLoader","endsWith","originalUrl","replace","finalUrl","origin","Headers","set","loaderResponse","getLoaderParams","Response","console","error","routes","handleSSR","promise","reject","resolve","ssrResponse","config","match","exec","groups","key","value","entries","namedKey","routeKeys","fromEntries"],"sources":["../../src/createHandleRequest.ts"],"sourcesContent":[null],"mappings":"AACA,SAASA,UAAA,QAAkB;AAC3B,SAASC,oBAAA,QAA4B;AACrC,SAASC,WAAA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EA,OAAO;IACT;EACF;AACF;AAEA,SAASwB,gBACP5B,GAAA,EACAsC,MAAA,EACA;EACA,MAAMzB,MAAA,GAAiC,CAAC;IAClC0B,KAAA,GAAQ,IAAIpD,MAAA,CAAOmD,MAAA,CAAO1C,YAAY,EAAE4C,IAAA,CAAKxC,GAAA,CAAII,QAAQ;EAC/D,IAAImC,KAAA,EAAOE,MAAA,EACT,WAAW,CAACC,GAAA,EAAKC,KAAK,KAAKrD,MAAA,CAAOsD,OAAA,CAAQL,KAAA,CAAME,MAAM,GAAG;IACvD,MAAMI,QAAA,GAAWP,MAAA,CAAOQ,SAAA,CAAUJ,GAAG;IACrC7B,MAAA,CAAOgC,QAAQ,IAAIF,KAAA;EACrB;EAEF,OAAO9B,MAAA;AACT;AAGA,SAASC,eAAeV,QAAA,EAAkBT,KAAA,EAA0B;EAElE,MAAM4C,KAAA,GADQ,IAAIpD,MAAA,CAAOQ,KAAA,CAAMP,UAAU,EACrBoD,IAAA,CAAKpC,QAAQ;EACjC,OAAKmC,KAAA,GACEjD,MAAA,CAAOyD,WAAA,CACZzD,MAAA,CAAOsD,OAAA,CAAQjD,KAAA,CAAMmD,SAAS,EAAEpD,GAAA,CAAI,CAAC,CAACgD,GAAA,EAAKC,KAAK,MAAM,CAACA,KAAA,EAAOJ,KAAA,CAAME,MAAA,GAASC,GAAG,CAAC,CAAC,CACpF,IAHmB,CAAC;AAItB","ignoreList":[]}
|
@@ -57,7 +57,7 @@ function createHandleRequest(options, handlers) {
|
|
57
57
|
if (handlers.handleLoader) {
|
58
58
|
var isClientRequestingNewRoute = pathname.endsWith("_vxrn_loader.js");
|
59
59
|
if (isClientRequestingNewRoute) {
|
60
|
-
var originalUrl = pathname.replace("_vxrn_loader.js", "").replace(/^\/assets/, ""),
|
60
|
+
var originalUrl = pathname.replace("_vxrn_loader.js", "").replace(/^\/assets/, "").replace("_", "/"),
|
61
61
|
finalUrl = new URL(originalUrl, url.origin),
|
62
62
|
_iteratorNormalCompletion = !0,
|
63
63
|
_didIteratorError = !1,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["isResponse","promiseWithResolvers","getManifest","createHandleRequest","options","handlers","import","meta","env","Error","manifest","apiRoutesMap","apiRoutes","reduce","acc","cur","page","compiledRegex","RegExp","namedRegex","apiRoutesList","Object","values","activeRequests","pageRoutes","map","route","workingRegex","handler","request","urlString","url","URL","headers","get","pathname","search","process","NODE_ENV","startsWith","handleAPI","apiRoute","find","route2","regex","test","params","getRouteParams","loaderProps","path","err","method","handleLoader","isClientRequestingNewRoute","endsWith","originalUrl","replace","finalUrl","origin","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","value","Headers","set","loaderResponse","getLoaderParams","Response","return","console","error","routes","handleSSR","promise","reject","resolve","_iteratorNormalCompletion1","_didIteratorError1","_iteratorError1","_iterator1","_step1","route1","ssrResponse"],"sources":["../../src/createHandleRequest.ts"],"sourcesContent":[null],"mappings":"AACA,SAASA,UAAA,QAAkB;AAC3B,SAASC,oBAAA,QAA4B;AACrC,SAASC,WAAA,QAAmB;AAYrB,SAASC,oBACdC,OAAA,EACAC,QAAA,EAKA;EACA,IAAIC,MAAA,CAAAC,IAAA,CAAYC,GAAA,EACd,MAAM,IAAIC,KAAA,CAAM,mDAAmD;EAGrE,IAAAC,QAAM,GAAAR,WAAW;EACjB,IAAI,CAACQ,QAAA,EACH,MAAM,IAAID,KAAA,CAAM,oBAAoB;EAGtC,IAAAE,YAAM,GAAAD,QACJ,CAAAE,SAAS,CAAAC,MAAU,WAAaC,GAAA,EAAAC,GAC9B;MAaF,OAAGD,GAAA,CAAAC,GAAA,CAAAC,IAAA;QACH,GAAAD,GAAA;QACAE,aAAA,MAAAC,MAAA,CAAAH,GAAA,CAAAI,UAAA;MAEF,GAAAL,GAAO;IAAA,GACL;IAAAM,aAAA,GAAAC,MAAA,CAAAC,MAAA,CAAAX,YAAA;IAAAY,cAAA;IAAAC,UAAA,GAAAd,QAAA,CAAAc,UAAA,CAAAC,GAAA,WAAAC,KAAA;MACA;QACE,GAAAA,KAAM;QACUC,YACd,MAAaT,MAAA,CAAAQ,KAAA,CAAAP,UAAA;MAAA;IAC2D;EAI1E;IAEIT,QAAA;IAIJkB,OAAI,iBAAAA,CAAaC,OAAA;MACf,IAAAC,SAAO,GAAAD,OAAA,CAAAE,GAAA;QAAAA,GAAA,OAAAC,GAAA,CAAAF,SAAA,QAAAD,OAAA,CAAAI,OAAA,CAAAC,GAAA,qBAAAL,OAAA,CAAAI,OAAA,CAAAC,GAAA;QAAA;UAAAC,QAAA;UAAAC;QAAA,IAAAL,GAAA;MAGT,IAAIM,OAAA,CAAA7B,GAAS,CAAA8B,QAAW,qBAAAf,cAAA,CAAAY,QAAA,GACtB,OAAM,MAAAZ,cAAW,CAAAY,QAAmB,CAAC;MAKrC,IAAAA,QAAI,KAAU,gBAAAA,QAAA,CAAAI,UAAA,QACZ,WAAM;MAEN,IAAAlC,QAAI,CAAAmC,SAAA;QACF,IAAAC,QAAO,GAAArB,aAAe,CAAAsB,IAAA,WAAUC,MAAA;UAAA,IAC9BC,KAAA,GAAAD,MAAA,CAAA1B,aAAA;UAAA,OACA2B,KAAO,CAAAC,IAAA,CAAAV,QAAA;QAAA;QACP,IAAAM,QACA;UAAa,IAAAK,MACX,GAAMC,cAAA,CAAAZ,QAAA,EAAAM,QAAA;UAAA;YACN,OACF,MAAApC,QAAA,CAAAmC,SAAA;cACDX,OAAA;cACHH,KAAS,EAAAe,QAAK;cACZV,GAAI;cACFiB,WAAO;gBAETC,IAAM,EAAAd,QAAA;gBACRW;cACF;YACF;UAEI,SAAQI,GAAA;YACV,IAAOlD,UAAA,CAAAkD,GAAA,GAGL,OAASA,GAAA;YAIT,MAAMA,GAAA;
|
1
|
+
{"version":3,"names":["isResponse","promiseWithResolvers","getManifest","createHandleRequest","options","handlers","import","meta","env","Error","manifest","apiRoutesMap","apiRoutes","reduce","acc","cur","page","compiledRegex","RegExp","namedRegex","apiRoutesList","Object","values","activeRequests","pageRoutes","map","route","workingRegex","handler","request","urlString","url","URL","headers","get","pathname","search","process","NODE_ENV","startsWith","handleAPI","apiRoute","find","route2","regex","test","params","getRouteParams","loaderProps","path","err","method","handleLoader","isClientRequestingNewRoute","endsWith","originalUrl","replace","finalUrl","origin","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","value","Headers","set","loaderResponse","getLoaderParams","Response","return","console","error","routes","handleSSR","promise","reject","resolve","_iteratorNormalCompletion1","_didIteratorError1","_iteratorError1","_iterator1","_step1","route1","ssrResponse"],"sources":["../../src/createHandleRequest.ts"],"sourcesContent":[null],"mappings":"AACA,SAASA,UAAA,QAAkB;AAC3B,SAASC,oBAAA,QAA4B;AACrC,SAASC,WAAA,QAAmB;AAYrB,SAASC,oBACdC,OAAA,EACAC,QAAA,EAKA;EACA,IAAIC,MAAA,CAAAC,IAAA,CAAYC,GAAA,EACd,MAAM,IAAIC,KAAA,CAAM,mDAAmD;EAGrE,IAAAC,QAAM,GAAAR,WAAW;EACjB,IAAI,CAACQ,QAAA,EACH,MAAM,IAAID,KAAA,CAAM,oBAAoB;EAGtC,IAAAE,YAAM,GAAAD,QACJ,CAAAE,SAAS,CAAAC,MAAU,WAAaC,GAAA,EAAAC,GAC9B;MAaF,OAAGD,GAAA,CAAAC,GAAA,CAAAC,IAAA;QACH,GAAAD,GAAA;QACAE,aAAA,MAAAC,MAAA,CAAAH,GAAA,CAAAI,UAAA;MAEF,GAAAL,GAAO;IAAA,GACL;IAAAM,aAAA,GAAAC,MAAA,CAAAC,MAAA,CAAAX,YAAA;IAAAY,cAAA;IAAAC,UAAA,GAAAd,QAAA,CAAAc,UAAA,CAAAC,GAAA,WAAAC,KAAA;MACA;QACE,GAAAA,KAAM;QACUC,YACd,MAAaT,MAAA,CAAAQ,KAAA,CAAAP,UAAA;MAAA;IAC2D;EAI1E;IAEIT,QAAA;IAIJkB,OAAI,iBAAAA,CAAaC,OAAA;MACf,I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QACF;UAAAC,OAAA;UAAAC,MAAA;UAAAC;QAAA,IAAAhF,oBAAA;QAEAsB,cAAO,CAAAY,QAAA,IAAA4C,OAAA;QACT;UACF,IAAAG,0BAAA;YAAAC,kBAAA;YAAAC,eAAA;UACF;YAES,SAAAC,UAEP,GAAA7D,UACA,CAAAuC,MAAA,CAAAC,QAAA,KAAAsB,MAAA,IAAAJ,0BAAA,IAAAI,MAAA,GAAAD,UAAA,CAAAnB,IAAA,IAAAC,IAAA,GAAAe,0BAAA;cACM,IAAkCK,MAClC,GAAAD,MAAY,CAAAlB,KAAA;cACP,IAAAmB,MAAA,CAAA5D,YAAA,CAAAkB,IAAA,CAAAV,QAAA;gBACG,IAAAqD,WAAe,SAAOnF,QAAQ,CAAAyE,SAAY;kBAC9CjD,OAAW;kBACVH,KAAQ,EAAI6D,MAAA;kBACrBxD,GAAA;kBAEKiB,WAAA;oBACTC,IAAA,EAAAd,QAAA,GAAAC,MAAA;oBAGSU,MAAe,EAAA0B,eAA4C,CAAAzC,GAAA,EAAAwD,MAAA;kBACpD;gBAET,CACE;gBACE,OAAQN,OAAM,CAAAO,WAAiB,GAAAA,WAAU;cAF9B;YAItB","ignoreList":[]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "one",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.282",
|
4
4
|
"source": "src/index.ts",
|
5
5
|
"types": "./types/index.d.ts",
|
6
6
|
"sideEffects": false,
|
@@ -89,12 +89,12 @@
|
|
89
89
|
"@react-navigation/native-stack": "~6.9.13",
|
90
90
|
"@react-navigation/routers": "~6.1.9",
|
91
91
|
"@ungap/structured-clone": "^1.2.0",
|
92
|
-
"@vxrn/universal-color-scheme": "1.1.
|
93
|
-
"@vxrn/use-isomorphic-layout-effect": "1.1.
|
92
|
+
"@vxrn/universal-color-scheme": "1.1.282",
|
93
|
+
"@vxrn/use-isomorphic-layout-effect": "1.1.282",
|
94
94
|
"babel-dead-code-elimination": "^1.0.6",
|
95
95
|
"citty": "^0.1.6",
|
96
96
|
"core-js": "^3.38.1",
|
97
|
-
"create-vxrn": "1.1.
|
97
|
+
"create-vxrn": "1.1.282",
|
98
98
|
"dotenv": "^16.4.5",
|
99
99
|
"escape-string-regexp": "^5.0.0",
|
100
100
|
"expo-linking": "~6.3.1",
|
@@ -116,7 +116,7 @@
|
|
116
116
|
"url-parse": "^1.5.10",
|
117
117
|
"vite": "6.0.0-beta.1",
|
118
118
|
"vite-tsconfig-paths": "^5.0.1",
|
119
|
-
"vxrn": "1.1.
|
119
|
+
"vxrn": "1.1.282",
|
120
120
|
"ws": "^8.18.0",
|
121
121
|
"xxhashjs": "^0.2.2"
|
122
122
|
},
|
package/src/cleanUrl.ts
CHANGED
@@ -10,7 +10,7 @@ export function cleanUrl(path: string) {
|
|
10
10
|
)
|
11
11
|
}
|
12
12
|
|
13
|
-
const clientSideSearch = typeof window !== 'undefined' ?
|
13
|
+
const clientSideSearch = typeof window !== 'undefined' ? `?cache=${CACHE_KEY}` : ''
|
14
14
|
const clientSideURL = typeof window !== 'undefined' ? CLIENT_BASE_URL : ''
|
15
15
|
|
16
16
|
export function getPreloadPath(currentPath: string) {
|
@@ -105,7 +105,11 @@ export function createHandleRequest(
|
|
105
105
|
const isClientRequestingNewRoute = pathname.endsWith('_vxrn_loader.js')
|
106
106
|
|
107
107
|
if (isClientRequestingNewRoute) {
|
108
|
-
const originalUrl = pathname
|
108
|
+
const originalUrl = pathname
|
109
|
+
.replace('_vxrn_loader.js', '')
|
110
|
+
.replace(/^\/assets/, '')
|
111
|
+
.replace('_', '/')
|
112
|
+
|
109
113
|
const finalUrl = new URL(originalUrl, url.origin)
|
110
114
|
|
111
115
|
for (const route of pageRoutes) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createHandleRequest.d.ts","sourceRoot":"","sources":["../src/createHandleRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM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