@distilled.cloud/cloudflare 0.5.0 → 0.5.2

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 (2) hide show
  1. package/README.md +9 -1
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -12,11 +12,19 @@ npm install @distilled.cloud/cloudflare effect
12
12
 
13
13
  ```typescript
14
14
  import { Effect, Layer } from "effect";
15
+ import * as Stream from "effect/Stream";
15
16
  import * as FetchHttpClient from "effect/unstable/http/FetchHttpClient";
17
+ import * as DNS from "@distilled.cloud/cloudflare/dns";
16
18
  import * as R2 from "@distilled.cloud/cloudflare/r2";
17
19
  import { CredentialsFromEnv } from "@distilled.cloud/cloudflare";
18
20
 
19
- const program = R2.listBuckets({ account_id: "your-account-id" });
21
+ const program = Effect.gen(function* () {
22
+ yield* R2.listBuckets({ account_id: "your-account-id" });
23
+
24
+ const records = yield* DNS.listRecords
25
+ .items({ zone_id: "your-zone-id" })
26
+ .pipe(Stream.take(10), Stream.runCollect);
27
+ });
20
28
 
21
29
  const CloudflareLive = Layer.mergeAll(FetchHttpClient.layer, CredentialsFromEnv);
22
30
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@distilled.cloud/cloudflare",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/alchemy-run/distilled",
@@ -59,11 +59,11 @@
59
59
  "test": "bunx vitest run test",
60
60
  "publish:npm": "bun run build && bun publish --access public",
61
61
  "generate": "bun run scripts/generate.ts && oxlint --fix src && oxfmt --write src && oxfmt --write src",
62
- "specs:fetch": "git submodule update --force --init --recursive specs/cloudflare-typescript && git -C specs/cloudflare-typescript checkout -- .",
62
+ "specs:fetch": "git submodule update --force --init --recursive --depth=1 specs/cloudflare-typescript && git -C specs/cloudflare-typescript checkout -- .",
63
63
  "specs:update": "git -C specs/cloudflare-typescript fetch && git -C specs/cloudflare-typescript checkout main && git -C specs/cloudflare-typescript pull"
64
64
  },
65
65
  "dependencies": {
66
- "@distilled.cloud/core": "0.5.0",
66
+ "@distilled.cloud/core": "0.5.2",
67
67
  "effect": "4.0.0-beta.30"
68
68
  },
69
69
  "devDependencies": {