@zero-transfer/dropbox 0.4.0 → 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 CHANGED
@@ -8,14 +8,21 @@
8
8
  npm install @zero-transfer/dropbox
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/dropbox"` 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
- Dropbox provider RPC + content-host APIs, list-folder cursor pagination, ranged downloads, single-shot uploads in `overwrite` mode, and `content_hash` exposed as both `uniqueId` and `checksum`.
15
+ Dropbox provider - RPC + content-host APIs, list-folder cursor pagination, ranged downloads, single-shot uploads in `overwrite` mode, and `content_hash` exposed as both `uniqueId` and `checksum`.
14
16
 
15
17
  ## Usage
16
18
 
17
19
  ```ts
18
- import { createDropboxProviderFactory } from "@zero-transfer/dropbox";
20
+ import {
21
+ createTransferClient,
22
+ uploadFile,
23
+ downloadFile,
24
+ createDropboxProviderFactory,
25
+ } from "@zero-transfer/dropbox";
19
26
  ```
20
27
 
21
28
  ## Public surface
@@ -29,7 +36,7 @@ This package publishes a narrowed surface of **2** exports. These symbols are al
29
36
 
30
37
  ## Examples
31
38
 
32
- _No dedicated example yet see the [examples directory](https://github.com/tonywied17/zero-transfer/tree/main/examples) for cross-scope showcases._
39
+ _No dedicated example yet - see the [examples directory](https://github.com/tonywied17/zero-transfer/tree/main/examples) for cross-scope showcases._
33
40
 
34
41
  ## Documentation
35
42
 
package/dist/index.cjs CHANGED
@@ -83,6 +83,7 @@ __export(dropbox_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/httpInternals.ts
4895
4909
  var import_node_buffer6 = require("buffer");
4896
4910
  function parseContentRangeTotal(value) {
@@ -5384,6 +5398,7 @@ async function collectChunks(source) {
5384
5398
  importOpenSshConfig,
5385
5399
  importWinScpSessions,
5386
5400
  isClassicProviderId,
5401
+ isMainModule,
5387
5402
  isSensitiveKey,
5388
5403
  joinRemotePath,
5389
5404
  matchKnownHosts,