@settlemint/sdk-cli 0.6.33 → 0.6.34-main6e515b1
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 +25 -112
- package/dist/cli.js.map +21 -24
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -272073,6 +272073,7 @@ var UrlOrPathSchema = z4.union([UrlSchema, UrlPathSchema]);
|
|
|
272073
272073
|
var DotEnvSchema = z4.object({
|
|
272074
272074
|
SETTLEMINT_INSTANCE: UrlSchema,
|
|
272075
272075
|
SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema,
|
|
272076
|
+
SETTLEMINT_PERSONAL_ACCESS_TOKEN: PersonalAccessTokenSchema.optional(),
|
|
272076
272077
|
SETTLEMINT_WORKSPACE: IdSchema,
|
|
272077
272078
|
SETTLEMINT_APPLICATION: IdSchema,
|
|
272078
272079
|
SETTLEMINT_BLOCKCHAIN_NETWORK: IdSchema.optional(),
|
|
@@ -272096,17 +272097,12 @@ var DotEnvSchema = z4.object({
|
|
|
272096
272097
|
SETTLEMINT_IPFS_API_ENDPOINT: UrlSchema.optional(),
|
|
272097
272098
|
SETTLEMINT_IPFS_PINNING_ENDPOINT: UrlSchema.optional(),
|
|
272098
272099
|
SETTLEMINT_IPFS_GATEWAY_ENDPOINT: UrlSchema.optional(),
|
|
272099
|
-
SETTLEMINT_AUTH_SECRET: z4.string(),
|
|
272100
272100
|
SETTLEMINT_CUSTOM_DEPLOYMENT: IdSchema.optional(),
|
|
272101
272101
|
SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT: UrlSchema.optional(),
|
|
272102
272102
|
SETTLEMINT_BLOCKSCOUT: IdSchema.optional(),
|
|
272103
272103
|
SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema.optional(),
|
|
272104
272104
|
SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema.optional(),
|
|
272105
272105
|
SETTLEMINT_NEW_PROJECT_NAME: z4.string().optional(),
|
|
272106
|
-
NEXTAUTH_URL: UrlSchema,
|
|
272107
|
-
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_REGISTRY: z4.literal("0x5e771e1417100000000000000000000000000001"),
|
|
272108
|
-
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_FACTORY: z4.literal("0x5e771e1417100000000000000000000000000002"),
|
|
272109
|
-
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_DEX_FACTORY: z4.literal("0x5e771e1417100000000000000000000000000003"),
|
|
272110
272106
|
SETTLEMINT_SMART_CONTRACT_SET: IdSchema.optional(),
|
|
272111
272107
|
SETTLEMINT_SMART_CONTRACT_SET_ADDRESS: z4.string().optional(),
|
|
272112
272108
|
SETTLEMINT_SMART_CONTRACT_SET_DEPLOYMENT_ID: z4.string().optional()
|
|
@@ -272539,7 +272535,6 @@ async function writeEnvSpinner(prod, env2) {
|
|
|
272539
272535
|
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: env2.SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT,
|
|
272540
272536
|
SETTLEMINT_PORTAL_REST_ENDPOINT: env2.SETTLEMINT_PORTAL_REST_ENDPOINT,
|
|
272541
272537
|
SETTLEMINT_HD_PRIVATE_KEY: env2.SETTLEMINT_HD_PRIVATE_KEY,
|
|
272542
|
-
NEXTAUTH_URL: env2.NEXTAUTH_URL,
|
|
272543
272538
|
SETTLEMINT_MINIO: env2.SETTLEMINT_MINIO,
|
|
272544
272539
|
SETTLEMINT_MINIO_ENDPOINT: env2.SETTLEMINT_MINIO_ENDPOINT,
|
|
272545
272540
|
SETTLEMINT_MINIO_ACCESS_KEY: env2.SETTLEMINT_MINIO_ACCESS_KEY,
|
|
@@ -272547,9 +272542,6 @@ async function writeEnvSpinner(prod, env2) {
|
|
|
272547
272542
|
SETTLEMINT_IPFS_API_ENDPOINT: env2.SETTLEMINT_IPFS_API_ENDPOINT,
|
|
272548
272543
|
SETTLEMINT_IPFS_PINNING_ENDPOINT: env2.SETTLEMINT_IPFS_PINNING_ENDPOINT,
|
|
272549
272544
|
SETTLEMINT_IPFS_GATEWAY_ENDPOINT: env2.SETTLEMINT_IPFS_GATEWAY_ENDPOINT,
|
|
272550
|
-
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_REGISTRY: env2.SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_REGISTRY,
|
|
272551
|
-
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_FACTORY: env2.SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_FACTORY,
|
|
272552
|
-
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_DEX_FACTORY: env2.SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_DEX_FACTORY,
|
|
272553
272545
|
SETTLEMINT_CUSTOM_DEPLOYMENT: env2.SETTLEMINT_CUSTOM_DEPLOYMENT,
|
|
272554
272546
|
SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT: env2.SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT,
|
|
272555
272547
|
SETTLEMINT_BLOCKSCOUT: env2.SETTLEMINT_BLOCKSCOUT,
|
|
@@ -272562,20 +272554,12 @@ async function writeEnvSpinner(prod, env2) {
|
|
|
272562
272554
|
await writeEnv(prod, {
|
|
272563
272555
|
SETTLEMINT_ACCESS_TOKEN: env2.SETTLEMINT_ACCESS_TOKEN,
|
|
272564
272556
|
SETTLEMINT_HASURA_ADMIN_SECRET: env2.SETTLEMINT_HASURA_ADMIN_SECRET,
|
|
272565
|
-
SETTLEMINT_AUTH_SECRET: env2.SETTLEMINT_AUTH_SECRET,
|
|
272566
272557
|
SETTLEMINT_MINIO_SECRET_KEY: env2.SETTLEMINT_MINIO_SECRET_KEY
|
|
272567
272558
|
}, true);
|
|
272568
272559
|
}
|
|
272569
272560
|
});
|
|
272570
272561
|
}
|
|
272571
272562
|
|
|
272572
|
-
// src/constants/predeployed-contracts.ts
|
|
272573
|
-
var PRE_DEPLOYED_CONTRACTS = {
|
|
272574
|
-
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_REGISTRY: "0x5e771e1417100000000000000000000000000001",
|
|
272575
|
-
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_FACTORY: "0x5e771e1417100000000000000000000000000002",
|
|
272576
|
-
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_DEX_FACTORY: "0x5e771e1417100000000000000000000000000003"
|
|
272577
|
-
};
|
|
272578
|
-
|
|
272579
272563
|
// src/error/missing-config-error.ts
|
|
272580
272564
|
function missingAccessTokenError() {
|
|
272581
272565
|
return cancel2("No access token found, please run `settlemint connect` to connect to your instance");
|
|
@@ -272750,6 +272734,7 @@ var UrlOrPathSchema2 = z4.union([UrlSchema2, UrlPathSchema2]);
|
|
|
272750
272734
|
var DotEnvSchema2 = z4.object({
|
|
272751
272735
|
SETTLEMINT_INSTANCE: UrlSchema2,
|
|
272752
272736
|
SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema2,
|
|
272737
|
+
SETTLEMINT_PERSONAL_ACCESS_TOKEN: PersonalAccessTokenSchema2.optional(),
|
|
272753
272738
|
SETTLEMINT_WORKSPACE: IdSchema2,
|
|
272754
272739
|
SETTLEMINT_APPLICATION: IdSchema2,
|
|
272755
272740
|
SETTLEMINT_BLOCKCHAIN_NETWORK: IdSchema2.optional(),
|
|
@@ -272773,17 +272758,12 @@ var DotEnvSchema2 = z4.object({
|
|
|
272773
272758
|
SETTLEMINT_IPFS_API_ENDPOINT: UrlSchema2.optional(),
|
|
272774
272759
|
SETTLEMINT_IPFS_PINNING_ENDPOINT: UrlSchema2.optional(),
|
|
272775
272760
|
SETTLEMINT_IPFS_GATEWAY_ENDPOINT: UrlSchema2.optional(),
|
|
272776
|
-
SETTLEMINT_AUTH_SECRET: z4.string(),
|
|
272777
272761
|
SETTLEMINT_CUSTOM_DEPLOYMENT: IdSchema2.optional(),
|
|
272778
272762
|
SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT: UrlSchema2.optional(),
|
|
272779
272763
|
SETTLEMINT_BLOCKSCOUT: IdSchema2.optional(),
|
|
272780
272764
|
SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema2.optional(),
|
|
272781
272765
|
SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema2.optional(),
|
|
272782
272766
|
SETTLEMINT_NEW_PROJECT_NAME: z4.string().optional(),
|
|
272783
|
-
NEXTAUTH_URL: UrlSchema2,
|
|
272784
|
-
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_REGISTRY: z4.literal("0x5e771e1417100000000000000000000000000001"),
|
|
272785
|
-
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_FACTORY: z4.literal("0x5e771e1417100000000000000000000000000002"),
|
|
272786
|
-
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_DEX_FACTORY: z4.literal("0x5e771e1417100000000000000000000000000003"),
|
|
272787
272767
|
SETTLEMINT_SMART_CONTRACT_SET: IdSchema2.optional(),
|
|
272788
272768
|
SETTLEMINT_SMART_CONTRACT_SET_ADDRESS: z4.string().optional(),
|
|
272789
272769
|
SETTLEMINT_SMART_CONTRACT_SET_DEPLOYMENT_ID: z4.string().optional()
|
|
@@ -275978,73 +275958,13 @@ async function applicationPrompt(env2, applications, accept) {
|
|
|
275978
275958
|
return application;
|
|
275979
275959
|
}
|
|
275980
275960
|
|
|
275981
|
-
// src/commands/connect/auth-secret.prompt.ts
|
|
275982
|
-
import { randomBytes } from "node:crypto";
|
|
275983
|
-
async function authSecretPrompt(env2, accept) {
|
|
275984
|
-
const defaultAuthSecret = env2.SETTLEMINT_AUTH_SECRET;
|
|
275985
|
-
const defaultPossible = accept && defaultAuthSecret;
|
|
275986
|
-
if (defaultPossible) {
|
|
275987
|
-
return defaultAuthSecret;
|
|
275988
|
-
}
|
|
275989
|
-
if (defaultAuthSecret) {
|
|
275990
|
-
const keep = await esm_default2({
|
|
275991
|
-
message: "Do you want to use the existing auth secret?",
|
|
275992
|
-
default: true
|
|
275993
|
-
});
|
|
275994
|
-
if (keep) {
|
|
275995
|
-
return defaultAuthSecret;
|
|
275996
|
-
}
|
|
275997
|
-
}
|
|
275998
|
-
const authSecret = randomBytes(32).toString("hex");
|
|
275999
|
-
const random = await esm_default2({
|
|
276000
|
-
message: "Do you want to use a randomly generated auth secret?",
|
|
276001
|
-
default: true
|
|
276002
|
-
});
|
|
276003
|
-
if (random) {
|
|
276004
|
-
return authSecret;
|
|
276005
|
-
}
|
|
276006
|
-
return esm_default4({
|
|
276007
|
-
message: "What is the auth secret to encrypt your user sessions?",
|
|
276008
|
-
validate(value4) {
|
|
276009
|
-
try {
|
|
276010
|
-
validate2(z4.string(), value4);
|
|
276011
|
-
return true;
|
|
276012
|
-
} catch (error5) {
|
|
276013
|
-
return "Invalid access token";
|
|
276014
|
-
}
|
|
276015
|
-
}
|
|
276016
|
-
});
|
|
276017
|
-
}
|
|
276018
|
-
|
|
276019
|
-
// src/commands/connect/auth-url.prompt.ts
|
|
276020
|
-
async function authUrlPrompt(env2, accept, prod) {
|
|
276021
|
-
const defaultAuthUrl = env2.NEXTAUTH_URL ?? (prod ? undefined : "http://localhost:3000");
|
|
276022
|
-
const defaultPossible = accept && defaultAuthUrl;
|
|
276023
|
-
if (defaultPossible) {
|
|
276024
|
-
return defaultAuthUrl;
|
|
276025
|
-
}
|
|
276026
|
-
return esm_default3({
|
|
276027
|
-
message: prod ? "What is the production URL of your application?" : "What is the development URL of your application?",
|
|
276028
|
-
default: defaultAuthUrl,
|
|
276029
|
-
required: true,
|
|
276030
|
-
validate(value4) {
|
|
276031
|
-
try {
|
|
276032
|
-
validate2(UrlSchema2, value4);
|
|
276033
|
-
return true;
|
|
276034
|
-
} catch (error5) {
|
|
276035
|
-
return "Invalid URL";
|
|
276036
|
-
}
|
|
276037
|
-
}
|
|
276038
|
-
});
|
|
276039
|
-
}
|
|
276040
|
-
|
|
276041
275961
|
// src/commands/connect/blockchain-node.prompt.ts
|
|
276042
275962
|
async function blockchainNodePrompt(env2, nodes, accept) {
|
|
276043
275963
|
if (nodes.length === 0) {
|
|
276044
275964
|
return;
|
|
276045
275965
|
}
|
|
276046
275966
|
const defaultNode = nodes.find((node2) => node2.id === env2.SETTLEMINT_BLOCKCHAIN_NODE) ?? (nodes.length === 1 ? nodes[0] : undefined);
|
|
276047
|
-
const defaultPossible = accept
|
|
275967
|
+
const defaultPossible = accept;
|
|
276048
275968
|
if (defaultPossible) {
|
|
276049
275969
|
return defaultNode;
|
|
276050
275970
|
}
|
|
@@ -276072,7 +275992,7 @@ async function blockscoutPrompt(env2, insights, accept) {
|
|
|
276072
275992
|
return;
|
|
276073
275993
|
}
|
|
276074
275994
|
const defaultBlockscout = insights.find((insight) => insight.id === env2.SETTLEMINT_BLOCKSCOUT) ?? (insights.length === 1 ? insights[0] : undefined);
|
|
276075
|
-
const defaultPossible = accept
|
|
275995
|
+
const defaultPossible = accept;
|
|
276076
275996
|
if (defaultPossible) {
|
|
276077
275997
|
return defaultBlockscout;
|
|
276078
275998
|
}
|
|
@@ -276099,7 +276019,7 @@ async function customDeploymentPrompt(env2, customDeployments, accept) {
|
|
|
276099
276019
|
return;
|
|
276100
276020
|
}
|
|
276101
276021
|
const defaultCustomDeployment = customDeployments.find((customDeployment) => customDeployment.id === env2.SETTLEMINT_CUSTOM_DEPLOYMENT) ?? (customDeployments.length === 1 ? customDeployments[0] : undefined);
|
|
276102
|
-
const defaultPossible = accept
|
|
276022
|
+
const defaultPossible = accept;
|
|
276103
276023
|
if (defaultPossible) {
|
|
276104
276024
|
return defaultCustomDeployment;
|
|
276105
276025
|
}
|
|
@@ -276127,7 +276047,7 @@ async function hasuraPrompt(env2, integrations, accept) {
|
|
|
276127
276047
|
return;
|
|
276128
276048
|
}
|
|
276129
276049
|
const defaultIntegration = possible.find((integration) => integration.id === env2.SETTLEMINT_HASURA) ?? (possible.length === 1 ? possible[0] : undefined);
|
|
276130
|
-
const defaultPossible = accept
|
|
276050
|
+
const defaultPossible = accept;
|
|
276131
276051
|
if (defaultPossible) {
|
|
276132
276052
|
return defaultIntegration;
|
|
276133
276053
|
}
|
|
@@ -276155,7 +276075,7 @@ async function hdPrivateKeyPrompt(env2, privateKeys, accept) {
|
|
|
276155
276075
|
return;
|
|
276156
276076
|
}
|
|
276157
276077
|
const defaultPrivateKey = possible.find((privateKey2) => privateKey2.uniqueName === env2.SETTLEMINT_HD_PRIVATE_KEY) ?? (possible.length === 1 ? possible[0] : undefined);
|
|
276158
|
-
const defaultPossible = accept
|
|
276078
|
+
const defaultPossible = accept;
|
|
276159
276079
|
if (defaultPossible) {
|
|
276160
276080
|
return defaultPrivateKey;
|
|
276161
276081
|
}
|
|
@@ -276205,7 +276125,7 @@ async function ipfsPrompt(env2, storages, accept) {
|
|
|
276205
276125
|
return;
|
|
276206
276126
|
}
|
|
276207
276127
|
const defaultStorage = possible.find((storage) => storage.id === env2.SETTLEMINT_IPFS) ?? (possible.length === 1 ? possible[0] : undefined);
|
|
276208
|
-
const defaultPossible = accept
|
|
276128
|
+
const defaultPossible = accept;
|
|
276209
276129
|
if (defaultPossible) {
|
|
276210
276130
|
return defaultStorage;
|
|
276211
276131
|
}
|
|
@@ -276233,7 +276153,7 @@ async function minioPrompt(env2, storages, accept) {
|
|
|
276233
276153
|
return;
|
|
276234
276154
|
}
|
|
276235
276155
|
const defaultStorage = possible.find((storage) => storage.id === env2.SETTLEMINT_MINIO) ?? (possible.length === 1 ? possible[0] : undefined);
|
|
276236
|
-
const defaultPossible = accept
|
|
276156
|
+
const defaultPossible = accept;
|
|
276237
276157
|
if (defaultPossible) {
|
|
276238
276158
|
return defaultStorage;
|
|
276239
276159
|
}
|
|
@@ -276261,7 +276181,7 @@ async function portalPrompt(env2, middlewares, accept) {
|
|
|
276261
276181
|
return;
|
|
276262
276182
|
}
|
|
276263
276183
|
const defaultMiddleware = possible.find((middleware2) => middleware2.id === env2.SETTLEMINT_PORTAL) ?? (possible.length === 1 ? possible[0] : undefined);
|
|
276264
|
-
const defaultPossible = accept
|
|
276184
|
+
const defaultPossible = accept;
|
|
276265
276185
|
if (defaultPossible) {
|
|
276266
276186
|
return defaultMiddleware;
|
|
276267
276187
|
}
|
|
@@ -276328,7 +276248,7 @@ async function theGraphPrompt(env2, middlewares, accept) {
|
|
|
276328
276248
|
return;
|
|
276329
276249
|
}
|
|
276330
276250
|
const defaultMiddleware = possible.find((middleware2) => middleware2.id === env2.SETTLEMINT_THEGRAPH) ?? (possible.length === 1 ? possible[0] : undefined);
|
|
276331
|
-
const defaultPossible = accept
|
|
276251
|
+
const defaultPossible = accept;
|
|
276332
276252
|
if (defaultPossible) {
|
|
276333
276253
|
return defaultMiddleware;
|
|
276334
276254
|
}
|
|
@@ -276403,10 +276323,7 @@ function connectCommand() {
|
|
|
276403
276323
|
const hdPrivateKey = await hdPrivateKeyPrompt(env2, privateKey, autoAccept);
|
|
276404
276324
|
const cDeployment = await customDeploymentPrompt(env2, customDeployment, autoAccept);
|
|
276405
276325
|
const blockscout = await blockscoutPrompt(env2, insights, autoAccept);
|
|
276406
|
-
const authUrl = await authUrlPrompt(env2, autoAccept, !!prod);
|
|
276407
|
-
const authSecret = await authSecretPrompt(env2, autoAccept);
|
|
276408
276326
|
await writeEnvSpinner(!!prod, {
|
|
276409
|
-
...PRE_DEPLOYED_CONTRACTS,
|
|
276410
276327
|
SETTLEMINT_ACCESS_TOKEN: aatToken,
|
|
276411
276328
|
SETTLEMINT_INSTANCE: instance,
|
|
276412
276329
|
SETTLEMINT_WORKSPACE: workspace.id,
|
|
@@ -276419,8 +276336,6 @@ function connectCommand() {
|
|
|
276419
276336
|
...await getGraphEndpoint(thegraph, env2),
|
|
276420
276337
|
...getPortalEndpoints(portal),
|
|
276421
276338
|
SETTLEMINT_HD_PRIVATE_KEY: hdPrivateKey?.uniqueName,
|
|
276422
|
-
NEXTAUTH_URL: authUrl,
|
|
276423
|
-
SETTLEMINT_AUTH_SECRET: authSecret,
|
|
276424
276339
|
SETTLEMINT_MINIO: minio?.id,
|
|
276425
276340
|
SETTLEMINT_MINIO_ENDPOINT: minio?.endpoints.find((endpoint) => endpoint.id.includes("s3-api"))?.displayValue,
|
|
276426
276341
|
SETTLEMINT_MINIO_ACCESS_KEY: minio?.credentials.find((credential) => credential.id.includes("access-key"))?.displayValue,
|
|
@@ -276439,7 +276354,7 @@ function connectCommand() {
|
|
|
276439
276354
|
var package_default = {
|
|
276440
276355
|
name: "@settlemint/sdk-cli",
|
|
276441
276356
|
description: "SettleMint SDK, integrate SettleMint into your application with ease.",
|
|
276442
|
-
version: "0.6.
|
|
276357
|
+
version: "0.6.34-main6e515b1",
|
|
276443
276358
|
type: "module",
|
|
276444
276359
|
private: false,
|
|
276445
276360
|
license: "FSL-1.1-MIT",
|
|
@@ -276489,8 +276404,8 @@ var package_default = {
|
|
|
276489
276404
|
"@inquirer/input": "4.1.0",
|
|
276490
276405
|
"@inquirer/password": "4.0.3",
|
|
276491
276406
|
"@inquirer/select": "4.0.3",
|
|
276492
|
-
"@settlemint/sdk-js": "0.6.
|
|
276493
|
-
"@settlemint/sdk-utils": "0.6.
|
|
276407
|
+
"@settlemint/sdk-js": "0.6.34-main6e515b1",
|
|
276408
|
+
"@settlemint/sdk-utils": "0.6.34-main6e515b1",
|
|
276494
276409
|
"get-tsconfig": "4.8.1",
|
|
276495
276410
|
giget: "1.2.3"
|
|
276496
276411
|
},
|
|
@@ -277453,15 +277368,20 @@ ${examples.map(({ description, command }) => {
|
|
|
277453
277368
|
}
|
|
277454
277369
|
|
|
277455
277370
|
// src/commands/connect/pat.prompt.ts
|
|
277456
|
-
async function personalAccessTokenPrompt(instance) {
|
|
277371
|
+
async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
277457
277372
|
const existingConfig = await getInstanceCredentials(instance);
|
|
277458
|
-
|
|
277373
|
+
const defaultPersonalAccessToken = env2.SETTLEMINT_PERSONAL_ACCESS_TOKEN || existingConfig?.personalAccessToken;
|
|
277374
|
+
const defaultPossible = accept && defaultPersonalAccessToken;
|
|
277375
|
+
if (defaultPossible) {
|
|
277376
|
+
return defaultPersonalAccessToken;
|
|
277377
|
+
}
|
|
277378
|
+
if (existingConfig && defaultPersonalAccessToken) {
|
|
277459
277379
|
const useExisting = await esm_default2({
|
|
277460
277380
|
message: `Do you want to use your existing personal access token for ${instance}?`,
|
|
277461
277381
|
default: true
|
|
277462
277382
|
});
|
|
277463
277383
|
if (useExisting) {
|
|
277464
|
-
return
|
|
277384
|
+
return defaultPersonalAccessToken;
|
|
277465
277385
|
}
|
|
277466
277386
|
}
|
|
277467
277387
|
return esm_default4({
|
|
@@ -277506,7 +277426,7 @@ ${createExamples([
|
|
|
277506
277426
|
cancel2("Invalid personal access token");
|
|
277507
277427
|
}
|
|
277508
277428
|
} else {
|
|
277509
|
-
personalAccessToken = await personalAccessTokenPrompt(instance);
|
|
277429
|
+
personalAccessToken = await personalAccessTokenPrompt(env2, instance, !!acceptDefaults);
|
|
277510
277430
|
}
|
|
277511
277431
|
const client = createSettleMintClient({
|
|
277512
277432
|
instance,
|
|
@@ -277634,6 +277554,7 @@ var UrlOrPathSchema3 = z4.union([UrlSchema3, UrlPathSchema3]);
|
|
|
277634
277554
|
var DotEnvSchema3 = z4.object({
|
|
277635
277555
|
SETTLEMINT_INSTANCE: UrlSchema3,
|
|
277636
277556
|
SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema3,
|
|
277557
|
+
SETTLEMINT_PERSONAL_ACCESS_TOKEN: PersonalAccessTokenSchema3.optional(),
|
|
277637
277558
|
SETTLEMINT_WORKSPACE: IdSchema3,
|
|
277638
277559
|
SETTLEMINT_APPLICATION: IdSchema3,
|
|
277639
277560
|
SETTLEMINT_BLOCKCHAIN_NETWORK: IdSchema3.optional(),
|
|
@@ -277657,17 +277578,12 @@ var DotEnvSchema3 = z4.object({
|
|
|
277657
277578
|
SETTLEMINT_IPFS_API_ENDPOINT: UrlSchema3.optional(),
|
|
277658
277579
|
SETTLEMINT_IPFS_PINNING_ENDPOINT: UrlSchema3.optional(),
|
|
277659
277580
|
SETTLEMINT_IPFS_GATEWAY_ENDPOINT: UrlSchema3.optional(),
|
|
277660
|
-
SETTLEMINT_AUTH_SECRET: z4.string(),
|
|
277661
277581
|
SETTLEMINT_CUSTOM_DEPLOYMENT: IdSchema3.optional(),
|
|
277662
277582
|
SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT: UrlSchema3.optional(),
|
|
277663
277583
|
SETTLEMINT_BLOCKSCOUT: IdSchema3.optional(),
|
|
277664
277584
|
SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema3.optional(),
|
|
277665
277585
|
SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema3.optional(),
|
|
277666
277586
|
SETTLEMINT_NEW_PROJECT_NAME: z4.string().optional(),
|
|
277667
|
-
NEXTAUTH_URL: UrlSchema3,
|
|
277668
|
-
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_REGISTRY: z4.literal("0x5e771e1417100000000000000000000000000001"),
|
|
277669
|
-
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_FACTORY: z4.literal("0x5e771e1417100000000000000000000000000002"),
|
|
277670
|
-
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_DEX_FACTORY: z4.literal("0x5e771e1417100000000000000000000000000003"),
|
|
277671
277587
|
SETTLEMINT_SMART_CONTRACT_SET: IdSchema3.optional(),
|
|
277672
277588
|
SETTLEMINT_SMART_CONTRACT_SET_ADDRESS: z4.string().optional(),
|
|
277673
277589
|
SETTLEMINT_SMART_CONTRACT_SET_DEPLOYMENT_ID: z4.string().optional()
|
|
@@ -277861,8 +277777,6 @@ ${createExamples(examples)}`).argument("<name>", `The ${type4} name`).option("-a
|
|
|
277861
277777
|
const newEnv = isApplicationChanged ? {
|
|
277862
277778
|
SETTLEMINT_ACCESS_TOKEN: usePersonalAccessToken ? env2.SETTLEMINT_ACCESS_TOKEN : accessToken,
|
|
277863
277779
|
SETTLEMINT_INSTANCE: instance,
|
|
277864
|
-
SETTLEMINT_AUTH_SECRET: env2.SETTLEMINT_AUTH_SECRET,
|
|
277865
|
-
NEXTAUTH_URL: env2.NEXTAUTH_URL,
|
|
277866
277780
|
...updatedEnv
|
|
277867
277781
|
} : {
|
|
277868
277782
|
...env2,
|
|
@@ -277931,7 +277845,6 @@ function blockchainNetworkBesuCreateCommand() {
|
|
|
277931
277845
|
} : undefined,
|
|
277932
277846
|
mapDefaultEnv: () => {
|
|
277933
277847
|
return {
|
|
277934
|
-
...PRE_DEPLOYED_CONTRACTS,
|
|
277935
277848
|
SETTLEMINT_APPLICATION: application,
|
|
277936
277849
|
SETTLEMINT_BLOCKCHAIN_NETWORK: result.id,
|
|
277937
277850
|
SETTLEMINT_BLOCKCHAIN_NODE: blockchainNode?.id
|
|
@@ -279940,4 +279853,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
|
|
|
279940
279853
|
cancel2(reason);
|
|
279941
279854
|
});
|
|
279942
279855
|
|
|
279943
|
-
//# debugId=
|
|
279856
|
+
//# debugId=2D6FA57F0ECB54C064756E2164756E21
|