@layerzerolabs/vm-tooling 0.0.30
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/bin/lz-tool.cjs +18 -0
- package/dist/2TPNSECS.cjs +274 -0
- package/dist/2TPNSECS.cjs.map +1 -0
- package/dist/33GUXAT7.js +67 -0
- package/dist/33GUXAT7.js.map +1 -0
- package/dist/3AX3IZXK.cjs +79 -0
- package/dist/3AX3IZXK.cjs.map +1 -0
- package/dist/3BKFBGX3.cjs +17 -0
- package/dist/3BKFBGX3.cjs.map +1 -0
- package/dist/3EOFF6NK.cjs +51 -0
- package/dist/3EOFF6NK.cjs.map +1 -0
- package/dist/4NINFZK7.cjs +38 -0
- package/dist/4NINFZK7.cjs.map +1 -0
- package/dist/4XKJ5GJB.js +793 -0
- package/dist/4XKJ5GJB.js.map +1 -0
- package/dist/5EKZTTNT.js +82 -0
- package/dist/5EKZTTNT.js.map +1 -0
- package/dist/5MIIPWV7.cjs +75 -0
- package/dist/5MIIPWV7.cjs.map +1 -0
- package/dist/5N3Q6FCT.cjs +4 -0
- package/dist/5N3Q6FCT.cjs.map +1 -0
- package/dist/63H5FLN6.cjs +216 -0
- package/dist/63H5FLN6.cjs.map +1 -0
- package/dist/6A3MRQDI.js +3164 -0
- package/dist/6A3MRQDI.js.map +1 -0
- package/dist/6NLXVH5R.cjs +1089 -0
- package/dist/6NLXVH5R.cjs.map +1 -0
- package/dist/6UWCX7SA.js +60 -0
- package/dist/6UWCX7SA.js.map +1 -0
- package/dist/7EXYTS34.js +125 -0
- package/dist/7EXYTS34.js.map +1 -0
- package/dist/7LKSKL4C.cjs +64 -0
- package/dist/7LKSKL4C.cjs.map +1 -0
- package/dist/7PKC46XS.js +244 -0
- package/dist/7PKC46XS.js.map +1 -0
- package/dist/7SRULFYS.cjs +55 -0
- package/dist/7SRULFYS.cjs.map +1 -0
- package/dist/AH2UQL5E.js +6 -0
- package/dist/AH2UQL5E.js.map +1 -0
- package/dist/AOG2M3LV.cjs +122 -0
- package/dist/AOG2M3LV.cjs.map +1 -0
- package/dist/BA2LAHMY.js +43 -0
- package/dist/BA2LAHMY.js.map +1 -0
- package/dist/BHBC6Q3Y.js +47 -0
- package/dist/BHBC6Q3Y.js.map +1 -0
- package/dist/CQHBPXZ2.cjs +94 -0
- package/dist/CQHBPXZ2.cjs.map +1 -0
- package/dist/CSNPKKTO.js +125 -0
- package/dist/CSNPKKTO.js.map +1 -0
- package/dist/E75FXJNJ.js +393 -0
- package/dist/E75FXJNJ.js.map +1 -0
- package/dist/EASTPCLB.js +195 -0
- package/dist/EASTPCLB.js.map +1 -0
- package/dist/EJCGU7LP.cjs +252 -0
- package/dist/EJCGU7LP.cjs.map +1 -0
- package/dist/EKUFNO5X.js +3 -0
- package/dist/EKUFNO5X.js.map +1 -0
- package/dist/EQPMZDRH.js +63 -0
- package/dist/EQPMZDRH.js.map +1 -0
- package/dist/F5UPK5ZZ.js +2445 -0
- package/dist/F5UPK5ZZ.js.map +1 -0
- package/dist/GAZMRBLT.js +36 -0
- package/dist/GAZMRBLT.js.map +1 -0
- package/dist/JBULQDMK.js +1064 -0
- package/dist/JBULQDMK.js.map +1 -0
- package/dist/JY6PMFYV.js +60 -0
- package/dist/JY6PMFYV.js.map +1 -0
- package/dist/KTOZRP5U.cjs +404 -0
- package/dist/KTOZRP5U.cjs.map +1 -0
- package/dist/L3BNN3KF.cjs +2490 -0
- package/dist/L3BNN3KF.cjs.map +1 -0
- package/dist/L75NPWJX.cjs +204 -0
- package/dist/L75NPWJX.cjs.map +1 -0
- package/dist/LBQPL6VK.cjs +46 -0
- package/dist/LBQPL6VK.cjs.map +1 -0
- package/dist/LUG7USNZ.js +120 -0
- package/dist/LUG7USNZ.js.map +1 -0
- package/dist/LXXIBLJQ.js +15 -0
- package/dist/LXXIBLJQ.js.map +1 -0
- package/dist/MBTHP667.cjs +39 -0
- package/dist/MBTHP667.cjs.map +1 -0
- package/dist/NMC54VEB.cjs +128 -0
- package/dist/NMC54VEB.cjs.map +1 -0
- package/dist/NX4KBEWA.cjs +13 -0
- package/dist/NX4KBEWA.cjs.map +1 -0
- package/dist/OU33HN4T.js +92 -0
- package/dist/OU33HN4T.js.map +1 -0
- package/dist/OVH4V3F6.js +77 -0
- package/dist/OVH4V3F6.js.map +1 -0
- package/dist/OWJM6QQP.js +233 -0
- package/dist/OWJM6QQP.js.map +1 -0
- package/dist/PC55ZLZD.cjs +66 -0
- package/dist/PC55ZLZD.cjs.map +1 -0
- package/dist/PGRNZALP.cjs +3427 -0
- package/dist/PGRNZALP.cjs.map +1 -0
- package/dist/PXT4MQYT.cjs +3191 -0
- package/dist/PXT4MQYT.cjs.map +1 -0
- package/dist/QMIU5HY3.cjs +174 -0
- package/dist/QMIU5HY3.cjs.map +1 -0
- package/dist/QNKHVJNZ.js +43 -0
- package/dist/QNKHVJNZ.js.map +1 -0
- package/dist/QSKQ7BQT.cjs +111 -0
- package/dist/QSKQ7BQT.cjs.map +1 -0
- package/dist/QWROCDWJ.cjs +315 -0
- package/dist/QWROCDWJ.cjs.map +1 -0
- package/dist/RAIK357L.js +214 -0
- package/dist/RAIK357L.js.map +1 -0
- package/dist/RLUL6JFM.cjs +4 -0
- package/dist/RLUL6JFM.cjs.map +1 -0
- package/dist/RVOOJEDH.js +3385 -0
- package/dist/RVOOJEDH.js.map +1 -0
- package/dist/RVTTXEXB.cjs +235 -0
- package/dist/RVTTXEXB.cjs.map +1 -0
- package/dist/SKAV3OJX.js +118 -0
- package/dist/SKAV3OJX.js.map +1 -0
- package/dist/TA2DABDY.cjs +126 -0
- package/dist/TA2DABDY.cjs.map +1 -0
- package/dist/THMQMWYA.cjs +17 -0
- package/dist/THMQMWYA.cjs.map +1 -0
- package/dist/TPVIFJX4.js +236 -0
- package/dist/TPVIFJX4.js.map +1 -0
- package/dist/VDH76SF6.cjs +132 -0
- package/dist/VDH76SF6.cjs.map +1 -0
- package/dist/VUOMXK5T.js +6 -0
- package/dist/VUOMXK5T.js.map +1 -0
- package/dist/W3KWDJYA.cjs +85 -0
- package/dist/W3KWDJYA.cjs.map +1 -0
- package/dist/WAGFMHUT.js +311 -0
- package/dist/WAGFMHUT.js.map +1 -0
- package/dist/WBKUP4MX.js +168 -0
- package/dist/WBKUP4MX.js.map +1 -0
- package/dist/XH4FQTBY.cjs +62 -0
- package/dist/XH4FQTBY.cjs.map +1 -0
- package/dist/YTUEW27V.js +109 -0
- package/dist/YTUEW27V.js.map +1 -0
- package/dist/YVV5I7A5.js +15 -0
- package/dist/YVV5I7A5.js.map +1 -0
- package/dist/Z5NOJAAG.cjs +796 -0
- package/dist/Z5NOJAAG.cjs.map +1 -0
- package/dist/ZEW74YLA.js +3 -0
- package/dist/ZEW74YLA.js.map +1 -0
- package/dist/config/index.cjs +27 -0
- package/dist/config/index.cjs.map +1 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +6 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/tools.cjs +15 -0
- package/dist/config/tools.cjs.map +1 -0
- package/dist/config/tools.d.ts +6 -0
- package/dist/config/tools.d.ts.map +1 -0
- package/dist/config/tools.js +6 -0
- package/dist/config/tools.js.map +1 -0
- package/dist/config/version-matrices.cjs +13 -0
- package/dist/config/version-matrices.cjs.map +1 -0
- package/dist/config/version-matrices.d.ts +7 -0
- package/dist/config/version-matrices.d.ts.map +1 -0
- package/dist/config/version-matrices.js +4 -0
- package/dist/config/version-matrices.js.map +1 -0
- package/dist/core/compatibility.cjs +13 -0
- package/dist/core/compatibility.cjs.map +1 -0
- package/dist/core/compatibility.d.ts +8 -0
- package/dist/core/compatibility.d.ts.map +1 -0
- package/dist/core/compatibility.js +4 -0
- package/dist/core/compatibility.js.map +1 -0
- package/dist/core/index.cjs +35 -0
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +10 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/tool-executor.cjs +18 -0
- package/dist/core/tool-executor.cjs.map +1 -0
- package/dist/core/tool-executor.d.ts +12 -0
- package/dist/core/tool-executor.d.ts.map +1 -0
- package/dist/core/tool-executor.js +9 -0
- package/dist/core/tool-executor.js.map +1 -0
- package/dist/core/version-resolver.cjs +25 -0
- package/dist/core/version-resolver.cjs.map +1 -0
- package/dist/core/version-resolver.d.ts +30 -0
- package/dist/core/version-resolver.d.ts.map +1 -0
- package/dist/core/version-resolver.js +8 -0
- package/dist/core/version-resolver.js.map +1 -0
- package/dist/display/formatters.cjs +17 -0
- package/dist/display/formatters.cjs.map +1 -0
- package/dist/display/formatters.d.ts +15 -0
- package/dist/display/formatters.d.ts.map +1 -0
- package/dist/display/formatters.js +4 -0
- package/dist/display/formatters.js.map +1 -0
- package/dist/display/index.cjs +30 -0
- package/dist/display/index.cjs.map +1 -0
- package/dist/display/index.d.ts +3 -0
- package/dist/display/index.d.ts.map +1 -0
- package/dist/display/index.js +9 -0
- package/dist/display/index.js.map +1 -0
- package/dist/display/version-display.cjs +21 -0
- package/dist/display/version-display.cjs.map +1 -0
- package/dist/display/version-display.d.ts +9 -0
- package/dist/display/version-display.d.ts.map +1 -0
- package/dist/display/version-display.js +8 -0
- package/dist/display/version-display.js.map +1 -0
- package/dist/index.cjs +111 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +103 -0
- package/dist/index.js.map +1 -0
- package/dist/scripts/generate-github-matrix.cjs +1946 -0
- package/dist/scripts/generate-github-matrix.cjs.map +1 -0
- package/dist/scripts/generate-github-matrix.d.ts +2 -0
- package/dist/scripts/generate-github-matrix.d.ts.map +1 -0
- package/dist/scripts/generate-github-matrix.js +1944 -0
- package/dist/scripts/generate-github-matrix.js.map +1 -0
- package/dist/types/docker.cjs +6 -0
- package/dist/types/docker.cjs.map +1 -0
- package/dist/types/docker.d.ts +10 -0
- package/dist/types/docker.d.ts.map +1 -0
- package/dist/types/docker.js +3 -0
- package/dist/types/docker.js.map +1 -0
- package/dist/types/index.cjs +6 -0
- package/dist/types/index.cjs.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/tool.cjs +6 -0
- package/dist/types/tool.cjs.map +1 -0
- package/dist/types/tool.d.ts +27 -0
- package/dist/types/tool.d.ts.map +1 -0
- package/dist/types/tool.js +3 -0
- package/dist/types/tool.js.map +1 -0
- package/dist/types/version.cjs +6 -0
- package/dist/types/version.cjs.map +1 -0
- package/dist/types/version.d.ts +33 -0
- package/dist/types/version.d.ts.map +1 -0
- package/dist/types/version.js +3 -0
- package/dist/types/version.js.map +1 -0
- package/dist/utils/finder-utils.cjs +39 -0
- package/dist/utils/finder-utils.cjs.map +1 -0
- package/dist/utils/finder-utils.d.ts +31 -0
- package/dist/utils/finder-utils.d.ts.map +1 -0
- package/dist/utils/finder-utils.js +6 -0
- package/dist/utils/finder-utils.js.map +1 -0
- package/dist/utils/index.cjs +55 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/version-utils.cjs +27 -0
- package/dist/utils/version-utils.cjs.map +1 -0
- package/dist/utils/version-utils.d.ts +18 -0
- package/dist/utils/version-utils.d.ts.map +1 -0
- package/dist/utils/version-utils.js +6 -0
- package/dist/utils/version-utils.js.map +1 -0
- package/dist/utils.cjs +17 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.ts +9 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +4 -0
- package/dist/utils.js.map +1 -0
- package/package.json +57 -0
package/bin/lz-tool.cjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
|
|
5
|
+
const builtVersion = path.join(__dirname, '../dist/index.cjs');
|
|
6
|
+
|
|
7
|
+
if (fs.existsSync(builtVersion)) {
|
|
8
|
+
require(builtVersion);
|
|
9
|
+
} else {
|
|
10
|
+
console.error('❌ @layerzerolabs/vm-tooling has not been built yet!');
|
|
11
|
+
console.error('');
|
|
12
|
+
console.error('Please run:');
|
|
13
|
+
console.error(' pnpm --filter @layerzerolabs/vm-tooling build');
|
|
14
|
+
console.error('');
|
|
15
|
+
console.error('Or build all packages:');
|
|
16
|
+
console.error(' pnpm build');
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _3EOFF6NK_cjs = require('./3EOFF6NK.cjs');
|
|
4
|
+
var QSKQ7BQT_cjs = require('./QSKQ7BQT.cjs');
|
|
5
|
+
var NX4KBEWA_cjs = require('./NX4KBEWA.cjs');
|
|
6
|
+
var fs = require('fs');
|
|
7
|
+
var semver = require('semver');
|
|
8
|
+
|
|
9
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
|
|
11
|
+
function _interopNamespace(e) {
|
|
12
|
+
if (e && e.__esModule) return e;
|
|
13
|
+
var n = Object.create(null);
|
|
14
|
+
if (e) {
|
|
15
|
+
Object.keys(e).forEach(function (k) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return e[k]; }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n.default = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
30
|
+
var semver__namespace = /*#__PURE__*/_interopNamespace(semver);
|
|
31
|
+
|
|
32
|
+
function versionsSatisfied(current, expected) {
|
|
33
|
+
return semver__namespace.satisfies(current.version, expected.version);
|
|
34
|
+
}
|
|
35
|
+
NX4KBEWA_cjs.__name(versionsSatisfied, "versionsSatisfied");
|
|
36
|
+
function parseAnchorTomlVersion(cwd, name) {
|
|
37
|
+
const projectFolder = _3EOFF6NK_cjs.findParentDirectoryWithFile(cwd, "Anchor.toml");
|
|
38
|
+
if (projectFolder === null) {
|
|
39
|
+
throw new Error("Anchor project not found");
|
|
40
|
+
}
|
|
41
|
+
const toml = fs__default.default.readFileSync(projectFolder.file, "utf-8");
|
|
42
|
+
const test = /^([a-z]+)(?:_version ?= ?")((?:[0-9]+\.?){3})(?:")$/gm;
|
|
43
|
+
let match;
|
|
44
|
+
while (match = test.exec(toml)) {
|
|
45
|
+
const [_, matchedName, version] = match;
|
|
46
|
+
if (matchedName === name) {
|
|
47
|
+
return {
|
|
48
|
+
version
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
throw new Error(`${name} version not found in ${projectFolder.file}`);
|
|
53
|
+
}
|
|
54
|
+
NX4KBEWA_cjs.__name(parseAnchorTomlVersion, "parseAnchorTomlVersion");
|
|
55
|
+
function findSemVersionFromString(input) {
|
|
56
|
+
const match = input.match(/^(solana-cli|anchor-cli|aptos)\s+(([0-9]+\.?){3}).*?/m);
|
|
57
|
+
if (match === null || match.length < 3) {
|
|
58
|
+
throw new Error(`Invalid semver version: ${input}`);
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
version: match[2]
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
NX4KBEWA_cjs.__name(findSemVersionFromString, "findSemVersionFromString");
|
|
65
|
+
function validateToolVersion(toolName, version) {
|
|
66
|
+
const supportedVersions = getToolSupportedVersions(toolName);
|
|
67
|
+
return supportedVersions.includes(version);
|
|
68
|
+
}
|
|
69
|
+
NX4KBEWA_cjs.__name(validateToolVersion, "validateToolVersion");
|
|
70
|
+
|
|
71
|
+
// src/config/tools.ts
|
|
72
|
+
var tools = [
|
|
73
|
+
{
|
|
74
|
+
name: "hardhat",
|
|
75
|
+
toolType: "evm",
|
|
76
|
+
fromImage: "evm",
|
|
77
|
+
entryPoint: "/usr/local/lib/node_modules/hardhat/internal/cli/bootstrap.js",
|
|
78
|
+
defaultVolumes: [],
|
|
79
|
+
parseVersionCliVersionOutput: /* @__PURE__ */ NX4KBEWA_cjs.__name((output) => {
|
|
80
|
+
console.log("output", output);
|
|
81
|
+
return {
|
|
82
|
+
version: "2.19.3"
|
|
83
|
+
};
|
|
84
|
+
}, "parseVersionCliVersionOutput"),
|
|
85
|
+
versionCliArguments: [
|
|
86
|
+
"--version"
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: "anchor",
|
|
91
|
+
toolType: "solana",
|
|
92
|
+
fromImage: "solana-anchor",
|
|
93
|
+
defaultVolumes: [
|
|
94
|
+
{
|
|
95
|
+
type: "isolate",
|
|
96
|
+
containerPath: "/usr/local/cargo",
|
|
97
|
+
name: "lz-tooling-cargo-cache"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
type: "isolate",
|
|
101
|
+
containerPath: "/usr/local/rustup",
|
|
102
|
+
name: "lz-tooling-rustup-cache"
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
getSecondaryVersionCheckValue: /* @__PURE__ */ NX4KBEWA_cjs.__name(({ cwd }) => {
|
|
106
|
+
return parseAnchorTomlVersion(cwd, "anchor");
|
|
107
|
+
}, "getSecondaryVersionCheckValue")
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: "solana",
|
|
111
|
+
toolType: "solana",
|
|
112
|
+
fromImage: "solana-anchor",
|
|
113
|
+
defaultVolumes: [
|
|
114
|
+
{
|
|
115
|
+
type: "isolate",
|
|
116
|
+
containerPath: "/usr/local/cargo",
|
|
117
|
+
name: "lz-tooling-cargo-cache"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
type: "isolate",
|
|
121
|
+
containerPath: "/usr/local/rustup",
|
|
122
|
+
name: "lz-tooling-rustup-cache"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
getSecondaryVersionCheckValue: /* @__PURE__ */ NX4KBEWA_cjs.__name(({ cwd }) => {
|
|
126
|
+
return parseAnchorTomlVersion(cwd, "solana");
|
|
127
|
+
}, "getSecondaryVersionCheckValue")
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "aptos",
|
|
131
|
+
toolType: "aptos",
|
|
132
|
+
fromImage: "aptos",
|
|
133
|
+
defaultVolumes: [
|
|
134
|
+
{
|
|
135
|
+
type: "isolate",
|
|
136
|
+
containerPath: "/root/.move",
|
|
137
|
+
name: "lz-tooling-aptos-cache"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
versionCliArguments: [
|
|
141
|
+
"--version"
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: "initiad",
|
|
146
|
+
toolType: "initia",
|
|
147
|
+
fromImage: "initia",
|
|
148
|
+
entryPoint: "initiad",
|
|
149
|
+
defaultVolumes: [
|
|
150
|
+
{
|
|
151
|
+
type: "isolate",
|
|
152
|
+
containerPath: "/root/.move",
|
|
153
|
+
name: "lz-tooling-initia-cache"
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
versionCliArguments: [
|
|
157
|
+
"--version"
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: "blueprint",
|
|
162
|
+
toolType: "ton",
|
|
163
|
+
fromImage: "ton",
|
|
164
|
+
defaultVolumes: []
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
name: "scarb",
|
|
168
|
+
toolType: "starknet",
|
|
169
|
+
fromImage: "starknet",
|
|
170
|
+
defaultVolumes: []
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
name: "sui",
|
|
174
|
+
toolType: "sui",
|
|
175
|
+
fromImage: "sui",
|
|
176
|
+
defaultVolumes: [
|
|
177
|
+
{
|
|
178
|
+
type: "isolate",
|
|
179
|
+
containerPath: "/root/.move",
|
|
180
|
+
name: "lz-tooling-sui-cache"
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
versionCliArguments: [
|
|
184
|
+
"--version"
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
];
|
|
188
|
+
|
|
189
|
+
// src/config/index.ts
|
|
190
|
+
var AWS_ACCOUNT_ID = "438003944538";
|
|
191
|
+
var AWS_REGION = "us-east-1";
|
|
192
|
+
|
|
193
|
+
// src/utils/finder-utils.ts
|
|
194
|
+
function findToolByName(toolName) {
|
|
195
|
+
return tools.find((tool) => tool.name === toolName);
|
|
196
|
+
}
|
|
197
|
+
NX4KBEWA_cjs.__name(findToolByName, "findToolByName");
|
|
198
|
+
function findToolsByType(type) {
|
|
199
|
+
return tools.filter((tool) => tool.toolType === type);
|
|
200
|
+
}
|
|
201
|
+
NX4KBEWA_cjs.__name(findToolsByType, "findToolsByType");
|
|
202
|
+
function getToolType(toolName) {
|
|
203
|
+
const tool = findToolByName(toolName);
|
|
204
|
+
return tool?.toolType;
|
|
205
|
+
}
|
|
206
|
+
NX4KBEWA_cjs.__name(getToolType, "getToolType");
|
|
207
|
+
function findMatrixByType(type) {
|
|
208
|
+
return QSKQ7BQT_cjs.versionMatrices.find((matrix) => matrix.toolType === type);
|
|
209
|
+
}
|
|
210
|
+
NX4KBEWA_cjs.__name(findMatrixByType, "findMatrixByType");
|
|
211
|
+
function findDefaultCombination(matrix) {
|
|
212
|
+
const recommended = matrix.combinations.find((combo) => combo.isRecommended === true);
|
|
213
|
+
if (recommended) {
|
|
214
|
+
return recommended;
|
|
215
|
+
}
|
|
216
|
+
if (matrix.combinations.length === 0) {
|
|
217
|
+
throw new Error(`No combinations found in matrix for type '${matrix.toolType}'`);
|
|
218
|
+
}
|
|
219
|
+
return matrix.combinations[0];
|
|
220
|
+
}
|
|
221
|
+
NX4KBEWA_cjs.__name(findDefaultCombination, "findDefaultCombination");
|
|
222
|
+
function getToolDefaultVersion(toolName) {
|
|
223
|
+
const tool = findToolByName(toolName);
|
|
224
|
+
if (!tool) {
|
|
225
|
+
throw new Error(`Tool '${toolName}' not found`);
|
|
226
|
+
}
|
|
227
|
+
const matrix = findMatrixByType(tool.toolType);
|
|
228
|
+
if (!matrix) {
|
|
229
|
+
throw new Error(`No version matrix found for tool type '${tool.toolType}'`);
|
|
230
|
+
}
|
|
231
|
+
const defaultCombination = findDefaultCombination(matrix);
|
|
232
|
+
const defaultVersion = defaultCombination.versions[toolName];
|
|
233
|
+
if (defaultVersion == null || defaultVersion.length === 0) {
|
|
234
|
+
throw new Error(`No default version found for tool '${toolName}' in matrix`);
|
|
235
|
+
}
|
|
236
|
+
return defaultVersion;
|
|
237
|
+
}
|
|
238
|
+
NX4KBEWA_cjs.__name(getToolDefaultVersion, "getToolDefaultVersion");
|
|
239
|
+
function getToolSupportedVersions(toolName) {
|
|
240
|
+
const tool = findToolByName(toolName);
|
|
241
|
+
if (!tool) {
|
|
242
|
+
throw new Error(`Tool '${toolName}' not found`);
|
|
243
|
+
}
|
|
244
|
+
const matrix = findMatrixByType(tool.toolType);
|
|
245
|
+
if (!matrix) {
|
|
246
|
+
throw new Error(`No version matrix found for tool type '${tool.toolType}'`);
|
|
247
|
+
}
|
|
248
|
+
const versions = /* @__PURE__ */ new Set();
|
|
249
|
+
for (const combination of matrix.combinations) {
|
|
250
|
+
const version = combination.versions[toolName];
|
|
251
|
+
if (version != null && version.length > 0) {
|
|
252
|
+
versions.add(version);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
return Array.from(versions).sort();
|
|
256
|
+
}
|
|
257
|
+
NX4KBEWA_cjs.__name(getToolSupportedVersions, "getToolSupportedVersions");
|
|
258
|
+
|
|
259
|
+
exports.AWS_ACCOUNT_ID = AWS_ACCOUNT_ID;
|
|
260
|
+
exports.AWS_REGION = AWS_REGION;
|
|
261
|
+
exports.findDefaultCombination = findDefaultCombination;
|
|
262
|
+
exports.findMatrixByType = findMatrixByType;
|
|
263
|
+
exports.findSemVersionFromString = findSemVersionFromString;
|
|
264
|
+
exports.findToolByName = findToolByName;
|
|
265
|
+
exports.findToolsByType = findToolsByType;
|
|
266
|
+
exports.getToolDefaultVersion = getToolDefaultVersion;
|
|
267
|
+
exports.getToolSupportedVersions = getToolSupportedVersions;
|
|
268
|
+
exports.getToolType = getToolType;
|
|
269
|
+
exports.parseAnchorTomlVersion = parseAnchorTomlVersion;
|
|
270
|
+
exports.tools = tools;
|
|
271
|
+
exports.validateToolVersion = validateToolVersion;
|
|
272
|
+
exports.versionsSatisfied = versionsSatisfied;
|
|
273
|
+
//# sourceMappingURL=2TPNSECS.cjs.map
|
|
274
|
+
//# sourceMappingURL=2TPNSECS.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/version-utils.ts","../src/config/tools.ts","../src/config/index.ts","../src/utils/finder-utils.ts"],"names":["versionsSatisfied","current","expected","satisfies","version","parseAnchorTomlVersion","cwd","name","projectFolder","findParentDirectoryWithFile","Error","toml","fs","readFileSync","file","test","match","exec","_","matchedName","findSemVersionFromString","input","length","validateToolVersion","toolName","supportedVersions","getToolSupportedVersions","includes","tools","toolType","fromImage","entryPoint","defaultVolumes","parseVersionCliVersionOutput","output","console","log","versionCliArguments","type","containerPath","getSecondaryVersionCheckValue","__name","AWS_ACCOUNT_ID","AWS_REGION","findToolByName","find","tool","findToolsByType","filter","getToolType","findMatrixByType","versionMatrices","matrix","findDefaultCombination","recommended","combinations","combo","isRecommended","getToolDefaultVersion","defaultCombination","defaultVersion","versions","Set","combination","add","Array","from","sort"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUO,SAASA,iBAAAA,CAAkBC,SAAkBC,QAAAA,EAAiB;AACjE,EAAA,OAAcC,iBAAAA,CAA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A,CAAM,CAAA,mCAAA,EAAsCc,QAAAA,CAAAA,WAAAA,CAAqB,CAAA;AAC/E,EAAA;AAEA,EAAA,OAAOoC,cAAAA;AACX;AAlBgBF,mBAAAA,CAAAA,qBAAAA,EAAAA,uBAAAA,CAAAA;AAuBT,SAAShC,yBAAyBF,QAAAA,EAAgB;AACrD,EAAA,MAAMsB,IAAAA,GAAOF,eAAepB,QAAAA,CAAAA;AAC5B,EAAA,IAAI,CAACsB,IAAAA,EAAM;AACP,IAAA,MAAM,IAAIpC,KAAAA,CAAM,CAAA,MAAA,EAASc,QAAAA,CAAAA,WAAAA,CAAqB,CAAA;AAClD,EAAA;AAEA,EAAA,MAAM4B,MAAAA,GAASF,gBAAAA,CAAiBJ,IAAAA,CAAKjB,QAAQ,CAAA;AAC7C,EAAA,IAAI,CAACuB,MAAAA,EAAQ;AACT,IAAA,MAAM,IAAI1C,KAAAA,CAAM,CAAA,uCAAA,EAA0CoC,IAAAA,CAAKjB,QAAQ,CAAA,CAAA,CAAG,CAAA;AAC9E,EAAA;AAGA,EAAA,MAAMgC,QAAAA,uBAAeC,GAAAA,EAAAA;AACrB,EAAA,KAAA,MAAWC,WAAAA,IAAeX,OAAOG,YAAAA,EAAc;AAC3C,IAAA,MAAMnD,OAAAA,GAAU2D,WAAAA,CAAYF,QAAAA,CAASrC,QAAAA,CAAAA;AACrC,IAAA,IAAIpB,OAAAA,IAAW,IAAA,IAAQA,OAAAA,CAAQkB,MAAAA,GAAS,CAAA,EAAG;AACvCuC,MAAAA,QAAAA,CAASG,IAAI5D,OAAAA,CAAAA;AACjB,IAAA;AACJ,EAAA;AAEA,EAAA,OAAO6D,KAAAA,CAAMC,IAAAA,CAAKL,QAAAA,CAAAA,CAAUM,IAAAA,EAAI;AACpC;AArBgBzC,mBAAAA,CAAAA,wBAAAA,EAAAA,0BAAAA,CAAAA","file":"2TPNSECS.cjs","sourcesContent":["import fs from 'fs';\nimport * as semver from 'semver';\n\nimport type { Version } from '../types';\nimport { findParentDirectoryWithFile } from '../utils';\nimport { getToolSupportedVersions } from './finder-utils';\n\n/**\n * Check if current version satisfies expected version using semver\n */\nexport function versionsSatisfied(current: Version, expected: Version): boolean {\n return semver.satisfies(current.version, expected.version);\n}\n\n/**\n * Parse anchor/solana version from Anchor.toml file\n */\nexport function parseAnchorTomlVersion(cwd: string, name: 'anchor' | 'solana'): Version {\n const projectFolder = findParentDirectoryWithFile(cwd, 'Anchor.toml');\n\n if (projectFolder === null) {\n throw new Error('Anchor project not found');\n }\n\n const toml = fs.readFileSync(projectFolder.file, 'utf-8');\n\n const test = /^([a-z]+)(?:_version ?= ?\")((?:[0-9]+\\.?){3})(?:\")$/gm;\n\n let match;\n while ((match = test.exec(toml))) {\n const [_, matchedName, version] = match;\n if (matchedName === name) {\n return { version };\n }\n }\n\n throw new Error(`${name} version not found in ${projectFolder.file}`);\n}\n\n/**\n * Find semantic version from string output\n */\nexport function findSemVersionFromString(input: string): Version {\n const match = input.match(/^(solana-cli|anchor-cli|aptos)\\s+(([0-9]+\\.?){3}).*?/m);\n if (match === null || match.length < 3) {\n throw new Error(`Invalid semver version: ${input}`);\n }\n\n return { version: match[2] };\n}\n\n/**\n * Validate if a tool version is in the supported versions list\n */\nexport function validateToolVersion(toolName: string, version: string): boolean {\n const supportedVersions = getToolSupportedVersions(toolName);\n return supportedVersions.includes(version);\n}\n","import type { GetExpectedVersionParameter, Tool, Version } from '../types';\nimport { parseAnchorTomlVersion } from '../utils/version-utils';\n\n/**\n * Tool configurations with individual settings (version info managed by version-matrices)\n */\nexport const tools: readonly Tool[] = [\n {\n name: 'hardhat',\n toolType: 'evm',\n fromImage: 'evm',\n entryPoint: '/usr/local/lib/node_modules/hardhat/internal/cli/bootstrap.js',\n defaultVolumes: [],\n parseVersionCliVersionOutput: (output: string): Version => {\n console.log('output', output);\n // TODO: parse the output\n return { version: '2.19.3' };\n },\n versionCliArguments: ['--version'],\n },\n {\n name: 'anchor',\n toolType: 'solana',\n fromImage: 'solana-anchor',\n defaultVolumes: [\n {\n type: 'isolate',\n containerPath: '/usr/local/cargo',\n name: 'lz-tooling-cargo-cache',\n },\n {\n type: 'isolate',\n containerPath: '/usr/local/rustup',\n name: 'lz-tooling-rustup-cache',\n },\n ],\n getSecondaryVersionCheckValue: ({ cwd }: GetExpectedVersionParameter): Version => {\n return parseAnchorTomlVersion(cwd, 'anchor');\n },\n },\n {\n name: 'solana',\n toolType: 'solana',\n fromImage: 'solana-anchor',\n defaultVolumes: [\n {\n type: 'isolate',\n containerPath: '/usr/local/cargo',\n name: 'lz-tooling-cargo-cache',\n },\n {\n type: 'isolate',\n containerPath: '/usr/local/rustup',\n name: 'lz-tooling-rustup-cache',\n },\n ],\n getSecondaryVersionCheckValue: ({ cwd }: GetExpectedVersionParameter): Version => {\n return parseAnchorTomlVersion(cwd, 'solana');\n },\n },\n {\n name: 'aptos',\n toolType: 'aptos',\n fromImage: 'aptos',\n defaultVolumes: [\n {\n type: 'isolate',\n containerPath: '/root/.move',\n name: 'lz-tooling-aptos-cache',\n },\n ],\n versionCliArguments: ['--version'],\n },\n {\n name: 'initiad',\n toolType: 'initia',\n fromImage: 'initia',\n entryPoint: 'initiad', // Explicitly set the same as name for clarity\n defaultVolumes: [\n {\n type: 'isolate',\n containerPath: '/root/.move',\n name: 'lz-tooling-initia-cache',\n },\n ],\n versionCliArguments: ['--version'],\n },\n {\n name: 'blueprint',\n toolType: 'ton',\n fromImage: 'ton',\n defaultVolumes: [],\n },\n {\n name: 'scarb',\n toolType: 'starknet',\n fromImage: 'starknet',\n defaultVolumes: [],\n },\n {\n name: 'sui',\n toolType: 'sui',\n fromImage: 'sui',\n defaultVolumes: [\n {\n type: 'isolate',\n containerPath: '/root/.move',\n name: 'lz-tooling-sui-cache',\n },\n ],\n versionCliArguments: ['--version'],\n },\n];\n","// Export configuration data\nexport { tools } from './tools';\nexport { versionMatrices } from './version-matrices';\nexport const AWS_ACCOUNT_ID = '438003944538';\nexport const AWS_REGION = 'us-east-1';\n","import { tools, versionMatrices } from '../config';\nimport type { Tool, ToolType, ToolVersionMatrix, VersionCombination } from '../types';\n\n/**\n * Find a tool configuration by name\n */\nexport function findToolByName(toolName: string): Tool | undefined {\n return tools.find((tool) => tool.name === toolName);\n}\n\n/**\n * Find all tools in a specific type\n */\nexport function findToolsByType(type: ToolType): Tool[] {\n return tools.filter((tool) => tool.toolType === type);\n}\n\n/**\n * Get the type for a specific tool\n */\nexport function getToolType(toolName: string): ToolType | undefined {\n const tool = findToolByName(toolName);\n return tool?.toolType;\n}\n\n/**\n * Find version matrix for a specific tool type\n */\nexport function findMatrixByType(type: ToolType): ToolVersionMatrix | undefined {\n return versionMatrices.find((matrix) => matrix.toolType === type);\n}\n\n/**\n * Find the default combination for a tool type\n * Returns the first combination marked as isRecommended=true, or combinations[0] if none marked\n */\nexport function findDefaultCombination(matrix: ToolVersionMatrix): VersionCombination {\n // First, try to find a recommended combination\n const recommended = matrix.combinations.find((combo) => combo.isRecommended === true);\n if (recommended) {\n return recommended;\n }\n\n // If no recommended combination, use the first one\n if (matrix.combinations.length === 0) {\n throw new Error(`No combinations found in matrix for type '${matrix.toolType}'`);\n }\n\n return matrix.combinations[0];\n}\n\n/**\n * Get default version for a specific tool from version matrix\n */\nexport function getToolDefaultVersion(toolName: string): string {\n const tool = findToolByName(toolName);\n if (!tool) {\n throw new Error(`Tool '${toolName}' not found`);\n }\n\n const matrix = findMatrixByType(tool.toolType);\n if (!matrix) {\n throw new Error(`No version matrix found for tool type '${tool.toolType}'`);\n }\n\n const defaultCombination = findDefaultCombination(matrix);\n const defaultVersion = defaultCombination.versions[toolName];\n if (defaultVersion == null || defaultVersion.length === 0) {\n throw new Error(`No default version found for tool '${toolName}' in matrix`);\n }\n\n return defaultVersion;\n}\n\n/**\n * Get supported versions for a specific tool from version matrix\n */\nexport function getToolSupportedVersions(toolName: string): string[] {\n const tool = findToolByName(toolName);\n if (!tool) {\n throw new Error(`Tool '${toolName}' not found`);\n }\n\n const matrix = findMatrixByType(tool.toolType);\n if (!matrix) {\n throw new Error(`No version matrix found for tool type '${tool.toolType}'`);\n }\n\n // Extract all unique versions for this tool from all combinations\n const versions = new Set<string>();\n for (const combination of matrix.combinations) {\n const version = combination.versions[toolName];\n if (version != null && version.length > 0) {\n versions.add(version);\n }\n }\n\n return Array.from(versions).sort();\n}\n"]}
|
package/dist/33GUXAT7.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { __name } from './VUOMXK5T.js';
|
|
2
|
+
import { Buffer } from 'buffer';
|
|
3
|
+
|
|
4
|
+
// ../../node_modules/.pnpm/@smithy+is-array-buffer@4.0.0/node_modules/@smithy/is-array-buffer/dist-es/index.js
|
|
5
|
+
var isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer");
|
|
6
|
+
var fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => {
|
|
7
|
+
if (!isArrayBuffer(input)) {
|
|
8
|
+
throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);
|
|
9
|
+
}
|
|
10
|
+
return Buffer.from(input, offset, length);
|
|
11
|
+
}, "fromArrayBuffer");
|
|
12
|
+
var fromString = /* @__PURE__ */ __name((input, encoding) => {
|
|
13
|
+
if (typeof input !== "string") {
|
|
14
|
+
throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`);
|
|
15
|
+
}
|
|
16
|
+
return encoding ? Buffer.from(input, encoding) : Buffer.from(input);
|
|
17
|
+
}, "fromString");
|
|
18
|
+
|
|
19
|
+
// ../../node_modules/.pnpm/@smithy+util-utf8@4.0.0/node_modules/@smithy/util-utf8/dist-es/fromUtf8.js
|
|
20
|
+
var fromUtf8 = /* @__PURE__ */ __name((input) => {
|
|
21
|
+
const buf = fromString(input, "utf8");
|
|
22
|
+
return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);
|
|
23
|
+
}, "fromUtf8");
|
|
24
|
+
|
|
25
|
+
// ../../node_modules/.pnpm/@smithy+util-utf8@4.0.0/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js
|
|
26
|
+
var toUint8Array = /* @__PURE__ */ __name((data) => {
|
|
27
|
+
if (typeof data === "string") {
|
|
28
|
+
return fromUtf8(data);
|
|
29
|
+
}
|
|
30
|
+
if (ArrayBuffer.isView(data)) {
|
|
31
|
+
return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
|
|
32
|
+
}
|
|
33
|
+
return new Uint8Array(data);
|
|
34
|
+
}, "toUint8Array");
|
|
35
|
+
|
|
36
|
+
// ../../node_modules/.pnpm/@smithy+util-utf8@4.0.0/node_modules/@smithy/util-utf8/dist-es/toUtf8.js
|
|
37
|
+
var toUtf8 = /* @__PURE__ */ __name((input) => {
|
|
38
|
+
if (typeof input === "string") {
|
|
39
|
+
return input;
|
|
40
|
+
}
|
|
41
|
+
if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
|
|
42
|
+
throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");
|
|
43
|
+
}
|
|
44
|
+
return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8");
|
|
45
|
+
}, "toUtf8");
|
|
46
|
+
|
|
47
|
+
// ../../node_modules/.pnpm/@smithy+core@3.9.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js
|
|
48
|
+
var SCHEMA = {
|
|
49
|
+
BLOB: 21,
|
|
50
|
+
STREAMING_BLOB: 42,
|
|
51
|
+
BOOLEAN: 2,
|
|
52
|
+
STRING: 0,
|
|
53
|
+
NUMERIC: 1,
|
|
54
|
+
BIG_INTEGER: 17,
|
|
55
|
+
BIG_DECIMAL: 19,
|
|
56
|
+
DOCUMENT: 15,
|
|
57
|
+
TIMESTAMP_DEFAULT: 4,
|
|
58
|
+
TIMESTAMP_DATE_TIME: 5,
|
|
59
|
+
TIMESTAMP_HTTP_DATE: 6,
|
|
60
|
+
TIMESTAMP_EPOCH_SECONDS: 7,
|
|
61
|
+
LIST_MODIFIER: 64,
|
|
62
|
+
MAP_MODIFIER: 128
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export { SCHEMA, fromArrayBuffer, fromString, fromUtf8, isArrayBuffer, toUint8Array, toUtf8 };
|
|
66
|
+
//# sourceMappingURL=33GUXAT7.js.map
|
|
67
|
+
//# sourceMappingURL=33GUXAT7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/@smithy+is-array-buffer@4.0.0/node_modules/@smithy/is-array-buffer/dist-es/index.js","../../../node_modules/.pnpm/@smithy+util-buffer-from@4.0.0/node_modules/@smithy/util-buffer-from/dist-es/index.js","../../../node_modules/.pnpm/@smithy+util-utf8@4.0.0/node_modules/@smithy/util-utf8/dist-es/fromUtf8.js","../../../node_modules/.pnpm/@smithy+util-utf8@4.0.0/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js","../../../node_modules/.pnpm/@smithy+util-utf8@4.0.0/node_modules/@smithy/util-utf8/dist-es/toUtf8.js","../../../node_modules/.pnpm/@smithy+core@3.9.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js"],"names":["isArrayBuffer","arg","ArrayBuffer","Object","prototype","toString","call","fromArrayBuffer","input","offset","length","byteLength","TypeError","Buffer","from","fromString","encoding","fromUtf8","buf","Uint8Array","buffer","byteOffset","BYTES_PER_ELEMENT","toUint8Array","data","isView","toUtf8","Error","SCHEMA","BLOB","STREAMING_BLOB","BOOLEAN","STRING","NUMERIC","BIG_INTEGER","BIG_DECIMAL","DOCUMENT","TIMESTAMP_DEFAULT","TIMESTAMP_DATE_TIME","TIMESTAMP_HTTP_DATE","TIMESTAMP_EPOCH_SECONDS","LIST_MODIFIER","MAP_MODIFIER"],"mappings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AAA;EACbC,WAAAA,EAAa,EAAA;EACbC,QAAAA,EAAU,EAAA;EACVC,iBAAAA,EAAmB,CAAA;EACnBC,mBAAAA,EAAqB,CAAA;EACrBC,mBAAAA,EAAqB,CAAA;EACrBC,uBAAAA,EAAyB,CAAA;EACzBC,aAAAA,EAAe,EAAA;EACfC,YAAAA,EAAc;AAClB","file":"33GUXAT7.js","sourcesContent":["export const isArrayBuffer = (arg) => (typeof ArrayBuffer === \"function\" && arg instanceof ArrayBuffer) ||\n Object.prototype.toString.call(arg) === \"[object ArrayBuffer]\";\n","import { isArrayBuffer } from \"@smithy/is-array-buffer\";\nimport { Buffer } from \"buffer\";\nexport const fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => {\n if (!isArrayBuffer(input)) {\n throw new TypeError(`The \"input\" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);\n }\n return Buffer.from(input, offset, length);\n};\nexport const fromString = (input, encoding) => {\n if (typeof input !== \"string\") {\n throw new TypeError(`The \"input\" argument must be of type string. Received type ${typeof input} (${input})`);\n }\n return encoding ? Buffer.from(input, encoding) : Buffer.from(input);\n};\n","import { fromString } from \"@smithy/util-buffer-from\";\nexport const fromUtf8 = (input) => {\n const buf = fromString(input, \"utf8\");\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n};\n","import { fromUtf8 } from \"./fromUtf8\";\nexport const toUint8Array = (data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n};\n","import { fromArrayBuffer } from \"@smithy/util-buffer-from\";\nexport const toUtf8 = (input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString(\"utf8\");\n};\n","export const SCHEMA = {\n BLOB: 21,\n STREAMING_BLOB: 42,\n BOOLEAN: 2,\n STRING: 0,\n NUMERIC: 1,\n BIG_INTEGER: 17,\n BIG_DECIMAL: 19,\n DOCUMENT: 15,\n TIMESTAMP_DEFAULT: 4,\n TIMESTAMP_DATE_TIME: 5,\n TIMESTAMP_HTTP_DATE: 6,\n TIMESTAMP_EPOCH_SECONDS: 7,\n LIST_MODIFIER: 64,\n MAP_MODIFIER: 128,\n};\n"]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var L3BNN3KF_cjs = require('./L3BNN3KF.cjs');
|
|
4
|
+
var NX4KBEWA_cjs = require('./NX4KBEWA.cjs');
|
|
5
|
+
|
|
6
|
+
// ../../node_modules/.pnpm/@smithy+core@3.9.1/node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js
|
|
7
|
+
function requestBuilder(input, context) {
|
|
8
|
+
return new RequestBuilder(input, context);
|
|
9
|
+
}
|
|
10
|
+
NX4KBEWA_cjs.__name(requestBuilder, "requestBuilder");
|
|
11
|
+
var RequestBuilder = class {
|
|
12
|
+
static {
|
|
13
|
+
NX4KBEWA_cjs.__name(this, "RequestBuilder");
|
|
14
|
+
}
|
|
15
|
+
constructor(input, context) {
|
|
16
|
+
this.input = input;
|
|
17
|
+
this.context = context;
|
|
18
|
+
this.query = {};
|
|
19
|
+
this.method = "";
|
|
20
|
+
this.headers = {};
|
|
21
|
+
this.path = "";
|
|
22
|
+
this.body = null;
|
|
23
|
+
this.hostname = "";
|
|
24
|
+
this.resolvePathStack = [];
|
|
25
|
+
}
|
|
26
|
+
async build() {
|
|
27
|
+
const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint();
|
|
28
|
+
this.path = basePath;
|
|
29
|
+
for (const resolvePath of this.resolvePathStack) {
|
|
30
|
+
resolvePath(this.path);
|
|
31
|
+
}
|
|
32
|
+
return new L3BNN3KF_cjs.HttpRequest({
|
|
33
|
+
protocol,
|
|
34
|
+
hostname: this.hostname || hostname,
|
|
35
|
+
port,
|
|
36
|
+
method: this.method,
|
|
37
|
+
path: this.path,
|
|
38
|
+
query: this.query,
|
|
39
|
+
body: this.body,
|
|
40
|
+
headers: this.headers
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
hn(hostname) {
|
|
44
|
+
this.hostname = hostname;
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
bp(uriLabel) {
|
|
48
|
+
this.resolvePathStack.push((basePath) => {
|
|
49
|
+
this.path = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + uriLabel;
|
|
50
|
+
});
|
|
51
|
+
return this;
|
|
52
|
+
}
|
|
53
|
+
p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
|
|
54
|
+
this.resolvePathStack.push((path) => {
|
|
55
|
+
this.path = L3BNN3KF_cjs.resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
|
|
56
|
+
});
|
|
57
|
+
return this;
|
|
58
|
+
}
|
|
59
|
+
h(headers) {
|
|
60
|
+
this.headers = headers;
|
|
61
|
+
return this;
|
|
62
|
+
}
|
|
63
|
+
q(query) {
|
|
64
|
+
this.query = query;
|
|
65
|
+
return this;
|
|
66
|
+
}
|
|
67
|
+
b(body) {
|
|
68
|
+
this.body = body;
|
|
69
|
+
return this;
|
|
70
|
+
}
|
|
71
|
+
m(method) {
|
|
72
|
+
this.method = method;
|
|
73
|
+
return this;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
exports.requestBuilder = requestBuilder;
|
|
78
|
+
//# sourceMappingURL=3AX3IZXK.cjs.map
|
|
79
|
+
//# sourceMappingURL=3AX3IZXK.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/@smithy+core@3.9.1/node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js"],"names":["requestBuilder","input","context","RequestBuilder","query","method","headers","path","body","hostname","resolvePathStack","build","protocol","port","basePath","endpoint","resolvePath","HttpRequest","hn","bp","uriLabel","push","endsWith","slice","p","memberName","labelValueProvider","isGreedyLabel","resolvedPath","h","q","b","m"],"mappings":";;;;;;AAEO,SAASA,cAAAA,CAAeC,OAAOC,OAAAA,EAAO;AACzC,EAAA,OAAO,IAAIC,cAAAA,CAAeF,KAAAA,EAAOC,OAAAA,CAAAA;AACrC;AAFgBF,mBAAAA,CAAAA,cAAAA,EAAAA,gBAAAA,CAAAA;AAGT,IAAMG,iBAAN,MAAMA;EALb;;;AAMI,EAAA,WAAA,CAAYF,OAAOC,OAAAA,EAAS;AACxB,IAAA,IAAA,CAAKD,KAAAA,GAAQA,KAAAA;AACb,IAAA,IAAA,CAAKC,OAAAA,GAAUA,OAAAA;AACf,IAAA,IAAA,CAAKE,QAAQ,EAAC;AACd,IAAA,IAAA,CAAKC,MAAAA,GAAS,EAAA;AACd,IAAA,IAAA,CAAKC,UAAU,EAAC;AAChB,IAAA,IAAA,CAAKC,IAAAA,GAAO,EAAA;AACZ,IAAA,IAAA,CAAKC,IAAAA,GAAO,IAAA;AACZ,IAAA,IAAA,CAAKC,QAAAA,GAAW,EAAA;AAChB,IAAA,IAAA,CAAKC,mBAAmB,EAAA;AAC5B,EAAA;AACA,EAAA,MAAMC,KAAAA,GAAQ;AACV,IAAA,MAAM,EAAEF,QAAAA,EAAUG,QAAAA,GAAW,OAAA,EAASC,IAAAA,EAAMN,IAAAA,EAAMO,QAAAA,EAAQ,GAAK,MAAM,IAAA,CAAKZ,OAAAA,CAAQa,QAAAA,EAAQ;AAC1F,IAAA,IAAA,CAAKR,IAAAA,GAAOO,QAAAA;AACZ,IAAA,KAAA,MAAWE,WAAAA,IAAe,KAAKN,gBAAAA,EAAkB;AAC7CM,MAAAA,WAAAA,CAAY,KAAKT,IAAI,CAA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AACX,EAAA;AACAE,EAAAA,CAAAA,CAAEvB,OAAAA,EAAS;AACP,IAAA,IAAA,CAAKA,OAAAA,GAAUA,OAAAA;AACf,IAAA,OAAO,IAAA;AACX,EAAA;AACAwB,EAAAA,CAAAA,CAAE1B,KAAAA,EAAO;AACL,IAAA,IAAA,CAAKA,KAAAA,GAAQA,KAAAA;AACb,IAAA,OAAO,IAAA;AACX,EAAA;AACA2B,EAAAA,CAAAA,CAAEvB,IAAAA,EAAM;AACJ,IAAA,IAAA,CAAKA,IAAAA,GAAOA,IAAAA;AACZ,IAAA,OAAO,IAAA;AACX,EAAA;AACAwB,EAAAA,CAAAA,CAAE3B,MAAAA,EAAQ;AACN,IAAA,IAAA,CAAKA,MAAAA,GAASA,MAAAA;AACd,IAAA,OAAO,IAAA;AACX,EAAA;AACJ,CAAA","file":"3AX3IZXK.cjs","sourcesContent":["import { HttpRequest } from \"@smithy/protocol-http\";\nimport { resolvedPath } from \"./resolve-path\";\nexport function requestBuilder(input, context) {\n return new RequestBuilder(input, context);\n}\nexport class RequestBuilder {\n constructor(input, context) {\n this.input = input;\n this.context = context;\n this.query = {};\n this.method = \"\";\n this.headers = {};\n this.path = \"\";\n this.body = null;\n this.hostname = \"\";\n this.resolvePathStack = [];\n }\n async build() {\n const { hostname, protocol = \"https\", port, path: basePath } = await this.context.endpoint();\n this.path = basePath;\n for (const resolvePath of this.resolvePathStack) {\n resolvePath(this.path);\n }\n return new HttpRequest({\n protocol,\n hostname: this.hostname || hostname,\n port,\n method: this.method,\n path: this.path,\n query: this.query,\n body: this.body,\n headers: this.headers,\n });\n }\n hn(hostname) {\n this.hostname = hostname;\n return this;\n }\n bp(uriLabel) {\n this.resolvePathStack.push((basePath) => {\n this.path = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + uriLabel;\n });\n return this;\n }\n p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {\n this.resolvePathStack.push((path) => {\n this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);\n });\n return this;\n }\n h(headers) {\n this.headers = headers;\n return this;\n }\n q(query) {\n this.query = query;\n return this;\n }\n b(body) {\n this.body = body;\n return this;\n }\n m(method) {\n this.method = method;\n return this;\n }\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var NX4KBEWA_cjs = require('./NX4KBEWA.cjs');
|
|
4
|
+
|
|
5
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.879.0/node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js
|
|
6
|
+
function setCredentialFeature(credentials, feature, value) {
|
|
7
|
+
if (!credentials.$source) {
|
|
8
|
+
credentials.$source = {};
|
|
9
|
+
}
|
|
10
|
+
credentials.$source[feature] = value;
|
|
11
|
+
return credentials;
|
|
12
|
+
}
|
|
13
|
+
NX4KBEWA_cjs.__name(setCredentialFeature, "setCredentialFeature");
|
|
14
|
+
|
|
15
|
+
exports.setCredentialFeature = setCredentialFeature;
|
|
16
|
+
//# sourceMappingURL=3BKFBGX3.cjs.map
|
|
17
|
+
//# sourceMappingURL=3BKFBGX3.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/@aws-sdk+core@3.879.0/node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js"],"names":["setCredentialFeature","credentials","feature","value","$source"],"mappings":";;;;;AAAO,SAASA,oBAAAA,CAAqBC,WAAAA,EAAaC,OAAAA,EAASC,KAAAA,EAAK;AAC5D,EAAA,IAAI,CAACF,YAAYG,OAAAA,EAAS;AACtBH,IAAAA,WAAAA,CAAYG,UAAU,EAAC;AAC3B,EAAA;AACAH,EAAAA,WAAAA,CAAYG,OAAAA,CAAQF,OAAAA,CAAAA,GAAWC,KAAAA;AAC/B,EAAA,OAAOF,WAAAA;AACX;AANgBD,mBAAAA,CAAAA,oBAAAA,EAAAA,sBAAAA,CAAAA","file":"3BKFBGX3.cjs","sourcesContent":["export function setCredentialFeature(credentials, feature, value) {\n if (!credentials.$source) {\n credentials.$source = {};\n }\n credentials.$source[feature] = value;\n return credentials;\n}\n"]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var NX4KBEWA_cjs = require('./NX4KBEWA.cjs');
|
|
4
|
+
var dotenv = require('dotenv');
|
|
5
|
+
var fs = require('fs');
|
|
6
|
+
var path = require('path');
|
|
7
|
+
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
11
|
+
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
12
|
+
|
|
13
|
+
function findParentDirectoryWithFile(dir, filename) {
|
|
14
|
+
let cur = dir;
|
|
15
|
+
while (cur !== "/") {
|
|
16
|
+
const filePath = path__default.default.join(cur, filename);
|
|
17
|
+
if (fs__default.default.existsSync(filePath)) {
|
|
18
|
+
return {
|
|
19
|
+
directory: cur,
|
|
20
|
+
file: filePath
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
cur = path__default.default.dirname(cur);
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
NX4KBEWA_cjs.__name(findParentDirectoryWithFile, "findParentDirectoryWithFile");
|
|
28
|
+
function parseVersionFileContents(dir) {
|
|
29
|
+
let out = {};
|
|
30
|
+
let cur = dir;
|
|
31
|
+
while (cur !== "/") {
|
|
32
|
+
const found = findParentDirectoryWithFile(cur, ".versions");
|
|
33
|
+
if (found === null) {
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
cur = path__default.default.dirname(found.directory);
|
|
37
|
+
const contents = fs__default.default.readFileSync(found.file, "utf-8");
|
|
38
|
+
const parsed = dotenv.parse(contents);
|
|
39
|
+
out = {
|
|
40
|
+
...parsed,
|
|
41
|
+
...out
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
return out;
|
|
45
|
+
}
|
|
46
|
+
NX4KBEWA_cjs.__name(parseVersionFileContents, "parseVersionFileContents");
|
|
47
|
+
|
|
48
|
+
exports.findParentDirectoryWithFile = findParentDirectoryWithFile;
|
|
49
|
+
exports.parseVersionFileContents = parseVersionFileContents;
|
|
50
|
+
//# sourceMappingURL=3EOFF6NK.cjs.map
|
|
51
|
+
//# sourceMappingURL=3EOFF6NK.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils.ts"],"names":["findParentDirectoryWithFile","dir","filename","cur","filePath","path","join","fs","existsSync","directory","file","dirname","parseVersionFileContents","out","found","contents","readFileSync","parsed","dotenvParse"],"mappings":";;;;;;;;;;;;AAQO,SAASA,2BAAAA,CAA4BC,KAAaC,QAAAA,EAAgB;AACrE,EAAA,IAAIC,GAAAA,GAAMF,GAAAA;AAEV,EAAA,OAAOE,QAAQ,GAAA,EAAK;AAChB,IAAA,MAAMC,QAAAA,GAAWC,qBAAAA,CAAKC,IAAAA,CAAKH,GAAAA,EAAKD,QAAAA,CAAAA;AAChC,IAAA,IAAIK,mBAAAA,CAAGC,UAAAA,CAAWJ,QAAAA,CAAAA,EAAW;AACzB,MAAA,OAAO;QAAEK,SAAAA,EAAWN,GAAAA;QAAKO,IAAAA,EAAMN;AAAS,OAAA;AAC5C,IAAA;AAEAD,IAAAA,GAAAA,GAAME,qBAAAA,CAAKM,QAAQR,GAAAA,CAAAA;AACvB,EAAA;AAEA,EAAA,OAAO,IAAA;AACX;AAbgBH,mBAAAA,CAAAA,2BAAAA,EAAAA,6BAAAA,CAAAA;AAeT,SAASY,yBAAyBX,GAAAA,EAAW;AAChD,EAAA,IAAIY,MAAM,EAAC;AAEX,EAAA,IAAIV,GAAAA,GAAMF,GAAAA;AACV,EAAA,OAAOE,QAAQ,GAAA,EAAK;AAChB,IAAA,MAAMW,KAAAA,GAAQd,2BAAAA,CAA4BG,GAAAA,EAAK,WAAA,CAAA;AAC/C,IAAA,IAAIW,UAAU,IAAA,EAAM;AAChB,MAAA;AACJ,IAAA;AACAX,IAAAA,GAAAA,GAAME,qBAAAA,CAAKM,OAAAA,CAAQG,KAAAA,CAAML,SAAS,CAAA;AAElC,IAAA,MAAMM,QAAAA,GAAWR,mBAAAA,CAAGS,YAAAA,CAAaF,KAAAA,CAAMJ,MAAM,OAAA,CAAA;AAC7C,IAAA,MAAMO,MAAAA,GAASC,aAAYH,QAAAA,CAAAA;AAE3BF,IAAAA,GAAAA,GAAM;MACF,GAAGI,MAAAA;MACH,GAAGJ;AACP,KAAA;AACJ,EAAA;AAEA,EAAA,OAAOA,GAAAA;AACX;AArBgBD,mBAAAA,CAAAA,wBAAAA,EAAAA,0BAAAA,CAAAA","file":"3EOFF6NK.cjs","sourcesContent":["import { parse as dotenvParse } from 'dotenv';\nimport fs from 'fs';\nimport path from 'path';\n\nexport interface FoundDirectory {\n directory: string;\n file: string;\n}\nexport function findParentDirectoryWithFile(dir: string, filename: string): FoundDirectory | null {\n let cur = dir;\n\n while (cur !== '/') {\n const filePath = path.join(cur, filename);\n if (fs.existsSync(filePath)) {\n return { directory: cur, file: filePath };\n }\n\n cur = path.dirname(cur);\n }\n\n return null;\n}\n\nexport function parseVersionFileContents(dir: string): { [key: string]: string | undefined } {\n let out = {};\n\n let cur = dir;\n while (cur !== '/') {\n const found = findParentDirectoryWithFile(cur, '.versions');\n if (found === null) {\n break;\n }\n cur = path.dirname(found.directory);\n\n const contents = fs.readFileSync(found.file, 'utf-8');\n const parsed = dotenvParse(contents);\n\n out = {\n ...parsed,\n ...out,\n };\n }\n\n return out;\n}\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var NX4KBEWA_cjs = require('./NX4KBEWA.cjs');
|
|
4
|
+
|
|
5
|
+
// src/core/compatibility.ts
|
|
6
|
+
function findBestCompatibleCombination(userVersions, matrix) {
|
|
7
|
+
const scoredCombinations = matrix.combinations.map((combo) => {
|
|
8
|
+
let matchScore = 0;
|
|
9
|
+
let conflicts = 0;
|
|
10
|
+
for (const [tool, userVersion] of Object.entries(userVersions)) {
|
|
11
|
+
const comboVersion = combo.versions[tool];
|
|
12
|
+
if (comboVersion !== void 0) {
|
|
13
|
+
if (comboVersion === userVersion) {
|
|
14
|
+
matchScore++;
|
|
15
|
+
} else {
|
|
16
|
+
conflicts++;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
combo,
|
|
22
|
+
matchScore,
|
|
23
|
+
conflicts
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
scoredCombinations.sort((a, b) => {
|
|
27
|
+
if (a.conflicts !== b.conflicts) {
|
|
28
|
+
return a.conflicts - b.conflicts;
|
|
29
|
+
}
|
|
30
|
+
return b.matchScore - a.matchScore;
|
|
31
|
+
});
|
|
32
|
+
return scoredCombinations[0]?.combo;
|
|
33
|
+
}
|
|
34
|
+
NX4KBEWA_cjs.__name(findBestCompatibleCombination, "findBestCompatibleCombination");
|
|
35
|
+
|
|
36
|
+
exports.findBestCompatibleCombination = findBestCompatibleCombination;
|
|
37
|
+
//# sourceMappingURL=4NINFZK7.cjs.map
|
|
38
|
+
//# sourceMappingURL=4NINFZK7.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/compatibility.ts"],"names":["findBestCompatibleCombination","userVersions","matrix","scoredCombinations","combinations","map","combo","matchScore","conflicts","tool","userVersion","Object","entries","comboVersion","versions","undefined","sort","a","b"],"mappings":";;;;;AAKO,SAASA,6BAAAA,CACZC,cACAC,MAAAA,EAAyB;AAGzB,EAAA,MAAMC,kBAAAA,GAAqBD,MAAAA,CAAOE,YAAAA,CAAaC,GAAAA,CAAI,CAACC,KAAAA,KAAAA;AAChD,IAAA,IAAIC,UAAAA,GAAa,CAAA;AACjB,IAAA,IAAIC,SAAAA,GAAY,CAAA;AAEhB,IAAA,KAAA,MAAW,CAACC,IAAAA,EAAMC,WAAAA,KAAgBC,MAAAA,CAAOC,OAAAA,CAAQX,YAAAA,CAAAA,EAAe;AAC5D,MAAA,MAAMY,YAAAA,GAAeP,KAAAA,CAAMQ,QAAAA,CAASL,IAAAA,CAAAA;AACpC,MAAA,IAAII,iBAAiBE,MAAAA,EAAW;AAC5B,QAAA,IAAIF,iBAAiBH,WAAAA,EAAa;AAC9BH,UAAAA,UAAAA,EAAAA;QACJ,CAAA,MAAO;AACHC,UAAAA,SAAAA,EAAAA;AACJ,QAAA;AACJ,MAAA;AACJ,IAAA;AAEA,IAAA,OAAO;AAAEF,MAAAA,KAAAA;AAAOC,MAAAA,UAAAA;AAAYC,MAAAA;AAAU,KAAA;EAC1C,CAAA,CAAA;AAGAL,EAAAA,kBAAAA,CAAmBa,IAAAA,CAAK,CAACC,CAAAA,EAAGC,CAAAA,KAAAA;AACxB,IAAA,IAAID,CAAAA,CAAET,SAAAA,KAAcU,CAAAA,CAAEV,SAAAA,EAAW;AAC7B,MAAA,OAAOS,CAAAA,CAAET,YAAYU,CAAAA,CAAEV,SAAAA;AAC3B,IAAA;AACA,IAAA,OAAOU,CAAAA,CAAEX,aAAaU,CAAAA,CAAEV,UAAAA;EAC5B,CAAA,CAAA;AAEA,EAAA,OAAOJ,kBAAAA,CAAmB,CAAA,CAAA,EAAIG,KAAAA;AAClC;AAhCgBN,mBAAAA,CAAAA,6BAAAA,EAAAA,+BAAAA,CAAAA","file":"4NINFZK7.cjs","sourcesContent":["import type { ToolVersionMatrix, VersionCombination } from '../types';\n\n/**\n * Find the best compatible combination based on user-specified versions\n */\nexport function findBestCompatibleCombination(\n userVersions: { [key: string]: string },\n matrix: ToolVersionMatrix,\n): VersionCombination | undefined {\n // Find combinations that match as many user-specified versions as possible\n const scoredCombinations = matrix.combinations.map((combo) => {\n let matchScore = 0;\n let conflicts = 0;\n\n for (const [tool, userVersion] of Object.entries(userVersions)) {\n const comboVersion = combo.versions[tool];\n if (comboVersion !== undefined) {\n if (comboVersion === userVersion) {\n matchScore++;\n } else {\n conflicts++;\n }\n }\n }\n\n return { combo, matchScore, conflicts };\n });\n\n // Prefer combinations with highest match score and no conflicts\n scoredCombinations.sort((a, b) => {\n if (a.conflicts !== b.conflicts) {\n return a.conflicts - b.conflicts; // Fewer conflicts first\n }\n return b.matchScore - a.matchScore; // Higher match score first\n });\n\n return scoredCombinations[0]?.combo;\n}\n"]}
|