@zero-transfer/webdav 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 +7 -2
- package/dist/index.cjs +15 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +14 -8
- package/dist/index.d.ts +14 -8
- package/dist/index.mjs +14 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -10,12 +10,17 @@ npm install @zero-transfer/webdav
|
|
|
10
10
|
|
|
11
11
|
## Overview
|
|
12
12
|
|
|
13
|
-
WebDAV provider
|
|
13
|
+
WebDAV provider - PROPFIND-based `list`/`stat`, ranged GET, PUT uploads, Basic auth, and ETag preservation. Speaks remote filesystem semantics over HTTP.
|
|
14
14
|
|
|
15
15
|
## Usage
|
|
16
16
|
|
|
17
17
|
```ts
|
|
18
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
createTransferClient,
|
|
20
|
+
uploadFile,
|
|
21
|
+
downloadFile,
|
|
22
|
+
createWebDavProviderFactory,
|
|
23
|
+
} from "@zero-transfer/webdav";
|
|
19
24
|
```
|
|
20
25
|
|
|
21
26
|
## Public surface
|
package/dist/index.cjs
CHANGED
|
@@ -83,6 +83,7 @@ __export(webdav_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/WebDavProvider.ts
|
|
4895
4909
|
var import_node_buffer7 = require("buffer");
|
|
4896
4910
|
|
|
@@ -5481,6 +5495,7 @@ function parentOf(path2) {
|
|
|
5481
5495
|
importOpenSshConfig,
|
|
5482
5496
|
importWinScpSessions,
|
|
5483
5497
|
isClassicProviderId,
|
|
5498
|
+
isMainModule,
|
|
5484
5499
|
isSensitiveKey,
|
|
5485
5500
|
joinRemotePath,
|
|
5486
5501
|
matchKnownHosts,
|