@decocms/tanstack 7.5.0 → 7.5.2
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/package.json +6 -5
- package/src/vite/plugin.js +16 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/tanstack",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Deco framework binding for TanStack Start + Cloudflare Workers",
|
|
6
6
|
"repository": {
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
".": "./src/index.ts",
|
|
14
14
|
"./vite": "./src/vite/plugin.js",
|
|
15
15
|
"./daemon": "./src/daemon/index.ts",
|
|
16
|
-
"./sdk/createInvoke": "./src/sdk/createInvoke.ts"
|
|
16
|
+
"./sdk/createInvoke": "./src/sdk/createInvoke.ts",
|
|
17
|
+
"./sdk/cookiePassthrough": "./src/sdk/cookiePassthrough.ts"
|
|
17
18
|
},
|
|
18
19
|
"scripts": {
|
|
19
20
|
"build": "tsc",
|
|
@@ -22,9 +23,9 @@
|
|
|
22
23
|
"lint:unused": "knip"
|
|
23
24
|
},
|
|
24
25
|
"dependencies": {
|
|
25
|
-
"@decocms/blocks": "7.5.
|
|
26
|
-
"@decocms/blocks-admin": "7.5.
|
|
27
|
-
"@decocms/blocks-cli": "7.5.
|
|
26
|
+
"@decocms/blocks": "7.5.2",
|
|
27
|
+
"@decocms/blocks-admin": "7.5.2",
|
|
28
|
+
"@decocms/blocks-cli": "7.5.2",
|
|
28
29
|
"@deco-cx/warp-node": "^0.3.16",
|
|
29
30
|
"fast-json-patch": "^3.1.0",
|
|
30
31
|
"ws": "^8.18.0"
|
package/src/vite/plugin.js
CHANGED
|
@@ -224,6 +224,22 @@ export function decoVitePlugin() {
|
|
|
224
224
|
tsImport("@decocms/blocks-cli/generate-blocks", import.meta.url),
|
|
225
225
|
)
|
|
226
226
|
.then((mod) => {
|
|
227
|
+
if (typeof mod.generateBlocks !== "function") {
|
|
228
|
+
// tsx 4.22.0–4.22.4 has a loader-hook state bug (fixed upstream
|
|
229
|
+
// in 4.22.5, "isolate hook state per async module.register()
|
|
230
|
+
// registration"): inside a Vite dev-server process, tsImport
|
|
231
|
+
// resolves correctly but returns an EMPTY module namespace —
|
|
232
|
+
// no rejection, no missing-module error. blocks-cli floors its
|
|
233
|
+
// tsx dependency at ^4.22.5, but a site's own lockfile can pin
|
|
234
|
+
// a broken copy that hoists above it. Fail with an actionable
|
|
235
|
+
// message instead of the bare "generateBlocks is not a
|
|
236
|
+
// function" this used to surface as.
|
|
237
|
+
throw new Error(
|
|
238
|
+
"tsImport(@decocms/blocks-cli/generate-blocks) returned an empty module namespace. " +
|
|
239
|
+
"This is the tsx 4.22.0–4.22.4 loader-hook bug — check `node -e \"console.log(require('tsx/package.json').version)\"` " +
|
|
240
|
+
"and upgrade tsx to >=4.22.5 (e.g. `bun update tsx` or pin a newer tsx in devDependencies).",
|
|
241
|
+
);
|
|
242
|
+
}
|
|
227
243
|
genModule = mod;
|
|
228
244
|
return mod;
|
|
229
245
|
});
|