@absolutejs/absolute 0.19.0-beta.172 → 0.19.0-beta.174

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.
@@ -6,6 +6,17 @@ export type PrerenderResult = {
6
6
  dir: string;
7
7
  };
8
8
  type LogFn = (message: string) => void;
9
+ /** Header used to bypass the prerender cache during ISR re-renders */
10
+ export declare const PRERENDER_BYPASS_HEADER = "X-Absolute-Prerender-Bypass";
11
+ /** Convert a URL path to a filename: "/" → "index.html", "/vue" → "vue.html" */
12
+ export declare const routeToFilename: (route: string) => string;
13
+ /** Read the render timestamp for a pre-rendered page. Returns 0 if not found. */
14
+ export declare const readTimestamp: (htmlPath: string) => number;
15
+ /**
16
+ * Re-render a single route by fetching it from the running server
17
+ * with the bypass header so it hits SSR instead of the cache.
18
+ */
19
+ export declare const rerenderRoute: (route: string, port: number, prerenderDir: string) => Promise<boolean>;
9
20
  /**
10
21
  * Pre-render routes by fetching them from a running server and saving the HTML to disk.
11
22
  *
@@ -14,7 +25,7 @@ type LogFn = (message: string) => void;
14
25
  export declare const prerender: (port: number, outDir: string, staticConfig: StaticConfig, log?: LogFn) => Promise<PrerenderResult>;
15
26
  /**
16
27
  * Start the bundled production server, wait for it to be ready, pre-render,
17
- * then kill it. Returns the pre-render result.
28
+ * then kill it.
18
29
  */
19
30
  export declare const prerenderWithServer: (serverBundlePath: string, port: number, outDir: string, staticConfig: StaticConfig, env: Record<string, string>, log?: LogFn) => Promise<PrerenderResult>;
20
31
  export {};
@@ -18,6 +18,8 @@ export type StylesConfig = {
18
18
  export type StaticConfig = {
19
19
  /** Routes to pre-render at build time. Use "all" to crawl from / and discover all linked pages. */
20
20
  routes: string[] | 'all';
21
+ /** Revalidation interval in seconds. When set, stale pages are re-rendered in the background (ISR). */
22
+ revalidate?: number;
21
23
  };
22
24
  export type BuildConfig = {
23
25
  buildDirectory?: string;
package/package.json CHANGED
@@ -164,5 +164,5 @@
164
164
  "typecheck": "bun run vue-tsc --noEmit"
165
165
  },
166
166
  "types": "./dist/src/index.d.ts",
167
- "version": "0.19.0-beta.172"
167
+ "version": "0.19.0-beta.174"
168
168
  }
package/types/build.ts CHANGED
@@ -21,6 +21,8 @@ export type StylesConfig = {
21
21
  export type StaticConfig = {
22
22
  /** Routes to pre-render at build time. Use "all" to crawl from / and discover all linked pages. */
23
23
  routes: string[] | 'all';
24
+ /** Revalidation interval in seconds. When set, stale pages are re-rendered in the background (ISR). */
25
+ revalidate?: number;
24
26
  };
25
27
 
26
28
  export type BuildConfig = {