@alpaca-headless/alpaca-headless 1.0.4622 → 1.0.4623
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/dist/client-components/ClientLink.d.ts +1 -0
- package/dist/configuration.d.ts +1 -0
- package/dist/render-context.d.ts +1 -0
- package/dist/route-data/resolve-route.d.ts +1 -0
- package/dist/route-data/resolve-route.js +1 -9
- package/dist/types/layoutDataTypes.d.ts +1 -0
- package/dist/utils/media-protection.d.ts +1 -0
- package/package.json +9 -7
- package/src/route-data/resolve-route.ts +1 -9
- package/tsconfig.json +0 -1
package/dist/configuration.d.ts
CHANGED
package/dist/render-context.d.ts
CHANGED
|
@@ -5,15 +5,7 @@ if (!globalThis.alpacaRouteDataCache) {
|
|
|
5
5
|
}
|
|
6
6
|
const fetchRouteData = async ({ path, host, mode, itemId, language, version, options, apiConfig, editRev, siteName, urlSearchParams, }) => {
|
|
7
7
|
var _a;
|
|
8
|
-
|
|
9
|
-
// gives every canvas refresh a new edit_rev, so caching edit responses does
|
|
10
|
-
// not provide reuse; it only retains one layout promise per refresh and can
|
|
11
|
-
// replay an older snapshot when the host retries the same revision while a
|
|
12
|
-
// field save is completing.
|
|
13
|
-
//
|
|
14
|
-
// Preview remains cacheable when it has an explicit revision. Without one,
|
|
15
|
-
// preserve the existing fresh-read behavior.
|
|
16
|
-
if (mode === "edit" || (mode === "preview" && !editRev)) {
|
|
8
|
+
if ((mode === "edit" || mode === "preview") && !editRev) {
|
|
17
9
|
return await doFetchRouteData(path, host, mode, itemId, language, version, options, apiConfig, siteName, urlSearchParams);
|
|
18
10
|
}
|
|
19
11
|
const cache = globalThis.alpacaRouteDataCache;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alpaca-headless/alpaca-headless",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4623",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Alpaca Headless",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -44,18 +44,20 @@
|
|
|
44
44
|
},
|
|
45
45
|
"homepage": "https://github.com/yourusername/your-module-name#readme",
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@types/node": "^
|
|
48
|
-
"@types/react": "19.2.
|
|
49
|
-
"
|
|
47
|
+
"@types/node": "^20.12.11",
|
|
48
|
+
"@types/react": "19.2.2",
|
|
49
|
+
"@types/react-dom": "19.2.2",
|
|
50
|
+
"@types/uuid": "^10.0.0",
|
|
51
|
+
"eslint": "^9.22.0",
|
|
50
52
|
"eslint-config-next": "16.2.6",
|
|
51
|
-
"typescript": "5
|
|
53
|
+
"typescript": "^5"
|
|
52
54
|
},
|
|
53
55
|
"dependencies": {
|
|
54
56
|
"axios": "^1.16.1",
|
|
55
57
|
"next": "16.2.6",
|
|
56
|
-
"server-only": "^0.0.1",
|
|
57
58
|
"react": "19.2.4",
|
|
58
59
|
"react-dom": "19.2.4",
|
|
59
|
-
"react-error-boundary": "^
|
|
60
|
+
"react-error-boundary": "^4.0.13",
|
|
61
|
+
"uuid": "^10.0.0"
|
|
60
62
|
}
|
|
61
63
|
}
|
|
@@ -54,15 +54,7 @@ const fetchRouteData = async ({
|
|
|
54
54
|
editRev?: string;
|
|
55
55
|
urlSearchParams?: string;
|
|
56
56
|
}): Promise<Result> => {
|
|
57
|
-
|
|
58
|
-
// gives every canvas refresh a new edit_rev, so caching edit responses does
|
|
59
|
-
// not provide reuse; it only retains one layout promise per refresh and can
|
|
60
|
-
// replay an older snapshot when the host retries the same revision while a
|
|
61
|
-
// field save is completing.
|
|
62
|
-
//
|
|
63
|
-
// Preview remains cacheable when it has an explicit revision. Without one,
|
|
64
|
-
// preserve the existing fresh-read behavior.
|
|
65
|
-
if (mode === "edit" || (mode === "preview" && !editRev)) {
|
|
57
|
+
if ((mode === "edit" || mode === "preview") && !editRev) {
|
|
66
58
|
return await doFetchRouteData(
|
|
67
59
|
path,
|
|
68
60
|
host,
|