@zero-transfer/mft 0.4.2 → 0.4.6
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 +2 -0
- package/dist/index.cjs +15 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +11 -5
- package/dist/index.d.ts +11 -5
- package/dist/index.mjs +14 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
npm install @zero-transfer/mft
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
Installing this package automatically pulls in [`@zero-transfer/core`](https://www.npmjs.com/package/@zero-transfer/core) as a transitive dependency. The full core surface (`createTransferClient`, `uploadFile`, `downloadFile`, profiles, errors, sync planner, …) is re-exported from this package, so a single `import { … } from "@zero-transfer/mft"` is all you need. If your app uses multiple protocols, install the umbrella [`@zero-transfer/sdk`](https://www.npmjs.com/package/@zero-transfer/sdk) instead of multiple scoped packages.
|
|
12
|
+
|
|
11
13
|
## Overview
|
|
12
14
|
|
|
13
15
|
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.
|
package/dist/index.cjs
CHANGED
|
@@ -101,6 +101,7 @@ __export(mft_exports, {
|
|
|
101
101
|
inboxFailedPath: () => inboxFailedPath,
|
|
102
102
|
inboxProcessedPath: () => inboxProcessedPath,
|
|
103
103
|
isClassicProviderId: () => isClassicProviderId,
|
|
104
|
+
isMainModule: () => isMainModule,
|
|
104
105
|
isSensitiveKey: () => isSensitiveKey,
|
|
105
106
|
joinRemotePath: () => joinRemotePath,
|
|
106
107
|
matchKnownHosts: () => matchKnownHosts,
|
|
@@ -4916,6 +4917,19 @@ function isModifiedAtDifferent2(source, destination, toleranceMs) {
|
|
|
4916
4917
|
return Math.abs(sourceTime - destinationTime) > toleranceMs;
|
|
4917
4918
|
}
|
|
4918
4919
|
|
|
4920
|
+
// src/utils/mainModule.ts
|
|
4921
|
+
var import_node_url = require("url");
|
|
4922
|
+
function isMainModule(importMetaUrl) {
|
|
4923
|
+
if (typeof process === "undefined" || !process.argv || process.argv.length < 2) {
|
|
4924
|
+
return false;
|
|
4925
|
+
}
|
|
4926
|
+
try {
|
|
4927
|
+
return process.argv[1] === (0, import_node_url.fileURLToPath)(importMetaUrl);
|
|
4928
|
+
} catch {
|
|
4929
|
+
return false;
|
|
4930
|
+
}
|
|
4931
|
+
}
|
|
4932
|
+
|
|
4919
4933
|
// src/mft/RouteRegistry.ts
|
|
4920
4934
|
var RouteRegistry = class {
|
|
4921
4935
|
routes = /* @__PURE__ */ new Map();
|
|
@@ -5866,6 +5880,7 @@ var defaultRunner = ({ client, route, signal }) => {
|
|
|
5866
5880
|
inboxFailedPath,
|
|
5867
5881
|
inboxProcessedPath,
|
|
5868
5882
|
isClassicProviderId,
|
|
5883
|
+
isMainModule,
|
|
5869
5884
|
isSensitiveKey,
|
|
5870
5885
|
joinRemotePath,
|
|
5871
5886
|
matchKnownHosts,
|