@appium/support 5.0.2 → 5.1.0
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/build/lib/console.d.ts +4 -5
- package/build/lib/console.d.ts.map +1 -1
- package/build/lib/doctor.d.ts +1 -1
- package/build/lib/doctor.js +5 -5
- package/build/lib/doctor.js.map +1 -1
- package/build/lib/env.d.ts +2 -2
- package/build/lib/env.d.ts.map +1 -1
- package/build/lib/env.js +2 -2
- package/build/lib/env.js.map +1 -1
- package/build/lib/fs.d.ts +15 -16
- package/build/lib/fs.d.ts.map +1 -1
- package/build/lib/image-util.d.ts +1 -1
- package/build/lib/image-util.d.ts.map +1 -1
- package/build/lib/image-util.js +2 -3
- package/build/lib/image-util.js.map +1 -1
- package/build/lib/index.d.ts +13 -19
- package/build/lib/index.d.ts.map +1 -1
- package/build/lib/logging.d.ts +4 -4
- package/build/lib/logging.d.ts.map +1 -1
- package/build/lib/logging.js +6 -14
- package/build/lib/logging.js.map +1 -1
- package/build/lib/mjpeg.d.ts.map +1 -1
- package/build/lib/mkdirp.d.ts +1 -2
- package/build/lib/net.d.ts +7 -7
- package/build/lib/net.d.ts.map +1 -1
- package/build/lib/net.js +2 -3
- package/build/lib/net.js.map +1 -1
- package/build/lib/node.d.ts.map +1 -1
- package/build/lib/node.js +5 -6
- package/build/lib/node.js.map +1 -1
- package/build/lib/npm.d.ts +5 -5
- package/build/lib/npm.d.ts.map +1 -1
- package/build/lib/plist.d.ts.map +1 -1
- package/build/lib/plist.js +6 -7
- package/build/lib/plist.js.map +1 -1
- package/build/lib/process.js +2 -3
- package/build/lib/process.js.map +1 -1
- package/build/lib/system.js +6 -7
- package/build/lib/system.js.map +1 -1
- package/build/lib/tempdir.d.ts.map +1 -1
- package/build/lib/tempdir.js +4 -4
- package/build/lib/tempdir.js.map +1 -1
- package/build/lib/util.d.ts +3 -3
- package/build/lib/util.d.ts.map +1 -1
- package/build/lib/util.js +22 -22
- package/build/lib/util.js.map +1 -1
- package/build/lib/zip.d.ts.map +1 -1
- package/build/lib/zip.js +6 -7
- package/build/lib/zip.js.map +1 -1
- package/lib/logging.js +6 -12
- package/package.json +9 -9
package/build/lib/console.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
/**
|
|
3
2
|
* A particular console/logging class for Appium's CLI.
|
|
4
3
|
*
|
|
@@ -12,7 +11,7 @@ export class CliConsole {
|
|
|
12
11
|
/**
|
|
13
12
|
* @type {Record<keyof typeof symbols,keyof Extract<import('@colors/colors').Color, 'string'>>}
|
|
14
13
|
*/
|
|
15
|
-
static symbolToColor: Record<keyof typeof symbols, keyof Extract<import(
|
|
14
|
+
static symbolToColor: Record<keyof typeof symbols, keyof Extract<import("@colors/colors").Color, "string">>;
|
|
16
15
|
/**
|
|
17
16
|
*
|
|
18
17
|
* @param {ConsoleOpts} opts
|
|
@@ -33,7 +32,7 @@ export class CliConsole {
|
|
|
33
32
|
* You probably don't want to call this more than once before exiting (since that will output invalid JSON).
|
|
34
33
|
* @param {import('type-fest').JsonValue} value
|
|
35
34
|
*/
|
|
36
|
-
json(value: import(
|
|
35
|
+
json(value: import("type-fest").JsonValue): void;
|
|
37
36
|
/**
|
|
38
37
|
* General logging function.
|
|
39
38
|
* @param {string} [message]
|
|
@@ -90,11 +89,11 @@ export class CliConsole {
|
|
|
90
89
|
export const console: CliConsole;
|
|
91
90
|
export { symbols };
|
|
92
91
|
/**
|
|
93
|
-
* Options for {@linkcode CliConsole
|
|
92
|
+
* Options for {@linkcode CliConsole}.
|
|
94
93
|
*/
|
|
95
94
|
export type ConsoleOpts = {
|
|
96
95
|
/**
|
|
97
|
-
* - If _truthy_, supress all output except JSON (use {@linkcode
|
|
96
|
+
* - If _truthy_, supress all output except JSON (use {@linkcode CliConsole#json}), which writes to `STDOUT`.
|
|
98
97
|
*/
|
|
99
98
|
jsonMode?: boolean | undefined;
|
|
100
99
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../lib/console.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../lib/console.js"],"names":[],"mappings":"AAiBA;;;;;;;;GAQG;AACH;IAmBE;;OAEG;IACH,sBAFU,MAAM,CAAC,MAAM,OAAO,OAAO,EAAC,MAAM,OAAO,CAAC,OAAO,gBAAgB,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAO5F;IAEF;;;OAGG;IACH,iDAFW,WAAW,EAMrB;IAED;;;;;;;OAOG;IACH,mGAFa,MAAM,GAAC,SAAS,CAc5B;IAED;;;;;OAKG;IACH,YAFW,OAAO,WAAW,EAAE,SAAS,QAIvC;IAED;;;;OAIG;IACH,2CAFc,GAAG,EAAA,QAIhB;IAED;;;;OAIG;IACH,0CAFc,GAAG,EAAA,QAIhB;IAED;;;;OAIG;IACH,6CAFc,GAAG,EAAA,QAIhB;IAED;;;;OAIG;IACH,WAHW,GAAG,0DAKb;IAED;;;;OAIG;IACH,4CAFc,GAAG,EAAA,QAIhB;IAED;;;;OAIG;IACH,4CAFc,GAAG,EAAA,QAIhB;IAED;;;;OAIG;IACH,6CAFc,GAAG,EAAA,QAIhB;;CACF;AAED;;;;;;;;GAQG;AAEH,iCAAwC;;;;;;;;;;;;;;;;;;;oBAvKpB,aAAa"}
|
package/build/lib/doctor.d.ts
CHANGED
|
@@ -32,5 +32,5 @@ export function nokOptional(message: string): DoctorCheckResult;
|
|
|
32
32
|
*/
|
|
33
33
|
export class FixSkippedError extends Error {
|
|
34
34
|
}
|
|
35
|
-
export type DoctorCheckResult = import(
|
|
35
|
+
export type DoctorCheckResult = import("@appium/types").DoctorCheckResult;
|
|
36
36
|
//# sourceMappingURL=doctor.d.ts.map
|
package/build/lib/doctor.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FixSkippedError =
|
|
3
|
+
exports.FixSkippedError = void 0;
|
|
4
|
+
exports.ok = ok;
|
|
5
|
+
exports.nok = nok;
|
|
6
|
+
exports.okOptional = okOptional;
|
|
7
|
+
exports.nokOptional = nokOptional;
|
|
4
8
|
/**
|
|
5
9
|
* A shortcut for a successful required doctor check
|
|
6
10
|
*
|
|
@@ -10,7 +14,6 @@ exports.FixSkippedError = exports.nokOptional = exports.okOptional = exports.nok
|
|
|
10
14
|
function ok(message) {
|
|
11
15
|
return { ok: true, optional: false, message };
|
|
12
16
|
}
|
|
13
|
-
exports.ok = ok;
|
|
14
17
|
/**
|
|
15
18
|
* A shortcut for an unsuccessful required doctor check
|
|
16
19
|
*
|
|
@@ -20,7 +23,6 @@ exports.ok = ok;
|
|
|
20
23
|
function nok(message) {
|
|
21
24
|
return { ok: false, optional: false, message };
|
|
22
25
|
}
|
|
23
|
-
exports.nok = nok;
|
|
24
26
|
/**
|
|
25
27
|
* A shortcut for a successful optional doctor check
|
|
26
28
|
*
|
|
@@ -30,7 +32,6 @@ exports.nok = nok;
|
|
|
30
32
|
function okOptional(message) {
|
|
31
33
|
return { ok: true, optional: true, message };
|
|
32
34
|
}
|
|
33
|
-
exports.okOptional = okOptional;
|
|
34
35
|
/**
|
|
35
36
|
* A shortcut for an unsuccessful optional doctor check
|
|
36
37
|
*
|
|
@@ -40,7 +41,6 @@ exports.okOptional = okOptional;
|
|
|
40
41
|
function nokOptional(message) {
|
|
41
42
|
return { ok: false, optional: true, message };
|
|
42
43
|
}
|
|
43
|
-
exports.nokOptional = nokOptional;
|
|
44
44
|
/**
|
|
45
45
|
* Throw this exception in the fix() method
|
|
46
46
|
* of your doctor check to skip the actual fix if hasAutofix() is true
|
package/build/lib/doctor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../lib/doctor.js"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../lib/doctor.js"],"names":[],"mappings":";;;AAMA,gBAEC;AAQD,kBAEC;AAQD,gCAEC;AAQD,kCAEC;AAtCD;;;;;GAKG;AACH,SAAgB,EAAE,CAAC,OAAO;IACxB,OAAO,EAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAC,CAAC;AAC9C,CAAC;AAED;;;;;GAKG;AACH,SAAgB,GAAG,CAAC,OAAO;IACzB,OAAO,EAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAC,CAAC;AAC/C,CAAC;AAED;;;;;GAKG;AACH,SAAgB,UAAU,CAAC,OAAO;IAChC,OAAO,EAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAC,CAAC;AAC7C,CAAC;AAED;;;;;GAKG;AACH,SAAgB,WAAW,CAAC,OAAO;IACjC,OAAO,EAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAC,CAAC;AAC9C,CAAC;AAED;;;GAGG;AACH,MAAa,eAAgB,SAAQ,KAAK;CAAG;AAA7C,0CAA6C;AAE7C;;GAEG"}
|
package/build/lib/env.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export const findAppiumDependencyPackage: ((cwd?: string | undefined, acceptable
|
|
|
29
29
|
/**
|
|
30
30
|
* Read a `package.json` in dir `cwd`. If none found, return `undefined`.
|
|
31
31
|
*/
|
|
32
|
-
export const readPackageInDir: ((cwd: string) => Promise<import(
|
|
32
|
+
export const readPackageInDir: ((cwd: string) => Promise<import("read-pkg").NormalizedPackageJson | undefined>) & _.MemoizedFunction;
|
|
33
33
|
/**
|
|
34
34
|
* Determines location of Appium's "home" dir
|
|
35
35
|
*
|
|
@@ -46,7 +46,7 @@ export const resolveAppiumHome: ((cwd?: string | undefined) => Promise<string>)
|
|
|
46
46
|
* don't pass a parameter and let `resolveAppiumHome()` handle it.
|
|
47
47
|
*/
|
|
48
48
|
export const resolveManifestPath: ((appiumHome?: string | undefined) => Promise<string>) & _.MemoizedFunction;
|
|
49
|
-
export type NormalizedPackageJson = import(
|
|
49
|
+
export type NormalizedPackageJson = import("read-pkg").NormalizedPackageJson;
|
|
50
50
|
import semver from 'semver';
|
|
51
51
|
import _ from 'lodash';
|
|
52
52
|
//# sourceMappingURL=env.d.ts.map
|
package/build/lib/env.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../lib/env.js"],"names":[],"mappings":"AA8BA;;;;;GAKG;AACH,yCAHW,MAAM,GACJ,
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../lib/env.js"],"names":[],"mappings":"AA8BA;;;;;GAKG;AACH,yCAHW,MAAM,GACJ,OAAO,CAAC,OAAO,CAAC,CAI5B;AA/BD;;;GAGG;AACH,kCAFU,MAAM,CAEsD;AAEtE;;;GAGG;AACH,gCAFU,MAAM,CAEmC;AAEnD;;;GAGG;AACH,qCAFU,MAAM,CAOd;AAYF;;;;GAIG;AACH,qIAMe,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,uBAmCtC;AAEF;;GAEG;AACH,sCAGa,MAAM,KACJ,OAAO,CAAC,OAAO,UAAU,EAAE,qBAAqB,GAAC,SAAS,CAAC,uBAKxE;AAEF;;;;;;;GAOG;AACH,+DAGe,OAAO,CAAC,MAAM,CAAC,uBAa5B;AAEF;;;;;GAKG;AACH,wEAGe,OAAO,CAAC,MAAM,CAAC,uBAO5B;oCAGW,OAAO,UAAU,EAAE,qBAAqB;mBA9IlC,QAAQ;cAJb,QAAQ"}
|
package/build/lib/env.js
CHANGED
|
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.resolveManifestPath = exports.resolveAppiumHome = exports.readPackageInDir = exports.findAppiumDependencyPackage = exports.
|
|
6
|
+
exports.resolveManifestPath = exports.resolveAppiumHome = exports.readPackageInDir = exports.findAppiumDependencyPackage = exports.MANIFEST_RELATIVE_PATH = exports.MANIFEST_BASENAME = exports.DEFAULT_APPIUM_HOME = void 0;
|
|
7
|
+
exports.hasAppiumDependency = hasAppiumDependency;
|
|
7
8
|
// @ts-check
|
|
8
9
|
const lodash_1 = __importDefault(require("lodash"));
|
|
9
10
|
const os_1 = require("os");
|
|
@@ -34,7 +35,6 @@ exports.MANIFEST_RELATIVE_PATH = path_1.default.join('node_modules', '.cache', '
|
|
|
34
35
|
async function hasAppiumDependency(cwd) {
|
|
35
36
|
return Boolean(await (0, exports.findAppiumDependencyPackage)(cwd));
|
|
36
37
|
}
|
|
37
|
-
exports.hasAppiumDependency = hasAppiumDependency;
|
|
38
38
|
/**
|
|
39
39
|
* Given `cwd`, use `npm` to find the closest package _or workspace root_, and return the path if the root depends upon `appium`.
|
|
40
40
|
*
|
package/build/lib/env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../lib/env.js"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../lib/env.js"],"names":[],"mappings":";;;;;;AAoCA,kDAEC;AAtCD,YAAY;AACZ,oDAAuB;AACvB,2BAA2B;AAC3B,gDAAwB;AACxB,wDAA+B;AAC/B,oDAA4B;AAE5B;;;GAGG;AACU,QAAA,mBAAmB,GAAG,cAAI,CAAC,OAAO,CAAC,IAAA,YAAO,GAAE,EAAE,SAAS,CAAC,CAAC;AAEtE;;;GAGG;AACU,QAAA,iBAAiB,GAAG,iBAAiB,CAAC;AAEnD;;;GAGG;AACU,QAAA,sBAAsB,GAAG,cAAI,CAAC,IAAI,CAC7C,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,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|
2
1
|
export default fs;
|
|
3
2
|
/**
|
|
4
3
|
* The callback function which will be called during the directory walking
|
|
@@ -6,8 +5,8 @@ export default fs;
|
|
|
6
5
|
export type WalkDirCallback = (itemPath: string, isDirectory: boolean) => boolean | void;
|
|
7
6
|
export type glob = typeof import("glob");
|
|
8
7
|
export type mv = typeof mv;
|
|
9
|
-
export type PathLike = import(
|
|
10
|
-
export type ReadFn<TBuffer extends NodeJS.ArrayBufferView> = (fd: number, buffer: TBuffer | import(
|
|
8
|
+
export type PathLike = import("fs").PathLike;
|
|
9
|
+
export type ReadFn<TBuffer extends NodeJS.ArrayBufferView> = (fd: number, buffer: TBuffer | import("node:fs").ReadAsyncOptions<TBuffer>, offset?: number | undefined, length?: number | undefined, position?: number | null | undefined) => B<{
|
|
11
10
|
bytesRead: number;
|
|
12
11
|
buffer: TBuffer;
|
|
13
12
|
}>;
|
|
@@ -21,7 +20,7 @@ export namespace fs {
|
|
|
21
20
|
* @param {PathLike} path
|
|
22
21
|
* @returns {Promise<boolean>}
|
|
23
22
|
*/
|
|
24
|
-
export function hasAccess(path:
|
|
23
|
+
export function hasAccess(path: PathLike): Promise<boolean>;
|
|
25
24
|
/**
|
|
26
25
|
* Resolves `true` if `path` is executable; `false` otherwise.
|
|
27
26
|
*
|
|
@@ -31,26 +30,26 @@ export namespace fs {
|
|
|
31
30
|
* @param {PathLike} path
|
|
32
31
|
* @returns {Promise<boolean>}
|
|
33
32
|
*/
|
|
34
|
-
export function isExecutable(path:
|
|
33
|
+
export function isExecutable(path: PathLike): Promise<boolean>;
|
|
35
34
|
/**
|
|
36
35
|
* Alias for {@linkcode fs.hasAccess}
|
|
37
36
|
* @param {PathLike} path
|
|
38
37
|
*/
|
|
39
|
-
export function exists(path:
|
|
38
|
+
export function exists(path: PathLike): Promise<boolean>;
|
|
40
39
|
/**
|
|
41
40
|
* Remove a directory and all its contents, recursively
|
|
42
41
|
* @param {PathLike} filepath
|
|
43
42
|
* @returns Promise<void>
|
|
44
43
|
* @see https://nodejs.org/api/fs.html#fspromisesrmpath-options
|
|
45
44
|
*/
|
|
46
|
-
export function rimraf(filepath:
|
|
45
|
+
export function rimraf(filepath: PathLike): Promise<void>;
|
|
47
46
|
/**
|
|
48
47
|
* Remove a directory and all its contents, recursively in sync
|
|
49
48
|
* @param {PathLike} filepath
|
|
50
49
|
* @returns undefined
|
|
51
50
|
* @see https://nodejs.org/api/fs.html#fsrmsyncpath-options
|
|
52
51
|
*/
|
|
53
|
-
export function rimrafSync(filepath:
|
|
52
|
+
export function rimrafSync(filepath: PathLike): void;
|
|
54
53
|
/**
|
|
55
54
|
* Like Node.js' `fsPromises.mkdir()`, but will _not_ reject if the directory already exists.
|
|
56
55
|
*
|
|
@@ -74,11 +73,11 @@ export namespace fs {
|
|
|
74
73
|
* @param {PathLike} filePath
|
|
75
74
|
* @returns {Promise<string>}
|
|
76
75
|
*/
|
|
77
|
-
export function md5(filePath:
|
|
78
|
-
|
|
76
|
+
export function md5(filePath: PathLike): Promise<string>;
|
|
77
|
+
let mv_1: (from: string, to: string, opts?: mv.Options) => B<void>;
|
|
79
78
|
export { mv_1 as mv };
|
|
80
79
|
export { which };
|
|
81
|
-
export
|
|
80
|
+
export let glob: (pattern: string, opts?: import("glob").GlobOptions) => B<string[]>;
|
|
82
81
|
export { sanitize as sanitizeName };
|
|
83
82
|
/**
|
|
84
83
|
* Create a hex digest of some file at `filePath`
|
|
@@ -86,7 +85,7 @@ export namespace fs {
|
|
|
86
85
|
* @param {string} [algorithm]
|
|
87
86
|
* @returns {Promise<string>}
|
|
88
87
|
*/
|
|
89
|
-
export function hash(filePath:
|
|
88
|
+
export function hash(filePath: PathLike, algorithm?: string | undefined): Promise<string>;
|
|
90
89
|
/**
|
|
91
90
|
* Returns an `Walker` instance, which is a readable stream (and thusly an async iterator).
|
|
92
91
|
*
|
|
@@ -95,13 +94,13 @@ export namespace fs {
|
|
|
95
94
|
* @returns {import('klaw').Walker}
|
|
96
95
|
* @see https://www.npmjs.com/package/klaw
|
|
97
96
|
*/
|
|
98
|
-
export function walk(dir: string, opts?: klaw.Options | undefined): klaw.Walker;
|
|
97
|
+
export function walk(dir: string, opts?: klaw.Options | undefined): import("klaw").Walker;
|
|
99
98
|
/**
|
|
100
99
|
* Recursively create a directory.
|
|
101
100
|
* @param {PathLike} dir
|
|
102
101
|
* @returns {Promise<string|undefined>}
|
|
103
102
|
*/
|
|
104
|
-
export function mkdirp(dir:
|
|
103
|
+
export function mkdirp(dir: PathLike): Promise<string | undefined>;
|
|
105
104
|
/**
|
|
106
105
|
* Walks a directory given according to the parameters given. The callback will be invoked with a path joined with the dir parameter
|
|
107
106
|
* @param {string} dir Directory path where we will start walking
|
|
@@ -118,7 +117,7 @@ export namespace fs {
|
|
|
118
117
|
* @throws {Error} If there were problems finding or reading a `package.json` file
|
|
119
118
|
* @returns {import('read-pkg').NormalizedPackageJson} A parsed `package.json`
|
|
120
119
|
*/
|
|
121
|
-
export function readPackageJsonFrom(dir: string, opts?: readPkg.Options | undefined):
|
|
120
|
+
export function readPackageJsonFrom(dir: string, opts?: readPkg.Options | undefined): import("read-pkg").NormalizedPackageJson;
|
|
122
121
|
/**
|
|
123
122
|
* Finds the project root directory from `dir`.
|
|
124
123
|
* @param {string} dir - Directory to search from
|
|
@@ -135,7 +134,7 @@ export namespace fs {
|
|
|
135
134
|
export { createWriteStream };
|
|
136
135
|
export { createReadStream };
|
|
137
136
|
export let lstat: typeof fsPromises.lstat;
|
|
138
|
-
export let open: (path: PathLike, flags: import(
|
|
137
|
+
export let open: (path: PathLike, flags: import("fs").OpenMode, mode?: import("fs").Mode) => Promise<number>;
|
|
139
138
|
export let openFile: typeof fsPromises.open;
|
|
140
139
|
export let readdir: typeof fsPromises.readdir;
|
|
141
140
|
export function read(fd: number, buffer: NodeJS.ArrayBufferView | import("fs").ReadAsyncOptions<NodeJS.ArrayBufferView>, offset: number | undefined, length: number | undefined, position: number | null | undefined): B<{
|
package/build/lib/fs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../lib/fs.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../lib/fs.js"],"names":[],"mappings":";;;;yCA2YW,MAAM,eACN,OAAO,KACN,OAAO,GAAC,IAAI;mBAIX,qBAAc;iBACd,SAAY;uBACZ,OAAO,IAAI,EAAE,QAAQ;mBAII,OAAO,SAA/B,MAAM,CAAC,eAAgB,SAE1B,MAAM,UACN,OAAO,GAAC,OAAO,SAAS,EAAE,gBAAgB,CAAC,OAAO,CAAC,qGAIjD,CAAC,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAC,CAAC;;IAzXlD;;;;;;;;OAQG;IACH,gCAHW,QAAQ,GACN,OAAO,CAAC,OAAO,CAAC,CAS5B;IAED;;;;;;;;OAQG;IACH,mCAHW,QAAQ,GACN,OAAO,CAAC,OAAO,CAAC,CAY5B;IAED;;;OAGG;IACH,6BAFW,QAAQ,oBAIlB;IAED;;;;;OAKG;IACH,iCAJW,QAAQ,iBAMlB;IAED;;;;;OAKG;IACH,qCAJW,QAAQ,QAMlB;IAED;;;;;;;OAOG;IACH,gCALW,MAAM,GAAC,MAAM,GAAC,GAAG,yDAEf,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CAWrC;IACD;;;;;;;OAOG;IACH,iCANW,MAAM,eACN,MAAM,mCAGJ,OAAO,CAAC,IAAI,CAAC,CAOzB;IAED;;;;OAIG;IACH,8BAHW,QAAQ,GACN,OAAO,CAAC,MAAM,CAAC,CAI3B;cAKc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,OAAO,KAAK,CAAC,CAAC,IAAI,CAAC;;;qBAYtD,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,MAAM,EAAE,WAAW,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;;IAUpF;;;;;OAKG;IACH,+BAJW,QAAQ,mCAEN,OAAO,CAAC,MAAM,CAAC,CAgB3B;IAED;;;;;;;OAOG;IACH,0BALW,MAAM,oCAEJ,OAAO,MAAM,EAAE,MAAM,CAKjC;IAED;;;;OAIG;IACH,4BAHW,QAAQ,GACN,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CAIrC;IAED;;;;;;;OAOG;IAEH,6BAPW,MAAM,aACN,OAAO,YACP,eAAe,GAEb,OAAO,CAAC,MAAM,OAAC,CAAC,CA2E5B;IACD;;;;;;OAMG;IACH,yCALW,MAAM,uCAGJ,OAAO,UAAU,EAAE,qBAAqB,CAYpD;IACD;;;;;;OAMG;IACH,8BALW,MAAM,GAGJ,MAAM,CAWlB;;;;;;;;;qBAcS,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,OAAO,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC;;;IAiEpG,yBACQ,MAAM,wLAKJ,CAAC,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,yBAAS;KAAC,CAAC,CACnD;;;;;;;;;;;;;;;eA7Yc,IAAI;cAhBL,UAAU;gBAiBR,KAAK;kBAKH,OAAO;qBADJ,mBAAmB;iBAPvB,MAAM;oBAMH,UAAU;uCARvB,IAAI;0BAAJ,IAAI;kCAAJ,IAAI;iCAAJ,IAAI"}
|
|
@@ -10,5 +10,5 @@ export function requireSharp(): typeof import("sharp");
|
|
|
10
10
|
* @param {import('sharp').Region} rect The selected region of image
|
|
11
11
|
* @return {Promise<string>} base64 encoded string of cropped image
|
|
12
12
|
*/
|
|
13
|
-
export function cropBase64Image(base64Image: string, rect: import(
|
|
13
|
+
export function cropBase64Image(base64Image: string, rect: import("sharp").Region): Promise<string>;
|
|
14
14
|
//# sourceMappingURL=image-util.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-util.d.ts","sourceRoot":"","sources":["../../lib/image-util.js"],"names":[],"mappings":"AAEA;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"image-util.d.ts","sourceRoot":"","sources":["../../lib/image-util.js"],"names":[],"mappings":"AAEA;;GAEG;AACH,gCAFa,sBAAe,CAe3B;AAED;;;;;;;GAOG;AACH,6CALW,MAAM,QAEN,OAAO,OAAO,EAAE,MAAM,GACrB,OAAO,CAAC,MAAM,CAAC,CAK1B"}
|
package/build/lib/image-util.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.requireSharp = requireSharp;
|
|
4
|
+
exports.cropBase64Image = cropBase64Image;
|
|
4
5
|
let _sharp;
|
|
5
6
|
/**
|
|
6
7
|
* @returns {import('sharp')}
|
|
@@ -18,7 +19,6 @@ function requireSharp() {
|
|
|
18
19
|
}
|
|
19
20
|
return _sharp;
|
|
20
21
|
}
|
|
21
|
-
exports.requireSharp = requireSharp;
|
|
22
22
|
/**
|
|
23
23
|
* Crop the image by given rectangle (use base64 string as input and output)
|
|
24
24
|
*
|
|
@@ -31,5 +31,4 @@ async function cropBase64Image(base64Image, rect) {
|
|
|
31
31
|
const buf = await requireSharp()(Buffer.from(base64Image, 'base64')).extract(rect).toBuffer();
|
|
32
32
|
return buf.toString('base64');
|
|
33
33
|
}
|
|
34
|
-
exports.cropBase64Image = cropBase64Image;
|
|
35
34
|
//# sourceMappingURL=image-util.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-util.js","sourceRoot":"","sources":["../../lib/image-util.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image-util.js","sourceRoot":"","sources":["../../lib/image-util.js"],"names":[],"mappings":";;AAKA,oCAaC;AAUD,0CAGC;AA/BD,IAAI,MAAM,CAAC;AAEX;;GAEG;AACH,SAAgB,YAAY;IAC1B,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,IAAI,CAAC;YACH,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;QAC5B,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CACb,+DAA+D;gBAC/D,4DAA4D;gBAC5D,wCAAwC,GAAG,CAAC,OAAO,EAAE,CACtD,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;GAOG;AACI,KAAK,UAAU,eAAe,CAAC,WAAW,EAAE,IAAI;IACrD,MAAM,GAAG,GAAG,MAAM,YAAY,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC9F,OAAO,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC"}
|
package/build/lib/index.d.ts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
/// <reference types="node" />
|
|
4
|
-
/// <reference types="node" />
|
|
5
|
-
/// <reference types="node" />
|
|
6
|
-
/// <reference types="klaw" />
|
|
7
1
|
import * as tempDir from './tempdir';
|
|
8
2
|
import * as system from './system';
|
|
9
3
|
import * as util from './util';
|
|
@@ -29,22 +23,22 @@ declare const _default: {
|
|
|
29
23
|
system: typeof system;
|
|
30
24
|
util: typeof util;
|
|
31
25
|
fs: {
|
|
32
|
-
hasAccess(path:
|
|
33
|
-
isExecutable(path:
|
|
34
|
-
exists(path:
|
|
35
|
-
rimraf(filepath:
|
|
36
|
-
rimrafSync(filepath:
|
|
26
|
+
hasAccess(path: PathLike): Promise<boolean>;
|
|
27
|
+
isExecutable(path: PathLike): Promise<boolean>;
|
|
28
|
+
exists(path: PathLike): Promise<boolean>;
|
|
29
|
+
rimraf(filepath: PathLike): Promise<void>;
|
|
30
|
+
rimrafSync(filepath: PathLike): void;
|
|
37
31
|
mkdir(filepath: string | Buffer | URL, opts?: import("fs").MakeDirectoryOptions | undefined): Promise<string | undefined>;
|
|
38
32
|
copyFile(source: string, destination: string, opts?: import("ncp").Options | undefined): Promise<void>;
|
|
39
|
-
md5(filePath:
|
|
40
|
-
mv: (from: string, to: string, opts?: import("mv").Options
|
|
33
|
+
md5(filePath: PathLike): Promise<string>;
|
|
34
|
+
mv: (from: string, to: string, opts?: import("mv").Options) => import("bluebird")<void>;
|
|
41
35
|
which: typeof import("which");
|
|
42
|
-
glob: (pattern: string, opts?: import("glob").GlobOptions
|
|
36
|
+
glob: (pattern: string, opts?: import("glob").GlobOptions) => import("bluebird")<string[]>;
|
|
43
37
|
sanitizeName: typeof import("sanitize-filename");
|
|
44
|
-
hash(filePath:
|
|
38
|
+
hash(filePath: PathLike, algorithm?: string | undefined): Promise<string>;
|
|
45
39
|
walk(dir: string, opts?: import("klaw").Options | undefined): import("klaw").Walker;
|
|
46
|
-
mkdirp(dir:
|
|
47
|
-
walkDir(dir: string, recursive: boolean, callback:
|
|
40
|
+
mkdirp(dir: PathLike): Promise<string | undefined>;
|
|
41
|
+
walkDir(dir: string, recursive: boolean, callback: WalkDirCallback): Promise<string | null>;
|
|
48
42
|
readPackageJsonFrom(dir: string, opts?: import("read-pkg").Options | undefined): import("read-pkg").NormalizedPackageJson;
|
|
49
43
|
findRoot(dir: string): string;
|
|
50
44
|
access: typeof import("fs/promises").access;
|
|
@@ -55,7 +49,7 @@ declare const _default: {
|
|
|
55
49
|
createWriteStream: typeof import("fs").createWriteStream;
|
|
56
50
|
createReadStream: typeof import("fs").createReadStream;
|
|
57
51
|
lstat: typeof import("fs/promises").lstat;
|
|
58
|
-
open: (path: import("fs").PathLike, flags: import("fs").OpenMode, mode?: import("fs").Mode
|
|
52
|
+
open: (path: import("./fs").PathLike, flags: import("fs").OpenMode, mode?: import("fs").Mode) => Promise<number>;
|
|
59
53
|
openFile: typeof import("fs/promises").open;
|
|
60
54
|
readdir: typeof import("fs/promises").readdir;
|
|
61
55
|
read: import("./fs").ReadFn<NodeJS.ArrayBufferView>;
|
|
@@ -75,7 +69,7 @@ declare const _default: {
|
|
|
75
69
|
};
|
|
76
70
|
cancellableDelay: typeof util.cancellableDelay;
|
|
77
71
|
plist: typeof plist;
|
|
78
|
-
mkdirp: (dir:
|
|
72
|
+
mkdirp: (dir: PathLike) => Promise<string | undefined>;
|
|
79
73
|
logger: typeof logger;
|
|
80
74
|
process: typeof process;
|
|
81
75
|
zip: typeof zip;
|
package/build/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAC,EAAE,EAAC,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,O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 -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export function getLogger(prefix?: import("@appium/types").AppiumLoggerPrefix | null | undefined): AppiumLogger;
|
|
7
7
|
/** @type {import('@appium/types').AppiumLoggerLevel[]} */
|
|
8
|
-
export const LEVELS: import(
|
|
8
|
+
export const LEVELS: import("@appium/types").AppiumLoggerLevel[];
|
|
9
9
|
export const log: import("@appium/types").AppiumLogger;
|
|
10
10
|
export default log;
|
|
11
|
-
export type AppiumLoggerPrefix = import(
|
|
12
|
-
export type AppiumLogger = import(
|
|
13
|
-
export type AppiumLoggerLevel = import(
|
|
11
|
+
export type AppiumLoggerPrefix = import("@appium/types").AppiumLoggerPrefix;
|
|
12
|
+
export type AppiumLogger = import("@appium/types").AppiumLogger;
|
|
13
|
+
export type AppiumLoggerLevel = import("@appium/types").AppiumLoggerLevel;
|
|
14
14
|
//# sourceMappingURL=logging.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["../../lib/logging.js"],"names":[],"mappings":"AAwBA;;;;GAIG;AACH,mGAFa,YAAY,
|
|
1
|
+
{"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["../../lib/logging.js"],"names":[],"mappings":"AAwBA;;;;GAIG;AACH,mGAFa,YAAY,CAoDxB;AA3ED,0DAA0D;AAC1D,qBADW,OAAO,eAAe,EAAE,iBAAiB,EAAE,CAC+B;AAIrF,uDAA+B;;iCA8GlB,OAAO,eAAe,EAAE,kBAAkB;2BAC1C,OAAO,eAAe,EAAE,YAAY;gCACpC,OAAO,eAAe,EAAE,iBAAiB"}
|
package/build/lib/logging.js
CHANGED
|
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.log = exports.LEVELS = void 0;
|
|
7
|
+
exports.getLogger = getLogger;
|
|
7
8
|
const logger_1 = __importDefault(require("@appium/logger"));
|
|
8
9
|
const lodash_1 = __importDefault(require("lodash"));
|
|
9
10
|
const moment_1 = __importDefault(require("moment"));
|
|
@@ -38,26 +39,18 @@ function getLogger(prefix = null) {
|
|
|
38
39
|
unwrap: () => logger,
|
|
39
40
|
levels: exports.LEVELS,
|
|
40
41
|
prefix,
|
|
41
|
-
/**
|
|
42
|
-
* Logs given arguments at the error level and returns
|
|
43
|
-
* the error object.
|
|
44
|
-
*
|
|
45
|
-
* @param {...any} args
|
|
46
|
-
* @returns {Error}
|
|
47
|
-
*/
|
|
48
42
|
errorWithException(/** @type {any[]} */ ...args) {
|
|
49
43
|
this.error(...args);
|
|
50
44
|
// make sure we have an `Error` object. Wrap if necessary
|
|
51
45
|
return lodash_1.default.isError(args[0]) ? args[0] : new Error(args.join('\n'));
|
|
52
46
|
},
|
|
53
|
-
/**
|
|
54
|
-
* @deprecated Use {@link errorWithException} instead
|
|
55
|
-
* @param {...any} args
|
|
56
|
-
* @throws {Error}
|
|
57
|
-
*/
|
|
58
47
|
errorAndThrow(/** @type {any[]} */ ...args) {
|
|
59
48
|
throw this.errorWithException(args);
|
|
60
49
|
},
|
|
50
|
+
updateAsyncContext(
|
|
51
|
+
/** @type {import('@appium/types').AppiumLoggerContext} */ contextInfo, replace = false) {
|
|
52
|
+
this.unwrap().updateAsyncStorage(contextInfo, replace);
|
|
53
|
+
},
|
|
61
54
|
};
|
|
62
55
|
// allow access to the level of the underlying logger
|
|
63
56
|
Object.defineProperty(wrappedLogger, 'level', {
|
|
@@ -87,7 +80,6 @@ function getLogger(prefix = null) {
|
|
|
87
80
|
}
|
|
88
81
|
return /** @type {AppiumLogger} */ (wrappedLogger);
|
|
89
82
|
}
|
|
90
|
-
exports.getLogger = getLogger;
|
|
91
83
|
/**
|
|
92
84
|
*
|
|
93
85
|
* @returns {[import('@appium/logger').Logger, boolean]}
|
package/build/lib/logging.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.js","sourceRoot":"","sources":["../../lib/logging.js"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"logging.js","sourceRoot":"","sources":["../../lib/logging.js"],"names":[],"mappings":";;;;;;AA6BA,8BAkDC;AA/ED,4DAAuC;AACvC,oDAAuB;AACvB,oDAA4B;AAE5B,0DAA0D;AAC7C,QAAA,MAAM,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AACrF,MAAM,qBAAqB,GAAG,IAAI,CAAC;AACnC,MAAM,uBAAuB,GAAG,cAAc,CAAC;AAC/C,yCAAyC;AAC5B,QAAA,GAAG,GAAG,SAAS,EAAE,CAAC;AAC/B,gEAAgE;AAChE,MAAM,QAAQ,GAAG;IACf,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QACb,kCAAkC,EAAE,GAAG,EAAE,CAAC,CAAC;YACzC,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,EAAE;SACV,CAAC;QACF,KAAK,EAAE,SAAS;QAChB,MAAM,EAAE,EAAE;QACV,GAAG,EAAE,gBAAC,CAAC,IAAI;KACZ,CAAC;IACF,GAAG,CAAC,gBAAC,CAAC,SAAS,CAAC,cAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,gBAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CACjD,CAAC;AAEF;;;;GAIG;AACH,SAAgB,SAAS,CAAC,MAAM,GAAG,IAAI;IACrC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,GAAG,UAAU,EAAE,CAAC;IAE9C,8DAA8D;IAC9D,MAAM,aAAa,GAAG;QACpB,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM;QACpB,MAAM,EAAE,cAAM;QACd,MAAM;QACN,kBAAkB,CAAE,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AAI,MAAM,EAAE,CAAC,CAAC,CAAC,kBAAkB,CAAC;AACzE,CAAC;AAED,kBAAe,WAAG,CAAC;AAEnB;;;;GAIG"}
|
package/build/lib/mjpeg.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mjpeg.d.ts","sourceRoot":"","sources":["../../lib/mjpeg.js"],"names":[],"mappings":"AA+BA,+DAA+D;AAC/D;IAME;;;;;;OAMG;IACH,sBALW,MAAM,iDAGN,MAAM,EAQhB;IAlBD;;OAEG;IACH,aAFU,MAAM,CAEA;IAYd,uBAAgC;IAChC,YAAmB;IAIrB;;;;;OAKG;IACH,qCAKC;IAED;;;;;OAKG;IACH,gBAHa,
|
|
1
|
+
{"version":3,"file":"mjpeg.d.ts","sourceRoot":"","sources":["../../lib/mjpeg.js"],"names":[],"mappings":"AA+BA,+DAA+D;AAC/D;IAME;;;;;;OAMG;IACH,sBALW,MAAM,iDAGN,MAAM,EAQhB;IAlBD;;OAEG;IACH,aAFU,MAAM,CAEA;IAYd,uBAAgC;IAChC,YAAmB;IAIrB;;;;;OAKG;IACH,qCAKC;IAED;;;;;OAKG;IACH,gBAHa,OAAO,CAAC,MAAM,OAAC,CAAC,CAc5B;IAED;;;;;OAKG;IACH,sBAHa,OAAO,CAAC,MAAM,OAAC,CAAC,CAM5B;IAED;;OAEG;IACH,cAOC;IANC,4EAAgC;IAChC,iEAAgC;IAChC,oBAA0B;IAC1B,cAAoB;IACpB,qCAAqB;IAIvB;;OAEG;IACH,6CAwDC;IAED;;;OAGG;IACH,aAWC;IAED;;;;;OAKG;IACH,qBAFW,MAAM,WAYhB;CACF;yBAvMsB,QAAQ"}
|
package/build/lib/mkdirp.d.ts
CHANGED
package/build/lib/net.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Common options for {@linkcode uploadFile
|
|
2
|
+
* Common options for {@linkcode uploadFile} and {@linkcode downloadFile}.
|
|
3
3
|
*/
|
|
4
4
|
export type NetOptions = {
|
|
5
5
|
/**
|
|
@@ -13,11 +13,11 @@ export type NetOptions = {
|
|
|
13
13
|
auth?: AuthCredentials | undefined;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
|
-
* Specific options for {@linkcode downloadFile
|
|
16
|
+
* Specific options for {@linkcode downloadFile}.
|
|
17
17
|
*/
|
|
18
18
|
export type DownloadOptions = {
|
|
19
19
|
/**
|
|
20
|
-
* - The actual request timeout in milliseconds; defaults to {@linkcode DEFAULT_TIMEOUT_MS
|
|
20
|
+
* - The actual request timeout in milliseconds; defaults to {@linkcode DEFAULT_TIMEOUT_MS}
|
|
21
21
|
*/
|
|
22
22
|
timeout?: number | undefined;
|
|
23
23
|
/**
|
|
@@ -26,7 +26,7 @@ export type DownloadOptions = {
|
|
|
26
26
|
headers?: Record<string, any> | undefined;
|
|
27
27
|
};
|
|
28
28
|
/**
|
|
29
|
-
* Basic auth credentials; used by {@linkcode NetOptions
|
|
29
|
+
* Basic auth credentials; used by {@linkcode NetOptions}.
|
|
30
30
|
*/
|
|
31
31
|
export type AuthCredentials = {
|
|
32
32
|
/**
|
|
@@ -39,7 +39,7 @@ export type AuthCredentials = {
|
|
|
39
39
|
pass: string;
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
|
-
* This type is used in {@linkcode uploadFile
|
|
42
|
+
* This type is used in {@linkcode uploadFile} if the remote location uses the `ftp` protocol, and distinguishes the type from {@linkcode HttpUploadOptions}.
|
|
43
43
|
*/
|
|
44
44
|
export type NotHttpUploadOptions = {
|
|
45
45
|
headers: never;
|
|
@@ -49,7 +49,7 @@ export type NotHttpUploadOptions = {
|
|
|
49
49
|
formFields: never;
|
|
50
50
|
};
|
|
51
51
|
/**
|
|
52
|
-
* Specific options for {@linkcode uploadFile
|
|
52
|
+
* Specific options for {@linkcode uploadFile} if the remote location uses the `http(s)` protocol
|
|
53
53
|
*/
|
|
54
54
|
export type HttpUploadOptions = {
|
|
55
55
|
/**
|
|
@@ -61,7 +61,7 @@ export type HttpUploadOptions = {
|
|
|
61
61
|
*/
|
|
62
62
|
method?: axios.Method | undefined;
|
|
63
63
|
/**
|
|
64
|
-
* - The actual request timeout in milliseconds; defaults to {@linkcode DEFAULT_TIMEOUT_MS
|
|
64
|
+
* - The actual request timeout in milliseconds; defaults to {@linkcode DEFAULT_TIMEOUT_MS}
|
|
65
65
|
*/
|
|
66
66
|
timeout?: number | undefined;
|
|
67
67
|
/**
|
package/build/lib/net.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"net.d.ts","sourceRoot":"","sources":["../../lib/net.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAsTc,MAAM;;;;UACN,MAAM;;;;;;aAMN,KAAK;YACL,KAAK;aACL,KAAK;mBACL,KAAK;gBACL,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAzJnB;;;;;;;;GAQG;AACH,sCALW,MAAM,aACN,MAAM,0FAEJ,
|
|
1
|
+
{"version":3,"file":"net.d.ts","sourceRoot":"","sources":["../../lib/net.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAsTc,MAAM;;;;UACN,MAAM;;;;;;aAMN,KAAK;YACL,KAAK;aACL,KAAK;mBACL,KAAK;gBACL,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAzJnB;;;;;;;;GAQG;AACH,sCALW,MAAM,aACN,MAAM,0FAEJ,OAAO,CAAC,IAAI,CAAC,CAyCzB;AAED;;;;;;;GAOG;AACH,wCALW,MAAM,WACN,MAAM,+EAkEhB;kBAzRiB,OAAO"}
|
package/build/lib/net.js
CHANGED
|
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.uploadFile = uploadFile;
|
|
7
|
+
exports.downloadFile = downloadFile;
|
|
7
8
|
const lodash_1 = __importDefault(require("lodash"));
|
|
8
9
|
const fs_1 = __importDefault(require("./fs"));
|
|
9
10
|
const bluebird_1 = __importDefault(require("bluebird"));
|
|
@@ -191,7 +192,6 @@ async function uploadFile(localPath, remoteUri, uploadOptions = /** @type {(Http
|
|
|
191
192
|
`${timer.getDuration().asSeconds.toFixed(3)}s`);
|
|
192
193
|
}
|
|
193
194
|
}
|
|
194
|
-
exports.uploadFile = uploadFile;
|
|
195
195
|
/**
|
|
196
196
|
* Downloads the given file via HTTP(S)
|
|
197
197
|
*
|
|
@@ -252,7 +252,6 @@ async function downloadFile(remoteUrl, dstPath, downloadOptions = /** @type {Dow
|
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
-
exports.downloadFile = downloadFile;
|
|
256
255
|
/**
|
|
257
256
|
* Common options for {@linkcode uploadFile} and {@linkcode downloadFile}.
|
|
258
257
|
* @typedef NetOptions
|