@zero-transfer/http 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 @@ Read-only HTTP(S) provider with HEAD-based metadata, ranged GET resume, Basic au
15
15
  ## Usage
16
16
 
17
17
  ```ts
18
- import { createHttpProviderFactory } from "@zero-transfer/http";
18
+ import {
19
+ createTransferClient,
20
+ uploadFile,
21
+ downloadFile,
22
+ createHttpProviderFactory,
23
+ } from "@zero-transfer/http";
19
24
  ```
20
25
 
21
26
  ## Public surface
package/dist/index.cjs CHANGED
@@ -83,6 +83,7 @@ __export(http_exports, {
83
83
  importOpenSshConfig: () => importOpenSshConfig,
84
84
  importWinScpSessions: () => importWinScpSessions,
85
85
  isClassicProviderId: () => isClassicProviderId,
86
+ isMainModule: () => isMainModule,
86
87
  isSensitiveKey: () => isSensitiveKey,
87
88
  joinRemotePath: () => joinRemotePath,
88
89
  matchKnownHosts: () => matchKnownHosts,
@@ -4891,6 +4892,19 @@ function isModifiedAtDifferent2(source, destination, toleranceMs) {
4891
4892
  return Math.abs(sourceTime - destinationTime) > toleranceMs;
4892
4893
  }
4893
4894
 
4895
+ // src/utils/mainModule.ts
4896
+ var import_node_url = require("url");
4897
+ function isMainModule(importMetaUrl) {
4898
+ if (typeof process === "undefined" || !process.argv || process.argv.length < 2) {
4899
+ return false;
4900
+ }
4901
+ try {
4902
+ return process.argv[1] === (0, import_node_url.fileURLToPath)(importMetaUrl);
4903
+ } catch {
4904
+ return false;
4905
+ }
4906
+ }
4907
+
4894
4908
  // src/providers/web/HttpProvider.ts
4895
4909
  var import_node_buffer7 = require("buffer");
4896
4910
 
@@ -5283,6 +5297,7 @@ function responseToStat(response, normalizedPath) {
5283
5297
  importOpenSshConfig,
5284
5298
  importWinScpSessions,
5285
5299
  isClassicProviderId,
5300
+ isMainModule,
5286
5301
  isSensitiveKey,
5287
5302
  joinRemotePath,
5288
5303
  matchKnownHosts,