@settlemint/sdk-cli 0.6.42-main3b09370 → 0.6.42

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 CHANGED
@@ -221597,8 +221597,8 @@ var require_posix = __commonJS((exports) => {
221597
221597
  }
221598
221598
  };
221599
221599
  exports.sync = sync3;
221600
- var checkStat = (stat7, options) => stat7.isFile() && checkMode(stat7, options);
221601
- var checkMode = (stat7, options) => {
221600
+ var checkStat = (stat6, options) => stat6.isFile() && checkMode(stat6, options);
221601
+ var checkMode = (stat6, options) => {
221602
221602
  const myUid = options.uid ?? process.getuid?.();
221603
221603
  const myGroups = options.groups ?? process.getgroups?.() ?? [];
221604
221604
  const myGid = options.gid ?? process.getgid?.() ?? myGroups[0];
@@ -221606,9 +221606,9 @@ var require_posix = __commonJS((exports) => {
221606
221606
  throw new Error("cannot get uid or gid");
221607
221607
  }
221608
221608
  const groups = new Set([myGid, ...myGroups]);
221609
- const mod = stat7.mode;
221610
- const uid = stat7.uid;
221611
- const gid = stat7.gid;
221609
+ const mod = stat6.mode;
221610
+ const uid = stat6.uid;
221611
+ const gid = stat6.gid;
221612
221612
  const u6 = parseInt("100", 8);
221613
221613
  const g6 = parseInt("010", 8);
221614
221614
  const o7 = parseInt("001", 8);
@@ -221662,7 +221662,7 @@ var require_win32 = __commonJS((exports) => {
221662
221662
  }
221663
221663
  return false;
221664
221664
  };
221665
- var checkStat = (stat7, path5, options) => stat7.isFile() && checkPathExt(path5, options);
221665
+ var checkStat = (stat6, path5, options) => stat6.isFile() && checkPathExt(path5, options);
221666
221666
  });
221667
221667
 
221668
221668
  // ../../node_modules/isexe/dist/cjs/options.js
@@ -225272,8 +225272,8 @@ var require_clone = __commonJS((exports, module) => {
225272
225272
 
225273
225273
  // ../../node_modules/@npmcli/git/lib/is.js
225274
225274
  var require_is = __commonJS((exports, module) => {
225275
- var { stat: stat7 } = __require("fs/promises");
225276
- module.exports = ({ cwd = process.cwd() } = {}) => stat7(cwd + "/.git").then(() => true, () => false);
225275
+ var { stat: stat6 } = __require("fs/promises");
225276
+ module.exports = ({ cwd = process.cwd() } = {}) => stat6(cwd + "/.git").then(() => true, () => false);
225277
225277
  });
225278
225278
 
225279
225279
  // ../../node_modules/@npmcli/git/lib/find.js
@@ -230270,21 +230270,21 @@ var require_write_entry = __commonJS((exports, module) => {
230270
230270
  return super.emit(ev, ...data);
230271
230271
  }
230272
230272
  [LSTAT]() {
230273
- fs3.lstat(this.absolute, (er2, stat8) => {
230273
+ fs3.lstat(this.absolute, (er2, stat7) => {
230274
230274
  if (er2) {
230275
230275
  return this.emit("error", er2);
230276
230276
  }
230277
- this[ONLSTAT](stat8);
230277
+ this[ONLSTAT](stat7);
230278
230278
  });
230279
230279
  }
230280
- [ONLSTAT](stat8) {
230281
- this.statCache.set(this.absolute, stat8);
230282
- this.stat = stat8;
230283
- if (!stat8.isFile()) {
230284
- stat8.size = 0;
230280
+ [ONLSTAT](stat7) {
230281
+ this.statCache.set(this.absolute, stat7);
230282
+ this.stat = stat7;
230283
+ if (!stat7.isFile()) {
230284
+ stat7.size = 0;
230285
230285
  }
230286
- this.type = getType(stat8);
230287
- this.emit("stat", stat8);
230286
+ this.type = getType(stat7);
230287
+ this.emit("stat", stat7);
230288
230288
  this[PROCESS2]();
230289
230289
  }
230290
230290
  [PROCESS2]() {
@@ -230616,7 +230616,7 @@ var require_write_entry = __commonJS((exports, module) => {
230616
230616
  });
230617
230617
  WriteEntry.Sync = WriteEntrySync;
230618
230618
  WriteEntry.Tar = WriteEntryTar;
230619
- var getType = (stat8) => stat8.isFile() ? "File" : stat8.isDirectory() ? "Directory" : stat8.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
230619
+ var getType = (stat7) => stat7.isFile() ? "File" : stat7.isDirectory() ? "Directory" : stat7.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
230620
230620
  module.exports = WriteEntry;
230621
230621
  });
230622
230622
 
@@ -231148,21 +231148,21 @@ var require_pack = __commonJS((exports, module) => {
231148
231148
  [STAT](job) {
231149
231149
  job.pending = true;
231150
231150
  this[JOBS] += 1;
231151
- const stat8 = this.follow ? "stat" : "lstat";
231152
- fs3[stat8](job.absolute, (er2, stat9) => {
231151
+ const stat7 = this.follow ? "stat" : "lstat";
231152
+ fs3[stat7](job.absolute, (er2, stat8) => {
231153
231153
  job.pending = false;
231154
231154
  this[JOBS] -= 1;
231155
231155
  if (er2) {
231156
231156
  this.emit("error", er2);
231157
231157
  } else {
231158
- this[ONSTAT](job, stat9);
231158
+ this[ONSTAT](job, stat8);
231159
231159
  }
231160
231160
  });
231161
231161
  }
231162
- [ONSTAT](job, stat8) {
231163
- this.statCache.set(job.absolute, stat8);
231164
- job.stat = stat8;
231165
- if (!this.filter(job.path, stat8)) {
231162
+ [ONSTAT](job, stat7) {
231163
+ this.statCache.set(job.absolute, stat7);
231164
+ job.stat = stat7;
231165
+ if (!this.filter(job.path, stat7)) {
231166
231166
  job.ignore = true;
231167
231167
  }
231168
231168
  this[PROCESS2]();
@@ -231330,10 +231330,10 @@ var require_pack = __commonJS((exports, module) => {
231330
231330
  resume() {
231331
231331
  }
231332
231332
  [STAT](job) {
231333
- const stat8 = this.follow ? "statSync" : "lstatSync";
231334
- this[ONSTAT](job, fs3[stat8](job.absolute));
231333
+ const stat7 = this.follow ? "statSync" : "lstatSync";
231334
+ this[ONSTAT](job, fs3[stat7](job.absolute));
231335
231335
  }
231336
- [READDIR](job, stat8) {
231336
+ [READDIR](job, stat7) {
231337
231337
  this[ONREADDIR](job, fs3.readdirSync(job.absolute));
231338
231338
  }
231339
231339
  [PIPE](job) {
@@ -232717,15 +232717,15 @@ var require_list = __commonJS((exports, module) => {
232717
232717
  let threw = true;
232718
232718
  let fd;
232719
232719
  try {
232720
- const stat8 = fs3.statSync(file);
232720
+ const stat7 = fs3.statSync(file);
232721
232721
  const readSize = opt2.maxReadSize || 16 * 1024 * 1024;
232722
- if (stat8.size < readSize) {
232722
+ if (stat7.size < readSize) {
232723
232723
  p5.end(fs3.readFileSync(file));
232724
232724
  } else {
232725
232725
  let pos = 0;
232726
232726
  const buf = Buffer.allocUnsafe(readSize);
232727
232727
  fd = fs3.openSync(file, "r");
232728
- while (pos < stat8.size) {
232728
+ while (pos < stat7.size) {
232729
232729
  const bytesRead = fs3.readSync(fd, buf, 0, readSize, pos);
232730
232730
  pos += bytesRead;
232731
232731
  p5.write(buf.slice(0, bytesRead));
@@ -232749,13 +232749,13 @@ var require_list = __commonJS((exports, module) => {
232749
232749
  const p5 = new Promise((resolve5, reject) => {
232750
232750
  parse5.on("error", reject);
232751
232751
  parse5.on("end", resolve5);
232752
- fs3.stat(file, (er2, stat8) => {
232752
+ fs3.stat(file, (er2, stat7) => {
232753
232753
  if (er2) {
232754
232754
  reject(er2);
232755
232755
  } else {
232756
232756
  const stream2 = new fsm.ReadStream(file, {
232757
232757
  readSize,
232758
- size: stat8.size
232758
+ size: stat7.size
232759
232759
  });
232760
232760
  stream2.on("error", reject);
232761
232761
  stream2.pipe(parse5);
@@ -233082,7 +233082,7 @@ var require_update = __commonJS((exports, module) => {
233082
233082
  if (!opt2.mtimeCache) {
233083
233083
  opt2.mtimeCache = new Map;
233084
233084
  }
233085
- opt2.filter = filter4 ? (path5, stat8) => filter4(path5, stat8) && !(opt2.mtimeCache.get(path5) > stat8.mtime) : (path5, stat8) => !(opt2.mtimeCache.get(path5) > stat8.mtime);
233085
+ opt2.filter = filter4 ? (path5, stat7) => filter4(path5, stat7) && !(opt2.mtimeCache.get(path5) > stat7.mtime) : (path5, stat7) => !(opt2.mtimeCache.get(path5) > stat7.mtime);
233086
233086
  };
233087
233087
  });
233088
233088
 
@@ -234470,11 +234470,11 @@ var require_extract = __commonJS((exports, module) => {
234470
234470
  var extractFileSync = (opt2) => {
234471
234471
  const u6 = new Unpack.Sync(opt2);
234472
234472
  const file = opt2.file;
234473
- const stat8 = fs3.statSync(file);
234473
+ const stat7 = fs3.statSync(file);
234474
234474
  const readSize = opt2.maxReadSize || 16 * 1024 * 1024;
234475
234475
  const stream2 = new fsm.ReadStreamSync(file, {
234476
234476
  readSize,
234477
- size: stat8.size
234477
+ size: stat7.size
234478
234478
  });
234479
234479
  stream2.pipe(u6);
234480
234480
  };
@@ -234485,13 +234485,13 @@ var require_extract = __commonJS((exports, module) => {
234485
234485
  const p5 = new Promise((resolve5, reject) => {
234486
234486
  u6.on("error", reject);
234487
234487
  u6.on("close", resolve5);
234488
- fs3.stat(file, (er2, stat8) => {
234488
+ fs3.stat(file, (er2, stat7) => {
234489
234489
  if (er2) {
234490
234490
  reject(er2);
234491
234491
  } else {
234492
234492
  const stream2 = new fsm.ReadStream(file, {
234493
234493
  readSize,
234494
- size: stat8.size
234494
+ size: stat7.size
234495
234495
  });
234496
234496
  stream2.on("error", reject);
234497
234497
  stream2.pipe(u6);
@@ -234543,15 +234543,15 @@ var require_windows = __commonJS((exports, module) => {
234543
234543
  }
234544
234544
  return false;
234545
234545
  }
234546
- function checkStat(stat8, path6, options) {
234547
- if (!stat8.isSymbolicLink() && !stat8.isFile()) {
234546
+ function checkStat(stat7, path6, options) {
234547
+ if (!stat7.isSymbolicLink() && !stat7.isFile()) {
234548
234548
  return false;
234549
234549
  }
234550
234550
  return checkPathExt(path6, options);
234551
234551
  }
234552
234552
  function isexe(path6, options, cb) {
234553
- fs3.stat(path6, function(er2, stat8) {
234554
- cb(er2, er2 ? false : checkStat(stat8, path6, options));
234553
+ fs3.stat(path6, function(er2, stat7) {
234554
+ cb(er2, er2 ? false : checkStat(stat7, path6, options));
234555
234555
  });
234556
234556
  }
234557
234557
  function sync3(path6, options) {
@@ -234565,20 +234565,20 @@ var require_mode = __commonJS((exports, module) => {
234565
234565
  isexe.sync = sync3;
234566
234566
  var fs3 = __require("fs");
234567
234567
  function isexe(path6, options, cb) {
234568
- fs3.stat(path6, function(er2, stat8) {
234569
- cb(er2, er2 ? false : checkStat(stat8, options));
234568
+ fs3.stat(path6, function(er2, stat7) {
234569
+ cb(er2, er2 ? false : checkStat(stat7, options));
234570
234570
  });
234571
234571
  }
234572
234572
  function sync3(path6, options) {
234573
234573
  return checkStat(fs3.statSync(path6), options);
234574
234574
  }
234575
- function checkStat(stat8, options) {
234576
- return stat8.isFile() && checkMode(stat8, options);
234575
+ function checkStat(stat7, options) {
234576
+ return stat7.isFile() && checkMode(stat7, options);
234577
234577
  }
234578
- function checkMode(stat8, options) {
234579
- var mod = stat8.mode;
234580
- var uid = stat8.uid;
234581
- var gid = stat8.gid;
234578
+ function checkMode(stat7, options) {
234579
+ var mod = stat7.mode;
234580
+ var uid = stat7.uid;
234581
+ var gid = stat7.gid;
234582
234582
  var myUid = options.uid !== undefined ? options.uid : process.getuid && process.getuid();
234583
234583
  var myGid = options.gid !== undefined ? options.gid : process.getgid && process.getgid();
234584
234584
  var u6 = parseInt("100", 8);
@@ -239919,10 +239919,10 @@ Content-Type: ${R6.type || "application/octet-stream"}\r
239919
239919
  }
239920
239920
  var nodeDomexception = globalThis.DOMException;
239921
239921
  var DOMException2 = _commonjsHelpers.getDefaultExportFromCjs(nodeDomexception);
239922
- var { stat: stat8 } = node_fs.promises;
239922
+ var { stat: stat7 } = node_fs.promises;
239923
239923
  var blobFromSync = u6((c3, l4) => fromBlob(node_fs.statSync(c3), c3, l4), "blobFromSync");
239924
- var blobFrom = u6((c3, l4) => stat8(c3).then((d6) => fromBlob(d6, c3, l4)), "blobFrom");
239925
- var fileFrom = u6((c3, l4) => stat8(c3).then((d6) => fromFile(d6, c3, l4)), "fileFrom");
239924
+ var blobFrom = u6((c3, l4) => stat7(c3).then((d6) => fromBlob(d6, c3, l4)), "blobFrom");
239925
+ var fileFrom = u6((c3, l4) => stat7(c3).then((d6) => fromFile(d6, c3, l4)), "fileFrom");
239926
239926
  var fileFromSync = u6((c3, l4) => fromFile(node_fs.statSync(c3), c3, l4), "fileFromSync");
239927
239927
  var fromBlob = u6((c3, l4, d6 = "") => new r$1([new BlobDataItem({ path: l4, size: c3.size, lastModified: c3.mtimeMs, start: 0 })], { type: d6 }), "fromBlob");
239928
239928
  var fromFile = u6((c3, l4, d6 = "") => new File$1([new BlobDataItem({ path: l4, size: c3.size, lastModified: c3.mtimeMs, start: 0 })], node_path.basename(l4), { type: d6, lastModified: c3.mtimeMs }), "fromFile");
@@ -239936,7 +239936,7 @@ Content-Type: ${R6.type || "application/octet-stream"}\r
239936
239936
  return new Xt3({ path: D4(this, Me3), lastModified: this.lastModified, size: d6 - l4, start: D4(this, xe3) + l4 });
239937
239937
  }
239938
239938
  async* stream() {
239939
- const { mtimeMs: l4 } = await stat8(D4(this, Me3));
239939
+ const { mtimeMs: l4 } = await stat7(D4(this, Me3));
239940
239940
  if (l4 > this.lastModified)
239941
239941
  throw new DOMException2("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.", "NotReadableError");
239942
239942
  yield* node_fs.createReadStream(D4(this, Me3), { start: D4(this, xe3), end: D4(this, xe3) + this.size - 1 });
@@ -261807,9 +261807,9 @@ var z4 = /* @__PURE__ */ Object.freeze({
261807
261807
 
261808
261808
  // ../utils/dist/environment.mjs
261809
261809
  var import_dotenvx = __toESM(require_main2(), 1);
261810
+ import { existsSync } from "node:fs";
261810
261811
  import { readFile as readFile3, writeFile as writeFile4 } from "node:fs/promises";
261811
261812
  import { dirname as dirname32, join as join3 } from "node:path";
261812
- import { stat as stat6 } from "node:fs/promises";
261813
261813
  import { dirname as dirname22 } from "node:path";
261814
261814
  var import_dotenvx2 = __toESM(require_main2(), 1);
261815
261815
 
@@ -268099,14 +268099,6 @@ async function loadEnvironmentEnv(validateEnv, prod) {
268099
268099
  return {};
268100
268100
  }
268101
268101
  }
268102
- async function exists2(path4) {
268103
- try {
268104
- await stat6(path4);
268105
- return true;
268106
- } catch {
268107
- return false;
268108
- }
268109
- }
268110
268102
  async function projectRoot2() {
268111
268103
  const packageJsonPath = await findUp("package.json");
268112
268104
  if (!packageJsonPath) {
@@ -268118,7 +268110,7 @@ async function findMonoRepoRoot(startDir) {
268118
268110
  let currentDir = startDir;
268119
268111
  while (currentDir !== "/") {
268120
268112
  const packageJsonPath = join3(currentDir, "package.json");
268121
- if (await exists2(packageJsonPath)) {
268113
+ if (existsSync(packageJsonPath)) {
268122
268114
  try {
268123
268115
  const packageJson = JSON.parse(await readFile3(packageJsonPath, "utf-8"));
268124
268116
  if (packageJson.workspaces && Array.isArray(packageJson.workspaces) && packageJson.workspaces.length > 0) {
@@ -268162,11 +268154,11 @@ async function writeEnv(prod, env2, secrets) {
268162
268154
  const targetDirs = await findMonoRepoPackages(projectDir);
268163
268155
  await Promise.all(targetDirs.map(async (dir) => {
268164
268156
  const envFile = join3(dir, secrets ? `.env${prod ? ".production" : ""}.local` : `.env${prod ? ".production" : ""}`);
268165
- let { parsed: currentEnv } = await exists2(envFile) ? import_dotenvx2.config({
268157
+ let { parsed: currentEnv } = import_dotenvx2.config({
268166
268158
  path: envFile,
268167
268159
  logLevel: "error",
268168
268160
  quiet: true
268169
- }) : { parsed: {} };
268161
+ });
268170
268162
  if (!currentEnv) {
268171
268163
  currentEnv = {};
268172
268164
  }
@@ -272342,7 +272334,7 @@ function connectCommand() {
272342
272334
  var package_default = {
272343
272335
  name: "@settlemint/sdk-cli",
272344
272336
  description: "SettleMint SDK, integrate SettleMint into your application with ease.",
272345
- version: "0.6.42-main3b09370",
272337
+ version: "0.6.42",
272346
272338
  type: "module",
272347
272339
  private: false,
272348
272340
  license: "FSL-1.1-MIT",
@@ -272393,8 +272385,8 @@ var package_default = {
272393
272385
  "@inquirer/input": "4.1.0",
272394
272386
  "@inquirer/password": "4.0.3",
272395
272387
  "@inquirer/select": "4.0.3",
272396
- "@settlemint/sdk-js": "0.6.42-main3b09370",
272397
- "@settlemint/sdk-utils": "0.6.42-main3b09370",
272388
+ "@settlemint/sdk-js": "0.6.42",
272389
+ "@settlemint/sdk-utils": "0.6.42",
272398
272390
  "get-tsconfig": "4.8.1",
272399
272391
  giget: "1.2.3"
272400
272392
  },
@@ -272457,7 +272449,7 @@ async function templatePrompt(templates, argument) {
272457
272449
  // ../utils/dist/package-manager.mjs
272458
272450
  import { readdir as readdir3, rm as rm2 } from "node:fs/promises";
272459
272451
  import { resolve as resolve4 } from "node:path";
272460
- import { stat as stat7 } from "node:fs/promises";
272452
+ import { stat as stat6 } from "node:fs/promises";
272461
272453
  import { dirname as dirname23 } from "node:path";
272462
272454
 
272463
272455
  // ../../node_modules/package-manager-detector/dist/detect.mjs
@@ -272555,9 +272547,9 @@ async function fileExists(filePath) {
272555
272547
  // ../utils/dist/package-manager.mjs
272556
272548
  var import_package_json = __toESM(require_lib13(), 1);
272557
272549
  var import_package_json2 = __toESM(require_lib13(), 1);
272558
- async function exists3(path5) {
272550
+ async function exists2(path5) {
272559
272551
  try {
272560
- await stat7(path5);
272552
+ await stat6(path5);
272561
272553
  return true;
272562
272554
  } catch {
272563
272555
  return false;
@@ -272581,7 +272573,7 @@ async function isEmpty(path5) {
272581
272573
  return files.length === 0 || files.length === 1 && files[0] === ".git";
272582
272574
  }
272583
272575
  async function emptyDir(dir) {
272584
- if (!await exists3(dir))
272576
+ if (!await exists2(dir))
272585
272577
  return;
272586
272578
  for (const file of await readdir3(dir)) {
272587
272579
  if (file === ".git")
@@ -272603,7 +272595,7 @@ import { mkdir as mkdir5 } from "node:fs/promises";
272603
272595
  // ../../node_modules/giget/dist/index.mjs
272604
272596
  var import_tar = __toESM(require_tar(), 1);
272605
272597
  import { readFile as readFile6, writeFile as writeFile7, mkdir as mkdir4, rm as rm3 } from "node:fs/promises";
272606
- import { existsSync as existsSync2, createWriteStream as createWriteStream2, readdirSync as readdirSync2 } from "node:fs";
272598
+ import { existsSync as existsSync3, createWriteStream as createWriteStream2, readdirSync as readdirSync2 } from "node:fs";
272607
272599
 
272608
272600
  // ../../node_modules/pathe/dist/shared/pathe.ff20891b.mjs
272609
272601
  var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
@@ -272824,7 +272816,7 @@ var defuArrayFn = createDefu((object, key2, currentValue) => {
272824
272816
  });
272825
272817
 
272826
272818
  // ../../node_modules/nypm/dist/index.mjs
272827
- import { existsSync } from "node:fs";
272819
+ import { existsSync as existsSync2 } from "node:fs";
272828
272820
  import { readFile as readFile5 } from "node:fs/promises";
272829
272821
  async function findup(cwd2, match2, options = {}) {
272830
272822
  const segments = normalize3(cwd2).split("/");
@@ -272918,7 +272910,7 @@ async function detectPackageManager(cwd2, options = {}) {
272918
272910
  const detected = await findup(resolve5(cwd2 || "."), async (path8) => {
272919
272911
  if (!options.ignorePackageJSON) {
272920
272912
  const packageJSONPath = join5(path8, "package.json");
272921
- if (existsSync(packageJSONPath)) {
272913
+ if (existsSync2(packageJSONPath)) {
272922
272914
  const packageJSON = JSON.parse(await readFile5(packageJSONPath, "utf8"));
272923
272915
  if (packageJSON?.packageManager) {
272924
272916
  const [name2, version = "0.0.0"] = packageJSON.packageManager.split("@");
@@ -272940,7 +272932,7 @@ async function detectPackageManager(cwd2, options = {}) {
272940
272932
  packageManager.lockFile,
272941
272933
  packageManager.files
272942
272934
  ].flat().filter(Boolean);
272943
- if (detectionsFiles.some((file) => existsSync(resolve5(path8, file)))) {
272935
+ if (detectionsFiles.some((file) => existsSync2(resolve5(path8, file)))) {
272944
272936
  return {
272945
272937
  ...packageManager
272946
272938
  };
@@ -272993,7 +272985,7 @@ async function download(url, filePath, options = {}) {
272993
272985
  return;
272994
272986
  });
272995
272987
  const etag = headResponse?.headers.get("etag");
272996
- if (info.etag === etag && existsSync2(filePath)) {
272988
+ if (info.etag === etag && existsSync3(filePath)) {
272997
272989
  return;
272998
272990
  }
272999
272991
  if (typeof etag === "string") {
@@ -273216,7 +273208,7 @@ async function downloadTemplate(input, options = {}) {
273216
273208
  template.defaultDir = (template.defaultDir || template.name).replace(/[^\da-z-]/gi, "-");
273217
273209
  const temporaryDirectory = resolve5(cacheDirectory(), providerName, template.name);
273218
273210
  const tarPath = resolve5(temporaryDirectory, (template.version || template.name) + ".tar.gz");
273219
- if (options.preferOffline && existsSync2(tarPath)) {
273211
+ if (options.preferOffline && existsSync3(tarPath)) {
273220
273212
  options.offline = true;
273221
273213
  }
273222
273214
  if (!options.offline) {
@@ -273228,7 +273220,7 @@ async function downloadTemplate(input, options = {}) {
273228
273220
  ...normalizeHeaders(template.headers)
273229
273221
  }
273230
273222
  }).catch((error5) => {
273231
- if (!existsSync2(tarPath)) {
273223
+ if (!existsSync3(tarPath)) {
273232
273224
  throw error5;
273233
273225
  }
273234
273226
  debug2("Download error. Using cached version:", error5);
@@ -273236,7 +273228,7 @@ async function downloadTemplate(input, options = {}) {
273236
273228
  });
273237
273229
  debug2(`Downloaded ${template.tar} to ${tarPath} in ${Date.now() - s22}ms`);
273238
273230
  }
273239
- if (!existsSync2(tarPath)) {
273231
+ if (!existsSync3(tarPath)) {
273240
273232
  throw new Error(`Tarball not found: ${tarPath} (offline: ${options.offline})`);
273241
273233
  }
273242
273234
  const cwd2 = resolve5(options.cwd || ".");
@@ -273244,7 +273236,7 @@ async function downloadTemplate(input, options = {}) {
273244
273236
  if (options.forceClean) {
273245
273237
  await rm3(extractPath, { recursive: true, force: true });
273246
273238
  }
273247
- if (!options.force && existsSync2(extractPath) && readdirSync2(extractPath).length > 0) {
273239
+ if (!options.force && existsSync3(extractPath) && readdirSync2(extractPath).length > 0) {
273248
273240
  throw new Error(`Destination ${extractPath} already exists.`);
273249
273241
  }
273250
273242
  await mkdir4(extractPath, { recursive: true });
@@ -273495,7 +273487,7 @@ var SETTLEMINT_CLIENT_MAP = {
273495
273487
  // ../utils/dist/index.mjs
273496
273488
  import { spawn as spawn2 } from "node:child_process";
273497
273489
  var import_dotenvx3 = __toESM(require_main2(), 1);
273498
- import { stat as stat8 } from "node:fs/promises";
273490
+ import { stat as stat7 } from "node:fs/promises";
273499
273491
  var import_dotenvx4 = __toESM(require_main2(), 1);
273500
273492
  var import_package_json3 = __toESM(require_lib13(), 1);
273501
273493
  var import_package_json4 = __toESM(require_lib13(), 1);
@@ -273616,9 +273608,9 @@ async function loadEnvironmentEnv2(validateEnv, prod) {
273616
273608
  return {};
273617
273609
  }
273618
273610
  }
273619
- async function exists4(path8) {
273611
+ async function exists3(path8) {
273620
273612
  try {
273621
- await stat8(path8);
273613
+ await stat7(path8);
273622
273614
  return true;
273623
273615
  } catch {
273624
273616
  return false;
@@ -275073,7 +275065,7 @@ function createCommand4() {
275073
275065
  const name2 = await namePrompt(env2, projectName);
275074
275066
  const targetDir = formatTargetDir(name2);
275075
275067
  const projectDir = join7(process.cwd(), targetDir);
275076
- if (await exists4(projectDir) && !await isEmpty(projectDir)) {
275068
+ if (await exists3(projectDir) && !await isEmpty(projectDir)) {
275077
275069
  const confirmEmpty = await esm_default2({
275078
275070
  message: `The folder ${projectDir} already exists. Do you want to delete it?`,
275079
275071
  default: false
@@ -275395,7 +275387,7 @@ function hardhatTestCommand() {
275395
275387
  }
275396
275388
 
275397
275389
  // src/commands/smart-contract-set/subgraph/utils/is-generated.ts
275398
- var isGenerated = () => exists4("subgraph/subgraph.config.json");
275390
+ var isGenerated = () => exists3("subgraph/subgraph.config.json");
275399
275391
 
275400
275392
  // src/commands/smart-contract-set/subgraph/utils/setup.ts
275401
275393
  import { rm as rm4, writeFile as writeFile9 } from "node:fs/promises";
@@ -275491,16 +275483,16 @@ async function subgraphSetup({ env: env2, instance, accessToken, isGenerated: is
275491
275483
  cancel2("No Graph Middleware selected. Please select one to continue.");
275492
275484
  }
275493
275485
  await executeCommand2("forge", ["build"]);
275494
- if (await exists4("./generated")) {
275486
+ if (await exists3("./generated")) {
275495
275487
  await rm4("./generated", { recursive: true, force: true });
275496
275488
  }
275497
- if (await exists4("./subgraph/generated")) {
275489
+ if (await exists3("./subgraph/generated")) {
275498
275490
  await rm4("./subgraph/generated", { recursive: true, force: true });
275499
275491
  }
275500
- if (await exists4("./build")) {
275492
+ if (await exists3("./build")) {
275501
275493
  await rm4("./build", { recursive: true, force: true });
275502
275494
  }
275503
- if (await exists4("./subgraph/build")) {
275495
+ if (await exists3("./subgraph/build")) {
275504
275496
  await rm4("./subgraph/build", { recursive: true, force: true });
275505
275497
  }
275506
275498
  const isFixedNetwork = (theGraphMiddleware.entityVersion ?? 4) >= 4;
@@ -275739,4 +275731,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
275739
275731
  cancel2(reason);
275740
275732
  });
275741
275733
 
275742
- //# debugId=B073736222CA1CB764756E2164756E21
275734
+ //# debugId=380905BF9399C83864756E2164756E21