@settlemint/sdk-cli 0.6.35 → 0.6.36-main83a8265
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 +39 -21
- package/dist/cli.js.map +10 -10
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -266381,6 +266381,9 @@ async function codegenHasura(env) {
|
|
|
266381
266381
|
}
|
|
266382
266382
|
const accessToken = env.SETTLEMINT_ACCESS_TOKEN;
|
|
266383
266383
|
const adminSecret = env.SETTLEMINT_HASURA_ADMIN_SECRET;
|
|
266384
|
+
if (!accessToken || !adminSecret) {
|
|
266385
|
+
return;
|
|
266386
|
+
}
|
|
266384
266387
|
await generateSchema({
|
|
266385
266388
|
input: gqlEndpoint,
|
|
266386
266389
|
output: "hasura-schema.graphql",
|
|
@@ -266425,7 +266428,7 @@ async function codegenPortal(env) {
|
|
|
266425
266428
|
output: "portal-schema.graphql",
|
|
266426
266429
|
tsconfig: undefined,
|
|
266427
266430
|
headers: {
|
|
266428
|
-
"x-auth-token": accessToken
|
|
266431
|
+
"x-auth-token": accessToken ?? ""
|
|
266429
266432
|
}
|
|
266430
266433
|
});
|
|
266431
266434
|
const template = `import { createPortalClient } from "@settlemint/sdk-portal";
|
|
@@ -266457,6 +266460,9 @@ async function codegenTheGraph(env) {
|
|
|
266457
266460
|
return;
|
|
266458
266461
|
}
|
|
266459
266462
|
const accessToken = env.SETTLEMINT_ACCESS_TOKEN;
|
|
266463
|
+
if (!accessToken) {
|
|
266464
|
+
return;
|
|
266465
|
+
}
|
|
266460
266466
|
await generateSchema({
|
|
266461
266467
|
input: gqlEndpoint,
|
|
266462
266468
|
output: "the-graph-schema.graphql",
|
|
@@ -267416,11 +267422,20 @@ async function codegenTsconfig(env) {
|
|
|
267416
267422
|
blockscout: false
|
|
267417
267423
|
};
|
|
267418
267424
|
}
|
|
267425
|
+
const accessToken = env.SETTLEMINT_ACCESS_TOKEN;
|
|
267426
|
+
if (!accessToken) {
|
|
267427
|
+
return {
|
|
267428
|
+
hasura: false,
|
|
267429
|
+
portal: false,
|
|
267430
|
+
thegraph: false,
|
|
267431
|
+
blockscout: false
|
|
267432
|
+
};
|
|
267433
|
+
}
|
|
267419
267434
|
const [hasura, portal, thegraph, blockscout] = await Promise.all([
|
|
267420
|
-
testGqlEndpoint(
|
|
267421
|
-
testGqlEndpoint(
|
|
267422
|
-
testGqlEndpoint(
|
|
267423
|
-
testGqlEndpoint(
|
|
267435
|
+
testGqlEndpoint(accessToken, env.SETTLEMINT_HASURA_ADMIN_SECRET, env.SETTLEMINT_HASURA_ENDPOINT, true),
|
|
267436
|
+
testGqlEndpoint(accessToken, undefined, env.SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT),
|
|
267437
|
+
testGqlEndpoint(accessToken, undefined, env.SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT),
|
|
267438
|
+
testGqlEndpoint(accessToken, undefined, env.SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT)
|
|
267424
267439
|
]);
|
|
267425
267440
|
if (!tsconfig.config.compilerOptions) {
|
|
267426
267441
|
tsconfig.config.compilerOptions = {};
|
|
@@ -272071,11 +272086,11 @@ var UrlPathSchema = z4.string().regex(/^\/(?:[a-zA-Z0-9-_]+(?:\/[a-zA-Z0-9-_]+)*
|
|
|
272071
272086
|
});
|
|
272072
272087
|
var UrlOrPathSchema = z4.union([UrlSchema, UrlPathSchema]);
|
|
272073
272088
|
var DotEnvSchema = z4.object({
|
|
272074
|
-
SETTLEMINT_INSTANCE: UrlSchema,
|
|
272075
|
-
SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema,
|
|
272089
|
+
SETTLEMINT_INSTANCE: UrlSchema.default("https://console.settlemint.com"),
|
|
272090
|
+
SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema.optional(),
|
|
272076
272091
|
SETTLEMINT_PERSONAL_ACCESS_TOKEN: PersonalAccessTokenSchema.optional(),
|
|
272077
|
-
SETTLEMINT_WORKSPACE: IdSchema,
|
|
272078
|
-
SETTLEMINT_APPLICATION: IdSchema,
|
|
272092
|
+
SETTLEMINT_WORKSPACE: IdSchema.optional(),
|
|
272093
|
+
SETTLEMINT_APPLICATION: IdSchema.optional(),
|
|
272079
272094
|
SETTLEMINT_BLOCKCHAIN_NETWORK: IdSchema.optional(),
|
|
272080
272095
|
SETTLEMINT_BLOCKCHAIN_NODE: IdSchema.optional(),
|
|
272081
272096
|
SETTLEMINT_LOAD_BALANCER: IdSchema.optional(),
|
|
@@ -272266,6 +272281,9 @@ async function codegenBlockscout(env2) {
|
|
|
272266
272281
|
return;
|
|
272267
272282
|
}
|
|
272268
272283
|
const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
|
272284
|
+
if (!accessToken) {
|
|
272285
|
+
return;
|
|
272286
|
+
}
|
|
272269
272287
|
const response = await fetch(endpoint, {
|
|
272270
272288
|
method: "POST",
|
|
272271
272289
|
headers: {
|
|
@@ -272732,11 +272750,11 @@ var UrlPathSchema2 = z4.string().regex(/^\/(?:[a-zA-Z0-9-_]+(?:\/[a-zA-Z0-9-_]+)
|
|
|
272732
272750
|
});
|
|
272733
272751
|
var UrlOrPathSchema2 = z4.union([UrlSchema2, UrlPathSchema2]);
|
|
272734
272752
|
var DotEnvSchema2 = z4.object({
|
|
272735
|
-
SETTLEMINT_INSTANCE: UrlSchema2,
|
|
272736
|
-
SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema2,
|
|
272753
|
+
SETTLEMINT_INSTANCE: UrlSchema2.default("https://console.settlemint.com"),
|
|
272754
|
+
SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema2.optional(),
|
|
272737
272755
|
SETTLEMINT_PERSONAL_ACCESS_TOKEN: PersonalAccessTokenSchema2.optional(),
|
|
272738
|
-
SETTLEMINT_WORKSPACE: IdSchema2,
|
|
272739
|
-
SETTLEMINT_APPLICATION: IdSchema2,
|
|
272756
|
+
SETTLEMINT_WORKSPACE: IdSchema2.optional(),
|
|
272757
|
+
SETTLEMINT_APPLICATION: IdSchema2.optional(),
|
|
272740
272758
|
SETTLEMINT_BLOCKCHAIN_NETWORK: IdSchema2.optional(),
|
|
272741
272759
|
SETTLEMINT_BLOCKCHAIN_NODE: IdSchema2.optional(),
|
|
272742
272760
|
SETTLEMINT_LOAD_BALANCER: IdSchema2.optional(),
|
|
@@ -276354,7 +276372,7 @@ function connectCommand() {
|
|
|
276354
276372
|
var package_default = {
|
|
276355
276373
|
name: "@settlemint/sdk-cli",
|
|
276356
276374
|
description: "SettleMint SDK, integrate SettleMint into your application with ease.",
|
|
276357
|
-
version: "0.6.
|
|
276375
|
+
version: "0.6.36-main83a8265",
|
|
276358
276376
|
type: "module",
|
|
276359
276377
|
private: false,
|
|
276360
276378
|
license: "FSL-1.1-MIT",
|
|
@@ -276404,8 +276422,8 @@ var package_default = {
|
|
|
276404
276422
|
"@inquirer/input": "4.1.0",
|
|
276405
276423
|
"@inquirer/password": "4.0.3",
|
|
276406
276424
|
"@inquirer/select": "4.0.3",
|
|
276407
|
-
"@settlemint/sdk-js": "0.6.
|
|
276408
|
-
"@settlemint/sdk-utils": "0.6.
|
|
276425
|
+
"@settlemint/sdk-js": "0.6.36-main83a8265",
|
|
276426
|
+
"@settlemint/sdk-utils": "0.6.36-main83a8265",
|
|
276409
276427
|
"get-tsconfig": "4.8.1",
|
|
276410
276428
|
giget: "1.2.3"
|
|
276411
276429
|
},
|
|
@@ -277552,11 +277570,11 @@ var UrlPathSchema3 = z4.string().regex(/^\/(?:[a-zA-Z0-9-_]+(?:\/[a-zA-Z0-9-_]+)
|
|
|
277552
277570
|
});
|
|
277553
277571
|
var UrlOrPathSchema3 = z4.union([UrlSchema3, UrlPathSchema3]);
|
|
277554
277572
|
var DotEnvSchema3 = z4.object({
|
|
277555
|
-
SETTLEMINT_INSTANCE: UrlSchema3,
|
|
277556
|
-
SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema3,
|
|
277573
|
+
SETTLEMINT_INSTANCE: UrlSchema3.default("https://console.settlemint.com"),
|
|
277574
|
+
SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema3.optional(),
|
|
277557
277575
|
SETTLEMINT_PERSONAL_ACCESS_TOKEN: PersonalAccessTokenSchema3.optional(),
|
|
277558
|
-
SETTLEMINT_WORKSPACE: IdSchema3,
|
|
277559
|
-
SETTLEMINT_APPLICATION: IdSchema3,
|
|
277576
|
+
SETTLEMINT_WORKSPACE: IdSchema3.optional(),
|
|
277577
|
+
SETTLEMINT_APPLICATION: IdSchema3.optional(),
|
|
277560
277578
|
SETTLEMINT_BLOCKCHAIN_NETWORK: IdSchema3.optional(),
|
|
277561
277579
|
SETTLEMINT_BLOCKCHAIN_NODE: IdSchema3.optional(),
|
|
277562
277580
|
SETTLEMINT_LOAD_BALANCER: IdSchema3.optional(),
|
|
@@ -279853,4 +279871,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
|
|
|
279853
279871
|
cancel2(reason);
|
|
279854
279872
|
});
|
|
279855
279873
|
|
|
279856
|
-
//# debugId=
|
|
279874
|
+
//# debugId=0362D835DF81E35A64756E2164756E21
|