alchemy 2.0.0-beta.19 → 2.0.0-beta.20

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 (52) hide show
  1. package/bin/alchemy.js +2 -2
  2. package/bin/alchemy.js.map +1 -1
  3. package/bin/commands/_shared.ts +6 -4
  4. package/lib/Axiom/Annotation.d.ts +1 -1
  5. package/lib/Axiom/Annotation.d.ts.map +1 -1
  6. package/lib/Axiom/Annotation.js +1 -1
  7. package/lib/Axiom/Annotation.js.map +1 -1
  8. package/lib/Axiom/ApiToken.d.ts +1 -1
  9. package/lib/Axiom/ApiToken.d.ts.map +1 -1
  10. package/lib/Axiom/ApiToken.js +1 -1
  11. package/lib/Axiom/ApiToken.js.map +1 -1
  12. package/lib/Axiom/Dashboard.d.ts +1 -1
  13. package/lib/Axiom/Dashboard.d.ts.map +1 -1
  14. package/lib/Axiom/Dashboard.js +1 -1
  15. package/lib/Axiom/Dashboard.js.map +1 -1
  16. package/lib/Axiom/Dataset.js +1 -1
  17. package/lib/Axiom/Dataset.js.map +1 -1
  18. package/lib/Axiom/Monitor.d.ts +1 -1
  19. package/lib/Axiom/Monitor.d.ts.map +1 -1
  20. package/lib/Axiom/Monitor.js +1 -1
  21. package/lib/Axiom/Monitor.js.map +1 -1
  22. package/lib/Axiom/Notifier.d.ts +1 -1
  23. package/lib/Axiom/Notifier.d.ts.map +1 -1
  24. package/lib/Axiom/Notifier.js +1 -1
  25. package/lib/Axiom/Notifier.js.map +1 -1
  26. package/lib/Axiom/View.d.ts +1 -1
  27. package/lib/Axiom/View.d.ts.map +1 -1
  28. package/lib/Axiom/View.js +1 -1
  29. package/lib/Axiom/View.js.map +1 -1
  30. package/lib/Axiom/VirtualField.d.ts +1 -1
  31. package/lib/Axiom/VirtualField.d.ts.map +1 -1
  32. package/lib/Axiom/VirtualField.js +1 -1
  33. package/lib/Axiom/VirtualField.js.map +1 -1
  34. package/lib/Cloudflare/Fetcher.d.ts.map +1 -1
  35. package/lib/Cloudflare/Fetcher.js +3 -0
  36. package/lib/Cloudflare/Fetcher.js.map +1 -1
  37. package/lib/Cloudflare/StateStore/State.d.ts +1 -1
  38. package/lib/Cloudflare/StateStore/State.d.ts.map +1 -1
  39. package/lib/Cloudflare/Workers/Assets.d.ts +1 -1
  40. package/lib/Cloudflare/Workers/Assets.d.ts.map +1 -1
  41. package/lib/State/HttpStateApi.d.ts +16 -16
  42. package/lib/State/HttpStateApi.d.ts.map +1 -1
  43. package/package.json +13 -13
  44. package/src/Axiom/Annotation.ts +1 -1
  45. package/src/Axiom/ApiToken.ts +1 -1
  46. package/src/Axiom/Dashboard.ts +1 -1
  47. package/src/Axiom/Dataset.ts +1 -1
  48. package/src/Axiom/Monitor.ts +1 -1
  49. package/src/Axiom/Notifier.ts +1 -1
  50. package/src/Axiom/View.ts +1 -1
  51. package/src/Axiom/VirtualField.ts +1 -1
  52. package/src/Cloudflare/Fetcher.ts +12 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alchemy",
3
- "version": "2.0.0-beta.19",
3
+ "version": "2.0.0-beta.20",
4
4
  "homepage": "https://alchemy.run",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Sam Goodwin <sam@alchemy.run>",
@@ -237,13 +237,13 @@
237
237
  "@ai-sdk/provider": "^3.0.8",
238
238
  "@aws-sdk/credential-providers": "^3.0.0",
239
239
  "@clack/prompts": "^0.11.0",
240
- "@distilled.cloud/aws": "^0.12.5",
241
- "@distilled.cloud/axiom": "^0.12.5",
242
- "@distilled.cloud/cloudflare": "^0.12.5",
240
+ "@distilled.cloud/aws": "^0.13.0",
241
+ "@distilled.cloud/axiom": "^0.13.0",
242
+ "@distilled.cloud/cloudflare": "^0.13.0",
243
243
  "@distilled.cloud/cloudflare-rolldown-plugin": "0.3.0",
244
244
  "@distilled.cloud/cloudflare-vite-plugin": "0.2.0",
245
- "@distilled.cloud/core": "^0.12.5",
246
- "@effect/vitest": "4.0.0-beta.48",
245
+ "@distilled.cloud/core": "^0.13.0",
246
+ "@effect/vitest": "4.0.0-beta.58",
247
247
  "@libsql/client": "^0.17.0",
248
248
  "@octokit/rest": "^22.0.1",
249
249
  "@smithy/node-config-provider": "^4.0.0",
@@ -272,9 +272,9 @@
272
272
  "devDependencies": {
273
273
  "@clack/prompts": "^0.11.0",
274
274
  "@cloudflare/workers-types": "^4.20250805.0",
275
- "@effect/platform-bun": "4.0.0-beta.48",
276
- "@effect/platform-node": "4.0.0-beta.48",
277
- "@effect/platform-node-shared": "4.0.0-beta.48",
275
+ "@effect/platform-bun": "4.0.0-beta.58",
276
+ "@effect/platform-node": "4.0.0-beta.58",
277
+ "@effect/platform-node-shared": "4.0.0-beta.58",
278
278
  "@oxc-project/types": "^0.127.0",
279
279
  "@types/aws-lambda": "^8.10.152",
280
280
  "@types/bun": "latest",
@@ -282,7 +282,7 @@
282
282
  "@types/picomatch": "^4.0.0",
283
283
  "@types/react": "^19.2.2",
284
284
  "better-auth": "^1.6.2",
285
- "effect": "4.0.0-beta.48",
285
+ "effect": "4.0.0-beta.58",
286
286
  "ink": "^6.3.1",
287
287
  "pathe": "^2.0.3",
288
288
  "react": "^19.2.0",
@@ -294,9 +294,9 @@
294
294
  "typescript": "^5.9.3"
295
295
  },
296
296
  "peerDependencies": {
297
- "@effect/platform-bun": "4.0.0-beta.48",
298
- "@effect/platform-node": "4.0.0-beta.48",
299
- "effect": "4.0.0-beta.48",
297
+ "@effect/platform-bun": "4.0.0-beta.58",
298
+ "@effect/platform-node": "4.0.0-beta.58",
299
+ "effect": "4.0.0-beta.58",
300
300
  "vite": "^8.0.7"
301
301
  },
302
302
  "peerDependenciesMeta": {
@@ -1,4 +1,4 @@
1
- import * as Operations from "@distilled.cloud/axiom/Operations";
1
+ import * as Operations from "@distilled.cloud/axiom";
2
2
  import * as Effect from "effect/Effect";
3
3
  import * as Provider from "../Provider.ts";
4
4
  import { Resource } from "../Resource.ts";
@@ -1,4 +1,4 @@
1
- import * as Operations from "@distilled.cloud/axiom/Operations";
1
+ import * as Operations from "@distilled.cloud/axiom";
2
2
  import * as Effect from "effect/Effect";
3
3
  import * as Redacted from "effect/Redacted";
4
4
  import { deepEqual, isResolved } from "../Diff.ts";
@@ -1,4 +1,4 @@
1
- import * as Operations from "@distilled.cloud/axiom/Operations";
1
+ import * as Operations from "@distilled.cloud/axiom";
2
2
  import * as Effect from "effect/Effect";
3
3
  import * as Provider from "../Provider.ts";
4
4
  import { Resource } from "../Resource.ts";
@@ -1,5 +1,5 @@
1
1
  import { Credentials } from "@distilled.cloud/axiom/Credentials";
2
- import * as Operations from "@distilled.cloud/axiom/Operations";
2
+ import * as Operations from "@distilled.cloud/axiom";
3
3
  import * as Effect from "effect/Effect";
4
4
  import * as Option from "effect/Option";
5
5
  import { AdoptPolicy } from "../AdoptPolicy.ts";
@@ -1,4 +1,4 @@
1
- import * as Operations from "@distilled.cloud/axiom/Operations";
1
+ import * as Operations from "@distilled.cloud/axiom";
2
2
  import * as Effect from "effect/Effect";
3
3
  import * as Provider from "../Provider.ts";
4
4
  import { Resource } from "../Resource.ts";
@@ -1,4 +1,4 @@
1
- import * as Operations from "@distilled.cloud/axiom/Operations";
1
+ import * as Operations from "@distilled.cloud/axiom";
2
2
  import * as Effect from "effect/Effect";
3
3
  import * as Provider from "../Provider.ts";
4
4
  import { Resource } from "../Resource.ts";
package/src/Axiom/View.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as Operations from "@distilled.cloud/axiom/Operations";
1
+ import * as Operations from "@distilled.cloud/axiom";
2
2
  import * as Effect from "effect/Effect";
3
3
  import { isResolved } from "../Diff.ts";
4
4
  import * as Provider from "../Provider.ts";
@@ -1,4 +1,4 @@
1
- import * as Operations from "@distilled.cloud/axiom/Operations";
1
+ import * as Operations from "@distilled.cloud/axiom";
2
2
  import * as Effect from "effect/Effect";
3
3
  import { isResolved } from "../Diff.ts";
4
4
  import * as Provider from "../Provider.ts";
@@ -233,6 +233,17 @@ export const fromCloudflareSocket = (cfSocket: cf.Socket): Socket.Socket => {
233
233
  opts,
234
234
  );
235
235
 
236
+ const decoder = new TextDecoder();
237
+ const runString = <_, E, R>(
238
+ handler: (_: string) => Effect.Effect<_, E, R> | void,
239
+ opts?: { readonly onOpen?: Effect.Effect<void> | undefined },
240
+ ): Effect.Effect<void, Socket.SocketError | E, R> =>
241
+ runRaw(
242
+ (data) =>
243
+ typeof data === "string" ? handler(data) : handler(decoder.decode(data)),
244
+ opts,
245
+ );
246
+
236
247
  const write = (
237
248
  chunk: Uint8Array | string | Socket.CloseEvent,
238
249
  ): Effect.Effect<void, Socket.SocketError> =>
@@ -275,6 +286,7 @@ export const fromCloudflareSocket = (cfSocket: cf.Socket): Socket.Socket => {
275
286
  [Socket.TypeId]: Socket.TypeId,
276
287
  run,
277
288
  runRaw,
289
+ runString,
278
290
  writer,
279
291
  });
280
292
  };