@dragonmastery/tamer 0.28.0 → 0.30.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.
Files changed (74) hide show
  1. package/README.md +2 -1
  2. package/dist/{StateManager-DTqtLLVX.mjs → StateManager-JLBtz9V-.mjs} +2 -2
  3. package/dist/{StateManager-DTqtLLVX.mjs.map → StateManager-JLBtz9V-.mjs.map} +1 -1
  4. package/dist/{apply-B0b_jjGv.mjs → apply-CWU3HY0P.mjs} +13 -13
  5. package/dist/{apply-B0b_jjGv.mjs.map → apply-CWU3HY0P.mjs.map} +1 -1
  6. package/dist/{applyTarget-BetDYdeS.mjs → applyTarget-D15T_q7G.mjs} +3 -3
  7. package/dist/{applyTarget-BetDYdeS.mjs.map → applyTarget-D15T_q7G.mjs.map} +1 -1
  8. package/dist/{bootstrap-CBzPilB1.mjs → bootstrap-BicPW44a.mjs} +3 -3
  9. package/dist/{bootstrap-CBzPilB1.mjs.map → bootstrap-BicPW44a.mjs.map} +1 -1
  10. package/dist/{cloudflareSnapshot-B4FOaNr0.mjs → cloudflareSnapshot-GBUHeg2m.mjs} +7 -7
  11. package/dist/{cloudflareSnapshot-B4FOaNr0.mjs.map → cloudflareSnapshot-GBUHeg2m.mjs.map} +1 -1
  12. package/dist/{deploy-gHEQxhmx.mjs → deploy-DAEjDjOm.mjs} +8 -8
  13. package/dist/{deploy-gHEQxhmx.mjs.map → deploy-DAEjDjOm.mjs.map} +1 -1
  14. package/dist/{destroy-B21f3wgq.mjs → destroy-DtgPD_bD.mjs} +11 -11
  15. package/dist/{destroy-B21f3wgq.mjs.map → destroy-DtgPD_bD.mjs.map} +1 -1
  16. package/dist/{destroy-tenant-BW2nasnK.mjs → destroy-tenant-B-VLKfc6.mjs} +3 -3
  17. package/dist/{destroy-tenant-BW2nasnK.mjs.map → destroy-tenant-B-VLKfc6.mjs.map} +1 -1
  18. package/dist/{dev-Dt26nzMJ.mjs → dev-BYItpt9U.mjs} +8 -8
  19. package/dist/{dev-Dt26nzMJ.mjs.map → dev-BYItpt9U.mjs.map} +1 -1
  20. package/dist/{dns-records.sync-Bpzz9H0s.mjs → dns-records.sync-CfI1mqXv.mjs} +2 -2
  21. package/dist/{dns-records.sync-Bpzz9H0s.mjs.map → dns-records.sync-CfI1mqXv.mjs.map} +1 -1
  22. package/dist/drift-DRnwTyZD.mjs +10 -0
  23. package/dist/{drift-D8ZrSgTn.mjs → drift-DncpkI2R.mjs} +8 -8
  24. package/dist/{drift-D8ZrSgTn.mjs.map → drift-DncpkI2R.mjs.map} +1 -1
  25. package/dist/{events-BSwGdkGj.mjs → events-B6oCdvSt.mjs} +3 -3
  26. package/dist/{events-BSwGdkGj.mjs.map → events-B6oCdvSt.mjs.map} +1 -1
  27. package/dist/{fetchStackImports-B4ZJahOt.mjs → fetchStackImports-ClUYZy_U.mjs} +294 -101
  28. package/dist/fetchStackImports-ClUYZy_U.mjs.map +1 -0
  29. package/dist/{generator-CIMbcPzv.mjs → generator-h_VG0Q5f.mjs} +6 -5
  30. package/dist/generator-h_VG0Q5f.mjs.map +1 -0
  31. package/dist/{import-BrduwA9Z.mjs → import-D8zaVvwK.mjs} +6 -4
  32. package/dist/import-D8zaVvwK.mjs.map +1 -0
  33. package/dist/index.d.mts +154 -4
  34. package/dist/index.d.mts.map +1 -1
  35. package/dist/index.mjs +1 -1
  36. package/dist/{loader-DP7yXqT6.mjs → loader-DnT9iqz9.mjs} +17 -4
  37. package/dist/loader-DnT9iqz9.mjs.map +1 -0
  38. package/dist/{logpush-job-xS7270FZ.mjs → logpush-job-DsRkOORJ.mjs} +2 -2
  39. package/dist/{logpush-job-xS7270FZ.mjs.map → logpush-job-DsRkOORJ.mjs.map} +1 -1
  40. package/dist/{migrate-CahG6BYV.mjs → migrate-Bwl0w6XN.mjs} +5 -5
  41. package/dist/{migrate-CahG6BYV.mjs.map → migrate-Bwl0w6XN.mjs.map} +1 -1
  42. package/dist/{normalize-Bx0bpFop.mjs → normalize-DVSTRZhO.mjs} +18 -1
  43. package/dist/normalize-DVSTRZhO.mjs.map +1 -0
  44. package/dist/{plan-DWvsvy1U.mjs → plan-BNIAD--f.mjs} +11 -11
  45. package/dist/{plan-DWvsvy1U.mjs.map → plan-BNIAD--f.mjs.map} +1 -1
  46. package/dist/{provision-tenant-WTKo93Y0.mjs → provision-tenant-BcZocyyn.mjs} +4 -4
  47. package/dist/{provision-tenant-WTKo93Y0.mjs.map → provision-tenant-BcZocyyn.mjs.map} +1 -1
  48. package/dist/{stackOutputs-W9mnnJuj.mjs → stackOutputs-D33EmyfT.mjs} +3 -3
  49. package/dist/{stackOutputs-W9mnnJuj.mjs.map → stackOutputs-D33EmyfT.mjs.map} +1 -1
  50. package/dist/{status-DLwREPjb.mjs → status-BAPpi2Zt.mjs} +7 -7
  51. package/dist/{status-DLwREPjb.mjs.map → status-BAPpi2Zt.mjs.map} +1 -1
  52. package/dist/{sync-f2K2blwm.mjs → sync-BdJ43vO7.mjs} +8 -8
  53. package/dist/{sync-f2K2blwm.mjs.map → sync-BdJ43vO7.mjs.map} +1 -1
  54. package/dist/tamer.mjs +32 -18
  55. package/dist/tamer.mjs.map +1 -1
  56. package/dist/{types-CqxqYnrT.mjs → types-CN1BOr0U.mjs} +5 -5
  57. package/dist/{types-CqxqYnrT.mjs.map → types-CN1BOr0U.mjs.map} +1 -1
  58. package/dist/{verifyPlanFile-c16z1AMH.mjs → verifyPlanFile-BQ7GCDC2.mjs} +2 -2
  59. package/dist/{verifyPlanFile-c16z1AMH.mjs.map → verifyPlanFile-BQ7GCDC2.mjs.map} +1 -1
  60. package/dist/{wfp-delete-DysvX1u7.mjs → wfp-delete-BG9WBd7F.mjs} +2 -2
  61. package/dist/{wfp-delete-DysvX1u7.mjs.map → wfp-delete-BG9WBd7F.mjs.map} +1 -1
  62. package/dist/{wfp-put-jaVd_LjO.mjs → wfp-put-DjErqxFa.mjs} +2 -2
  63. package/dist/{wfp-put-jaVd_LjO.mjs.map → wfp-put-DjErqxFa.mjs.map} +1 -1
  64. package/dist/{worker-route-Be2IvOdr.mjs → worker-route-DY1onr-h.mjs} +3 -3
  65. package/dist/{worker-route-Be2IvOdr.mjs.map → worker-route-DY1onr-h.mjs.map} +1 -1
  66. package/dist/{workers-aGILs77X.mjs → workers-DNKsZOq4.mjs} +3 -3
  67. package/dist/{workers-aGILs77X.mjs.map → workers-DNKsZOq4.mjs.map} +1 -1
  68. package/package.json +1 -1
  69. package/dist/drift-D5qzCTft.mjs +0 -10
  70. package/dist/fetchStackImports-B4ZJahOt.mjs.map +0 -1
  71. package/dist/generator-CIMbcPzv.mjs.map +0 -1
  72. package/dist/import-BrduwA9Z.mjs.map +0 -1
  73. package/dist/loader-DP7yXqT6.mjs.map +0 -1
  74. package/dist/normalize-Bx0bpFop.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { a as resourceModules } from "./fetchStackImports-B4ZJahOt.mjs";
1
+ import { a as resourceModules, o as secretsStoreDeriveName } from "./fetchStackImports-ClUYZy_U.mjs";
2
2
  import { join } from "path";
3
3
  import { writeFileSync } from "fs";
4
4
 
@@ -10,10 +10,11 @@ import { writeFileSync } from "fs";
10
10
  * message if a referenced store has never been applied — the binding
11
11
  * would otherwise be deployed against a non-existent store.
12
12
  */
13
- function secretsStoreSecretsGenerate(bindings, env, state, naming) {
13
+ function secretsStoreSecretsGenerate(bindings, env, state, naming, secretsStores) {
14
14
  const out = [];
15
15
  for (const b of bindings) {
16
- const derivedName = naming.secretsStoreName(b.store, env);
16
+ const storeConfig = secretsStores?.find((s) => s.logicalName === b.store);
17
+ const derivedName = storeConfig ? secretsStoreDeriveName(storeConfig, env, naming) : naming.secretsStoreName(b.store, env);
17
18
  const entry = state.get(`secrets_store:${derivedName}`);
18
19
  if (!entry || entry.type !== "secrets_store") throw new Error(`Secrets Store binding "${b.binding}" references store "${b.store}" — not in state. Declare it under \`resources.secretsStores\` and run 'tamer apply --env ${env}' first.`);
19
20
  out.push({
@@ -60,7 +61,7 @@ function generateWranglerConfig(resolved, state, naming) {
60
61
  const secretBindings = resolved.resources?.secretsStoreSecrets ?? [];
61
62
  if (secretBindings.length > 0) {
62
63
  const passthroughSecrets = resolved.wranglerConfig.secrets_store_secrets ?? [];
63
- const generated = secretsStoreSecretsGenerate(secretBindings, resolved.env, state, naming);
64
+ const generated = secretsStoreSecretsGenerate(secretBindings, resolved.env, state, naming, resolved.resources?.secretsStores);
64
65
  config = {
65
66
  ...config,
66
67
  secrets_store_secrets: [...passthroughSecrets, ...generated]
@@ -74,4 +75,4 @@ function writeWranglerJson(workerDir, config, outFile = "wrangler.json") {
74
75
 
75
76
  //#endregion
76
77
  export { writeWranglerJson as n, generateWranglerConfig as t };
77
- //# sourceMappingURL=generator-CIMbcPzv.mjs.map
78
+ //# sourceMappingURL=generator-h_VG0Q5f.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator-h_VG0Q5f.mjs","names":["out: GeneratedSecretsStoreSecretBinding[]","config: WranglerConfig"],"sources":["../src/features/secrets-store/secrets-store.generate.ts","../src/core/wrangler/generator.ts"],"sourcesContent":["import type { NamingEngine } from \"../../core/naming/NamingEngine.js\";\nimport type {\n StateEntry,\n SecretsStoreResourceConfig,\n SecretsStoreSecretBinding,\n SecretsStoreStateEntry,\n} from \"../../types.js\";\nimport { secretsStoreDeriveName } from \"./secrets-store.naming.js\";\n\nexport interface SecretsStoreStateLike {\n get(key: string): StateEntry | undefined;\n getAll(): Record<string, StateEntry>;\n}\n\n/**\n * One row of wrangler's `secrets_store_secrets[]` array. Resolved from a\n * worker's declared `secretsStoreSecrets[]` by looking up the\n * Tamer-managed store's `store_id` in state. The named secret itself must\n * already exist inside the store (created out-of-band via wrangler\n * `secrets-store secret create`); Tamer never reads or writes secret\n * values.\n */\nexport interface GeneratedSecretsStoreSecretBinding {\n binding: string;\n store_id: string;\n secret_name: string;\n}\n\n/**\n * Resolve `secretsStoreSecrets[]` worker bindings into wrangler-shape\n * `secrets_store_secrets[]` entries by looking up the referenced\n * Tamer-managed store's `store_id` in state. Throws with an actionable\n * message if a referenced store has never been applied — the binding\n * would otherwise be deployed against a non-existent store.\n */\nexport function secretsStoreSecretsGenerate(\n bindings: SecretsStoreSecretBinding[],\n env: string,\n state: SecretsStoreStateLike,\n naming: NamingEngine,\n secretsStores?: SecretsStoreResourceConfig[],\n): GeneratedSecretsStoreSecretBinding[] {\n const out: GeneratedSecretsStoreSecretBinding[] = [];\n for (const b of bindings) {\n const storeConfig = secretsStores?.find((s) => s.logicalName === b.store);\n const derivedName = storeConfig\n ? secretsStoreDeriveName(storeConfig, env, naming)\n : naming.secretsStoreName(b.store, env);\n const entry = state.get(`secrets_store:${derivedName}`) as\n | SecretsStoreStateEntry\n | undefined;\n if (!entry || entry.type !== \"secrets_store\") {\n throw new Error(\n `Secrets Store binding \"${b.binding}\" references store \"${b.store}\" — ` +\n `not in state. Declare it under \\`resources.secretsStores\\` and run ` +\n `'tamer apply --env ${env}' first.`,\n );\n }\n out.push({\n binding: b.binding,\n store_id: entry.cfId,\n secret_name: b.secretName,\n });\n }\n return out;\n}\n","import { writeFileSync } from \"fs\";\nimport { join } from \"path\";\nimport type { WranglerConfig } from \"../../generated/wrangler-types.js\";\nimport type { ResolvedWorkerConfig } from \"../config/resolver.js\";\nimport type { StateManager } from \"../state/StateManager.js\";\nimport type { NamingEngine } from \"../naming/NamingEngine.js\";\nimport { resourceModules } from \"../registry/registry.js\";\nimport { secretsStoreSecretsGenerate } from \"../../features/secrets-store/secrets-store.generate.js\";\n\nexport class CfiError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"CfiError\";\n }\n}\n\n/**\n * Build the worker's `wrangler.json` by asking every registered resource\n * module for its bindings fragment, then merging on top of the\n * passthrough config (`resolved.wranglerConfig`). Adding a new resource\n * kind requires zero edits here — register the module, done.\n */\nexport function generateWranglerConfig(\n resolved: ResolvedWorkerConfig,\n state: StateManager,\n naming: NamingEngine,\n): WranglerConfig {\n let config: WranglerConfig = {\n ...resolved.wranglerConfig,\n $schema: \"node_modules/wrangler/config-schema.json\",\n };\n\n const worker = {\n workerKey: resolved.workerKey,\n deployedName: resolved.workerName,\n };\n for (const mod of resourceModules) {\n const resources = mod.pickResources(resolved.resources);\n const fragment = mod.generate({\n resources,\n env: resolved.env,\n state,\n naming,\n passthrough: resolved.wranglerConfig,\n worker,\n });\n config = { ...config, ...fragment };\n }\n\n const secretBindings = resolved.resources?.secretsStoreSecrets ?? [];\n if (secretBindings.length > 0) {\n const passthroughSecrets =\n resolved.wranglerConfig.secrets_store_secrets ?? [];\n const generated = secretsStoreSecretsGenerate(\n secretBindings,\n resolved.env,\n state,\n naming,\n resolved.resources?.secretsStores,\n );\n config = {\n ...config,\n secrets_store_secrets: [...passthroughSecrets, ...generated],\n };\n }\n\n return config;\n}\n\nexport function writeWranglerJson(\n workerDir: string,\n config: WranglerConfig,\n outFile: string = \"wrangler.json\",\n): void {\n const path = join(workerDir, outFile);\n writeFileSync(path, JSON.stringify(config, null, 2), \"utf-8\");\n}\n"],"mappings":";;;;;;;;;;;;AAmCA,SAAgB,4BACd,UACA,KACA,OACA,QACA,eACsC;CACtC,MAAMA,MAA4C,EAAE;AACpD,MAAK,MAAM,KAAK,UAAU;EACxB,MAAM,cAAc,eAAe,MAAM,MAAM,EAAE,gBAAgB,EAAE,MAAM;EACzE,MAAM,cAAc,cAChB,uBAAuB,aAAa,KAAK,OAAO,GAChD,OAAO,iBAAiB,EAAE,OAAO,IAAI;EACzC,MAAM,QAAQ,MAAM,IAAI,iBAAiB,cAAc;AAGvD,MAAI,CAAC,SAAS,MAAM,SAAS,gBAC3B,OAAM,IAAI,MACR,0BAA0B,EAAE,QAAQ,sBAAsB,EAAE,MAAM,4FAE1C,IAAI,UAC7B;AAEH,MAAI,KAAK;GACP,SAAS,EAAE;GACX,UAAU,MAAM;GAChB,aAAa,EAAE;GAChB,CAAC;;AAEJ,QAAO;;;;;;;;;;;AC1CT,SAAgB,uBACd,UACA,OACA,QACgB;CAChB,IAAIC,SAAyB;EAC3B,GAAG,SAAS;EACZ,SAAS;EACV;CAED,MAAM,SAAS;EACb,WAAW,SAAS;EACpB,cAAc,SAAS;EACxB;AACD,MAAK,MAAM,OAAO,iBAAiB;EACjC,MAAM,YAAY,IAAI,cAAc,SAAS,UAAU;EACvD,MAAM,WAAW,IAAI,SAAS;GAC5B;GACA,KAAK,SAAS;GACd;GACA;GACA,aAAa,SAAS;GACtB;GACD,CAAC;AACF,WAAS;GAAE,GAAG;GAAQ,GAAG;GAAU;;CAGrC,MAAM,iBAAiB,SAAS,WAAW,uBAAuB,EAAE;AACpE,KAAI,eAAe,SAAS,GAAG;EAC7B,MAAM,qBACJ,SAAS,eAAe,yBAAyB,EAAE;EACrD,MAAM,YAAY,4BAChB,gBACA,SAAS,KACT,OACA,QACA,SAAS,WAAW,cACrB;AACD,WAAS;GACP,GAAG;GACH,uBAAuB,CAAC,GAAG,oBAAoB,GAAG,UAAU;GAC7D;;AAGH,QAAO;;AAGT,SAAgB,kBACd,WACA,QACA,UAAkB,iBACZ;AAEN,eADa,KAAK,WAAW,QAAQ,EACjB,KAAK,UAAU,QAAQ,MAAM,EAAE,EAAE,QAAQ"}
@@ -1,7 +1,7 @@
1
- import { n as loadConfig, t as getWorkers } from "./loader-DP7yXqT6.mjs";
1
+ import { n as loadConfig, t as getWorkers } from "./loader-DnT9iqz9.mjs";
2
2
  import { n as cloudflareAccountIdFromEnv, t as CFApiClient } from "./CFApiClient-DhbyyV71.mjs";
3
- import { _ as namingFromConfig, a as resourceModules, i as getResourceModule, p as resolveWorkerConfig, t as fetchStackImports } from "./fetchStackImports-B4ZJahOt.mjs";
4
- import { f as stackNameForConfig, t as StateManager } from "./StateManager-DTqtLLVX.mjs";
3
+ import { a as resourceModules, i as getResourceModule, m as resolveWorkerConfig, t as fetchStackImports, v as namingFromConfig } from "./fetchStackImports-ClUYZy_U.mjs";
4
+ import { f as stackNameForConfig, t as StateManager } from "./StateManager-JLBtz9V-.mjs";
5
5
  import "./r2S3EmptyBucket-DD81ZWQ7.mjs";
6
6
  import { n as workerRouteStateKey, t as findZoneIdByName } from "./zoneResolver-VoxLHM4N.mjs";
7
7
 
@@ -46,6 +46,8 @@ async function runImport(options) {
46
46
  api,
47
47
  state,
48
48
  naming,
49
+ config,
50
+ baseDir,
49
51
  ts
50
52
  });
51
53
  } else if (options.kind === "dispatch_namespace") await importDispatchNamespace({
@@ -161,4 +163,4 @@ async function importWorkerRoute(ctx) {
161
163
 
162
164
  //#endregion
163
165
  export { runImport };
164
- //# sourceMappingURL=import-BrduwA9Z.mjs.map
166
+ //# sourceMappingURL=import-D8zaVvwK.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import-D8zaVvwK.mjs","names":[],"sources":["../src/cli/commands/import.ts"],"sourcesContent":["import { loadConfig, getWorkers } from \"../../core/config/loader.js\";\nimport { cloudflareAccountIdFromEnv } from \"../../core/cloudflareEnv.js\";\nimport { namingFromConfig } from \"../../core/config/namingFromConfig.js\";\nimport { CFApiClient } from \"../../core/api/CFApiClient.js\";\nimport { StateManager } from \"../../core/state/StateManager.js\";\nimport { stackNameForConfig } from \"../../core/state/stackName.js\";\nimport { resolveWorkerConfig } from \"../../core/config/resolver.js\";\nimport { fetchStackImports } from \"../../core/imports/fetchStackImports.js\";\nimport { workerRouteStateKey } from \"../../features/worker-route/worker-route.stateKey.js\";\nimport { findZoneIdByName } from \"../../core/routes/zoneResolver.js\";\nimport {\n getResourceModule,\n resourceModules,\n type ResourceKind,\n} from \"../../core/registry/registry.js\";\n\n/** All registered resource kinds plus the non-registry imports. */\nexport type ImportKind =\n | ResourceKind\n | \"dispatch_namespace\"\n | \"dns_record\"\n | \"worker_route\";\n\nexport interface ImportOptions {\n env: string;\n kind: ImportKind;\n /** Logical name from `tamer.config.ts` (or worker key, for `worker_route`). */\n logical: string;\n /** Cloudflare resource id (D1 uuid, KV id, R2 bucket name, or namespace name). */\n cfId?: string;\n /** Required for sharded D1 imports (YYYY-MM-DD). */\n shardDate?: string;\n /** R2 buckets only: creation date (YYYY-MM-DD) used in the binding key. */\n createdDate?: string;\n /** worker_route only: the route id from `/zones/{id}/workers/routes`. */\n routeId?: string;\n /** worker_route only: zone name from `tamerRoutes`. */\n zoneName?: string;\n configPath?: string;\n}\n\nconst REGISTRY_KINDS = new Set<string>(resourceModules.map((m) => m.kind));\n\n/**\n * `tamer import` — register an existing Cloudflare resource into Tamer state\n * by logical name (CloudFormation `import_resources` analogue). For all\n * resource-registry kinds the work is delegated to the module's\n * `importOne` hook; `dispatch_namespace` and `worker_route` remain inline\n * because they aren't registry resources today.\n */\nexport async function runImport(options: ImportOptions): Promise<void> {\n const env = options.env;\n if (env === \"local\") {\n throw new Error(\"import: --env local is not supported (no persisted state)\");\n }\n const baseDir = process.cwd();\n const config = await loadConfig(options.configPath, { env });\n const accountId = config.account_id ?? cloudflareAccountIdFromEnv();\n if (!accountId) {\n throw new Error(\n \"account_id required in config or CLOUDFLARE_ACCOUNT_ID env var\",\n );\n }\n const api = new CFApiClient(accountId);\n const naming = namingFromConfig(config);\n const state = new StateManager(\n config.tenant.id,\n env,\n stackNameForConfig(config),\n );\n await state.hydrate(api);\n state.beginOperation(\"import\", `${options.kind}:${options.logical}`);\n\n const ts = new Date().toISOString();\n\n try {\n if (REGISTRY_KINDS.has(options.kind)) {\n const mod = getResourceModule(options.kind as ResourceKind);\n if (!mod) throw new Error(`unknown import kind \"${options.kind}\"`);\n await mod.importOne({\n options: {\n env,\n kind: options.kind,\n logical: options.logical,\n cfId: options.cfId,\n shardDate: options.shardDate,\n createdDate: options.createdDate,\n routeId: options.routeId,\n zoneName: options.zoneName,\n },\n env,\n api,\n state,\n naming,\n config,\n baseDir,\n ts,\n });\n } else if (options.kind === \"dispatch_namespace\") {\n await importDispatchNamespace({ options, env, api, state, ts });\n } else if (options.kind === \"dns_record\") {\n await importDnsRecord({ options, env, api, state, config, ts });\n } else if (options.kind === \"worker_route\") {\n await importWorkerRoute({\n options,\n env,\n baseDir,\n accountId,\n api,\n naming,\n state,\n config,\n ts,\n });\n } else {\n throw new Error(`unknown import kind \"${options.kind}\"`);\n }\n\n state.finishOperation(\"imported\");\n await state.persist(api);\n console.log(`Imported ${options.kind} \"${options.logical}\" into ${env} state.`);\n } catch (err) {\n const msg = err instanceof Error ? err.message : String(err);\n state.failOperation(msg);\n try {\n await state.persist(api);\n } catch {\n /* swallow secondary persist failure */\n }\n throw err;\n }\n}\n\nasync function importDispatchNamespace(ctx: {\n options: ImportOptions;\n env: string;\n api: CFApiClient;\n state: StateManager;\n ts: string;\n}): Promise<void> {\n const { options, api, state, ts } = ctx;\n const namespaces = await api.dispatchNamespaceListAll();\n const hit = namespaces.find((n) => n.namespace_name === options.cfId);\n if (!hit) {\n throw new Error(\n `import dispatch_namespace: namespace \"${options.cfId}\" not found`,\n );\n }\n const derivedName = hit.namespace_name;\n const key = `dispatch_ns:${derivedName}`;\n const existing = state.get(key);\n state.set(key, {\n type: \"dispatch_namespace\",\n logicalName: options.logical,\n derivedName,\n createdAt:\n existing?.type === \"dispatch_namespace\" ? existing.createdAt : ts,\n updatedAt: ts,\n });\n}\n\nasync function importDnsRecord(ctx: {\n options: ImportOptions;\n env: string;\n api: CFApiClient;\n state: StateManager;\n config: Awaited<ReturnType<typeof loadConfig>>;\n ts: string;\n}): Promise<void> {\n const { options, api, state, config, ts } = ctx;\n if (!options.cfId) {\n throw new Error(\n \"import dns_record: --cf-id <recordId> is required (the record id from `tamer drift` or the Cloudflare dashboard URL)\",\n );\n }\n const declared = (config.dnsRecords ?? []).find(\n (r) => r.logicalName === options.logical,\n );\n if (!declared) {\n throw new Error(\n `import dns_record: no dnsRecords entry with logicalName \"${options.logical}\" in the Tamer project config`,\n );\n }\n const list = await api.zoneDnsRecordListAll(declared.zoneId);\n const hit = list.find((r) => r.id === options.cfId);\n if (!hit) {\n throw new Error(\n `import dns_record: record id \"${options.cfId}\" not found in zone \"${declared.zoneId}\"`,\n );\n }\n if (hit.type !== declared.type) {\n throw new Error(\n `import dns_record: cf record type \"${hit.type}\" does not match declared type \"${declared.type}\"`,\n );\n }\n const { dnsRecordStateKey } = await import(\n \"../../features/dns-records/dns-records.resolve.js\"\n );\n const key = dnsRecordStateKey(declared.zoneId, declared.type, declared.name);\n const existing = state.get(key);\n state.set(key, {\n type: \"dns_record\",\n logicalName: options.logical,\n zoneId: declared.zoneId,\n recordType: declared.type,\n name: hit.name,\n content: hit.content,\n ttl: hit.ttl ?? 1,\n proxied: hit.proxied ?? false,\n priority: hit.priority,\n comment: hit.comment ?? \"\",\n recordId: hit.id,\n createdAt: existing?.type === \"dns_record\" ? existing.createdAt : ts,\n updatedAt: ts,\n });\n}\n\nasync function importWorkerRoute(ctx: {\n options: ImportOptions;\n env: string;\n baseDir: string;\n accountId: string;\n api: CFApiClient;\n naming: ReturnType<typeof namingFromConfig>;\n state: StateManager;\n config: Awaited<ReturnType<typeof loadConfig>>;\n ts: string;\n}): Promise<void> {\n const { options, env, baseDir, accountId, api, naming, state, config, ts } =\n ctx;\n if (!options.routeId) {\n throw new Error(\"import worker_route: --route-id <id> is required\");\n }\n const workers = await getWorkers(config, baseDir);\n const wc = workers.find(([k]) => k === options.logical)?.[1];\n if (!wc) {\n throw new Error(\n `import worker_route: no worker key \"${options.logical}\" in the Tamer project config`,\n );\n }\n const imports = await fetchStackImports(api, config, env);\n const resolved = await resolveWorkerConfig(\n config,\n options.logical,\n wc,\n env,\n baseDir,\n accountId,\n naming,\n state,\n { imports },\n );\n if (resolved.apiManagedRoutes.length === 0) {\n throw new Error(\n `import worker_route: worker \"${options.logical}\" declares no api-managed tamerRoutes for env ${env}`,\n );\n }\n\n const route = options.zoneName\n ? resolved.apiManagedRoutes.find((r) => r.zone_name === options.zoneName)\n : resolved.apiManagedRoutes[0];\n if (!route) {\n throw new Error(\n `import worker_route: no route for zone \"${options.zoneName}\" in resolved config`,\n );\n }\n const zoneId = await findZoneIdByName(api, route.zone_name);\n if (!zoneId) {\n throw new Error(`import worker_route: zone \"${route.zone_name}\" not found`);\n }\n const list = await api.zoneWorkerRoutesList(zoneId);\n const hit = list.find((r) => r.id === options.routeId);\n if (!hit) {\n throw new Error(\n `import worker_route: route id \"${options.routeId}\" not found in zone \"${route.zone_name}\"`,\n );\n }\n if (hit.pattern !== route.pattern) {\n throw new Error(\n `import worker_route: cf pattern \"${hit.pattern}\" does not match resolved \"${route.pattern}\"`,\n );\n }\n const key = workerRouteStateKey(zoneId, options.routeId);\n const existing = state.get(key);\n state.set(key, {\n type: \"worker_route\",\n workerKey: options.logical,\n workerName: resolved.workerName,\n zoneId,\n zoneName: route.zone_name,\n routeId: options.routeId,\n pattern: route.pattern,\n createdAt: existing?.type === \"worker_route\" ? existing.createdAt : ts,\n updatedAt: ts,\n });\n}\n"],"mappings":";;;;;;;;AAyCA,MAAM,iBAAiB,IAAI,IAAY,gBAAgB,KAAK,MAAM,EAAE,KAAK,CAAC;;;;;;;;AAS1E,eAAsB,UAAU,SAAuC;CACrE,MAAM,MAAM,QAAQ;AACpB,KAAI,QAAQ,QACV,OAAM,IAAI,MAAM,4DAA4D;CAE9E,MAAM,UAAU,QAAQ,KAAK;CAC7B,MAAM,SAAS,MAAM,WAAW,QAAQ,YAAY,EAAE,KAAK,CAAC;CAC5D,MAAM,YAAY,OAAO,cAAc,4BAA4B;AACnE,KAAI,CAAC,UACH,OAAM,IAAI,MACR,iEACD;CAEH,MAAM,MAAM,IAAI,YAAY,UAAU;CACtC,MAAM,SAAS,iBAAiB,OAAO;CACvC,MAAM,QAAQ,IAAI,aAChB,OAAO,OAAO,IACd,KACA,mBAAmB,OAAO,CAC3B;AACD,OAAM,MAAM,QAAQ,IAAI;AACxB,OAAM,eAAe,UAAU,GAAG,QAAQ,KAAK,GAAG,QAAQ,UAAU;CAEpE,MAAM,sBAAK,IAAI,MAAM,EAAC,aAAa;AAEnC,KAAI;AACF,MAAI,eAAe,IAAI,QAAQ,KAAK,EAAE;GACpC,MAAM,MAAM,kBAAkB,QAAQ,KAAqB;AAC3D,OAAI,CAAC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U,SAAS,iBAAiB,SAAS,YAAY;EACpE,WAAW;EACZ,CAAC"}
package/dist/index.d.mts CHANGED
@@ -5440,10 +5440,27 @@ declare function isCfBinding(x: unknown): x is CfBinding;
5440
5440
  * before validation.
5441
5441
  */
5442
5442
  type TamerResolvableString = string | CfBinding;
5443
+ /** Context for per-resource Cloudflare name resolution (e.g. sharded D1 shard date). */
5444
+ interface CloudflareNameContext {
5445
+ /** ISO `YYYY-MM-DD` shard stamp for sharded D1. */
5446
+ shardDate?: string;
5447
+ }
5448
+ /**
5449
+ * Per-resource Cloudflare name for the current env.
5450
+ * No UUIDs — name only. Used for sync, plan, apply, drift, import, and generate.
5451
+ *
5452
+ * Resolution order when unset: stack {@link NamingConventions} hook → {@link NamingEngine} default.
5453
+ */
5454
+ type CloudflareNameFn = (tenantId: string, env: string, ctx?: CloudflareNameContext) => string;
5443
5455
  /** Wrangler R2 binding with optional {@link TamerResolvableString} `bucket_name`. */
5444
5456
  type WranglerR2BucketResolvable = Omit<WranglerR2Bucket, "bucket_name"> & {
5445
5457
  bucket_name?: TamerResolvableString;
5446
5458
  };
5459
+ /**
5460
+ * Stack identity in `defineConfig({ tenant: … })`. `id` and `slug` feed
5461
+ * default resource names and state keys; `slug` is also the default
5462
+ * {@link CfiStackConfig.name} when `stack.name` is omitted.
5463
+ */
5447
5464
  interface TenantMeta {
5448
5465
  id: string;
5449
5466
  name: string;
@@ -5495,9 +5512,21 @@ interface TenantMeta {
5495
5512
  */
5496
5513
  ephemeralEnvPattern?: string;
5497
5514
  }
5515
+ /**
5516
+ * D1 database declared on a worker's `resources.d1[]`.
5517
+ * Cloudflare **name** for managed databases follows
5518
+ * {@link D1ResourceConfig.cloudflareName} → {@link NamingConventions.d1Single} /
5519
+ * {@link NamingConventions.d1Shard} → defaults; **id** is stored in state after `sync` / `apply`.
5520
+ */
5498
5521
  interface D1ResourceConfig {
5499
5522
  logicalName: string;
5523
+ /** `"single"`: one DB per logical name. `"sharded"`: date-stamped shards (see `d1Shard` naming hook). */
5500
5524
  type: "single" | "sharded";
5525
+ /**
5526
+ * Optional per-resource Cloudflare database name. For sharded D1, receives
5527
+ * {@link CloudflareNameContext.shardDate}. External D1 uses {@link databaseName} instead.
5528
+ */
5529
+ cloudflareName?: CloudflareNameFn;
5501
5530
  /**
5502
5531
  * `managed` (default): Tamer creates the database; the Cloudflare name follows
5503
5532
  * `naming.d1Single` / shard rules.
@@ -5527,13 +5556,18 @@ interface D1ResourceConfig {
5527
5556
  */
5528
5557
  preserveOnDestroy?: boolean;
5529
5558
  }
5559
+ /** R2 bucket on `resources.r2[]`. Name from {@link cloudflareName} → {@link NamingConventions.r2Bucket} → default. */
5530
5560
  interface R2ResourceConfig {
5531
5561
  logicalName: string;
5562
+ /** Optional per-resource Cloudflare bucket name override. */
5563
+ cloudflareName?: CloudflareNameFn;
5532
5564
  /** When set, used as the Wrangler R2 `binding` instead of the generated stable name. */
5533
5565
  binding?: string;
5534
5566
  }
5535
5567
  interface KVResourceConfig {
5536
5568
  logicalName: string;
5569
+ /** Optional per-resource Cloudflare KV namespace name override. */
5570
+ cloudflareName?: CloudflareNameFn;
5537
5571
  /** When set, used as the Wrangler KV `binding` instead of the generated name. */
5538
5572
  binding?: string;
5539
5573
  }
@@ -5546,6 +5580,8 @@ interface KVResourceConfig {
5546
5580
  */
5547
5581
  interface QueueResourceConfig {
5548
5582
  logicalName: string;
5583
+ /** Optional per-resource Cloudflare queue name override. */
5584
+ cloudflareName?: CloudflareNameFn;
5549
5585
  /** When set, used as the Wrangler queue `binding` instead of the generated name. */
5550
5586
  binding?: string;
5551
5587
  /**
@@ -5563,6 +5599,8 @@ interface QueueResourceConfig {
5563
5599
  */
5564
5600
  interface HyperdriveResourceConfig {
5565
5601
  logicalName: string;
5602
+ /** Optional per-resource Cloudflare Hyperdrive config name override. */
5603
+ cloudflareName?: CloudflareNameFn;
5566
5604
  /** When set, used as the Wrangler hyperdrive `binding` instead of the generated name. */
5567
5605
  binding?: string;
5568
5606
  /** Origin database connection. Sent to Cloudflare on create; not stored in Tamer state. */
@@ -5592,6 +5630,8 @@ interface HyperdriveResourceConfig {
5592
5630
  */
5593
5631
  interface VectorizeResourceConfig {
5594
5632
  logicalName: string;
5633
+ /** Optional per-resource Cloudflare Vectorize index name override. */
5634
+ cloudflareName?: CloudflareNameFn;
5595
5635
  /** When set, used as the Wrangler vectorize `binding` instead of the generated name. */
5596
5636
  binding?: string;
5597
5637
  /** Vector dimensionality (e.g. 768 for `@cf/baai/bge-base-en-v1.5`). Immutable. */
@@ -5613,6 +5653,8 @@ interface VectorizeResourceConfig {
5613
5653
  */
5614
5654
  interface AIGatewayResourceConfig {
5615
5655
  logicalName: string;
5656
+ /** Optional per-resource Cloudflare AI Gateway slug override. */
5657
+ cloudflareName?: CloudflareNameFn;
5616
5658
  /** Cache TTL in seconds. Default 0 (caching disabled). */
5617
5659
  cacheTtl?: number;
5618
5660
  /** Invalidate cached entries when upstream model output changes. Default false. */
@@ -5645,6 +5687,8 @@ interface AIGatewayResourceConfig {
5645
5687
  */
5646
5688
  interface PipelineResourceConfig {
5647
5689
  logicalName: string;
5690
+ /** Optional per-resource Cloudflare Pipeline name override. */
5691
+ cloudflareName?: CloudflareNameFn;
5648
5692
  /**
5649
5693
  * Arroyo SQL describing the processing flow, e.g.
5650
5694
  * `insert into my_sink select * from my_stream;`. Stream and sink names
@@ -5693,6 +5737,8 @@ interface HyperdriveOriginSpec {
5693
5737
  */
5694
5738
  interface WorkflowResourceConfig {
5695
5739
  logicalName: string;
5740
+ /** Optional per-resource Cloudflare workflow registration name override. */
5741
+ cloudflareName?: CloudflareNameFn;
5696
5742
  /**
5697
5743
  * Class name exported by the worker that implements this workflow
5698
5744
  * (`export class BillingWorkflow extends WorkflowEntrypoint {...}` →
@@ -6003,6 +6049,8 @@ interface WorkerResources {
6003
6049
  */
6004
6050
  interface SecretsStoreResourceConfig {
6005
6051
  logicalName: string;
6052
+ /** Optional per-resource Cloudflare Secrets Store name override. */
6053
+ cloudflareName?: CloudflareNameFn;
6006
6054
  }
6007
6055
  /**
6008
6056
  * One row in the worker's wrangler `secrets_store_secrets[]` array. Pure
@@ -6139,7 +6187,13 @@ interface CfiConfigBase {
6139
6187
  tenant: TenantMeta;
6140
6188
  account_id?: string;
6141
6189
  compatibility_date?: string;
6142
- /** Optional overrides for generated D1/R2/KV/worker names (see `NamingConventions`). */
6190
+ /**
6191
+ * Optional overrides for Cloudflare-side **names** (D1, R2, worker scripts,
6192
+ * workflows). Use for brownfield stacks whose live names differ from Tamer
6193
+ * defaults; IDs stay in state after `sync` / `apply`, never in config.
6194
+ * @see {@link NamingConventions}
6195
+ * @see docs/brownfield-adoption.md
6196
+ */
6143
6197
  naming?: NamingConventions;
6144
6198
  /** CloudFormation-style stack identity. See {@link CfiStackConfig}. */
6145
6199
  stack?: CfiStackConfig;
@@ -6191,15 +6245,35 @@ interface CfiConfigBase {
6191
6245
  */
6192
6246
  outputs?: Record<string, TamerResolvableString>;
6193
6247
  }
6248
+ /** Single-worker stack: one top-level `worker` (no `workers` map). */
6194
6249
  interface CfiConfigSingle extends CfiConfigBase {
6195
6250
  worker: WorkerConfig;
6196
6251
  workers?: never;
6197
6252
  }
6253
+ /** Multi-worker stack: `workers` keyed by deploy target (e.g. `api`, `admin`). */
6198
6254
  interface CfiConfigMulti extends CfiConfigBase {
6199
6255
  workers: Record<string, WorkerConfig>;
6200
6256
  worker?: never;
6201
6257
  }
6258
+ /**
6259
+ * Root document for `tamer/project.config.ts` (or `tamer.project.config.ts`).
6260
+ * Single-worker stacks use {@link CfiConfigSingle}; multi-worker use
6261
+ * {@link CfiConfigMulti}.
6262
+ */
6202
6263
  type CfiConfig = CfiConfigSingle | CfiConfigMulti;
6264
+ /**
6265
+ * Identity helper for `tamer/project.config.ts` so the config object is typed
6266
+ * as {@link CfiConfig} in the IDE. No runtime transformation — the CLI loads
6267
+ * and validates the exported default.
6268
+ *
6269
+ * @example
6270
+ * ```ts
6271
+ * export default defineConfig({
6272
+ * tenant: { id: "acme", name: "Acme", slug: "acme" },
6273
+ * workers: { api: { main: "workers/api/src/index.ts" } },
6274
+ * });
6275
+ * ```
6276
+ */
6203
6277
  declare function defineConfig(config: CfiConfig): CfiConfig;
6204
6278
  /**
6205
6279
  * Optional metadata on env overlay objects. Stripped before merge; when set, it must
@@ -6220,6 +6294,10 @@ declare const TAMER_OVERLAY_ENV_KEY: "tamerOverlayEnv";
6220
6294
  */
6221
6295
  declare function defineProjectOverlay<E extends string, T extends Record<string, unknown>>(forEnv: E, fragment: T): T & { [K in typeof TAMER_OVERLAY_ENV_KEY]: E };
6222
6296
  declare function defineProjectOverlay<T extends Record<string, unknown>>(fragment: T): T;
6297
+ /**
6298
+ * Identity helper for one entry in `workers` (or the sole `worker` field).
6299
+ * Same pattern as {@link defineConfig} — improves hover types only.
6300
+ */
6223
6301
  declare function defineWorker(config: WorkerConfig): WorkerConfig;
6224
6302
  declare function getDispatchNamespaces(config: CfiConfig): DispatchNamespaceResourceConfig[];
6225
6303
  declare function getDnsRecords(config: CfiConfig): DnsRecordResourceConfig[];
@@ -6579,15 +6657,87 @@ interface TenantStatus {
6579
6657
  env: string;
6580
6658
  workers: WorkerStatus[];
6581
6659
  }
6660
+ /**
6661
+ * Optional functions that derive **Cloudflare resource names** from config
6662
+ * (`logicalName`, `tenant.id`, `env`, etc.). Used when a resource has no
6663
+ * {@link CloudflareNameFn} override on its config.
6664
+ *
6665
+ * **Resolution order (managed resources):**
6666
+ * 1. `resource.cloudflareName?(tenantId, env, ctx?)`
6667
+ * 2. stack `naming.{kindHook}?(...)` (this interface)
6668
+ * 3. {@link NamingEngine} built-in default
6669
+ *
6670
+ * **Greenfield:** omit both per-resource overrides and this block.
6671
+ *
6672
+ * **Brownfield:** use per-resource `cloudflareName` when names differ per
6673
+ * logical resource; use stack hooks for shared formulas. Config holds logical
6674
+ * names and hooks; **state** holds `cfId` after `tamer sync`.
6675
+ *
6676
+ * @see docs/brownfield-adoption.md
6677
+ * @see docs/per-resource-cloudflare-naming.md
6678
+ */
6582
6679
  interface NamingConventions {
6680
+ /**
6681
+ * Cloudflare D1 database name for `resources.d1[]` with `type: "single"`.
6682
+ *
6683
+ * **Default:** `db_{logicalName}_t_{tenantId}_{env}`.
6684
+ *
6685
+ * **`sync`:** exact match on the derived name.
6686
+ */
6583
6687
  d1Single?: (logicalName: string, tenantId: string, env: string) => string;
6688
+ /**
6689
+ * Cloudflare D1 database name for `resources.d1[]` with `type: "sharded"`.
6690
+ *
6691
+ * **`date`:** shard stamp passed to apply (`YYYY-MM-DD` or compact
6692
+ * `YYYYMMDD` after normalization). Your hook should embed it the same way
6693
+ * legacy DBs do (often `date.replace(/-/g, "")`).
6694
+ *
6695
+ * **Default:** `db_{logicalName}_{YYYYMMDD}_t_{tenantId}_{env}` (omits
6696
+ * `{logicalName}_` when logical is `default` or empty).
6697
+ *
6698
+ * **`sync`:** with a custom hook, **derive-and-match** — Tamer parses the
6699
+ * shard date from each account D1 name (`_YYYYMMDD_t_` or `_YYYY_MM_DD_t_`),
6700
+ * re-derives via this function, and adopts when the names are equal. Without
6701
+ * a hook, prefix/suffix regex matching is used instead.
6702
+ */
6584
6703
  d1Shard?: (logicalName: string, date: string, tenantId: string, env: string) => string;
6585
6704
  /**
6586
- * Override default `r2-{logical}-t-{tenantId}-{env}` bucket names.
6587
- * `date` is `YYYYMMDD` (no dashes) from the day apply runs — use only if your scheme embeds a stamp; otherwise ignore it.
6705
+ * R2 bucket name for `resources.r2[]`.
6706
+ *
6707
+ * **`date`:** `YYYYMMDD` (no dashes) from the calendar day **apply** or
6708
+ * **sync** runs. Ignore unless your legacy scheme embeds a date stamp.
6709
+ *
6710
+ * **Default:** `r2-{logicalName}-t-{tenantId}-{env}` (no date segment).
6711
+ *
6712
+ * **`sync`:** exact match on the name produced by calling this hook with
6713
+ * today's date (same as apply). Legacy dated buckets
6714
+ * `r2-{logical}-YYYYMMDD-t-{tenant}-{env}` still match when the hook is
6715
+ * omitted.
6588
6716
  */
6589
6717
  r2Bucket?: (logicalName: string, date: string, tenantId: string, env: string) => string;
6718
+ /**
6719
+ * Deployed Worker **script** name (wrangler `name` / `tamer deploy` target).
6720
+ *
6721
+ * **Default:** `{slug}-{workerKey}-{tenantId}` for `local`; otherwise
6722
+ * `{slug}-{workerKey}-{env}-{tenantId}`. Overridable per worker via
6723
+ * {@link WorkerConfig.scriptName}.
6724
+ *
6725
+ * **`sync`:** worker script list is matched by deployed name (routes use
6726
+ * the same derivation).
6727
+ */
6590
6728
  workerName?: (slug: string, workerKey: string, env: string, tenantId: string) => string;
6729
+ /**
6730
+ * Cloudflare workflow **registration** name for `resources.workflows[]`.
6731
+ * Workflow names are immutable on Cloudflare — brownfield stacks must
6732
+ * return the live registration name here.
6733
+ *
6734
+ * **Default:** `wf-{logicalName}-t-{tenantId}-{env}` (lowercased).
6735
+ *
6736
+ * **`sync`:** exact match on the derived name (same as D1 single / default
6737
+ * R2). Prefer `tamer import --kind workflow` only when a legacy name cannot
6738
+ * be expressed as a function of logical name, tenant, and env.
6739
+ */
6740
+ workflow?: (logicalName: string, tenantId: string, env: string) => string;
6591
6741
  }
6592
6742
  //#endregion
6593
6743
  //#region src/dx/normalize.d.ts
@@ -6612,5 +6762,5 @@ declare function materializeCloudflareBindings(value: unknown): unknown;
6612
6762
  */
6613
6763
  declare function defineCloudflareConfig(config: unknown): CfiConfig;
6614
6764
  //#endregion
6615
- export { AIGatewayResourceConfig, AIGatewayStateEntry, CfBinding, type CfBindingSpec, type CfLogpushPipelinesField, type CfResourceField, type CfResourceKind, CfiConfig, CfiConfigMulti, CfiConfigSingle, CfiOperationName, CfiOperationRecord, CfiOperationStatus, CfiStackConfig, CfiStackMeta, CfiStackOutputValue, CfiState, D1ResourceConfig, D1StateEntry, DispatchNamespaceResourceConfig, DispatchNamespaceStateEntry, DnsRecordResourceConfig, DnsRecordStateEntry, EnvOverride, HyperdriveOriginSpec, HyperdriveResourceConfig, HyperdriveStateEntry, KVResourceConfig, KVStateEntry, LogpushJobPipelinesAutoDestination, LogpushJobPipelinesIngestDestination, LogpushJobR2Destination, LogpushJobResourceConfig, LogpushJobStateEntry, LogpushPipelinesStateEntry, LogpushWorkersTraceDataset, NamingConventions, PipelineResourceConfig, PipelineStateEntry, ProvisioningStatus, QueueResourceConfig, QueueStateEntry, R2ResourceConfig, R2StateEntry, type RawConfig, type RawEnvironment, ResourceStatus, RouteResourceConfig, SecretsStoreResourceConfig, SecretsStoreSecretBinding, SecretsStoreStateEntry, StateEntry, TAMER_OVERLAY_ENV_KEY, TamerResolvableString, TenantD1ShardRef, TenantMeta, TenantStateEntry, TenantStatus, VectorizeResourceConfig, VectorizeStateEntry, WorkerConfig, WorkerResources, WorkerRouteStateEntry, WorkerStatus, WorkflowResourceConfig, WorkflowStateEntry, type WranglerConfig, type WranglerD1Database, type WranglerEnvironment, type WranglerKVNamespace, type WranglerR2Bucket, WranglerR2BucketResolvable, cf, cfBindingSpecToTamerRef, defineCloudflareConfig, defineConfig, defineProjectOverlay, defineWorker, getDispatchNamespaces, getDnsRecords, getLogpushJobs, isCfBinding, materializeCloudflareBindings, materializeTamerResolvable, materializeVars };
6765
+ export { AIGatewayResourceConfig, AIGatewayStateEntry, CfBinding, type CfBindingSpec, type CfLogpushPipelinesField, type CfResourceField, type CfResourceKind, CfiConfig, CfiConfigMulti, CfiConfigSingle, CfiOperationName, CfiOperationRecord, CfiOperationStatus, CfiStackConfig, CfiStackMeta, CfiStackOutputValue, CfiState, CloudflareNameContext, CloudflareNameFn, D1ResourceConfig, D1StateEntry, DispatchNamespaceResourceConfig, DispatchNamespaceStateEntry, DnsRecordResourceConfig, DnsRecordStateEntry, EnvOverride, HyperdriveOriginSpec, HyperdriveResourceConfig, HyperdriveStateEntry, KVResourceConfig, KVStateEntry, LogpushJobPipelinesAutoDestination, LogpushJobPipelinesIngestDestination, LogpushJobR2Destination, LogpushJobResourceConfig, LogpushJobStateEntry, LogpushPipelinesStateEntry, LogpushWorkersTraceDataset, NamingConventions, PipelineResourceConfig, PipelineStateEntry, ProvisioningStatus, QueueResourceConfig, QueueStateEntry, R2ResourceConfig, R2StateEntry, type RawConfig, type RawEnvironment, ResourceStatus, RouteResourceConfig, SecretsStoreResourceConfig, SecretsStoreSecretBinding, SecretsStoreStateEntry, StateEntry, TAMER_OVERLAY_ENV_KEY, TamerResolvableString, TenantD1ShardRef, TenantMeta, TenantStateEntry, TenantStatus, VectorizeResourceConfig, VectorizeStateEntry, WorkerConfig, WorkerResources, WorkerRouteStateEntry, WorkerStatus, WorkflowResourceConfig, WorkflowStateEntry, type WranglerConfig, type WranglerD1Database, type WranglerEnvironment, type WranglerKVNamespace, type WranglerR2Bucket, WranglerR2BucketResolvable, cf, cfBindingSpecToTamerRef, defineCloudflareConfig, defineConfig, defineProjectOverlay, defineWorker, getDispatchNamespaces, getDnsRecords, getLogpushJobs, isCfBinding, materializeCloudflareBindings, materializeTamerResolvable, materializeVars };
6616
6766
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/generated/wrangler-types.generated.ts","../src/generated/wrangler-types.ts","../src/dx/cloudflare-bindings.ts","../src/types.ts","../src/dx/normalize.ts","../src/dx/index.ts"],"sourcesContent":[],"mappings":";;AASA;;;;;AAOA;AAYA;AAaY,KAhCA,KAAA,GAgCA,MAAA,GAhCiB,WAgCI,GAhCU,aAgCV,GAhC0B,iBAgC1B;AAihEjC;;;;;;AAiHU,KA3pEE,oBAAA,GA2pEF,UAAA,GAAA,UAAA,GAAA,cAAA,GAAA,MAAA,GAAA,MAAA,GAAA,cAAA,GAAA,mBAAA;;;;;AAiOkB,KAh3EhB,IAAA,GAg3EgB,MAAA,GAAA,MAAA,GAAA,OAAA,GAAA,IAAA,GA32ExB,IA22EwB,EAAA,GAAA;EA2BZ,CAAA,CAAA,EAAA,MAAA,CAAA,EAp4EG,IAo4EH;CAOA;;;;;AAqwBF,KA1oGF,qBAAA,GA0oGE;EAOA;;;EA0fe,IAAA,EAAA,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{"version":3,"file":"index.d.mts","names":[],"sources":["../src/generated/wrangler-types.generated.ts","../src/generated/wrangler-types.ts","../src/dx/cloudflare-bindings.ts","../src/types.ts","../src/dx/normalize.ts","../src/dx/index.ts"],"sourcesContent":[],"mappings":";;AASA;;;;;AAOA;AAYA;AAaY,KAhCA,KAAA,GAgCA,MAAA,GAhCiB,WAgCI,GAhCU,aAgCV,GAhC0B,iBAgC1B;AAihEjC;;;;;;AAiHU,KA3pEE,oBAAA,GA2pEF,UAAA,GAAA,UAAA,GAAA,cAAA,GAAA,MAAA,GAAA,MAAA,GAAA,cAAA,GAAA,mBAAA;;;;;AAiOkB,KAh3EhB,IAAA,GAg3EgB,MAAA,GAAA,MAAA,GAAA,OAAA,GAAA,IAAA,GA32ExB,IA22EwB,EAAA,GAAA;EA2BZ,CAAA,CAAA,EAAA,MAAA,CAAA,EAp4EG,IAo4EH;CAOA;;;;;AAqwBF,KA1oGF,qBAAA,GA0oGE;EAOA;;;EA0fe,IAAA,EAAA,MAAA;EAAqB;AAoOlD;AASA;EASiB,UAAA,EAAA,MAAA;EAYA;AA+BjB;AAWA;EAsDW,WAAA,CAAA,EAAA,MAAA;EAMQ;;;EAoBL,WAAA,CAAA,EAAA,MAAA;CAiCL,EAAA;;;;;;;;;UAvhEQ,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAsDN;;;;;;mBAMQ,cAAc,gBAAgB;;;;;;;;;;;;;;;;;;;;eAoBlC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAiCL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6MI;oBACM;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A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA6CA,qBAAA;;;;;;;;;;;;KAaL,UAAA,GACR,eACA,eACA,eACA,kBACA,uBACA,sBACA,sBACA,qBACA,qBACA,yBACA,sBACA,8BACA,uBACA,6BACA;;KAGQ,kBAAA;UAQK,gBAAA;;;;;;;;;UAUA,gBAAA;;;sBAGK;;;aAGT;;;;;;;;;UAUI,YAAA;;;;;;;;;KAUL,gBAAA;KAUA,kBAAA;UAEK,kBAAA;WACN;UACD;;;;;;;UAQO,QAAA;;;;;aAKJ,eAAe;;;;YAIhB,eAAe;;UAEjB;;;;;;;;iBAQO,eAAe;;kBAEd;;;;;qBAKG;;;;;;;UAQJ,mBAAA;;;;;;;;KAWL,cAAA;UAEK,YAAA;;;;UAIP;MACJ;;;;YAIM;;MAEN;;;YAA+C;;;;UAIpC,YAAA;UACP;;WAEC;;;;;;;;;;;;;;;;;;;;;UAwBM,iBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AH94CjB;AAA6B,iBILb,0BAAA,CJKa,CAAA,EILiB,qBJKjB,CAAA,EAAA,MAAA;AAAc,iBID3B,eAAA,CJC2B,IAAA,EIAnC,MJAmC,CAAA,MAAA,EIApB,qBJAoB,CAAA,GAAA,SAAA,CAAA,EICxC,MJDwC,CAAA,MAAA,EAAA,MAAA,CAAA,GAAA,SAAA;;;AAO3C;AAYA;AAaA;AAihEiB,iBIpiED,6BAAA,CJoiEe,KAAA,EAAA,OAAA,CAAA,EAAA,OAAA;;;;;;AA1iE/B;AAYA;AAaA;AAihEA;;AA4DmB,iBK1lEH,sBAAA,CL0lEG,MAAA,EAAA,OAAA,CAAA,EK1lEsC,SL0lEtC"}
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as cf, c as TAMER_OVERLAY_ENV_KEY, d as defineWorker, f as getDispatchNamespaces, i as CfBinding, l as defineConfig, m as getLogpushJobs, n as materializeTamerResolvable, o as cfBindingSpecToTamerRef, p as getDnsRecords, r as materializeVars, s as isCfBinding, t as materializeCloudflareBindings, u as defineProjectOverlay } from "./normalize-Bx0bpFop.mjs";
1
+ import { a as cf, c as TAMER_OVERLAY_ENV_KEY, d as defineWorker, f as getDispatchNamespaces, i as CfBinding, l as defineConfig, m as getLogpushJobs, n as materializeTamerResolvable, o as cfBindingSpecToTamerRef, p as getDnsRecords, r as materializeVars, s as isCfBinding, t as materializeCloudflareBindings, u as defineProjectOverlay } from "./normalize-DVSTRZhO.mjs";
2
2
 
3
3
  //#region src/dx/index.ts
4
4
  /**
@@ -1,5 +1,5 @@
1
- import { c as TAMER_OVERLAY_ENV_KEY, t as materializeCloudflareBindings } from "./normalize-Bx0bpFop.mjs";
2
- import { a as boolean, c as number, d as string, f as union, i as array, l as object, n as _enum, r as any, s as literal, u as record } from "./tamer.mjs";
1
+ import { c as TAMER_OVERLAY_ENV_KEY, t as materializeCloudflareBindings } from "./normalize-DVSTRZhO.mjs";
2
+ import { a as boolean, c as literal, d as record, f as string, i as array, l as number, n as _enum, o as custom, p as union, r as any, u as object } from "./tamer.mjs";
3
3
  import { basename, dirname, resolve } from "path";
4
4
  import { existsSync } from "fs";
5
5
 
@@ -234,9 +234,11 @@ const TenantMetaSchema = object({
234
234
  }
235
235
  }, "tenant.ephemeralEnvPattern must be a valid JavaScript RegExp source string")
236
236
  });
237
+ const CloudflareNameFnSchema = custom((v) => v === void 0 || typeof v === "function").optional();
237
238
  const D1ResourceConfigSchema = object({
238
239
  logicalName: string().min(1),
239
240
  type: _enum(["single", "sharded"]),
241
+ cloudflareName: CloudflareNameFnSchema,
240
242
  ownership: _enum(["managed", "external"]).optional(),
241
243
  databaseName: string().optional(),
242
244
  binding: string().optional(),
@@ -246,14 +248,17 @@ const D1ResourceConfigSchema = object({
246
248
  }).refine((d) => d.ownership !== "external" || typeof d.databaseName === "string" && d.databaseName.length > 0, { error: "resources.d1: ownership 'external' requires non-empty databaseName" }).refine((d) => d.ownership !== "external" || d.type === "single", { error: "resources.d1: ownership 'external' only supports type 'single'" });
247
249
  const R2ResourceConfigSchema = object({
248
250
  logicalName: string().min(1),
251
+ cloudflareName: CloudflareNameFnSchema,
249
252
  binding: string().optional()
250
253
  });
251
254
  const KVResourceConfigSchema = object({
252
255
  logicalName: string().min(1),
256
+ cloudflareName: CloudflareNameFnSchema,
253
257
  binding: string().optional()
254
258
  });
255
259
  const QueueResourceConfigSchema = object({
256
260
  logicalName: string().min(1),
261
+ cloudflareName: CloudflareNameFnSchema,
257
262
  binding: string().optional(),
258
263
  consumerOnly: boolean().optional()
259
264
  });
@@ -274,6 +279,7 @@ const HyperdriveOriginSchema = object({
274
279
  });
275
280
  const HyperdriveResourceConfigSchema = object({
276
281
  logicalName: string().min(1),
282
+ cloudflareName: CloudflareNameFnSchema,
277
283
  binding: string().optional(),
278
284
  origin: HyperdriveOriginSchema,
279
285
  caching: object({
@@ -289,6 +295,7 @@ const HyperdriveResourceConfigSchema = object({
289
295
  });
290
296
  const VectorizeResourceConfigSchema = object({
291
297
  logicalName: string().min(1),
298
+ cloudflareName: CloudflareNameFnSchema,
292
299
  binding: string().optional(),
293
300
  dimensions: number().int().positive(),
294
301
  metric: _enum([
@@ -300,6 +307,7 @@ const VectorizeResourceConfigSchema = object({
300
307
  });
301
308
  const AIGatewayResourceConfigSchema = object({
302
309
  logicalName: string().min(1),
310
+ cloudflareName: CloudflareNameFnSchema,
303
311
  cacheTtl: number().int().nonnegative().optional(),
304
312
  cacheInvalidateOnUpdate: boolean().optional(),
305
313
  collectLogs: boolean().optional(),
@@ -379,17 +387,22 @@ const DnsRecordResourceConfigSchema = object({
379
387
  });
380
388
  const PipelineResourceConfigSchema = object({
381
389
  logicalName: string().min(1),
390
+ cloudflareName: CloudflareNameFnSchema,
382
391
  sql: string().min(1),
383
392
  binding: string().min(1).optional()
384
393
  });
385
394
  const WorkflowResourceConfigSchema = object({
386
395
  logicalName: string().min(1),
396
+ cloudflareName: CloudflareNameFnSchema,
387
397
  className: string().min(1),
388
398
  scriptName: string().min(1).optional(),
389
399
  binding: string().min(1).optional(),
390
400
  limits: object({ steps: number().int().positive().optional() }).optional()
391
401
  });
392
- const SecretsStoreResourceConfigSchema = object({ logicalName: string().min(1) });
402
+ const SecretsStoreResourceConfigSchema = object({
403
+ logicalName: string().min(1),
404
+ cloudflareName: CloudflareNameFnSchema
405
+ });
393
406
  const SecretsStoreSecretBindingSchema = object({
394
407
  binding: string().min(1),
395
408
  store: string().min(1),
@@ -515,4 +528,4 @@ async function resolveWorkerConfigRef(wc, baseDir) {
515
528
 
516
529
  //#endregion
517
530
  export { loadConfig as n, getWorkers as t };
518
- //# sourceMappingURL=loader-DP7yXqT6.mjs.map
531
+ //# sourceMappingURL=loader-DnT9iqz9.mjs.map