appium-adb 12.0.0 → 12.0.2
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/CHANGELOG.md +15 -0
- package/build/lib/tools/apk-utils.d.ts +23 -7
- package/build/lib/tools/apk-utils.d.ts.map +1 -1
- package/build/lib/tools/apk-utils.js +17 -9
- package/build/lib/tools/apk-utils.js.map +1 -1
- package/lib/tools/apk-utils.js +23 -9
- package/package.json +2 -2
- package/build/lib/tools/settings-client-commands.d.ts +0 -333
- package/build/lib/tools/settings-client-commands.d.ts.map +0 -1
- package/build/lib/tools/settings-client-commands.js +0 -655
- package/build/lib/tools/settings-client-commands.js.map +0 -1
- package/build/lib/tools/utf7.d.ts +0 -26
- package/build/lib/tools/utf7.d.ts.map +0 -1
- package/build/lib/tools/utf7.js +0 -144
- package/build/lib/tools/utf7.js.map +0 -1
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* RFC 2152 UTF-7 encoding with all optionals.
|
|
3
|
-
*
|
|
4
|
-
* @param {string} str
|
|
5
|
-
* @returns {string}
|
|
6
|
-
*/
|
|
7
|
-
export function encodeAll(str: string): string;
|
|
8
|
-
export namespace imap {
|
|
9
|
-
/**
|
|
10
|
-
* RFC 3501, section 5.1.3 UTF-7 encoding.
|
|
11
|
-
*
|
|
12
|
-
* @param {string} str
|
|
13
|
-
* @returns {string}
|
|
14
|
-
*/
|
|
15
|
-
function encode(str: string): string;
|
|
16
|
-
/**
|
|
17
|
-
* RFC 3501, section 5.1.3 UTF-7 decoding.
|
|
18
|
-
*
|
|
19
|
-
* @param {string} str
|
|
20
|
-
* @returns {string}
|
|
21
|
-
*/
|
|
22
|
-
function decode(str: string): string;
|
|
23
|
-
}
|
|
24
|
-
export function encode(str: string, mask?: string | null): string;
|
|
25
|
-
export function decode(str: string): string;
|
|
26
|
-
//# sourceMappingURL=utf7.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utf7.d.ts","sourceRoot":"","sources":["../../../lib/tools/utf7.js"],"names":[],"mappings":"AAmGA;;;;;GAKG;AACH,+BAHW,MAAM,GACJ,MAAM,CAQlB;;IAED;;;;;OAKG;IACH,qCAQC;IAeD;;;;;OAKG;IACH,qCAKC;;AAtEM,4BAJI,MAAM,SACN,MAAM,UACJ,MAAM,CAgBlB;AAsCM,4BAHI,MAAM,GACJ,MAAM,CAOlB"}
|
package/build/lib/tools/utf7.js
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* The code below has been adopted from https://www.npmjs.com/package/utf7
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.decode = exports.encodeAll = exports.encode = exports.imap = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* @param {number} length
|
|
9
|
-
* @returns {Buffer}
|
|
10
|
-
*/
|
|
11
|
-
function allocateAsciiBuffer(length) {
|
|
12
|
-
return Buffer.alloc(length, 'ascii');
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* @param {string} str
|
|
16
|
-
* @returns {string}
|
|
17
|
-
*/
|
|
18
|
-
function _encode(str) {
|
|
19
|
-
const b = allocateAsciiBuffer(str.length * 2);
|
|
20
|
-
for (let i = 0, bi = 0; i < str.length; i++) {
|
|
21
|
-
// Note that we can't simply convert a UTF-8 string to Base64 because
|
|
22
|
-
// UTF-8 uses a different encoding. In modified UTF-7, all characters
|
|
23
|
-
// are represented by their two byte Unicode ID.
|
|
24
|
-
const c = str.charCodeAt(i);
|
|
25
|
-
// Upper 8 bits shifted into lower 8 bits so that they fit into 1 byte.
|
|
26
|
-
b[bi++] = c >> 8;
|
|
27
|
-
// Lower 8 bits. Cut off the upper 8 bits so that they fit into 1 byte.
|
|
28
|
-
b[bi++] = c & 0xFF;
|
|
29
|
-
}
|
|
30
|
-
// Modified Base64 uses , instead of / and omits trailing =.
|
|
31
|
-
return b.toString('base64').replace(/=+$/, '');
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* @param {string} str
|
|
35
|
-
* @returns {Buffer}
|
|
36
|
-
*/
|
|
37
|
-
function allocateBase64Buffer(str) {
|
|
38
|
-
return Buffer.from(str, 'base64');
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* @param {string} str
|
|
42
|
-
* @returns {string}
|
|
43
|
-
*/
|
|
44
|
-
function _decode(str) {
|
|
45
|
-
const b = allocateBase64Buffer(str);
|
|
46
|
-
const r = [];
|
|
47
|
-
for (let i = 0; i < b.length;) {
|
|
48
|
-
// Calculate charcode from two adjacent bytes.
|
|
49
|
-
r.push(String.fromCharCode(b[i++] << 8 | b[i++]));
|
|
50
|
-
}
|
|
51
|
-
return r.join('');
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Escape RegEx from http://simonwillison.net/2006/Jan/20/escape/
|
|
55
|
-
*
|
|
56
|
-
* @param {string} chars
|
|
57
|
-
* @returns {string}
|
|
58
|
-
*/
|
|
59
|
-
function escape(chars) {
|
|
60
|
-
return chars.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
|
|
61
|
-
}
|
|
62
|
-
// Character classes defined by RFC 2152.
|
|
63
|
-
const setD = 'A-Za-z0-9' + escape(`'(),-./:?`);
|
|
64
|
-
const setO = escape(`!"#$%&*;<=>@[]^_'{|}`);
|
|
65
|
-
const setW = escape(` \r\n\t`);
|
|
66
|
-
// Stores compiled regexes for various replacement pattern.
|
|
67
|
-
/** @type {Record<string, RegExp>} */
|
|
68
|
-
const regexes = {};
|
|
69
|
-
const regexAll = new RegExp(`[^${setW}${setD}${setO}]+`, 'g');
|
|
70
|
-
exports.imap = {};
|
|
71
|
-
/**
|
|
72
|
-
* RFC 2152 UTF-7 encoding.
|
|
73
|
-
*
|
|
74
|
-
* @param {string} str
|
|
75
|
-
* @param {string?} mask
|
|
76
|
-
* @returns {string}
|
|
77
|
-
*/
|
|
78
|
-
const encode = function encode(str, mask = null) {
|
|
79
|
-
// Generate a RegExp object from the string of mask characters.
|
|
80
|
-
if (!mask) {
|
|
81
|
-
mask = '';
|
|
82
|
-
}
|
|
83
|
-
if (!regexes[mask]) {
|
|
84
|
-
regexes[mask] = new RegExp(`[^${setD}${escape(mask)}]+`, 'g');
|
|
85
|
-
}
|
|
86
|
-
// We replace subsequent disallowed chars with their escape sequence.
|
|
87
|
-
return str.replace(regexes[mask], (chunk) =>
|
|
88
|
-
// + is represented by an empty sequence +-, otherwise call encode().
|
|
89
|
-
`+${chunk === '+' ? '' : _encode(chunk)}-`);
|
|
90
|
-
};
|
|
91
|
-
exports.encode = encode;
|
|
92
|
-
/**
|
|
93
|
-
* RFC 2152 UTF-7 encoding with all optionals.
|
|
94
|
-
*
|
|
95
|
-
* @param {string} str
|
|
96
|
-
* @returns {string}
|
|
97
|
-
*/
|
|
98
|
-
function encodeAll(str) {
|
|
99
|
-
// We replace subsequent disallowed chars with their escape sequence.
|
|
100
|
-
return str.replace(regexAll, (chunk) =>
|
|
101
|
-
// + is represented by an empty sequence +-, otherwise call encode().
|
|
102
|
-
`+${chunk === '+' ? '' : _encode(chunk)}-`);
|
|
103
|
-
}
|
|
104
|
-
exports.encodeAll = encodeAll;
|
|
105
|
-
;
|
|
106
|
-
/**
|
|
107
|
-
* RFC 3501, section 5.1.3 UTF-7 encoding.
|
|
108
|
-
*
|
|
109
|
-
* @param {string} str
|
|
110
|
-
* @returns {string}
|
|
111
|
-
*/
|
|
112
|
-
exports.imap.encode = function encode(str) {
|
|
113
|
-
// All printable ASCII chars except for & must be represented by themselves.
|
|
114
|
-
// We replace subsequent non-representable chars with their escape sequence.
|
|
115
|
-
return str.replace(/&/g, '&-').replace(/[^\x20-\x7e]+/g, (chunk) => {
|
|
116
|
-
// & is represented by an empty sequence &-, otherwise call encode().
|
|
117
|
-
chunk = (chunk === '&' ? '' : _encode(chunk)).replace(/\//g, ',');
|
|
118
|
-
return `&${chunk}-`;
|
|
119
|
-
});
|
|
120
|
-
};
|
|
121
|
-
/**
|
|
122
|
-
* RFC 2152 UTF-7 decoding.
|
|
123
|
-
*
|
|
124
|
-
* @param {string} str
|
|
125
|
-
* @returns {string}
|
|
126
|
-
*/
|
|
127
|
-
const decode = function decode(str) {
|
|
128
|
-
return str.replace(/\+([A-Za-z0-9/]*)-?/gi, (_, chunk) =>
|
|
129
|
-
// &- represents &.
|
|
130
|
-
chunk === '' ? '+' : _decode(chunk));
|
|
131
|
-
};
|
|
132
|
-
exports.decode = decode;
|
|
133
|
-
/**
|
|
134
|
-
* RFC 3501, section 5.1.3 UTF-7 decoding.
|
|
135
|
-
*
|
|
136
|
-
* @param {string} str
|
|
137
|
-
* @returns {string}
|
|
138
|
-
*/
|
|
139
|
-
exports.imap.decode = function decode(str) {
|
|
140
|
-
return str.replace(/&([^-]*)-/g, (_, chunk) =>
|
|
141
|
-
// &- represents &.
|
|
142
|
-
chunk === '' ? '&' : _decode(chunk.replace(/,/g, '/')));
|
|
143
|
-
};
|
|
144
|
-
//# sourceMappingURL=utf7.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utf7.js","sourceRoot":"","sources":["../../../lib/tools/utf7.js"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH;;;GAGG;AACH,SAAS,mBAAmB,CAAC,MAAM;IACjC,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACvC,CAAC;AAED;;;GAGG;AACH,SAAS,OAAO,CAAC,GAAG;IAClB,MAAM,CAAC,GAAG,mBAAmB,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC9C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC3C,qEAAqE;QACrE,qEAAqE;QACrE,gDAAgD;QAChD,MAAM,CAAC,GAAG,GA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