@pithy-sh/email 0.1.3 → 0.1.4
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/analytics.d.ts +2 -0
- package/dist/analytics.js +2 -0
- package/dist/audit/actions.d.ts +2 -0
- package/dist/audit/actions.js +2 -0
- package/dist/bounce/classify.d.ts +2 -0
- package/dist/bounce/classify.js +2 -0
- package/dist/bounce/handler.d.ts +2 -0
- package/dist/bounce/handler.js +2 -0
- package/dist/capability.d.ts +2 -0
- package/dist/capability.js +2 -0
- package/dist/crypto/signingKey.d.ts +2 -0
- package/dist/crypto/signingKey.js +2 -0
- package/dist/crypto/token.d.ts +2 -0
- package/dist/crypto/token.js +2 -0
- package/dist/data/emailEvent.d.ts +2 -0
- package/dist/data/emailEvent.js +2 -0
- package/dist/data/emailJob.d.ts +2 -0
- package/dist/data/emailJob.js +2 -0
- package/dist/data/emailSuppression.d.ts +2 -0
- package/dist/data/emailSuppression.js +2 -0
- package/dist/data/enums.d.ts +2 -0
- package/dist/data/enums.js +2 -0
- package/dist/data/tables.d.ts +2 -0
- package/dist/data/tables.js +2 -0
- package/dist/error/errors.d.ts +2 -0
- package/dist/error/errors.js +2 -0
- package/dist/http/callbacks.d.ts +2 -0
- package/dist/http/callbacks.js +2 -0
- package/dist/http/guards.d.ts +2 -0
- package/dist/http/guards.js +2 -0
- package/dist/http/responses.d.ts +2 -0
- package/dist/http/responses.js +2 -0
- package/dist/http/routes.d.ts +2 -0
- package/dist/http/routes.js +2 -0
- package/dist/http/schemas.d.ts +2 -0
- package/dist/http/schemas.js +2 -0
- package/dist/http/view.d.ts +2 -0
- package/dist/http/view.js +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/jobs/read.d.ts +2 -0
- package/dist/jobs/read.js +2 -0
- package/dist/jobs/retry.d.ts +2 -0
- package/dist/jobs/retry.js +2 -0
- package/dist/migrations/0001_init.d.ts +2 -0
- package/dist/migrations/0001_init.js +2 -0
- package/dist/migrations/0001_suppressions.d.ts +2 -0
- package/dist/migrations/0001_suppressions.js +2 -0
- package/dist/provision/devDelivery.d.ts +2 -0
- package/dist/provision/devDelivery.js +2 -0
- package/dist/provision/hostCatalogs.d.ts +2 -0
- package/dist/provision/hostCatalogs.js +2 -0
- package/dist/provision/provisionEmail.d.ts +2 -0
- package/dist/provision/provisionEmail.js +2 -0
- package/dist/provision/resolveEmailConfig.d.ts +2 -0
- package/dist/provision/resolveEmailConfig.js +2 -0
- package/dist/provision/settingsCheck.d.ts +2 -0
- package/dist/provision/settingsCheck.js +2 -0
- package/dist/send/batchIdentity.d.ts +2 -0
- package/dist/send/batchIdentity.js +2 -0
- package/dist/send/enqueue.d.ts +2 -0
- package/dist/send/enqueue.js +2 -0
- package/dist/send/errorMapping.d.ts +2 -0
- package/dist/send/errorMapping.js +2 -0
- package/dist/send/events.d.ts +2 -0
- package/dist/send/events.js +2 -0
- package/dist/send/fromComposition.d.ts +2 -0
- package/dist/send/fromComposition.js +2 -0
- package/dist/send/retryPolicy.d.ts +2 -0
- package/dist/send/retryPolicy.js +2 -0
- package/dist/send/runSend.d.ts +2 -0
- package/dist/send/runSend.js +2 -0
- package/dist/send/sendAt.d.ts +2 -0
- package/dist/send/sendAt.js +2 -0
- package/dist/send/sender.d.ts +2 -0
- package/dist/send/sender.js +2 -0
- package/dist/send/senderBinding.d.ts +2 -0
- package/dist/send/senderBinding.js +2 -0
- package/dist/send/suppression.d.ts +2 -0
- package/dist/send/suppression.js +2 -0
- package/dist/templates/engine.d.ts +2 -0
- package/dist/templates/engine.js +2 -0
- package/dist/templates/messages.d.ts +2 -0
- package/dist/templates/messages.es.d.ts +2 -0
- package/dist/templates/messages.es.js +2 -0
- package/dist/templates/messages.js +2 -0
- package/dist/templates/partials.d.ts +2 -0
- package/dist/templates/partials.js +2 -0
- package/dist/templates/precompiled.generated.d.ts +2 -0
- package/dist/templates/precompiled.generated.js +2 -0
- package/dist/templates/registry.d.ts +2 -0
- package/dist/templates/registry.js +2 -0
- package/dist/templates/samples.d.ts +2 -0
- package/dist/templates/samples.js +2 -0
- package/dist/templates/severity.d.ts +2 -0
- package/dist/templates/severity.js +2 -0
- package/dist/templates/theme.d.ts +2 -0
- package/dist/templates/theme.js +2 -0
- package/dist/version.generated.d.ts +3 -1
- package/dist/version.generated.js +3 -1
- package/dist/workflows/hostApp.d.ts +2 -0
- package/dist/workflows/hostApp.js +2 -0
- package/dist/workflows/hostEnv.d.ts +2 -0
- package/dist/workflows/hostEnv.js +2 -0
- package/dist/workflows/instanceLiveness.d.ts +2 -0
- package/dist/workflows/instanceLiveness.js +2 -0
- package/dist/workflows/instances.d.ts +2 -0
- package/dist/workflows/instances.js +2 -0
- package/dist/workflows/params.d.ts +2 -0
- package/dist/workflows/params.js +2 -0
- package/dist/workflows/scheduler.d.ts +2 -0
- package/dist/workflows/scheduler.js +2 -0
- package/dist/workflows/sendBatch.d.ts +2 -0
- package/dist/workflows/sendBatch.js +2 -0
- package/dist/workflows/worker.d.ts +2 -0
- package/dist/workflows/worker.js +2 -0
- package/package.json +4 -4
- package/src/version.generated.ts +1 -1
package/dist/analytics.d.ts
CHANGED
package/dist/analytics.js
CHANGED
package/dist/audit/actions.d.ts
CHANGED
package/dist/audit/actions.js
CHANGED
package/dist/bounce/classify.js
CHANGED
package/dist/bounce/handler.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import type { CapabilityEmailHandler } from "@pithy-sh/core/src/capability/capability";
|
|
2
4
|
import { type EmailDatabase, type EmailSuppressionDatabase } from "../data/tables";
|
|
3
5
|
import { type InboundClassification } from "./classify";
|
package/dist/bounce/handler.js
CHANGED
package/dist/capability.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import type { D1Database } from "@cloudflare/workers-types";
|
|
2
4
|
import { type Capability } from "@pithy-sh/core/src/capability/capability";
|
|
3
5
|
import type { LocaleCatalogs } from "@pithy-sh/core/src/i18n/catalog";
|
package/dist/capability.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { emailDatabase, emailSuppressionDatabase, emailSuppressionTables, emailTables } from "./data/tables.js";
|
|
2
4
|
import { createBounceHandler } from "./bounce/handler.js";
|
|
3
5
|
import { emailSigningRegistry } from "./crypto/signingKey.js";
|
package/dist/crypto/token.d.ts
CHANGED
package/dist/crypto/token.js
CHANGED
package/dist/data/emailEvent.js
CHANGED
package/dist/data/emailJob.d.ts
CHANGED
package/dist/data/emailJob.js
CHANGED
package/dist/data/enums.d.ts
CHANGED
package/dist/data/enums.js
CHANGED
package/dist/data/tables.d.ts
CHANGED
package/dist/data/tables.js
CHANGED
package/dist/error/errors.d.ts
CHANGED
package/dist/error/errors.js
CHANGED
package/dist/http/callbacks.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import type { PithyHonoEnv } from "@pithy-sh/core/src/capability/capability";
|
|
2
4
|
import type { Hono } from "hono";
|
|
3
5
|
import { type EmailDatabase, type EmailSuppressionDatabase } from "../data/tables";
|
package/dist/http/callbacks.js
CHANGED
package/dist/http/guards.d.ts
CHANGED
package/dist/http/guards.js
CHANGED
package/dist/http/responses.d.ts
CHANGED
package/dist/http/responses.js
CHANGED
package/dist/http/routes.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import type { PithyHonoEnv } from "@pithy-sh/core/src/capability/capability";
|
|
2
4
|
import type { ControlPlaneScope } from "@pithy-sh/core/src/controlPlane/scope/scope";
|
|
3
5
|
import type { VerificationStrategy } from "@pithy-sh/core/src/http/verification";
|
package/dist/http/routes.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { emailDatabase, emailSuppressionDatabase } from "../data/tables.js";
|
|
2
4
|
import { listSuppressions, suppress, unsuppress } from "../send/suppression.js";
|
|
3
5
|
import { JobIdParam, JobsQuery, SuppressRequest, SuppressionsQuery, UnsuppressRequest } from "./schemas.js";
|
package/dist/http/schemas.d.ts
CHANGED
package/dist/http/schemas.js
CHANGED
package/dist/http/view.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import type { EmailJob } from "../data/emailJob";
|
|
2
4
|
import type { EmailSuppression } from "../data/emailSuppression";
|
|
3
5
|
import type { EmailJobDetail, EmailJobListItem, EmailSuppressionView } from "./responses";
|
package/dist/http/view.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
/**
|
|
2
4
|
* The package entrypoint — the surface `pithy add email` wires into `pithy.config.ts`. Deliberately
|
|
3
5
|
* narrow: the capability factory plus the enqueue API and the types an app needs to send mail. Every
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { campaignStats } from "./analytics.js";
|
|
2
4
|
import { blockingSuppression, listSuppressions, suppress, suppressionBlocks, unsuppress } from "./send/suppression.js";
|
|
3
5
|
import { NoticeSeverity } from "./templates/severity.js";
|
package/dist/jobs/read.d.ts
CHANGED
package/dist/jobs/read.js
CHANGED
package/dist/jobs/retry.d.ts
CHANGED
package/dist/jobs/retry.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { GLOBAL_SCOPE } from "@pithy-sh/core/src/naming/environment";
|
|
2
4
|
import { resourceName } from "@pithy-sh/core/src/naming/resource";
|
|
3
5
|
import { resourceNames } from "@pithy-sh/core/src/naming/resourceNames";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import type { LocaleCatalogs } from "@pithy-sh/core/src/i18n/catalog";
|
|
2
4
|
import type { HostD1Binding, HostSecretsStoreBinding, HostSendEmailBinding, HostWorkflowBinding, WorkflowHostTemplate } from "@pithy-sh/core/src/workflow/host";
|
|
3
5
|
import type { WorkflowRegistry } from "@pithy-sh/core/src/workflow/spec";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { emailCatalogVarName } from "../templates/messages.js";
|
|
2
4
|
import { emailRemoteBindings } from "./devDelivery.js";
|
|
3
5
|
import { EMAIL_CAPABILITY, suppressionDatabaseName } from "./provisionEmail.js";
|
package/dist/send/enqueue.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import type { EmailJobStatus, SendMode, SuppressionReason } from "../data/enums";
|
|
2
4
|
import type { EmailDatabase, EmailSuppressionDatabase } from "../data/tables";
|
|
3
5
|
import { type EmailMessageLayers } from "../templates/messages";
|
package/dist/send/enqueue.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { EmailRateLimitedError, EmailSendFailedError, EmailSuppressedError } from "../error/errors.js";
|
|
2
4
|
//#region src/send/errorMapping.ts
|
|
3
5
|
/** Codes the Email Service retries past — rate, daily quota, and transient delivery/server faults. */
|
package/dist/send/events.d.ts
CHANGED
package/dist/send/events.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { SQLiteDate } from "@pithy-sh/core/src/data/codecs";
|
|
2
4
|
//#region src/send/events.ts
|
|
3
5
|
/** Append one event row. The history/attribution log written by the send path, callbacks, and bounce handler. */
|
package/dist/send/retryPolicy.js
CHANGED
package/dist/send/runSend.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import type { EmailJobStatus, SuppressionReason } from "../data/enums";
|
|
2
4
|
import type { EmailDatabase, EmailSuppressionDatabase } from "../data/tables";
|
|
3
5
|
import { type EmailMessageLayers } from "../templates/messages";
|
package/dist/send/runSend.js
CHANGED
package/dist/send/sendAt.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
/**
|
|
2
4
|
* The next absolute instant when the wall clock reads `hour:minute` in `timezone`, at or after `now`.
|
|
3
5
|
* Computes the candidate for the zone-local date of `now`, advancing a day if it has already passed.
|
package/dist/send/sendAt.js
CHANGED
package/dist/send/sender.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
/**
|
|
2
4
|
* The minimal shape of the Cloudflare Email Service `send_email` binding this capability depends on.
|
|
3
5
|
* We type only what we use, structurally — the real binding (`env.EMAIL`) satisfies it, and tests
|
package/dist/send/sender.js
CHANGED
package/dist/send/suppression.js
CHANGED
package/dist/templates/engine.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { EmailInvalidPayloadError, EmailTemplateNotFoundError } from "../error/errors.js";
|
|
2
4
|
import { mintToken } from "../crypto/token.js";
|
|
3
5
|
import { emailTranslator, kitEmailLayers } from "./messages.js";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
/** Doctype, head (with the dark-mode style block), body open, the branded masthead, and the content cell. */
|
|
2
4
|
export declare const emailHead: string;
|
|
3
5
|
/** Closes the content cell, renders the footer (logo, links, address, optional unsubscribe), and the document. */
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { severityDarkModeCss } from "./severity.js";
|
|
2
4
|
/** Doctype, head (with the dark-mode style block), body open, the branded masthead, and the content cell. */
|
|
3
5
|
const emailHead = `<!DOCTYPE html>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
/**
|
|
2
4
|
* Placeholder payloads — one valid input per template — for previewing a rendered email without real
|
|
3
5
|
* data. `pithy email test` uses these to send a sample of any template through a project's config so a
|
package/dist/templates/theme.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
/** This package's npm name — the join key against a release feed. */
|
|
2
4
|
export declare const PACKAGE_NAME = "@pithy-sh/email";
|
|
3
5
|
/** This package's version, stamped from its own package.json at generation time. */
|
|
4
|
-
export declare const PACKAGE_VERSION = "0.1.
|
|
6
|
+
export declare const PACKAGE_VERSION = "0.1.4";
|
|
5
7
|
//# sourceMappingURL=version.generated.d.ts.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
//#region src/version.generated.ts
|
|
2
4
|
/** This package's npm name — the join key against a release feed. */
|
|
3
5
|
const PACKAGE_NAME = "@pithy-sh/email";
|
|
4
6
|
/** This package's version, stamped from its own package.json at generation time. */
|
|
5
|
-
const PACKAGE_VERSION = "0.1.
|
|
7
|
+
const PACKAGE_VERSION = "0.1.4";
|
|
6
8
|
//#endregion
|
|
7
9
|
export { PACKAGE_NAME, PACKAGE_VERSION };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { EMAIL_CAPABILITY } from "../provision/provisionEmail.js";
|
|
2
4
|
import { emailWorkflowRegistry } from "../provision/resolveEmailConfig.js";
|
|
3
5
|
import { pithyErrorHandler } from "@pithy-sh/core/src/error/http";
|
package/dist/workflows/params.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { WorkflowEntrypoint, type WorkflowEvent, type WorkflowStep } from "cloudflare:workers";
|
|
2
4
|
import type { D1Database, ExecutionContext } from "@cloudflare/workers-types";
|
|
3
5
|
import type { SecretsStoreEnv } from "@pithy-sh/secrets/src/env/bindings";
|
package/dist/workflows/worker.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { emailDatabase, emailSuppressionDatabase } from "../data/tables.js";
|
|
2
4
|
import { emailSigningRegistry, resolveSigningKeys } from "../crypto/signingKey.js";
|
|
3
5
|
import { catalogLayers, catalogsFromEnv } from "../templates/messages.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pithy-sh/email",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"precompile": "bun scripts/precompile.ts",
|
|
29
|
-
"build": "bun run precompile && tsdown && tsc -p tsconfig.build.json",
|
|
29
|
+
"build": "bun run precompile && tsdown && tsc -p tsconfig.build.json && bun ../../tooling/build/src/stampDeclarations.ts",
|
|
30
30
|
"typecheck": "tsc -p tsconfig.json",
|
|
31
31
|
"test": "bun run precompile && vitest run",
|
|
32
32
|
"test:node": "bun run precompile && vitest run --project=node",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@cloudflare/workers-types": "^5.20260729.1",
|
|
40
40
|
"@hono/zod-validator": "^0.9.0",
|
|
41
|
-
"@pithy-sh/core": "^0.1.
|
|
42
|
-
"@pithy-sh/secrets": "^0.1.
|
|
41
|
+
"@pithy-sh/core": "^0.1.5",
|
|
42
|
+
"@pithy-sh/secrets": "^0.1.4",
|
|
43
43
|
"handlebars": "^4.7.9",
|
|
44
44
|
"postal-mime": "^3.0.0"
|
|
45
45
|
},
|
package/src/version.generated.ts
CHANGED