@settlemint/sdk-cli 0.9.3-pr40802d9d → 0.9.3-pr4c56c15a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cli.js +141 -161
- package/dist/cli.js.map +6 -6
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -19607,13 +19607,13 @@ var require_cjs = __commonJS((exports) => {
|
|
|
19607
19607
|
// ../../node_modules/@npmcli/promise-spawn/node_modules/which/lib/index.js
|
|
19608
19608
|
var require_lib4 = __commonJS((exports, module) => {
|
|
19609
19609
|
var { isexe, sync: isexeSync } = require_cjs();
|
|
19610
|
-
var { join:
|
|
19610
|
+
var { join: join2, delimiter, sep: sep2, posix: posix2 } = __require("path");
|
|
19611
19611
|
var isWindows = process.platform === "win32";
|
|
19612
19612
|
var rSlash = new RegExp(`[${posix2.sep}${sep2 === posix2.sep ? "" : sep2}]`.replace(/(\\)/g, "\\$1"));
|
|
19613
19613
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
19614
19614
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
19615
19615
|
var getPathInfo = (cmd, {
|
|
19616
|
-
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.
|
|
19616
|
+
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.4fYQuSVRgE:/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",
|
|
19617
19617
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
19618
19618
|
delimiter: optDelimiter = delimiter
|
|
19619
19619
|
}) => {
|
|
@@ -19634,7 +19634,7 @@ var require_lib4 = __commonJS((exports, module) => {
|
|
|
19634
19634
|
var getPathPart = (raw, cmd) => {
|
|
19635
19635
|
const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
|
|
19636
19636
|
const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "";
|
|
19637
|
-
return prefix +
|
|
19637
|
+
return prefix + join2(pathPart, cmd);
|
|
19638
19638
|
};
|
|
19639
19639
|
var which = async (cmd, opt = {}) => {
|
|
19640
19640
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
@@ -19817,7 +19817,7 @@ var require_lib5 = __commonJS((exports, module) => {
|
|
|
19817
19817
|
let pathToInitial;
|
|
19818
19818
|
try {
|
|
19819
19819
|
pathToInitial = which.sync(initialCmd, {
|
|
19820
|
-
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.
|
|
19820
|
+
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.4fYQuSVRgE:/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",
|
|
19821
19821
|
pathext: options.env && findInObject(options.env, "PATHEXT") || process.env.PATHEXT
|
|
19822
19822
|
}).toLowerCase();
|
|
19823
19823
|
} catch (err) {
|
|
@@ -20528,13 +20528,13 @@ var require_opts = __commonJS((exports, module) => {
|
|
|
20528
20528
|
// ../../node_modules/@npmcli/git/node_modules/which/lib/index.js
|
|
20529
20529
|
var require_lib6 = __commonJS((exports, module) => {
|
|
20530
20530
|
var { isexe, sync: isexeSync } = require_cjs();
|
|
20531
|
-
var { join:
|
|
20531
|
+
var { join: join2, delimiter, sep: sep2, posix: posix2 } = __require("path");
|
|
20532
20532
|
var isWindows = process.platform === "win32";
|
|
20533
20533
|
var rSlash = new RegExp(`[${posix2.sep}${sep2 === posix2.sep ? "" : sep2}]`.replace(/(\\)/g, "\\$1"));
|
|
20534
20534
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
20535
20535
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
20536
20536
|
var getPathInfo = (cmd, {
|
|
20537
|
-
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.
|
|
20537
|
+
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.4fYQuSVRgE:/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",
|
|
20538
20538
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
20539
20539
|
delimiter: optDelimiter = delimiter
|
|
20540
20540
|
}) => {
|
|
@@ -20555,7 +20555,7 @@ var require_lib6 = __commonJS((exports, module) => {
|
|
|
20555
20555
|
var getPathPart = (raw, cmd) => {
|
|
20556
20556
|
const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
|
|
20557
20557
|
const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "";
|
|
20558
|
-
return prefix +
|
|
20558
|
+
return prefix + join2(pathPart, cmd);
|
|
20559
20559
|
};
|
|
20560
20560
|
var which = async (cmd, opt = {}) => {
|
|
20561
20561
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
@@ -22838,7 +22838,7 @@ var require_lib8 = __commonJS((exports, module) => {
|
|
|
22838
22838
|
|
|
22839
22839
|
// ../../node_modules/npm-normalize-package-bin/lib/index.js
|
|
22840
22840
|
var require_lib9 = __commonJS((exports, module) => {
|
|
22841
|
-
var { join:
|
|
22841
|
+
var { join: join2, basename } = __require("path");
|
|
22842
22842
|
var normalize2 = (pkg) => !pkg.bin ? removeBin(pkg) : typeof pkg.bin === "string" ? normalizeString(pkg) : Array.isArray(pkg.bin) ? normalizeArray(pkg) : typeof pkg.bin === "object" ? normalizeObject(pkg) : removeBin(pkg);
|
|
22843
22843
|
var normalizeString = (pkg) => {
|
|
22844
22844
|
if (!pkg.name) {
|
|
@@ -22863,11 +22863,11 @@ var require_lib9 = __commonJS((exports, module) => {
|
|
|
22863
22863
|
const clean = {};
|
|
22864
22864
|
let hasBins = false;
|
|
22865
22865
|
Object.keys(orig).forEach((binKey) => {
|
|
22866
|
-
const base2 =
|
|
22866
|
+
const base2 = join2("/", basename(binKey.replace(/\\|:/g, "/"))).slice(1);
|
|
22867
22867
|
if (typeof orig[binKey] !== "string" || !base2) {
|
|
22868
22868
|
return;
|
|
22869
22869
|
}
|
|
22870
|
-
const binTarget =
|
|
22870
|
+
const binTarget = join2("/", orig[binKey].replace(/\\/g, "/")).replace(/\\/g, "/").slice(1);
|
|
22871
22871
|
if (!binTarget) {
|
|
22872
22872
|
return;
|
|
22873
22873
|
}
|
|
@@ -26088,7 +26088,7 @@ var require_util = __commonJS((exports) => {
|
|
|
26088
26088
|
return path5;
|
|
26089
26089
|
}
|
|
26090
26090
|
exports.normalize = normalize2;
|
|
26091
|
-
function
|
|
26091
|
+
function join4(aRoot, aPath) {
|
|
26092
26092
|
if (aRoot === "") {
|
|
26093
26093
|
aRoot = ".";
|
|
26094
26094
|
}
|
|
@@ -26120,7 +26120,7 @@ var require_util = __commonJS((exports) => {
|
|
|
26120
26120
|
}
|
|
26121
26121
|
return joined;
|
|
26122
26122
|
}
|
|
26123
|
-
exports.join =
|
|
26123
|
+
exports.join = join4;
|
|
26124
26124
|
exports.isAbsolute = function(aPath) {
|
|
26125
26125
|
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
26126
26126
|
};
|
|
@@ -26293,7 +26293,7 @@ var require_util = __commonJS((exports) => {
|
|
|
26293
26293
|
parsed.path = parsed.path.substring(0, index + 1);
|
|
26294
26294
|
}
|
|
26295
26295
|
}
|
|
26296
|
-
sourceURL =
|
|
26296
|
+
sourceURL = join4(urlGenerate(parsed), sourceURL);
|
|
26297
26297
|
}
|
|
26298
26298
|
return normalize2(sourceURL);
|
|
26299
26299
|
}
|
|
@@ -198504,23 +198504,23 @@ var require_printer = __commonJS((exports) => {
|
|
|
198504
198504
|
leave: (node) => "$" + node.name
|
|
198505
198505
|
},
|
|
198506
198506
|
Document: {
|
|
198507
|
-
leave: (node) =>
|
|
198507
|
+
leave: (node) => join4(node.definitions, `
|
|
198508
198508
|
|
|
198509
198509
|
`)
|
|
198510
198510
|
},
|
|
198511
198511
|
OperationDefinition: {
|
|
198512
198512
|
leave(node) {
|
|
198513
|
-
const varDefs = wrap("(",
|
|
198514
|
-
const prefix =
|
|
198513
|
+
const varDefs = wrap("(", join4(node.variableDefinitions, ", "), ")");
|
|
198514
|
+
const prefix = join4([
|
|
198515
198515
|
node.operation,
|
|
198516
|
-
|
|
198517
|
-
|
|
198516
|
+
join4([node.name, varDefs]),
|
|
198517
|
+
join4(node.directives, " ")
|
|
198518
198518
|
], " ");
|
|
198519
198519
|
return (prefix === "query" ? "" : prefix + " ") + node.selectionSet;
|
|
198520
198520
|
}
|
|
198521
198521
|
},
|
|
198522
198522
|
VariableDefinition: {
|
|
198523
|
-
leave: ({ variable, type, defaultValue, directives }) => variable + ": " + type + wrap(" = ", defaultValue) + wrap(" ",
|
|
198523
|
+
leave: ({ variable, type, defaultValue, directives }) => variable + ": " + type + wrap(" = ", defaultValue) + wrap(" ", join4(directives, " "))
|
|
198524
198524
|
},
|
|
198525
198525
|
SelectionSet: {
|
|
198526
198526
|
leave: ({ selections }) => block(selections)
|
|
@@ -198528,32 +198528,32 @@ var require_printer = __commonJS((exports) => {
|
|
|
198528
198528
|
Field: {
|
|
198529
198529
|
leave({ alias, name, arguments: args, directives, selectionSet }) {
|
|
198530
198530
|
const prefix = wrap("", alias, ": ") + name;
|
|
198531
|
-
let argsLine = prefix + wrap("(",
|
|
198531
|
+
let argsLine = prefix + wrap("(", join4(args, ", "), ")");
|
|
198532
198532
|
if (argsLine.length > MAX_LINE_LENGTH) {
|
|
198533
198533
|
argsLine = prefix + wrap(`(
|
|
198534
|
-
`, indent(
|
|
198534
|
+
`, indent(join4(args, `
|
|
198535
198535
|
`)), `
|
|
198536
198536
|
)`);
|
|
198537
198537
|
}
|
|
198538
|
-
return
|
|
198538
|
+
return join4([argsLine, join4(directives, " "), selectionSet], " ");
|
|
198539
198539
|
}
|
|
198540
198540
|
},
|
|
198541
198541
|
Argument: {
|
|
198542
198542
|
leave: ({ name, value }) => name + ": " + value
|
|
198543
198543
|
},
|
|
198544
198544
|
FragmentSpread: {
|
|
198545
|
-
leave: ({ name, directives }) => "..." + name + wrap(" ",
|
|
198545
|
+
leave: ({ name, directives }) => "..." + name + wrap(" ", join4(directives, " "))
|
|
198546
198546
|
},
|
|
198547
198547
|
InlineFragment: {
|
|
198548
|
-
leave: ({ typeCondition, directives, selectionSet }) =>
|
|
198548
|
+
leave: ({ typeCondition, directives, selectionSet }) => join4([
|
|
198549
198549
|
"...",
|
|
198550
198550
|
wrap("on ", typeCondition),
|
|
198551
|
-
|
|
198551
|
+
join4(directives, " "),
|
|
198552
198552
|
selectionSet
|
|
198553
198553
|
], " ")
|
|
198554
198554
|
},
|
|
198555
198555
|
FragmentDefinition: {
|
|
198556
|
-
leave: ({ name, typeCondition, variableDefinitions, directives, selectionSet }) => `fragment ${name}${wrap("(",
|
|
198556
|
+
leave: ({ name, typeCondition, variableDefinitions, directives, selectionSet }) => `fragment ${name}${wrap("(", join4(variableDefinitions, ", "), ")")} ` + `on ${typeCondition} ${wrap("", join4(directives, " "), " ")}` + selectionSet
|
|
198557
198557
|
},
|
|
198558
198558
|
IntValue: {
|
|
198559
198559
|
leave: ({ value }) => value
|
|
@@ -198574,16 +198574,16 @@ var require_printer = __commonJS((exports) => {
|
|
|
198574
198574
|
leave: ({ value }) => value
|
|
198575
198575
|
},
|
|
198576
198576
|
ListValue: {
|
|
198577
|
-
leave: ({ values }) => "[" +
|
|
198577
|
+
leave: ({ values }) => "[" + join4(values, ", ") + "]"
|
|
198578
198578
|
},
|
|
198579
198579
|
ObjectValue: {
|
|
198580
|
-
leave: ({ fields }) => "{" +
|
|
198580
|
+
leave: ({ fields }) => "{" + join4(fields, ", ") + "}"
|
|
198581
198581
|
},
|
|
198582
198582
|
ObjectField: {
|
|
198583
198583
|
leave: ({ name, value }) => name + ": " + value
|
|
198584
198584
|
},
|
|
198585
198585
|
Directive: {
|
|
198586
|
-
leave: ({ name, arguments: args }) => "@" + name + wrap("(",
|
|
198586
|
+
leave: ({ name, arguments: args }) => "@" + name + wrap("(", join4(args, ", "), ")")
|
|
198587
198587
|
},
|
|
198588
198588
|
NamedType: {
|
|
198589
198589
|
leave: ({ name }) => name
|
|
@@ -198596,115 +198596,115 @@ var require_printer = __commonJS((exports) => {
|
|
|
198596
198596
|
},
|
|
198597
198597
|
SchemaDefinition: {
|
|
198598
198598
|
leave: ({ description, directives, operationTypes }) => wrap("", description, `
|
|
198599
|
-
`) +
|
|
198599
|
+
`) + join4(["schema", join4(directives, " "), block(operationTypes)], " ")
|
|
198600
198600
|
},
|
|
198601
198601
|
OperationTypeDefinition: {
|
|
198602
198602
|
leave: ({ operation, type }) => operation + ": " + type
|
|
198603
198603
|
},
|
|
198604
198604
|
ScalarTypeDefinition: {
|
|
198605
198605
|
leave: ({ description, name, directives }) => wrap("", description, `
|
|
198606
|
-
`) +
|
|
198606
|
+
`) + join4(["scalar", name, join4(directives, " ")], " ")
|
|
198607
198607
|
},
|
|
198608
198608
|
ObjectTypeDefinition: {
|
|
198609
198609
|
leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, `
|
|
198610
|
-
`) +
|
|
198610
|
+
`) + join4([
|
|
198611
198611
|
"type",
|
|
198612
198612
|
name,
|
|
198613
|
-
wrap("implements ",
|
|
198614
|
-
|
|
198613
|
+
wrap("implements ", join4(interfaces, " & ")),
|
|
198614
|
+
join4(directives, " "),
|
|
198615
198615
|
block(fields)
|
|
198616
198616
|
], " ")
|
|
198617
198617
|
},
|
|
198618
198618
|
FieldDefinition: {
|
|
198619
198619
|
leave: ({ description, name, arguments: args, type, directives }) => wrap("", description, `
|
|
198620
198620
|
`) + name + (hasMultilineItems(args) ? wrap(`(
|
|
198621
|
-
`, indent(
|
|
198621
|
+
`, indent(join4(args, `
|
|
198622
198622
|
`)), `
|
|
198623
|
-
)`) : wrap("(",
|
|
198623
|
+
)`) : wrap("(", join4(args, ", "), ")")) + ": " + type + wrap(" ", join4(directives, " "))
|
|
198624
198624
|
},
|
|
198625
198625
|
InputValueDefinition: {
|
|
198626
198626
|
leave: ({ description, name, type, defaultValue, directives }) => wrap("", description, `
|
|
198627
|
-
`) +
|
|
198627
|
+
`) + join4([name + ": " + type, wrap("= ", defaultValue), join4(directives, " ")], " ")
|
|
198628
198628
|
},
|
|
198629
198629
|
InterfaceTypeDefinition: {
|
|
198630
198630
|
leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, `
|
|
198631
|
-
`) +
|
|
198631
|
+
`) + join4([
|
|
198632
198632
|
"interface",
|
|
198633
198633
|
name,
|
|
198634
|
-
wrap("implements ",
|
|
198635
|
-
|
|
198634
|
+
wrap("implements ", join4(interfaces, " & ")),
|
|
198635
|
+
join4(directives, " "),
|
|
198636
198636
|
block(fields)
|
|
198637
198637
|
], " ")
|
|
198638
198638
|
},
|
|
198639
198639
|
UnionTypeDefinition: {
|
|
198640
198640
|
leave: ({ description, name, directives, types: types2 }) => wrap("", description, `
|
|
198641
|
-
`) +
|
|
198641
|
+
`) + join4(["union", name, join4(directives, " "), wrap("= ", join4(types2, " | "))], " ")
|
|
198642
198642
|
},
|
|
198643
198643
|
EnumTypeDefinition: {
|
|
198644
198644
|
leave: ({ description, name, directives, values }) => wrap("", description, `
|
|
198645
|
-
`) +
|
|
198645
|
+
`) + join4(["enum", name, join4(directives, " "), block(values)], " ")
|
|
198646
198646
|
},
|
|
198647
198647
|
EnumValueDefinition: {
|
|
198648
198648
|
leave: ({ description, name, directives }) => wrap("", description, `
|
|
198649
|
-
`) +
|
|
198649
|
+
`) + join4([name, join4(directives, " ")], " ")
|
|
198650
198650
|
},
|
|
198651
198651
|
InputObjectTypeDefinition: {
|
|
198652
198652
|
leave: ({ description, name, directives, fields }) => wrap("", description, `
|
|
198653
|
-
`) +
|
|
198653
|
+
`) + join4(["input", name, join4(directives, " "), block(fields)], " ")
|
|
198654
198654
|
},
|
|
198655
198655
|
DirectiveDefinition: {
|
|
198656
198656
|
leave: ({ description, name, arguments: args, repeatable, locations }) => wrap("", description, `
|
|
198657
198657
|
`) + "directive @" + name + (hasMultilineItems(args) ? wrap(`(
|
|
198658
|
-
`, indent(
|
|
198658
|
+
`, indent(join4(args, `
|
|
198659
198659
|
`)), `
|
|
198660
|
-
)`) : wrap("(",
|
|
198660
|
+
)`) : wrap("(", join4(args, ", "), ")")) + (repeatable ? " repeatable" : "") + " on " + join4(locations, " | ")
|
|
198661
198661
|
},
|
|
198662
198662
|
SchemaExtension: {
|
|
198663
|
-
leave: ({ directives, operationTypes }) =>
|
|
198663
|
+
leave: ({ directives, operationTypes }) => join4(["extend schema", join4(directives, " "), block(operationTypes)], " ")
|
|
198664
198664
|
},
|
|
198665
198665
|
ScalarTypeExtension: {
|
|
198666
|
-
leave: ({ name, directives }) =>
|
|
198666
|
+
leave: ({ name, directives }) => join4(["extend scalar", name, join4(directives, " ")], " ")
|
|
198667
198667
|
},
|
|
198668
198668
|
ObjectTypeExtension: {
|
|
198669
|
-
leave: ({ name, interfaces, directives, fields }) =>
|
|
198669
|
+
leave: ({ name, interfaces, directives, fields }) => join4([
|
|
198670
198670
|
"extend type",
|
|
198671
198671
|
name,
|
|
198672
|
-
wrap("implements ",
|
|
198673
|
-
|
|
198672
|
+
wrap("implements ", join4(interfaces, " & ")),
|
|
198673
|
+
join4(directives, " "),
|
|
198674
198674
|
block(fields)
|
|
198675
198675
|
], " ")
|
|
198676
198676
|
},
|
|
198677
198677
|
InterfaceTypeExtension: {
|
|
198678
|
-
leave: ({ name, interfaces, directives, fields }) =>
|
|
198678
|
+
leave: ({ name, interfaces, directives, fields }) => join4([
|
|
198679
198679
|
"extend interface",
|
|
198680
198680
|
name,
|
|
198681
|
-
wrap("implements ",
|
|
198682
|
-
|
|
198681
|
+
wrap("implements ", join4(interfaces, " & ")),
|
|
198682
|
+
join4(directives, " "),
|
|
198683
198683
|
block(fields)
|
|
198684
198684
|
], " ")
|
|
198685
198685
|
},
|
|
198686
198686
|
UnionTypeExtension: {
|
|
198687
|
-
leave: ({ name, directives, types: types2 }) =>
|
|
198687
|
+
leave: ({ name, directives, types: types2 }) => join4([
|
|
198688
198688
|
"extend union",
|
|
198689
198689
|
name,
|
|
198690
|
-
|
|
198691
|
-
wrap("= ",
|
|
198690
|
+
join4(directives, " "),
|
|
198691
|
+
wrap("= ", join4(types2, " | "))
|
|
198692
198692
|
], " ")
|
|
198693
198693
|
},
|
|
198694
198694
|
EnumTypeExtension: {
|
|
198695
|
-
leave: ({ name, directives, values }) =>
|
|
198695
|
+
leave: ({ name, directives, values }) => join4(["extend enum", name, join4(directives, " "), block(values)], " ")
|
|
198696
198696
|
},
|
|
198697
198697
|
InputObjectTypeExtension: {
|
|
198698
|
-
leave: ({ name, directives, fields }) =>
|
|
198698
|
+
leave: ({ name, directives, fields }) => join4(["extend input", name, join4(directives, " "), block(fields)], " ")
|
|
198699
198699
|
}
|
|
198700
198700
|
};
|
|
198701
|
-
function
|
|
198701
|
+
function join4(maybeArray, separator = "") {
|
|
198702
198702
|
var _maybeArray$filter$jo;
|
|
198703
198703
|
return (_maybeArray$filter$jo = maybeArray === null || maybeArray === undefined ? undefined : maybeArray.filter((x2) => x2).join(separator)) !== null && _maybeArray$filter$jo !== undefined ? _maybeArray$filter$jo : "";
|
|
198704
198704
|
}
|
|
198705
198705
|
function block(array) {
|
|
198706
198706
|
return wrap(`{
|
|
198707
|
-
`, indent(
|
|
198707
|
+
`, indent(join4(array, `
|
|
198708
198708
|
`)), `
|
|
198709
198709
|
}`);
|
|
198710
198710
|
}
|
|
@@ -223327,7 +223327,7 @@ ${Bt.cyan(Yt)}
|
|
|
223327
223327
|
code: "ENOENT"
|
|
223328
223328
|
}), getPathInfo = (e9, t7) => {
|
|
223329
223329
|
var r6 = t7.colon || or;
|
|
223330
|
-
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.
|
|
223330
|
+
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.4fYQuSVRgE:/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)];
|
|
223331
223331
|
var n6 = nr ? t7.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
223332
223332
|
var a5 = nr ? n6.split(r6) : [""];
|
|
223333
223333
|
if (nr) {
|
|
@@ -226464,7 +226464,7 @@ ${whileRunning(e9)}`;
|
|
|
226464
226464
|
};
|
|
226465
226465
|
ni = Object.assign(async function _main() {
|
|
226466
226466
|
var e9 = new Cli({
|
|
226467
|
-
binaryVersion: "0.9.3-
|
|
226467
|
+
binaryVersion: "0.9.3-pr4c56c15a",
|
|
226468
226468
|
binaryLabel: "gql.tada CLI",
|
|
226469
226469
|
binaryName: "gql.tada"
|
|
226470
226470
|
});
|
|
@@ -233936,7 +233936,7 @@ var require_path_reservations = __commonJS((exports, module) => {
|
|
|
233936
233936
|
var assert = __require("assert");
|
|
233937
233937
|
var normalize3 = require_normalize_unicode();
|
|
233938
233938
|
var stripSlashes = require_strip_trailing_slashes();
|
|
233939
|
-
var { join:
|
|
233939
|
+
var { join: join6 } = __require("path");
|
|
233940
233940
|
var platform2 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
233941
233941
|
var isWindows2 = platform2 === "win32";
|
|
233942
233942
|
module.exports = () => {
|
|
@@ -233945,7 +233945,7 @@ var require_path_reservations = __commonJS((exports, module) => {
|
|
|
233945
233945
|
const getDirs = (path5) => {
|
|
233946
233946
|
const dirs = path5.split("/").slice(0, -1).reduce((set, path6) => {
|
|
233947
233947
|
if (set.length) {
|
|
233948
|
-
path6 =
|
|
233948
|
+
path6 = join6(set[set.length - 1], path6);
|
|
233949
233949
|
}
|
|
233950
233950
|
set.push(path6 || "/");
|
|
233951
233951
|
return set;
|
|
@@ -234013,7 +234013,7 @@ var require_path_reservations = __commonJS((exports, module) => {
|
|
|
234013
234013
|
};
|
|
234014
234014
|
const reserve = (paths, fn) => {
|
|
234015
234015
|
paths = isWindows2 ? ["win32 parallelization disabled"] : paths.map((p5) => {
|
|
234016
|
-
return stripSlashes(
|
|
234016
|
+
return stripSlashes(join6(normalize3(p5))).toLowerCase();
|
|
234017
234017
|
});
|
|
234018
234018
|
const dirs = new Set(paths.map((path5) => getDirs(path5)).reduce((a8, b4) => a8.concat(b4)));
|
|
234019
234019
|
reservations.set(fn, { dirs, paths });
|
|
@@ -234964,7 +234964,7 @@ var require_which2 = __commonJS((exports, module) => {
|
|
|
234964
234964
|
const colon = opt2.colon || COLON;
|
|
234965
234965
|
const pathEnv = cmd2.match(/\//) || isWindows2 && cmd2.match(/\\/) ? [""] : [
|
|
234966
234966
|
...isWindows2 ? [process.cwd()] : [],
|
|
234967
|
-
...(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.
|
|
234967
|
+
...(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.4fYQuSVRgE:/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)
|
|
234968
234968
|
];
|
|
234969
234969
|
const pathExtExe = isWindows2 ? opt2.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
234970
234970
|
const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
|
|
@@ -256788,7 +256788,7 @@ ${error.stack}`));
|
|
|
256788
256788
|
var package_default = {
|
|
256789
256789
|
name: "@settlemint/sdk-cli",
|
|
256790
256790
|
description: "SettleMint SDK, integrate SettleMint into your application with ease.",
|
|
256791
|
-
version: "0.9.3-
|
|
256791
|
+
version: "0.9.3-pr4c56c15a",
|
|
256792
256792
|
type: "module",
|
|
256793
256793
|
private: false,
|
|
256794
256794
|
license: "FSL-1.1-MIT",
|
|
@@ -256841,8 +256841,8 @@ var package_default = {
|
|
|
256841
256841
|
"@inquirer/input": "4.1.1",
|
|
256842
256842
|
"@inquirer/password": "4.0.4",
|
|
256843
256843
|
"@inquirer/select": "4.0.4",
|
|
256844
|
-
"@settlemint/sdk-js": "0.9.3-
|
|
256845
|
-
"@settlemint/sdk-utils": "0.9.3-
|
|
256844
|
+
"@settlemint/sdk-js": "0.9.3-pr4c56c15a",
|
|
256845
|
+
"@settlemint/sdk-utils": "0.9.3-pr4c56c15a",
|
|
256846
256846
|
"get-tsconfig": "4.8.1",
|
|
256847
256847
|
giget: "1.2.3"
|
|
256848
256848
|
},
|
|
@@ -256867,10 +256867,10 @@ var package_default = {
|
|
|
256867
256867
|
|
|
256868
256868
|
// src/commands/codegen/write-template.ts
|
|
256869
256869
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
256870
|
-
import { join
|
|
256870
|
+
import { join } from "node:path";
|
|
256871
256871
|
|
|
256872
256872
|
// ../utils/dist/filesystem.mjs
|
|
256873
|
-
import { dirname
|
|
256873
|
+
import { dirname } from "node:path";
|
|
256874
256874
|
|
|
256875
256875
|
// ../../node_modules/find-up/index.js
|
|
256876
256876
|
import path2 from "node:path";
|
|
@@ -257103,20 +257103,7 @@ async function findUp(name, options = {}) {
|
|
|
257103
257103
|
|
|
257104
257104
|
// ../utils/dist/filesystem.mjs
|
|
257105
257105
|
import { stat } from "node:fs/promises";
|
|
257106
|
-
async function exists(path3) {
|
|
257107
|
-
try {
|
|
257108
|
-
await stat(path3);
|
|
257109
|
-
return true;
|
|
257110
|
-
} catch {
|
|
257111
|
-
return false;
|
|
257112
|
-
}
|
|
257113
|
-
}
|
|
257114
257106
|
async function projectRoot(fallbackToCwd = false) {
|
|
257115
|
-
const lockFiles = ["package-lock.json", "yarn.lock", "pnpm-lock.yaml", "bun.lockb", "bun.lock"];
|
|
257116
|
-
const lockFilesInCwd = await Promise.race(lockFiles.map((lockFile) => exists(join(process.cwd(), lockFile))));
|
|
257117
|
-
if (lockFilesInCwd) {
|
|
257118
|
-
return process.cwd();
|
|
257119
|
-
}
|
|
257120
257107
|
const packageJsonPath = await findUp("package.json");
|
|
257121
257108
|
if (!packageJsonPath) {
|
|
257122
257109
|
if (fallbackToCwd) {
|
|
@@ -257126,15 +257113,23 @@ async function projectRoot(fallbackToCwd = false) {
|
|
|
257126
257113
|
}
|
|
257127
257114
|
return dirname(packageJsonPath);
|
|
257128
257115
|
}
|
|
257116
|
+
async function exists(path3) {
|
|
257117
|
+
try {
|
|
257118
|
+
await stat(path3);
|
|
257119
|
+
return true;
|
|
257120
|
+
} catch {
|
|
257121
|
+
return false;
|
|
257122
|
+
}
|
|
257123
|
+
}
|
|
257129
257124
|
|
|
257130
257125
|
// src/commands/codegen/write-template.ts
|
|
257131
257126
|
async function writeTemplate(template, directory, filename) {
|
|
257132
257127
|
const projectDir = await projectRoot();
|
|
257133
|
-
const hasSrcDir = await exists(
|
|
257134
|
-
const basePath = hasSrcDir ?
|
|
257135
|
-
const codegenDir =
|
|
257128
|
+
const hasSrcDir = await exists(join(projectDir, "src"));
|
|
257129
|
+
const basePath = hasSrcDir ? join(projectDir, "src") : projectDir;
|
|
257130
|
+
const codegenDir = join(basePath, directory);
|
|
257136
257131
|
await mkdir(codegenDir, { recursive: true });
|
|
257137
|
-
const filePath =
|
|
257132
|
+
const filePath = join(codegenDir, filename);
|
|
257138
257133
|
await writeFile(filePath, template, "utf8");
|
|
257139
257134
|
}
|
|
257140
257135
|
|
|
@@ -257155,10 +257150,10 @@ function missingApplication() {
|
|
|
257155
257150
|
// src/utils/config.ts
|
|
257156
257151
|
import { mkdir as mkdir2, readFile, writeFile as writeFile2 } from "node:fs/promises";
|
|
257157
257152
|
import { homedir } from "node:os";
|
|
257158
|
-
import { join as
|
|
257153
|
+
import { join as join3 } from "node:path";
|
|
257159
257154
|
|
|
257160
257155
|
// ../utils/dist/index.mjs
|
|
257161
|
-
import { join as
|
|
257156
|
+
import { join as join2 } from "node:path";
|
|
257162
257157
|
import { spawn } from "node:child_process";
|
|
257163
257158
|
|
|
257164
257159
|
// ../../node_modules/zod/lib/index.mjs
|
|
@@ -261153,7 +261148,7 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
261153
261148
|
|
|
261154
261149
|
// ../utils/dist/index.mjs
|
|
261155
261150
|
var import_dotenvx = __toESM(require_main2(), 1);
|
|
261156
|
-
import { dirname as dirname2
|
|
261151
|
+
import { dirname as dirname2 } from "node:path";
|
|
261157
261152
|
var import_dotenvx2 = __toESM(require_main2(), 1);
|
|
261158
261153
|
import { stat as stat2 } from "node:fs/promises";
|
|
261159
261154
|
|
|
@@ -267566,7 +267561,7 @@ var et = l((Re, tt) => {
|
|
|
267566
267561
|
var g = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", Y = h("path"), Bt = g ? ";" : ":", V = U(), J = (t) => Object.assign(new Error(`not found: ${t}`), { code: "ENOENT" }), Q = (t, e) => {
|
|
267567
267562
|
let n = e.colon || Bt, r = t.match(/\//) || g && t.match(/\\/) ? [""] : [
|
|
267568
267563
|
...g ? [process.cwd()] : [],
|
|
267569
|
-
...(e.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.
|
|
267564
|
+
...(e.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.4fYQuSVRgE:/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(n)
|
|
267570
267565
|
], s = g ? e.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", o = g ? s.split(n) : [""];
|
|
267571
267566
|
return g && t.indexOf(".") !== -1 && o[0] !== "" && o.unshift(""), {
|
|
267572
267567
|
pathEnv: r,
|
|
@@ -268172,7 +268167,7 @@ async function loadEnvironmentEnv(validateEnv, prod, path5 = process.cwd()) {
|
|
|
268172
268167
|
logLevel: "error",
|
|
268173
268168
|
overload: true,
|
|
268174
268169
|
quiet: true,
|
|
268175
|
-
path:
|
|
268170
|
+
path: join2(path5, ".env")
|
|
268176
268171
|
});
|
|
268177
268172
|
if (!parsed) {
|
|
268178
268173
|
parsed = {};
|
|
@@ -268188,20 +268183,7 @@ async function loadEnvironmentEnv(validateEnv, prod, path5 = process.cwd()) {
|
|
|
268188
268183
|
return {};
|
|
268189
268184
|
}
|
|
268190
268185
|
}
|
|
268191
|
-
async function exists2(path5) {
|
|
268192
|
-
try {
|
|
268193
|
-
await stat2(path5);
|
|
268194
|
-
return true;
|
|
268195
|
-
} catch {
|
|
268196
|
-
return false;
|
|
268197
|
-
}
|
|
268198
|
-
}
|
|
268199
268186
|
async function projectRoot2(fallbackToCwd = false) {
|
|
268200
|
-
const lockFiles = ["package-lock.json", "yarn.lock", "pnpm-lock.yaml", "bun.lockb", "bun.lock"];
|
|
268201
|
-
const lockFilesInCwd = await Promise.race(lockFiles.map((lockFile) => exists2(join22(process.cwd(), lockFile))));
|
|
268202
|
-
if (lockFilesInCwd) {
|
|
268203
|
-
return process.cwd();
|
|
268204
|
-
}
|
|
268205
268187
|
const packageJsonPath = await findUp("package.json");
|
|
268206
268188
|
if (!packageJsonPath) {
|
|
268207
268189
|
if (fallbackToCwd) {
|
|
@@ -268211,6 +268193,14 @@ async function projectRoot2(fallbackToCwd = false) {
|
|
|
268211
268193
|
}
|
|
268212
268194
|
return dirname2(packageJsonPath);
|
|
268213
268195
|
}
|
|
268196
|
+
async function exists2(path5) {
|
|
268197
|
+
try {
|
|
268198
|
+
await stat2(path5);
|
|
268199
|
+
return true;
|
|
268200
|
+
} catch {
|
|
268201
|
+
return false;
|
|
268202
|
+
}
|
|
268203
|
+
}
|
|
268214
268204
|
async function getPackageManager(targetDir) {
|
|
268215
268205
|
const packageManager = await detect({ cwd: targetDir || process.cwd() });
|
|
268216
268206
|
return packageManager?.name ?? "npm";
|
|
@@ -268269,8 +268259,8 @@ function capitalizeFirstLetter(val) {
|
|
|
268269
268259
|
}
|
|
268270
268260
|
|
|
268271
268261
|
// src/utils/config.ts
|
|
268272
|
-
var CONFIG_DIR =
|
|
268273
|
-
var CONFIG_FILE =
|
|
268262
|
+
var CONFIG_DIR = join3(homedir(), ".config", "settlemint");
|
|
268263
|
+
var CONFIG_FILE = join3(CONFIG_DIR, "config.json");
|
|
268274
268264
|
async function ensureConfigDir() {
|
|
268275
268265
|
if (!await exists(CONFIG_DIR)) {
|
|
268276
268266
|
await mkdir2(CONFIG_DIR, { recursive: true });
|
|
@@ -270597,11 +270587,11 @@ async function subgraphNamePrompt(env2) {
|
|
|
270597
270587
|
}
|
|
270598
270588
|
|
|
270599
270589
|
// ../utils/dist/environment.mjs
|
|
270600
|
-
import { join as
|
|
270590
|
+
import { join as join5 } from "node:path";
|
|
270601
270591
|
var import_dotenvx3 = __toESM(require_main2(), 1);
|
|
270602
270592
|
import { readFile as readFile4, writeFile as writeFile5 } from "node:fs/promises";
|
|
270603
|
-
import { dirname as dirname22, join as
|
|
270604
|
-
import { dirname as dirname6
|
|
270593
|
+
import { dirname as dirname22, join as join22 } from "node:path";
|
|
270594
|
+
import { dirname as dirname6 } from "node:path";
|
|
270605
270595
|
var import_dotenvx4 = __toESM(require_main2(), 1);
|
|
270606
270596
|
import { stat as stat7 } from "node:fs/promises";
|
|
270607
270597
|
var maskTokens3 = (output) => {
|
|
@@ -270700,7 +270690,7 @@ async function loadEnvironmentEnv2(validateEnv, prod, path5 = process.cwd()) {
|
|
|
270700
270690
|
logLevel: "error",
|
|
270701
270691
|
overload: true,
|
|
270702
270692
|
quiet: true,
|
|
270703
|
-
path:
|
|
270693
|
+
path: join5(path5, ".env")
|
|
270704
270694
|
});
|
|
270705
270695
|
if (!parsed) {
|
|
270706
270696
|
parsed = {};
|
|
@@ -270716,20 +270706,7 @@ async function loadEnvironmentEnv2(validateEnv, prod, path5 = process.cwd()) {
|
|
|
270716
270706
|
return {};
|
|
270717
270707
|
}
|
|
270718
270708
|
}
|
|
270719
|
-
async function exists3(path5) {
|
|
270720
|
-
try {
|
|
270721
|
-
await stat7(path5);
|
|
270722
|
-
return true;
|
|
270723
|
-
} catch {
|
|
270724
|
-
return false;
|
|
270725
|
-
}
|
|
270726
|
-
}
|
|
270727
270709
|
async function projectRoot3(fallbackToCwd = false) {
|
|
270728
|
-
const lockFiles = ["package-lock.json", "yarn.lock", "pnpm-lock.yaml", "bun.lockb", "bun.lock"];
|
|
270729
|
-
const lockFilesInCwd = await Promise.race(lockFiles.map((lockFile) => exists3(join23(process.cwd(), lockFile))));
|
|
270730
|
-
if (lockFilesInCwd) {
|
|
270731
|
-
return process.cwd();
|
|
270732
|
-
}
|
|
270733
270710
|
const packageJsonPath = await findUp("package.json");
|
|
270734
270711
|
if (!packageJsonPath) {
|
|
270735
270712
|
if (fallbackToCwd) {
|
|
@@ -270739,10 +270716,18 @@ async function projectRoot3(fallbackToCwd = false) {
|
|
|
270739
270716
|
}
|
|
270740
270717
|
return dirname6(packageJsonPath);
|
|
270741
270718
|
}
|
|
270719
|
+
async function exists3(path5) {
|
|
270720
|
+
try {
|
|
270721
|
+
await stat7(path5);
|
|
270722
|
+
return true;
|
|
270723
|
+
} catch {
|
|
270724
|
+
return false;
|
|
270725
|
+
}
|
|
270726
|
+
}
|
|
270742
270727
|
async function findMonoRepoRoot(startDir) {
|
|
270743
270728
|
let currentDir = startDir;
|
|
270744
270729
|
while (currentDir !== "/") {
|
|
270745
|
-
const packageJsonPath =
|
|
270730
|
+
const packageJsonPath = join22(currentDir, "package.json");
|
|
270746
270731
|
if (await exists3(packageJsonPath)) {
|
|
270747
270732
|
const packageJson = tryParseJson2(await readFile4(packageJsonPath, "utf-8"));
|
|
270748
270733
|
if (packageJson?.workspaces && Array.isArray(packageJson?.workspaces) && packageJson?.workspaces.length > 0) {
|
|
@@ -270763,12 +270748,12 @@ async function findMonoRepoPackages(projectDir) {
|
|
|
270763
270748
|
if (!monoRepoRoot) {
|
|
270764
270749
|
return [projectDir];
|
|
270765
270750
|
}
|
|
270766
|
-
const packageJsonPath =
|
|
270751
|
+
const packageJsonPath = join22(monoRepoRoot, "package.json");
|
|
270767
270752
|
const packageJson = tryParseJson2(await readFile4(packageJsonPath, "utf-8"));
|
|
270768
270753
|
const workspaces = packageJson?.workspaces ?? [];
|
|
270769
270754
|
const packagePaths = await Promise.all(workspaces.map(async (workspace) => {
|
|
270770
|
-
const matches = await glob(
|
|
270771
|
-
return matches.map((match2) =>
|
|
270755
|
+
const matches = await glob(join22(monoRepoRoot, workspace, "package.json"));
|
|
270756
|
+
return matches.map((match2) => join22(match2, ".."));
|
|
270772
270757
|
}));
|
|
270773
270758
|
const allPaths = packagePaths.flat();
|
|
270774
270759
|
return allPaths.length === 0 ? [projectDir] : [monoRepoRoot, ...allPaths];
|
|
@@ -270783,7 +270768,7 @@ async function writeEnv(prod, env2, secrets) {
|
|
|
270783
270768
|
}
|
|
270784
270769
|
const targetDirs = await findMonoRepoPackages(projectDir);
|
|
270785
270770
|
await Promise.all(targetDirs.map(async (dir) => {
|
|
270786
|
-
const envFile =
|
|
270771
|
+
const envFile = join22(dir, secrets ? `.env${prod ? ".production" : ""}.local` : `.env${prod ? ".production" : ""}`);
|
|
270787
270772
|
let { parsed: currentEnv } = await exists3(envFile) ? import_dotenvx4.config({
|
|
270788
270773
|
path: envFile,
|
|
270789
270774
|
logLevel: "error",
|
|
@@ -274025,7 +274010,7 @@ function connectCommand() {
|
|
|
274025
274010
|
|
|
274026
274011
|
// src/commands/create.ts
|
|
274027
274012
|
import { mkdir as mkdir6 } from "node:fs/promises";
|
|
274028
|
-
import { join as
|
|
274013
|
+
import { join as join7 } from "node:path";
|
|
274029
274014
|
|
|
274030
274015
|
// src/commands/create/name.prompt.ts
|
|
274031
274016
|
async function namePrompt(env2, argument) {
|
|
@@ -274076,24 +274061,11 @@ async function templatePrompt(templates, argument) {
|
|
|
274076
274061
|
// ../utils/dist/package-manager.mjs
|
|
274077
274062
|
import { readdir as readdir3, rm as rm2 } from "node:fs/promises";
|
|
274078
274063
|
import { resolve as resolve5 } from "node:path";
|
|
274079
|
-
import { dirname as dirname7
|
|
274064
|
+
import { dirname as dirname7 } from "node:path";
|
|
274080
274065
|
import { stat as stat8 } from "node:fs/promises";
|
|
274081
274066
|
var import_package_json3 = __toESM(require_lib12(), 1);
|
|
274082
274067
|
var import_package_json4 = __toESM(require_lib12(), 1);
|
|
274083
|
-
async function exists4(path5) {
|
|
274084
|
-
try {
|
|
274085
|
-
await stat8(path5);
|
|
274086
|
-
return true;
|
|
274087
|
-
} catch {
|
|
274088
|
-
return false;
|
|
274089
|
-
}
|
|
274090
|
-
}
|
|
274091
274068
|
async function projectRoot4(fallbackToCwd = false) {
|
|
274092
|
-
const lockFiles = ["package-lock.json", "yarn.lock", "pnpm-lock.yaml", "bun.lockb", "bun.lock"];
|
|
274093
|
-
const lockFilesInCwd = await Promise.race(lockFiles.map((lockFile) => exists4(join7(process.cwd(), lockFile))));
|
|
274094
|
-
if (lockFilesInCwd) {
|
|
274095
|
-
return process.cwd();
|
|
274096
|
-
}
|
|
274097
274069
|
const packageJsonPath = await findUp("package.json");
|
|
274098
274070
|
if (!packageJsonPath) {
|
|
274099
274071
|
if (fallbackToCwd) {
|
|
@@ -274103,6 +274075,14 @@ async function projectRoot4(fallbackToCwd = false) {
|
|
|
274103
274075
|
}
|
|
274104
274076
|
return dirname7(packageJsonPath);
|
|
274105
274077
|
}
|
|
274078
|
+
async function exists4(path5) {
|
|
274079
|
+
try {
|
|
274080
|
+
await stat8(path5);
|
|
274081
|
+
return true;
|
|
274082
|
+
} catch {
|
|
274083
|
+
return false;
|
|
274084
|
+
}
|
|
274085
|
+
}
|
|
274106
274086
|
var templates = [
|
|
274107
274087
|
{ value: "@settlemint/starterkit-asset-tokenization", label: "Asset Tokenization" }
|
|
274108
274088
|
];
|
|
@@ -274178,7 +274158,7 @@ var normalize3 = function(path5) {
|
|
|
274178
274158
|
}
|
|
274179
274159
|
return isPathAbsolute && !isAbsolute(path5) ? `/${path5}` : path5;
|
|
274180
274160
|
};
|
|
274181
|
-
var
|
|
274161
|
+
var join6 = function(...arguments_4) {
|
|
274182
274162
|
if (arguments_4.length === 0) {
|
|
274183
274163
|
return ".";
|
|
274184
274164
|
}
|
|
@@ -274450,7 +274430,7 @@ var packageManagers = [
|
|
|
274450
274430
|
async function detectPackageManager2(cwd2, options = {}) {
|
|
274451
274431
|
const detected = await findup(resolve6(cwd2 || "."), async (path8) => {
|
|
274452
274432
|
if (!options.ignorePackageJSON) {
|
|
274453
|
-
const packageJSONPath =
|
|
274433
|
+
const packageJSONPath = join6(path8, "package.json");
|
|
274454
274434
|
if (existsSync2(packageJSONPath)) {
|
|
274455
274435
|
const packageJSON = JSON.parse(await readFile5(packageJSONPath, "utf8"));
|
|
274456
274436
|
if (packageJSON?.packageManager) {
|
|
@@ -274835,7 +274815,7 @@ function createCommand2() {
|
|
|
274835
274815
|
const env2 = await loadEnv2(false, false);
|
|
274836
274816
|
const name2 = await namePrompt(env2, projectName);
|
|
274837
274817
|
const targetDir = formatTargetDir(name2);
|
|
274838
|
-
const projectDir =
|
|
274818
|
+
const projectDir = join7(process.cwd(), targetDir);
|
|
274839
274819
|
if (!await exists(projectDir)) {
|
|
274840
274820
|
await mkdir6(projectDir, { recursive: true });
|
|
274841
274821
|
}
|
|
@@ -276671,7 +276651,7 @@ function platformCommand() {
|
|
|
276671
276651
|
|
|
276672
276652
|
// src/commands/smart-contract-set/create.ts
|
|
276673
276653
|
import { rmdir } from "node:fs/promises";
|
|
276674
|
-
import { join as
|
|
276654
|
+
import { join as join8 } from "node:path";
|
|
276675
276655
|
|
|
276676
276656
|
// src/commands/smart-contract-set/prompts/use-case.prompt.ts
|
|
276677
276657
|
async function useCasePrompt(platformConfig, argument) {
|
|
@@ -276724,7 +276704,7 @@ function createCommand4() {
|
|
|
276724
276704
|
return nothingSelectedError("use case");
|
|
276725
276705
|
}
|
|
276726
276706
|
const targetDir = formatTargetDir(name2);
|
|
276727
|
-
const projectDir =
|
|
276707
|
+
const projectDir = join8(process.cwd(), targetDir);
|
|
276728
276708
|
if (await exists2(projectDir) && !await isEmpty(projectDir)) {
|
|
276729
276709
|
const confirmEmpty = await esm_default3({
|
|
276730
276710
|
message: `The folder ${projectDir} already exists. Do you want to delete it?`,
|
|
@@ -277216,7 +277196,7 @@ import { rm as rm4 } from "node:fs/promises";
|
|
|
277216
277196
|
|
|
277217
277197
|
// src/commands/smart-contract-set/subgraph/utils/subgraph-config.ts
|
|
277218
277198
|
import { readFile as readFile7, writeFile as writeFile8 } from "node:fs/promises";
|
|
277219
|
-
import { basename as basename4, join as
|
|
277199
|
+
import { basename as basename4, join as join9 } from "node:path";
|
|
277220
277200
|
|
|
277221
277201
|
// ../../node_modules/yaml/dist/index.js
|
|
277222
277202
|
var composer = require_composer();
|
|
@@ -277266,17 +277246,17 @@ var $visitAsync = visit2.visitAsync;
|
|
|
277266
277246
|
|
|
277267
277247
|
// src/commands/smart-contract-set/subgraph/utils/subgraph-config.ts
|
|
277268
277248
|
var CONFIG_FILE_PATH = "./subgraph/subgraph.config.json";
|
|
277269
|
-
var isGenerated = (path8 = process.cwd()) => exists2(
|
|
277249
|
+
var isGenerated = (path8 = process.cwd()) => exists2(join9(path8, CONFIG_FILE_PATH));
|
|
277270
277250
|
var getSubgraphYamlFile = async (path8 = process.cwd()) => {
|
|
277271
277251
|
const generated = await isGenerated(path8);
|
|
277272
|
-
if (generated && await exists2(
|
|
277273
|
-
return
|
|
277252
|
+
if (generated && await exists2(join9(path8, "generated/scs.subgraph.yaml"))) {
|
|
277253
|
+
return join9(path8, "generated/scs.subgraph.yaml");
|
|
277274
277254
|
}
|
|
277275
|
-
if (await exists2(
|
|
277276
|
-
return
|
|
277255
|
+
if (await exists2(join9(path8, "subgraph/subgraph.yaml"))) {
|
|
277256
|
+
return join9(path8, "subgraph/subgraph.yaml");
|
|
277277
277257
|
}
|
|
277278
|
-
if (await exists2(
|
|
277279
|
-
return
|
|
277258
|
+
if (await exists2(join9(path8, "subgraph.yaml"))) {
|
|
277259
|
+
return join9(path8, "subgraph.yaml");
|
|
277280
277260
|
}
|
|
277281
277261
|
throw new Error("Subgraph configuration file not found");
|
|
277282
277262
|
};
|
|
@@ -277291,7 +277271,7 @@ var updateSubgraphYamlConfig = async (config4, cwd2 = process.cwd()) => {
|
|
|
277291
277271
|
};
|
|
277292
277272
|
var getSubgraphConfig = async (path8 = process.cwd()) => {
|
|
277293
277273
|
try {
|
|
277294
|
-
const configContents = await readFile7(
|
|
277274
|
+
const configContents = await readFile7(join9(path8, CONFIG_FILE_PATH));
|
|
277295
277275
|
const currentConfig = tryParseJson(configContents.toString());
|
|
277296
277276
|
return currentConfig;
|
|
277297
277277
|
} catch (err) {
|
|
@@ -277612,4 +277592,4 @@ function sdkCliCommand(exitOverride = undefined) {
|
|
|
277612
277592
|
ascii();
|
|
277613
277593
|
sdkCliCommand();
|
|
277614
277594
|
|
|
277615
|
-
//# debugId=
|
|
277595
|
+
//# debugId=F90CD60C2B9FE5C064756E2164756E21
|