@decocms/tanstack 7.34.3 → 7.34.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decocms/tanstack",
3
- "version": "7.34.3",
3
+ "version": "7.34.4",
4
4
  "type": "module",
5
5
  "description": "Deco framework binding for TanStack Start + Cloudflare Workers",
6
6
  "repository": {
@@ -24,9 +24,9 @@
24
24
  "lint:unused": "knip"
25
25
  },
26
26
  "dependencies": {
27
- "@decocms/blocks": "7.34.3",
28
- "@decocms/blocks-admin": "7.34.3",
29
- "@decocms/blocks-cli": "7.34.3",
27
+ "@decocms/blocks": "7.34.4",
28
+ "@decocms/blocks-admin": "7.34.4",
29
+ "@decocms/blocks-cli": "7.34.4",
30
30
  "@deco-cx/warp-node": "^0.3.16",
31
31
  "fast-json-patch": "^3.1.0",
32
32
  "ws": "^8.18.0"
@@ -68,6 +68,7 @@ import { loadRedirects, matchRedirect, type RedirectMap } from "@decocms/blocks/
68
68
  import { RequestContext } from "@decocms/blocks/sdk/requestContext";
69
69
  import { cleanPathForCacheKey } from "@decocms/blocks/sdk/urlUtils";
70
70
  import { type Device, isMobileUA } from "@decocms/blocks/sdk/useDevice";
71
+ import { reconfigureAppsOnce } from "@decocms/blocks-admin/apps/autoconfig";
71
72
  import { getRenderShellConfig } from "@decocms/blocks-admin/admin/setup";
72
73
  import { buildHtmlShell } from "@decocms/blocks-admin/sdk/htmlShell";
73
74
  import { getAppMiddleware } from "@decocms/blocks-admin/sdk/setupApps";
@@ -1498,6 +1499,14 @@ export function createDecoWorkerEntry(
1498
1499
  // via getRuntimeEnv() in sdk/otelAdapters.ts.
1499
1500
  setRuntimeEnv(env);
1500
1501
 
1502
+ // First-request re-configuration of apps. autoconfigApps() runs at
1503
+ // module init (setup.ts), before `env` — and thus DECO_CRYPTO_KEY —
1504
+ // is available, so encrypted app credentials (VTEX appKey/appToken,
1505
+ // etc.) decrypt to null at startup. Now that env is in the ALS,
1506
+ // getEnvVar() can reach the key; re-run configure once so apps pick up
1507
+ // real credentials. No-op on every request after the first.
1508
+ await reconfigureAppsOnce();
1509
+
1501
1510
  // RequestContext.run already resolved request.id from the
1502
1511
  // inbound headers (precedence: x-request-id → cf-ray → UUID).
1503
1512
  // Lift it into the closure so the response-write path below has