@settlemint/sdk-cli 0.7.1-pr6ece458 → 0.7.1-prdec9f80
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 +50 -91
- package/dist/cli.js.map +15 -16
- 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.
|
|
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.S4KcoFcWf7:/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.1-
|
|
200567
|
+
binaryVersion: "0.7.1-prdec9f80",
|
|
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.S4KcoFcWf7:/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.S4KcoFcWf7:/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.S4KcoFcWf7:/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.S4KcoFcWf7:/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) : [""];
|
|
@@ -270326,7 +270326,7 @@ async function codegenIpfs(env2) {
|
|
|
270326
270326
|
const clientTemplate = `import { createServerIpfsClient } from "@settlemint/sdk-ipfs";
|
|
270327
270327
|
|
|
270328
270328
|
export const { client } = createServerIpfsClient({
|
|
270329
|
-
instance: process.env.
|
|
270329
|
+
instance: process.env.SETTLEMINT_IPFS_API_ENDPOINT!,
|
|
270330
270330
|
accessToken: process.env.SETTLEMINT_ACCESS_TOKEN!,
|
|
270331
270331
|
});`;
|
|
270332
270332
|
await writeTemplate(clientTemplate, "/lib/settlemint", "ipfs.ts");
|
|
@@ -270344,7 +270344,7 @@ async function codegenMinio(env2) {
|
|
|
270344
270344
|
const clientTemplate = `import { createServerMinioClient } from "@settlemint/sdk-minio";
|
|
270345
270345
|
|
|
270346
270346
|
export const { client } = createServerMinioClient({
|
|
270347
|
-
instance: process.env.
|
|
270347
|
+
instance: process.env.SETTLEMINT_MINIO_ENDPOINT!,
|
|
270348
270348
|
accessToken: process.env.SETTLEMINT_ACCESS_TOKEN!,
|
|
270349
270349
|
accessKey: process.env.SETTLEMINT_MINIO_ACCESS_KEY!,
|
|
270350
270350
|
secretKey: process.env.SETTLEMINT_MINIO_SECRET_KEY!
|
|
@@ -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.1-
|
|
273262
|
+
version: "0.7.1-prdec9f80",
|
|
273266
273263
|
type: "module",
|
|
273267
273264
|
private: false,
|
|
273268
273265
|
license: "FSL-1.1-MIT",
|
|
@@ -273313,8 +273310,8 @@ var package_default = {
|
|
|
273313
273310
|
"@inquirer/input": "4.1.1",
|
|
273314
273311
|
"@inquirer/password": "4.0.4",
|
|
273315
273312
|
"@inquirer/select": "4.0.4",
|
|
273316
|
-
"@settlemint/sdk-js": "0.7.1-
|
|
273317
|
-
"@settlemint/sdk-utils": "0.7.1-
|
|
273313
|
+
"@settlemint/sdk-js": "0.7.1-prdec9f80",
|
|
273314
|
+
"@settlemint/sdk-utils": "0.7.1-prdec9f80",
|
|
273318
273315
|
"get-tsconfig": "4.8.1",
|
|
273319
273316
|
giget: "1.2.3"
|
|
273320
273317
|
},
|
|
@@ -274373,26 +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
|
-
env: env2,
|
|
274379
|
-
instance,
|
|
274380
|
-
prefer,
|
|
274381
|
-
strict
|
|
274382
|
-
}) => {
|
|
274383
|
-
const applicationAccessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
|
274384
|
-
const personalAccessToken = (await getInstanceCredentials(instance))?.personalAccessToken;
|
|
274385
|
-
const preferredToken = prefer === "application" ? applicationAccessToken : personalAccessToken;
|
|
274386
|
-
const fallbackToken = prefer === "application" ? personalAccessToken : applicationAccessToken;
|
|
274387
|
-
if (preferredToken) {
|
|
274388
|
-
return preferredToken;
|
|
274389
|
-
}
|
|
274390
|
-
if (!strict && fallbackToken) {
|
|
274391
|
-
return fallbackToken;
|
|
274392
|
-
}
|
|
274393
|
-
return prefer === "personal" ? missingPersonalAccessTokenError() : missingAccessTokenError(!!personalAccessToken);
|
|
274394
|
-
};
|
|
274395
|
-
|
|
274396
274373
|
// src/utils/sanitize-command-name.ts
|
|
274397
274374
|
function sanitizeCommandName(name2) {
|
|
274398
274375
|
return name2.split(" ").join("-").toLowerCase();
|
|
@@ -274414,12 +274391,10 @@ ${createExamples(examples)}`).argument("<name>", `The ${type4} name`).option("-a
|
|
|
274414
274391
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
274415
274392
|
const env2 = await loadEnv2(false, !!prod);
|
|
274416
274393
|
const instance = await instancePrompt(env2, autoAccept);
|
|
274417
|
-
const accessToken = await
|
|
274418
|
-
|
|
274419
|
-
|
|
274420
|
-
|
|
274421
|
-
strict: true
|
|
274422
|
-
});
|
|
274394
|
+
const accessToken = usePersonalAccessToken ? (await getInstanceCredentials(instance))?.personalAccessToken : env2.SETTLEMINT_ACCESS_TOKEN;
|
|
274395
|
+
if (!accessToken) {
|
|
274396
|
+
return missingAccessTokenError();
|
|
274397
|
+
}
|
|
274423
274398
|
const settlemint = createSettleMintClient({
|
|
274424
274399
|
accessToken,
|
|
274425
274400
|
instance
|
|
@@ -275411,12 +275386,10 @@ ${createExamples([
|
|
|
275411
275386
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
275412
275387
|
const env2 = await loadEnv2(false, !!prod);
|
|
275413
275388
|
const instance = await instancePrompt(env2, autoAccept);
|
|
275414
|
-
const accessToken = await
|
|
275415
|
-
|
|
275416
|
-
|
|
275417
|
-
|
|
275418
|
-
strict: true
|
|
275419
|
-
});
|
|
275389
|
+
const accessToken = usePersonalAccessToken ? (await getInstanceCredentials(instance))?.personalAccessToken : env2.SETTLEMINT_ACCESS_TOKEN;
|
|
275390
|
+
if (!accessToken) {
|
|
275391
|
+
return missingAccessTokenError();
|
|
275392
|
+
}
|
|
275420
275393
|
const settlemint = createSettleMintClient({
|
|
275421
275394
|
accessToken,
|
|
275422
275395
|
instance
|
|
@@ -275511,12 +275484,10 @@ ${createExamples([
|
|
|
275511
275484
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
275512
275485
|
const env2 = await loadEnv2(false, !!prod);
|
|
275513
275486
|
const instance = await instancePrompt(env2, autoAccept);
|
|
275514
|
-
const accessToken = await
|
|
275515
|
-
|
|
275516
|
-
|
|
275517
|
-
|
|
275518
|
-
strict: true
|
|
275519
|
-
});
|
|
275487
|
+
const accessToken = usePersonalAccessToken ? (await getInstanceCredentials(instance))?.personalAccessToken : env2.SETTLEMINT_ACCESS_TOKEN;
|
|
275488
|
+
if (!accessToken) {
|
|
275489
|
+
return missingAccessTokenError();
|
|
275490
|
+
}
|
|
275520
275491
|
const settlemint = createSettleMintClient({
|
|
275521
275492
|
accessToken,
|
|
275522
275493
|
instance
|
|
@@ -275703,13 +275674,11 @@ function customDeploymentsUpdateCommand() {
|
|
|
275703
275674
|
if (!customDeploymentId) {
|
|
275704
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");
|
|
275705
275676
|
}
|
|
275677
|
+
const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
|
275678
|
+
if (!accessToken) {
|
|
275679
|
+
return missingAccessTokenError();
|
|
275680
|
+
}
|
|
275706
275681
|
const instance = await instancePrompt(env2, true);
|
|
275707
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
|
275708
|
-
env: env2,
|
|
275709
|
-
instance,
|
|
275710
|
-
prefer: "application",
|
|
275711
|
-
strict: true
|
|
275712
|
-
});
|
|
275713
275682
|
const settlemint = createSettleMintClient({
|
|
275714
275683
|
accessToken,
|
|
275715
275684
|
instance
|
|
@@ -276126,13 +276095,11 @@ function hardhatDeployRemoteCommand() {
|
|
|
276126
276095
|
}) => {
|
|
276127
276096
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
276128
276097
|
const env2 = await loadEnv(false, !!prod);
|
|
276098
|
+
const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
|
276099
|
+
if (!accessToken) {
|
|
276100
|
+
return missingAccessTokenError();
|
|
276101
|
+
}
|
|
276129
276102
|
const instance = await instancePrompt(env2, true);
|
|
276130
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
|
276131
|
-
env: env2,
|
|
276132
|
-
instance,
|
|
276133
|
-
prefer: "application",
|
|
276134
|
-
strict: false
|
|
276135
|
-
});
|
|
276136
276103
|
const settlemint = createSettleMintClient({
|
|
276137
276104
|
accessToken,
|
|
276138
276105
|
instance
|
|
@@ -276229,13 +276196,11 @@ function hardhatScriptRemoteCommand() {
|
|
|
276229
276196
|
cmd2.action(async ({ script, prod, blockchainNodeId, acceptDefaults, compile }) => {
|
|
276230
276197
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
276231
276198
|
const env2 = await loadEnv(false, !!prod);
|
|
276199
|
+
const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
|
276200
|
+
if (!accessToken) {
|
|
276201
|
+
return missingAccessTokenError();
|
|
276202
|
+
}
|
|
276232
276203
|
const instance = await instancePrompt(env2, true);
|
|
276233
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
|
276234
|
-
env: env2,
|
|
276235
|
-
instance,
|
|
276236
|
-
prefer: "application",
|
|
276237
|
-
strict: false
|
|
276238
|
-
});
|
|
276239
276204
|
const settlemint = createSettleMintClient({
|
|
276240
276205
|
accessToken,
|
|
276241
276206
|
instance
|
|
@@ -276477,13 +276442,11 @@ function subgraphBuildCommand() {
|
|
|
276477
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 }) => {
|
|
276478
276443
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
276479
276444
|
const env2 = await loadEnv(false, !!prod);
|
|
276445
|
+
const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
|
276446
|
+
if (!accessToken) {
|
|
276447
|
+
return missingAccessTokenError();
|
|
276448
|
+
}
|
|
276480
276449
|
const instance = await instancePrompt(env2, true);
|
|
276481
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
|
276482
|
-
env: env2,
|
|
276483
|
-
instance,
|
|
276484
|
-
prefer: "application",
|
|
276485
|
-
strict: true
|
|
276486
|
-
});
|
|
276487
276450
|
await subgraphSetup({
|
|
276488
276451
|
env: env2,
|
|
276489
276452
|
instance,
|
|
@@ -276504,13 +276467,11 @@ function subgraphCodegenCommand() {
|
|
|
276504
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 }) => {
|
|
276505
276468
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
276506
276469
|
const env2 = await loadEnv(false, !!prod);
|
|
276470
|
+
const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
|
276471
|
+
if (!accessToken) {
|
|
276472
|
+
return missingAccessTokenError();
|
|
276473
|
+
}
|
|
276507
276474
|
const instance = await instancePrompt(env2, true);
|
|
276508
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
|
276509
|
-
env: env2,
|
|
276510
|
-
instance,
|
|
276511
|
-
prefer: "application",
|
|
276512
|
-
strict: true
|
|
276513
|
-
});
|
|
276514
276475
|
await subgraphSetup({
|
|
276515
276476
|
env: env2,
|
|
276516
276477
|
instance,
|
|
@@ -276560,13 +276521,11 @@ function subgraphDeployCommand() {
|
|
|
276560
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 }) => {
|
|
276561
276522
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
276562
276523
|
const env2 = await loadEnv(false, !!prod);
|
|
276524
|
+
const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
|
276525
|
+
if (!accessToken) {
|
|
276526
|
+
return missingAccessTokenError();
|
|
276527
|
+
}
|
|
276563
276528
|
const instance = await instancePrompt(env2, true);
|
|
276564
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
|
276565
|
-
env: env2,
|
|
276566
|
-
instance,
|
|
276567
|
-
prefer: "application",
|
|
276568
|
-
strict: true
|
|
276569
|
-
});
|
|
276570
276529
|
const theGraphMiddleware = await subgraphSetup({
|
|
276571
276530
|
env: env2,
|
|
276572
276531
|
instance,
|
|
@@ -276658,4 +276617,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
|
|
|
276658
276617
|
cancel2(reason);
|
|
276659
276618
|
});
|
|
276660
276619
|
|
|
276661
|
-
//# debugId=
|
|
276620
|
+
//# debugId=BE3F765B1116F23864756E2164756E21
|