@vention/vention-cli 0.24.5 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/main.d.ts +1 -0
- package/{cli.esm.js → main.esm.js} +616 -609
- package/package.json +6 -6
- package/src/cli-helpers.d.ts +1 -0
- package/src/cli.d.ts +1 -1
- package/src/commands/link.d.ts +2 -0
- package/src/commands/login.d.ts +2 -0
- package/src/commands/pull.d.ts +2 -0
- package/src/commands/push.d.ts +2 -0
- package/src/main.d.ts +2 -0
- package/src/rails-client.d.ts +1 -1
- package/src/vention-cli-logo.d.ts +1 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/cli.d.ts +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command, Option } from 'commander';
|
|
3
3
|
import chalk from 'chalk';
|
|
4
|
+
import { createRequire } from 'module';
|
|
4
5
|
import { select, password } from '@inquirer/prompts';
|
|
5
|
-
import fs, { promises
|
|
6
|
+
import fs, { promises } from 'fs';
|
|
6
7
|
import path$2 from 'path';
|
|
7
8
|
import { exec as exec$9 } from 'child_process';
|
|
8
9
|
import http from 'http';
|
|
9
|
-
import { URLSearchParams as URLSearchParams$2
|
|
10
|
+
import { URLSearchParams as URLSearchParams$2 } from 'url';
|
|
10
11
|
import { once } from 'events';
|
|
11
12
|
import crypto from 'crypto';
|
|
12
13
|
import { z } from 'zod';
|
|
13
|
-
import { createRequire } from 'module';
|
|
14
14
|
|
|
15
15
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
16
16
|
|
|
@@ -1312,78 +1312,81 @@ $$D({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE || BROKEN_ON_SPARSE
|
|
|
1312
1312
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1313
1313
|
addToUnscopables$1('includes');
|
|
1314
1314
|
|
|
1315
|
-
var
|
|
1316
|
-
var
|
|
1317
|
-
var
|
|
1318
|
-
var fails$s = fails$C;
|
|
1319
|
-
var objectKeys = objectKeys$2;
|
|
1320
|
-
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
1321
|
-
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
1322
|
-
var toObject$7 = toObject$9;
|
|
1323
|
-
var IndexedObject$2 = indexedObject;
|
|
1315
|
+
var isObject$g = isObject$m;
|
|
1316
|
+
var classof$e = classofRaw$2;
|
|
1317
|
+
var wellKnownSymbol$k = wellKnownSymbol$p;
|
|
1324
1318
|
|
|
1325
|
-
|
|
1326
|
-
var $assign = Object.assign;
|
|
1327
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1328
|
-
var defineProperty$3 = Object.defineProperty;
|
|
1329
|
-
var concat$1 = uncurryThis$y([].concat);
|
|
1319
|
+
var MATCH$2 = wellKnownSymbol$k('match');
|
|
1330
1320
|
|
|
1331
|
-
// `
|
|
1332
|
-
// https://tc39.es/ecma262/#sec-
|
|
1333
|
-
var
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
var length = keys.length;
|
|
1364
|
-
var j = 0;
|
|
1365
|
-
var key;
|
|
1366
|
-
while (length > j) {
|
|
1367
|
-
key = keys[j++];
|
|
1368
|
-
if (!DESCRIPTORS$i || call$u(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1369
|
-
}
|
|
1370
|
-
} return T;
|
|
1371
|
-
} : $assign;
|
|
1321
|
+
// `IsRegExp` abstract operation
|
|
1322
|
+
// https://tc39.es/ecma262/#sec-isregexp
|
|
1323
|
+
var isRegexp = function (it) {
|
|
1324
|
+
var isRegExp;
|
|
1325
|
+
return isObject$g(it) && ((isRegExp = it[MATCH$2]) !== undefined ? !!isRegExp : classof$e(it) === 'RegExp');
|
|
1326
|
+
};
|
|
1327
|
+
|
|
1328
|
+
var isRegExp$1 = isRegexp;
|
|
1329
|
+
|
|
1330
|
+
var $TypeError$i = TypeError;
|
|
1331
|
+
|
|
1332
|
+
var notARegexp = function (it) {
|
|
1333
|
+
if (isRegExp$1(it)) {
|
|
1334
|
+
throw new $TypeError$i("The method doesn't accept regular expressions");
|
|
1335
|
+
} return it;
|
|
1336
|
+
};
|
|
1337
|
+
|
|
1338
|
+
var wellKnownSymbol$j = wellKnownSymbol$p;
|
|
1339
|
+
|
|
1340
|
+
var MATCH$1 = wellKnownSymbol$j('match');
|
|
1341
|
+
|
|
1342
|
+
var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
1343
|
+
var regexp = /./;
|
|
1344
|
+
try {
|
|
1345
|
+
'/./'[METHOD_NAME](regexp);
|
|
1346
|
+
} catch (error1) {
|
|
1347
|
+
try {
|
|
1348
|
+
regexp[MATCH$1] = false;
|
|
1349
|
+
return '/./'[METHOD_NAME](regexp);
|
|
1350
|
+
} catch (error2) { /* empty */ }
|
|
1351
|
+
} return false;
|
|
1352
|
+
};
|
|
1372
1353
|
|
|
1373
1354
|
var $$C = _export;
|
|
1374
|
-
var
|
|
1355
|
+
var uncurryThis$y = functionUncurryThis;
|
|
1356
|
+
var notARegExp = notARegexp;
|
|
1357
|
+
var requireObjectCoercible$3 = requireObjectCoercible$6;
|
|
1358
|
+
var toString$b = toString$d;
|
|
1359
|
+
var correctIsRegExpLogic = correctIsRegexpLogic;
|
|
1375
1360
|
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
//
|
|
1379
|
-
|
|
1380
|
-
|
|
1361
|
+
var stringIndexOf$2 = uncurryThis$y(''.indexOf);
|
|
1362
|
+
|
|
1363
|
+
// `String.prototype.includes` method
|
|
1364
|
+
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
|
1365
|
+
$$C({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
|
|
1366
|
+
includes: function includes(searchString /* , position = 0 */) {
|
|
1367
|
+
return !!~stringIndexOf$2(
|
|
1368
|
+
toString$b(requireObjectCoercible$3(this)),
|
|
1369
|
+
toString$b(notARegExp(searchString)),
|
|
1370
|
+
arguments.length > 1 ? arguments[1] : undefined
|
|
1371
|
+
);
|
|
1372
|
+
}
|
|
1381
1373
|
});
|
|
1382
1374
|
|
|
1375
|
+
let verboseEnabled = false;
|
|
1376
|
+
const setVerbose = enabled => {
|
|
1377
|
+
verboseEnabled = enabled;
|
|
1378
|
+
};
|
|
1379
|
+
const isVerbose = () => verboseEnabled;
|
|
1380
|
+
const verboseLog = message => {
|
|
1381
|
+
if (verboseEnabled) {
|
|
1382
|
+
console.log(chalk.dim("[verbose]"), message);
|
|
1383
|
+
}
|
|
1384
|
+
};
|
|
1385
|
+
|
|
1383
1386
|
/* global Bun, Deno -- detection */
|
|
1384
1387
|
var globalThis$E = globalThis_1;
|
|
1385
1388
|
var userAgent$5 = environmentUserAgent;
|
|
1386
|
-
var classof$
|
|
1389
|
+
var classof$d = classofRaw$2;
|
|
1387
1390
|
|
|
1388
1391
|
var userAgentStartsWith = function (string) {
|
|
1389
1392
|
return userAgent$5.slice(0, string.length) === string;
|
|
@@ -1396,7 +1399,7 @@ var environment = (function () {
|
|
|
1396
1399
|
if (userAgentStartsWith('Node.js/')) return 'NODE';
|
|
1397
1400
|
if (globalThis$E.Bun && typeof Bun.version == 'string') return 'BUN';
|
|
1398
1401
|
if (globalThis$E.Deno && typeof Deno.version == 'object') return 'DENO';
|
|
1399
|
-
if (classof$
|
|
1402
|
+
if (classof$d(globalThis$E.process) === 'process') return 'NODE';
|
|
1400
1403
|
if (globalThis$E.window && globalThis$E.document) return 'BROWSER';
|
|
1401
1404
|
return 'REST';
|
|
1402
1405
|
})();
|
|
@@ -1419,26 +1422,26 @@ var functionUncurryThisAccessor = function (object, key, method) {
|
|
|
1419
1422
|
} catch (error) { /* empty */ }
|
|
1420
1423
|
};
|
|
1421
1424
|
|
|
1422
|
-
var isObject$
|
|
1425
|
+
var isObject$f = isObject$m;
|
|
1423
1426
|
|
|
1424
1427
|
var isPossiblePrototype$1 = function (argument) {
|
|
1425
|
-
return isObject$
|
|
1428
|
+
return isObject$f(argument) || argument === null;
|
|
1426
1429
|
};
|
|
1427
1430
|
|
|
1428
1431
|
var isPossiblePrototype = isPossiblePrototype$1;
|
|
1429
1432
|
|
|
1430
1433
|
var $String$2 = String;
|
|
1431
|
-
var $TypeError$
|
|
1434
|
+
var $TypeError$h = TypeError;
|
|
1432
1435
|
|
|
1433
1436
|
var aPossiblePrototype$1 = function (argument) {
|
|
1434
1437
|
if (isPossiblePrototype(argument)) return argument;
|
|
1435
|
-
throw new $TypeError$
|
|
1438
|
+
throw new $TypeError$h("Can't set " + $String$2(argument) + ' as a prototype');
|
|
1436
1439
|
};
|
|
1437
1440
|
|
|
1438
1441
|
/* eslint-disable no-proto -- safe */
|
|
1439
1442
|
var uncurryThisAccessor$3 = functionUncurryThisAccessor;
|
|
1440
|
-
var isObject$
|
|
1441
|
-
var requireObjectCoercible$
|
|
1443
|
+
var isObject$e = isObject$m;
|
|
1444
|
+
var requireObjectCoercible$2 = requireObjectCoercible$6;
|
|
1442
1445
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1443
1446
|
|
|
1444
1447
|
// `Object.setPrototypeOf` method
|
|
@@ -1455,39 +1458,39 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1455
1458
|
CORRECT_SETTER = test instanceof Array;
|
|
1456
1459
|
} catch (error) { /* empty */ }
|
|
1457
1460
|
return function setPrototypeOf(O, proto) {
|
|
1458
|
-
requireObjectCoercible$
|
|
1461
|
+
requireObjectCoercible$2(O);
|
|
1459
1462
|
aPossiblePrototype(proto);
|
|
1460
|
-
if (!isObject$
|
|
1463
|
+
if (!isObject$e(O)) return O;
|
|
1461
1464
|
if (CORRECT_SETTER) setter(O, proto);
|
|
1462
1465
|
else O.__proto__ = proto;
|
|
1463
1466
|
return O;
|
|
1464
1467
|
};
|
|
1465
1468
|
}() : undefined);
|
|
1466
1469
|
|
|
1467
|
-
var defineProperty$
|
|
1470
|
+
var defineProperty$3 = objectDefineProperty.f;
|
|
1468
1471
|
var hasOwn$d = hasOwnProperty_1;
|
|
1469
|
-
var wellKnownSymbol$
|
|
1472
|
+
var wellKnownSymbol$i = wellKnownSymbol$p;
|
|
1470
1473
|
|
|
1471
|
-
var TO_STRING_TAG$3 = wellKnownSymbol$
|
|
1474
|
+
var TO_STRING_TAG$3 = wellKnownSymbol$i('toStringTag');
|
|
1472
1475
|
|
|
1473
1476
|
var setToStringTag$7 = function (target, TAG, STATIC) {
|
|
1474
1477
|
if (target && !STATIC) target = target.prototype;
|
|
1475
1478
|
if (target && !hasOwn$d(target, TO_STRING_TAG$3)) {
|
|
1476
|
-
defineProperty$
|
|
1479
|
+
defineProperty$3(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
|
|
1477
1480
|
}
|
|
1478
1481
|
};
|
|
1479
1482
|
|
|
1480
1483
|
var getBuiltIn$8 = getBuiltIn$c;
|
|
1481
1484
|
var defineBuiltInAccessor$9 = defineBuiltInAccessor$b;
|
|
1482
|
-
var wellKnownSymbol$
|
|
1483
|
-
var DESCRIPTORS$
|
|
1485
|
+
var wellKnownSymbol$h = wellKnownSymbol$p;
|
|
1486
|
+
var DESCRIPTORS$i = descriptors;
|
|
1484
1487
|
|
|
1485
|
-
var SPECIES$4 = wellKnownSymbol$
|
|
1488
|
+
var SPECIES$4 = wellKnownSymbol$h('species');
|
|
1486
1489
|
|
|
1487
1490
|
var setSpecies$4 = function (CONSTRUCTOR_NAME) {
|
|
1488
1491
|
var Constructor = getBuiltIn$8(CONSTRUCTOR_NAME);
|
|
1489
1492
|
|
|
1490
|
-
if (DESCRIPTORS$
|
|
1493
|
+
if (DESCRIPTORS$i && Constructor && !Constructor[SPECIES$4]) {
|
|
1491
1494
|
defineBuiltInAccessor$9(Constructor, SPECIES$4, {
|
|
1492
1495
|
configurable: true,
|
|
1493
1496
|
get: function () { return this; }
|
|
@@ -1497,17 +1500,17 @@ var setSpecies$4 = function (CONSTRUCTOR_NAME) {
|
|
|
1497
1500
|
|
|
1498
1501
|
var isPrototypeOf$6 = objectIsPrototypeOf;
|
|
1499
1502
|
|
|
1500
|
-
var $TypeError$
|
|
1503
|
+
var $TypeError$g = TypeError;
|
|
1501
1504
|
|
|
1502
1505
|
var anInstance$6 = function (it, Prototype) {
|
|
1503
1506
|
if (isPrototypeOf$6(Prototype, it)) return it;
|
|
1504
|
-
throw new $TypeError$
|
|
1507
|
+
throw new $TypeError$g('Incorrect invocation');
|
|
1505
1508
|
};
|
|
1506
1509
|
|
|
1507
1510
|
var uncurryThis$w = functionUncurryThis;
|
|
1508
|
-
var fails$
|
|
1511
|
+
var fails$s = fails$C;
|
|
1509
1512
|
var isCallable$g = isCallable$t;
|
|
1510
|
-
var classof$
|
|
1513
|
+
var classof$c = classof$g;
|
|
1511
1514
|
var getBuiltIn$7 = getBuiltIn$c;
|
|
1512
1515
|
var inspectSource$1 = inspectSource$3;
|
|
1513
1516
|
|
|
@@ -1529,7 +1532,7 @@ var isConstructorModern = function isConstructor(argument) {
|
|
|
1529
1532
|
|
|
1530
1533
|
var isConstructorLegacy = function isConstructor(argument) {
|
|
1531
1534
|
if (!isCallable$g(argument)) return false;
|
|
1532
|
-
switch (classof$
|
|
1535
|
+
switch (classof$c(argument)) {
|
|
1533
1536
|
case 'AsyncFunction':
|
|
1534
1537
|
case 'GeneratorFunction':
|
|
1535
1538
|
case 'AsyncGeneratorFunction': return false;
|
|
@@ -1548,7 +1551,7 @@ isConstructorLegacy.sham = true;
|
|
|
1548
1551
|
|
|
1549
1552
|
// `IsConstructor` abstract operation
|
|
1550
1553
|
// https://tc39.es/ecma262/#sec-isconstructor
|
|
1551
|
-
var isConstructor$3 = !construct || fails$
|
|
1554
|
+
var isConstructor$3 = !construct || fails$s(function () {
|
|
1552
1555
|
var called;
|
|
1553
1556
|
return isConstructorModern(isConstructorModern.call)
|
|
1554
1557
|
|| !isConstructorModern(Object)
|
|
@@ -1559,20 +1562,20 @@ var isConstructor$3 = !construct || fails$r(function () {
|
|
|
1559
1562
|
var isConstructor$2 = isConstructor$3;
|
|
1560
1563
|
var tryToString$3 = tryToString$5;
|
|
1561
1564
|
|
|
1562
|
-
var $TypeError$
|
|
1565
|
+
var $TypeError$f = TypeError;
|
|
1563
1566
|
|
|
1564
1567
|
// `Assert: IsConstructor(argument) is true`
|
|
1565
1568
|
var aConstructor$2 = function (argument) {
|
|
1566
1569
|
if (isConstructor$2(argument)) return argument;
|
|
1567
|
-
throw new $TypeError$
|
|
1570
|
+
throw new $TypeError$f(tryToString$3(argument) + ' is not a constructor');
|
|
1568
1571
|
};
|
|
1569
1572
|
|
|
1570
1573
|
var anObject$i = anObject$n;
|
|
1571
1574
|
var aConstructor$1 = aConstructor$2;
|
|
1572
1575
|
var isNullOrUndefined$1 = isNullOrUndefined$4;
|
|
1573
|
-
var wellKnownSymbol$
|
|
1576
|
+
var wellKnownSymbol$g = wellKnownSymbol$p;
|
|
1574
1577
|
|
|
1575
|
-
var SPECIES$3 = wellKnownSymbol$
|
|
1578
|
+
var SPECIES$3 = wellKnownSymbol$g('species');
|
|
1576
1579
|
|
|
1577
1580
|
// `SpeciesConstructor` abstract operation
|
|
1578
1581
|
// https://tc39.es/ecma262/#sec-speciesconstructor
|
|
@@ -1586,11 +1589,11 @@ var NATIVE_BIND$1 = functionBindNative;
|
|
|
1586
1589
|
|
|
1587
1590
|
var FunctionPrototype = Function.prototype;
|
|
1588
1591
|
var apply$5 = FunctionPrototype.apply;
|
|
1589
|
-
var call$
|
|
1592
|
+
var call$u = FunctionPrototype.call;
|
|
1590
1593
|
|
|
1591
1594
|
// eslint-disable-next-line es/no-function-prototype-bind, es/no-reflect -- safe
|
|
1592
|
-
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$
|
|
1593
|
-
return call$
|
|
1595
|
+
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$u.bind(apply$5) : function () {
|
|
1596
|
+
return call$u.apply(apply$5, arguments);
|
|
1594
1597
|
});
|
|
1595
1598
|
|
|
1596
1599
|
var classofRaw = classofRaw$2;
|
|
@@ -1621,10 +1624,10 @@ var uncurryThis$t = functionUncurryThis;
|
|
|
1621
1624
|
|
|
1622
1625
|
var arraySlice$6 = uncurryThis$t([].slice);
|
|
1623
1626
|
|
|
1624
|
-
var $TypeError$
|
|
1627
|
+
var $TypeError$e = TypeError;
|
|
1625
1628
|
|
|
1626
1629
|
var validateArgumentsLength$5 = function (passed, required) {
|
|
1627
|
-
if (passed < required) throw new $TypeError$
|
|
1630
|
+
if (passed < required) throw new $TypeError$e('Not enough arguments');
|
|
1628
1631
|
return passed;
|
|
1629
1632
|
};
|
|
1630
1633
|
|
|
@@ -1637,7 +1640,7 @@ var apply$4 = functionApply;
|
|
|
1637
1640
|
var bind$9 = functionBindContext;
|
|
1638
1641
|
var isCallable$f = isCallable$t;
|
|
1639
1642
|
var hasOwn$c = hasOwnProperty_1;
|
|
1640
|
-
var fails$
|
|
1643
|
+
var fails$r = fails$C;
|
|
1641
1644
|
var html = html$2;
|
|
1642
1645
|
var arraySlice$5 = arraySlice$6;
|
|
1643
1646
|
var createElement = documentCreateElement$2;
|
|
@@ -1657,7 +1660,7 @@ var queue$2 = {};
|
|
|
1657
1660
|
var ONREADYSTATECHANGE = 'onreadystatechange';
|
|
1658
1661
|
var $location, defer, channel$1, port;
|
|
1659
1662
|
|
|
1660
|
-
fails$
|
|
1663
|
+
fails$r(function () {
|
|
1661
1664
|
// Deno throws a ReferenceError on `location` access without `--location` flag
|
|
1662
1665
|
$location = globalThis$C.location;
|
|
1663
1666
|
});
|
|
@@ -1724,7 +1727,7 @@ if (!set$1 || !clear) {
|
|
|
1724
1727
|
isCallable$f(globalThis$C.postMessage) &&
|
|
1725
1728
|
!globalThis$C.importScripts &&
|
|
1726
1729
|
$location && $location.protocol !== 'file:' &&
|
|
1727
|
-
!fails$
|
|
1730
|
+
!fails$r(globalPostMessageDefer)
|
|
1728
1731
|
) {
|
|
1729
1732
|
defer = globalPostMessageDefer;
|
|
1730
1733
|
globalThis$C.addEventListener('message', eventListener, false);
|
|
@@ -1748,14 +1751,14 @@ var task$1 = {
|
|
|
1748
1751
|
set: set$1};
|
|
1749
1752
|
|
|
1750
1753
|
var globalThis$B = globalThis_1;
|
|
1751
|
-
var DESCRIPTORS$
|
|
1754
|
+
var DESCRIPTORS$h = descriptors;
|
|
1752
1755
|
|
|
1753
1756
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1754
1757
|
var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
|
|
1755
1758
|
|
|
1756
1759
|
// Avoid NodeJS experimental warning
|
|
1757
1760
|
var safeGetBuiltIn$2 = function (name) {
|
|
1758
|
-
if (!DESCRIPTORS$
|
|
1761
|
+
if (!DESCRIPTORS$h) return globalThis$B[name];
|
|
1759
1762
|
var descriptor = getOwnPropertyDescriptor$2(globalThis$B, name);
|
|
1760
1763
|
return descriptor && descriptor.value;
|
|
1761
1764
|
};
|
|
@@ -1896,12 +1899,12 @@ var NativePromiseConstructor$3 = promiseNativeConstructor;
|
|
|
1896
1899
|
var isCallable$e = isCallable$t;
|
|
1897
1900
|
var isForced$1 = isForced_1;
|
|
1898
1901
|
var inspectSource = inspectSource$3;
|
|
1899
|
-
var wellKnownSymbol$
|
|
1902
|
+
var wellKnownSymbol$f = wellKnownSymbol$p;
|
|
1900
1903
|
var ENVIRONMENT$1 = environment;
|
|
1901
1904
|
var V8_VERSION = environmentV8Version;
|
|
1902
1905
|
|
|
1903
1906
|
NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
|
|
1904
|
-
var SPECIES$2 = wellKnownSymbol$
|
|
1907
|
+
var SPECIES$2 = wellKnownSymbol$f('species');
|
|
1905
1908
|
var SUBCLASSING = false;
|
|
1906
1909
|
var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$e(globalThis$y.PromiseRejectionEvent);
|
|
1907
1910
|
|
|
@@ -1939,12 +1942,12 @@ var newPromiseCapability$2 = {};
|
|
|
1939
1942
|
|
|
1940
1943
|
var aCallable$c = aCallable$g;
|
|
1941
1944
|
|
|
1942
|
-
var $TypeError$
|
|
1945
|
+
var $TypeError$d = TypeError;
|
|
1943
1946
|
|
|
1944
1947
|
var PromiseCapability = function (C) {
|
|
1945
1948
|
var resolve, reject;
|
|
1946
1949
|
this.promise = new C(function ($$resolve, $$reject) {
|
|
1947
|
-
if (resolve !== undefined || reject !== undefined) throw new $TypeError$
|
|
1950
|
+
if (resolve !== undefined || reject !== undefined) throw new $TypeError$d('Bad Promise constructor');
|
|
1948
1951
|
resolve = $$resolve;
|
|
1949
1952
|
reject = $$reject;
|
|
1950
1953
|
});
|
|
@@ -1962,14 +1965,14 @@ var $$B = _export;
|
|
|
1962
1965
|
var IS_NODE$1 = environmentIsNode;
|
|
1963
1966
|
var globalThis$x = globalThis_1;
|
|
1964
1967
|
var path = path$1;
|
|
1965
|
-
var call$
|
|
1968
|
+
var call$t = functionCall;
|
|
1966
1969
|
var defineBuiltIn$c = defineBuiltIn$e;
|
|
1967
1970
|
var setPrototypeOf$6 = objectSetPrototypeOf;
|
|
1968
1971
|
var setToStringTag$6 = setToStringTag$7;
|
|
1969
1972
|
var setSpecies$3 = setSpecies$4;
|
|
1970
1973
|
var aCallable$b = aCallable$g;
|
|
1971
1974
|
var isCallable$d = isCallable$t;
|
|
1972
|
-
var isObject$
|
|
1975
|
+
var isObject$d = isObject$m;
|
|
1973
1976
|
var anInstance$5 = anInstance$6;
|
|
1974
1977
|
var speciesConstructor = speciesConstructor$1;
|
|
1975
1978
|
var task = task$1.set;
|
|
@@ -2011,7 +2014,7 @@ var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
|
|
|
2011
2014
|
// helpers
|
|
2012
2015
|
var isThenable = function (it) {
|
|
2013
2016
|
var then;
|
|
2014
|
-
return isObject$
|
|
2017
|
+
return isObject$d(it) && isCallable$d(then = it.then) ? then : false;
|
|
2015
2018
|
};
|
|
2016
2019
|
|
|
2017
2020
|
var callReaction = function (reaction, state) {
|
|
@@ -2040,7 +2043,7 @@ var callReaction = function (reaction, state) {
|
|
|
2040
2043
|
if (result === reaction.promise) {
|
|
2041
2044
|
reject(new TypeError$6('Promise-chain cycle'));
|
|
2042
2045
|
} else if (then = isThenable(result)) {
|
|
2043
|
-
call$
|
|
2046
|
+
call$t(then, result, resolve, reject);
|
|
2044
2047
|
} else resolve(result);
|
|
2045
2048
|
} else reject(value);
|
|
2046
2049
|
} catch (error) {
|
|
@@ -2077,7 +2080,7 @@ var dispatchEvent = function (name, promise, reason) {
|
|
|
2077
2080
|
};
|
|
2078
2081
|
|
|
2079
2082
|
var onUnhandled = function (state) {
|
|
2080
|
-
call$
|
|
2083
|
+
call$t(task, globalThis$x, function () {
|
|
2081
2084
|
var promise = state.facade;
|
|
2082
2085
|
var value = state.value;
|
|
2083
2086
|
var IS_UNHANDLED = isUnhandled(state);
|
|
@@ -2100,7 +2103,7 @@ var isUnhandled = function (state) {
|
|
|
2100
2103
|
};
|
|
2101
2104
|
|
|
2102
2105
|
var onHandleUnhandled = function (state) {
|
|
2103
|
-
call$
|
|
2106
|
+
call$t(task, globalThis$x, function () {
|
|
2104
2107
|
var promise = state.facade;
|
|
2105
2108
|
if (IS_NODE$1) {
|
|
2106
2109
|
process$1.emit('rejectionHandled', promise);
|
|
@@ -2134,7 +2137,7 @@ var internalResolve = function (state, value, unwrap) {
|
|
|
2134
2137
|
microtask(function () {
|
|
2135
2138
|
var wrapper = { done: false };
|
|
2136
2139
|
try {
|
|
2137
|
-
call$
|
|
2140
|
+
call$t(then, value,
|
|
2138
2141
|
bind$7(internalResolve, wrapper, state),
|
|
2139
2142
|
bind$7(internalReject, wrapper, state)
|
|
2140
2143
|
);
|
|
@@ -2158,7 +2161,7 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
|
|
|
2158
2161
|
PromiseConstructor = function Promise(executor) {
|
|
2159
2162
|
anInstance$5(this, PromisePrototype);
|
|
2160
2163
|
aCallable$b(executor);
|
|
2161
|
-
call$
|
|
2164
|
+
call$t(Internal, this);
|
|
2162
2165
|
var state = getInternalPromiseState(this);
|
|
2163
2166
|
try {
|
|
2164
2167
|
executor(bind$7(internalResolve, state), bind$7(internalReject, state));
|
|
@@ -2221,7 +2224,7 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
|
|
|
2221
2224
|
defineBuiltIn$c(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
|
|
2222
2225
|
var that = this;
|
|
2223
2226
|
return new PromiseConstructor(function (resolve, reject) {
|
|
2224
|
-
call$
|
|
2227
|
+
call$t(nativeThen, that, resolve, reject);
|
|
2225
2228
|
}).then(onFulfilled, onRejected);
|
|
2226
2229
|
// https://github.com/zloirock/core-js/issues/640
|
|
2227
2230
|
}, { unsafe: true });
|
|
@@ -2252,10 +2255,10 @@ setSpecies$3(PROMISE);
|
|
|
2252
2255
|
|
|
2253
2256
|
var iterators = {};
|
|
2254
2257
|
|
|
2255
|
-
var wellKnownSymbol$
|
|
2258
|
+
var wellKnownSymbol$e = wellKnownSymbol$p;
|
|
2256
2259
|
var Iterators$4 = iterators;
|
|
2257
2260
|
|
|
2258
|
-
var ITERATOR$8 = wellKnownSymbol$
|
|
2261
|
+
var ITERATOR$8 = wellKnownSymbol$e('iterator');
|
|
2259
2262
|
var ArrayPrototype = Array.prototype;
|
|
2260
2263
|
|
|
2261
2264
|
// check on default Array iterator
|
|
@@ -2263,35 +2266,35 @@ var isArrayIteratorMethod$3 = function (it) {
|
|
|
2263
2266
|
return it !== undefined && (Iterators$4.Array === it || ArrayPrototype[ITERATOR$8] === it);
|
|
2264
2267
|
};
|
|
2265
2268
|
|
|
2266
|
-
var classof$
|
|
2269
|
+
var classof$b = classof$g;
|
|
2267
2270
|
var getMethod$3 = getMethod$5;
|
|
2268
2271
|
var isNullOrUndefined = isNullOrUndefined$4;
|
|
2269
2272
|
var Iterators$3 = iterators;
|
|
2270
|
-
var wellKnownSymbol$
|
|
2273
|
+
var wellKnownSymbol$d = wellKnownSymbol$p;
|
|
2271
2274
|
|
|
2272
|
-
var ITERATOR$7 = wellKnownSymbol$
|
|
2275
|
+
var ITERATOR$7 = wellKnownSymbol$d('iterator');
|
|
2273
2276
|
|
|
2274
2277
|
var getIteratorMethod$5 = function (it) {
|
|
2275
2278
|
if (!isNullOrUndefined(it)) return getMethod$3(it, ITERATOR$7)
|
|
2276
2279
|
|| getMethod$3(it, '@@iterator')
|
|
2277
|
-
|| Iterators$3[classof$
|
|
2280
|
+
|| Iterators$3[classof$b(it)];
|
|
2278
2281
|
};
|
|
2279
2282
|
|
|
2280
|
-
var call$
|
|
2283
|
+
var call$s = functionCall;
|
|
2281
2284
|
var aCallable$a = aCallable$g;
|
|
2282
2285
|
var anObject$h = anObject$n;
|
|
2283
2286
|
var tryToString$2 = tryToString$5;
|
|
2284
2287
|
var getIteratorMethod$4 = getIteratorMethod$5;
|
|
2285
2288
|
|
|
2286
|
-
var $TypeError$
|
|
2289
|
+
var $TypeError$c = TypeError;
|
|
2287
2290
|
|
|
2288
2291
|
var getIterator$4 = function (argument, usingIterator) {
|
|
2289
2292
|
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$4(argument) : usingIterator;
|
|
2290
|
-
if (aCallable$a(iteratorMethod)) return anObject$h(call$
|
|
2291
|
-
throw new $TypeError$
|
|
2293
|
+
if (aCallable$a(iteratorMethod)) return anObject$h(call$s(iteratorMethod, argument));
|
|
2294
|
+
throw new $TypeError$c(tryToString$2(argument) + ' is not iterable');
|
|
2292
2295
|
};
|
|
2293
2296
|
|
|
2294
|
-
var call$
|
|
2297
|
+
var call$r = functionCall;
|
|
2295
2298
|
var anObject$g = anObject$n;
|
|
2296
2299
|
var getMethod$2 = getMethod$5;
|
|
2297
2300
|
|
|
@@ -2304,7 +2307,7 @@ var iteratorClose$b = function (iterator, kind, value) {
|
|
|
2304
2307
|
if (kind === 'throw') throw value;
|
|
2305
2308
|
return value;
|
|
2306
2309
|
}
|
|
2307
|
-
innerResult = call$
|
|
2310
|
+
innerResult = call$r(innerResult, iterator);
|
|
2308
2311
|
} catch (error) {
|
|
2309
2312
|
innerError = true;
|
|
2310
2313
|
innerResult = error;
|
|
@@ -2316,7 +2319,7 @@ var iteratorClose$b = function (iterator, kind, value) {
|
|
|
2316
2319
|
};
|
|
2317
2320
|
|
|
2318
2321
|
var bind$6 = functionBindContext;
|
|
2319
|
-
var call$
|
|
2322
|
+
var call$q = functionCall;
|
|
2320
2323
|
var anObject$f = anObject$n;
|
|
2321
2324
|
var tryToString$1 = tryToString$5;
|
|
2322
2325
|
var isArrayIteratorMethod$2 = isArrayIteratorMethod$3;
|
|
@@ -2326,7 +2329,7 @@ var getIterator$3 = getIterator$4;
|
|
|
2326
2329
|
var getIteratorMethod$3 = getIteratorMethod$5;
|
|
2327
2330
|
var iteratorClose$a = iteratorClose$b;
|
|
2328
2331
|
|
|
2329
|
-
var $TypeError$
|
|
2332
|
+
var $TypeError$b = TypeError;
|
|
2330
2333
|
|
|
2331
2334
|
var Result = function (stopped, result) {
|
|
2332
2335
|
this.stopped = stopped;
|
|
@@ -2364,7 +2367,7 @@ var iterate$6 = function (iterable, unboundFunction, options) {
|
|
|
2364
2367
|
iterator = iterable;
|
|
2365
2368
|
} else {
|
|
2366
2369
|
iterFn = getIteratorMethod$3(iterable);
|
|
2367
|
-
if (!iterFn) throw new $TypeError$
|
|
2370
|
+
if (!iterFn) throw new $TypeError$b(tryToString$1(iterable) + ' is not iterable');
|
|
2368
2371
|
// optimisation for array iterators
|
|
2369
2372
|
if (isArrayIteratorMethod$2(iterFn)) {
|
|
2370
2373
|
for (index = 0, length = lengthOfArrayLike$b(iterable); length > index; index++) {
|
|
@@ -2376,7 +2379,7 @@ var iterate$6 = function (iterable, unboundFunction, options) {
|
|
|
2376
2379
|
}
|
|
2377
2380
|
|
|
2378
2381
|
next = IS_RECORD ? iterable.next : iterator.next;
|
|
2379
|
-
while (!(step = call$
|
|
2382
|
+
while (!(step = call$q(next, iterator)).done) {
|
|
2380
2383
|
// `IteratorValue` errors should propagate without closing the iterator
|
|
2381
2384
|
var value = step.value;
|
|
2382
2385
|
try {
|
|
@@ -2389,9 +2392,9 @@ var iterate$6 = function (iterable, unboundFunction, options) {
|
|
|
2389
2392
|
} return new Result(false);
|
|
2390
2393
|
};
|
|
2391
2394
|
|
|
2392
|
-
var wellKnownSymbol$
|
|
2395
|
+
var wellKnownSymbol$c = wellKnownSymbol$p;
|
|
2393
2396
|
|
|
2394
|
-
var ITERATOR$6 = wellKnownSymbol$
|
|
2397
|
+
var ITERATOR$6 = wellKnownSymbol$c('iterator');
|
|
2395
2398
|
var SAFE_CLOSING = false;
|
|
2396
2399
|
|
|
2397
2400
|
try {
|
|
@@ -2441,7 +2444,7 @@ var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCor
|
|
|
2441
2444
|
});
|
|
2442
2445
|
|
|
2443
2446
|
var $$A = _export;
|
|
2444
|
-
var call$
|
|
2447
|
+
var call$p = functionCall;
|
|
2445
2448
|
var aCallable$9 = aCallable$g;
|
|
2446
2449
|
var newPromiseCapabilityModule$2 = newPromiseCapability$2;
|
|
2447
2450
|
var perform$1 = perform$3;
|
|
@@ -2465,7 +2468,7 @@ $$A({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
|
|
|
2465
2468
|
var index = counter++;
|
|
2466
2469
|
var alreadyCalled = false;
|
|
2467
2470
|
remaining++;
|
|
2468
|
-
call$
|
|
2471
|
+
call$p($promiseResolve, C, promise).then(function (value) {
|
|
2469
2472
|
if (alreadyCalled) return;
|
|
2470
2473
|
alreadyCalled = true;
|
|
2471
2474
|
values[index] = value;
|
|
@@ -2505,7 +2508,7 @@ if (isCallable$c(NativePromiseConstructor)) {
|
|
|
2505
2508
|
}
|
|
2506
2509
|
|
|
2507
2510
|
var $$y = _export;
|
|
2508
|
-
var call$
|
|
2511
|
+
var call$o = functionCall;
|
|
2509
2512
|
var aCallable$8 = aCallable$g;
|
|
2510
2513
|
var newPromiseCapabilityModule$1 = newPromiseCapability$2;
|
|
2511
2514
|
var perform = perform$3;
|
|
@@ -2522,7 +2525,7 @@ $$y({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
|
|
|
2522
2525
|
var result = perform(function () {
|
|
2523
2526
|
var $promiseResolve = aCallable$8(C.resolve);
|
|
2524
2527
|
iterate$4(iterable, function (promise) {
|
|
2525
|
-
call$
|
|
2528
|
+
call$o($promiseResolve, C, promise).then(capability.resolve, reject);
|
|
2526
2529
|
});
|
|
2527
2530
|
});
|
|
2528
2531
|
if (result.error) reject(result.value);
|
|
@@ -2546,12 +2549,12 @@ $$x({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
|
|
|
2546
2549
|
});
|
|
2547
2550
|
|
|
2548
2551
|
var anObject$e = anObject$n;
|
|
2549
|
-
var isObject$
|
|
2552
|
+
var isObject$c = isObject$m;
|
|
2550
2553
|
var newPromiseCapability = newPromiseCapability$2;
|
|
2551
2554
|
|
|
2552
2555
|
var promiseResolve$1 = function (C, x) {
|
|
2553
2556
|
anObject$e(C);
|
|
2554
|
-
if (isObject$
|
|
2557
|
+
if (isObject$c(x) && x.constructor === C) return x;
|
|
2555
2558
|
var promiseCapability = newPromiseCapability.f(C);
|
|
2556
2559
|
var resolve = promiseCapability.resolve;
|
|
2557
2560
|
resolve(x);
|
|
@@ -2573,66 +2576,6 @@ $$w({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
|
|
|
2573
2576
|
}
|
|
2574
2577
|
});
|
|
2575
2578
|
|
|
2576
|
-
var isObject$c = isObject$m;
|
|
2577
|
-
var classof$b = classofRaw$2;
|
|
2578
|
-
var wellKnownSymbol$d = wellKnownSymbol$p;
|
|
2579
|
-
|
|
2580
|
-
var MATCH$2 = wellKnownSymbol$d('match');
|
|
2581
|
-
|
|
2582
|
-
// `IsRegExp` abstract operation
|
|
2583
|
-
// https://tc39.es/ecma262/#sec-isregexp
|
|
2584
|
-
var isRegexp = function (it) {
|
|
2585
|
-
var isRegExp;
|
|
2586
|
-
return isObject$c(it) && ((isRegExp = it[MATCH$2]) !== undefined ? !!isRegExp : classof$b(it) === 'RegExp');
|
|
2587
|
-
};
|
|
2588
|
-
|
|
2589
|
-
var isRegExp$1 = isRegexp;
|
|
2590
|
-
|
|
2591
|
-
var $TypeError$b = TypeError;
|
|
2592
|
-
|
|
2593
|
-
var notARegexp = function (it) {
|
|
2594
|
-
if (isRegExp$1(it)) {
|
|
2595
|
-
throw new $TypeError$b("The method doesn't accept regular expressions");
|
|
2596
|
-
} return it;
|
|
2597
|
-
};
|
|
2598
|
-
|
|
2599
|
-
var wellKnownSymbol$c = wellKnownSymbol$p;
|
|
2600
|
-
|
|
2601
|
-
var MATCH$1 = wellKnownSymbol$c('match');
|
|
2602
|
-
|
|
2603
|
-
var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
2604
|
-
var regexp = /./;
|
|
2605
|
-
try {
|
|
2606
|
-
'/./'[METHOD_NAME](regexp);
|
|
2607
|
-
} catch (error1) {
|
|
2608
|
-
try {
|
|
2609
|
-
regexp[MATCH$1] = false;
|
|
2610
|
-
return '/./'[METHOD_NAME](regexp);
|
|
2611
|
-
} catch (error2) { /* empty */ }
|
|
2612
|
-
} return false;
|
|
2613
|
-
};
|
|
2614
|
-
|
|
2615
|
-
var $$v = _export;
|
|
2616
|
-
var uncurryThis$s = functionUncurryThis;
|
|
2617
|
-
var notARegExp = notARegexp;
|
|
2618
|
-
var requireObjectCoercible$2 = requireObjectCoercible$6;
|
|
2619
|
-
var toString$b = toString$d;
|
|
2620
|
-
var correctIsRegExpLogic = correctIsRegexpLogic;
|
|
2621
|
-
|
|
2622
|
-
var stringIndexOf$2 = uncurryThis$s(''.indexOf);
|
|
2623
|
-
|
|
2624
|
-
// `String.prototype.includes` method
|
|
2625
|
-
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
|
2626
|
-
$$v({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
|
|
2627
|
-
includes: function includes(searchString /* , position = 0 */) {
|
|
2628
|
-
return !!~stringIndexOf$2(
|
|
2629
|
-
toString$b(requireObjectCoercible$2(this)),
|
|
2630
|
-
toString$b(notARegExp(searchString)),
|
|
2631
|
-
arguments.length > 1 ? arguments[1] : undefined
|
|
2632
|
-
);
|
|
2633
|
-
}
|
|
2634
|
-
});
|
|
2635
|
-
|
|
2636
2579
|
var classof$a = classofRaw$2;
|
|
2637
2580
|
|
|
2638
2581
|
// `IsArray` abstract operation
|
|
@@ -2642,24 +2585,24 @@ var isArray$4 = Array.isArray || function isArray(argument) {
|
|
|
2642
2585
|
return classof$a(argument) === 'Array';
|
|
2643
2586
|
};
|
|
2644
2587
|
|
|
2645
|
-
var DESCRIPTORS$
|
|
2588
|
+
var DESCRIPTORS$g = descriptors;
|
|
2646
2589
|
var definePropertyModule$1 = objectDefineProperty;
|
|
2647
2590
|
var createPropertyDescriptor$4 = createPropertyDescriptor$7;
|
|
2648
2591
|
|
|
2649
2592
|
var createProperty$4 = function (object, key, value) {
|
|
2650
|
-
if (DESCRIPTORS$
|
|
2593
|
+
if (DESCRIPTORS$g) definePropertyModule$1.f(object, key, createPropertyDescriptor$4(0, value));
|
|
2651
2594
|
else object[key] = value;
|
|
2652
2595
|
};
|
|
2653
2596
|
|
|
2654
|
-
var uncurryThis$
|
|
2597
|
+
var uncurryThis$s = functionUncurryThis;
|
|
2655
2598
|
var hasOwn$b = hasOwnProperty_1;
|
|
2656
2599
|
|
|
2657
2600
|
var $SyntaxError = SyntaxError;
|
|
2658
2601
|
var $parseInt$1 = parseInt;
|
|
2659
2602
|
var fromCharCode$3 = String.fromCharCode;
|
|
2660
|
-
var at$2 = uncurryThis$
|
|
2661
|
-
var slice$4 = uncurryThis$
|
|
2662
|
-
var exec$7 = uncurryThis$
|
|
2603
|
+
var at$2 = uncurryThis$s(''.charAt);
|
|
2604
|
+
var slice$4 = uncurryThis$s(''.slice);
|
|
2605
|
+
var exec$7 = uncurryThis$s(/./.exec);
|
|
2663
2606
|
|
|
2664
2607
|
var codePoints = {
|
|
2665
2608
|
'\\"': '"',
|
|
@@ -2707,12 +2650,12 @@ var parseJsonString = function (source, i) {
|
|
|
2707
2650
|
return { value: value, end: i };
|
|
2708
2651
|
};
|
|
2709
2652
|
|
|
2710
|
-
var $$
|
|
2711
|
-
var DESCRIPTORS$
|
|
2653
|
+
var $$v = _export;
|
|
2654
|
+
var DESCRIPTORS$f = descriptors;
|
|
2712
2655
|
var globalThis$w = globalThis_1;
|
|
2713
2656
|
var getBuiltIn$4 = getBuiltIn$c;
|
|
2714
|
-
var uncurryThis$
|
|
2715
|
-
var call$
|
|
2657
|
+
var uncurryThis$r = functionUncurryThis;
|
|
2658
|
+
var call$n = functionCall;
|
|
2716
2659
|
var isCallable$b = isCallable$t;
|
|
2717
2660
|
var isObject$b = isObject$m;
|
|
2718
2661
|
var isArray$3 = isArray$4;
|
|
@@ -2720,7 +2663,7 @@ var hasOwn$a = hasOwnProperty_1;
|
|
|
2720
2663
|
var toString$a = toString$d;
|
|
2721
2664
|
var lengthOfArrayLike$a = lengthOfArrayLike$d;
|
|
2722
2665
|
var createProperty$3 = createProperty$4;
|
|
2723
|
-
var fails$
|
|
2666
|
+
var fails$q = fails$C;
|
|
2724
2667
|
var parseJSONString$1 = parseJsonString;
|
|
2725
2668
|
var NATIVE_SYMBOL$1 = symbolConstructorDetection;
|
|
2726
2669
|
|
|
@@ -2731,10 +2674,10 @@ var nativeParse = JSON$1 && JSON$1.parse;
|
|
|
2731
2674
|
var enumerableOwnProperties = getBuiltIn$4('Object', 'keys');
|
|
2732
2675
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
2733
2676
|
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
2734
|
-
var at$1 = uncurryThis$
|
|
2735
|
-
var slice$3 = uncurryThis$
|
|
2736
|
-
var exec$6 = uncurryThis$
|
|
2737
|
-
var push$6 = uncurryThis$
|
|
2677
|
+
var at$1 = uncurryThis$r(''.charAt);
|
|
2678
|
+
var slice$3 = uncurryThis$r(''.slice);
|
|
2679
|
+
var exec$6 = uncurryThis$r(/./.exec);
|
|
2680
|
+
var push$6 = uncurryThis$r([].push);
|
|
2738
2681
|
|
|
2739
2682
|
var IS_DIGIT = /^\d$/;
|
|
2740
2683
|
var IS_NON_ZERO_DIGIT = /^[1-9]$/;
|
|
@@ -2779,11 +2722,11 @@ var internalize = function (holder, name, reviver, node) {
|
|
|
2779
2722
|
}
|
|
2780
2723
|
}
|
|
2781
2724
|
}
|
|
2782
|
-
return call$
|
|
2725
|
+
return call$n(reviver, holder, name, val, context);
|
|
2783
2726
|
};
|
|
2784
2727
|
|
|
2785
2728
|
var internalizeProperty = function (object, key, value) {
|
|
2786
|
-
if (DESCRIPTORS$
|
|
2729
|
+
if (DESCRIPTORS$f) {
|
|
2787
2730
|
var descriptor = getOwnPropertyDescriptor$1(object, key);
|
|
2788
2731
|
if (descriptor && !descriptor.configurable) return;
|
|
2789
2732
|
}
|
|
@@ -2947,7 +2890,7 @@ Context.prototype = {
|
|
|
2947
2890
|
}
|
|
2948
2891
|
};
|
|
2949
2892
|
|
|
2950
|
-
var NO_SOURCE_SUPPORT = fails$
|
|
2893
|
+
var NO_SOURCE_SUPPORT = fails$q(function () {
|
|
2951
2894
|
var unsafeInt = '9007199254740993';
|
|
2952
2895
|
var source;
|
|
2953
2896
|
nativeParse(unsafeInt, function (key, value, context) {
|
|
@@ -2956,7 +2899,7 @@ var NO_SOURCE_SUPPORT = fails$p(function () {
|
|
|
2956
2899
|
return source !== unsafeInt;
|
|
2957
2900
|
});
|
|
2958
2901
|
|
|
2959
|
-
var PROPER_BASE_PARSE = NATIVE_SYMBOL$1 && !fails$
|
|
2902
|
+
var PROPER_BASE_PARSE = NATIVE_SYMBOL$1 && !fails$q(function () {
|
|
2960
2903
|
// Safari 9 bug
|
|
2961
2904
|
return 1 / nativeParse('-0 \t') !== -Infinity;
|
|
2962
2905
|
});
|
|
@@ -2964,7 +2907,7 @@ var PROPER_BASE_PARSE = NATIVE_SYMBOL$1 && !fails$p(function () {
|
|
|
2964
2907
|
// `JSON.parse` method
|
|
2965
2908
|
// https://tc39.es/ecma262/#sec-json.parse
|
|
2966
2909
|
// https://github.com/tc39/proposal-json-parse-with-source
|
|
2967
|
-
$$
|
|
2910
|
+
$$v({ target: 'JSON', stat: true, forced: NO_SOURCE_SUPPORT }, {
|
|
2968
2911
|
parse: function parse(text, reviver) {
|
|
2969
2912
|
return PROPER_BASE_PARSE && !isCallable$b(reviver) ? nativeParse(text) : $parse(text, reviver);
|
|
2970
2913
|
}
|
|
@@ -2980,9 +2923,9 @@ var isRawJson = function isRawJSON(O) {
|
|
|
2980
2923
|
};
|
|
2981
2924
|
|
|
2982
2925
|
/* eslint-disable es/no-json -- safe */
|
|
2983
|
-
var fails$
|
|
2926
|
+
var fails$p = fails$C;
|
|
2984
2927
|
|
|
2985
|
-
var nativeRawJson = !fails$
|
|
2928
|
+
var nativeRawJson = !fails$p(function () {
|
|
2986
2929
|
var unsafeInt = '9007199254740993';
|
|
2987
2930
|
// eslint-disable-next-line es/no-json-rawjson -- feature detection
|
|
2988
2931
|
var raw = JSON.rawJSON(unsafeInt);
|
|
@@ -2990,12 +2933,12 @@ var nativeRawJson = !fails$o(function () {
|
|
|
2990
2933
|
return !JSON.isRawJSON(raw) || JSON.stringify(raw) !== unsafeInt;
|
|
2991
2934
|
});
|
|
2992
2935
|
|
|
2993
|
-
var $$
|
|
2936
|
+
var $$u = _export;
|
|
2994
2937
|
var getBuiltIn$3 = getBuiltIn$c;
|
|
2995
2938
|
var apply$3 = functionApply;
|
|
2996
|
-
var call$
|
|
2997
|
-
var uncurryThis$
|
|
2998
|
-
var fails$
|
|
2939
|
+
var call$m = functionCall;
|
|
2940
|
+
var uncurryThis$q = functionUncurryThis;
|
|
2941
|
+
var fails$o = fails$C;
|
|
2999
2942
|
var isArray$2 = isArray$4;
|
|
3000
2943
|
var isCallable$a = isCallable$t;
|
|
3001
2944
|
var isRawJSON = isRawJson;
|
|
@@ -3010,13 +2953,13 @@ var NATIVE_RAW_JSON = nativeRawJson;
|
|
|
3010
2953
|
|
|
3011
2954
|
var $String$1 = String;
|
|
3012
2955
|
var $stringify = getBuiltIn$3('JSON', 'stringify');
|
|
3013
|
-
var exec$5 = uncurryThis$
|
|
3014
|
-
var charAt$9 = uncurryThis$
|
|
3015
|
-
var charCodeAt$2 = uncurryThis$
|
|
3016
|
-
var replace$7 = uncurryThis$
|
|
3017
|
-
var slice$2 = uncurryThis$
|
|
3018
|
-
var push$5 = uncurryThis$
|
|
3019
|
-
var numberToString$2 = uncurryThis$
|
|
2956
|
+
var exec$5 = uncurryThis$q(/./.exec);
|
|
2957
|
+
var charAt$9 = uncurryThis$q(''.charAt);
|
|
2958
|
+
var charCodeAt$2 = uncurryThis$q(''.charCodeAt);
|
|
2959
|
+
var replace$7 = uncurryThis$q(''.replace);
|
|
2960
|
+
var slice$2 = uncurryThis$q(''.slice);
|
|
2961
|
+
var push$5 = uncurryThis$q([].push);
|
|
2962
|
+
var numberToString$2 = uncurryThis$q(1.1.toString);
|
|
3020
2963
|
|
|
3021
2964
|
var surrogates = /[\uD800-\uDFFF]/g;
|
|
3022
2965
|
var leadingSurrogates = /^[\uD800-\uDBFF]$/;
|
|
@@ -3025,7 +2968,7 @@ var trailingSurrogates = /^[\uDC00-\uDFFF]$/;
|
|
|
3025
2968
|
var MARK = uid$1();
|
|
3026
2969
|
var MARK_LENGTH = MARK.length;
|
|
3027
2970
|
|
|
3028
|
-
var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails$
|
|
2971
|
+
var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails$o(function () {
|
|
3029
2972
|
var symbol = getBuiltIn$3('Symbol')('stringify detection');
|
|
3030
2973
|
// MS Edge converts symbol values to JSON as {}
|
|
3031
2974
|
return $stringify([symbol]) !== '[null]'
|
|
@@ -3036,7 +2979,7 @@ var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails$n(function () {
|
|
|
3036
2979
|
});
|
|
3037
2980
|
|
|
3038
2981
|
// https://github.com/tc39/proposal-well-formed-stringify
|
|
3039
|
-
var ILL_FORMED_UNICODE = fails$
|
|
2982
|
+
var ILL_FORMED_UNICODE = fails$o(function () {
|
|
3040
2983
|
return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"'
|
|
3041
2984
|
|| $stringify('\uDEAD') !== '"\\udead"';
|
|
3042
2985
|
});
|
|
@@ -3047,7 +2990,7 @@ var stringifyWithProperSymbolsConversion = WRONG_SYMBOLS_CONVERSION ? function (
|
|
|
3047
2990
|
if (!isCallable$a($replacer) && (it === undefined || isSymbol$1(it))) return; // IE8 returns string on undefined
|
|
3048
2991
|
args[1] = function (key, value) {
|
|
3049
2992
|
// some old implementations (like WebKit) could pass numbers as keys
|
|
3050
|
-
if (isCallable$a($replacer)) value = call$
|
|
2993
|
+
if (isCallable$a($replacer)) value = call$m($replacer, this, $String$1(key), value);
|
|
3051
2994
|
if (!isSymbol$1(value)) return value;
|
|
3052
2995
|
};
|
|
3053
2996
|
return apply$3($stringify, null, args);
|
|
@@ -3089,14 +3032,14 @@ var getReplacerFunction = function (replacer) {
|
|
|
3089
3032
|
// `JSON.stringify` method
|
|
3090
3033
|
// https://tc39.es/ecma262/#sec-json.stringify
|
|
3091
3034
|
// https://github.com/tc39/proposal-json-parse-with-source
|
|
3092
|
-
if ($stringify) $$
|
|
3035
|
+
if ($stringify) $$u({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE || !NATIVE_RAW_JSON }, {
|
|
3093
3036
|
stringify: function stringify(text, replacer, space) {
|
|
3094
3037
|
var replacerFunction = getReplacerFunction(replacer);
|
|
3095
3038
|
var rawStrings = [];
|
|
3096
3039
|
|
|
3097
3040
|
var json = stringifyWithProperSymbolsConversion(text, function (key, value) {
|
|
3098
3041
|
// some old implementations (like WebKit) could pass numbers as keys
|
|
3099
|
-
var v = isCallable$a(replacerFunction) ? call$
|
|
3042
|
+
var v = isCallable$a(replacerFunction) ? call$m(replacerFunction, this, $String$1(key), value) : value;
|
|
3100
3043
|
return !NATIVE_RAW_JSON && isRawJSON(v) ? MARK + (push$5(rawStrings, v.rawJSON) - 1) : v;
|
|
3101
3044
|
}, space);
|
|
3102
3045
|
|
|
@@ -3150,10 +3093,10 @@ const loadSession = async () => {
|
|
|
3150
3093
|
}
|
|
3151
3094
|
};
|
|
3152
3095
|
|
|
3153
|
-
var defineProperty$
|
|
3096
|
+
var defineProperty$2 = objectDefineProperty.f;
|
|
3154
3097
|
|
|
3155
3098
|
var proxyAccessor$2 = function (Target, Source, key) {
|
|
3156
|
-
key in Target || defineProperty$
|
|
3099
|
+
key in Target || defineProperty$2(Target, key, {
|
|
3157
3100
|
configurable: true,
|
|
3158
3101
|
get: function () { return Source[key]; },
|
|
3159
3102
|
set: function (it) { Source[key] = it; }
|
|
@@ -3196,10 +3139,10 @@ var installErrorCause$1 = function (O, options) {
|
|
|
3196
3139
|
}
|
|
3197
3140
|
};
|
|
3198
3141
|
|
|
3199
|
-
var uncurryThis$
|
|
3142
|
+
var uncurryThis$p = functionUncurryThis;
|
|
3200
3143
|
|
|
3201
3144
|
var $Error = Error;
|
|
3202
|
-
var replace$6 = uncurryThis$
|
|
3145
|
+
var replace$6 = uncurryThis$p(''.replace);
|
|
3203
3146
|
|
|
3204
3147
|
var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
|
|
3205
3148
|
// eslint-disable-next-line redos/no-vulnerable, sonarjs/slow-regex -- safe
|
|
@@ -3212,10 +3155,10 @@ var errorStackClear = function (stack, dropEntries) {
|
|
|
3212
3155
|
} return stack;
|
|
3213
3156
|
};
|
|
3214
3157
|
|
|
3215
|
-
var fails$
|
|
3158
|
+
var fails$n = fails$C;
|
|
3216
3159
|
var createPropertyDescriptor$3 = createPropertyDescriptor$7;
|
|
3217
3160
|
|
|
3218
|
-
var errorStackInstallable = !fails$
|
|
3161
|
+
var errorStackInstallable = !fails$n(function () {
|
|
3219
3162
|
var error = new Error('a');
|
|
3220
3163
|
if (!('stack' in error)) return true;
|
|
3221
3164
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
@@ -3249,7 +3192,7 @@ var inheritIfRequired$3 = inheritIfRequired$4;
|
|
|
3249
3192
|
var normalizeStringArgument = normalizeStringArgument$1;
|
|
3250
3193
|
var installErrorCause = installErrorCause$1;
|
|
3251
3194
|
var installErrorStack = errorStackInstall;
|
|
3252
|
-
var DESCRIPTORS$
|
|
3195
|
+
var DESCRIPTORS$e = descriptors;
|
|
3253
3196
|
|
|
3254
3197
|
var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
|
|
3255
3198
|
var STACK_TRACE_LIMIT = 'stackTraceLimit';
|
|
@@ -3284,7 +3227,7 @@ var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_A
|
|
|
3284
3227
|
if (ERROR_NAME !== 'Error') {
|
|
3285
3228
|
if (setPrototypeOf$4) setPrototypeOf$4(WrappedError, BaseError);
|
|
3286
3229
|
else copyConstructorProperties$1(WrappedError, BaseError, { name: true });
|
|
3287
|
-
} else if (DESCRIPTORS$
|
|
3230
|
+
} else if (DESCRIPTORS$e && STACK_TRACE_LIMIT in OriginalError) {
|
|
3288
3231
|
proxyAccessor$1(WrappedError, OriginalError, STACK_TRACE_LIMIT);
|
|
3289
3232
|
proxyAccessor$1(WrappedError, OriginalError, 'prepareStackTrace');
|
|
3290
3233
|
}
|
|
@@ -3303,7 +3246,7 @@ var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_A
|
|
|
3303
3246
|
};
|
|
3304
3247
|
|
|
3305
3248
|
/* eslint-disable no-unused-vars -- required for functions `.length` */
|
|
3306
|
-
var $$
|
|
3249
|
+
var $$t = _export;
|
|
3307
3250
|
var globalThis$v = globalThis_1;
|
|
3308
3251
|
var apply$2 = functionApply;
|
|
3309
3252
|
var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
|
|
@@ -3318,7 +3261,7 @@ var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
|
|
|
3318
3261
|
var O = {};
|
|
3319
3262
|
// eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation
|
|
3320
3263
|
O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED$7);
|
|
3321
|
-
$$
|
|
3264
|
+
$$t({ global: true, constructor: true, arity: 1, forced: FORCED$7 }, O);
|
|
3322
3265
|
};
|
|
3323
3266
|
|
|
3324
3267
|
var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
|
|
@@ -3326,7 +3269,7 @@ var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
|
|
|
3326
3269
|
var O = {};
|
|
3327
3270
|
// eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation
|
|
3328
3271
|
O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED$7);
|
|
3329
|
-
$$
|
|
3272
|
+
$$t({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED$7 }, O);
|
|
3330
3273
|
}
|
|
3331
3274
|
};
|
|
3332
3275
|
|
|
@@ -3362,9 +3305,9 @@ exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
|
|
|
3362
3305
|
return function RuntimeError(message) { return apply$2(init, this, arguments); };
|
|
3363
3306
|
});
|
|
3364
3307
|
|
|
3365
|
-
var fails$
|
|
3308
|
+
var fails$m = fails$C;
|
|
3366
3309
|
|
|
3367
|
-
var correctPrototypeGetter = !fails$
|
|
3310
|
+
var correctPrototypeGetter = !fails$m(function () {
|
|
3368
3311
|
function F() { /* empty */ }
|
|
3369
3312
|
F.prototype.constructor = null;
|
|
3370
3313
|
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
@@ -3373,7 +3316,7 @@ var correctPrototypeGetter = !fails$l(function () {
|
|
|
3373
3316
|
|
|
3374
3317
|
var hasOwn$8 = hasOwnProperty_1;
|
|
3375
3318
|
var isCallable$8 = isCallable$t;
|
|
3376
|
-
var toObject$
|
|
3319
|
+
var toObject$7 = toObject$9;
|
|
3377
3320
|
var sharedKey = sharedKey$3;
|
|
3378
3321
|
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
3379
3322
|
|
|
@@ -3385,7 +3328,7 @@ var ObjectPrototype$2 = $Object.prototype;
|
|
|
3385
3328
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
3386
3329
|
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
3387
3330
|
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
|
|
3388
|
-
var object = toObject$
|
|
3331
|
+
var object = toObject$7(O);
|
|
3389
3332
|
if (hasOwn$8(object, IE_PROTO)) return object[IE_PROTO];
|
|
3390
3333
|
var constructor = object.constructor;
|
|
3391
3334
|
if (isCallable$8(constructor) && object instanceof constructor) {
|
|
@@ -3393,7 +3336,7 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : f
|
|
|
3393
3336
|
} return object instanceof $Object ? ObjectPrototype$2 : null;
|
|
3394
3337
|
};
|
|
3395
3338
|
|
|
3396
|
-
var fails$
|
|
3339
|
+
var fails$l = fails$C;
|
|
3397
3340
|
var isCallable$7 = isCallable$t;
|
|
3398
3341
|
var isObject$7 = isObject$m;
|
|
3399
3342
|
var getPrototypeOf$4 = objectGetPrototypeOf;
|
|
@@ -3418,7 +3361,7 @@ if ([].keys) {
|
|
|
3418
3361
|
}
|
|
3419
3362
|
}
|
|
3420
3363
|
|
|
3421
|
-
var NEW_ITERATOR_PROTOTYPE = !isObject$7(IteratorPrototype$4) || fails$
|
|
3364
|
+
var NEW_ITERATOR_PROTOTYPE = !isObject$7(IteratorPrototype$4) || fails$l(function () {
|
|
3422
3365
|
var test = {};
|
|
3423
3366
|
// FF44- legacy iterators case
|
|
3424
3367
|
return IteratorPrototype$4[ITERATOR$5].call(test) !== test;
|
|
@@ -3455,8 +3398,8 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
|
|
|
3455
3398
|
return IteratorConstructor;
|
|
3456
3399
|
};
|
|
3457
3400
|
|
|
3458
|
-
var $$
|
|
3459
|
-
var call$
|
|
3401
|
+
var $$s = _export;
|
|
3402
|
+
var call$l = functionCall;
|
|
3460
3403
|
var FunctionName$1 = functionName;
|
|
3461
3404
|
var isCallable$6 = isCallable$t;
|
|
3462
3405
|
var createIteratorConstructor$1 = iteratorCreateConstructor;
|
|
@@ -3528,7 +3471,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
3528
3471
|
createNonEnumerableProperty$7(IterablePrototype, 'name', VALUES);
|
|
3529
3472
|
} else {
|
|
3530
3473
|
INCORRECT_VALUES_NAME = true;
|
|
3531
|
-
defaultIterator = function values() { return call$
|
|
3474
|
+
defaultIterator = function values() { return call$l(nativeIterator, this); };
|
|
3532
3475
|
}
|
|
3533
3476
|
}
|
|
3534
3477
|
|
|
@@ -3543,7 +3486,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
3543
3486
|
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
3544
3487
|
defineBuiltIn$9(IterablePrototype, KEY, methods[KEY]);
|
|
3545
3488
|
}
|
|
3546
|
-
} else $$
|
|
3489
|
+
} else $$s({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
3547
3490
|
}
|
|
3548
3491
|
|
|
3549
3492
|
// define iterator
|
|
@@ -3565,10 +3508,10 @@ var toIndexedObject$1 = toIndexedObject$6;
|
|
|
3565
3508
|
var addToUnscopables = addToUnscopables$2;
|
|
3566
3509
|
var Iterators = iterators;
|
|
3567
3510
|
var InternalStateModule$7 = internalState;
|
|
3568
|
-
var defineProperty = objectDefineProperty.f;
|
|
3511
|
+
var defineProperty$1 = objectDefineProperty.f;
|
|
3569
3512
|
var defineIterator$1 = iteratorDefine;
|
|
3570
3513
|
var createIterResultObject$3 = createIterResultObject$4;
|
|
3571
|
-
var DESCRIPTORS$
|
|
3514
|
+
var DESCRIPTORS$d = descriptors;
|
|
3572
3515
|
|
|
3573
3516
|
var ARRAY_ITERATOR = 'Array Iterator';
|
|
3574
3517
|
var setInternalState$6 = InternalStateModule$7.set;
|
|
@@ -3618,17 +3561,17 @@ addToUnscopables('values');
|
|
|
3618
3561
|
addToUnscopables('entries');
|
|
3619
3562
|
|
|
3620
3563
|
// V8 ~ Chrome 45- bug
|
|
3621
|
-
if (DESCRIPTORS$
|
|
3622
|
-
defineProperty(values, 'name', { value: 'values' });
|
|
3564
|
+
if (DESCRIPTORS$d && values.name !== 'values') try {
|
|
3565
|
+
defineProperty$1(values, 'name', { value: 'values' });
|
|
3623
3566
|
} catch (error) { /* empty */ }
|
|
3624
3567
|
|
|
3625
3568
|
var globalThis$u = globalThis_1;
|
|
3626
|
-
var fails$
|
|
3569
|
+
var fails$k = fails$C;
|
|
3627
3570
|
|
|
3628
3571
|
// babel-minify and Closure Compiler transpiles RegExp('.', 'd') -> /./d and it causes SyntaxError
|
|
3629
3572
|
var RegExp$1 = globalThis$u.RegExp;
|
|
3630
3573
|
|
|
3631
|
-
var FLAGS_GETTER_IS_CORRECT = !fails$
|
|
3574
|
+
var FLAGS_GETTER_IS_CORRECT = !fails$k(function () {
|
|
3632
3575
|
var INDICES_SUPPORT = true;
|
|
3633
3576
|
try {
|
|
3634
3577
|
RegExp$1('.', 'd');
|
|
@@ -3687,7 +3630,7 @@ var regexpFlags$1 = function () {
|
|
|
3687
3630
|
return result;
|
|
3688
3631
|
};
|
|
3689
3632
|
|
|
3690
|
-
var call$
|
|
3633
|
+
var call$k = functionCall;
|
|
3691
3634
|
var hasOwn$7 = hasOwnProperty_1;
|
|
3692
3635
|
var isPrototypeOf$3 = objectIsPrototypeOf;
|
|
3693
3636
|
var regExpFlagsDetection = regexpFlagsDetection;
|
|
@@ -3699,7 +3642,7 @@ var regexpGetFlags = regExpFlagsDetection.correct ? function (it) {
|
|
|
3699
3642
|
return it.flags;
|
|
3700
3643
|
} : function (it) {
|
|
3701
3644
|
return (!regExpFlagsDetection.correct && isPrototypeOf$3(RegExpPrototype$4, it) && !hasOwn$7(it, 'flags'))
|
|
3702
|
-
? call$
|
|
3645
|
+
? call$k(regExpFlagsGetterImplementation, it)
|
|
3703
3646
|
: it.flags;
|
|
3704
3647
|
};
|
|
3705
3648
|
|
|
@@ -3707,14 +3650,14 @@ var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
|
|
|
3707
3650
|
var defineBuiltIn$8 = defineBuiltIn$e;
|
|
3708
3651
|
var anObject$c = anObject$n;
|
|
3709
3652
|
var $toString$2 = toString$d;
|
|
3710
|
-
var fails$
|
|
3653
|
+
var fails$j = fails$C;
|
|
3711
3654
|
var getRegExpFlags$2 = regexpGetFlags;
|
|
3712
3655
|
|
|
3713
3656
|
var TO_STRING = 'toString';
|
|
3714
3657
|
var RegExpPrototype$3 = RegExp.prototype;
|
|
3715
3658
|
var nativeToString = RegExpPrototype$3[TO_STRING];
|
|
3716
3659
|
|
|
3717
|
-
var NOT_GENERIC = fails$
|
|
3660
|
+
var NOT_GENERIC = fails$j(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
|
|
3718
3661
|
// FF44- RegExp#toString has a wrong name
|
|
3719
3662
|
var INCORRECT_NAME = PROPER_FUNCTION_NAME$1 && nativeToString.name !== TO_STRING;
|
|
3720
3663
|
|
|
@@ -3810,14 +3753,14 @@ for (var COLLECTION_NAME in DOMIterables) {
|
|
|
3810
3753
|
|
|
3811
3754
|
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
3812
3755
|
|
|
3813
|
-
var uncurryThis$
|
|
3756
|
+
var uncurryThis$o = functionUncurryThis;
|
|
3814
3757
|
var toIntegerOrInfinity$7 = toIntegerOrInfinity$a;
|
|
3815
3758
|
var toString$7 = toString$d;
|
|
3816
3759
|
var requireObjectCoercible$1 = requireObjectCoercible$6;
|
|
3817
3760
|
|
|
3818
|
-
var charAt$8 = uncurryThis$
|
|
3819
|
-
var charCodeAt$1 = uncurryThis$
|
|
3820
|
-
var stringSlice$6 = uncurryThis$
|
|
3761
|
+
var charAt$8 = uncurryThis$o(''.charAt);
|
|
3762
|
+
var charCodeAt$1 = uncurryThis$o(''.charCodeAt);
|
|
3763
|
+
var stringSlice$6 = uncurryThis$o(''.slice);
|
|
3821
3764
|
|
|
3822
3765
|
var createMethod$2 = function (CONVERT_TO_STRING) {
|
|
3823
3766
|
return function ($this, pos) {
|
|
@@ -3878,14 +3821,14 @@ defineIterator(String, 'String', function (iterated) {
|
|
|
3878
3821
|
return createIterResultObject$2(point, false);
|
|
3879
3822
|
});
|
|
3880
3823
|
|
|
3881
|
-
var fails$
|
|
3824
|
+
var fails$i = fails$C;
|
|
3882
3825
|
var wellKnownSymbol$8 = wellKnownSymbol$p;
|
|
3883
|
-
var DESCRIPTORS$
|
|
3826
|
+
var DESCRIPTORS$c = descriptors;
|
|
3884
3827
|
var IS_PURE = isPure;
|
|
3885
3828
|
|
|
3886
3829
|
var ITERATOR$2 = wellKnownSymbol$8('iterator');
|
|
3887
3830
|
|
|
3888
|
-
var urlConstructorDetection = !fails$
|
|
3831
|
+
var urlConstructorDetection = !fails$i(function () {
|
|
3889
3832
|
// eslint-disable-next-line unicorn/relative-url-style -- required for testing
|
|
3890
3833
|
var url = new URL('b?a=1&b=2&c=3', 'https://a');
|
|
3891
3834
|
var params = url.searchParams;
|
|
@@ -3901,7 +3844,7 @@ var urlConstructorDetection = !fails$h(function () {
|
|
|
3901
3844
|
// https://bugs.chromium.org/p/v8/issues/detail?id=14222
|
|
3902
3845
|
params2['delete']('b', undefined);
|
|
3903
3846
|
return (IS_PURE && (!url.toJSON || !params2.has('a', 1) || params2.has('a', 2) || !params2.has('a', undefined) || params2.has('b')))
|
|
3904
|
-
|| (!params.size && (IS_PURE || !DESCRIPTORS$
|
|
3847
|
+
|| (!params.size && (IS_PURE || !DESCRIPTORS$c))
|
|
3905
3848
|
|| !params.sort
|
|
3906
3849
|
|| url.href !== 'https://a/c%20d?a=1&c=3'
|
|
3907
3850
|
|| params.get('c') !== '3'
|
|
@@ -3920,6 +3863,64 @@ var urlConstructorDetection = !fails$h(function () {
|
|
|
3920
3863
|
|| new URL('https://x', undefined).host !== 'x';
|
|
3921
3864
|
});
|
|
3922
3865
|
|
|
3866
|
+
var DESCRIPTORS$b = descriptors;
|
|
3867
|
+
var uncurryThis$n = functionUncurryThis;
|
|
3868
|
+
var call$j = functionCall;
|
|
3869
|
+
var fails$h = fails$C;
|
|
3870
|
+
var objectKeys = objectKeys$2;
|
|
3871
|
+
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
3872
|
+
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
3873
|
+
var toObject$6 = toObject$9;
|
|
3874
|
+
var IndexedObject$2 = indexedObject;
|
|
3875
|
+
|
|
3876
|
+
// eslint-disable-next-line es/no-object-assign -- safe
|
|
3877
|
+
var $assign = Object.assign;
|
|
3878
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
3879
|
+
var defineProperty = Object.defineProperty;
|
|
3880
|
+
var concat$1 = uncurryThis$n([].concat);
|
|
3881
|
+
|
|
3882
|
+
// `Object.assign` method
|
|
3883
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
3884
|
+
var objectAssign = !$assign || fails$h(function () {
|
|
3885
|
+
// should have correct order of operations (Edge bug)
|
|
3886
|
+
if (DESCRIPTORS$b && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
|
|
3887
|
+
enumerable: true,
|
|
3888
|
+
get: function () {
|
|
3889
|
+
defineProperty(this, 'b', {
|
|
3890
|
+
value: 3,
|
|
3891
|
+
enumerable: false
|
|
3892
|
+
});
|
|
3893
|
+
}
|
|
3894
|
+
}), { b: 2 })).b !== 1) return true;
|
|
3895
|
+
// should work with symbols and should have deterministic property order (V8 bug)
|
|
3896
|
+
var A = {};
|
|
3897
|
+
var B = {};
|
|
3898
|
+
// eslint-disable-next-line es/no-symbol -- safe
|
|
3899
|
+
var symbol = Symbol('assign detection');
|
|
3900
|
+
var alphabet = 'abcdefghijklmnopqrst';
|
|
3901
|
+
A[symbol] = 7;
|
|
3902
|
+
// eslint-disable-next-line es/no-array-prototype-foreach -- safe
|
|
3903
|
+
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
3904
|
+
return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
|
|
3905
|
+
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
3906
|
+
var T = toObject$6(target);
|
|
3907
|
+
var argumentsLength = arguments.length;
|
|
3908
|
+
var index = 1;
|
|
3909
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
3910
|
+
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
3911
|
+
while (argumentsLength > index) {
|
|
3912
|
+
var S = IndexedObject$2(arguments[index++]);
|
|
3913
|
+
var keys = getOwnPropertySymbols ? concat$1(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
|
3914
|
+
var length = keys.length;
|
|
3915
|
+
var j = 0;
|
|
3916
|
+
var key;
|
|
3917
|
+
while (length > j) {
|
|
3918
|
+
key = keys[j++];
|
|
3919
|
+
if (!DESCRIPTORS$b || call$j(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
3920
|
+
}
|
|
3921
|
+
} return T;
|
|
3922
|
+
} : $assign;
|
|
3923
|
+
|
|
3923
3924
|
var anObject$b = anObject$n;
|
|
3924
3925
|
var iteratorClose$9 = iteratorClose$b;
|
|
3925
3926
|
|
|
@@ -4192,7 +4193,7 @@ var stringPunycodeToAscii = function (input) {
|
|
|
4192
4193
|
return join$4(encoded, '.');
|
|
4193
4194
|
};
|
|
4194
4195
|
|
|
4195
|
-
var $$
|
|
4196
|
+
var $$r = _export;
|
|
4196
4197
|
var uncurryThis$l = functionUncurryThis;
|
|
4197
4198
|
var toAbsoluteIndex$2 = toAbsoluteIndex$4;
|
|
4198
4199
|
|
|
@@ -4207,7 +4208,7 @@ var INCORRECT_LENGTH = !!$fromCodePoint && $fromCodePoint.length !== 1;
|
|
|
4207
4208
|
|
|
4208
4209
|
// `String.fromCodePoint` method
|
|
4209
4210
|
// https://tc39.es/ecma262/#sec-string.fromcodepoint
|
|
4210
|
-
$$
|
|
4211
|
+
$$r({ target: 'String', stat: true, arity: 1, forced: INCORRECT_LENGTH }, {
|
|
4211
4212
|
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
4212
4213
|
fromCodePoint: function fromCodePoint(x) {
|
|
4213
4214
|
var elements = [];
|
|
@@ -4276,7 +4277,7 @@ var arraySort$1 = sort$1;
|
|
|
4276
4277
|
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
|
|
4277
4278
|
|
|
4278
4279
|
|
|
4279
|
-
var $$
|
|
4280
|
+
var $$q = _export;
|
|
4280
4281
|
var globalThis$s = globalThis_1;
|
|
4281
4282
|
var safeGetBuiltIn = safeGetBuiltIn$2;
|
|
4282
4283
|
var getBuiltIn$1 = getBuiltIn$c;
|
|
@@ -4745,7 +4746,7 @@ if (DESCRIPTORS$9) defineBuiltInAccessor$8(URLSearchParamsPrototype$3, 'size', {
|
|
|
4745
4746
|
|
|
4746
4747
|
setToStringTag$2(URLSearchParamsConstructor, URL_SEARCH_PARAMS);
|
|
4747
4748
|
|
|
4748
|
-
$$
|
|
4749
|
+
$$q({ global: true, constructor: true, forced: !USE_NATIVE_URL$1 }, {
|
|
4749
4750
|
URLSearchParams: URLSearchParamsConstructor
|
|
4750
4751
|
});
|
|
4751
4752
|
|
|
@@ -4772,7 +4773,7 @@ if (!USE_NATIVE_URL$1 && isCallable$5(Headers)) {
|
|
|
4772
4773
|
};
|
|
4773
4774
|
|
|
4774
4775
|
if (isCallable$5(nativeFetch)) {
|
|
4775
|
-
$$
|
|
4776
|
+
$$q({ global: true, enumerable: true, dontCallGetSet: true, forced: true }, {
|
|
4776
4777
|
fetch: function fetch(input /* , init */) {
|
|
4777
4778
|
return nativeFetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});
|
|
4778
4779
|
}
|
|
@@ -4788,7 +4789,7 @@ if (!USE_NATIVE_URL$1 && isCallable$5(Headers)) {
|
|
|
4788
4789
|
RequestPrototype.constructor = RequestConstructor;
|
|
4789
4790
|
RequestConstructor.prototype = RequestPrototype;
|
|
4790
4791
|
|
|
4791
|
-
$$
|
|
4792
|
+
$$q({ global: true, constructor: true, dontCallGetSet: true, forced: true }, {
|
|
4792
4793
|
Request: RequestConstructor
|
|
4793
4794
|
});
|
|
4794
4795
|
}
|
|
@@ -4801,7 +4802,7 @@ var web_urlSearchParams_constructor = {
|
|
|
4801
4802
|
|
|
4802
4803
|
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
|
|
4803
4804
|
|
|
4804
|
-
var $$
|
|
4805
|
+
var $$p = _export;
|
|
4805
4806
|
var DESCRIPTORS$8 = descriptors;
|
|
4806
4807
|
var USE_NATIVE_URL = urlConstructorDetection;
|
|
4807
4808
|
var globalThis$r = globalThis_1;
|
|
@@ -4811,7 +4812,7 @@ var defineBuiltIn$5 = defineBuiltIn$e;
|
|
|
4811
4812
|
var defineBuiltInAccessor$7 = defineBuiltInAccessor$b;
|
|
4812
4813
|
var anInstance$3 = anInstance$6;
|
|
4813
4814
|
var hasOwn$5 = hasOwnProperty_1;
|
|
4814
|
-
var assign = objectAssign;
|
|
4815
|
+
var assign$1 = objectAssign;
|
|
4815
4816
|
var arrayFrom = arrayFrom$1;
|
|
4816
4817
|
var arraySlice$2 = arraySlice$6;
|
|
4817
4818
|
var codeAt = stringMultibyte.codeAt;
|
|
@@ -5060,19 +5061,19 @@ var serializeHost = function (host) {
|
|
|
5060
5061
|
};
|
|
5061
5062
|
|
|
5062
5063
|
var C0ControlPercentEncodeSet = {};
|
|
5063
|
-
var queryPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {
|
|
5064
|
+
var queryPercentEncodeSet = assign$1({}, C0ControlPercentEncodeSet, {
|
|
5064
5065
|
' ': 1, '"': 1, '#': 1, '<': 1, '>': 1
|
|
5065
5066
|
});
|
|
5066
|
-
var specialQueryPercentEncodeSet = assign({}, queryPercentEncodeSet, {
|
|
5067
|
+
var specialQueryPercentEncodeSet = assign$1({}, queryPercentEncodeSet, {
|
|
5067
5068
|
"'": 1
|
|
5068
5069
|
});
|
|
5069
|
-
var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {
|
|
5070
|
+
var fragmentPercentEncodeSet = assign$1({}, C0ControlPercentEncodeSet, {
|
|
5070
5071
|
' ': 1, '"': 1, '<': 1, '>': 1, '`': 1
|
|
5071
5072
|
});
|
|
5072
|
-
var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {
|
|
5073
|
+
var pathPercentEncodeSet = assign$1({}, fragmentPercentEncodeSet, {
|
|
5073
5074
|
'#': 1, '?': 1, '{': 1, '}': 1, '^': 1
|
|
5074
5075
|
});
|
|
5075
|
-
var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {
|
|
5076
|
+
var userinfoPercentEncodeSet = assign$1({}, pathPercentEncodeSet, {
|
|
5076
5077
|
'/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1
|
|
5077
5078
|
});
|
|
5078
5079
|
|
|
@@ -5875,16 +5876,16 @@ if (NativeURL) {
|
|
|
5875
5876
|
|
|
5876
5877
|
setToStringTag$1(URLConstructor, 'URL');
|
|
5877
5878
|
|
|
5878
|
-
$$
|
|
5879
|
+
$$p({ global: true, constructor: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS$8 }, {
|
|
5879
5880
|
URL: URLConstructor
|
|
5880
5881
|
});
|
|
5881
5882
|
|
|
5882
|
-
var $$
|
|
5883
|
+
var $$o = _export;
|
|
5883
5884
|
var call$g = functionCall;
|
|
5884
5885
|
|
|
5885
5886
|
// `URL.prototype.toJSON` method
|
|
5886
5887
|
// https://url.spec.whatwg.org/#dom-url-tojson
|
|
5887
|
-
$$
|
|
5888
|
+
$$o({ target: 'URL', proto: true, enumerable: true }, {
|
|
5888
5889
|
toJSON: function toJSON() {
|
|
5889
5890
|
return call$g(URL.prototype.toString, this);
|
|
5890
5891
|
}
|
|
@@ -5994,7 +5995,7 @@ const CONNECTED_APP_SSO_CONFIG = {
|
|
|
5994
5995
|
},
|
|
5995
5996
|
prod: {
|
|
5996
5997
|
clientId: "connected-app-live-07043de1-9e9c-4511-8c6a-514a2a050da2",
|
|
5997
|
-
authorizeUrl: "https://vention.
|
|
5998
|
+
authorizeUrl: "https://vention.com/oauth2/authorize",
|
|
5998
5999
|
tokenUrl: "https://login.vention.io/v1/public/project-live-f81fdd2f-245c-4fec-943b-624ddef86b3b/oauth2/token",
|
|
5999
6000
|
revokeUrl: "https://login.vention.io/v1/oauth2/revoke"
|
|
6000
6001
|
}
|
|
@@ -6185,7 +6186,7 @@ const loginWithSso = async environment => {
|
|
|
6185
6186
|
};
|
|
6186
6187
|
const getSsoEnvironmentConfig = getSsoConfig;
|
|
6187
6188
|
|
|
6188
|
-
var $$
|
|
6189
|
+
var $$n = _export;
|
|
6189
6190
|
var globalThis$q = globalThis_1;
|
|
6190
6191
|
var anInstance$2 = anInstance$6;
|
|
6191
6192
|
var anObject$9 = anObject$n;
|
|
@@ -6244,7 +6245,7 @@ IteratorConstructor.prototype = IteratorPrototype$1;
|
|
|
6244
6245
|
|
|
6245
6246
|
// `Iterator` constructor
|
|
6246
6247
|
// https://tc39.es/ecma262/#sec-iterator
|
|
6247
|
-
$$
|
|
6248
|
+
$$n({ global: true, constructor: true, forced: FORCED$6 }, {
|
|
6248
6249
|
Iterator: IteratorConstructor
|
|
6249
6250
|
});
|
|
6250
6251
|
|
|
@@ -6281,7 +6282,7 @@ var iteratorHelperWithoutClosingOnEarlyError$4 = function (METHOD_NAME, Expected
|
|
|
6281
6282
|
if (!CLOSED) return method;
|
|
6282
6283
|
};
|
|
6283
6284
|
|
|
6284
|
-
var $$
|
|
6285
|
+
var $$m = _export;
|
|
6285
6286
|
var call$f = functionCall;
|
|
6286
6287
|
var iterate$3 = iterate$6;
|
|
6287
6288
|
var aCallable$7 = aCallable$g;
|
|
@@ -6294,7 +6295,7 @@ var forEachWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError
|
|
|
6294
6295
|
|
|
6295
6296
|
// `Iterator.prototype.forEach` method
|
|
6296
6297
|
// https://tc39.es/ecma262/#sec-iterator.prototype.foreach
|
|
6297
|
-
$$
|
|
6298
|
+
$$m({ target: 'Iterator', proto: true, real: true, forced: forEachWithoutClosingOnEarlyError }, {
|
|
6298
6299
|
forEach: function forEach(fn) {
|
|
6299
6300
|
anObject$8(this);
|
|
6300
6301
|
try {
|
|
@@ -6313,17 +6314,6 @@ $$l({ target: 'Iterator', proto: true, real: true, forced: forEachWithoutClosing
|
|
|
6313
6314
|
}
|
|
6314
6315
|
});
|
|
6315
6316
|
|
|
6316
|
-
let verboseEnabled = false;
|
|
6317
|
-
const setVerbose = enabled => {
|
|
6318
|
-
verboseEnabled = enabled;
|
|
6319
|
-
};
|
|
6320
|
-
const isVerbose = () => verboseEnabled;
|
|
6321
|
-
const verboseLog = message => {
|
|
6322
|
-
if (verboseEnabled) {
|
|
6323
|
-
console.log(chalk.dim("[verbose]"), message);
|
|
6324
|
-
}
|
|
6325
|
-
};
|
|
6326
|
-
|
|
6327
6317
|
class ApiError extends Error {
|
|
6328
6318
|
constructor(message, status, statusText, responseBody, url) {
|
|
6329
6319
|
super(message);
|
|
@@ -6384,110 +6374,84 @@ const getEndpointFromUrl = url => {
|
|
|
6384
6374
|
};
|
|
6385
6375
|
const getErrorSuggestions = (status, url) => {
|
|
6386
6376
|
var _a, _b, _c;
|
|
6387
|
-
const entry = (_a = ERROR_SUGGESTIONS[status]) !== null && _a !== void 0 ? _a : status >= 500 ? ERROR_SUGGESTIONS[500] : undefined;
|
|
6388
|
-
if (!entry) return [];
|
|
6389
|
-
const endpoint = getEndpointFromUrl(url);
|
|
6390
|
-
return (_c = endpoint && ((_b = entry.byEndpoint) === null || _b === void 0 ? void 0 : _b[endpoint])) !== null && _c !== void 0 ? _c : entry.default;
|
|
6391
|
-
};
|
|
6392
|
-
const handleCommandError = (error, context) => {
|
|
6393
|
-
console.error(chalk.red(`${context}:`));
|
|
6394
|
-
if (error instanceof ApiError) {
|
|
6395
|
-
console.error(chalk.red(`HTTP ${error.status}: ${error.statusText}`));
|
|
6396
|
-
if (error.responseBody) {
|
|
6397
|
-
console.error(chalk.yellow("Server response:"));
|
|
6398
|
-
console.error(chalk.dim(JSON.stringify(error.responseBody, null, 2)));
|
|
6399
|
-
}
|
|
6400
|
-
if (isVerbose()) {
|
|
6401
|
-
console.error(chalk.dim(`URL: ${error.url}`));
|
|
6402
|
-
}
|
|
6403
|
-
const suggestions = getErrorSuggestions(error.status, error.url);
|
|
6404
|
-
if (suggestions.length > 0) {
|
|
6405
|
-
console.error();
|
|
6406
|
-
suggestions.forEach(msg => console.error(chalk.yellow(msg)));
|
|
6407
|
-
}
|
|
6408
|
-
} else {
|
|
6409
|
-
console.error(chalk.red(`Error: ${error instanceof Error ? error.message : String(error)}`));
|
|
6410
|
-
}
|
|
6411
|
-
process.exit(1);
|
|
6412
|
-
};
|
|
6413
|
-
|
|
6414
|
-
const fetchJson = async (url, options = {}) => {
|
|
6415
|
-
const {
|
|
6416
|
-
method = "GET",
|
|
6417
|
-
headers = {},
|
|
6418
|
-
body
|
|
6419
|
-
} = options;
|
|
6420
|
-
verboseLog(`${method} ${url}`);
|
|
6421
|
-
const res = await fetch(url, {
|
|
6422
|
-
method,
|
|
6423
|
-
headers,
|
|
6424
|
-
body: body !== undefined ? JSON.stringify(body) : undefined
|
|
6425
|
-
});
|
|
6426
|
-
await assertApiResponseOk(res, url);
|
|
6427
|
-
return await res.json();
|
|
6428
|
-
};
|
|
6429
|
-
|
|
6430
|
-
const getDigitalTwinUrl = (environment, sessionId) => {
|
|
6431
|
-
switch (environment) {
|
|
6432
|
-
case "local":
|
|
6433
|
-
return `http://localhost:3101`;
|
|
6434
|
-
case "demo":
|
|
6435
|
-
return `https://digital-twin.vention.foo/digital-twin/machine-motion/passthrough/${sessionId}/80`;
|
|
6436
|
-
case "prod":
|
|
6437
|
-
return `https://digital-twin.vention.io/digital-twin/machine-motion/passthrough/${sessionId}/80`;
|
|
6438
|
-
default:
|
|
6439
|
-
throw new Error("Invalid environment");
|
|
6440
|
-
}
|
|
6441
|
-
};
|
|
6442
|
-
const getAllApplicationsWithSourceCode = async (environment, designId, sessionId) => {
|
|
6443
|
-
if (!sessionId) {
|
|
6444
|
-
throw new Error("Linked session token is not set");
|
|
6445
|
-
}
|
|
6446
|
-
const digitalTwinUrl = getDigitalTwinUrl(environment, sessionId);
|
|
6447
|
-
const url = `${digitalTwinUrl}/v2/library?shouldIncludeSourceCode=true`;
|
|
6448
|
-
const response = await fetchJson(url, {
|
|
6449
|
-
headers: {
|
|
6450
|
-
Accept: "application/json",
|
|
6451
|
-
Cookie: `digital-twin-session-${designId}=s%3A${sessionId}.s`
|
|
6452
|
-
}
|
|
6453
|
-
});
|
|
6454
|
-
return response.applications || [];
|
|
6455
|
-
};
|
|
6456
|
-
const pushApplicationToDigitalTwin = async (environment, designId, sessionId, application) => {
|
|
6457
|
-
if (!sessionId) {
|
|
6458
|
-
throw new Error("Linked session token is not set");
|
|
6459
|
-
}
|
|
6460
|
-
const digitalTwinUrl = getDigitalTwinUrl(environment, sessionId);
|
|
6461
|
-
const url = `${digitalTwinUrl}/v1/library`;
|
|
6462
|
-
return await fetchJson(url, {
|
|
6463
|
-
method: "PUT",
|
|
6464
|
-
headers: {
|
|
6465
|
-
"Content-Type": "application/json",
|
|
6466
|
-
Accept: "application/json",
|
|
6467
|
-
Cookie: `digital-twin-session-${designId}=s%3A${sessionId}.s`
|
|
6468
|
-
},
|
|
6469
|
-
body: application
|
|
6470
|
-
});
|
|
6471
|
-
};
|
|
6472
|
-
|
|
6473
|
-
const STATE_FILENAME = ".machine-code-app-directory-info.json";
|
|
6474
|
-
const writeMachineCodeAppDirectoryInfo = async (projectPath, state) => {
|
|
6475
|
-
const statePath = path$2.join(projectPath, STATE_FILENAME);
|
|
6476
|
-
await fs.promises.writeFile(statePath, JSON.stringify(state, null, 2));
|
|
6477
|
-
};
|
|
6478
|
-
const readMachineCodeAppDirectoryInfo = async projectPath => {
|
|
6479
|
-
const statePath = path$2.join(projectPath, STATE_FILENAME);
|
|
6480
|
-
try {
|
|
6481
|
-
const data = await fs.promises.readFile(statePath, "utf-8");
|
|
6482
|
-
return JSON.parse(data);
|
|
6483
|
-
} catch (error) {
|
|
6484
|
-
if (error.code === "ENOENT") {
|
|
6485
|
-
return null;
|
|
6377
|
+
const entry = (_a = ERROR_SUGGESTIONS[status]) !== null && _a !== void 0 ? _a : status >= 500 ? ERROR_SUGGESTIONS[500] : undefined;
|
|
6378
|
+
if (!entry) return [];
|
|
6379
|
+
const endpoint = getEndpointFromUrl(url);
|
|
6380
|
+
return (_c = endpoint && ((_b = entry.byEndpoint) === null || _b === void 0 ? void 0 : _b[endpoint])) !== null && _c !== void 0 ? _c : entry.default;
|
|
6381
|
+
};
|
|
6382
|
+
const handleCommandError = (error, context) => {
|
|
6383
|
+
console.error(chalk.red(`${context}:`));
|
|
6384
|
+
if (error instanceof ApiError) {
|
|
6385
|
+
console.error(chalk.red(`HTTP ${error.status}: ${error.statusText}`));
|
|
6386
|
+
if (error.responseBody) {
|
|
6387
|
+
console.error(chalk.yellow("Server response:"));
|
|
6388
|
+
console.error(chalk.dim(JSON.stringify(error.responseBody, null, 2)));
|
|
6486
6389
|
}
|
|
6487
|
-
|
|
6390
|
+
if (isVerbose()) {
|
|
6391
|
+
console.error(chalk.dim(`URL: ${error.url}`));
|
|
6392
|
+
}
|
|
6393
|
+
const suggestions = getErrorSuggestions(error.status, error.url);
|
|
6394
|
+
if (suggestions.length > 0) {
|
|
6395
|
+
console.error();
|
|
6396
|
+
suggestions.forEach(msg => console.error(chalk.yellow(msg)));
|
|
6397
|
+
}
|
|
6398
|
+
} else {
|
|
6399
|
+
console.error(chalk.red(`Error: ${error instanceof Error ? error.message : String(error)}`));
|
|
6488
6400
|
}
|
|
6401
|
+
process.exit(1);
|
|
6489
6402
|
};
|
|
6490
6403
|
|
|
6404
|
+
function createLoginCommand() {
|
|
6405
|
+
return new Command().command("login").description("Login to Vention").addOption(new Option("--internal").hideHelp()).action(async (_opts, cmd) => {
|
|
6406
|
+
try {
|
|
6407
|
+
const internal = cmd.getOptionValue("internal") === true;
|
|
6408
|
+
const environment = internal ? await select({
|
|
6409
|
+
message: "Select environment:",
|
|
6410
|
+
choices: [{
|
|
6411
|
+
name: "prod",
|
|
6412
|
+
value: "prod"
|
|
6413
|
+
}, {
|
|
6414
|
+
name: "demo",
|
|
6415
|
+
value: "demo"
|
|
6416
|
+
}, {
|
|
6417
|
+
name: "local",
|
|
6418
|
+
value: "local"
|
|
6419
|
+
}]
|
|
6420
|
+
}) : "prod";
|
|
6421
|
+
if (environment === "local") {
|
|
6422
|
+
const ventionSession = await password({
|
|
6423
|
+
message: "Enter vention_session cookie value:",
|
|
6424
|
+
mask: "",
|
|
6425
|
+
validate: input => input.length > 0 || "vention_session is required"
|
|
6426
|
+
});
|
|
6427
|
+
await saveSession({
|
|
6428
|
+
environment,
|
|
6429
|
+
ventionSession
|
|
6430
|
+
});
|
|
6431
|
+
console.log();
|
|
6432
|
+
console.log(chalk.green("Successfully logged in!"));
|
|
6433
|
+
process.exit(0);
|
|
6434
|
+
}
|
|
6435
|
+
console.log(chalk.blue("Starting SSO flow..."));
|
|
6436
|
+
const tokens = await loginWithSso(environment);
|
|
6437
|
+
const expiresAt = tokens.expiresInSeconds ? Date.now() + tokens.expiresInSeconds * 1000 : undefined;
|
|
6438
|
+
await saveSession({
|
|
6439
|
+
environment,
|
|
6440
|
+
oauth: {
|
|
6441
|
+
accessToken: tokens.accessToken,
|
|
6442
|
+
refreshToken: tokens.refreshToken,
|
|
6443
|
+
expiresAt
|
|
6444
|
+
}
|
|
6445
|
+
});
|
|
6446
|
+
console.log();
|
|
6447
|
+
console.log(chalk.green("Successfully logged in via SSO!"));
|
|
6448
|
+
process.exit(0);
|
|
6449
|
+
} catch (error) {
|
|
6450
|
+
handleCommandError(error, "Login failed");
|
|
6451
|
+
}
|
|
6452
|
+
});
|
|
6453
|
+
}
|
|
6454
|
+
|
|
6491
6455
|
var iteratorClose$6 = iteratorClose$b;
|
|
6492
6456
|
|
|
6493
6457
|
var iteratorCloseAll$1 = function (iters, kind, value) {
|
|
@@ -6605,7 +6569,7 @@ var iteratorHelperThrowsOnInvalidIterator$2 = function (methodName, argument) {
|
|
|
6605
6569
|
}
|
|
6606
6570
|
};
|
|
6607
6571
|
|
|
6608
|
-
var $$
|
|
6572
|
+
var $$l = _export;
|
|
6609
6573
|
var call$d = functionCall;
|
|
6610
6574
|
var aCallable$6 = aCallable$g;
|
|
6611
6575
|
var anObject$7 = anObject$n;
|
|
@@ -6638,7 +6602,7 @@ var IteratorProxy$1 = createIteratorProxy$1(function () {
|
|
|
6638
6602
|
|
|
6639
6603
|
// `Iterator.prototype.filter` method
|
|
6640
6604
|
// https://tc39.es/ecma262/#sec-iterator.prototype.filter
|
|
6641
|
-
$$
|
|
6605
|
+
$$l({ target: 'Iterator', proto: true, real: true, forced: FORCED$5 }, {
|
|
6642
6606
|
filter: function filter(predicate) {
|
|
6643
6607
|
anObject$7(this);
|
|
6644
6608
|
try {
|
|
@@ -6655,7 +6619,7 @@ $$k({ target: 'Iterator', proto: true, real: true, forced: FORCED$5 }, {
|
|
|
6655
6619
|
}
|
|
6656
6620
|
});
|
|
6657
6621
|
|
|
6658
|
-
var $$
|
|
6622
|
+
var $$k = _export;
|
|
6659
6623
|
var call$c = functionCall;
|
|
6660
6624
|
var iterate$2 = iterate$6;
|
|
6661
6625
|
var aCallable$5 = aCallable$g;
|
|
@@ -6668,7 +6632,7 @@ var findWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError$1(
|
|
|
6668
6632
|
|
|
6669
6633
|
// `Iterator.prototype.find` method
|
|
6670
6634
|
// https://tc39.es/ecma262/#sec-iterator.prototype.find
|
|
6671
|
-
$$
|
|
6635
|
+
$$k({ target: 'Iterator', proto: true, real: true, forced: findWithoutClosingOnEarlyError }, {
|
|
6672
6636
|
find: function find(predicate) {
|
|
6673
6637
|
anObject$6(this);
|
|
6674
6638
|
try {
|
|
@@ -6687,7 +6651,7 @@ $$j({ target: 'Iterator', proto: true, real: true, forced: findWithoutClosingOnE
|
|
|
6687
6651
|
}
|
|
6688
6652
|
});
|
|
6689
6653
|
|
|
6690
|
-
var $$
|
|
6654
|
+
var $$j = _export;
|
|
6691
6655
|
var call$b = functionCall;
|
|
6692
6656
|
var aCallable$4 = aCallable$g;
|
|
6693
6657
|
var anObject$5 = anObject$n;
|
|
@@ -6713,7 +6677,7 @@ var IteratorProxy = createIteratorProxy(function () {
|
|
|
6713
6677
|
|
|
6714
6678
|
// `Iterator.prototype.map` method
|
|
6715
6679
|
// https://tc39.es/ecma262/#sec-iterator.prototype.map
|
|
6716
|
-
$$
|
|
6680
|
+
$$j({ target: 'Iterator', proto: true, real: true, forced: FORCED$4 }, {
|
|
6717
6681
|
map: function map(mapper) {
|
|
6718
6682
|
anObject$5(this);
|
|
6719
6683
|
try {
|
|
@@ -6730,6 +6694,75 @@ $$i({ target: 'Iterator', proto: true, real: true, forced: FORCED$4 }, {
|
|
|
6730
6694
|
}
|
|
6731
6695
|
});
|
|
6732
6696
|
|
|
6697
|
+
var $$i = _export;
|
|
6698
|
+
var assign = objectAssign;
|
|
6699
|
+
|
|
6700
|
+
// `Object.assign` method
|
|
6701
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
6702
|
+
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
6703
|
+
$$i({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
6704
|
+
assign: assign
|
|
6705
|
+
});
|
|
6706
|
+
|
|
6707
|
+
const fetchJson = async (url, options = {}) => {
|
|
6708
|
+
const {
|
|
6709
|
+
method = "GET",
|
|
6710
|
+
headers = {},
|
|
6711
|
+
body
|
|
6712
|
+
} = options;
|
|
6713
|
+
verboseLog(`${method} ${url}`);
|
|
6714
|
+
const res = await fetch(url, {
|
|
6715
|
+
method,
|
|
6716
|
+
headers,
|
|
6717
|
+
body: body !== undefined ? JSON.stringify(body) : undefined
|
|
6718
|
+
});
|
|
6719
|
+
await assertApiResponseOk(res, url);
|
|
6720
|
+
return await res.json();
|
|
6721
|
+
};
|
|
6722
|
+
|
|
6723
|
+
const getDigitalTwinUrl = (environment, sessionId) => {
|
|
6724
|
+
switch (environment) {
|
|
6725
|
+
case "local":
|
|
6726
|
+
return `http://localhost:3101`;
|
|
6727
|
+
case "demo":
|
|
6728
|
+
return `https://digital-twin.vention.foo/digital-twin/machine-motion/passthrough/${sessionId}/80`;
|
|
6729
|
+
case "prod":
|
|
6730
|
+
return `https://digital-twin.vention.com/digital-twin/machine-motion/passthrough/${sessionId}/80`;
|
|
6731
|
+
default:
|
|
6732
|
+
throw new Error("Invalid environment");
|
|
6733
|
+
}
|
|
6734
|
+
};
|
|
6735
|
+
const getAllApplicationsWithSourceCode = async (environment, designId, sessionId) => {
|
|
6736
|
+
if (!sessionId) {
|
|
6737
|
+
throw new Error("Linked session token is not set");
|
|
6738
|
+
}
|
|
6739
|
+
const digitalTwinUrl = getDigitalTwinUrl(environment, sessionId);
|
|
6740
|
+
const url = `${digitalTwinUrl}/v2/library?shouldIncludeSourceCode=true`;
|
|
6741
|
+
const response = await fetchJson(url, {
|
|
6742
|
+
headers: {
|
|
6743
|
+
Accept: "application/json",
|
|
6744
|
+
Cookie: `digital-twin-session-${designId}=s%3A${sessionId}.s`
|
|
6745
|
+
}
|
|
6746
|
+
});
|
|
6747
|
+
return response.applications || [];
|
|
6748
|
+
};
|
|
6749
|
+
const pushApplicationToDigitalTwin = async (environment, designId, sessionId, application) => {
|
|
6750
|
+
if (!sessionId) {
|
|
6751
|
+
throw new Error("Linked session token is not set");
|
|
6752
|
+
}
|
|
6753
|
+
const digitalTwinUrl = getDigitalTwinUrl(environment, sessionId);
|
|
6754
|
+
const url = `${digitalTwinUrl}/v1/library`;
|
|
6755
|
+
return await fetchJson(url, {
|
|
6756
|
+
method: "PUT",
|
|
6757
|
+
headers: {
|
|
6758
|
+
"Content-Type": "application/json",
|
|
6759
|
+
Accept: "application/json",
|
|
6760
|
+
Cookie: `digital-twin-session-${designId}=s%3A${sessionId}.s`
|
|
6761
|
+
},
|
|
6762
|
+
body: application
|
|
6763
|
+
});
|
|
6764
|
+
};
|
|
6765
|
+
|
|
6733
6766
|
const getBaseRailsUrl = environment => {
|
|
6734
6767
|
switch (environment) {
|
|
6735
6768
|
case "local":
|
|
@@ -6737,7 +6770,7 @@ const getBaseRailsUrl = environment => {
|
|
|
6737
6770
|
case "demo":
|
|
6738
6771
|
return "https://vention.foo";
|
|
6739
6772
|
case "prod":
|
|
6740
|
-
return "https://vention.
|
|
6773
|
+
return "https://vention.com";
|
|
6741
6774
|
default:
|
|
6742
6775
|
throw new Error("Invalid environment");
|
|
6743
6776
|
}
|
|
@@ -10189,6 +10222,24 @@ const writeApplicationToDisk = async (appName, sourceCode, targetDirectory, over
|
|
|
10189
10222
|
return appDirectoryPath;
|
|
10190
10223
|
};
|
|
10191
10224
|
|
|
10225
|
+
const STATE_FILENAME = ".machine-code-app-directory-info.json";
|
|
10226
|
+
const writeMachineCodeAppDirectoryInfo = async (projectPath, state) => {
|
|
10227
|
+
const statePath = path$2.join(projectPath, STATE_FILENAME);
|
|
10228
|
+
await fs.promises.writeFile(statePath, JSON.stringify(state, null, 2));
|
|
10229
|
+
};
|
|
10230
|
+
const readMachineCodeAppDirectoryInfo = async projectPath => {
|
|
10231
|
+
const statePath = path$2.join(projectPath, STATE_FILENAME);
|
|
10232
|
+
try {
|
|
10233
|
+
const data = await fs.promises.readFile(statePath, "utf-8");
|
|
10234
|
+
return JSON.parse(data);
|
|
10235
|
+
} catch (error) {
|
|
10236
|
+
if (error.code === "ENOENT") {
|
|
10237
|
+
return null;
|
|
10238
|
+
}
|
|
10239
|
+
throw error;
|
|
10240
|
+
}
|
|
10241
|
+
};
|
|
10242
|
+
|
|
10192
10243
|
const checkIfDesignHasLiveAllocation = async (session, designId) => {
|
|
10193
10244
|
const allocations = await getUserAllocations(session);
|
|
10194
10245
|
const linkedAllocation = allocations.find(a => a.designId === designId);
|
|
@@ -10262,6 +10313,26 @@ const updateExistingAppDirectory = async (session, machineCodeAppDirectoryInfo,
|
|
|
10262
10313
|
console.log(chalk.green(`✅ Successfully pulled "${appWithSourceCode.name}" to: ${currentDir}`));
|
|
10263
10314
|
console.log(chalk.blue("💡 Your project has been updated with the latest changes!"));
|
|
10264
10315
|
};
|
|
10316
|
+
const linkDirectory = async (session, currentDir) => {
|
|
10317
|
+
const {
|
|
10318
|
+
selectedDesign,
|
|
10319
|
+
selectedApp
|
|
10320
|
+
} = await selectDesignAndApp(session);
|
|
10321
|
+
await writeMachineCodeAppDirectoryInfo(currentDir, {
|
|
10322
|
+
appName: selectedApp.name,
|
|
10323
|
+
designId: selectedDesign.id,
|
|
10324
|
+
applicationId: selectedApp.id,
|
|
10325
|
+
lastPulledAt: new Date().toISOString(),
|
|
10326
|
+
environment: session.environment,
|
|
10327
|
+
uuid: selectedApp.uuid
|
|
10328
|
+
});
|
|
10329
|
+
console.log(chalk.green(`Successfully linked current directory to design "${selectedDesign.name}" (ID: ${selectedDesign.id})`));
|
|
10330
|
+
console.log(chalk.green(`Application: "${selectedApp.name}" (ID: ${selectedApp.id})`));
|
|
10331
|
+
return {
|
|
10332
|
+
selectedDesign,
|
|
10333
|
+
selectedApp
|
|
10334
|
+
};
|
|
10335
|
+
};
|
|
10265
10336
|
const selectDesignAndApp = async session => {
|
|
10266
10337
|
const allocations = await getUserAllocations(session);
|
|
10267
10338
|
if (allocations.length === 0) {
|
|
@@ -10299,22 +10370,117 @@ const selectDesignAndApp = async session => {
|
|
|
10299
10370
|
};
|
|
10300
10371
|
};
|
|
10301
10372
|
|
|
10302
|
-
|
|
10303
|
-
|
|
10304
|
-
|
|
10305
|
-
|
|
10306
|
-
|
|
10307
|
-
|
|
10308
|
-
|
|
10373
|
+
function createLinkCommand() {
|
|
10374
|
+
return new Command("link").description("Link current directory to a Vention design application").action(async () => {
|
|
10375
|
+
try {
|
|
10376
|
+
const session = await loadSession();
|
|
10377
|
+
if (!session) {
|
|
10378
|
+
console.error(chalk.red("Not logged in. Please run 'vention login' first."));
|
|
10379
|
+
process.exit(1);
|
|
10380
|
+
}
|
|
10381
|
+
const currentDir = process.cwd();
|
|
10382
|
+
console.log();
|
|
10383
|
+
await linkDirectory(session, currentDir);
|
|
10384
|
+
console.log(chalk.blue("You can now use 'vention pull' to download app content or 'vention push' to upload local changes."));
|
|
10385
|
+
} catch (error) {
|
|
10386
|
+
handleCommandError(error, "Failed to link directory");
|
|
10387
|
+
}
|
|
10388
|
+
});
|
|
10309
10389
|
}
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
|
|
10313
|
-
|
|
10314
|
-
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
|
|
10390
|
+
|
|
10391
|
+
function createPushCommand() {
|
|
10392
|
+
return new Command("push").description("Push local changes from this directory to the linked digital twin").action(async () => {
|
|
10393
|
+
try {
|
|
10394
|
+
const session = await loadSession();
|
|
10395
|
+
if (!session) {
|
|
10396
|
+
console.error(chalk.red("Not logged in. Please run 'vention login' first."));
|
|
10397
|
+
process.exit(1);
|
|
10398
|
+
}
|
|
10399
|
+
const currentDir = process.cwd();
|
|
10400
|
+
const machineCodeAppDirectoryInfo = await readMachineCodeAppDirectoryInfo(currentDir);
|
|
10401
|
+
if (!machineCodeAppDirectoryInfo) {
|
|
10402
|
+
console.log();
|
|
10403
|
+
console.log(chalk.yellow("This directory is not linked to a Vention application."));
|
|
10404
|
+
const shouldLink = await select({
|
|
10405
|
+
message: "Would you like to link this directory to an application?",
|
|
10406
|
+
choices: [{
|
|
10407
|
+
name: "Yes, link this directory",
|
|
10408
|
+
value: true
|
|
10409
|
+
}, {
|
|
10410
|
+
name: "No, cancel push operation",
|
|
10411
|
+
value: false
|
|
10412
|
+
}]
|
|
10413
|
+
});
|
|
10414
|
+
if (!shouldLink) {
|
|
10415
|
+
console.log(chalk.blue("Push operation cancelled. Run 'vention link' when you're ready to link this directory."));
|
|
10416
|
+
process.exit(0);
|
|
10417
|
+
}
|
|
10418
|
+
await linkDirectory(session, currentDir);
|
|
10419
|
+
console.log(chalk.blue("Continuing with push operation..."));
|
|
10420
|
+
}
|
|
10421
|
+
const updatedMachineCodeAppDirectoryInfo = await readMachineCodeAppDirectoryInfo(currentDir);
|
|
10422
|
+
if (!updatedMachineCodeAppDirectoryInfo) {
|
|
10423
|
+
console.log(chalk.red("Error reading directory metadata after linking."));
|
|
10424
|
+
process.exit(1);
|
|
10425
|
+
}
|
|
10426
|
+
console.log();
|
|
10427
|
+
console.log(chalk.blue(`Pushing changes for project: ${updatedMachineCodeAppDirectoryInfo.appName}`));
|
|
10428
|
+
console.log(chalk.blue(`Design ID: ${updatedMachineCodeAppDirectoryInfo.designId}, App ID: ${updatedMachineCodeAppDirectoryInfo.applicationId}`));
|
|
10429
|
+
const linkedAllocation = await checkIfDesignHasLiveAllocation(session, updatedMachineCodeAppDirectoryInfo.designId);
|
|
10430
|
+
if (!linkedAllocation) {
|
|
10431
|
+
console.log();
|
|
10432
|
+
console.error(chalk.red("Sorry, it seems you do not have that design open with the MachineLogic tab selected."));
|
|
10433
|
+
console.error(chalk.red("Please go to your browser, open your design, and navigate to the MachineLogic page."));
|
|
10434
|
+
process.exit(1);
|
|
10435
|
+
}
|
|
10436
|
+
console.log();
|
|
10437
|
+
console.log(chalk.blue("Serializing local files..."));
|
|
10438
|
+
const ignorePatterns = getDefaultIgnorePatterns();
|
|
10439
|
+
const serializedSourceCode = serializeFileSystem(currentDir, ignorePatterns, true);
|
|
10440
|
+
const applicationToPush = {
|
|
10441
|
+
name: updatedMachineCodeAppDirectoryInfo.appName,
|
|
10442
|
+
id: updatedMachineCodeAppDirectoryInfo.applicationId,
|
|
10443
|
+
type: "machine_code",
|
|
10444
|
+
sourceCode: serializedSourceCode,
|
|
10445
|
+
uuid: updatedMachineCodeAppDirectoryInfo.uuid
|
|
10446
|
+
};
|
|
10447
|
+
console.log(chalk.blue("Pushing to digital twin..."));
|
|
10448
|
+
await pushApplicationToDigitalTwin(session.environment, updatedMachineCodeAppDirectoryInfo.designId, linkedAllocation.sessionId, applicationToPush);
|
|
10449
|
+
await writeMachineCodeAppDirectoryInfo(currentDir, Object.assign(Object.assign({}, updatedMachineCodeAppDirectoryInfo), {
|
|
10450
|
+
lastPushedAt: new Date().toISOString()
|
|
10451
|
+
}));
|
|
10452
|
+
console.log();
|
|
10453
|
+
console.log(chalk.green(`✅ Successfully pushed to digital twin`));
|
|
10454
|
+
console.log(chalk.blue("💡 Your changes have been uploaded!"));
|
|
10455
|
+
} catch (error) {
|
|
10456
|
+
handleCommandError(error, "Failed to push application");
|
|
10457
|
+
}
|
|
10458
|
+
});
|
|
10459
|
+
}
|
|
10460
|
+
|
|
10461
|
+
function createPullCommand() {
|
|
10462
|
+
return new Command("pull").description("Pull an application from a design to this directory").action(async () => {
|
|
10463
|
+
try {
|
|
10464
|
+
const session = await loadSession();
|
|
10465
|
+
if (!session) {
|
|
10466
|
+
console.error(chalk.red("Not logged in. Please run 'vention login' first."));
|
|
10467
|
+
process.exit(1);
|
|
10468
|
+
}
|
|
10469
|
+
const currentDir = process.cwd();
|
|
10470
|
+
const machineCodeAppDirectoryInfo = await readMachineCodeAppDirectoryInfo(currentDir);
|
|
10471
|
+
if (machineCodeAppDirectoryInfo) {
|
|
10472
|
+
console.log(chalk.blue(`This directory is linked to app: ${machineCodeAppDirectoryInfo.appName}`));
|
|
10473
|
+
console.log(chalk.blue(`Pulling latest content from design ID: ${machineCodeAppDirectoryInfo.designId}`));
|
|
10474
|
+
await updateExistingAppDirectory(session, machineCodeAppDirectoryInfo, currentDir);
|
|
10475
|
+
} else {
|
|
10476
|
+
await createNewAppDirectory(session, currentDir);
|
|
10477
|
+
}
|
|
10478
|
+
} catch (error) {
|
|
10479
|
+
handleCommandError(error, "Failed to pull application");
|
|
10480
|
+
}
|
|
10481
|
+
});
|
|
10482
|
+
}
|
|
10483
|
+
|
|
10318
10484
|
const ventionLogo = `
|
|
10319
10485
|
╔════════════════════════════════════════════════════════════════════════════════════════════════════════╗
|
|
10320
10486
|
║ ║
|
|
@@ -10327,187 +10493,28 @@ const ventionLogo = `
|
|
|
10327
10493
|
║ ║
|
|
10328
10494
|
╚════════════════════════════════════════════════════════════════════════════════════════════════════════╝
|
|
10329
10495
|
`;
|
|
10330
|
-
|
|
10331
|
-
|
|
10332
|
-
|
|
10333
|
-
const environment = internal ? await select({
|
|
10334
|
-
message: "Select environment:",
|
|
10335
|
-
choices: [{
|
|
10336
|
-
name: "prod",
|
|
10337
|
-
value: "prod"
|
|
10338
|
-
}, {
|
|
10339
|
-
name: "demo",
|
|
10340
|
-
value: "demo"
|
|
10341
|
-
}, {
|
|
10342
|
-
name: "local",
|
|
10343
|
-
value: "local"
|
|
10344
|
-
}]
|
|
10345
|
-
}) : "prod";
|
|
10346
|
-
if (environment === "local") {
|
|
10347
|
-
const ventionSession = await password({
|
|
10348
|
-
message: "Enter vention_session cookie value:",
|
|
10349
|
-
mask: "",
|
|
10350
|
-
validate: input => input.length > 0 || "vention_session is required"
|
|
10351
|
-
});
|
|
10352
|
-
await saveSession({
|
|
10353
|
-
environment,
|
|
10354
|
-
ventionSession
|
|
10355
|
-
});
|
|
10356
|
-
console.log();
|
|
10357
|
-
console.log(chalk.green("Successfully logged in!"));
|
|
10358
|
-
process.exit(0);
|
|
10359
|
-
}
|
|
10360
|
-
console.log(chalk.blue("Starting SSO flow..."));
|
|
10361
|
-
const tokens = await loginWithSso(environment);
|
|
10362
|
-
const expiresAt = tokens.expiresInSeconds ? Date.now() + tokens.expiresInSeconds * 1000 : undefined;
|
|
10363
|
-
await saveSession({
|
|
10364
|
-
environment,
|
|
10365
|
-
oauth: {
|
|
10366
|
-
accessToken: tokens.accessToken,
|
|
10367
|
-
refreshToken: tokens.refreshToken,
|
|
10368
|
-
expiresAt
|
|
10369
|
-
}
|
|
10370
|
-
});
|
|
10371
|
-
console.log();
|
|
10372
|
-
console.log(chalk.green("Successfully logged in via SSO!"));
|
|
10373
|
-
process.exit(0);
|
|
10374
|
-
} catch (error) {
|
|
10375
|
-
console.log();
|
|
10376
|
-
console.error(chalk.red("Login failed:"), error);
|
|
10377
|
-
process.exit(1);
|
|
10378
|
-
}
|
|
10379
|
-
});
|
|
10380
|
-
program.command("link").description("Link current directory to a Vention design application").action(async () => {
|
|
10381
|
-
try {
|
|
10382
|
-
const session = await loadSession();
|
|
10383
|
-
if (!session) {
|
|
10384
|
-
console.error(chalk.red("Not logged in. Please run 'vention login' first."));
|
|
10385
|
-
process.exit(1);
|
|
10386
|
-
}
|
|
10387
|
-
const currentDir = process.cwd();
|
|
10388
|
-
const {
|
|
10389
|
-
selectedDesign,
|
|
10390
|
-
selectedApp
|
|
10391
|
-
} = await selectDesignAndApp(session);
|
|
10392
|
-
await writeMachineCodeAppDirectoryInfo(currentDir, {
|
|
10393
|
-
appName: selectedApp.name,
|
|
10394
|
-
designId: selectedDesign.id,
|
|
10395
|
-
applicationId: selectedApp.id,
|
|
10396
|
-
lastPulledAt: new Date().toISOString(),
|
|
10397
|
-
environment: session.environment,
|
|
10398
|
-
uuid: selectedApp.uuid
|
|
10399
|
-
});
|
|
10400
|
-
console.log();
|
|
10401
|
-
console.log(chalk.green(`Successfully linked current directory to design "${selectedDesign.name}" (ID: ${selectedDesign.id})`));
|
|
10402
|
-
console.log(chalk.green(`Application: "${selectedApp.name}" (ID: ${selectedApp.id})`));
|
|
10403
|
-
console.log(chalk.blue("You can now use 'vention pull' to download app content or 'vention push' to upload local changes."));
|
|
10404
|
-
} catch (error) {
|
|
10405
|
-
handleCommandError(error, "Failed to link directory");
|
|
10406
|
-
}
|
|
10407
|
-
});
|
|
10408
|
-
program.command("push").description("Push local changes from this directory to the linked digital twin").action(async () => {
|
|
10409
|
-
try {
|
|
10410
|
-
const session = await loadSession();
|
|
10411
|
-
if (!session) {
|
|
10412
|
-
console.error(chalk.red("Not logged in. Please run 'vention login' first."));
|
|
10413
|
-
process.exit(1);
|
|
10414
|
-
}
|
|
10415
|
-
const currentDir = process.cwd();
|
|
10416
|
-
const machineCodeAppDirectoryInfo = await readMachineCodeAppDirectoryInfo(currentDir);
|
|
10417
|
-
if (!machineCodeAppDirectoryInfo) {
|
|
10418
|
-
console.log();
|
|
10419
|
-
console.log(chalk.yellow("This directory is not linked to a Vention application."));
|
|
10420
|
-
const shouldLink = await select({
|
|
10421
|
-
message: "Would you like to link this directory to an application?",
|
|
10422
|
-
choices: [{
|
|
10423
|
-
name: "Yes, link this directory",
|
|
10424
|
-
value: true
|
|
10425
|
-
}, {
|
|
10426
|
-
name: "No, cancel push operation",
|
|
10427
|
-
value: false
|
|
10428
|
-
}]
|
|
10429
|
-
});
|
|
10430
|
-
if (!shouldLink) {
|
|
10431
|
-
console.log(chalk.blue("Push operation cancelled. Run 'vention link' when you're ready to link this directory."));
|
|
10432
|
-
process.exit(0);
|
|
10433
|
-
}
|
|
10434
|
-
const {
|
|
10435
|
-
selectedDesign,
|
|
10436
|
-
selectedApp
|
|
10437
|
-
} = await selectDesignAndApp(session);
|
|
10438
|
-
await writeMachineCodeAppDirectoryInfo(currentDir, {
|
|
10439
|
-
appName: selectedApp.name,
|
|
10440
|
-
designId: selectedDesign.id,
|
|
10441
|
-
applicationId: selectedApp.id,
|
|
10442
|
-
lastPulledAt: new Date().toISOString(),
|
|
10443
|
-
environment: session.environment,
|
|
10444
|
-
uuid: selectedApp.uuid
|
|
10445
|
-
});
|
|
10446
|
-
console.log(chalk.green(`Successfully linked directory to design "${selectedDesign.name}" (ID: ${selectedDesign.id})`));
|
|
10447
|
-
console.log(chalk.green(`Application: "${selectedApp.name}" (ID: ${selectedApp.id})`));
|
|
10448
|
-
console.log(chalk.blue("Continuing with push operation..."));
|
|
10449
|
-
}
|
|
10450
|
-
const updatedMachineCodeAppDirectoryInfo = await readMachineCodeAppDirectoryInfo(currentDir);
|
|
10451
|
-
if (!updatedMachineCodeAppDirectoryInfo) {
|
|
10452
|
-
console.log(chalk.red("Error reading directory metadata after linking."));
|
|
10453
|
-
process.exit(1);
|
|
10454
|
-
}
|
|
10455
|
-
console.log();
|
|
10456
|
-
console.log(chalk.blue(`Pushing changes for project: ${updatedMachineCodeAppDirectoryInfo.appName}`));
|
|
10457
|
-
console.log(chalk.blue(`Design ID: ${updatedMachineCodeAppDirectoryInfo.designId}, App ID: ${updatedMachineCodeAppDirectoryInfo.applicationId}`));
|
|
10458
|
-
const linkedAllocation = await checkIfDesignHasLiveAllocation(session, updatedMachineCodeAppDirectoryInfo.designId);
|
|
10459
|
-
if (!linkedAllocation) {
|
|
10460
|
-
console.log();
|
|
10461
|
-
console.error(chalk.red("Sorry, it seems you do not have that design open with the MachineLogic tab selected."));
|
|
10462
|
-
console.error(chalk.red("Please go to your browser, open your design, and navigate to the MachineLogic page."));
|
|
10463
|
-
process.exit(1);
|
|
10464
|
-
}
|
|
10465
|
-
console.log();
|
|
10466
|
-
console.log(chalk.blue("Serializing local files..."));
|
|
10467
|
-
const ignorePatterns = getDefaultIgnorePatterns();
|
|
10468
|
-
const serializedSourceCode = serializeFileSystem(currentDir, ignorePatterns, true);
|
|
10469
|
-
const applicationToPush = {
|
|
10470
|
-
name: updatedMachineCodeAppDirectoryInfo.appName,
|
|
10471
|
-
id: updatedMachineCodeAppDirectoryInfo.applicationId,
|
|
10472
|
-
type: "machine_code",
|
|
10473
|
-
sourceCode: serializedSourceCode,
|
|
10474
|
-
uuid: updatedMachineCodeAppDirectoryInfo.uuid
|
|
10475
|
-
};
|
|
10476
|
-
console.log(chalk.blue("Pushing to digital twin..."));
|
|
10477
|
-
await pushApplicationToDigitalTwin(session.environment, updatedMachineCodeAppDirectoryInfo.designId, linkedAllocation.sessionId, applicationToPush);
|
|
10478
|
-
await writeMachineCodeAppDirectoryInfo(currentDir, Object.assign(Object.assign({}, updatedMachineCodeAppDirectoryInfo), {
|
|
10479
|
-
lastPushedAt: new Date().toISOString()
|
|
10480
|
-
}));
|
|
10481
|
-
console.log();
|
|
10482
|
-
console.log(chalk.green(`✅ Successfully pushed to digital twin`));
|
|
10483
|
-
console.log(chalk.blue("💡 Your changes have been uploaded!"));
|
|
10484
|
-
} catch (error) {
|
|
10485
|
-
handleCommandError(error, "Failed to push application");
|
|
10486
|
-
}
|
|
10487
|
-
});
|
|
10488
|
-
program.command("pull").description("Pull an application from a design to this directory").action(async () => {
|
|
10496
|
+
|
|
10497
|
+
const require$1 = createRequire(import.meta.url);
|
|
10498
|
+
function loadPackageJson() {
|
|
10489
10499
|
try {
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
process.exit(1);
|
|
10494
|
-
}
|
|
10495
|
-
const currentDir = process.cwd();
|
|
10496
|
-
const machineCodeAppDirectoryInfo = await readMachineCodeAppDirectoryInfo(currentDir);
|
|
10497
|
-
if (machineCodeAppDirectoryInfo) {
|
|
10498
|
-
console.log(chalk.blue(`This directory is linked to app: ${machineCodeAppDirectoryInfo.appName}`));
|
|
10499
|
-
console.log(chalk.blue(`Pulling latest content from design ID: ${machineCodeAppDirectoryInfo.designId}`));
|
|
10500
|
-
await updateExistingAppDirectory(session, machineCodeAppDirectoryInfo, currentDir);
|
|
10501
|
-
} else {
|
|
10502
|
-
await createNewAppDirectory(session, currentDir);
|
|
10503
|
-
}
|
|
10504
|
-
} catch (error) {
|
|
10505
|
-
handleCommandError(error, "Failed to pull application");
|
|
10500
|
+
return require$1("./package.json");
|
|
10501
|
+
} catch (_a) {
|
|
10502
|
+
return require$1("../package.json");
|
|
10506
10503
|
}
|
|
10504
|
+
}
|
|
10505
|
+
const packageJson = loadPackageJson();
|
|
10506
|
+
const program = new Command();
|
|
10507
|
+
program.name("vention").description("CLI tool for Vention").version(packageJson.version).option("--verbose", "Enable verbose output for debugging").hook("preAction", thisCommand => {
|
|
10508
|
+
const opts = thisCommand.opts();
|
|
10509
|
+
setVerbose(opts.verbose === true);
|
|
10510
|
+
}).hook("postAction", () => {
|
|
10511
|
+
setVerbose(false);
|
|
10507
10512
|
});
|
|
10508
|
-
|
|
10509
|
-
|
|
10510
|
-
|
|
10513
|
+
program.addCommand(createLoginCommand());
|
|
10514
|
+
program.addCommand(createLinkCommand());
|
|
10515
|
+
program.addCommand(createPushCommand());
|
|
10516
|
+
program.addCommand(createPullCommand());
|
|
10517
|
+
function runProgram() {
|
|
10511
10518
|
const showLogoConditions = [process.argv.length <= 2, process.argv.includes("--help"), process.argv.includes("-h")];
|
|
10512
10519
|
if (showLogoConditions.some(Boolean)) {
|
|
10513
10520
|
console.log(chalk.cyan(ventionLogo));
|
|
@@ -10515,4 +10522,4 @@ if (resolvedArgv === resolvedUrlPath) {
|
|
|
10515
10522
|
program.parse(process.argv);
|
|
10516
10523
|
}
|
|
10517
10524
|
|
|
10518
|
-
|
|
10525
|
+
runProgram();
|