@settlemint/sdk-cli 0.6.59-prf5c35a4 → 0.7.0

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 +151 -90
  2. package/dist/cli.js.map +23 -21
  3. package/package.json +3 -3
package/dist/cli.js CHANGED
@@ -197427,7 +197427,7 @@ ${Bt.cyan(Yt)}
197427
197427
  code: "ENOENT"
197428
197428
  }), getPathInfo = (e9, t7) => {
197429
197429
  var r6 = t7.colon || or;
197430
- 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.dDxPK9L9PG:/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)];
197430
+ 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.qX3E6oel4i:/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)];
197431
197431
  var n6 = nr ? t7.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
197432
197432
  var a5 = nr ? n6.split(r6) : [""];
197433
197433
  if (nr) {
@@ -200564,7 +200564,7 @@ ${whileRunning(e9)}`;
200564
200564
  };
200565
200565
  ni = Object.assign(async function _main() {
200566
200566
  var e9 = new Cli({
200567
- binaryVersion: "0.6.59-prf5c35a4",
200567
+ binaryVersion: "0.7.0",
200568
200568
  binaryLabel: "gql.tada CLI",
200569
200569
  binaryName: "gql.tada"
200570
200570
  });
@@ -218401,7 +218401,7 @@ var require_lib4 = __commonJS((exports, module) => {
218401
218401
  var rRel = new RegExp(`^\\.${rSlash.source}`);
218402
218402
  var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
218403
218403
  var getPathInfo2 = (cmd2, {
218404
- 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.dDxPK9L9PG:/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",
218404
+ 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.qX3E6oel4i:/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",
218405
218405
  pathExt: optPathExt = process.env.PATHEXT,
218406
218406
  delimiter: optDelimiter = delimiter
218407
218407
  }) => {
@@ -218605,7 +218605,7 @@ var require_lib5 = __commonJS((exports, module) => {
218605
218605
  let pathToInitial;
218606
218606
  try {
218607
218607
  pathToInitial = which.sync(initialCmd, {
218608
- 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.dDxPK9L9PG:/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",
218608
+ 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.qX3E6oel4i:/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",
218609
218609
  pathext: options.env && findInObject(options.env, "PATHEXT") || process.env.PATHEXT
218610
218610
  }).toLowerCase();
218611
218611
  } catch (err) {
@@ -219322,7 +219322,7 @@ var require_lib6 = __commonJS((exports, module) => {
219322
219322
  var rRel = new RegExp(`^\\.${rSlash.source}`);
219323
219323
  var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
219324
219324
  var getPathInfo2 = (cmd2, {
219325
- 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.dDxPK9L9PG:/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",
219325
+ 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.qX3E6oel4i:/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",
219326
219326
  pathExt: optPathExt = process.env.PATHEXT,
219327
219327
  delimiter: optDelimiter = delimiter
219328
219328
  }) => {
@@ -235213,7 +235213,7 @@ var require_which2 = __commonJS((exports, module) => {
235213
235213
  const colon = opt2.colon || COLON;
235214
235214
  const pathEnv = cmd2.match(/\//) || isWindows2 && cmd2.match(/\\/) ? [""] : [
235215
235215
  ...isWindows2 ? [process.cwd()] : [],
235216
- ...(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.dDxPK9L9PG:/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)
235216
+ ...(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.qX3E6oel4i:/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)
235217
235217
  ];
235218
235218
  const pathExtExe = isWindows2 ? opt2.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
235219
235219
  const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
@@ -270594,6 +270594,16 @@ function getBlockscoutEndpoints(service) {
270594
270594
  SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: uiEndpoint
270595
270595
  };
270596
270596
  }
270597
+ function getMinioEndpoints(service) {
270598
+ if (!service || service.__typename !== "MinioStorage") {
270599
+ return {};
270600
+ }
270601
+ return {
270602
+ SETTLEMINT_MINIO_ENDPOINT: service?.endpoints.find((endpoint) => endpoint.id.includes("s3-api"))?.displayValue,
270603
+ SETTLEMINT_MINIO_ACCESS_KEY: service?.credentials.find((credential) => credential.id.includes("access-key"))?.displayValue,
270604
+ SETTLEMINT_MINIO_SECRET_KEY: service?.credentials.find((credential) => credential.id.includes("secret-key"))?.displayValue
270605
+ };
270606
+ }
270597
270607
 
270598
270608
  // ../utils/dist/runtime.mjs
270599
270609
  function ensureServer() {
@@ -273233,9 +273243,7 @@ function connectCommand() {
273233
273243
  ...getPortalEndpoints(portal),
273234
273244
  SETTLEMINT_HD_PRIVATE_KEY: hdPrivateKey?.uniqueName,
273235
273245
  SETTLEMINT_MINIO: minio?.id,
273236
- SETTLEMINT_MINIO_ENDPOINT: minio?.endpoints.find((endpoint) => endpoint.id.includes("s3-api"))?.displayValue,
273237
- SETTLEMINT_MINIO_ACCESS_KEY: minio?.credentials.find((credential) => credential.id.includes("access-key"))?.displayValue,
273238
- SETTLEMINT_MINIO_SECRET_KEY: minio?.credentials.find((credential) => credential.id.includes("secret-key"))?.displayValue,
273246
+ ...getMinioEndpoints(minio),
273239
273247
  SETTLEMINT_IPFS: ipfs?.id,
273240
273248
  ...getIpfsEndpoints(ipfs),
273241
273249
  SETTLEMINT_CUSTOM_DEPLOYMENT: cDeployment?.id,
@@ -273250,7 +273258,7 @@ function connectCommand() {
273250
273258
  var package_default = {
273251
273259
  name: "@settlemint/sdk-cli",
273252
273260
  description: "SettleMint SDK, integrate SettleMint into your application with ease.",
273253
- version: "0.6.59-prf5c35a4",
273261
+ version: "0.7.0",
273254
273262
  type: "module",
273255
273263
  private: false,
273256
273264
  license: "FSL-1.1-MIT",
@@ -273301,8 +273309,8 @@ var package_default = {
273301
273309
  "@inquirer/input": "4.1.0",
273302
273310
  "@inquirer/password": "4.0.3",
273303
273311
  "@inquirer/select": "4.0.3",
273304
- "@settlemint/sdk-js": "0.6.59-prf5c35a4",
273305
- "@settlemint/sdk-utils": "0.6.59-prf5c35a4",
273312
+ "@settlemint/sdk-js": "0.7.0",
273313
+ "@settlemint/sdk-utils": "0.7.0",
273306
273314
  "get-tsconfig": "4.8.1",
273307
273315
  giget: "1.2.3"
273308
273316
  },
@@ -274162,9 +274170,9 @@ function createExamples(examples) {
274162
274170
  return `
274163
274171
  Examples:
274164
274172
 
274165
- ${examples.map(({ description, command }) => {
274173
+ ${examples.map(({ description, command, commandPrefix }) => {
274166
274174
  return ` # ${description}
274167
- $ bunx @settlemint/sdk-cli@latest ${command}`;
274175
+ $ ${commandPrefix ?? ""}bunx @settlemint/sdk-cli@latest ${command}`;
274168
274176
  }).join(`
274169
274177
 
274170
274178
  `)}`;
@@ -274206,11 +274214,12 @@ function loginCommand() {
274206
274214
  ${createExamples([
274207
274215
  {
274208
274216
  description: "Login to your SettleMint account",
274209
- command: "settlemint login"
274217
+ command: "login"
274210
274218
  },
274211
274219
  {
274212
274220
  description: "Login to your SettleMint account using a token from STDIN",
274213
- command: "cat ~/my_token.txt | settlemint login --token-stdin --accept-defaults"
274221
+ command: "login --token-stdin --accept-defaults",
274222
+ commandPrefix: "cat ~/my_token.txt | "
274214
274223
  }
274215
274224
  ])}`).option("-a, --accept-defaults", "Accept the default and previously set values").option("-d, --default", "Set this instance as the default").option("--token-stdin", "Provide a token using STDIN").action(async ({ acceptDefaults, default: isDefault, tokenStdin }) => {
274216
274225
  intro("Login to your SettleMint account");
@@ -275166,9 +275175,54 @@ function ipfsStorageCreateCommand() {
275166
275175
  });
275167
275176
  }
275168
275177
 
275178
+ // src/commands/platform/storage/minio/create.ts
275179
+ function minioStorageCreateCommand() {
275180
+ return getCreateCommand({
275181
+ name: "minio",
275182
+ type: "storage",
275183
+ alias: "m",
275184
+ execute: (cmd2, baseAction) => {
275185
+ addClusterServiceArgs(cmd2).option("--application-id <applicationId>", "Application ID").action(async (name2, { applicationId, provider, region, size, type: type4, ...defaultArgs }) => {
275186
+ return baseAction(defaultArgs, async (settlemint, env2) => {
275187
+ const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
275188
+ const result = await settlemint.storage.create({
275189
+ name: name2,
275190
+ applicationId: application,
275191
+ storageProtocol: "MINIO",
275192
+ provider,
275193
+ region,
275194
+ size,
275195
+ type: type4
275196
+ });
275197
+ return {
275198
+ result,
275199
+ mapDefaultEnv: () => {
275200
+ return {
275201
+ SETTLEMINT_APPLICATION: application,
275202
+ SETTLEMINT_MINIO: result.id,
275203
+ ...getMinioEndpoints(result)
275204
+ };
275205
+ }
275206
+ };
275207
+ });
275208
+ });
275209
+ },
275210
+ examples: [
275211
+ {
275212
+ description: "Create a MinIO storage and save as default",
275213
+ command: "platform create storage minio my-storage --accept-defaults -d"
275214
+ },
275215
+ {
275216
+ description: "Create a MinIO storage in a different application",
275217
+ command: "platform create storage minio my-storage --application-id app-123"
275218
+ }
275219
+ ]
275220
+ });
275221
+ }
275222
+
275169
275223
  // src/commands/platform/storage/create.ts
275170
275224
  function storageCreateCommand() {
275171
- return new Command2("storage").alias("st").description("Create a storage service in the SettleMint platform").addCommand(ipfsStorageCreateCommand());
275225
+ return new Command2("storage").alias("st").description("Create a storage service in the SettleMint platform").addCommand(ipfsStorageCreateCommand()).addCommand(minioStorageCreateCommand());
275172
275226
  }
275173
275227
 
275174
275228
  // src/commands/platform/create.ts
@@ -275483,9 +275537,22 @@ function ipfsRestartCommand() {
275483
275537
  });
275484
275538
  }
275485
275539
 
275540
+ // src/commands/platform/storage/minio/restart.ts
275541
+ function minioRestartCommand() {
275542
+ return getRestartCommand({
275543
+ name: "minio",
275544
+ type: "storage",
275545
+ alias: "m",
275546
+ envKey: "SETTLEMINT_MINIO",
275547
+ restartFunction: async (settlemint, id) => {
275548
+ return settlemint.storage.restart(id);
275549
+ }
275550
+ });
275551
+ }
275552
+
275486
275553
  // src/commands/platform/storage/restart.ts
275487
275554
  function storageRestartCommand() {
275488
- return new Command2("storage").alias("st").description("Restart a storage service in the SettleMint platform").addCommand(ipfsRestartCommand());
275555
+ return new Command2("storage").alias("st").description("Restart a storage service in the SettleMint platform").addCommand(ipfsRestartCommand()).addCommand(minioRestartCommand());
275489
275556
  }
275490
275557
 
275491
275558
  // src/commands/platform/restart.ts
@@ -275775,62 +275842,62 @@ function createCommand4() {
275775
275842
  });
275776
275843
  }
275777
275844
 
275845
+ // src/utils/passthrough-options.ts
275846
+ function mapPassthroughOptions(options, command) {
275847
+ const optionArgs = Object.entries(options).map(([key2, value4]) => {
275848
+ if (value4 === true) {
275849
+ return `--${key2}`;
275850
+ }
275851
+ return `--${key2}=${value4}`;
275852
+ });
275853
+ return [...optionArgs, ...command.args];
275854
+ }
275855
+
275778
275856
  // src/commands/smart-contract-set/foundry/build.ts
275779
275857
  function foundryBuildCommand() {
275780
- const build = new Command2("build");
275781
- build.description("Build the smart contracts using Foundry/forge");
275782
- build.action(async () => {
275783
- await executeCommand("forge", ["build"]);
275858
+ return new Command2("build").description("Build the smart contracts using Foundry/forge").helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).action(async (passThroughOptions, cmd2) => {
275859
+ const forgeOptions = mapPassthroughOptions(passThroughOptions, cmd2);
275860
+ await executeCommand("forge", ["build", ...forgeOptions]);
275784
275861
  });
275785
- return build;
275786
275862
  }
275787
275863
 
275788
275864
  // src/commands/smart-contract-set/foundry/format.ts
275789
275865
  function foundryFormatCommand() {
275790
- const format3 = new Command2("format");
275791
- format3.description("Format the smart contracts using Foundry/forge");
275792
- format3.action(async () => {
275793
- await executeCommand("forge", ["fmt"]);
275866
+ return new Command2("format").description("Format the smart contracts using Foundry/forge").helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).action(async (passThroughOptions, cmd2) => {
275867
+ const forgeOptions = mapPassthroughOptions(passThroughOptions, cmd2);
275868
+ await executeCommand("forge", ["fmt", ...forgeOptions]);
275794
275869
  note("Smart contract set formatted successfully!");
275795
275870
  });
275796
- return format3;
275797
275871
  }
275798
275872
 
275799
275873
  // src/commands/smart-contract-set/foundry/network.ts
275800
275874
  function foundryNetworkCommand() {
275801
- const network = new Command2("network");
275802
- network.description("Start a development network Foundry/anvil");
275803
- network.action(async () => {
275804
- await executeCommand("anvil", []);
275875
+ return new Command2("network").description("Start a development network Foundry/anvil").helpOption(false).option("-h, --help", "Get list of possible anvil options").passThroughOptions().allowUnknownOption(true).action(async (passThroughOptions, cmd2) => {
275876
+ const anvilOptions = mapPassthroughOptions(passThroughOptions, cmd2);
275877
+ await executeCommand("anvil", anvilOptions);
275805
275878
  });
275806
- return network;
275807
275879
  }
275808
275880
 
275809
275881
  // src/commands/smart-contract-set/foundry/test.ts
275810
275882
  function foundryTestCommand() {
275811
- const test = new Command2("test");
275812
- test.description("Test the smart contracts using Foundry/forge");
275813
- test.action(async () => {
275814
- await executeCommand("forge", ["test"]);
275883
+ return new Command2("test").description("Test the smart contracts using Foundry/forge").helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).action(async (passThroughOptions, cmd2) => {
275884
+ const forgeOptions = mapPassthroughOptions(passThroughOptions, cmd2);
275885
+ await executeCommand("forge", ["test", ...forgeOptions]);
275815
275886
  });
275816
- return test;
275817
275887
  }
275818
275888
 
275819
275889
  // src/commands/smart-contract-set/hardhat/build.ts
275820
275890
  function hardhatBuildCommand() {
275821
- const build = new Command2("build");
275822
- build.description("Build the smart contracts using Hardhat");
275823
- build.action(async () => {
275891
+ return new Command2("build").description("Build the smart contracts using Hardhat").helpOption(false).option("-h, --help", "Get list of possible hardhat compile options").passThroughOptions().allowUnknownOption(true).action(async (passThroughOptions, cmd2) => {
275892
+ const hardhatOptions = mapPassthroughOptions(passThroughOptions, cmd2);
275824
275893
  const { command, args } = await getPackageManagerExecutable();
275825
- await executeCommand(command, [...args, "hardhat", "compile"]);
275894
+ await executeCommand(command, [...args, "hardhat", "compile", ...hardhatOptions]);
275826
275895
  });
275827
- return build;
275828
275896
  }
275829
275897
 
275830
275898
  // src/commands/smart-contract-set/hardhat/deploy/local.ts
275831
275899
  function hardhatDeployLocalCommand() {
275832
- const build = new Command2("local").description("Deploy the smart contracts using Hardhat/ignition to the local development network").option("-m, --module <ignitionmodule>", 'The module to deploy with Ignition, defaults to "ignition/modules/main.ts"').option("-r, --reset", "Reset the deployment").option("--verify", "Verify the deployment");
275833
- build.action(async ({ module, reset: reset2, verify }) => {
275900
+ return new Command2("local").description("Deploy the smart contracts using Hardhat/ignition to the local development network").option("-m, --module <ignitionmodule>", 'The module to deploy with Ignition, defaults to "ignition/modules/main.ts"').option("-r, --reset", "Wipes the existing deployment state before deploying").option("-v, --verify", "Verify the deployment on Etherscan").action(async ({ module, reset: reset2, verify }) => {
275834
275901
  const { command, args } = await getPackageManagerExecutable();
275835
275902
  await executeCommand(command, [
275836
275903
  ...args,
@@ -275844,7 +275911,6 @@ function hardhatDeployLocalCommand() {
275844
275911
  module ?? "ignition/modules/main.ts"
275845
275912
  ].filter(Boolean));
275846
275913
  });
275847
- return build;
275848
275914
  }
275849
275915
 
275850
275916
  // src/commands/smart-contract-set/prompts/address.prompt.ts
@@ -275881,26 +275947,6 @@ async function addressPrompt({
275881
275947
  return address;
275882
275948
  }
275883
275949
 
275884
- // src/commands/smart-contract-set/prompts/deployment-id.prompt.ts
275885
- async function deploymentIdPrompt(env2, accept, prod) {
275886
- const defaultDeploymentId = env2.SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID;
275887
- if (accept) {
275888
- return defaultDeploymentId;
275889
- }
275890
- const deploymentId = await esm_default4({
275891
- message: "What is the deployment ID of your smart contract set (optional)?",
275892
- required: false,
275893
- default: defaultDeploymentId
275894
- });
275895
- if (deploymentId !== defaultDeploymentId) {
275896
- await writeEnvSpinner(!!prod, {
275897
- ...env2,
275898
- SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: deploymentId
275899
- });
275900
- }
275901
- return deploymentId;
275902
- }
275903
-
275904
275950
  // src/utils/hardhat-config.ts
275905
275951
  async function getHardhatConfigData(envConfig) {
275906
275952
  try {
@@ -275930,8 +275976,19 @@ function isHardhatConfig(config4) {
275930
275976
 
275931
275977
  // src/commands/smart-contract-set/hardhat/deploy/remote.ts
275932
275978
  function hardhatDeployRemoteCommand() {
275933
- const build = new Command2("remote").description("Deploy the smart contracts using Hardhat/ignition to the remote network on the platform").option("-m, --module <ignitionmodule>", 'The module to deploy with Ignition, defaults to "ignition/modules/main.ts"').option("--deployment-id <deploymentId>", "Set a custom deployment id").option("-r, --reset", "Reset the deployment").option("--verify", "Verify the deployment").option("--blockchain-node-id <blockchainNodeId>", "Blockchain Node ID (optional, defaults to the blockchain node in the environment)").option("--prod", "Connect to your production environment").option("-a, --accept-defaults", "Accept the default and previously set values");
275934
- build.action(async ({ module, reset: reset2, verify, deploymentId, prod, acceptDefaults, blockchainNodeId }) => {
275979
+ const cmd2 = new Command2("remote").description("Deploy the smart contracts using Hardhat/ignition to the remote network on the platform").option("-m, --module <ignitionmodule>", 'The module to deploy with Ignition, defaults to "ignition/modules/main.ts"').option("--deployment-id <deploymentId>", "Set the id of the deployment").option("-r, --reset", "Wipes the existing deployment state before deploying").option("-v, --verify", "Verify the deployment on Etherscan").option("--default-sender <defaultSender>", "Set the default sender for the deployment").option("--parameters <parameters>", "A relative path to a JSON file to use for the module parameters").option("--strategy <strategy>", `Set the deployment strategy to use (default: "basic")`).option("--blockchain-node-id <blockchainNodeId>", "Blockchain Node ID (optional, defaults to the blockchain node in the environment)").option("--prod", "Connect to your production environment").option("-a, --accept-defaults", "Accept the default and previously set values");
275980
+ cmd2.action(async ({
275981
+ module,
275982
+ reset: reset2,
275983
+ verify,
275984
+ deploymentId,
275985
+ defaultSender,
275986
+ parameters,
275987
+ strategy,
275988
+ prod,
275989
+ acceptDefaults,
275990
+ blockchainNodeId
275991
+ }) => {
275935
275992
  const autoAccept = !!acceptDefaults || is_in_ci_default;
275936
275993
  const env2 = await loadEnv(false, !!prod);
275937
275994
  const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
@@ -275971,7 +276028,6 @@ function hardhatDeployRemoteCommand() {
275971
276028
  if (!address) {
275972
276029
  cancel2("No private key selected. Please select one to continue.");
275973
276030
  }
275974
- const customDeploymentId = deploymentId ?? await deploymentIdPrompt(env2, autoAccept, prod);
275975
276031
  const { command, args } = await getPackageManagerExecutable();
275976
276032
  await executeCommand(command, [
275977
276033
  ...args,
@@ -275980,13 +276036,16 @@ function hardhatDeployRemoteCommand() {
275980
276036
  "deploy",
275981
276037
  ...reset2 ? ["--reset"] : [],
275982
276038
  ...verify ? ["--verify"] : [],
275983
- ...customDeploymentId ? ["--deployment-id", customDeploymentId] : [],
276039
+ ...deploymentId ? ["--deployment-id", deploymentId] : [],
276040
+ ...defaultSender ? ["--default-sender", defaultSender] : [],
276041
+ ...parameters ? ["--parameters", parameters] : [],
276042
+ ...strategy ? ["--strategy", strategy] : [],
275984
276043
  "--network",
275985
276044
  "btp",
275986
276045
  module ?? "ignition/modules/main.ts"
275987
276046
  ].filter(Boolean), { env: envConfig });
275988
276047
  });
275989
- return build;
276048
+ return cmd2;
275990
276049
  }
275991
276050
 
275992
276051
  // src/commands/smart-contract-set/hardhat/deploy.ts
@@ -275999,29 +276058,33 @@ function hardhatDeployCommand() {
275999
276058
 
276000
276059
  // src/commands/smart-contract-set/hardhat/network.ts
276001
276060
  function hardhatNetworkCommand() {
276002
- const network = new Command2("network");
276003
- network.description("Start a development network using Hardhat");
276004
- network.action(async () => {
276061
+ return new Command2("network").description("Start a development network using Hardhat").helpOption(false).option("-h, --help", "Get list of possible hardhat node options").passThroughOptions().allowUnknownOption(true).action(async (passThroughOptions, cmd2) => {
276062
+ const hardhatOptions = mapPassthroughOptions(passThroughOptions, cmd2);
276005
276063
  const { command, args } = await getPackageManagerExecutable();
276006
- await executeCommand(command, [...args, "hardhat", "node"]);
276064
+ await executeCommand(command, [...args, "hardhat", "node", ...hardhatOptions]);
276007
276065
  });
276008
- return network;
276009
276066
  }
276010
276067
 
276011
276068
  // src/commands/smart-contract-set/hardhat/script/local.ts
276012
276069
  function hardhatScriptLocalCommand() {
276013
- const build = new Command2("local").description("Run a Hardhat script to deploy a contract on the platform or interact with a deployed contract.").requiredOption("-s, --script <script>", 'The script to run with Hardhat , e.g. "scripts/deploy.ts"');
276014
- build.action(async ({ script }) => {
276070
+ return new Command2("local").description("Run a Hardhat script to deploy a contract on the platform or interact with a deployed contract.").requiredOption("-s, --script <script>", 'The script to run with Hardhat , e.g. "scripts/deploy.ts"').option("--no-compile", "Don't compile before running this task").action(async ({ script, compile }) => {
276015
276071
  const { command, args } = await getPackageManagerExecutable();
276016
- await executeCommand(command, [...args, "hardhat", "run", script, "--network", "localhost"]);
276072
+ await executeCommand(command, [
276073
+ ...args,
276074
+ "hardhat",
276075
+ "run",
276076
+ script,
276077
+ "--network",
276078
+ "localhost",
276079
+ ...compile ? ["--no-compile"] : []
276080
+ ]);
276017
276081
  });
276018
- return build;
276019
276082
  }
276020
276083
 
276021
276084
  // src/commands/smart-contract-set/hardhat/script/remote.ts
276022
276085
  function hardhatScriptRemoteCommand() {
276023
- const build = new Command2("remote").description("Run a Hardhat script to deploy a contract on the platform or interact with a deployed contract.").requiredOption("-s, --script <script>", 'The script to run with Hardhat , e.g. "scripts/deploy.ts"').option("--blockchain-node-id <blockchainNodeId>", "Blockchain Node ID (optional, defaults to the blockchain node in the environment)").option("--prod", "Connect to your production environment").option("-a, --accept-defaults", "Accept the default and previously set values");
276024
- build.action(async ({ script, prod, blockchainNodeId, acceptDefaults }) => {
276086
+ const cmd2 = new Command2("remote").description("Run a Hardhat script to deploy a contract on the platform or interact with a deployed contract.").requiredOption("-s, --script <script>", 'The script to run with Hardhat , e.g. "scripts/deploy.ts"').option("--blockchain-node-id <blockchainNodeId>", "Blockchain Node ID (optional, defaults to the blockchain node in the environment)").option("--prod", "Connect to your production environment").option("-a, --accept-defaults", "Accept the default and previously set values").option("--no-compile", "Don't compile before running this task");
276087
+ cmd2.action(async ({ script, prod, blockchainNodeId, acceptDefaults, compile }) => {
276025
276088
  const autoAccept = !!acceptDefaults || is_in_ci_default;
276026
276089
  const env2 = await loadEnv(false, !!prod);
276027
276090
  const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
@@ -276044,9 +276107,9 @@ function hardhatScriptRemoteCommand() {
276044
276107
  }
276045
276108
  const envConfig = await settlemint.foundry.env(nodeId);
276046
276109
  const { command, args } = await getPackageManagerExecutable();
276047
- await executeCommand(command, [...args, "hardhat", "run", script, "--network", "btp"], { env: envConfig });
276110
+ await executeCommand(command, [...args, "hardhat", "run", script, "--network", "btp", ...compile ? ["--no-compile"] : []], { env: envConfig });
276048
276111
  });
276049
- return build;
276112
+ return cmd2;
276050
276113
  }
276051
276114
 
276052
276115
  // src/commands/smart-contract-set/hardhat/script.ts
@@ -276059,13 +276122,11 @@ function hardhatScriptCommand() {
276059
276122
 
276060
276123
  // src/commands/smart-contract-set/hardhat/test.ts
276061
276124
  function hardhatTestCommand() {
276062
- const test = new Command2("test");
276063
- test.description("Test the smart contracts using Hardhat");
276064
- test.action(async () => {
276125
+ return new Command2("test").description("Test the smart contracts using Hardhat").helpOption(false).option("-h, --help", "Get list of possible hardhat test options").passThroughOptions().allowUnknownOption().action(async (options, cmd2) => {
276126
+ const hardhatOptions = mapPassthroughOptions(options, cmd2);
276065
276127
  const { command, args } = await getPackageManagerExecutable();
276066
- await executeCommand(command, [...args, "hardhat", "test"]);
276128
+ await executeCommand(command, [...args, "hardhat", "test", ...hardhatOptions]);
276067
276129
  });
276068
- return test;
276069
276130
  }
276070
276131
 
276071
276132
  // src/commands/smart-contract-set/subgraph/build.ts
@@ -276447,4 +276508,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
276447
276508
  cancel2(reason);
276448
276509
  });
276449
276510
 
276450
- //# debugId=E5759C286016F3E064756E2164756E21
276511
+ //# debugId=CD7D095DE3972CFA64756E2164756E21