veryfront 0.1.843 → 0.1.845
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/esm/deno.js +1 -1
- package/esm/src/html/hydration-script-builder/templates/router.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/templates/router.js +12 -6
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +1 -1
package/esm/deno.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../../../src/src/html/hydration-script-builder/templates/router.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../../../src/src/html/hydration-script-builder/templates/router.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,cAy0B3B,CAAC"}
|
|
@@ -354,15 +354,21 @@ export const getRouterScript = () => `
|
|
|
354
354
|
return data;
|
|
355
355
|
}
|
|
356
356
|
|
|
357
|
+
function startPageDataFetch(path, signal, options = {}) {
|
|
358
|
+
const request = fetchPageDataFresh(path, signal, options).finally(() => {
|
|
359
|
+
if (pendingPageDataFetches.get(path) === request) {
|
|
360
|
+
pendingPageDataFetches.delete(path);
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
pendingPageDataFetches.set(path, request);
|
|
364
|
+
return request;
|
|
365
|
+
}
|
|
366
|
+
|
|
357
367
|
function fetchPageDataDeduped(path) {
|
|
358
368
|
const pending = pendingPageDataFetches.get(path);
|
|
359
369
|
if (pending) return pending;
|
|
360
370
|
|
|
361
|
-
|
|
362
|
-
pendingPageDataFetches.delete(path);
|
|
363
|
-
});
|
|
364
|
-
pendingPageDataFetches.set(path, refreshPromise);
|
|
365
|
-
return refreshPromise;
|
|
371
|
+
return startPageDataFetch(path, null);
|
|
366
372
|
}
|
|
367
373
|
|
|
368
374
|
function refreshPageDataInBackground(path) {
|
|
@@ -394,7 +400,7 @@ export const getRouterScript = () => `
|
|
|
394
400
|
return handlePageDataVersionMismatch(path, data);
|
|
395
401
|
}
|
|
396
402
|
|
|
397
|
-
return
|
|
403
|
+
return startPageDataFetch(path, signal, {
|
|
398
404
|
triggerReloadOnVersionMismatch: true,
|
|
399
405
|
recordRouteTiming: true,
|
|
400
406
|
timingSource: 'network'
|