@zero-transfer/s3 0.4.2 → 0.4.7

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 CHANGED
@@ -15,7 +15,12 @@ S3-compatible object storage provider with SigV4 signing, multipart upload, and
15
15
  ## Usage
16
16
 
17
17
  ```ts
18
- import { createS3ProviderFactory } from "@zero-transfer/s3";
18
+ import {
19
+ createTransferClient,
20
+ uploadFile,
21
+ downloadFile,
22
+ createS3ProviderFactory,
23
+ } from "@zero-transfer/s3";
19
24
  ```
20
25
 
21
26
  ## 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,