@pithy-sh/cloudflare 0.1.3 → 0.1.5

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 (93) hide show
  1. package/dist/ai/aiManager.d.ts +2 -0
  2. package/dist/ai/aiManager.js +2 -0
  3. package/dist/ai/vectorizeManager.d.ts +2 -0
  4. package/dist/ai/vectorizeManager.js +2 -0
  5. package/dist/ai/vectorizeProvisioner.d.ts +2 -0
  6. package/dist/ai/vectorizeProvisioner.js +2 -0
  7. package/dist/client/accounts.d.ts +2 -0
  8. package/dist/client/accounts.js +2 -0
  9. package/dist/client/clients.d.ts +2 -0
  10. package/dist/client/clients.js +2 -0
  11. package/dist/client/errors.d.ts +2 -0
  12. package/dist/client/errors.js +2 -0
  13. package/dist/client/manager.d.ts +2 -0
  14. package/dist/client/manager.js +2 -0
  15. package/dist/d1/d1Manager.d.ts +2 -0
  16. package/dist/d1/d1Manager.js +2 -0
  17. package/dist/d1/d1PreparedStatement.d.ts +2 -0
  18. package/dist/d1/d1PreparedStatement.js +2 -0
  19. package/dist/d1/d1Provisioner.d.ts +2 -0
  20. package/dist/d1/d1Provisioner.js +2 -0
  21. package/dist/email/emailRoutingManager.d.ts +2 -0
  22. package/dist/email/emailRoutingManager.js +2 -0
  23. package/dist/email/emailSendManager.d.ts +2 -0
  24. package/dist/email/emailSendManager.js +2 -0
  25. package/dist/env/devVars.d.ts +2 -0
  26. package/dist/env/devVars.js +2 -0
  27. package/dist/hostnames/customHostnamesManager.d.ts +2 -0
  28. package/dist/hostnames/customHostnamesManager.js +2 -0
  29. package/dist/kv/kvManager.d.ts +2 -0
  30. package/dist/kv/kvManager.js +2 -0
  31. package/dist/kv/kvProvisioner.d.ts +2 -0
  32. package/dist/kv/kvProvisioner.js +2 -0
  33. package/dist/media/assetSeeder.d.ts +2 -0
  34. package/dist/media/assetSeeder.js +2 -0
  35. package/dist/media/imageManager.d.ts +2 -0
  36. package/dist/media/imageManager.js +2 -0
  37. package/dist/media/ownership.d.ts +2 -0
  38. package/dist/media/ownership.js +2 -0
  39. package/dist/media/streamManager.d.ts +2 -0
  40. package/dist/media/streamManager.js +2 -0
  41. package/dist/queue/queueManager.d.ts +2 -0
  42. package/dist/queue/queueManager.js +2 -0
  43. package/dist/r2/r2Credentials.d.ts +2 -0
  44. package/dist/r2/r2Credentials.js +2 -0
  45. package/dist/r2/r2Manager.d.ts +2 -0
  46. package/dist/r2/r2Manager.js +2 -0
  47. package/dist/r2/r2Provisioner.d.ts +2 -0
  48. package/dist/r2/r2Provisioner.js +2 -0
  49. package/dist/secrets/secretsStoreManager.d.ts +2 -0
  50. package/dist/secrets/secretsStoreManager.js +2 -0
  51. package/dist/secrets/secretsStores.d.ts +2 -0
  52. package/dist/secrets/secretsStores.js +2 -0
  53. package/dist/test-utils/emailRoutingRules.d.ts +2 -0
  54. package/dist/test-utils/emailRoutingRules.js +2 -0
  55. package/dist/test-utils/fixtureReportSetup.d.ts +2 -0
  56. package/dist/test-utils/fixtureReportSetup.js +2 -0
  57. package/dist/test-utils/fixtures.d.ts +2 -0
  58. package/dist/test-utils/fixtures.js +2 -0
  59. package/dist/test-utils/harness.d.ts +2 -0
  60. package/dist/test-utils/harness.js +2 -0
  61. package/dist/test-utils/inboundRecorder.d.ts +2 -0
  62. package/dist/test-utils/inboundRecorder.js +2 -0
  63. package/dist/test-utils/integrationSetup.d.ts +2 -0
  64. package/dist/test-utils/integrationSetup.js +2 -0
  65. package/dist/test-utils/reap.d.ts +2 -0
  66. package/dist/test-utils/reap.js +2 -0
  67. package/dist/tokens/accountTokensManager.d.ts +2 -0
  68. package/dist/tokens/accountTokensManager.js +2 -0
  69. package/dist/tokens/permissions.d.ts +2 -0
  70. package/dist/tokens/permissions.js +2 -0
  71. package/dist/tokens/profiles.d.ts +2 -0
  72. package/dist/tokens/profiles.js +2 -0
  73. package/dist/turnstile/turnstileManager.d.ts +2 -0
  74. package/dist/turnstile/turnstileManager.js +2 -0
  75. package/dist/user/userManager.d.ts +2 -0
  76. package/dist/user/userManager.js +2 -0
  77. package/dist/workers/buildsManager.d.ts +2 -0
  78. package/dist/workers/buildsManager.js +2 -0
  79. package/dist/workers/buildsTypes.d.ts +2 -0
  80. package/dist/workers/buildsTypes.js +2 -0
  81. package/dist/workers/workersBuildEvent.d.ts +2 -0
  82. package/dist/workers/workersBuildEvent.js +2 -0
  83. package/dist/workers/workersManager.d.ts +2 -0
  84. package/dist/workers/workersManager.js +2 -0
  85. package/dist/workers/workersProvisioner.d.ts +2 -0
  86. package/dist/workers/workersProvisioner.js +2 -0
  87. package/dist/workflows/stepFailure.d.ts +2 -0
  88. package/dist/workflows/stepFailure.js +2 -0
  89. package/dist/workflows/workflowsClient.d.ts +2 -0
  90. package/dist/workflows/workflowsClient.js +2 -0
  91. package/dist/zones/zonesManager.d.ts +2 -0
  92. package/dist/zones/zonesManager.js +2 -0
  93. package/package.json +3 -3
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import type { AIRunResponse } from "cloudflare/resources/ai/ai";
2
4
  import type { ModelListResponse } from "cloudflare/resources/ai/models/models";
3
5
  import { z } from "zod";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareInvalidResponseError, cloudflareRequest } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  import { fromUint8Array } from "js-base64";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import type { IndexDeleteByIDsResponse, IndexInfoResponse, IndexInsertResponse, IndexQueryResponse, IndexUpsertResponse } from "cloudflare/resources/vectorize/indexes/indexes";
2
4
  import { CloudflareManager, type CloudflareManagerConfig } from "../client/manager";
3
5
  /** Config for the Vectorize manager: the shared client config plus the index it targets. */
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareNotConfiguredError, cloudflareRequest } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  //#region src/ai/vectorizeManager.ts
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { z } from "zod";
2
4
  import { CloudflareManager } from "../client/manager";
3
5
  /** The distance metric an index scores nearest neighbors with. Fixed at creation — it cannot be changed later. */
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { cloudflareRequest, decodeResponse, isNotFoundError } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  import { z } from "zod";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { Cloudflare } from "cloudflare";
2
4
  import { z } from "zod";
3
5
  /**
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { cloudflareRequest } from "./errors.js";
2
4
  import { z } from "zod";
3
5
  import { Cloudflare } from "cloudflare";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareAIManager } from "../ai/aiManager";
2
4
  import { CloudflareVectorizeManager } from "../ai/vectorizeManager";
3
5
  import { CloudflareVectorizeProvisioner } from "../ai/vectorizeProvisioner";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareAIManager } from "../ai/aiManager.js";
2
4
  import { CloudflareVectorizeManager } from "../ai/vectorizeManager.js";
3
5
  import { CloudflareVectorizeProvisioner } from "../ai/vectorizeProvisioner.js";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { PithyError } from "@pithy-sh/core/src/error/pithyError";
2
4
  import type { MessageParams } from "@pithy-sh/core/src/i18n/catalog";
3
5
  import type { z } from "zod";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { PithyError } from "@pithy-sh/core/src/error/pithyError";
2
4
  //#region src/client/errors.ts
3
5
  /** A required piece of configuration (token, account id, resource id) is missing. */
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { Cloudflare } from "cloudflare";
2
4
  import type { Account } from "cloudflare/resources/accounts/accounts";
3
5
  /**
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareNotConfiguredError, cloudflareRequest } from "./errors.js";
2
4
  import { Cloudflare } from "cloudflare";
3
5
  //#region src/client/manager.ts
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import type { D1Database, D1PreparedStatement, D1Result } from "@cloudflare/workers-types";
2
4
  import type { D1 } from "cloudflare/resources/d1/d1";
3
5
  import type { QueryResult } from "cloudflare/resources/d1/database";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareNotConfiguredError, cloudflareRequest, reasonOf } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  import { D1PreparedStatementREST } from "./d1PreparedStatement.js";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import type { D1PreparedStatement, D1Result } from "@cloudflare/workers-types";
2
4
  import type { Cloudflare } from "cloudflare";
3
5
  export declare class D1PreparedStatementREST<T = Record<string, unknown>> implements D1PreparedStatement {
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { cloudflareRequest } from "../client/errors.js";
2
4
  //#region src/d1/d1PreparedStatement.ts
3
5
  /**
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { z } from "zod";
2
4
  import { CloudflareManager } from "../client/manager";
3
5
  /** A D1 database's identity, decoded from the create response. */
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { cloudflareRequest, decodeResponse } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  import { z } from "zod";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareManager } from "../client/manager";
2
4
  export declare class CloudflareEmailRoutingManager extends CloudflareManager {
3
5
  #private;
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareInvalidResponseError, cloudflareRequest } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  import { z } from "zod";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareManager } from "../client/manager";
2
4
  /**
3
5
  * Out-of-Worker sends through the Cloudflare Email Service REST API — the control-plane counterpart to
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { cloudflareRequest } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  //#region src/email/emailSendManager.ts
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  /**
2
4
  * The Cloudflare credential keys pithy reads out-of-Worker (CLI, provisioning, live tests). These are
3
5
  * wrangler's own env-var names plus the Secrets Store id. From this single bootstrap token
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  //#region src/env/devVars.ts
2
4
  /**
3
5
  * The Cloudflare credential keys pithy reads out-of-Worker (CLI, provisioning, live tests). These are
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import type { CustomHostnameCreateResponse, CustomHostnameDeleteResponse, CustomHostnameGetResponse, CustomHostnameListResponse } from "cloudflare/resources/custom-hostnames/custom-hostnames";
2
4
  import { CloudflareManager, type CloudflareManagerConfig } from "../client/manager";
3
5
  /**
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareNotConfiguredError, cloudflareRequest } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  //#region src/hostnames/customHostnamesManager.ts
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import type { Key } from "cloudflare/resources/kv/namespaces/keys";
2
4
  import { CloudflareManager, type CloudflareManagerConfig } from "../client/manager";
3
5
  /** Config for the KV manager: the shared client config plus the namespace it targets. */
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareInvalidResponseError, CloudflareNotConfiguredError, cloudflareRequest, isNotFoundError, reasonOf } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  //#region src/kv/kvManager.ts
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { z } from "zod";
2
4
  import { CloudflareManager } from "../client/manager";
3
5
  /** A KV namespace's identity, decoded from the create response. */
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { cloudflareRequest, decodeResponse, isNotFoundError } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  import { z } from "zod";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import type { CloudflareImageManager } from "./imageManager";
2
4
  import { type AssetOwner } from "./ownership";
3
5
  import type { CloudflareStreamManager } from "./streamManager";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareRequestError, cloudflareRequest, decodeResponse } from "../client/errors.js";
2
4
  import { withAssetOwnership } from "./ownership.js";
3
5
  import { z } from "zod";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import type { Image, V1CreateParams, V1EditParams } from "cloudflare/resources/images/v1/v1";
2
4
  import type { DirectUploadCreateParams, DirectUploadCreateResponse } from "cloudflare/resources/images/v2/direct-uploads";
3
5
  import type { V2ListParams } from "cloudflare/resources/images/v2/v2";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { cloudflareRequest } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  //#region src/media/imageManager.ts
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  /**
2
4
  * The ownership stamp on every Cloudflare Images and Stream asset Pithy creates.
3
5
  *
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareNotConfiguredError } from "../client/errors.js";
2
4
  //#region src/media/ownership.ts
3
5
  /**
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import type { DirectUploadCreateParams, DirectUploadCreateResponse } from "cloudflare/resources/stream/direct-upload";
2
4
  import type { StreamEditParams, Video } from "cloudflare/resources/stream/stream";
3
5
  import { z } from "zod";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareInvalidResponseError, cloudflareRequest } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  import { z } from "zod";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import type { MessageBulkPushResponse } from "cloudflare/resources/queues/messages";
2
4
  import { CloudflareManager, type CloudflareManagerConfig } from "../client/manager";
3
5
  /** Config for the Queue manager: the shared client config plus the queue it targets by name. */
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareNotConfiguredError, cloudflareRequest, reasonOf } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  import { NotFoundError } from "@pithy-sh/core/src/error/pithyError";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { z } from "zod";
2
4
  /**
3
5
  * The R2 S3-compatible credential pair. R2 speaks the S3 protocol, so presigned-URL signing needs
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { z } from "zod";
2
4
  //#region src/r2/r2Credentials.ts
3
5
  /**
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { z } from "zod";
2
4
  import { CloudflareManager, type CloudflareManagerConfig } from "../client/manager";
3
5
  import { R2Credentials } from "./r2Credentials";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareNotConfiguredError, cloudflareRequest, decodeResponse } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  import { R2Credentials } from "./r2Credentials.js";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { z } from "zod";
2
4
  import { CloudflareManager } from "../client/manager";
3
5
  /** An R2 bucket's identity, decoded from the create/list response. Buckets are addressed by name, not id. */
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { cloudflareRequest, decodeResponse, isNotFoundError } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  import { z } from "zod";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { z } from "zod";
2
4
  import { CloudflareManager, type CloudflareManagerConfig } from "../client/manager";
3
5
  /**
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareNotConfiguredError, cloudflareRequest, decodeResponse } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  import { z } from "zod";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { z } from "zod";
2
4
  import { CloudflareManager } from "../client/manager";
3
5
  /**
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { cloudflareRequest, decodeResponse } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  import { z } from "zod";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { z } from "zod";
2
4
  import type { IntegrationCreds } from "./harness";
3
5
  /** One matcher on a routing rule: which mail the rule claims. */
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareRequestError } from "../client/errors.js";
2
4
  import { z } from "zod";
3
5
  //#region src/test-utils/emailRoutingRules.ts
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  /**
2
4
  * The `globalSetup` for an integration config whose suites **create nothing** — the fixture report, and
3
5
  * no debris sweep.
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { reportFixtureEstate } from "./fixtures.js";
2
4
  //#region src/test-utils/fixtureReportSetup.ts
3
5
  /**
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  /**
2
4
  * The live test fixture estate: which real-world things a live suite needs, whether this run has them,
3
5
  * and what a run says when it does not.
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { loadIntegrationEnv } from "./harness.js";
2
4
  import { ValidationError } from "@pithy-sh/core/src/error/pithyError";
3
5
  //#region src/test-utils/fixtures.ts
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { R2Credentials } from "../r2/r2Credentials";
2
4
  /**
3
5
  * The live-suite credentials: this package's own `.dev.vars`, then `process.env` per key for anything it
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { R2Credentials } from "../r2/r2Credentials.js";
2
4
  import { CloudflareClients } from "../client/clients.js";
3
5
  import { CLOUDFLARE_ENV_KEYS, parseDevVars } from "../env/devVars.js";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { z } from "zod";
2
4
  import type { CloudflareWorkersManager } from "../workers/workersManager";
3
5
  import type { IntegrationCreds } from "./harness";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareInvalidResponseError, CloudflareRequestError } from "../client/errors.js";
2
4
  import { z } from "zod";
3
5
  //#region src/test-utils/inboundRecorder.ts
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  /**
2
4
  * The Vitest `globalSetup` every `vitest.integration.config.ts` points at — one fixture report and one
3
5
  * debris sweep per integration run, before a single suite is collected.
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { loadIntegrationCreds } from "./harness.js";
2
4
  import { fixtureValue, reportFixtureEstate, resolveFixture } from "./fixtures.js";
3
5
  import { reapAllStaleTestResources } from "./reap.js";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { type IntegrationCreds, type ReapableKind, testResourceAge } from "./harness";
2
4
  /**
3
5
  * The reap registry: every throwaway resource kind a live suite can mint, in one place, swept once per
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareClients } from "../client/clients.js";
2
4
  import { listEmailRoutingRules, namedRules } from "./emailRoutingRules.js";
3
5
  import { emptyTestBucket, staleTestResourceNames, testResourceAge } from "./harness.js";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { z } from "zod";
2
4
  import { CloudflareManager } from "../client/manager";
3
5
  import { CfTokenVerification } from "../user/userManager";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareNotConfiguredError, CloudflareRequestError, cloudflareRequest, decodeResponse, isAuthorizationError, messageOf } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  import { CfTokenVerification } from "../user/userManager.js";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  /**
2
4
  * The permission catalog: short, stable permission **keys** (`d1:read`) mapped to the Cloudflare
3
5
  * account **permission-group display names** they grant (`"D1 Read"`). Token profiles are declared in
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareNotConfiguredError } from "../client/errors.js";
2
4
  //#region src/tokens/permissions.ts
3
5
  /**
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import type { Capability, TokenProfileSeam } from "@pithy-sh/core/src/capability/capability";
2
4
  import { type TokenPermission } from "./accountTokensManager";
3
5
  import { type PermissionKey } from "./permissions";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareNotConfiguredError } from "../client/errors.js";
2
4
  import { accountResource } from "./accountTokensManager.js";
3
5
  import { isPermissionKey, resolvePermissionKeys } from "./permissions.js";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import type { Widget, WidgetListResponse } from "cloudflare/resources/turnstile/widgets";
2
4
  import { z } from "zod";
3
5
  import { CloudflareManager } from "../client/manager";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareInvalidResponseError, cloudflareRequest } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  import { z } from "zod";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { z } from "zod";
2
4
  import { CloudflareManager } from "../client/manager";
3
5
  /**
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { cloudflareRequest, decodeResponse } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  import { z } from "zod";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareManager } from "../client/manager";
2
4
  import { CfBuild, CfBuildLog, CfBuildToken, CfBuildTrigger, CfRepoConnection, type CfTriggerEnvVar } from "./buildsTypes";
3
5
  /** Arguments for `createRepoConnection`. */
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareInvalidResponseError, CloudflareRequestError, cloudflareRequest, decodeResponse, messageOf } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  import { CfBuild, CfBuildLog, CfBuildToken, CfBuildTrigger, CfRepoConnection } from "./buildsTypes.js";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { z } from "zod";
2
4
  /**
3
5
  * Zod schemas for the Cloudflare Builds REST API.
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { z } from "zod";
2
4
  import { JsonDate } from "@pithy-sh/core/src/data/codecs";
3
5
  //#region src/workers/buildsTypes.ts
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { z } from "zod";
2
4
  /**
3
5
  * The shape of a Cloudflare Workers Builds lifecycle event, as delivered to a subscribed queue.
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { z } from "zod";
2
4
  import { JsonDate } from "@pithy-sh/core/src/data/codecs";
3
5
  //#region src/workers/workersBuildEvent.ts
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import type { RouteCreateResponse, RouteListResponse } from "cloudflare/resources/workers/routes";
2
4
  import type { Deployment } from "cloudflare/resources/workers/scripts/deployments";
3
5
  import type { Script } from "cloudflare/resources/workers/scripts/scripts";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareInvalidResponseError, cloudflareRequest, messageOf } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  import { NotFoundError, ValidationError } from "@pithy-sh/core/src/error/pithyError";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import type { CloudflareManagerConfig } from "../client/manager";
2
4
  import type { CfRepoConnection, CfTriggerEnvVar } from "./buildsTypes";
3
5
  /** Describes the git repo a build trigger should clone, in provider-neutral terms. */
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareNotConfiguredError } from "../client/errors.js";
2
4
  import { CloudflareBuildsManager } from "./buildsManager.js";
3
5
  import { CloudflareWorkersManager } from "./workersManager.js";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { PithyError } from "@pithy-sh/core/src/error/pithyError";
2
4
  import { z } from "zod";
3
5
  /**
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { z } from "zod";
2
4
  import { PithyError } from "@pithy-sh/core/src/error/pithyError";
3
5
  import { ErrorPayload, kitErrorStatus } from "@pithy-sh/core/src/error/payload";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { z } from "zod";
2
4
  import { CloudflareManager, type CloudflareManagerConfig } from "../client/manager";
3
5
  /** Pause `ms` milliseconds between status polls. Injectable so tests run with no real delay. */
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { CloudflareInvalidResponseError, cloudflareRequest, isNotFoundError } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  import { stepFailure, terminalWorkflowError } from "./stepFailure.js";
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { z } from "zod";
2
4
  import { CloudflareManager } from "../client/manager";
3
5
  /**
@@ -1,3 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
1
3
  import { cloudflareRequest } from "../client/errors.js";
2
4
  import { CloudflareManager } from "../client/manager.js";
3
5
  import { z } from "zod";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pithy-sh/cloudflare",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,7 +24,7 @@
24
24
  }
25
25
  },
26
26
  "scripts": {
27
- "build": "tsdown && tsc -p tsconfig.build.json",
27
+ "build": "tsdown && tsc -p tsconfig.build.json && bun ../../tooling/build/src/stampDeclarations.ts",
28
28
  "typecheck": "tsc -p tsconfig.json",
29
29
  "test": "vitest run",
30
30
  "test:node": "vitest run --project=node",
@@ -36,7 +36,7 @@
36
36
  "@aws-sdk/client-s3": "^3.1111.0",
37
37
  "@aws-sdk/s3-request-presigner": "^3.1111.0",
38
38
  "@cloudflare/workers-types": "^5.20260729.1",
39
- "@pithy-sh/core": "^0.1.3",
39
+ "@pithy-sh/core": "^0.2.0",
40
40
  "cloudflare": "^7.0.0",
41
41
  "js-base64": "^3.9.2"
42
42
  },