@qqbrowser/qbot-claw-launcher 0.9.70 → 0.9.72

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.
@@ -45,277 +45,6 @@ const syntaxError = (type, char) => {
45
45
  return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
46
46
  };
47
47
 
48
- const splitTopLevel = input => {
49
- const parts = [];
50
- let bracket = 0;
51
- let paren = 0;
52
- let quote = 0;
53
- let value = '';
54
- let escaped = false;
55
-
56
- for (const ch of input) {
57
- if (escaped === true) {
58
- value += ch;
59
- escaped = false;
60
- continue;
61
- }
62
-
63
- if (ch === '\\') {
64
- value += ch;
65
- escaped = true;
66
- continue;
67
- }
68
-
69
- if (ch === '"') {
70
- quote = quote === 1 ? 0 : 1;
71
- value += ch;
72
- continue;
73
- }
74
-
75
- if (quote === 0) {
76
- if (ch === '[') {
77
- bracket++;
78
- } else if (ch === ']' && bracket > 0) {
79
- bracket--;
80
- } else if (bracket === 0) {
81
- if (ch === '(') {
82
- paren++;
83
- } else if (ch === ')' && paren > 0) {
84
- paren--;
85
- } else if (ch === '|' && paren === 0) {
86
- parts.push(value);
87
- value = '';
88
- continue;
89
- }
90
- }
91
- }
92
-
93
- value += ch;
94
- }
95
-
96
- parts.push(value);
97
- return parts;
98
- };
99
-
100
- const isPlainBranch = branch => {
101
- let escaped = false;
102
-
103
- for (const ch of branch) {
104
- if (escaped === true) {
105
- escaped = false;
106
- continue;
107
- }
108
-
109
- if (ch === '\\') {
110
- escaped = true;
111
- continue;
112
- }
113
-
114
- if (/[?*+@!()[\]{}]/.test(ch)) {
115
- return false;
116
- }
117
- }
118
-
119
- return true;
120
- };
121
-
122
- const normalizeSimpleBranch = branch => {
123
- let value = branch.trim();
124
- let changed = true;
125
-
126
- while (changed === true) {
127
- changed = false;
128
-
129
- if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
130
- value = value.slice(2, -1);
131
- changed = true;
132
- }
133
- }
134
-
135
- if (!isPlainBranch(value)) {
136
- return;
137
- }
138
-
139
- return value.replace(/\\(.)/g, '$1');
140
- };
141
-
142
- const hasRepeatedCharPrefixOverlap = branches => {
143
- const values = branches.map(normalizeSimpleBranch).filter(Boolean);
144
-
145
- for (let i = 0; i < values.length; i++) {
146
- for (let j = i + 1; j < values.length; j++) {
147
- const a = values[i];
148
- const b = values[j];
149
- const char = a[0];
150
-
151
- if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {
152
- continue;
153
- }
154
-
155
- if (a === b || a.startsWith(b) || b.startsWith(a)) {
156
- return true;
157
- }
158
- }
159
- }
160
-
161
- return false;
162
- };
163
-
164
- const parseRepeatedExtglob = (pattern, requireEnd = true) => {
165
- if ((pattern[0] !== '+' && pattern[0] !== '*') || pattern[1] !== '(') {
166
- return;
167
- }
168
-
169
- let bracket = 0;
170
- let paren = 0;
171
- let quote = 0;
172
- let escaped = false;
173
-
174
- for (let i = 1; i < pattern.length; i++) {
175
- const ch = pattern[i];
176
-
177
- if (escaped === true) {
178
- escaped = false;
179
- continue;
180
- }
181
-
182
- if (ch === '\\') {
183
- escaped = true;
184
- continue;
185
- }
186
-
187
- if (ch === '"') {
188
- quote = quote === 1 ? 0 : 1;
189
- continue;
190
- }
191
-
192
- if (quote === 1) {
193
- continue;
194
- }
195
-
196
- if (ch === '[') {
197
- bracket++;
198
- continue;
199
- }
200
-
201
- if (ch === ']' && bracket > 0) {
202
- bracket--;
203
- continue;
204
- }
205
-
206
- if (bracket > 0) {
207
- continue;
208
- }
209
-
210
- if (ch === '(') {
211
- paren++;
212
- continue;
213
- }
214
-
215
- if (ch === ')') {
216
- paren--;
217
-
218
- if (paren === 0) {
219
- if (requireEnd === true && i !== pattern.length - 1) {
220
- return;
221
- }
222
-
223
- return {
224
- type: pattern[0],
225
- body: pattern.slice(2, i),
226
- end: i
227
- };
228
- }
229
- }
230
- }
231
- };
232
-
233
- const getStarExtglobSequenceOutput = pattern => {
234
- let index = 0;
235
- const chars = [];
236
-
237
- while (index < pattern.length) {
238
- const match = parseRepeatedExtglob(pattern.slice(index), false);
239
-
240
- if (!match || match.type !== '*') {
241
- return;
242
- }
243
-
244
- const branches = splitTopLevel(match.body).map(branch => branch.trim());
245
- if (branches.length !== 1) {
246
- return;
247
- }
248
-
249
- const branch = normalizeSimpleBranch(branches[0]);
250
- if (!branch || branch.length !== 1) {
251
- return;
252
- }
253
-
254
- chars.push(branch);
255
- index += match.end + 1;
256
- }
257
-
258
- if (chars.length < 1) {
259
- return;
260
- }
261
-
262
- const source = chars.length === 1
263
- ? utils.escapeRegex(chars[0])
264
- : `[${chars.map(ch => utils.escapeRegex(ch)).join('')}]`;
265
-
266
- return `${source}*`;
267
- };
268
-
269
- const repeatedExtglobRecursion = pattern => {
270
- let depth = 0;
271
- let value = pattern.trim();
272
- let match = parseRepeatedExtglob(value);
273
-
274
- while (match) {
275
- depth++;
276
- value = match.body.trim();
277
- match = parseRepeatedExtglob(value);
278
- }
279
-
280
- return depth;
281
- };
282
-
283
- const analyzeRepeatedExtglob = (body, options) => {
284
- if (options.maxExtglobRecursion === false) {
285
- return { risky: false };
286
- }
287
-
288
- const max =
289
- typeof options.maxExtglobRecursion === 'number'
290
- ? options.maxExtglobRecursion
291
- : constants.DEFAULT_MAX_EXTGLOB_RECURSION;
292
-
293
- const branches = splitTopLevel(body).map(branch => branch.trim());
294
-
295
- if (branches.length > 1) {
296
- if (
297
- branches.some(branch => branch === '') ||
298
- branches.some(branch => /^[*?]+$/.test(branch)) ||
299
- hasRepeatedCharPrefixOverlap(branches)
300
- ) {
301
- return { risky: true };
302
- }
303
- }
304
-
305
- for (const branch of branches) {
306
- const safeOutput = getStarExtglobSequenceOutput(branch);
307
- if (safeOutput) {
308
- return { risky: true, safeOutput };
309
- }
310
-
311
- if (repeatedExtglobRecursion(branch) > max) {
312
- return { risky: true };
313
- }
314
- }
315
-
316
- return { risky: false };
317
- };
318
-
319
48
  /**
320
49
  * Parse the given input string.
321
50
  * @param {String} input
@@ -496,8 +225,6 @@ const parse = (input, options) => {
496
225
  token.prev = prev;
497
226
  token.parens = state.parens;
498
227
  token.output = state.output;
499
- token.startIndex = state.index;
500
- token.tokensIndex = tokens.length;
501
228
  const output = (opts.capture ? '(' : '') + token.open;
502
229
 
503
230
  increment('parens');
@@ -507,34 +234,6 @@ const parse = (input, options) => {
507
234
  };
508
235
 
509
236
  const extglobClose = token => {
510
- const literal = input.slice(token.startIndex, state.index + 1);
511
- const body = input.slice(token.startIndex + 2, state.index);
512
- const analysis = analyzeRepeatedExtglob(body, opts);
513
-
514
- if ((token.type === 'plus' || token.type === 'star') && analysis.risky) {
515
- const safeOutput = analysis.safeOutput
516
- ? (token.output ? '' : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput)
517
- : undefined;
518
- const open = tokens[token.tokensIndex];
519
-
520
- open.type = 'text';
521
- open.value = literal;
522
- open.output = safeOutput || utils.escapeRegex(literal);
523
-
524
- for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
525
- tokens[i].value = '';
526
- tokens[i].output = '';
527
- delete tokens[i].suffix;
528
- }
529
-
530
- state.output = token.output + open.output;
531
- state.backtrack = true;
532
-
533
- push({ type: 'paren', extglob: true, value, output: '' });
534
- decrement('parens');
535
- return;
536
- }
537
-
538
237
  let output = token.close + (opts.capture ? ')' : '');
539
238
  let rest;
540
239
 
@@ -233,14 +233,6 @@ picomatch.scan = (input, options) => scan(input, options);
233
233
  * Compile a regular expression from the `state` object returned by the
234
234
  * [parse()](#parse) method.
235
235
  *
236
- * ```js
237
- * const picomatch = require('picomatch');
238
- * const state = picomatch.parse('*.js');
239
- * // picomatch.compileRe(state[, options]);
240
- *
241
- * console.log(picomatch.compileRe(state));
242
- * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
243
- * ```
244
236
  * @param {Object} `state`
245
237
  * @param {Object} `options`
246
238
  * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.
@@ -276,10 +268,10 @@ picomatch.compileRe = (state, options, returnOutput = false, returnState = false
276
268
  *
277
269
  * ```js
278
270
  * const picomatch = require('picomatch');
279
- * // picomatch.makeRe(state[, options]);
271
+ * const state = picomatch.parse('*.js');
272
+ * // picomatch.compileRe(state[, options]);
280
273
  *
281
- * const result = picomatch.makeRe('*.js');
282
- * console.log(result);
274
+ * console.log(picomatch.compileRe(state));
283
275
  * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
284
276
  * ```
285
277
  * @param {String} `state` The object returned from the `.parse` method.
@@ -1,62 +1,45 @@
1
1
  {
2
- "_from": "picomatch@^4.0.3",
3
- "_id": "picomatch@4.0.4",
4
- "_inBundle": false,
5
- "_integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
6
- "_location": "/picomatch",
7
- "_phantomChildren": {},
8
- "_requested": {
9
- "type": "range",
10
- "registry": true,
11
- "raw": "picomatch@^4.0.3",
12
- "name": "picomatch",
13
- "escapedName": "picomatch",
14
- "rawSpec": "^4.0.3",
15
- "saveSpec": null,
16
- "fetchSpec": "^4.0.3"
2
+ "name": "picomatch",
3
+ "description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.",
4
+ "version": "4.0.3",
5
+ "homepage": "https://github.com/micromatch/picomatch",
6
+ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
7
+ "funding": "https://github.com/sponsors/jonschlinkert",
8
+ "repository": "micromatch/picomatch",
9
+ "bugs": {
10
+ "url": "https://github.com/micromatch/picomatch/issues"
17
11
  },
18
- "_requiredBy": [
19
- "/@parcel/watcher"
12
+ "license": "MIT",
13
+ "files": [
14
+ "index.js",
15
+ "posix.js",
16
+ "lib"
20
17
  ],
21
- "_resolved": "https://mirrors.tencent.com/npm/picomatch/-/picomatch-4.0.4.tgz",
22
- "_shasum": "fd6f5e00a143086e074dffe4c924b8fb293b0589",
23
- "_spec": "picomatch@^4.0.3",
24
- "_where": "/Volumes/data/workspace/parcel-watcher",
25
- "author": {
26
- "name": "Jon Schlinkert",
27
- "url": "https://github.com/jonschlinkert"
18
+ "sideEffects": false,
19
+ "main": "index.js",
20
+ "engines": {
21
+ "node": ">=12"
28
22
  },
29
- "bugs": {
30
- "url": "https://github.com/micromatch/picomatch/issues"
23
+ "scripts": {
24
+ "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .",
25
+ "mocha": "mocha --reporter dot",
26
+ "test": "npm run lint && npm run mocha",
27
+ "test:ci": "npm run test:cover",
28
+ "test:cover": "nyc npm run mocha"
31
29
  },
32
- "bundleDependencies": false,
33
- "deprecated": false,
34
- "description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.",
35
30
  "devDependencies": {
36
31
  "eslint": "^8.57.0",
37
32
  "fill-range": "^7.0.1",
38
33
  "gulp-format-md": "^2.0.0",
39
34
  "mocha": "^10.4.0",
40
- "nyc": "^15.1.0"
35
+ "nyc": "^15.1.0",
36
+ "time-require": "github:jonschlinkert/time-require"
41
37
  },
42
- "engines": {
43
- "node": ">=12"
44
- },
45
- "files": [
46
- "index.js",
47
- "posix.js",
48
- "lib"
49
- ],
50
- "funding": "https://github.com/sponsors/jonschlinkert",
51
- "homepage": "https://github.com/micromatch/picomatch",
52
38
  "keywords": [
53
39
  "glob",
54
40
  "match",
55
41
  "picomatch"
56
42
  ],
57
- "license": "MIT",
58
- "main": "index.js",
59
- "name": "picomatch",
60
43
  "nyc": {
61
44
  "reporter": [
62
45
  "html",
@@ -64,18 +47,6 @@
64
47
  "text-summary"
65
48
  ]
66
49
  },
67
- "repository": {
68
- "type": "git",
69
- "url": "git+https://github.com/micromatch/picomatch.git"
70
- },
71
- "scripts": {
72
- "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .",
73
- "mocha": "mocha --reporter dot",
74
- "test": "npm run lint && npm run mocha",
75
- "test:ci": "npm run test:cover",
76
- "test:cover": "nyc npm run mocha"
77
- },
78
- "sideEffects": false,
79
50
  "verb": {
80
51
  "toc": {
81
52
  "render": true,
@@ -108,6 +79,5 @@
108
79
  "nanomatch",
109
80
  "picomatch"
110
81
  ]
111
- },
112
- "version": "4.0.4"
82
+ }
113
83
  }
@@ -1,48 +1,28 @@
1
1
  {
2
- "_from": "is-extglob@^2.1.1",
3
- "_id": "is-extglob@2.1.1",
4
- "_inBundle": false,
5
- "_integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
6
- "_location": "/is-extglob",
7
- "_phantomChildren": {},
8
- "_requested": {
9
- "type": "range",
10
- "registry": true,
11
- "raw": "is-extglob@^2.1.1",
12
- "name": "is-extglob",
13
- "escapedName": "is-extglob",
14
- "rawSpec": "^2.1.1",
15
- "saveSpec": null,
16
- "fetchSpec": "^2.1.1"
2
+ "name": "is-extglob",
3
+ "description": "Returns true if a string has an extglob.",
4
+ "version": "2.1.1",
5
+ "homepage": "https://github.com/jonschlinkert/is-extglob",
6
+ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
7
+ "repository": "jonschlinkert/is-extglob",
8
+ "bugs": {
9
+ "url": "https://github.com/jonschlinkert/is-extglob/issues"
17
10
  },
18
- "_requiredBy": [
19
- "/is-glob"
11
+ "license": "MIT",
12
+ "files": [
13
+ "index.js"
20
14
  ],
21
- "_resolved": "https://mirrors.tencent.com/npm/is-extglob/-/is-extglob-2.1.1.tgz",
22
- "_shasum": "a88c02535791f02ed37c76a1b9ea9773c833f8c2",
23
- "_spec": "is-extglob@^2.1.1",
24
- "_where": "/Volumes/data/workspace/node_modules/is-glob",
25
- "author": {
26
- "name": "Jon Schlinkert",
27
- "url": "https://github.com/jonschlinkert"
15
+ "main": "index.js",
16
+ "engines": {
17
+ "node": ">=0.10.0"
28
18
  },
29
- "bugs": {
30
- "url": "https://github.com/jonschlinkert/is-extglob/issues"
19
+ "scripts": {
20
+ "test": "mocha"
31
21
  },
32
- "bundleDependencies": false,
33
- "deprecated": false,
34
- "description": "Returns true if a string has an extglob.",
35
22
  "devDependencies": {
36
23
  "gulp-format-md": "^0.1.10",
37
24
  "mocha": "^3.0.2"
38
25
  },
39
- "engines": {
40
- "node": ">=0.10.0"
41
- },
42
- "files": [
43
- "index.js"
44
- ],
45
- "homepage": "https://github.com/jonschlinkert/is-extglob",
46
26
  "keywords": [
47
27
  "bash",
48
28
  "braces",
@@ -62,16 +42,6 @@
62
42
  "string",
63
43
  "test"
64
44
  ],
65
- "license": "MIT",
66
- "main": "index.js",
67
- "name": "is-extglob",
68
- "repository": {
69
- "type": "git",
70
- "url": "git+https://github.com/jonschlinkert/is-extglob.git"
71
- },
72
- "scripts": {
73
- "test": "mocha"
74
- },
75
45
  "verb": {
76
46
  "toc": false,
77
47
  "layout": "default",
@@ -95,6 +65,5 @@
95
65
  "lint": {
96
66
  "reflinks": true
97
67
  }
98
- },
99
- "version": "2.1.1"
68
+ }
100
69
  }
@@ -1,65 +1,36 @@
1
1
  {
2
- "_from": "is-glob@^4.0.3",
3
- "_id": "is-glob@4.0.3",
4
- "_inBundle": false,
5
- "_integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
6
- "_location": "/is-glob",
7
- "_phantomChildren": {},
8
- "_requested": {
9
- "type": "range",
10
- "registry": true,
11
- "raw": "is-glob@^4.0.3",
12
- "name": "is-glob",
13
- "escapedName": "is-glob",
14
- "rawSpec": "^4.0.3",
15
- "saveSpec": null,
16
- "fetchSpec": "^4.0.3"
17
- },
18
- "_requiredBy": [
19
- "/@parcel/watcher"
2
+ "name": "is-glob",
3
+ "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.",
4
+ "version": "4.0.3",
5
+ "homepage": "https://github.com/micromatch/is-glob",
6
+ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
7
+ "contributors": [
8
+ "Brian Woodward (https://twitter.com/doowb)",
9
+ "Daniel Perez (https://tuvistavie.com)",
10
+ "Jon Schlinkert (http://twitter.com/jonschlinkert)"
20
11
  ],
21
- "_resolved": "https://mirrors.tencent.com/npm/is-glob/-/is-glob-4.0.3.tgz",
22
- "_shasum": "64f61e42cbbb2eec2071a9dac0b28ba1e65d5084",
23
- "_spec": "is-glob@^4.0.3",
24
- "_where": "/Volumes/data/workspace/parcel-watcher",
25
- "author": {
26
- "name": "Jon Schlinkert",
27
- "url": "https://github.com/jonschlinkert"
28
- },
12
+ "repository": "micromatch/is-glob",
29
13
  "bugs": {
30
14
  "url": "https://github.com/micromatch/is-glob/issues"
31
15
  },
32
- "bundleDependencies": false,
33
- "contributors": [
34
- {
35
- "name": "Brian Woodward",
36
- "url": "https://twitter.com/doowb"
37
- },
38
- {
39
- "name": "Daniel Perez",
40
- "url": "https://tuvistavie.com"
41
- },
42
- {
43
- "name": "Jon Schlinkert",
44
- "url": "http://twitter.com/jonschlinkert"
45
- }
16
+ "license": "MIT",
17
+ "files": [
18
+ "index.js"
46
19
  ],
20
+ "main": "index.js",
21
+ "engines": {
22
+ "node": ">=0.10.0"
23
+ },
24
+ "scripts": {
25
+ "test": "mocha && node benchmark.js"
26
+ },
47
27
  "dependencies": {
48
28
  "is-extglob": "^2.1.1"
49
29
  },
50
- "deprecated": false,
51
- "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.",
52
30
  "devDependencies": {
53
31
  "gulp-format-md": "^0.1.10",
54
32
  "mocha": "^3.0.2"
55
33
  },
56
- "engines": {
57
- "node": ">=0.10.0"
58
- },
59
- "files": [
60
- "index.js"
61
- ],
62
- "homepage": "https://github.com/micromatch/is-glob",
63
34
  "keywords": [
64
35
  "bash",
65
36
  "braces",
@@ -79,16 +50,6 @@
79
50
  "string",
80
51
  "test"
81
52
  ],
82
- "license": "MIT",
83
- "main": "index.js",
84
- "name": "is-glob",
85
- "repository": {
86
- "type": "git",
87
- "url": "git+https://github.com/micromatch/is-glob.git"
88
- },
89
- "scripts": {
90
- "test": "mocha && node benchmark.js"
91
- },
92
53
  "verb": {
93
54
  "layout": "default",
94
55
  "plugins": [
@@ -116,6 +77,5 @@
116
77
  "verb",
117
78
  "vinyl"
118
79
  ]
119
- },
120
- "version": "4.0.3"
80
+ }
121
81
  }
@@ -19,7 +19,7 @@ and exception handling semantics with low overhead.
19
19
  API references are available in the [doc](doc/README.md) directory.
20
20
 
21
21
  <!-- x-release-please-start-version -->
22
- ## Current version: 8.7.0
22
+ ## Current version: 8.6.0
23
23
  <!-- x-release-please-end -->
24
24
 
25
25
  (See [CHANGELOG.md](CHANGELOG.md) for complete Changelog)