@harlan-zw/nuxt-cloudflare 0.0.8 → 0.0.9

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/README.md CHANGED
@@ -183,7 +183,7 @@ function requireDatabase(source?: CloudflareBindingSource) {
183
183
  }
184
184
  ```
185
185
 
186
- `nuxt prepare` runs Wrangler and writes exact, compatibility-aware types to `.nuxt/types/cloudflare-bindings.d.ts`. It merges root JSON, JSONC, or TOML bindings with `nitro.cloudflare.wrangler`. The declaration is available only to Nitro server code. Production builds compare it with the final generated Wrangler config and fail on drift. Set `bindingTypes: false` only when another tool owns the declaration.
186
+ `nuxt prepare` runs Wrangler and writes exact, compatibility-aware types to `.nuxt/types/cloudflare-bindings.d.ts`. It merges root JSON, JSONC, or TOML bindings with `nitro.cloudflare.wrangler`. Nuxt and Nitro typechecks both reference the declaration, while bindings remain server runtime values. Production builds compare it with the final generated Wrangler config and fail on drift. Set `bindingTypes: false` only when another tool owns the declaration.
187
187
 
188
188
  The source may be an H3 event, Nitro task input, or task context. Eventless access uses Nitro's `globalThis.__env__` Cloudflare entry shim. An explicit environment always wins and never mixes with the global environment. Binding names come from the generated `CloudflareBindings` interface. Missing required bindings throw. Pass a generic only to override generated types in a focused test.
189
189
 
@@ -103,7 +103,7 @@ const doctor = defineCommand({
103
103
  const main = defineCommand({
104
104
  meta: {
105
105
  name: "nuxt-cloudflare",
106
- version: "0.0.8",
106
+ version: "0.0.9",
107
107
  description: "Cloudflare deployment defaults and diagnostics for Nuxt"
108
108
  },
109
109
  subCommands: { doctor }
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=4.5.0"
6
6
  },
7
- "version": "0.0.8",
7
+ "version": "0.0.9",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.3",
10
10
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -231,7 +231,7 @@ function setupCloudflareModule(options, nuxt) {
231
231
  bindingTypeSignature = artifact.signature;
232
232
  return artifact.content;
233
233
  }
234
- }, { nitro: true });
234
+ }, { nitro: true, nuxt: true });
235
235
  }
236
236
  configure();
237
237
  nuxt.hook("modules:done", () => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@harlan-zw/nuxt-cloudflare",
3
3
  "type": "module",
4
- "version": "0.0.8",
4
+ "version": "0.0.9",
5
5
  "description": "Opinionated Cloudflare deployment defaults and diagnostics for Nuxt.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",
@@ -113,7 +113,7 @@
113
113
  "lint": "eslint .",
114
114
  "lint:fix": "eslint . --fix",
115
115
  "test": "pnpm run build && vitest run && pnpm run test:fixture",
116
- "test:fixture": "nuxi prepare tests/fixtures/basic && tsc --noEmit -p tests/fixtures/basic/.nuxt/tsconfig.server.json && nuxt build tests/fixtures/basic && node dist/cli/index.mjs doctor --cwd tests/fixtures/basic",
116
+ "test:fixture": "nuxi prepare tests/fixtures/basic && nuxt typecheck tests/fixtures/basic && nuxt build tests/fixtures/basic && node dist/cli/index.mjs doctor --cwd tests/fixtures/basic",
117
117
  "typecheck": "nuxt typecheck && tsc --noEmit -p tsconfig.check.json",
118
118
  "test:attw": "attw --pack",
119
119
  "test:pack": "rm -rf .pack && pnpm pack --pack-destination .pack && tar -tf .pack/*.tgz"