veryfront 0.1.716 → 0.1.720

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.716",
3
+ "version": "0.1.720",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "minimumDependencyAge": "P2D",
@@ -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,cAsqB3B,CAAC"}
1
+ {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../../../src/src/html/hydration-script-builder/templates/router.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,cA+qB3B,CAAC"}
@@ -42,6 +42,11 @@ export const getRouterScript = () => `
42
42
  const log = DEBUG ? console.log.bind(console, '[Veryfront]') : () => {};
43
43
  const logError = console.error.bind(console, '[Veryfront]');
44
44
 
45
+ function logBackgroundFetchFailure(reason, path, error) {
46
+ const message = error?.message ?? String(error);
47
+ log(reason + ' failed:', path, message);
48
+ }
49
+
45
50
  function getDocumentNonce() {
46
51
  const element = document.querySelector('script[nonce], style[nonce], link[nonce]');
47
52
  if (!element) return undefined;
@@ -290,7 +295,9 @@ export const getRouterScript = () => `
290
295
  const cached = getCachedPageData(path);
291
296
  if (cached) {
292
297
  log('Using cached page data:', path);
293
- fetchPageDataFresh(path, null).catch(() => {});
298
+ fetchPageDataFresh(path, null).catch((error) => {
299
+ logBackgroundFetchFailure('Stale page data refresh', path, error);
300
+ });
294
301
  return cached;
295
302
  }
296
303
 
@@ -299,7 +306,9 @@ export const getRouterScript = () => `
299
306
 
300
307
  async function fetchPageDataForPrefetch(path) {
301
308
  if (getCachedPageData(path)) return;
302
- return fetchPageDataFresh(path, null).catch(() => {});
309
+ return fetchPageDataFresh(path, null).catch((error) => {
310
+ logBackgroundFetchFailure('Page data prefetch', path, error);
311
+ });
303
312
  }
304
313
 
305
314
  // ============================================
@@ -1,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.716";
2
+ export declare const VERSION = "0.1.720";
3
3
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
3
  /** Shared version value. */
4
- export const VERSION = "0.1.716";
4
+ export const VERSION = "0.1.720";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.716",
3
+ "version": "0.1.720",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",