@settlemint/sdk-cli 0.6.41-main7d678a5 → 0.6.41-mainfc2baac
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 +29 -13
- package/dist/cli.js.map +4 -4
- package/package.json +4 -3
package/dist/cli.js
CHANGED
|
@@ -272334,7 +272334,7 @@ function connectCommand() {
|
|
|
272334
272334
|
var package_default = {
|
|
272335
272335
|
name: "@settlemint/sdk-cli",
|
|
272336
272336
|
description: "SettleMint SDK, integrate SettleMint into your application with ease.",
|
|
272337
|
-
version: "0.6.41-
|
|
272337
|
+
version: "0.6.41-mainfc2baac",
|
|
272338
272338
|
type: "module",
|
|
272339
272339
|
private: false,
|
|
272340
272340
|
license: "FSL-1.1-MIT",
|
|
@@ -272365,6 +272365,7 @@ var package_default = {
|
|
|
272365
272365
|
},
|
|
272366
272366
|
scripts: {
|
|
272367
272367
|
build: "bun run build.ts",
|
|
272368
|
+
dev: "tsup-node --watch",
|
|
272368
272369
|
test: "bun test",
|
|
272369
272370
|
"test:coverage": "bun test --coverage",
|
|
272370
272371
|
typecheck: "tsc --noEmit",
|
|
@@ -272384,8 +272385,8 @@ var package_default = {
|
|
|
272384
272385
|
"@inquirer/input": "4.1.0",
|
|
272385
272386
|
"@inquirer/password": "4.0.3",
|
|
272386
272387
|
"@inquirer/select": "4.0.3",
|
|
272387
|
-
"@settlemint/sdk-js": "0.6.41-
|
|
272388
|
-
"@settlemint/sdk-utils": "0.6.41-
|
|
272388
|
+
"@settlemint/sdk-js": "0.6.41-mainfc2baac",
|
|
272389
|
+
"@settlemint/sdk-utils": "0.6.41-mainfc2baac",
|
|
272389
272390
|
"get-tsconfig": "4.8.1",
|
|
272390
272391
|
giget: "1.2.3"
|
|
272391
272392
|
},
|
|
@@ -273496,18 +273497,22 @@ function capitalizeFirstLetter(val) {
|
|
|
273496
273497
|
async function executeCommand2(command, args, options) {
|
|
273497
273498
|
const child = spawn2(command, args, { env: { ...process.env, ...options?.env } });
|
|
273498
273499
|
process.stdin.pipe(child.stdin);
|
|
273500
|
+
const output = [];
|
|
273499
273501
|
return new Promise((resolve22, reject) => {
|
|
273500
273502
|
child.stdout.on("data", (data) => {
|
|
273501
|
-
|
|
273503
|
+
if (!options?.silent) {
|
|
273504
|
+
process.stdout.write(data);
|
|
273505
|
+
}
|
|
273506
|
+
output.push(data.toString());
|
|
273502
273507
|
});
|
|
273503
273508
|
child.stderr.on("data", (data) => {
|
|
273504
|
-
|
|
273509
|
+
process.stderr.write(data);
|
|
273505
273510
|
});
|
|
273506
273511
|
child.on("error", (err) => reject(err));
|
|
273507
273512
|
child.on("close", (code2) => {
|
|
273508
273513
|
if (code2 === 0 || code2 === null || code2 === 143) {
|
|
273509
273514
|
process.stdin.unpipe(child.stdin);
|
|
273510
|
-
resolve22();
|
|
273515
|
+
resolve22(output);
|
|
273511
273516
|
return;
|
|
273512
273517
|
}
|
|
273513
273518
|
reject(new Error(`Command "${command}" exited with code ${code2}`));
|
|
@@ -275226,18 +275231,29 @@ async function deploymentIdPrompt(env2, accept, prod) {
|
|
|
275226
275231
|
// src/utils/hardhat-config.ts
|
|
275227
275232
|
async function getHardhatConfigData(envConfig) {
|
|
275228
275233
|
try {
|
|
275229
|
-
|
|
275230
|
-
|
|
275231
|
-
|
|
275232
|
-
|
|
275233
|
-
|
|
275234
|
-
|
|
275234
|
+
const { command, args } = await getPackageManagerExecutable();
|
|
275235
|
+
const output = await executeCommand2(command, [...args, "ts-node", "-e", `import hardhat from "hardhat";
|
|
275236
|
+
console.log(JSON.stringify(hardhat.userConfig));`], {
|
|
275237
|
+
env: {
|
|
275238
|
+
...process.env,
|
|
275239
|
+
...envConfig
|
|
275240
|
+
},
|
|
275241
|
+
silent: true
|
|
275242
|
+
});
|
|
275243
|
+
const config4 = JSON.parse(output.join(" "));
|
|
275244
|
+
if (isHardhatConfig(config4)) {
|
|
275245
|
+
return config4;
|
|
275246
|
+
}
|
|
275247
|
+
throw new Error("Invalid hardhat config");
|
|
275235
275248
|
} catch (err) {
|
|
275236
275249
|
const error5 = err;
|
|
275237
275250
|
note(`Error reading hardhat.config.ts: ${error5.message}`);
|
|
275238
275251
|
return {};
|
|
275239
275252
|
}
|
|
275240
275253
|
}
|
|
275254
|
+
function isHardhatConfig(config4) {
|
|
275255
|
+
return typeof config4 === "object" && config4 !== null && "networks" in config4;
|
|
275256
|
+
}
|
|
275241
275257
|
|
|
275242
275258
|
// src/commands/smart-contract-set/hardhat/deploy/remote.ts
|
|
275243
275259
|
function hardhatDeployRemoteCommand() {
|
|
@@ -275715,4 +275731,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
|
|
|
275715
275731
|
cancel2(reason);
|
|
275716
275732
|
});
|
|
275717
275733
|
|
|
275718
|
-
//# debugId=
|
|
275734
|
+
//# debugId=0F7CDAD4684FFE8464756E2164756E21
|