@settlemint/sdk-cli 0.7.0-prb15c329 → 0.7.0-prb7649fa
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 +56 -107
- package/dist/cli.js.map +14 -15
- package/package.json +7 -7
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.
|
|
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.qmqx4wZJTg:/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.7.0-
|
|
200567
|
+
binaryVersion: "0.7.0-prb7649fa",
|
|
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.
|
|
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.qmqx4wZJTg:/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.
|
|
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.qmqx4wZJTg:/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.
|
|
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.qmqx4wZJTg:/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.
|
|
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.qmqx4wZJTg:/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) : [""];
|
|
@@ -270460,11 +270460,8 @@ async function writeEnvSpinner(prod, env2) {
|
|
|
270460
270460
|
}
|
|
270461
270461
|
|
|
270462
270462
|
// src/error/missing-config-error.ts
|
|
270463
|
-
function missingAccessTokenError(
|
|
270464
|
-
|
|
270465
|
-
return cancel2("No access token found, please run `settlemint connect` to connect to your instance.");
|
|
270466
|
-
}
|
|
270467
|
-
return cancel2("No personal access token found, please run `settlemint login`, then run `settlemint connect` to connect using an application access token.");
|
|
270463
|
+
function missingAccessTokenError() {
|
|
270464
|
+
return cancel2("No access token found, please run `settlemint connect` to connect to your instance");
|
|
270468
270465
|
}
|
|
270469
270466
|
function missingPersonalAccessTokenError() {
|
|
270470
270467
|
return cancel2("No personal access token found for instance, please run `settlemint login` to login to your instance");
|
|
@@ -273262,7 +273259,7 @@ function connectCommand() {
|
|
|
273262
273259
|
var package_default = {
|
|
273263
273260
|
name: "@settlemint/sdk-cli",
|
|
273264
273261
|
description: "SettleMint SDK, integrate SettleMint into your application with ease.",
|
|
273265
|
-
version: "0.7.0-
|
|
273262
|
+
version: "0.7.0-prb7649fa",
|
|
273266
273263
|
type: "module",
|
|
273267
273264
|
private: false,
|
|
273268
273265
|
license: "FSL-1.1-MIT",
|
|
@@ -273309,12 +273306,12 @@ var package_default = {
|
|
|
273309
273306
|
slugify: "1.6.6",
|
|
273310
273307
|
yoctocolors: "2.1.1",
|
|
273311
273308
|
"@commander-js/extra-typings": "12.1.0",
|
|
273312
|
-
"@inquirer/confirm": "5.1.
|
|
273313
|
-
"@inquirer/input": "4.1.
|
|
273314
|
-
"@inquirer/password": "4.0.
|
|
273315
|
-
"@inquirer/select": "4.0.
|
|
273316
|
-
"@settlemint/sdk-js": "0.7.0-
|
|
273317
|
-
"@settlemint/sdk-utils": "0.7.0-
|
|
273309
|
+
"@inquirer/confirm": "5.1.1",
|
|
273310
|
+
"@inquirer/input": "4.1.1",
|
|
273311
|
+
"@inquirer/password": "4.0.4",
|
|
273312
|
+
"@inquirer/select": "4.0.4",
|
|
273313
|
+
"@settlemint/sdk-js": "0.7.0-prb7649fa",
|
|
273314
|
+
"@settlemint/sdk-utils": "0.7.0-prb7649fa",
|
|
273318
273315
|
"get-tsconfig": "4.8.1",
|
|
273319
273316
|
giget: "1.2.3"
|
|
273320
273317
|
},
|
|
@@ -274373,28 +274370,6 @@ function getActionLabel(action) {
|
|
|
274373
274370
|
return "deployed";
|
|
274374
274371
|
}
|
|
274375
274372
|
|
|
274376
|
-
// src/utils/get-app-or-personal-token.ts
|
|
274377
|
-
var getApplicationOrPersonalAccessToken = async ({
|
|
274378
|
-
validateEnv,
|
|
274379
|
-
prod,
|
|
274380
|
-
instance,
|
|
274381
|
-
prefer,
|
|
274382
|
-
strict
|
|
274383
|
-
}) => {
|
|
274384
|
-
const env2 = await loadEnv(validateEnv, prod);
|
|
274385
|
-
const applicationAccessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
|
274386
|
-
const personalAccessToken = (await getInstanceCredentials(instance))?.personalAccessToken;
|
|
274387
|
-
const preference = prefer === "application" ? applicationAccessToken : personalAccessToken;
|
|
274388
|
-
const fallback = prefer === "application" ? personalAccessToken : applicationAccessToken;
|
|
274389
|
-
if (preference) {
|
|
274390
|
-
return preference;
|
|
274391
|
-
}
|
|
274392
|
-
if (!strict && fallback) {
|
|
274393
|
-
return fallback;
|
|
274394
|
-
}
|
|
274395
|
-
return preference === "personal" ? missingPersonalAccessTokenError() : missingAccessTokenError(!!personalAccessToken);
|
|
274396
|
-
};
|
|
274397
|
-
|
|
274398
274373
|
// src/utils/sanitize-command-name.ts
|
|
274399
274374
|
function sanitizeCommandName(name2) {
|
|
274400
274375
|
return name2.split(" ").join("-").toLowerCase();
|
|
@@ -274415,14 +274390,11 @@ ${createExamples(examples)}`).argument("<name>", `The ${type4} name`).option("-a
|
|
|
274415
274390
|
intro(`Creating ${type4} in the SettleMint platform`);
|
|
274416
274391
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
274417
274392
|
const env2 = await loadEnv2(false, !!prod);
|
|
274418
|
-
const instance =
|
|
274419
|
-
const accessToken = await
|
|
274420
|
-
|
|
274421
|
-
|
|
274422
|
-
|
|
274423
|
-
prefer: usePersonalAccessToken ? "personal" : "application",
|
|
274424
|
-
strict: true
|
|
274425
|
-
});
|
|
274393
|
+
const instance = await instancePrompt(env2, autoAccept);
|
|
274394
|
+
const accessToken = usePersonalAccessToken ? (await getInstanceCredentials(instance))?.personalAccessToken : env2.SETTLEMINT_ACCESS_TOKEN;
|
|
274395
|
+
if (!accessToken) {
|
|
274396
|
+
return missingAccessTokenError();
|
|
274397
|
+
}
|
|
274426
274398
|
const settlemint = createSettleMintClient({
|
|
274427
274399
|
accessToken,
|
|
274428
274400
|
instance
|
|
@@ -274862,11 +274834,12 @@ function blockchainNodeBesuCreateCommand() {
|
|
|
274862
274834
|
...defaultArgs
|
|
274863
274835
|
}) => {
|
|
274864
274836
|
return baseAction(defaultArgs, async (settlemint, env2) => {
|
|
274837
|
+
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
274865
274838
|
const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
|
|
274866
274839
|
if (!application) {
|
|
274867
274840
|
cancel2("No application found. Please specify an application or run `settlemint connect` to continue.");
|
|
274868
274841
|
}
|
|
274869
|
-
let networkId = blockchainNetworkId ?? (
|
|
274842
|
+
let networkId = blockchainNetworkId ?? (autoAccept ? env2.SETTLEMINT_BLOCKCHAIN_NETWORK : undefined);
|
|
274870
274843
|
if (!networkId) {
|
|
274871
274844
|
const networks = await settlemint.blockchainNetwork.list(application);
|
|
274872
274845
|
const network = await blockchainNetworkPrompt(env2, networks, acceptDefaults ?? false);
|
|
@@ -275413,13 +275386,10 @@ ${createExamples([
|
|
|
275413
275386
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
275414
275387
|
const env2 = await loadEnv2(false, !!prod);
|
|
275415
275388
|
const instance = await instancePrompt(env2, autoAccept);
|
|
275416
|
-
const accessToken = await
|
|
275417
|
-
|
|
275418
|
-
|
|
275419
|
-
|
|
275420
|
-
prefer: usePersonalAccessToken ? "personal" : "application",
|
|
275421
|
-
strict: true
|
|
275422
|
-
});
|
|
275389
|
+
const accessToken = usePersonalAccessToken ? (await getInstanceCredentials(instance))?.personalAccessToken : env2.SETTLEMINT_ACCESS_TOKEN;
|
|
275390
|
+
if (!accessToken) {
|
|
275391
|
+
return missingAccessTokenError();
|
|
275392
|
+
}
|
|
275423
275393
|
const settlemint = createSettleMintClient({
|
|
275424
275394
|
accessToken,
|
|
275425
275395
|
instance
|
|
@@ -275514,13 +275484,10 @@ ${createExamples([
|
|
|
275514
275484
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
275515
275485
|
const env2 = await loadEnv2(false, !!prod);
|
|
275516
275486
|
const instance = await instancePrompt(env2, autoAccept);
|
|
275517
|
-
const accessToken = await
|
|
275518
|
-
|
|
275519
|
-
|
|
275520
|
-
|
|
275521
|
-
prefer: usePersonalAccessToken ? "personal" : "application",
|
|
275522
|
-
strict: true
|
|
275523
|
-
});
|
|
275487
|
+
const accessToken = usePersonalAccessToken ? (await getInstanceCredentials(instance))?.personalAccessToken : env2.SETTLEMINT_ACCESS_TOKEN;
|
|
275488
|
+
if (!accessToken) {
|
|
275489
|
+
return missingAccessTokenError();
|
|
275490
|
+
}
|
|
275524
275491
|
const settlemint = createSettleMintClient({
|
|
275525
275492
|
accessToken,
|
|
275526
275493
|
instance
|
|
@@ -275707,14 +275674,11 @@ function customDeploymentsUpdateCommand() {
|
|
|
275707
275674
|
if (!customDeploymentId) {
|
|
275708
275675
|
throw new Error("No custom deployment ID specified. Please provide it either via the --id flag or by setting the SETTLEMINT_CUSTOM_DEPLOYMENT environment variable");
|
|
275709
275676
|
}
|
|
275677
|
+
const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
|
275678
|
+
if (!accessToken) {
|
|
275679
|
+
return missingAccessTokenError();
|
|
275680
|
+
}
|
|
275710
275681
|
const instance = await instancePrompt(env2, true);
|
|
275711
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
|
275712
|
-
validateEnv: false,
|
|
275713
|
-
prod: !!prod,
|
|
275714
|
-
instance,
|
|
275715
|
-
prefer: "application",
|
|
275716
|
-
strict: true
|
|
275717
|
-
});
|
|
275718
275682
|
const settlemint = createSettleMintClient({
|
|
275719
275683
|
accessToken,
|
|
275720
275684
|
instance
|
|
@@ -276131,19 +276095,16 @@ function hardhatDeployRemoteCommand() {
|
|
|
276131
276095
|
}) => {
|
|
276132
276096
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
276133
276097
|
const env2 = await loadEnv(false, !!prod);
|
|
276098
|
+
const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
|
276099
|
+
if (!accessToken) {
|
|
276100
|
+
return missingAccessTokenError();
|
|
276101
|
+
}
|
|
276134
276102
|
const instance = await instancePrompt(env2, true);
|
|
276135
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
|
276136
|
-
validateEnv: false,
|
|
276137
|
-
prod: !!prod,
|
|
276138
|
-
instance,
|
|
276139
|
-
prefer: "application",
|
|
276140
|
-
strict: false
|
|
276141
|
-
});
|
|
276142
276103
|
const settlemint = createSettleMintClient({
|
|
276143
276104
|
accessToken,
|
|
276144
276105
|
instance
|
|
276145
276106
|
});
|
|
276146
|
-
const nodeId = autoAccept ? env2.SETTLEMINT_BLOCKCHAIN_NODE :
|
|
276107
|
+
const nodeId = blockchainNodeId ?? (autoAccept ? env2.SETTLEMINT_BLOCKCHAIN_NODE : undefined);
|
|
276147
276108
|
let node = undefined;
|
|
276148
276109
|
if (!nodeId) {
|
|
276149
276110
|
const nodes = await settlemint.blockchainNode.list(env2.SETTLEMINT_APPLICATION);
|
|
@@ -276235,14 +276196,11 @@ function hardhatScriptRemoteCommand() {
|
|
|
276235
276196
|
cmd2.action(async ({ script, prod, blockchainNodeId, acceptDefaults, compile }) => {
|
|
276236
276197
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
276237
276198
|
const env2 = await loadEnv(false, !!prod);
|
|
276199
|
+
const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
|
276200
|
+
if (!accessToken) {
|
|
276201
|
+
return missingAccessTokenError();
|
|
276202
|
+
}
|
|
276238
276203
|
const instance = await instancePrompt(env2, true);
|
|
276239
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
|
276240
|
-
validateEnv: false,
|
|
276241
|
-
prod: !!prod,
|
|
276242
|
-
instance,
|
|
276243
|
-
prefer: "application",
|
|
276244
|
-
strict: false
|
|
276245
|
-
});
|
|
276246
276204
|
const settlemint = createSettleMintClient({
|
|
276247
276205
|
accessToken,
|
|
276248
276206
|
instance
|
|
@@ -276484,14 +276442,11 @@ function subgraphBuildCommand() {
|
|
|
276484
276442
|
return new Command2("build").description("Build the subgraph").option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").action(async ({ acceptDefaults, prod }) => {
|
|
276485
276443
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
276486
276444
|
const env2 = await loadEnv(false, !!prod);
|
|
276445
|
+
const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
|
276446
|
+
if (!accessToken) {
|
|
276447
|
+
return missingAccessTokenError();
|
|
276448
|
+
}
|
|
276487
276449
|
const instance = await instancePrompt(env2, true);
|
|
276488
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
|
276489
|
-
validateEnv: false,
|
|
276490
|
-
prod: !!prod,
|
|
276491
|
-
instance,
|
|
276492
|
-
prefer: "application",
|
|
276493
|
-
strict: true
|
|
276494
|
-
});
|
|
276495
276450
|
await subgraphSetup({
|
|
276496
276451
|
env: env2,
|
|
276497
276452
|
instance,
|
|
@@ -276512,14 +276467,11 @@ function subgraphCodegenCommand() {
|
|
|
276512
276467
|
return new Command2("codegen").option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").description("Codegen the subgraph types").action(async ({ acceptDefaults, prod }) => {
|
|
276513
276468
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
276514
276469
|
const env2 = await loadEnv(false, !!prod);
|
|
276470
|
+
const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
|
276471
|
+
if (!accessToken) {
|
|
276472
|
+
return missingAccessTokenError();
|
|
276473
|
+
}
|
|
276515
276474
|
const instance = await instancePrompt(env2, true);
|
|
276516
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
|
276517
|
-
validateEnv: false,
|
|
276518
|
-
prod: !!prod,
|
|
276519
|
-
instance,
|
|
276520
|
-
prefer: "application",
|
|
276521
|
-
strict: true
|
|
276522
|
-
});
|
|
276523
276475
|
await subgraphSetup({
|
|
276524
276476
|
env: env2,
|
|
276525
276477
|
instance,
|
|
@@ -276569,14 +276521,11 @@ function subgraphDeployCommand() {
|
|
|
276569
276521
|
return new Command2("deploy").description("Deploy the subgraph").option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").argument("[subgraphName]", "The name of the subgraph to deploy (defaults to value in .env if not provided)").action(async (subgraphName, { prod, acceptDefaults }) => {
|
|
276570
276522
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
276571
276523
|
const env2 = await loadEnv(false, !!prod);
|
|
276524
|
+
const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
|
276525
|
+
if (!accessToken) {
|
|
276526
|
+
return missingAccessTokenError();
|
|
276527
|
+
}
|
|
276572
276528
|
const instance = await instancePrompt(env2, true);
|
|
276573
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
|
276574
|
-
validateEnv: false,
|
|
276575
|
-
prod: !!prod,
|
|
276576
|
-
instance,
|
|
276577
|
-
prefer: "application",
|
|
276578
|
-
strict: true
|
|
276579
|
-
});
|
|
276580
276529
|
const theGraphMiddleware = await subgraphSetup({
|
|
276581
276530
|
env: env2,
|
|
276582
276531
|
instance,
|
|
@@ -276668,4 +276617,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
|
|
|
276668
276617
|
cancel2(reason);
|
|
276669
276618
|
});
|
|
276670
276619
|
|
|
276671
|
-
//# debugId=
|
|
276620
|
+
//# debugId=F688F4A4CEF7E70264756E2164756E21
|