@zero-transfer/ftps 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 CHANGED
@@ -8,6 +8,8 @@
8
8
  npm install @zero-transfer/ftps
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/ftps"` 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
  FTPS over explicit `AUTH TLS` or implicit TLS, with PEM/PFX/P12 certificate sources, encrypted passive data channels, certificate fingerprint pinning, SNI/servername controls, and TLS min/max version configuration.
@@ -15,7 +17,12 @@ FTPS over explicit `AUTH TLS` or implicit TLS, with PEM/PFX/P12 certificate sour
15
17
  ## Usage
16
18
 
17
19
  ```ts
18
- import { createFtpsProviderFactory } from "@zero-transfer/ftps";
20
+ import {
21
+ createTransferClient,
22
+ uploadFile,
23
+ downloadFile,
24
+ createFtpsProviderFactory,
25
+ } from "@zero-transfer/ftps";
19
26
  ```
20
27
 
21
28
  ## Public surface
@@ -34,6 +41,7 @@ This package publishes a narrowed surface of **4** exports. These symbols are al
34
41
  | Example | What it shows |
35
42
  | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
36
43
  | [`examples/ftps-client-certificate.ts`](https://github.com/tonywied17/zero-transfer/blob/main/examples/ftps-client-certificate.ts) | FTPS client-certificate (mutual TLS) example with certificate pinning. |
44
+ | [`examples/ftps-directory-ops.ts`](https://github.com/tonywied17/zero-transfer/blob/main/examples/ftps-directory-ops.ts) | FTPS directory operations: list, stat, mkdir, rename, remove, rmdir. |
37
45
 
38
46
  ## Documentation
39
47
 
package/dist/index.cjs CHANGED
@@ -83,6 +83,7 @@ __export(ftps_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/classic/ftp/FtpProvider.ts
4895
4909
  var import_node_buffer6 = require("buffer");
4896
4910
  var import_node_net = require("net");
@@ -6543,6 +6557,7 @@ function secretToString(value) {
6543
6557
  importOpenSshConfig,
6544
6558
  importWinScpSessions,
6545
6559
  isClassicProviderId,
6560
+ isMainModule,
6546
6561
  isSensitiveKey,
6547
6562
  joinRemotePath,
6548
6563
  matchKnownHosts,