@vention/vention-cli 0.38.38 → 0.38.40
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 +100 -13
- package/main.esm.js +1301 -994
- package/package.json +2 -2
- package/src/cli-helpers.d.ts +21 -10
- package/src/commands/login.d.ts +1 -0
- package/src/commands/skills.d.ts +1 -0
- package/src/commands/whoami.d.ts +2 -0
- package/src/digital-twin-connection/digital-twin-api.d.ts +0 -1
- package/src/digital-twin-connection/index.d.ts +1 -1
- package/src/digital-twin-connection/resolve-connection.d.ts +0 -1
- package/src/machine-code-app-directory-info.d.ts +1 -0
- package/src/selection-options.d.ts +2 -0
- package/src/sync-state.d.ts +8 -0
package/main.esm.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Command, Option } from 'commander';
|
|
2
|
+
import { Command, Option, InvalidArgumentError } from 'commander';
|
|
3
3
|
import chalk from 'chalk';
|
|
4
|
+
import { release } from 'node:os';
|
|
4
5
|
import { select } from '@inquirer/prompts';
|
|
5
6
|
import * as fs from 'fs';
|
|
6
7
|
import fs__default, { promises } from 'fs';
|
|
@@ -8,11 +9,12 @@ import * as path$2 from 'path';
|
|
|
8
9
|
import path__default from 'path';
|
|
9
10
|
import { z } from 'zod';
|
|
10
11
|
import { spawn } from 'node:child_process';
|
|
11
|
-
import { release } from 'node:os';
|
|
12
12
|
import { createHash, randomBytes } from 'node:crypto';
|
|
13
13
|
import { once } from 'node:events';
|
|
14
14
|
import { createServer } from 'node:http';
|
|
15
15
|
import { createRequire } from 'module';
|
|
16
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
17
|
+
import { createHash as createHash$1 } from 'crypto';
|
|
16
18
|
import { setTimeout as setTimeout$1 } from 'node:timers/promises';
|
|
17
19
|
import { execFileSync } from 'child_process';
|
|
18
20
|
|
|
@@ -357,12 +359,12 @@ var $Object$2 = Object;
|
|
|
357
359
|
|
|
358
360
|
// `ToObject` abstract operation
|
|
359
361
|
// https://tc39.es/ecma262/#sec-toobject
|
|
360
|
-
var toObject$
|
|
362
|
+
var toObject$c = function (argument) {
|
|
361
363
|
return $Object$2(requireObjectCoercible$a(argument));
|
|
362
364
|
};
|
|
363
365
|
|
|
364
366
|
var uncurryThis$F = functionUncurryThis;
|
|
365
|
-
var toObject$
|
|
367
|
+
var toObject$b = toObject$c;
|
|
366
368
|
|
|
367
369
|
var hasOwnProperty = uncurryThis$F({}.hasOwnProperty);
|
|
368
370
|
|
|
@@ -370,7 +372,7 @@ var hasOwnProperty = uncurryThis$F({}.hasOwnProperty);
|
|
|
370
372
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
371
373
|
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
372
374
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
373
|
-
return hasOwnProperty(toObject$
|
|
375
|
+
return hasOwnProperty(toObject$b(it), key);
|
|
374
376
|
};
|
|
375
377
|
|
|
376
378
|
var uncurryThis$E = functionUncurryThis;
|
|
@@ -790,13 +792,13 @@ var trunc = mathTrunc;
|
|
|
790
792
|
|
|
791
793
|
// `ToIntegerOrInfinity` abstract operation
|
|
792
794
|
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
793
|
-
var toIntegerOrInfinity$
|
|
795
|
+
var toIntegerOrInfinity$e = function (argument) {
|
|
794
796
|
var number = +argument;
|
|
795
797
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
796
798
|
return number !== number || number === 0 ? 0 : trunc(number);
|
|
797
799
|
};
|
|
798
800
|
|
|
799
|
-
var toIntegerOrInfinity$
|
|
801
|
+
var toIntegerOrInfinity$d = toIntegerOrInfinity$e;
|
|
800
802
|
|
|
801
803
|
var max$3 = Math.max;
|
|
802
804
|
var min$6 = Math.min;
|
|
@@ -805,18 +807,18 @@ var min$6 = Math.min;
|
|
|
805
807
|
// Let integer be ? ToInteger(index).
|
|
806
808
|
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
807
809
|
var toAbsoluteIndex$3 = function (index, length) {
|
|
808
|
-
var integer = toIntegerOrInfinity$
|
|
810
|
+
var integer = toIntegerOrInfinity$d(index);
|
|
809
811
|
return integer < 0 ? max$3(integer + length, 0) : min$6(integer, length);
|
|
810
812
|
};
|
|
811
813
|
|
|
812
|
-
var toIntegerOrInfinity$
|
|
814
|
+
var toIntegerOrInfinity$c = toIntegerOrInfinity$e;
|
|
813
815
|
|
|
814
816
|
var min$5 = Math.min;
|
|
815
817
|
|
|
816
818
|
// `ToLength` abstract operation
|
|
817
819
|
// https://tc39.es/ecma262/#sec-tolength
|
|
818
820
|
var toLength$7 = function (argument) {
|
|
819
|
-
var len = toIntegerOrInfinity$
|
|
821
|
+
var len = toIntegerOrInfinity$c(argument);
|
|
820
822
|
return len > 0 ? min$5(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
821
823
|
};
|
|
822
824
|
|
|
@@ -824,19 +826,19 @@ var toLength$6 = toLength$7;
|
|
|
824
826
|
|
|
825
827
|
// `LengthOfArrayLike` abstract operation
|
|
826
828
|
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
827
|
-
var lengthOfArrayLike$
|
|
829
|
+
var lengthOfArrayLike$h = function (obj) {
|
|
828
830
|
return toLength$6(obj.length);
|
|
829
831
|
};
|
|
830
832
|
|
|
831
833
|
var toIndexedObject$4 = toIndexedObject$6;
|
|
832
834
|
var toAbsoluteIndex$2 = toAbsoluteIndex$3;
|
|
833
|
-
var lengthOfArrayLike$
|
|
835
|
+
var lengthOfArrayLike$g = lengthOfArrayLike$h;
|
|
834
836
|
|
|
835
837
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
836
838
|
var createMethod$5 = function (IS_INCLUDES) {
|
|
837
839
|
return function ($this, el, fromIndex) {
|
|
838
840
|
var O = toIndexedObject$4($this);
|
|
839
|
-
var length = lengthOfArrayLike$
|
|
841
|
+
var length = lengthOfArrayLike$g(O);
|
|
840
842
|
if (length === 0) return !IS_INCLUDES && -1;
|
|
841
843
|
var index = toAbsoluteIndex$2(fromIndex, length);
|
|
842
844
|
var value;
|
|
@@ -1078,7 +1080,7 @@ var defineBuiltInAccessor$9 = function (target, name, descriptor) {
|
|
|
1078
1080
|
return defineProperty$5.f(target, name, descriptor);
|
|
1079
1081
|
};
|
|
1080
1082
|
|
|
1081
|
-
var $$
|
|
1083
|
+
var $$P = _export;
|
|
1082
1084
|
var DESCRIPTORS$g = descriptors;
|
|
1083
1085
|
var globalThis$E = globalThis_1;
|
|
1084
1086
|
var call$v = functionCall;
|
|
@@ -1140,7 +1142,7 @@ if (DESCRIPTORS$g && isCallable$g(NativeSymbol) && (!('description' in SymbolPro
|
|
|
1140
1142
|
}
|
|
1141
1143
|
});
|
|
1142
1144
|
|
|
1143
|
-
$$
|
|
1145
|
+
$$P({ global: true, constructor: true, forced: true }, {
|
|
1144
1146
|
Symbol: SymbolWrapper
|
|
1145
1147
|
});
|
|
1146
1148
|
}
|
|
@@ -1284,14 +1286,14 @@ if (ArrayPrototype$1[UNSCOPABLES] === undefined) {
|
|
|
1284
1286
|
}
|
|
1285
1287
|
|
|
1286
1288
|
// add a key to Array.prototype[@@unscopables]
|
|
1287
|
-
var addToUnscopables$
|
|
1289
|
+
var addToUnscopables$5 = function (key) {
|
|
1288
1290
|
ArrayPrototype$1[UNSCOPABLES][key] = true;
|
|
1289
1291
|
};
|
|
1290
1292
|
|
|
1291
|
-
var $$
|
|
1293
|
+
var $$O = _export;
|
|
1292
1294
|
var $includes = arrayIncludes.includes;
|
|
1293
1295
|
var fails$w = fails$F;
|
|
1294
|
-
var addToUnscopables$
|
|
1296
|
+
var addToUnscopables$4 = addToUnscopables$5;
|
|
1295
1297
|
|
|
1296
1298
|
// FF99+ bug
|
|
1297
1299
|
var BROKEN_ON_SPARSE = fails$w(function () {
|
|
@@ -1307,14 +1309,14 @@ var BROKEN_ON_SPARSE_WITH_FROM_INDEX = fails$w(function () {
|
|
|
1307
1309
|
|
|
1308
1310
|
// `Array.prototype.includes` method
|
|
1309
1311
|
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
1310
|
-
$$
|
|
1312
|
+
$$O({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE || BROKEN_ON_SPARSE_WITH_FROM_INDEX }, {
|
|
1311
1313
|
includes: function includes(el /* , fromIndex = 0 */) {
|
|
1312
1314
|
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
1313
1315
|
}
|
|
1314
1316
|
});
|
|
1315
1317
|
|
|
1316
1318
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1317
|
-
addToUnscopables$
|
|
1319
|
+
addToUnscopables$4('includes');
|
|
1318
1320
|
|
|
1319
1321
|
var isObject$f = isObject$l;
|
|
1320
1322
|
var classof$d = classofRaw$2;
|
|
@@ -1355,7 +1357,7 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
|
1355
1357
|
} return false;
|
|
1356
1358
|
};
|
|
1357
1359
|
|
|
1358
|
-
var $$
|
|
1360
|
+
var $$N = _export;
|
|
1359
1361
|
var uncurryThis$y = functionUncurryThis;
|
|
1360
1362
|
var notARegExp$2 = notARegexp;
|
|
1361
1363
|
var requireObjectCoercible$9 = requireObjectCoercible$c;
|
|
@@ -1366,7 +1368,7 @@ var stringIndexOf$2 = uncurryThis$y(''.indexOf);
|
|
|
1366
1368
|
|
|
1367
1369
|
// `String.prototype.includes` method
|
|
1368
1370
|
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
|
1369
|
-
$$
|
|
1371
|
+
$$N({ target: 'String', proto: true, forced: !correctIsRegExpLogic$2('includes') }, {
|
|
1370
1372
|
includes: function includes(searchString /* , position = 0 */) {
|
|
1371
1373
|
return !!~stringIndexOf$2(
|
|
1372
1374
|
toString$f(requireObjectCoercible$9(this)),
|
|
@@ -1965,7 +1967,7 @@ newPromiseCapability$2.f = function (C) {
|
|
|
1965
1967
|
return new PromiseCapability(C);
|
|
1966
1968
|
};
|
|
1967
1969
|
|
|
1968
|
-
var $$
|
|
1970
|
+
var $$M = _export;
|
|
1969
1971
|
var IS_NODE$1 = environmentIsNode;
|
|
1970
1972
|
var globalThis$w = globalThis_1;
|
|
1971
1973
|
var path = path$1;
|
|
@@ -2248,7 +2250,7 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
|
|
|
2248
2250
|
|
|
2249
2251
|
// `Promise` constructor
|
|
2250
2252
|
// https://tc39.es/ecma262/#sec-promise-executor
|
|
2251
|
-
$$
|
|
2253
|
+
$$M({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
|
|
2252
2254
|
Promise: PromiseConstructor
|
|
2253
2255
|
});
|
|
2254
2256
|
|
|
@@ -2327,7 +2329,7 @@ var call$q = functionCall;
|
|
|
2327
2329
|
var anObject$h = anObject$p;
|
|
2328
2330
|
var tryToString$2 = tryToString$6;
|
|
2329
2331
|
var isArrayIteratorMethod$1 = isArrayIteratorMethod$2;
|
|
2330
|
-
var lengthOfArrayLike$
|
|
2332
|
+
var lengthOfArrayLike$f = lengthOfArrayLike$h;
|
|
2331
2333
|
var isPrototypeOf$5 = objectIsPrototypeOf;
|
|
2332
2334
|
var getIterator$1 = getIterator$2;
|
|
2333
2335
|
var getIteratorMethod$2 = getIteratorMethod$4;
|
|
@@ -2374,7 +2376,7 @@ var iterate$8 = function (iterable, unboundFunction, options) {
|
|
|
2374
2376
|
if (!iterFn) throw new $TypeError$c(tryToString$2(iterable) + ' is not iterable');
|
|
2375
2377
|
// optimisation for array iterators
|
|
2376
2378
|
if (isArrayIteratorMethod$1(iterFn)) {
|
|
2377
|
-
for (index = 0, length = lengthOfArrayLike$
|
|
2379
|
+
for (index = 0, length = lengthOfArrayLike$f(iterable); length > index; index++) {
|
|
2378
2380
|
result = callFn(iterable[index]);
|
|
2379
2381
|
if (result && isPrototypeOf$5(ResultPrototype, result)) return result;
|
|
2380
2382
|
} return new Result(false);
|
|
@@ -2447,7 +2449,7 @@ var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCor
|
|
|
2447
2449
|
NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
|
|
2448
2450
|
});
|
|
2449
2451
|
|
|
2450
|
-
var $$
|
|
2452
|
+
var $$L = _export;
|
|
2451
2453
|
var call$p = functionCall;
|
|
2452
2454
|
var aCallable$e = aCallable$l;
|
|
2453
2455
|
var newPromiseCapabilityModule$2 = newPromiseCapability$2;
|
|
@@ -2457,7 +2459,7 @@ var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
|
|
|
2457
2459
|
|
|
2458
2460
|
// `Promise.all` method
|
|
2459
2461
|
// https://tc39.es/ecma262/#sec-promise.all
|
|
2460
|
-
$$
|
|
2462
|
+
$$L({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
|
|
2461
2463
|
all: function all(iterable) {
|
|
2462
2464
|
var C = this;
|
|
2463
2465
|
var capability = newPromiseCapabilityModule$2.f(C);
|
|
@@ -2486,7 +2488,7 @@ $$K({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
|
|
|
2486
2488
|
}
|
|
2487
2489
|
});
|
|
2488
2490
|
|
|
2489
|
-
var $$
|
|
2491
|
+
var $$K = _export;
|
|
2490
2492
|
var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
|
|
2491
2493
|
var NativePromiseConstructor = promiseNativeConstructor;
|
|
2492
2494
|
var getBuiltIn$5 = getBuiltIn$b;
|
|
@@ -2497,7 +2499,7 @@ var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructo
|
|
|
2497
2499
|
|
|
2498
2500
|
// `Promise.prototype.catch` method
|
|
2499
2501
|
// https://tc39.es/ecma262/#sec-promise.prototype.catch
|
|
2500
|
-
$$
|
|
2502
|
+
$$K({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
|
|
2501
2503
|
'catch': function (onRejected) {
|
|
2502
2504
|
return this.then(undefined, onRejected);
|
|
2503
2505
|
}
|
|
@@ -2511,7 +2513,7 @@ if (isCallable$b(NativePromiseConstructor)) {
|
|
|
2511
2513
|
}
|
|
2512
2514
|
}
|
|
2513
2515
|
|
|
2514
|
-
var $$
|
|
2516
|
+
var $$J = _export;
|
|
2515
2517
|
var call$o = functionCall;
|
|
2516
2518
|
var aCallable$d = aCallable$l;
|
|
2517
2519
|
var newPromiseCapabilityModule$1 = newPromiseCapability$2;
|
|
@@ -2521,7 +2523,7 @@ var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
|
|
|
2521
2523
|
|
|
2522
2524
|
// `Promise.race` method
|
|
2523
2525
|
// https://tc39.es/ecma262/#sec-promise.race
|
|
2524
|
-
$$
|
|
2526
|
+
$$J({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
|
|
2525
2527
|
race: function race(iterable) {
|
|
2526
2528
|
var C = this;
|
|
2527
2529
|
var capability = newPromiseCapabilityModule$1.f(C);
|
|
@@ -2537,13 +2539,13 @@ $$I({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
|
|
|
2537
2539
|
}
|
|
2538
2540
|
});
|
|
2539
2541
|
|
|
2540
|
-
var $$
|
|
2542
|
+
var $$I = _export;
|
|
2541
2543
|
var newPromiseCapabilityModule = newPromiseCapability$2;
|
|
2542
2544
|
var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
|
|
2543
2545
|
|
|
2544
2546
|
// `Promise.reject` method
|
|
2545
2547
|
// https://tc39.es/ecma262/#sec-promise.reject
|
|
2546
|
-
$$
|
|
2548
|
+
$$I({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
|
|
2547
2549
|
reject: function reject(r) {
|
|
2548
2550
|
var capability = newPromiseCapabilityModule.f(this);
|
|
2549
2551
|
var capabilityReject = capability.reject;
|
|
@@ -2565,7 +2567,7 @@ var promiseResolve$1 = function (C, x) {
|
|
|
2565
2567
|
return promiseCapability.promise;
|
|
2566
2568
|
};
|
|
2567
2569
|
|
|
2568
|
-
var $$
|
|
2570
|
+
var $$H = _export;
|
|
2569
2571
|
var getBuiltIn$4 = getBuiltIn$b;
|
|
2570
2572
|
var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
|
|
2571
2573
|
var promiseResolve = promiseResolve$1;
|
|
@@ -2574,7 +2576,7 @@ getBuiltIn$4('Promise');
|
|
|
2574
2576
|
|
|
2575
2577
|
// `Promise.resolve` method
|
|
2576
2578
|
// https://tc39.es/ecma262/#sec-promise.resolve
|
|
2577
|
-
$$
|
|
2579
|
+
$$H({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
|
|
2578
2580
|
resolve: function resolve(x) {
|
|
2579
2581
|
return promiseResolve(this, x);
|
|
2580
2582
|
}
|
|
@@ -2733,7 +2735,7 @@ var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_A
|
|
|
2733
2735
|
};
|
|
2734
2736
|
|
|
2735
2737
|
/* eslint-disable no-unused-vars -- required for functions `.length` */
|
|
2736
|
-
var $$
|
|
2738
|
+
var $$G = _export;
|
|
2737
2739
|
var globalThis$v = globalThis_1;
|
|
2738
2740
|
var apply$3 = functionApply;
|
|
2739
2741
|
var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
|
|
@@ -2748,7 +2750,7 @@ var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
|
|
|
2748
2750
|
var O = {};
|
|
2749
2751
|
// eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation
|
|
2750
2752
|
O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED$a);
|
|
2751
|
-
$$
|
|
2753
|
+
$$G({ global: true, constructor: true, arity: 1, forced: FORCED$a }, O);
|
|
2752
2754
|
};
|
|
2753
2755
|
|
|
2754
2756
|
var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
|
|
@@ -2756,7 +2758,7 @@ var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
|
|
|
2756
2758
|
var O = {};
|
|
2757
2759
|
// eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation
|
|
2758
2760
|
O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED$a);
|
|
2759
|
-
$$
|
|
2761
|
+
$$G({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED$a }, O);
|
|
2760
2762
|
}
|
|
2761
2763
|
};
|
|
2762
2764
|
|
|
@@ -2866,7 +2868,7 @@ var parseJsonString = function (source, i) {
|
|
|
2866
2868
|
return { value: value, end: i };
|
|
2867
2869
|
};
|
|
2868
2870
|
|
|
2869
|
-
var $$
|
|
2871
|
+
var $$F = _export;
|
|
2870
2872
|
var DESCRIPTORS$a = descriptors;
|
|
2871
2873
|
var globalThis$u = globalThis_1;
|
|
2872
2874
|
var getBuiltIn$2 = getBuiltIn$b;
|
|
@@ -2877,7 +2879,7 @@ var isObject$8 = isObject$l;
|
|
|
2877
2879
|
var isArray$3 = isArray$4;
|
|
2878
2880
|
var hasOwn$7 = hasOwnProperty_1;
|
|
2879
2881
|
var toString$d = toString$h;
|
|
2880
|
-
var lengthOfArrayLike$
|
|
2882
|
+
var lengthOfArrayLike$e = lengthOfArrayLike$h;
|
|
2881
2883
|
var createProperty$4 = createProperty$5;
|
|
2882
2884
|
var fails$s = fails$F;
|
|
2883
2885
|
var parseJSONString$1 = parseJsonString;
|
|
@@ -2925,13 +2927,13 @@ var internalize = function (holder, name, reviver, node) {
|
|
|
2925
2927
|
var nodes = unmodified ? node.nodes : nodeIsArray ? [] : {};
|
|
2926
2928
|
if (nodeIsArray) {
|
|
2927
2929
|
elementRecordsLen = nodes.length;
|
|
2928
|
-
len = lengthOfArrayLike$
|
|
2930
|
+
len = lengthOfArrayLike$e(val);
|
|
2929
2931
|
for (i = 0; i < len; i++) {
|
|
2930
2932
|
internalizeProperty(val, i, internalize(val, '' + i, reviver, i < elementRecordsLen ? nodes[i] : undefined));
|
|
2931
2933
|
}
|
|
2932
2934
|
} else {
|
|
2933
2935
|
keys = enumerableOwnProperties(val);
|
|
2934
|
-
len = lengthOfArrayLike$
|
|
2936
|
+
len = lengthOfArrayLike$e(keys);
|
|
2935
2937
|
for (i = 0; i < len; i++) {
|
|
2936
2938
|
P = keys[i];
|
|
2937
2939
|
internalizeProperty(val, P, internalize(val, P, reviver, hasOwn$7(nodes, P) ? nodes[P] : undefined));
|
|
@@ -3123,7 +3125,7 @@ var PROPER_BASE_PARSE = NATIVE_SYMBOL$1 && !fails$s(function () {
|
|
|
3123
3125
|
// `JSON.parse` method
|
|
3124
3126
|
// https://tc39.es/ecma262/#sec-json.parse
|
|
3125
3127
|
// https://github.com/tc39/proposal-json-parse-with-source
|
|
3126
|
-
$$
|
|
3128
|
+
$$F({ target: 'JSON', stat: true, forced: NO_SOURCE_SUPPORT }, {
|
|
3127
3129
|
parse: function parse(text, reviver) {
|
|
3128
3130
|
return PROPER_BASE_PARSE && !isCallable$9(reviver) ? nativeParse(text) : $parse(text, reviver);
|
|
3129
3131
|
}
|
|
@@ -3149,7 +3151,7 @@ var nativeRawJson = !fails$r(function () {
|
|
|
3149
3151
|
return !JSON.isRawJSON(raw) || JSON.stringify(raw) !== unsafeInt;
|
|
3150
3152
|
});
|
|
3151
3153
|
|
|
3152
|
-
var $$
|
|
3154
|
+
var $$E = _export;
|
|
3153
3155
|
var getBuiltIn$1 = getBuiltIn$b;
|
|
3154
3156
|
var apply$2 = functionApply;
|
|
3155
3157
|
var call$m = functionCall;
|
|
@@ -3248,7 +3250,7 @@ var getReplacerFunction = function (replacer) {
|
|
|
3248
3250
|
// `JSON.stringify` method
|
|
3249
3251
|
// https://tc39.es/ecma262/#sec-json.stringify
|
|
3250
3252
|
// https://github.com/tc39/proposal-json-parse-with-source
|
|
3251
|
-
if ($stringify) $$
|
|
3253
|
+
if ($stringify) $$E({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE || !NATIVE_RAW_JSON }, {
|
|
3252
3254
|
stringify: function stringify(text, replacer, space) {
|
|
3253
3255
|
var replacerFunction = getReplacerFunction(replacer);
|
|
3254
3256
|
var rawStrings = [];
|
|
@@ -3284,7 +3286,7 @@ if ($stringify) $$D({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOL
|
|
|
3284
3286
|
}
|
|
3285
3287
|
});
|
|
3286
3288
|
|
|
3287
|
-
var $$
|
|
3289
|
+
var $$D = _export;
|
|
3288
3290
|
var uncurryThis$o = functionUncurryThisClause;
|
|
3289
3291
|
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
3290
3292
|
var toLength$5 = toLength$7;
|
|
@@ -3305,7 +3307,7 @@ var MDN_POLYFILL_BUG$1 = !CORRECT_IS_REGEXP_LOGIC$1 && !!function () {
|
|
|
3305
3307
|
|
|
3306
3308
|
// `String.prototype.endsWith` method
|
|
3307
3309
|
// https://tc39.es/ecma262/#sec-string.prototype.endswith
|
|
3308
|
-
$$
|
|
3310
|
+
$$D({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG$1 && !CORRECT_IS_REGEXP_LOGIC$1 }, {
|
|
3309
3311
|
endsWith: function endsWith(searchString /* , endPosition = @length */) {
|
|
3310
3312
|
var that = toString$b(requireObjectCoercible$7(this));
|
|
3311
3313
|
notARegExp$1(searchString);
|
|
@@ -3334,13 +3336,13 @@ const saveSession = async data => {
|
|
|
3334
3336
|
const loadSession = async ({
|
|
3335
3337
|
quiet: _quiet = false
|
|
3336
3338
|
} = {}) => {
|
|
3339
|
+
const configPath = getConfigPath();
|
|
3337
3340
|
try {
|
|
3338
|
-
const configPath = getConfigPath();
|
|
3339
3341
|
const data = await promises.readFile(configPath, "utf-8");
|
|
3340
3342
|
return JSON.parse(data);
|
|
3341
3343
|
} catch (error) {
|
|
3342
|
-
if (!_quiet) {
|
|
3343
|
-
console.error(
|
|
3344
|
+
if (!_quiet && error.code !== "ENOENT") {
|
|
3345
|
+
console.error(`Couldn't read your Vention sign-in file (${configPath}). Run 'vention login' to sign in again.`);
|
|
3344
3346
|
}
|
|
3345
3347
|
return null;
|
|
3346
3348
|
}
|
|
@@ -3366,7 +3368,7 @@ var fails$p = fails$F;
|
|
|
3366
3368
|
var objectKeys = objectKeys$2;
|
|
3367
3369
|
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
3368
3370
|
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
3369
|
-
var toObject$
|
|
3371
|
+
var toObject$a = toObject$c;
|
|
3370
3372
|
var IndexedObject$2 = indexedObject;
|
|
3371
3373
|
|
|
3372
3374
|
// eslint-disable-next-line es/no-object-assign -- safe
|
|
@@ -3399,7 +3401,7 @@ var objectAssign = !$assign || fails$p(function () {
|
|
|
3399
3401
|
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
3400
3402
|
return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
|
|
3401
3403
|
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
3402
|
-
var T = toObject$
|
|
3404
|
+
var T = toObject$a(target);
|
|
3403
3405
|
var argumentsLength = arguments.length;
|
|
3404
3406
|
var index = 1;
|
|
3405
3407
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
@@ -3417,13 +3419,13 @@ var objectAssign = !$assign || fails$p(function () {
|
|
|
3417
3419
|
} return T;
|
|
3418
3420
|
} : $assign;
|
|
3419
3421
|
|
|
3420
|
-
var $$
|
|
3422
|
+
var $$C = _export;
|
|
3421
3423
|
var assign = objectAssign;
|
|
3422
3424
|
|
|
3423
3425
|
// `Object.assign` method
|
|
3424
3426
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
3425
3427
|
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
3426
|
-
$$
|
|
3428
|
+
$$C({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
3427
3429
|
assign: assign
|
|
3428
3430
|
});
|
|
3429
3431
|
|
|
@@ -3916,12 +3918,12 @@ async function loginWithLoopback({ issuer, clientLabel, scopes, store, showAutho
|
|
|
3916
3918
|
return signedInUser;
|
|
3917
3919
|
}
|
|
3918
3920
|
|
|
3919
|
-
var $$
|
|
3921
|
+
var $$B = _export;
|
|
3920
3922
|
var globalThis$t = globalThis_1;
|
|
3921
3923
|
|
|
3922
3924
|
// `globalThis` object
|
|
3923
3925
|
// https://tc39.es/ecma262/#sec-globalthis
|
|
3924
|
-
$$
|
|
3926
|
+
$$B({ global: true, forced: globalThis$t.globalThis !== globalThis$t }, {
|
|
3925
3927
|
globalThis: globalThis$t
|
|
3926
3928
|
});
|
|
3927
3929
|
|
|
@@ -3936,7 +3938,7 @@ var correctPrototypeGetter = !fails$o(function () {
|
|
|
3936
3938
|
|
|
3937
3939
|
var hasOwn$6 = hasOwnProperty_1;
|
|
3938
3940
|
var isCallable$7 = isCallable$s;
|
|
3939
|
-
var toObject$
|
|
3941
|
+
var toObject$9 = toObject$c;
|
|
3940
3942
|
var sharedKey = sharedKey$3;
|
|
3941
3943
|
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
3942
3944
|
|
|
@@ -3948,7 +3950,7 @@ var ObjectPrototype$2 = $Object.prototype;
|
|
|
3948
3950
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
3949
3951
|
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
3950
3952
|
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
|
|
3951
|
-
var object = toObject$
|
|
3953
|
+
var object = toObject$9(O);
|
|
3952
3954
|
if (hasOwn$6(object, IE_PROTO)) return object[IE_PROTO];
|
|
3953
3955
|
var constructor = object.constructor;
|
|
3954
3956
|
if (isCallable$7(constructor) && object instanceof constructor) {
|
|
@@ -4018,7 +4020,7 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
|
|
|
4018
4020
|
return IteratorConstructor;
|
|
4019
4021
|
};
|
|
4020
4022
|
|
|
4021
|
-
var $$
|
|
4023
|
+
var $$A = _export;
|
|
4022
4024
|
var call$k = functionCall;
|
|
4023
4025
|
var FunctionName$1 = functionName;
|
|
4024
4026
|
var isCallable$5 = isCallable$s;
|
|
@@ -4106,7 +4108,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
4106
4108
|
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
4107
4109
|
defineBuiltIn$5(IterablePrototype, KEY, methods[KEY]);
|
|
4108
4110
|
}
|
|
4109
|
-
} else $$
|
|
4111
|
+
} else $$A({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
4110
4112
|
}
|
|
4111
4113
|
|
|
4112
4114
|
// define iterator
|
|
@@ -4125,7 +4127,7 @@ var createIterResultObject$2 = function (value, done) {
|
|
|
4125
4127
|
};
|
|
4126
4128
|
|
|
4127
4129
|
var toIndexedObject$1 = toIndexedObject$6;
|
|
4128
|
-
var addToUnscopables$
|
|
4130
|
+
var addToUnscopables$3 = addToUnscopables$5;
|
|
4129
4131
|
var Iterators = iterators;
|
|
4130
4132
|
var InternalStateModule$4 = internalState;
|
|
4131
4133
|
var defineProperty = objectDefineProperty.f;
|
|
@@ -4176,16 +4178,16 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
|
|
|
4176
4178
|
var values = Iterators.Arguments = Iterators.Array;
|
|
4177
4179
|
|
|
4178
4180
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
4179
|
-
addToUnscopables$
|
|
4180
|
-
addToUnscopables$
|
|
4181
|
-
addToUnscopables$
|
|
4181
|
+
addToUnscopables$3('keys');
|
|
4182
|
+
addToUnscopables$3('values');
|
|
4183
|
+
addToUnscopables$3('entries');
|
|
4182
4184
|
|
|
4183
4185
|
// V8 ~ Chrome 45- bug
|
|
4184
4186
|
if (DESCRIPTORS$8 && values.name !== 'values') try {
|
|
4185
4187
|
defineProperty(values, 'name', { value: 'values' });
|
|
4186
4188
|
} catch (error) { /* empty */ }
|
|
4187
4189
|
|
|
4188
|
-
var $$
|
|
4190
|
+
var $$z = _export;
|
|
4189
4191
|
var globalThis$s = globalThis_1;
|
|
4190
4192
|
var anInstance$2 = anInstance$4;
|
|
4191
4193
|
var anObject$f = anObject$p;
|
|
@@ -4244,7 +4246,7 @@ IteratorConstructor.prototype = IteratorPrototype$1;
|
|
|
4244
4246
|
|
|
4245
4247
|
// `Iterator` constructor
|
|
4246
4248
|
// https://tc39.es/ecma262/#sec-iterator
|
|
4247
|
-
$$
|
|
4249
|
+
$$z({ global: true, constructor: true, forced: FORCED$9 }, {
|
|
4248
4250
|
Iterator: IteratorConstructor
|
|
4249
4251
|
});
|
|
4250
4252
|
|
|
@@ -4281,7 +4283,7 @@ var iteratorHelperWithoutClosingOnEarlyError$6 = function (METHOD_NAME, Expected
|
|
|
4281
4283
|
if (!CLOSED) return method;
|
|
4282
4284
|
};
|
|
4283
4285
|
|
|
4284
|
-
var $$
|
|
4286
|
+
var $$y = _export;
|
|
4285
4287
|
var call$j = functionCall;
|
|
4286
4288
|
var iterate$5 = iterate$8;
|
|
4287
4289
|
var aCallable$c = aCallable$l;
|
|
@@ -4294,7 +4296,7 @@ var forEachWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError
|
|
|
4294
4296
|
|
|
4295
4297
|
// `Iterator.prototype.forEach` method
|
|
4296
4298
|
// https://tc39.es/ecma262/#sec-iterator.prototype.foreach
|
|
4297
|
-
$$
|
|
4299
|
+
$$y({ target: 'Iterator', proto: true, real: true, forced: forEachWithoutClosingOnEarlyError }, {
|
|
4298
4300
|
forEach: function forEach(fn) {
|
|
4299
4301
|
anObject$e(this);
|
|
4300
4302
|
try {
|
|
@@ -4429,7 +4431,7 @@ const ERROR_SUGGESTIONS = {
|
|
|
4429
4431
|
default: ["Authentication error. Try running 'vention login' to re-authenticate."]
|
|
4430
4432
|
},
|
|
4431
4433
|
403: {
|
|
4432
|
-
default: ["
|
|
4434
|
+
default: ["Your Vention account can't open this design.", "Run 'vention whoami' to see which account you're signed in with. If it's the wrong one, run 'vention login' again. Otherwise, ask the design's owner to share it with you."]
|
|
4433
4435
|
},
|
|
4434
4436
|
404: {
|
|
4435
4437
|
default: ["The requested resource was not found."],
|
|
@@ -4470,7 +4472,8 @@ const handleCommandError = (error, context) => {
|
|
|
4470
4472
|
if (isVerbose()) {
|
|
4471
4473
|
console.error(chalk.dim(`URL: ${error.url}`));
|
|
4472
4474
|
}
|
|
4473
|
-
const
|
|
4475
|
+
const serverExplainedRequest = error.status === 400 && typeof error.responseBody === "object" && error.responseBody !== null && "error" in error.responseBody;
|
|
4476
|
+
const suggestions = serverExplainedRequest ? [] : getErrorSuggestions(error.status, error.url);
|
|
4474
4477
|
if (suggestions.length > 0) {
|
|
4475
4478
|
console.error();
|
|
4476
4479
|
suggestions.forEach(msg => console.error(chalk.yellow(msg)));
|
|
@@ -4653,7 +4656,7 @@ var iteratorHelperThrowsOnInvalidIterator$3 = function (methodName, argument) {
|
|
|
4653
4656
|
}
|
|
4654
4657
|
};
|
|
4655
4658
|
|
|
4656
|
-
var $$
|
|
4659
|
+
var $$x = _export;
|
|
4657
4660
|
var call$h = functionCall;
|
|
4658
4661
|
var aCallable$b = aCallable$l;
|
|
4659
4662
|
var anObject$c = anObject$p;
|
|
@@ -4679,7 +4682,7 @@ var IteratorProxy$2 = createIteratorProxy$2(function () {
|
|
|
4679
4682
|
|
|
4680
4683
|
// `Iterator.prototype.map` method
|
|
4681
4684
|
// https://tc39.es/ecma262/#sec-iterator.prototype.map
|
|
4682
|
-
$$
|
|
4685
|
+
$$x({ target: 'Iterator', proto: true, real: true, forced: FORCED$8 }, {
|
|
4683
4686
|
map: function map(mapper) {
|
|
4684
4687
|
anObject$c(this);
|
|
4685
4688
|
try {
|
|
@@ -4696,13 +4699,13 @@ $$w({ target: 'Iterator', proto: true, real: true, forced: FORCED$8 }, {
|
|
|
4696
4699
|
}
|
|
4697
4700
|
});
|
|
4698
4701
|
|
|
4699
|
-
var $$
|
|
4702
|
+
var $$w = _export;
|
|
4700
4703
|
var iterate$4 = iterate$8;
|
|
4701
4704
|
var createProperty$2 = createProperty$5;
|
|
4702
4705
|
|
|
4703
4706
|
// `Object.fromEntries` method
|
|
4704
4707
|
// https://tc39.es/ecma262/#sec-object.fromentries
|
|
4705
|
-
$$
|
|
4708
|
+
$$w({ target: 'Object', stat: true }, {
|
|
4706
4709
|
fromEntries: function fromEntries(iterable) {
|
|
4707
4710
|
var obj = {};
|
|
4708
4711
|
iterate$4(iterable, function (k, v) {
|
|
@@ -4934,6 +4937,11 @@ const loginToPlatform = async environment => {
|
|
|
4934
4937
|
await refreshFeatureFlags();
|
|
4935
4938
|
};
|
|
4936
4939
|
|
|
4940
|
+
function canOpenBrowser(env, platform, osRelease) {
|
|
4941
|
+
if (platform !== "linux") return true;
|
|
4942
|
+
return Boolean(env.DISPLAY || env.WAYLAND_DISPLAY || env.BROWSER) || osRelease.toLowerCase().includes("microsoft");
|
|
4943
|
+
}
|
|
4944
|
+
const NO_BROWSER_WARNING = "No web browser can open here, so signing in will probably not finish. If you're using Claude Desktop's Chat or Cowork, switch to the Code tab and ask Claude to log you in there. Otherwise, run 'vention login' on a computer with a web browser.";
|
|
4937
4945
|
function createLoginCommand() {
|
|
4938
4946
|
return new Command().command("login").description("Login to Vention").addOption(new Option("--internal").hideHelp()).action(async (_opts, cmd) => {
|
|
4939
4947
|
try {
|
|
@@ -4959,6 +4967,9 @@ function createLoginCommand() {
|
|
|
4959
4967
|
console.log(chalk.green("Successfully logged in!"));
|
|
4960
4968
|
process.exit(0);
|
|
4961
4969
|
}
|
|
4970
|
+
if (!canOpenBrowser(process.env, process.platform, release())) {
|
|
4971
|
+
console.log(chalk.yellow(NO_BROWSER_WARNING));
|
|
4972
|
+
}
|
|
4962
4973
|
await loginToPlatform(environment);
|
|
4963
4974
|
console.log();
|
|
4964
4975
|
console.log(chalk.green("Successfully logged in!"));
|
|
@@ -4969,6 +4980,124 @@ function createLoginCommand() {
|
|
|
4969
4980
|
});
|
|
4970
4981
|
}
|
|
4971
4982
|
|
|
4983
|
+
function createWhoamiCommand() {
|
|
4984
|
+
return new Command().command("whoami").description("Show which Vention account you're signed in with").action(async () => {
|
|
4985
|
+
const session = await loadSession();
|
|
4986
|
+
if (!(session === null || session === void 0 ? void 0 : session.gatewayToken)) {
|
|
4987
|
+
console.log("Not signed in. Run 'vention login'.");
|
|
4988
|
+
process.exit(1);
|
|
4989
|
+
}
|
|
4990
|
+
if (session.gatewayToken.capExpiresAt <= Date.now()) {
|
|
4991
|
+
console.log("Your Vention sign-in has expired. Run 'vention login'.");
|
|
4992
|
+
process.exit(1);
|
|
4993
|
+
}
|
|
4994
|
+
console.log(session.email ? `Signed in to Vention as ${session.email} (${session.environment}).` : `Signed in to Vention (${session.environment}). Run 'vention login' again to see which account.`);
|
|
4995
|
+
process.exit(0);
|
|
4996
|
+
});
|
|
4997
|
+
}
|
|
4998
|
+
|
|
4999
|
+
var $TypeError$a = TypeError;
|
|
5000
|
+
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
|
|
5001
|
+
|
|
5002
|
+
var doesNotExceedSafeInteger$1 = function (it) {
|
|
5003
|
+
if (it > MAX_SAFE_INTEGER) throw new $TypeError$a('Maximum allowed index exceeded');
|
|
5004
|
+
return it;
|
|
5005
|
+
};
|
|
5006
|
+
|
|
5007
|
+
var isArray$1 = isArray$4;
|
|
5008
|
+
var lengthOfArrayLike$d = lengthOfArrayLike$h;
|
|
5009
|
+
var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
|
|
5010
|
+
var bind$3 = functionBindContext;
|
|
5011
|
+
var createProperty$1 = createProperty$5;
|
|
5012
|
+
|
|
5013
|
+
// `FlattenIntoArray` abstract operation
|
|
5014
|
+
// https://tc39.es/ecma262/#sec-flattenintoarray
|
|
5015
|
+
var flattenIntoArray$2 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
5016
|
+
var targetIndex = start;
|
|
5017
|
+
var sourceIndex = 0;
|
|
5018
|
+
var mapFn = mapper ? bind$3(mapper, thisArg) : false;
|
|
5019
|
+
var element, elementLen;
|
|
5020
|
+
|
|
5021
|
+
while (sourceIndex < sourceLen) {
|
|
5022
|
+
if (sourceIndex in source) {
|
|
5023
|
+
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
|
|
5024
|
+
|
|
5025
|
+
if (depth > 0 && isArray$1(element)) {
|
|
5026
|
+
elementLen = lengthOfArrayLike$d(element);
|
|
5027
|
+
targetIndex = flattenIntoArray$2(target, original, element, elementLen, targetIndex, depth - 1) - 1;
|
|
5028
|
+
} else {
|
|
5029
|
+
doesNotExceedSafeInteger(targetIndex + 1);
|
|
5030
|
+
createProperty$1(target, targetIndex, element);
|
|
5031
|
+
}
|
|
5032
|
+
|
|
5033
|
+
targetIndex++;
|
|
5034
|
+
}
|
|
5035
|
+
sourceIndex++;
|
|
5036
|
+
}
|
|
5037
|
+
return targetIndex;
|
|
5038
|
+
};
|
|
5039
|
+
|
|
5040
|
+
var flattenIntoArray_1 = flattenIntoArray$2;
|
|
5041
|
+
|
|
5042
|
+
var isArray = isArray$4;
|
|
5043
|
+
var isConstructor = isConstructor$2;
|
|
5044
|
+
var isObject$5 = isObject$l;
|
|
5045
|
+
var wellKnownSymbol$4 = wellKnownSymbol$n;
|
|
5046
|
+
|
|
5047
|
+
var SPECIES$1 = wellKnownSymbol$4('species');
|
|
5048
|
+
var $Array$2 = Array;
|
|
5049
|
+
|
|
5050
|
+
// a part of `ArraySpeciesCreate` abstract operation
|
|
5051
|
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
5052
|
+
var arraySpeciesConstructor$1 = function (originalArray) {
|
|
5053
|
+
var C;
|
|
5054
|
+
if (isArray(originalArray)) {
|
|
5055
|
+
C = originalArray.constructor;
|
|
5056
|
+
// cross-realm fallback
|
|
5057
|
+
if (isConstructor(C) && (C === $Array$2 || isArray(C.prototype))) C = undefined;
|
|
5058
|
+
else if (isObject$5(C)) {
|
|
5059
|
+
C = C[SPECIES$1];
|
|
5060
|
+
if (C === null) C = undefined;
|
|
5061
|
+
}
|
|
5062
|
+
} return C === undefined ? $Array$2 : C;
|
|
5063
|
+
};
|
|
5064
|
+
|
|
5065
|
+
var arraySpeciesConstructor = arraySpeciesConstructor$1;
|
|
5066
|
+
|
|
5067
|
+
// `ArraySpeciesCreate` abstract operation
|
|
5068
|
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
5069
|
+
var arraySpeciesCreate$3 = function (originalArray, length) {
|
|
5070
|
+
return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
|
|
5071
|
+
};
|
|
5072
|
+
|
|
5073
|
+
var $$v = _export;
|
|
5074
|
+
var flattenIntoArray$1 = flattenIntoArray_1;
|
|
5075
|
+
var toObject$8 = toObject$c;
|
|
5076
|
+
var lengthOfArrayLike$c = lengthOfArrayLike$h;
|
|
5077
|
+
var toIntegerOrInfinity$b = toIntegerOrInfinity$e;
|
|
5078
|
+
var arraySpeciesCreate$2 = arraySpeciesCreate$3;
|
|
5079
|
+
|
|
5080
|
+
// `Array.prototype.flat` method
|
|
5081
|
+
// https://tc39.es/ecma262/#sec-array.prototype.flat
|
|
5082
|
+
$$v({ target: 'Array', proto: true }, {
|
|
5083
|
+
flat: function flat(/* depthArg = 1 */) {
|
|
5084
|
+
var depthArg = arguments.length ? arguments[0] : undefined;
|
|
5085
|
+
var O = toObject$8(this);
|
|
5086
|
+
var sourceLen = lengthOfArrayLike$c(O);
|
|
5087
|
+
var depthNum = depthArg === undefined ? 1 : toIntegerOrInfinity$b(depthArg);
|
|
5088
|
+
var A = arraySpeciesCreate$2(O, 0);
|
|
5089
|
+
flattenIntoArray$1(A, O, O, sourceLen, 0, depthNum);
|
|
5090
|
+
return A;
|
|
5091
|
+
}
|
|
5092
|
+
});
|
|
5093
|
+
|
|
5094
|
+
// this method was added to unscopables after implementation
|
|
5095
|
+
// in popular engines, so it's moved to a separate module
|
|
5096
|
+
var addToUnscopables$2 = addToUnscopables$5;
|
|
5097
|
+
|
|
5098
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
5099
|
+
addToUnscopables$2('flat');
|
|
5100
|
+
|
|
4972
5101
|
var $$u = _export;
|
|
4973
5102
|
var call$g = functionCall;
|
|
4974
5103
|
var aCallable$a = aCallable$l;
|
|
@@ -5051,6 +5180,38 @@ $$t({ target: 'Iterator', proto: true, real: true, forced: findWithoutClosingOnE
|
|
|
5051
5180
|
}
|
|
5052
5181
|
});
|
|
5053
5182
|
|
|
5183
|
+
var $$s = _export;
|
|
5184
|
+
var call$e = functionCall;
|
|
5185
|
+
var iterate$2 = iterate$8;
|
|
5186
|
+
var aCallable$8 = aCallable$l;
|
|
5187
|
+
var anObject$8 = anObject$p;
|
|
5188
|
+
var getIteratorDirect$3 = getIteratorDirect$8;
|
|
5189
|
+
var iteratorClose$3 = iteratorClose$c;
|
|
5190
|
+
var iteratorHelperWithoutClosingOnEarlyError$1 = iteratorHelperWithoutClosingOnEarlyError$6;
|
|
5191
|
+
|
|
5192
|
+
var someWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError$1('some', TypeError);
|
|
5193
|
+
|
|
5194
|
+
// `Iterator.prototype.some` method
|
|
5195
|
+
// https://tc39.es/ecma262/#sec-iterator.prototype.some
|
|
5196
|
+
$$s({ target: 'Iterator', proto: true, real: true, forced: someWithoutClosingOnEarlyError }, {
|
|
5197
|
+
some: function some(predicate) {
|
|
5198
|
+
anObject$8(this);
|
|
5199
|
+
try {
|
|
5200
|
+
aCallable$8(predicate);
|
|
5201
|
+
} catch (error) {
|
|
5202
|
+
iteratorClose$3(this, 'throw', error);
|
|
5203
|
+
}
|
|
5204
|
+
|
|
5205
|
+
if (someWithoutClosingOnEarlyError) return call$e(someWithoutClosingOnEarlyError, this, predicate);
|
|
5206
|
+
|
|
5207
|
+
var record = getIteratorDirect$3(this);
|
|
5208
|
+
var counter = 0;
|
|
5209
|
+
return iterate$2(record, function (value, stop) {
|
|
5210
|
+
if (predicate(value, counter++)) return stop();
|
|
5211
|
+
}, { IS_RECORD: true, INTERRUPTED: true }).stopped;
|
|
5212
|
+
}
|
|
5213
|
+
});
|
|
5214
|
+
|
|
5054
5215
|
const getAllApplicationsWithSourceCode = async connection => {
|
|
5055
5216
|
const response = await fetchJson(`${connection.baseUrl}/v2/library?shouldIncludeSourceCode=true`, {
|
|
5056
5217
|
headers: Object.assign({
|
|
@@ -5128,7 +5289,7 @@ const getApplicationLogs = async (connection, applicationId) => {
|
|
|
5128
5289
|
// eslint-disable-next-line es/no-typed-arrays -- safe
|
|
5129
5290
|
var arrayBufferBasicDetection = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
|
|
5130
5291
|
|
|
5131
|
-
var toIntegerOrInfinity$a = toIntegerOrInfinity$
|
|
5292
|
+
var toIntegerOrInfinity$a = toIntegerOrInfinity$e;
|
|
5132
5293
|
var toLength$4 = toLength$7;
|
|
5133
5294
|
|
|
5134
5295
|
var $RangeError$5 = RangeError;
|
|
@@ -5192,7 +5353,7 @@ var mathFround = Math.fround || function fround(x) {
|
|
|
5192
5353
|
};
|
|
5193
5354
|
|
|
5194
5355
|
// IEEE754 conversions based on https://github.com/feross/ieee754
|
|
5195
|
-
var $Array$
|
|
5356
|
+
var $Array$1 = Array;
|
|
5196
5357
|
var abs = Math.abs;
|
|
5197
5358
|
var pow = Math.pow;
|
|
5198
5359
|
var floor$5 = Math.floor;
|
|
@@ -5200,7 +5361,7 @@ var log = Math.log;
|
|
|
5200
5361
|
var LN2 = Math.LN2;
|
|
5201
5362
|
|
|
5202
5363
|
var pack = function (number, mantissaLength, bytes) {
|
|
5203
|
-
var buffer = $Array$
|
|
5364
|
+
var buffer = $Array$1(bytes);
|
|
5204
5365
|
var exponentLength = bytes * 8 - mantissaLength - 1;
|
|
5205
5366
|
var eMax = (1 << exponentLength) - 1;
|
|
5206
5367
|
var eBias = eMax >> 1;
|
|
@@ -5294,15 +5455,15 @@ var ieee754 = {
|
|
|
5294
5455
|
unpack: unpack
|
|
5295
5456
|
};
|
|
5296
5457
|
|
|
5297
|
-
var toObject$7 = toObject$
|
|
5458
|
+
var toObject$7 = toObject$c;
|
|
5298
5459
|
var toAbsoluteIndex$1 = toAbsoluteIndex$3;
|
|
5299
|
-
var lengthOfArrayLike$
|
|
5460
|
+
var lengthOfArrayLike$b = lengthOfArrayLike$h;
|
|
5300
5461
|
|
|
5301
5462
|
// `Array.prototype.fill` method implementation
|
|
5302
5463
|
// https://tc39.es/ecma262/#sec-array.prototype.fill
|
|
5303
5464
|
var arrayFill$1 = function fill(value /* , start = 0, end = @length */) {
|
|
5304
5465
|
var O = toObject$7(this);
|
|
5305
|
-
var length = lengthOfArrayLike$
|
|
5466
|
+
var length = lengthOfArrayLike$b(O);
|
|
5306
5467
|
var argumentsLength = arguments.length;
|
|
5307
5468
|
var index = toAbsoluteIndex$1(argumentsLength > 1 ? arguments[1] : undefined, length);
|
|
5308
5469
|
var end = argumentsLength > 2 ? arguments[2] : undefined;
|
|
@@ -5321,7 +5482,7 @@ var defineBuiltInAccessor$4 = defineBuiltInAccessor$9;
|
|
|
5321
5482
|
var defineBuiltIns = defineBuiltIns$2;
|
|
5322
5483
|
var fails$k = fails$F;
|
|
5323
5484
|
var anInstance$1 = anInstance$4;
|
|
5324
|
-
var toIntegerOrInfinity$9 = toIntegerOrInfinity$
|
|
5485
|
+
var toIntegerOrInfinity$9 = toIntegerOrInfinity$e;
|
|
5325
5486
|
var toIndex$2 = toIndex$3;
|
|
5326
5487
|
var fround = mathFround;
|
|
5327
5488
|
var IEEE754 = ieee754;
|
|
@@ -5570,7 +5731,7 @@ var arrayBuffer = {
|
|
|
5570
5731
|
DataView: $DataView
|
|
5571
5732
|
};
|
|
5572
5733
|
|
|
5573
|
-
var $$
|
|
5734
|
+
var $$r = _export;
|
|
5574
5735
|
var globalThis$n = globalThis_1;
|
|
5575
5736
|
var arrayBufferModule = arrayBuffer;
|
|
5576
5737
|
var setSpecies$2 = setSpecies$4;
|
|
@@ -5581,17 +5742,17 @@ var NativeArrayBuffer = globalThis$n[ARRAY_BUFFER];
|
|
|
5581
5742
|
|
|
5582
5743
|
// `ArrayBuffer` constructor
|
|
5583
5744
|
// https://tc39.es/ecma262/#sec-arraybuffer-constructor
|
|
5584
|
-
$$
|
|
5745
|
+
$$r({ global: true, constructor: true, forced: NativeArrayBuffer !== ArrayBuffer$6 }, {
|
|
5585
5746
|
ArrayBuffer: ArrayBuffer$6
|
|
5586
5747
|
});
|
|
5587
5748
|
|
|
5588
5749
|
setSpecies$2(ARRAY_BUFFER);
|
|
5589
5750
|
|
|
5590
|
-
var $$
|
|
5751
|
+
var $$q = _export;
|
|
5591
5752
|
var uncurryThis$l = functionUncurryThisClause;
|
|
5592
5753
|
var fails$j = fails$F;
|
|
5593
5754
|
var ArrayBufferModule$1 = arrayBuffer;
|
|
5594
|
-
var anObject$
|
|
5755
|
+
var anObject$7 = anObject$p;
|
|
5595
5756
|
var toAbsoluteIndex = toAbsoluteIndex$3;
|
|
5596
5757
|
var toLength$3 = toLength$7;
|
|
5597
5758
|
|
|
@@ -5608,12 +5769,12 @@ var INCORRECT_SLICE = fails$j(function () {
|
|
|
5608
5769
|
|
|
5609
5770
|
// `ArrayBuffer.prototype.slice` method
|
|
5610
5771
|
// https://tc39.es/ecma262/#sec-arraybuffer.prototype.slice
|
|
5611
|
-
$$
|
|
5772
|
+
$$q({ target: 'ArrayBuffer', proto: true, unsafe: true, forced: INCORRECT_SLICE }, {
|
|
5612
5773
|
slice: function slice(start, end) {
|
|
5613
5774
|
if (nativeArrayBufferSlice && end === undefined) {
|
|
5614
|
-
return nativeArrayBufferSlice(anObject$
|
|
5775
|
+
return nativeArrayBufferSlice(anObject$7(this), start); // FF fix
|
|
5615
5776
|
}
|
|
5616
|
-
var length = anObject$
|
|
5777
|
+
var length = anObject$7(this).byteLength;
|
|
5617
5778
|
var first = toAbsoluteIndex(start, length);
|
|
5618
5779
|
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
|
5619
5780
|
var result = new ArrayBuffer$5(toLength$3(fin - first));
|
|
@@ -5677,10 +5838,10 @@ if (DESCRIPTORS$4 && !('detached' in ArrayBufferPrototype$2)) {
|
|
|
5677
5838
|
|
|
5678
5839
|
var isDetached = arrayBufferIsDetached;
|
|
5679
5840
|
|
|
5680
|
-
var $TypeError$
|
|
5841
|
+
var $TypeError$9 = TypeError;
|
|
5681
5842
|
|
|
5682
5843
|
var arrayBufferNotDetached = function (it) {
|
|
5683
|
-
if (isDetached(it)) throw new $TypeError$
|
|
5844
|
+
if (isDetached(it)) throw new $TypeError$9('ArrayBuffer is detached');
|
|
5684
5845
|
return it;
|
|
5685
5846
|
};
|
|
5686
5847
|
|
|
@@ -5800,23 +5961,23 @@ var arrayBufferTransfer = (PROPER_STRUCTURED_CLONE_TRANSFER || detachTransferabl
|
|
|
5800
5961
|
return newBuffer;
|
|
5801
5962
|
};
|
|
5802
5963
|
|
|
5803
|
-
var $$
|
|
5964
|
+
var $$p = _export;
|
|
5804
5965
|
var $transfer$1 = arrayBufferTransfer;
|
|
5805
5966
|
|
|
5806
5967
|
// `ArrayBuffer.prototype.transfer` method
|
|
5807
5968
|
// https://tc39.es/ecma262/#sec-arraybuffer.prototype.transfer
|
|
5808
|
-
if ($transfer$1) $$
|
|
5969
|
+
if ($transfer$1) $$p({ target: 'ArrayBuffer', proto: true }, {
|
|
5809
5970
|
transfer: function transfer() {
|
|
5810
5971
|
return $transfer$1(this, arguments.length ? arguments[0] : undefined, true);
|
|
5811
5972
|
}
|
|
5812
5973
|
});
|
|
5813
5974
|
|
|
5814
|
-
var $$
|
|
5975
|
+
var $$o = _export;
|
|
5815
5976
|
var $transfer = arrayBufferTransfer;
|
|
5816
5977
|
|
|
5817
5978
|
// `ArrayBuffer.prototype.transferToFixedLength` method
|
|
5818
5979
|
// https://tc39.es/ecma262/#sec-arraybuffer.prototype.transfertofixedlength
|
|
5819
|
-
if ($transfer) $$
|
|
5980
|
+
if ($transfer) $$o({ target: 'ArrayBuffer', proto: true }, {
|
|
5820
5981
|
transferToFixedLength: function transferToFixedLength() {
|
|
5821
5982
|
return $transfer(this, arguments.length ? arguments[0] : undefined, false);
|
|
5822
5983
|
}
|
|
@@ -5878,7 +6039,7 @@ var regexpUnsupportedNcg = fails$f(function () {
|
|
|
5878
6039
|
|
|
5879
6040
|
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
|
5880
6041
|
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
5881
|
-
var call$
|
|
6042
|
+
var call$d = functionCall;
|
|
5882
6043
|
var uncurryThis$j = functionUncurryThis;
|
|
5883
6044
|
var toString$a = toString$h;
|
|
5884
6045
|
var regexpFlags = regexpFlags$1;
|
|
@@ -5900,8 +6061,8 @@ var stringSlice$6 = uncurryThis$j(''.slice);
|
|
|
5900
6061
|
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
5901
6062
|
var re1 = /a/;
|
|
5902
6063
|
var re2 = /b*/g;
|
|
5903
|
-
call$
|
|
5904
|
-
call$
|
|
6064
|
+
call$d(nativeExec, re1, 'a');
|
|
6065
|
+
call$d(nativeExec, re2, 'a');
|
|
5905
6066
|
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
|
5906
6067
|
})();
|
|
5907
6068
|
|
|
@@ -5930,7 +6091,7 @@ if (PATCH) {
|
|
|
5930
6091
|
|
|
5931
6092
|
if (raw) {
|
|
5932
6093
|
raw.lastIndex = re.lastIndex;
|
|
5933
|
-
result = call$
|
|
6094
|
+
result = call$d(patchedExec, raw, str);
|
|
5934
6095
|
re.lastIndex = raw.lastIndex;
|
|
5935
6096
|
|
|
5936
6097
|
if (result && state.groups) setGroups(result, state.groups);
|
|
@@ -5940,7 +6101,7 @@ if (PATCH) {
|
|
|
5940
6101
|
|
|
5941
6102
|
var groups = state.groups;
|
|
5942
6103
|
var sticky = UNSUPPORTED_Y$1 && re.sticky;
|
|
5943
|
-
var flags = call$
|
|
6104
|
+
var flags = call$d(regexpFlags, re);
|
|
5944
6105
|
var source = re.source;
|
|
5945
6106
|
var charsAdded = 0;
|
|
5946
6107
|
var strCopy = str;
|
|
@@ -5970,7 +6131,7 @@ if (PATCH) {
|
|
|
5970
6131
|
}
|
|
5971
6132
|
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
|
5972
6133
|
|
|
5973
|
-
var match = call$
|
|
6134
|
+
var match = call$d(nativeExec, sticky ? reCopy : re, strCopy);
|
|
5974
6135
|
|
|
5975
6136
|
if (sticky) {
|
|
5976
6137
|
if (match) {
|
|
@@ -5985,7 +6146,7 @@ if (PATCH) {
|
|
|
5985
6146
|
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
5986
6147
|
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
5987
6148
|
// for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
|
|
5988
|
-
call$
|
|
6149
|
+
call$d(nativeReplace, match[0], reCopy, function () {
|
|
5989
6150
|
for (var i = 1; i < arguments.length - 2; i++) {
|
|
5990
6151
|
if (arguments[i] === undefined) match[i] = undefined;
|
|
5991
6152
|
}
|
|
@@ -6000,12 +6161,12 @@ if (PATCH) {
|
|
|
6000
6161
|
|
|
6001
6162
|
var regexpExec$2 = patchedExec;
|
|
6002
6163
|
|
|
6003
|
-
var $$
|
|
6164
|
+
var $$n = _export;
|
|
6004
6165
|
var exec$1 = regexpExec$2;
|
|
6005
6166
|
|
|
6006
6167
|
// `RegExp.prototype.exec` method
|
|
6007
6168
|
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
6008
|
-
$$
|
|
6169
|
+
$$n({ target: 'RegExp', proto: true, forced: /./.exec !== exec$1 }, {
|
|
6009
6170
|
exec: exec$1
|
|
6010
6171
|
});
|
|
6011
6172
|
|
|
@@ -6031,13 +6192,13 @@ var aSet$7 = function (it) {
|
|
|
6031
6192
|
return it;
|
|
6032
6193
|
};
|
|
6033
6194
|
|
|
6034
|
-
var call$
|
|
6195
|
+
var call$c = functionCall;
|
|
6035
6196
|
|
|
6036
6197
|
var iterateSimple$7 = function (record, fn, ITERATOR_INSTEAD_OF_RECORD) {
|
|
6037
6198
|
var iterator = ITERATOR_INSTEAD_OF_RECORD ? record : record.iterator;
|
|
6038
6199
|
var next = record.next;
|
|
6039
6200
|
var step, result;
|
|
6040
|
-
while (!(step = call$
|
|
6201
|
+
while (!(step = call$c(next, iterator)).done) {
|
|
6041
6202
|
result = fn(step.value);
|
|
6042
6203
|
if (result !== undefined) return result;
|
|
6043
6204
|
}
|
|
@@ -6058,14 +6219,14 @@ var setIterate = function (set, fn, interruptible) {
|
|
|
6058
6219
|
};
|
|
6059
6220
|
|
|
6060
6221
|
var SetHelpers$4 = setHelpers;
|
|
6061
|
-
var iterate$
|
|
6222
|
+
var iterate$1 = setIterate;
|
|
6062
6223
|
|
|
6063
6224
|
var Set$2 = SetHelpers$4.Set;
|
|
6064
6225
|
var add$3 = SetHelpers$4.add;
|
|
6065
6226
|
|
|
6066
6227
|
var setClone = function (set) {
|
|
6067
6228
|
var result = new Set$2();
|
|
6068
|
-
iterate$
|
|
6229
|
+
iterate$1(set, function (it) {
|
|
6069
6230
|
add$3(result, it);
|
|
6070
6231
|
});
|
|
6071
6232
|
return result;
|
|
@@ -6078,41 +6239,41 @@ var setSize = uncurryThisAccessor(SetHelpers$3.proto, 'size', 'get') || function
|
|
|
6078
6239
|
return set.size;
|
|
6079
6240
|
};
|
|
6080
6241
|
|
|
6081
|
-
var aCallable$
|
|
6082
|
-
var anObject$
|
|
6083
|
-
var call$
|
|
6084
|
-
var toIntegerOrInfinity$8 = toIntegerOrInfinity$
|
|
6085
|
-
var getIteratorDirect$
|
|
6242
|
+
var aCallable$7 = aCallable$l;
|
|
6243
|
+
var anObject$6 = anObject$p;
|
|
6244
|
+
var call$b = functionCall;
|
|
6245
|
+
var toIntegerOrInfinity$8 = toIntegerOrInfinity$e;
|
|
6246
|
+
var getIteratorDirect$2 = getIteratorDirect$8;
|
|
6086
6247
|
|
|
6087
6248
|
var INVALID_SIZE = 'Invalid size';
|
|
6088
6249
|
var $RangeError$4 = RangeError;
|
|
6089
|
-
var $TypeError$
|
|
6250
|
+
var $TypeError$8 = TypeError;
|
|
6090
6251
|
var max$1 = Math.max;
|
|
6091
6252
|
|
|
6092
6253
|
var SetRecord = function (set, intSize) {
|
|
6093
6254
|
this.set = set;
|
|
6094
6255
|
this.size = max$1(intSize, 0);
|
|
6095
|
-
this.has = aCallable$
|
|
6096
|
-
this.keys = aCallable$
|
|
6256
|
+
this.has = aCallable$7(set.has);
|
|
6257
|
+
this.keys = aCallable$7(set.keys);
|
|
6097
6258
|
};
|
|
6098
6259
|
|
|
6099
6260
|
SetRecord.prototype = {
|
|
6100
6261
|
getIterator: function () {
|
|
6101
|
-
return getIteratorDirect$
|
|
6262
|
+
return getIteratorDirect$2(anObject$6(call$b(this.keys, this.set)));
|
|
6102
6263
|
},
|
|
6103
6264
|
includes: function (it) {
|
|
6104
|
-
return call$
|
|
6265
|
+
return call$b(this.has, this.set, it);
|
|
6105
6266
|
}
|
|
6106
6267
|
};
|
|
6107
6268
|
|
|
6108
6269
|
// `GetSetRecord` abstract operation
|
|
6109
6270
|
// https://tc39.es/proposal-set-methods/#sec-getsetrecord
|
|
6110
6271
|
var getSetRecord$7 = function (obj) {
|
|
6111
|
-
anObject$
|
|
6272
|
+
anObject$6(obj);
|
|
6112
6273
|
var numSize = +obj.size;
|
|
6113
6274
|
// NOTE: If size is undefined, then numSize will be NaN
|
|
6114
6275
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
6115
|
-
if (numSize !== numSize) throw new $TypeError$
|
|
6276
|
+
if (numSize !== numSize) throw new $TypeError$8(INVALID_SIZE);
|
|
6116
6277
|
var intSize = toIntegerOrInfinity$8(numSize);
|
|
6117
6278
|
if (intSize < 0) throw new $RangeError$4(INVALID_SIZE);
|
|
6118
6279
|
return new SetRecord(obj, intSize);
|
|
@@ -6202,7 +6363,7 @@ var setMethodAcceptSetLike$7 = function (name, callback) {
|
|
|
6202
6363
|
}
|
|
6203
6364
|
};
|
|
6204
6365
|
|
|
6205
|
-
var $$
|
|
6366
|
+
var $$m = _export;
|
|
6206
6367
|
var difference = setDifference;
|
|
6207
6368
|
var fails$e = fails$F;
|
|
6208
6369
|
var setMethodAcceptSetLike$6 = setMethodAcceptSetLike$7;
|
|
@@ -6235,7 +6396,7 @@ var FORCED$6 = SET_LIKE_INCORRECT_BEHAVIOR || fails$e(function () {
|
|
|
6235
6396
|
|
|
6236
6397
|
// `Set.prototype.difference` method
|
|
6237
6398
|
// https://tc39.es/ecma262/#sec-set.prototype.difference
|
|
6238
|
-
$$
|
|
6399
|
+
$$m({ target: 'Set', proto: true, real: true, forced: FORCED$6 }, {
|
|
6239
6400
|
difference: difference
|
|
6240
6401
|
});
|
|
6241
6402
|
|
|
@@ -6270,7 +6431,7 @@ var setIntersection = function intersection(other) {
|
|
|
6270
6431
|
return result;
|
|
6271
6432
|
};
|
|
6272
6433
|
|
|
6273
|
-
var $$
|
|
6434
|
+
var $$l = _export;
|
|
6274
6435
|
var fails$d = fails$F;
|
|
6275
6436
|
var intersection = setIntersection;
|
|
6276
6437
|
var setMethodAcceptSetLike$5 = setMethodAcceptSetLike$7;
|
|
@@ -6284,7 +6445,7 @@ var INCORRECT$3 = !setMethodAcceptSetLike$5('intersection', function (result) {
|
|
|
6284
6445
|
|
|
6285
6446
|
// `Set.prototype.intersection` method
|
|
6286
6447
|
// https://tc39.es/ecma262/#sec-set.prototype.intersection
|
|
6287
|
-
$$
|
|
6448
|
+
$$l({ target: 'Set', proto: true, real: true, forced: INCORRECT$3 }, {
|
|
6288
6449
|
intersection: intersection
|
|
6289
6450
|
});
|
|
6290
6451
|
|
|
@@ -6294,7 +6455,7 @@ var size$2 = setSize;
|
|
|
6294
6455
|
var getSetRecord$4 = getSetRecord$7;
|
|
6295
6456
|
var iterateSet = setIterate;
|
|
6296
6457
|
var iterateSimple$3 = iterateSimple$7;
|
|
6297
|
-
var iteratorClose$
|
|
6458
|
+
var iteratorClose$2 = iteratorClose$c;
|
|
6298
6459
|
|
|
6299
6460
|
// `Set.prototype.isDisjointFrom` method
|
|
6300
6461
|
// https://tc39.es/ecma262/#sec-set.prototype.isdisjointfrom
|
|
@@ -6306,11 +6467,11 @@ var setIsDisjointFrom = function isDisjointFrom(other) {
|
|
|
6306
6467
|
}, true) !== false;
|
|
6307
6468
|
var iterator = otherRec.getIterator();
|
|
6308
6469
|
return iterateSimple$3(iterator, function (e) {
|
|
6309
|
-
if (has$4(O, e)) return iteratorClose$
|
|
6470
|
+
if (has$4(O, e)) return iteratorClose$2(iterator.iterator, 'normal', false);
|
|
6310
6471
|
}) !== false;
|
|
6311
6472
|
};
|
|
6312
6473
|
|
|
6313
|
-
var $$
|
|
6474
|
+
var $$k = _export;
|
|
6314
6475
|
var isDisjointFrom = setIsDisjointFrom;
|
|
6315
6476
|
var setMethodAcceptSetLike$4 = setMethodAcceptSetLike$7;
|
|
6316
6477
|
|
|
@@ -6320,13 +6481,13 @@ var INCORRECT$2 = !setMethodAcceptSetLike$4('isDisjointFrom', function (result)
|
|
|
6320
6481
|
|
|
6321
6482
|
// `Set.prototype.isDisjointFrom` method
|
|
6322
6483
|
// https://tc39.es/ecma262/#sec-set.prototype.isdisjointfrom
|
|
6323
|
-
$$
|
|
6484
|
+
$$k({ target: 'Set', proto: true, real: true, forced: INCORRECT$2 }, {
|
|
6324
6485
|
isDisjointFrom: isDisjointFrom
|
|
6325
6486
|
});
|
|
6326
6487
|
|
|
6327
6488
|
var aSet$3 = aSet$7;
|
|
6328
6489
|
var size$1 = setSize;
|
|
6329
|
-
var iterate
|
|
6490
|
+
var iterate = setIterate;
|
|
6330
6491
|
var getSetRecord$3 = getSetRecord$7;
|
|
6331
6492
|
|
|
6332
6493
|
// `Set.prototype.isSubsetOf` method
|
|
@@ -6335,12 +6496,12 @@ var setIsSubsetOf = function isSubsetOf(other) {
|
|
|
6335
6496
|
var O = aSet$3(this);
|
|
6336
6497
|
var otherRec = getSetRecord$3(other);
|
|
6337
6498
|
if (size$1(O) > otherRec.size) return false;
|
|
6338
|
-
return iterate
|
|
6499
|
+
return iterate(O, function (e) {
|
|
6339
6500
|
if (!otherRec.includes(e)) return false;
|
|
6340
6501
|
}, true) !== false;
|
|
6341
6502
|
};
|
|
6342
6503
|
|
|
6343
|
-
var $$
|
|
6504
|
+
var $$j = _export;
|
|
6344
6505
|
var isSubsetOf = setIsSubsetOf;
|
|
6345
6506
|
var setMethodAcceptSetLike$3 = setMethodAcceptSetLike$7;
|
|
6346
6507
|
|
|
@@ -6350,7 +6511,7 @@ var INCORRECT$1 = !setMethodAcceptSetLike$3('isSubsetOf', function (result) {
|
|
|
6350
6511
|
|
|
6351
6512
|
// `Set.prototype.isSubsetOf` method
|
|
6352
6513
|
// https://tc39.es/ecma262/#sec-set.prototype.issubsetof
|
|
6353
|
-
$$
|
|
6514
|
+
$$j({ target: 'Set', proto: true, real: true, forced: INCORRECT$1 }, {
|
|
6354
6515
|
isSubsetOf: isSubsetOf
|
|
6355
6516
|
});
|
|
6356
6517
|
|
|
@@ -6359,7 +6520,7 @@ var has$3 = setHelpers.has;
|
|
|
6359
6520
|
var size = setSize;
|
|
6360
6521
|
var getSetRecord$2 = getSetRecord$7;
|
|
6361
6522
|
var iterateSimple$2 = iterateSimple$7;
|
|
6362
|
-
var iteratorClose$
|
|
6523
|
+
var iteratorClose$1 = iteratorClose$c;
|
|
6363
6524
|
|
|
6364
6525
|
// `Set.prototype.isSupersetOf` method
|
|
6365
6526
|
// https://tc39.es/ecma262/#sec-set.prototype.issupersetof
|
|
@@ -6369,11 +6530,11 @@ var setIsSupersetOf = function isSupersetOf(other) {
|
|
|
6369
6530
|
if (size(O) < otherRec.size) return false;
|
|
6370
6531
|
var iterator = otherRec.getIterator();
|
|
6371
6532
|
return iterateSimple$2(iterator, function (e) {
|
|
6372
|
-
if (!has$3(O, e)) return iteratorClose$
|
|
6533
|
+
if (!has$3(O, e)) return iteratorClose$1(iterator.iterator, 'normal', false);
|
|
6373
6534
|
}) !== false;
|
|
6374
6535
|
};
|
|
6375
6536
|
|
|
6376
|
-
var $$
|
|
6537
|
+
var $$i = _export;
|
|
6377
6538
|
var isSupersetOf = setIsSupersetOf;
|
|
6378
6539
|
var setMethodAcceptSetLike$2 = setMethodAcceptSetLike$7;
|
|
6379
6540
|
|
|
@@ -6383,7 +6544,7 @@ var INCORRECT = !setMethodAcceptSetLike$2('isSupersetOf', function (result) {
|
|
|
6383
6544
|
|
|
6384
6545
|
// `Set.prototype.isSupersetOf` method
|
|
6385
6546
|
// https://tc39.es/ecma262/#sec-set.prototype.issupersetof
|
|
6386
|
-
$$
|
|
6547
|
+
$$i({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
|
|
6387
6548
|
isSupersetOf: isSupersetOf
|
|
6388
6549
|
});
|
|
6389
6550
|
|
|
@@ -6440,7 +6601,7 @@ var setMethodGetKeysBeforeCloningDetection = function (METHOD_NAME) {
|
|
|
6440
6601
|
}
|
|
6441
6602
|
};
|
|
6442
6603
|
|
|
6443
|
-
var $$
|
|
6604
|
+
var $$h = _export;
|
|
6444
6605
|
var symmetricDifference = setSymmetricDifference;
|
|
6445
6606
|
var setMethodGetKeysBeforeCloning$1 = setMethodGetKeysBeforeCloningDetection;
|
|
6446
6607
|
var setMethodAcceptSetLike$1 = setMethodAcceptSetLike$7;
|
|
@@ -6449,7 +6610,7 @@ var FORCED$5 = !setMethodAcceptSetLike$1('symmetricDifference') || !setMethodGet
|
|
|
6449
6610
|
|
|
6450
6611
|
// `Set.prototype.symmetricDifference` method
|
|
6451
6612
|
// https://tc39.es/ecma262/#sec-set.prototype.symmetricdifference
|
|
6452
|
-
$$
|
|
6613
|
+
$$h({ target: 'Set', proto: true, real: true, forced: FORCED$5 }, {
|
|
6453
6614
|
symmetricDifference: symmetricDifference
|
|
6454
6615
|
});
|
|
6455
6616
|
|
|
@@ -6471,7 +6632,7 @@ var setUnion = function union(other) {
|
|
|
6471
6632
|
return result;
|
|
6472
6633
|
};
|
|
6473
6634
|
|
|
6474
|
-
var $$
|
|
6635
|
+
var $$g = _export;
|
|
6475
6636
|
var union = setUnion;
|
|
6476
6637
|
var setMethodGetKeysBeforeCloning = setMethodGetKeysBeforeCloningDetection;
|
|
6477
6638
|
var setMethodAcceptSetLike = setMethodAcceptSetLike$7;
|
|
@@ -6480,24 +6641,24 @@ var FORCED$4 = !setMethodAcceptSetLike('union') || !setMethodGetKeysBeforeClonin
|
|
|
6480
6641
|
|
|
6481
6642
|
// `Set.prototype.union` method
|
|
6482
6643
|
// https://tc39.es/ecma262/#sec-set.prototype.union
|
|
6483
|
-
$$
|
|
6644
|
+
$$g({ target: 'Set', proto: true, real: true, forced: FORCED$4 }, {
|
|
6484
6645
|
union: union
|
|
6485
6646
|
});
|
|
6486
6647
|
|
|
6487
6648
|
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
6488
6649
|
|
|
6489
|
-
var call$
|
|
6650
|
+
var call$a = functionCall;
|
|
6490
6651
|
var defineBuiltIn$3 = defineBuiltIn$a;
|
|
6491
6652
|
var regexpExec$1 = regexpExec$2;
|
|
6492
6653
|
var fails$c = fails$F;
|
|
6493
|
-
var wellKnownSymbol$
|
|
6654
|
+
var wellKnownSymbol$3 = wellKnownSymbol$n;
|
|
6494
6655
|
var createNonEnumerableProperty$3 = createNonEnumerableProperty$d;
|
|
6495
6656
|
|
|
6496
|
-
var SPECIES
|
|
6657
|
+
var SPECIES = wellKnownSymbol$3('species');
|
|
6497
6658
|
var RegExpPrototype$4 = RegExp.prototype;
|
|
6498
6659
|
|
|
6499
6660
|
var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
6500
|
-
var SYMBOL = wellKnownSymbol$
|
|
6661
|
+
var SYMBOL = wellKnownSymbol$3(KEY);
|
|
6501
6662
|
|
|
6502
6663
|
var DELEGATES_TO_SYMBOL = !fails$c(function () {
|
|
6503
6664
|
// String methods call symbol-named RegExp methods
|
|
@@ -6520,7 +6681,7 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
6520
6681
|
// a new one. We need to return the patched regex when creating the new one.
|
|
6521
6682
|
var constructor = {};
|
|
6522
6683
|
// eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation
|
|
6523
|
-
constructor[SPECIES
|
|
6684
|
+
constructor[SPECIES] = function () { return re; };
|
|
6524
6685
|
re = { constructor: constructor, flags: '' };
|
|
6525
6686
|
// eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation
|
|
6526
6687
|
re[SYMBOL] = /./[SYMBOL];
|
|
@@ -6548,9 +6709,9 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
6548
6709
|
// The native String method already delegates to @@method (this
|
|
6549
6710
|
// polyfilled function), leasing to infinite recursion.
|
|
6550
6711
|
// We avoid it by directly calling the native @@method method.
|
|
6551
|
-
return { done: true, value: call$
|
|
6712
|
+
return { done: true, value: call$a(nativeRegExpMethod, regexp, str, arg2) };
|
|
6552
6713
|
}
|
|
6553
|
-
return { done: true, value: call$
|
|
6714
|
+
return { done: true, value: call$a(nativeMethod, str, regexp, arg2) };
|
|
6554
6715
|
}
|
|
6555
6716
|
return { done: false };
|
|
6556
6717
|
});
|
|
@@ -6563,7 +6724,7 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
6563
6724
|
};
|
|
6564
6725
|
|
|
6565
6726
|
var uncurryThis$g = functionUncurryThis;
|
|
6566
|
-
var toIntegerOrInfinity$7 = toIntegerOrInfinity$
|
|
6727
|
+
var toIntegerOrInfinity$7 = toIntegerOrInfinity$e;
|
|
6567
6728
|
var toString$9 = toString$h;
|
|
6568
6729
|
var requireObjectCoercible$6 = requireObjectCoercible$c;
|
|
6569
6730
|
|
|
@@ -6605,7 +6766,7 @@ var advanceStringIndex$1 = function (S, index, unicode) {
|
|
|
6605
6766
|
};
|
|
6606
6767
|
|
|
6607
6768
|
var uncurryThis$f = functionUncurryThis;
|
|
6608
|
-
var toObject$6 = toObject$
|
|
6769
|
+
var toObject$6 = toObject$c;
|
|
6609
6770
|
|
|
6610
6771
|
var floor$4 = Math.floor;
|
|
6611
6772
|
var charAt$3 = uncurryThis$f(''.charAt);
|
|
@@ -6650,7 +6811,7 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
|
|
|
6650
6811
|
});
|
|
6651
6812
|
};
|
|
6652
6813
|
|
|
6653
|
-
var call$
|
|
6814
|
+
var call$9 = functionCall;
|
|
6654
6815
|
var hasOwn$4 = hasOwnProperty_1;
|
|
6655
6816
|
var isPrototypeOf$3 = objectIsPrototypeOf;
|
|
6656
6817
|
var regExpFlagsDetection = regexpFlagsDetection;
|
|
@@ -6662,40 +6823,40 @@ var regexpGetFlags = regExpFlagsDetection.correct ? function (it) {
|
|
|
6662
6823
|
return it.flags;
|
|
6663
6824
|
} : function (it) {
|
|
6664
6825
|
return (!regExpFlagsDetection.correct && isPrototypeOf$3(RegExpPrototype$3, it) && !hasOwn$4(it, 'flags'))
|
|
6665
|
-
? call$
|
|
6826
|
+
? call$9(regExpFlagsGetterImplementation, it)
|
|
6666
6827
|
: it.flags;
|
|
6667
6828
|
};
|
|
6668
6829
|
|
|
6669
|
-
var call$
|
|
6670
|
-
var anObject$
|
|
6830
|
+
var call$8 = functionCall;
|
|
6831
|
+
var anObject$5 = anObject$p;
|
|
6671
6832
|
var isCallable$3 = isCallable$s;
|
|
6672
6833
|
var classof$6 = classofRaw$2;
|
|
6673
6834
|
var regexpExec = regexpExec$2;
|
|
6674
6835
|
|
|
6675
|
-
var $TypeError$
|
|
6836
|
+
var $TypeError$7 = TypeError;
|
|
6676
6837
|
|
|
6677
6838
|
// `RegExpExec` abstract operation
|
|
6678
6839
|
// https://tc39.es/ecma262/#sec-regexpexec
|
|
6679
6840
|
var regexpExecAbstract = function (R, S) {
|
|
6680
6841
|
var exec = R.exec;
|
|
6681
6842
|
if (isCallable$3(exec)) {
|
|
6682
|
-
var result = call$
|
|
6683
|
-
if (result !== null) anObject$
|
|
6843
|
+
var result = call$8(exec, R, S);
|
|
6844
|
+
if (result !== null) anObject$5(result);
|
|
6684
6845
|
return result;
|
|
6685
6846
|
}
|
|
6686
|
-
if (classof$6(R) === 'RegExp') return call$
|
|
6687
|
-
throw new $TypeError$
|
|
6847
|
+
if (classof$6(R) === 'RegExp') return call$8(regexpExec, R, S);
|
|
6848
|
+
throw new $TypeError$7('RegExp#exec called on incompatible receiver');
|
|
6688
6849
|
};
|
|
6689
6850
|
|
|
6690
6851
|
var apply$1 = functionApply;
|
|
6691
|
-
var call$
|
|
6852
|
+
var call$7 = functionCall;
|
|
6692
6853
|
var uncurryThis$e = functionUncurryThis;
|
|
6693
6854
|
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
6694
6855
|
var fails$b = fails$F;
|
|
6695
|
-
var anObject$
|
|
6856
|
+
var anObject$4 = anObject$p;
|
|
6696
6857
|
var isCallable$2 = isCallable$s;
|
|
6697
|
-
var isObject$
|
|
6698
|
-
var toIntegerOrInfinity$6 = toIntegerOrInfinity$
|
|
6858
|
+
var isObject$4 = isObject$l;
|
|
6859
|
+
var toIntegerOrInfinity$6 = toIntegerOrInfinity$e;
|
|
6699
6860
|
var toLength$2 = toLength$7;
|
|
6700
6861
|
var toString$8 = toString$h;
|
|
6701
6862
|
var requireObjectCoercible$5 = requireObjectCoercible$c;
|
|
@@ -6704,9 +6865,9 @@ var getMethod = getMethod$5;
|
|
|
6704
6865
|
var getSubstitution = getSubstitution$1;
|
|
6705
6866
|
var getRegExpFlags$2 = regexpGetFlags;
|
|
6706
6867
|
var regExpExec = regexpExecAbstract;
|
|
6707
|
-
var wellKnownSymbol$
|
|
6868
|
+
var wellKnownSymbol$2 = wellKnownSymbol$n;
|
|
6708
6869
|
|
|
6709
|
-
var REPLACE = wellKnownSymbol$
|
|
6870
|
+
var REPLACE = wellKnownSymbol$2('replace');
|
|
6710
6871
|
var max = Math.max;
|
|
6711
6872
|
var min$2 = Math.min;
|
|
6712
6873
|
var concat = uncurryThis$e([].concat);
|
|
@@ -6753,15 +6914,15 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
6753
6914
|
// https://tc39.es/ecma262/#sec-string.prototype.replace
|
|
6754
6915
|
function replace(searchValue, replaceValue) {
|
|
6755
6916
|
var O = requireObjectCoercible$5(this);
|
|
6756
|
-
var replacer = isObject$
|
|
6917
|
+
var replacer = isObject$4(searchValue) ? getMethod(searchValue, REPLACE) : undefined;
|
|
6757
6918
|
return replacer
|
|
6758
|
-
? call$
|
|
6759
|
-
: call$
|
|
6919
|
+
? call$7(replacer, searchValue, O, replaceValue)
|
|
6920
|
+
: call$7(nativeReplace, toString$8(O), searchValue, replaceValue);
|
|
6760
6921
|
},
|
|
6761
6922
|
// `RegExp.prototype[@@replace]` method
|
|
6762
6923
|
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
|
6763
6924
|
function (string, replaceValue) {
|
|
6764
|
-
var rx = anObject$
|
|
6925
|
+
var rx = anObject$4(this);
|
|
6765
6926
|
var S = toString$8(string);
|
|
6766
6927
|
|
|
6767
6928
|
var functionalReplace = isCallable$2(replaceValue);
|
|
@@ -6838,7 +6999,7 @@ var NATIVE_ARRAY_BUFFER = arrayBufferBasicDetection;
|
|
|
6838
6999
|
var DESCRIPTORS$3 = descriptors;
|
|
6839
7000
|
var globalThis$d = globalThis_1;
|
|
6840
7001
|
var isCallable$1 = isCallable$s;
|
|
6841
|
-
var isObject$
|
|
7002
|
+
var isObject$3 = isObject$l;
|
|
6842
7003
|
var hasOwn$3 = hasOwnProperty_1;
|
|
6843
7004
|
var classof$5 = classof$f;
|
|
6844
7005
|
var tryToString$1 = tryToString$6;
|
|
@@ -6848,7 +7009,7 @@ var defineBuiltInAccessor$2 = defineBuiltInAccessor$9;
|
|
|
6848
7009
|
var isPrototypeOf$2 = objectIsPrototypeOf;
|
|
6849
7010
|
var getPrototypeOf = objectGetPrototypeOf;
|
|
6850
7011
|
var setPrototypeOf$1 = objectSetPrototypeOf;
|
|
6851
|
-
var wellKnownSymbol$
|
|
7012
|
+
var wellKnownSymbol$1 = wellKnownSymbol$n;
|
|
6852
7013
|
var uid = uid$4;
|
|
6853
7014
|
var InternalStateModule$1 = internalState;
|
|
6854
7015
|
|
|
@@ -6863,7 +7024,7 @@ var TypedArrayPrototype$1 = Int8ArrayPrototype$1 && getPrototypeOf(Int8ArrayProt
|
|
|
6863
7024
|
var ObjectPrototype = Object.prototype;
|
|
6864
7025
|
var TypeError$2 = globalThis$d.TypeError;
|
|
6865
7026
|
|
|
6866
|
-
var TO_STRING_TAG = wellKnownSymbol$
|
|
7027
|
+
var TO_STRING_TAG = wellKnownSymbol$1('toStringTag');
|
|
6867
7028
|
var TYPED_ARRAY_TAG$1 = uid('TYPED_ARRAY_TAG');
|
|
6868
7029
|
var TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';
|
|
6869
7030
|
// Fixing native typed arrays in Opera Presto crashes the browser, see #595
|
|
@@ -6890,13 +7051,13 @@ var BigIntArrayConstructorsList = {
|
|
|
6890
7051
|
|
|
6891
7052
|
var getTypedArrayConstructor$3 = function (it) {
|
|
6892
7053
|
var proto = getPrototypeOf(it);
|
|
6893
|
-
if (!isObject$
|
|
7054
|
+
if (!isObject$3(proto)) return;
|
|
6894
7055
|
var state = getInternalState$2(proto);
|
|
6895
7056
|
return (state && hasOwn$3(state, TYPED_ARRAY_CONSTRUCTOR)) ? state[TYPED_ARRAY_CONSTRUCTOR] : getTypedArrayConstructor$3(proto);
|
|
6896
7057
|
};
|
|
6897
7058
|
|
|
6898
7059
|
var isTypedArray$1 = function (it) {
|
|
6899
|
-
if (!isObject$
|
|
7060
|
+
if (!isObject$3(it)) return false;
|
|
6900
7061
|
var klass = classof$5(it);
|
|
6901
7062
|
return hasOwn$3(TypedArrayConstructorsList, klass)
|
|
6902
7063
|
|| hasOwn$3(BigIntArrayConstructorsList, klass);
|
|
@@ -6972,7 +7133,7 @@ if (DESCRIPTORS$3 && !hasOwn$3(TypedArrayPrototype$1, TO_STRING_TAG)) {
|
|
|
6972
7133
|
defineBuiltInAccessor$2(TypedArrayPrototype$1, TO_STRING_TAG, {
|
|
6973
7134
|
configurable: true,
|
|
6974
7135
|
get: function () {
|
|
6975
|
-
return isObject$
|
|
7136
|
+
return isObject$3(this) ? this[TYPED_ARRAY_TAG$1] : undefined;
|
|
6976
7137
|
}
|
|
6977
7138
|
});
|
|
6978
7139
|
for (NAME in TypedArrayConstructorsList) if (globalThis$d[NAME]) {
|
|
@@ -7015,7 +7176,7 @@ var typedArrayConstructorsRequireWrappers = !NATIVE_ARRAY_BUFFER_VIEWS$1 || !fai
|
|
|
7015
7176
|
return new Int8Array$3(new ArrayBuffer$2(2), 1, undefined).length !== 1;
|
|
7016
7177
|
});
|
|
7017
7178
|
|
|
7018
|
-
var isObject$
|
|
7179
|
+
var isObject$2 = isObject$l;
|
|
7019
7180
|
|
|
7020
7181
|
var floor$3 = Math.floor;
|
|
7021
7182
|
|
|
@@ -7023,10 +7184,10 @@ var floor$3 = Math.floor;
|
|
|
7023
7184
|
// https://tc39.es/ecma262/#sec-isintegralnumber
|
|
7024
7185
|
// eslint-disable-next-line es/no-number-isinteger -- safe
|
|
7025
7186
|
var isIntegralNumber$1 = Number.isInteger || function isInteger(it) {
|
|
7026
|
-
return !isObject$
|
|
7187
|
+
return !isObject$2(it) && isFinite(it) && floor$3(it) === it;
|
|
7027
7188
|
};
|
|
7028
7189
|
|
|
7029
|
-
var toIntegerOrInfinity$5 = toIntegerOrInfinity$
|
|
7190
|
+
var toIntegerOrInfinity$5 = toIntegerOrInfinity$e;
|
|
7030
7191
|
|
|
7031
7192
|
var $RangeError$3 = RangeError;
|
|
7032
7193
|
|
|
@@ -7070,23 +7231,23 @@ var isBigIntArray$2 = function (it) {
|
|
|
7070
7231
|
|
|
7071
7232
|
var toPrimitive = toPrimitive$2;
|
|
7072
7233
|
|
|
7073
|
-
var $TypeError$
|
|
7234
|
+
var $TypeError$6 = TypeError;
|
|
7074
7235
|
|
|
7075
7236
|
// `ToBigInt` abstract operation
|
|
7076
7237
|
// https://tc39.es/ecma262/#sec-tobigint
|
|
7077
7238
|
var toBigInt$3 = function (argument) {
|
|
7078
7239
|
var prim = toPrimitive(argument, 'number');
|
|
7079
|
-
if (typeof prim == 'number') throw new $TypeError$
|
|
7240
|
+
if (typeof prim == 'number') throw new $TypeError$6("Can't convert number to bigint");
|
|
7080
7241
|
// eslint-disable-next-line es/no-bigint -- safe
|
|
7081
7242
|
return BigInt(prim);
|
|
7082
7243
|
};
|
|
7083
7244
|
|
|
7084
|
-
var bind$
|
|
7085
|
-
var call$
|
|
7086
|
-
var aCallable$
|
|
7245
|
+
var bind$2 = functionBindContext;
|
|
7246
|
+
var call$6 = functionCall;
|
|
7247
|
+
var aCallable$6 = aCallable$l;
|
|
7087
7248
|
var aConstructor = aConstructor$2;
|
|
7088
|
-
var toObject$5 = toObject$
|
|
7089
|
-
var lengthOfArrayLike$
|
|
7249
|
+
var toObject$5 = toObject$c;
|
|
7250
|
+
var lengthOfArrayLike$a = lengthOfArrayLike$h;
|
|
7090
7251
|
var getIterator = getIterator$2;
|
|
7091
7252
|
var getIteratorMethod$1 = getIteratorMethod$4;
|
|
7092
7253
|
var isArrayIteratorMethod = isArrayIteratorMethod$2;
|
|
@@ -7099,7 +7260,7 @@ var typedArrayFrom$1 = function from(source /* , mapfn, thisArg */) {
|
|
|
7099
7260
|
var argumentsLength = arguments.length;
|
|
7100
7261
|
var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
|
|
7101
7262
|
var mapping = mapfn !== undefined;
|
|
7102
|
-
if (mapping) aCallable$
|
|
7263
|
+
if (mapping) aCallable$6(mapfn);
|
|
7103
7264
|
var O = toObject$5(source);
|
|
7104
7265
|
var iteratorMethod = getIteratorMethod$1(O);
|
|
7105
7266
|
var i, length, result, thisIsBigIntArray, value, step, iterator, next;
|
|
@@ -7107,14 +7268,14 @@ var typedArrayFrom$1 = function from(source /* , mapfn, thisArg */) {
|
|
|
7107
7268
|
iterator = getIterator(O, iteratorMethod);
|
|
7108
7269
|
next = iterator.next;
|
|
7109
7270
|
O = [];
|
|
7110
|
-
while (!(step = call$
|
|
7271
|
+
while (!(step = call$6(next, iterator)).done) {
|
|
7111
7272
|
O.push(step.value);
|
|
7112
7273
|
}
|
|
7113
7274
|
}
|
|
7114
7275
|
if (mapping && argumentsLength > 2) {
|
|
7115
|
-
mapfn = bind$
|
|
7276
|
+
mapfn = bind$2(mapfn, arguments[2]);
|
|
7116
7277
|
}
|
|
7117
|
-
length = lengthOfArrayLike$
|
|
7278
|
+
length = lengthOfArrayLike$a(O);
|
|
7118
7279
|
result = new (aTypedArrayConstructor(C))(length);
|
|
7119
7280
|
thisIsBigIntArray = isBigIntArray$1(result);
|
|
7120
7281
|
for (i = 0; length > i; i++) {
|
|
@@ -7125,43 +7286,12 @@ var typedArrayFrom$1 = function from(source /* , mapfn, thisArg */) {
|
|
|
7125
7286
|
return result;
|
|
7126
7287
|
};
|
|
7127
7288
|
|
|
7128
|
-
var
|
|
7129
|
-
var isConstructor = isConstructor$2;
|
|
7130
|
-
var isObject$2 = isObject$l;
|
|
7131
|
-
var wellKnownSymbol$1 = wellKnownSymbol$n;
|
|
7132
|
-
|
|
7133
|
-
var SPECIES = wellKnownSymbol$1('species');
|
|
7134
|
-
var $Array$1 = Array;
|
|
7135
|
-
|
|
7136
|
-
// a part of `ArraySpeciesCreate` abstract operation
|
|
7137
|
-
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
7138
|
-
var arraySpeciesConstructor$1 = function (originalArray) {
|
|
7139
|
-
var C;
|
|
7140
|
-
if (isArray$1(originalArray)) {
|
|
7141
|
-
C = originalArray.constructor;
|
|
7142
|
-
// cross-realm fallback
|
|
7143
|
-
if (isConstructor(C) && (C === $Array$1 || isArray$1(C.prototype))) C = undefined;
|
|
7144
|
-
else if (isObject$2(C)) {
|
|
7145
|
-
C = C[SPECIES];
|
|
7146
|
-
if (C === null) C = undefined;
|
|
7147
|
-
}
|
|
7148
|
-
} return C === undefined ? $Array$1 : C;
|
|
7149
|
-
};
|
|
7150
|
-
|
|
7151
|
-
var arraySpeciesConstructor = arraySpeciesConstructor$1;
|
|
7152
|
-
|
|
7153
|
-
// `ArraySpeciesCreate` abstract operation
|
|
7154
|
-
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
7155
|
-
var arraySpeciesCreate$2 = function (originalArray, length) {
|
|
7156
|
-
return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
|
|
7157
|
-
};
|
|
7158
|
-
|
|
7159
|
-
var bind$2 = functionBindContext;
|
|
7289
|
+
var bind$1 = functionBindContext;
|
|
7160
7290
|
var IndexedObject$1 = indexedObject;
|
|
7161
|
-
var toObject$4 = toObject$
|
|
7162
|
-
var lengthOfArrayLike$
|
|
7163
|
-
var arraySpeciesCreate$1 = arraySpeciesCreate$
|
|
7164
|
-
var createProperty
|
|
7291
|
+
var toObject$4 = toObject$c;
|
|
7292
|
+
var lengthOfArrayLike$9 = lengthOfArrayLike$h;
|
|
7293
|
+
var arraySpeciesCreate$1 = arraySpeciesCreate$3;
|
|
7294
|
+
var createProperty = createProperty$5;
|
|
7165
7295
|
|
|
7166
7296
|
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
|
|
7167
7297
|
var createMethod$3 = function (TYPE) {
|
|
@@ -7175,8 +7305,8 @@ var createMethod$3 = function (TYPE) {
|
|
|
7175
7305
|
return function ($this, callbackfn, that) {
|
|
7176
7306
|
var O = toObject$4($this);
|
|
7177
7307
|
var self = IndexedObject$1(O);
|
|
7178
|
-
var length = lengthOfArrayLike$
|
|
7179
|
-
var boundFunction = bind$
|
|
7308
|
+
var length = lengthOfArrayLike$9(self);
|
|
7309
|
+
var boundFunction = bind$1(callbackfn, that);
|
|
7180
7310
|
var index = 0;
|
|
7181
7311
|
var resIndex = 0;
|
|
7182
7312
|
var target = IS_MAP ? arraySpeciesCreate$1($this, length) : IS_FILTER || IS_FILTER_REJECT ? arraySpeciesCreate$1($this, 0) : undefined;
|
|
@@ -7185,15 +7315,15 @@ var createMethod$3 = function (TYPE) {
|
|
|
7185
7315
|
value = self[index];
|
|
7186
7316
|
result = boundFunction(value, index, O);
|
|
7187
7317
|
if (TYPE) {
|
|
7188
|
-
if (IS_MAP) createProperty
|
|
7318
|
+
if (IS_MAP) createProperty(target, index, result); // map
|
|
7189
7319
|
else if (result) switch (TYPE) {
|
|
7190
7320
|
case 3: return true; // some
|
|
7191
7321
|
case 5: return value; // find
|
|
7192
7322
|
case 6: return index; // findIndex
|
|
7193
|
-
case 2: createProperty
|
|
7323
|
+
case 2: createProperty(target, resIndex++, value); // filter
|
|
7194
7324
|
} else switch (TYPE) {
|
|
7195
7325
|
case 4: return false; // every
|
|
7196
|
-
case 7: createProperty
|
|
7326
|
+
case 7: createProperty(target, resIndex++, value); // filterReject
|
|
7197
7327
|
}
|
|
7198
7328
|
}
|
|
7199
7329
|
}
|
|
@@ -7206,19 +7336,19 @@ var arrayIteration = {
|
|
|
7206
7336
|
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
|
7207
7337
|
forEach: createMethod$3(0)};
|
|
7208
7338
|
|
|
7209
|
-
var lengthOfArrayLike$
|
|
7339
|
+
var lengthOfArrayLike$8 = lengthOfArrayLike$h;
|
|
7210
7340
|
|
|
7211
7341
|
var arrayFromConstructorAndList$2 = function (Constructor, list, $length) {
|
|
7212
7342
|
var index = 0;
|
|
7213
|
-
var length = arguments.length > 2 ? $length : lengthOfArrayLike$
|
|
7343
|
+
var length = arguments.length > 2 ? $length : lengthOfArrayLike$8(list);
|
|
7214
7344
|
var result = new Constructor(length);
|
|
7215
7345
|
while (length > index) result[index] = list[index++];
|
|
7216
7346
|
return result;
|
|
7217
7347
|
};
|
|
7218
7348
|
|
|
7219
|
-
var $$
|
|
7349
|
+
var $$f = _export;
|
|
7220
7350
|
var globalThis$b = globalThis_1;
|
|
7221
|
-
var call$
|
|
7351
|
+
var call$5 = functionCall;
|
|
7222
7352
|
var DESCRIPTORS$2 = descriptors;
|
|
7223
7353
|
var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = typedArrayConstructorsRequireWrappers;
|
|
7224
7354
|
var ArrayBufferViewCore$a = arrayBufferViewCore;
|
|
@@ -7322,7 +7452,7 @@ if (DESCRIPTORS$2) {
|
|
|
7322
7452
|
addGetter(TypedArrayPrototype, 'length');
|
|
7323
7453
|
}
|
|
7324
7454
|
|
|
7325
|
-
$$
|
|
7455
|
+
$$f({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {
|
|
7326
7456
|
getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,
|
|
7327
7457
|
defineProperty: wrappedDefineProperty
|
|
7328
7458
|
});
|
|
@@ -7385,7 +7515,7 @@ if (DESCRIPTORS$2) {
|
|
|
7385
7515
|
} else if (isTypedArray(data)) {
|
|
7386
7516
|
return arrayFromConstructorAndList$1(TypedArrayConstructor, data);
|
|
7387
7517
|
} else {
|
|
7388
|
-
return call$
|
|
7518
|
+
return call$5(typedArrayFrom, TypedArrayConstructor, data);
|
|
7389
7519
|
}
|
|
7390
7520
|
setInternalState(that, {
|
|
7391
7521
|
buffer: buffer,
|
|
@@ -7410,7 +7540,7 @@ if (DESCRIPTORS$2) {
|
|
|
7410
7540
|
? new NativeTypedArrayConstructor(data, toOffset$1(typedArrayOffset, BYTES))
|
|
7411
7541
|
: new NativeTypedArrayConstructor(data);
|
|
7412
7542
|
if (isTypedArray(data)) return arrayFromConstructorAndList$1(TypedArrayConstructor, data);
|
|
7413
|
-
return call$
|
|
7543
|
+
return call$5(typedArrayFrom, TypedArrayConstructor, data);
|
|
7414
7544
|
}(), dummy, TypedArrayConstructor);
|
|
7415
7545
|
});
|
|
7416
7546
|
|
|
@@ -7437,7 +7567,7 @@ if (DESCRIPTORS$2) {
|
|
|
7437
7567
|
|
|
7438
7568
|
exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;
|
|
7439
7569
|
|
|
7440
|
-
$$
|
|
7570
|
+
$$f({ global: true, constructor: true, forced: FORCED, sham: !NATIVE_ARRAY_BUFFER_VIEWS }, exported);
|
|
7441
7571
|
|
|
7442
7572
|
if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {
|
|
7443
7573
|
createNonEnumerableProperty$1(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);
|
|
@@ -7464,8 +7594,8 @@ createTypedArrayConstructor('Uint8', function (init) {
|
|
|
7464
7594
|
});
|
|
7465
7595
|
|
|
7466
7596
|
var ArrayBufferViewCore$9 = arrayBufferViewCore;
|
|
7467
|
-
var lengthOfArrayLike$
|
|
7468
|
-
var toIntegerOrInfinity$4 = toIntegerOrInfinity$
|
|
7597
|
+
var lengthOfArrayLike$7 = lengthOfArrayLike$h;
|
|
7598
|
+
var toIntegerOrInfinity$4 = toIntegerOrInfinity$e;
|
|
7469
7599
|
|
|
7470
7600
|
var aTypedArray$9 = ArrayBufferViewCore$9.aTypedArray;
|
|
7471
7601
|
var exportTypedArrayMethod$9 = ArrayBufferViewCore$9.exportTypedArrayMethod;
|
|
@@ -7474,7 +7604,7 @@ var exportTypedArrayMethod$9 = ArrayBufferViewCore$9.exportTypedArrayMethod;
|
|
|
7474
7604
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.at
|
|
7475
7605
|
exportTypedArrayMethod$9('at', function at(index) {
|
|
7476
7606
|
var O = aTypedArray$9(this);
|
|
7477
|
-
var len = lengthOfArrayLike$
|
|
7607
|
+
var len = lengthOfArrayLike$7(O);
|
|
7478
7608
|
var relativeIndex = toIntegerOrInfinity$4(index);
|
|
7479
7609
|
var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
|
|
7480
7610
|
return (k < 0 || k >= len) ? undefined : O[k];
|
|
@@ -7484,7 +7614,7 @@ var ArrayBufferViewCore$8 = arrayBufferViewCore;
|
|
|
7484
7614
|
var $fill = arrayFill$1;
|
|
7485
7615
|
var toBigInt$1 = toBigInt$3;
|
|
7486
7616
|
var classof$2 = classof$f;
|
|
7487
|
-
var call$
|
|
7617
|
+
var call$4 = functionCall;
|
|
7488
7618
|
var uncurryThis$d = functionUncurryThis;
|
|
7489
7619
|
var fails$9 = fails$F;
|
|
7490
7620
|
|
|
@@ -7506,13 +7636,13 @@ exportTypedArrayMethod$8('fill', function fill(value /* , start, end */) {
|
|
|
7506
7636
|
var length = arguments.length;
|
|
7507
7637
|
aTypedArray$8(this);
|
|
7508
7638
|
var actualValue = slice(classof$2(this), 0, 3) === 'Big' ? toBigInt$1(value) : +value;
|
|
7509
|
-
return call$
|
|
7639
|
+
return call$4($fill, this, actualValue, length > 1 ? arguments[1] : undefined, length > 2 ? arguments[2] : undefined);
|
|
7510
7640
|
}, CONVERSION_BUG);
|
|
7511
7641
|
|
|
7512
|
-
var bind
|
|
7642
|
+
var bind = functionBindContext;
|
|
7513
7643
|
var IndexedObject = indexedObject;
|
|
7514
|
-
var toObject$3 = toObject$
|
|
7515
|
-
var lengthOfArrayLike$
|
|
7644
|
+
var toObject$3 = toObject$c;
|
|
7645
|
+
var lengthOfArrayLike$6 = lengthOfArrayLike$h;
|
|
7516
7646
|
|
|
7517
7647
|
// `Array.prototype.{ findLast, findLastIndex }` methods implementation
|
|
7518
7648
|
var createMethod$2 = function (TYPE) {
|
|
@@ -7520,8 +7650,8 @@ var createMethod$2 = function (TYPE) {
|
|
|
7520
7650
|
return function ($this, callbackfn, that) {
|
|
7521
7651
|
var O = toObject$3($this);
|
|
7522
7652
|
var self = IndexedObject(O);
|
|
7523
|
-
var index = lengthOfArrayLike$
|
|
7524
|
-
var boundFunction = bind
|
|
7653
|
+
var index = lengthOfArrayLike$6(self);
|
|
7654
|
+
var boundFunction = bind(callbackfn, that);
|
|
7525
7655
|
var value, result;
|
|
7526
7656
|
while (index-- > 0) {
|
|
7527
7657
|
value = self[index];
|
|
@@ -7569,11 +7699,11 @@ exportTypedArrayMethod$6('findLastIndex', function findLastIndex(predicate /* ,
|
|
|
7569
7699
|
});
|
|
7570
7700
|
|
|
7571
7701
|
var globalThis$a = globalThis_1;
|
|
7572
|
-
var call$
|
|
7702
|
+
var call$3 = functionCall;
|
|
7573
7703
|
var ArrayBufferViewCore$5 = arrayBufferViewCore;
|
|
7574
|
-
var lengthOfArrayLike$
|
|
7704
|
+
var lengthOfArrayLike$5 = lengthOfArrayLike$h;
|
|
7575
7705
|
var toOffset = toOffset$2;
|
|
7576
|
-
var toIndexedObject = toObject$
|
|
7706
|
+
var toIndexedObject = toObject$c;
|
|
7577
7707
|
var fails$8 = fails$F;
|
|
7578
7708
|
|
|
7579
7709
|
var RangeError$1 = globalThis$a.RangeError;
|
|
@@ -7586,7 +7716,7 @@ var exportTypedArrayMethod$5 = ArrayBufferViewCore$5.exportTypedArrayMethod;
|
|
|
7586
7716
|
var WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS = !fails$8(function () {
|
|
7587
7717
|
// eslint-disable-next-line es/no-typed-arrays -- required for testing
|
|
7588
7718
|
var array = new Uint8ClampedArray(2);
|
|
7589
|
-
call$
|
|
7719
|
+
call$3($set, array, { length: 1, 0: 3 }, 1);
|
|
7590
7720
|
return array[1] !== 3;
|
|
7591
7721
|
});
|
|
7592
7722
|
|
|
@@ -7604,9 +7734,9 @@ exportTypedArrayMethod$5('set', function set(arrayLike /* , offset */) {
|
|
|
7604
7734
|
aTypedArray$5(this);
|
|
7605
7735
|
var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
|
|
7606
7736
|
var src = toIndexedObject(arrayLike);
|
|
7607
|
-
if (WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS) return call$
|
|
7737
|
+
if (WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS) return call$3($set, this, src, offset);
|
|
7608
7738
|
var length = this.length;
|
|
7609
|
-
var len = lengthOfArrayLike$
|
|
7739
|
+
var len = lengthOfArrayLike$5(src);
|
|
7610
7740
|
var index = 0;
|
|
7611
7741
|
if (len + offset > length) throw new RangeError$1('Wrong length');
|
|
7612
7742
|
while (index < len) this[offset + index] = src[index++];
|
|
@@ -7673,7 +7803,7 @@ var environmentWebkitVersion = !!webkit && +webkit[1];
|
|
|
7673
7803
|
var globalThis$9 = globalThis_1;
|
|
7674
7804
|
var uncurryThis$c = functionUncurryThisClause;
|
|
7675
7805
|
var fails$7 = fails$F;
|
|
7676
|
-
var aCallable$
|
|
7806
|
+
var aCallable$5 = aCallable$l;
|
|
7677
7807
|
var internalSort$1 = arraySort;
|
|
7678
7808
|
var ArrayBufferViewCore$4 = arrayBufferViewCore;
|
|
7679
7809
|
var FF$1 = environmentFfVersion;
|
|
@@ -7734,7 +7864,7 @@ var getSortCompare$1 = function (comparefn) {
|
|
|
7734
7864
|
// `%TypedArray%.prototype.sort` method
|
|
7735
7865
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort
|
|
7736
7866
|
exportTypedArrayMethod$4('sort', function sort(comparefn) {
|
|
7737
|
-
if (comparefn !== undefined) aCallable$
|
|
7867
|
+
if (comparefn !== undefined) aCallable$5(comparefn);
|
|
7738
7868
|
if (STABLE_SORT$1) return nativeSort$1(this, comparefn);
|
|
7739
7869
|
|
|
7740
7870
|
return internalSort$1(aTypedArray$4(this), getSortCompare$1(comparefn));
|
|
@@ -7772,7 +7902,7 @@ exportTypedArrayMethod$3('toLocaleString', function toLocaleString() {
|
|
|
7772
7902
|
);
|
|
7773
7903
|
}, FORCED$3);
|
|
7774
7904
|
|
|
7775
|
-
var lengthOfArrayLike$
|
|
7905
|
+
var lengthOfArrayLike$4 = lengthOfArrayLike$h;
|
|
7776
7906
|
var ArrayBufferViewCore$2 = arrayBufferViewCore;
|
|
7777
7907
|
|
|
7778
7908
|
var aTypedArray$2 = ArrayBufferViewCore$2.aTypedArray;
|
|
@@ -7783,7 +7913,7 @@ var getTypedArrayConstructor$2 = ArrayBufferViewCore$2.getTypedArrayConstructor;
|
|
|
7783
7913
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.toreversed
|
|
7784
7914
|
exportTypedArrayMethod$2('toReversed', function toReversed() {
|
|
7785
7915
|
var O = aTypedArray$2(this);
|
|
7786
|
-
var len = lengthOfArrayLike$
|
|
7916
|
+
var len = lengthOfArrayLike$4(O);
|
|
7787
7917
|
var A = new (getTypedArrayConstructor$2(O))(len);
|
|
7788
7918
|
var k = 0;
|
|
7789
7919
|
for (; k < len; k++) A[k] = O[len - k - 1];
|
|
@@ -7792,7 +7922,7 @@ exportTypedArrayMethod$2('toReversed', function toReversed() {
|
|
|
7792
7922
|
|
|
7793
7923
|
var ArrayBufferViewCore$1 = arrayBufferViewCore;
|
|
7794
7924
|
var uncurryThis$b = functionUncurryThis;
|
|
7795
|
-
var aCallable$
|
|
7925
|
+
var aCallable$4 = aCallable$l;
|
|
7796
7926
|
var arrayFromConstructorAndList = arrayFromConstructorAndList$2;
|
|
7797
7927
|
|
|
7798
7928
|
var aTypedArray$1 = ArrayBufferViewCore$1.aTypedArray;
|
|
@@ -7803,7 +7933,7 @@ var sort = uncurryThis$b(ArrayBufferViewCore$1.TypedArrayPrototype.sort);
|
|
|
7803
7933
|
// `%TypedArray%.prototype.toSorted` method
|
|
7804
7934
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tosorted
|
|
7805
7935
|
exportTypedArrayMethod$1('toSorted', function toSorted(compareFn) {
|
|
7806
|
-
if (compareFn !== undefined) aCallable$
|
|
7936
|
+
if (compareFn !== undefined) aCallable$4(compareFn);
|
|
7807
7937
|
var O = aTypedArray$1(this);
|
|
7808
7938
|
var A = arrayFromConstructorAndList(getTypedArrayConstructor$1(O), O);
|
|
7809
7939
|
return sort(A, compareFn);
|
|
@@ -7811,8 +7941,8 @@ exportTypedArrayMethod$1('toSorted', function toSorted(compareFn) {
|
|
|
7811
7941
|
|
|
7812
7942
|
var ArrayBufferViewCore = arrayBufferViewCore;
|
|
7813
7943
|
var isBigIntArray = isBigIntArray$2;
|
|
7814
|
-
var lengthOfArrayLike$
|
|
7815
|
-
var toIntegerOrInfinity$3 = toIntegerOrInfinity$
|
|
7944
|
+
var lengthOfArrayLike$3 = lengthOfArrayLike$h;
|
|
7945
|
+
var toIntegerOrInfinity$3 = toIntegerOrInfinity$e;
|
|
7816
7946
|
var toBigInt = toBigInt$3;
|
|
7817
7947
|
|
|
7818
7948
|
var aTypedArray = ArrayBufferViewCore.aTypedArray;
|
|
@@ -7846,7 +7976,7 @@ var THROW_ON_NEGATIVE_FRACTIONAL_INDEX = PROPER_ORDER && function () {
|
|
|
7846
7976
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.with
|
|
7847
7977
|
exportTypedArrayMethod('with', { 'with': function (index, value) {
|
|
7848
7978
|
var O = aTypedArray(this);
|
|
7849
|
-
var len = lengthOfArrayLike$
|
|
7979
|
+
var len = lengthOfArrayLike$3(O);
|
|
7850
7980
|
var relativeIndex = toIntegerOrInfinity$3(index);
|
|
7851
7981
|
var actualIndex = relativeIndex < 0 ? len + relativeIndex : relativeIndex;
|
|
7852
7982
|
var numericValue = isBigIntArray(O) ? toBigInt(value) : +value;
|
|
@@ -7860,18 +7990,18 @@ exportTypedArrayMethod('with', { 'with': function (index, value) {
|
|
|
7860
7990
|
var isObject = isObject$l;
|
|
7861
7991
|
|
|
7862
7992
|
var $String = String;
|
|
7863
|
-
var $TypeError$
|
|
7993
|
+
var $TypeError$5 = TypeError;
|
|
7864
7994
|
|
|
7865
7995
|
var anObjectOrUndefined$2 = function (argument) {
|
|
7866
7996
|
if (argument === undefined || isObject(argument)) return argument;
|
|
7867
|
-
throw new $TypeError$
|
|
7997
|
+
throw new $TypeError$5($String(argument) + ' is not an object or undefined');
|
|
7868
7998
|
};
|
|
7869
7999
|
|
|
7870
|
-
var $TypeError$
|
|
8000
|
+
var $TypeError$4 = TypeError;
|
|
7871
8001
|
|
|
7872
8002
|
var aString$2 = function (argument) {
|
|
7873
8003
|
if (typeof argument == 'string') return argument;
|
|
7874
|
-
throw new $TypeError$
|
|
8004
|
+
throw new $TypeError$4('Argument is not a string');
|
|
7875
8005
|
};
|
|
7876
8006
|
|
|
7877
8007
|
var commonAlphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
@@ -7893,12 +8023,12 @@ var base64Map$2 = {
|
|
|
7893
8023
|
c2iUrl: inverse(base64UrlAlphabet$2)
|
|
7894
8024
|
};
|
|
7895
8025
|
|
|
7896
|
-
var $TypeError$
|
|
8026
|
+
var $TypeError$3 = TypeError;
|
|
7897
8027
|
|
|
7898
8028
|
var getAlphabetOption$2 = function (options) {
|
|
7899
8029
|
var alphabet = options && options.alphabet;
|
|
7900
8030
|
if (alphabet === undefined || alphabet === 'base64' || alphabet === 'base64url') return alphabet || 'base64';
|
|
7901
|
-
throw new $TypeError$
|
|
8031
|
+
throw new $TypeError$3('Incorrect `alphabet` option');
|
|
7902
8032
|
};
|
|
7903
8033
|
|
|
7904
8034
|
var globalThis$7 = globalThis_1;
|
|
@@ -8060,16 +8190,16 @@ var uint8FromBase64 = function (string, options, into, maxLength) {
|
|
|
8060
8190
|
|
|
8061
8191
|
var classof$1 = classof$f;
|
|
8062
8192
|
|
|
8063
|
-
var $TypeError$
|
|
8193
|
+
var $TypeError$2 = TypeError;
|
|
8064
8194
|
|
|
8065
8195
|
// Perform ? RequireInternalSlot(argument, [[TypedArrayName]])
|
|
8066
8196
|
// If argument.[[TypedArrayName]] is not "Uint8Array", throw a TypeError exception
|
|
8067
8197
|
var anUint8Array$4 = function (argument) {
|
|
8068
8198
|
if (classof$1(argument) === 'Uint8Array') return argument;
|
|
8069
|
-
throw new $TypeError$
|
|
8199
|
+
throw new $TypeError$2('Argument is not an Uint8Array');
|
|
8070
8200
|
};
|
|
8071
8201
|
|
|
8072
|
-
var $$
|
|
8202
|
+
var $$e = _export;
|
|
8073
8203
|
var globalThis$6 = globalThis_1;
|
|
8074
8204
|
var $fromBase64 = uint8FromBase64;
|
|
8075
8205
|
var anUint8Array$3 = anUint8Array$4;
|
|
@@ -8096,7 +8226,7 @@ var INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS$2 = !Uint8Array$4 || !Uint8Array$4.proto
|
|
|
8096
8226
|
|
|
8097
8227
|
// `Uint8Array.prototype.setFromBase64` method
|
|
8098
8228
|
// https://tc39.es/ecma262/#sec-uint8array.prototype.setfrombase64
|
|
8099
|
-
if (Uint8Array$4) $$
|
|
8229
|
+
if (Uint8Array$4) $$e({ target: 'Uint8Array', proto: true, forced: INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS$2 }, {
|
|
8100
8230
|
setFromBase64: function setFromBase64(string /* , options */) {
|
|
8101
8231
|
anUint8Array$3(this);
|
|
8102
8232
|
|
|
@@ -8132,7 +8262,7 @@ var uint8FromHex = function (string, into) {
|
|
|
8132
8262
|
return { bytes: bytes, read: written << 1 };
|
|
8133
8263
|
};
|
|
8134
8264
|
|
|
8135
|
-
var $$
|
|
8265
|
+
var $$d = _export;
|
|
8136
8266
|
var globalThis$4 = globalThis_1;
|
|
8137
8267
|
var aString = aString$2;
|
|
8138
8268
|
var anUint8Array$2 = anUint8Array$4;
|
|
@@ -8154,7 +8284,7 @@ function throwsOnLengthTrackingView() {
|
|
|
8154
8284
|
|
|
8155
8285
|
// `Uint8Array.prototype.setFromHex` method
|
|
8156
8286
|
// https://tc39.es/ecma262/#sec-uint8array.prototype.setfromhex
|
|
8157
|
-
if (globalThis$4.Uint8Array) $$
|
|
8287
|
+
if (globalThis$4.Uint8Array) $$d({ target: 'Uint8Array', proto: true, forced: throwsOnLengthTrackingView() }, {
|
|
8158
8288
|
setFromHex: function setFromHex(string) {
|
|
8159
8289
|
anUint8Array$2(this);
|
|
8160
8290
|
aString(string);
|
|
@@ -8164,7 +8294,7 @@ if (globalThis$4.Uint8Array) $$e({ target: 'Uint8Array', proto: true, forced: th
|
|
|
8164
8294
|
}
|
|
8165
8295
|
});
|
|
8166
8296
|
|
|
8167
|
-
var $$
|
|
8297
|
+
var $$c = _export;
|
|
8168
8298
|
var globalThis$3 = globalThis_1;
|
|
8169
8299
|
var uncurryThis$8 = functionUncurryThis;
|
|
8170
8300
|
var anObjectOrUndefined = anObjectOrUndefined$2;
|
|
@@ -8191,7 +8321,7 @@ var INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS$1 = !Uint8Array$2 || !Uint8Array$2.proto
|
|
|
8191
8321
|
|
|
8192
8322
|
// `Uint8Array.prototype.toBase64` method
|
|
8193
8323
|
// https://tc39.es/ecma262/#sec-uint8array.prototype.tobase64
|
|
8194
|
-
if (Uint8Array$2) $$
|
|
8324
|
+
if (Uint8Array$2) $$c({ target: 'Uint8Array', proto: true, forced: INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS$1 }, {
|
|
8195
8325
|
toBase64: function toBase64(/* options */) {
|
|
8196
8326
|
var array = anUint8Array$1(this);
|
|
8197
8327
|
var options = arguments.length ? anObjectOrUndefined(arguments[0]) : undefined;
|
|
@@ -8224,7 +8354,7 @@ if (Uint8Array$2) $$d({ target: 'Uint8Array', proto: true, forced: INCORRECT_BEH
|
|
|
8224
8354
|
}
|
|
8225
8355
|
});
|
|
8226
8356
|
|
|
8227
|
-
var $$
|
|
8357
|
+
var $$b = _export;
|
|
8228
8358
|
var globalThis$2 = globalThis_1;
|
|
8229
8359
|
var uncurryThis$7 = functionUncurryThis;
|
|
8230
8360
|
var anUint8Array = anUint8Array$4;
|
|
@@ -8247,7 +8377,7 @@ var INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS = !Uint8Array$1 || !Uint8Array$1.prototy
|
|
|
8247
8377
|
|
|
8248
8378
|
// `Uint8Array.prototype.toHex` method
|
|
8249
8379
|
// https://tc39.es/ecma262/#sec-uint8array.prototype.tohex
|
|
8250
|
-
if (Uint8Array$1) $$
|
|
8380
|
+
if (Uint8Array$1) $$b({ target: 'Uint8Array', proto: true, forced: INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS }, {
|
|
8251
8381
|
toHex: function toHex() {
|
|
8252
8382
|
anUint8Array(this);
|
|
8253
8383
|
notDetached(this.buffer);
|
|
@@ -8261,7 +8391,7 @@ if (Uint8Array$1) $$c({ target: 'Uint8Array', proto: true, forced: INCORRECT_BEH
|
|
|
8261
8391
|
});
|
|
8262
8392
|
|
|
8263
8393
|
const getDefaultIgnorePatterns = () => {
|
|
8264
|
-
return new Set(["venv", ".venv", "node_modules", "dist", "build", "__pycache__", ".claude", ".agents", ".git", /\.egg-info$/, ".machine-code-app-directory-info.json", ".vention-design-scene-assets.json", ".vention-design-configuration.json"]);
|
|
8394
|
+
return new Set(["venv", ".venv", "node_modules", "dist", "build", "__pycache__", ".claude", ".agents", ".git", ".DS_Store", "Thumbs.db", "desktop.ini", /\.egg-info$/, ".machine-code-app-directory-info.json", ".vention-design-scene-assets.json", ".vention-design-configuration.json"]);
|
|
8265
8395
|
};
|
|
8266
8396
|
const sanitizeFileName = fileName => {
|
|
8267
8397
|
return fileName.replace(/[^a-zA-Z0-9-_]/g, "_");
|
|
@@ -8358,119 +8488,411 @@ const readMachineCodeAppDirectoryInfo = async projectPath => {
|
|
|
8358
8488
|
}
|
|
8359
8489
|
};
|
|
8360
8490
|
|
|
8361
|
-
var $
|
|
8362
|
-
var
|
|
8491
|
+
var DESCRIPTORS$1 = descriptors;
|
|
8492
|
+
var globalThis$1 = globalThis_1;
|
|
8493
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
8494
|
+
var isForced = isForced_1;
|
|
8495
|
+
var inheritIfRequired = inheritIfRequired$4;
|
|
8496
|
+
var createNonEnumerableProperty = createNonEnumerableProperty$d;
|
|
8497
|
+
var create = objectCreate;
|
|
8498
|
+
var getOwnPropertyNames = objectGetOwnPropertyNames.f;
|
|
8499
|
+
var isPrototypeOf = objectIsPrototypeOf;
|
|
8500
|
+
var isRegExp = isRegexp;
|
|
8501
|
+
var toString$7 = toString$h;
|
|
8502
|
+
var getRegExpFlags$1 = regexpGetFlags;
|
|
8503
|
+
var stickyHelpers = regexpStickyHelpers;
|
|
8504
|
+
var proxyAccessor = proxyAccessor$2;
|
|
8505
|
+
var defineBuiltIn$1 = defineBuiltIn$a;
|
|
8506
|
+
var fails$5 = fails$F;
|
|
8507
|
+
var hasOwn = hasOwnProperty_1;
|
|
8508
|
+
var enforceInternalState = internalState.enforce;
|
|
8509
|
+
var setSpecies = setSpecies$4;
|
|
8510
|
+
var wellKnownSymbol = wellKnownSymbol$n;
|
|
8511
|
+
var UNSUPPORTED_DOT_ALL$1 = regexpUnsupportedDotAll;
|
|
8512
|
+
var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
8363
8513
|
|
|
8364
|
-
var
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8514
|
+
var MATCH = wellKnownSymbol('match');
|
|
8515
|
+
var NativeRegExp = globalThis$1.RegExp;
|
|
8516
|
+
var RegExpPrototype$2 = NativeRegExp.prototype;
|
|
8517
|
+
var SyntaxError$1 = globalThis$1.SyntaxError;
|
|
8518
|
+
var exec = uncurryThis$6(RegExpPrototype$2.exec);
|
|
8519
|
+
var charAt$1 = uncurryThis$6(''.charAt);
|
|
8520
|
+
var replace$1 = uncurryThis$6(''.replace);
|
|
8521
|
+
var stringIndexOf = uncurryThis$6(''.indexOf);
|
|
8522
|
+
var stringSlice$2 = uncurryThis$6(''.slice);
|
|
8523
|
+
// TODO: Use only proper RegExpIdentifierName
|
|
8524
|
+
var IS_NCG = /^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/;
|
|
8525
|
+
var re1 = /a/g;
|
|
8526
|
+
var re2 = /a/g;
|
|
8368
8527
|
|
|
8369
|
-
|
|
8370
|
-
var
|
|
8371
|
-
var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
|
|
8372
|
-
var bind = functionBindContext;
|
|
8373
|
-
var createProperty = createProperty$5;
|
|
8528
|
+
// "new" should create a new object, old webkit bug
|
|
8529
|
+
var CORRECT_NEW = new NativeRegExp(re1) !== re1;
|
|
8374
8530
|
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
var flattenIntoArray$1 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
8378
|
-
var targetIndex = start;
|
|
8379
|
-
var sourceIndex = 0;
|
|
8380
|
-
var mapFn = mapper ? bind(mapper, thisArg) : false;
|
|
8381
|
-
var element, elementLen;
|
|
8531
|
+
var MISSED_STICKY = stickyHelpers.MISSED_STICKY;
|
|
8532
|
+
var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
|
|
8382
8533
|
|
|
8383
|
-
|
|
8384
|
-
|
|
8385
|
-
|
|
8534
|
+
var BASE_FORCED = DESCRIPTORS$1 &&
|
|
8535
|
+
(!CORRECT_NEW || MISSED_STICKY || UNSUPPORTED_DOT_ALL$1 || UNSUPPORTED_NCG || fails$5(function () {
|
|
8536
|
+
re2[MATCH] = false;
|
|
8537
|
+
// RegExp constructor can alter flags and IsRegExp works correct with @@match
|
|
8538
|
+
// eslint-disable-next-line sonarjs/inconsistent-function-call -- required for testing
|
|
8539
|
+
return NativeRegExp(re1) !== re1 || NativeRegExp(re2) === re2 || String(NativeRegExp(re1, 'i')) !== '/a/i';
|
|
8540
|
+
}));
|
|
8386
8541
|
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8393
|
-
|
|
8542
|
+
var handleDotAll = function (string) {
|
|
8543
|
+
var length = string.length;
|
|
8544
|
+
var index = 0;
|
|
8545
|
+
var result = '';
|
|
8546
|
+
var brackets = false;
|
|
8547
|
+
var chr;
|
|
8548
|
+
for (; index < length; index++) {
|
|
8549
|
+
chr = charAt$1(string, index);
|
|
8550
|
+
if (chr === '\\') {
|
|
8551
|
+
result += chr + charAt$1(string, ++index);
|
|
8552
|
+
continue;
|
|
8553
|
+
}
|
|
8554
|
+
if (!brackets && chr === '.') {
|
|
8555
|
+
result += '[\\s\\S]';
|
|
8556
|
+
} else {
|
|
8557
|
+
if (chr === '[') {
|
|
8558
|
+
brackets = true;
|
|
8559
|
+
} else if (chr === ']') {
|
|
8560
|
+
brackets = false;
|
|
8561
|
+
} result += chr;
|
|
8562
|
+
}
|
|
8563
|
+
} return result;
|
|
8564
|
+
};
|
|
8394
8565
|
|
|
8395
|
-
|
|
8566
|
+
var handleNCG = function (string) {
|
|
8567
|
+
var length = string.length;
|
|
8568
|
+
var index = 0;
|
|
8569
|
+
var result = '';
|
|
8570
|
+
var named = [];
|
|
8571
|
+
var names = create(null);
|
|
8572
|
+
var brackets = false;
|
|
8573
|
+
var ncg = false;
|
|
8574
|
+
var groupid = 0;
|
|
8575
|
+
var groupname = '';
|
|
8576
|
+
var chr;
|
|
8577
|
+
for (; index < length; index++) {
|
|
8578
|
+
chr = charAt$1(string, index);
|
|
8579
|
+
if (chr === '\\') {
|
|
8580
|
+
chr += charAt$1(string, ++index);
|
|
8581
|
+
// use `\x5c` for escaped backslash to avoid corruption by `\k<name>` to `\N` replacement below
|
|
8582
|
+
if (!ncg && charAt$1(chr, 1) === '\\') {
|
|
8583
|
+
result += '\\x5c';
|
|
8584
|
+
continue;
|
|
8585
|
+
}
|
|
8586
|
+
} else if (chr === ']') {
|
|
8587
|
+
brackets = false;
|
|
8588
|
+
} else if (!brackets) switch (true) {
|
|
8589
|
+
case chr === '[':
|
|
8590
|
+
brackets = true;
|
|
8591
|
+
break;
|
|
8592
|
+
case chr === '(':
|
|
8593
|
+
result += chr;
|
|
8594
|
+
if (exec(IS_NCG, stringSlice$2(string, index + 1))) {
|
|
8595
|
+
index += 2;
|
|
8596
|
+
ncg = true;
|
|
8597
|
+
groupid++;
|
|
8598
|
+
} else if (charAt$1(string, index + 1) !== '?') {
|
|
8599
|
+
groupid++;
|
|
8600
|
+
}
|
|
8601
|
+
continue;
|
|
8602
|
+
case chr === '>' && ncg:
|
|
8603
|
+
if (groupname === '' || hasOwn(names, groupname)) {
|
|
8604
|
+
throw new SyntaxError$1('Invalid capture group name');
|
|
8605
|
+
}
|
|
8606
|
+
names[groupname] = true;
|
|
8607
|
+
named[named.length] = [groupname, groupid];
|
|
8608
|
+
ncg = false;
|
|
8609
|
+
groupname = '';
|
|
8610
|
+
continue;
|
|
8396
8611
|
}
|
|
8397
|
-
|
|
8612
|
+
if (ncg) groupname += chr;
|
|
8613
|
+
else result += chr;
|
|
8398
8614
|
}
|
|
8399
|
-
|
|
8615
|
+
// convert `\k<name>` backreferences to numbered backreferences
|
|
8616
|
+
for (var ni = 0; ni < named.length; ni++) {
|
|
8617
|
+
var backref = '\\k<' + named[ni][0] + '>';
|
|
8618
|
+
var numRef = '\\' + named[ni][1];
|
|
8619
|
+
while (stringIndexOf(result, backref) > -1) {
|
|
8620
|
+
result = replace$1(result, backref, numRef);
|
|
8621
|
+
}
|
|
8622
|
+
} return [result, named];
|
|
8400
8623
|
};
|
|
8401
8624
|
|
|
8402
|
-
|
|
8625
|
+
// `RegExp` constructor
|
|
8626
|
+
// https://tc39.es/ecma262/#sec-regexp-constructor
|
|
8627
|
+
if (isForced('RegExp', BASE_FORCED)) {
|
|
8628
|
+
var RegExpWrapper = function RegExp(pattern, flags) {
|
|
8629
|
+
var thisIsRegExp = isPrototypeOf(RegExpPrototype$2, this);
|
|
8630
|
+
var patternIsRegExp = isRegExp(pattern);
|
|
8631
|
+
var flagsAreUndefined = flags === undefined;
|
|
8632
|
+
var groups = [];
|
|
8633
|
+
var rawPattern = pattern;
|
|
8634
|
+
var rawFlags, dotAll, sticky, handled, result, state;
|
|
8403
8635
|
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
var toObject$2 = toObject$b;
|
|
8408
|
-
var lengthOfArrayLike$2 = lengthOfArrayLike$g;
|
|
8409
|
-
var arraySpeciesCreate = arraySpeciesCreate$2;
|
|
8636
|
+
if (!thisIsRegExp && patternIsRegExp && flagsAreUndefined && pattern.constructor === RegExpWrapper) {
|
|
8637
|
+
return pattern;
|
|
8638
|
+
}
|
|
8410
8639
|
|
|
8411
|
-
|
|
8412
|
-
|
|
8413
|
-
|
|
8414
|
-
|
|
8415
|
-
var O = toObject$2(this);
|
|
8416
|
-
var sourceLen = lengthOfArrayLike$2(O);
|
|
8417
|
-
var A;
|
|
8418
|
-
aCallable$4(callbackfn);
|
|
8419
|
-
A = arraySpeciesCreate(O, 0);
|
|
8420
|
-
flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
8421
|
-
return A;
|
|
8422
|
-
}
|
|
8423
|
-
});
|
|
8640
|
+
if (patternIsRegExp || isPrototypeOf(RegExpPrototype$2, pattern)) {
|
|
8641
|
+
pattern = pattern.source;
|
|
8642
|
+
if (flagsAreUndefined) flags = getRegExpFlags$1(rawPattern);
|
|
8643
|
+
}
|
|
8424
8644
|
|
|
8425
|
-
|
|
8645
|
+
pattern = pattern === undefined ? '' : toString$7(pattern);
|
|
8646
|
+
flags = flags === undefined ? '' : toString$7(flags);
|
|
8647
|
+
rawPattern = pattern;
|
|
8426
8648
|
|
|
8427
|
-
|
|
8649
|
+
if (UNSUPPORTED_DOT_ALL$1 && 'dotAll' in re1) {
|
|
8650
|
+
dotAll = !!flags && stringIndexOf(flags, 's') > -1;
|
|
8651
|
+
if (dotAll) flags = replace$1(flags, /s/g, '');
|
|
8652
|
+
}
|
|
8428
8653
|
|
|
8429
|
-
|
|
8430
|
-
if (!delete O[P]) throw new $TypeError$1('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
|
|
8431
|
-
};
|
|
8654
|
+
rawFlags = flags;
|
|
8432
8655
|
|
|
8433
|
-
|
|
8656
|
+
if (MISSED_STICKY && 'sticky' in re1) {
|
|
8657
|
+
sticky = !!flags && stringIndexOf(flags, 'y') > -1;
|
|
8658
|
+
if (sticky && UNSUPPORTED_Y) flags = replace$1(flags, /y/g, '');
|
|
8659
|
+
}
|
|
8434
8660
|
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
});
|
|
8441
|
-
};
|
|
8661
|
+
if (UNSUPPORTED_NCG) {
|
|
8662
|
+
handled = handleNCG(pattern);
|
|
8663
|
+
pattern = handled[0];
|
|
8664
|
+
groups = handled[1];
|
|
8665
|
+
}
|
|
8442
8666
|
|
|
8443
|
-
|
|
8444
|
-
var uncurryThis$6 = functionUncurryThis;
|
|
8445
|
-
var aCallable$3 = aCallable$l;
|
|
8446
|
-
var toObject$1 = toObject$b;
|
|
8447
|
-
var lengthOfArrayLike$1 = lengthOfArrayLike$g;
|
|
8448
|
-
var deletePropertyOrThrow = deletePropertyOrThrow$1;
|
|
8449
|
-
var toString$7 = toString$h;
|
|
8450
|
-
var fails$4 = fails$F;
|
|
8451
|
-
var internalSort = arraySort;
|
|
8452
|
-
var arrayMethodIsStrict = arrayMethodIsStrict$1;
|
|
8453
|
-
var FF = environmentFfVersion;
|
|
8454
|
-
var IE_OR_EDGE = environmentIsIeOrEdge;
|
|
8455
|
-
var V8 = environmentV8Version;
|
|
8456
|
-
var WEBKIT = environmentWebkitVersion;
|
|
8667
|
+
result = inheritIfRequired(NativeRegExp(pattern, flags), thisIsRegExp ? this : RegExpPrototype$2, RegExpWrapper);
|
|
8457
8668
|
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8669
|
+
if (dotAll || sticky || groups.length) {
|
|
8670
|
+
state = enforceInternalState(result);
|
|
8671
|
+
if (dotAll) {
|
|
8672
|
+
state.dotAll = true;
|
|
8673
|
+
state.raw = RegExpWrapper(handleDotAll(pattern), rawFlags);
|
|
8674
|
+
}
|
|
8675
|
+
if (sticky) state.sticky = true;
|
|
8676
|
+
if (groups.length) state.groups = groups;
|
|
8677
|
+
}
|
|
8678
|
+
|
|
8679
|
+
if (pattern !== rawPattern) try {
|
|
8680
|
+
// fails in old engines, but we have no alternatives for unsupported regex syntax
|
|
8681
|
+
createNonEnumerableProperty(result, 'source', rawPattern === '' ? '(?:)' : rawPattern);
|
|
8682
|
+
} catch (error) { /* empty */ }
|
|
8683
|
+
|
|
8684
|
+
return result;
|
|
8685
|
+
};
|
|
8686
|
+
|
|
8687
|
+
for (var keys = getOwnPropertyNames(NativeRegExp), index = 0; keys.length > index;) {
|
|
8688
|
+
proxyAccessor(RegExpWrapper, NativeRegExp, keys[index++]);
|
|
8689
|
+
}
|
|
8690
|
+
|
|
8691
|
+
RegExpPrototype$2.constructor = RegExpWrapper;
|
|
8692
|
+
RegExpWrapper.prototype = RegExpPrototype$2;
|
|
8693
|
+
defineBuiltIn$1(globalThis$1, 'RegExp', RegExpWrapper, { constructor: true });
|
|
8694
|
+
}
|
|
8695
|
+
|
|
8696
|
+
// https://tc39.es/ecma262/#sec-get-regexp-@@species
|
|
8697
|
+
setSpecies('RegExp');
|
|
8698
|
+
|
|
8699
|
+
var DESCRIPTORS = descriptors;
|
|
8700
|
+
var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
|
|
8701
|
+
var classof = classofRaw$2;
|
|
8702
|
+
var defineBuiltInAccessor = defineBuiltInAccessor$9;
|
|
8703
|
+
var getInternalState = internalState.get;
|
|
8704
|
+
|
|
8705
|
+
var RegExpPrototype$1 = RegExp.prototype;
|
|
8706
|
+
var $TypeError$1 = TypeError;
|
|
8707
|
+
|
|
8708
|
+
// `RegExp.prototype.dotAll` getter
|
|
8709
|
+
// https://tc39.es/ecma262/#sec-get-regexp.prototype.dotall
|
|
8710
|
+
if (DESCRIPTORS && UNSUPPORTED_DOT_ALL) {
|
|
8711
|
+
defineBuiltInAccessor(RegExpPrototype$1, 'dotAll', {
|
|
8712
|
+
configurable: true,
|
|
8713
|
+
get: function dotAll() {
|
|
8714
|
+
if (this === RegExpPrototype$1) return;
|
|
8715
|
+
// We can't use InternalStateModule.getterFor because
|
|
8716
|
+
// we don't add metadata for regexps created by a literal.
|
|
8717
|
+
if (classof(this) === 'RegExp') {
|
|
8718
|
+
return !!getInternalState(this).dotAll;
|
|
8719
|
+
}
|
|
8720
|
+
throw new $TypeError$1('Incompatible receiver, RegExp required');
|
|
8721
|
+
}
|
|
8722
|
+
});
|
|
8723
|
+
}
|
|
8724
|
+
|
|
8725
|
+
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
8726
|
+
|
|
8727
|
+
var $$a = _export;
|
|
8728
|
+
var call$2 = functionCall;
|
|
8729
|
+
var isCallable = isCallable$s;
|
|
8730
|
+
var anObject$3 = anObject$p;
|
|
8731
|
+
var toString$6 = toString$h;
|
|
8732
|
+
|
|
8733
|
+
var DELEGATES_TO_EXEC = function () {
|
|
8734
|
+
var execCalled = false;
|
|
8735
|
+
var re = /[ac]/;
|
|
8736
|
+
re.exec = function () {
|
|
8737
|
+
execCalled = true;
|
|
8738
|
+
return /./.exec.apply(this, arguments);
|
|
8739
|
+
};
|
|
8740
|
+
return re.test('abc') === true && execCalled;
|
|
8741
|
+
}();
|
|
8742
|
+
|
|
8743
|
+
var nativeTest = /./.test;
|
|
8744
|
+
|
|
8745
|
+
// `RegExp.prototype.test` method
|
|
8746
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype.test
|
|
8747
|
+
$$a({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
|
|
8748
|
+
test: function (S) {
|
|
8749
|
+
var R = anObject$3(this);
|
|
8750
|
+
var string = toString$6(S);
|
|
8751
|
+
var exec = R.exec;
|
|
8752
|
+
if (!isCallable(exec)) return call$2(nativeTest, R, string);
|
|
8753
|
+
var result = call$2(exec, R, string);
|
|
8754
|
+
if (result === null) return false;
|
|
8755
|
+
anObject$3(result);
|
|
8756
|
+
return true;
|
|
8757
|
+
}
|
|
8758
|
+
});
|
|
8759
|
+
|
|
8760
|
+
var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
|
|
8761
|
+
var defineBuiltIn = defineBuiltIn$a;
|
|
8762
|
+
var anObject$2 = anObject$p;
|
|
8763
|
+
var $toString = toString$h;
|
|
8764
|
+
var fails$4 = fails$F;
|
|
8765
|
+
var getRegExpFlags = regexpGetFlags;
|
|
8766
|
+
|
|
8767
|
+
var TO_STRING = 'toString';
|
|
8768
|
+
var RegExpPrototype = RegExp.prototype;
|
|
8769
|
+
var nativeToString = RegExpPrototype[TO_STRING];
|
|
8770
|
+
|
|
8771
|
+
var NOT_GENERIC = fails$4(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
|
|
8772
|
+
// FF44- RegExp#toString has a wrong name
|
|
8773
|
+
var INCORRECT_NAME = PROPER_FUNCTION_NAME$1 && nativeToString.name !== TO_STRING;
|
|
8774
|
+
|
|
8775
|
+
// `RegExp.prototype.toString` method
|
|
8776
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
|
|
8777
|
+
if (NOT_GENERIC || INCORRECT_NAME) {
|
|
8778
|
+
defineBuiltIn(RegExpPrototype, TO_STRING, function toString() {
|
|
8779
|
+
var R = anObject$2(this);
|
|
8780
|
+
var pattern = $toString(R.source);
|
|
8781
|
+
var flags = $toString(getRegExpFlags(R));
|
|
8782
|
+
return '/' + pattern + '/' + flags;
|
|
8783
|
+
}, { unsafe: true });
|
|
8784
|
+
}
|
|
8785
|
+
|
|
8786
|
+
/**
|
|
8787
|
+
* Checks if a file system node should be ignored based on the provided ignore patterns
|
|
8788
|
+
*/
|
|
8789
|
+
function shouldIgnoreFileSystemNode(nodeName, ignoredNodes) {
|
|
8790
|
+
for (const pattern of ignoredNodes) {
|
|
8791
|
+
if (typeof pattern === "string" && nodeName === pattern) {
|
|
8792
|
+
return true;
|
|
8793
|
+
}
|
|
8794
|
+
if (pattern instanceof RegExp && pattern.test(nodeName)) {
|
|
8795
|
+
return true;
|
|
8796
|
+
}
|
|
8797
|
+
}
|
|
8798
|
+
return false;
|
|
8799
|
+
}
|
|
8800
|
+
|
|
8801
|
+
/**
|
|
8802
|
+
* Serializes a directory structure into a FileSystemNode object
|
|
8803
|
+
* Files are read as binary and encoded to base64, directories are recursively processed
|
|
8804
|
+
*/
|
|
8805
|
+
function serializeFileSystem(sourceDirectory, ignoredFileSystemNodes) {
|
|
8806
|
+
const fileSystemNode = {};
|
|
8807
|
+
const directoryContents = fs.readdirSync(sourceDirectory);
|
|
8808
|
+
directoryContents.forEach(directoryItem => {
|
|
8809
|
+
if (shouldIgnoreFileSystemNode(directoryItem, ignoredFileSystemNodes)) {
|
|
8810
|
+
return;
|
|
8811
|
+
}
|
|
8812
|
+
const fullPath = path$2.join(sourceDirectory, directoryItem);
|
|
8813
|
+
const directoryItemInformation = fs.statSync(fullPath);
|
|
8814
|
+
if (directoryItemInformation.isDirectory()) {
|
|
8815
|
+
fileSystemNode[directoryItem] = serializeFileSystem(fullPath, ignoredFileSystemNodes);
|
|
8816
|
+
} else if (directoryItemInformation.isFile()) {
|
|
8817
|
+
// Always read as binary and encode to base64 - this is the safest approach
|
|
8818
|
+
// and ensures all file types are handled correctly
|
|
8819
|
+
const buffer = fs.readFileSync(fullPath);
|
|
8820
|
+
fileSystemNode[directoryItem] = buffer.toString("base64");
|
|
8821
|
+
}
|
|
8822
|
+
});
|
|
8823
|
+
return fileSystemNode;
|
|
8824
|
+
}
|
|
8825
|
+
|
|
8826
|
+
var $$9 = _export;
|
|
8827
|
+
var flattenIntoArray = flattenIntoArray_1;
|
|
8828
|
+
var aCallable$3 = aCallable$l;
|
|
8829
|
+
var toObject$2 = toObject$c;
|
|
8830
|
+
var lengthOfArrayLike$2 = lengthOfArrayLike$h;
|
|
8831
|
+
var arraySpeciesCreate = arraySpeciesCreate$3;
|
|
8832
|
+
|
|
8833
|
+
// `Array.prototype.flatMap` method
|
|
8834
|
+
// https://tc39.es/ecma262/#sec-array.prototype.flatmap
|
|
8835
|
+
$$9({ target: 'Array', proto: true }, {
|
|
8836
|
+
flatMap: function flatMap(callbackfn /* , thisArg */) {
|
|
8837
|
+
var O = toObject$2(this);
|
|
8838
|
+
var sourceLen = lengthOfArrayLike$2(O);
|
|
8839
|
+
var A;
|
|
8840
|
+
aCallable$3(callbackfn);
|
|
8841
|
+
A = arraySpeciesCreate(O, 0);
|
|
8842
|
+
flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
8843
|
+
return A;
|
|
8844
|
+
}
|
|
8845
|
+
});
|
|
8846
|
+
|
|
8847
|
+
var tryToString = tryToString$6;
|
|
8848
|
+
|
|
8849
|
+
var $TypeError = TypeError;
|
|
8850
|
+
|
|
8851
|
+
var deletePropertyOrThrow$1 = function (O, P) {
|
|
8852
|
+
if (!delete O[P]) throw new $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
|
|
8853
|
+
};
|
|
8854
|
+
|
|
8855
|
+
var fails$3 = fails$F;
|
|
8856
|
+
|
|
8857
|
+
var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
|
|
8858
|
+
var method = [][METHOD_NAME];
|
|
8859
|
+
return !!method && fails$3(function () {
|
|
8860
|
+
// eslint-disable-next-line no-useless-call -- required for testing
|
|
8861
|
+
method.call(null, argument || function () { return 1; }, 1);
|
|
8862
|
+
});
|
|
8863
|
+
};
|
|
8864
|
+
|
|
8865
|
+
var $$8 = _export;
|
|
8866
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
8867
|
+
var aCallable$2 = aCallable$l;
|
|
8868
|
+
var toObject$1 = toObject$c;
|
|
8869
|
+
var lengthOfArrayLike$1 = lengthOfArrayLike$h;
|
|
8870
|
+
var deletePropertyOrThrow = deletePropertyOrThrow$1;
|
|
8871
|
+
var toString$5 = toString$h;
|
|
8872
|
+
var fails$2 = fails$F;
|
|
8873
|
+
var internalSort = arraySort;
|
|
8874
|
+
var arrayMethodIsStrict = arrayMethodIsStrict$1;
|
|
8875
|
+
var FF = environmentFfVersion;
|
|
8876
|
+
var IE_OR_EDGE = environmentIsIeOrEdge;
|
|
8877
|
+
var V8 = environmentV8Version;
|
|
8878
|
+
var WEBKIT = environmentWebkitVersion;
|
|
8879
|
+
|
|
8880
|
+
var test = [];
|
|
8881
|
+
var nativeSort = uncurryThis$5(test.sort);
|
|
8882
|
+
var push = uncurryThis$5(test.push);
|
|
8461
8883
|
|
|
8462
8884
|
// IE8-
|
|
8463
|
-
var FAILS_ON_UNDEFINED = fails$
|
|
8885
|
+
var FAILS_ON_UNDEFINED = fails$2(function () {
|
|
8464
8886
|
test.sort(undefined);
|
|
8465
8887
|
});
|
|
8466
8888
|
// V8 bug
|
|
8467
|
-
var FAILS_ON_NULL = fails$
|
|
8889
|
+
var FAILS_ON_NULL = fails$2(function () {
|
|
8468
8890
|
test.sort(null);
|
|
8469
8891
|
});
|
|
8470
8892
|
// Old WebKit
|
|
8471
8893
|
var STRICT_METHOD = arrayMethodIsStrict('sort');
|
|
8472
8894
|
|
|
8473
|
-
var STABLE_SORT = !fails$
|
|
8895
|
+
var STABLE_SORT = !fails$2(function () {
|
|
8474
8896
|
// feature detection can be too slow, so check engines versions
|
|
8475
8897
|
if (V8) return V8 < 70;
|
|
8476
8898
|
if (FF && FF > 3) return;
|
|
@@ -8512,17 +8934,17 @@ var getSortCompare = function (comparefn) {
|
|
|
8512
8934
|
if (y === undefined) return -1;
|
|
8513
8935
|
if (x === undefined) return 1;
|
|
8514
8936
|
if (comparefn !== undefined) return +comparefn(x, y) || 0;
|
|
8515
|
-
var xString = toString$
|
|
8516
|
-
var yString = toString$
|
|
8937
|
+
var xString = toString$5(x);
|
|
8938
|
+
var yString = toString$5(y);
|
|
8517
8939
|
return xString === yString ? 0 : xString > yString ? 1 : -1;
|
|
8518
8940
|
};
|
|
8519
8941
|
};
|
|
8520
8942
|
|
|
8521
8943
|
// `Array.prototype.sort` method
|
|
8522
8944
|
// https://tc39.es/ecma262/#sec-array.prototype.sort
|
|
8523
|
-
$$
|
|
8945
|
+
$$8({ target: 'Array', proto: true, forced: FORCED$2 }, {
|
|
8524
8946
|
sort: function sort(comparefn) {
|
|
8525
|
-
if (comparefn !== undefined) aCallable$
|
|
8947
|
+
if (comparefn !== undefined) aCallable$2(comparefn);
|
|
8526
8948
|
|
|
8527
8949
|
var array = toObject$1(this);
|
|
8528
8950
|
|
|
@@ -8550,32 +8972,32 @@ $$a({ target: 'Array', proto: true, forced: FORCED$2 }, {
|
|
|
8550
8972
|
|
|
8551
8973
|
// this method was added to unscopables after implementation
|
|
8552
8974
|
// in popular engines, so it's moved to a separate module
|
|
8553
|
-
var addToUnscopables$1 = addToUnscopables$
|
|
8975
|
+
var addToUnscopables$1 = addToUnscopables$5;
|
|
8554
8976
|
|
|
8555
8977
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
8556
8978
|
addToUnscopables$1('flatMap');
|
|
8557
8979
|
|
|
8558
|
-
var call$
|
|
8559
|
-
var anObject$
|
|
8560
|
-
var getIteratorDirect$
|
|
8980
|
+
var call$1 = functionCall;
|
|
8981
|
+
var anObject$1 = anObject$p;
|
|
8982
|
+
var getIteratorDirect$1 = getIteratorDirect$8;
|
|
8561
8983
|
var getIteratorMethod = getIteratorMethod$4;
|
|
8562
8984
|
|
|
8563
8985
|
var getIteratorFlattenable$1 = function (obj, stringHandling) {
|
|
8564
|
-
if (!stringHandling || typeof obj !== 'string') anObject$
|
|
8986
|
+
if (!stringHandling || typeof obj !== 'string') anObject$1(obj);
|
|
8565
8987
|
var method = getIteratorMethod(obj);
|
|
8566
|
-
return getIteratorDirect$
|
|
8988
|
+
return getIteratorDirect$1(anObject$1(method !== undefined ? call$1(method, obj) : obj));
|
|
8567
8989
|
};
|
|
8568
8990
|
|
|
8569
|
-
var $$
|
|
8570
|
-
var call
|
|
8571
|
-
var aCallable$
|
|
8572
|
-
var anObject
|
|
8573
|
-
var getIteratorDirect
|
|
8991
|
+
var $$7 = _export;
|
|
8992
|
+
var call = functionCall;
|
|
8993
|
+
var aCallable$1 = aCallable$l;
|
|
8994
|
+
var anObject = anObject$p;
|
|
8995
|
+
var getIteratorDirect = getIteratorDirect$8;
|
|
8574
8996
|
var getIteratorFlattenable = getIteratorFlattenable$1;
|
|
8575
8997
|
var createIteratorProxy = iteratorCreateProxy;
|
|
8576
|
-
var iteratorClose
|
|
8998
|
+
var iteratorClose = iteratorClose$c;
|
|
8577
8999
|
var iteratorHelperThrowsOnInvalidIterator = iteratorHelperThrowsOnInvalidIterator$3;
|
|
8578
|
-
var iteratorHelperWithoutClosingOnEarlyError
|
|
9000
|
+
var iteratorHelperWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError$6;
|
|
8579
9001
|
|
|
8580
9002
|
// Should not throw an error for an iterator without `return` method. Fixed in Safari 26.2
|
|
8581
9003
|
// https://bugs.webkit.org/show_bug.cgi?id=297532
|
|
@@ -8592,7 +9014,7 @@ function throwsOnIteratorWithoutReturn() {
|
|
|
8592
9014
|
|
|
8593
9015
|
var FLAT_MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR = !iteratorHelperThrowsOnInvalidIterator('flatMap', function () { /* empty */ });
|
|
8594
9016
|
var flatMapWithoutClosingOnEarlyError = !FLAT_MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR
|
|
8595
|
-
&& iteratorHelperWithoutClosingOnEarlyError
|
|
9017
|
+
&& iteratorHelperWithoutClosingOnEarlyError('flatMap', TypeError);
|
|
8596
9018
|
|
|
8597
9019
|
var FORCED$1 = FLAT_MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR || flatMapWithoutClosingOnEarlyError
|
|
8598
9020
|
|| throwsOnIteratorWithoutReturn();
|
|
@@ -8604,35 +9026,35 @@ var IteratorProxy = createIteratorProxy(function () {
|
|
|
8604
9026
|
|
|
8605
9027
|
while (true) {
|
|
8606
9028
|
if (inner = this.inner) try {
|
|
8607
|
-
result = anObject
|
|
9029
|
+
result = anObject(call(inner.next, inner.iterator));
|
|
8608
9030
|
if (!result.done) return result.value;
|
|
8609
9031
|
this.inner = null;
|
|
8610
|
-
} catch (error) { iteratorClose
|
|
9032
|
+
} catch (error) { iteratorClose(iterator, 'throw', error); }
|
|
8611
9033
|
|
|
8612
|
-
result = anObject
|
|
9034
|
+
result = anObject(call(this.next, iterator));
|
|
8613
9035
|
|
|
8614
9036
|
if (this.done = !!result.done) return;
|
|
8615
9037
|
|
|
8616
9038
|
try {
|
|
8617
9039
|
this.inner = getIteratorFlattenable(mapper(result.value, this.counter++), false);
|
|
8618
|
-
} catch (error) { iteratorClose
|
|
9040
|
+
} catch (error) { iteratorClose(iterator, 'throw', error); }
|
|
8619
9041
|
}
|
|
8620
9042
|
});
|
|
8621
9043
|
|
|
8622
9044
|
// `Iterator.prototype.flatMap` method
|
|
8623
9045
|
// https://tc39.es/ecma262/#sec-iterator.prototype.flatmap
|
|
8624
|
-
$$
|
|
9046
|
+
$$7({ target: 'Iterator', proto: true, real: true, forced: FORCED$1 }, {
|
|
8625
9047
|
flatMap: function flatMap(mapper) {
|
|
8626
|
-
anObject
|
|
9048
|
+
anObject(this);
|
|
8627
9049
|
try {
|
|
8628
|
-
aCallable$
|
|
9050
|
+
aCallable$1(mapper);
|
|
8629
9051
|
} catch (error) {
|
|
8630
|
-
iteratorClose
|
|
9052
|
+
iteratorClose(this, 'throw', error);
|
|
8631
9053
|
}
|
|
8632
9054
|
|
|
8633
|
-
if (flatMapWithoutClosingOnEarlyError) return call
|
|
9055
|
+
if (flatMapWithoutClosingOnEarlyError) return call(flatMapWithoutClosingOnEarlyError, this, mapper);
|
|
8634
9056
|
|
|
8635
|
-
return new IteratorProxy(getIteratorDirect
|
|
9057
|
+
return new IteratorProxy(getIteratorDirect(this), {
|
|
8636
9058
|
mapper: mapper,
|
|
8637
9059
|
inner: null
|
|
8638
9060
|
});
|
|
@@ -9511,11 +9933,6 @@ const resolveConnections = async (session, origins, designId) => {
|
|
|
9511
9933
|
return engineLookup.success ? [buildConnection(engineLookup.url, fetch)] : [];
|
|
9512
9934
|
});
|
|
9513
9935
|
};
|
|
9514
|
-
const resolveConnection$1 = async (session, origins, designId) => {
|
|
9515
|
-
var _a;
|
|
9516
|
-
const designs = await listDesigns$2(session, origins);
|
|
9517
|
-
return (_a = designs.find(design => design.id === designId)) === null || _a === void 0 ? void 0 : _a.connection;
|
|
9518
|
-
};
|
|
9519
9936
|
|
|
9520
9937
|
const LOCAL_DIGITAL_TWIN_URL = "http://localhost:3101";
|
|
9521
9938
|
const connection = {
|
|
@@ -9541,12 +9958,6 @@ const findDigitalTwinApiOrigins = session => {
|
|
|
9541
9958
|
api
|
|
9542
9959
|
};
|
|
9543
9960
|
};
|
|
9544
|
-
const resolveDigitalTwinConnection = async (session, designId) => {
|
|
9545
|
-
if (session.environment === "local") {
|
|
9546
|
-
return resolveConnection();
|
|
9547
|
-
}
|
|
9548
|
-
return resolveConnection$1(session, findDigitalTwinApiOrigins(session), designId);
|
|
9549
|
-
};
|
|
9550
9961
|
const resolveDigitalTwinConnections = async (session, designId) => {
|
|
9551
9962
|
if (session.environment === "local") {
|
|
9552
9963
|
return [await resolveConnection()];
|
|
@@ -9560,53 +9971,194 @@ const listDesigns = async session => {
|
|
|
9560
9971
|
return listDesigns$2(session, findDigitalTwinApiOrigins(session));
|
|
9561
9972
|
};
|
|
9562
9973
|
|
|
9563
|
-
|
|
9564
|
-
|
|
9565
|
-
|
|
9566
|
-
|
|
9567
|
-
|
|
9568
|
-
|
|
9569
|
-
|
|
9570
|
-
|
|
9571
|
-
|
|
9572
|
-
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
|
|
9586
|
-
|
|
9974
|
+
var uncurryThis$4 = functionUncurryThis;
|
|
9975
|
+
|
|
9976
|
+
// eslint-disable-next-line es/no-map -- safe
|
|
9977
|
+
var MapPrototype = Map.prototype;
|
|
9978
|
+
|
|
9979
|
+
var mapHelpers = {
|
|
9980
|
+
set: uncurryThis$4(MapPrototype.set),
|
|
9981
|
+
get: uncurryThis$4(MapPrototype.get),
|
|
9982
|
+
has: uncurryThis$4(MapPrototype.has),
|
|
9983
|
+
remove: uncurryThis$4(MapPrototype['delete'])};
|
|
9984
|
+
|
|
9985
|
+
var $$6 = _export;
|
|
9986
|
+
var MapHelpers$1 = mapHelpers;
|
|
9987
|
+
var IS_PURE$1 = isPure;
|
|
9988
|
+
|
|
9989
|
+
var get$1 = MapHelpers$1.get;
|
|
9990
|
+
var has$1 = MapHelpers$1.has;
|
|
9991
|
+
var set$1 = MapHelpers$1.set;
|
|
9992
|
+
|
|
9993
|
+
// `Map.prototype.getOrInsert` method
|
|
9994
|
+
// https://tc39.es/ecma262/#sec-map.prototype.getorinsert
|
|
9995
|
+
$$6({ target: 'Map', proto: true, real: true, forced: IS_PURE$1 }, {
|
|
9996
|
+
getOrInsert: function getOrInsert(key, value) {
|
|
9997
|
+
if (has$1(this, key)) return get$1(this, key);
|
|
9998
|
+
set$1(this, key, value);
|
|
9999
|
+
return value;
|
|
9587
10000
|
}
|
|
9588
|
-
|
|
9589
|
-
|
|
9590
|
-
|
|
9591
|
-
|
|
9592
|
-
|
|
9593
|
-
|
|
9594
|
-
|
|
10001
|
+
});
|
|
10002
|
+
|
|
10003
|
+
var $$5 = _export;
|
|
10004
|
+
var aCallable = aCallable$l;
|
|
10005
|
+
var MapHelpers = mapHelpers;
|
|
10006
|
+
var IS_PURE = isPure;
|
|
10007
|
+
|
|
10008
|
+
var get = MapHelpers.get;
|
|
10009
|
+
var has = MapHelpers.has;
|
|
10010
|
+
var set = MapHelpers.set;
|
|
10011
|
+
|
|
10012
|
+
// `Map.prototype.getOrInsertComputed` method
|
|
10013
|
+
// https://tc39.es/ecma262/#sec-map.prototype.getorinsertcomputed
|
|
10014
|
+
$$5({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {
|
|
10015
|
+
getOrInsertComputed: function getOrInsertComputed(key, callbackfn) {
|
|
10016
|
+
var hasKey = has(this, key);
|
|
10017
|
+
aCallable(callbackfn);
|
|
10018
|
+
if (hasKey) return get(this, key);
|
|
10019
|
+
// CanonicalizeKeyedCollectionKey
|
|
10020
|
+
if (key === 0 && 1 / key === -Infinity) key = 0;
|
|
10021
|
+
var value = callbackfn(key);
|
|
10022
|
+
set(this, key, value);
|
|
10023
|
+
return value;
|
|
10024
|
+
}
|
|
10025
|
+
});
|
|
10026
|
+
|
|
10027
|
+
var $$4 = _export;
|
|
10028
|
+
var uncurryThis$3 = functionUncurryThisClause;
|
|
10029
|
+
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
10030
|
+
var toLength$1 = toLength$7;
|
|
10031
|
+
var toString$4 = toString$h;
|
|
10032
|
+
var notARegExp = notARegexp;
|
|
10033
|
+
var requireObjectCoercible$4 = requireObjectCoercible$c;
|
|
10034
|
+
var correctIsRegExpLogic = correctIsRegexpLogic;
|
|
10035
|
+
|
|
10036
|
+
var stringSlice$1 = uncurryThis$3(''.slice);
|
|
10037
|
+
var min = Math.min;
|
|
10038
|
+
|
|
10039
|
+
var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
|
|
10040
|
+
// https://github.com/zloirock/core-js/pull/702
|
|
10041
|
+
var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
|
|
10042
|
+
var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
|
|
10043
|
+
return descriptor && !descriptor.writable;
|
|
10044
|
+
}();
|
|
10045
|
+
|
|
10046
|
+
// `String.prototype.startsWith` method
|
|
10047
|
+
// https://tc39.es/ecma262/#sec-string.prototype.startswith
|
|
10048
|
+
$$4({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
|
|
10049
|
+
startsWith: function startsWith(searchString /* , position = 0 */) {
|
|
10050
|
+
var that = toString$4(requireObjectCoercible$4(this));
|
|
10051
|
+
notARegExp(searchString);
|
|
10052
|
+
var search = toString$4(searchString);
|
|
10053
|
+
var index = toLength$1(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
|
|
10054
|
+
return stringSlice$1(that, index, index + search.length) === search;
|
|
10055
|
+
}
|
|
10056
|
+
});
|
|
10057
|
+
|
|
10058
|
+
const fileHashes = (node, ignorePatterns, directory) => Object.entries(node).filter(([name]) => !shouldIgnoreFileSystemNode(name, ignorePatterns)).flatMap(([name, contentOrNode]) => {
|
|
10059
|
+
const relativePath = `${directory}${name}`;
|
|
10060
|
+
return typeof contentOrNode === "string" ? [[relativePath, createHash$1("sha256").update(Buffer.from(contentOrNode, "base64")).digest("hex")]] : fileHashes(contentOrNode, ignorePatterns, `${relativePath}/`);
|
|
10061
|
+
});
|
|
10062
|
+
const isGenerated = filePath => filePath.startsWith("ui/") || filePath === "proto/app.proto" || filePath.startsWith("customui/src/gen/");
|
|
10063
|
+
const fingerprintFiles = (sourceCode, ignorePatterns) => Object.fromEntries(fileHashes(sourceCode, ignorePatterns, "").filter(([filePath]) => !isGenerated(filePath)));
|
|
10064
|
+
const filesAtRisk = ({
|
|
10065
|
+
synced,
|
|
10066
|
+
target,
|
|
10067
|
+
incoming,
|
|
10068
|
+
replacesTarget
|
|
10069
|
+
}) => {
|
|
10070
|
+
const syncedHashes = new Map(Object.entries(synced));
|
|
10071
|
+
const incomingHashes = new Map(Object.entries(incoming));
|
|
10072
|
+
const changedOnTarget = Object.entries(target).filter(([filePath, targetHash]) => {
|
|
10073
|
+
if (syncedHashes.get(filePath) === targetHash) return false;
|
|
10074
|
+
const incomingHash = incomingHashes.get(filePath);
|
|
10075
|
+
return incomingHash === undefined ? replacesTarget : incomingHash !== targetHash;
|
|
10076
|
+
}).map(([filePath]) => filePath);
|
|
10077
|
+
const deletedOnTarget = [...syncedHashes.keys()].filter(filePath => !(filePath in target) && incomingHashes.has(filePath));
|
|
10078
|
+
return [...changedOnTarget, ...deletedOnTarget].sort();
|
|
10079
|
+
};
|
|
10080
|
+
|
|
10081
|
+
const exitWithoutTwin$1 = () => {
|
|
10082
|
+
console.log();
|
|
10083
|
+
console.error(chalk.red("Sorry, it seems you do not have that design open with the MachineLogic tab selected."));
|
|
10084
|
+
console.error(chalk.red("Please go to your browser, open your design, and navigate to the MachineLogic page."));
|
|
10085
|
+
process.exit(1);
|
|
10086
|
+
};
|
|
10087
|
+
const getAppFromDigitalTwins = async (session, designId, {
|
|
10088
|
+
applicationId,
|
|
10089
|
+
appName
|
|
10090
|
+
}) => {
|
|
10091
|
+
const connections = await resolveDigitalTwinConnections(session, designId);
|
|
10092
|
+
if (connections.length === 0) {
|
|
10093
|
+
exitWithoutTwin$1();
|
|
10094
|
+
}
|
|
10095
|
+
console.log(chalk.blue("Fetching all applications with source code from digital twin..."));
|
|
10096
|
+
const copies = (await Promise.all(connections.map(async connection => (await getAllApplicationsWithSourceCode(connection)).filter(app => app.id === applicationId).map(app => ({
|
|
10097
|
+
app,
|
|
10098
|
+
connection
|
|
10099
|
+
}))))).flat();
|
|
10100
|
+
const [newestCopy] = copies;
|
|
10101
|
+
if (!newestCopy) {
|
|
10102
|
+
console.log();
|
|
10103
|
+
console.error(chalk.red(`Application "${appName}" (ID: ${applicationId}) not found in the digital twin.`));
|
|
10104
|
+
process.exit(1);
|
|
10105
|
+
}
|
|
10106
|
+
if (copies.some(({
|
|
10107
|
+
app
|
|
10108
|
+
}) => !isDeepStrictEqual(app.sourceCode, newestCopy.app.sourceCode))) {
|
|
10109
|
+
console.log();
|
|
10110
|
+
console.error(chalk.red(`This design's twins hold different versions of "${appName}".`));
|
|
10111
|
+
console.error(chalk.red("Each MachineBuilder tab open on the design runs its own twin, and a closed tab's twin can stay up for a while."));
|
|
10112
|
+
console.error(chalk.red("If you just pushed, pull again in a few seconds, once every twin has finished taking the push."));
|
|
10113
|
+
console.error(chalk.red("Otherwise run 'vention push' from a folder with the version you want, which gives every twin that copy."));
|
|
10114
|
+
console.error(chalk.red("Or close the design's other tabs, then pull again once their twins have stopped."));
|
|
10115
|
+
process.exit(1);
|
|
10116
|
+
}
|
|
10117
|
+
return newestCopy;
|
|
10118
|
+
};
|
|
10119
|
+
const getAvailableAppsFromDigitalTwin = async connection => {
|
|
10120
|
+
const allApplications = await getAllApplicationsWithSourceCode(connection);
|
|
10121
|
+
return allApplications.filter(app => app.type === "machine_code");
|
|
10122
|
+
};
|
|
10123
|
+
const exitWithoutSourceCode = app => {
|
|
10124
|
+
if (app.sourceCode) return;
|
|
10125
|
+
console.log();
|
|
10126
|
+
console.log(chalk.yellow("No source code found for this application."));
|
|
10127
|
+
process.exit(1);
|
|
10128
|
+
};
|
|
10129
|
+
const createNewAppDirectory = async (session, currentDir, flags) => {
|
|
10130
|
+
const selection = await selectDesignAndApp(session, flags);
|
|
10131
|
+
const {
|
|
10132
|
+
app: selectedApp,
|
|
10133
|
+
connection
|
|
10134
|
+
} = await getAppFromDigitalTwins(session, selection.selectedDesign.id, {
|
|
10135
|
+
applicationId: selection.selectedApp.id,
|
|
10136
|
+
appName: selection.selectedApp.name
|
|
10137
|
+
});
|
|
10138
|
+
exitWithoutSourceCode(selectedApp);
|
|
10139
|
+
const appDirectoryExists = await checkIfAppDirectoryExists(selectedApp.name, currentDir);
|
|
10140
|
+
const safeFileName = sanitizeFileName(selectedApp.name);
|
|
10141
|
+
if (appDirectoryExists) {
|
|
10142
|
+
console.log();
|
|
10143
|
+
console.error(chalk.red(`You already have a directory with name "${safeFileName}" here.`));
|
|
10144
|
+
console.error(chalk.red("If that is the machine code app you are trying to pull, please navigate to the root folder of the app and run the 'vention pull' command from there."));
|
|
10145
|
+
console.error(chalk.red("If not, please rename that directory and try again."));
|
|
9595
10146
|
process.exit(1);
|
|
9596
10147
|
}
|
|
9597
10148
|
const appDirectoryPath = await writeApplicationToDisk(selectedApp.name, selectedApp.sourceCode, currentDir);
|
|
9598
|
-
const [assets, mmConfiguration] = await Promise.all([getLibraryAssets(
|
|
10149
|
+
const [assets, mmConfiguration] = await Promise.all([getLibraryAssets(connection), getMmConfiguration(connection)]);
|
|
9599
10150
|
if (assets !== undefined) {
|
|
9600
10151
|
await writeReadonlyJsonFile(appDirectoryPath, ".vention-design-scene-assets.json", assets);
|
|
9601
10152
|
}
|
|
9602
10153
|
await writeReadonlyJsonFile(appDirectoryPath, ".vention-design-configuration.json", mmConfiguration);
|
|
9603
10154
|
await writeMachineCodeAppDirectoryInfo(appDirectoryPath, {
|
|
9604
10155
|
appName: selectedApp.name,
|
|
9605
|
-
designId: selectedDesign.id,
|
|
10156
|
+
designId: selection.selectedDesign.id,
|
|
9606
10157
|
applicationId: selectedApp.id,
|
|
9607
10158
|
lastPulledAt: new Date().toISOString(),
|
|
9608
10159
|
environment: session.environment,
|
|
9609
|
-
uuid: selectedApp.uuid
|
|
10160
|
+
uuid: selectedApp.uuid,
|
|
10161
|
+
syncedFiles: fingerprintFiles(selectedApp.sourceCode, getDefaultIgnorePatterns())
|
|
9610
10162
|
});
|
|
9611
10163
|
console.log();
|
|
9612
10164
|
console.log(chalk.green(`✅ Successfully pulled "${selectedApp.name}" to: ${appDirectoryPath}`));
|
|
@@ -9614,17 +10166,32 @@ const createNewAppDirectory = async (session, currentDir) => {
|
|
|
9614
10166
|
console.log(chalk.cyan(`cd "${safeFileName}"`));
|
|
9615
10167
|
console.log(chalk.blue("💡 You can now start working on your application!"));
|
|
9616
10168
|
};
|
|
9617
|
-
const updateExistingAppDirectory = async (session, machineCodeAppDirectoryInfo, currentDir
|
|
10169
|
+
const updateExistingAppDirectory = async (session, machineCodeAppDirectoryInfo, currentDir, {
|
|
10170
|
+
force: _force = false
|
|
10171
|
+
} = {}) => {
|
|
9618
10172
|
console.log(chalk.blue(`Found existing project: ${machineCodeAppDirectoryInfo.appName}`));
|
|
9619
10173
|
console.log(chalk.blue(`Design ID: ${machineCodeAppDirectoryInfo.designId}, App ID: ${machineCodeAppDirectoryInfo.applicationId}`));
|
|
9620
|
-
const
|
|
9621
|
-
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
|
|
10174
|
+
const {
|
|
10175
|
+
app: appWithSourceCode,
|
|
10176
|
+
connection
|
|
10177
|
+
} = await getAppFromDigitalTwins(session, machineCodeAppDirectoryInfo.designId, machineCodeAppDirectoryInfo);
|
|
10178
|
+
exitWithoutSourceCode(appWithSourceCode);
|
|
10179
|
+
const ignorePatterns = getDefaultIgnorePatterns();
|
|
10180
|
+
const remoteFiles = fingerprintFiles(appWithSourceCode.sourceCode, ignorePatterns);
|
|
10181
|
+
if (machineCodeAppDirectoryInfo.syncedFiles && !_force) {
|
|
10182
|
+
const localEdits = filesAtRisk({
|
|
10183
|
+
synced: machineCodeAppDirectoryInfo.syncedFiles,
|
|
10184
|
+
target: fingerprintFiles(serializeFileSystem(currentDir, ignorePatterns), ignorePatterns),
|
|
10185
|
+
incoming: remoteFiles,
|
|
10186
|
+
replacesTarget: false
|
|
10187
|
+
});
|
|
10188
|
+
if (localEdits.length > 0) {
|
|
10189
|
+
console.log("These files changed here since your last pull:");
|
|
10190
|
+
localEdits.forEach(filePath => console.log(` ${filePath}`));
|
|
10191
|
+
console.log("To keep them, run 'vention push' first. To throw them away, run 'vention pull --force'.");
|
|
10192
|
+
process.exit(1);
|
|
10193
|
+
}
|
|
9626
10194
|
}
|
|
9627
|
-
const appWithSourceCode = await getAppFromDigitalTwin(connection, machineCodeAppDirectoryInfo);
|
|
9628
10195
|
await writeApplicationToDisk(appWithSourceCode.name, appWithSourceCode.sourceCode, currentDir, true);
|
|
9629
10196
|
const [assets, mmConfiguration] = await Promise.all([getLibraryAssets(connection), getMmConfiguration(connection)]);
|
|
9630
10197
|
if (assets !== undefined) {
|
|
@@ -9632,24 +10199,32 @@ const updateExistingAppDirectory = async (session, machineCodeAppDirectoryInfo,
|
|
|
9632
10199
|
}
|
|
9633
10200
|
await writeReadonlyJsonFile(currentDir, ".vention-design-configuration.json", mmConfiguration);
|
|
9634
10201
|
await writeMachineCodeAppDirectoryInfo(currentDir, Object.assign(Object.assign({}, machineCodeAppDirectoryInfo), {
|
|
9635
|
-
lastPulledAt: new Date().toISOString()
|
|
10202
|
+
lastPulledAt: new Date().toISOString(),
|
|
10203
|
+
syncedFiles: remoteFiles
|
|
9636
10204
|
}));
|
|
9637
10205
|
console.log();
|
|
9638
10206
|
console.log(chalk.green(`✅ Successfully pulled "${appWithSourceCode.name}" to: ${currentDir}`));
|
|
9639
10207
|
console.log(chalk.blue("💡 Your project has been updated with the latest changes!"));
|
|
9640
10208
|
};
|
|
9641
|
-
const linkDirectory = async (session, currentDir) => {
|
|
10209
|
+
const linkDirectory = async (session, currentDir, flags) => {
|
|
9642
10210
|
const {
|
|
9643
10211
|
selectedDesign,
|
|
9644
10212
|
selectedApp
|
|
9645
|
-
} = await selectDesignAndApp(session);
|
|
10213
|
+
} = await selectDesignAndApp(session, flags);
|
|
10214
|
+
const {
|
|
10215
|
+
app: designCopy
|
|
10216
|
+
} = await getAppFromDigitalTwins(session, selectedDesign.id, {
|
|
10217
|
+
applicationId: selectedApp.id,
|
|
10218
|
+
appName: selectedApp.name
|
|
10219
|
+
});
|
|
9646
10220
|
await writeMachineCodeAppDirectoryInfo(currentDir, {
|
|
9647
10221
|
appName: selectedApp.name,
|
|
9648
10222
|
designId: selectedDesign.id,
|
|
9649
10223
|
applicationId: selectedApp.id,
|
|
9650
10224
|
lastPulledAt: new Date().toISOString(),
|
|
9651
10225
|
environment: session.environment,
|
|
9652
|
-
uuid: selectedApp.uuid
|
|
10226
|
+
uuid: selectedApp.uuid,
|
|
10227
|
+
syncedFiles: designCopy.sourceCode ? fingerprintFiles(designCopy.sourceCode, getDefaultIgnorePatterns()) : {}
|
|
9653
10228
|
});
|
|
9654
10229
|
console.log(chalk.green(`Successfully linked current directory to design "${selectedDesign.name}" (ID: ${selectedDesign.id})`));
|
|
9655
10230
|
console.log(chalk.green(`Application: "${selectedApp.name}" (ID: ${selectedApp.id})`));
|
|
@@ -9658,394 +10233,118 @@ const linkDirectory = async (session, currentDir) => {
|
|
|
9658
10233
|
selectedApp
|
|
9659
10234
|
};
|
|
9660
10235
|
};
|
|
9661
|
-
const
|
|
9662
|
-
|
|
9663
|
-
|
|
9664
|
-
console.log();
|
|
9665
|
-
console.log(chalk.yellow("No running digital twins found. Please open a design and navigate to the machine logic tab to activate a digital twin."));
|
|
9666
|
-
process.exit(1);
|
|
9667
|
-
}
|
|
9668
|
-
const selectedDesign = await select({
|
|
9669
|
-
message: "Select a design:",
|
|
9670
|
-
choices: designs.map(design => ({
|
|
9671
|
-
name: `${design.name} (ID: ${design.id})`,
|
|
9672
|
-
value: design
|
|
9673
|
-
}))
|
|
9674
|
-
});
|
|
9675
|
-
const availableApps = await getAvailableAppsFromDigitalTwin(selectedDesign.connection);
|
|
9676
|
-
if (availableApps.length === 0) {
|
|
9677
|
-
console.log();
|
|
9678
|
-
console.log(chalk.yellow("No machine code applications found in the digital twin"));
|
|
9679
|
-
process.exit(1);
|
|
9680
|
-
}
|
|
9681
|
-
const selectedApp = await select({
|
|
9682
|
-
message: "Select an application:",
|
|
9683
|
-
choices: availableApps.map(app => ({
|
|
9684
|
-
name: app.name,
|
|
9685
|
-
value: app
|
|
9686
|
-
}))
|
|
9687
|
-
});
|
|
9688
|
-
return {
|
|
9689
|
-
selectedDesign,
|
|
9690
|
-
selectedApp
|
|
9691
|
-
};
|
|
10236
|
+
const printOpenDesigns = designs => {
|
|
10237
|
+
console.log("Open designs:");
|
|
10238
|
+
designs.forEach(design => console.log(` ${design.name} (ID: ${design.id})`));
|
|
9692
10239
|
};
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
|
|
9696
|
-
try {
|
|
9697
|
-
const session = await loadSession();
|
|
9698
|
-
if (!session) {
|
|
9699
|
-
console.error(chalk.red("Not logged in. Please run 'vention login' first."));
|
|
9700
|
-
process.exit(1);
|
|
9701
|
-
}
|
|
9702
|
-
const currentDir = process.cwd();
|
|
9703
|
-
console.log();
|
|
9704
|
-
await linkDirectory(session, currentDir);
|
|
9705
|
-
console.log(chalk.blue("You can now use 'vention pull' to download app content or 'vention push' to upload local changes."));
|
|
9706
|
-
} catch (error) {
|
|
9707
|
-
handleCommandError(error, "Failed to link directory");
|
|
9708
|
-
}
|
|
9709
|
-
});
|
|
9710
|
-
}
|
|
9711
|
-
|
|
9712
|
-
var DESCRIPTORS$1 = descriptors;
|
|
9713
|
-
var globalThis$1 = globalThis_1;
|
|
9714
|
-
var uncurryThis$5 = functionUncurryThis;
|
|
9715
|
-
var isForced = isForced_1;
|
|
9716
|
-
var inheritIfRequired = inheritIfRequired$4;
|
|
9717
|
-
var createNonEnumerableProperty = createNonEnumerableProperty$d;
|
|
9718
|
-
var create = objectCreate;
|
|
9719
|
-
var getOwnPropertyNames = objectGetOwnPropertyNames.f;
|
|
9720
|
-
var isPrototypeOf = objectIsPrototypeOf;
|
|
9721
|
-
var isRegExp = isRegexp;
|
|
9722
|
-
var toString$6 = toString$h;
|
|
9723
|
-
var getRegExpFlags$1 = regexpGetFlags;
|
|
9724
|
-
var stickyHelpers = regexpStickyHelpers;
|
|
9725
|
-
var proxyAccessor = proxyAccessor$2;
|
|
9726
|
-
var defineBuiltIn$1 = defineBuiltIn$a;
|
|
9727
|
-
var fails$3 = fails$F;
|
|
9728
|
-
var hasOwn = hasOwnProperty_1;
|
|
9729
|
-
var enforceInternalState = internalState.enforce;
|
|
9730
|
-
var setSpecies = setSpecies$4;
|
|
9731
|
-
var wellKnownSymbol = wellKnownSymbol$n;
|
|
9732
|
-
var UNSUPPORTED_DOT_ALL$1 = regexpUnsupportedDotAll;
|
|
9733
|
-
var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
9734
|
-
|
|
9735
|
-
var MATCH = wellKnownSymbol('match');
|
|
9736
|
-
var NativeRegExp = globalThis$1.RegExp;
|
|
9737
|
-
var RegExpPrototype$2 = NativeRegExp.prototype;
|
|
9738
|
-
var SyntaxError$1 = globalThis$1.SyntaxError;
|
|
9739
|
-
var exec = uncurryThis$5(RegExpPrototype$2.exec);
|
|
9740
|
-
var charAt$1 = uncurryThis$5(''.charAt);
|
|
9741
|
-
var replace$1 = uncurryThis$5(''.replace);
|
|
9742
|
-
var stringIndexOf = uncurryThis$5(''.indexOf);
|
|
9743
|
-
var stringSlice$2 = uncurryThis$5(''.slice);
|
|
9744
|
-
// TODO: Use only proper RegExpIdentifierName
|
|
9745
|
-
var IS_NCG = /^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/;
|
|
9746
|
-
var re1 = /a/g;
|
|
9747
|
-
var re2 = /a/g;
|
|
9748
|
-
|
|
9749
|
-
// "new" should create a new object, old webkit bug
|
|
9750
|
-
var CORRECT_NEW = new NativeRegExp(re1) !== re1;
|
|
9751
|
-
|
|
9752
|
-
var MISSED_STICKY = stickyHelpers.MISSED_STICKY;
|
|
9753
|
-
var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
|
|
9754
|
-
|
|
9755
|
-
var BASE_FORCED = DESCRIPTORS$1 &&
|
|
9756
|
-
(!CORRECT_NEW || MISSED_STICKY || UNSUPPORTED_DOT_ALL$1 || UNSUPPORTED_NCG || fails$3(function () {
|
|
9757
|
-
re2[MATCH] = false;
|
|
9758
|
-
// RegExp constructor can alter flags and IsRegExp works correct with @@match
|
|
9759
|
-
// eslint-disable-next-line sonarjs/inconsistent-function-call -- required for testing
|
|
9760
|
-
return NativeRegExp(re1) !== re1 || NativeRegExp(re2) === re2 || String(NativeRegExp(re1, 'i')) !== '/a/i';
|
|
9761
|
-
}));
|
|
9762
|
-
|
|
9763
|
-
var handleDotAll = function (string) {
|
|
9764
|
-
var length = string.length;
|
|
9765
|
-
var index = 0;
|
|
9766
|
-
var result = '';
|
|
9767
|
-
var brackets = false;
|
|
9768
|
-
var chr;
|
|
9769
|
-
for (; index < length; index++) {
|
|
9770
|
-
chr = charAt$1(string, index);
|
|
9771
|
-
if (chr === '\\') {
|
|
9772
|
-
result += chr + charAt$1(string, ++index);
|
|
9773
|
-
continue;
|
|
9774
|
-
}
|
|
9775
|
-
if (!brackets && chr === '.') {
|
|
9776
|
-
result += '[\\s\\S]';
|
|
9777
|
-
} else {
|
|
9778
|
-
if (chr === '[') {
|
|
9779
|
-
brackets = true;
|
|
9780
|
-
} else if (chr === ']') {
|
|
9781
|
-
brackets = false;
|
|
9782
|
-
} result += chr;
|
|
9783
|
-
}
|
|
9784
|
-
} return result;
|
|
10240
|
+
const printApps = (designName, apps) => {
|
|
10241
|
+
console.log(`Applications in "${designName}":`);
|
|
10242
|
+
apps.forEach(app => console.log(` ${app.name}`));
|
|
9785
10243
|
};
|
|
9786
|
-
|
|
9787
|
-
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
|
|
9792
|
-
|
|
9793
|
-
var brackets = false;
|
|
9794
|
-
var ncg = false;
|
|
9795
|
-
var groupid = 0;
|
|
9796
|
-
var groupname = '';
|
|
9797
|
-
var chr;
|
|
9798
|
-
for (; index < length; index++) {
|
|
9799
|
-
chr = charAt$1(string, index);
|
|
9800
|
-
if (chr === '\\') {
|
|
9801
|
-
chr += charAt$1(string, ++index);
|
|
9802
|
-
// use `\x5c` for escaped backslash to avoid corruption by `\k<name>` to `\N` replacement below
|
|
9803
|
-
if (!ncg && charAt$1(chr, 1) === '\\') {
|
|
9804
|
-
result += '\\x5c';
|
|
9805
|
-
continue;
|
|
9806
|
-
}
|
|
9807
|
-
} else if (chr === ']') {
|
|
9808
|
-
brackets = false;
|
|
9809
|
-
} else if (!brackets) switch (true) {
|
|
9810
|
-
case chr === '[':
|
|
9811
|
-
brackets = true;
|
|
9812
|
-
break;
|
|
9813
|
-
case chr === '(':
|
|
9814
|
-
result += chr;
|
|
9815
|
-
if (exec(IS_NCG, stringSlice$2(string, index + 1))) {
|
|
9816
|
-
index += 2;
|
|
9817
|
-
ncg = true;
|
|
9818
|
-
groupid++;
|
|
9819
|
-
} else if (charAt$1(string, index + 1) !== '?') {
|
|
9820
|
-
groupid++;
|
|
9821
|
-
}
|
|
9822
|
-
continue;
|
|
9823
|
-
case chr === '>' && ncg:
|
|
9824
|
-
if (groupname === '' || hasOwn(names, groupname)) {
|
|
9825
|
-
throw new SyntaxError$1('Invalid capture group name');
|
|
9826
|
-
}
|
|
9827
|
-
names[groupname] = true;
|
|
9828
|
-
named[named.length] = [groupname, groupid];
|
|
9829
|
-
ncg = false;
|
|
9830
|
-
groupname = '';
|
|
9831
|
-
continue;
|
|
9832
|
-
}
|
|
9833
|
-
if (ncg) groupname += chr;
|
|
9834
|
-
else result += chr;
|
|
10244
|
+
const pickDesign = async (designs, designFlag) => {
|
|
10245
|
+
if (designFlag !== undefined) {
|
|
10246
|
+
const flagged = designs.find(design => design.id === designFlag);
|
|
10247
|
+
if (flagged) return flagged;
|
|
10248
|
+
console.log(chalk.yellow(`Design ${designFlag} isn't open on its MachineLogic tab.`));
|
|
10249
|
+
printOpenDesigns(designs);
|
|
10250
|
+
process.exit(1);
|
|
9835
10251
|
}
|
|
9836
|
-
|
|
9837
|
-
|
|
9838
|
-
|
|
9839
|
-
|
|
9840
|
-
|
|
9841
|
-
|
|
9842
|
-
|
|
9843
|
-
|
|
10252
|
+
if (designs.length === 1) {
|
|
10253
|
+
console.log(`Using design "${designs[0].name}" (ID: ${designs[0].id}).`);
|
|
10254
|
+
return designs[0];
|
|
10255
|
+
}
|
|
10256
|
+
if (process.stdin.isTTY) {
|
|
10257
|
+
return select({
|
|
10258
|
+
message: "Select a design:",
|
|
10259
|
+
choices: designs.map(design => ({
|
|
10260
|
+
name: `${design.name} (ID: ${design.id})`,
|
|
10261
|
+
value: design
|
|
10262
|
+
}))
|
|
10263
|
+
});
|
|
10264
|
+
}
|
|
10265
|
+
printOpenDesigns(designs);
|
|
10266
|
+
console.log("Run the command again with --design <id>.");
|
|
10267
|
+
process.exit(1);
|
|
9844
10268
|
};
|
|
9845
|
-
|
|
9846
|
-
|
|
9847
|
-
|
|
9848
|
-
|
|
9849
|
-
|
|
9850
|
-
|
|
9851
|
-
|
|
9852
|
-
|
|
9853
|
-
var groups = [];
|
|
9854
|
-
var rawPattern = pattern;
|
|
9855
|
-
var rawFlags, dotAll, sticky, handled, result, state;
|
|
9856
|
-
|
|
9857
|
-
if (!thisIsRegExp && patternIsRegExp && flagsAreUndefined && pattern.constructor === RegExpWrapper) {
|
|
9858
|
-
return pattern;
|
|
9859
|
-
}
|
|
9860
|
-
|
|
9861
|
-
if (patternIsRegExp || isPrototypeOf(RegExpPrototype$2, pattern)) {
|
|
9862
|
-
pattern = pattern.source;
|
|
9863
|
-
if (flagsAreUndefined) flags = getRegExpFlags$1(rawPattern);
|
|
9864
|
-
}
|
|
9865
|
-
|
|
9866
|
-
pattern = pattern === undefined ? '' : toString$6(pattern);
|
|
9867
|
-
flags = flags === undefined ? '' : toString$6(flags);
|
|
9868
|
-
rawPattern = pattern;
|
|
9869
|
-
|
|
9870
|
-
if (UNSUPPORTED_DOT_ALL$1 && 'dotAll' in re1) {
|
|
9871
|
-
dotAll = !!flags && stringIndexOf(flags, 's') > -1;
|
|
9872
|
-
if (dotAll) flags = replace$1(flags, /s/g, '');
|
|
9873
|
-
}
|
|
9874
|
-
|
|
9875
|
-
rawFlags = flags;
|
|
9876
|
-
|
|
9877
|
-
if (MISSED_STICKY && 'sticky' in re1) {
|
|
9878
|
-
sticky = !!flags && stringIndexOf(flags, 'y') > -1;
|
|
9879
|
-
if (sticky && UNSUPPORTED_Y) flags = replace$1(flags, /y/g, '');
|
|
9880
|
-
}
|
|
9881
|
-
|
|
9882
|
-
if (UNSUPPORTED_NCG) {
|
|
9883
|
-
handled = handleNCG(pattern);
|
|
9884
|
-
pattern = handled[0];
|
|
9885
|
-
groups = handled[1];
|
|
9886
|
-
}
|
|
9887
|
-
|
|
9888
|
-
result = inheritIfRequired(NativeRegExp(pattern, flags), thisIsRegExp ? this : RegExpPrototype$2, RegExpWrapper);
|
|
9889
|
-
|
|
9890
|
-
if (dotAll || sticky || groups.length) {
|
|
9891
|
-
state = enforceInternalState(result);
|
|
9892
|
-
if (dotAll) {
|
|
9893
|
-
state.dotAll = true;
|
|
9894
|
-
state.raw = RegExpWrapper(handleDotAll(pattern), rawFlags);
|
|
9895
|
-
}
|
|
9896
|
-
if (sticky) state.sticky = true;
|
|
9897
|
-
if (groups.length) state.groups = groups;
|
|
9898
|
-
}
|
|
9899
|
-
|
|
9900
|
-
if (pattern !== rawPattern) try {
|
|
9901
|
-
// fails in old engines, but we have no alternatives for unsupported regex syntax
|
|
9902
|
-
createNonEnumerableProperty(result, 'source', rawPattern === '' ? '(?:)' : rawPattern);
|
|
9903
|
-
} catch (error) { /* empty */ }
|
|
9904
|
-
|
|
9905
|
-
return result;
|
|
9906
|
-
};
|
|
9907
|
-
|
|
9908
|
-
for (var keys = getOwnPropertyNames(NativeRegExp), index = 0; keys.length > index;) {
|
|
9909
|
-
proxyAccessor(RegExpWrapper, NativeRegExp, keys[index++]);
|
|
10269
|
+
const pickApp = async (designName, apps, appFlag) => {
|
|
10270
|
+
var _a;
|
|
10271
|
+
if (appFlag !== undefined) {
|
|
10272
|
+
const flagged = (_a = apps.find(app => app.name === appFlag)) !== null && _a !== void 0 ? _a : apps.find(app => app.id === appFlag);
|
|
10273
|
+
if (flagged) return flagged;
|
|
10274
|
+
console.log(chalk.yellow(`No application called "${appFlag}" in "${designName}".`));
|
|
10275
|
+
printApps(designName, apps);
|
|
10276
|
+
process.exit(1);
|
|
9910
10277
|
}
|
|
9911
|
-
|
|
9912
|
-
|
|
9913
|
-
|
|
9914
|
-
|
|
9915
|
-
|
|
9916
|
-
|
|
9917
|
-
|
|
9918
|
-
|
|
9919
|
-
|
|
9920
|
-
|
|
9921
|
-
|
|
9922
|
-
|
|
9923
|
-
var defineBuiltInAccessor = defineBuiltInAccessor$9;
|
|
9924
|
-
var getInternalState = internalState.get;
|
|
9925
|
-
|
|
9926
|
-
var RegExpPrototype$1 = RegExp.prototype;
|
|
9927
|
-
var $TypeError = TypeError;
|
|
9928
|
-
|
|
9929
|
-
// `RegExp.prototype.dotAll` getter
|
|
9930
|
-
// https://tc39.es/ecma262/#sec-get-regexp.prototype.dotall
|
|
9931
|
-
if (DESCRIPTORS && UNSUPPORTED_DOT_ALL) {
|
|
9932
|
-
defineBuiltInAccessor(RegExpPrototype$1, 'dotAll', {
|
|
9933
|
-
configurable: true,
|
|
9934
|
-
get: function dotAll() {
|
|
9935
|
-
if (this === RegExpPrototype$1) return;
|
|
9936
|
-
// We can't use InternalStateModule.getterFor because
|
|
9937
|
-
// we don't add metadata for regexps created by a literal.
|
|
9938
|
-
if (classof(this) === 'RegExp') {
|
|
9939
|
-
return !!getInternalState(this).dotAll;
|
|
9940
|
-
}
|
|
9941
|
-
throw new $TypeError('Incompatible receiver, RegExp required');
|
|
9942
|
-
}
|
|
9943
|
-
});
|
|
9944
|
-
}
|
|
9945
|
-
|
|
9946
|
-
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
9947
|
-
|
|
9948
|
-
var $$8 = _export;
|
|
9949
|
-
var call$1 = functionCall;
|
|
9950
|
-
var isCallable = isCallable$s;
|
|
9951
|
-
var anObject$2 = anObject$p;
|
|
9952
|
-
var toString$5 = toString$h;
|
|
9953
|
-
|
|
9954
|
-
var DELEGATES_TO_EXEC = function () {
|
|
9955
|
-
var execCalled = false;
|
|
9956
|
-
var re = /[ac]/;
|
|
9957
|
-
re.exec = function () {
|
|
9958
|
-
execCalled = true;
|
|
9959
|
-
return /./.exec.apply(this, arguments);
|
|
9960
|
-
};
|
|
9961
|
-
return re.test('abc') === true && execCalled;
|
|
9962
|
-
}();
|
|
9963
|
-
|
|
9964
|
-
var nativeTest = /./.test;
|
|
9965
|
-
|
|
9966
|
-
// `RegExp.prototype.test` method
|
|
9967
|
-
// https://tc39.es/ecma262/#sec-regexp.prototype.test
|
|
9968
|
-
$$8({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
|
|
9969
|
-
test: function (S) {
|
|
9970
|
-
var R = anObject$2(this);
|
|
9971
|
-
var string = toString$5(S);
|
|
9972
|
-
var exec = R.exec;
|
|
9973
|
-
if (!isCallable(exec)) return call$1(nativeTest, R, string);
|
|
9974
|
-
var result = call$1(exec, R, string);
|
|
9975
|
-
if (result === null) return false;
|
|
9976
|
-
anObject$2(result);
|
|
9977
|
-
return true;
|
|
10278
|
+
if (apps.length === 1) {
|
|
10279
|
+
console.log(`Using application "${apps[0].name}".`);
|
|
10280
|
+
return apps[0];
|
|
10281
|
+
}
|
|
10282
|
+
if (process.stdin.isTTY) {
|
|
10283
|
+
return select({
|
|
10284
|
+
message: "Select an application:",
|
|
10285
|
+
choices: apps.map(app => ({
|
|
10286
|
+
name: app.name,
|
|
10287
|
+
value: app
|
|
10288
|
+
}))
|
|
10289
|
+
});
|
|
9978
10290
|
}
|
|
9979
|
-
|
|
9980
|
-
|
|
9981
|
-
|
|
9982
|
-
|
|
9983
|
-
|
|
9984
|
-
|
|
9985
|
-
|
|
9986
|
-
|
|
9987
|
-
|
|
9988
|
-
|
|
9989
|
-
|
|
9990
|
-
|
|
9991
|
-
|
|
9992
|
-
|
|
9993
|
-
|
|
9994
|
-
|
|
9995
|
-
|
|
9996
|
-
|
|
9997
|
-
|
|
9998
|
-
|
|
9999
|
-
|
|
10000
|
-
|
|
10001
|
-
|
|
10002
|
-
|
|
10003
|
-
return '/' + pattern + '/' + flags;
|
|
10004
|
-
}, { unsafe: true });
|
|
10005
|
-
}
|
|
10291
|
+
printApps(designName, apps);
|
|
10292
|
+
console.log('Run the command again with --app "<name>".');
|
|
10293
|
+
process.exit(1);
|
|
10294
|
+
};
|
|
10295
|
+
const selectDesignAndApp = async (session, flags = {}) => {
|
|
10296
|
+
const designs = await listDesigns(session);
|
|
10297
|
+
if (designs.length === 0) {
|
|
10298
|
+
console.log();
|
|
10299
|
+
console.log(chalk.yellow("No design is open on its MachineLogic tab. Open your design in MachineBuilder, click the MachineLogic tab and keep that browser tab open. If you just opened it, wait about a minute while it starts, then run this again."));
|
|
10300
|
+
process.exit(1);
|
|
10301
|
+
}
|
|
10302
|
+
const selectedDesign = await pickDesign(designs, flags.design);
|
|
10303
|
+
const availableApps = await getAvailableAppsFromDigitalTwin(selectedDesign.connection);
|
|
10304
|
+
if (availableApps.length === 0) {
|
|
10305
|
+
console.log();
|
|
10306
|
+
console.log(chalk.yellow("This design has no MachineLogic application yet. On MachineLogic's Home page, click Create app and choose Python, then run this again."));
|
|
10307
|
+
process.exit(1);
|
|
10308
|
+
}
|
|
10309
|
+
const selectedApp = await pickApp(selectedDesign.name, availableApps, flags.app);
|
|
10310
|
+
return {
|
|
10311
|
+
selectedDesign,
|
|
10312
|
+
selectedApp
|
|
10313
|
+
};
|
|
10314
|
+
};
|
|
10006
10315
|
|
|
10007
|
-
|
|
10008
|
-
|
|
10009
|
-
|
|
10010
|
-
function shouldIgnoreFileSystemNode(nodeName, ignoredNodes) {
|
|
10011
|
-
for (const pattern of ignoredNodes) {
|
|
10012
|
-
if (typeof pattern === "string" && nodeName === pattern) {
|
|
10013
|
-
return true;
|
|
10014
|
-
}
|
|
10015
|
-
if (pattern instanceof RegExp && pattern.test(nodeName)) {
|
|
10016
|
-
return true;
|
|
10017
|
-
}
|
|
10316
|
+
const parseDesignId = value => {
|
|
10317
|
+
if (!/^\d+$/.test(value)) {
|
|
10318
|
+
throw new InvalidArgumentError("--design takes a design ID number");
|
|
10018
10319
|
}
|
|
10019
|
-
return
|
|
10020
|
-
}
|
|
10320
|
+
return Number(value);
|
|
10321
|
+
};
|
|
10322
|
+
const addSelectionOptions = command => command.option("--design <id>", "ID of the open design to use", parseDesignId).option("--app <name>", "Name or ID of the application to use");
|
|
10021
10323
|
|
|
10022
|
-
|
|
10023
|
-
|
|
10024
|
-
|
|
10025
|
-
|
|
10026
|
-
|
|
10027
|
-
|
|
10028
|
-
|
|
10029
|
-
|
|
10030
|
-
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
|
|
10034
|
-
|
|
10035
|
-
|
|
10036
|
-
|
|
10037
|
-
} else if (directoryItemInformation.isFile()) {
|
|
10038
|
-
// Always read as binary and encode to base64 - this is the safest approach
|
|
10039
|
-
// and ensures all file types are handled correctly
|
|
10040
|
-
const buffer = fs.readFileSync(fullPath);
|
|
10041
|
-
fileSystemNode[directoryItem] = buffer.toString("base64");
|
|
10324
|
+
function createLinkCommand() {
|
|
10325
|
+
const command = new Command("link").description("Link current directory to a Vention design application");
|
|
10326
|
+
return addSelectionOptions(command).action(async flags => {
|
|
10327
|
+
try {
|
|
10328
|
+
const session = await loadSession();
|
|
10329
|
+
if (!session) {
|
|
10330
|
+
console.error(chalk.red("Not logged in. Please run 'vention login' first."));
|
|
10331
|
+
process.exit(1);
|
|
10332
|
+
}
|
|
10333
|
+
const currentDir = process.cwd();
|
|
10334
|
+
console.log();
|
|
10335
|
+
await linkDirectory(session, currentDir, flags);
|
|
10336
|
+
console.log(chalk.blue("You can now use 'vention pull' to download app content or 'vention push' to upload local changes."));
|
|
10337
|
+
} catch (error) {
|
|
10338
|
+
handleCommandError(error, "Failed to link directory");
|
|
10042
10339
|
}
|
|
10043
10340
|
});
|
|
10044
|
-
return fileSystemNode;
|
|
10045
10341
|
}
|
|
10046
10342
|
|
|
10047
10343
|
function createPushCommand() {
|
|
10048
|
-
|
|
10344
|
+
const command = new Command("push").description("Push local changes from this directory to the linked digital twin").option("--force", "Replace files changed on the design since the last pull or push");
|
|
10345
|
+
return command.action(async ({
|
|
10346
|
+
force
|
|
10347
|
+
}) => {
|
|
10049
10348
|
try {
|
|
10050
10349
|
const session = await loadSession();
|
|
10051
10350
|
if (!session) {
|
|
@@ -10054,8 +10353,11 @@ function createPushCommand() {
|
|
|
10054
10353
|
}
|
|
10055
10354
|
const currentDir = process.cwd();
|
|
10056
10355
|
const machineCodeAppDirectoryInfo = await readMachineCodeAppDirectoryInfo(currentDir);
|
|
10057
|
-
let linkedConnection;
|
|
10058
10356
|
if (!machineCodeAppDirectoryInfo) {
|
|
10357
|
+
if (!process.stdin.isTTY) {
|
|
10358
|
+
console.log("This folder isn't linked to a Vention application yet. Run 'vention link --design <id> --app <name>' here first, or 'vention pull' to download one into a new folder.");
|
|
10359
|
+
process.exit(1);
|
|
10360
|
+
}
|
|
10059
10361
|
console.log();
|
|
10060
10362
|
console.log(chalk.yellow("This directory is not linked to a Vention application."));
|
|
10061
10363
|
const shouldLink = await select({
|
|
@@ -10072,10 +10374,7 @@ function createPushCommand() {
|
|
|
10072
10374
|
console.log(chalk.blue("Push operation cancelled. Run 'vention link' when you're ready to link this directory."));
|
|
10073
10375
|
process.exit(0);
|
|
10074
10376
|
}
|
|
10075
|
-
|
|
10076
|
-
selectedDesign
|
|
10077
|
-
} = await linkDirectory(session, currentDir);
|
|
10078
|
-
linkedConnection = selectedDesign.connection;
|
|
10377
|
+
await linkDirectory(session, currentDir);
|
|
10079
10378
|
console.log(chalk.blue("Continuing with push operation..."));
|
|
10080
10379
|
}
|
|
10081
10380
|
const updatedMachineCodeAppDirectoryInfo = await readMachineCodeAppDirectoryInfo(currentDir);
|
|
@@ -10086,8 +10385,8 @@ function createPushCommand() {
|
|
|
10086
10385
|
console.log();
|
|
10087
10386
|
console.log(chalk.blue(`Pushing changes for project: ${updatedMachineCodeAppDirectoryInfo.appName}`));
|
|
10088
10387
|
console.log(chalk.blue(`Design ID: ${updatedMachineCodeAppDirectoryInfo.designId}, App ID: ${updatedMachineCodeAppDirectoryInfo.applicationId}`));
|
|
10089
|
-
const
|
|
10090
|
-
if (
|
|
10388
|
+
const connections = await resolveDigitalTwinConnections(session, updatedMachineCodeAppDirectoryInfo.designId);
|
|
10389
|
+
if (connections.length === 0) {
|
|
10091
10390
|
console.log();
|
|
10092
10391
|
console.error(chalk.red("Sorry, it seems you do not have that design open with the MachineLogic tab selected."));
|
|
10093
10392
|
console.error(chalk.red("Please go to your browser, open your design, and navigate to the MachineLogic page."));
|
|
@@ -10097,6 +10396,28 @@ function createPushCommand() {
|
|
|
10097
10396
|
console.log(chalk.blue("Serializing local files..."));
|
|
10098
10397
|
const ignorePatterns = getDefaultIgnorePatterns();
|
|
10099
10398
|
const serializedSourceCode = serializeFileSystem(currentDir, ignorePatterns);
|
|
10399
|
+
const localFiles = fingerprintFiles(serializedSourceCode, ignorePatterns);
|
|
10400
|
+
const {
|
|
10401
|
+
syncedFiles
|
|
10402
|
+
} = updatedMachineCodeAppDirectoryInfo;
|
|
10403
|
+
if (syncedFiles && !force) {
|
|
10404
|
+
const remoteSources = await Promise.all(connections.map(async connection => {
|
|
10405
|
+
var _a;
|
|
10406
|
+
return (_a = (await getAllApplicationsWithSourceCode(connection)).find(app => app.id === updatedMachineCodeAppDirectoryInfo.applicationId)) === null || _a === void 0 ? void 0 : _a.sourceCode;
|
|
10407
|
+
}));
|
|
10408
|
+
const designEdits = [...new Set(remoteSources.flatMap(remoteSource => remoteSource ? filesAtRisk({
|
|
10409
|
+
synced: syncedFiles,
|
|
10410
|
+
target: fingerprintFiles(remoteSource, ignorePatterns),
|
|
10411
|
+
incoming: localFiles,
|
|
10412
|
+
replacesTarget: true
|
|
10413
|
+
}) : []))].sort();
|
|
10414
|
+
if (designEdits.length > 0) {
|
|
10415
|
+
console.log("These files changed on the design since your last pull:");
|
|
10416
|
+
designEdits.forEach(filePath => console.log(` ${filePath}`));
|
|
10417
|
+
console.log("To keep them, pull into a new, empty folder with 'vention pull' and copy your changes across. To replace them, run 'vention push --force'.");
|
|
10418
|
+
process.exit(1);
|
|
10419
|
+
}
|
|
10420
|
+
}
|
|
10100
10421
|
const applicationToPush = {
|
|
10101
10422
|
name: updatedMachineCodeAppDirectoryInfo.appName,
|
|
10102
10423
|
id: updatedMachineCodeAppDirectoryInfo.applicationId,
|
|
@@ -10105,12 +10426,13 @@ function createPushCommand() {
|
|
|
10105
10426
|
uuid: updatedMachineCodeAppDirectoryInfo.uuid
|
|
10106
10427
|
};
|
|
10107
10428
|
console.log(chalk.blue("Pushing to digital twin..."));
|
|
10108
|
-
await pushApplicationToDigitalTwin(connection, applicationToPush);
|
|
10429
|
+
await Promise.all(connections.map(connection => pushApplicationToDigitalTwin(connection, applicationToPush)));
|
|
10109
10430
|
await writeMachineCodeAppDirectoryInfo(currentDir, Object.assign(Object.assign({}, updatedMachineCodeAppDirectoryInfo), {
|
|
10110
|
-
lastPushedAt: new Date().toISOString()
|
|
10431
|
+
lastPushedAt: new Date().toISOString(),
|
|
10432
|
+
syncedFiles: localFiles
|
|
10111
10433
|
}));
|
|
10112
10434
|
console.log();
|
|
10113
|
-
console.log(chalk.green(
|
|
10435
|
+
console.log(chalk.green(connections.length === 1 ? "✅ Successfully pushed to digital twin" : `✅ Successfully pushed to the design's ${connections.length} twins`));
|
|
10114
10436
|
console.log(chalk.blue("💡 Your changes have been uploaded!"));
|
|
10115
10437
|
} catch (error) {
|
|
10116
10438
|
handleCommandError(error, "Failed to push application");
|
|
@@ -10119,7 +10441,12 @@ function createPushCommand() {
|
|
|
10119
10441
|
}
|
|
10120
10442
|
|
|
10121
10443
|
function createPullCommand() {
|
|
10122
|
-
|
|
10444
|
+
const command = new Command("pull").description("Pull an application from a design to this directory").option("--force", "Overwrite files changed in this folder since the last pull or push");
|
|
10445
|
+
return addSelectionOptions(command).action(async _a => {
|
|
10446
|
+
var {
|
|
10447
|
+
force
|
|
10448
|
+
} = _a,
|
|
10449
|
+
selection = __rest(_a, ["force"]);
|
|
10123
10450
|
try {
|
|
10124
10451
|
const session = await loadSession();
|
|
10125
10452
|
if (!session) {
|
|
@@ -10129,11 +10456,24 @@ function createPullCommand() {
|
|
|
10129
10456
|
const currentDir = process.cwd();
|
|
10130
10457
|
const machineCodeAppDirectoryInfo = await readMachineCodeAppDirectoryInfo(currentDir);
|
|
10131
10458
|
if (machineCodeAppDirectoryInfo) {
|
|
10132
|
-
|
|
10133
|
-
|
|
10134
|
-
|
|
10459
|
+
const {
|
|
10460
|
+
appName,
|
|
10461
|
+
designId,
|
|
10462
|
+
applicationId
|
|
10463
|
+
} = machineCodeAppDirectoryInfo;
|
|
10464
|
+
const namesOtherDesign = selection.design !== undefined && selection.design !== designId;
|
|
10465
|
+
const namesOtherApp = selection.app !== undefined && selection.app !== appName && selection.app !== applicationId;
|
|
10466
|
+
if (namesOtherDesign || namesOtherApp) {
|
|
10467
|
+
console.log(`This folder is linked to "${appName}" (design ${designId}). To pull a different application, run 'vention pull' in a new, empty folder.`);
|
|
10468
|
+
process.exit(1);
|
|
10469
|
+
}
|
|
10470
|
+
console.log(chalk.blue(`This directory is linked to app: ${appName}`));
|
|
10471
|
+
console.log(chalk.blue(`Pulling latest content from design ID: ${designId}`));
|
|
10472
|
+
await updateExistingAppDirectory(session, machineCodeAppDirectoryInfo, currentDir, {
|
|
10473
|
+
force
|
|
10474
|
+
});
|
|
10135
10475
|
} else {
|
|
10136
|
-
await createNewAppDirectory(session, currentDir);
|
|
10476
|
+
await createNewAppDirectory(session, currentDir, selection);
|
|
10137
10477
|
}
|
|
10138
10478
|
} catch (error) {
|
|
10139
10479
|
handleCommandError(error, "Failed to pull application");
|
|
@@ -10141,15 +10481,15 @@ function createPullCommand() {
|
|
|
10141
10481
|
});
|
|
10142
10482
|
}
|
|
10143
10483
|
|
|
10144
|
-
var $$
|
|
10145
|
-
var toObject = toObject$
|
|
10146
|
-
var lengthOfArrayLike = lengthOfArrayLike$
|
|
10147
|
-
var toIntegerOrInfinity$2 = toIntegerOrInfinity$
|
|
10148
|
-
var addToUnscopables = addToUnscopables$
|
|
10484
|
+
var $$3 = _export;
|
|
10485
|
+
var toObject = toObject$c;
|
|
10486
|
+
var lengthOfArrayLike = lengthOfArrayLike$h;
|
|
10487
|
+
var toIntegerOrInfinity$2 = toIntegerOrInfinity$e;
|
|
10488
|
+
var addToUnscopables = addToUnscopables$5;
|
|
10149
10489
|
|
|
10150
10490
|
// `Array.prototype.at` method
|
|
10151
10491
|
// https://tc39.es/ecma262/#sec-array.prototype.at
|
|
10152
|
-
$$
|
|
10492
|
+
$$3({ target: 'Array', proto: true }, {
|
|
10153
10493
|
at: function at(index) {
|
|
10154
10494
|
var O = toObject(this);
|
|
10155
10495
|
var len = lengthOfArrayLike(O);
|
|
@@ -10161,14 +10501,14 @@ $$7({ target: 'Array', proto: true }, {
|
|
|
10161
10501
|
|
|
10162
10502
|
addToUnscopables('at');
|
|
10163
10503
|
|
|
10164
|
-
var $$
|
|
10165
|
-
var uncurryThis$
|
|
10166
|
-
var requireObjectCoercible$
|
|
10167
|
-
var toIntegerOrInfinity$1 = toIntegerOrInfinity$
|
|
10168
|
-
var toString$
|
|
10504
|
+
var $$2 = _export;
|
|
10505
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
10506
|
+
var requireObjectCoercible$3 = requireObjectCoercible$c;
|
|
10507
|
+
var toIntegerOrInfinity$1 = toIntegerOrInfinity$e;
|
|
10508
|
+
var toString$3 = toString$h;
|
|
10169
10509
|
var fails$1 = fails$F;
|
|
10170
10510
|
|
|
10171
|
-
var charAt = uncurryThis$
|
|
10511
|
+
var charAt = uncurryThis$2(''.charAt);
|
|
10172
10512
|
|
|
10173
10513
|
var FORCED = fails$1(function () {
|
|
10174
10514
|
// eslint-disable-next-line es/no-string-prototype-at -- safe
|
|
@@ -10177,9 +10517,9 @@ var FORCED = fails$1(function () {
|
|
|
10177
10517
|
|
|
10178
10518
|
// `String.prototype.at` method
|
|
10179
10519
|
// https://tc39.es/ecma262/#sec-string.prototype.at
|
|
10180
|
-
$$
|
|
10520
|
+
$$2({ target: 'String', proto: true, forced: FORCED }, {
|
|
10181
10521
|
at: function at(index) {
|
|
10182
|
-
var S = toString$
|
|
10522
|
+
var S = toString$3(requireObjectCoercible$3(this));
|
|
10183
10523
|
var len = S.length;
|
|
10184
10524
|
var relativeIndex = toIntegerOrInfinity$1(index);
|
|
10185
10525
|
var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
|
|
@@ -10349,14 +10689,14 @@ function createLogsCommand() {
|
|
|
10349
10689
|
return;
|
|
10350
10690
|
}
|
|
10351
10691
|
const session = requireSession(await loadSession());
|
|
10352
|
-
const
|
|
10353
|
-
const
|
|
10354
|
-
if (!
|
|
10692
|
+
const linkedApp = await readLinkedApp();
|
|
10693
|
+
const [appTwin] = await findAppTwins(session, linkedApp);
|
|
10694
|
+
if (!appTwin) {
|
|
10355
10695
|
console.error(chalk.red("Sorry, it seems you do not have that design open with the MachineLogic tab selected."));
|
|
10356
10696
|
console.error(chalk.red("Please go to your browser, open your design, and navigate to the MachineLogic page."));
|
|
10357
10697
|
process.exit(1);
|
|
10358
10698
|
}
|
|
10359
|
-
const logs = await getApplicationLogs(connection,
|
|
10699
|
+
const logs = await getApplicationLogs(appTwin.connection, linkedApp.applicationId);
|
|
10360
10700
|
console.log(logs);
|
|
10361
10701
|
} catch (error) {
|
|
10362
10702
|
handleTwinRunError(error, "Failed to fetch application logs");
|
|
@@ -10364,94 +10704,9 @@ function createLogsCommand() {
|
|
|
10364
10704
|
});
|
|
10365
10705
|
}
|
|
10366
10706
|
|
|
10367
|
-
var
|
|
10368
|
-
var
|
|
10369
|
-
var
|
|
10370
|
-
var aCallable$1 = aCallable$l;
|
|
10371
|
-
var anObject = anObject$p;
|
|
10372
|
-
var getIteratorDirect = getIteratorDirect$8;
|
|
10373
|
-
var iteratorClose = iteratorClose$c;
|
|
10374
|
-
var iteratorHelperWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError$6;
|
|
10375
|
-
|
|
10376
|
-
var someWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError('some', TypeError);
|
|
10377
|
-
|
|
10378
|
-
// `Iterator.prototype.some` method
|
|
10379
|
-
// https://tc39.es/ecma262/#sec-iterator.prototype.some
|
|
10380
|
-
$$5({ target: 'Iterator', proto: true, real: true, forced: someWithoutClosingOnEarlyError }, {
|
|
10381
|
-
some: function some(predicate) {
|
|
10382
|
-
anObject(this);
|
|
10383
|
-
try {
|
|
10384
|
-
aCallable$1(predicate);
|
|
10385
|
-
} catch (error) {
|
|
10386
|
-
iteratorClose(this, 'throw', error);
|
|
10387
|
-
}
|
|
10388
|
-
|
|
10389
|
-
if (someWithoutClosingOnEarlyError) return call(someWithoutClosingOnEarlyError, this, predicate);
|
|
10390
|
-
|
|
10391
|
-
var record = getIteratorDirect(this);
|
|
10392
|
-
var counter = 0;
|
|
10393
|
-
return iterate(record, function (value, stop) {
|
|
10394
|
-
if (predicate(value, counter++)) return stop();
|
|
10395
|
-
}, { IS_RECORD: true, INTERRUPTED: true }).stopped;
|
|
10396
|
-
}
|
|
10397
|
-
});
|
|
10398
|
-
|
|
10399
|
-
var uncurryThis$3 = functionUncurryThis;
|
|
10400
|
-
|
|
10401
|
-
// eslint-disable-next-line es/no-map -- safe
|
|
10402
|
-
var MapPrototype = Map.prototype;
|
|
10403
|
-
|
|
10404
|
-
var mapHelpers = {
|
|
10405
|
-
set: uncurryThis$3(MapPrototype.set),
|
|
10406
|
-
get: uncurryThis$3(MapPrototype.get),
|
|
10407
|
-
has: uncurryThis$3(MapPrototype.has),
|
|
10408
|
-
remove: uncurryThis$3(MapPrototype['delete'])};
|
|
10409
|
-
|
|
10410
|
-
var $$4 = _export;
|
|
10411
|
-
var MapHelpers$1 = mapHelpers;
|
|
10412
|
-
var IS_PURE$1 = isPure;
|
|
10413
|
-
|
|
10414
|
-
var get$1 = MapHelpers$1.get;
|
|
10415
|
-
var has$1 = MapHelpers$1.has;
|
|
10416
|
-
var set$1 = MapHelpers$1.set;
|
|
10417
|
-
|
|
10418
|
-
// `Map.prototype.getOrInsert` method
|
|
10419
|
-
// https://tc39.es/ecma262/#sec-map.prototype.getorinsert
|
|
10420
|
-
$$4({ target: 'Map', proto: true, real: true, forced: IS_PURE$1 }, {
|
|
10421
|
-
getOrInsert: function getOrInsert(key, value) {
|
|
10422
|
-
if (has$1(this, key)) return get$1(this, key);
|
|
10423
|
-
set$1(this, key, value);
|
|
10424
|
-
return value;
|
|
10425
|
-
}
|
|
10426
|
-
});
|
|
10427
|
-
|
|
10428
|
-
var $$3 = _export;
|
|
10429
|
-
var aCallable = aCallable$l;
|
|
10430
|
-
var MapHelpers = mapHelpers;
|
|
10431
|
-
var IS_PURE = isPure;
|
|
10432
|
-
|
|
10433
|
-
var get = MapHelpers.get;
|
|
10434
|
-
var has = MapHelpers.has;
|
|
10435
|
-
var set = MapHelpers.set;
|
|
10436
|
-
|
|
10437
|
-
// `Map.prototype.getOrInsertComputed` method
|
|
10438
|
-
// https://tc39.es/ecma262/#sec-map.prototype.getorinsertcomputed
|
|
10439
|
-
$$3({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {
|
|
10440
|
-
getOrInsertComputed: function getOrInsertComputed(key, callbackfn) {
|
|
10441
|
-
var hasKey = has(this, key);
|
|
10442
|
-
aCallable(callbackfn);
|
|
10443
|
-
if (hasKey) return get(this, key);
|
|
10444
|
-
// CanonicalizeKeyedCollectionKey
|
|
10445
|
-
if (key === 0 && 1 / key === -Infinity) key = 0;
|
|
10446
|
-
var value = callbackfn(key);
|
|
10447
|
-
set(this, key, value);
|
|
10448
|
-
return value;
|
|
10449
|
-
}
|
|
10450
|
-
});
|
|
10451
|
-
|
|
10452
|
-
var toIntegerOrInfinity = toIntegerOrInfinity$d;
|
|
10453
|
-
var toString$3 = toString$h;
|
|
10454
|
-
var requireObjectCoercible$3 = requireObjectCoercible$c;
|
|
10707
|
+
var toIntegerOrInfinity = toIntegerOrInfinity$e;
|
|
10708
|
+
var toString$2 = toString$h;
|
|
10709
|
+
var requireObjectCoercible$2 = requireObjectCoercible$c;
|
|
10455
10710
|
|
|
10456
10711
|
var $RangeError = RangeError;
|
|
10457
10712
|
var floor = Math.floor;
|
|
@@ -10459,7 +10714,7 @@ var floor = Math.floor;
|
|
|
10459
10714
|
// `String.prototype.repeat` method implementation
|
|
10460
10715
|
// https://tc39.es/ecma262/#sec-string.prototype.repeat
|
|
10461
10716
|
var stringRepeat = function repeat(count) {
|
|
10462
|
-
var str = toString$
|
|
10717
|
+
var str = toString$2(requireObjectCoercible$2(this));
|
|
10463
10718
|
var result = '';
|
|
10464
10719
|
var n = toIntegerOrInfinity(count);
|
|
10465
10720
|
if (n < 0 || n === Infinity) throw new $RangeError('Wrong number of repetitions');
|
|
@@ -10467,29 +10722,29 @@ var stringRepeat = function repeat(count) {
|
|
|
10467
10722
|
return result;
|
|
10468
10723
|
};
|
|
10469
10724
|
|
|
10470
|
-
var uncurryThis$
|
|
10471
|
-
var toLength
|
|
10472
|
-
var toString$
|
|
10725
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
10726
|
+
var toLength = toLength$7;
|
|
10727
|
+
var toString$1 = toString$h;
|
|
10473
10728
|
var $repeat = stringRepeat;
|
|
10474
|
-
var requireObjectCoercible$
|
|
10729
|
+
var requireObjectCoercible$1 = requireObjectCoercible$c;
|
|
10475
10730
|
|
|
10476
|
-
var repeat = uncurryThis$
|
|
10477
|
-
var stringSlice
|
|
10731
|
+
var repeat = uncurryThis$1($repeat);
|
|
10732
|
+
var stringSlice = uncurryThis$1(''.slice);
|
|
10478
10733
|
var ceil = Math.ceil;
|
|
10479
10734
|
|
|
10480
10735
|
// `String.prototype.{ padStart, padEnd }` methods implementation
|
|
10481
10736
|
var createMethod$1 = function (IS_END) {
|
|
10482
10737
|
return function ($this, maxLength, fillString) {
|
|
10483
|
-
var S = toString$
|
|
10484
|
-
var intMaxLength = toLength
|
|
10738
|
+
var S = toString$1(requireObjectCoercible$1($this));
|
|
10739
|
+
var intMaxLength = toLength(maxLength);
|
|
10485
10740
|
var stringLength = S.length;
|
|
10486
10741
|
if (intMaxLength <= stringLength) return S;
|
|
10487
|
-
var fillStr = fillString === undefined ? ' ' : toString$
|
|
10742
|
+
var fillStr = fillString === undefined ? ' ' : toString$1(fillString);
|
|
10488
10743
|
var fillLen, stringFiller;
|
|
10489
10744
|
if (fillStr === '') return S;
|
|
10490
10745
|
fillLen = intMaxLength - stringLength;
|
|
10491
10746
|
stringFiller = repeat(fillStr, ceil(fillLen / fillStr.length));
|
|
10492
|
-
if (stringFiller.length > fillLen) stringFiller = stringSlice
|
|
10747
|
+
if (stringFiller.length > fillLen) stringFiller = stringSlice(stringFiller, 0, fillLen);
|
|
10493
10748
|
return IS_END ? S + stringFiller : stringFiller + S;
|
|
10494
10749
|
};
|
|
10495
10750
|
};
|
|
@@ -10505,49 +10760,18 @@ var userAgent = environmentUserAgent;
|
|
|
10505
10760
|
|
|
10506
10761
|
var stringPadWebkitBug = /Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(userAgent);
|
|
10507
10762
|
|
|
10508
|
-
var $$
|
|
10763
|
+
var $$1 = _export;
|
|
10509
10764
|
var $padEnd = stringPad.end;
|
|
10510
10765
|
var WEBKIT_BUG = stringPadWebkitBug;
|
|
10511
10766
|
|
|
10512
10767
|
// `String.prototype.padEnd` method
|
|
10513
10768
|
// https://tc39.es/ecma262/#sec-string.prototype.padend
|
|
10514
|
-
$$
|
|
10769
|
+
$$1({ target: 'String', proto: true, forced: WEBKIT_BUG }, {
|
|
10515
10770
|
padEnd: function padEnd(maxLength /* , fillString = ' ' */) {
|
|
10516
10771
|
return $padEnd(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);
|
|
10517
10772
|
}
|
|
10518
10773
|
});
|
|
10519
10774
|
|
|
10520
|
-
var $$1 = _export;
|
|
10521
|
-
var uncurryThis$1 = functionUncurryThisClause;
|
|
10522
|
-
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
10523
|
-
var toLength = toLength$7;
|
|
10524
|
-
var toString$1 = toString$h;
|
|
10525
|
-
var notARegExp = notARegexp;
|
|
10526
|
-
var requireObjectCoercible$1 = requireObjectCoercible$c;
|
|
10527
|
-
var correctIsRegExpLogic = correctIsRegexpLogic;
|
|
10528
|
-
|
|
10529
|
-
var stringSlice = uncurryThis$1(''.slice);
|
|
10530
|
-
var min = Math.min;
|
|
10531
|
-
|
|
10532
|
-
var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
|
|
10533
|
-
// https://github.com/zloirock/core-js/pull/702
|
|
10534
|
-
var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
|
|
10535
|
-
var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
|
|
10536
|
-
return descriptor && !descriptor.writable;
|
|
10537
|
-
}();
|
|
10538
|
-
|
|
10539
|
-
// `String.prototype.startsWith` method
|
|
10540
|
-
// https://tc39.es/ecma262/#sec-string.prototype.startswith
|
|
10541
|
-
$$1({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
|
|
10542
|
-
startsWith: function startsWith(searchString /* , position = 0 */) {
|
|
10543
|
-
var that = toString$1(requireObjectCoercible$1(this));
|
|
10544
|
-
notARegExp(searchString);
|
|
10545
|
-
var search = toString$1(searchString);
|
|
10546
|
-
var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
|
|
10547
|
-
return stringSlice(that, index, index + search.length) === search;
|
|
10548
|
-
}
|
|
10549
|
-
});
|
|
10550
|
-
|
|
10551
10775
|
// a string of all valid unicode whitespaces
|
|
10552
10776
|
var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
|
|
10553
10777
|
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
@@ -10669,8 +10893,23 @@ function installedVersions(installed) {
|
|
|
10669
10893
|
}
|
|
10670
10894
|
return versions;
|
|
10671
10895
|
}
|
|
10672
|
-
function
|
|
10896
|
+
function notFound(command) {
|
|
10673
10897
|
var _a;
|
|
10898
|
+
return Object.assign(new Error(`the '${command}' command was not found. Install ${(_a = INSTALL_HINTS[command]) !== null && _a !== void 0 ? _a : command} first, then try again.`), {
|
|
10899
|
+
code: "ENOENT"
|
|
10900
|
+
});
|
|
10901
|
+
}
|
|
10902
|
+
function existsOnWindows(command) {
|
|
10903
|
+
try {
|
|
10904
|
+
execFileSync("where", [command], {
|
|
10905
|
+
stdio: "pipe"
|
|
10906
|
+
});
|
|
10907
|
+
return true;
|
|
10908
|
+
} catch (_a) {
|
|
10909
|
+
return false;
|
|
10910
|
+
}
|
|
10911
|
+
}
|
|
10912
|
+
function execute(command, args, options = {}) {
|
|
10674
10913
|
try {
|
|
10675
10914
|
const env = Object.assign(Object.assign({}, process.env), {
|
|
10676
10915
|
npm_config_allow_remote: "all"
|
|
@@ -10680,6 +10919,7 @@ function execute(command, args, options = {}) {
|
|
|
10680
10919
|
env
|
|
10681
10920
|
}, options);
|
|
10682
10921
|
if (process.platform === "win32") {
|
|
10922
|
+
if (!existsOnWindows(command)) throw notFound(command);
|
|
10683
10923
|
return execFileSync([command, ...args.map(arg => `"${arg}"`)].join(" "), Object.assign(Object.assign({}, execOptions), {
|
|
10684
10924
|
shell: true
|
|
10685
10925
|
}));
|
|
@@ -10687,7 +10927,7 @@ function execute(command, args, options = {}) {
|
|
|
10687
10927
|
return execFileSync(command, args, execOptions);
|
|
10688
10928
|
} catch (error) {
|
|
10689
10929
|
if (error.code !== "ENOENT") throw error;
|
|
10690
|
-
throw
|
|
10930
|
+
throw notFound(command);
|
|
10691
10931
|
}
|
|
10692
10932
|
}
|
|
10693
10933
|
function run(command, args, cwd) {
|
|
@@ -10706,8 +10946,62 @@ function latestVersion() {
|
|
|
10706
10946
|
return undefined;
|
|
10707
10947
|
}
|
|
10708
10948
|
}
|
|
10949
|
+
const isRecord = value => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
10950
|
+
function addPluginToClaudeSettings(settingsPath) {
|
|
10951
|
+
var _a, _b, _c;
|
|
10952
|
+
let settings = {};
|
|
10953
|
+
if (fs__default.existsSync(settingsPath)) {
|
|
10954
|
+
try {
|
|
10955
|
+
settings = JSON.parse(fs__default.readFileSync(settingsPath, "utf8"));
|
|
10956
|
+
} catch (_d) {
|
|
10957
|
+
return "unreadable";
|
|
10958
|
+
}
|
|
10959
|
+
}
|
|
10960
|
+
if (!isRecord(settings)) return "unreadable";
|
|
10961
|
+
const marketplaces = (_a = settings.extraKnownMarketplaces) !== null && _a !== void 0 ? _a : {};
|
|
10962
|
+
const plugins = (_b = settings.enabledPlugins) !== null && _b !== void 0 ? _b : {};
|
|
10963
|
+
if (!isRecord(marketplaces) || !isRecord(plugins)) return "unreadable";
|
|
10964
|
+
const marketplace = (_c = marketplaces[MARKETPLACE]) !== null && _c !== void 0 ? _c : {
|
|
10965
|
+
source: {
|
|
10966
|
+
source: "url",
|
|
10967
|
+
url: CATALOG_URL
|
|
10968
|
+
}
|
|
10969
|
+
};
|
|
10970
|
+
if (!isRecord(marketplace)) return "unreadable";
|
|
10971
|
+
const pluginKey = `${PLUGIN}@${MARKETPLACE}`;
|
|
10972
|
+
if (marketplace.autoUpdate === true && plugins[pluginKey] === true) return "already";
|
|
10973
|
+
marketplaces[MARKETPLACE] = Object.assign(Object.assign({}, marketplace), {
|
|
10974
|
+
autoUpdate: true
|
|
10975
|
+
});
|
|
10976
|
+
plugins[pluginKey] = true;
|
|
10977
|
+
settings.extraKnownMarketplaces = marketplaces;
|
|
10978
|
+
settings.enabledPlugins = plugins;
|
|
10979
|
+
fs__default.mkdirSync(path__default.dirname(settingsPath), {
|
|
10980
|
+
recursive: true
|
|
10981
|
+
});
|
|
10982
|
+
fs__default.writeFileSync(settingsPath, `${JSON.stringify(settings, null, 2)}\n`);
|
|
10983
|
+
return "added";
|
|
10984
|
+
}
|
|
10985
|
+
function installForClaudeSettings(scope) {
|
|
10986
|
+
if (scope === "project") console.log(chalk.dim("Without the claude command, the Vention skills install for your user account."));
|
|
10987
|
+
const settingsPath = skillPath(homeDirectory(), ".claude", "settings.json");
|
|
10988
|
+
const result = addPluginToClaudeSettings(settingsPath);
|
|
10989
|
+
if (result === "unreadable") {
|
|
10990
|
+
console.log(chalk.yellow(`Couldn't read ${displayPath(settingsPath)}, so it was left as it is. Add the Vention skills by hand: in Claude Desktop's Code tab, open + > Add plugins (or Customize > Plugins), and install "${PLUGIN}" from the ${MARKETPLACE} marketplace. If it isn't listed, ask your Claude administrator to add ${CATALOG_URL}.`));
|
|
10991
|
+
return;
|
|
10992
|
+
}
|
|
10993
|
+
const location = `${displayPath(settingsPath)} (user scope)`;
|
|
10994
|
+
console.log(chalk.green(result === "added" ? `Added ${PLUGIN}@${MARKETPLACE} to ${location}.` : `${PLUGIN}@${MARKETPLACE} is already in ${location}.`));
|
|
10995
|
+
console.log("Start a new session in Claude Desktop's Code tab to load the Vention skills.");
|
|
10996
|
+
}
|
|
10709
10997
|
function installForClaudeCode(scope) {
|
|
10710
|
-
|
|
10998
|
+
try {
|
|
10999
|
+
console.log(run("claude", ["plugin", "marketplace", "add", "--scope", scope, CATALOG_URL]));
|
|
11000
|
+
} catch (error) {
|
|
11001
|
+
if (error.code !== "ENOENT") throw error;
|
|
11002
|
+
installForClaudeSettings(scope);
|
|
11003
|
+
return;
|
|
11004
|
+
}
|
|
10711
11005
|
console.log(run("claude", ["plugin", "install", "-y", "--scope", scope, `${PLUGIN}@${MARKETPLACE}`]));
|
|
10712
11006
|
console.log(chalk.green(`Installed ${PLUGIN}@${MARKETPLACE} for Claude Code (${scope} scope).`));
|
|
10713
11007
|
}
|
|
@@ -10769,6 +11063,10 @@ function unpackSkills(agent, scope) {
|
|
|
10769
11063
|
function createInstallCommand() {
|
|
10770
11064
|
return new Command("install").description("Install the Vention skills into your coding agent").addOption(new Option("--agent <agent>", "Coding agent to install into").choices(AGENTS)).addOption(new Option("--scope <scope>", "Install for your user account or this project").choices(SCOPES).default("user")).action(async options => {
|
|
10771
11065
|
var _a;
|
|
11066
|
+
if (!options.agent && !process.stdin.isTTY) {
|
|
11067
|
+
console.log(`Pick your coding agent: run 'vention skills install --agent <agent>' with one of: ${AGENTS.join(", ")}.`);
|
|
11068
|
+
process.exit(1);
|
|
11069
|
+
}
|
|
10772
11070
|
try {
|
|
10773
11071
|
const agent = (_a = options.agent) !== null && _a !== void 0 ? _a : await select({
|
|
10774
11072
|
message: "Which coding agent?",
|
|
@@ -10865,6 +11163,10 @@ function createUpdateCommand() {
|
|
|
10865
11163
|
update();
|
|
10866
11164
|
console.log(chalk.green(`Updated ${name} from ${version} to ${installedVersions(findInstalledSkills()).get(install)}.`));
|
|
10867
11165
|
} catch (error) {
|
|
11166
|
+
if (install === "claude-code" && error.code === "ENOENT") {
|
|
11167
|
+
console.log("Claude Desktop updates the Vention skills on its own. The new version loads in your next new session.");
|
|
11168
|
+
continue;
|
|
11169
|
+
}
|
|
10868
11170
|
console.error(chalk.red(`Failed to update ${name}: ${error instanceof Error ? error.message : String(error)}`));
|
|
10869
11171
|
process.exitCode = 1;
|
|
10870
11172
|
}
|
|
@@ -10911,22 +11213,26 @@ function createOpenCommand() {
|
|
|
10911
11213
|
const {
|
|
10912
11214
|
designId
|
|
10913
11215
|
} = await readLinkedApp();
|
|
11216
|
+
const url = `${MACHINE_BUILDER_ORIGINS[session.environment]}/machine-builder/${designId}`;
|
|
10914
11217
|
const report = (opened, message) => console.log(_json ? JSON.stringify({
|
|
10915
11218
|
designId,
|
|
10916
|
-
opened
|
|
11219
|
+
opened,
|
|
11220
|
+
url
|
|
10917
11221
|
}) : chalk.green(message));
|
|
10918
|
-
|
|
11222
|
+
const hasTwin = async () => (await resolveDigitalTwinConnections(session, designId)).length > 0;
|
|
11223
|
+
if (await hasTwin()) {
|
|
10919
11224
|
report(false, `Design ${designId} already has a twin running.`);
|
|
11225
|
+
console.error(chalk.blue("Is its MachineBuilder tab still open? Then keep using that tab."));
|
|
11226
|
+
console.error(chalk.blue(`If you closed it, its twin can stay up for a while. Open the design again at ${url}`));
|
|
10920
11227
|
return;
|
|
10921
11228
|
}
|
|
10922
|
-
const url = `${MACHINE_BUILDER_ORIGINS[session.environment]}/machine-builder/${designId}`;
|
|
10923
11229
|
openInBrowser(url);
|
|
10924
11230
|
console.error(chalk.blue(`Opening ${url}`));
|
|
10925
11231
|
console.error(chalk.blue("Switch to that tab and select MachineLogic to start the design's twin. The tab only loads while it's showing."));
|
|
10926
11232
|
console.error(chalk.blue("Waiting up to 2 minutes..."));
|
|
10927
11233
|
for (let attempt = 0; attempt < TWIN_POLL_ATTEMPTS; attempt++) {
|
|
10928
11234
|
await setTimeout$1(TWIN_POLL_INTERVAL_MS);
|
|
10929
|
-
if (await
|
|
11235
|
+
if (await hasTwin()) {
|
|
10930
11236
|
report(true, `Design ${designId}'s twin is running.`);
|
|
10931
11237
|
return;
|
|
10932
11238
|
}
|
|
@@ -11006,6 +11312,7 @@ program.name("vention").description("CLI tool for Vention").version(readVersion(
|
|
|
11006
11312
|
setVerbose(false);
|
|
11007
11313
|
});
|
|
11008
11314
|
program.addCommand(createLoginCommand());
|
|
11315
|
+
program.addCommand(createWhoamiCommand());
|
|
11009
11316
|
program.addCommand(createLinkCommand());
|
|
11010
11317
|
program.addCommand(createPushCommand());
|
|
11011
11318
|
program.addCommand(createPullCommand());
|