@settlemint/sdk-cli 1.0.9-pr9688bb96 → 1.0.9-pr9bf11a11

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.
Files changed (3) hide show
  1. package/dist/cli.js +201 -36
  2. package/dist/cli.js.map +6 -4
  3. package/package.json +10 -12
package/dist/cli.js CHANGED
@@ -34802,7 +34802,7 @@ var require_cjs = __commonJS((exports) => {
34802
34802
  exports.sync = impl.sync;
34803
34803
  });
34804
34804
 
34805
- // ../../node_modules/which/lib/index.js
34805
+ // ../../node_modules/@npmcli/promise-spawn/node_modules/which/lib/index.js
34806
34806
  var require_lib4 = __commonJS((exports, module) => {
34807
34807
  var { isexe, sync: isexeSync } = require_cjs();
34808
34808
  var { join: join4, delimiter, sep: sep2, posix: posix2 } = __require("path");
@@ -35723,9 +35723,93 @@ var require_opts = __commonJS((exports, module) => {
35723
35723
  module.exports.loadGitConfig = loadGitConfig;
35724
35724
  });
35725
35725
 
35726
+ // ../../node_modules/@npmcli/git/node_modules/which/lib/index.js
35727
+ var require_lib6 = __commonJS((exports, module) => {
35728
+ var { isexe, sync: isexeSync } = require_cjs();
35729
+ var { join: join4, delimiter, sep: sep2, posix: posix2 } = __require("path");
35730
+ var isWindows2 = process.platform === "win32";
35731
+ var rSlash = new RegExp(`[${posix2.sep}${sep2 === posix2.sep ? "" : sep2}]`.replace(/(\\)/g, "\\$1"));
35732
+ var rRel = new RegExp(`^\\.${rSlash.source}`);
35733
+ var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
35734
+ var getPathInfo = (cmd, {
35735
+ path: optPath = process.env.PATH,
35736
+ pathExt: optPathExt = process.env.PATHEXT,
35737
+ delimiter: optDelimiter = delimiter
35738
+ }) => {
35739
+ const pathEnv = cmd.match(rSlash) ? [""] : [
35740
+ ...isWindows2 ? [process.cwd()] : [],
35741
+ ...(optPath || "").split(optDelimiter)
35742
+ ];
35743
+ if (isWindows2) {
35744
+ const pathExtExe = optPathExt || [".EXE", ".CMD", ".BAT", ".COM"].join(optDelimiter);
35745
+ const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()]);
35746
+ if (cmd.includes(".") && pathExt[0] !== "") {
35747
+ pathExt.unshift("");
35748
+ }
35749
+ return { pathEnv, pathExt, pathExtExe };
35750
+ }
35751
+ return { pathEnv, pathExt: [""] };
35752
+ };
35753
+ var getPathPart = (raw, cmd) => {
35754
+ const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
35755
+ const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "";
35756
+ return prefix + join4(pathPart, cmd);
35757
+ };
35758
+ var which = async (cmd, opt = {}) => {
35759
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
35760
+ const found = [];
35761
+ for (const envPart of pathEnv) {
35762
+ const p = getPathPart(envPart, cmd);
35763
+ for (const ext2 of pathExt) {
35764
+ const withExt = p + ext2;
35765
+ const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true });
35766
+ if (is) {
35767
+ if (!opt.all) {
35768
+ return withExt;
35769
+ }
35770
+ found.push(withExt);
35771
+ }
35772
+ }
35773
+ }
35774
+ if (opt.all && found.length) {
35775
+ return found;
35776
+ }
35777
+ if (opt.nothrow) {
35778
+ return null;
35779
+ }
35780
+ throw getNotFoundError(cmd);
35781
+ };
35782
+ var whichSync = (cmd, opt = {}) => {
35783
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
35784
+ const found = [];
35785
+ for (const pathEnvPart of pathEnv) {
35786
+ const p = getPathPart(pathEnvPart, cmd);
35787
+ for (const ext2 of pathExt) {
35788
+ const withExt = p + ext2;
35789
+ const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true });
35790
+ if (is) {
35791
+ if (!opt.all) {
35792
+ return withExt;
35793
+ }
35794
+ found.push(withExt);
35795
+ }
35796
+ }
35797
+ }
35798
+ if (opt.all && found.length) {
35799
+ return found;
35800
+ }
35801
+ if (opt.nothrow) {
35802
+ return null;
35803
+ }
35804
+ throw getNotFoundError(cmd);
35805
+ };
35806
+ module.exports = which;
35807
+ which.sync = whichSync;
35808
+ });
35809
+
35726
35810
  // ../../node_modules/@npmcli/git/lib/which.js
35727
35811
  var require_which = __commonJS((exports, module) => {
35728
- var which = require_lib4();
35812
+ var which = require_lib6();
35729
35813
  var gitPath;
35730
35814
  try {
35731
35815
  gitPath = which.sync("git");
@@ -37236,7 +37320,7 @@ var require_utils7 = __commonJS((exports) => {
37236
37320
  });
37237
37321
 
37238
37322
  // ../../node_modules/npm-package-arg/node_modules/validate-npm-package-name/lib/index.js
37239
- var require_lib6 = __commonJS((exports, module) => {
37323
+ var require_lib7 = __commonJS((exports, module) => {
37240
37324
  var { builtinModules: builtins } = __require("module");
37241
37325
  var scopedPackagePattern = new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");
37242
37326
  var blacklist = [
@@ -37328,7 +37412,7 @@ var require_npa = __commonJS((exports, module) => {
37328
37412
  var HostedGit = require_lib3();
37329
37413
  var semver = require_semver2();
37330
37414
  var path5 = global.FAKE_WINDOWS ? __require("path").win32 : __require("path");
37331
- var validatePackageName = require_lib6();
37415
+ var validatePackageName = require_lib7();
37332
37416
  var { homedir } = __require("os");
37333
37417
  var { log } = require_lib2();
37334
37418
  var isWindows2 = process.platform === "win32" || global.FAKE_WINDOWS;
@@ -37867,7 +37951,7 @@ var require_dev_engines = __commonJS((exports, module) => {
37867
37951
  });
37868
37952
 
37869
37953
  // ../../node_modules/npm-install-checks/lib/index.js
37870
- var require_lib7 = __commonJS((exports, module) => {
37954
+ var require_lib8 = __commonJS((exports, module) => {
37871
37955
  var semver = require_semver2();
37872
37956
  var currentEnv = require_current_env();
37873
37957
  var { checkDevEngines } = require_dev_engines();
@@ -37951,7 +38035,7 @@ var require_lib7 = __commonJS((exports, module) => {
37951
38035
  });
37952
38036
 
37953
38037
  // ../../node_modules/npm-normalize-package-bin/lib/index.js
37954
- var require_lib8 = __commonJS((exports, module) => {
38038
+ var require_lib9 = __commonJS((exports, module) => {
37955
38039
  var { join: join4, basename } = __require("path");
37956
38040
  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);
37957
38041
  var normalizeString = (pkg) => {
@@ -37999,11 +38083,11 @@ var require_lib8 = __commonJS((exports, module) => {
37999
38083
  });
38000
38084
 
38001
38085
  // ../../node_modules/npm-pick-manifest/lib/index.js
38002
- var require_lib9 = __commonJS((exports, module) => {
38086
+ var require_lib10 = __commonJS((exports, module) => {
38003
38087
  var npa = require_npa();
38004
38088
  var semver = require_semver2();
38005
- var { checkEngine } = require_lib7();
38006
- var normalizeBin = require_lib8();
38089
+ var { checkEngine } = require_lib8();
38090
+ var normalizeBin = require_lib9();
38007
38091
  var engineOk = (manifest, npmVersion, nodeVersion) => {
38008
38092
  try {
38009
38093
  checkEngine(manifest, npmVersion, nodeVersion);
@@ -38165,7 +38249,7 @@ var require_clone = __commonJS((exports, module) => {
38165
38249
  var getRevs = require_revs();
38166
38250
  var spawn2 = require_spawn();
38167
38251
  var { isWindows: isWindows2 } = require_utils7();
38168
- var pickManifest = require_lib9();
38252
+ var pickManifest = require_lib10();
38169
38253
  var fs3 = __require("fs/promises");
38170
38254
  module.exports = (repo, ref = "HEAD", target = null, opts = {}) => getRevs(repo, opts).then((revs) => clone(repo, revs, ref, resolveRef(revs, ref, opts), target || defaultTarget(repo, opts.cwd), opts));
38171
38255
  var maybeShallow = (repo, opts) => {
@@ -38297,7 +38381,7 @@ var require_is_clean = __commonJS((exports, module) => {
38297
38381
  });
38298
38382
 
38299
38383
  // ../../node_modules/@npmcli/git/lib/index.js
38300
- var require_lib10 = __commonJS((exports, module) => {
38384
+ var require_lib11 = __commonJS((exports, module) => {
38301
38385
  module.exports = {
38302
38386
  clone: require_clone(),
38303
38387
  revs: require_revs(),
@@ -40194,7 +40278,7 @@ var require_normalize = __commonJS((exports, module) => {
40194
40278
  normalizePackageBin(data, changes);
40195
40279
  }
40196
40280
  if (steps.includes("gitHead") && !data.gitHead) {
40197
- const git = require_lib10();
40281
+ const git = require_lib11();
40198
40282
  const gitRoot = await git.find({ cwd: pkg.path, root });
40199
40283
  let head;
40200
40284
  if (gitRoot) {
@@ -40480,7 +40564,7 @@ var require_sort2 = __commonJS((exports, module) => {
40480
40564
  });
40481
40565
 
40482
40566
  // ../../node_modules/@npmcli/package-json/lib/index.js
40483
- var require_lib11 = __commonJS((exports, module) => {
40567
+ var require_lib12 = __commonJS((exports, module) => {
40484
40568
  var { readFile: readFile2, writeFile: writeFile2 } = __require("node:fs/promises");
40485
40569
  var { resolve: resolve2 } = __require("node:path");
40486
40570
  var parseJSON = require_lib();
@@ -228072,7 +228156,7 @@ var require_wrap_ansi = __commonJS((exports, module) => {
228072
228156
  });
228073
228157
 
228074
228158
  // ../../node_modules/mute-stream/lib/index.js
228075
- var require_lib12 = __commonJS((exports, module) => {
228159
+ var require_lib13 = __commonJS((exports, module) => {
228076
228160
  var Stream3 = __require("stream");
228077
228161
 
228078
228162
  class MuteStream extends Stream3 {
@@ -240982,7 +241066,7 @@ var require_dist5 = __commonJS((exports) => {
240982
241066
  });
240983
241067
 
240984
241068
  // ../../node_modules/node-fetch-native/lib/index.cjs
240985
- var require_lib13 = __commonJS((exports, module) => {
241069
+ var require_lib14 = __commonJS((exports, module) => {
240986
241070
  var nodeFetch = require_dist5();
240987
241071
  function fetch2(input, options) {
240988
241072
  return nodeFetch.fetch(input, options);
@@ -241028,7 +241112,7 @@ var require_proxy = __commonJS((exports) => {
241028
241112
  var require$$3 = __require("events");
241029
241113
  var require$$5$4 = __require("url");
241030
241114
  var require$$2 = __require("assert");
241031
- var nodeFetchNative = require_lib13();
241115
+ var nodeFetchNative = require_lib14();
241032
241116
  function _interopDefaultCompat(A5) {
241033
241117
  return A5 && typeof A5 == "object" && "default" in A5 ? A5.default : A5;
241034
241118
  }
@@ -258081,6 +258165,90 @@ var require_public_api = __commonJS((exports) => {
258081
258165
  exports.stringify = stringify3;
258082
258166
  });
258083
258167
 
258168
+ // ../../node_modules/which/lib/index.js
258169
+ var require_lib15 = __commonJS((exports, module) => {
258170
+ var { isexe, sync: isexeSync } = require_cjs();
258171
+ var { join: join5, delimiter: delimiter2, sep: sep3, posix: posix2 } = __require("path");
258172
+ var isWindows2 = process.platform === "win32";
258173
+ var rSlash = new RegExp(`[${posix2.sep}${sep3 === posix2.sep ? "" : sep3}]`.replace(/(\\)/g, "\\$1"));
258174
+ var rRel = new RegExp(`^\\.${rSlash.source}`);
258175
+ var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
258176
+ var getPathInfo2 = (cmd2, {
258177
+ path: optPath = process.env.PATH,
258178
+ pathExt: optPathExt = process.env.PATHEXT,
258179
+ delimiter: optDelimiter = delimiter2
258180
+ }) => {
258181
+ const pathEnv = cmd2.match(rSlash) ? [""] : [
258182
+ ...isWindows2 ? [process.cwd()] : [],
258183
+ ...(optPath || "").split(optDelimiter)
258184
+ ];
258185
+ if (isWindows2) {
258186
+ const pathExtExe = optPathExt || [".EXE", ".CMD", ".BAT", ".COM"].join(optDelimiter);
258187
+ const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()]);
258188
+ if (cmd2.includes(".") && pathExt[0] !== "") {
258189
+ pathExt.unshift("");
258190
+ }
258191
+ return { pathEnv, pathExt, pathExtExe };
258192
+ }
258193
+ return { pathEnv, pathExt: [""] };
258194
+ };
258195
+ var getPathPart = (raw, cmd2) => {
258196
+ const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
258197
+ const prefix = !pathPart && rRel.test(cmd2) ? cmd2.slice(0, 2) : "";
258198
+ return prefix + join5(pathPart, cmd2);
258199
+ };
258200
+ var which = async (cmd2, opt2 = {}) => {
258201
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo2(cmd2, opt2);
258202
+ const found = [];
258203
+ for (const envPart of pathEnv) {
258204
+ const p6 = getPathPart(envPart, cmd2);
258205
+ for (const ext2 of pathExt) {
258206
+ const withExt = p6 + ext2;
258207
+ const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true });
258208
+ if (is) {
258209
+ if (!opt2.all) {
258210
+ return withExt;
258211
+ }
258212
+ found.push(withExt);
258213
+ }
258214
+ }
258215
+ }
258216
+ if (opt2.all && found.length) {
258217
+ return found;
258218
+ }
258219
+ if (opt2.nothrow) {
258220
+ return null;
258221
+ }
258222
+ throw getNotFoundError2(cmd2);
258223
+ };
258224
+ var whichSync = (cmd2, opt2 = {}) => {
258225
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo2(cmd2, opt2);
258226
+ const found = [];
258227
+ for (const pathEnvPart of pathEnv) {
258228
+ const p6 = getPathPart(pathEnvPart, cmd2);
258229
+ for (const ext2 of pathExt) {
258230
+ const withExt = p6 + ext2;
258231
+ const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true });
258232
+ if (is) {
258233
+ if (!opt2.all) {
258234
+ return withExt;
258235
+ }
258236
+ found.push(withExt);
258237
+ }
258238
+ }
258239
+ }
258240
+ if (opt2.all && found.length) {
258241
+ return found;
258242
+ }
258243
+ if (opt2.nothrow) {
258244
+ return null;
258245
+ }
258246
+ throw getNotFoundError2(cmd2);
258247
+ };
258248
+ module.exports = which;
258249
+ which.sync = whichSync;
258250
+ });
258251
+
258084
258252
  // ../../node_modules/slugify/slugify.js
258085
258253
  var require_slugify = __commonJS((exports, module) => {
258086
258254
  (function(name2, root, factory) {
@@ -269118,7 +269286,7 @@ function pruneCurrentEnv(currentEnv, env2) {
269118
269286
  var package_default = {
269119
269287
  name: "@settlemint/sdk-cli",
269120
269288
  description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
269121
- version: "1.0.9-pr9688bb96",
269289
+ version: "1.0.9-pr9bf11a11",
269122
269290
  type: "module",
269123
269291
  private: false,
269124
269292
  license: "FSL-1.1-MIT",
@@ -269161,24 +269329,22 @@ var package_default = {
269161
269329
  tinyexec: "0.3.2"
269162
269330
  },
269163
269331
  devDependencies: {
269332
+ "@types/semver": "7.5.8",
269333
+ "@types/node": "22.10.10",
269334
+ "is-in-ci": "1.0.0",
269335
+ semver: "7.6.3",
269336
+ slugify: "1.6.6",
269337
+ yoctocolors: "2.1.1",
269164
269338
  "@commander-js/extra-typings": "13.1.0",
269165
269339
  "@inquirer/confirm": "5.1.3",
269166
269340
  "@inquirer/input": "4.1.3",
269167
269341
  "@inquirer/password": "4.0.6",
269168
269342
  "@inquirer/select": "4.0.6",
269169
- "@settlemint/sdk-js": "1.0.9-pr9688bb96",
269170
- "@settlemint/sdk-utils": "1.0.9-pr9688bb96",
269171
- "@types/node": "22.10.10",
269172
- "@types/semver": "7.5.8",
269173
- "@types/which": "3.0.4",
269343
+ "@settlemint/sdk-js": "1.0.9-pr9bf11a11",
269344
+ "@settlemint/sdk-utils": "1.0.9-pr9bf11a11",
269174
269345
  "get-tsconfig": "4.10.0",
269175
269346
  giget: "1.2.3",
269176
- "is-in-ci": "1.0.0",
269177
- semver: "7.6.3",
269178
- slugify: "1.6.6",
269179
- which: "5.0.0",
269180
- yaml: "2.7.0",
269181
- yoctocolors: "2.1.1"
269347
+ yaml: "2.7.0"
269182
269348
  },
269183
269349
  peerDependencies: {
269184
269350
  hardhat: "2.22.18"
@@ -271670,8 +271836,8 @@ async function installPackage(names, options = {}) {
271670
271836
 
271671
271837
  // ../utils/dist/package-manager.mjs
271672
271838
  var import_console_table_printer3 = __toESM(require_dist2(), 1);
271673
- var import_package_json = __toESM(require_lib11(), 1);
271674
- var import_package_json2 = __toESM(require_lib11(), 1);
271839
+ var import_package_json = __toESM(require_lib12(), 1);
271840
+ var import_package_json2 = __toESM(require_lib12(), 1);
271675
271841
  async function projectRoot2(fallbackToCwd = false, cwd) {
271676
271842
  const packageJsonPath = await findUp("package.json", { cwd });
271677
271843
  if (!packageJsonPath) {
@@ -273923,7 +274089,7 @@ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
273923
274089
  `);
273924
274090
  }
273925
274091
  // ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
273926
- var import_mute_stream = __toESM(require_lib12(), 1);
274092
+ var import_mute_stream = __toESM(require_lib13(), 1);
273927
274093
  init_mjs();
273928
274094
  import * as readline2 from "node:readline";
273929
274095
  import { AsyncResource as AsyncResource3 } from "node:async_hooks";
@@ -274730,9 +274896,8 @@ var esm_default5 = createPrompt((config3, done) => {
274730
274896
  // src/prompts/aat.prompt.ts
274731
274897
  async function applicationAccessTokenPrompt(env2, application, settlemint, accept) {
274732
274898
  const autoAccept = !!accept || is_in_ci_default;
274733
- const hasApplicationChanged = env2.SETTLEMINT_APPLICATION !== application.uniqueName;
274734
- const defaultAccessToken = hasApplicationChanged ? undefined : env2.SETTLEMINT_ACCESS_TOKEN;
274735
- const defaultPossible = autoAccept && !!defaultAccessToken;
274899
+ const defaultAccessToken = env2.SETTLEMINT_ACCESS_TOKEN;
274900
+ const defaultPossible = autoAccept && defaultAccessToken;
274736
274901
  if (defaultPossible || is_in_ci_default) {
274737
274902
  return defaultAccessToken;
274738
274903
  }
@@ -278769,7 +278934,7 @@ function formatUseCaseName(name2) {
278769
278934
  }
278770
278935
 
278771
278936
  // src/utils/smart-contract-set/execute-foundry-command.ts
278772
- var import_which = __toESM(require_lib4(), 1);
278937
+ var import_which = __toESM(require_lib15(), 1);
278773
278938
  async function executeFoundryCommand(command, args) {
278774
278939
  try {
278775
278940
  await import_which.default(command);
@@ -279744,4 +279909,4 @@ async function sdkCliCommand(argv = process.argv) {
279744
279909
  // src/cli.ts
279745
279910
  sdkCliCommand();
279746
279911
 
279747
- //# debugId=52C09A789DAD209C64756E2164756E21
279912
+ //# debugId=9B8A955B0FD572C564756E2164756E21