@theholocron/cloudflare-client 1.31.0 → 1.32.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import "@theholocron/http-client";
2
2
  import { ErrorSink, Logger } from "@theholocron/observability/core";
3
- //#region src/utils.d.ts
3
+ //#region ../../../../../src/utils.d.ts
4
4
  interface CloudflareClientOptions {
5
5
  token: string;
6
6
  /** Override base URL for testing. Defaults to https://api.cloudflare.com/client/v4 */
@@ -18,7 +18,7 @@ interface CfEnvelope<T> {
18
18
  result: T;
19
19
  }
20
20
  //#endregion
21
- //#region src/dns/dns.d.ts
21
+ //#region ../../../../../src/dns/dns.d.ts
22
22
  type CfDnsRecordType = "A" | "AAAA" | "CNAME" | "TXT" | "MX" | "NS" | "SRV" | "CAA";
23
23
  interface CfDnsRecord {
24
24
  id: string;
@@ -36,7 +36,7 @@ interface CfDnsRecordInput {
36
36
  proxied?: boolean;
37
37
  }
38
38
  //#endregion
39
- //#region src/pages/pages.d.ts
39
+ //#region ../../../../../src/pages/pages.d.ts
40
40
  type CfPagesEnvVarType = "plain_text" | "secret_text";
41
41
  interface CfPagesEnvVar {
42
42
  value: string;
@@ -84,14 +84,14 @@ interface CfPagesDeployment {
84
84
  created_on: string;
85
85
  }
86
86
  //#endregion
87
- //#region src/zones/zones.d.ts
87
+ //#region ../../../../../src/zones/zones.d.ts
88
88
  interface CfZone {
89
89
  id: string;
90
90
  name: string;
91
91
  status: string;
92
92
  }
93
93
  //#endregion
94
- //#region src/tunnels/tunnels.d.ts
94
+ //#region ../../../../../src/tunnels/tunnels.d.ts
95
95
  interface CfTunnel {
96
96
  id: string;
97
97
  name: string;
@@ -105,13 +105,13 @@ interface CfTunnelConfig {
105
105
  ingress: CfIngressRule[];
106
106
  }
107
107
  //#endregion
108
- //#region src/tokens/tokens.d.ts
108
+ //#region ../../../../../src/tokens/tokens.d.ts
109
109
  interface CfTokenVerification {
110
110
  id: string;
111
111
  status: "active" | "disabled" | "expired";
112
112
  }
113
113
  //#endregion
114
- //#region src/workers/workers.d.ts
114
+ //#region ../../../../../src/workers/workers.d.ts
115
115
  interface CfWorkerRoute {
116
116
  id: string;
117
117
  pattern: string;
@@ -123,7 +123,7 @@ interface CfWorkerSecret {
123
123
  type: "secret_text";
124
124
  }
125
125
  //#endregion
126
- //#region src/index.d.ts
126
+ //#region ../../../../../src/index.d.ts
127
127
  declare function createCloudflareClient(opts: CloudflareClientOptions): {
128
128
  dns: {
129
129
  list: (zoneId: string, query?: {
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ProviderApiError, createRestClient } from "@theholocron/http-client";
2
- //#region src/utils.ts
2
+ //#region ../../../../../src/utils.ts
3
3
  function createCloudflareRestClient(opts) {
4
4
  return createRestClient({
5
5
  baseUrl: opts.baseUrl ?? "https://api.cloudflare.com/client/v4",
@@ -26,7 +26,7 @@ async function cfRequest(rest, method, path, body, query) {
26
26
  return envelope.result;
27
27
  }
28
28
  //#endregion
29
- //#region src/dns/dns.ts
29
+ //#region ../../../../../src/dns/dns.ts
30
30
  function dns(rest) {
31
31
  return {
32
32
  list: (zoneId, query) => cfRequest(rest, "GET", `/zones/${zoneId}/dns_records`, void 0, {
@@ -46,7 +46,7 @@ function dns(rest) {
46
46
  };
47
47
  }
48
48
  //#endregion
49
- //#region src/pages/pages.ts
49
+ //#region ../../../../../src/pages/pages.ts
50
50
  function pages(rest) {
51
51
  return {
52
52
  listProjects: (accountId) => cfRequest(rest, "GET", `/accounts/${accountId}/pages/projects`, void 0, { per_page: "100" }),
@@ -62,12 +62,12 @@ function pages(rest) {
62
62
  };
63
63
  }
64
64
  //#endregion
65
- //#region src/tokens/tokens.ts
65
+ //#region ../../../../../src/tokens/tokens.ts
66
66
  function tokens(rest) {
67
67
  return { verify: () => cfRequest(rest, "GET", "/user/tokens/verify") };
68
68
  }
69
69
  //#endregion
70
- //#region src/tunnels/tunnels.ts
70
+ //#region ../../../../../src/tunnels/tunnels.ts
71
71
  function tunnels(rest) {
72
72
  return {
73
73
  create: (accountId, input) => cfRequest(rest, "POST", `/accounts/${accountId}/cfd_tunnel`, {
@@ -82,7 +82,7 @@ function tunnels(rest) {
82
82
  };
83
83
  }
84
84
  //#endregion
85
- //#region src/workers/workers.ts
85
+ //#region ../../../../../src/workers/workers.ts
86
86
  function workers(rest, opts) {
87
87
  const baseUrl = opts.baseUrl ?? "https://api.cloudflare.com/client/v4";
88
88
  const fetchImpl = opts.fetch ?? globalThis.fetch;
@@ -124,7 +124,7 @@ function workers(rest, opts) {
124
124
  };
125
125
  }
126
126
  //#endregion
127
- //#region src/zones/zones.ts
127
+ //#region ../../../../../src/zones/zones.ts
128
128
  function zones(rest) {
129
129
  return { list: (query) => cfRequest(rest, "GET", "/zones", void 0, {
130
130
  ...query?.name ? { name: query.name } : {},
@@ -132,7 +132,7 @@ function zones(rest) {
132
132
  }) };
133
133
  }
134
134
  //#endregion
135
- //#region src/index.ts
135
+ //#region ../../../../../src/index.ts
136
136
  function createCloudflareClient(opts) {
137
137
  const rest = createCloudflareRestClient(opts);
138
138
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/cloudflare-client",
3
- "version": "1.31.0",
3
+ "version": "1.32.1",
4
4
  "description": "A TypeScript client for the Cloudflare API",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -33,13 +33,13 @@
33
33
  ],
34
34
  "dependencies": {
35
35
  "@theholocron/observability": "^0.3.0",
36
- "@theholocron/http-client": "^1.31.0"
36
+ "@theholocron/http-client": "^1.32.1"
37
37
  },
38
38
  "devDependencies": {
39
- "@theholocron/cli": "5.0.0-alpha.33",
39
+ "@theholocron/cli": "5.0.0-alpha.79",
40
40
  "@theholocron/eslint-config": "^8.4.3",
41
41
  "@theholocron/tsconfig": "^8.2.0",
42
- "@theholocron/tsdown-config": "^8.2.0",
42
+ "@theholocron/tsdown-config": "^8.6.1",
43
43
  "@theholocron/vitest-config": "^8.2.0",
44
44
  "@types/node": "^26.4.1",
45
45
  "@vitest/coverage-v8": "^5.0.0",
@@ -61,7 +61,7 @@
61
61
  "releases": "https://github.com/theholocron/clients/releases",
62
62
  "wiki": "https://github.com/theholocron/clients/wiki",
63
63
  "scripts": {
64
- "delivery.build": "tsdown",
64
+ "delivery.build": "holocron run delivery.build -- && node ../../scripts/check-bundle-size.mjs",
65
65
  "sourceQuality.staticAnalysis": "holocron run sourceQuality.staticAnalysis --",
66
66
  "test:watch": "vitest",
67
67
  "verification.typeSafety": "holocron run verification.typeSafety --",