@dremio/js-sdk 0.47.0 → 0.49.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/dist/cloud/catalog/EnterpriseCatalogResource.d.ts +2 -2
- package/dist/cloud/catalog/EnterpriseCatalogResource.js.map +1 -1
- package/dist/cloud/users/UsersResource.d.ts +9 -0
- package/dist/cloud/users/UsersResource.js +13 -0
- package/dist/cloud/users/UsersResource.js.map +1 -1
- package/dist/enterprise/catalog/EnterpriseCatalogResource.d.ts +2 -2
- package/dist/enterprise/catalog/EnterpriseCatalogResource.js.map +1 -1
- package/dist/enterprise/catalog/catalogRetrieve.d.ts +3 -3
- package/dist/enterprise/catalog/catalogRetrieve.js +111 -91
- package/dist/enterprise/catalog/catalogRetrieve.js.map +1 -1
- package/dist-iife/cloud.js +2852 -850
- package/dist-iife/enterprise.js +8086 -8071
- package/package.json +1 -1
package/dist-iife/cloud.js
CHANGED
|
@@ -1377,453 +1377,2361 @@ var DremioCloud = (() => {
|
|
|
1377
1377
|
}
|
|
1378
1378
|
});
|
|
1379
1379
|
|
|
1380
|
-
//
|
|
1381
|
-
var
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
ScriptSearchResult: () => ScriptSearchResult,
|
|
1411
|
-
SourceSearchResult: () => SourceSearchResult,
|
|
1412
|
-
SpaceSearchResult: () => SpaceSearchResult,
|
|
1413
|
-
TableSearchResult: () => TableSearchResult,
|
|
1414
|
-
User: () => User2,
|
|
1415
|
-
UserChatMessage: () => UserChatMessage,
|
|
1416
|
-
ValidationProblem: () => ValidationProblem,
|
|
1417
|
-
ViewSearchResult: () => ViewSearchResult,
|
|
1418
|
-
_replaceOriginResource: () => _replaceOriginResource,
|
|
1419
|
-
createAuthorizationCodeUrl: () => createAuthorizationCodeUrl,
|
|
1420
|
-
createConversationPromptSchema: () => createConversationPromptSchema,
|
|
1421
|
-
fromAccessToken: () => fromAccessToken,
|
|
1422
|
-
fromPat: () => fromPat,
|
|
1423
|
-
fromRefreshToken: () => fromRefreshToken,
|
|
1424
|
-
fromTextEventStream: () => fromTextEventStream,
|
|
1425
|
-
fromUsernamePassword: () => fromUsernamePassword,
|
|
1426
|
-
isToolRequest: () => isToolRequest,
|
|
1427
|
-
isToolResult: () => isToolResult
|
|
1380
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js
|
|
1381
|
+
var require_constants = __commonJS({
|
|
1382
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js"(exports, module) {
|
|
1383
|
+
"use strict";
|
|
1384
|
+
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
1385
|
+
var MAX_LENGTH = 256;
|
|
1386
|
+
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
1387
|
+
9007199254740991;
|
|
1388
|
+
var MAX_SAFE_COMPONENT_LENGTH = 16;
|
|
1389
|
+
var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
|
|
1390
|
+
var RELEASE_TYPES = [
|
|
1391
|
+
"major",
|
|
1392
|
+
"premajor",
|
|
1393
|
+
"minor",
|
|
1394
|
+
"preminor",
|
|
1395
|
+
"patch",
|
|
1396
|
+
"prepatch",
|
|
1397
|
+
"prerelease"
|
|
1398
|
+
];
|
|
1399
|
+
module.exports = {
|
|
1400
|
+
MAX_LENGTH,
|
|
1401
|
+
MAX_SAFE_COMPONENT_LENGTH,
|
|
1402
|
+
MAX_SAFE_BUILD_LENGTH,
|
|
1403
|
+
MAX_SAFE_INTEGER,
|
|
1404
|
+
RELEASE_TYPES,
|
|
1405
|
+
SEMVER_SPEC_VERSION,
|
|
1406
|
+
FLAG_INCLUDE_PRERELEASE: 1,
|
|
1407
|
+
FLAG_LOOSE: 2
|
|
1408
|
+
};
|
|
1409
|
+
}
|
|
1428
1410
|
});
|
|
1429
1411
|
|
|
1430
|
-
//
|
|
1431
|
-
var
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
try {
|
|
1438
|
-
value = JSON.stringify(val);
|
|
1439
|
-
} catch (_a) {
|
|
1440
|
-
}
|
|
1412
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js
|
|
1413
|
+
var require_debug = __commonJS({
|
|
1414
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js"(exports, module) {
|
|
1415
|
+
"use strict";
|
|
1416
|
+
var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
1417
|
+
};
|
|
1418
|
+
module.exports = debug;
|
|
1441
1419
|
}
|
|
1442
|
-
|
|
1443
|
-
}
|
|
1420
|
+
});
|
|
1444
1421
|
|
|
1445
|
-
// node_modules/.pnpm/
|
|
1446
|
-
var
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
};
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
NoneImpl2.prototype.unwrap = function() {
|
|
1474
|
-
throw new Error("Tried to unwrap None");
|
|
1422
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js
|
|
1423
|
+
var require_re = __commonJS({
|
|
1424
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js"(exports, module) {
|
|
1425
|
+
"use strict";
|
|
1426
|
+
var {
|
|
1427
|
+
MAX_SAFE_COMPONENT_LENGTH,
|
|
1428
|
+
MAX_SAFE_BUILD_LENGTH,
|
|
1429
|
+
MAX_LENGTH
|
|
1430
|
+
} = require_constants();
|
|
1431
|
+
var debug = require_debug();
|
|
1432
|
+
exports = module.exports = {};
|
|
1433
|
+
var re2 = exports.re = [];
|
|
1434
|
+
var safeRe = exports.safeRe = [];
|
|
1435
|
+
var src = exports.src = [];
|
|
1436
|
+
var safeSrc = exports.safeSrc = [];
|
|
1437
|
+
var t2 = exports.t = {};
|
|
1438
|
+
var R2 = 0;
|
|
1439
|
+
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
1440
|
+
var safeRegexReplacements = [
|
|
1441
|
+
["\\s", 1],
|
|
1442
|
+
["\\d", MAX_LENGTH],
|
|
1443
|
+
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
1444
|
+
];
|
|
1445
|
+
var makeSafeRegex = (value) => {
|
|
1446
|
+
for (const [token, max] of safeRegexReplacements) {
|
|
1447
|
+
value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
|
|
1448
|
+
}
|
|
1449
|
+
return value;
|
|
1475
1450
|
};
|
|
1476
|
-
|
|
1477
|
-
|
|
1451
|
+
var createToken = (name, value, isGlobal) => {
|
|
1452
|
+
const safe = makeSafeRegex(value);
|
|
1453
|
+
const index = R2++;
|
|
1454
|
+
debug(name, index, value);
|
|
1455
|
+
t2[name] = index;
|
|
1456
|
+
src[index] = value;
|
|
1457
|
+
safeSrc[index] = safe;
|
|
1458
|
+
re2[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
1459
|
+
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
1478
1460
|
};
|
|
1479
|
-
|
|
1480
|
-
|
|
1461
|
+
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
1462
|
+
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
1463
|
+
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
1464
|
+
createToken("MAINVERSION", `(${src[t2.NUMERICIDENTIFIER]})\\.(${src[t2.NUMERICIDENTIFIER]})\\.(${src[t2.NUMERICIDENTIFIER]})`);
|
|
1465
|
+
createToken("MAINVERSIONLOOSE", `(${src[t2.NUMERICIDENTIFIERLOOSE]})\\.(${src[t2.NUMERICIDENTIFIERLOOSE]})\\.(${src[t2.NUMERICIDENTIFIERLOOSE]})`);
|
|
1466
|
+
createToken("PRERELEASEIDENTIFIER", `(?:${src[t2.NONNUMERICIDENTIFIER]}|${src[t2.NUMERICIDENTIFIER]})`);
|
|
1467
|
+
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t2.NONNUMERICIDENTIFIER]}|${src[t2.NUMERICIDENTIFIERLOOSE]})`);
|
|
1468
|
+
createToken("PRERELEASE", `(?:-(${src[t2.PRERELEASEIDENTIFIER]}(?:\\.${src[t2.PRERELEASEIDENTIFIER]})*))`);
|
|
1469
|
+
createToken("PRERELEASELOOSE", `(?:-?(${src[t2.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t2.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
1470
|
+
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
1471
|
+
createToken("BUILD", `(?:\\+(${src[t2.BUILDIDENTIFIER]}(?:\\.${src[t2.BUILDIDENTIFIER]})*))`);
|
|
1472
|
+
createToken("FULLPLAIN", `v?${src[t2.MAINVERSION]}${src[t2.PRERELEASE]}?${src[t2.BUILD]}?`);
|
|
1473
|
+
createToken("FULL", `^${src[t2.FULLPLAIN]}$`);
|
|
1474
|
+
createToken("LOOSEPLAIN", `[v=\\s]*${src[t2.MAINVERSIONLOOSE]}${src[t2.PRERELEASELOOSE]}?${src[t2.BUILD]}?`);
|
|
1475
|
+
createToken("LOOSE", `^${src[t2.LOOSEPLAIN]}$`);
|
|
1476
|
+
createToken("GTLT", "((?:<|>)?=?)");
|
|
1477
|
+
createToken("XRANGEIDENTIFIERLOOSE", `${src[t2.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
1478
|
+
createToken("XRANGEIDENTIFIER", `${src[t2.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
1479
|
+
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t2.XRANGEIDENTIFIER]})(?:\\.(${src[t2.XRANGEIDENTIFIER]})(?:\\.(${src[t2.XRANGEIDENTIFIER]})(?:${src[t2.PRERELEASE]})?${src[t2.BUILD]}?)?)?`);
|
|
1480
|
+
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t2.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t2.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t2.XRANGEIDENTIFIERLOOSE]})(?:${src[t2.PRERELEASELOOSE]})?${src[t2.BUILD]}?)?)?`);
|
|
1481
|
+
createToken("XRANGE", `^${src[t2.GTLT]}\\s*${src[t2.XRANGEPLAIN]}$`);
|
|
1482
|
+
createToken("XRANGELOOSE", `^${src[t2.GTLT]}\\s*${src[t2.XRANGEPLAINLOOSE]}$`);
|
|
1483
|
+
createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
1484
|
+
createToken("COERCE", `${src[t2.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
1485
|
+
createToken("COERCEFULL", src[t2.COERCEPLAIN] + `(?:${src[t2.PRERELEASE]})?(?:${src[t2.BUILD]})?(?:$|[^\\d])`);
|
|
1486
|
+
createToken("COERCERTL", src[t2.COERCE], true);
|
|
1487
|
+
createToken("COERCERTLFULL", src[t2.COERCEFULL], true);
|
|
1488
|
+
createToken("LONETILDE", "(?:~>?)");
|
|
1489
|
+
createToken("TILDETRIM", `(\\s*)${src[t2.LONETILDE]}\\s+`, true);
|
|
1490
|
+
exports.tildeTrimReplace = "$1~";
|
|
1491
|
+
createToken("TILDE", `^${src[t2.LONETILDE]}${src[t2.XRANGEPLAIN]}$`);
|
|
1492
|
+
createToken("TILDELOOSE", `^${src[t2.LONETILDE]}${src[t2.XRANGEPLAINLOOSE]}$`);
|
|
1493
|
+
createToken("LONECARET", "(?:\\^)");
|
|
1494
|
+
createToken("CARETTRIM", `(\\s*)${src[t2.LONECARET]}\\s+`, true);
|
|
1495
|
+
exports.caretTrimReplace = "$1^";
|
|
1496
|
+
createToken("CARET", `^${src[t2.LONECARET]}${src[t2.XRANGEPLAIN]}$`);
|
|
1497
|
+
createToken("CARETLOOSE", `^${src[t2.LONECARET]}${src[t2.XRANGEPLAINLOOSE]}$`);
|
|
1498
|
+
createToken("COMPARATORLOOSE", `^${src[t2.GTLT]}\\s*(${src[t2.LOOSEPLAIN]})$|^$`);
|
|
1499
|
+
createToken("COMPARATOR", `^${src[t2.GTLT]}\\s*(${src[t2.FULLPLAIN]})$|^$`);
|
|
1500
|
+
createToken("COMPARATORTRIM", `(\\s*)${src[t2.GTLT]}\\s*(${src[t2.LOOSEPLAIN]}|${src[t2.XRANGEPLAIN]})`, true);
|
|
1501
|
+
exports.comparatorTrimReplace = "$1$2$3";
|
|
1502
|
+
createToken("HYPHENRANGE", `^\\s*(${src[t2.XRANGEPLAIN]})\\s+-\\s+(${src[t2.XRANGEPLAIN]})\\s*$`);
|
|
1503
|
+
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t2.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t2.XRANGEPLAINLOOSE]})\\s*$`);
|
|
1504
|
+
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
1505
|
+
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
1506
|
+
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
1507
|
+
}
|
|
1508
|
+
});
|
|
1509
|
+
|
|
1510
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js
|
|
1511
|
+
var require_parse_options = __commonJS({
|
|
1512
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js"(exports, module) {
|
|
1513
|
+
"use strict";
|
|
1514
|
+
var looseOption = Object.freeze({ loose: true });
|
|
1515
|
+
var emptyOpts = Object.freeze({});
|
|
1516
|
+
var parseOptions = (options) => {
|
|
1517
|
+
if (!options) {
|
|
1518
|
+
return emptyOpts;
|
|
1519
|
+
}
|
|
1520
|
+
if (typeof options !== "object") {
|
|
1521
|
+
return looseOption;
|
|
1522
|
+
}
|
|
1523
|
+
return options;
|
|
1481
1524
|
};
|
|
1482
|
-
|
|
1483
|
-
|
|
1525
|
+
module.exports = parseOptions;
|
|
1526
|
+
}
|
|
1527
|
+
});
|
|
1528
|
+
|
|
1529
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js
|
|
1530
|
+
var require_identifiers = __commonJS({
|
|
1531
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js"(exports, module) {
|
|
1532
|
+
"use strict";
|
|
1533
|
+
var numeric = /^[0-9]+$/;
|
|
1534
|
+
var compareIdentifiers = (a2, b2) => {
|
|
1535
|
+
const anum = numeric.test(a2);
|
|
1536
|
+
const bnum = numeric.test(b2);
|
|
1537
|
+
if (anum && bnum) {
|
|
1538
|
+
a2 = +a2;
|
|
1539
|
+
b2 = +b2;
|
|
1540
|
+
}
|
|
1541
|
+
return a2 === b2 ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a2 < b2 ? -1 : 1;
|
|
1484
1542
|
};
|
|
1485
|
-
|
|
1486
|
-
|
|
1543
|
+
var rcompareIdentifiers = (a2, b2) => compareIdentifiers(b2, a2);
|
|
1544
|
+
module.exports = {
|
|
1545
|
+
compareIdentifiers,
|
|
1546
|
+
rcompareIdentifiers
|
|
1487
1547
|
};
|
|
1488
|
-
|
|
1489
|
-
|
|
1548
|
+
}
|
|
1549
|
+
});
|
|
1550
|
+
|
|
1551
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js
|
|
1552
|
+
var require_semver = __commonJS({
|
|
1553
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js"(exports, module) {
|
|
1554
|
+
"use strict";
|
|
1555
|
+
var debug = require_debug();
|
|
1556
|
+
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
1557
|
+
var { safeRe: re2, t: t2 } = require_re();
|
|
1558
|
+
var parseOptions = require_parse_options();
|
|
1559
|
+
var { compareIdentifiers } = require_identifiers();
|
|
1560
|
+
var SemVer = class _SemVer {
|
|
1561
|
+
constructor(version2, options) {
|
|
1562
|
+
options = parseOptions(options);
|
|
1563
|
+
if (version2 instanceof _SemVer) {
|
|
1564
|
+
if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) {
|
|
1565
|
+
return version2;
|
|
1566
|
+
} else {
|
|
1567
|
+
version2 = version2.version;
|
|
1568
|
+
}
|
|
1569
|
+
} else if (typeof version2 !== "string") {
|
|
1570
|
+
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version2}".`);
|
|
1571
|
+
}
|
|
1572
|
+
if (version2.length > MAX_LENGTH) {
|
|
1573
|
+
throw new TypeError(
|
|
1574
|
+
`version is longer than ${MAX_LENGTH} characters`
|
|
1575
|
+
);
|
|
1576
|
+
}
|
|
1577
|
+
debug("SemVer", version2, options);
|
|
1578
|
+
this.options = options;
|
|
1579
|
+
this.loose = !!options.loose;
|
|
1580
|
+
this.includePrerelease = !!options.includePrerelease;
|
|
1581
|
+
const m2 = version2.trim().match(options.loose ? re2[t2.LOOSE] : re2[t2.FULL]);
|
|
1582
|
+
if (!m2) {
|
|
1583
|
+
throw new TypeError(`Invalid Version: ${version2}`);
|
|
1584
|
+
}
|
|
1585
|
+
this.raw = version2;
|
|
1586
|
+
this.major = +m2[1];
|
|
1587
|
+
this.minor = +m2[2];
|
|
1588
|
+
this.patch = +m2[3];
|
|
1589
|
+
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
|
|
1590
|
+
throw new TypeError("Invalid major version");
|
|
1591
|
+
}
|
|
1592
|
+
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
|
|
1593
|
+
throw new TypeError("Invalid minor version");
|
|
1594
|
+
}
|
|
1595
|
+
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
|
|
1596
|
+
throw new TypeError("Invalid patch version");
|
|
1597
|
+
}
|
|
1598
|
+
if (!m2[4]) {
|
|
1599
|
+
this.prerelease = [];
|
|
1600
|
+
} else {
|
|
1601
|
+
this.prerelease = m2[4].split(".").map((id) => {
|
|
1602
|
+
if (/^[0-9]+$/.test(id)) {
|
|
1603
|
+
const num = +id;
|
|
1604
|
+
if (num >= 0 && num < MAX_SAFE_INTEGER) {
|
|
1605
|
+
return num;
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
return id;
|
|
1609
|
+
});
|
|
1610
|
+
}
|
|
1611
|
+
this.build = m2[5] ? m2[5].split(".") : [];
|
|
1612
|
+
this.format();
|
|
1613
|
+
}
|
|
1614
|
+
format() {
|
|
1615
|
+
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
1616
|
+
if (this.prerelease.length) {
|
|
1617
|
+
this.version += `-${this.prerelease.join(".")}`;
|
|
1618
|
+
}
|
|
1619
|
+
return this.version;
|
|
1620
|
+
}
|
|
1621
|
+
toString() {
|
|
1622
|
+
return this.version;
|
|
1623
|
+
}
|
|
1624
|
+
compare(other) {
|
|
1625
|
+
debug("SemVer.compare", this.version, this.options, other);
|
|
1626
|
+
if (!(other instanceof _SemVer)) {
|
|
1627
|
+
if (typeof other === "string" && other === this.version) {
|
|
1628
|
+
return 0;
|
|
1629
|
+
}
|
|
1630
|
+
other = new _SemVer(other, this.options);
|
|
1631
|
+
}
|
|
1632
|
+
if (other.version === this.version) {
|
|
1633
|
+
return 0;
|
|
1634
|
+
}
|
|
1635
|
+
return this.compareMain(other) || this.comparePre(other);
|
|
1636
|
+
}
|
|
1637
|
+
compareMain(other) {
|
|
1638
|
+
if (!(other instanceof _SemVer)) {
|
|
1639
|
+
other = new _SemVer(other, this.options);
|
|
1640
|
+
}
|
|
1641
|
+
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
|
1642
|
+
}
|
|
1643
|
+
comparePre(other) {
|
|
1644
|
+
if (!(other instanceof _SemVer)) {
|
|
1645
|
+
other = new _SemVer(other, this.options);
|
|
1646
|
+
}
|
|
1647
|
+
if (this.prerelease.length && !other.prerelease.length) {
|
|
1648
|
+
return -1;
|
|
1649
|
+
} else if (!this.prerelease.length && other.prerelease.length) {
|
|
1650
|
+
return 1;
|
|
1651
|
+
} else if (!this.prerelease.length && !other.prerelease.length) {
|
|
1652
|
+
return 0;
|
|
1653
|
+
}
|
|
1654
|
+
let i2 = 0;
|
|
1655
|
+
do {
|
|
1656
|
+
const a2 = this.prerelease[i2];
|
|
1657
|
+
const b2 = other.prerelease[i2];
|
|
1658
|
+
debug("prerelease compare", i2, a2, b2);
|
|
1659
|
+
if (a2 === void 0 && b2 === void 0) {
|
|
1660
|
+
return 0;
|
|
1661
|
+
} else if (b2 === void 0) {
|
|
1662
|
+
return 1;
|
|
1663
|
+
} else if (a2 === void 0) {
|
|
1664
|
+
return -1;
|
|
1665
|
+
} else if (a2 === b2) {
|
|
1666
|
+
continue;
|
|
1667
|
+
} else {
|
|
1668
|
+
return compareIdentifiers(a2, b2);
|
|
1669
|
+
}
|
|
1670
|
+
} while (++i2);
|
|
1671
|
+
}
|
|
1672
|
+
compareBuild(other) {
|
|
1673
|
+
if (!(other instanceof _SemVer)) {
|
|
1674
|
+
other = new _SemVer(other, this.options);
|
|
1675
|
+
}
|
|
1676
|
+
let i2 = 0;
|
|
1677
|
+
do {
|
|
1678
|
+
const a2 = this.build[i2];
|
|
1679
|
+
const b2 = other.build[i2];
|
|
1680
|
+
debug("build compare", i2, a2, b2);
|
|
1681
|
+
if (a2 === void 0 && b2 === void 0) {
|
|
1682
|
+
return 0;
|
|
1683
|
+
} else if (b2 === void 0) {
|
|
1684
|
+
return 1;
|
|
1685
|
+
} else if (a2 === void 0) {
|
|
1686
|
+
return -1;
|
|
1687
|
+
} else if (a2 === b2) {
|
|
1688
|
+
continue;
|
|
1689
|
+
} else {
|
|
1690
|
+
return compareIdentifiers(a2, b2);
|
|
1691
|
+
}
|
|
1692
|
+
} while (++i2);
|
|
1693
|
+
}
|
|
1694
|
+
// preminor will bump the version up to the next minor release, and immediately
|
|
1695
|
+
// down to pre-release. premajor and prepatch work the same way.
|
|
1696
|
+
inc(release, identifier, identifierBase) {
|
|
1697
|
+
if (release.startsWith("pre")) {
|
|
1698
|
+
if (!identifier && identifierBase === false) {
|
|
1699
|
+
throw new Error("invalid increment argument: identifier is empty");
|
|
1700
|
+
}
|
|
1701
|
+
if (identifier) {
|
|
1702
|
+
const match = `-${identifier}`.match(this.options.loose ? re2[t2.PRERELEASELOOSE] : re2[t2.PRERELEASE]);
|
|
1703
|
+
if (!match || match[1] !== identifier) {
|
|
1704
|
+
throw new Error(`invalid identifier: ${identifier}`);
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
switch (release) {
|
|
1709
|
+
case "premajor":
|
|
1710
|
+
this.prerelease.length = 0;
|
|
1711
|
+
this.patch = 0;
|
|
1712
|
+
this.minor = 0;
|
|
1713
|
+
this.major++;
|
|
1714
|
+
this.inc("pre", identifier, identifierBase);
|
|
1715
|
+
break;
|
|
1716
|
+
case "preminor":
|
|
1717
|
+
this.prerelease.length = 0;
|
|
1718
|
+
this.patch = 0;
|
|
1719
|
+
this.minor++;
|
|
1720
|
+
this.inc("pre", identifier, identifierBase);
|
|
1721
|
+
break;
|
|
1722
|
+
case "prepatch":
|
|
1723
|
+
this.prerelease.length = 0;
|
|
1724
|
+
this.inc("patch", identifier, identifierBase);
|
|
1725
|
+
this.inc("pre", identifier, identifierBase);
|
|
1726
|
+
break;
|
|
1727
|
+
// If the input is a non-prerelease version, this acts the same as
|
|
1728
|
+
// prepatch.
|
|
1729
|
+
case "prerelease":
|
|
1730
|
+
if (this.prerelease.length === 0) {
|
|
1731
|
+
this.inc("patch", identifier, identifierBase);
|
|
1732
|
+
}
|
|
1733
|
+
this.inc("pre", identifier, identifierBase);
|
|
1734
|
+
break;
|
|
1735
|
+
case "release":
|
|
1736
|
+
if (this.prerelease.length === 0) {
|
|
1737
|
+
throw new Error(`version ${this.raw} is not a prerelease`);
|
|
1738
|
+
}
|
|
1739
|
+
this.prerelease.length = 0;
|
|
1740
|
+
break;
|
|
1741
|
+
case "major":
|
|
1742
|
+
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
|
|
1743
|
+
this.major++;
|
|
1744
|
+
}
|
|
1745
|
+
this.minor = 0;
|
|
1746
|
+
this.patch = 0;
|
|
1747
|
+
this.prerelease = [];
|
|
1748
|
+
break;
|
|
1749
|
+
case "minor":
|
|
1750
|
+
if (this.patch !== 0 || this.prerelease.length === 0) {
|
|
1751
|
+
this.minor++;
|
|
1752
|
+
}
|
|
1753
|
+
this.patch = 0;
|
|
1754
|
+
this.prerelease = [];
|
|
1755
|
+
break;
|
|
1756
|
+
case "patch":
|
|
1757
|
+
if (this.prerelease.length === 0) {
|
|
1758
|
+
this.patch++;
|
|
1759
|
+
}
|
|
1760
|
+
this.prerelease = [];
|
|
1761
|
+
break;
|
|
1762
|
+
// This probably shouldn't be used publicly.
|
|
1763
|
+
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
|
1764
|
+
case "pre": {
|
|
1765
|
+
const base = Number(identifierBase) ? 1 : 0;
|
|
1766
|
+
if (this.prerelease.length === 0) {
|
|
1767
|
+
this.prerelease = [base];
|
|
1768
|
+
} else {
|
|
1769
|
+
let i2 = this.prerelease.length;
|
|
1770
|
+
while (--i2 >= 0) {
|
|
1771
|
+
if (typeof this.prerelease[i2] === "number") {
|
|
1772
|
+
this.prerelease[i2]++;
|
|
1773
|
+
i2 = -2;
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
if (i2 === -1) {
|
|
1777
|
+
if (identifier === this.prerelease.join(".") && identifierBase === false) {
|
|
1778
|
+
throw new Error("invalid increment argument: identifier already exists");
|
|
1779
|
+
}
|
|
1780
|
+
this.prerelease.push(base);
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
if (identifier) {
|
|
1784
|
+
let prerelease = [identifier, base];
|
|
1785
|
+
if (identifierBase === false) {
|
|
1786
|
+
prerelease = [identifier];
|
|
1787
|
+
}
|
|
1788
|
+
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
1789
|
+
if (isNaN(this.prerelease[1])) {
|
|
1790
|
+
this.prerelease = prerelease;
|
|
1791
|
+
}
|
|
1792
|
+
} else {
|
|
1793
|
+
this.prerelease = prerelease;
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
break;
|
|
1797
|
+
}
|
|
1798
|
+
default:
|
|
1799
|
+
throw new Error(`invalid increment argument: ${release}`);
|
|
1800
|
+
}
|
|
1801
|
+
this.raw = this.format();
|
|
1802
|
+
if (this.build.length) {
|
|
1803
|
+
this.raw += `+${this.build.join(".")}`;
|
|
1804
|
+
}
|
|
1805
|
+
return this;
|
|
1806
|
+
}
|
|
1490
1807
|
};
|
|
1491
|
-
|
|
1492
|
-
|
|
1808
|
+
module.exports = SemVer;
|
|
1809
|
+
}
|
|
1810
|
+
});
|
|
1811
|
+
|
|
1812
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js
|
|
1813
|
+
var require_parse = __commonJS({
|
|
1814
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js"(exports, module) {
|
|
1815
|
+
"use strict";
|
|
1816
|
+
var SemVer = require_semver();
|
|
1817
|
+
var parse2 = (version2, options, throwErrors = false) => {
|
|
1818
|
+
if (version2 instanceof SemVer) {
|
|
1819
|
+
return version2;
|
|
1820
|
+
}
|
|
1821
|
+
try {
|
|
1822
|
+
return new SemVer(version2, options);
|
|
1823
|
+
} catch (er2) {
|
|
1824
|
+
if (!throwErrors) {
|
|
1825
|
+
return null;
|
|
1826
|
+
}
|
|
1827
|
+
throw er2;
|
|
1828
|
+
}
|
|
1493
1829
|
};
|
|
1494
|
-
|
|
1495
|
-
|
|
1830
|
+
module.exports = parse2;
|
|
1831
|
+
}
|
|
1832
|
+
});
|
|
1833
|
+
|
|
1834
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js
|
|
1835
|
+
var require_valid = __commonJS({
|
|
1836
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js"(exports, module) {
|
|
1837
|
+
"use strict";
|
|
1838
|
+
var parse2 = require_parse();
|
|
1839
|
+
var valid = (version2, options) => {
|
|
1840
|
+
const v2 = parse2(version2, options);
|
|
1841
|
+
return v2 ? v2.version : null;
|
|
1496
1842
|
};
|
|
1497
|
-
|
|
1498
|
-
|
|
1843
|
+
module.exports = valid;
|
|
1844
|
+
}
|
|
1845
|
+
});
|
|
1846
|
+
|
|
1847
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js
|
|
1848
|
+
var require_clean = __commonJS({
|
|
1849
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js"(exports, module) {
|
|
1850
|
+
"use strict";
|
|
1851
|
+
var parse2 = require_parse();
|
|
1852
|
+
var clean = (version2, options) => {
|
|
1853
|
+
const s2 = parse2(version2.trim().replace(/^[=v]+/, ""), options);
|
|
1854
|
+
return s2 ? s2.version : null;
|
|
1499
1855
|
};
|
|
1500
|
-
|
|
1501
|
-
|
|
1856
|
+
module.exports = clean;
|
|
1857
|
+
}
|
|
1858
|
+
});
|
|
1859
|
+
|
|
1860
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js
|
|
1861
|
+
var require_inc = __commonJS({
|
|
1862
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js"(exports, module) {
|
|
1863
|
+
"use strict";
|
|
1864
|
+
var SemVer = require_semver();
|
|
1865
|
+
var inc = (version2, release, options, identifier, identifierBase) => {
|
|
1866
|
+
if (typeof options === "string") {
|
|
1867
|
+
identifierBase = identifier;
|
|
1868
|
+
identifier = options;
|
|
1869
|
+
options = void 0;
|
|
1870
|
+
}
|
|
1871
|
+
try {
|
|
1872
|
+
return new SemVer(
|
|
1873
|
+
version2 instanceof SemVer ? version2.version : version2,
|
|
1874
|
+
options
|
|
1875
|
+
).inc(release, identifier, identifierBase).version;
|
|
1876
|
+
} catch (er2) {
|
|
1877
|
+
return null;
|
|
1878
|
+
}
|
|
1502
1879
|
};
|
|
1503
|
-
|
|
1504
|
-
}
|
|
1505
|
-
);
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
var
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1880
|
+
module.exports = inc;
|
|
1881
|
+
}
|
|
1882
|
+
});
|
|
1883
|
+
|
|
1884
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js
|
|
1885
|
+
var require_diff = __commonJS({
|
|
1886
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js"(exports, module) {
|
|
1887
|
+
"use strict";
|
|
1888
|
+
var parse2 = require_parse();
|
|
1889
|
+
var diff = (version1, version2) => {
|
|
1890
|
+
const v1 = parse2(version1, null, true);
|
|
1891
|
+
const v2 = parse2(version2, null, true);
|
|
1892
|
+
const comparison = v1.compare(v2);
|
|
1893
|
+
if (comparison === 0) {
|
|
1894
|
+
return null;
|
|
1514
1895
|
}
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1896
|
+
const v1Higher = comparison > 0;
|
|
1897
|
+
const highVersion = v1Higher ? v1 : v2;
|
|
1898
|
+
const lowVersion = v1Higher ? v2 : v1;
|
|
1899
|
+
const highHasPre = !!highVersion.prerelease.length;
|
|
1900
|
+
const lowHasPre = !!lowVersion.prerelease.length;
|
|
1901
|
+
if (lowHasPre && !highHasPre) {
|
|
1902
|
+
if (!lowVersion.patch && !lowVersion.minor) {
|
|
1903
|
+
return "major";
|
|
1904
|
+
}
|
|
1905
|
+
if (lowVersion.compareMain(highVersion) === 0) {
|
|
1906
|
+
if (lowVersion.minor && !lowVersion.patch) {
|
|
1907
|
+
return "minor";
|
|
1908
|
+
}
|
|
1909
|
+
return "patch";
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1912
|
+
const prefix = highHasPre ? "pre" : "";
|
|
1913
|
+
if (v1.major !== v2.major) {
|
|
1914
|
+
return prefix + "major";
|
|
1915
|
+
}
|
|
1916
|
+
if (v1.minor !== v2.minor) {
|
|
1917
|
+
return prefix + "minor";
|
|
1918
|
+
}
|
|
1919
|
+
if (v1.patch !== v2.patch) {
|
|
1920
|
+
return prefix + "patch";
|
|
1921
|
+
}
|
|
1922
|
+
return "prerelease";
|
|
1519
1923
|
};
|
|
1520
|
-
|
|
1521
|
-
|
|
1924
|
+
module.exports = diff;
|
|
1925
|
+
}
|
|
1926
|
+
});
|
|
1927
|
+
|
|
1928
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js
|
|
1929
|
+
var require_major = __commonJS({
|
|
1930
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js"(exports, module) {
|
|
1931
|
+
"use strict";
|
|
1932
|
+
var SemVer = require_semver();
|
|
1933
|
+
var major = (a2, loose) => new SemVer(a2, loose).major;
|
|
1934
|
+
module.exports = major;
|
|
1935
|
+
}
|
|
1936
|
+
});
|
|
1937
|
+
|
|
1938
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js
|
|
1939
|
+
var require_minor = __commonJS({
|
|
1940
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js"(exports, module) {
|
|
1941
|
+
"use strict";
|
|
1942
|
+
var SemVer = require_semver();
|
|
1943
|
+
var minor = (a2, loose) => new SemVer(a2, loose).minor;
|
|
1944
|
+
module.exports = minor;
|
|
1945
|
+
}
|
|
1946
|
+
});
|
|
1947
|
+
|
|
1948
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js
|
|
1949
|
+
var require_patch = __commonJS({
|
|
1950
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js"(exports, module) {
|
|
1951
|
+
"use strict";
|
|
1952
|
+
var SemVer = require_semver();
|
|
1953
|
+
var patch = (a2, loose) => new SemVer(a2, loose).patch;
|
|
1954
|
+
module.exports = patch;
|
|
1955
|
+
}
|
|
1956
|
+
});
|
|
1957
|
+
|
|
1958
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js
|
|
1959
|
+
var require_prerelease = __commonJS({
|
|
1960
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js"(exports, module) {
|
|
1961
|
+
"use strict";
|
|
1962
|
+
var parse2 = require_parse();
|
|
1963
|
+
var prerelease = (version2, options) => {
|
|
1964
|
+
const parsed = parse2(version2, options);
|
|
1965
|
+
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
1522
1966
|
};
|
|
1523
|
-
|
|
1524
|
-
|
|
1967
|
+
module.exports = prerelease;
|
|
1968
|
+
}
|
|
1969
|
+
});
|
|
1970
|
+
|
|
1971
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js
|
|
1972
|
+
var require_compare = __commonJS({
|
|
1973
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js"(exports, module) {
|
|
1974
|
+
"use strict";
|
|
1975
|
+
var SemVer = require_semver();
|
|
1976
|
+
var compare = (a2, b2, loose) => new SemVer(a2, loose).compare(new SemVer(b2, loose));
|
|
1977
|
+
module.exports = compare;
|
|
1978
|
+
}
|
|
1979
|
+
});
|
|
1980
|
+
|
|
1981
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js
|
|
1982
|
+
var require_rcompare = __commonJS({
|
|
1983
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js"(exports, module) {
|
|
1984
|
+
"use strict";
|
|
1985
|
+
var compare = require_compare();
|
|
1986
|
+
var rcompare = (a2, b2, loose) => compare(b2, a2, loose);
|
|
1987
|
+
module.exports = rcompare;
|
|
1988
|
+
}
|
|
1989
|
+
});
|
|
1990
|
+
|
|
1991
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js
|
|
1992
|
+
var require_compare_loose = __commonJS({
|
|
1993
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js"(exports, module) {
|
|
1994
|
+
"use strict";
|
|
1995
|
+
var compare = require_compare();
|
|
1996
|
+
var compareLoose = (a2, b2) => compare(a2, b2, true);
|
|
1997
|
+
module.exports = compareLoose;
|
|
1998
|
+
}
|
|
1999
|
+
});
|
|
2000
|
+
|
|
2001
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js
|
|
2002
|
+
var require_compare_build = __commonJS({
|
|
2003
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js"(exports, module) {
|
|
2004
|
+
"use strict";
|
|
2005
|
+
var SemVer = require_semver();
|
|
2006
|
+
var compareBuild = (a2, b2, loose) => {
|
|
2007
|
+
const versionA = new SemVer(a2, loose);
|
|
2008
|
+
const versionB = new SemVer(b2, loose);
|
|
2009
|
+
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
1525
2010
|
};
|
|
1526
|
-
|
|
1527
|
-
|
|
2011
|
+
module.exports = compareBuild;
|
|
2012
|
+
}
|
|
2013
|
+
});
|
|
2014
|
+
|
|
2015
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js
|
|
2016
|
+
var require_sort = __commonJS({
|
|
2017
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js"(exports, module) {
|
|
2018
|
+
"use strict";
|
|
2019
|
+
var compareBuild = require_compare_build();
|
|
2020
|
+
var sort = (list, loose) => list.sort((a2, b2) => compareBuild(a2, b2, loose));
|
|
2021
|
+
module.exports = sort;
|
|
2022
|
+
}
|
|
2023
|
+
});
|
|
2024
|
+
|
|
2025
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js
|
|
2026
|
+
var require_rsort = __commonJS({
|
|
2027
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js"(exports, module) {
|
|
2028
|
+
"use strict";
|
|
2029
|
+
var compareBuild = require_compare_build();
|
|
2030
|
+
var rsort = (list, loose) => list.sort((a2, b2) => compareBuild(b2, a2, loose));
|
|
2031
|
+
module.exports = rsort;
|
|
2032
|
+
}
|
|
2033
|
+
});
|
|
2034
|
+
|
|
2035
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js
|
|
2036
|
+
var require_gt = __commonJS({
|
|
2037
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js"(exports, module) {
|
|
2038
|
+
"use strict";
|
|
2039
|
+
var compare = require_compare();
|
|
2040
|
+
var gt2 = (a2, b2, loose) => compare(a2, b2, loose) > 0;
|
|
2041
|
+
module.exports = gt2;
|
|
2042
|
+
}
|
|
2043
|
+
});
|
|
2044
|
+
|
|
2045
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js
|
|
2046
|
+
var require_lt = __commonJS({
|
|
2047
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js"(exports, module) {
|
|
2048
|
+
"use strict";
|
|
2049
|
+
var compare = require_compare();
|
|
2050
|
+
var lt2 = (a2, b2, loose) => compare(a2, b2, loose) < 0;
|
|
2051
|
+
module.exports = lt2;
|
|
2052
|
+
}
|
|
2053
|
+
});
|
|
2054
|
+
|
|
2055
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js
|
|
2056
|
+
var require_eq = __commonJS({
|
|
2057
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js"(exports, module) {
|
|
2058
|
+
"use strict";
|
|
2059
|
+
var compare = require_compare();
|
|
2060
|
+
var eq = (a2, b2, loose) => compare(a2, b2, loose) === 0;
|
|
2061
|
+
module.exports = eq;
|
|
2062
|
+
}
|
|
2063
|
+
});
|
|
2064
|
+
|
|
2065
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js
|
|
2066
|
+
var require_neq = __commonJS({
|
|
2067
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js"(exports, module) {
|
|
2068
|
+
"use strict";
|
|
2069
|
+
var compare = require_compare();
|
|
2070
|
+
var neq = (a2, b2, loose) => compare(a2, b2, loose) !== 0;
|
|
2071
|
+
module.exports = neq;
|
|
2072
|
+
}
|
|
2073
|
+
});
|
|
2074
|
+
|
|
2075
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js
|
|
2076
|
+
var require_gte = __commonJS({
|
|
2077
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js"(exports, module) {
|
|
2078
|
+
"use strict";
|
|
2079
|
+
var compare = require_compare();
|
|
2080
|
+
var gte = (a2, b2, loose) => compare(a2, b2, loose) >= 0;
|
|
2081
|
+
module.exports = gte;
|
|
2082
|
+
}
|
|
2083
|
+
});
|
|
2084
|
+
|
|
2085
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js
|
|
2086
|
+
var require_lte = __commonJS({
|
|
2087
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js"(exports, module) {
|
|
2088
|
+
"use strict";
|
|
2089
|
+
var compare = require_compare();
|
|
2090
|
+
var lte = (a2, b2, loose) => compare(a2, b2, loose) <= 0;
|
|
2091
|
+
module.exports = lte;
|
|
2092
|
+
}
|
|
2093
|
+
});
|
|
2094
|
+
|
|
2095
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js
|
|
2096
|
+
var require_cmp = __commonJS({
|
|
2097
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js"(exports, module) {
|
|
2098
|
+
"use strict";
|
|
2099
|
+
var eq = require_eq();
|
|
2100
|
+
var neq = require_neq();
|
|
2101
|
+
var gt2 = require_gt();
|
|
2102
|
+
var gte = require_gte();
|
|
2103
|
+
var lt2 = require_lt();
|
|
2104
|
+
var lte = require_lte();
|
|
2105
|
+
var cmp = (a2, op, b2, loose) => {
|
|
2106
|
+
switch (op) {
|
|
2107
|
+
case "===":
|
|
2108
|
+
if (typeof a2 === "object") {
|
|
2109
|
+
a2 = a2.version;
|
|
2110
|
+
}
|
|
2111
|
+
if (typeof b2 === "object") {
|
|
2112
|
+
b2 = b2.version;
|
|
2113
|
+
}
|
|
2114
|
+
return a2 === b2;
|
|
2115
|
+
case "!==":
|
|
2116
|
+
if (typeof a2 === "object") {
|
|
2117
|
+
a2 = a2.version;
|
|
2118
|
+
}
|
|
2119
|
+
if (typeof b2 === "object") {
|
|
2120
|
+
b2 = b2.version;
|
|
2121
|
+
}
|
|
2122
|
+
return a2 !== b2;
|
|
2123
|
+
case "":
|
|
2124
|
+
case "=":
|
|
2125
|
+
case "==":
|
|
2126
|
+
return eq(a2, b2, loose);
|
|
2127
|
+
case "!=":
|
|
2128
|
+
return neq(a2, b2, loose);
|
|
2129
|
+
case ">":
|
|
2130
|
+
return gt2(a2, b2, loose);
|
|
2131
|
+
case ">=":
|
|
2132
|
+
return gte(a2, b2, loose);
|
|
2133
|
+
case "<":
|
|
2134
|
+
return lt2(a2, b2, loose);
|
|
2135
|
+
case "<=":
|
|
2136
|
+
return lte(a2, b2, loose);
|
|
2137
|
+
default:
|
|
2138
|
+
throw new TypeError(`Invalid operator: ${op}`);
|
|
2139
|
+
}
|
|
1528
2140
|
};
|
|
1529
|
-
|
|
1530
|
-
|
|
2141
|
+
module.exports = cmp;
|
|
2142
|
+
}
|
|
2143
|
+
});
|
|
2144
|
+
|
|
2145
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js
|
|
2146
|
+
var require_coerce = __commonJS({
|
|
2147
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js"(exports, module) {
|
|
2148
|
+
"use strict";
|
|
2149
|
+
var SemVer = require_semver();
|
|
2150
|
+
var parse2 = require_parse();
|
|
2151
|
+
var { safeRe: re2, t: t2 } = require_re();
|
|
2152
|
+
var coerce = (version2, options) => {
|
|
2153
|
+
if (version2 instanceof SemVer) {
|
|
2154
|
+
return version2;
|
|
2155
|
+
}
|
|
2156
|
+
if (typeof version2 === "number") {
|
|
2157
|
+
version2 = String(version2);
|
|
2158
|
+
}
|
|
2159
|
+
if (typeof version2 !== "string") {
|
|
2160
|
+
return null;
|
|
2161
|
+
}
|
|
2162
|
+
options = options || {};
|
|
2163
|
+
let match = null;
|
|
2164
|
+
if (!options.rtl) {
|
|
2165
|
+
match = version2.match(options.includePrerelease ? re2[t2.COERCEFULL] : re2[t2.COERCE]);
|
|
2166
|
+
} else {
|
|
2167
|
+
const coerceRtlRegex = options.includePrerelease ? re2[t2.COERCERTLFULL] : re2[t2.COERCERTL];
|
|
2168
|
+
let next;
|
|
2169
|
+
while ((next = coerceRtlRegex.exec(version2)) && (!match || match.index + match[0].length !== version2.length)) {
|
|
2170
|
+
if (!match || next.index + next[0].length !== match.index + match[0].length) {
|
|
2171
|
+
match = next;
|
|
2172
|
+
}
|
|
2173
|
+
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
2174
|
+
}
|
|
2175
|
+
coerceRtlRegex.lastIndex = -1;
|
|
2176
|
+
}
|
|
2177
|
+
if (match === null) {
|
|
2178
|
+
return null;
|
|
2179
|
+
}
|
|
2180
|
+
const major = match[2];
|
|
2181
|
+
const minor = match[3] || "0";
|
|
2182
|
+
const patch = match[4] || "0";
|
|
2183
|
+
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
2184
|
+
const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
2185
|
+
return parse2(`${major}.${minor}.${patch}${prerelease}${build}`, options);
|
|
1531
2186
|
};
|
|
1532
|
-
|
|
1533
|
-
|
|
2187
|
+
module.exports = coerce;
|
|
2188
|
+
}
|
|
2189
|
+
});
|
|
2190
|
+
|
|
2191
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js
|
|
2192
|
+
var require_lrucache = __commonJS({
|
|
2193
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js"(exports, module) {
|
|
2194
|
+
"use strict";
|
|
2195
|
+
var LRUCache = class {
|
|
2196
|
+
constructor() {
|
|
2197
|
+
this.max = 1e3;
|
|
2198
|
+
this.map = /* @__PURE__ */ new Map();
|
|
2199
|
+
}
|
|
2200
|
+
get(key) {
|
|
2201
|
+
const value = this.map.get(key);
|
|
2202
|
+
if (value === void 0) {
|
|
2203
|
+
return void 0;
|
|
2204
|
+
} else {
|
|
2205
|
+
this.map.delete(key);
|
|
2206
|
+
this.map.set(key, value);
|
|
2207
|
+
return value;
|
|
2208
|
+
}
|
|
2209
|
+
}
|
|
2210
|
+
delete(key) {
|
|
2211
|
+
return this.map.delete(key);
|
|
2212
|
+
}
|
|
2213
|
+
set(key, value) {
|
|
2214
|
+
const deleted = this.delete(key);
|
|
2215
|
+
if (!deleted && value !== void 0) {
|
|
2216
|
+
if (this.map.size >= this.max) {
|
|
2217
|
+
const firstKey = this.map.keys().next().value;
|
|
2218
|
+
this.delete(firstKey);
|
|
2219
|
+
}
|
|
2220
|
+
this.map.set(key, value);
|
|
2221
|
+
}
|
|
2222
|
+
return this;
|
|
2223
|
+
}
|
|
1534
2224
|
};
|
|
1535
|
-
|
|
1536
|
-
|
|
2225
|
+
module.exports = LRUCache;
|
|
2226
|
+
}
|
|
2227
|
+
});
|
|
2228
|
+
|
|
2229
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js
|
|
2230
|
+
var require_range = __commonJS({
|
|
2231
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js"(exports, module) {
|
|
2232
|
+
"use strict";
|
|
2233
|
+
var SPACE_CHARACTERS = /\s+/g;
|
|
2234
|
+
var Range = class _Range {
|
|
2235
|
+
constructor(range, options) {
|
|
2236
|
+
options = parseOptions(options);
|
|
2237
|
+
if (range instanceof _Range) {
|
|
2238
|
+
if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
|
|
2239
|
+
return range;
|
|
2240
|
+
} else {
|
|
2241
|
+
return new _Range(range.raw, options);
|
|
2242
|
+
}
|
|
2243
|
+
}
|
|
2244
|
+
if (range instanceof Comparator) {
|
|
2245
|
+
this.raw = range.value;
|
|
2246
|
+
this.set = [[range]];
|
|
2247
|
+
this.formatted = void 0;
|
|
2248
|
+
return this;
|
|
2249
|
+
}
|
|
2250
|
+
this.options = options;
|
|
2251
|
+
this.loose = !!options.loose;
|
|
2252
|
+
this.includePrerelease = !!options.includePrerelease;
|
|
2253
|
+
this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
|
|
2254
|
+
this.set = this.raw.split("||").map((r2) => this.parseRange(r2.trim())).filter((c2) => c2.length);
|
|
2255
|
+
if (!this.set.length) {
|
|
2256
|
+
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
2257
|
+
}
|
|
2258
|
+
if (this.set.length > 1) {
|
|
2259
|
+
const first = this.set[0];
|
|
2260
|
+
this.set = this.set.filter((c2) => !isNullSet(c2[0]));
|
|
2261
|
+
if (this.set.length === 0) {
|
|
2262
|
+
this.set = [first];
|
|
2263
|
+
} else if (this.set.length > 1) {
|
|
2264
|
+
for (const c2 of this.set) {
|
|
2265
|
+
if (c2.length === 1 && isAny(c2[0])) {
|
|
2266
|
+
this.set = [c2];
|
|
2267
|
+
break;
|
|
2268
|
+
}
|
|
2269
|
+
}
|
|
2270
|
+
}
|
|
2271
|
+
}
|
|
2272
|
+
this.formatted = void 0;
|
|
2273
|
+
}
|
|
2274
|
+
get range() {
|
|
2275
|
+
if (this.formatted === void 0) {
|
|
2276
|
+
this.formatted = "";
|
|
2277
|
+
for (let i2 = 0; i2 < this.set.length; i2++) {
|
|
2278
|
+
if (i2 > 0) {
|
|
2279
|
+
this.formatted += "||";
|
|
2280
|
+
}
|
|
2281
|
+
const comps = this.set[i2];
|
|
2282
|
+
for (let k2 = 0; k2 < comps.length; k2++) {
|
|
2283
|
+
if (k2 > 0) {
|
|
2284
|
+
this.formatted += " ";
|
|
2285
|
+
}
|
|
2286
|
+
this.formatted += comps[k2].toString().trim();
|
|
2287
|
+
}
|
|
2288
|
+
}
|
|
2289
|
+
}
|
|
2290
|
+
return this.formatted;
|
|
2291
|
+
}
|
|
2292
|
+
format() {
|
|
2293
|
+
return this.range;
|
|
2294
|
+
}
|
|
2295
|
+
toString() {
|
|
2296
|
+
return this.range;
|
|
2297
|
+
}
|
|
2298
|
+
parseRange(range) {
|
|
2299
|
+
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
2300
|
+
const memoKey = memoOpts + ":" + range;
|
|
2301
|
+
const cached2 = cache2.get(memoKey);
|
|
2302
|
+
if (cached2) {
|
|
2303
|
+
return cached2;
|
|
2304
|
+
}
|
|
2305
|
+
const loose = this.options.loose;
|
|
2306
|
+
const hr2 = loose ? re2[t2.HYPHENRANGELOOSE] : re2[t2.HYPHENRANGE];
|
|
2307
|
+
range = range.replace(hr2, hyphenReplace(this.options.includePrerelease));
|
|
2308
|
+
debug("hyphen replace", range);
|
|
2309
|
+
range = range.replace(re2[t2.COMPARATORTRIM], comparatorTrimReplace);
|
|
2310
|
+
debug("comparator trim", range);
|
|
2311
|
+
range = range.replace(re2[t2.TILDETRIM], tildeTrimReplace);
|
|
2312
|
+
debug("tilde trim", range);
|
|
2313
|
+
range = range.replace(re2[t2.CARETTRIM], caretTrimReplace);
|
|
2314
|
+
debug("caret trim", range);
|
|
2315
|
+
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
2316
|
+
if (loose) {
|
|
2317
|
+
rangeList = rangeList.filter((comp) => {
|
|
2318
|
+
debug("loose invalid filter", comp, this.options);
|
|
2319
|
+
return !!comp.match(re2[t2.COMPARATORLOOSE]);
|
|
2320
|
+
});
|
|
2321
|
+
}
|
|
2322
|
+
debug("range list", rangeList);
|
|
2323
|
+
const rangeMap = /* @__PURE__ */ new Map();
|
|
2324
|
+
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
2325
|
+
for (const comp of comparators) {
|
|
2326
|
+
if (isNullSet(comp)) {
|
|
2327
|
+
return [comp];
|
|
2328
|
+
}
|
|
2329
|
+
rangeMap.set(comp.value, comp);
|
|
2330
|
+
}
|
|
2331
|
+
if (rangeMap.size > 1 && rangeMap.has("")) {
|
|
2332
|
+
rangeMap.delete("");
|
|
2333
|
+
}
|
|
2334
|
+
const result = [...rangeMap.values()];
|
|
2335
|
+
cache2.set(memoKey, result);
|
|
2336
|
+
return result;
|
|
2337
|
+
}
|
|
2338
|
+
intersects(range, options) {
|
|
2339
|
+
if (!(range instanceof _Range)) {
|
|
2340
|
+
throw new TypeError("a Range is required");
|
|
2341
|
+
}
|
|
2342
|
+
return this.set.some((thisComparators) => {
|
|
2343
|
+
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
|
|
2344
|
+
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
2345
|
+
return rangeComparators.every((rangeComparator) => {
|
|
2346
|
+
return thisComparator.intersects(rangeComparator, options);
|
|
2347
|
+
});
|
|
2348
|
+
});
|
|
2349
|
+
});
|
|
2350
|
+
});
|
|
2351
|
+
}
|
|
2352
|
+
// if ANY of the sets match ALL of its comparators, then pass
|
|
2353
|
+
test(version2) {
|
|
2354
|
+
if (!version2) {
|
|
2355
|
+
return false;
|
|
2356
|
+
}
|
|
2357
|
+
if (typeof version2 === "string") {
|
|
2358
|
+
try {
|
|
2359
|
+
version2 = new SemVer(version2, this.options);
|
|
2360
|
+
} catch (er2) {
|
|
2361
|
+
return false;
|
|
2362
|
+
}
|
|
2363
|
+
}
|
|
2364
|
+
for (let i2 = 0; i2 < this.set.length; i2++) {
|
|
2365
|
+
if (testSet(this.set[i2], version2, this.options)) {
|
|
2366
|
+
return true;
|
|
2367
|
+
}
|
|
2368
|
+
}
|
|
2369
|
+
return false;
|
|
2370
|
+
}
|
|
1537
2371
|
};
|
|
1538
|
-
|
|
1539
|
-
|
|
2372
|
+
module.exports = Range;
|
|
2373
|
+
var LRU = require_lrucache();
|
|
2374
|
+
var cache2 = new LRU();
|
|
2375
|
+
var parseOptions = require_parse_options();
|
|
2376
|
+
var Comparator = require_comparator();
|
|
2377
|
+
var debug = require_debug();
|
|
2378
|
+
var SemVer = require_semver();
|
|
2379
|
+
var {
|
|
2380
|
+
safeRe: re2,
|
|
2381
|
+
t: t2,
|
|
2382
|
+
comparatorTrimReplace,
|
|
2383
|
+
tildeTrimReplace,
|
|
2384
|
+
caretTrimReplace
|
|
2385
|
+
} = require_re();
|
|
2386
|
+
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
2387
|
+
var isNullSet = (c2) => c2.value === "<0.0.0-0";
|
|
2388
|
+
var isAny = (c2) => c2.value === "";
|
|
2389
|
+
var isSatisfiable = (comparators, options) => {
|
|
2390
|
+
let result = true;
|
|
2391
|
+
const remainingComparators = comparators.slice();
|
|
2392
|
+
let testComparator = remainingComparators.pop();
|
|
2393
|
+
while (result && remainingComparators.length) {
|
|
2394
|
+
result = remainingComparators.every((otherComparator) => {
|
|
2395
|
+
return testComparator.intersects(otherComparator, options);
|
|
2396
|
+
});
|
|
2397
|
+
testComparator = remainingComparators.pop();
|
|
2398
|
+
}
|
|
2399
|
+
return result;
|
|
1540
2400
|
};
|
|
1541
|
-
|
|
1542
|
-
|
|
2401
|
+
var parseComparator = (comp, options) => {
|
|
2402
|
+
debug("comp", comp, options);
|
|
2403
|
+
comp = replaceCarets(comp, options);
|
|
2404
|
+
debug("caret", comp);
|
|
2405
|
+
comp = replaceTildes(comp, options);
|
|
2406
|
+
debug("tildes", comp);
|
|
2407
|
+
comp = replaceXRanges(comp, options);
|
|
2408
|
+
debug("xrange", comp);
|
|
2409
|
+
comp = replaceStars(comp, options);
|
|
2410
|
+
debug("stars", comp);
|
|
2411
|
+
return comp;
|
|
1543
2412
|
};
|
|
1544
|
-
|
|
1545
|
-
|
|
2413
|
+
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
2414
|
+
var replaceTildes = (comp, options) => {
|
|
2415
|
+
return comp.trim().split(/\s+/).map((c2) => replaceTilde(c2, options)).join(" ");
|
|
1546
2416
|
};
|
|
1547
|
-
|
|
1548
|
-
|
|
2417
|
+
var replaceTilde = (comp, options) => {
|
|
2418
|
+
const r2 = options.loose ? re2[t2.TILDELOOSE] : re2[t2.TILDE];
|
|
2419
|
+
return comp.replace(r2, (_2, M2, m2, p2, pr2) => {
|
|
2420
|
+
debug("tilde", comp, _2, M2, m2, p2, pr2);
|
|
2421
|
+
let ret;
|
|
2422
|
+
if (isX(M2)) {
|
|
2423
|
+
ret = "";
|
|
2424
|
+
} else if (isX(m2)) {
|
|
2425
|
+
ret = `>=${M2}.0.0 <${+M2 + 1}.0.0-0`;
|
|
2426
|
+
} else if (isX(p2)) {
|
|
2427
|
+
ret = `>=${M2}.${m2}.0 <${M2}.${+m2 + 1}.0-0`;
|
|
2428
|
+
} else if (pr2) {
|
|
2429
|
+
debug("replaceTilde pr", pr2);
|
|
2430
|
+
ret = `>=${M2}.${m2}.${p2}-${pr2} <${M2}.${+m2 + 1}.0-0`;
|
|
2431
|
+
} else {
|
|
2432
|
+
ret = `>=${M2}.${m2}.${p2} <${M2}.${+m2 + 1}.0-0`;
|
|
2433
|
+
}
|
|
2434
|
+
debug("tilde return", ret);
|
|
2435
|
+
return ret;
|
|
2436
|
+
});
|
|
1549
2437
|
};
|
|
1550
|
-
|
|
1551
|
-
return
|
|
2438
|
+
var replaceCarets = (comp, options) => {
|
|
2439
|
+
return comp.trim().split(/\s+/).map((c2) => replaceCaret(c2, options)).join(" ");
|
|
1552
2440
|
};
|
|
1553
|
-
|
|
1554
|
-
|
|
2441
|
+
var replaceCaret = (comp, options) => {
|
|
2442
|
+
debug("caret", comp, options);
|
|
2443
|
+
const r2 = options.loose ? re2[t2.CARETLOOSE] : re2[t2.CARET];
|
|
2444
|
+
const z2 = options.includePrerelease ? "-0" : "";
|
|
2445
|
+
return comp.replace(r2, (_2, M2, m2, p2, pr2) => {
|
|
2446
|
+
debug("caret", comp, _2, M2, m2, p2, pr2);
|
|
2447
|
+
let ret;
|
|
2448
|
+
if (isX(M2)) {
|
|
2449
|
+
ret = "";
|
|
2450
|
+
} else if (isX(m2)) {
|
|
2451
|
+
ret = `>=${M2}.0.0${z2} <${+M2 + 1}.0.0-0`;
|
|
2452
|
+
} else if (isX(p2)) {
|
|
2453
|
+
if (M2 === "0") {
|
|
2454
|
+
ret = `>=${M2}.${m2}.0${z2} <${M2}.${+m2 + 1}.0-0`;
|
|
2455
|
+
} else {
|
|
2456
|
+
ret = `>=${M2}.${m2}.0${z2} <${+M2 + 1}.0.0-0`;
|
|
2457
|
+
}
|
|
2458
|
+
} else if (pr2) {
|
|
2459
|
+
debug("replaceCaret pr", pr2);
|
|
2460
|
+
if (M2 === "0") {
|
|
2461
|
+
if (m2 === "0") {
|
|
2462
|
+
ret = `>=${M2}.${m2}.${p2}-${pr2} <${M2}.${m2}.${+p2 + 1}-0`;
|
|
2463
|
+
} else {
|
|
2464
|
+
ret = `>=${M2}.${m2}.${p2}-${pr2} <${M2}.${+m2 + 1}.0-0`;
|
|
2465
|
+
}
|
|
2466
|
+
} else {
|
|
2467
|
+
ret = `>=${M2}.${m2}.${p2}-${pr2} <${+M2 + 1}.0.0-0`;
|
|
2468
|
+
}
|
|
2469
|
+
} else {
|
|
2470
|
+
debug("no pr");
|
|
2471
|
+
if (M2 === "0") {
|
|
2472
|
+
if (m2 === "0") {
|
|
2473
|
+
ret = `>=${M2}.${m2}.${p2}${z2} <${M2}.${m2}.${+p2 + 1}-0`;
|
|
2474
|
+
} else {
|
|
2475
|
+
ret = `>=${M2}.${m2}.${p2}${z2} <${M2}.${+m2 + 1}.0-0`;
|
|
2476
|
+
}
|
|
2477
|
+
} else {
|
|
2478
|
+
ret = `>=${M2}.${m2}.${p2} <${+M2 + 1}.0.0-0`;
|
|
2479
|
+
}
|
|
2480
|
+
}
|
|
2481
|
+
debug("caret return", ret);
|
|
2482
|
+
return ret;
|
|
2483
|
+
});
|
|
1555
2484
|
};
|
|
1556
|
-
|
|
1557
|
-
|
|
2485
|
+
var replaceXRanges = (comp, options) => {
|
|
2486
|
+
debug("replaceXRanges", comp, options);
|
|
2487
|
+
return comp.split(/\s+/).map((c2) => replaceXRange(c2, options)).join(" ");
|
|
1558
2488
|
};
|
|
1559
|
-
|
|
1560
|
-
|
|
2489
|
+
var replaceXRange = (comp, options) => {
|
|
2490
|
+
comp = comp.trim();
|
|
2491
|
+
const r2 = options.loose ? re2[t2.XRANGELOOSE] : re2[t2.XRANGE];
|
|
2492
|
+
return comp.replace(r2, (ret, gtlt, M2, m2, p2, pr2) => {
|
|
2493
|
+
debug("xRange", comp, ret, gtlt, M2, m2, p2, pr2);
|
|
2494
|
+
const xM = isX(M2);
|
|
2495
|
+
const xm = xM || isX(m2);
|
|
2496
|
+
const xp = xm || isX(p2);
|
|
2497
|
+
const anyX = xp;
|
|
2498
|
+
if (gtlt === "=" && anyX) {
|
|
2499
|
+
gtlt = "";
|
|
2500
|
+
}
|
|
2501
|
+
pr2 = options.includePrerelease ? "-0" : "";
|
|
2502
|
+
if (xM) {
|
|
2503
|
+
if (gtlt === ">" || gtlt === "<") {
|
|
2504
|
+
ret = "<0.0.0-0";
|
|
2505
|
+
} else {
|
|
2506
|
+
ret = "*";
|
|
2507
|
+
}
|
|
2508
|
+
} else if (gtlt && anyX) {
|
|
2509
|
+
if (xm) {
|
|
2510
|
+
m2 = 0;
|
|
2511
|
+
}
|
|
2512
|
+
p2 = 0;
|
|
2513
|
+
if (gtlt === ">") {
|
|
2514
|
+
gtlt = ">=";
|
|
2515
|
+
if (xm) {
|
|
2516
|
+
M2 = +M2 + 1;
|
|
2517
|
+
m2 = 0;
|
|
2518
|
+
p2 = 0;
|
|
2519
|
+
} else {
|
|
2520
|
+
m2 = +m2 + 1;
|
|
2521
|
+
p2 = 0;
|
|
2522
|
+
}
|
|
2523
|
+
} else if (gtlt === "<=") {
|
|
2524
|
+
gtlt = "<";
|
|
2525
|
+
if (xm) {
|
|
2526
|
+
M2 = +M2 + 1;
|
|
2527
|
+
} else {
|
|
2528
|
+
m2 = +m2 + 1;
|
|
2529
|
+
}
|
|
2530
|
+
}
|
|
2531
|
+
if (gtlt === "<") {
|
|
2532
|
+
pr2 = "-0";
|
|
2533
|
+
}
|
|
2534
|
+
ret = `${gtlt + M2}.${m2}.${p2}${pr2}`;
|
|
2535
|
+
} else if (xm) {
|
|
2536
|
+
ret = `>=${M2}.0.0${pr2} <${+M2 + 1}.0.0-0`;
|
|
2537
|
+
} else if (xp) {
|
|
2538
|
+
ret = `>=${M2}.${m2}.0${pr2} <${M2}.${+m2 + 1}.0-0`;
|
|
2539
|
+
}
|
|
2540
|
+
debug("xRange return", ret);
|
|
2541
|
+
return ret;
|
|
2542
|
+
});
|
|
1561
2543
|
};
|
|
1562
|
-
|
|
1563
|
-
|
|
2544
|
+
var replaceStars = (comp, options) => {
|
|
2545
|
+
debug("replaceStars", comp, options);
|
|
2546
|
+
return comp.trim().replace(re2[t2.STAR], "");
|
|
1564
2547
|
};
|
|
1565
|
-
|
|
1566
|
-
|
|
2548
|
+
var replaceGTE0 = (comp, options) => {
|
|
2549
|
+
debug("replaceGTE0", comp, options);
|
|
2550
|
+
return comp.trim().replace(re2[options.includePrerelease ? t2.GTE0PRE : t2.GTE0], "");
|
|
1567
2551
|
};
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
for (var _i2 = 0; _i2 < arguments.length; _i2++) {
|
|
1578
|
-
options[_i2] = arguments[_i2];
|
|
1579
|
-
}
|
|
1580
|
-
var someOption = [];
|
|
1581
|
-
for (var _a = 0, options_1 = options; _a < options_1.length; _a++) {
|
|
1582
|
-
var option = options_1[_a];
|
|
1583
|
-
if (option.isSome()) {
|
|
1584
|
-
someOption.push(option.value);
|
|
2552
|
+
var hyphenReplace = (incPr) => ($0, from2, fM, fm, fp, fpr, fb, to2, tM, tm, tp, tpr) => {
|
|
2553
|
+
if (isX(fM)) {
|
|
2554
|
+
from2 = "";
|
|
2555
|
+
} else if (isX(fm)) {
|
|
2556
|
+
from2 = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
2557
|
+
} else if (isX(fp)) {
|
|
2558
|
+
from2 = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
2559
|
+
} else if (fpr) {
|
|
2560
|
+
from2 = `>=${from2}`;
|
|
1585
2561
|
} else {
|
|
1586
|
-
|
|
1587
|
-
}
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
var option = options_2[_a];
|
|
1599
|
-
if (option.isSome()) {
|
|
1600
|
-
return option;
|
|
2562
|
+
from2 = `>=${from2}${incPr ? "-0" : ""}`;
|
|
2563
|
+
}
|
|
2564
|
+
if (isX(tM)) {
|
|
2565
|
+
to2 = "";
|
|
2566
|
+
} else if (isX(tm)) {
|
|
2567
|
+
to2 = `<${+tM + 1}.0.0-0`;
|
|
2568
|
+
} else if (isX(tp)) {
|
|
2569
|
+
to2 = `<${tM}.${+tm + 1}.0-0`;
|
|
2570
|
+
} else if (tpr) {
|
|
2571
|
+
to2 = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
2572
|
+
} else if (incPr) {
|
|
2573
|
+
to2 = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
1601
2574
|
} else {
|
|
1602
|
-
|
|
2575
|
+
to2 = `<=${to2}`;
|
|
1603
2576
|
}
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
Option2.isOption = isOption;
|
|
1612
|
-
})(Option || (Option = {}));
|
|
1613
|
-
|
|
1614
|
-
// node_modules/.pnpm/ts-results-es@6.0.0/node_modules/ts-results-es/dist/esm/result.js
|
|
1615
|
-
var __spreadArray = function(to2, from2, pack) {
|
|
1616
|
-
if (pack || arguments.length === 2) for (var i2 = 0, l2 = from2.length, ar2; i2 < l2; i2++) {
|
|
1617
|
-
if (ar2 || !(i2 in from2)) {
|
|
1618
|
-
if (!ar2) ar2 = Array.prototype.slice.call(from2, 0, i2);
|
|
1619
|
-
ar2[i2] = from2[i2];
|
|
1620
|
-
}
|
|
1621
|
-
}
|
|
1622
|
-
return to2.concat(ar2 || Array.prototype.slice.call(from2));
|
|
1623
|
-
};
|
|
1624
|
-
var ErrImpl = (
|
|
1625
|
-
/** @class */
|
|
1626
|
-
(function() {
|
|
1627
|
-
function ErrImpl2(val) {
|
|
1628
|
-
if (!(this instanceof ErrImpl2)) {
|
|
1629
|
-
return new ErrImpl2(val);
|
|
2577
|
+
return `${from2} ${to2}`.trim();
|
|
2578
|
+
};
|
|
2579
|
+
var testSet = (set3, version2, options) => {
|
|
2580
|
+
for (let i2 = 0; i2 < set3.length; i2++) {
|
|
2581
|
+
if (!set3[i2].test(version2)) {
|
|
2582
|
+
return false;
|
|
2583
|
+
}
|
|
1630
2584
|
}
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
2585
|
+
if (version2.prerelease.length && !options.includePrerelease) {
|
|
2586
|
+
for (let i2 = 0; i2 < set3.length; i2++) {
|
|
2587
|
+
debug(set3[i2].semver);
|
|
2588
|
+
if (set3[i2].semver === Comparator.ANY) {
|
|
2589
|
+
continue;
|
|
2590
|
+
}
|
|
2591
|
+
if (set3[i2].semver.prerelease.length > 0) {
|
|
2592
|
+
const allowed = set3[i2].semver;
|
|
2593
|
+
if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) {
|
|
2594
|
+
return true;
|
|
2595
|
+
}
|
|
2596
|
+
}
|
|
2597
|
+
}
|
|
2598
|
+
return false;
|
|
1635
2599
|
}
|
|
1636
|
-
this._stack = stackLines.join("\n");
|
|
1637
|
-
}
|
|
1638
|
-
ErrImpl2.prototype.isOk = function() {
|
|
1639
|
-
return false;
|
|
1640
|
-
};
|
|
1641
|
-
ErrImpl2.prototype.isErr = function() {
|
|
1642
2600
|
return true;
|
|
1643
2601
|
};
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
2602
|
+
}
|
|
2603
|
+
});
|
|
2604
|
+
|
|
2605
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js
|
|
2606
|
+
var require_comparator = __commonJS({
|
|
2607
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js"(exports, module) {
|
|
2608
|
+
"use strict";
|
|
2609
|
+
var ANY = /* @__PURE__ */ Symbol("SemVer ANY");
|
|
2610
|
+
var Comparator = class _Comparator {
|
|
2611
|
+
static get ANY() {
|
|
2612
|
+
return ANY;
|
|
2613
|
+
}
|
|
2614
|
+
constructor(comp, options) {
|
|
2615
|
+
options = parseOptions(options);
|
|
2616
|
+
if (comp instanceof _Comparator) {
|
|
2617
|
+
if (comp.loose === !!options.loose) {
|
|
2618
|
+
return comp;
|
|
2619
|
+
} else {
|
|
2620
|
+
comp = comp.value;
|
|
2621
|
+
}
|
|
1648
2622
|
}
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
2623
|
+
comp = comp.trim().split(/\s+/).join(" ");
|
|
2624
|
+
debug("comparator", comp, options);
|
|
2625
|
+
this.options = options;
|
|
2626
|
+
this.loose = !!options.loose;
|
|
2627
|
+
this.parse(comp);
|
|
2628
|
+
if (this.semver === ANY) {
|
|
2629
|
+
this.value = "";
|
|
2630
|
+
} else {
|
|
2631
|
+
this.value = this.operator + this.semver.version;
|
|
2632
|
+
}
|
|
2633
|
+
debug("comp", this);
|
|
2634
|
+
}
|
|
2635
|
+
parse(comp) {
|
|
2636
|
+
const r2 = this.options.loose ? re2[t2.COMPARATORLOOSE] : re2[t2.COMPARATOR];
|
|
2637
|
+
const m2 = comp.match(r2);
|
|
2638
|
+
if (!m2) {
|
|
2639
|
+
throw new TypeError(`Invalid comparator: ${comp}`);
|
|
2640
|
+
}
|
|
2641
|
+
this.operator = m2[1] !== void 0 ? m2[1] : "";
|
|
2642
|
+
if (this.operator === "=") {
|
|
2643
|
+
this.operator = "";
|
|
2644
|
+
}
|
|
2645
|
+
if (!m2[2]) {
|
|
2646
|
+
this.semver = ANY;
|
|
2647
|
+
} else {
|
|
2648
|
+
this.semver = new SemVer(m2[2], this.options.loose);
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2651
|
+
toString() {
|
|
2652
|
+
return this.value;
|
|
2653
|
+
}
|
|
2654
|
+
test(version2) {
|
|
2655
|
+
debug("Comparator.test", version2, this.options.loose);
|
|
2656
|
+
if (this.semver === ANY || version2 === ANY) {
|
|
2657
|
+
return true;
|
|
2658
|
+
}
|
|
2659
|
+
if (typeof version2 === "string") {
|
|
2660
|
+
try {
|
|
2661
|
+
version2 = new SemVer(version2, this.options);
|
|
2662
|
+
} catch (er2) {
|
|
2663
|
+
return false;
|
|
2664
|
+
}
|
|
2665
|
+
}
|
|
2666
|
+
return cmp(version2, this.operator, this.semver, this.options);
|
|
2667
|
+
}
|
|
2668
|
+
intersects(comp, options) {
|
|
2669
|
+
if (!(comp instanceof _Comparator)) {
|
|
2670
|
+
throw new TypeError("a Comparator is required");
|
|
2671
|
+
}
|
|
2672
|
+
if (this.operator === "") {
|
|
2673
|
+
if (this.value === "") {
|
|
2674
|
+
return true;
|
|
2675
|
+
}
|
|
2676
|
+
return new Range(comp.value, options).test(this.value);
|
|
2677
|
+
} else if (comp.operator === "") {
|
|
2678
|
+
if (comp.value === "") {
|
|
2679
|
+
return true;
|
|
2680
|
+
}
|
|
2681
|
+
return new Range(this.value, options).test(comp.semver);
|
|
2682
|
+
}
|
|
2683
|
+
options = parseOptions(options);
|
|
2684
|
+
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
|
|
2685
|
+
return false;
|
|
2686
|
+
}
|
|
2687
|
+
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
|
|
2688
|
+
return false;
|
|
2689
|
+
}
|
|
2690
|
+
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
|
|
2691
|
+
return true;
|
|
2692
|
+
}
|
|
2693
|
+
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
|
|
2694
|
+
return true;
|
|
2695
|
+
}
|
|
2696
|
+
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
|
|
2697
|
+
return true;
|
|
2698
|
+
}
|
|
2699
|
+
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
|
|
2700
|
+
return true;
|
|
2701
|
+
}
|
|
2702
|
+
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
|
|
2703
|
+
return true;
|
|
2704
|
+
}
|
|
2705
|
+
return false;
|
|
2706
|
+
}
|
|
1677
2707
|
};
|
|
1678
|
-
|
|
1679
|
-
|
|
2708
|
+
module.exports = Comparator;
|
|
2709
|
+
var parseOptions = require_parse_options();
|
|
2710
|
+
var { safeRe: re2, t: t2 } = require_re();
|
|
2711
|
+
var cmp = require_cmp();
|
|
2712
|
+
var debug = require_debug();
|
|
2713
|
+
var SemVer = require_semver();
|
|
2714
|
+
var Range = require_range();
|
|
2715
|
+
}
|
|
2716
|
+
});
|
|
2717
|
+
|
|
2718
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js
|
|
2719
|
+
var require_satisfies = __commonJS({
|
|
2720
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js"(exports, module) {
|
|
2721
|
+
"use strict";
|
|
2722
|
+
var Range = require_range();
|
|
2723
|
+
var satisfies = (version2, range, options) => {
|
|
2724
|
+
try {
|
|
2725
|
+
range = new Range(range, options);
|
|
2726
|
+
} catch (er2) {
|
|
2727
|
+
return false;
|
|
2728
|
+
}
|
|
2729
|
+
return range.test(version2);
|
|
1680
2730
|
};
|
|
1681
|
-
|
|
1682
|
-
|
|
2731
|
+
module.exports = satisfies;
|
|
2732
|
+
}
|
|
2733
|
+
});
|
|
2734
|
+
|
|
2735
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js
|
|
2736
|
+
var require_to_comparators = __commonJS({
|
|
2737
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js"(exports, module) {
|
|
2738
|
+
"use strict";
|
|
2739
|
+
var Range = require_range();
|
|
2740
|
+
var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c2) => c2.value).join(" ").trim().split(" "));
|
|
2741
|
+
module.exports = toComparators;
|
|
2742
|
+
}
|
|
2743
|
+
});
|
|
2744
|
+
|
|
2745
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js
|
|
2746
|
+
var require_max_satisfying = __commonJS({
|
|
2747
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js"(exports, module) {
|
|
2748
|
+
"use strict";
|
|
2749
|
+
var SemVer = require_semver();
|
|
2750
|
+
var Range = require_range();
|
|
2751
|
+
var maxSatisfying = (versions, range, options) => {
|
|
2752
|
+
let max = null;
|
|
2753
|
+
let maxSV = null;
|
|
2754
|
+
let rangeObj = null;
|
|
2755
|
+
try {
|
|
2756
|
+
rangeObj = new Range(range, options);
|
|
2757
|
+
} catch (er2) {
|
|
2758
|
+
return null;
|
|
2759
|
+
}
|
|
2760
|
+
versions.forEach((v2) => {
|
|
2761
|
+
if (rangeObj.test(v2)) {
|
|
2762
|
+
if (!max || maxSV.compare(v2) === -1) {
|
|
2763
|
+
max = v2;
|
|
2764
|
+
maxSV = new SemVer(max, options);
|
|
2765
|
+
}
|
|
2766
|
+
}
|
|
2767
|
+
});
|
|
2768
|
+
return max;
|
|
1683
2769
|
};
|
|
1684
|
-
|
|
1685
|
-
|
|
2770
|
+
module.exports = maxSatisfying;
|
|
2771
|
+
}
|
|
2772
|
+
});
|
|
2773
|
+
|
|
2774
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js
|
|
2775
|
+
var require_min_satisfying = __commonJS({
|
|
2776
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js"(exports, module) {
|
|
2777
|
+
"use strict";
|
|
2778
|
+
var SemVer = require_semver();
|
|
2779
|
+
var Range = require_range();
|
|
2780
|
+
var minSatisfying = (versions, range, options) => {
|
|
2781
|
+
let min = null;
|
|
2782
|
+
let minSV = null;
|
|
2783
|
+
let rangeObj = null;
|
|
2784
|
+
try {
|
|
2785
|
+
rangeObj = new Range(range, options);
|
|
2786
|
+
} catch (er2) {
|
|
2787
|
+
return null;
|
|
2788
|
+
}
|
|
2789
|
+
versions.forEach((v2) => {
|
|
2790
|
+
if (rangeObj.test(v2)) {
|
|
2791
|
+
if (!min || minSV.compare(v2) === 1) {
|
|
2792
|
+
min = v2;
|
|
2793
|
+
minSV = new SemVer(min, options);
|
|
2794
|
+
}
|
|
2795
|
+
}
|
|
2796
|
+
});
|
|
2797
|
+
return min;
|
|
1686
2798
|
};
|
|
1687
|
-
|
|
1688
|
-
|
|
2799
|
+
module.exports = minSatisfying;
|
|
2800
|
+
}
|
|
2801
|
+
});
|
|
2802
|
+
|
|
2803
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js
|
|
2804
|
+
var require_min_version = __commonJS({
|
|
2805
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js"(exports, module) {
|
|
2806
|
+
"use strict";
|
|
2807
|
+
var SemVer = require_semver();
|
|
2808
|
+
var Range = require_range();
|
|
2809
|
+
var gt2 = require_gt();
|
|
2810
|
+
var minVersion = (range, loose) => {
|
|
2811
|
+
range = new Range(range, loose);
|
|
2812
|
+
let minver = new SemVer("0.0.0");
|
|
2813
|
+
if (range.test(minver)) {
|
|
2814
|
+
return minver;
|
|
2815
|
+
}
|
|
2816
|
+
minver = new SemVer("0.0.0-0");
|
|
2817
|
+
if (range.test(minver)) {
|
|
2818
|
+
return minver;
|
|
2819
|
+
}
|
|
2820
|
+
minver = null;
|
|
2821
|
+
for (let i2 = 0; i2 < range.set.length; ++i2) {
|
|
2822
|
+
const comparators = range.set[i2];
|
|
2823
|
+
let setMin = null;
|
|
2824
|
+
comparators.forEach((comparator) => {
|
|
2825
|
+
const compver = new SemVer(comparator.semver.version);
|
|
2826
|
+
switch (comparator.operator) {
|
|
2827
|
+
case ">":
|
|
2828
|
+
if (compver.prerelease.length === 0) {
|
|
2829
|
+
compver.patch++;
|
|
2830
|
+
} else {
|
|
2831
|
+
compver.prerelease.push(0);
|
|
2832
|
+
}
|
|
2833
|
+
compver.raw = compver.format();
|
|
2834
|
+
/* fallthrough */
|
|
2835
|
+
case "":
|
|
2836
|
+
case ">=":
|
|
2837
|
+
if (!setMin || gt2(compver, setMin)) {
|
|
2838
|
+
setMin = compver;
|
|
2839
|
+
}
|
|
2840
|
+
break;
|
|
2841
|
+
case "<":
|
|
2842
|
+
case "<=":
|
|
2843
|
+
break;
|
|
2844
|
+
/* istanbul ignore next */
|
|
2845
|
+
default:
|
|
2846
|
+
throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
2847
|
+
}
|
|
2848
|
+
});
|
|
2849
|
+
if (setMin && (!minver || gt2(minver, setMin))) {
|
|
2850
|
+
minver = setMin;
|
|
2851
|
+
}
|
|
2852
|
+
}
|
|
2853
|
+
if (minver && range.test(minver)) {
|
|
2854
|
+
return minver;
|
|
2855
|
+
}
|
|
2856
|
+
return null;
|
|
1689
2857
|
};
|
|
1690
|
-
|
|
1691
|
-
|
|
2858
|
+
module.exports = minVersion;
|
|
2859
|
+
}
|
|
2860
|
+
});
|
|
2861
|
+
|
|
2862
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js
|
|
2863
|
+
var require_valid2 = __commonJS({
|
|
2864
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js"(exports, module) {
|
|
2865
|
+
"use strict";
|
|
2866
|
+
var Range = require_range();
|
|
2867
|
+
var validRange = (range, options) => {
|
|
2868
|
+
try {
|
|
2869
|
+
return new Range(range, options).range || "*";
|
|
2870
|
+
} catch (er2) {
|
|
2871
|
+
return null;
|
|
2872
|
+
}
|
|
1692
2873
|
};
|
|
1693
|
-
|
|
1694
|
-
|
|
2874
|
+
module.exports = validRange;
|
|
2875
|
+
}
|
|
2876
|
+
});
|
|
2877
|
+
|
|
2878
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js
|
|
2879
|
+
var require_outside = __commonJS({
|
|
2880
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js"(exports, module) {
|
|
2881
|
+
"use strict";
|
|
2882
|
+
var SemVer = require_semver();
|
|
2883
|
+
var Comparator = require_comparator();
|
|
2884
|
+
var { ANY } = Comparator;
|
|
2885
|
+
var Range = require_range();
|
|
2886
|
+
var satisfies = require_satisfies();
|
|
2887
|
+
var gt2 = require_gt();
|
|
2888
|
+
var lt2 = require_lt();
|
|
2889
|
+
var lte = require_lte();
|
|
2890
|
+
var gte = require_gte();
|
|
2891
|
+
var outside = (version2, range, hilo, options) => {
|
|
2892
|
+
version2 = new SemVer(version2, options);
|
|
2893
|
+
range = new Range(range, options);
|
|
2894
|
+
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
2895
|
+
switch (hilo) {
|
|
2896
|
+
case ">":
|
|
2897
|
+
gtfn = gt2;
|
|
2898
|
+
ltefn = lte;
|
|
2899
|
+
ltfn = lt2;
|
|
2900
|
+
comp = ">";
|
|
2901
|
+
ecomp = ">=";
|
|
2902
|
+
break;
|
|
2903
|
+
case "<":
|
|
2904
|
+
gtfn = lt2;
|
|
2905
|
+
ltefn = gte;
|
|
2906
|
+
ltfn = gt2;
|
|
2907
|
+
comp = "<";
|
|
2908
|
+
ecomp = "<=";
|
|
2909
|
+
break;
|
|
2910
|
+
default:
|
|
2911
|
+
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
2912
|
+
}
|
|
2913
|
+
if (satisfies(version2, range, options)) {
|
|
2914
|
+
return false;
|
|
2915
|
+
}
|
|
2916
|
+
for (let i2 = 0; i2 < range.set.length; ++i2) {
|
|
2917
|
+
const comparators = range.set[i2];
|
|
2918
|
+
let high = null;
|
|
2919
|
+
let low = null;
|
|
2920
|
+
comparators.forEach((comparator) => {
|
|
2921
|
+
if (comparator.semver === ANY) {
|
|
2922
|
+
comparator = new Comparator(">=0.0.0");
|
|
2923
|
+
}
|
|
2924
|
+
high = high || comparator;
|
|
2925
|
+
low = low || comparator;
|
|
2926
|
+
if (gtfn(comparator.semver, high.semver, options)) {
|
|
2927
|
+
high = comparator;
|
|
2928
|
+
} else if (ltfn(comparator.semver, low.semver, options)) {
|
|
2929
|
+
low = comparator;
|
|
2930
|
+
}
|
|
2931
|
+
});
|
|
2932
|
+
if (high.operator === comp || high.operator === ecomp) {
|
|
2933
|
+
return false;
|
|
2934
|
+
}
|
|
2935
|
+
if ((!low.operator || low.operator === comp) && ltefn(version2, low.semver)) {
|
|
2936
|
+
return false;
|
|
2937
|
+
} else if (low.operator === ecomp && ltfn(version2, low.semver)) {
|
|
2938
|
+
return false;
|
|
2939
|
+
}
|
|
2940
|
+
}
|
|
2941
|
+
return true;
|
|
1695
2942
|
};
|
|
1696
|
-
|
|
1697
|
-
|
|
2943
|
+
module.exports = outside;
|
|
2944
|
+
}
|
|
2945
|
+
});
|
|
2946
|
+
|
|
2947
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js
|
|
2948
|
+
var require_gtr = __commonJS({
|
|
2949
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js"(exports, module) {
|
|
2950
|
+
"use strict";
|
|
2951
|
+
var outside = require_outside();
|
|
2952
|
+
var gtr = (version2, range, options) => outside(version2, range, ">", options);
|
|
2953
|
+
module.exports = gtr;
|
|
2954
|
+
}
|
|
2955
|
+
});
|
|
2956
|
+
|
|
2957
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js
|
|
2958
|
+
var require_ltr = __commonJS({
|
|
2959
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js"(exports, module) {
|
|
2960
|
+
"use strict";
|
|
2961
|
+
var outside = require_outside();
|
|
2962
|
+
var ltr = (version2, range, options) => outside(version2, range, "<", options);
|
|
2963
|
+
module.exports = ltr;
|
|
2964
|
+
}
|
|
2965
|
+
});
|
|
2966
|
+
|
|
2967
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js
|
|
2968
|
+
var require_intersects = __commonJS({
|
|
2969
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js"(exports, module) {
|
|
2970
|
+
"use strict";
|
|
2971
|
+
var Range = require_range();
|
|
2972
|
+
var intersects = (r1, r2, options) => {
|
|
2973
|
+
r1 = new Range(r1, options);
|
|
2974
|
+
r2 = new Range(r2, options);
|
|
2975
|
+
return r1.intersects(r2, options);
|
|
1698
2976
|
};
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
2977
|
+
module.exports = intersects;
|
|
2978
|
+
}
|
|
2979
|
+
});
|
|
2980
|
+
|
|
2981
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js
|
|
2982
|
+
var require_simplify = __commonJS({
|
|
2983
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js"(exports, module) {
|
|
2984
|
+
"use strict";
|
|
2985
|
+
var satisfies = require_satisfies();
|
|
2986
|
+
var compare = require_compare();
|
|
2987
|
+
module.exports = (versions, range, options) => {
|
|
2988
|
+
const set3 = [];
|
|
2989
|
+
let first = null;
|
|
2990
|
+
let prev = null;
|
|
2991
|
+
const v2 = versions.sort((a2, b2) => compare(a2, b2, options));
|
|
2992
|
+
for (const version2 of v2) {
|
|
2993
|
+
const included = satisfies(version2, range, options);
|
|
2994
|
+
if (included) {
|
|
2995
|
+
prev = version2;
|
|
2996
|
+
if (!first) {
|
|
2997
|
+
first = version2;
|
|
2998
|
+
}
|
|
2999
|
+
} else {
|
|
3000
|
+
if (prev) {
|
|
3001
|
+
set3.push([first, prev]);
|
|
3002
|
+
}
|
|
3003
|
+
prev = null;
|
|
3004
|
+
first = null;
|
|
3005
|
+
}
|
|
3006
|
+
}
|
|
3007
|
+
if (first) {
|
|
3008
|
+
set3.push([first, null]);
|
|
3009
|
+
}
|
|
3010
|
+
const ranges = [];
|
|
3011
|
+
for (const [min, max] of set3) {
|
|
3012
|
+
if (min === max) {
|
|
3013
|
+
ranges.push(min);
|
|
3014
|
+
} else if (!max && min === v2[0]) {
|
|
3015
|
+
ranges.push("*");
|
|
3016
|
+
} else if (!max) {
|
|
3017
|
+
ranges.push(`>=${min}`);
|
|
3018
|
+
} else if (min === v2[0]) {
|
|
3019
|
+
ranges.push(`<=${max}`);
|
|
3020
|
+
} else {
|
|
3021
|
+
ranges.push(`${min} - ${max}`);
|
|
3022
|
+
}
|
|
3023
|
+
}
|
|
3024
|
+
const simplified = ranges.join(" || ");
|
|
3025
|
+
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
3026
|
+
return simplified.length < original.length ? simplified : range;
|
|
1708
3027
|
};
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
var
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
3028
|
+
}
|
|
3029
|
+
});
|
|
3030
|
+
|
|
3031
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js
|
|
3032
|
+
var require_subset = __commonJS({
|
|
3033
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js"(exports, module) {
|
|
3034
|
+
"use strict";
|
|
3035
|
+
var Range = require_range();
|
|
3036
|
+
var Comparator = require_comparator();
|
|
3037
|
+
var { ANY } = Comparator;
|
|
3038
|
+
var satisfies = require_satisfies();
|
|
3039
|
+
var compare = require_compare();
|
|
3040
|
+
var subset = (sub, dom, options = {}) => {
|
|
3041
|
+
if (sub === dom) {
|
|
3042
|
+
return true;
|
|
3043
|
+
}
|
|
3044
|
+
sub = new Range(sub, options);
|
|
3045
|
+
dom = new Range(dom, options);
|
|
3046
|
+
let sawNonNull = false;
|
|
3047
|
+
OUTER: for (const simpleSub of sub.set) {
|
|
3048
|
+
for (const simpleDom of dom.set) {
|
|
3049
|
+
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
3050
|
+
sawNonNull = sawNonNull || isSub !== null;
|
|
3051
|
+
if (isSub) {
|
|
3052
|
+
continue OUTER;
|
|
3053
|
+
}
|
|
3054
|
+
}
|
|
3055
|
+
if (sawNonNull) {
|
|
3056
|
+
return false;
|
|
3057
|
+
}
|
|
1720
3058
|
}
|
|
1721
|
-
this.value = val;
|
|
1722
|
-
}
|
|
1723
|
-
OkImpl2.prototype.isOk = function() {
|
|
1724
3059
|
return true;
|
|
1725
3060
|
};
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
3061
|
+
var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
|
|
3062
|
+
var minimumVersion = [new Comparator(">=0.0.0")];
|
|
3063
|
+
var simpleSubset = (sub, dom, options) => {
|
|
3064
|
+
if (sub === dom) {
|
|
3065
|
+
return true;
|
|
3066
|
+
}
|
|
3067
|
+
if (sub.length === 1 && sub[0].semver === ANY) {
|
|
3068
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
3069
|
+
return true;
|
|
3070
|
+
} else if (options.includePrerelease) {
|
|
3071
|
+
sub = minimumVersionWithPreRelease;
|
|
3072
|
+
} else {
|
|
3073
|
+
sub = minimumVersion;
|
|
3074
|
+
}
|
|
3075
|
+
}
|
|
3076
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
3077
|
+
if (options.includePrerelease) {
|
|
3078
|
+
return true;
|
|
3079
|
+
} else {
|
|
3080
|
+
dom = minimumVersion;
|
|
3081
|
+
}
|
|
3082
|
+
}
|
|
3083
|
+
const eqSet = /* @__PURE__ */ new Set();
|
|
3084
|
+
let gt2, lt2;
|
|
3085
|
+
for (const c2 of sub) {
|
|
3086
|
+
if (c2.operator === ">" || c2.operator === ">=") {
|
|
3087
|
+
gt2 = higherGT(gt2, c2, options);
|
|
3088
|
+
} else if (c2.operator === "<" || c2.operator === "<=") {
|
|
3089
|
+
lt2 = lowerLT(lt2, c2, options);
|
|
3090
|
+
} else {
|
|
3091
|
+
eqSet.add(c2.semver);
|
|
3092
|
+
}
|
|
3093
|
+
}
|
|
3094
|
+
if (eqSet.size > 1) {
|
|
3095
|
+
return null;
|
|
3096
|
+
}
|
|
3097
|
+
let gtltComp;
|
|
3098
|
+
if (gt2 && lt2) {
|
|
3099
|
+
gtltComp = compare(gt2.semver, lt2.semver, options);
|
|
3100
|
+
if (gtltComp > 0) {
|
|
3101
|
+
return null;
|
|
3102
|
+
} else if (gtltComp === 0 && (gt2.operator !== ">=" || lt2.operator !== "<=")) {
|
|
3103
|
+
return null;
|
|
3104
|
+
}
|
|
3105
|
+
}
|
|
3106
|
+
for (const eq of eqSet) {
|
|
3107
|
+
if (gt2 && !satisfies(eq, String(gt2), options)) {
|
|
3108
|
+
return null;
|
|
3109
|
+
}
|
|
3110
|
+
if (lt2 && !satisfies(eq, String(lt2), options)) {
|
|
3111
|
+
return null;
|
|
3112
|
+
}
|
|
3113
|
+
for (const c2 of dom) {
|
|
3114
|
+
if (!satisfies(eq, String(c2), options)) {
|
|
3115
|
+
return false;
|
|
3116
|
+
}
|
|
3117
|
+
}
|
|
3118
|
+
return true;
|
|
3119
|
+
}
|
|
3120
|
+
let higher, lower;
|
|
3121
|
+
let hasDomLT, hasDomGT;
|
|
3122
|
+
let needDomLTPre = lt2 && !options.includePrerelease && lt2.semver.prerelease.length ? lt2.semver : false;
|
|
3123
|
+
let needDomGTPre = gt2 && !options.includePrerelease && gt2.semver.prerelease.length ? gt2.semver : false;
|
|
3124
|
+
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt2.operator === "<" && needDomLTPre.prerelease[0] === 0) {
|
|
3125
|
+
needDomLTPre = false;
|
|
3126
|
+
}
|
|
3127
|
+
for (const c2 of dom) {
|
|
3128
|
+
hasDomGT = hasDomGT || c2.operator === ">" || c2.operator === ">=";
|
|
3129
|
+
hasDomLT = hasDomLT || c2.operator === "<" || c2.operator === "<=";
|
|
3130
|
+
if (gt2) {
|
|
3131
|
+
if (needDomGTPre) {
|
|
3132
|
+
if (c2.semver.prerelease && c2.semver.prerelease.length && c2.semver.major === needDomGTPre.major && c2.semver.minor === needDomGTPre.minor && c2.semver.patch === needDomGTPre.patch) {
|
|
3133
|
+
needDomGTPre = false;
|
|
3134
|
+
}
|
|
3135
|
+
}
|
|
3136
|
+
if (c2.operator === ">" || c2.operator === ">=") {
|
|
3137
|
+
higher = higherGT(gt2, c2, options);
|
|
3138
|
+
if (higher === c2 && higher !== gt2) {
|
|
3139
|
+
return false;
|
|
3140
|
+
}
|
|
3141
|
+
} else if (gt2.operator === ">=" && !satisfies(gt2.semver, String(c2), options)) {
|
|
3142
|
+
return false;
|
|
3143
|
+
}
|
|
3144
|
+
}
|
|
3145
|
+
if (lt2) {
|
|
3146
|
+
if (needDomLTPre) {
|
|
3147
|
+
if (c2.semver.prerelease && c2.semver.prerelease.length && c2.semver.major === needDomLTPre.major && c2.semver.minor === needDomLTPre.minor && c2.semver.patch === needDomLTPre.patch) {
|
|
3148
|
+
needDomLTPre = false;
|
|
3149
|
+
}
|
|
3150
|
+
}
|
|
3151
|
+
if (c2.operator === "<" || c2.operator === "<=") {
|
|
3152
|
+
lower = lowerLT(lt2, c2, options);
|
|
3153
|
+
if (lower === c2 && lower !== lt2) {
|
|
3154
|
+
return false;
|
|
3155
|
+
}
|
|
3156
|
+
} else if (lt2.operator === "<=" && !satisfies(lt2.semver, String(c2), options)) {
|
|
3157
|
+
return false;
|
|
3158
|
+
}
|
|
3159
|
+
}
|
|
3160
|
+
if (!c2.operator && (lt2 || gt2) && gtltComp !== 0) {
|
|
3161
|
+
return false;
|
|
3162
|
+
}
|
|
3163
|
+
}
|
|
3164
|
+
if (gt2 && hasDomLT && !lt2 && gtltComp !== 0) {
|
|
3165
|
+
return false;
|
|
3166
|
+
}
|
|
3167
|
+
if (lt2 && hasDomGT && !gt2 && gtltComp !== 0) {
|
|
3168
|
+
return false;
|
|
3169
|
+
}
|
|
3170
|
+
if (needDomGTPre || needDomLTPre) {
|
|
3171
|
+
return false;
|
|
3172
|
+
}
|
|
3173
|
+
return true;
|
|
1734
3174
|
};
|
|
1735
|
-
|
|
1736
|
-
|
|
3175
|
+
var higherGT = (a2, b2, options) => {
|
|
3176
|
+
if (!a2) {
|
|
3177
|
+
return b2;
|
|
3178
|
+
}
|
|
3179
|
+
const comp = compare(a2.semver, b2.semver, options);
|
|
3180
|
+
return comp > 0 ? a2 : comp < 0 ? b2 : b2.operator === ">" && a2.operator === ">=" ? b2 : a2;
|
|
1737
3181
|
};
|
|
1738
|
-
|
|
1739
|
-
|
|
3182
|
+
var lowerLT = (a2, b2, options) => {
|
|
3183
|
+
if (!a2) {
|
|
3184
|
+
return b2;
|
|
3185
|
+
}
|
|
3186
|
+
const comp = compare(a2.semver, b2.semver, options);
|
|
3187
|
+
return comp < 0 ? a2 : comp > 0 ? b2 : b2.operator === "<" && a2.operator === "<=" ? b2 : a2;
|
|
1740
3188
|
};
|
|
1741
|
-
|
|
1742
|
-
|
|
3189
|
+
module.exports = subset;
|
|
3190
|
+
}
|
|
3191
|
+
});
|
|
3192
|
+
|
|
3193
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js
|
|
3194
|
+
var require_semver2 = __commonJS({
|
|
3195
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js"(exports, module) {
|
|
3196
|
+
"use strict";
|
|
3197
|
+
var internalRe = require_re();
|
|
3198
|
+
var constants = require_constants();
|
|
3199
|
+
var SemVer = require_semver();
|
|
3200
|
+
var identifiers = require_identifiers();
|
|
3201
|
+
var parse2 = require_parse();
|
|
3202
|
+
var valid = require_valid();
|
|
3203
|
+
var clean = require_clean();
|
|
3204
|
+
var inc = require_inc();
|
|
3205
|
+
var diff = require_diff();
|
|
3206
|
+
var major = require_major();
|
|
3207
|
+
var minor = require_minor();
|
|
3208
|
+
var patch = require_patch();
|
|
3209
|
+
var prerelease = require_prerelease();
|
|
3210
|
+
var compare = require_compare();
|
|
3211
|
+
var rcompare = require_rcompare();
|
|
3212
|
+
var compareLoose = require_compare_loose();
|
|
3213
|
+
var compareBuild = require_compare_build();
|
|
3214
|
+
var sort = require_sort();
|
|
3215
|
+
var rsort = require_rsort();
|
|
3216
|
+
var gt2 = require_gt();
|
|
3217
|
+
var lt2 = require_lt();
|
|
3218
|
+
var eq = require_eq();
|
|
3219
|
+
var neq = require_neq();
|
|
3220
|
+
var gte = require_gte();
|
|
3221
|
+
var lte = require_lte();
|
|
3222
|
+
var cmp = require_cmp();
|
|
3223
|
+
var coerce = require_coerce();
|
|
3224
|
+
var Comparator = require_comparator();
|
|
3225
|
+
var Range = require_range();
|
|
3226
|
+
var satisfies = require_satisfies();
|
|
3227
|
+
var toComparators = require_to_comparators();
|
|
3228
|
+
var maxSatisfying = require_max_satisfying();
|
|
3229
|
+
var minSatisfying = require_min_satisfying();
|
|
3230
|
+
var minVersion = require_min_version();
|
|
3231
|
+
var validRange = require_valid2();
|
|
3232
|
+
var outside = require_outside();
|
|
3233
|
+
var gtr = require_gtr();
|
|
3234
|
+
var ltr = require_ltr();
|
|
3235
|
+
var intersects = require_intersects();
|
|
3236
|
+
var simplifyRange = require_simplify();
|
|
3237
|
+
var subset = require_subset();
|
|
3238
|
+
module.exports = {
|
|
3239
|
+
parse: parse2,
|
|
3240
|
+
valid,
|
|
3241
|
+
clean,
|
|
3242
|
+
inc,
|
|
3243
|
+
diff,
|
|
3244
|
+
major,
|
|
3245
|
+
minor,
|
|
3246
|
+
patch,
|
|
3247
|
+
prerelease,
|
|
3248
|
+
compare,
|
|
3249
|
+
rcompare,
|
|
3250
|
+
compareLoose,
|
|
3251
|
+
compareBuild,
|
|
3252
|
+
sort,
|
|
3253
|
+
rsort,
|
|
3254
|
+
gt: gt2,
|
|
3255
|
+
lt: lt2,
|
|
3256
|
+
eq,
|
|
3257
|
+
neq,
|
|
3258
|
+
gte,
|
|
3259
|
+
lte,
|
|
3260
|
+
cmp,
|
|
3261
|
+
coerce,
|
|
3262
|
+
Comparator,
|
|
3263
|
+
Range,
|
|
3264
|
+
satisfies,
|
|
3265
|
+
toComparators,
|
|
3266
|
+
maxSatisfying,
|
|
3267
|
+
minSatisfying,
|
|
3268
|
+
minVersion,
|
|
3269
|
+
validRange,
|
|
3270
|
+
outside,
|
|
3271
|
+
gtr,
|
|
3272
|
+
ltr,
|
|
3273
|
+
intersects,
|
|
3274
|
+
simplifyRange,
|
|
3275
|
+
subset,
|
|
3276
|
+
SemVer,
|
|
3277
|
+
re: internalRe.re,
|
|
3278
|
+
src: internalRe.src,
|
|
3279
|
+
tokens: internalRe.t,
|
|
3280
|
+
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
|
|
3281
|
+
RELEASE_TYPES: constants.RELEASE_TYPES,
|
|
3282
|
+
compareIdentifiers: identifiers.compareIdentifiers,
|
|
3283
|
+
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
1743
3284
|
};
|
|
1744
|
-
|
|
1745
|
-
|
|
3285
|
+
}
|
|
3286
|
+
});
|
|
3287
|
+
|
|
3288
|
+
// dist/cloud/index.js
|
|
3289
|
+
var index_exports = {};
|
|
3290
|
+
__export(index_exports, {
|
|
3291
|
+
AgentChatExchange: () => AgentChatExchange,
|
|
3292
|
+
AgentChatPartialResponse: () => AgentChatPartialResponse,
|
|
3293
|
+
AgentChatResponse: () => AgentChatResponse,
|
|
3294
|
+
AgentEndTurn: () => AgentEndTurn,
|
|
3295
|
+
AgentErrorResponseContent: () => AgentErrorResponseContent,
|
|
3296
|
+
AgentModelResponseContent: () => AgentModelResponseContent,
|
|
3297
|
+
AgentToolCall: () => AgentToolCall,
|
|
3298
|
+
AgentToolCallGroup: () => AgentToolCallGroup,
|
|
3299
|
+
AgentToolRequestResponseContent: () => AgentToolRequestResponseContent,
|
|
3300
|
+
AgentToolResultResponseContent: () => AgentToolResultResponseContent,
|
|
3301
|
+
ChatSession: () => ChatSession,
|
|
3302
|
+
ConflictResolutionStrategy: () => ConflictResolutionStrategy,
|
|
3303
|
+
Dremio: () => Dremio,
|
|
3304
|
+
DremioModelProvider: () => DremioModelProvider,
|
|
3305
|
+
EngineRejectRule: () => EngineRejectRule,
|
|
3306
|
+
EngineRouteRule: () => EngineRouteRule,
|
|
3307
|
+
FileUpload: () => FileUpload,
|
|
3308
|
+
FolderSearchResult: () => FolderSearchResult,
|
|
3309
|
+
FunctionSearchResult: () => FunctionSearchResult,
|
|
3310
|
+
Grant: () => Grant,
|
|
3311
|
+
HttpError: () => HttpError,
|
|
3312
|
+
JobSearchResult: () => JobSearchResult,
|
|
3313
|
+
ModelProvider: () => ModelProvider,
|
|
3314
|
+
Organization: () => Organization,
|
|
3315
|
+
Problem: () => Problem,
|
|
3316
|
+
Query: () => Query,
|
|
3317
|
+
ReflectionSearchResult: () => ReflectionSearchResult,
|
|
3318
|
+
ScriptSearchResult: () => ScriptSearchResult,
|
|
3319
|
+
SourceSearchResult: () => SourceSearchResult,
|
|
3320
|
+
SpaceSearchResult: () => SpaceSearchResult,
|
|
3321
|
+
TableSearchResult: () => TableSearchResult,
|
|
3322
|
+
User: () => User2,
|
|
3323
|
+
UserChatMessage: () => UserChatMessage,
|
|
3324
|
+
ValidationProblem: () => ValidationProblem,
|
|
3325
|
+
ViewSearchResult: () => ViewSearchResult,
|
|
3326
|
+
_replaceOriginResource: () => _replaceOriginResource,
|
|
3327
|
+
createAuthorizationCodeUrl: () => createAuthorizationCodeUrl,
|
|
3328
|
+
createConversationPromptSchema: () => createConversationPromptSchema,
|
|
3329
|
+
fromAccessToken: () => fromAccessToken,
|
|
3330
|
+
fromPat: () => fromPat,
|
|
3331
|
+
fromRefreshToken: () => fromRefreshToken,
|
|
3332
|
+
fromTextEventStream: () => fromTextEventStream,
|
|
3333
|
+
fromUsernamePassword: () => fromUsernamePassword,
|
|
3334
|
+
isToolRequest: () => isToolRequest,
|
|
3335
|
+
isToolResult: () => isToolResult
|
|
3336
|
+
});
|
|
3337
|
+
|
|
3338
|
+
// dist/cloud/Dremio.js
|
|
3339
|
+
var import_moize2 = __toESM(require_moize(), 1);
|
|
3340
|
+
|
|
3341
|
+
// node_modules/.pnpm/ts-results-es@6.0.0/node_modules/ts-results-es/dist/esm/utils.js
|
|
3342
|
+
function toString(val) {
|
|
3343
|
+
var value = String(val);
|
|
3344
|
+
if (value === "[object Object]") {
|
|
3345
|
+
try {
|
|
3346
|
+
value = JSON.stringify(val);
|
|
3347
|
+
} catch (_a) {
|
|
3348
|
+
}
|
|
3349
|
+
}
|
|
3350
|
+
return value;
|
|
3351
|
+
}
|
|
3352
|
+
|
|
3353
|
+
// node_modules/.pnpm/ts-results-es@6.0.0/node_modules/ts-results-es/dist/esm/option.js
|
|
3354
|
+
var NoneImpl = (
|
|
3355
|
+
/** @class */
|
|
3356
|
+
(function() {
|
|
3357
|
+
function NoneImpl2() {
|
|
3358
|
+
}
|
|
3359
|
+
NoneImpl2.prototype.isSome = function() {
|
|
3360
|
+
return false;
|
|
1746
3361
|
};
|
|
1747
|
-
|
|
1748
|
-
return
|
|
3362
|
+
NoneImpl2.prototype.isNone = function() {
|
|
3363
|
+
return true;
|
|
1749
3364
|
};
|
|
1750
|
-
|
|
1751
|
-
|
|
3365
|
+
NoneImpl2.prototype[Symbol.iterator] = function() {
|
|
3366
|
+
return {
|
|
3367
|
+
next: function() {
|
|
3368
|
+
return { done: true, value: void 0 };
|
|
3369
|
+
}
|
|
3370
|
+
};
|
|
1752
3371
|
};
|
|
1753
|
-
|
|
1754
|
-
return
|
|
3372
|
+
NoneImpl2.prototype.unwrapOr = function(val) {
|
|
3373
|
+
return val;
|
|
1755
3374
|
};
|
|
1756
|
-
|
|
1757
|
-
return
|
|
3375
|
+
NoneImpl2.prototype.unwrapOrElse = function(f2) {
|
|
3376
|
+
return f2();
|
|
1758
3377
|
};
|
|
1759
|
-
|
|
3378
|
+
NoneImpl2.prototype.expect = function(msg) {
|
|
3379
|
+
throw new Error("".concat(msg));
|
|
3380
|
+
};
|
|
3381
|
+
NoneImpl2.prototype.unwrap = function() {
|
|
3382
|
+
throw new Error("Tried to unwrap None");
|
|
3383
|
+
};
|
|
3384
|
+
NoneImpl2.prototype.map = function(_mapper) {
|
|
1760
3385
|
return this;
|
|
1761
3386
|
};
|
|
1762
|
-
|
|
3387
|
+
NoneImpl2.prototype.mapOr = function(default_, _mapper) {
|
|
3388
|
+
return default_;
|
|
3389
|
+
};
|
|
3390
|
+
NoneImpl2.prototype.mapOrElse = function(default_, _mapper) {
|
|
3391
|
+
return default_();
|
|
3392
|
+
};
|
|
3393
|
+
NoneImpl2.prototype.or = function(other) {
|
|
3394
|
+
return other;
|
|
3395
|
+
};
|
|
3396
|
+
NoneImpl2.prototype.orElse = function(other) {
|
|
3397
|
+
return other();
|
|
3398
|
+
};
|
|
3399
|
+
NoneImpl2.prototype.andThen = function(op) {
|
|
3400
|
+
return this;
|
|
3401
|
+
};
|
|
3402
|
+
NoneImpl2.prototype.toResult = function(error) {
|
|
3403
|
+
return Err(error);
|
|
3404
|
+
};
|
|
3405
|
+
NoneImpl2.prototype.toString = function() {
|
|
3406
|
+
return "None";
|
|
3407
|
+
};
|
|
3408
|
+
NoneImpl2.prototype.toAsyncOption = function() {
|
|
3409
|
+
return new AsyncOption(None);
|
|
3410
|
+
};
|
|
3411
|
+
return NoneImpl2;
|
|
3412
|
+
})()
|
|
3413
|
+
);
|
|
3414
|
+
var None = new NoneImpl();
|
|
3415
|
+
Object.freeze(None);
|
|
3416
|
+
var SomeImpl = (
|
|
3417
|
+
/** @class */
|
|
3418
|
+
(function() {
|
|
3419
|
+
function SomeImpl2(val) {
|
|
3420
|
+
if (!(this instanceof SomeImpl2)) {
|
|
3421
|
+
return new SomeImpl2(val);
|
|
3422
|
+
}
|
|
3423
|
+
this.value = val;
|
|
3424
|
+
}
|
|
3425
|
+
SomeImpl2.prototype.isSome = function() {
|
|
3426
|
+
return true;
|
|
3427
|
+
};
|
|
3428
|
+
SomeImpl2.prototype.isNone = function() {
|
|
3429
|
+
return false;
|
|
3430
|
+
};
|
|
3431
|
+
SomeImpl2.prototype[Symbol.iterator] = function() {
|
|
3432
|
+
return [this.value][Symbol.iterator]();
|
|
3433
|
+
};
|
|
3434
|
+
SomeImpl2.prototype.unwrapOr = function(_val) {
|
|
3435
|
+
return this.value;
|
|
3436
|
+
};
|
|
3437
|
+
SomeImpl2.prototype.unwrapOrElse = function(_f) {
|
|
3438
|
+
return this.value;
|
|
3439
|
+
};
|
|
3440
|
+
SomeImpl2.prototype.expect = function(_msg) {
|
|
3441
|
+
return this.value;
|
|
3442
|
+
};
|
|
3443
|
+
SomeImpl2.prototype.unwrap = function() {
|
|
3444
|
+
return this.value;
|
|
3445
|
+
};
|
|
3446
|
+
SomeImpl2.prototype.map = function(mapper) {
|
|
3447
|
+
return Some(mapper(this.value));
|
|
3448
|
+
};
|
|
3449
|
+
SomeImpl2.prototype.mapOr = function(_default_, mapper) {
|
|
1763
3450
|
return mapper(this.value);
|
|
1764
3451
|
};
|
|
1765
|
-
|
|
3452
|
+
SomeImpl2.prototype.mapOrElse = function(_default_, mapper) {
|
|
1766
3453
|
return mapper(this.value);
|
|
1767
3454
|
};
|
|
1768
|
-
|
|
3455
|
+
SomeImpl2.prototype.or = function(_other) {
|
|
1769
3456
|
return this;
|
|
1770
3457
|
};
|
|
1771
|
-
|
|
3458
|
+
SomeImpl2.prototype.orElse = function(_other) {
|
|
1772
3459
|
return this;
|
|
1773
3460
|
};
|
|
1774
|
-
|
|
1775
|
-
return
|
|
3461
|
+
SomeImpl2.prototype.andThen = function(mapper) {
|
|
3462
|
+
return mapper(this.value);
|
|
1776
3463
|
};
|
|
1777
|
-
|
|
1778
|
-
return this.value;
|
|
3464
|
+
SomeImpl2.prototype.toResult = function(error) {
|
|
3465
|
+
return Ok(this.value);
|
|
1779
3466
|
};
|
|
1780
|
-
|
|
1781
|
-
return
|
|
3467
|
+
SomeImpl2.prototype.toAsyncOption = function() {
|
|
3468
|
+
return new AsyncOption(this);
|
|
1782
3469
|
};
|
|
1783
|
-
|
|
1784
|
-
return
|
|
3470
|
+
SomeImpl2.prototype.safeUnwrap = function() {
|
|
3471
|
+
return this.value;
|
|
1785
3472
|
};
|
|
1786
|
-
|
|
1787
|
-
|
|
3473
|
+
SomeImpl2.prototype.toString = function() {
|
|
3474
|
+
return "Some(".concat(toString(this.value), ")");
|
|
3475
|
+
};
|
|
3476
|
+
SomeImpl2.EMPTY = new SomeImpl2(void 0);
|
|
3477
|
+
return SomeImpl2;
|
|
1788
3478
|
})()
|
|
1789
3479
|
);
|
|
1790
|
-
var
|
|
1791
|
-
var
|
|
1792
|
-
(function(
|
|
1793
|
-
function all(
|
|
1794
|
-
var
|
|
1795
|
-
for (var _i2 = 0
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
3480
|
+
var Some = SomeImpl;
|
|
3481
|
+
var Option;
|
|
3482
|
+
(function(Option2) {
|
|
3483
|
+
function all() {
|
|
3484
|
+
var options = [];
|
|
3485
|
+
for (var _i2 = 0; _i2 < arguments.length; _i2++) {
|
|
3486
|
+
options[_i2] = arguments[_i2];
|
|
3487
|
+
}
|
|
3488
|
+
var someOption = [];
|
|
3489
|
+
for (var _a = 0, options_1 = options; _a < options_1.length; _a++) {
|
|
3490
|
+
var option = options_1[_a];
|
|
3491
|
+
if (option.isSome()) {
|
|
3492
|
+
someOption.push(option.value);
|
|
1799
3493
|
} else {
|
|
1800
|
-
return
|
|
3494
|
+
return option;
|
|
1801
3495
|
}
|
|
1802
3496
|
}
|
|
1803
|
-
return
|
|
3497
|
+
return Some(someOption);
|
|
1804
3498
|
}
|
|
1805
|
-
|
|
1806
|
-
function any(
|
|
1807
|
-
var
|
|
1808
|
-
for (var _i2 = 0
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
3499
|
+
Option2.all = all;
|
|
3500
|
+
function any() {
|
|
3501
|
+
var options = [];
|
|
3502
|
+
for (var _i2 = 0; _i2 < arguments.length; _i2++) {
|
|
3503
|
+
options[_i2] = arguments[_i2];
|
|
3504
|
+
}
|
|
3505
|
+
for (var _a = 0, options_2 = options; _a < options_2.length; _a++) {
|
|
3506
|
+
var option = options_2[_a];
|
|
3507
|
+
if (option.isSome()) {
|
|
3508
|
+
return option;
|
|
1812
3509
|
} else {
|
|
1813
|
-
|
|
3510
|
+
continue;
|
|
1814
3511
|
}
|
|
1815
3512
|
}
|
|
1816
|
-
return
|
|
3513
|
+
return None;
|
|
1817
3514
|
}
|
|
1818
|
-
|
|
1819
|
-
function
|
|
1820
|
-
|
|
1821
|
-
return new Ok(op());
|
|
1822
|
-
} catch (e2) {
|
|
1823
|
-
return new Err(e2);
|
|
1824
|
-
}
|
|
3515
|
+
Option2.any = any;
|
|
3516
|
+
function isOption(value) {
|
|
3517
|
+
return value instanceof Some || value === None;
|
|
1825
3518
|
}
|
|
1826
|
-
|
|
3519
|
+
Option2.isOption = isOption;
|
|
3520
|
+
})(Option || (Option = {}));
|
|
3521
|
+
|
|
3522
|
+
// node_modules/.pnpm/ts-results-es@6.0.0/node_modules/ts-results-es/dist/esm/result.js
|
|
3523
|
+
var __spreadArray = function(to2, from2, pack) {
|
|
3524
|
+
if (pack || arguments.length === 2) for (var i2 = 0, l2 = from2.length, ar2; i2 < l2; i2++) {
|
|
3525
|
+
if (ar2 || !(i2 in from2)) {
|
|
3526
|
+
if (!ar2) ar2 = Array.prototype.slice.call(from2, 0, i2);
|
|
3527
|
+
ar2[i2] = from2[i2];
|
|
3528
|
+
}
|
|
3529
|
+
}
|
|
3530
|
+
return to2.concat(ar2 || Array.prototype.slice.call(from2));
|
|
3531
|
+
};
|
|
3532
|
+
var ErrImpl = (
|
|
3533
|
+
/** @class */
|
|
3534
|
+
(function() {
|
|
3535
|
+
function ErrImpl2(val) {
|
|
3536
|
+
if (!(this instanceof ErrImpl2)) {
|
|
3537
|
+
return new ErrImpl2(val);
|
|
3538
|
+
}
|
|
3539
|
+
this.error = val;
|
|
3540
|
+
var stackLines = new Error().stack.split("\n").slice(2);
|
|
3541
|
+
if (stackLines && stackLines.length > 0 && stackLines[0].includes("ErrImpl")) {
|
|
3542
|
+
stackLines.shift();
|
|
3543
|
+
}
|
|
3544
|
+
this._stack = stackLines.join("\n");
|
|
3545
|
+
}
|
|
3546
|
+
ErrImpl2.prototype.isOk = function() {
|
|
3547
|
+
return false;
|
|
3548
|
+
};
|
|
3549
|
+
ErrImpl2.prototype.isErr = function() {
|
|
3550
|
+
return true;
|
|
3551
|
+
};
|
|
3552
|
+
ErrImpl2.prototype[Symbol.iterator] = function() {
|
|
3553
|
+
return {
|
|
3554
|
+
next: function() {
|
|
3555
|
+
return { done: true, value: void 0 };
|
|
3556
|
+
}
|
|
3557
|
+
};
|
|
3558
|
+
};
|
|
3559
|
+
ErrImpl2.prototype.else = function(val) {
|
|
3560
|
+
return val;
|
|
3561
|
+
};
|
|
3562
|
+
ErrImpl2.prototype.unwrapOr = function(val) {
|
|
3563
|
+
return val;
|
|
3564
|
+
};
|
|
3565
|
+
ErrImpl2.prototype.unwrapOrElse = function(f2) {
|
|
3566
|
+
return f2(this.error);
|
|
3567
|
+
};
|
|
3568
|
+
ErrImpl2.prototype.expect = function(msg) {
|
|
3569
|
+
throw new Error("".concat(msg, " - Error: ").concat(toString(this.error), "\n").concat(this._stack), { cause: this.error });
|
|
3570
|
+
};
|
|
3571
|
+
ErrImpl2.prototype.expectErr = function(_msg) {
|
|
3572
|
+
return this.error;
|
|
3573
|
+
};
|
|
3574
|
+
ErrImpl2.prototype.unwrap = function() {
|
|
3575
|
+
throw new Error("Tried to unwrap Error: ".concat(toString(this.error), "\n").concat(this._stack), { cause: this.error });
|
|
3576
|
+
};
|
|
3577
|
+
ErrImpl2.prototype.unwrapErr = function() {
|
|
3578
|
+
return this.error;
|
|
3579
|
+
};
|
|
3580
|
+
ErrImpl2.prototype.map = function(_mapper) {
|
|
3581
|
+
return this;
|
|
3582
|
+
};
|
|
3583
|
+
ErrImpl2.prototype.andThen = function(op) {
|
|
3584
|
+
return this;
|
|
3585
|
+
};
|
|
3586
|
+
ErrImpl2.prototype.mapErr = function(mapper) {
|
|
3587
|
+
return new Err(mapper(this.error));
|
|
3588
|
+
};
|
|
3589
|
+
ErrImpl2.prototype.mapOr = function(default_, _mapper) {
|
|
3590
|
+
return default_;
|
|
3591
|
+
};
|
|
3592
|
+
ErrImpl2.prototype.mapOrElse = function(default_, _mapper) {
|
|
3593
|
+
return default_(this.error);
|
|
3594
|
+
};
|
|
3595
|
+
ErrImpl2.prototype.or = function(other) {
|
|
3596
|
+
return other;
|
|
3597
|
+
};
|
|
3598
|
+
ErrImpl2.prototype.orElse = function(other) {
|
|
3599
|
+
return other(this.error);
|
|
3600
|
+
};
|
|
3601
|
+
ErrImpl2.prototype.toOption = function() {
|
|
3602
|
+
return None;
|
|
3603
|
+
};
|
|
3604
|
+
ErrImpl2.prototype.toString = function() {
|
|
3605
|
+
return "Err(".concat(toString(this.error), ")");
|
|
3606
|
+
};
|
|
3607
|
+
Object.defineProperty(ErrImpl2.prototype, "stack", {
|
|
3608
|
+
get: function() {
|
|
3609
|
+
return "".concat(this, "\n").concat(this._stack);
|
|
3610
|
+
},
|
|
3611
|
+
enumerable: false,
|
|
3612
|
+
configurable: true
|
|
3613
|
+
});
|
|
3614
|
+
ErrImpl2.prototype.toAsyncResult = function() {
|
|
3615
|
+
return new AsyncResult(this);
|
|
3616
|
+
};
|
|
3617
|
+
ErrImpl2.EMPTY = new ErrImpl2(void 0);
|
|
3618
|
+
return ErrImpl2;
|
|
3619
|
+
})()
|
|
3620
|
+
);
|
|
3621
|
+
var Err = ErrImpl;
|
|
3622
|
+
var OkImpl = (
|
|
3623
|
+
/** @class */
|
|
3624
|
+
(function() {
|
|
3625
|
+
function OkImpl2(val) {
|
|
3626
|
+
if (!(this instanceof OkImpl2)) {
|
|
3627
|
+
return new OkImpl2(val);
|
|
3628
|
+
}
|
|
3629
|
+
this.value = val;
|
|
3630
|
+
}
|
|
3631
|
+
OkImpl2.prototype.isOk = function() {
|
|
3632
|
+
return true;
|
|
3633
|
+
};
|
|
3634
|
+
OkImpl2.prototype.isErr = function() {
|
|
3635
|
+
return false;
|
|
3636
|
+
};
|
|
3637
|
+
OkImpl2.prototype[Symbol.iterator] = function() {
|
|
3638
|
+
return [this.value][Symbol.iterator]();
|
|
3639
|
+
};
|
|
3640
|
+
OkImpl2.prototype.else = function(_val) {
|
|
3641
|
+
return this.value;
|
|
3642
|
+
};
|
|
3643
|
+
OkImpl2.prototype.unwrapOr = function(_val) {
|
|
3644
|
+
return this.value;
|
|
3645
|
+
};
|
|
3646
|
+
OkImpl2.prototype.unwrapOrElse = function(_f) {
|
|
3647
|
+
return this.value;
|
|
3648
|
+
};
|
|
3649
|
+
OkImpl2.prototype.expect = function(_msg) {
|
|
3650
|
+
return this.value;
|
|
3651
|
+
};
|
|
3652
|
+
OkImpl2.prototype.expectErr = function(msg) {
|
|
3653
|
+
throw new Error(msg);
|
|
3654
|
+
};
|
|
3655
|
+
OkImpl2.prototype.unwrap = function() {
|
|
3656
|
+
return this.value;
|
|
3657
|
+
};
|
|
3658
|
+
OkImpl2.prototype.unwrapErr = function() {
|
|
3659
|
+
throw new Error("Tried to unwrap Ok: ".concat(toString(this.value)), { cause: this.value });
|
|
3660
|
+
};
|
|
3661
|
+
OkImpl2.prototype.map = function(mapper) {
|
|
3662
|
+
return new Ok(mapper(this.value));
|
|
3663
|
+
};
|
|
3664
|
+
OkImpl2.prototype.andThen = function(mapper) {
|
|
3665
|
+
return mapper(this.value);
|
|
3666
|
+
};
|
|
3667
|
+
OkImpl2.prototype.mapErr = function(_mapper) {
|
|
3668
|
+
return this;
|
|
3669
|
+
};
|
|
3670
|
+
OkImpl2.prototype.mapOr = function(_default_, mapper) {
|
|
3671
|
+
return mapper(this.value);
|
|
3672
|
+
};
|
|
3673
|
+
OkImpl2.prototype.mapOrElse = function(_default_, mapper) {
|
|
3674
|
+
return mapper(this.value);
|
|
3675
|
+
};
|
|
3676
|
+
OkImpl2.prototype.or = function(_other) {
|
|
3677
|
+
return this;
|
|
3678
|
+
};
|
|
3679
|
+
OkImpl2.prototype.orElse = function(_other) {
|
|
3680
|
+
return this;
|
|
3681
|
+
};
|
|
3682
|
+
OkImpl2.prototype.toOption = function() {
|
|
3683
|
+
return Some(this.value);
|
|
3684
|
+
};
|
|
3685
|
+
OkImpl2.prototype.safeUnwrap = function() {
|
|
3686
|
+
return this.value;
|
|
3687
|
+
};
|
|
3688
|
+
OkImpl2.prototype.toString = function() {
|
|
3689
|
+
return "Ok(".concat(toString(this.value), ")");
|
|
3690
|
+
};
|
|
3691
|
+
OkImpl2.prototype.toAsyncResult = function() {
|
|
3692
|
+
return new AsyncResult(this);
|
|
3693
|
+
};
|
|
3694
|
+
OkImpl2.EMPTY = new OkImpl2(void 0);
|
|
3695
|
+
return OkImpl2;
|
|
3696
|
+
})()
|
|
3697
|
+
);
|
|
3698
|
+
var Ok = OkImpl;
|
|
3699
|
+
var Result;
|
|
3700
|
+
(function(Result2) {
|
|
3701
|
+
function all(results) {
|
|
3702
|
+
var okResult = [];
|
|
3703
|
+
for (var _i2 = 0, results_1 = results; _i2 < results_1.length; _i2++) {
|
|
3704
|
+
var result = results_1[_i2];
|
|
3705
|
+
if (result.isOk()) {
|
|
3706
|
+
okResult.push(result.value);
|
|
3707
|
+
} else {
|
|
3708
|
+
return result;
|
|
3709
|
+
}
|
|
3710
|
+
}
|
|
3711
|
+
return new Ok(okResult);
|
|
3712
|
+
}
|
|
3713
|
+
Result2.all = all;
|
|
3714
|
+
function any(results) {
|
|
3715
|
+
var errResult = [];
|
|
3716
|
+
for (var _i2 = 0, results_2 = results; _i2 < results_2.length; _i2++) {
|
|
3717
|
+
var result = results_2[_i2];
|
|
3718
|
+
if (result.isOk()) {
|
|
3719
|
+
return result;
|
|
3720
|
+
} else {
|
|
3721
|
+
errResult.push(result.error);
|
|
3722
|
+
}
|
|
3723
|
+
}
|
|
3724
|
+
return new Err(errResult);
|
|
3725
|
+
}
|
|
3726
|
+
Result2.any = any;
|
|
3727
|
+
function wrap(op) {
|
|
3728
|
+
try {
|
|
3729
|
+
return new Ok(op());
|
|
3730
|
+
} catch (e2) {
|
|
3731
|
+
return new Err(e2);
|
|
3732
|
+
}
|
|
3733
|
+
}
|
|
3734
|
+
Result2.wrap = wrap;
|
|
1827
3735
|
function wrapAsync(op) {
|
|
1828
3736
|
try {
|
|
1829
3737
|
return op().then(function(val) {
|
|
@@ -6989,454 +8897,14 @@ var DremioCloud = (() => {
|
|
|
6989
8897
|
var emptyPathError = new ValidationProblem([
|
|
6990
8898
|
{
|
|
6991
8899
|
detail: "`path` parameter is required and cannot be empty",
|
|
6992
|
-
pointer: "#/path",
|
|
6993
|
-
type: "https://api.dremio.dev/problems/validation/min-length"
|
|
6994
|
-
}
|
|
6995
|
-
]);
|
|
6996
|
-
var unableToRetrieveProblem = (internalErrorMessage) => new Problem({
|
|
6997
|
-
detail: internalErrorMessage,
|
|
6998
|
-
title: "We were unable to fetch details for this catalog object",
|
|
6999
|
-
type: "https://api.dremio.dev/problems/catalog/failed-to-retrieve"
|
|
7000
|
-
});
|
|
7001
|
-
|
|
7002
|
-
// dist/enterprise/catalog/catalogRetrieve.js
|
|
7003
|
-
var baseRetrieve = (config3) => batch(async (ids) => {
|
|
7004
|
-
const results = /* @__PURE__ */ new Map();
|
|
7005
|
-
if (ids.size === 1) {
|
|
7006
|
-
const id = Array.from(ids).at(0);
|
|
7007
|
-
return config3.sonarV3Request(`catalog/${id}?maxChildren=0`).promise.then((result) => result.unwrap()).then((res) => res.json()).then((response) => {
|
|
7008
|
-
results.set(id, Ok(catalogObjectFromEntity(config3, baseRetrieveByPath(config3))(response)));
|
|
7009
|
-
return results;
|
|
7010
|
-
}).catch((e2) => {
|
|
7011
|
-
if (e2 instanceof HttpError && e2.body?.detail) {
|
|
7012
|
-
results.set(id, Err(unableToRetrieveProblem(e2.body.detail)));
|
|
7013
|
-
} else {
|
|
7014
|
-
results.set(id, Err(unableToRetrieveProblem()));
|
|
7015
|
-
}
|
|
7016
|
-
return results;
|
|
7017
|
-
});
|
|
7018
|
-
}
|
|
7019
|
-
const idsArray = Array.from(ids);
|
|
7020
|
-
const chunks = [];
|
|
7021
|
-
while (idsArray.length > 0) {
|
|
7022
|
-
chunks.push(idsArray.splice(0, Math.min(50, idsArray.length)));
|
|
7023
|
-
}
|
|
7024
|
-
const catalogItems = await Promise.all(chunks.map((chunk) => config3.sonarV3Request(`catalog/by-ids?maxChildren=0`, {
|
|
7025
|
-
body: JSON.stringify(chunk),
|
|
7026
|
-
headers: { "Content-Type": "application/json" },
|
|
7027
|
-
method: "POST"
|
|
7028
|
-
}).promise.then((result) => result.unwrap()).then((res) => res.json()).then((response) => response.data))).then((chunks2) => chunks2.flat());
|
|
7029
|
-
for (const catalogItem of catalogItems) {
|
|
7030
|
-
results.set(catalogItem.id, Ok(catalogObjectFromEntity(config3, baseRetrieveByPath(config3))(catalogItem)));
|
|
7031
|
-
}
|
|
7032
|
-
for (const id of ids) {
|
|
7033
|
-
if (!results.has(id)) {
|
|
7034
|
-
results.set(id, Err(unableToRetrieveProblem()));
|
|
7035
|
-
}
|
|
7036
|
-
}
|
|
7037
|
-
return results;
|
|
7038
|
-
});
|
|
7039
|
-
var baseRetrieveByPath = (config3) => batch(async (paths) => {
|
|
7040
|
-
const results = /* @__PURE__ */ new Map();
|
|
7041
|
-
const originalKeyRef = /* @__PURE__ */ new Map();
|
|
7042
|
-
for (const key of paths) {
|
|
7043
|
-
originalKeyRef.set(JSON.stringify(key), key);
|
|
7044
|
-
}
|
|
7045
|
-
if (paths.size === 1) {
|
|
7046
|
-
const path = Array.from(paths).at(0);
|
|
7047
|
-
return config3.sonarV3Request(`catalog/by-path/${path.map(encodeURIComponent).join("/")}?maxChildren=0`).promise.then((result) => result.unwrap()).then((res) => res.json()).then((response) => {
|
|
7048
|
-
results.set(path, Ok(catalogObjectFromEntity(config3, baseRetrieveByPath(config3))(response)));
|
|
7049
|
-
return results;
|
|
7050
|
-
}).catch((e2) => {
|
|
7051
|
-
if (e2 instanceof HttpError && e2.body?.detail) {
|
|
7052
|
-
results.set(path, Err(unableToRetrieveProblem(e2.body.detail)));
|
|
7053
|
-
} else {
|
|
7054
|
-
results.set(path, Err(unableToRetrieveProblem()));
|
|
7055
|
-
}
|
|
7056
|
-
return results;
|
|
7057
|
-
});
|
|
7058
|
-
}
|
|
7059
|
-
const pathsArray = Array.from(paths);
|
|
7060
|
-
const chunks = [];
|
|
7061
|
-
while (pathsArray.length > 0) {
|
|
7062
|
-
chunks.push(pathsArray.splice(0, Math.min(50, pathsArray.length)));
|
|
7063
|
-
}
|
|
7064
|
-
const catalogItems = await Promise.all(chunks.map((chunk) => config3.sonarV3Request(`catalog/by-paths?maxChildren=0`, {
|
|
7065
|
-
body: JSON.stringify(chunk),
|
|
7066
|
-
headers: { "Content-Type": "application/json" },
|
|
7067
|
-
method: "POST"
|
|
7068
|
-
}).promise.then((result) => result.unwrap()).then((res) => res.json()).then((response) => response.data))).then((chunks2) => chunks2.flat());
|
|
7069
|
-
for (const catalogItem of catalogItems) {
|
|
7070
|
-
const resolved = catalogObjectFromEntity(config3, baseRetrieveByPath(config3))(catalogItem);
|
|
7071
|
-
const originalKey = originalKeyRef.get(JSON.stringify(resolved.path));
|
|
7072
|
-
if (originalKey) {
|
|
7073
|
-
results.set(originalKey, Ok(resolved));
|
|
7074
|
-
}
|
|
7075
|
-
}
|
|
7076
|
-
for (const path of paths) {
|
|
7077
|
-
if (!results.has(path)) {
|
|
7078
|
-
results.set(path, Err(unableToRetrieveProblem()));
|
|
7079
|
-
}
|
|
7080
|
-
}
|
|
7081
|
-
return results;
|
|
7082
|
-
});
|
|
7083
|
-
|
|
7084
|
-
// dist/enterprise/catalog/catalogSearch/CatalogSearchParams.js
|
|
7085
|
-
var dateRangeOptions = {
|
|
7086
|
-
ALL: "ALL",
|
|
7087
|
-
LAST_3_DAYS: "Last3Days",
|
|
7088
|
-
LAST_6_HOURS: "Last6Hours",
|
|
7089
|
-
LAST_7_DAYS: "Last7Days",
|
|
7090
|
-
LAST_24_HOURS: "Last24Hours",
|
|
7091
|
-
LAST_30_DAYS: "Last30Days",
|
|
7092
|
-
LAST_HOUR: "LastHour"
|
|
7093
|
-
};
|
|
7094
|
-
var ONE_HOUR = 60 * 60 * 1e3;
|
|
7095
|
-
var ONE_DAY = ONE_HOUR * 24;
|
|
7096
|
-
var getDateRangeTime = (value) => {
|
|
7097
|
-
const now = Date.now();
|
|
7098
|
-
switch (value) {
|
|
7099
|
-
case dateRangeOptions.LAST_HOUR:
|
|
7100
|
-
return new Date(now - ONE_HOUR);
|
|
7101
|
-
case dateRangeOptions.LAST_6_HOURS:
|
|
7102
|
-
return new Date(now - ONE_HOUR * 6);
|
|
7103
|
-
case dateRangeOptions.LAST_24_HOURS:
|
|
7104
|
-
return new Date(now - ONE_DAY);
|
|
7105
|
-
case dateRangeOptions.LAST_3_DAYS:
|
|
7106
|
-
return new Date(now - ONE_DAY * 3);
|
|
7107
|
-
case dateRangeOptions.LAST_7_DAYS:
|
|
7108
|
-
return new Date(now - ONE_DAY * 7);
|
|
7109
|
-
case dateRangeOptions.LAST_30_DAYS:
|
|
7110
|
-
return new Date(now - ONE_DAY * 30);
|
|
7111
|
-
default:
|
|
7112
|
-
return /* @__PURE__ */ new Date();
|
|
7113
|
-
}
|
|
7114
|
-
};
|
|
7115
|
-
|
|
7116
|
-
// dist/enterprise/catalog/catalogSearch/catalogSearchParamsToObject.js
|
|
7117
|
-
var catalogSearchParamsToObject = (catalogSearchParams) => {
|
|
7118
|
-
const filters = [];
|
|
7119
|
-
if (catalogSearchParams.type) {
|
|
7120
|
-
filters.push(generateTypeFilterString(catalogSearchParams.type));
|
|
7121
|
-
}
|
|
7122
|
-
if (catalogSearchParams.owner) {
|
|
7123
|
-
filters.push(`owner == "${catalogSearchParams.owner}"`);
|
|
7124
|
-
}
|
|
7125
|
-
if (catalogSearchParams.in) {
|
|
7126
|
-
filters.push(`path == "${catalogSearchParams.in}"`);
|
|
7127
|
-
}
|
|
7128
|
-
if (catalogSearchParams.startTime && catalogSearchParams.startTime !== dateRangeOptions.ALL) {
|
|
7129
|
-
filters.push(`date >= "${getDateRangeTime(catalogSearchParams.startTime)?.toISOString()}"`);
|
|
7130
|
-
}
|
|
7131
|
-
if (catalogSearchParams.lastModified && catalogSearchParams.lastModified !== dateRangeOptions.ALL) {
|
|
7132
|
-
filters.push(`lastModified >= "${getDateRangeTime(catalogSearchParams.lastModified)?.toISOString()}"`);
|
|
7133
|
-
}
|
|
7134
|
-
return {
|
|
7135
|
-
query: catalogSearchParams.searchText,
|
|
7136
|
-
...filters.length && { filter: filters.join(" && ") }
|
|
7137
|
-
};
|
|
7138
|
-
};
|
|
7139
|
-
var generateTypeFilterString = (typeFilter) => {
|
|
7140
|
-
if (typeFilter.size === 0) {
|
|
7141
|
-
return "";
|
|
7142
|
-
}
|
|
7143
|
-
return `category in [${Array.from(typeFilter).map((v2) => JSON.stringify(v2)).join(",")}]`;
|
|
7144
|
-
};
|
|
7145
|
-
|
|
7146
|
-
// dist/common/Query.js
|
|
7147
|
-
var Query = class {
|
|
7148
|
-
sql;
|
|
7149
|
-
context;
|
|
7150
|
-
constructor(sql, context2 = []) {
|
|
7151
|
-
this.sql = sql;
|
|
7152
|
-
this.context = context2;
|
|
7153
|
-
}
|
|
7154
|
-
equals(other) {
|
|
7155
|
-
return typeof other === typeof this && this.sql === other.sql && JSON.stringify(this.context) === JSON.stringify(other.context);
|
|
7156
|
-
}
|
|
7157
|
-
};
|
|
7158
|
-
|
|
7159
|
-
// dist/enterprise/catalog/catalogSearch/CatalogSearchResult.js
|
|
7160
|
-
var FolderSearchResult = class {
|
|
7161
|
-
catalogReference;
|
|
7162
|
-
owner;
|
|
7163
|
-
wiki;
|
|
7164
|
-
constructor(properties) {
|
|
7165
|
-
this.catalogReference = properties.catalogReference;
|
|
7166
|
-
this.owner = properties.owner;
|
|
7167
|
-
this.wiki = properties.wiki;
|
|
7168
|
-
}
|
|
7169
|
-
};
|
|
7170
|
-
var ReflectionSearchResult = class {
|
|
7171
|
-
catalogReference;
|
|
7172
|
-
createdAt;
|
|
7173
|
-
id;
|
|
7174
|
-
lastModifiedAt;
|
|
7175
|
-
name;
|
|
7176
|
-
constructor(properties) {
|
|
7177
|
-
this.catalogReference = properties.catalogReference;
|
|
7178
|
-
this.createdAt = properties.createdAt;
|
|
7179
|
-
this.id = properties.id;
|
|
7180
|
-
this.lastModifiedAt = properties.lastModifiedAt;
|
|
7181
|
-
this.name = properties.name;
|
|
7182
|
-
}
|
|
7183
|
-
};
|
|
7184
|
-
var SourceSearchResult = class {
|
|
7185
|
-
catalogReference;
|
|
7186
|
-
createdAt;
|
|
7187
|
-
owner;
|
|
7188
|
-
constructor(properties) {
|
|
7189
|
-
this.catalogReference = properties.catalogReference;
|
|
7190
|
-
this.createdAt = properties.createdAt;
|
|
7191
|
-
this.owner = properties.owner;
|
|
7192
|
-
}
|
|
7193
|
-
};
|
|
7194
|
-
var SpaceSearchResult = class {
|
|
7195
|
-
catalogReference;
|
|
7196
|
-
createdAt;
|
|
7197
|
-
lastModifiedAt;
|
|
7198
|
-
owner;
|
|
7199
|
-
wiki;
|
|
7200
|
-
constructor(properties) {
|
|
7201
|
-
this.catalogReference = properties.catalogReference;
|
|
7202
|
-
this.createdAt = properties.createdAt;
|
|
7203
|
-
this.lastModifiedAt = properties.lastModifiedAt;
|
|
7204
|
-
this.owner = properties.owner;
|
|
7205
|
-
this.wiki = properties.wiki;
|
|
7206
|
-
}
|
|
7207
|
-
};
|
|
7208
|
-
var TableSearchResult = class {
|
|
7209
|
-
columns;
|
|
7210
|
-
catalogReference;
|
|
7211
|
-
createdAt;
|
|
7212
|
-
labels;
|
|
7213
|
-
lastModifiedAt;
|
|
7214
|
-
owner;
|
|
7215
|
-
wiki;
|
|
7216
|
-
constructor(properties) {
|
|
7217
|
-
this.catalogReference = properties.catalogReference;
|
|
7218
|
-
this.columns = properties.columns;
|
|
7219
|
-
this.createdAt = properties.createdAt;
|
|
7220
|
-
this.labels = properties.labels;
|
|
7221
|
-
this.lastModifiedAt = properties.lastModifiedAt;
|
|
7222
|
-
this.wiki = properties.wiki;
|
|
7223
|
-
}
|
|
7224
|
-
};
|
|
7225
|
-
var ViewSearchResult = class {
|
|
7226
|
-
columns;
|
|
7227
|
-
catalogReference;
|
|
7228
|
-
createdAt;
|
|
7229
|
-
labels;
|
|
7230
|
-
lastModifiedAt;
|
|
7231
|
-
owner;
|
|
7232
|
-
wiki;
|
|
7233
|
-
constructor(properties) {
|
|
7234
|
-
this.columns = properties.columns;
|
|
7235
|
-
this.catalogReference = properties.catalogReference;
|
|
7236
|
-
this.createdAt = properties.createdAt;
|
|
7237
|
-
this.labels = properties.labels;
|
|
7238
|
-
this.lastModifiedAt = properties.lastModifiedAt;
|
|
7239
|
-
this.owner = properties.owner;
|
|
7240
|
-
this.wiki = properties.wiki;
|
|
7241
|
-
}
|
|
7242
|
-
};
|
|
7243
|
-
var FunctionSearchResult = class {
|
|
7244
|
-
catalogReference;
|
|
7245
|
-
createdAt;
|
|
7246
|
-
lastModifiedAt;
|
|
7247
|
-
owner;
|
|
7248
|
-
functionSql;
|
|
7249
|
-
constructor(properties) {
|
|
7250
|
-
this.catalogReference = properties.catalogReference;
|
|
7251
|
-
this.createdAt = properties.createdAt;
|
|
7252
|
-
this.lastModifiedAt = properties.lastModifiedAt;
|
|
7253
|
-
this.owner = properties.owner;
|
|
7254
|
-
this.functionSql = properties.functionSql;
|
|
7255
|
-
}
|
|
7256
|
-
};
|
|
7257
|
-
var ScriptSearchResult = class {
|
|
7258
|
-
content;
|
|
7259
|
-
createdAt;
|
|
7260
|
-
id;
|
|
7261
|
-
lastModifiedAt;
|
|
7262
|
-
name;
|
|
7263
|
-
owner;
|
|
7264
|
-
constructor(properties) {
|
|
7265
|
-
this.content = properties.content;
|
|
7266
|
-
this.createdAt = properties.createdAt;
|
|
7267
|
-
this.id = properties.id;
|
|
7268
|
-
this.lastModifiedAt = properties.lastModifiedAt;
|
|
7269
|
-
this.name = properties.name;
|
|
7270
|
-
this.owner = properties.owner;
|
|
7271
|
-
}
|
|
7272
|
-
};
|
|
7273
|
-
var JobSearchResult = class {
|
|
7274
|
-
id;
|
|
7275
|
-
queriedDatasets;
|
|
7276
|
-
sql;
|
|
7277
|
-
queryType;
|
|
7278
|
-
user;
|
|
7279
|
-
startTime;
|
|
7280
|
-
finishTime;
|
|
7281
|
-
state;
|
|
7282
|
-
error;
|
|
7283
|
-
constructor(properties) {
|
|
7284
|
-
this.id = properties.id;
|
|
7285
|
-
this.queriedDatasets = properties.queriedDatasets;
|
|
7286
|
-
this.sql = properties.sql;
|
|
7287
|
-
this.queryType = properties.queryType;
|
|
7288
|
-
this.user = properties.user;
|
|
7289
|
-
this.startTime = properties.startTime;
|
|
7290
|
-
this.finishTime = properties.finishTime;
|
|
7291
|
-
this.state = properties.state;
|
|
7292
|
-
this.error = properties.error;
|
|
7293
|
-
}
|
|
7294
|
-
};
|
|
7295
|
-
|
|
7296
|
-
// dist/enterprise/catalog/catalogSearch/mapSearchResult.js
|
|
7297
|
-
var mapSearchResult = (_catalogReferenceFromEntity) => (searchResult) => {
|
|
7298
|
-
switch (searchResult.category) {
|
|
7299
|
-
case "FOLDER":
|
|
7300
|
-
return new FolderSearchResult({
|
|
7301
|
-
catalogReference: _catalogReferenceFromEntity({
|
|
7302
|
-
path: searchResult.catalogObject.path,
|
|
7303
|
-
type: transformSearchTypeToCatalog(searchResult.catalogObject.type)
|
|
7304
|
-
}),
|
|
7305
|
-
owner: searchResult.catalogObject?.owner,
|
|
7306
|
-
wiki: searchResult.catalogObject.wiki || null
|
|
7307
|
-
});
|
|
7308
|
-
case "SCRIPT":
|
|
7309
|
-
return new ScriptSearchResult({
|
|
7310
|
-
content: searchResult.scriptObject.content,
|
|
7311
|
-
createdAt: new Date(searchResult.scriptObject.createdAt),
|
|
7312
|
-
id: searchResult.scriptObject.id,
|
|
7313
|
-
lastModifiedAt: new Date(searchResult.scriptObject.modifiedAt),
|
|
7314
|
-
name: searchResult.scriptObject.name,
|
|
7315
|
-
owner: searchResult.scriptObject.owner
|
|
7316
|
-
});
|
|
7317
|
-
case "REFLECTION":
|
|
7318
|
-
return new ReflectionSearchResult({
|
|
7319
|
-
catalogReference: _catalogReferenceFromEntity({
|
|
7320
|
-
path: searchResult.reflectionObject.datasetPath,
|
|
7321
|
-
type: transformSearchTypeToCatalog(searchResult.reflectionObject.datasetType.toUpperCase())
|
|
7322
|
-
}),
|
|
7323
|
-
createdAt: new Date(searchResult.reflectionObject.createdAt),
|
|
7324
|
-
id: searchResult.reflectionObject.id,
|
|
7325
|
-
lastModifiedAt: new Date(searchResult.reflectionObject.modifiedAt),
|
|
7326
|
-
name: searchResult.reflectionObject.name
|
|
7327
|
-
});
|
|
7328
|
-
case "SOURCE":
|
|
7329
|
-
return new SourceSearchResult({
|
|
7330
|
-
catalogReference: _catalogReferenceFromEntity({
|
|
7331
|
-
path: searchResult.catalogObject.path,
|
|
7332
|
-
type: transformSearchTypeToCatalog(searchResult.catalogObject.type)
|
|
7333
|
-
}),
|
|
7334
|
-
createdAt: new Date(searchResult.catalogObject.createdAt),
|
|
7335
|
-
owner: searchResult.catalogObject.owner
|
|
7336
|
-
});
|
|
7337
|
-
case "SPACE":
|
|
7338
|
-
return new SpaceSearchResult({
|
|
7339
|
-
catalogReference: _catalogReferenceFromEntity({
|
|
7340
|
-
path: searchResult.catalogObject.path,
|
|
7341
|
-
type: transformSearchTypeToCatalog(searchResult.catalogObject.type)
|
|
7342
|
-
}),
|
|
7343
|
-
createdAt: searchResult.catalogObject.createdAt ? new Date(searchResult.catalogObject.createdAt) : null,
|
|
7344
|
-
lastModifiedAt: searchResult.catalogObject.modifiedAt ? new Date(searchResult.catalogObject.modifiedAt) : null,
|
|
7345
|
-
owner: searchResult.catalogObject.owner,
|
|
7346
|
-
wiki: searchResult.catalogObject.wiki || null
|
|
7347
|
-
});
|
|
7348
|
-
case "TABLE":
|
|
7349
|
-
return new TableSearchResult({
|
|
7350
|
-
catalogReference: _catalogReferenceFromEntity({
|
|
7351
|
-
path: searchResult.catalogObject.path,
|
|
7352
|
-
type: transformSearchTypeToCatalog(searchResult.catalogObject.type)
|
|
7353
|
-
}),
|
|
7354
|
-
columns: searchResult.catalogObject.columns,
|
|
7355
|
-
createdAt: searchResult.catalogObject.createdAt ? new Date(searchResult.catalogObject.createdAt) : null,
|
|
7356
|
-
labels: searchResult.catalogObject.labels,
|
|
7357
|
-
lastModifiedAt: searchResult.catalogObject.modifiedAt ? new Date(searchResult.catalogObject.modifiedAt) : null,
|
|
7358
|
-
owner: searchResult.catalogObject.owner,
|
|
7359
|
-
wiki: searchResult.catalogObject.wiki || null
|
|
7360
|
-
});
|
|
7361
|
-
case "UDF":
|
|
7362
|
-
return new FunctionSearchResult({
|
|
7363
|
-
catalogReference: _catalogReferenceFromEntity({
|
|
7364
|
-
path: searchResult.catalogObject.path,
|
|
7365
|
-
type: transformSearchTypeToCatalog(searchResult.catalogObject.type)
|
|
7366
|
-
}),
|
|
7367
|
-
createdAt: new Date(searchResult.catalogObject.createdAt),
|
|
7368
|
-
functionSql: searchResult.catalogObject.functionSql,
|
|
7369
|
-
lastModifiedAt: new Date(searchResult.catalogObject.modifiedAt),
|
|
7370
|
-
owner: searchResult.catalogObject.owner
|
|
7371
|
-
});
|
|
7372
|
-
case "VIEW":
|
|
7373
|
-
return new ViewSearchResult({
|
|
7374
|
-
catalogReference: _catalogReferenceFromEntity({
|
|
7375
|
-
path: searchResult.catalogObject.path,
|
|
7376
|
-
type: transformSearchTypeToCatalog(searchResult.catalogObject.type)
|
|
7377
|
-
}),
|
|
7378
|
-
columns: searchResult.catalogObject.columns,
|
|
7379
|
-
createdAt: searchResult.catalogObject.createdAt ? new Date(searchResult.catalogObject.createdAt) : null,
|
|
7380
|
-
labels: searchResult.catalogObject.labels,
|
|
7381
|
-
lastModifiedAt: searchResult.catalogObject.modifiedAt ? new Date(searchResult.catalogObject.modifiedAt) : null,
|
|
7382
|
-
owner: searchResult.catalogObject.owner,
|
|
7383
|
-
wiki: searchResult.catalogObject.wiki || null
|
|
7384
|
-
});
|
|
7385
|
-
case "JOB":
|
|
7386
|
-
return new JobSearchResult({
|
|
7387
|
-
error: searchResult.jobObject.error,
|
|
7388
|
-
finishTime: new Date(searchResult.jobObject.finishTime),
|
|
7389
|
-
id: searchResult.jobObject.id,
|
|
7390
|
-
queriedDatasets: searchResult.jobObject.queriedDatasets.map((dataset) => _catalogReferenceFromEntity({
|
|
7391
|
-
path: dataset.datasetPath,
|
|
7392
|
-
type: transformSearchTypeToCatalog(dataset.datasetType)
|
|
7393
|
-
})),
|
|
7394
|
-
queryType: searchResult.jobObject.jobType,
|
|
7395
|
-
sql: new Query(searchResult.jobObject.sql),
|
|
7396
|
-
startTime: new Date(searchResult.jobObject.startTime),
|
|
7397
|
-
state: searchResult.jobObject.jobState,
|
|
7398
|
-
user: searchResult.jobObject.user
|
|
7399
|
-
});
|
|
7400
|
-
}
|
|
7401
|
-
};
|
|
7402
|
-
var transformSearchTypeToCatalog = (type) => {
|
|
7403
|
-
switch (type) {
|
|
7404
|
-
case "TABLE":
|
|
7405
|
-
return "DATASET_DIRECT";
|
|
7406
|
-
case "VIEW":
|
|
7407
|
-
return "DATASET_VIRTUAL";
|
|
7408
|
-
case "FOLDER":
|
|
7409
|
-
return "FOLDER";
|
|
7410
|
-
case "FUNCTION":
|
|
7411
|
-
return "FUNCTION";
|
|
7412
|
-
case "SPACE":
|
|
7413
|
-
return "SPACE";
|
|
7414
|
-
case "SOURCE":
|
|
7415
|
-
return "SOURCE";
|
|
7416
|
-
default:
|
|
7417
|
-
return "FILE";
|
|
7418
|
-
}
|
|
7419
|
-
};
|
|
7420
|
-
|
|
7421
|
-
// dist/enterprise/catalog/catalogSearch/createCatalogSearch.js
|
|
7422
|
-
var createCatalogSearch = (config3, _catalogReferenceFromEntity) => (params, { pageParam, signal } = {}) => config3.sonarV3Request("search", {
|
|
7423
|
-
body: JSON.stringify({
|
|
7424
|
-
...catalogSearchParamsToObject(params),
|
|
7425
|
-
maxResults: 50,
|
|
7426
|
-
pageToken: pageParam
|
|
7427
|
-
}),
|
|
7428
|
-
headers: {
|
|
7429
|
-
Accept: "application/json",
|
|
7430
|
-
"Content-Type": "application/json"
|
|
7431
|
-
},
|
|
7432
|
-
method: "POST",
|
|
7433
|
-
signal
|
|
7434
|
-
}).map((res) => res.json()).map((response) => {
|
|
7435
|
-
return {
|
|
7436
|
-
data: response.results.map(mapSearchResult(_catalogReferenceFromEntity)),
|
|
7437
|
-
nextPageToken: response.nextPageToken,
|
|
7438
|
-
sessionId: response.sessionId
|
|
7439
|
-
};
|
|
8900
|
+
pointer: "#/path",
|
|
8901
|
+
type: "https://api.dremio.dev/problems/validation/min-length"
|
|
8902
|
+
}
|
|
8903
|
+
]);
|
|
8904
|
+
var unableToRetrieveProblem = (internalErrorMessage) => new Problem({
|
|
8905
|
+
detail: internalErrorMessage,
|
|
8906
|
+
title: "We were unable to fetch details for this catalog object",
|
|
8907
|
+
type: "https://api.dremio.dev/problems/catalog/failed-to-retrieve"
|
|
7440
8908
|
});
|
|
7441
8909
|
|
|
7442
8910
|
// node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/core.js
|
|
@@ -9459,6 +10927,15 @@ var DremioCloud = (() => {
|
|
|
9459
10927
|
});
|
|
9460
10928
|
return schema;
|
|
9461
10929
|
}
|
|
10930
|
+
function _refine(Class2, fn2, _params) {
|
|
10931
|
+
const schema = new Class2({
|
|
10932
|
+
type: "custom",
|
|
10933
|
+
check: "custom",
|
|
10934
|
+
fn: fn2,
|
|
10935
|
+
...normalizeParams(_params)
|
|
10936
|
+
});
|
|
10937
|
+
return schema;
|
|
10938
|
+
}
|
|
9462
10939
|
function _superRefine(fn2) {
|
|
9463
10940
|
const ch = _check((payload) => {
|
|
9464
10941
|
payload.addIssue = (issue2) => {
|
|
@@ -9732,6 +11209,9 @@ var DremioCloud = (() => {
|
|
|
9732
11209
|
function custom(fn2, _params) {
|
|
9733
11210
|
return _custom(ZodMiniCustom, fn2 ?? (() => true), _params);
|
|
9734
11211
|
}
|
|
11212
|
+
function refine(fn2, _params = {}) {
|
|
11213
|
+
return _refine(ZodMiniCustom, fn2, _params);
|
|
11214
|
+
}
|
|
9735
11215
|
function superRefine(fn2) {
|
|
9736
11216
|
return _superRefine(fn2);
|
|
9737
11217
|
}
|
|
@@ -9743,46 +11223,557 @@ var DremioCloud = (() => {
|
|
|
9743
11223
|
return inst;
|
|
9744
11224
|
}
|
|
9745
11225
|
|
|
9746
|
-
// node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/mini/iso.js
|
|
9747
|
-
var iso_exports = {};
|
|
9748
|
-
__export(iso_exports, {
|
|
9749
|
-
ZodMiniISODate: () => ZodMiniISODate,
|
|
9750
|
-
ZodMiniISODateTime: () => ZodMiniISODateTime,
|
|
9751
|
-
ZodMiniISODuration: () => ZodMiniISODuration,
|
|
9752
|
-
ZodMiniISOTime: () => ZodMiniISOTime,
|
|
9753
|
-
date: () => date2,
|
|
9754
|
-
datetime: () => datetime2,
|
|
9755
|
-
duration: () => duration2,
|
|
9756
|
-
time: () => time2
|
|
9757
|
-
});
|
|
9758
|
-
var ZodMiniISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => {
|
|
9759
|
-
$ZodISODateTime.init(inst, def);
|
|
9760
|
-
ZodMiniStringFormat.init(inst, def);
|
|
9761
|
-
});
|
|
9762
|
-
function datetime2(params) {
|
|
9763
|
-
return _isoDateTime(ZodMiniISODateTime, params);
|
|
9764
|
-
}
|
|
9765
|
-
var ZodMiniISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => {
|
|
9766
|
-
$ZodISODate.init(inst, def);
|
|
9767
|
-
ZodMiniStringFormat.init(inst, def);
|
|
9768
|
-
});
|
|
9769
|
-
function date2(params) {
|
|
9770
|
-
return _isoDate(ZodMiniISODate, params);
|
|
9771
|
-
}
|
|
9772
|
-
var ZodMiniISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => {
|
|
9773
|
-
$ZodISOTime.init(inst, def);
|
|
9774
|
-
ZodMiniStringFormat.init(inst, def);
|
|
9775
|
-
});
|
|
9776
|
-
function time2(params) {
|
|
9777
|
-
return _isoTime(ZodMiniISOTime, params);
|
|
9778
|
-
}
|
|
9779
|
-
var ZodMiniISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => {
|
|
9780
|
-
$ZodISODuration.init(inst, def);
|
|
9781
|
-
ZodMiniStringFormat.init(inst, def);
|
|
11226
|
+
// node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/mini/iso.js
|
|
11227
|
+
var iso_exports = {};
|
|
11228
|
+
__export(iso_exports, {
|
|
11229
|
+
ZodMiniISODate: () => ZodMiniISODate,
|
|
11230
|
+
ZodMiniISODateTime: () => ZodMiniISODateTime,
|
|
11231
|
+
ZodMiniISODuration: () => ZodMiniISODuration,
|
|
11232
|
+
ZodMiniISOTime: () => ZodMiniISOTime,
|
|
11233
|
+
date: () => date2,
|
|
11234
|
+
datetime: () => datetime2,
|
|
11235
|
+
duration: () => duration2,
|
|
11236
|
+
time: () => time2
|
|
11237
|
+
});
|
|
11238
|
+
var ZodMiniISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => {
|
|
11239
|
+
$ZodISODateTime.init(inst, def);
|
|
11240
|
+
ZodMiniStringFormat.init(inst, def);
|
|
11241
|
+
});
|
|
11242
|
+
function datetime2(params) {
|
|
11243
|
+
return _isoDateTime(ZodMiniISODateTime, params);
|
|
11244
|
+
}
|
|
11245
|
+
var ZodMiniISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => {
|
|
11246
|
+
$ZodISODate.init(inst, def);
|
|
11247
|
+
ZodMiniStringFormat.init(inst, def);
|
|
11248
|
+
});
|
|
11249
|
+
function date2(params) {
|
|
11250
|
+
return _isoDate(ZodMiniISODate, params);
|
|
11251
|
+
}
|
|
11252
|
+
var ZodMiniISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => {
|
|
11253
|
+
$ZodISOTime.init(inst, def);
|
|
11254
|
+
ZodMiniStringFormat.init(inst, def);
|
|
11255
|
+
});
|
|
11256
|
+
function time2(params) {
|
|
11257
|
+
return _isoTime(ZodMiniISOTime, params);
|
|
11258
|
+
}
|
|
11259
|
+
var ZodMiniISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => {
|
|
11260
|
+
$ZodISODuration.init(inst, def);
|
|
11261
|
+
ZodMiniStringFormat.init(inst, def);
|
|
11262
|
+
});
|
|
11263
|
+
function duration2(params) {
|
|
11264
|
+
return _isoDuration(ZodMiniISODuration, params);
|
|
11265
|
+
}
|
|
11266
|
+
|
|
11267
|
+
// dist/oss/retrieveEnvironment.js
|
|
11268
|
+
var import_semver = __toESM(require_semver2(), 1);
|
|
11269
|
+
function retrieveEnvironment(config3) {
|
|
11270
|
+
return config3.v3Request("info", {
|
|
11271
|
+
headers: {
|
|
11272
|
+
Accept: "application/json"
|
|
11273
|
+
}
|
|
11274
|
+
}).map((res) => res.json()).map((data) => decode(environmentCodec, data));
|
|
11275
|
+
}
|
|
11276
|
+
var environmentInSchema = object({
|
|
11277
|
+
buildTime: string2().check(iso_exports.datetime()),
|
|
11278
|
+
clusterType: string2(),
|
|
11279
|
+
commit: object({
|
|
11280
|
+
builder: string2(),
|
|
11281
|
+
hash: string2(),
|
|
11282
|
+
time: string2().check(iso_exports.datetime())
|
|
11283
|
+
}),
|
|
11284
|
+
version: string2().check(refine((val) => Boolean(import_semver.default.valid(val))))
|
|
11285
|
+
});
|
|
11286
|
+
var environmentCodec = codec(environmentInSchema, extend2(omit2(environmentInSchema, {
|
|
11287
|
+
buildTime: true,
|
|
11288
|
+
commit: true,
|
|
11289
|
+
version: true
|
|
11290
|
+
}), {
|
|
11291
|
+
buildTime: _instanceof(Xn.Instant),
|
|
11292
|
+
commit: extend2(omit2(environmentInSchema.shape.commit, {
|
|
11293
|
+
time: true
|
|
11294
|
+
}), {
|
|
11295
|
+
time: _instanceof(Xn.Instant)
|
|
11296
|
+
}),
|
|
11297
|
+
version: _instanceof(import_semver.default.SemVer)
|
|
11298
|
+
}), {
|
|
11299
|
+
decode(v2) {
|
|
11300
|
+
return {
|
|
11301
|
+
buildTime: Xn.Instant.from(v2.buildTime),
|
|
11302
|
+
clusterType: v2.clusterType,
|
|
11303
|
+
commit: {
|
|
11304
|
+
...v2.commit,
|
|
11305
|
+
time: Xn.Instant.from(v2.commit.time)
|
|
11306
|
+
},
|
|
11307
|
+
version: import_semver.default.parse(v2.version)
|
|
11308
|
+
};
|
|
11309
|
+
},
|
|
11310
|
+
encode(v2) {
|
|
11311
|
+
return {
|
|
11312
|
+
buildTime: v2.buildTime.toString(),
|
|
11313
|
+
clusterType: v2.clusterType,
|
|
11314
|
+
commit: {
|
|
11315
|
+
...v2.commit,
|
|
11316
|
+
time: v2.commit.time.toString()
|
|
11317
|
+
},
|
|
11318
|
+
version: v2.version.toString()
|
|
11319
|
+
};
|
|
11320
|
+
}
|
|
11321
|
+
});
|
|
11322
|
+
|
|
11323
|
+
// dist/enterprise/catalog/catalogRetrieve.js
|
|
11324
|
+
var versionPromiseCache = /* @__PURE__ */ new WeakMap();
|
|
11325
|
+
var getVersionPromise = (config3) => {
|
|
11326
|
+
if (!versionPromiseCache.has(config3)) {
|
|
11327
|
+
versionPromiseCache.set(config3, retrieveEnvironment(config3).promise.then((result) => result.unwrap()).then((env) => env.version).catch(() => ({ major: 26 })));
|
|
11328
|
+
}
|
|
11329
|
+
return versionPromiseCache.get(config3);
|
|
11330
|
+
};
|
|
11331
|
+
var baseRetrieve = (config3) => {
|
|
11332
|
+
const versionPromise = getVersionPromise(config3);
|
|
11333
|
+
return batch(async (ids) => {
|
|
11334
|
+
const results = /* @__PURE__ */ new Map();
|
|
11335
|
+
const maxChildren = (await versionPromise).major < 26 ? 1 : 0;
|
|
11336
|
+
if (ids.size === 1) {
|
|
11337
|
+
const id = Array.from(ids).at(0);
|
|
11338
|
+
return config3.sonarV3Request(`catalog/${id}?maxChildren=${maxChildren}`).promise.then((result) => result.unwrap()).then((res) => res.json()).then((response) => {
|
|
11339
|
+
results.set(id, Ok(catalogObjectFromEntity(config3, baseRetrieveByPath(config3))(response)));
|
|
11340
|
+
return results;
|
|
11341
|
+
}).catch((e2) => {
|
|
11342
|
+
if (e2 instanceof HttpError && e2.body?.detail) {
|
|
11343
|
+
results.set(id, Err(unableToRetrieveProblem(e2.body.detail)));
|
|
11344
|
+
} else {
|
|
11345
|
+
results.set(id, Err(unableToRetrieveProblem()));
|
|
11346
|
+
}
|
|
11347
|
+
return results;
|
|
11348
|
+
});
|
|
11349
|
+
}
|
|
11350
|
+
const idsArray = Array.from(ids);
|
|
11351
|
+
const chunks = [];
|
|
11352
|
+
while (idsArray.length > 0) {
|
|
11353
|
+
chunks.push(idsArray.splice(0, Math.min(50, idsArray.length)));
|
|
11354
|
+
}
|
|
11355
|
+
const catalogItems = await Promise.all(chunks.map((chunk) => config3.sonarV3Request(`catalog/by-ids?maxChildren=${maxChildren}`, {
|
|
11356
|
+
body: JSON.stringify(chunk),
|
|
11357
|
+
headers: { "Content-Type": "application/json" },
|
|
11358
|
+
method: "POST"
|
|
11359
|
+
}).promise.then((result) => result.unwrap()).then((res) => res.json()).then((response) => response.data))).then((chunks2) => chunks2.flat());
|
|
11360
|
+
for (const catalogItem of catalogItems) {
|
|
11361
|
+
results.set(catalogItem.id, Ok(catalogObjectFromEntity(config3, baseRetrieveByPath(config3))(catalogItem)));
|
|
11362
|
+
}
|
|
11363
|
+
for (const id of ids) {
|
|
11364
|
+
if (!results.has(id)) {
|
|
11365
|
+
results.set(id, Err(unableToRetrieveProblem()));
|
|
11366
|
+
}
|
|
11367
|
+
}
|
|
11368
|
+
return results;
|
|
11369
|
+
});
|
|
11370
|
+
};
|
|
11371
|
+
var baseRetrieveByPath = (config3) => {
|
|
11372
|
+
const versionPromise = getVersionPromise(config3);
|
|
11373
|
+
return batch(async (paths) => {
|
|
11374
|
+
const results = /* @__PURE__ */ new Map();
|
|
11375
|
+
const maxChildren = (await versionPromise).major < 26 ? 1 : 0;
|
|
11376
|
+
const originalKeyRef = /* @__PURE__ */ new Map();
|
|
11377
|
+
for (const key of paths) {
|
|
11378
|
+
originalKeyRef.set(JSON.stringify(key), key);
|
|
11379
|
+
}
|
|
11380
|
+
if (paths.size === 1) {
|
|
11381
|
+
const path = Array.from(paths).at(0);
|
|
11382
|
+
return config3.sonarV3Request(`catalog/by-path/${path.map(encodeURIComponent).join("/")}?maxChildren=${maxChildren}`).promise.then((result) => result.unwrap()).then((res) => res.json()).then((response) => {
|
|
11383
|
+
results.set(path, Ok(catalogObjectFromEntity(config3, baseRetrieveByPath(config3))(response)));
|
|
11384
|
+
return results;
|
|
11385
|
+
}).catch((e2) => {
|
|
11386
|
+
if (e2 instanceof HttpError && e2.body?.detail) {
|
|
11387
|
+
results.set(path, Err(unableToRetrieveProblem(e2.body.detail)));
|
|
11388
|
+
} else {
|
|
11389
|
+
results.set(path, Err(unableToRetrieveProblem()));
|
|
11390
|
+
}
|
|
11391
|
+
return results;
|
|
11392
|
+
});
|
|
11393
|
+
}
|
|
11394
|
+
const pathsArray = Array.from(paths);
|
|
11395
|
+
const chunks = [];
|
|
11396
|
+
while (pathsArray.length > 0) {
|
|
11397
|
+
chunks.push(pathsArray.splice(0, Math.min(50, pathsArray.length)));
|
|
11398
|
+
}
|
|
11399
|
+
const catalogItems = await Promise.all(chunks.map((chunk) => config3.sonarV3Request(`catalog/by-paths?maxChildren=${maxChildren}`, {
|
|
11400
|
+
body: JSON.stringify(chunk),
|
|
11401
|
+
headers: { "Content-Type": "application/json" },
|
|
11402
|
+
method: "POST"
|
|
11403
|
+
}).promise.then((result) => result.unwrap()).then((res) => res.json()).then((response) => response.data))).then((chunks2) => chunks2.flat());
|
|
11404
|
+
for (const catalogItem of catalogItems) {
|
|
11405
|
+
const resolved = catalogObjectFromEntity(config3, baseRetrieveByPath(config3))(catalogItem);
|
|
11406
|
+
const originalKey = originalKeyRef.get(JSON.stringify(resolved.path));
|
|
11407
|
+
if (originalKey) {
|
|
11408
|
+
results.set(originalKey, Ok(resolved));
|
|
11409
|
+
}
|
|
11410
|
+
}
|
|
11411
|
+
for (const path of paths) {
|
|
11412
|
+
if (!results.has(path)) {
|
|
11413
|
+
results.set(path, Err(unableToRetrieveProblem()));
|
|
11414
|
+
}
|
|
11415
|
+
}
|
|
11416
|
+
return results;
|
|
11417
|
+
});
|
|
11418
|
+
};
|
|
11419
|
+
|
|
11420
|
+
// dist/enterprise/catalog/catalogSearch/CatalogSearchParams.js
|
|
11421
|
+
var dateRangeOptions = {
|
|
11422
|
+
ALL: "ALL",
|
|
11423
|
+
LAST_3_DAYS: "Last3Days",
|
|
11424
|
+
LAST_6_HOURS: "Last6Hours",
|
|
11425
|
+
LAST_7_DAYS: "Last7Days",
|
|
11426
|
+
LAST_24_HOURS: "Last24Hours",
|
|
11427
|
+
LAST_30_DAYS: "Last30Days",
|
|
11428
|
+
LAST_HOUR: "LastHour"
|
|
11429
|
+
};
|
|
11430
|
+
var ONE_HOUR = 60 * 60 * 1e3;
|
|
11431
|
+
var ONE_DAY = ONE_HOUR * 24;
|
|
11432
|
+
var getDateRangeTime = (value) => {
|
|
11433
|
+
const now = Date.now();
|
|
11434
|
+
switch (value) {
|
|
11435
|
+
case dateRangeOptions.LAST_HOUR:
|
|
11436
|
+
return new Date(now - ONE_HOUR);
|
|
11437
|
+
case dateRangeOptions.LAST_6_HOURS:
|
|
11438
|
+
return new Date(now - ONE_HOUR * 6);
|
|
11439
|
+
case dateRangeOptions.LAST_24_HOURS:
|
|
11440
|
+
return new Date(now - ONE_DAY);
|
|
11441
|
+
case dateRangeOptions.LAST_3_DAYS:
|
|
11442
|
+
return new Date(now - ONE_DAY * 3);
|
|
11443
|
+
case dateRangeOptions.LAST_7_DAYS:
|
|
11444
|
+
return new Date(now - ONE_DAY * 7);
|
|
11445
|
+
case dateRangeOptions.LAST_30_DAYS:
|
|
11446
|
+
return new Date(now - ONE_DAY * 30);
|
|
11447
|
+
default:
|
|
11448
|
+
return /* @__PURE__ */ new Date();
|
|
11449
|
+
}
|
|
11450
|
+
};
|
|
11451
|
+
|
|
11452
|
+
// dist/enterprise/catalog/catalogSearch/catalogSearchParamsToObject.js
|
|
11453
|
+
var catalogSearchParamsToObject = (catalogSearchParams) => {
|
|
11454
|
+
const filters = [];
|
|
11455
|
+
if (catalogSearchParams.type) {
|
|
11456
|
+
filters.push(generateTypeFilterString(catalogSearchParams.type));
|
|
11457
|
+
}
|
|
11458
|
+
if (catalogSearchParams.owner) {
|
|
11459
|
+
filters.push(`owner == "${catalogSearchParams.owner}"`);
|
|
11460
|
+
}
|
|
11461
|
+
if (catalogSearchParams.in) {
|
|
11462
|
+
filters.push(`path == "${catalogSearchParams.in}"`);
|
|
11463
|
+
}
|
|
11464
|
+
if (catalogSearchParams.startTime && catalogSearchParams.startTime !== dateRangeOptions.ALL) {
|
|
11465
|
+
filters.push(`date >= "${getDateRangeTime(catalogSearchParams.startTime)?.toISOString()}"`);
|
|
11466
|
+
}
|
|
11467
|
+
if (catalogSearchParams.lastModified && catalogSearchParams.lastModified !== dateRangeOptions.ALL) {
|
|
11468
|
+
filters.push(`lastModified >= "${getDateRangeTime(catalogSearchParams.lastModified)?.toISOString()}"`);
|
|
11469
|
+
}
|
|
11470
|
+
return {
|
|
11471
|
+
query: catalogSearchParams.searchText,
|
|
11472
|
+
...filters.length && { filter: filters.join(" && ") }
|
|
11473
|
+
};
|
|
11474
|
+
};
|
|
11475
|
+
var generateTypeFilterString = (typeFilter) => {
|
|
11476
|
+
if (typeFilter.size === 0) {
|
|
11477
|
+
return "";
|
|
11478
|
+
}
|
|
11479
|
+
return `category in [${Array.from(typeFilter).map((v2) => JSON.stringify(v2)).join(",")}]`;
|
|
11480
|
+
};
|
|
11481
|
+
|
|
11482
|
+
// dist/common/Query.js
|
|
11483
|
+
var Query = class {
|
|
11484
|
+
sql;
|
|
11485
|
+
context;
|
|
11486
|
+
constructor(sql, context2 = []) {
|
|
11487
|
+
this.sql = sql;
|
|
11488
|
+
this.context = context2;
|
|
11489
|
+
}
|
|
11490
|
+
equals(other) {
|
|
11491
|
+
return typeof other === typeof this && this.sql === other.sql && JSON.stringify(this.context) === JSON.stringify(other.context);
|
|
11492
|
+
}
|
|
11493
|
+
};
|
|
11494
|
+
|
|
11495
|
+
// dist/enterprise/catalog/catalogSearch/CatalogSearchResult.js
|
|
11496
|
+
var FolderSearchResult = class {
|
|
11497
|
+
catalogReference;
|
|
11498
|
+
owner;
|
|
11499
|
+
wiki;
|
|
11500
|
+
constructor(properties) {
|
|
11501
|
+
this.catalogReference = properties.catalogReference;
|
|
11502
|
+
this.owner = properties.owner;
|
|
11503
|
+
this.wiki = properties.wiki;
|
|
11504
|
+
}
|
|
11505
|
+
};
|
|
11506
|
+
var ReflectionSearchResult = class {
|
|
11507
|
+
catalogReference;
|
|
11508
|
+
createdAt;
|
|
11509
|
+
id;
|
|
11510
|
+
lastModifiedAt;
|
|
11511
|
+
name;
|
|
11512
|
+
constructor(properties) {
|
|
11513
|
+
this.catalogReference = properties.catalogReference;
|
|
11514
|
+
this.createdAt = properties.createdAt;
|
|
11515
|
+
this.id = properties.id;
|
|
11516
|
+
this.lastModifiedAt = properties.lastModifiedAt;
|
|
11517
|
+
this.name = properties.name;
|
|
11518
|
+
}
|
|
11519
|
+
};
|
|
11520
|
+
var SourceSearchResult = class {
|
|
11521
|
+
catalogReference;
|
|
11522
|
+
createdAt;
|
|
11523
|
+
owner;
|
|
11524
|
+
constructor(properties) {
|
|
11525
|
+
this.catalogReference = properties.catalogReference;
|
|
11526
|
+
this.createdAt = properties.createdAt;
|
|
11527
|
+
this.owner = properties.owner;
|
|
11528
|
+
}
|
|
11529
|
+
};
|
|
11530
|
+
var SpaceSearchResult = class {
|
|
11531
|
+
catalogReference;
|
|
11532
|
+
createdAt;
|
|
11533
|
+
lastModifiedAt;
|
|
11534
|
+
owner;
|
|
11535
|
+
wiki;
|
|
11536
|
+
constructor(properties) {
|
|
11537
|
+
this.catalogReference = properties.catalogReference;
|
|
11538
|
+
this.createdAt = properties.createdAt;
|
|
11539
|
+
this.lastModifiedAt = properties.lastModifiedAt;
|
|
11540
|
+
this.owner = properties.owner;
|
|
11541
|
+
this.wiki = properties.wiki;
|
|
11542
|
+
}
|
|
11543
|
+
};
|
|
11544
|
+
var TableSearchResult = class {
|
|
11545
|
+
columns;
|
|
11546
|
+
catalogReference;
|
|
11547
|
+
createdAt;
|
|
11548
|
+
labels;
|
|
11549
|
+
lastModifiedAt;
|
|
11550
|
+
owner;
|
|
11551
|
+
wiki;
|
|
11552
|
+
constructor(properties) {
|
|
11553
|
+
this.catalogReference = properties.catalogReference;
|
|
11554
|
+
this.columns = properties.columns;
|
|
11555
|
+
this.createdAt = properties.createdAt;
|
|
11556
|
+
this.labels = properties.labels;
|
|
11557
|
+
this.lastModifiedAt = properties.lastModifiedAt;
|
|
11558
|
+
this.wiki = properties.wiki;
|
|
11559
|
+
}
|
|
11560
|
+
};
|
|
11561
|
+
var ViewSearchResult = class {
|
|
11562
|
+
columns;
|
|
11563
|
+
catalogReference;
|
|
11564
|
+
createdAt;
|
|
11565
|
+
labels;
|
|
11566
|
+
lastModifiedAt;
|
|
11567
|
+
owner;
|
|
11568
|
+
wiki;
|
|
11569
|
+
constructor(properties) {
|
|
11570
|
+
this.columns = properties.columns;
|
|
11571
|
+
this.catalogReference = properties.catalogReference;
|
|
11572
|
+
this.createdAt = properties.createdAt;
|
|
11573
|
+
this.labels = properties.labels;
|
|
11574
|
+
this.lastModifiedAt = properties.lastModifiedAt;
|
|
11575
|
+
this.owner = properties.owner;
|
|
11576
|
+
this.wiki = properties.wiki;
|
|
11577
|
+
}
|
|
11578
|
+
};
|
|
11579
|
+
var FunctionSearchResult = class {
|
|
11580
|
+
catalogReference;
|
|
11581
|
+
createdAt;
|
|
11582
|
+
lastModifiedAt;
|
|
11583
|
+
owner;
|
|
11584
|
+
functionSql;
|
|
11585
|
+
constructor(properties) {
|
|
11586
|
+
this.catalogReference = properties.catalogReference;
|
|
11587
|
+
this.createdAt = properties.createdAt;
|
|
11588
|
+
this.lastModifiedAt = properties.lastModifiedAt;
|
|
11589
|
+
this.owner = properties.owner;
|
|
11590
|
+
this.functionSql = properties.functionSql;
|
|
11591
|
+
}
|
|
11592
|
+
};
|
|
11593
|
+
var ScriptSearchResult = class {
|
|
11594
|
+
content;
|
|
11595
|
+
createdAt;
|
|
11596
|
+
id;
|
|
11597
|
+
lastModifiedAt;
|
|
11598
|
+
name;
|
|
11599
|
+
owner;
|
|
11600
|
+
constructor(properties) {
|
|
11601
|
+
this.content = properties.content;
|
|
11602
|
+
this.createdAt = properties.createdAt;
|
|
11603
|
+
this.id = properties.id;
|
|
11604
|
+
this.lastModifiedAt = properties.lastModifiedAt;
|
|
11605
|
+
this.name = properties.name;
|
|
11606
|
+
this.owner = properties.owner;
|
|
11607
|
+
}
|
|
11608
|
+
};
|
|
11609
|
+
var JobSearchResult = class {
|
|
11610
|
+
id;
|
|
11611
|
+
queriedDatasets;
|
|
11612
|
+
sql;
|
|
11613
|
+
queryType;
|
|
11614
|
+
user;
|
|
11615
|
+
startTime;
|
|
11616
|
+
finishTime;
|
|
11617
|
+
state;
|
|
11618
|
+
error;
|
|
11619
|
+
constructor(properties) {
|
|
11620
|
+
this.id = properties.id;
|
|
11621
|
+
this.queriedDatasets = properties.queriedDatasets;
|
|
11622
|
+
this.sql = properties.sql;
|
|
11623
|
+
this.queryType = properties.queryType;
|
|
11624
|
+
this.user = properties.user;
|
|
11625
|
+
this.startTime = properties.startTime;
|
|
11626
|
+
this.finishTime = properties.finishTime;
|
|
11627
|
+
this.state = properties.state;
|
|
11628
|
+
this.error = properties.error;
|
|
11629
|
+
}
|
|
11630
|
+
};
|
|
11631
|
+
|
|
11632
|
+
// dist/enterprise/catalog/catalogSearch/mapSearchResult.js
|
|
11633
|
+
var mapSearchResult = (_catalogReferenceFromEntity) => (searchResult) => {
|
|
11634
|
+
switch (searchResult.category) {
|
|
11635
|
+
case "FOLDER":
|
|
11636
|
+
return new FolderSearchResult({
|
|
11637
|
+
catalogReference: _catalogReferenceFromEntity({
|
|
11638
|
+
path: searchResult.catalogObject.path,
|
|
11639
|
+
type: transformSearchTypeToCatalog(searchResult.catalogObject.type)
|
|
11640
|
+
}),
|
|
11641
|
+
owner: searchResult.catalogObject?.owner,
|
|
11642
|
+
wiki: searchResult.catalogObject.wiki || null
|
|
11643
|
+
});
|
|
11644
|
+
case "SCRIPT":
|
|
11645
|
+
return new ScriptSearchResult({
|
|
11646
|
+
content: searchResult.scriptObject.content,
|
|
11647
|
+
createdAt: new Date(searchResult.scriptObject.createdAt),
|
|
11648
|
+
id: searchResult.scriptObject.id,
|
|
11649
|
+
lastModifiedAt: new Date(searchResult.scriptObject.modifiedAt),
|
|
11650
|
+
name: searchResult.scriptObject.name,
|
|
11651
|
+
owner: searchResult.scriptObject.owner
|
|
11652
|
+
});
|
|
11653
|
+
case "REFLECTION":
|
|
11654
|
+
return new ReflectionSearchResult({
|
|
11655
|
+
catalogReference: _catalogReferenceFromEntity({
|
|
11656
|
+
path: searchResult.reflectionObject.datasetPath,
|
|
11657
|
+
type: transformSearchTypeToCatalog(searchResult.reflectionObject.datasetType.toUpperCase())
|
|
11658
|
+
}),
|
|
11659
|
+
createdAt: new Date(searchResult.reflectionObject.createdAt),
|
|
11660
|
+
id: searchResult.reflectionObject.id,
|
|
11661
|
+
lastModifiedAt: new Date(searchResult.reflectionObject.modifiedAt),
|
|
11662
|
+
name: searchResult.reflectionObject.name
|
|
11663
|
+
});
|
|
11664
|
+
case "SOURCE":
|
|
11665
|
+
return new SourceSearchResult({
|
|
11666
|
+
catalogReference: _catalogReferenceFromEntity({
|
|
11667
|
+
path: searchResult.catalogObject.path,
|
|
11668
|
+
type: transformSearchTypeToCatalog(searchResult.catalogObject.type)
|
|
11669
|
+
}),
|
|
11670
|
+
createdAt: new Date(searchResult.catalogObject.createdAt),
|
|
11671
|
+
owner: searchResult.catalogObject.owner
|
|
11672
|
+
});
|
|
11673
|
+
case "SPACE":
|
|
11674
|
+
return new SpaceSearchResult({
|
|
11675
|
+
catalogReference: _catalogReferenceFromEntity({
|
|
11676
|
+
path: searchResult.catalogObject.path,
|
|
11677
|
+
type: transformSearchTypeToCatalog(searchResult.catalogObject.type)
|
|
11678
|
+
}),
|
|
11679
|
+
createdAt: searchResult.catalogObject.createdAt ? new Date(searchResult.catalogObject.createdAt) : null,
|
|
11680
|
+
lastModifiedAt: searchResult.catalogObject.modifiedAt ? new Date(searchResult.catalogObject.modifiedAt) : null,
|
|
11681
|
+
owner: searchResult.catalogObject.owner,
|
|
11682
|
+
wiki: searchResult.catalogObject.wiki || null
|
|
11683
|
+
});
|
|
11684
|
+
case "TABLE":
|
|
11685
|
+
return new TableSearchResult({
|
|
11686
|
+
catalogReference: _catalogReferenceFromEntity({
|
|
11687
|
+
path: searchResult.catalogObject.path,
|
|
11688
|
+
type: transformSearchTypeToCatalog(searchResult.catalogObject.type)
|
|
11689
|
+
}),
|
|
11690
|
+
columns: searchResult.catalogObject.columns,
|
|
11691
|
+
createdAt: searchResult.catalogObject.createdAt ? new Date(searchResult.catalogObject.createdAt) : null,
|
|
11692
|
+
labels: searchResult.catalogObject.labels,
|
|
11693
|
+
lastModifiedAt: searchResult.catalogObject.modifiedAt ? new Date(searchResult.catalogObject.modifiedAt) : null,
|
|
11694
|
+
owner: searchResult.catalogObject.owner,
|
|
11695
|
+
wiki: searchResult.catalogObject.wiki || null
|
|
11696
|
+
});
|
|
11697
|
+
case "UDF":
|
|
11698
|
+
return new FunctionSearchResult({
|
|
11699
|
+
catalogReference: _catalogReferenceFromEntity({
|
|
11700
|
+
path: searchResult.catalogObject.path,
|
|
11701
|
+
type: transformSearchTypeToCatalog(searchResult.catalogObject.type)
|
|
11702
|
+
}),
|
|
11703
|
+
createdAt: new Date(searchResult.catalogObject.createdAt),
|
|
11704
|
+
functionSql: searchResult.catalogObject.functionSql,
|
|
11705
|
+
lastModifiedAt: new Date(searchResult.catalogObject.modifiedAt),
|
|
11706
|
+
owner: searchResult.catalogObject.owner
|
|
11707
|
+
});
|
|
11708
|
+
case "VIEW":
|
|
11709
|
+
return new ViewSearchResult({
|
|
11710
|
+
catalogReference: _catalogReferenceFromEntity({
|
|
11711
|
+
path: searchResult.catalogObject.path,
|
|
11712
|
+
type: transformSearchTypeToCatalog(searchResult.catalogObject.type)
|
|
11713
|
+
}),
|
|
11714
|
+
columns: searchResult.catalogObject.columns,
|
|
11715
|
+
createdAt: searchResult.catalogObject.createdAt ? new Date(searchResult.catalogObject.createdAt) : null,
|
|
11716
|
+
labels: searchResult.catalogObject.labels,
|
|
11717
|
+
lastModifiedAt: searchResult.catalogObject.modifiedAt ? new Date(searchResult.catalogObject.modifiedAt) : null,
|
|
11718
|
+
owner: searchResult.catalogObject.owner,
|
|
11719
|
+
wiki: searchResult.catalogObject.wiki || null
|
|
11720
|
+
});
|
|
11721
|
+
case "JOB":
|
|
11722
|
+
return new JobSearchResult({
|
|
11723
|
+
error: searchResult.jobObject.error,
|
|
11724
|
+
finishTime: new Date(searchResult.jobObject.finishTime),
|
|
11725
|
+
id: searchResult.jobObject.id,
|
|
11726
|
+
queriedDatasets: searchResult.jobObject.queriedDatasets.map((dataset) => _catalogReferenceFromEntity({
|
|
11727
|
+
path: dataset.datasetPath,
|
|
11728
|
+
type: transformSearchTypeToCatalog(dataset.datasetType)
|
|
11729
|
+
})),
|
|
11730
|
+
queryType: searchResult.jobObject.jobType,
|
|
11731
|
+
sql: new Query(searchResult.jobObject.sql),
|
|
11732
|
+
startTime: new Date(searchResult.jobObject.startTime),
|
|
11733
|
+
state: searchResult.jobObject.jobState,
|
|
11734
|
+
user: searchResult.jobObject.user
|
|
11735
|
+
});
|
|
11736
|
+
}
|
|
11737
|
+
};
|
|
11738
|
+
var transformSearchTypeToCatalog = (type) => {
|
|
11739
|
+
switch (type) {
|
|
11740
|
+
case "TABLE":
|
|
11741
|
+
return "DATASET_DIRECT";
|
|
11742
|
+
case "VIEW":
|
|
11743
|
+
return "DATASET_VIRTUAL";
|
|
11744
|
+
case "FOLDER":
|
|
11745
|
+
return "FOLDER";
|
|
11746
|
+
case "FUNCTION":
|
|
11747
|
+
return "FUNCTION";
|
|
11748
|
+
case "SPACE":
|
|
11749
|
+
return "SPACE";
|
|
11750
|
+
case "SOURCE":
|
|
11751
|
+
return "SOURCE";
|
|
11752
|
+
default:
|
|
11753
|
+
return "FILE";
|
|
11754
|
+
}
|
|
11755
|
+
};
|
|
11756
|
+
|
|
11757
|
+
// dist/enterprise/catalog/catalogSearch/createCatalogSearch.js
|
|
11758
|
+
var createCatalogSearch = (config3, _catalogReferenceFromEntity) => (params, { pageParam, signal } = {}) => config3.sonarV3Request("search", {
|
|
11759
|
+
body: JSON.stringify({
|
|
11760
|
+
...catalogSearchParamsToObject(params),
|
|
11761
|
+
maxResults: 50,
|
|
11762
|
+
pageToken: pageParam
|
|
11763
|
+
}),
|
|
11764
|
+
headers: {
|
|
11765
|
+
Accept: "application/json",
|
|
11766
|
+
"Content-Type": "application/json"
|
|
11767
|
+
},
|
|
11768
|
+
method: "POST",
|
|
11769
|
+
signal
|
|
11770
|
+
}).map((res) => res.json()).map((response) => {
|
|
11771
|
+
return {
|
|
11772
|
+
data: response.results.map(mapSearchResult(_catalogReferenceFromEntity)),
|
|
11773
|
+
nextPageToken: response.nextPageToken,
|
|
11774
|
+
sessionId: response.sessionId
|
|
11775
|
+
};
|
|
9782
11776
|
});
|
|
9783
|
-
function duration2(params) {
|
|
9784
|
-
return _isoDuration(ZodMiniISODuration, params);
|
|
9785
|
-
}
|
|
9786
11777
|
|
|
9787
11778
|
// dist/cloud/catalog/FileUpload.js
|
|
9788
11779
|
var uploadExtensionSchema = _enum(["csv", "json", "parquet"]);
|
|
@@ -12146,7 +14137,7 @@ var DremioCloud = (() => {
|
|
|
12146
14137
|
}
|
|
12147
14138
|
function fromAsyncIterable(asyncIterable) {
|
|
12148
14139
|
return new Observable(function(subscriber) {
|
|
12149
|
-
|
|
14140
|
+
process2(asyncIterable, subscriber).catch(function(err) {
|
|
12150
14141
|
return subscriber.error(err);
|
|
12151
14142
|
});
|
|
12152
14143
|
});
|
|
@@ -12154,7 +14145,7 @@ var DremioCloud = (() => {
|
|
|
12154
14145
|
function fromReadableStreamLike(readableStream) {
|
|
12155
14146
|
return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));
|
|
12156
14147
|
}
|
|
12157
|
-
function
|
|
14148
|
+
function process2(asyncIterable, subscriber) {
|
|
12158
14149
|
var asyncIterable_1, asyncIterable_1_1;
|
|
12159
14150
|
var e_2, _a;
|
|
12160
14151
|
return __awaiter3(this, void 0, void 0, function() {
|
|
@@ -14258,6 +16249,17 @@ var DremioCloud = (() => {
|
|
|
14258
16249
|
signal
|
|
14259
16250
|
});
|
|
14260
16251
|
}
|
|
16252
|
+
patchParentRoles(userId, params, { signal } = {}) {
|
|
16253
|
+
return this.#config.v3Request(`users/${userId}/parent-roles`, {
|
|
16254
|
+
body: JSON.stringify(params),
|
|
16255
|
+
headers: {
|
|
16256
|
+
Accept: "application/json",
|
|
16257
|
+
"Content-Type": "application/json"
|
|
16258
|
+
},
|
|
16259
|
+
method: "PATCH",
|
|
16260
|
+
signal
|
|
16261
|
+
}).map((res) => res.json());
|
|
16262
|
+
}
|
|
14261
16263
|
removeParentRole(userId, roleId, { signal } = {}) {
|
|
14262
16264
|
return this.#config.v3Request(`users/${userId}/parent-roles/${roleId}`, {
|
|
14263
16265
|
method: "DELETE",
|