alchemy 0.20.1 → 0.22.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 (323) hide show
  1. package/lib/ai/astro-file.d.ts +4 -4
  2. package/lib/ai/client.d.ts +1 -1
  3. package/lib/ai/css-file.d.ts +4 -4
  4. package/lib/ai/data.d.ts +4 -4
  5. package/lib/ai/document.d.ts +5 -5
  6. package/lib/ai/html-file.d.ts +4 -4
  7. package/lib/ai/index.d.ts +10 -10
  8. package/lib/ai/json-file.d.ts +4 -4
  9. package/lib/ai/typescript-file.d.ts +4 -4
  10. package/lib/ai/vue-file.d.ts +4 -4
  11. package/lib/ai/yaml-file.d.ts +4 -4
  12. package/lib/alchemy.d.ts +5 -5
  13. package/lib/apply.d.ts +2 -2
  14. package/lib/aws/bucket.d.ts +2 -2
  15. package/lib/aws/control/error.d.ts +1 -1
  16. package/lib/aws/control/index.d.ts +4 -4
  17. package/lib/aws/control/resource.d.ts +2 -2
  18. package/lib/aws/credentials.d.ts +1 -1
  19. package/lib/aws/function.d.ts +3 -3
  20. package/lib/aws/index.d.ts +9 -9
  21. package/lib/aws/oidc/github-oidc-provider.d.ts +1 -1
  22. package/lib/aws/oidc/index.d.ts +2 -2
  23. package/lib/aws/oidc/oidc-provider.d.ts +2 -2
  24. package/lib/aws/policy-attachment.d.ts +2 -2
  25. package/lib/aws/policy.d.ts +2 -2
  26. package/lib/aws/queue.d.ts +2 -2
  27. package/lib/aws/role.d.ts +3 -3
  28. package/lib/aws/ses.d.ts +2 -2
  29. package/lib/aws/table.d.ts +2 -2
  30. package/lib/cloudflare/account-api-token.d.ts +5 -5
  31. package/lib/cloudflare/account-id.d.ts +1 -1
  32. package/lib/cloudflare/ai-gateway.d.ts +3 -3
  33. package/lib/cloudflare/api.d.ts +2 -2
  34. package/lib/cloudflare/assets.d.ts +2 -2
  35. package/lib/cloudflare/auth.d.ts +1 -1
  36. package/lib/cloudflare/bindings.d.ts +18 -18
  37. package/lib/cloudflare/bound.d.ts +19 -16
  38. package/lib/cloudflare/bound.d.ts.map +1 -1
  39. package/lib/cloudflare/bucket.d.ts +4 -4
  40. package/lib/cloudflare/bundle/bundle-worker.d.ts +2 -2
  41. package/lib/cloudflare/custom-domain.d.ts +3 -3
  42. package/lib/cloudflare/custom-domain.js.map +1 -1
  43. package/lib/cloudflare/d1-clone.d.ts +3 -3
  44. package/lib/cloudflare/d1-database.d.ts +3 -3
  45. package/lib/cloudflare/d1-export.d.ts +1 -1
  46. package/lib/cloudflare/d1-import.d.ts +1 -1
  47. package/lib/cloudflare/d1-migrations.d.ts +1 -1
  48. package/lib/cloudflare/dns-records.d.ts +4 -4
  49. package/lib/cloudflare/durable-object-namespace.d.ts +1 -1
  50. package/lib/cloudflare/event-source.d.ts +2 -2
  51. package/lib/cloudflare/hyperdrive.d.ts +4 -4
  52. package/lib/cloudflare/index.d.ts +40 -39
  53. package/lib/cloudflare/index.d.ts.map +1 -1
  54. package/lib/cloudflare/index.js +1 -0
  55. package/lib/cloudflare/index.js.map +1 -1
  56. package/lib/cloudflare/kv-namespace.d.ts +3 -3
  57. package/lib/cloudflare/nuxt.d.ts +4 -4
  58. package/lib/cloudflare/nuxt.d.ts.map +1 -1
  59. package/lib/cloudflare/nuxt.js +2 -1
  60. package/lib/cloudflare/nuxt.js.map +1 -1
  61. package/lib/cloudflare/permission-groups.d.ts +3 -3
  62. package/lib/cloudflare/pipeline.d.ts +4 -4
  63. package/lib/cloudflare/queue-consumer.d.ts +4 -4
  64. package/lib/cloudflare/queue.d.ts +3 -3
  65. package/lib/cloudflare/r2-rest-state-store.d.ts +3 -3
  66. package/lib/cloudflare/react-router.d.ts +13 -0
  67. package/lib/cloudflare/react-router.d.ts.map +1 -0
  68. package/lib/cloudflare/react-router.js +29 -0
  69. package/lib/cloudflare/react-router.js.map +1 -0
  70. package/lib/cloudflare/redwood.d.ts +4 -4
  71. package/lib/cloudflare/route.d.ts +4 -4
  72. package/lib/cloudflare/tanstack-start.d.ts +4 -4
  73. package/lib/cloudflare/user.d.ts +2 -2
  74. package/lib/cloudflare/vectorize-index.d.ts +3 -3
  75. package/lib/cloudflare/vectorize-metadata-index.d.ts +4 -4
  76. package/lib/cloudflare/vite.d.ts +4 -4
  77. package/lib/cloudflare/website.d.ts +3 -3
  78. package/lib/cloudflare/website.d.ts.map +1 -1
  79. package/lib/cloudflare/website.js +30 -35
  80. package/lib/cloudflare/website.js.map +1 -1
  81. package/lib/cloudflare/worker-assets.d.ts +3 -3
  82. package/lib/cloudflare/worker-metadata.d.ts +6 -6
  83. package/lib/cloudflare/worker-metadata.d.ts.map +1 -1
  84. package/lib/cloudflare/worker-metadata.js +110 -26
  85. package/lib/cloudflare/worker-metadata.js.map +1 -1
  86. package/lib/cloudflare/worker-stub.d.ts +3 -3
  87. package/lib/cloudflare/worker.d.ts +26 -17
  88. package/lib/cloudflare/worker.d.ts.map +1 -1
  89. package/lib/cloudflare/worker.js +21 -16
  90. package/lib/cloudflare/worker.js.map +1 -1
  91. package/lib/cloudflare/workflow.d.ts +3 -1
  92. package/lib/cloudflare/workflow.d.ts.map +1 -1
  93. package/lib/cloudflare/workflow.js +3 -0
  94. package/lib/cloudflare/workflow.js.map +1 -1
  95. package/lib/cloudflare/wrangler.json.d.ts +13 -2
  96. package/lib/cloudflare/wrangler.json.d.ts.map +1 -1
  97. package/lib/cloudflare/wrangler.json.js +5 -0
  98. package/lib/cloudflare/wrangler.json.js.map +1 -1
  99. package/lib/cloudflare/zone.d.ts +4 -4
  100. package/lib/context.d.ts +3 -3
  101. package/lib/destroy.d.ts +2 -2
  102. package/lib/dns/import-dns.d.ts +3 -3
  103. package/lib/dns/index.d.ts +2 -2
  104. package/lib/esbuild/bundle.d.ts +2 -2
  105. package/lib/esbuild/index.d.ts +1 -1
  106. package/lib/fs/copy-file.d.ts +2 -2
  107. package/lib/fs/file-system-state-store.d.ts +2 -2
  108. package/lib/fs/file.d.ts +5 -5
  109. package/lib/fs/folder.d.ts +2 -2
  110. package/lib/fs/index.d.ts +14 -14
  111. package/lib/fs/static-astro-file.d.ts +1 -1
  112. package/lib/fs/static-css-file.d.ts +1 -1
  113. package/lib/fs/static-html-file.d.ts +1 -1
  114. package/lib/fs/static-json-file.d.ts +1 -1
  115. package/lib/fs/static-text-file.d.ts +1 -1
  116. package/lib/fs/static-typescript-file.d.ts +1 -1
  117. package/lib/fs/static-vue-file.d.ts +1 -1
  118. package/lib/fs/static-yaml-file.d.ts +1 -1
  119. package/lib/github/index.d.ts +2 -2
  120. package/lib/github/repository-environment.d.ts +2 -2
  121. package/lib/github/secret.d.ts +3 -3
  122. package/lib/index.d.ts +10 -9
  123. package/lib/index.d.ts.map +1 -1
  124. package/lib/index.js +1 -0
  125. package/lib/index.js.map +1 -1
  126. package/lib/internal/docs/providers.d.ts +2 -2
  127. package/lib/neon/api.d.ts +1 -1
  128. package/lib/neon/index.d.ts +3 -3
  129. package/lib/neon/project.d.ts +4 -4
  130. package/lib/os/exec.d.ts +2 -2
  131. package/lib/os/index.d.ts +1 -1
  132. package/lib/resource.d.ts +2 -2
  133. package/lib/runtime/bind.d.ts +3 -3
  134. package/lib/runtime/global.d.ts +1 -1
  135. package/lib/runtime/state.d.ts +1 -1
  136. package/lib/scope.d.ts +3 -3
  137. package/lib/sentry/api.d.ts +1 -1
  138. package/lib/sentry/client-key.d.ts +3 -3
  139. package/lib/sentry/index.d.ts +4 -4
  140. package/lib/sentry/project.d.ts +3 -3
  141. package/lib/sentry/team.d.ts +3 -3
  142. package/lib/serde.d.ts +3 -3
  143. package/lib/state.d.ts +2 -2
  144. package/lib/stripe/index.d.ts +4 -4
  145. package/lib/stripe/index.d.ts.map +1 -1
  146. package/lib/stripe/index.js +1 -1
  147. package/lib/stripe/index.js.map +1 -1
  148. package/lib/stripe/meter.d.ts +2 -2
  149. package/lib/stripe/price.d.ts +2 -2
  150. package/lib/stripe/product.d.ts +2 -2
  151. package/lib/stripe/webhook.d.ts +2 -2
  152. package/lib/test/bun.d.ts +3 -3
  153. package/lib/type.d.ts +6 -0
  154. package/lib/type.d.ts.map +1 -0
  155. package/lib/type.js +7 -0
  156. package/lib/type.js.map +1 -0
  157. package/lib/upstash/api.d.ts +1 -1
  158. package/lib/upstash/index.d.ts +3 -3
  159. package/lib/upstash/redis.d.ts +4 -4
  160. package/lib/vercel/api.d.ts +1 -1
  161. package/lib/vercel/index.d.ts +3 -3
  162. package/lib/vercel/project-domain.d.ts +3 -3
  163. package/lib/vercel/project.d.ts +4 -4
  164. package/lib/web/astro.d.ts +2 -2
  165. package/lib/web/shadcn-component.d.ts +2 -2
  166. package/lib/web/shadcn.d.ts +3 -3
  167. package/lib/web/tailwind.d.ts +2 -2
  168. package/lib/web/vite.d.ts +2 -2
  169. package/lib/web/vitepress/config.d.ts +1 -1
  170. package/lib/web/vitepress/custom-theme.d.ts +4 -4
  171. package/lib/web/vitepress/dependencies.d.ts +2 -2
  172. package/lib/web/vitepress/home-page.d.ts +3 -3
  173. package/lib/web/vitepress/index.d.ts +5 -5
  174. package/lib/web/vitepress/vitepress.d.ts +2 -2
  175. package/package.json +7 -7
  176. package/src/ai/astro-file.ts +5 -5
  177. package/src/ai/client.ts +1 -1
  178. package/src/ai/css-file.ts +5 -5
  179. package/src/ai/data.ts +5 -5
  180. package/src/ai/document.ts +5 -5
  181. package/src/ai/html-file.ts +5 -5
  182. package/src/ai/index.ts +10 -10
  183. package/src/ai/json-file.ts +6 -6
  184. package/src/ai/typescript-file.ts +5 -5
  185. package/src/ai/vue-file.ts +5 -5
  186. package/src/ai/yaml-file.ts +6 -6
  187. package/src/alchemy.ts +9 -9
  188. package/src/apply.ts +6 -6
  189. package/src/aws/bucket.ts +3 -3
  190. package/src/aws/control/client.ts +1 -1
  191. package/src/aws/control/error.ts +1 -1
  192. package/src/aws/control/index.ts +4 -4
  193. package/src/aws/control/proxy.ts +1 -1
  194. package/src/aws/control/resource.ts +5 -5
  195. package/src/aws/credentials.ts +1 -1
  196. package/src/aws/function.ts +4 -4
  197. package/src/aws/index.ts +9 -9
  198. package/src/aws/oidc/github-oidc-provider.ts +1 -1
  199. package/src/aws/oidc/index.ts +2 -2
  200. package/src/aws/oidc/oidc-provider.ts +3 -3
  201. package/src/aws/policy-attachment.ts +3 -3
  202. package/src/aws/policy.ts +2 -2
  203. package/src/aws/queue.ts +2 -2
  204. package/src/aws/role.ts +4 -4
  205. package/src/aws/ses.ts +3 -3
  206. package/src/aws/table.ts +4 -4
  207. package/src/cloudflare/account-api-token.ts +7 -7
  208. package/src/cloudflare/account-id.ts +1 -1
  209. package/src/cloudflare/ai-gateway.ts +6 -6
  210. package/src/cloudflare/api.ts +5 -5
  211. package/src/cloudflare/assets.ts +3 -3
  212. package/src/cloudflare/auth.ts +1 -1
  213. package/src/cloudflare/bindings.ts +18 -18
  214. package/src/cloudflare/bound.ts +60 -50
  215. package/src/cloudflare/bucket.ts +7 -7
  216. package/src/cloudflare/bundle/bundle-worker.ts +8 -8
  217. package/src/cloudflare/bundle/local-dev-cloudflare-shim.ts +1 -1
  218. package/src/cloudflare/bundle/nodejs-compat.ts +1 -1
  219. package/src/cloudflare/custom-domain.ts +5 -5
  220. package/src/cloudflare/d1-clone.ts +3 -3
  221. package/src/cloudflare/d1-database.ts +7 -7
  222. package/src/cloudflare/d1-export.ts +1 -1
  223. package/src/cloudflare/d1-import.ts +1 -1
  224. package/src/cloudflare/d1-migrations.ts +2 -2
  225. package/src/cloudflare/dns-records.ts +5 -5
  226. package/src/cloudflare/durable-object-namespace.ts +1 -1
  227. package/src/cloudflare/event-source.ts +2 -2
  228. package/src/cloudflare/hyperdrive.ts +7 -7
  229. package/src/cloudflare/index.ts +40 -39
  230. package/src/cloudflare/kv-namespace.ts +7 -7
  231. package/src/cloudflare/nuxt.ts +6 -5
  232. package/src/cloudflare/permission-groups.ts +3 -3
  233. package/src/cloudflare/pipeline.ts +7 -7
  234. package/src/cloudflare/queue-consumer.ts +5 -5
  235. package/src/cloudflare/queue.ts +6 -6
  236. package/src/cloudflare/r2-rest-state-store.ts +8 -8
  237. package/src/cloudflare/react-router.ts +45 -0
  238. package/src/cloudflare/redwood.ts +4 -4
  239. package/src/cloudflare/route.ts +5 -5
  240. package/src/cloudflare/tanstack-start.ts +4 -4
  241. package/src/cloudflare/user.ts +3 -3
  242. package/src/cloudflare/vectorize-index.ts +6 -6
  243. package/src/cloudflare/vectorize-metadata-index.ts +5 -5
  244. package/src/cloudflare/vite.ts +4 -4
  245. package/src/cloudflare/website.ts +42 -48
  246. package/src/cloudflare/worker-assets.ts +4 -4
  247. package/src/cloudflare/worker-metadata.ts +134 -43
  248. package/src/cloudflare/worker-stub.ts +4 -4
  249. package/src/cloudflare/worker.ts +169 -124
  250. package/src/cloudflare/workflow.ts +7 -2
  251. package/src/cloudflare/wrangler.json.ts +21 -2
  252. package/src/cloudflare/zone.ts +5 -5
  253. package/src/context.ts +4 -4
  254. package/src/destroy.ts +4 -4
  255. package/src/dns/import-dns.ts +3 -3
  256. package/src/dns/index.ts +2 -2
  257. package/src/esbuild/bundle.ts +2 -2
  258. package/src/esbuild/index.ts +1 -1
  259. package/src/fs/copy-file.ts +3 -3
  260. package/src/fs/file-system-state-store.ts +5 -5
  261. package/src/fs/file.ts +7 -7
  262. package/src/fs/folder.ts +3 -3
  263. package/src/fs/index.ts +14 -14
  264. package/src/fs/static-astro-file.ts +1 -1
  265. package/src/fs/static-css-file.ts +1 -1
  266. package/src/fs/static-html-file.ts +1 -1
  267. package/src/fs/static-json-file.ts +1 -1
  268. package/src/fs/static-text-file.ts +1 -1
  269. package/src/fs/static-typescript-file.ts +1 -1
  270. package/src/fs/static-vue-file.ts +1 -1
  271. package/src/fs/static-yaml-file.ts +1 -1
  272. package/src/github/index.ts +2 -2
  273. package/src/github/repository-environment.ts +3 -3
  274. package/src/github/secret.ts +4 -4
  275. package/src/index.ts +10 -9
  276. package/src/internal/docs/providers.ts +4 -4
  277. package/src/neon/api.ts +2 -2
  278. package/src/neon/index.ts +3 -3
  279. package/src/neon/project.ts +6 -6
  280. package/src/os/exec.ts +2 -2
  281. package/src/os/index.ts +1 -1
  282. package/src/resource.ts +3 -3
  283. package/src/runtime/bind.ts +7 -7
  284. package/src/runtime/global.ts +1 -1
  285. package/src/runtime/state.ts +1 -1
  286. package/src/scope.ts +5 -5
  287. package/src/secret.ts +1 -1
  288. package/src/sentry/api.ts +2 -2
  289. package/src/sentry/client-key.ts +4 -4
  290. package/src/sentry/index.ts +4 -4
  291. package/src/sentry/project.ts +4 -4
  292. package/src/sentry/team.ts +4 -4
  293. package/src/serde.ts +4 -4
  294. package/src/state.ts +3 -3
  295. package/src/stripe/index.ts +4 -4
  296. package/src/stripe/meter.ts +2 -2
  297. package/src/stripe/price.ts +2 -2
  298. package/src/stripe/product.ts +2 -2
  299. package/src/stripe/webhook.ts +2 -2
  300. package/src/test/bun.ts +5 -5
  301. package/src/type.ts +9 -0
  302. package/src/upstash/api.ts +1 -1
  303. package/src/upstash/index.ts +3 -3
  304. package/src/upstash/redis.ts +6 -6
  305. package/src/vercel/api.ts +2 -2
  306. package/src/vercel/index.ts +3 -3
  307. package/src/vercel/project-domain.ts +4 -4
  308. package/src/vercel/project.ts +4 -4
  309. package/src/web/astro.ts +7 -7
  310. package/src/web/shadcn-component.ts +3 -3
  311. package/src/web/shadcn.ts +6 -6
  312. package/src/web/tailwind.ts +4 -4
  313. package/src/web/vite.ts +8 -8
  314. package/src/web/vitepress/config.ts +1 -1
  315. package/src/web/vitepress/custom-theme.ts +10 -10
  316. package/src/web/vitepress/dependencies.ts +2 -2
  317. package/src/web/vitepress/home-page.ts +4 -4
  318. package/src/web/vitepress/index.ts +5 -5
  319. package/src/web/vitepress/vitepress.ts +7 -7
  320. package/lib/runtime/shims.d.ts +0 -6
  321. package/lib/runtime/shims.d.ts.map +0 -1
  322. package/lib/runtime/shims.js +0 -27
  323. package/lib/runtime/shims.js.map +0 -1
@@ -4,9 +4,9 @@ import {
4
4
  IAMClient,
5
5
  NoSuchEntityException,
6
6
  } from "@aws-sdk/client-iam";
7
- import type { Context } from "../context.js";
8
- import { Resource } from "../resource.js";
9
- import { ignore } from "../util/ignore.js";
7
+ import type { Context } from "../context.ts";
8
+ import { Resource } from "../resource.ts";
9
+ import { ignore } from "../util/ignore.ts";
10
10
 
11
11
  /**
12
12
  * Properties for creating or updating a policy attachment
package/src/aws/policy.ts CHANGED
@@ -9,8 +9,8 @@ import {
9
9
  ListPolicyVersionsCommand,
10
10
  NoSuchEntityException,
11
11
  } from "@aws-sdk/client-iam";
12
- import type { Context } from "../context.js";
13
- import { Resource } from "../resource.js";
12
+ import type { Context } from "../context.ts";
13
+ import { Resource } from "../resource.ts";
14
14
 
15
15
  /**
16
16
  * Type of effect for a policy statement
package/src/aws/queue.ts CHANGED
@@ -7,8 +7,8 @@ import {
7
7
  QueueDoesNotExist,
8
8
  SQSClient,
9
9
  } from "@aws-sdk/client-sqs";
10
- import type { Context } from "../context.js";
11
- import { Resource } from "../resource.js";
10
+ import type { Context } from "../context.ts";
11
+ import { Resource } from "../resource.ts";
12
12
 
13
13
  /**
14
14
  * Properties for creating or updating an SQS queue
package/src/aws/role.ts CHANGED
@@ -15,10 +15,10 @@ import {
15
15
  UpdateAssumeRolePolicyCommand,
16
16
  UpdateRoleCommand,
17
17
  } from "@aws-sdk/client-iam";
18
- import type { Context } from "../context.js";
19
- import { Resource } from "../resource.js";
20
- import { ignore } from "../util/ignore.js";
21
- import type { PolicyDocument } from "./policy.js";
18
+ import type { Context } from "../context.ts";
19
+ import { Resource } from "../resource.ts";
20
+ import { ignore } from "../util/ignore.ts";
21
+ import type { PolicyDocument } from "./policy.ts";
22
22
 
23
23
  /**
24
24
  * Properties for creating or updating an IAM role
package/src/aws/ses.ts CHANGED
@@ -19,9 +19,9 @@ import {
19
19
  type SuppressionOptions,
20
20
  type TrackingOptions,
21
21
  } from "@aws-sdk/client-sesv2";
22
- import type { Context } from "../context.js";
23
- import { Resource } from "../resource.js";
24
- import { ignore } from "../util/ignore.js";
22
+ import type { Context } from "../context.ts";
23
+ import { Resource } from "../resource.ts";
24
+ import { ignore } from "../util/ignore.ts";
25
25
 
26
26
  /**
27
27
  * Properties for configuring AWS SES resources
package/src/aws/table.ts CHANGED
@@ -8,10 +8,10 @@ import {
8
8
  ResourceInUseException,
9
9
  ResourceNotFoundException,
10
10
  } from "@aws-sdk/client-dynamodb";
11
- import type { Context } from "../context.js";
12
- import { Resource } from "../resource.js";
13
- import { ignore } from "../util/ignore.js";
14
- import { withExponentialBackoff } from "../util/retry.js";
11
+ import type { Context } from "../context.ts";
12
+ import { Resource } from "../resource.ts";
13
+ import { ignore } from "../util/ignore.ts";
14
+ import { withExponentialBackoff } from "../util/retry.ts";
15
15
 
16
16
  /**
17
17
  * Properties for creating or updating a DynamoDB table
@@ -1,13 +1,13 @@
1
- import { alchemy } from "../alchemy.js";
2
- import type { Context } from "../context.js";
3
- import { Resource } from "../resource.js";
4
- import type { Secret } from "../secret.js";
5
- import { sha256 } from "../util/sha256.js";
6
- import { createCloudflareApi, type CloudflareApiOptions } from "./api.js";
1
+ import { alchemy } from "../alchemy.ts";
2
+ import type { Context } from "../context.ts";
3
+ import { Resource } from "../resource.ts";
4
+ import type { Secret } from "../secret.ts";
5
+ import { sha256 } from "../util/sha256.ts";
6
+ import { createCloudflareApi, type CloudflareApiOptions } from "./api.ts";
7
7
  import {
8
8
  PermissionGroups,
9
9
  type PermissionGroupName,
10
- } from "./permission-groups.js";
10
+ } from "./permission-groups.ts";
11
11
 
12
12
  /**
13
13
  * Permission group for a token policy
@@ -1,4 +1,4 @@
1
- import { createCloudflareApi, type CloudflareApiOptions } from "./api.js";
1
+ import { createCloudflareApi, type CloudflareApiOptions } from "./api.ts";
2
2
 
3
3
  /**
4
4
  * Options for getting a Cloudflare account ID
@@ -1,9 +1,9 @@
1
- import type { Context } from "../context.js";
2
- import { Resource } from "../resource.js";
3
- import { bind } from "../runtime/bind.js";
4
- import { handleApiError } from "./api-error.js";
5
- import { createCloudflareApi, type CloudflareApiOptions } from "./api.js";
6
- import type { Bound } from "./bound.js";
1
+ import type { Context } from "../context.ts";
2
+ import { Resource } from "../resource.ts";
3
+ import { bind } from "../runtime/bind.ts";
4
+ import { handleApiError } from "./api-error.ts";
5
+ import { createCloudflareApi, type CloudflareApiOptions } from "./api.ts";
6
+ import type { Bound } from "./bound.ts";
7
7
 
8
8
  /**
9
9
  * Properties for creating or updating a Cloudflare AI Gateway.
@@ -1,11 +1,11 @@
1
- import { alchemy } from "../alchemy.js";
2
- import type { Secret } from "../secret.js";
3
- import { withExponentialBackoff } from "../util/retry.js";
1
+ import { alchemy } from "../alchemy.ts";
2
+ import type { Secret } from "../secret.ts";
3
+ import { withExponentialBackoff } from "../util/retry.ts";
4
4
  import {
5
5
  getCloudflareAuthHeaders,
6
6
  type CloudflareAuthOptions,
7
- } from "./auth.js";
8
- import { getCloudflareAccounts, getUserEmailFromApiKey } from "./user.js";
7
+ } from "./auth.ts";
8
+ import { getCloudflareAccounts, getUserEmailFromApiKey } from "./user.ts";
9
9
 
10
10
  /**
11
11
  * Options for Cloudflare API requests
@@ -1,8 +1,8 @@
1
1
  import * as fs from "node:fs/promises";
2
2
  import * as path from "node:path";
3
- import type { Context } from "../context.js";
4
- import { Resource } from "../resource.js";
5
- import { getContentType } from "../util/content-type.js";
3
+ import type { Context } from "../context.ts";
4
+ import { Resource } from "../resource.ts";
5
+ import { getContentType } from "../util/content-type.ts";
6
6
 
7
7
  /**
8
8
  * Properties for creating or updating Assets
@@ -1,7 +1,7 @@
1
1
  import fs from "node:fs/promises";
2
2
  import os from "node:os";
3
3
  import path from "node:path";
4
- import type { Secret } from "../secret.js";
4
+ import type { Secret } from "../secret.ts";
5
5
  /**
6
6
  * Authentication options for Cloudflare API
7
7
  */
@@ -3,24 +3,24 @@
3
3
  * Based on Cloudflare API documentation:
4
4
  * https://developers.cloudflare.com/api/resources/workers/subresources/scripts/methods/update/
5
5
  */
6
- import type { Secret } from "../secret.js";
7
- import type { AiGatewayResource } from "./ai-gateway.js";
8
- import type { Ai } from "./ai.js";
9
- import type { AnalyticsEngineDataset } from "./analytics-engine.js";
10
- import type { Assets } from "./assets.js";
11
- import type { Bound } from "./bound.js";
12
- import type { BrowserRendering } from "./browser-rendering.js";
13
- import type { R2BucketResource } from "./bucket.js";
14
- import type { D1DatabaseResource } from "./d1-database.js";
15
- import type { DurableObjectNamespace } from "./durable-object-namespace.js";
16
- import type { HyperdriveResource } from "./hyperdrive.js";
17
- import type { KVNamespaceResource } from "./kv-namespace.js";
18
- import type { PipelineResource } from "./pipeline.js";
19
- import type { QueueResource } from "./queue.js";
20
- import type { VectorizeIndexResource } from "./vectorize-index.js";
21
- import type { WorkerStub } from "./worker-stub.js";
22
- import type { Worker } from "./worker.js";
23
- import type { Workflow } from "./workflow.js";
6
+ import type { Secret } from "../secret.ts";
7
+ import type { AiGatewayResource } from "./ai-gateway.ts";
8
+ import type { Ai } from "./ai.ts";
9
+ import type { AnalyticsEngineDataset } from "./analytics-engine.ts";
10
+ import type { Assets } from "./assets.ts";
11
+ import type { Bound } from "./bound.ts";
12
+ import type { BrowserRendering } from "./browser-rendering.ts";
13
+ import type { R2BucketResource } from "./bucket.ts";
14
+ import type { D1DatabaseResource } from "./d1-database.ts";
15
+ import type { DurableObjectNamespace } from "./durable-object-namespace.ts";
16
+ import type { HyperdriveResource } from "./hyperdrive.ts";
17
+ import type { KVNamespaceResource } from "./kv-namespace.ts";
18
+ import type { PipelineResource } from "./pipeline.ts";
19
+ import type { QueueResource } from "./queue.ts";
20
+ import type { VectorizeIndexResource } from "./vectorize-index.ts";
21
+ import type { WorkerStub } from "./worker-stub.ts";
22
+ import type { Worker } from "./worker.ts";
23
+ import type { Workflow } from "./workflow.ts";
24
24
 
25
25
  export type Bindings = {
26
26
  [bindingName: string]: Binding;
@@ -1,19 +1,20 @@
1
1
  import type { Pipeline } from "cloudflare:pipelines";
2
- import type { Secret } from "../secret.js";
3
- import type { AiGatewayResource as _AiGateway } from "./ai-gateway.js";
4
- import type { Ai as _Ai } from "./ai.js";
5
- import type { AnalyticsEngineDataset as _AnalyticsEngineDataset } from "./analytics-engine.js";
6
- import type { Assets } from "./assets.js";
7
- import type { Binding, Json, Self } from "./bindings.js";
8
- import type { BrowserRendering } from "./browser-rendering.js";
9
- import type { R2BucketResource as _R2Bucket } from "./bucket.js";
10
- import type { D1DatabaseResource } from "./d1-database.js";
11
- import type { DurableObjectNamespace as _DurableObjectNamespace } from "./durable-object-namespace.js";
12
- import type { HyperdriveResource as _Hyperdrive } from "./hyperdrive.js";
13
- import type { PipelineResource as _Pipeline } from "./pipeline.js";
14
- import type { QueueResource as _Queue } from "./queue.js";
15
- import type { VectorizeIndexResource as _VectorizeIndex } from "./vectorize-index.js";
16
- import type { Workflow as _Workflow } from "./workflow.js";
2
+ import type { Secret } from "../secret.ts";
3
+ import type { AiGatewayResource as _AiGateway } from "./ai-gateway.ts";
4
+ import type { Ai as _Ai } from "./ai.ts";
5
+ import type { AnalyticsEngineDataset as _AnalyticsEngineDataset } from "./analytics-engine.ts";
6
+ import type { Assets } from "./assets.ts";
7
+ import type { Binding, Json, Self } from "./bindings.ts";
8
+ import type { BrowserRendering } from "./browser-rendering.ts";
9
+ import type { R2BucketResource as _R2Bucket } from "./bucket.ts";
10
+ import type { D1DatabaseResource } from "./d1-database.ts";
11
+ import type { DurableObjectNamespace as _DurableObjectNamespace } from "./durable-object-namespace.ts";
12
+ import type { HyperdriveResource as _Hyperdrive } from "./hyperdrive.ts";
13
+ import type { PipelineResource as _Pipeline } from "./pipeline.ts";
14
+ import type { QueueResource as _Queue } from "./queue.ts";
15
+ import type { VectorizeIndexResource as _VectorizeIndex } from "./vectorize-index.ts";
16
+ import type { Worker as _Worker } from "./worker.ts";
17
+ import type { Workflow as _Workflow } from "./workflow.ts";
17
18
 
18
19
  export type Bound<T extends Binding> = T extends _DurableObjectNamespace<
19
20
  infer O
@@ -21,38 +22,47 @@ export type Bound<T extends Binding> = T extends _DurableObjectNamespace<
21
22
  ? DurableObjectNamespace<O>
22
23
  : T extends { type: "kv_namespace" }
23
24
  ? KVNamespace
24
- : T extends { type: "service" }
25
- ? Service
26
- : T extends _R2Bucket
27
- ? R2Bucket
28
- : T extends _AiGateway
29
- ? AiGateway
30
- : T extends _Hyperdrive
31
- ? Hyperdrive
32
- : T extends Secret
33
- ? string
34
- : T extends Assets
35
- ? Service
36
- : T extends _Workflow<infer P>
37
- ? Workflow<P>
38
- : T extends D1DatabaseResource
39
- ? D1Database
40
- : T extends _VectorizeIndex
41
- ? VectorizeIndex
42
- : T extends _Queue<infer Body>
43
- ? Queue<Body>
44
- : T extends _AnalyticsEngineDataset
45
- ? AnalyticsEngineDataset
46
- : T extends _Pipeline<infer R>
47
- ? Pipeline<R>
48
- : T extends string
49
- ? string
50
- : T extends BrowserRendering
51
- ? Fetcher
52
- : T extends _Ai<infer M>
53
- ? Ai<M>
54
- : T extends Self
55
- ? Service
56
- : T extends Json<infer T>
57
- ? T
58
- : Service;
25
+ : T extends _Worker<any, infer RPC>
26
+ ? Service<RPC> & {
27
+ // cloudflare's Rpc.Provider type loses mapping between properties (jump to definition)
28
+ // we fix that using Pick to re-connect mappings
29
+ [property in keyof Pick<
30
+ RPC,
31
+ Extract<keyof Rpc.Provider<RPC, "fetch" | "connect">, keyof RPC>
32
+ >]: Rpc.Provider<RPC, "fetch" | "connect">[property];
33
+ }
34
+ : T extends { type: "service" }
35
+ ? Service
36
+ : T extends _R2Bucket
37
+ ? R2Bucket
38
+ : T extends _AiGateway
39
+ ? AiGateway
40
+ : T extends _Hyperdrive
41
+ ? Hyperdrive
42
+ : T extends Secret
43
+ ? string
44
+ : T extends Assets
45
+ ? Service
46
+ : T extends _Workflow<infer P>
47
+ ? Workflow<P>
48
+ : T extends D1DatabaseResource
49
+ ? D1Database
50
+ : T extends _VectorizeIndex
51
+ ? VectorizeIndex
52
+ : T extends _Queue<infer Body>
53
+ ? Queue<Body>
54
+ : T extends _AnalyticsEngineDataset
55
+ ? AnalyticsEngineDataset
56
+ : T extends _Pipeline<infer R>
57
+ ? Pipeline<R>
58
+ : T extends string
59
+ ? string
60
+ : T extends BrowserRendering
61
+ ? Fetcher
62
+ : T extends _Ai<infer M>
63
+ ? Ai<M>
64
+ : T extends Self
65
+ ? Service
66
+ : T extends Json<infer T>
67
+ ? T
68
+ : Service;
@@ -1,11 +1,11 @@
1
1
  import { AwsClient } from "aws4fetch";
2
- import type { Context } from "../context.js";
3
- import { Resource, ResourceKind } from "../resource.js";
4
- import { bind } from "../runtime/bind.js";
5
- import type { Secret } from "../secret.js";
6
- import { CloudflareApiError, handleApiError } from "./api-error.js";
7
- import { type CloudflareApi, createCloudflareApi } from "./api.js";
8
- import type { Bound } from "./bound.js";
2
+ import type { Context } from "../context.ts";
3
+ import { Resource, ResourceKind } from "../resource.ts";
4
+ import { bind } from "../runtime/bind.ts";
5
+ import type { Secret } from "../secret.ts";
6
+ import { CloudflareApiError, handleApiError } from "./api-error.ts";
7
+ import { type CloudflareApi, createCloudflareApi } from "./api.ts";
8
+ import type { Bound } from "./bound.ts";
9
9
 
10
10
  /**
11
11
  * Properties for creating or updating an R2 Bucket
@@ -1,15 +1,15 @@
1
1
  import fs from "node:fs/promises";
2
- import { Bundle } from "../../esbuild/bundle.js";
3
- import type { Bindings } from "../bindings.js";
4
- import type { WorkerProps } from "../worker.js";
5
- import { createAliasPlugin } from "./alias-plugin.js";
2
+ import { Bundle } from "../../esbuild/bundle.ts";
3
+ import type { Bindings } from "../bindings.ts";
4
+ import type { WorkerProps } from "../worker.ts";
5
+ import { createAliasPlugin } from "./alias-plugin.ts";
6
6
  import {
7
7
  isBuildFailure,
8
8
  rewriteNodeCompatBuildFailure,
9
- } from "./build-failures.js";
10
- import { external, external_als } from "./external.js";
11
- import { getNodeJSCompatMode } from "./nodejs-compat-mode.js";
12
- import { nodeJsCompatPlugin } from "./nodejs-compat.js";
9
+ } from "./build-failures.ts";
10
+ import { external, external_als } from "./external.ts";
11
+ import { getNodeJSCompatMode } from "./nodejs-compat-mode.ts";
12
+ import { nodeJsCompatPlugin } from "./nodejs-compat.ts";
13
13
 
14
14
  export async function bundleWorkerScript<B extends Bindings>(
15
15
  props: WorkerProps<B> & {
@@ -1,4 +1,4 @@
1
- import { dedent } from "../../util/dedent.js";
1
+ import { dedent } from "../../util/dedent.ts";
2
2
 
3
3
  /**
4
4
  * TanStackStart server functions and middleware run in Node.js intead of Miniflare when using `vite dev`.
@@ -6,7 +6,7 @@ import type { Plugin, PluginBuild } from "esbuild";
6
6
  import assert from "node:assert";
7
7
  import module, { createRequire } from "node:module";
8
8
  import nodePath from "node:path";
9
- import { dedent } from "../../util/dedent.js";
9
+ import { dedent } from "../../util/dedent.ts";
10
10
 
11
11
  const _require =
12
12
  typeof require === "undefined" ? createRequire(import.meta.url) : require;
@@ -1,11 +1,11 @@
1
- import type { Context } from "../context.js";
2
- import { Resource } from "../resource.js";
3
- import { handleApiError } from "./api-error.js";
1
+ import type { Context } from "../context.ts";
2
+ import { Resource } from "../resource.ts";
3
+ import { handleApiError } from "./api-error.ts";
4
4
  import {
5
- type CloudflareApi,
6
5
  createCloudflareApi,
6
+ type CloudflareApi,
7
7
  type CloudflareApiOptions,
8
- } from "./api.js";
8
+ } from "./api.ts";
9
9
 
10
10
  /**
11
11
  * Properties for creating or updating a CustomDomain
@@ -1,14 +1,14 @@
1
- import type { CloudflareApi } from "./api.js";
1
+ import type { CloudflareApi } from "./api.ts";
2
2
  import {
3
3
  exportD1Database,
4
4
  type ExportD1DatabaseOptions,
5
5
  type ExportD1DatabaseResult,
6
- } from "./d1-export.js";
6
+ } from "./d1-export.ts";
7
7
  import {
8
8
  importD1Database,
9
9
  type ImportD1DatabaseOptions,
10
10
  type ImportD1DatabaseResult,
11
- } from "./d1-import.js";
11
+ } from "./d1-import.ts";
12
12
 
13
13
  /**
14
14
  * Options for cloning a D1 database
@@ -1,14 +1,14 @@
1
- import type { Context } from "../context.js";
2
- import { Resource, ResourceKind } from "../resource.js";
3
- import { bind, type Bound } from "../runtime/bind.js";
4
- import { CloudflareApiError, handleApiError } from "./api-error.js";
1
+ import type { Context } from "../context.ts";
2
+ import { Resource, ResourceKind } from "../resource.ts";
3
+ import { bind, type Bound } from "../runtime/bind.ts";
4
+ import { CloudflareApiError, handleApiError } from "./api-error.ts";
5
5
  import {
6
6
  createCloudflareApi,
7
7
  type CloudflareApi,
8
8
  type CloudflareApiOptions,
9
- } from "./api.js";
10
- import { cloneD1Database } from "./d1-clone.js";
11
- import { applyMigrations, listMigrationsFiles } from "./d1-migrations.js";
9
+ } from "./api.ts";
10
+ import { cloneD1Database } from "./d1-clone.ts";
11
+ import { applyMigrations, listMigrationsFiles } from "./d1-migrations.ts";
12
12
 
13
13
  /**
14
14
  * Properties for creating or updating a D1 Database
@@ -1,4 +1,4 @@
1
- import type { CloudflareApi } from "./api.js"; // Ensure CloudflareApi is exported if not already
1
+ import type { CloudflareApi } from "./api.ts"; // Ensure CloudflareApi is exported if not already
2
2
 
3
3
  /**
4
4
  * Options for exporting a D1 database
@@ -1,5 +1,5 @@
1
1
  import { createHash } from "node:crypto";
2
- import type { CloudflareApi } from "./api.js";
2
+ import type { CloudflareApi } from "./api.ts";
3
3
 
4
4
  /**
5
5
  * Options for importing SQL into a D1 database
@@ -1,7 +1,7 @@
1
1
  import * as fs from "node:fs/promises";
2
2
  import * as path from "node:path";
3
- import { handleApiError } from "./api-error.js";
4
- import type { CloudflareApi } from "./api.js";
3
+ import { handleApiError } from "./api-error.ts";
4
+ import type { CloudflareApi } from "./api.ts";
5
5
 
6
6
  export interface D1MigrationOptions {
7
7
  migrationsFiles: Array<{ id: string; sql: string }>;
@@ -1,16 +1,16 @@
1
- import type { Context } from "../context.js";
1
+ import type { Context } from "../context.ts";
2
2
  import type {
3
3
  DnsRecord as BaseDnsRecord,
4
4
  DnsRecordType,
5
5
  DnsRecordWithMetadata,
6
- } from "../dns/record.js";
7
- import { Resource } from "../resource.js";
6
+ } from "../dns/record.ts";
7
+ import { Resource } from "../resource.ts";
8
8
  import {
9
9
  type CloudflareApi,
10
10
  type CloudflareApiOptions,
11
11
  createCloudflareApi,
12
- } from "./api.js";
13
- import type { CloudflareResponse } from "./response.js";
12
+ } from "./api.ts";
13
+ import type { CloudflareResponse } from "./response.ts";
14
14
 
15
15
  /**
16
16
  * Cloudflare DNS Record response format
@@ -1,4 +1,4 @@
1
- import type { Binding } from "./bindings.js";
1
+ import type { Binding } from "./bindings.ts";
2
2
 
3
3
  /**
4
4
  * Properties for creating a Durable Object Namespace
@@ -1,5 +1,5 @@
1
- import type { QueueConsumerSettings } from "./queue-consumer.js";
2
- import type { QueueResource } from "./queue.js";
1
+ import type { QueueConsumerSettings } from "./queue-consumer.ts";
2
+ import type { QueueResource } from "./queue.ts";
3
3
 
4
4
  /**
5
5
  * Base interface for event sources that can be bound to a Worker
@@ -1,10 +1,10 @@
1
- import type { Context } from "../context.js";
2
- import { Resource } from "../resource.js";
3
- import { tryGetBinding } from "../runtime/bind.js";
4
- import type { Secret } from "../secret.js";
5
- import { handleApiError } from "./api-error.js";
6
- import { createCloudflareApi, type CloudflareApiOptions } from "./api.js";
7
- import type { Bound } from "./bound.js";
1
+ import type { Context } from "../context.ts";
2
+ import { Resource } from "../resource.ts";
3
+ import { tryGetBinding } from "../runtime/bind.ts";
4
+ import type { Secret } from "../secret.ts";
5
+ import { handleApiError } from "./api-error.ts";
6
+ import { createCloudflareApi, type CloudflareApiOptions } from "./api.ts";
7
+ import type { Bound } from "./bound.ts";
8
8
 
9
9
  /**
10
10
  * Origin configuration for a PostgreSQL database connection
@@ -1,39 +1,40 @@
1
- export * from "./account-api-token.js";
2
- export * from "./account-id.js";
3
- export * from "./ai-gateway.js";
4
- export * from "./ai.js";
5
- export * from "./api-error.js";
6
- export * from "./api.js";
7
- export * from "./assets.js";
8
- export * from "./bindings.js";
9
- export * from "./bound.js";
10
- export * from "./browser-rendering.js";
11
- export * from "./bucket.js";
12
- export * from "./bundle/external.js";
13
- export * from "./bundle/local-dev-cloudflare-shim.js";
14
- export * from "./custom-domain.js";
15
- export * from "./d1-clone.js";
16
- export * from "./d1-database.js";
17
- export * from "./d1-export.js";
18
- export * from "./d1-import.js";
19
- export * from "./dns-records.js";
20
- export * from "./durable-object-namespace.js";
21
- export * from "./hyperdrive.js";
22
- export * from "./kv-namespace.js";
23
- export * from "./nuxt.js";
24
- export * from "./permission-groups.js";
25
- export * from "./pipeline.js";
26
- export * from "./queue-consumer.js";
27
- export * from "./queue.js";
28
- export * from "./r2-rest-state-store.js";
29
- export * from "./redwood.js";
30
- export * from "./route.js";
31
- export * from "./tanstack-start.js";
32
- export * from "./vectorize-index.js";
33
- export * from "./vectorize-metadata-index.js";
34
- export * from "./vite.js";
35
- export * from "./website.js";
36
- export * from "./worker.js";
37
- export { Workflow } from "./workflow.js";
38
- export * from "./wrangler.json.js";
39
- export * from "./zone.js";
1
+ export * from "./account-api-token.ts";
2
+ export * from "./account-id.ts";
3
+ export * from "./ai-gateway.ts";
4
+ export * from "./ai.ts";
5
+ export * from "./api-error.ts";
6
+ export * from "./api.ts";
7
+ export * from "./assets.ts";
8
+ export * from "./bindings.ts";
9
+ export * from "./bound.ts";
10
+ export * from "./browser-rendering.ts";
11
+ export * from "./bucket.ts";
12
+ export * from "./bundle/external.ts";
13
+ export * from "./bundle/local-dev-cloudflare-shim.ts";
14
+ export * from "./custom-domain.ts";
15
+ export * from "./d1-clone.ts";
16
+ export * from "./d1-database.ts";
17
+ export * from "./d1-export.ts";
18
+ export * from "./d1-import.ts";
19
+ export * from "./dns-records.ts";
20
+ export * from "./durable-object-namespace.ts";
21
+ export * from "./hyperdrive.ts";
22
+ export * from "./kv-namespace.ts";
23
+ export * from "./nuxt.ts";
24
+ export * from "./permission-groups.ts";
25
+ export * from "./pipeline.ts";
26
+ export * from "./queue-consumer.ts";
27
+ export * from "./queue.ts";
28
+ export * from "./r2-rest-state-store.ts";
29
+ export * from "./react-router.ts";
30
+ export * from "./redwood.ts";
31
+ export * from "./route.ts";
32
+ export * from "./tanstack-start.ts";
33
+ export * from "./vectorize-index.ts";
34
+ export * from "./vectorize-metadata-index.ts";
35
+ export * from "./vite.ts";
36
+ export * from "./website.ts";
37
+ export * from "./worker.ts";
38
+ export { Workflow } from "./workflow.ts";
39
+ export * from "./wrangler.json.ts";
40
+ export * from "./zone.ts";