@zero-transfer/mft 0.1.0-alpha.0 → 0.1.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.
- package/README.md +59 -15
- package/dist/index.cjs +25 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.mjs +2 -2
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
# @zero-transfer/mft
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
> **Alpha umbrella package.** This package currently re-exports the entire
|
|
6
|
-
> [`@zero-transfer/sdk`](https://www.npmjs.com/package/@zero-transfer/sdk)
|
|
7
|
-
> public surface. Future releases will narrow this package to only its
|
|
8
|
-
> dedicated subset (see the
|
|
9
|
-
> [ZeroTransfer remake plan](https://github.com/tonywied17/zero-transfer/blob/main/zero-transfer-remake.md#future-monorepo-shape)).
|
|
10
|
-
> If you want every provider in one install today, depend on
|
|
11
|
-
> `@zero-transfer/sdk` directly.
|
|
3
|
+
> Routes, schedules, audit logs, webhooks, approval gates.
|
|
12
4
|
|
|
13
5
|
## Install
|
|
14
6
|
|
|
@@ -16,17 +8,69 @@ Managed File Transfer (MFT) workflows — routes, schedules, audit logs, webhook
|
|
|
16
8
|
npm install @zero-transfer/mft
|
|
17
9
|
```
|
|
18
10
|
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
Managed File Transfer workflow primitives: routes, schedules (interval + cron), inbox/outbox conventions, retention policies, audit logs (in-memory, JSONL, fan-out, webhook-backed), HMAC-signed webhook delivery, and approval gates that require human sign-off before a scheduled run executes.
|
|
14
|
+
|
|
19
15
|
## Usage
|
|
20
16
|
|
|
21
17
|
```ts
|
|
22
|
-
import {
|
|
23
|
-
|
|
24
|
-
const client = createTransferClient();
|
|
18
|
+
import { MftRoute, RouteRegistry, runRoute } from "@zero-transfer/mft";
|
|
25
19
|
```
|
|
26
20
|
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
## Public surface
|
|
22
|
+
|
|
23
|
+
This package narrows [`@zero-transfer/sdk`](https://www.npmjs.com/package/@zero-transfer/sdk) to **30** exports. Every symbol is re-exported from the SDK; the table below links into the full API reference:
|
|
24
|
+
|
|
25
|
+
| Symbol | Kind | Notes |
|
|
26
|
+
| ------------------------------------------------------------------------------------------------------------------------------- | --------- | ------------------ |
|
|
27
|
+
| [`MftRoute`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/interfaces/MftRoute.md) | Interface | See API reference. |
|
|
28
|
+
| [`RouteRegistry`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/classes/RouteRegistry.md) | Class | See API reference. |
|
|
29
|
+
| [`runRoute`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/runRoute.md) | Function | See API reference. |
|
|
30
|
+
| [`MftSchedule`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/interfaces/MftSchedule.md) | Interface | See API reference. |
|
|
31
|
+
| [`ScheduleRegistry`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/classes/ScheduleRegistry.md) | Class | See API reference. |
|
|
32
|
+
| [`MftScheduler`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/classes/MftScheduler.md) | Class | See API reference. |
|
|
33
|
+
| [`parseCronExpression`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/parseCronExpression.md) | Function | See API reference. |
|
|
34
|
+
| [`nextScheduleFireAt`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/nextScheduleFireAt.md) | Function | See API reference. |
|
|
35
|
+
| [`createInboxRoute`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/createInboxRoute.md) | Function | See API reference. |
|
|
36
|
+
| [`createOutboxRoute`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/createOutboxRoute.md) | Function | See API reference. |
|
|
37
|
+
| [`inboxProcessedPath`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/inboxProcessedPath.md) | Function | See API reference. |
|
|
38
|
+
| [`inboxFailedPath`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/inboxFailedPath.md) | Function | See API reference. |
|
|
39
|
+
| [`evaluateRetention`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/evaluateRetention.md) | Function | See API reference. |
|
|
40
|
+
| [`AgeRetentionPolicy`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/interfaces/AgeRetentionPolicy.md) | Interface | See API reference. |
|
|
41
|
+
| [`CountRetentionPolicy`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/interfaces/CountRetentionPolicy.md) | Interface | See API reference. |
|
|
42
|
+
| [`InMemoryAuditLog`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/classes/InMemoryAuditLog.md) | Class | See API reference. |
|
|
43
|
+
| [`createJsonlAuditLog`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/createJsonlAuditLog.md) | Function | See API reference. |
|
|
44
|
+
| [`composeAuditLogs`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/composeAuditLogs.md) | Function | See API reference. |
|
|
45
|
+
| [`freezeReceipt`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/freezeReceipt.md) | Function | See API reference. |
|
|
46
|
+
| [`summarizeError`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/summarizeError.md) | Function | See API reference. |
|
|
47
|
+
| [`MftAuditLog`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/interfaces/MftAuditLog.md) | Interface | See API reference. |
|
|
48
|
+
| [`MftAuditEntry`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/interfaces/MftAuditEntry.md) | Interface | See API reference. |
|
|
49
|
+
| [`dispatchWebhook`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/dispatchWebhook.md) | Function | See API reference. |
|
|
50
|
+
| [`signWebhookPayload`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/signWebhookPayload.md) | Function | See API reference. |
|
|
51
|
+
| [`createWebhookAuditLog`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/createWebhookAuditLog.md) | Function | See API reference. |
|
|
52
|
+
| [`WebhookTarget`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/interfaces/WebhookTarget.md) | Interface | See API reference. |
|
|
53
|
+
| [`WebhookRetryPolicy`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/interfaces/WebhookRetryPolicy.md) | Interface | See API reference. |
|
|
54
|
+
| [`ApprovalRegistry`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/classes/ApprovalRegistry.md) | Class | See API reference. |
|
|
55
|
+
| [`createApprovalGate`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/createApprovalGate.md) | Function | See API reference. |
|
|
56
|
+
| [`ApprovalRejectedError`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/classes/ApprovalRejectedError.md) | Class | See API reference. |
|
|
57
|
+
|
|
58
|
+
## Examples
|
|
59
|
+
|
|
60
|
+
| Example | What it shows |
|
|
61
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------- |
|
|
62
|
+
| [`examples/mft-route.ts`](https://github.com/tonywied17/zero-transfer/blob/main/examples/mft-route.ts) | Declarative MFT route + cron schedule. |
|
|
63
|
+
| [`examples/approval-gated-route.ts`](https://github.com/tonywied17/zero-transfer/blob/main/examples/approval-gated-route.ts) | Approval gate for sensitive scheduled routes. |
|
|
64
|
+
| [`examples/atomic-deploy-with-rollback.ts`](https://github.com/tonywied17/zero-transfer/blob/main/examples/atomic-deploy-with-rollback.ts) | Atomic blue/green-style deploy with rollback over SFTP. |
|
|
65
|
+
|
|
66
|
+
## Documentation
|
|
67
|
+
|
|
68
|
+
- [Scope page](https://github.com/tonywied17/zero-transfer/blob/main/docs/scopes/mft.md)
|
|
69
|
+
- [Top-level README](https://github.com/tonywied17/zero-transfer/blob/main/README.md)
|
|
70
|
+
- [Full API reference](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/README.md)
|
|
71
|
+
- [Capability matrix](https://github.com/tonywied17/zero-transfer/blob/main/README.md#capability-matrix)
|
|
72
|
+
- [Examples](https://github.com/tonywied17/zero-transfer/tree/main/examples)
|
|
29
73
|
|
|
30
74
|
## License
|
|
31
75
|
|
|
32
|
-
MIT © Tony Wiedman
|
|
76
|
+
MIT © [Tony Wiedman](https://github.com/tonywied17)
|
package/dist/index.cjs
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
-
// AUTO-GENERATED
|
|
1
|
+
// AUTO-GENERATED. Edit scripts/scope-manifest.mjs and re-run packages:generate.
|
|
2
2
|
"use strict";
|
|
3
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const sdk = require("@zero-transfer/sdk");
|
|
5
|
+
Object.defineProperty(exports, "RouteRegistry", { enumerable: true, get: () => sdk["RouteRegistry"] });
|
|
6
|
+
Object.defineProperty(exports, "runRoute", { enumerable: true, get: () => sdk["runRoute"] });
|
|
7
|
+
Object.defineProperty(exports, "ScheduleRegistry", { enumerable: true, get: () => sdk["ScheduleRegistry"] });
|
|
8
|
+
Object.defineProperty(exports, "MftScheduler", { enumerable: true, get: () => sdk["MftScheduler"] });
|
|
9
|
+
Object.defineProperty(exports, "parseCronExpression", { enumerable: true, get: () => sdk["parseCronExpression"] });
|
|
10
|
+
Object.defineProperty(exports, "nextScheduleFireAt", { enumerable: true, get: () => sdk["nextScheduleFireAt"] });
|
|
11
|
+
Object.defineProperty(exports, "createInboxRoute", { enumerable: true, get: () => sdk["createInboxRoute"] });
|
|
12
|
+
Object.defineProperty(exports, "createOutboxRoute", { enumerable: true, get: () => sdk["createOutboxRoute"] });
|
|
13
|
+
Object.defineProperty(exports, "inboxProcessedPath", { enumerable: true, get: () => sdk["inboxProcessedPath"] });
|
|
14
|
+
Object.defineProperty(exports, "inboxFailedPath", { enumerable: true, get: () => sdk["inboxFailedPath"] });
|
|
15
|
+
Object.defineProperty(exports, "evaluateRetention", { enumerable: true, get: () => sdk["evaluateRetention"] });
|
|
16
|
+
Object.defineProperty(exports, "InMemoryAuditLog", { enumerable: true, get: () => sdk["InMemoryAuditLog"] });
|
|
17
|
+
Object.defineProperty(exports, "createJsonlAuditLog", { enumerable: true, get: () => sdk["createJsonlAuditLog"] });
|
|
18
|
+
Object.defineProperty(exports, "composeAuditLogs", { enumerable: true, get: () => sdk["composeAuditLogs"] });
|
|
19
|
+
Object.defineProperty(exports, "freezeReceipt", { enumerable: true, get: () => sdk["freezeReceipt"] });
|
|
20
|
+
Object.defineProperty(exports, "summarizeError", { enumerable: true, get: () => sdk["summarizeError"] });
|
|
21
|
+
Object.defineProperty(exports, "dispatchWebhook", { enumerable: true, get: () => sdk["dispatchWebhook"] });
|
|
22
|
+
Object.defineProperty(exports, "signWebhookPayload", { enumerable: true, get: () => sdk["signWebhookPayload"] });
|
|
23
|
+
Object.defineProperty(exports, "createWebhookAuditLog", { enumerable: true, get: () => sdk["createWebhookAuditLog"] });
|
|
24
|
+
Object.defineProperty(exports, "ApprovalRegistry", { enumerable: true, get: () => sdk["ApprovalRegistry"] });
|
|
25
|
+
Object.defineProperty(exports, "createApprovalGate", { enumerable: true, get: () => sdk["createApprovalGate"] });
|
|
26
|
+
Object.defineProperty(exports, "ApprovalRejectedError", { enumerable: true, get: () => sdk["ApprovalRejectedError"] });
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
// AUTO-GENERATED
|
|
2
|
-
export
|
|
1
|
+
// AUTO-GENERATED. Edit scripts/scope-manifest.mjs and re-run packages:generate.
|
|
2
|
+
export { RouteRegistry, runRoute, ScheduleRegistry, MftScheduler, parseCronExpression, nextScheduleFireAt, createInboxRoute, createOutboxRoute, inboxProcessedPath, inboxFailedPath, evaluateRetention, InMemoryAuditLog, createJsonlAuditLog, composeAuditLogs, freezeReceipt, summarizeError, dispatchWebhook, signWebhookPayload, createWebhookAuditLog, ApprovalRegistry, createApprovalGate, ApprovalRejectedError } from "@zero-transfer/sdk";
|
|
3
|
+
export type { MftRoute, MftSchedule, AgeRetentionPolicy, CountRetentionPolicy, MftAuditLog, MftAuditEntry, WebhookTarget, WebhookRetryPolicy } from "@zero-transfer/sdk";
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
// AUTO-GENERATED
|
|
2
|
-
export
|
|
1
|
+
// AUTO-GENERATED. Edit scripts/scope-manifest.mjs and re-run packages:generate.
|
|
2
|
+
export { RouteRegistry, runRoute, ScheduleRegistry, MftScheduler, parseCronExpression, nextScheduleFireAt, createInboxRoute, createOutboxRoute, inboxProcessedPath, inboxFailedPath, evaluateRetention, InMemoryAuditLog, createJsonlAuditLog, composeAuditLogs, freezeReceipt, summarizeError, dispatchWebhook, signWebhookPayload, createWebhookAuditLog, ApprovalRegistry, createApprovalGate, ApprovalRejectedError } from "@zero-transfer/sdk";
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zero-transfer/mft",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Routes, schedules, audit logs, webhooks, approval gates.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"zero-transfer",
|
|
7
7
|
"mft",
|
|
8
|
+
"mft",
|
|
8
9
|
"managed-file-transfer",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
10
|
+
"schedules",
|
|
11
|
+
"audit"
|
|
11
12
|
],
|
|
12
13
|
"author": "Tony Wiedman",
|
|
13
14
|
"license": "MIT",
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
"bugs": {
|
|
36
37
|
"url": "https://github.com/tonywied17/zero-transfer/issues"
|
|
37
38
|
},
|
|
38
|
-
"homepage": "https://github.com/tonywied17/zero-transfer#readme",
|
|
39
|
+
"homepage": "https://github.com/tonywied17/zero-transfer/tree/main/packages/mft#readme",
|
|
39
40
|
"engines": {
|
|
40
41
|
"node": ">=20.0.0"
|
|
41
42
|
},
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
"access": "public"
|
|
46
47
|
},
|
|
47
48
|
"sideEffects": false,
|
|
48
|
-
"
|
|
49
|
-
"@zero-transfer/sdk": "0.1.
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"@zero-transfer/sdk": "0.1.2"
|
|
50
51
|
}
|
|
51
52
|
}
|