dinou 9.0.2 → 9.1.0
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/CHANGELOG.md +65 -0
- package/README.md +379 -9742
- package/dinou/bun/build.js +38 -1
- package/{cli.js → dinou/cli.js} +8 -7
- package/dinou/cloudflare/build.js +37 -0
- package/dinou/core/bailout-proxy.js +2 -2
- package/dinou/core/build-static-pages.js +17 -7
- package/dinou/core/cache-revalidate.js +977 -152
- package/dinou/core/cache-slot.js +848 -103
- package/dinou/core/client-webpack.jsx +60 -9
- package/dinou/core/client.jsx +60 -9
- package/dinou/core/edge-ssr.js +33 -5
- package/dinou/core/generate-static.js +109 -47
- package/dinou/core/get-jsx.js +35 -27
- package/dinou/core/handler.js +786 -54
- package/dinou/core/layout-functions.js +102 -1
- package/dinou/core/no-dynamic.js +25 -0
- package/dinou/core/ppr-context.js +293 -10
- package/dinou/core/ppr-runtime.js +373 -37
- package/dinou/core/render-jsx-to-client-jsx.js +205 -74
- package/dinou/core/slot.js +246 -33
- package/dinou/core/storage-adapter.js +117 -11
- package/dinou/deno/build.js +38 -1
- package/dinou/deno/seed-kv.js +43 -11
- package/dinou/esbuild/helpers-esbuild/swc-disk-cache.js +242 -225
- package/dinou/esbuild/plugins-esbuild/server-functions-plugin.js +253 -226
- package/dinou/esbuild/react-refresh/esm-hmr/client.js +209 -209
- package/dinou/index.d.ts +10 -0
- package/dinou/index.js +3 -0
- package/dinou/node/build.js +2 -2
- package/dinou/node/bundle-dual-engine.js +2 -0
- package/dinou/node/dev.js +2853 -2704
- package/dinou/package.json +4 -1
- package/dinou/rollup/react-refresh/esm-hmr/client.js +220 -220
- package/dinou/rollup/rollup-plugins/rollup-plugin-server-functions.js +182 -160
- package/dinou/server.d.ts +65 -12
- package/dinou/server.js +11 -0
- package/dinou/webpack/loaders/server-functions-loader.js +101 -94
- package/dinou/webpack/webpack.config.js +9 -4
- package/eject.js +219 -223
- package/package.json +2 -2
|
@@ -1,160 +1,182 @@
|
|
|
1
|
-
// rollup-plugin-server-functions.js
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import fs from "node:fs/promises";
|
|
4
|
-
import manifestGeneratorPlugin from "./manifest-generator-plugin.js";
|
|
5
|
-
import parseExports from "../../core/parse-exports.js";
|
|
6
|
-
import { useServerRegex } from "../../constants.js";
|
|
7
|
-
import { extractServerFunctions, hasServerFunctions } from "../../core/transform-server-functions.js";
|
|
8
|
-
|
|
9
|
-
function serverFunctionsPlugin(manifestData = {}, options = {}) {
|
|
10
|
-
const opts =
|
|
11
|
-
typeof manifestData === "object" &&
|
|
12
|
-
manifestData !== null &&
|
|
13
|
-
("onManifestUpdated" in manifestData || "serverFiles" in manifestData)
|
|
14
|
-
? manifestData
|
|
15
|
-
: options;
|
|
16
|
-
const serverFiles =
|
|
17
|
-
opts.serverFiles || manifestData.serverFiles || options.serverFiles || null;
|
|
18
|
-
const root = process.cwd();
|
|
19
|
-
const serverFunctions = new Map(); // Collect here: Map<relativePath, Set<exports>>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
1
|
+
// rollup-plugin-server-functions.js
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import fs from "node:fs/promises";
|
|
4
|
+
import manifestGeneratorPlugin from "./manifest-generator-plugin.js";
|
|
5
|
+
import parseExports from "../../core/parse-exports.js";
|
|
6
|
+
import { useServerRegex } from "../../constants.js";
|
|
7
|
+
import { extractServerFunctions, hasServerFunctions } from "../../core/transform-server-functions.js";
|
|
8
|
+
|
|
9
|
+
function serverFunctionsPlugin(manifestData = {}, options = {}) {
|
|
10
|
+
const opts =
|
|
11
|
+
typeof manifestData === "object" &&
|
|
12
|
+
manifestData !== null &&
|
|
13
|
+
("onManifestUpdated" in manifestData || "serverFiles" in manifestData)
|
|
14
|
+
? manifestData
|
|
15
|
+
: options;
|
|
16
|
+
const serverFiles =
|
|
17
|
+
opts.serverFiles || manifestData.serverFiles || options.serverFiles || null;
|
|
18
|
+
const root = process.cwd();
|
|
19
|
+
const serverFunctions = new Map(); // Collect here: Map<relativePath, Set<exports>>
|
|
20
|
+
const sfMtimeCache = new Map(); // Cache by filePath: { mtimeMs, exportsSet }
|
|
21
|
+
|
|
22
|
+
function normalizeFsPath(p) {
|
|
23
|
+
const resolved = path.resolve(p).replace(/\\/g, "/");
|
|
24
|
+
return process.platform === "win32" ? resolved.toLowerCase() : resolved;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
name: "server-functions-proxy",
|
|
29
|
+
transform(code, id) {
|
|
30
|
+
if (id.includes("node_modules") || id.includes("\0")) return null;
|
|
31
|
+
if (serverFiles && !serverFiles.has(normalizeFsPath(id))) {
|
|
32
|
+
if (!useServerRegex.test(code.trim()) && !hasServerFunctions(code)) return null;
|
|
33
|
+
serverFiles.add(normalizeFsPath(id));
|
|
34
|
+
} else if (!useServerRegex.test(code.trim()) && !hasServerFunctions(code)) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const isModuleLevel = useServerRegex.test(code.trim());
|
|
39
|
+
const exports = isModuleLevel ? parseExports(code) : extractServerFunctions(code, id);
|
|
40
|
+
if (!exports || exports.length === 0) return null;
|
|
41
|
+
|
|
42
|
+
const relativePath = path.relative(root, id).replace(/\\/g, "/");
|
|
43
|
+
serverFunctions.set(relativePath, new Set(exports)); // Save exports as a Set for uniqueness
|
|
44
|
+
|
|
45
|
+
const fileUrl = `file:///${relativePath}`;
|
|
46
|
+
|
|
47
|
+
// Generate a module that exports proxies instead of the real code
|
|
48
|
+
let proxyCode = `
|
|
49
|
+
import { createServerFunctionProxy } from "/__SERVER_FUNCTION_PROXY__";
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
for (const exp of exports) {
|
|
53
|
+
const key =
|
|
54
|
+
exp === "default" ? `${fileUrl}#default` : `${fileUrl}#${exp}`;
|
|
55
|
+
if (exp === "default") {
|
|
56
|
+
proxyCode += `export default createServerFunctionProxy(${JSON.stringify(
|
|
57
|
+
key
|
|
58
|
+
)});\n`;
|
|
59
|
+
} else {
|
|
60
|
+
proxyCode += `export const ${exp} = createServerFunctionProxy(${JSON.stringify(
|
|
61
|
+
key
|
|
62
|
+
)});\n`;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
code: proxyCode,
|
|
68
|
+
map: null,
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
// 🪄 After manifest exists, replace the placeholder with the final URL
|
|
72
|
+
async generateBundle(options, bundle) {
|
|
73
|
+
if (serverFiles && serverFiles.size > 0) {
|
|
74
|
+
for (const filePath of serverFiles) {
|
|
75
|
+
const rel = path.relative(root, filePath).replace(/\\/g, "/");
|
|
76
|
+
try {
|
|
77
|
+
const stat = await fs.stat(filePath);
|
|
78
|
+
const cached = sfMtimeCache.get(filePath);
|
|
79
|
+
if (cached && cached.mtimeMs === stat.mtimeMs) {
|
|
80
|
+
if (cached.exportsSet) {
|
|
81
|
+
serverFunctions.set(rel, cached.exportsSet);
|
|
82
|
+
} else {
|
|
83
|
+
serverFunctions.delete(rel);
|
|
84
|
+
}
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const fileCode = await fs.readFile(filePath, "utf8");
|
|
89
|
+
let exports = null;
|
|
90
|
+
if (useServerRegex.test(fileCode.trim())) {
|
|
91
|
+
exports = parseExports(fileCode);
|
|
92
|
+
} else if (hasServerFunctions(fileCode)) {
|
|
93
|
+
exports = extractServerFunctions(fileCode, filePath);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (exports && exports.length > 0) {
|
|
97
|
+
const exportsSet = new Set(exports);
|
|
98
|
+
serverFunctions.set(rel, exportsSet);
|
|
99
|
+
sfMtimeCache.set(filePath, {
|
|
100
|
+
mtimeMs: stat.mtimeMs,
|
|
101
|
+
exportsSet,
|
|
102
|
+
});
|
|
103
|
+
} else {
|
|
104
|
+
serverFunctions.delete(rel);
|
|
105
|
+
sfMtimeCache.set(filePath, {
|
|
106
|
+
mtimeMs: stat.mtimeMs,
|
|
107
|
+
exportsSet: null,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
} catch (e) {
|
|
111
|
+
serverFunctions.delete(rel);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (serverFunctions.size === 0) {
|
|
117
|
+
if (typeof globalThis !== "undefined") {
|
|
118
|
+
globalThis.__DINOU_RAW_SERVER_FUNCTIONS_MANIFEST__ = {};
|
|
119
|
+
}
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const isProd =
|
|
123
|
+
process.env.NODE_ENV === "production" &&
|
|
124
|
+
process.env.DINOU_DEV !== "true";
|
|
125
|
+
const manifest = manifestGeneratorPlugin.manifestData;
|
|
126
|
+
const proxyName = manifest["serverFunctionProxy.js"];
|
|
127
|
+
if (isProd && !proxyName) {
|
|
128
|
+
throw new Error(
|
|
129
|
+
"[Dinou] rollup-plugin-server-functions: could not find hashed 'serverFunctionProxy.js' in manifest during production build."
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
const hashedPath =
|
|
133
|
+
"/" + (proxyName || "serverFunctionProxy.js");
|
|
134
|
+
|
|
135
|
+
for (const file of Object.keys(bundle)) {
|
|
136
|
+
const chunk = bundle[file];
|
|
137
|
+
if (chunk.type === "asset" || !chunk.code) continue;
|
|
138
|
+
if (chunk.code.includes("/__SERVER_FUNCTION_PROXY__")) {
|
|
139
|
+
chunk.code = chunk.code.replace(
|
|
140
|
+
/\/__SERVER_FUNCTION_PROXY__/g,
|
|
141
|
+
hashedPath
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// Generate manifest: convert Map to a simple object
|
|
147
|
+
const manifestObj = {};
|
|
148
|
+
for (const [relPath, exportsSet] of serverFunctions.entries()) {
|
|
149
|
+
manifestObj[relPath] = Array.from(exportsSet);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (typeof globalThis !== "undefined") {
|
|
153
|
+
globalThis.__DINOU_RAW_SERVER_FUNCTIONS_MANIFEST__ = manifestObj;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const isDev =
|
|
157
|
+
process.env.NODE_ENV !== "production" ||
|
|
158
|
+
process.env.DINOU_DEV === "true";
|
|
159
|
+
const shouldWriteToDisk =
|
|
160
|
+
process.env.DINOU_WRITE_TO_DISK === "false"
|
|
161
|
+
? false
|
|
162
|
+
: process.env.DINOU_WRITE_TO_DISK === "true" || !isDev;
|
|
163
|
+
|
|
164
|
+
if (shouldWriteToDisk) {
|
|
165
|
+
// Write the manifest to the specified folder (e.g. same place as other assets)
|
|
166
|
+
const manifestPath = path.join(
|
|
167
|
+
".dinou/server_functions_manifest",
|
|
168
|
+
"server-functions-manifest.json"
|
|
169
|
+
);
|
|
170
|
+
try {
|
|
171
|
+
await fs.mkdir(path.dirname(manifestPath), { recursive: true });
|
|
172
|
+
await fs.writeFile(manifestPath, JSON.stringify(manifestObj, null, 2));
|
|
173
|
+
} catch (err) {
|
|
174
|
+
console.error(err);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export { serverFunctionsPlugin };
|
|
182
|
+
export default serverFunctionsPlugin;
|
package/dinou/server.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Revalidates the cache for a specific route path.
|
|
3
|
-
*
|
|
4
|
-
* * When `{ cascade: true }` is specified, if a layout is present and revalidated in that path,
|
|
5
|
-
* it cascades `revalidatePage` to all child routes to ensure 0 hydration mismatch.
|
|
2
|
+
* Revalidates the cache for a specific route path (both its layout segment, if present, and its page).
|
|
3
|
+
* Child routes sharing the layout have their `index.html` lazily re-composed on demand (preserving their cached `page.rsc` payloads) to ensure 0 hydration mismatch.
|
|
6
4
|
* @param path The path of the route to revalidate (e.g. "/blog" or "/dashboard").
|
|
7
|
-
|
|
5
|
+
*/
|
|
6
|
+
export declare function revalidatePath(path: string): Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated The `options` parameter (`{ cascade }` / `"layout"`) is deprecated and ignored since 9.0.3.
|
|
9
|
+
* Zero hydration mismatch is now guaranteed automatically via lazy `index.html` re-composition,
|
|
10
|
+
* and layout-only revalidation should use `revalidateLayout(path)`.
|
|
8
11
|
*/
|
|
9
12
|
export declare function revalidatePath(
|
|
10
13
|
path: string,
|
|
@@ -13,30 +16,63 @@ export declare function revalidatePath(
|
|
|
13
16
|
|
|
14
17
|
/**
|
|
15
18
|
* Revalidates only the page component (`page.rsc`) and its HTML (`index.html`) for a specific route path,
|
|
16
|
-
*
|
|
19
|
+
* composing with the cached layout without re-executing `layout.tsx`.
|
|
17
20
|
* @param path The path of the page to revalidate (e.g. "/dashboard/analytics").
|
|
18
21
|
*/
|
|
19
22
|
export declare function revalidatePage(path: string): Promise<void>;
|
|
20
23
|
|
|
21
24
|
/**
|
|
22
|
-
* Revalidates
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
|
|
25
|
+
* Revalidates only the layout shell (`layout.rsc` and `layout.metadata.json`) for a specific route path,
|
|
26
|
+
* without re-rendering child pages. Affected `index.html` files are lazily re-composed on demand.
|
|
27
|
+
* @param path The path of the layout segment to revalidate (e.g. "/dashboard").
|
|
28
|
+
*/
|
|
29
|
+
export declare function revalidateLayout(path: string): Promise<boolean>;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Revalidates all routes, layouts, or cache slots that are associated with the specified cache tag.
|
|
33
|
+
* Layout tags surgically revalidate only the layout shell (`layout.rsc`), while affected `index.html` files
|
|
34
|
+
* are lazily re-composed on demand to ensure 0 hydration mismatch.
|
|
26
35
|
* @param tag The tag string to revalidate (e.g. "blog-posts").
|
|
27
|
-
|
|
36
|
+
*/
|
|
37
|
+
export declare function revalidateTag(tag: string): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated The `options` parameter (`{ cascade }` / `"layout"`) is deprecated and ignored since 9.0.3.
|
|
40
|
+
* Zero hydration mismatch is now guaranteed automatically via lazy `index.html` re-composition.
|
|
28
41
|
*/
|
|
29
42
|
export declare function revalidateTag(
|
|
30
43
|
tag: string,
|
|
31
44
|
options?: { cascade?: boolean } | "layout"
|
|
32
45
|
): Promise<void>;
|
|
46
|
+
|
|
47
|
+
import type { RequestContextStore } from "./index";
|
|
48
|
+
|
|
33
49
|
export type {
|
|
34
50
|
PPRConfig,
|
|
35
51
|
RouteSegmentConfig,
|
|
36
52
|
PageFunctions,
|
|
37
53
|
LayoutFunctions,
|
|
38
54
|
StaticPathItem,
|
|
39
|
-
StaticPathsResult,
|
|
55
|
+
StaticPathsResult,
|
|
56
|
+
RequestContextStore,
|
|
57
|
+
ResponseProxy,
|
|
58
|
+
CookieOptions,
|
|
59
|
+
Query,
|
|
60
|
+
Cookies,
|
|
61
|
+
Headers,
|
|
62
|
+
DinouConfig,
|
|
63
|
+
DinouPlugin,
|
|
64
|
+
ServerHookContext,
|
|
65
|
+
NodeMiddleware,
|
|
66
|
+
PageProps,
|
|
67
|
+
LayoutProps,
|
|
68
|
+
ErrorProps,
|
|
69
|
+
RouteParams,
|
|
70
|
+
DinouRoutePattern,
|
|
71
|
+
DinouRoute,
|
|
72
|
+
DinouRouter,
|
|
73
|
+
CleanRoutePath,
|
|
74
|
+
ExtractRouteParams,
|
|
75
|
+
ExtractSegmentParam,
|
|
40
76
|
} from "./index";
|
|
41
77
|
|
|
42
78
|
export interface DinouCacheSlotProps {
|
|
@@ -54,6 +90,23 @@ export interface DinouCacheSlotProps {
|
|
|
54
90
|
*/
|
|
55
91
|
export declare function DinouCacheSlot(props: DinouCacheSlotProps): Promise<any>;
|
|
56
92
|
|
|
93
|
+
/**
|
|
94
|
+
* Opts the enclosing `<Suspense>` boundary out of becoming a Dynamic PPR Hole
|
|
95
|
+
* when wrapping an async Server Component on a PPR route (`ppr = true`).
|
|
96
|
+
*
|
|
97
|
+
* Call `noDynamic()` synchronously at the top of your async Server Component
|
|
98
|
+
* (before its first `await`) so Dinou resolves its promise at build time and
|
|
99
|
+
* bakes the rendered output directly into the Static Shell (`shell.html`).
|
|
100
|
+
*/
|
|
101
|
+
export declare function noDynamic(): void;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Gets the current request context (req and res proxy) synchronously.
|
|
105
|
+
* Must be called within a Server Component, `getProps`, or a `"use server"` Server Function.
|
|
106
|
+
* @returns The current request context store, or `undefined` if called outside a request scope.
|
|
107
|
+
*/
|
|
108
|
+
export declare function getContext(): RequestContextStore | undefined;
|
|
109
|
+
|
|
57
110
|
// ====================================================================
|
|
58
111
|
// STORAGE ADAPTER TYPES (ISR / CACHE)
|
|
59
112
|
// ====================================================================
|
package/dinou/server.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { getContext } from "./core/request-context.js";
|
|
2
|
+
import { noDynamic } from "./core/no-dynamic.js";
|
|
3
|
+
|
|
4
|
+
export { getContext, noDynamic };
|
|
5
|
+
|
|
1
6
|
export async function revalidatePath(path, options) {
|
|
2
7
|
const { revalidatePath: fn } = await import("./core/cache-revalidate.js");
|
|
3
8
|
return fn(path, options);
|
|
@@ -8,6 +13,11 @@ export async function revalidatePage(path) {
|
|
|
8
13
|
return fn(path);
|
|
9
14
|
}
|
|
10
15
|
|
|
16
|
+
export async function revalidateLayout(path) {
|
|
17
|
+
const { revalidateLayout: fn } = await import("./core/cache-revalidate.js");
|
|
18
|
+
return fn(path);
|
|
19
|
+
}
|
|
20
|
+
|
|
11
21
|
export async function revalidateTag(tag, options) {
|
|
12
22
|
const { revalidateTag: fn } = await import("./core/cache-revalidate.js");
|
|
13
23
|
return fn(tag, options);
|
|
@@ -17,6 +27,7 @@ export async function DinouCacheSlot(props) {
|
|
|
17
27
|
const { DinouCacheSlot: fn } = await import("./core/cache-slot.js");
|
|
18
28
|
return fn(props);
|
|
19
29
|
}
|
|
30
|
+
DinouCacheSlot.$$dinouCacheSlot = true;
|
|
20
31
|
|
|
21
32
|
export {
|
|
22
33
|
StorageAdapter,
|