@settlemint/sdk-cli 1.1.9-prac555cb7 → 1.1.9-prc9d12029

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 +138 -114
  2. package/dist/cli.js.map +15 -15
  3. package/package.json +6 -6
package/dist/cli.js CHANGED
@@ -36320,8 +36320,8 @@ var require_posix = __commonJS((exports) => {
36320
36320
  }
36321
36321
  };
36322
36322
  exports.sync = sync2;
36323
- var checkStat = (stat2, options) => stat2.isFile() && checkMode(stat2, options);
36324
- var checkMode = (stat2, options) => {
36323
+ var checkStat = (stat3, options) => stat3.isFile() && checkMode(stat3, options);
36324
+ var checkMode = (stat3, options) => {
36325
36325
  const myUid = options.uid ?? process.getuid?.();
36326
36326
  const myGroups = options.groups ?? process.getgroups?.() ?? [];
36327
36327
  const myGid = options.gid ?? process.getgid?.() ?? myGroups[0];
@@ -36329,9 +36329,9 @@ var require_posix = __commonJS((exports) => {
36329
36329
  throw new Error("cannot get uid or gid");
36330
36330
  }
36331
36331
  const groups = new Set([myGid, ...myGroups]);
36332
- const mod = stat2.mode;
36333
- const uid = stat2.uid;
36334
- const gid = stat2.gid;
36332
+ const mod = stat3.mode;
36333
+ const uid = stat3.uid;
36334
+ const gid = stat3.gid;
36335
36335
  const u2 = parseInt("100", 8);
36336
36336
  const g2 = parseInt("010", 8);
36337
36337
  const o2 = parseInt("001", 8);
@@ -36385,7 +36385,7 @@ var require_win32 = __commonJS((exports) => {
36385
36385
  }
36386
36386
  return false;
36387
36387
  };
36388
- var checkStat = (stat2, path6, options) => stat2.isFile() && checkPathExt(path6, options);
36388
+ var checkStat = (stat3, path6, options) => stat3.isFile() && checkPathExt(path6, options);
36389
36389
  });
36390
36390
 
36391
36391
  // ../../node_modules/isexe/dist/cjs/options.js
@@ -45581,20 +45581,20 @@ var require_clone = __commonJS((exports, module) => {
45581
45581
 
45582
45582
  // ../../node_modules/@npmcli/git/lib/is.js
45583
45583
  var require_is = __commonJS((exports, module) => {
45584
- var { stat: stat2 } = __require("fs/promises");
45585
- module.exports = ({ cwd = process.cwd() } = {}) => stat2(cwd + "/.git").then(() => true, () => false);
45584
+ var { stat: stat3 } = __require("fs/promises");
45585
+ module.exports = ({ cwd = process.cwd() } = {}) => stat3(cwd + "/.git").then(() => true, () => false);
45586
45586
  });
45587
45587
 
45588
45588
  // ../../node_modules/@npmcli/git/lib/find.js
45589
45589
  var require_find = __commonJS((exports, module) => {
45590
45590
  var is = require_is();
45591
- var { dirname: dirname3 } = __require("path");
45591
+ var { dirname: dirname4 } = __require("path");
45592
45592
  module.exports = async ({ cwd = process.cwd(), root } = {}) => {
45593
45593
  while (true) {
45594
45594
  if (await is({ cwd })) {
45595
45595
  return cwd;
45596
45596
  }
45597
- const next = dirname3(cwd);
45597
+ const next = dirname4(cwd);
45598
45598
  if (cwd === root || cwd === next) {
45599
45599
  return null;
45600
45600
  }
@@ -274462,7 +274462,7 @@ function pruneCurrentEnv(currentEnv, env2) {
274462
274462
  var package_default = {
274463
274463
  name: "@settlemint/sdk-cli",
274464
274464
  description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
274465
- version: "1.1.9-prac555cb7",
274465
+ version: "1.1.9-prc9d12029",
274466
274466
  type: "module",
274467
274467
  private: false,
274468
274468
  license: "FSL-1.1-MIT",
@@ -274510,13 +274510,13 @@ var package_default = {
274510
274510
  "@inquirer/input": "4.1.6",
274511
274511
  "@inquirer/password": "4.0.9",
274512
274512
  "@inquirer/select": "4.0.9",
274513
- "@settlemint/sdk-js": "1.1.9-prac555cb7",
274514
- "@settlemint/sdk-utils": "1.1.9-prac555cb7",
274515
- "@types/node": "22.13.4",
274513
+ "@settlemint/sdk-js": "1.1.9-prc9d12029",
274514
+ "@settlemint/sdk-utils": "1.1.9-prc9d12029",
274515
+ "@types/node": "22.13.5",
274516
274516
  "@types/semver": "7.5.8",
274517
274517
  "@types/which": "3.0.4",
274518
274518
  "get-tsconfig": "4.10.0",
274519
- giget: "1.2.4",
274519
+ giget: "1.2.5",
274520
274520
  "is-in-ci": "1.0.0",
274521
274521
  semver: "7.7.1",
274522
274522
  slugify: "1.6.6",
@@ -274525,7 +274525,7 @@ var package_default = {
274525
274525
  yoctocolors: "2.1.1"
274526
274526
  },
274527
274527
  peerDependencies: {
274528
- hardhat: "2.22.18"
274528
+ hardhat: "2.22.19"
274529
274529
  },
274530
274530
  peerDependenciesMeta: {
274531
274531
  hardhat: {
@@ -275679,7 +275679,7 @@ import { spawn } from "node:child_process";
275679
275679
  var import_console_table_printer2 = __toESM(require_dist2(), 1);
275680
275680
  var ascii = () => console.log(magentaBright(`
275681
275681
  _________ __ __ .__ _____ .__ __
275682
- / _____/ _____/ |__/ |_| | ____ / \\ |__| _____/ |_
275682
+ / _____/ _____/ |__/ |_| | ____ / \\ |__| _____/ |_
275683
275683
  \\_____ \\_/ __ \\ __\\ __\\ | _/ __ \\ / \\ / \\| |/ \\ __\\
275684
275684
  / \\ ___/| | | | | |_\\ ___// Y \\ | | \\ |
275685
275685
  /_________/\\_____>__| |__| |____/\\_____>____|____/__|___|__/__|
@@ -275819,6 +275819,9 @@ function table(title, data) {
275819
275819
  table2.printTable();
275820
275820
  }
275821
275821
 
275822
+ // src/utils/sdk-version.ts
275823
+ import { join as join6 } from "node:path";
275824
+
275822
275825
  // ../utils/dist/http.mjs
275823
275826
  async function retryWhenFailed(fn, maxRetries = 5, initialSleepTime = 1000, stopOnError) {
275824
275827
  let attempt = 0;
@@ -278009,11 +278012,33 @@ function createSettleMintClient(options) {
278009
278012
  };
278010
278013
  }
278011
278014
 
278015
+ // ../utils/dist/filesystem.mjs
278016
+ import { dirname as dirname3 } from "node:path";
278017
+ import { stat as stat2 } from "node:fs/promises";
278018
+ async function projectRoot2(fallbackToCwd = false, cwd) {
278019
+ const packageJsonPath = await findUp("package.json", { cwd });
278020
+ if (!packageJsonPath) {
278021
+ if (fallbackToCwd) {
278022
+ return process.cwd();
278023
+ }
278024
+ throw new Error("Unable to find project root (no package.json found)");
278025
+ }
278026
+ return dirname3(packageJsonPath);
278027
+ }
278028
+ async function exists2(path4) {
278029
+ try {
278030
+ await stat2(path4);
278031
+ return true;
278032
+ } catch {
278033
+ return false;
278034
+ }
278035
+ }
278036
+
278012
278037
  // ../utils/dist/package-manager.mjs
278013
278038
  import { readdir as readdir2, rm } from "node:fs/promises";
278014
278039
  import { resolve as resolve2 } from "node:path";
278015
- import { dirname as dirname3 } from "node:path";
278016
- import { stat as stat2 } from "node:fs/promises";
278040
+ import { dirname as dirname5 } from "node:path";
278041
+ import { stat as stat3 } from "node:fs/promises";
278017
278042
 
278018
278043
  // ../../node_modules/package-manager-detector/dist/detect.mjs
278019
278044
  import fs2 from "node:fs";
@@ -278252,7 +278277,7 @@ async function installPackage(names, options = {}) {
278252
278277
  var import_console_table_printer3 = __toESM(require_dist2(), 1);
278253
278278
  var import_package_json = __toESM(require_lib12(), 1);
278254
278279
  var import_package_json2 = __toESM(require_lib12(), 1);
278255
- async function projectRoot2(fallbackToCwd = false, cwd) {
278280
+ async function projectRoot3(fallbackToCwd = false, cwd) {
278256
278281
  const packageJsonPath = await findUp("package.json", { cwd });
278257
278282
  if (!packageJsonPath) {
278258
278283
  if (fallbackToCwd) {
@@ -278260,11 +278285,11 @@ async function projectRoot2(fallbackToCwd = false, cwd) {
278260
278285
  }
278261
278286
  throw new Error("Unable to find project root (no package.json found)");
278262
278287
  }
278263
- return dirname3(packageJsonPath);
278288
+ return dirname5(packageJsonPath);
278264
278289
  }
278265
- async function exists2(path6) {
278290
+ async function exists3(path6) {
278266
278291
  try {
278267
- await stat2(path6);
278292
+ await stat3(path6);
278268
278293
  return true;
278269
278294
  } catch {
278270
278295
  return false;
@@ -278278,7 +278303,7 @@ async function isEmpty(path6) {
278278
278303
  return files.length === 0 || files.length === 1 && files[0] === ".git";
278279
278304
  }
278280
278305
  async function emptyDir(dir) {
278281
- if (!await exists2(dir))
278306
+ if (!await exists3(dir))
278282
278307
  return;
278283
278308
  for (const file of await readdir2(dir)) {
278284
278309
  if (file === ".git")
@@ -278323,14 +278348,14 @@ async function installDependencies(pkgs, cwd) {
278323
278348
  }
278324
278349
  }
278325
278350
  async function isPackageInstalled(name, path6) {
278326
- const pkgJson = await import_package_json.default.load(path6 ?? await projectRoot2());
278351
+ const pkgJson = await import_package_json.default.load(path6 ?? await projectRoot3());
278327
278352
  const inDependencies = !!pkgJson.content.dependencies?.[name];
278328
278353
  const inDevDependencies = !!pkgJson.content.devDependencies?.[name];
278329
278354
  const inPeerDependencies = !!pkgJson.content.peerDependencies?.[name];
278330
278355
  return inDependencies || inDevDependencies || inPeerDependencies;
278331
278356
  }
278332
278357
  async function setName(name, path6) {
278333
- const pkgJson = await import_package_json2.default.load(path6 ?? await projectRoot2());
278358
+ const pkgJson = await import_package_json2.default.load(path6 ?? await projectRoot3());
278334
278359
  pkgJson.update({
278335
278360
  name
278336
278361
  });
@@ -278393,33 +278418,11 @@ function replaceUnderscoresAndHyphensWithSpaces(s2) {
278393
278418
  return s2.replace(/[-_]/g, " ");
278394
278419
  }
278395
278420
 
278396
- // ../utils/dist/filesystem.mjs
278397
- import { dirname as dirname5 } from "node:path";
278398
- import { stat as stat3 } from "node:fs/promises";
278399
- async function projectRoot3(fallbackToCwd = false, cwd) {
278400
- const packageJsonPath = await findUp("package.json", { cwd });
278401
- if (!packageJsonPath) {
278402
- if (fallbackToCwd) {
278403
- return process.cwd();
278404
- }
278405
- throw new Error("Unable to find project root (no package.json found)");
278406
- }
278407
- return dirname5(packageJsonPath);
278408
- }
278409
- async function exists3(path6) {
278410
- try {
278411
- await stat3(path6);
278412
- return true;
278413
- } catch {
278414
- return false;
278415
- }
278416
- }
278417
-
278418
278421
  // src/utils/config.ts
278419
278422
  var CONFIG_DIR = join4(homedir(), ".config", "settlemint");
278420
278423
  var CONFIG_FILE = join4(CONFIG_DIR, "config.json");
278421
278424
  async function ensureConfigDir() {
278422
- if (!await exists3(CONFIG_DIR)) {
278425
+ if (!await exists2(CONFIG_DIR)) {
278423
278426
  await mkdir(CONFIG_DIR, { recursive: true });
278424
278427
  }
278425
278428
  }
@@ -278525,8 +278528,7 @@ async function getInstanceFromCommand(command) {
278525
278528
  async function getUpgradeInstructions() {
278526
278529
  const globallyInstalled = await isSdkInstalledGlobally();
278527
278530
  if (globallyInstalled) {
278528
- const executablePath = process.execPath;
278529
- if (executablePath.endsWith("bun")) {
278531
+ if (await isBun2()) {
278530
278532
  return `To update, run:
278531
278533
  bun install -g ${SDK_PACKAGE_NAME}`;
278532
278534
  }
@@ -278535,7 +278537,7 @@ bun install -g ${SDK_PACKAGE_NAME}`;
278535
278537
  - For yarn, run: yarn global add ${SDK_PACKAGE_NAME}
278536
278538
  - For pnpm, run: pnpm update -g ${SDK_PACKAGE_NAME}`;
278537
278539
  }
278538
- return `Update your ${SDK_PACKAGE_NAME} version in the package.json file.`;
278540
+ return `Update the ${SDK_PACKAGE_NAME} version in the package.json file.`;
278539
278541
  }
278540
278542
  async function isSdkInstalledGlobally() {
278541
278543
  try {
@@ -278545,17 +278547,30 @@ async function isSdkInstalledGlobally() {
278545
278547
  return true;
278546
278548
  }
278547
278549
  }
278550
+ async function isBun2() {
278551
+ const executablePath = process.execPath;
278552
+ if (executablePath.endsWith("bun")) {
278553
+ return true;
278554
+ }
278555
+ const root = await projectRoot2();
278556
+ const isInNodeModules = await exists2(join6(root, "node_modules", SDK_PACKAGE_NAME));
278557
+ if (!isInNodeModules) {
278558
+ return false;
278559
+ }
278560
+ const packageManager = await getPackageManager(root);
278561
+ return packageManager === "bun";
278562
+ }
278548
278563
 
278549
278564
  // src/commands/codegen/utils/write-template.ts
278550
278565
  import { mkdir as mkdir2, writeFile as writeFile3 } from "node:fs/promises";
278551
- import { join as join6 } from "node:path";
278566
+ import { join as join7 } from "node:path";
278552
278567
  async function writeTemplate(template, directory, filename) {
278553
- const projectDir = await projectRoot3();
278554
- const hasSrcDir = await exists3(join6(projectDir, "src"));
278555
- const basePath = hasSrcDir ? join6(projectDir, "src") : projectDir;
278556
- const codegenDir = join6(basePath, directory);
278568
+ const projectDir = await projectRoot2();
278569
+ const hasSrcDir = await exists2(join7(projectDir, "src"));
278570
+ const basePath = hasSrcDir ? join7(projectDir, "src") : projectDir;
278571
+ const codegenDir = join7(basePath, directory);
278557
278572
  await mkdir2(codegenDir, { recursive: true });
278558
- const filePath = join6(codegenDir, filename);
278573
+ const filePath = join7(codegenDir, filename);
278559
278574
  await writeFile3(filePath, template, "utf8");
278560
278575
  }
278561
278576
 
@@ -278629,13 +278644,16 @@ export const { client: hasuraClient, graphql: hasuraGraphql } = createHasuraClie
278629
278644
  introspection: introspection;
278630
278645
  disableMasking: true;
278631
278646
  scalars: {
278632
- DateTime: Date;
278633
- JSON: Record<string, unknown>;
278634
- Bytes: string;
278635
- Int8: string;
278636
- BigInt: string;
278637
- BigDecimal: string;
278638
- Timestamp: string;
278647
+ timestamp: string;
278648
+ timestampz: string;
278649
+ uuid: string;
278650
+ date: string;
278651
+ time: string;
278652
+ jsonb: string;
278653
+ numeric: string;
278654
+ interval: string;
278655
+ geometry: string;
278656
+ geography: string;
278639
278657
  };
278640
278658
  }>({
278641
278659
  instance: process.env.SETTLEMINT_HASURA_ENDPOINT ?? "",
@@ -278648,7 +278666,7 @@ export const { client: hasuraClient, graphql: hasuraGraphql } = createHasuraClie
278648
278666
  export const postgresPool = createPostgresPool(process.env.SETTLEMINT_HASURA_DATABASE_URL ?? '');
278649
278667
  `;
278650
278668
  await writeTemplate(drizzleTemplate, "/lib/settlemint", "postgres.ts");
278651
- const projectDir = await projectRoot3();
278669
+ const projectDir = await projectRoot2();
278652
278670
  if (!await isPackageInstalled(PACKAGE_NAME, projectDir)) {
278653
278671
  await installDependencies(PACKAGE_NAME, projectDir);
278654
278672
  }
@@ -278687,20 +278705,15 @@ export const { client: portalClient, graphql: portalGraphql } = createPortalClie
278687
278705
  introspection: introspection;
278688
278706
  disableMasking: true;
278689
278707
  scalars: {
278690
- DateTime: Date;
278691
- JSON: Record<string, unknown>;
278692
- Bytes: string;
278693
- Int8: string;
278694
- BigInt: string;
278695
- BigDecimal: string;
278696
- Timestamp: string;
278708
+ /** Used for metadata field */
278709
+ JSON: unknown;
278697
278710
  };
278698
278711
  }>({
278699
278712
  instance: process.env.SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT!,
278700
278713
  accessToken: process.env.SETTLEMINT_ACCESS_TOKEN!, // undefined in browser, by design to not leak the secrets
278701
278714
  });`;
278702
278715
  await writeTemplate(template, "/lib/settlemint", "portal.ts");
278703
- const projectDir = await projectRoot3();
278716
+ const projectDir = await projectRoot2();
278704
278717
  if (!await isPackageInstalled(PACKAGE_NAME2, projectDir)) {
278705
278718
  await installDependencies(PACKAGE_NAME2, projectDir);
278706
278719
  }
@@ -278760,9 +278773,8 @@ async function codegenTheGraph(env2, subgraphNames) {
278760
278773
  export const { client: ${graphqlClientVariable}, graphql: ${graphqlVariable} } = createTheGraphClient<{
278761
278774
  introspection: ${introspectionVariable};
278762
278775
  disableMasking: true;
278776
+ // https://thegraph.com/docs/en/subgraphs/developing/creating/ql-schema/#built-in-scalar-types
278763
278777
  scalars: {
278764
- DateTime: Date;
278765
- JSON: Record<string, unknown>;
278766
278778
  Bytes: string;
278767
278779
  Int8: string;
278768
278780
  BigInt: string;
@@ -278778,7 +278790,7 @@ export const { client: ${graphqlClientVariable}, graphql: ${graphqlVariable} } =
278778
278790
  }
278779
278791
  await writeTemplate(template.join(`
278780
278792
  `), "/lib/settlemint", "the-graph.ts");
278781
- const projectDir = await projectRoot3();
278793
+ const projectDir = await projectRoot2();
278782
278794
  if (!await isPackageInstalled(PACKAGE_NAME3, projectDir)) {
278783
278795
  await installDependencies(PACKAGE_NAME3, projectDir);
278784
278796
  }
@@ -280166,13 +280178,22 @@ export const { client: blockscoutClient, graphql: blockscoutGraphql } = createBl
280166
280178
  introspection: introspection;
280167
280179
  disableMasking: true;
280168
280180
  scalars: {
280169
- DateTime: Date;
280170
- JSON: Record<string, unknown>;
280171
- Bytes: string;
280172
- Int8: string;
280173
- BigInt: string;
280174
- BigDecimal: string;
280175
- Timestamp: string;
280181
+ /** 40 hex characters (160 bits/20 bytes) derived from the public key, prefixed with 0x */
280182
+ AddressHash: string;
280183
+ /** Unpadded big-endian hexadecimal number where each byte pair maps to underlying binary */
280184
+ Data: string;
280185
+ /** ISO8601 formatted UTC datetime string */
280186
+ DateTime: string;
280187
+ /** String representation of a signed double-precision decimal value */
280188
+ Decimal: string;
280189
+ /** 32-byte KECCAK-256 hash */
280190
+ FullHash: string;
280191
+ /** Arbitrary JSON string data as UTF-8 */
280192
+ Json: string;
280193
+ /** 16 hex character (128 bits/8 bytes) nonce from Proof-of-Work */
280194
+ NonceHash: string;
280195
+ /** Smallest fractional unit of Ether, represented as a string for integer math */
280196
+ Wei: string;
280176
280197
  };
280177
280198
  }>({
280178
280199
  instance: process.env.SETTLEMINT_BLOCKSCOUT_ENDPOINT!,
@@ -280181,7 +280202,7 @@ export const { client: blockscoutClient, graphql: blockscoutGraphql } = createBl
280181
280202
 
280182
280203
  export const blockscoutUiEndpoint = process.env.SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT!;`;
280183
280204
  await writeTemplate(template, "/lib/settlemint", "blockscout.ts");
280184
- const projectDir = await projectRoot3();
280205
+ const projectDir = await projectRoot2();
280185
280206
  if (!await isPackageInstalled(PACKAGE_NAME4, projectDir)) {
280186
280207
  await installDependencies(PACKAGE_NAME4, projectDir);
280187
280208
  }
@@ -280204,7 +280225,7 @@ export const { client } = createServerIpfsClient({
280204
280225
  accessToken: process.env.SETTLEMINT_ACCESS_TOKEN!,
280205
280226
  });`;
280206
280227
  await writeTemplate(clientTemplate, "/lib/settlemint", "ipfs.ts");
280207
- const projectDir = await projectRoot3();
280228
+ const projectDir = await projectRoot2();
280208
280229
  if (!await isPackageInstalled(PACKAGE_NAME5, projectDir)) {
280209
280230
  await installDependencies(PACKAGE_NAME5, projectDir);
280210
280231
  }
@@ -280229,7 +280250,7 @@ export const { client } = createServerMinioClient({
280229
280250
  secretKey: process.env.SETTLEMINT_MINIO_SECRET_KEY!
280230
280251
  });`;
280231
280252
  await writeTemplate(clientTemplate, "/lib/settlemint", "minio.ts");
280232
- const projectDir = await projectRoot3();
280253
+ const projectDir = await projectRoot2();
280233
280254
  if (!await isPackageInstalled(PACKAGE_NAME6, projectDir)) {
280234
280255
  await installDependencies(PACKAGE_NAME6, projectDir);
280235
280256
  }
@@ -281279,7 +281300,7 @@ function connectCommand() {
281279
281300
 
281280
281301
  // src/commands/create.ts
281281
281302
  import { mkdir as mkdir6 } from "node:fs/promises";
281282
- import { join as join9 } from "node:path";
281303
+ import { join as join10 } from "node:path";
281283
281304
 
281284
281305
  // src/prompts/project-name.prompt.ts
281285
281306
  async function projectNamePrompt(env2, argument) {
@@ -281339,12 +281360,12 @@ async function templatePrompt(platformConfig, argument) {
281339
281360
  // src/utils/download-extract.ts
281340
281361
  import { mkdir as mkdir5 } from "node:fs/promises";
281341
281362
 
281342
- // ../../node_modules/giget/dist/shared/giget.D-_6aM9e.mjs
281363
+ // ../../node_modules/giget/dist/shared/giget.BgKdRmJH.mjs
281343
281364
  var import_tar = __toESM(require_tar(), 1);
281344
281365
  import { readFile as readFile6, writeFile as writeFile7, mkdir as mkdir4, rm as rm3 } from "node:fs/promises";
281345
281366
  import { existsSync as existsSync3, createWriteStream, readdirSync as readdirSync2 } from "node:fs";
281346
281367
 
281347
- // ../../node_modules/pathe/dist/shared/pathe.UZ-hd4nF.mjs
281368
+ // ../../node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
281348
281369
  var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
281349
281370
  function normalizeWindowsPath(input = "") {
281350
281371
  if (!input) {
@@ -281384,7 +281405,7 @@ var normalize3 = function(path6) {
281384
281405
  }
281385
281406
  return isPathAbsolute && !isAbsolute(path6) ? `/${path6}` : path6;
281386
281407
  };
281387
- var join8 = function(...segments) {
281408
+ var join9 = function(...segments) {
281388
281409
  let path6 = "";
281389
281410
  for (const seg of segments) {
281390
281411
  if (!seg) {
@@ -281572,7 +281593,7 @@ var defuArrayFn = createDefu((object, key2, currentValue) => {
281572
281593
  }
281573
281594
  });
281574
281595
 
281575
- // ../../node_modules/nypm/dist/shared/nypm.DqHADQHW.mjs
281596
+ // ../../node_modules/nypm/dist/shared/nypm.BwVzLgAA.mjs
281576
281597
  import { x as x6 } from "tinyexec";
281577
281598
  import { existsSync as existsSync2 } from "node:fs";
281578
281599
  import { readFile as readFile5 } from "node:fs/promises";
@@ -281600,6 +281621,9 @@ function cached(fn) {
281600
281621
  };
281601
281622
  }
281602
281623
  var hasCorepack = cached(async () => {
281624
+ if (globalThis.process?.versions?.webcontainer) {
281625
+ return false;
281626
+ }
281603
281627
  try {
281604
281628
  const { exitCode: exitCode2 } = await x6("corepack", ["--version"]);
281605
281629
  return exitCode2 === 0;
@@ -281689,7 +281713,7 @@ var packageManagers = [
281689
281713
  async function detectPackageManager2(cwd2, options = {}) {
281690
281714
  const detected = await findup(resolve6(cwd2 || "."), async (path6) => {
281691
281715
  if (!options.ignorePackageJSON) {
281692
- const packageJSONPath = join8(path6, "package.json");
281716
+ const packageJSONPath = join9(path6, "package.json");
281693
281717
  if (existsSync2(packageJSONPath)) {
281694
281718
  const packageJSON = JSON.parse(await readFile5(packageJSONPath, "utf8"));
281695
281719
  if (packageJSON?.packageManager) {
@@ -281714,7 +281738,7 @@ async function detectPackageManager2(cwd2, options = {}) {
281714
281738
  }
281715
281739
  }
281716
281740
  }
281717
- const denoJSONPath = join8(path6, "deno.json");
281741
+ const denoJSONPath = join9(path6, "deno.json");
281718
281742
  if (existsSync2(denoJSONPath)) {
281719
281743
  return packageManagers.find((pm) => pm.name === "deno");
281720
281744
  }
@@ -281766,7 +281790,7 @@ async function installDependencies2(options = {}) {
281766
281790
  // ../../node_modules/nypm/dist/index.mjs
281767
281791
  import"tinyexec";
281768
281792
 
281769
- // ../../node_modules/giget/dist/shared/giget.D-_6aM9e.mjs
281793
+ // ../../node_modules/giget/dist/shared/giget.BgKdRmJH.mjs
281770
281794
  import { pipeline } from "node:stream";
281771
281795
  var import_proxy = __toESM(require_proxy(), 1);
281772
281796
  import { homedir as homedir2 } from "node:os";
@@ -282104,8 +282128,8 @@ function createCommand2() {
282104
282128
  }
282105
282129
  const name2 = await projectNamePrompt(env2, projectName);
282106
282130
  const targetDir = formatTargetDir(name2);
282107
- const projectDir = join9(process.cwd(), targetDir);
282108
- if (!await exists3(projectDir)) {
282131
+ const projectDir = join10(process.cwd(), targetDir);
282132
+ if (!await exists2(projectDir)) {
282109
282133
  await mkdir6(projectDir, { recursive: true });
282110
282134
  }
282111
282135
  if (!await isEmpty(projectDir)) {
@@ -284557,7 +284581,7 @@ function platformCommand() {
284557
284581
 
284558
284582
  // src/commands/smart-contract-set/create.ts
284559
284583
  import { rmdir } from "node:fs/promises";
284560
- import { join as join10 } from "node:path";
284584
+ import { join as join11 } from "node:path";
284561
284585
 
284562
284586
  // src/prompts/smart-contract-set/use-case.prompt.ts
284563
284587
  async function useCasePrompt(platformConfig, argument) {
@@ -284626,8 +284650,8 @@ function createCommand4() {
284626
284650
  return nothingSelectedError("use case");
284627
284651
  }
284628
284652
  const targetDir = formatTargetDir(name2);
284629
- const projectDir = join10(process.cwd(), targetDir);
284630
- if (await exists3(projectDir) && !await isEmpty(projectDir)) {
284653
+ const projectDir = join11(process.cwd(), targetDir);
284654
+ if (await exists2(projectDir) && !await isEmpty(projectDir)) {
284631
284655
  const confirmEmpty = await esm_default3({
284632
284656
  message: `The folder ${projectDir} already exists. Do you want to delete it?`,
284633
284657
  default: false
@@ -285183,19 +285207,19 @@ function sanitizeName(value4, length = 35) {
285183
285207
 
285184
285208
  // src/utils/subgraph/subgraph-config.ts
285185
285209
  import { readFile as readFile7, writeFile as writeFile8 } from "node:fs/promises";
285186
- import { basename as basename4, join as join11 } from "node:path";
285210
+ import { basename as basename4, join as join12 } from "node:path";
285187
285211
  var CONFIG_FILE_PATH = "./subgraph/subgraph.config.json";
285188
- var isGenerated = (path6 = process.cwd()) => exists3(join11(path6, CONFIG_FILE_PATH));
285212
+ var isGenerated = (path6 = process.cwd()) => exists2(join12(path6, CONFIG_FILE_PATH));
285189
285213
  var getSubgraphYamlFile = async (path6 = process.cwd()) => {
285190
285214
  const generated = await isGenerated(path6);
285191
- if (generated && await exists3(join11(path6, "generated/scs.subgraph.yaml"))) {
285192
- return join11(path6, "generated/scs.subgraph.yaml");
285215
+ if (generated && await exists2(join12(path6, "generated/scs.subgraph.yaml"))) {
285216
+ return join12(path6, "generated/scs.subgraph.yaml");
285193
285217
  }
285194
- if (await exists3(join11(path6, "subgraph/subgraph.yaml"))) {
285195
- return join11(path6, "subgraph/subgraph.yaml");
285218
+ if (await exists2(join12(path6, "subgraph/subgraph.yaml"))) {
285219
+ return join12(path6, "subgraph/subgraph.yaml");
285196
285220
  }
285197
- if (await exists3(join11(path6, "subgraph.yaml"))) {
285198
- return join11(path6, "subgraph.yaml");
285221
+ if (await exists2(join12(path6, "subgraph.yaml"))) {
285222
+ return join12(path6, "subgraph.yaml");
285199
285223
  }
285200
285224
  throw new Error("Subgraph configuration file not found");
285201
285225
  };
@@ -285210,7 +285234,7 @@ var updateSubgraphYamlConfig = async (config3, cwd2 = process.cwd()) => {
285210
285234
  };
285211
285235
  var getSubgraphConfig = async (path6 = process.cwd()) => {
285212
285236
  try {
285213
- const configContents = await readFile7(join11(path6, CONFIG_FILE_PATH));
285237
+ const configContents = await readFile7(join12(path6, CONFIG_FILE_PATH));
285214
285238
  const currentConfig = tryParseJson3(configContents.toString());
285215
285239
  return currentConfig;
285216
285240
  } catch (err) {
@@ -285227,16 +285251,16 @@ async function subgraphSetup({ network }) {
285227
285251
  if (generated) {
285228
285252
  await executeFoundryCommand("forge", ["build"]);
285229
285253
  }
285230
- if (await exists3("./generated")) {
285254
+ if (await exists2("./generated")) {
285231
285255
  await rm4("./generated", { recursive: true, force: true });
285232
285256
  }
285233
- if (await exists3("./subgraph/generated")) {
285257
+ if (await exists2("./subgraph/generated")) {
285234
285258
  await rm4("./subgraph/generated", { recursive: true, force: true });
285235
285259
  }
285236
- if (await exists3("./build")) {
285260
+ if (await exists2("./build")) {
285237
285261
  await rm4("./build", { recursive: true, force: true });
285238
285262
  }
285239
- if (await exists3("./subgraph/build")) {
285263
+ if (await exists2("./subgraph/build")) {
285240
285264
  await rm4("./subgraph/build", { recursive: true, force: true });
285241
285265
  }
285242
285266
  if (generated) {
@@ -285673,4 +285697,4 @@ async function sdkCliCommand(argv = process.argv) {
285673
285697
  // src/cli.ts
285674
285698
  sdkCliCommand();
285675
285699
 
285676
- //# debugId=059E411CC4134FB964756E2164756E21
285700
+ //# debugId=9371AE0DDAA8011764756E2164756E21