@settlemint/sdk-cli 0.8.0-pr3afabb24 → 0.8.0-pr3c9df2ea
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/cli.js +92 -140
- package/dist/cli.js.map +5 -6
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -197427,7 +197427,7 @@ ${Bt.cyan(Yt)}
|
|
|
197427
197427
|
code: "ENOENT"
|
|
197428
197428
|
}), getPathInfo = (e9, t7) => {
|
|
197429
197429
|
var r6 = t7.colon || or;
|
|
197430
|
-
var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
197430
|
+
var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.o6lgPG0TJk:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(r6)];
|
|
197431
197431
|
var n6 = nr ? t7.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
197432
197432
|
var a5 = nr ? n6.split(r6) : [""];
|
|
197433
197433
|
if (nr) {
|
|
@@ -200564,7 +200564,7 @@ ${whileRunning(e9)}`;
|
|
|
200564
200564
|
};
|
|
200565
200565
|
ni = Object.assign(async function _main() {
|
|
200566
200566
|
var e9 = new Cli({
|
|
200567
|
-
binaryVersion: "0.8.0-
|
|
200567
|
+
binaryVersion: "0.8.0-pr3c9df2ea",
|
|
200568
200568
|
binaryLabel: "gql.tada CLI",
|
|
200569
200569
|
binaryName: "gql.tada"
|
|
200570
200570
|
});
|
|
@@ -218401,7 +218401,7 @@ var require_lib4 = __commonJS((exports, module) => {
|
|
|
218401
218401
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
218402
218402
|
var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
|
|
218403
218403
|
var getPathInfo2 = (cmd2, {
|
|
218404
|
-
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
218404
|
+
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.o6lgPG0TJk:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
218405
218405
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
218406
218406
|
delimiter: optDelimiter = delimiter
|
|
218407
218407
|
}) => {
|
|
@@ -218605,7 +218605,7 @@ var require_lib5 = __commonJS((exports, module) => {
|
|
|
218605
218605
|
let pathToInitial;
|
|
218606
218606
|
try {
|
|
218607
218607
|
pathToInitial = which.sync(initialCmd, {
|
|
218608
|
-
path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
218608
|
+
path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.o6lgPG0TJk:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
218609
218609
|
pathext: options.env && findInObject(options.env, "PATHEXT") || process.env.PATHEXT
|
|
218610
218610
|
}).toLowerCase();
|
|
218611
218611
|
} catch (err) {
|
|
@@ -219322,7 +219322,7 @@ var require_lib6 = __commonJS((exports, module) => {
|
|
|
219322
219322
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
219323
219323
|
var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
|
|
219324
219324
|
var getPathInfo2 = (cmd2, {
|
|
219325
|
-
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
219325
|
+
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.o6lgPG0TJk:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
219326
219326
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
219327
219327
|
delimiter: optDelimiter = delimiter
|
|
219328
219328
|
}) => {
|
|
@@ -235213,7 +235213,7 @@ var require_which2 = __commonJS((exports, module) => {
|
|
|
235213
235213
|
const colon = opt2.colon || COLON;
|
|
235214
235214
|
const pathEnv = cmd2.match(/\//) || isWindows2 && cmd2.match(/\\/) ? [""] : [
|
|
235215
235215
|
...isWindows2 ? [process.cwd()] : [],
|
|
235216
|
-
...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
235216
|
+
...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.o6lgPG0TJk:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(colon)
|
|
235217
235217
|
];
|
|
235218
235218
|
const pathExtExe = isWindows2 ? opt2.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
235219
235219
|
const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
|
|
@@ -249846,17 +249846,17 @@ var require_visit = __commonJS((exports) => {
|
|
|
249846
249846
|
visit2.BREAK = BREAK;
|
|
249847
249847
|
visit2.SKIP = SKIP;
|
|
249848
249848
|
visit2.REMOVE = REMOVE;
|
|
249849
|
-
function visit_(key2, node, visitor,
|
|
249850
|
-
const ctrl = callVisitor(key2, node, visitor,
|
|
249849
|
+
function visit_(key2, node, visitor, path8) {
|
|
249850
|
+
const ctrl = callVisitor(key2, node, visitor, path8);
|
|
249851
249851
|
if (identity3.isNode(ctrl) || identity3.isPair(ctrl)) {
|
|
249852
|
-
replaceNode(key2,
|
|
249853
|
-
return visit_(key2, ctrl, visitor,
|
|
249852
|
+
replaceNode(key2, path8, ctrl);
|
|
249853
|
+
return visit_(key2, ctrl, visitor, path8);
|
|
249854
249854
|
}
|
|
249855
249855
|
if (typeof ctrl !== "symbol") {
|
|
249856
249856
|
if (identity3.isCollection(node)) {
|
|
249857
|
-
|
|
249857
|
+
path8 = Object.freeze(path8.concat(node));
|
|
249858
249858
|
for (let i6 = 0;i6 < node.items.length; ++i6) {
|
|
249859
|
-
const ci = visit_(i6, node.items[i6], visitor,
|
|
249859
|
+
const ci = visit_(i6, node.items[i6], visitor, path8);
|
|
249860
249860
|
if (typeof ci === "number")
|
|
249861
249861
|
i6 = ci - 1;
|
|
249862
249862
|
else if (ci === BREAK)
|
|
@@ -249867,13 +249867,13 @@ var require_visit = __commonJS((exports) => {
|
|
|
249867
249867
|
}
|
|
249868
249868
|
}
|
|
249869
249869
|
} else if (identity3.isPair(node)) {
|
|
249870
|
-
|
|
249871
|
-
const ck = visit_("key", node.key, visitor,
|
|
249870
|
+
path8 = Object.freeze(path8.concat(node));
|
|
249871
|
+
const ck = visit_("key", node.key, visitor, path8);
|
|
249872
249872
|
if (ck === BREAK)
|
|
249873
249873
|
return BREAK;
|
|
249874
249874
|
else if (ck === REMOVE)
|
|
249875
249875
|
node.key = null;
|
|
249876
|
-
const cv = visit_("value", node.value, visitor,
|
|
249876
|
+
const cv = visit_("value", node.value, visitor, path8);
|
|
249877
249877
|
if (cv === BREAK)
|
|
249878
249878
|
return BREAK;
|
|
249879
249879
|
else if (cv === REMOVE)
|
|
@@ -249894,17 +249894,17 @@ var require_visit = __commonJS((exports) => {
|
|
|
249894
249894
|
visitAsync.BREAK = BREAK;
|
|
249895
249895
|
visitAsync.SKIP = SKIP;
|
|
249896
249896
|
visitAsync.REMOVE = REMOVE;
|
|
249897
|
-
async function visitAsync_(key2, node, visitor,
|
|
249898
|
-
const ctrl = await callVisitor(key2, node, visitor,
|
|
249897
|
+
async function visitAsync_(key2, node, visitor, path8) {
|
|
249898
|
+
const ctrl = await callVisitor(key2, node, visitor, path8);
|
|
249899
249899
|
if (identity3.isNode(ctrl) || identity3.isPair(ctrl)) {
|
|
249900
|
-
replaceNode(key2,
|
|
249901
|
-
return visitAsync_(key2, ctrl, visitor,
|
|
249900
|
+
replaceNode(key2, path8, ctrl);
|
|
249901
|
+
return visitAsync_(key2, ctrl, visitor, path8);
|
|
249902
249902
|
}
|
|
249903
249903
|
if (typeof ctrl !== "symbol") {
|
|
249904
249904
|
if (identity3.isCollection(node)) {
|
|
249905
|
-
|
|
249905
|
+
path8 = Object.freeze(path8.concat(node));
|
|
249906
249906
|
for (let i6 = 0;i6 < node.items.length; ++i6) {
|
|
249907
|
-
const ci = await visitAsync_(i6, node.items[i6], visitor,
|
|
249907
|
+
const ci = await visitAsync_(i6, node.items[i6], visitor, path8);
|
|
249908
249908
|
if (typeof ci === "number")
|
|
249909
249909
|
i6 = ci - 1;
|
|
249910
249910
|
else if (ci === BREAK)
|
|
@@ -249915,13 +249915,13 @@ var require_visit = __commonJS((exports) => {
|
|
|
249915
249915
|
}
|
|
249916
249916
|
}
|
|
249917
249917
|
} else if (identity3.isPair(node)) {
|
|
249918
|
-
|
|
249919
|
-
const ck = await visitAsync_("key", node.key, visitor,
|
|
249918
|
+
path8 = Object.freeze(path8.concat(node));
|
|
249919
|
+
const ck = await visitAsync_("key", node.key, visitor, path8);
|
|
249920
249920
|
if (ck === BREAK)
|
|
249921
249921
|
return BREAK;
|
|
249922
249922
|
else if (ck === REMOVE)
|
|
249923
249923
|
node.key = null;
|
|
249924
|
-
const cv = await visitAsync_("value", node.value, visitor,
|
|
249924
|
+
const cv = await visitAsync_("value", node.value, visitor, path8);
|
|
249925
249925
|
if (cv === BREAK)
|
|
249926
249926
|
return BREAK;
|
|
249927
249927
|
else if (cv === REMOVE)
|
|
@@ -249948,23 +249948,23 @@ var require_visit = __commonJS((exports) => {
|
|
|
249948
249948
|
}
|
|
249949
249949
|
return visitor;
|
|
249950
249950
|
}
|
|
249951
|
-
function callVisitor(key2, node, visitor,
|
|
249951
|
+
function callVisitor(key2, node, visitor, path8) {
|
|
249952
249952
|
if (typeof visitor === "function")
|
|
249953
|
-
return visitor(key2, node,
|
|
249953
|
+
return visitor(key2, node, path8);
|
|
249954
249954
|
if (identity3.isMap(node))
|
|
249955
|
-
return visitor.Map?.(key2, node,
|
|
249955
|
+
return visitor.Map?.(key2, node, path8);
|
|
249956
249956
|
if (identity3.isSeq(node))
|
|
249957
|
-
return visitor.Seq?.(key2, node,
|
|
249957
|
+
return visitor.Seq?.(key2, node, path8);
|
|
249958
249958
|
if (identity3.isPair(node))
|
|
249959
|
-
return visitor.Pair?.(key2, node,
|
|
249959
|
+
return visitor.Pair?.(key2, node, path8);
|
|
249960
249960
|
if (identity3.isScalar(node))
|
|
249961
|
-
return visitor.Scalar?.(key2, node,
|
|
249961
|
+
return visitor.Scalar?.(key2, node, path8);
|
|
249962
249962
|
if (identity3.isAlias(node))
|
|
249963
|
-
return visitor.Alias?.(key2, node,
|
|
249963
|
+
return visitor.Alias?.(key2, node, path8);
|
|
249964
249964
|
return;
|
|
249965
249965
|
}
|
|
249966
|
-
function replaceNode(key2,
|
|
249967
|
-
const parent =
|
|
249966
|
+
function replaceNode(key2, path8, node) {
|
|
249967
|
+
const parent = path8[path8.length - 1];
|
|
249968
249968
|
if (identity3.isCollection(parent)) {
|
|
249969
249969
|
parent.items[key2] = node;
|
|
249970
249970
|
} else if (identity3.isPair(parent)) {
|
|
@@ -250511,10 +250511,10 @@ var require_Collection = __commonJS((exports) => {
|
|
|
250511
250511
|
var createNode = require_createNode();
|
|
250512
250512
|
var identity3 = require_identity();
|
|
250513
250513
|
var Node2 = require_Node();
|
|
250514
|
-
function collectionFromPath(schema,
|
|
250514
|
+
function collectionFromPath(schema, path8, value4) {
|
|
250515
250515
|
let v7 = value4;
|
|
250516
|
-
for (let i6 =
|
|
250517
|
-
const k5 =
|
|
250516
|
+
for (let i6 = path8.length - 1;i6 >= 0; --i6) {
|
|
250517
|
+
const k5 = path8[i6];
|
|
250518
250518
|
if (typeof k5 === "number" && Number.isInteger(k5) && k5 >= 0) {
|
|
250519
250519
|
const a8 = [];
|
|
250520
250520
|
a8[k5] = v7;
|
|
@@ -250533,7 +250533,7 @@ var require_Collection = __commonJS((exports) => {
|
|
|
250533
250533
|
sourceObjects: new Map
|
|
250534
250534
|
});
|
|
250535
250535
|
}
|
|
250536
|
-
var isEmptyPath = (
|
|
250536
|
+
var isEmptyPath = (path8) => path8 == null || typeof path8 === "object" && !!path8[Symbol.iterator]().next().done;
|
|
250537
250537
|
|
|
250538
250538
|
class Collection extends Node2.NodeBase {
|
|
250539
250539
|
constructor(type4, schema) {
|
|
@@ -250554,11 +250554,11 @@ var require_Collection = __commonJS((exports) => {
|
|
|
250554
250554
|
copy.range = this.range.slice();
|
|
250555
250555
|
return copy;
|
|
250556
250556
|
}
|
|
250557
|
-
addIn(
|
|
250558
|
-
if (isEmptyPath(
|
|
250557
|
+
addIn(path8, value4) {
|
|
250558
|
+
if (isEmptyPath(path8))
|
|
250559
250559
|
this.add(value4);
|
|
250560
250560
|
else {
|
|
250561
|
-
const [key2, ...rest] =
|
|
250561
|
+
const [key2, ...rest] = path8;
|
|
250562
250562
|
const node = this.get(key2, true);
|
|
250563
250563
|
if (identity3.isCollection(node))
|
|
250564
250564
|
node.addIn(rest, value4);
|
|
@@ -250568,8 +250568,8 @@ var require_Collection = __commonJS((exports) => {
|
|
|
250568
250568
|
throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
|
|
250569
250569
|
}
|
|
250570
250570
|
}
|
|
250571
|
-
deleteIn(
|
|
250572
|
-
const [key2, ...rest] =
|
|
250571
|
+
deleteIn(path8) {
|
|
250572
|
+
const [key2, ...rest] = path8;
|
|
250573
250573
|
if (rest.length === 0)
|
|
250574
250574
|
return this.delete(key2);
|
|
250575
250575
|
const node = this.get(key2, true);
|
|
@@ -250578,8 +250578,8 @@ var require_Collection = __commonJS((exports) => {
|
|
|
250578
250578
|
else
|
|
250579
250579
|
throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
|
|
250580
250580
|
}
|
|
250581
|
-
getIn(
|
|
250582
|
-
const [key2, ...rest] =
|
|
250581
|
+
getIn(path8, keepScalar) {
|
|
250582
|
+
const [key2, ...rest] = path8;
|
|
250583
250583
|
const node = this.get(key2, true);
|
|
250584
250584
|
if (rest.length === 0)
|
|
250585
250585
|
return !keepScalar && identity3.isScalar(node) ? node.value : node;
|
|
@@ -250594,15 +250594,15 @@ var require_Collection = __commonJS((exports) => {
|
|
|
250594
250594
|
return n6 == null || allowScalar && identity3.isScalar(n6) && n6.value == null && !n6.commentBefore && !n6.comment && !n6.tag;
|
|
250595
250595
|
});
|
|
250596
250596
|
}
|
|
250597
|
-
hasIn(
|
|
250598
|
-
const [key2, ...rest] =
|
|
250597
|
+
hasIn(path8) {
|
|
250598
|
+
const [key2, ...rest] = path8;
|
|
250599
250599
|
if (rest.length === 0)
|
|
250600
250600
|
return this.has(key2);
|
|
250601
250601
|
const node = this.get(key2, true);
|
|
250602
250602
|
return identity3.isCollection(node) ? node.hasIn(rest) : false;
|
|
250603
250603
|
}
|
|
250604
|
-
setIn(
|
|
250605
|
-
const [key2, ...rest] =
|
|
250604
|
+
setIn(path8, value4) {
|
|
250605
|
+
const [key2, ...rest] = path8;
|
|
250606
250606
|
if (rest.length === 0) {
|
|
250607
250607
|
this.set(key2, value4);
|
|
250608
250608
|
} else {
|
|
@@ -252982,9 +252982,9 @@ var require_Document = __commonJS((exports) => {
|
|
|
252982
252982
|
if (assertCollection(this.contents))
|
|
252983
252983
|
this.contents.add(value4);
|
|
252984
252984
|
}
|
|
252985
|
-
addIn(
|
|
252985
|
+
addIn(path8, value4) {
|
|
252986
252986
|
if (assertCollection(this.contents))
|
|
252987
|
-
this.contents.addIn(
|
|
252987
|
+
this.contents.addIn(path8, value4);
|
|
252988
252988
|
}
|
|
252989
252989
|
createAlias(node, name2) {
|
|
252990
252990
|
if (!node.anchor) {
|
|
@@ -253033,30 +253033,30 @@ var require_Document = __commonJS((exports) => {
|
|
|
253033
253033
|
delete(key2) {
|
|
253034
253034
|
return assertCollection(this.contents) ? this.contents.delete(key2) : false;
|
|
253035
253035
|
}
|
|
253036
|
-
deleteIn(
|
|
253037
|
-
if (Collection.isEmptyPath(
|
|
253036
|
+
deleteIn(path8) {
|
|
253037
|
+
if (Collection.isEmptyPath(path8)) {
|
|
253038
253038
|
if (this.contents == null)
|
|
253039
253039
|
return false;
|
|
253040
253040
|
this.contents = null;
|
|
253041
253041
|
return true;
|
|
253042
253042
|
}
|
|
253043
|
-
return assertCollection(this.contents) ? this.contents.deleteIn(
|
|
253043
|
+
return assertCollection(this.contents) ? this.contents.deleteIn(path8) : false;
|
|
253044
253044
|
}
|
|
253045
253045
|
get(key2, keepScalar) {
|
|
253046
253046
|
return identity3.isCollection(this.contents) ? this.contents.get(key2, keepScalar) : undefined;
|
|
253047
253047
|
}
|
|
253048
|
-
getIn(
|
|
253049
|
-
if (Collection.isEmptyPath(
|
|
253048
|
+
getIn(path8, keepScalar) {
|
|
253049
|
+
if (Collection.isEmptyPath(path8))
|
|
253050
253050
|
return !keepScalar && identity3.isScalar(this.contents) ? this.contents.value : this.contents;
|
|
253051
|
-
return identity3.isCollection(this.contents) ? this.contents.getIn(
|
|
253051
|
+
return identity3.isCollection(this.contents) ? this.contents.getIn(path8, keepScalar) : undefined;
|
|
253052
253052
|
}
|
|
253053
253053
|
has(key2) {
|
|
253054
253054
|
return identity3.isCollection(this.contents) ? this.contents.has(key2) : false;
|
|
253055
253055
|
}
|
|
253056
|
-
hasIn(
|
|
253057
|
-
if (Collection.isEmptyPath(
|
|
253056
|
+
hasIn(path8) {
|
|
253057
|
+
if (Collection.isEmptyPath(path8))
|
|
253058
253058
|
return this.contents !== undefined;
|
|
253059
|
-
return identity3.isCollection(this.contents) ? this.contents.hasIn(
|
|
253059
|
+
return identity3.isCollection(this.contents) ? this.contents.hasIn(path8) : false;
|
|
253060
253060
|
}
|
|
253061
253061
|
set(key2, value4) {
|
|
253062
253062
|
if (this.contents == null) {
|
|
@@ -253065,13 +253065,13 @@ var require_Document = __commonJS((exports) => {
|
|
|
253065
253065
|
this.contents.set(key2, value4);
|
|
253066
253066
|
}
|
|
253067
253067
|
}
|
|
253068
|
-
setIn(
|
|
253069
|
-
if (Collection.isEmptyPath(
|
|
253068
|
+
setIn(path8, value4) {
|
|
253069
|
+
if (Collection.isEmptyPath(path8)) {
|
|
253070
253070
|
this.contents = value4;
|
|
253071
253071
|
} else if (this.contents == null) {
|
|
253072
|
-
this.contents = Collection.collectionFromPath(this.schema, Array.from(
|
|
253072
|
+
this.contents = Collection.collectionFromPath(this.schema, Array.from(path8), value4);
|
|
253073
253073
|
} else if (assertCollection(this.contents)) {
|
|
253074
|
-
this.contents.setIn(
|
|
253074
|
+
this.contents.setIn(path8, value4);
|
|
253075
253075
|
}
|
|
253076
253076
|
}
|
|
253077
253077
|
setSchema(version, options = {}) {
|
|
@@ -254962,9 +254962,9 @@ var require_cst_visit = __commonJS((exports) => {
|
|
|
254962
254962
|
visit2.BREAK = BREAK;
|
|
254963
254963
|
visit2.SKIP = SKIP;
|
|
254964
254964
|
visit2.REMOVE = REMOVE;
|
|
254965
|
-
visit2.itemAtPath = (cst,
|
|
254965
|
+
visit2.itemAtPath = (cst, path8) => {
|
|
254966
254966
|
let item = cst;
|
|
254967
|
-
for (const [field2, index] of
|
|
254967
|
+
for (const [field2, index] of path8) {
|
|
254968
254968
|
const tok = item?.[field2];
|
|
254969
254969
|
if (tok && "items" in tok) {
|
|
254970
254970
|
item = tok.items[index];
|
|
@@ -254973,23 +254973,23 @@ var require_cst_visit = __commonJS((exports) => {
|
|
|
254973
254973
|
}
|
|
254974
254974
|
return item;
|
|
254975
254975
|
};
|
|
254976
|
-
visit2.parentCollection = (cst,
|
|
254977
|
-
const parent = visit2.itemAtPath(cst,
|
|
254978
|
-
const field2 =
|
|
254976
|
+
visit2.parentCollection = (cst, path8) => {
|
|
254977
|
+
const parent = visit2.itemAtPath(cst, path8.slice(0, -1));
|
|
254978
|
+
const field2 = path8[path8.length - 1][0];
|
|
254979
254979
|
const coll = parent?.[field2];
|
|
254980
254980
|
if (coll && "items" in coll)
|
|
254981
254981
|
return coll;
|
|
254982
254982
|
throw new Error("Parent collection not found");
|
|
254983
254983
|
};
|
|
254984
|
-
function _visit(
|
|
254985
|
-
let ctrl = visitor(item,
|
|
254984
|
+
function _visit(path8, item, visitor) {
|
|
254985
|
+
let ctrl = visitor(item, path8);
|
|
254986
254986
|
if (typeof ctrl === "symbol")
|
|
254987
254987
|
return ctrl;
|
|
254988
254988
|
for (const field2 of ["key", "value"]) {
|
|
254989
254989
|
const token = item[field2];
|
|
254990
254990
|
if (token && "items" in token) {
|
|
254991
254991
|
for (let i6 = 0;i6 < token.items.length; ++i6) {
|
|
254992
|
-
const ci = _visit(Object.freeze(
|
|
254992
|
+
const ci = _visit(Object.freeze(path8.concat([[field2, i6]])), token.items[i6], visitor);
|
|
254993
254993
|
if (typeof ci === "number")
|
|
254994
254994
|
i6 = ci - 1;
|
|
254995
254995
|
else if (ci === BREAK)
|
|
@@ -255000,10 +255000,10 @@ var require_cst_visit = __commonJS((exports) => {
|
|
|
255000
255000
|
}
|
|
255001
255001
|
}
|
|
255002
255002
|
if (typeof ctrl === "function" && field2 === "key")
|
|
255003
|
-
ctrl = ctrl(item,
|
|
255003
|
+
ctrl = ctrl(item, path8);
|
|
255004
255004
|
}
|
|
255005
255005
|
}
|
|
255006
|
-
return typeof ctrl === "function" ? ctrl(item,
|
|
255006
|
+
return typeof ctrl === "function" ? ctrl(item, path8) : ctrl;
|
|
255007
255007
|
}
|
|
255008
255008
|
exports.visit = visit2;
|
|
255009
255009
|
});
|
|
@@ -273273,7 +273273,7 @@ function connectCommand() {
|
|
|
273273
273273
|
var package_default = {
|
|
273274
273274
|
name: "@settlemint/sdk-cli",
|
|
273275
273275
|
description: "SettleMint SDK, integrate SettleMint into your application with ease.",
|
|
273276
|
-
version: "0.8.0-
|
|
273276
|
+
version: "0.8.0-pr3c9df2ea",
|
|
273277
273277
|
type: "module",
|
|
273278
273278
|
private: false,
|
|
273279
273279
|
license: "FSL-1.1-MIT",
|
|
@@ -273324,8 +273324,8 @@ var package_default = {
|
|
|
273324
273324
|
"@inquirer/input": "4.1.1",
|
|
273325
273325
|
"@inquirer/password": "4.0.4",
|
|
273326
273326
|
"@inquirer/select": "4.0.4",
|
|
273327
|
-
"@settlemint/sdk-js": "0.8.0-
|
|
273328
|
-
"@settlemint/sdk-utils": "0.8.0-
|
|
273327
|
+
"@settlemint/sdk-js": "0.8.0-pr3c9df2ea",
|
|
273328
|
+
"@settlemint/sdk-utils": "0.8.0-pr3c9df2ea",
|
|
273329
273329
|
"get-tsconfig": "4.8.1",
|
|
273330
273330
|
giget: "1.2.3"
|
|
273331
273331
|
},
|
|
@@ -275772,52 +275772,6 @@ function platformCommand() {
|
|
|
275772
275772
|
return new Command2("platform").description("Manage SettleMint platform resources").addCommand(createCommand3()).addCommand(updateCommand()).addCommand(deleteCommand()).addCommand(restartCommand());
|
|
275773
275773
|
}
|
|
275774
275774
|
|
|
275775
|
-
// src/commands/smart-contract-set/chaincode/package.ts
|
|
275776
|
-
import { unlink as unlink2 } from "node:fs/promises";
|
|
275777
|
-
import path8 from "node:path";
|
|
275778
|
-
function packageChaincodeCommand() {
|
|
275779
|
-
const cmd2 = new Command2("package").description("Package a chaincode").requiredOption("--name <name>", "Name of the output file").requiredOption("--version <version>", "Version of the chaincode").requiredOption("--path <path>", "Path to the chaincode").requiredOption("--lang <language>", "Language the chaincode is written in").action(async (options) => {
|
|
275780
|
-
try {
|
|
275781
|
-
await packageChaincode({
|
|
275782
|
-
name: options.name,
|
|
275783
|
-
version: options.version,
|
|
275784
|
-
path: options.path,
|
|
275785
|
-
lang: options.lang
|
|
275786
|
-
});
|
|
275787
|
-
} catch (error5) {
|
|
275788
|
-
cancel2(`Chaincode packaging failed: ${error5 instanceof Error ? error5.message : String(error5)}`);
|
|
275789
|
-
}
|
|
275790
|
-
});
|
|
275791
|
-
return cmd2;
|
|
275792
|
-
}
|
|
275793
|
-
async function packageChaincode(options) {
|
|
275794
|
-
const { name: name2, version, path: ccPath, lang } = options;
|
|
275795
|
-
note(`Packaging chaincode ${version}...`);
|
|
275796
|
-
const rootPackageJson = Bun.file(path8.join(process.cwd(), "package.json"));
|
|
275797
|
-
const ccPackageJsonPath = path8.join(ccPath, "package.json");
|
|
275798
|
-
const ccPackageJson = Bun.file(ccPackageJsonPath);
|
|
275799
|
-
const hasRootPackageJson = await rootPackageJson.exists();
|
|
275800
|
-
if (hasRootPackageJson) {
|
|
275801
|
-
await Bun.write(ccPackageJson, rootPackageJson);
|
|
275802
|
-
}
|
|
275803
|
-
await executeCommand("peer", [
|
|
275804
|
-
"lifecycle",
|
|
275805
|
-
"chaincode",
|
|
275806
|
-
"package",
|
|
275807
|
-
`./${name2}.tar.gz`,
|
|
275808
|
-
"--path",
|
|
275809
|
-
ccPath,
|
|
275810
|
-
"--lang",
|
|
275811
|
-
lang,
|
|
275812
|
-
"--label",
|
|
275813
|
-
`${name2}_${version}`
|
|
275814
|
-
]);
|
|
275815
|
-
if (await ccPackageJson.exists()) {
|
|
275816
|
-
await unlink2(ccPackageJsonPath);
|
|
275817
|
-
}
|
|
275818
|
-
outro("Chaincode is packaged successfully");
|
|
275819
|
-
}
|
|
275820
|
-
|
|
275821
275775
|
// src/commands/smart-contract-set/create.ts
|
|
275822
275776
|
import { rmdir } from "node:fs/promises";
|
|
275823
275777
|
import { join as join7 } from "node:path";
|
|
@@ -276422,22 +276376,22 @@ var $visitAsync = visit2.visitAsync;
|
|
|
276422
276376
|
|
|
276423
276377
|
// src/commands/smart-contract-set/subgraph/utils/subgraph-config.ts
|
|
276424
276378
|
var CONFIG_FILE_PATH = "./subgraph/subgraph.config.json";
|
|
276425
|
-
var isGenerated = (
|
|
276426
|
-
var getSubgraphYamlFile = async (
|
|
276427
|
-
const generated = await isGenerated(
|
|
276428
|
-
if (generated && await exists2(join8(
|
|
276429
|
-
return join8(
|
|
276379
|
+
var isGenerated = (path8 = process.cwd()) => exists2(join8(path8, CONFIG_FILE_PATH));
|
|
276380
|
+
var getSubgraphYamlFile = async (path8 = process.cwd()) => {
|
|
276381
|
+
const generated = await isGenerated(path8);
|
|
276382
|
+
if (generated && await exists2(join8(path8, "generated/scs.subgraph.yaml"))) {
|
|
276383
|
+
return join8(path8, "generated/scs.subgraph.yaml");
|
|
276430
276384
|
}
|
|
276431
|
-
if (await exists2(join8(
|
|
276432
|
-
return join8(
|
|
276385
|
+
if (await exists2(join8(path8, "subgraph/subgraph.yaml"))) {
|
|
276386
|
+
return join8(path8, "subgraph/subgraph.yaml");
|
|
276433
276387
|
}
|
|
276434
|
-
if (await exists2(join8(
|
|
276435
|
-
return join8(
|
|
276388
|
+
if (await exists2(join8(path8, "subgraph.yaml"))) {
|
|
276389
|
+
return join8(path8, "subgraph.yaml");
|
|
276436
276390
|
}
|
|
276437
276391
|
throw new Error("Subgraph configuration file not found");
|
|
276438
276392
|
};
|
|
276439
|
-
var getSubgraphYamlConfig = async (
|
|
276440
|
-
const subgraphYamlFile = await getSubgraphYamlFile(
|
|
276393
|
+
var getSubgraphYamlConfig = async (path8 = process.cwd()) => {
|
|
276394
|
+
const subgraphYamlFile = await getSubgraphYamlFile(path8);
|
|
276441
276395
|
const rawYamlConfig = await readFile7(subgraphYamlFile);
|
|
276442
276396
|
return $parse(rawYamlConfig.toString());
|
|
276443
276397
|
};
|
|
@@ -276445,9 +276399,9 @@ var updateSubgraphYamlConfig = async (config4, cwd2 = process.cwd()) => {
|
|
|
276445
276399
|
const subgraphYamlFile = await getSubgraphYamlFile(cwd2);
|
|
276446
276400
|
await writeFile8(subgraphYamlFile, $stringify(config4));
|
|
276447
276401
|
};
|
|
276448
|
-
var getSubgraphConfig = async (
|
|
276402
|
+
var getSubgraphConfig = async (path8 = process.cwd()) => {
|
|
276449
276403
|
try {
|
|
276450
|
-
const configContents = await readFile7(join8(
|
|
276404
|
+
const configContents = await readFile7(join8(path8, CONFIG_FILE_PATH));
|
|
276451
276405
|
const currentConfig = tryParseJson(configContents.toString());
|
|
276452
276406
|
return currentConfig;
|
|
276453
276407
|
} catch (err) {
|
|
@@ -276689,7 +276643,7 @@ function subgraphDeployCommand() {
|
|
|
276689
276643
|
accessToken,
|
|
276690
276644
|
instance
|
|
276691
276645
|
});
|
|
276692
|
-
const middleware = await settlemintClient.middleware.read(
|
|
276646
|
+
const middleware = await settlemintClient.middleware.read(theGraphMiddleware.uniqueName);
|
|
276693
276647
|
const graphEndpoints = await getGraphEndpoint(middleware, env2);
|
|
276694
276648
|
await writeEnvSpinner(!!prod, {
|
|
276695
276649
|
...env2,
|
|
@@ -276720,9 +276674,7 @@ function smartContractSetCommand() {
|
|
|
276720
276674
|
subgraph.addCommand(subgraphBuildCommand());
|
|
276721
276675
|
subgraph.addCommand(subgraphCodegenCommand());
|
|
276722
276676
|
subgraph.addCommand(subgraphDeployCommand());
|
|
276723
|
-
|
|
276724
|
-
chaincode.addCommand(packageChaincodeCommand());
|
|
276725
|
-
return new Command2("smart-contract-set").alias("scs").description("Manage smart contract sets").addCommand(createCommand4()).addCommand(foundry).addCommand(hardhat).addCommand(subgraph).addCommand(chaincode);
|
|
276677
|
+
return new Command2("smart-contract-set").alias("scs").description("Manage smart contract sets").addCommand(createCommand4()).addCommand(foundry).addCommand(hardhat).addCommand(subgraph);
|
|
276726
276678
|
}
|
|
276727
276679
|
|
|
276728
276680
|
// src/cli.ts
|
|
@@ -276740,4 +276692,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
|
|
|
276740
276692
|
cancel2(reason);
|
|
276741
276693
|
});
|
|
276742
276694
|
|
|
276743
|
-
//# debugId=
|
|
276695
|
+
//# debugId=313E356E9D7D336C64756E2164756E21
|