@zero-transfer/s3 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 +8 -1
- 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/s3
|
|
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/s3"` 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
|
S3-compatible object storage provider with SigV4 signing, multipart upload, and cross-process multipart resume. Supports AWS S3, MinIO, R2, Wasabi, Backblaze B2 S3, DigitalOcean Spaces, and any custom endpoint that speaks the S3 API. Includes the in-memory resume store; persistent stores can be swapped in.
|
|
@@ -15,7 +17,12 @@ S3-compatible object storage provider with SigV4 signing, multipart upload, and
|
|
|
15
17
|
## Usage
|
|
16
18
|
|
|
17
19
|
```ts
|
|
18
|
-
import {
|
|
20
|
+
import {
|
|
21
|
+
createTransferClient,
|
|
22
|
+
uploadFile,
|
|
23
|
+
downloadFile,
|
|
24
|
+
createS3ProviderFactory,
|
|
25
|
+
} from "@zero-transfer/s3";
|
|
19
26
|
```
|
|
20
27
|
|
|
21
28
|
## Public surface
|
package/dist/index.cjs
CHANGED
|
@@ -85,6 +85,7 @@ __export(s3_exports, {
|
|
|
85
85
|
importOpenSshConfig: () => importOpenSshConfig,
|
|
86
86
|
importWinScpSessions: () => importWinScpSessions,
|
|
87
87
|
isClassicProviderId: () => isClassicProviderId,
|
|
88
|
+
isMainModule: () => isMainModule,
|
|
88
89
|
isSensitiveKey: () => isSensitiveKey,
|
|
89
90
|
joinRemotePath: () => joinRemotePath,
|
|
90
91
|
matchKnownHosts: () => matchKnownHosts,
|
|
@@ -4893,6 +4894,19 @@ function isModifiedAtDifferent2(source, destination, toleranceMs) {
|
|
|
4893
4894
|
return Math.abs(sourceTime - destinationTime) > toleranceMs;
|
|
4894
4895
|
}
|
|
4895
4896
|
|
|
4897
|
+
// src/utils/mainModule.ts
|
|
4898
|
+
var import_node_url = require("url");
|
|
4899
|
+
function isMainModule(importMetaUrl) {
|
|
4900
|
+
if (typeof process === "undefined" || !process.argv || process.argv.length < 2) {
|
|
4901
|
+
return false;
|
|
4902
|
+
}
|
|
4903
|
+
try {
|
|
4904
|
+
return process.argv[1] === (0, import_node_url.fileURLToPath)(importMetaUrl);
|
|
4905
|
+
} catch {
|
|
4906
|
+
return false;
|
|
4907
|
+
}
|
|
4908
|
+
}
|
|
4909
|
+
|
|
4896
4910
|
// src/providers/web/S3Provider.ts
|
|
4897
4911
|
var import_node_crypto3 = require("crypto");
|
|
4898
4912
|
var import_promises3 = require("fs/promises");
|
|
@@ -5790,6 +5804,7 @@ function innerText(xml, tag) {
|
|
|
5790
5804
|
importOpenSshConfig,
|
|
5791
5805
|
importWinScpSessions,
|
|
5792
5806
|
isClassicProviderId,
|
|
5807
|
+
isMainModule,
|
|
5793
5808
|
isSensitiveKey,
|
|
5794
5809
|
joinRemotePath,
|
|
5795
5810
|
matchKnownHosts,
|