@settlemint/sdk-cli 0.7.0-prf7b9716 → 0.7.0-prf8aa7bb
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 +989 -962
- package/dist/cli.js.map +38 -38
- 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.Vqi1euLQlA:/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-prf8aa7bb",
|
|
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.Vqi1euLQlA:/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.Vqi1euLQlA:/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.Vqi1euLQlA:/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.Vqi1euLQlA:/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) : [""];
|
|
@@ -267675,10 +267675,7 @@ var cancel = (msg) => {
|
|
|
267675
267675
|
var ApplicationAccessTokenSchema = z3.string().regex(/^sm_aat_.*$/);
|
|
267676
267676
|
var PersonalAccessTokenSchema = z3.string().regex(/^sm_pat_.*$/);
|
|
267677
267677
|
var AccessTokenSchema = z3.string().regex(/^sm_pat_.*|sm_aat_.*$/);
|
|
267678
|
-
var
|
|
267679
|
-
z3.string().uuid(),
|
|
267680
|
-
z3.string().regex(/^[0-9a-fA-F]{24}$/)
|
|
267681
|
-
]);
|
|
267678
|
+
var UniqueNameSchema = z3.string().regex(/^[a-z0-9-]+$/);
|
|
267682
267679
|
var UrlSchema = z3.string().url();
|
|
267683
267680
|
var UrlPathSchema = z3.string().regex(/^\/(?:[a-zA-Z0-9-_]+(?:\/[a-zA-Z0-9-_]+)*\/?)?$/, {
|
|
267684
267681
|
message: "Invalid URL path format. Must start with '/' and can contain letters, numbers, hyphens, and underscores."
|
|
@@ -267688,33 +267685,33 @@ var DotEnvSchema = z3.object({
|
|
|
267688
267685
|
SETTLEMINT_INSTANCE: UrlSchema.default("https://console.settlemint.com"),
|
|
267689
267686
|
SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema.optional(),
|
|
267690
267687
|
SETTLEMINT_PERSONAL_ACCESS_TOKEN: PersonalAccessTokenSchema.optional(),
|
|
267691
|
-
SETTLEMINT_WORKSPACE:
|
|
267692
|
-
SETTLEMINT_APPLICATION:
|
|
267693
|
-
SETTLEMINT_BLOCKCHAIN_NETWORK:
|
|
267694
|
-
SETTLEMINT_BLOCKCHAIN_NODE:
|
|
267695
|
-
SETTLEMINT_LOAD_BALANCER:
|
|
267696
|
-
SETTLEMINT_HASURA:
|
|
267688
|
+
SETTLEMINT_WORKSPACE: UniqueNameSchema.optional(),
|
|
267689
|
+
SETTLEMINT_APPLICATION: UniqueNameSchema.optional(),
|
|
267690
|
+
SETTLEMINT_BLOCKCHAIN_NETWORK: UniqueNameSchema.optional(),
|
|
267691
|
+
SETTLEMINT_BLOCKCHAIN_NODE: UniqueNameSchema.optional(),
|
|
267692
|
+
SETTLEMINT_LOAD_BALANCER: UniqueNameSchema.optional(),
|
|
267693
|
+
SETTLEMINT_HASURA: UniqueNameSchema.optional(),
|
|
267697
267694
|
SETTLEMINT_HASURA_ENDPOINT: UrlSchema.optional(),
|
|
267698
267695
|
SETTLEMINT_HASURA_ADMIN_SECRET: z3.string().optional(),
|
|
267699
267696
|
SETTLEMINT_HASURA_DATABASE_URL: z3.string().optional(),
|
|
267700
|
-
SETTLEMINT_THEGRAPH:
|
|
267697
|
+
SETTLEMINT_THEGRAPH: UniqueNameSchema.optional(),
|
|
267701
267698
|
SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: z3.preprocess((value4) => tryParseJson(value4, []), z3.array(UrlSchema).optional()),
|
|
267702
267699
|
SETTLEMINT_THEGRAPH_SUBGRAPH_NAME: z3.string().optional(),
|
|
267703
|
-
SETTLEMINT_PORTAL:
|
|
267700
|
+
SETTLEMINT_PORTAL: UniqueNameSchema.optional(),
|
|
267704
267701
|
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: UrlSchema.optional(),
|
|
267705
267702
|
SETTLEMINT_PORTAL_REST_ENDPOINT: UrlSchema.optional(),
|
|
267706
|
-
SETTLEMINT_HD_PRIVATE_KEY:
|
|
267707
|
-
SETTLEMINT_MINIO:
|
|
267703
|
+
SETTLEMINT_HD_PRIVATE_KEY: UniqueNameSchema.optional(),
|
|
267704
|
+
SETTLEMINT_MINIO: UniqueNameSchema.optional(),
|
|
267708
267705
|
SETTLEMINT_MINIO_ENDPOINT: UrlSchema.optional(),
|
|
267709
267706
|
SETTLEMINT_MINIO_ACCESS_KEY: z3.string().optional(),
|
|
267710
267707
|
SETTLEMINT_MINIO_SECRET_KEY: z3.string().optional(),
|
|
267711
|
-
SETTLEMINT_IPFS:
|
|
267708
|
+
SETTLEMINT_IPFS: UniqueNameSchema.optional(),
|
|
267712
267709
|
SETTLEMINT_IPFS_API_ENDPOINT: UrlSchema.optional(),
|
|
267713
267710
|
SETTLEMINT_IPFS_PINNING_ENDPOINT: UrlSchema.optional(),
|
|
267714
267711
|
SETTLEMINT_IPFS_GATEWAY_ENDPOINT: UrlSchema.optional(),
|
|
267715
|
-
SETTLEMINT_CUSTOM_DEPLOYMENT:
|
|
267712
|
+
SETTLEMINT_CUSTOM_DEPLOYMENT: UniqueNameSchema.optional(),
|
|
267716
267713
|
SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT: UrlSchema.optional(),
|
|
267717
|
-
SETTLEMINT_BLOCKSCOUT:
|
|
267714
|
+
SETTLEMINT_BLOCKSCOUT: UniqueNameSchema.optional(),
|
|
267718
267715
|
SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema.optional(),
|
|
267719
267716
|
SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema.optional(),
|
|
267720
267717
|
SETTLEMINT_NEW_PROJECT_NAME: z3.string().optional(),
|
|
@@ -267722,6 +267719,10 @@ var DotEnvSchema = z3.object({
|
|
|
267722
267719
|
SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: z3.string().optional()
|
|
267723
267720
|
});
|
|
267724
267721
|
var DotEnvSchemaPartial = DotEnvSchema.partial();
|
|
267722
|
+
var IdSchema = z3.union([
|
|
267723
|
+
z3.string().uuid(),
|
|
267724
|
+
z3.string().regex(/^[0-9a-fA-F]{24}$/)
|
|
267725
|
+
]);
|
|
267725
267726
|
function validate(schema, value4) {
|
|
267726
267727
|
try {
|
|
267727
267728
|
return schema.parse(value4);
|
|
@@ -267876,7 +267877,7 @@ export const { client: theGraphClient${nameSuffix}, graphql: theGraphGraphql${na
|
|
|
267876
267877
|
Timestamp: string;
|
|
267877
267878
|
};
|
|
267878
267879
|
}>({
|
|
267879
|
-
instances: JSON.parse(process.env.SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS
|
|
267880
|
+
instances: JSON.parse(process.env.SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS || '[]'),
|
|
267880
267881
|
accessToken: process.env.SETTLEMINT_ACCESS_TOKEN!, // undefined in browser, by design to not leak the secrets
|
|
267881
267882
|
subgraphName: "${name2}",
|
|
267882
267883
|
});`
|
|
@@ -269972,10 +269973,7 @@ function tryParseJson2(value4, defaultValue = null) {
|
|
|
269972
269973
|
return defaultValue;
|
|
269973
269974
|
}
|
|
269974
269975
|
}
|
|
269975
|
-
var
|
|
269976
|
-
z3.string().uuid(),
|
|
269977
|
-
z3.string().regex(/^[0-9a-fA-F]{24}$/)
|
|
269978
|
-
]);
|
|
269976
|
+
var UniqueNameSchema2 = z3.string().regex(/^[a-z0-9-]+$/);
|
|
269979
269977
|
var UrlSchema2 = z3.string().url();
|
|
269980
269978
|
var UrlPathSchema2 = z3.string().regex(/^\/(?:[a-zA-Z0-9-_]+(?:\/[a-zA-Z0-9-_]+)*\/?)?$/, {
|
|
269981
269979
|
message: "Invalid URL path format. Must start with '/' and can contain letters, numbers, hyphens, and underscores."
|
|
@@ -269985,33 +269983,33 @@ var DotEnvSchema2 = z3.object({
|
|
|
269985
269983
|
SETTLEMINT_INSTANCE: UrlSchema2.default("https://console.settlemint.com"),
|
|
269986
269984
|
SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema2.optional(),
|
|
269987
269985
|
SETTLEMINT_PERSONAL_ACCESS_TOKEN: PersonalAccessTokenSchema2.optional(),
|
|
269988
|
-
SETTLEMINT_WORKSPACE:
|
|
269989
|
-
SETTLEMINT_APPLICATION:
|
|
269990
|
-
SETTLEMINT_BLOCKCHAIN_NETWORK:
|
|
269991
|
-
SETTLEMINT_BLOCKCHAIN_NODE:
|
|
269992
|
-
SETTLEMINT_LOAD_BALANCER:
|
|
269993
|
-
SETTLEMINT_HASURA:
|
|
269986
|
+
SETTLEMINT_WORKSPACE: UniqueNameSchema2.optional(),
|
|
269987
|
+
SETTLEMINT_APPLICATION: UniqueNameSchema2.optional(),
|
|
269988
|
+
SETTLEMINT_BLOCKCHAIN_NETWORK: UniqueNameSchema2.optional(),
|
|
269989
|
+
SETTLEMINT_BLOCKCHAIN_NODE: UniqueNameSchema2.optional(),
|
|
269990
|
+
SETTLEMINT_LOAD_BALANCER: UniqueNameSchema2.optional(),
|
|
269991
|
+
SETTLEMINT_HASURA: UniqueNameSchema2.optional(),
|
|
269994
269992
|
SETTLEMINT_HASURA_ENDPOINT: UrlSchema2.optional(),
|
|
269995
269993
|
SETTLEMINT_HASURA_ADMIN_SECRET: z3.string().optional(),
|
|
269996
269994
|
SETTLEMINT_HASURA_DATABASE_URL: z3.string().optional(),
|
|
269997
|
-
SETTLEMINT_THEGRAPH:
|
|
269995
|
+
SETTLEMINT_THEGRAPH: UniqueNameSchema2.optional(),
|
|
269998
269996
|
SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: z3.preprocess((value4) => tryParseJson2(value4, []), z3.array(UrlSchema2).optional()),
|
|
269999
269997
|
SETTLEMINT_THEGRAPH_SUBGRAPH_NAME: z3.string().optional(),
|
|
270000
|
-
SETTLEMINT_PORTAL:
|
|
269998
|
+
SETTLEMINT_PORTAL: UniqueNameSchema2.optional(),
|
|
270001
269999
|
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: UrlSchema2.optional(),
|
|
270002
270000
|
SETTLEMINT_PORTAL_REST_ENDPOINT: UrlSchema2.optional(),
|
|
270003
|
-
SETTLEMINT_HD_PRIVATE_KEY:
|
|
270004
|
-
SETTLEMINT_MINIO:
|
|
270001
|
+
SETTLEMINT_HD_PRIVATE_KEY: UniqueNameSchema2.optional(),
|
|
270002
|
+
SETTLEMINT_MINIO: UniqueNameSchema2.optional(),
|
|
270005
270003
|
SETTLEMINT_MINIO_ENDPOINT: UrlSchema2.optional(),
|
|
270006
270004
|
SETTLEMINT_MINIO_ACCESS_KEY: z3.string().optional(),
|
|
270007
270005
|
SETTLEMINT_MINIO_SECRET_KEY: z3.string().optional(),
|
|
270008
|
-
SETTLEMINT_IPFS:
|
|
270006
|
+
SETTLEMINT_IPFS: UniqueNameSchema2.optional(),
|
|
270009
270007
|
SETTLEMINT_IPFS_API_ENDPOINT: UrlSchema2.optional(),
|
|
270010
270008
|
SETTLEMINT_IPFS_PINNING_ENDPOINT: UrlSchema2.optional(),
|
|
270011
270009
|
SETTLEMINT_IPFS_GATEWAY_ENDPOINT: UrlSchema2.optional(),
|
|
270012
|
-
SETTLEMINT_CUSTOM_DEPLOYMENT:
|
|
270010
|
+
SETTLEMINT_CUSTOM_DEPLOYMENT: UniqueNameSchema2.optional(),
|
|
270013
270011
|
SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT: UrlSchema2.optional(),
|
|
270014
|
-
SETTLEMINT_BLOCKSCOUT:
|
|
270012
|
+
SETTLEMINT_BLOCKSCOUT: UniqueNameSchema2.optional(),
|
|
270015
270013
|
SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema2.optional(),
|
|
270016
270014
|
SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema2.optional(),
|
|
270017
270015
|
SETTLEMINT_NEW_PROJECT_NAME: z3.string().optional(),
|
|
@@ -270019,6 +270017,10 @@ var DotEnvSchema2 = z3.object({
|
|
|
270019
270017
|
SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: z3.string().optional()
|
|
270020
270018
|
});
|
|
270021
270019
|
var DotEnvSchemaPartial2 = DotEnvSchema2.partial();
|
|
270020
|
+
var IdSchema2 = z3.union([
|
|
270021
|
+
z3.string().uuid(),
|
|
270022
|
+
z3.string().regex(/^[0-9a-fA-F]{24}$/)
|
|
270023
|
+
]);
|
|
270022
270024
|
function validate2(schema, value4) {
|
|
270023
270025
|
try {
|
|
270024
270026
|
return schema.parse(value4);
|
|
@@ -270627,10 +270629,7 @@ function tryParseJson3(value4, defaultValue = null) {
|
|
|
270627
270629
|
return defaultValue;
|
|
270628
270630
|
}
|
|
270629
270631
|
}
|
|
270630
|
-
var
|
|
270631
|
-
z3.string().uuid(),
|
|
270632
|
-
z3.string().regex(/^[0-9a-fA-F]{24}$/)
|
|
270633
|
-
]);
|
|
270632
|
+
var UniqueNameSchema3 = z3.string().regex(/^[a-z0-9-]+$/);
|
|
270634
270633
|
var UrlSchema3 = z3.string().url();
|
|
270635
270634
|
var UrlPathSchema3 = z3.string().regex(/^\/(?:[a-zA-Z0-9-_]+(?:\/[a-zA-Z0-9-_]+)*\/?)?$/, {
|
|
270636
270635
|
message: "Invalid URL path format. Must start with '/' and can contain letters, numbers, hyphens, and underscores."
|
|
@@ -270640,33 +270639,33 @@ var DotEnvSchema3 = z3.object({
|
|
|
270640
270639
|
SETTLEMINT_INSTANCE: UrlSchema3.default("https://console.settlemint.com"),
|
|
270641
270640
|
SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema3.optional(),
|
|
270642
270641
|
SETTLEMINT_PERSONAL_ACCESS_TOKEN: PersonalAccessTokenSchema3.optional(),
|
|
270643
|
-
SETTLEMINT_WORKSPACE:
|
|
270644
|
-
SETTLEMINT_APPLICATION:
|
|
270645
|
-
SETTLEMINT_BLOCKCHAIN_NETWORK:
|
|
270646
|
-
SETTLEMINT_BLOCKCHAIN_NODE:
|
|
270647
|
-
SETTLEMINT_LOAD_BALANCER:
|
|
270648
|
-
SETTLEMINT_HASURA:
|
|
270642
|
+
SETTLEMINT_WORKSPACE: UniqueNameSchema3.optional(),
|
|
270643
|
+
SETTLEMINT_APPLICATION: UniqueNameSchema3.optional(),
|
|
270644
|
+
SETTLEMINT_BLOCKCHAIN_NETWORK: UniqueNameSchema3.optional(),
|
|
270645
|
+
SETTLEMINT_BLOCKCHAIN_NODE: UniqueNameSchema3.optional(),
|
|
270646
|
+
SETTLEMINT_LOAD_BALANCER: UniqueNameSchema3.optional(),
|
|
270647
|
+
SETTLEMINT_HASURA: UniqueNameSchema3.optional(),
|
|
270649
270648
|
SETTLEMINT_HASURA_ENDPOINT: UrlSchema3.optional(),
|
|
270650
270649
|
SETTLEMINT_HASURA_ADMIN_SECRET: z3.string().optional(),
|
|
270651
270650
|
SETTLEMINT_HASURA_DATABASE_URL: z3.string().optional(),
|
|
270652
|
-
SETTLEMINT_THEGRAPH:
|
|
270651
|
+
SETTLEMINT_THEGRAPH: UniqueNameSchema3.optional(),
|
|
270653
270652
|
SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: z3.preprocess((value4) => tryParseJson3(value4, []), z3.array(UrlSchema3).optional()),
|
|
270654
270653
|
SETTLEMINT_THEGRAPH_SUBGRAPH_NAME: z3.string().optional(),
|
|
270655
|
-
SETTLEMINT_PORTAL:
|
|
270654
|
+
SETTLEMINT_PORTAL: UniqueNameSchema3.optional(),
|
|
270656
270655
|
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: UrlSchema3.optional(),
|
|
270657
270656
|
SETTLEMINT_PORTAL_REST_ENDPOINT: UrlSchema3.optional(),
|
|
270658
|
-
SETTLEMINT_HD_PRIVATE_KEY:
|
|
270659
|
-
SETTLEMINT_MINIO:
|
|
270657
|
+
SETTLEMINT_HD_PRIVATE_KEY: UniqueNameSchema3.optional(),
|
|
270658
|
+
SETTLEMINT_MINIO: UniqueNameSchema3.optional(),
|
|
270660
270659
|
SETTLEMINT_MINIO_ENDPOINT: UrlSchema3.optional(),
|
|
270661
270660
|
SETTLEMINT_MINIO_ACCESS_KEY: z3.string().optional(),
|
|
270662
270661
|
SETTLEMINT_MINIO_SECRET_KEY: z3.string().optional(),
|
|
270663
|
-
SETTLEMINT_IPFS:
|
|
270662
|
+
SETTLEMINT_IPFS: UniqueNameSchema3.optional(),
|
|
270664
270663
|
SETTLEMINT_IPFS_API_ENDPOINT: UrlSchema3.optional(),
|
|
270665
270664
|
SETTLEMINT_IPFS_PINNING_ENDPOINT: UrlSchema3.optional(),
|
|
270666
270665
|
SETTLEMINT_IPFS_GATEWAY_ENDPOINT: UrlSchema3.optional(),
|
|
270667
|
-
SETTLEMINT_CUSTOM_DEPLOYMENT:
|
|
270666
|
+
SETTLEMINT_CUSTOM_DEPLOYMENT: UniqueNameSchema3.optional(),
|
|
270668
270667
|
SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT: UrlSchema3.optional(),
|
|
270669
|
-
SETTLEMINT_BLOCKSCOUT:
|
|
270668
|
+
SETTLEMINT_BLOCKSCOUT: UniqueNameSchema3.optional(),
|
|
270670
270669
|
SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema3.optional(),
|
|
270671
270670
|
SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema3.optional(),
|
|
270672
270671
|
SETTLEMINT_NEW_PROJECT_NAME: z3.string().optional(),
|
|
@@ -270674,6 +270673,10 @@ var DotEnvSchema3 = z3.object({
|
|
|
270674
270673
|
SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: z3.string().optional()
|
|
270675
270674
|
});
|
|
270676
270675
|
var DotEnvSchemaPartial3 = DotEnvSchema3.partial();
|
|
270676
|
+
var IdSchema3 = z3.union([
|
|
270677
|
+
z3.string().uuid(),
|
|
270678
|
+
z3.string().regex(/^[0-9a-fA-F]{24}$/)
|
|
270679
|
+
]);
|
|
270677
270680
|
function validate3(schema, value4) {
|
|
270678
270681
|
try {
|
|
270679
270682
|
return schema.parse(value4);
|
|
@@ -271278,95 +271281,256 @@ var t7 = initGraphQLTada();
|
|
|
271278
271281
|
|
|
271279
271282
|
// ../js/dist/settlemint.mjs
|
|
271280
271283
|
var graphql = initGraphQLTada();
|
|
271281
|
-
var createApplicationAccessToken = graphql(`
|
|
271282
|
-
mutation CreateApplicationAccessToken($applicationId: ID!, $blockchainNetworkScope: BlockchainNetworkScopeInputType!, $blockchainNodeScope: BlockchainNodeScopeInputType!, $customDeploymentScope: CustomDeploymentScopeInputType!, $insightsScope: InsightsScopeInputType!, $integrationScope: IntegrationScopeInputType!, $loadBalancerScope: LoadBalancerScopeInputType!, $middlewareScope: MiddlewareScopeInputType!, $name: String!, $privateKeyScope: PrivateKeyScopeInputType!, $smartContractSetScope: SmartContractSetScopeInputType!, $storageScope: StorageScopeInputType!, $validityPeriod: AccessTokenValidityPeriod!) {
|
|
271283
|
-
createApplicationAccessToken(applicationId: $applicationId, blockchainNetworkScope: $blockchainNetworkScope, blockchainNodeScope: $blockchainNodeScope, customDeploymentScope: $customDeploymentScope, insightsScope: $insightsScope, integrationScope: $integrationScope, loadBalancerScope: $loadBalancerScope, middlewareScope: $middlewareScope, name: $name, privateKeyScope: $privateKeyScope, smartContractSetScope: $smartContractSetScope, storageScope: $storageScope, validityPeriod: $validityPeriod) {
|
|
271284
|
-
token
|
|
271285
|
-
}
|
|
271286
|
-
}
|
|
271287
|
-
`, []);
|
|
271288
|
-
var applicationAccessTokenCreate = (gqlClient, options) => {
|
|
271289
|
-
return async (args) => {
|
|
271290
|
-
validate3(IdSchema3, args.applicationId);
|
|
271291
|
-
const { createApplicationAccessToken: applicationAccessToken } = await gqlClient.request(createApplicationAccessToken, args);
|
|
271292
|
-
if (!applicationAccessToken.token) {
|
|
271293
|
-
throw new Error("Failed to create application access token");
|
|
271294
|
-
}
|
|
271295
|
-
return applicationAccessToken.token;
|
|
271296
|
-
};
|
|
271297
|
-
};
|
|
271298
271284
|
var ApplicationFragment = graphql(`
|
|
271299
271285
|
fragment Application on Application {
|
|
271300
271286
|
id
|
|
271287
|
+
uniqueName
|
|
271301
271288
|
name
|
|
271302
|
-
workspace {
|
|
271289
|
+
workspace {
|
|
271290
|
+
id
|
|
271291
|
+
uniqueName
|
|
271292
|
+
}
|
|
271303
271293
|
}
|
|
271304
271294
|
`);
|
|
271305
|
-
var
|
|
271306
|
-
|
|
271307
|
-
|
|
271295
|
+
var WorkspaceFragment = graphql(`
|
|
271296
|
+
fragment Workspace on Workspace {
|
|
271297
|
+
id
|
|
271298
|
+
uniqueName
|
|
271299
|
+
name
|
|
271308
271300
|
applications {
|
|
271309
271301
|
...Application
|
|
271310
271302
|
}
|
|
271311
271303
|
}
|
|
271312
|
-
|
|
271304
|
+
`, [ApplicationFragment]);
|
|
271305
|
+
var getWorkspacesAndApplications = graphql(`
|
|
271306
|
+
query getWorkspacesAndApplications {
|
|
271307
|
+
workspaces {
|
|
271308
|
+
...Workspace
|
|
271309
|
+
applications {
|
|
271310
|
+
...Application
|
|
271311
|
+
}
|
|
271312
|
+
childWorkspaces {
|
|
271313
|
+
...Workspace
|
|
271314
|
+
}
|
|
271315
|
+
}
|
|
271316
|
+
}
|
|
271317
|
+
`, [WorkspaceFragment, ApplicationFragment]);
|
|
271318
|
+
var getWorkspace = graphql(`
|
|
271319
|
+
query getWorkspace($uniqueName: String!) {
|
|
271320
|
+
workspaceByUniqueName(uniqueName: $uniqueName) {
|
|
271321
|
+
...Workspace
|
|
271322
|
+
applications {
|
|
271323
|
+
...Application
|
|
271324
|
+
}
|
|
271325
|
+
}
|
|
271326
|
+
}
|
|
271327
|
+
`, [WorkspaceFragment, ApplicationFragment]);
|
|
271328
|
+
var createWorkspace = graphql(`
|
|
271329
|
+
mutation CreateWorkspace(
|
|
271330
|
+
$addressLine1: String
|
|
271331
|
+
$addressLine2: String
|
|
271332
|
+
$city: String
|
|
271333
|
+
$companyName: String
|
|
271334
|
+
$country: String
|
|
271335
|
+
$name: String!
|
|
271336
|
+
$parentId: String
|
|
271337
|
+
$paymentMethodId: String
|
|
271338
|
+
$postalCode: String
|
|
271339
|
+
$taxIdType: String
|
|
271340
|
+
$taxIdValue: String
|
|
271341
|
+
) {
|
|
271342
|
+
createWorkspace(
|
|
271343
|
+
addressLine1: $addressLine1
|
|
271344
|
+
addressLine2: $addressLine2
|
|
271345
|
+
city: $city
|
|
271346
|
+
companyName: $companyName
|
|
271347
|
+
country: $country
|
|
271348
|
+
name: $name
|
|
271349
|
+
parentId: $parentId
|
|
271350
|
+
paymentMethodId: $paymentMethodId
|
|
271351
|
+
postalCode: $postalCode
|
|
271352
|
+
taxIdType: $taxIdType
|
|
271353
|
+
taxIdValue: $taxIdValue
|
|
271354
|
+
) {
|
|
271355
|
+
...Workspace
|
|
271356
|
+
applications {
|
|
271357
|
+
...Application
|
|
271358
|
+
}
|
|
271359
|
+
}
|
|
271360
|
+
}
|
|
271361
|
+
`, [WorkspaceFragment, ApplicationFragment]);
|
|
271362
|
+
var deleteWorkspace = graphql(`
|
|
271363
|
+
mutation deleteWorkspace($id: ID!) {
|
|
271364
|
+
deleteWorkspace(workspaceId: $id) {
|
|
271365
|
+
...Workspace
|
|
271366
|
+
applications {
|
|
271367
|
+
...Application
|
|
271368
|
+
}
|
|
271369
|
+
}
|
|
271370
|
+
}
|
|
271371
|
+
`, [WorkspaceFragment, ApplicationFragment]);
|
|
271372
|
+
var addCredits = graphql(`
|
|
271373
|
+
mutation addCredits($workspaceId: String!, $amount: Float!) {
|
|
271374
|
+
addCredits(workspaceId: $workspaceId, amount: $amount)
|
|
271375
|
+
}
|
|
271376
|
+
`);
|
|
271377
|
+
var workspaceList = (gqlClient, options) => {
|
|
271378
|
+
return async () => {
|
|
271379
|
+
const { workspaces } = await gqlClient.request(getWorkspacesAndApplications);
|
|
271380
|
+
const allWorkspaces = workspaces.reduce((acc, workspace) => {
|
|
271381
|
+
acc.push(workspace);
|
|
271382
|
+
if (workspace.childWorkspaces) {
|
|
271383
|
+
acc.push(...workspace.childWorkspaces);
|
|
271384
|
+
}
|
|
271385
|
+
return acc;
|
|
271386
|
+
}, []);
|
|
271387
|
+
return allWorkspaces.sort((a8, b4) => a8.name.localeCompare(b4.name));
|
|
271388
|
+
};
|
|
271389
|
+
};
|
|
271390
|
+
var workspaceRead = (gqlClient, options) => {
|
|
271391
|
+
return async (workspaceUniqueName) => {
|
|
271392
|
+
const { workspaceByUniqueName } = await gqlClient.request(getWorkspace, { uniqueName: workspaceUniqueName });
|
|
271393
|
+
return workspaceByUniqueName;
|
|
271394
|
+
};
|
|
271395
|
+
};
|
|
271396
|
+
var workspaceCreate = (gqlClient, options) => {
|
|
271397
|
+
return async (createWorkspaceArgs) => {
|
|
271398
|
+
const { createWorkspace: workspace } = await gqlClient.request(createWorkspace, createWorkspaceArgs);
|
|
271399
|
+
return workspace;
|
|
271400
|
+
};
|
|
271401
|
+
};
|
|
271402
|
+
var workspaceDelete = (gqlClient, options) => {
|
|
271403
|
+
return async (workspaceUniqueName) => {
|
|
271404
|
+
const workspaceToDelete = await workspaceRead(gqlClient, options)(workspaceUniqueName);
|
|
271405
|
+
const { deleteWorkspace: workspace } = await gqlClient.request(deleteWorkspace, { id: workspaceToDelete.id });
|
|
271406
|
+
return workspace;
|
|
271407
|
+
};
|
|
271408
|
+
};
|
|
271409
|
+
var workspaceAddCredits = (gqlClient, options) => {
|
|
271410
|
+
return async (workspaceId, amount) => {
|
|
271411
|
+
const id = validate3(IdSchema3, workspaceId);
|
|
271412
|
+
if (amount <= 0) {
|
|
271413
|
+
throw new Error("Credit amount must be a positive number");
|
|
271414
|
+
}
|
|
271415
|
+
const { addCredits: result } = await gqlClient.request(addCredits, { workspaceId: id, amount });
|
|
271416
|
+
return result;
|
|
271417
|
+
};
|
|
271418
|
+
};
|
|
271419
|
+
var listApplications = graphql(`
|
|
271420
|
+
query ListApplications($workspaceUniqueName: String!) {
|
|
271421
|
+
workspaceByUniqueName(uniqueName: $workspaceUniqueName) {
|
|
271422
|
+
applications {
|
|
271423
|
+
...Application
|
|
271424
|
+
}
|
|
271425
|
+
}
|
|
271426
|
+
}
|
|
271313
271427
|
`, [ApplicationFragment]);
|
|
271314
271428
|
var readApplication = graphql(`
|
|
271315
|
-
|
|
271316
|
-
|
|
271317
|
-
|
|
271429
|
+
query ReadApplication($applicationUniqueName: String!) {
|
|
271430
|
+
applicationByUniqueName(uniqueName: $applicationUniqueName) {
|
|
271431
|
+
...Application
|
|
271432
|
+
}
|
|
271318
271433
|
}
|
|
271319
|
-
}
|
|
271320
271434
|
`, [ApplicationFragment]);
|
|
271321
271435
|
var createApplication = graphql(`
|
|
271322
|
-
|
|
271323
|
-
|
|
271324
|
-
|
|
271325
|
-
|
|
271326
|
-
createApplication(
|
|
271327
|
-
name: $name
|
|
271328
|
-
workspaceId: $workspaceId
|
|
271329
|
-
) {
|
|
271330
|
-
...Application
|
|
271436
|
+
mutation CreateApplication($name: String!, $workspaceId: ID!) {
|
|
271437
|
+
createApplication(name: $name, workspaceId: $workspaceId) {
|
|
271438
|
+
...Application
|
|
271439
|
+
}
|
|
271331
271440
|
}
|
|
271332
|
-
}
|
|
271333
271441
|
`, [ApplicationFragment]);
|
|
271334
271442
|
var deleteApplication = graphql(`
|
|
271335
|
-
|
|
271336
|
-
|
|
271337
|
-
|
|
271443
|
+
mutation DeleteApplication($id: ID!) {
|
|
271444
|
+
deleteApplication(id: $id) {
|
|
271445
|
+
...Application
|
|
271446
|
+
}
|
|
271338
271447
|
}
|
|
271339
|
-
}
|
|
271340
271448
|
`, [ApplicationFragment]);
|
|
271341
271449
|
var applicationList = (gqlClient, options) => {
|
|
271342
|
-
return async (
|
|
271343
|
-
const id = validate3(IdSchema3, workspaceId);
|
|
271450
|
+
return async (workspaceUniqueName) => {
|
|
271344
271451
|
const {
|
|
271345
|
-
|
|
271346
|
-
} = await gqlClient.request(listApplications, {
|
|
271452
|
+
workspaceByUniqueName: { applications }
|
|
271453
|
+
} = await gqlClient.request(listApplications, { workspaceUniqueName });
|
|
271347
271454
|
return applications;
|
|
271348
271455
|
};
|
|
271349
271456
|
};
|
|
271350
271457
|
var applicationRead = (gqlClient, options) => {
|
|
271351
|
-
return async (
|
|
271352
|
-
const
|
|
271353
|
-
|
|
271458
|
+
return async (applicationUniqueName) => {
|
|
271459
|
+
const { applicationByUniqueName: application } = await gqlClient.request(readApplication, {
|
|
271460
|
+
applicationUniqueName
|
|
271461
|
+
});
|
|
271354
271462
|
return application;
|
|
271355
271463
|
};
|
|
271356
271464
|
};
|
|
271357
271465
|
var applicationCreate = (gqlClient, options) => {
|
|
271358
271466
|
return async (args) => {
|
|
271359
|
-
const {
|
|
271467
|
+
const { workspaceUniqueName, ...otherArgs } = args;
|
|
271468
|
+
const workspace = await workspaceRead(gqlClient, options)(workspaceUniqueName);
|
|
271469
|
+
const { createApplication: application } = await gqlClient.request(createApplication, {
|
|
271470
|
+
...otherArgs,
|
|
271471
|
+
workspaceId: workspace.id
|
|
271472
|
+
});
|
|
271360
271473
|
return application;
|
|
271361
271474
|
};
|
|
271362
271475
|
};
|
|
271363
271476
|
var applicationDelete = (gqlClient, options) => {
|
|
271364
|
-
return async (
|
|
271365
|
-
const
|
|
271366
|
-
const { deleteApplication: application } = await gqlClient.request(deleteApplication, {
|
|
271477
|
+
return async (applicationUniqueName) => {
|
|
271478
|
+
const applicationToDelete = await applicationRead(gqlClient, options)(applicationUniqueName);
|
|
271479
|
+
const { deleteApplication: application } = await gqlClient.request(deleteApplication, {
|
|
271480
|
+
id: applicationToDelete.id
|
|
271481
|
+
});
|
|
271367
271482
|
return application;
|
|
271368
271483
|
};
|
|
271369
271484
|
};
|
|
271485
|
+
var createApplicationAccessToken = graphql(`
|
|
271486
|
+
mutation CreateApplicationAccessToken(
|
|
271487
|
+
$applicationId: ID!,
|
|
271488
|
+
$blockchainNetworkScope: BlockchainNetworkScopeInputType!,
|
|
271489
|
+
$blockchainNodeScope: BlockchainNodeScopeInputType!,
|
|
271490
|
+
$customDeploymentScope: CustomDeploymentScopeInputType!,
|
|
271491
|
+
$insightsScope: InsightsScopeInputType!,
|
|
271492
|
+
$integrationScope: IntegrationScopeInputType!,
|
|
271493
|
+
$loadBalancerScope: LoadBalancerScopeInputType!,
|
|
271494
|
+
$middlewareScope: MiddlewareScopeInputType!,
|
|
271495
|
+
$name: String!,
|
|
271496
|
+
$privateKeyScope: PrivateKeyScopeInputType!,
|
|
271497
|
+
$smartContractSetScope: SmartContractSetScopeInputType!,
|
|
271498
|
+
$storageScope: StorageScopeInputType!,
|
|
271499
|
+
$validityPeriod: AccessTokenValidityPeriod!
|
|
271500
|
+
) {
|
|
271501
|
+
createApplicationAccessToken(
|
|
271502
|
+
applicationId: $applicationId,
|
|
271503
|
+
blockchainNetworkScope: $blockchainNetworkScope,
|
|
271504
|
+
blockchainNodeScope: $blockchainNodeScope,
|
|
271505
|
+
customDeploymentScope: $customDeploymentScope,
|
|
271506
|
+
insightsScope: $insightsScope,
|
|
271507
|
+
integrationScope: $integrationScope,
|
|
271508
|
+
loadBalancerScope: $loadBalancerScope,
|
|
271509
|
+
middlewareScope: $middlewareScope,
|
|
271510
|
+
name: $name,
|
|
271511
|
+
privateKeyScope: $privateKeyScope,
|
|
271512
|
+
smartContractSetScope: $smartContractSetScope,
|
|
271513
|
+
storageScope: $storageScope,
|
|
271514
|
+
validityPeriod: $validityPeriod
|
|
271515
|
+
) {
|
|
271516
|
+
token
|
|
271517
|
+
}
|
|
271518
|
+
}
|
|
271519
|
+
`, []);
|
|
271520
|
+
var applicationAccessTokenCreate = (gqlClient, options) => {
|
|
271521
|
+
return async (args) => {
|
|
271522
|
+
const { applicationUniqueName, ...otherArgs } = args;
|
|
271523
|
+
const application = await applicationRead(gqlClient, options)(applicationUniqueName);
|
|
271524
|
+
const { createApplicationAccessToken: applicationAccessToken } = await gqlClient.request(createApplicationAccessToken, {
|
|
271525
|
+
...otherArgs,
|
|
271526
|
+
applicationId: application.id
|
|
271527
|
+
});
|
|
271528
|
+
if (!applicationAccessToken.token) {
|
|
271529
|
+
throw new Error("Failed to create application access token");
|
|
271530
|
+
}
|
|
271531
|
+
return applicationAccessToken.token;
|
|
271532
|
+
};
|
|
271533
|
+
};
|
|
271370
271534
|
function setClusterServiceDefaults(args) {
|
|
271371
271535
|
return {
|
|
271372
271536
|
...args,
|
|
@@ -271393,31 +271557,34 @@ var BlockchainNetworkFragment = graphql(`
|
|
|
271393
271557
|
fragment BlockchainNetwork on BlockchainNetwork {
|
|
271394
271558
|
__typename
|
|
271395
271559
|
id
|
|
271560
|
+
uniqueName
|
|
271396
271561
|
name
|
|
271397
271562
|
status
|
|
271398
271563
|
blockchainNodes {
|
|
271399
271564
|
... on BlockchainNode {
|
|
271400
271565
|
id
|
|
271401
271566
|
name
|
|
271567
|
+
uniqueName
|
|
271402
271568
|
}
|
|
271403
271569
|
}
|
|
271404
271570
|
}
|
|
271405
271571
|
`);
|
|
271406
271572
|
var getBlockchainNetworks = graphql(`
|
|
271407
|
-
query getBlockchainNetworks($
|
|
271408
|
-
|
|
271409
|
-
|
|
271410
|
-
|
|
271573
|
+
query getBlockchainNetworks($applicationUniqueName: String!) {
|
|
271574
|
+
blockchainNetworksByUniqueName(applicationUniqueName: $applicationUniqueName) {
|
|
271575
|
+
items {
|
|
271576
|
+
...BlockchainNetwork
|
|
271577
|
+
}
|
|
271578
|
+
}
|
|
271411
271579
|
}
|
|
271412
|
-
|
|
271413
|
-
}`, [BlockchainNetworkFragment]);
|
|
271580
|
+
`, [BlockchainNetworkFragment]);
|
|
271414
271581
|
var getBlockchainNetwork = graphql(`
|
|
271415
|
-
query getBlockchainNetwork($
|
|
271416
|
-
|
|
271417
|
-
|
|
271582
|
+
query getBlockchainNetwork($uniqueName: String!) {
|
|
271583
|
+
blockchainNetworkByUniqueName(uniqueName: $uniqueName) {
|
|
271584
|
+
...BlockchainNetwork
|
|
271585
|
+
}
|
|
271418
271586
|
}
|
|
271419
|
-
|
|
271420
|
-
`, [BlockchainNetworkFragment]);
|
|
271587
|
+
`, [BlockchainNetworkFragment]);
|
|
271421
271588
|
var createBlockchainNetwork = graphql(`
|
|
271422
271589
|
mutation createBlockchainNetwork(
|
|
271423
271590
|
$applicationId: ID!
|
|
@@ -271478,65 +271645,67 @@ var createBlockchainNetwork = graphql(`
|
|
|
271478
271645
|
...BlockchainNetwork
|
|
271479
271646
|
}
|
|
271480
271647
|
}
|
|
271481
|
-
`, [BlockchainNetworkFragment]);
|
|
271648
|
+
`, [BlockchainNetworkFragment]);
|
|
271482
271649
|
var deleteBlockchainNetwork = graphql(`
|
|
271483
|
-
mutation deleteBlockchainNetwork($
|
|
271484
|
-
|
|
271650
|
+
mutation deleteBlockchainNetwork($uniqueName: String!) {
|
|
271651
|
+
deleteBlockchainNetworkByUniqueName(uniqueName: $uniqueName) {
|
|
271485
271652
|
...BlockchainNetwork
|
|
271486
271653
|
}
|
|
271487
271654
|
}
|
|
271488
|
-
`, [BlockchainNetworkFragment]);
|
|
271655
|
+
`, [BlockchainNetworkFragment]);
|
|
271489
271656
|
var restartBlockchainNetwork = graphql(`
|
|
271490
|
-
mutation RestartBlockchainNetwork($
|
|
271491
|
-
|
|
271657
|
+
mutation RestartBlockchainNetwork($uniqueName: String!) {
|
|
271658
|
+
restartBlockchainNetworkByUniqueName(uniqueName: $uniqueName) {
|
|
271492
271659
|
...BlockchainNetwork
|
|
271493
271660
|
}
|
|
271494
271661
|
}
|
|
271495
|
-
`, [BlockchainNetworkFragment]);
|
|
271662
|
+
`, [BlockchainNetworkFragment]);
|
|
271496
271663
|
var blockchainNetworkList = (gqlClient, options) => {
|
|
271497
|
-
return async (
|
|
271498
|
-
const id = validate3(IdSchema3, applicationId);
|
|
271664
|
+
return async (applicationUniqueName) => {
|
|
271499
271665
|
const {
|
|
271500
|
-
|
|
271501
|
-
} = await gqlClient.request(getBlockchainNetworks, {
|
|
271666
|
+
blockchainNetworksByUniqueName: { items }
|
|
271667
|
+
} = await gqlClient.request(getBlockchainNetworks, { applicationUniqueName });
|
|
271502
271668
|
return items;
|
|
271503
271669
|
};
|
|
271504
271670
|
};
|
|
271505
271671
|
var blockchainNetworkRead = (gqlClient, options) => {
|
|
271506
|
-
return async (
|
|
271507
|
-
const
|
|
271508
|
-
|
|
271509
|
-
|
|
271672
|
+
return async (blockchainNetworkUniqueName) => {
|
|
271673
|
+
const { blockchainNetworkByUniqueName } = await gqlClient.request(getBlockchainNetwork, {
|
|
271674
|
+
uniqueName: blockchainNetworkUniqueName
|
|
271675
|
+
});
|
|
271676
|
+
return blockchainNetworkByUniqueName;
|
|
271510
271677
|
};
|
|
271511
271678
|
};
|
|
271512
271679
|
var blockchainNetworkCreate = (gqlClient, options) => {
|
|
271513
271680
|
return async (args) => {
|
|
271514
|
-
const
|
|
271515
|
-
|
|
271516
|
-
const
|
|
271681
|
+
const { applicationUniqueName, ...otherArgs } = args;
|
|
271682
|
+
const application = await applicationRead(gqlClient, options)(applicationUniqueName);
|
|
271683
|
+
const blockchainNetworkArgs = setNetworkDefaults(otherArgs);
|
|
271684
|
+
const { createBlockchainNetwork: blockchainNetwork } = await gqlClient.request(createBlockchainNetwork, {
|
|
271685
|
+
...blockchainNetworkArgs,
|
|
271686
|
+
applicationId: application.id
|
|
271687
|
+
});
|
|
271517
271688
|
return blockchainNetwork;
|
|
271518
271689
|
};
|
|
271519
271690
|
};
|
|
271520
271691
|
var blockchainNetworkDelete = (gqlClient, options) => {
|
|
271521
|
-
return async (
|
|
271522
|
-
const
|
|
271523
|
-
|
|
271524
|
-
blockchainNetworkId: id
|
|
271692
|
+
return async (blockchainNetworkUniqueName) => {
|
|
271693
|
+
const { deleteBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(deleteBlockchainNetwork, {
|
|
271694
|
+
uniqueName: blockchainNetworkUniqueName
|
|
271525
271695
|
});
|
|
271526
271696
|
return blockchainNetwork;
|
|
271527
271697
|
};
|
|
271528
271698
|
};
|
|
271529
|
-
var blockchainNetworkRestart = (gqlClient, _options) => async (
|
|
271530
|
-
const
|
|
271531
|
-
const { restartBlockchainNetwork: blockchainNetwork } = await gqlClient.request(restartBlockchainNetwork, { id });
|
|
271699
|
+
var blockchainNetworkRestart = (gqlClient, _options) => async (blockchainNetworkUniqueName) => {
|
|
271700
|
+
const { restartBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(restartBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
|
|
271532
271701
|
return blockchainNetwork;
|
|
271533
271702
|
};
|
|
271534
271703
|
var BlockchainNodeFragment = graphql(`
|
|
271535
271704
|
fragment BlockchainNode on BlockchainNode {
|
|
271536
271705
|
__typename
|
|
271537
271706
|
id
|
|
271538
|
-
name
|
|
271539
271707
|
uniqueName
|
|
271708
|
+
name
|
|
271540
271709
|
status
|
|
271541
271710
|
endpoints {
|
|
271542
271711
|
id
|
|
@@ -271552,6 +271721,7 @@ var BlockchainNodeFragment = graphql(`
|
|
|
271552
271721
|
... on AbstractClusterService {
|
|
271553
271722
|
id
|
|
271554
271723
|
name
|
|
271724
|
+
uniqueName
|
|
271555
271725
|
}
|
|
271556
271726
|
}
|
|
271557
271727
|
privateKeys {
|
|
@@ -271565,86 +271735,96 @@ var BlockchainNodeFragment = graphql(`
|
|
|
271565
271735
|
}
|
|
271566
271736
|
`);
|
|
271567
271737
|
var getBlockchainNodes = graphql(`
|
|
271568
|
-
query getBlockchainNodes($
|
|
271569
|
-
|
|
271570
|
-
|
|
271571
|
-
|
|
271572
|
-
|
|
271573
|
-
}
|
|
271574
|
-
}
|
|
271738
|
+
query getBlockchainNodes($applicationUniqueName: String!) {
|
|
271739
|
+
blockchainNodesByUniqueName(applicationUniqueName: $applicationUniqueName) {
|
|
271740
|
+
items {
|
|
271741
|
+
...BlockchainNode
|
|
271742
|
+
}
|
|
271743
|
+
}
|
|
271744
|
+
}
|
|
271745
|
+
`, [BlockchainNodeFragment]);
|
|
271575
271746
|
var getBlockchainNode = graphql(`
|
|
271576
|
-
query getBlockchainNode($
|
|
271577
|
-
|
|
271578
|
-
|
|
271579
|
-
|
|
271580
|
-
}
|
|
271581
|
-
`, [BlockchainNodeFragment]);
|
|
271747
|
+
query getBlockchainNode($uniqueName: String!) {
|
|
271748
|
+
blockchainNodeByUniqueName(uniqueName: $uniqueName) {
|
|
271749
|
+
...BlockchainNode
|
|
271750
|
+
}
|
|
271751
|
+
}
|
|
271752
|
+
`, [BlockchainNodeFragment]);
|
|
271582
271753
|
var createBlockchainNode = graphql(`
|
|
271583
|
-
|
|
271584
|
-
|
|
271585
|
-
|
|
271586
|
-
|
|
271587
|
-
|
|
271588
|
-
|
|
271589
|
-
|
|
271590
|
-
|
|
271591
|
-
|
|
271592
|
-
|
|
271593
|
-
) {
|
|
271594
|
-
createBlockchainNode(
|
|
271595
|
-
applicationId: $applicationId
|
|
271596
|
-
blockchainNetworkId: $blockchainNetworkId
|
|
271597
|
-
name: $name
|
|
271598
|
-
provider: $provider
|
|
271599
|
-
region: $region
|
|
271600
|
-
size: $size
|
|
271601
|
-
type: $type
|
|
271602
|
-
nodeType: $nodeType
|
|
271603
|
-
keyMaterial: $keyMaterial
|
|
271754
|
+
mutation createBlockchainNode(
|
|
271755
|
+
$applicationId: ID!
|
|
271756
|
+
$blockchainNetworkId: ID!
|
|
271757
|
+
$name: String!
|
|
271758
|
+
$provider: String!
|
|
271759
|
+
$region: String!
|
|
271760
|
+
$size: ClusterServiceSize
|
|
271761
|
+
$type: ClusterServiceType
|
|
271762
|
+
$nodeType: NodeType
|
|
271763
|
+
$keyMaterial: ID
|
|
271604
271764
|
) {
|
|
271605
|
-
|
|
271606
|
-
|
|
271607
|
-
|
|
271608
|
-
|
|
271765
|
+
createBlockchainNode(
|
|
271766
|
+
applicationId: $applicationId
|
|
271767
|
+
blockchainNetworkId: $blockchainNetworkId
|
|
271768
|
+
name: $name
|
|
271769
|
+
provider: $provider
|
|
271770
|
+
region: $region
|
|
271771
|
+
size: $size
|
|
271772
|
+
type: $type
|
|
271773
|
+
nodeType: $nodeType
|
|
271774
|
+
keyMaterial: $keyMaterial
|
|
271775
|
+
) {
|
|
271776
|
+
...BlockchainNode
|
|
271777
|
+
}
|
|
271778
|
+
}
|
|
271779
|
+
`, [BlockchainNodeFragment]);
|
|
271609
271780
|
var restartBlockchainNode = graphql(`
|
|
271610
|
-
|
|
271611
|
-
|
|
271612
|
-
|
|
271781
|
+
mutation RestartBlockchainNode($uniqueName: String!) {
|
|
271782
|
+
restartBlockchainNodeByUniqueName(uniqueName: $uniqueName) {
|
|
271783
|
+
...BlockchainNode
|
|
271784
|
+
}
|
|
271613
271785
|
}
|
|
271614
|
-
|
|
271615
|
-
`, [BlockchainNodeFragment]);
|
|
271786
|
+
`, [BlockchainNodeFragment]);
|
|
271616
271787
|
var blockchainNodeList = (gqlClient, options) => {
|
|
271617
|
-
return async (
|
|
271618
|
-
const id = validate3(IdSchema3, applicationId);
|
|
271788
|
+
return async (applicationUniqueName) => {
|
|
271619
271789
|
const {
|
|
271620
|
-
|
|
271621
|
-
} = await gqlClient.request(getBlockchainNodes, {
|
|
271790
|
+
blockchainNodesByUniqueName: { items }
|
|
271791
|
+
} = await gqlClient.request(getBlockchainNodes, { applicationUniqueName });
|
|
271622
271792
|
return items;
|
|
271623
271793
|
};
|
|
271624
271794
|
};
|
|
271625
271795
|
var blockchainNodeRead = (gqlClient, options) => {
|
|
271626
|
-
return async (
|
|
271627
|
-
const
|
|
271628
|
-
|
|
271629
|
-
|
|
271796
|
+
return async (blockchainNodeUniqueName) => {
|
|
271797
|
+
const { blockchainNodeByUniqueName } = await gqlClient.request(getBlockchainNode, {
|
|
271798
|
+
uniqueName: blockchainNodeUniqueName
|
|
271799
|
+
});
|
|
271800
|
+
return blockchainNodeByUniqueName;
|
|
271630
271801
|
};
|
|
271631
271802
|
};
|
|
271632
271803
|
var blockchainNodeCreate = (gqlClient, options) => {
|
|
271633
271804
|
return async (args) => {
|
|
271634
|
-
|
|
271635
|
-
|
|
271636
|
-
|
|
271805
|
+
const { applicationUniqueName, blockchainNetworkUniqueName, ...otherArgs } = args;
|
|
271806
|
+
const [application, blockchainNetwork] = await Promise.all([
|
|
271807
|
+
applicationRead(gqlClient, options)(applicationUniqueName),
|
|
271808
|
+
blockchainNetworkRead(gqlClient, options)(blockchainNetworkUniqueName)
|
|
271809
|
+
]);
|
|
271810
|
+
const { createBlockchainNode: blockchainNode } = await gqlClient.request(createBlockchainNode, {
|
|
271811
|
+
...otherArgs,
|
|
271812
|
+
applicationId: application.id,
|
|
271813
|
+
blockchainNetworkId: blockchainNetwork.id
|
|
271814
|
+
});
|
|
271637
271815
|
return blockchainNode;
|
|
271638
271816
|
};
|
|
271639
271817
|
};
|
|
271640
|
-
var blockchainNodeRestart = (gqlClient, _options) => async (
|
|
271641
|
-
const
|
|
271642
|
-
|
|
271818
|
+
var blockchainNodeRestart = (gqlClient, _options) => async (blockchainNodeUniqueName) => {
|
|
271819
|
+
const { restartBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(restartBlockchainNode, {
|
|
271820
|
+
uniqueName: blockchainNodeUniqueName
|
|
271821
|
+
});
|
|
271643
271822
|
return blockchainNode;
|
|
271644
271823
|
};
|
|
271645
271824
|
var CustomDeploymentFragment = graphql(`
|
|
271646
271825
|
fragment CustomDeployment on CustomDeployment {
|
|
271647
271826
|
id
|
|
271827
|
+
uniqueName
|
|
271648
271828
|
name
|
|
271649
271829
|
status
|
|
271650
271830
|
endpoints {
|
|
@@ -271660,112 +271840,141 @@ var CustomDeploymentFragment = graphql(`
|
|
|
271660
271840
|
}
|
|
271661
271841
|
`);
|
|
271662
271842
|
var getCustomDeployments = graphql(`
|
|
271663
|
-
query getCustomDeployments($
|
|
271664
|
-
|
|
271665
|
-
|
|
271666
|
-
|
|
271843
|
+
query getCustomDeployments($applicationUniqueName: String!) {
|
|
271844
|
+
customDeploymentsByUniqueName(applicationUniqueName: $applicationUniqueName) {
|
|
271845
|
+
items {
|
|
271846
|
+
...CustomDeployment
|
|
271847
|
+
}
|
|
271848
|
+
}
|
|
271667
271849
|
}
|
|
271668
|
-
|
|
271669
|
-
}`, [CustomDeploymentFragment]);
|
|
271850
|
+
`, [CustomDeploymentFragment]);
|
|
271670
271851
|
var getCustomDeployment = graphql(`
|
|
271671
|
-
query getCustomDeployment($
|
|
271672
|
-
|
|
271673
|
-
|
|
271674
|
-
|
|
271675
|
-
}
|
|
271676
|
-
`, [CustomDeploymentFragment]);
|
|
271852
|
+
query getCustomDeployment($uniqueName: String!) {
|
|
271853
|
+
customDeploymentByUniqueName(uniqueName: $uniqueName) {
|
|
271854
|
+
...CustomDeployment
|
|
271855
|
+
}
|
|
271856
|
+
}
|
|
271857
|
+
`, [CustomDeploymentFragment]);
|
|
271677
271858
|
var editCustomDeployment = graphql(`
|
|
271678
|
-
mutation EditCustomDeployment($
|
|
271679
|
-
|
|
271680
|
-
|
|
271681
|
-
|
|
271682
|
-
}
|
|
271683
|
-
`, [CustomDeploymentFragment]);
|
|
271859
|
+
mutation EditCustomDeployment($uniqueName: String!, $imageTag: String) {
|
|
271860
|
+
editCustomDeploymentByUniqueName(uniqueName: $uniqueName, imageTag: $imageTag) {
|
|
271861
|
+
...CustomDeployment
|
|
271862
|
+
}
|
|
271863
|
+
}
|
|
271864
|
+
`, [CustomDeploymentFragment]);
|
|
271684
271865
|
var createCustomDeployment = graphql(`
|
|
271685
|
-
mutation CreateCustomDeployment(
|
|
271686
|
-
|
|
271687
|
-
|
|
271688
|
-
|
|
271689
|
-
|
|
271690
|
-
|
|
271691
|
-
|
|
271692
|
-
|
|
271693
|
-
|
|
271694
|
-
|
|
271695
|
-
) {
|
|
271696
|
-
|
|
271697
|
-
|
|
271698
|
-
|
|
271699
|
-
|
|
271700
|
-
|
|
271701
|
-
|
|
271702
|
-
|
|
271703
|
-
|
|
271704
|
-
|
|
271705
|
-
|
|
271706
|
-
|
|
271707
|
-
|
|
271708
|
-
|
|
271709
|
-
}
|
|
271710
|
-
`, [CustomDeploymentFragment]);
|
|
271866
|
+
mutation CreateCustomDeployment(
|
|
271867
|
+
$applicationId: ID!
|
|
271868
|
+
$name: String!
|
|
271869
|
+
$imageTag: String!
|
|
271870
|
+
$imageName: String!
|
|
271871
|
+
$imageRepository: String!
|
|
271872
|
+
$environmentVariables: JSON
|
|
271873
|
+
$port: Int!
|
|
271874
|
+
$provider: String!
|
|
271875
|
+
$region: String!
|
|
271876
|
+
) {
|
|
271877
|
+
createCustomDeployment(
|
|
271878
|
+
applicationId: $applicationId
|
|
271879
|
+
name: $name
|
|
271880
|
+
imageTag: $imageTag
|
|
271881
|
+
imageName: $imageName
|
|
271882
|
+
imageRepository: $imageRepository
|
|
271883
|
+
port: $port
|
|
271884
|
+
environmentVariables: $environmentVariables
|
|
271885
|
+
provider: $provider
|
|
271886
|
+
region: $region
|
|
271887
|
+
) {
|
|
271888
|
+
...CustomDeployment
|
|
271889
|
+
}
|
|
271890
|
+
}
|
|
271891
|
+
`, [CustomDeploymentFragment]);
|
|
271711
271892
|
var restartCustomDeployment = graphql(`
|
|
271712
|
-
|
|
271713
|
-
|
|
271714
|
-
|
|
271893
|
+
mutation RestartCustomDeployment($uniqueName: String!) {
|
|
271894
|
+
restartCustomDeploymentByUniqueName(uniqueName: $uniqueName) {
|
|
271895
|
+
...CustomDeployment
|
|
271896
|
+
}
|
|
271715
271897
|
}
|
|
271716
|
-
|
|
271717
|
-
`, [CustomDeploymentFragment]);
|
|
271898
|
+
`, [CustomDeploymentFragment]);
|
|
271718
271899
|
var customdeploymentList = (gqlClient, options) => {
|
|
271719
|
-
return async (
|
|
271720
|
-
const id = validate3(IdSchema3, applicationId);
|
|
271900
|
+
return async (applicationUniqueName) => {
|
|
271721
271901
|
const {
|
|
271722
|
-
|
|
271723
|
-
} = await gqlClient.request(getCustomDeployments, {
|
|
271902
|
+
customDeploymentsByUniqueName: { items }
|
|
271903
|
+
} = await gqlClient.request(getCustomDeployments, { applicationUniqueName });
|
|
271724
271904
|
return items;
|
|
271725
271905
|
};
|
|
271726
271906
|
};
|
|
271727
271907
|
var customdeploymentRead = (gqlClient, options) => {
|
|
271728
|
-
return async (
|
|
271729
|
-
const
|
|
271730
|
-
|
|
271908
|
+
return async (customDeploymentUniqueName) => {
|
|
271909
|
+
const { customDeploymentByUniqueName: customDeployment } = await gqlClient.request(getCustomDeployment, {
|
|
271910
|
+
uniqueName: customDeploymentUniqueName
|
|
271911
|
+
});
|
|
271731
271912
|
return customDeployment;
|
|
271732
271913
|
};
|
|
271733
271914
|
};
|
|
271734
271915
|
var customdeploymentUpdate = (gqlClient, options) => {
|
|
271735
|
-
return async (
|
|
271736
|
-
const
|
|
271737
|
-
|
|
271916
|
+
return async (customDeploymentUniqueName, imageTag) => {
|
|
271917
|
+
const { editCustomDeploymentByUniqueName: cd } = await gqlClient.request(editCustomDeployment, {
|
|
271918
|
+
uniqueName: customDeploymentUniqueName,
|
|
271919
|
+
imageTag
|
|
271920
|
+
});
|
|
271738
271921
|
return cd;
|
|
271739
271922
|
};
|
|
271740
271923
|
};
|
|
271741
271924
|
var customdeploymentCreate = (gqlClient, options) => {
|
|
271742
271925
|
return async (args) => {
|
|
271743
|
-
|
|
271744
|
-
const
|
|
271926
|
+
const { applicationUniqueName, ...otherArgs } = args;
|
|
271927
|
+
const application = await applicationRead(gqlClient, options)(applicationUniqueName);
|
|
271928
|
+
const { createCustomDeployment: customDeployment } = await gqlClient.request(createCustomDeployment, {
|
|
271929
|
+
...otherArgs,
|
|
271930
|
+
applicationId: application.id
|
|
271931
|
+
});
|
|
271745
271932
|
return customDeployment;
|
|
271746
271933
|
};
|
|
271747
271934
|
};
|
|
271748
|
-
var customDeploymentRestart = (gqlClient, _options) => async (
|
|
271749
|
-
const
|
|
271750
|
-
|
|
271935
|
+
var customDeploymentRestart = (gqlClient, _options) => async (customDeploymentUniqueName) => {
|
|
271936
|
+
const { restartCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(restartCustomDeployment, {
|
|
271937
|
+
uniqueName: customDeploymentUniqueName
|
|
271938
|
+
});
|
|
271751
271939
|
return customDeployment;
|
|
271752
271940
|
};
|
|
271753
271941
|
var getFoundryEnvConfig = graphql(`
|
|
271754
|
-
|
|
271755
|
-
|
|
271942
|
+
query GetFoundryEnvConfig($blockchainNodeUniqueName: String!) {
|
|
271943
|
+
foundryEnvConfigByUniqueName(blockchainNodeUniqueName: $blockchainNodeUniqueName)
|
|
271944
|
+
}
|
|
271945
|
+
`);
|
|
271946
|
+
var getEnv = (gqlClient, _options) => {
|
|
271947
|
+
return async (blockchainNodeUniqueName) => {
|
|
271948
|
+
const { foundryEnvConfigByUniqueName } = await gqlClient.request(getFoundryEnvConfig, { blockchainNodeUniqueName });
|
|
271949
|
+
return foundryEnvConfigByUniqueName;
|
|
271950
|
+
};
|
|
271951
|
+
};
|
|
271952
|
+
var LoadBalancerFragment = graphql(`
|
|
271953
|
+
fragment LoadBalancer on LoadBalancer {
|
|
271954
|
+
id
|
|
271955
|
+
uniqueName
|
|
271756
271956
|
}
|
|
271757
271957
|
`);
|
|
271758
|
-
|
|
271759
|
-
|
|
271760
|
-
|
|
271761
|
-
|
|
271762
|
-
|
|
271958
|
+
var getLoadBalancer = graphql(`
|
|
271959
|
+
query GetLoadBalancer($uniqueName: String!) {
|
|
271960
|
+
loadBalancerByUniqueName(uniqueName: $uniqueName) {
|
|
271961
|
+
...LoadBalancer
|
|
271962
|
+
}
|
|
271963
|
+
}
|
|
271964
|
+
`, [LoadBalancerFragment]);
|
|
271965
|
+
var loadBalancerRead = (gqlClient, options) => {
|
|
271966
|
+
return async (loadBalancerUniqueName) => {
|
|
271967
|
+
const { loadBalancerByUniqueName: loadBalancer } = await gqlClient.request(getLoadBalancer, {
|
|
271968
|
+
uniqueName: loadBalancerUniqueName
|
|
271969
|
+
});
|
|
271970
|
+
return loadBalancer;
|
|
271763
271971
|
};
|
|
271764
|
-
}
|
|
271972
|
+
};
|
|
271765
271973
|
var InsightsFragment = graphql(`
|
|
271766
271974
|
fragment Insights on Insights {
|
|
271767
271975
|
__typename
|
|
271768
271976
|
id
|
|
271977
|
+
uniqueName
|
|
271769
271978
|
name
|
|
271770
271979
|
status
|
|
271771
271980
|
insightsCategory
|
|
@@ -271782,86 +271991,97 @@ var InsightsFragment = graphql(`
|
|
|
271782
271991
|
}
|
|
271783
271992
|
`);
|
|
271784
271993
|
var getInsights = graphql(`
|
|
271785
|
-
query
|
|
271786
|
-
|
|
271787
|
-
|
|
271788
|
-
|
|
271994
|
+
query GetInsights($applicationUniqueName: String!) {
|
|
271995
|
+
insightsListByUniqueName(applicationUniqueName: $applicationUniqueName) {
|
|
271996
|
+
items {
|
|
271997
|
+
...Insights
|
|
271998
|
+
}
|
|
271999
|
+
}
|
|
271789
272000
|
}
|
|
271790
|
-
|
|
271791
|
-
}`, [InsightsFragment]);
|
|
272001
|
+
`, [InsightsFragment]);
|
|
271792
272002
|
var getInsight = graphql(`
|
|
271793
|
-
query
|
|
271794
|
-
|
|
271795
|
-
|
|
271796
|
-
|
|
271797
|
-
}
|
|
271798
|
-
`, [InsightsFragment]);
|
|
272003
|
+
query GetInsight($uniqueName: String!) {
|
|
272004
|
+
insightsByUniqueName(uniqueName: $uniqueName) {
|
|
272005
|
+
...Insights
|
|
272006
|
+
}
|
|
272007
|
+
}
|
|
272008
|
+
`, [InsightsFragment]);
|
|
271799
272009
|
var createInsights = graphql(`
|
|
271800
|
-
|
|
271801
|
-
|
|
271802
|
-
|
|
271803
|
-
|
|
271804
|
-
|
|
271805
|
-
|
|
271806
|
-
|
|
271807
|
-
|
|
271808
|
-
|
|
271809
|
-
|
|
271810
|
-
) {
|
|
271811
|
-
createInsights(
|
|
271812
|
-
applicationId: $applicationId
|
|
271813
|
-
name: $name
|
|
271814
|
-
insightsCategory: $insightsCategory
|
|
271815
|
-
provider: $provider
|
|
271816
|
-
region: $region
|
|
271817
|
-
size: $size
|
|
271818
|
-
type: $type
|
|
271819
|
-
blockchainNode: $blockchainNode
|
|
271820
|
-
loadBalancer: $loadBalancer
|
|
272010
|
+
mutation CreateInsights(
|
|
272011
|
+
$applicationId: ID!
|
|
272012
|
+
$name: String!
|
|
272013
|
+
$insightsCategory: InsightsCategory!
|
|
272014
|
+
$provider: String!
|
|
272015
|
+
$region: String!
|
|
272016
|
+
$size: ClusterServiceSize
|
|
272017
|
+
$type: ClusterServiceType
|
|
272018
|
+
$blockchainNode: ID
|
|
272019
|
+
$loadBalancer: ID
|
|
271821
272020
|
) {
|
|
271822
|
-
|
|
271823
|
-
|
|
271824
|
-
|
|
271825
|
-
|
|
272021
|
+
createInsights(
|
|
272022
|
+
applicationId: $applicationId
|
|
272023
|
+
name: $name
|
|
272024
|
+
insightsCategory: $insightsCategory
|
|
272025
|
+
provider: $provider
|
|
272026
|
+
region: $region
|
|
272027
|
+
size: $size
|
|
272028
|
+
type: $type
|
|
272029
|
+
blockchainNode: $blockchainNode
|
|
272030
|
+
loadBalancer: $loadBalancer
|
|
272031
|
+
) {
|
|
272032
|
+
...Insights
|
|
272033
|
+
}
|
|
272034
|
+
}
|
|
272035
|
+
`, [InsightsFragment]);
|
|
271826
272036
|
var restartInsights = graphql(`
|
|
271827
|
-
|
|
271828
|
-
|
|
271829
|
-
|
|
272037
|
+
mutation RestartInsights($uniqueName: String!) {
|
|
272038
|
+
restartInsightsByUniqueName(uniqueName: $uniqueName) {
|
|
272039
|
+
...Insights
|
|
272040
|
+
}
|
|
271830
272041
|
}
|
|
271831
|
-
|
|
271832
|
-
`, [InsightsFragment]);
|
|
272042
|
+
`, [InsightsFragment]);
|
|
271833
272043
|
var insightsList = (gqlClient, options) => {
|
|
271834
|
-
return async (
|
|
271835
|
-
const id = validate3(IdSchema3, applicationId);
|
|
272044
|
+
return async (applicationUniqueName) => {
|
|
271836
272045
|
const {
|
|
271837
|
-
|
|
271838
|
-
} = await gqlClient.request(getInsights, {
|
|
272046
|
+
insightsListByUniqueName: { items }
|
|
272047
|
+
} = await gqlClient.request(getInsights, { applicationUniqueName });
|
|
271839
272048
|
return items;
|
|
271840
272049
|
};
|
|
271841
272050
|
};
|
|
271842
272051
|
var insightsRead = (gqlClient, options) => {
|
|
271843
|
-
return async (
|
|
271844
|
-
const
|
|
271845
|
-
const { insights } = await gqlClient.request(getInsight, { id });
|
|
272052
|
+
return async (insightsUniqueName) => {
|
|
272053
|
+
const { insightsByUniqueName: insights } = await gqlClient.request(getInsight, { uniqueName: insightsUniqueName });
|
|
271846
272054
|
return insights;
|
|
271847
272055
|
};
|
|
271848
272056
|
};
|
|
271849
272057
|
var insightsCreate = (gqlClient, options) => {
|
|
271850
272058
|
return async (args) => {
|
|
271851
|
-
|
|
271852
|
-
const
|
|
272059
|
+
const { applicationUniqueName, blockchainNodeUniqueName, loadBalancerUniqueName, ...otherArgs } = args;
|
|
272060
|
+
const [application, blockchainNode, loadBalancer] = await Promise.all([
|
|
272061
|
+
applicationRead(gqlClient, options)(applicationUniqueName),
|
|
272062
|
+
blockchainNodeUniqueName ? blockchainNodeRead(gqlClient, options)(blockchainNodeUniqueName) : Promise.resolve(undefined),
|
|
272063
|
+
loadBalancerUniqueName ? loadBalancerRead(gqlClient, options)(loadBalancerUniqueName) : Promise.resolve(undefined)
|
|
272064
|
+
]);
|
|
272065
|
+
const { createInsights: insights } = await gqlClient.request(createInsights, {
|
|
272066
|
+
...otherArgs,
|
|
272067
|
+
applicationId: application.id,
|
|
272068
|
+
blockchainNode: blockchainNode?.id,
|
|
272069
|
+
loadBalancer: loadBalancer?.id
|
|
272070
|
+
});
|
|
271853
272071
|
return insights;
|
|
271854
272072
|
};
|
|
271855
272073
|
};
|
|
271856
|
-
var insightsRestart = (gqlClient, _options) => async (
|
|
271857
|
-
const
|
|
271858
|
-
|
|
272074
|
+
var insightsRestart = (gqlClient, _options) => async (insightsUniqueName) => {
|
|
272075
|
+
const { restartInsightsByUniqueName: insights } = await gqlClient.request(restartInsights, {
|
|
272076
|
+
uniqueName: insightsUniqueName
|
|
272077
|
+
});
|
|
271859
272078
|
return insights;
|
|
271860
272079
|
};
|
|
271861
272080
|
var IntegrationFragment = graphql(`
|
|
271862
272081
|
fragment Integration on Integration {
|
|
271863
272082
|
__typename
|
|
271864
272083
|
id
|
|
272084
|
+
uniqueName
|
|
271865
272085
|
name
|
|
271866
272086
|
status
|
|
271867
272087
|
integrationType
|
|
@@ -271878,82 +272098,184 @@ var IntegrationFragment = graphql(`
|
|
|
271878
272098
|
}
|
|
271879
272099
|
`);
|
|
271880
272100
|
var getIntegrations = graphql(`
|
|
271881
|
-
query
|
|
271882
|
-
|
|
271883
|
-
|
|
271884
|
-
|
|
272101
|
+
query GetIntegrations($applicationUniqueName: String!) {
|
|
272102
|
+
integrationsByUniqueName(applicationUniqueName: $applicationUniqueName) {
|
|
272103
|
+
items {
|
|
272104
|
+
...Integration
|
|
272105
|
+
}
|
|
272106
|
+
}
|
|
271885
272107
|
}
|
|
271886
|
-
|
|
271887
|
-
}`, [IntegrationFragment]);
|
|
272108
|
+
`, [IntegrationFragment]);
|
|
271888
272109
|
var getIntegration = graphql(`
|
|
271889
|
-
query
|
|
271890
|
-
|
|
271891
|
-
|
|
271892
|
-
|
|
271893
|
-
}
|
|
271894
|
-
`, [IntegrationFragment]);
|
|
272110
|
+
query GetIntegration($uniqueName: String!) {
|
|
272111
|
+
integrationByUniqueName(uniqueName: $uniqueName) {
|
|
272112
|
+
...Integration
|
|
272113
|
+
}
|
|
272114
|
+
}
|
|
272115
|
+
`, [IntegrationFragment]);
|
|
271895
272116
|
var createIntegration = graphql(`
|
|
271896
|
-
|
|
271897
|
-
|
|
271898
|
-
|
|
271899
|
-
|
|
271900
|
-
|
|
271901
|
-
|
|
271902
|
-
|
|
271903
|
-
|
|
271904
|
-
) {
|
|
271905
|
-
createIntegration(
|
|
271906
|
-
applicationId: $applicationId
|
|
271907
|
-
name: $name
|
|
271908
|
-
integrationType: $integrationType
|
|
271909
|
-
provider: $provider
|
|
271910
|
-
region: $region
|
|
271911
|
-
size: $size
|
|
271912
|
-
type: $type
|
|
272117
|
+
mutation CreateIntegration(
|
|
272118
|
+
$applicationId: ID!
|
|
272119
|
+
$name: String!
|
|
272120
|
+
$integrationType: IntegrationType!
|
|
272121
|
+
$provider: String!
|
|
272122
|
+
$region: String!
|
|
272123
|
+
$size: ClusterServiceSize
|
|
272124
|
+
$type: ClusterServiceType
|
|
271913
272125
|
) {
|
|
271914
|
-
|
|
271915
|
-
|
|
271916
|
-
|
|
271917
|
-
|
|
272126
|
+
createIntegration(
|
|
272127
|
+
applicationId: $applicationId
|
|
272128
|
+
name: $name
|
|
272129
|
+
integrationType: $integrationType
|
|
272130
|
+
provider: $provider
|
|
272131
|
+
region: $region
|
|
272132
|
+
size: $size
|
|
272133
|
+
type: $type
|
|
272134
|
+
) {
|
|
272135
|
+
...Integration
|
|
272136
|
+
}
|
|
272137
|
+
}
|
|
272138
|
+
`, [IntegrationFragment]);
|
|
271918
272139
|
var restartIntegrationTool = graphql(`
|
|
271919
|
-
|
|
271920
|
-
|
|
271921
|
-
|
|
272140
|
+
mutation RestartIntegrationTool($uniqueName: String!) {
|
|
272141
|
+
restartIntegrationByUniqueName(uniqueName: $uniqueName) {
|
|
272142
|
+
...Integration
|
|
272143
|
+
}
|
|
271922
272144
|
}
|
|
271923
|
-
|
|
271924
|
-
`, [IntegrationFragment]);
|
|
272145
|
+
`, [IntegrationFragment]);
|
|
271925
272146
|
var integrationToolList = (gqlClient, options) => {
|
|
271926
|
-
return async (
|
|
271927
|
-
const id = validate3(IdSchema3, applicationId);
|
|
272147
|
+
return async (applicationUniqueName) => {
|
|
271928
272148
|
const {
|
|
271929
|
-
|
|
271930
|
-
} = await gqlClient.request(getIntegrations, {
|
|
272149
|
+
integrationsByUniqueName: { items }
|
|
272150
|
+
} = await gqlClient.request(getIntegrations, { applicationUniqueName });
|
|
271931
272151
|
return items;
|
|
271932
272152
|
};
|
|
271933
272153
|
};
|
|
271934
272154
|
var integrationToolRead = (gqlClient, options) => {
|
|
271935
|
-
return async (
|
|
271936
|
-
const
|
|
271937
|
-
|
|
271938
|
-
return integration;
|
|
272155
|
+
return async (integrationUniqueName) => {
|
|
272156
|
+
const { integrationByUniqueName } = await gqlClient.request(getIntegration, { uniqueName: integrationUniqueName });
|
|
272157
|
+
return integrationByUniqueName;
|
|
271939
272158
|
};
|
|
271940
272159
|
};
|
|
271941
272160
|
var integrationToolCreate = (gqlClient, options) => {
|
|
271942
272161
|
return async (args) => {
|
|
271943
|
-
|
|
271944
|
-
const
|
|
272162
|
+
const { applicationUniqueName, ...otherArgs } = args;
|
|
272163
|
+
const application = await applicationRead(gqlClient, options)(applicationUniqueName);
|
|
272164
|
+
const { createIntegration: integration } = await gqlClient.request(createIntegration, {
|
|
272165
|
+
...otherArgs,
|
|
272166
|
+
applicationId: application.id
|
|
272167
|
+
});
|
|
271945
272168
|
return integration;
|
|
271946
272169
|
};
|
|
271947
272170
|
};
|
|
271948
|
-
var integrationToolRestart = (gqlClient, _options) => async (
|
|
271949
|
-
const
|
|
271950
|
-
|
|
272171
|
+
var integrationToolRestart = (gqlClient, _options) => async (integrationUniqueName) => {
|
|
272172
|
+
const { restartIntegrationByUniqueName: integration } = await gqlClient.request(restartIntegrationTool, {
|
|
272173
|
+
uniqueName: integrationUniqueName
|
|
272174
|
+
});
|
|
271951
272175
|
return integration;
|
|
271952
272176
|
};
|
|
272177
|
+
var StorageFragment = graphql(`
|
|
272178
|
+
fragment Storage on Storage {
|
|
272179
|
+
__typename
|
|
272180
|
+
id
|
|
272181
|
+
uniqueName
|
|
272182
|
+
name
|
|
272183
|
+
status
|
|
272184
|
+
storageProtocol
|
|
272185
|
+
endpoints {
|
|
272186
|
+
id
|
|
272187
|
+
label
|
|
272188
|
+
displayValue
|
|
272189
|
+
}
|
|
272190
|
+
credentials {
|
|
272191
|
+
id
|
|
272192
|
+
label
|
|
272193
|
+
displayValue
|
|
272194
|
+
}
|
|
272195
|
+
}
|
|
272196
|
+
`);
|
|
272197
|
+
var getStorages = graphql(`
|
|
272198
|
+
query GetStorages($applicationUniqueName: String!) {
|
|
272199
|
+
storagesByUniqueName(applicationUniqueName: $applicationUniqueName) {
|
|
272200
|
+
items {
|
|
272201
|
+
...Storage
|
|
272202
|
+
}
|
|
272203
|
+
}
|
|
272204
|
+
}
|
|
272205
|
+
`, [StorageFragment]);
|
|
272206
|
+
var getStorage = graphql(`
|
|
272207
|
+
query GetStorage($uniqueName: String!) {
|
|
272208
|
+
storageByUniqueName(uniqueName: $uniqueName) {
|
|
272209
|
+
...Storage
|
|
272210
|
+
}
|
|
272211
|
+
}
|
|
272212
|
+
`, [StorageFragment]);
|
|
272213
|
+
var createStorage = graphql(`
|
|
272214
|
+
mutation CreateStorage(
|
|
272215
|
+
$applicationId: ID!
|
|
272216
|
+
$name: String!
|
|
272217
|
+
$storageProtocol: StorageProtocol!
|
|
272218
|
+
$provider: String!
|
|
272219
|
+
$region: String!
|
|
272220
|
+
$size: ClusterServiceSize
|
|
272221
|
+
$type: ClusterServiceType
|
|
272222
|
+
) {
|
|
272223
|
+
createStorage(
|
|
272224
|
+
applicationId: $applicationId
|
|
272225
|
+
name: $name
|
|
272226
|
+
storageProtocol: $storageProtocol
|
|
272227
|
+
provider: $provider
|
|
272228
|
+
region: $region
|
|
272229
|
+
size: $size
|
|
272230
|
+
type: $type
|
|
272231
|
+
) {
|
|
272232
|
+
...Storage
|
|
272233
|
+
}
|
|
272234
|
+
}
|
|
272235
|
+
`, [StorageFragment]);
|
|
272236
|
+
var restartStorage = graphql(`
|
|
272237
|
+
mutation RestartStorage($uniqueName: String!) {
|
|
272238
|
+
restartStorageByUniqueName(uniqueName: $uniqueName) {
|
|
272239
|
+
...Storage
|
|
272240
|
+
}
|
|
272241
|
+
}
|
|
272242
|
+
`, [StorageFragment]);
|
|
272243
|
+
var storageList = (gqlClient, options) => {
|
|
272244
|
+
return async (applicationUniqueName) => {
|
|
272245
|
+
const {
|
|
272246
|
+
storagesByUniqueName: { items }
|
|
272247
|
+
} = await gqlClient.request(getStorages, { applicationUniqueName });
|
|
272248
|
+
return items;
|
|
272249
|
+
};
|
|
272250
|
+
};
|
|
272251
|
+
var storageRead = (gqlClient, options) => {
|
|
272252
|
+
return async (storageUniqueName) => {
|
|
272253
|
+
const { storageByUniqueName: storage } = await gqlClient.request(getStorage, { uniqueName: storageUniqueName });
|
|
272254
|
+
return storage;
|
|
272255
|
+
};
|
|
272256
|
+
};
|
|
272257
|
+
var storageCreate = (gqlClient, options) => {
|
|
272258
|
+
return async (args) => {
|
|
272259
|
+
const { applicationUniqueName, ...otherArgs } = args;
|
|
272260
|
+
const application = await applicationRead(gqlClient, options)(applicationUniqueName);
|
|
272261
|
+
const { createStorage: storage } = await gqlClient.request(createStorage, {
|
|
272262
|
+
...otherArgs,
|
|
272263
|
+
applicationId: application.id
|
|
272264
|
+
});
|
|
272265
|
+
return storage;
|
|
272266
|
+
};
|
|
272267
|
+
};
|
|
272268
|
+
var storageRestart = (gqlClient, _options) => async (storageUniqueName) => {
|
|
272269
|
+
const { restartStorageByUniqueName: storage } = await gqlClient.request(restartStorage, {
|
|
272270
|
+
uniqueName: storageUniqueName
|
|
272271
|
+
});
|
|
272272
|
+
return storage;
|
|
272273
|
+
};
|
|
271953
272274
|
var MiddlewareFragment = graphql(`
|
|
271954
272275
|
fragment Middleware on Middleware {
|
|
271955
272276
|
__typename
|
|
271956
272277
|
id
|
|
272278
|
+
uniqueName
|
|
271957
272279
|
name
|
|
271958
272280
|
status
|
|
271959
272281
|
interface
|
|
@@ -271982,488 +272304,195 @@ var MiddlewareFragment = graphql(`
|
|
|
271982
272304
|
}
|
|
271983
272305
|
`);
|
|
271984
272306
|
var getMiddlewares = graphql(`
|
|
271985
|
-
query
|
|
271986
|
-
|
|
271987
|
-
|
|
271988
|
-
|
|
272307
|
+
query GetMiddlewares($applicationUniqueName: String!, $noCache: Boolean = false) {
|
|
272308
|
+
middlewaresByUniqueName(applicationUniqueName: $applicationUniqueName) {
|
|
272309
|
+
items {
|
|
272310
|
+
...Middleware
|
|
272311
|
+
}
|
|
272312
|
+
}
|
|
271989
272313
|
}
|
|
271990
|
-
|
|
271991
|
-
}`, [MiddlewareFragment]);
|
|
272314
|
+
`, [MiddlewareFragment]);
|
|
271992
272315
|
var getMiddleware = graphql(`
|
|
271993
|
-
query
|
|
271994
|
-
|
|
271995
|
-
|
|
271996
|
-
|
|
271997
|
-
}
|
|
271998
|
-
`, [MiddlewareFragment]);
|
|
272316
|
+
query GetMiddleware($uniqueName: String!, $noCache: Boolean = true) {
|
|
272317
|
+
middlewareByUniqueName(uniqueName: $uniqueName) {
|
|
272318
|
+
...Middleware
|
|
272319
|
+
}
|
|
272320
|
+
}
|
|
272321
|
+
`, [MiddlewareFragment]);
|
|
271999
272322
|
var createMiddleware = graphql(`
|
|
272000
|
-
|
|
272001
|
-
|
|
272002
|
-
|
|
272003
|
-
|
|
272004
|
-
|
|
272005
|
-
|
|
272006
|
-
|
|
272007
|
-
|
|
272008
|
-
|
|
272009
|
-
|
|
272010
|
-
|
|
272011
|
-
|
|
272012
|
-
|
|
272013
|
-
|
|
272014
|
-
$noCache: Boolean = false
|
|
272015
|
-
) {
|
|
272016
|
-
createMiddleware(
|
|
272017
|
-
applicationId: $applicationId
|
|
272018
|
-
name: $name
|
|
272019
|
-
provider: $provider
|
|
272020
|
-
region: $region
|
|
272021
|
-
size: $size
|
|
272022
|
-
type: $type
|
|
272023
|
-
interface: $interface
|
|
272024
|
-
storageId: $storageId
|
|
272025
|
-
smartContractSetId: $smartContractSetId
|
|
272026
|
-
blockchainNodeId: $blockchainNodeId
|
|
272027
|
-
loadBalancerId: $loadBalancerId
|
|
272028
|
-
abis: $abis
|
|
272029
|
-
includePredeployedAbis: $includePredeployedAbis
|
|
272323
|
+
mutation CreateMiddleware(
|
|
272324
|
+
$applicationId: ID!
|
|
272325
|
+
$name: String!
|
|
272326
|
+
$provider: String!
|
|
272327
|
+
$region: String!
|
|
272328
|
+
$size: ClusterServiceSize
|
|
272329
|
+
$type: ClusterServiceType
|
|
272330
|
+
$interface: MiddlewareType!
|
|
272331
|
+
$storageId: ID
|
|
272332
|
+
$blockchainNodeId: ID
|
|
272333
|
+
$loadBalancerId: ID
|
|
272334
|
+
$abis: [SmartContractPortalMiddlewareAbiInputDto!]
|
|
272335
|
+
$includePredeployedAbis: [String!]
|
|
272336
|
+
$noCache: Boolean = false
|
|
272030
272337
|
) {
|
|
272031
|
-
|
|
272032
|
-
|
|
272033
|
-
|
|
272034
|
-
|
|
272338
|
+
createMiddleware(
|
|
272339
|
+
applicationId: $applicationId
|
|
272340
|
+
name: $name
|
|
272341
|
+
provider: $provider
|
|
272342
|
+
region: $region
|
|
272343
|
+
size: $size
|
|
272344
|
+
type: $type
|
|
272345
|
+
interface: $interface
|
|
272346
|
+
storageId: $storageId
|
|
272347
|
+
blockchainNodeId: $blockchainNodeId
|
|
272348
|
+
loadBalancerId: $loadBalancerId
|
|
272349
|
+
abis: $abis
|
|
272350
|
+
includePredeployedAbis: $includePredeployedAbis
|
|
272351
|
+
) {
|
|
272352
|
+
...Middleware
|
|
272353
|
+
}
|
|
272354
|
+
}
|
|
272355
|
+
`, [MiddlewareFragment]);
|
|
272035
272356
|
var restartMiddleware = graphql(`
|
|
272036
|
-
|
|
272037
|
-
|
|
272038
|
-
|
|
272357
|
+
mutation RestartMiddleware($uniqueName: String!, $noCache: Boolean = false) {
|
|
272358
|
+
restartMiddlewareByUniqueName(uniqueName: $uniqueName) {
|
|
272359
|
+
...Middleware
|
|
272360
|
+
}
|
|
272039
272361
|
}
|
|
272040
|
-
|
|
272041
|
-
`, [MiddlewareFragment]);
|
|
272362
|
+
`, [MiddlewareFragment]);
|
|
272042
272363
|
var middlewareList = (gqlClient, options) => {
|
|
272043
|
-
return async (
|
|
272044
|
-
const id = validate3(IdSchema3, applicationId);
|
|
272364
|
+
return async (applicationUniqueName) => {
|
|
272045
272365
|
const {
|
|
272046
|
-
|
|
272047
|
-
} = await gqlClient.request(getMiddlewares, {
|
|
272366
|
+
middlewaresByUniqueName: { items }
|
|
272367
|
+
} = await gqlClient.request(getMiddlewares, { applicationUniqueName });
|
|
272048
272368
|
return items;
|
|
272049
272369
|
};
|
|
272050
272370
|
};
|
|
272051
272371
|
var middlewareRead = (gqlClient, options) => {
|
|
272052
|
-
return async (
|
|
272053
|
-
const
|
|
272054
|
-
|
|
272372
|
+
return async (middlewareUniqueName) => {
|
|
272373
|
+
const { middlewareByUniqueName: middleware } = await gqlClient.request(getMiddleware, {
|
|
272374
|
+
uniqueName: middlewareUniqueName
|
|
272375
|
+
});
|
|
272055
272376
|
return middleware;
|
|
272056
272377
|
};
|
|
272057
272378
|
};
|
|
272058
272379
|
var middlewareCreate = (gqlClient, options) => {
|
|
272059
272380
|
return async (args) => {
|
|
272060
|
-
|
|
272061
|
-
const
|
|
272381
|
+
const { applicationUniqueName, blockchainNodeUniqueName, loadBalancerUniqueName, storageUniqueName, ...otherArgs } = args;
|
|
272382
|
+
const [application, blockchainNode, loadBalancer, storage] = await Promise.all([
|
|
272383
|
+
applicationRead(gqlClient, options)(applicationUniqueName),
|
|
272384
|
+
blockchainNodeUniqueName ? blockchainNodeRead(gqlClient, options)(blockchainNodeUniqueName) : Promise.resolve(undefined),
|
|
272385
|
+
loadBalancerUniqueName ? loadBalancerRead(gqlClient, options)(loadBalancerUniqueName) : Promise.resolve(undefined),
|
|
272386
|
+
storageUniqueName ? storageRead(gqlClient, options)(storageUniqueName) : Promise.resolve(undefined)
|
|
272387
|
+
]);
|
|
272388
|
+
const { createMiddleware: middleware } = await gqlClient.request(createMiddleware, {
|
|
272389
|
+
...otherArgs,
|
|
272390
|
+
applicationId: application.id,
|
|
272391
|
+
blockchainNodeId: blockchainNode?.id,
|
|
272392
|
+
loadBalancerId: loadBalancer?.id,
|
|
272393
|
+
storageId: storage?.id
|
|
272394
|
+
});
|
|
272062
272395
|
return middleware;
|
|
272063
272396
|
};
|
|
272064
272397
|
};
|
|
272065
|
-
var middlewareRestart = (gqlClient, _options) => async (
|
|
272066
|
-
const
|
|
272067
|
-
|
|
272398
|
+
var middlewareRestart = (gqlClient, _options) => async (middlewareUniqueName) => {
|
|
272399
|
+
const { restartMiddlewareByUniqueName: middleware } = await gqlClient.request(restartMiddleware, {
|
|
272400
|
+
uniqueName: middlewareUniqueName
|
|
272401
|
+
});
|
|
272068
272402
|
return middleware;
|
|
272069
272403
|
};
|
|
272070
272404
|
var PrivateKeyFragment = graphql(`
|
|
272071
272405
|
fragment PrivateKey on PrivateKey {
|
|
272072
272406
|
__typename
|
|
272073
272407
|
id
|
|
272074
|
-
name
|
|
272075
272408
|
uniqueName
|
|
272409
|
+
name
|
|
272076
272410
|
privateKeyType
|
|
272077
272411
|
status
|
|
272078
272412
|
}
|
|
272079
272413
|
`);
|
|
272080
272414
|
var getPrivateKeys = graphql(`
|
|
272081
|
-
query
|
|
272082
|
-
|
|
272083
|
-
|
|
272084
|
-
|
|
272415
|
+
query GetPrivateKeys($applicationUniqueName: String!) {
|
|
272416
|
+
privateKeysByUniqueName(applicationUniqueName: $applicationUniqueName) {
|
|
272417
|
+
items {
|
|
272418
|
+
...PrivateKey
|
|
272419
|
+
}
|
|
272420
|
+
}
|
|
272085
272421
|
}
|
|
272086
|
-
|
|
272087
|
-
}`, [PrivateKeyFragment]);
|
|
272422
|
+
`, [PrivateKeyFragment]);
|
|
272088
272423
|
var getPrivateKey = graphql(`
|
|
272089
|
-
query
|
|
272090
|
-
|
|
272091
|
-
|
|
272092
|
-
|
|
272093
|
-
}
|
|
272094
|
-
`, [PrivateKeyFragment]);
|
|
272424
|
+
query GetPrivateKey($uniqueName: String!) {
|
|
272425
|
+
privateKeyByUniqueName(uniqueName: $uniqueName) {
|
|
272426
|
+
...PrivateKey
|
|
272427
|
+
}
|
|
272428
|
+
}
|
|
272429
|
+
`, [PrivateKeyFragment]);
|
|
272095
272430
|
var createPrivateKey = graphql(`
|
|
272096
|
-
|
|
272097
|
-
|
|
272098
|
-
|
|
272099
|
-
|
|
272100
|
-
|
|
272101
|
-
|
|
272102
|
-
|
|
272103
|
-
|
|
272104
|
-
|
|
272105
|
-
) {
|
|
272106
|
-
createPrivateKey(
|
|
272107
|
-
applicationId: $applicationId,
|
|
272108
|
-
name: $name,
|
|
272109
|
-
privateKeyType: $privateKeyType,
|
|
272110
|
-
provider: $provider,
|
|
272111
|
-
region: $region
|
|
272112
|
-
size: $size
|
|
272113
|
-
type: $type
|
|
272114
|
-
blockchainNodes: $blockchainNodes
|
|
272431
|
+
mutation CreatePrivateKey(
|
|
272432
|
+
$applicationId: ID!
|
|
272433
|
+
$name: String!
|
|
272434
|
+
$privateKeyType: PrivateKeyType!
|
|
272435
|
+
$provider: String!
|
|
272436
|
+
$region: String!
|
|
272437
|
+
$size: ClusterServiceSize
|
|
272438
|
+
$type: ClusterServiceType
|
|
272439
|
+
$blockchainNodes: [ID!]
|
|
272115
272440
|
) {
|
|
272116
|
-
|
|
272117
|
-
|
|
272118
|
-
|
|
272119
|
-
|
|
272441
|
+
createPrivateKey(
|
|
272442
|
+
applicationId: $applicationId
|
|
272443
|
+
name: $name
|
|
272444
|
+
privateKeyType: $privateKeyType
|
|
272445
|
+
provider: $provider
|
|
272446
|
+
region: $region
|
|
272447
|
+
size: $size
|
|
272448
|
+
type: $type
|
|
272449
|
+
blockchainNodes: $blockchainNodes
|
|
272450
|
+
) {
|
|
272451
|
+
...PrivateKey
|
|
272452
|
+
}
|
|
272453
|
+
}
|
|
272454
|
+
`, [PrivateKeyFragment]);
|
|
272120
272455
|
var restartPrivateKey = graphql(`
|
|
272121
|
-
|
|
272122
|
-
|
|
272123
|
-
|
|
272456
|
+
mutation RestartPrivateKey($uniqueName: String!) {
|
|
272457
|
+
restartPrivateKeyByUniqueName(uniqueName: $uniqueName) {
|
|
272458
|
+
...PrivateKey
|
|
272459
|
+
}
|
|
272124
272460
|
}
|
|
272125
|
-
|
|
272126
|
-
`, [PrivateKeyFragment]);
|
|
272461
|
+
`, [PrivateKeyFragment]);
|
|
272127
272462
|
var privateKeyList = (gqlClient, options) => {
|
|
272128
|
-
return async (
|
|
272129
|
-
const id = validate3(IdSchema3, applicationId);
|
|
272463
|
+
return async (applicationUniqueName) => {
|
|
272130
272464
|
const {
|
|
272131
|
-
|
|
272132
|
-
} = await gqlClient.request(getPrivateKeys, {
|
|
272465
|
+
privateKeysByUniqueName: { items }
|
|
272466
|
+
} = await gqlClient.request(getPrivateKeys, { applicationUniqueName });
|
|
272133
272467
|
return items;
|
|
272134
272468
|
};
|
|
272135
272469
|
};
|
|
272136
272470
|
var privatekeyRead = (gqlClient, options) => {
|
|
272137
|
-
return async (
|
|
272138
|
-
const
|
|
272139
|
-
|
|
272471
|
+
return async (privateKeyUniqueName) => {
|
|
272472
|
+
const { privateKeyByUniqueName: privateKey } = await gqlClient.request(getPrivateKey, {
|
|
272473
|
+
uniqueName: privateKeyUniqueName
|
|
272474
|
+
});
|
|
272140
272475
|
return privateKey;
|
|
272141
272476
|
};
|
|
272142
272477
|
};
|
|
272143
272478
|
var privateKeyCreate = (gqlClient, options) => {
|
|
272144
272479
|
return async (args) => {
|
|
272145
|
-
|
|
272146
|
-
const
|
|
272480
|
+
const { applicationUniqueName, blockchainNodeUniqueNames, ...otherArgs } = args;
|
|
272481
|
+
const application = await applicationRead(gqlClient, options)(applicationUniqueName);
|
|
272482
|
+
const blockchainNodes = blockchainNodeUniqueNames ? await Promise.all(blockchainNodeUniqueNames.map((uniqueName) => blockchainNodeRead(gqlClient, options)(uniqueName))) : [];
|
|
272483
|
+
const { createPrivateKey: privateKey } = await gqlClient.request(createPrivateKey, {
|
|
272484
|
+
...otherArgs,
|
|
272485
|
+
applicationId: application.id,
|
|
272486
|
+
blockchainNodes: blockchainNodes.map((node) => node?.id)
|
|
272487
|
+
});
|
|
272147
272488
|
return privateKey;
|
|
272148
272489
|
};
|
|
272149
272490
|
};
|
|
272150
|
-
var privateKeyRestart = (gqlClient, _options) => async (
|
|
272151
|
-
const
|
|
272152
|
-
|
|
272153
|
-
return privateKey;
|
|
272154
|
-
};
|
|
272155
|
-
var SmartContractSetFragment = graphql(`
|
|
272156
|
-
fragment SmartContractSet on SmartContractSet {
|
|
272157
|
-
__typename
|
|
272158
|
-
id
|
|
272159
|
-
name
|
|
272160
|
-
application {
|
|
272161
|
-
id
|
|
272162
|
-
}
|
|
272163
|
-
status
|
|
272164
|
-
useCase
|
|
272165
|
-
user {
|
|
272166
|
-
id
|
|
272167
|
-
firstname
|
|
272168
|
-
lastname
|
|
272169
|
-
}
|
|
272170
|
-
}
|
|
272171
|
-
`);
|
|
272172
|
-
var getSmartContractSets = graphql(`
|
|
272173
|
-
query getSmartContractSets($id: ID!) {
|
|
272174
|
-
smartContractSets(applicationId: $id) {
|
|
272175
|
-
items {
|
|
272176
|
-
...SmartContractSet
|
|
272177
|
-
}
|
|
272178
|
-
}
|
|
272179
|
-
}`, [SmartContractSetFragment]);
|
|
272180
|
-
var getSmartContractSet = graphql(`
|
|
272181
|
-
query getSmartContractSet($id: ID!) {
|
|
272182
|
-
smartContractSet(entityId: $id) {
|
|
272183
|
-
...SmartContractSet
|
|
272184
|
-
}
|
|
272185
|
-
}`, [SmartContractSetFragment]);
|
|
272186
|
-
var createSmartContractSet = graphql(`
|
|
272187
|
-
mutation CreateSmartContractSet(
|
|
272188
|
-
$applicationId: ID!
|
|
272189
|
-
$name: String!
|
|
272190
|
-
$blockchainNodeId: ID!
|
|
272191
|
-
$useCase: String!
|
|
272192
|
-
$userId: ID
|
|
272193
|
-
$provider: String!
|
|
272194
|
-
$region: String!
|
|
272195
|
-
$size: ClusterServiceSize
|
|
272196
|
-
$type: ClusterServiceType
|
|
272197
|
-
) {
|
|
272198
|
-
createSmartContractSet(
|
|
272199
|
-
applicationId: $applicationId,
|
|
272200
|
-
name: $name,
|
|
272201
|
-
blockchainNodeId: $blockchainNodeId
|
|
272202
|
-
useCase: $useCase
|
|
272203
|
-
userId: $userId
|
|
272204
|
-
provider: $provider,
|
|
272205
|
-
region: $region
|
|
272206
|
-
size: $size
|
|
272207
|
-
type: $type
|
|
272208
|
-
) {
|
|
272209
|
-
...SmartContractSet
|
|
272210
|
-
}
|
|
272211
|
-
}`, [SmartContractSetFragment]);
|
|
272212
|
-
var restartSmartContractSet = graphql(`
|
|
272213
|
-
mutation RestartSmartContractSet($entityId: ID!) {
|
|
272214
|
-
restartSmartContractSet(entityId: $entityId) {
|
|
272215
|
-
...SmartContractSet
|
|
272216
|
-
}
|
|
272217
|
-
}`, [SmartContractSetFragment]);
|
|
272218
|
-
var smartContractSetList = (gqlClient, options) => {
|
|
272219
|
-
return async (applicationId) => {
|
|
272220
|
-
const id = validate3(IdSchema3, applicationId);
|
|
272221
|
-
const {
|
|
272222
|
-
smartContractSets: { items }
|
|
272223
|
-
} = await gqlClient.request(getSmartContractSets, { id });
|
|
272224
|
-
return items;
|
|
272225
|
-
};
|
|
272226
|
-
};
|
|
272227
|
-
var smartContractSetRead = (gqlClient, options) => {
|
|
272228
|
-
return async (smartContractSetId) => {
|
|
272229
|
-
const id = validate3(IdSchema3, smartContractSetId);
|
|
272230
|
-
const { smartContractSet } = await gqlClient.request(getSmartContractSet, { id });
|
|
272231
|
-
return smartContractSet;
|
|
272232
|
-
};
|
|
272233
|
-
};
|
|
272234
|
-
var smartContractSetCreate = (gqlClient, options) => {
|
|
272235
|
-
return async (args) => {
|
|
272236
|
-
validate3(IdSchema3, args.applicationId);
|
|
272237
|
-
validate3(IdSchema3, args.blockchainNodeId);
|
|
272238
|
-
if (typeof args.userId === "string") {
|
|
272239
|
-
validate3(IdSchema3, args.userId);
|
|
272240
|
-
}
|
|
272241
|
-
const { createSmartContractSet: smartContractSet } = await gqlClient.request(createSmartContractSet, args);
|
|
272242
|
-
return smartContractSet;
|
|
272243
|
-
};
|
|
272244
|
-
};
|
|
272245
|
-
var smartContractSetRestart = (gqlClient, _options) => async (smartContractSetId) => {
|
|
272246
|
-
const id = validate3(IdSchema3, smartContractSetId);
|
|
272247
|
-
const { restartSmartContractSet: smartContractSet } = await gqlClient.request(restartSmartContractSet, {
|
|
272248
|
-
entityId: id
|
|
272491
|
+
var privateKeyRestart = (gqlClient, _options) => async (privateKeyUniqueName) => {
|
|
272492
|
+
const { restartPrivateKeyByUniqueName: privateKey } = await gqlClient.request(restartPrivateKey, {
|
|
272493
|
+
uniqueName: privateKeyUniqueName
|
|
272249
272494
|
});
|
|
272250
|
-
return
|
|
272251
|
-
};
|
|
272252
|
-
var StorageFragment = graphql(`
|
|
272253
|
-
fragment Storage on Storage {
|
|
272254
|
-
__typename
|
|
272255
|
-
id
|
|
272256
|
-
name
|
|
272257
|
-
status
|
|
272258
|
-
storageProtocol
|
|
272259
|
-
endpoints {
|
|
272260
|
-
id
|
|
272261
|
-
label
|
|
272262
|
-
displayValue
|
|
272263
|
-
}
|
|
272264
|
-
credentials {
|
|
272265
|
-
id
|
|
272266
|
-
label
|
|
272267
|
-
displayValue
|
|
272268
|
-
}
|
|
272269
|
-
}
|
|
272270
|
-
`);
|
|
272271
|
-
var getStorages = graphql(`
|
|
272272
|
-
query getStorages($id: ID!) {
|
|
272273
|
-
storages(applicationId: $id) {
|
|
272274
|
-
items {
|
|
272275
|
-
...Storage
|
|
272276
|
-
}
|
|
272277
|
-
}
|
|
272278
|
-
}`, [StorageFragment]);
|
|
272279
|
-
var getStorage = graphql(`
|
|
272280
|
-
query getStorage($id: ID!) {
|
|
272281
|
-
storage(entityId: $id) {
|
|
272282
|
-
...Storage
|
|
272283
|
-
}
|
|
272284
|
-
}
|
|
272285
|
-
`, [StorageFragment]);
|
|
272286
|
-
var createStorage = graphql(`
|
|
272287
|
-
mutation CreateStorage(
|
|
272288
|
-
$applicationId: ID!,
|
|
272289
|
-
$name: String!,
|
|
272290
|
-
$storageProtocol: StorageProtocol!,
|
|
272291
|
-
$provider: String!,
|
|
272292
|
-
$region: String!,
|
|
272293
|
-
$size: ClusterServiceSize
|
|
272294
|
-
$type: ClusterServiceType
|
|
272295
|
-
) {
|
|
272296
|
-
createStorage(
|
|
272297
|
-
applicationId: $applicationId,
|
|
272298
|
-
name: $name,
|
|
272299
|
-
storageProtocol: $storageProtocol,
|
|
272300
|
-
provider: $provider,
|
|
272301
|
-
region: $region,
|
|
272302
|
-
size: $size,
|
|
272303
|
-
type: $type
|
|
272304
|
-
) {
|
|
272305
|
-
...Storage
|
|
272306
|
-
}
|
|
272307
|
-
}
|
|
272308
|
-
`, [StorageFragment]);
|
|
272309
|
-
var restartStorage = graphql(`
|
|
272310
|
-
mutation RestartStorage($id: ID!) {
|
|
272311
|
-
restartStorage(entityId: $id) {
|
|
272312
|
-
...Storage
|
|
272313
|
-
}
|
|
272314
|
-
}
|
|
272315
|
-
`, [StorageFragment]);
|
|
272316
|
-
var storageList = (gqlClient, options) => {
|
|
272317
|
-
return async (applicationId) => {
|
|
272318
|
-
const id = validate3(IdSchema3, applicationId);
|
|
272319
|
-
const {
|
|
272320
|
-
storages: { items }
|
|
272321
|
-
} = await gqlClient.request(getStorages, { id });
|
|
272322
|
-
return items;
|
|
272323
|
-
};
|
|
272324
|
-
};
|
|
272325
|
-
var storageRead = (gqlClient, options) => {
|
|
272326
|
-
return async (storageId) => {
|
|
272327
|
-
const id = validate3(IdSchema3, storageId);
|
|
272328
|
-
const { storage } = await gqlClient.request(getStorage, { id });
|
|
272329
|
-
return storage;
|
|
272330
|
-
};
|
|
272331
|
-
};
|
|
272332
|
-
var storageCreate = (gqlClient, options) => {
|
|
272333
|
-
return async (args) => {
|
|
272334
|
-
validate3(IdSchema3, args.applicationId);
|
|
272335
|
-
const { createStorage: storage } = await gqlClient.request(createStorage, args);
|
|
272336
|
-
return storage;
|
|
272337
|
-
};
|
|
272338
|
-
};
|
|
272339
|
-
var storageRestart = (gqlClient, _options) => async (storageId) => {
|
|
272340
|
-
const id = validate3(IdSchema3, storageId);
|
|
272341
|
-
const { restartStorage: storage } = await gqlClient.request(restartStorage, { id });
|
|
272342
|
-
return storage;
|
|
272343
|
-
};
|
|
272344
|
-
var WorkspaceFragment = graphql(`
|
|
272345
|
-
fragment Workspace on Workspace {
|
|
272346
|
-
id
|
|
272347
|
-
name
|
|
272348
|
-
applications {
|
|
272349
|
-
...Application
|
|
272350
|
-
}
|
|
272351
|
-
}
|
|
272352
|
-
`, [ApplicationFragment]);
|
|
272353
|
-
var getWorkspacesAndApplications = graphql(`
|
|
272354
|
-
query getWorkspacesAndApplications {
|
|
272355
|
-
workspaces {
|
|
272356
|
-
...Workspace
|
|
272357
|
-
applications {
|
|
272358
|
-
...Application
|
|
272359
|
-
}
|
|
272360
|
-
childWorkspaces {
|
|
272361
|
-
...Workspace
|
|
272362
|
-
}
|
|
272363
|
-
}
|
|
272364
|
-
}
|
|
272365
|
-
`, [WorkspaceFragment, ApplicationFragment]);
|
|
272366
|
-
var getWorkspace = graphql(`
|
|
272367
|
-
query getWorkspace($id: ID!) {
|
|
272368
|
-
workspace(workspaceId: $id) {
|
|
272369
|
-
...Workspace
|
|
272370
|
-
applications {
|
|
272371
|
-
...Application
|
|
272372
|
-
}
|
|
272373
|
-
}
|
|
272374
|
-
}
|
|
272375
|
-
`, [WorkspaceFragment, ApplicationFragment]);
|
|
272376
|
-
var createWorkspace = graphql(`
|
|
272377
|
-
mutation CreateWorkspace(
|
|
272378
|
-
$addressLine1: String
|
|
272379
|
-
$addressLine2: String
|
|
272380
|
-
$city: String
|
|
272381
|
-
$companyName: String
|
|
272382
|
-
$country: String
|
|
272383
|
-
$name: String!
|
|
272384
|
-
$parentId: String
|
|
272385
|
-
$paymentMethodId: String
|
|
272386
|
-
$postalCode: String
|
|
272387
|
-
$taxIdType: String
|
|
272388
|
-
$taxIdValue: String
|
|
272389
|
-
) {
|
|
272390
|
-
createWorkspace(
|
|
272391
|
-
addressLine1: $addressLine1
|
|
272392
|
-
addressLine2: $addressLine2
|
|
272393
|
-
city: $city
|
|
272394
|
-
companyName: $companyName
|
|
272395
|
-
country: $country
|
|
272396
|
-
name: $name
|
|
272397
|
-
parentId: $parentId
|
|
272398
|
-
paymentMethodId: $paymentMethodId
|
|
272399
|
-
postalCode: $postalCode
|
|
272400
|
-
taxIdType: $taxIdType
|
|
272401
|
-
taxIdValue: $taxIdValue
|
|
272402
|
-
) {
|
|
272403
|
-
...Workspace
|
|
272404
|
-
applications {
|
|
272405
|
-
...Application
|
|
272406
|
-
}
|
|
272407
|
-
}
|
|
272408
|
-
}
|
|
272409
|
-
`, [WorkspaceFragment, ApplicationFragment]);
|
|
272410
|
-
var deleteWorkspace = graphql(`
|
|
272411
|
-
mutation deleteWorkspace($id: ID!) {
|
|
272412
|
-
deleteWorkspace(workspaceId: $id) {
|
|
272413
|
-
...Workspace
|
|
272414
|
-
applications {
|
|
272415
|
-
...Application
|
|
272416
|
-
}
|
|
272417
|
-
}
|
|
272418
|
-
}
|
|
272419
|
-
`, [WorkspaceFragment, ApplicationFragment]);
|
|
272420
|
-
var addCredits = graphql(`
|
|
272421
|
-
mutation addCredits($workspaceId: String!, $amount: Float!) {
|
|
272422
|
-
addCredits(workspaceId: $workspaceId, amount: $amount)
|
|
272423
|
-
}
|
|
272424
|
-
`);
|
|
272425
|
-
var workspaceList = (gqlClient, options) => {
|
|
272426
|
-
return async () => {
|
|
272427
|
-
const { workspaces } = await gqlClient.request(getWorkspacesAndApplications);
|
|
272428
|
-
const allWorkspaces = workspaces.reduce((acc, workspace) => {
|
|
272429
|
-
acc.push(workspace);
|
|
272430
|
-
if (workspace.childWorkspaces) {
|
|
272431
|
-
acc.push(...workspace.childWorkspaces);
|
|
272432
|
-
}
|
|
272433
|
-
return acc;
|
|
272434
|
-
}, []);
|
|
272435
|
-
return allWorkspaces.sort((a8, b4) => a8.name.localeCompare(b4.name));
|
|
272436
|
-
};
|
|
272437
|
-
};
|
|
272438
|
-
var workspaceRead = (gqlClient, options) => {
|
|
272439
|
-
return async (workspaceId) => {
|
|
272440
|
-
const id = validate3(IdSchema3, workspaceId);
|
|
272441
|
-
const { workspace } = await gqlClient.request(getWorkspace, { id });
|
|
272442
|
-
return workspace;
|
|
272443
|
-
};
|
|
272444
|
-
};
|
|
272445
|
-
var workspaceCreate = (gqlClient, options) => {
|
|
272446
|
-
return async (createWorkspaceArgs) => {
|
|
272447
|
-
const { createWorkspace: workspace } = await gqlClient.request(createWorkspace, createWorkspaceArgs);
|
|
272448
|
-
return workspace;
|
|
272449
|
-
};
|
|
272450
|
-
};
|
|
272451
|
-
var workspaceDelete = (gqlClient, options) => {
|
|
272452
|
-
return async (workspaceId) => {
|
|
272453
|
-
const id = validate3(IdSchema3, workspaceId);
|
|
272454
|
-
const { deleteWorkspace: workspace } = await gqlClient.request(deleteWorkspace, { id });
|
|
272455
|
-
return workspace;
|
|
272456
|
-
};
|
|
272457
|
-
};
|
|
272458
|
-
var workspaceAddCredits = (gqlClient, options) => {
|
|
272459
|
-
return async (workspaceId, amount) => {
|
|
272460
|
-
const id = validate3(IdSchema3, workspaceId);
|
|
272461
|
-
if (amount <= 0) {
|
|
272462
|
-
throw new Error("Credit amount must be a positive number");
|
|
272463
|
-
}
|
|
272464
|
-
const { addCredits: result } = await gqlClient.request(addCredits, { workspaceId: id, amount });
|
|
272465
|
-
return result;
|
|
272466
|
-
};
|
|
272495
|
+
return privateKey;
|
|
272467
272496
|
};
|
|
272468
272497
|
var ClientOptionsSchema = z3.object({
|
|
272469
272498
|
accessToken: AccessTokenSchema3,
|
|
@@ -272566,12 +272595,6 @@ function createSettleMintClient(options) {
|
|
|
272566
272595
|
update: customdeploymentUpdate(gqlClient, options),
|
|
272567
272596
|
restart: customDeploymentRestart(gqlClient, options)
|
|
272568
272597
|
},
|
|
272569
|
-
smartContractSet: {
|
|
272570
|
-
list: smartContractSetList(gqlClient, options),
|
|
272571
|
-
read: smartContractSetRead(gqlClient, options),
|
|
272572
|
-
create: smartContractSetCreate(gqlClient, options),
|
|
272573
|
-
restart: smartContractSetRestart(gqlClient, options)
|
|
272574
|
-
},
|
|
272575
272598
|
foundry: {
|
|
272576
272599
|
env: getEnv(gqlClient, options)
|
|
272577
272600
|
},
|
|
@@ -272776,7 +272799,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
|
272776
272799
|
}
|
|
272777
272800
|
});
|
|
272778
272801
|
const aat = await settlemint.applicationAccessToken.create({
|
|
272779
|
-
|
|
272802
|
+
applicationUniqueName: application.uniqueName,
|
|
272780
272803
|
name: name2,
|
|
272781
272804
|
blockchainNetworkScope: {
|
|
272782
272805
|
type: "ALL",
|
|
@@ -273232,23 +273255,23 @@ function connectCommand() {
|
|
|
273232
273255
|
await writeEnvSpinner(!!prod, {
|
|
273233
273256
|
SETTLEMINT_ACCESS_TOKEN: aatToken,
|
|
273234
273257
|
SETTLEMINT_INSTANCE: instance,
|
|
273235
|
-
SETTLEMINT_WORKSPACE: workspace.
|
|
273236
|
-
SETTLEMINT_APPLICATION: application.
|
|
273237
|
-
SETTLEMINT_BLOCKCHAIN_NETWORK: blockchainNode?.blockchainNetwork?.
|
|
273238
|
-
SETTLEMINT_BLOCKCHAIN_NODE: blockchainNode?.
|
|
273239
|
-
SETTLEMINT_HASURA: hasura?.
|
|
273258
|
+
SETTLEMINT_WORKSPACE: workspace.uniqueName,
|
|
273259
|
+
SETTLEMINT_APPLICATION: application.uniqueName,
|
|
273260
|
+
SETTLEMINT_BLOCKCHAIN_NETWORK: blockchainNode?.blockchainNetwork?.uniqueName,
|
|
273261
|
+
SETTLEMINT_BLOCKCHAIN_NODE: blockchainNode?.uniqueName,
|
|
273262
|
+
SETTLEMINT_HASURA: hasura?.uniqueName,
|
|
273240
273263
|
...getHasuraEndpoints(hasura),
|
|
273241
|
-
SETTLEMINT_THEGRAPH: thegraph?.
|
|
273264
|
+
SETTLEMINT_THEGRAPH: thegraph?.uniqueName,
|
|
273242
273265
|
...await getGraphEndpoint(thegraph, env2),
|
|
273243
273266
|
...getPortalEndpoints(portal),
|
|
273244
273267
|
SETTLEMINT_HD_PRIVATE_KEY: hdPrivateKey?.uniqueName,
|
|
273245
|
-
SETTLEMINT_MINIO: minio?.
|
|
273268
|
+
SETTLEMINT_MINIO: minio?.uniqueName,
|
|
273246
273269
|
...getMinioEndpoints(minio),
|
|
273247
273270
|
SETTLEMINT_IPFS: ipfs?.id,
|
|
273248
273271
|
...getIpfsEndpoints(ipfs),
|
|
273249
|
-
SETTLEMINT_CUSTOM_DEPLOYMENT: cDeployment?.
|
|
273272
|
+
SETTLEMINT_CUSTOM_DEPLOYMENT: cDeployment?.uniqueName,
|
|
273250
273273
|
SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT: cDeployment?.endpoints.find((endpoint) => endpoint.id.includes("internal"))?.displayValue,
|
|
273251
|
-
SETTLEMINT_BLOCKSCOUT: blockscout?.
|
|
273274
|
+
SETTLEMINT_BLOCKSCOUT: blockscout?.uniqueName,
|
|
273252
273275
|
...getBlockscoutEndpoints(blockscout)
|
|
273253
273276
|
});
|
|
273254
273277
|
outro("Connected to SettleMint");
|
|
@@ -273258,7 +273281,7 @@ function connectCommand() {
|
|
|
273258
273281
|
var package_default = {
|
|
273259
273282
|
name: "@settlemint/sdk-cli",
|
|
273260
273283
|
description: "SettleMint SDK, integrate SettleMint into your application with ease.",
|
|
273261
|
-
version: "0.7.0-
|
|
273284
|
+
version: "0.7.0-prf8aa7bb",
|
|
273262
273285
|
type: "module",
|
|
273263
273286
|
private: false,
|
|
273264
273287
|
license: "FSL-1.1-MIT",
|
|
@@ -273309,8 +273332,8 @@ var package_default = {
|
|
|
273309
273332
|
"@inquirer/input": "4.1.0",
|
|
273310
273333
|
"@inquirer/password": "4.0.3",
|
|
273311
273334
|
"@inquirer/select": "4.0.3",
|
|
273312
|
-
"@settlemint/sdk-js": "0.7.0-
|
|
273313
|
-
"@settlemint/sdk-utils": "0.7.0-
|
|
273335
|
+
"@settlemint/sdk-js": "0.7.0-prf8aa7bb",
|
|
273336
|
+
"@settlemint/sdk-utils": "0.7.0-prf8aa7bb",
|
|
273314
273337
|
"get-tsconfig": "4.8.1",
|
|
273315
273338
|
giget: "1.2.3"
|
|
273316
273339
|
},
|
|
@@ -274307,7 +274330,6 @@ var SETTLEMINT_CLIENT_MAP = {
|
|
|
274307
274330
|
"blockchain node": "blockchainNode",
|
|
274308
274331
|
"custom deployment": "customDeployment",
|
|
274309
274332
|
"private key": "privateKey",
|
|
274310
|
-
"smart contract set": "smartContractSet",
|
|
274311
274333
|
middleware: "middleware",
|
|
274312
274334
|
"integration tool": "integrationTool",
|
|
274313
274335
|
storage: "storage",
|
|
@@ -274319,7 +274341,7 @@ var SETTLEMINT_CLIENT_MAP = {
|
|
|
274319
274341
|
async function waitForCompletion({
|
|
274320
274342
|
settlemint,
|
|
274321
274343
|
type: type4,
|
|
274322
|
-
|
|
274344
|
+
uniqueName,
|
|
274323
274345
|
action,
|
|
274324
274346
|
maxTimeout = 15 * 60 * 1000
|
|
274325
274347
|
}) {
|
|
@@ -274338,7 +274360,7 @@ async function waitForCompletion({
|
|
|
274338
274360
|
const startTime = Date.now();
|
|
274339
274361
|
while (true) {
|
|
274340
274362
|
try {
|
|
274341
|
-
const resource = await service.read(
|
|
274363
|
+
const resource = await service.read(uniqueName);
|
|
274342
274364
|
if (resource.status === "COMPLETED") {
|
|
274343
274365
|
note(`${capitalizeFirstLetter(type4)} is ${getActionLabel(action)}`);
|
|
274344
274366
|
return true;
|
|
@@ -274352,7 +274374,7 @@ async function waitForCompletion({
|
|
|
274352
274374
|
note(`${capitalizeFirstLetter(type4)} is not ready yet (status: UNKNOWN)`);
|
|
274353
274375
|
}
|
|
274354
274376
|
if (Date.now() - startTime > maxTimeout) {
|
|
274355
|
-
throw new Error(`Operation timed out after ${maxTimeout / 60000} minutes for ${type4} with
|
|
274377
|
+
throw new Error(`Operation timed out after ${maxTimeout / 60000} minutes for ${type4} with unique name ${uniqueName}`);
|
|
274356
274378
|
}
|
|
274357
274379
|
await new Promise((resolve6) => setTimeout(resolve6, 5000));
|
|
274358
274380
|
}
|
|
@@ -274409,7 +274431,7 @@ ${createExamples(examples)}`).argument("<name>", `The ${type4} name`).option("-a
|
|
|
274409
274431
|
await waitForCompletion({
|
|
274410
274432
|
settlemint,
|
|
274411
274433
|
type: waitFor?.resourceType ?? type4,
|
|
274412
|
-
|
|
274434
|
+
uniqueName: waitFor?.uniqueName ?? result.uniqueName,
|
|
274413
274435
|
action: "deploy"
|
|
274414
274436
|
});
|
|
274415
274437
|
if (waitFor) {
|
|
@@ -274429,10 +274451,10 @@ ${createExamples(examples)}`).argument("<name>", `The ${type4} name`).option("-a
|
|
|
274429
274451
|
...updatedEnv
|
|
274430
274452
|
};
|
|
274431
274453
|
if (isApplicationChanged && updatedEnv.SETTLEMINT_APPLICATION) {
|
|
274432
|
-
newEnv.SETTLEMINT_WORKSPACE = (await settlemint.application.read(updatedEnv.SETTLEMINT_APPLICATION)).workspace.
|
|
274454
|
+
newEnv.SETTLEMINT_WORKSPACE = (await settlemint.application.read(updatedEnv.SETTLEMINT_APPLICATION)).workspace.uniqueName;
|
|
274433
274455
|
}
|
|
274434
274456
|
if (newEnv.SETTLEMINT_BLOCKCHAIN_NODE && newEnv.SETTLEMINT_BLOCKCHAIN_NODE !== env2.SETTLEMINT_BLOCKCHAIN_NODE) {
|
|
274435
|
-
newEnv.SETTLEMINT_BLOCKCHAIN_NETWORK = (await settlemint.blockchainNode.read(newEnv.SETTLEMINT_BLOCKCHAIN_NODE)).blockchainNetwork.
|
|
274457
|
+
newEnv.SETTLEMINT_BLOCKCHAIN_NETWORK = (await settlemint.blockchainNode.read(newEnv.SETTLEMINT_BLOCKCHAIN_NODE)).blockchainNetwork.uniqueName;
|
|
274436
274458
|
}
|
|
274437
274459
|
await writeEnvSpinner(!!prod, newEnv);
|
|
274438
274460
|
note(`${capitalizeFirstLetter(type4)} ${result.name} set as default`);
|
|
@@ -274449,8 +274471,8 @@ function blockchainNetworkBesuCreateCommand() {
|
|
|
274449
274471
|
type: "blockchain network",
|
|
274450
274472
|
alias: "b",
|
|
274451
274473
|
execute: (cmd2, baseAction) => {
|
|
274452
|
-
addClusterServiceArgs(cmd2).option("-a, --application
|
|
274453
|
-
|
|
274474
|
+
addClusterServiceArgs(cmd2).option("-a, --application <uniqueName>", "The unique name of the application to create the network in (defaults to application from env)").requiredOption("--node-name <name>", "Name of the node").option("--chain-id <chainId>", "The chain ID for the network", parseNumber).option("--contract-size-limit <limit>", "Maximum contract size limit", parseNumber).option("--evm-stack-size <size>", "EVM stack size", parseNumber).option("--gas-limit <limit>", "Block gas limit").option("--gas-price <price>", "Gas price in wei", parseNumber).option("--seconds-per-block <seconds>", "Block time in seconds", parseNumber).action(async (name2, {
|
|
274475
|
+
application,
|
|
274454
274476
|
chainId,
|
|
274455
274477
|
contractSizeLimit,
|
|
274456
274478
|
evmStackSize,
|
|
@@ -274465,10 +274487,10 @@ function blockchainNetworkBesuCreateCommand() {
|
|
|
274465
274487
|
...defaultArgs
|
|
274466
274488
|
}) => {
|
|
274467
274489
|
return baseAction(defaultArgs, async (settlemint, env2) => {
|
|
274468
|
-
const
|
|
274490
|
+
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
274469
274491
|
const result = await settlemint.blockchainNetwork.create({
|
|
274470
274492
|
name: name2,
|
|
274471
|
-
|
|
274493
|
+
applicationUniqueName,
|
|
274472
274494
|
nodeName,
|
|
274473
274495
|
consensusAlgorithm: "BESU_QBFT",
|
|
274474
274496
|
chainId,
|
|
@@ -274492,8 +274514,8 @@ function blockchainNetworkBesuCreateCommand() {
|
|
|
274492
274514
|
mapDefaultEnv: () => {
|
|
274493
274515
|
return {
|
|
274494
274516
|
SETTLEMINT_APPLICATION: application,
|
|
274495
|
-
SETTLEMINT_BLOCKCHAIN_NETWORK: result.
|
|
274496
|
-
SETTLEMINT_BLOCKCHAIN_NODE: blockchainNode?.
|
|
274517
|
+
SETTLEMINT_BLOCKCHAIN_NETWORK: result.uniqueName,
|
|
274518
|
+
SETTLEMINT_BLOCKCHAIN_NODE: blockchainNode?.uniqueName
|
|
274497
274519
|
};
|
|
274498
274520
|
}
|
|
274499
274521
|
};
|
|
@@ -274507,7 +274529,7 @@ function blockchainNetworkBesuCreateCommand() {
|
|
|
274507
274529
|
},
|
|
274508
274530
|
{
|
|
274509
274531
|
description: "Create a Besu blockchain network in a different application",
|
|
274510
|
-
command: "platform create blockchain-network besu my-network --application-
|
|
274532
|
+
command: "platform create blockchain-network besu my-network --application app-123 --node-name validator-1 --chain-id 12345 --gas-limit 10000000 --seconds-per-block 5"
|
|
274511
274533
|
}
|
|
274512
274534
|
]
|
|
274513
274535
|
});
|
|
@@ -274638,7 +274660,7 @@ function workspaceCreateCommand() {
|
|
|
274638
274660
|
result,
|
|
274639
274661
|
mapDefaultEnv: () => {
|
|
274640
274662
|
return {
|
|
274641
|
-
SETTLEMINT_WORKSPACE: result.
|
|
274663
|
+
SETTLEMINT_WORKSPACE: result.uniqueName
|
|
274642
274664
|
};
|
|
274643
274665
|
}
|
|
274644
274666
|
};
|
|
@@ -274669,10 +274691,11 @@ function applicationAccessTokenCreateCommand() {
|
|
|
274669
274691
|
type: "application access token",
|
|
274670
274692
|
alias: "aat",
|
|
274671
274693
|
execute: (cmd2, baseAction) => {
|
|
274672
|
-
cmd2.option("-a, --application
|
|
274694
|
+
cmd2.option("-a, --application <application>", "The application unique name to create the application access token for (defaults to application from env)").addOption(new Option("-v, --validity-period <period>", "The validity period for the token").choices(["DAYS_7", "DAYS_30", "DAYS_60", "DAYS_90", "NONE"]).default("DAYS_7")).action(async (name2, { application, validityPeriod, ...defaultArgs }) => {
|
|
274673
274695
|
return baseAction(defaultArgs, async (settlemint, env2) => {
|
|
274696
|
+
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
274674
274697
|
const aatToken = await settlemint.applicationAccessToken.create({
|
|
274675
|
-
|
|
274698
|
+
applicationUniqueName,
|
|
274676
274699
|
name: name2,
|
|
274677
274700
|
blockchainNetworkScope: {
|
|
274678
274701
|
type: "ALL",
|
|
@@ -274719,7 +274742,8 @@ function applicationAccessTokenCreateCommand() {
|
|
|
274719
274742
|
return {
|
|
274720
274743
|
result: {
|
|
274721
274744
|
id: "",
|
|
274722
|
-
name: name2
|
|
274745
|
+
name: name2,
|
|
274746
|
+
uniqueName: ""
|
|
274723
274747
|
},
|
|
274724
274748
|
mapDefaultEnv: () => ({
|
|
274725
274749
|
SETTLEMINT_ACCESS_TOKEN: aatToken
|
|
@@ -274752,18 +274776,17 @@ function applicationCreateCommand() {
|
|
|
274752
274776
|
type: "application",
|
|
274753
274777
|
alias: "a",
|
|
274754
274778
|
execute: (cmd2, baseAction) => {
|
|
274755
|
-
cmd2.option("-w, --workspace
|
|
274779
|
+
cmd2.option("-w, --workspace <workspace>", "The workspace unique name to create the application in (defaults to workspace from env)").action(async (name2, { workspace, ...defaultArgs }) => {
|
|
274756
274780
|
return baseAction(defaultArgs, async (settlemint, env2) => {
|
|
274757
|
-
const workspace = workspaceId ?? env2.SETTLEMINT_WORKSPACE;
|
|
274758
274781
|
const result = await settlemint.application.create({
|
|
274759
274782
|
name: name2,
|
|
274760
|
-
|
|
274783
|
+
workspaceUniqueName: workspace ?? env2.SETTLEMINT_WORKSPACE
|
|
274761
274784
|
});
|
|
274762
274785
|
return {
|
|
274763
274786
|
result,
|
|
274764
274787
|
mapDefaultEnv: () => {
|
|
274765
274788
|
return {
|
|
274766
|
-
SETTLEMINT_APPLICATION: result.
|
|
274789
|
+
SETTLEMINT_APPLICATION: result.uniqueName
|
|
274767
274790
|
};
|
|
274768
274791
|
}
|
|
274769
274792
|
};
|
|
@@ -274781,7 +274804,7 @@ function applicationCreateCommand() {
|
|
|
274781
274804
|
},
|
|
274782
274805
|
{
|
|
274783
274806
|
description: "Create an application in a specific workspace",
|
|
274784
|
-
command: "platform create application my-app --workspace-
|
|
274807
|
+
command: "platform create application my-app --workspace my-workspace"
|
|
274785
274808
|
}
|
|
274786
274809
|
]
|
|
274787
274810
|
});
|
|
@@ -274794,28 +274817,28 @@ function blockscoutInsightsCreateCommand() {
|
|
|
274794
274817
|
type: "insights",
|
|
274795
274818
|
alias: "bs",
|
|
274796
274819
|
execute: (cmd2, baseAction) => {
|
|
274797
|
-
addClusterServiceArgs(cmd2).option("--application
|
|
274820
|
+
addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").option("--load-balancer <loadBalancer>", "Load Balancer unique name (mutually exclusive with blockchain-node)").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name (mutually exclusive with load-balancer)").action(async (name2, { application, provider, region, size, type: type4, blockchainNode, loadBalancer, ...defaultArgs }) => {
|
|
274798
274821
|
return baseAction(defaultArgs, async (settlemint, env2) => {
|
|
274799
|
-
const
|
|
274800
|
-
const
|
|
274801
|
-
const
|
|
274822
|
+
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
274823
|
+
const blockchainNodeUniqueName = loadBalancer ? undefined : blockchainNode ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
|
|
274824
|
+
const loadBalancerUniqueName = blockchainNodeUniqueName ? undefined : loadBalancer ?? env2.SETTLEMINT_LOAD_BALANCER;
|
|
274802
274825
|
const result = await settlemint.insights.create({
|
|
274803
274826
|
name: name2,
|
|
274804
|
-
|
|
274827
|
+
applicationUniqueName,
|
|
274805
274828
|
insightsCategory: "BLOCKCHAIN_EXPLORER",
|
|
274806
274829
|
provider,
|
|
274807
274830
|
region,
|
|
274808
274831
|
size,
|
|
274809
274832
|
type: type4,
|
|
274810
|
-
|
|
274811
|
-
|
|
274833
|
+
blockchainNodeUniqueName,
|
|
274834
|
+
loadBalancerUniqueName
|
|
274812
274835
|
});
|
|
274813
274836
|
return {
|
|
274814
274837
|
result,
|
|
274815
274838
|
mapDefaultEnv: async () => {
|
|
274816
274839
|
return {
|
|
274817
274840
|
SETTLEMINT_APPLICATION: application,
|
|
274818
|
-
SETTLEMINT_BLOCKSCOUT: result.
|
|
274841
|
+
SETTLEMINT_BLOCKSCOUT: result.uniqueName,
|
|
274819
274842
|
...getBlockscoutEndpoints(result)
|
|
274820
274843
|
};
|
|
274821
274844
|
}
|
|
@@ -274830,7 +274853,7 @@ function blockscoutInsightsCreateCommand() {
|
|
|
274830
274853
|
},
|
|
274831
274854
|
{
|
|
274832
274855
|
description: "Create a Blockscout insights service in a different application",
|
|
274833
|
-
command: "platform create insights blockscout my-blockscout --application-
|
|
274856
|
+
command: "platform create insights blockscout my-blockscout --application app-123"
|
|
274834
274857
|
}
|
|
274835
274858
|
]
|
|
274836
274859
|
});
|
|
@@ -274850,12 +274873,12 @@ function hasuraIntegrationCreateCommand() {
|
|
|
274850
274873
|
type: "integration tool",
|
|
274851
274874
|
alias: "ha",
|
|
274852
274875
|
execute: (cmd2, baseAction) => {
|
|
274853
|
-
addClusterServiceArgs(cmd2).option("--application
|
|
274876
|
+
addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").action(async (name2, { application, provider, region, size, type: type4, ...defaultArgs }) => {
|
|
274854
274877
|
return baseAction(defaultArgs, async (settlemint, env2) => {
|
|
274855
|
-
const
|
|
274878
|
+
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
274856
274879
|
const result = await settlemint.integrationTool.create({
|
|
274857
274880
|
name: name2,
|
|
274858
|
-
|
|
274881
|
+
applicationUniqueName,
|
|
274859
274882
|
integrationType: "HASURA",
|
|
274860
274883
|
provider,
|
|
274861
274884
|
region,
|
|
@@ -274867,7 +274890,7 @@ function hasuraIntegrationCreateCommand() {
|
|
|
274867
274890
|
mapDefaultEnv: async () => {
|
|
274868
274891
|
return {
|
|
274869
274892
|
SETTLEMINT_APPLICATION: application,
|
|
274870
|
-
SETTLEMINT_HASURA: result.
|
|
274893
|
+
SETTLEMINT_HASURA: result.uniqueName,
|
|
274871
274894
|
...getHasuraEndpoints(result)
|
|
274872
274895
|
};
|
|
274873
274896
|
}
|
|
@@ -274882,7 +274905,7 @@ function hasuraIntegrationCreateCommand() {
|
|
|
274882
274905
|
},
|
|
274883
274906
|
{
|
|
274884
274907
|
description: "Create a Hasura integration in a different application",
|
|
274885
|
-
command: "platform create integration-tool hasura my-hasura --application-
|
|
274908
|
+
command: "platform create integration-tool hasura my-hasura --application app-123"
|
|
274886
274909
|
}
|
|
274887
274910
|
]
|
|
274888
274911
|
});
|
|
@@ -274902,17 +274925,15 @@ function graphMiddlewareCreateCommand() {
|
|
|
274902
274925
|
type: "middleware",
|
|
274903
274926
|
alias: "gr",
|
|
274904
274927
|
execute: (cmd2, baseAction) => {
|
|
274905
|
-
addClusterServiceArgs(cmd2).option("--application
|
|
274928
|
+
addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name").action(async (name2, { application, blockchainNode, provider, region, size, type: type4, ...defaultArgs }) => {
|
|
274906
274929
|
return baseAction(defaultArgs, async (settlemint, env2) => {
|
|
274907
|
-
const
|
|
274908
|
-
const
|
|
274909
|
-
const storage = storageId ?? env2.SETTLEMINT_IPFS;
|
|
274930
|
+
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
274931
|
+
const blockchainNodeUniqueName = blockchainNode ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
|
|
274910
274932
|
const result = await settlemint.middleware.create({
|
|
274911
274933
|
name: name2,
|
|
274912
|
-
|
|
274934
|
+
applicationUniqueName,
|
|
274913
274935
|
interface: "HA_GRAPH",
|
|
274914
|
-
|
|
274915
|
-
blockchainNodeId: blockchainNode,
|
|
274936
|
+
blockchainNodeUniqueName,
|
|
274916
274937
|
provider,
|
|
274917
274938
|
region,
|
|
274918
274939
|
size,
|
|
@@ -274924,7 +274945,7 @@ function graphMiddlewareCreateCommand() {
|
|
|
274924
274945
|
const resource = await settlemint.middleware.read(result.id);
|
|
274925
274946
|
return {
|
|
274926
274947
|
SETTLEMINT_APPLICATION: application,
|
|
274927
|
-
SETTLEMINT_THEGRAPH: result.
|
|
274948
|
+
SETTLEMINT_THEGRAPH: result.uniqueName,
|
|
274928
274949
|
...await getGraphEndpoint(resource, env2)
|
|
274929
274950
|
};
|
|
274930
274951
|
}
|
|
@@ -274939,7 +274960,7 @@ function graphMiddlewareCreateCommand() {
|
|
|
274939
274960
|
},
|
|
274940
274961
|
{
|
|
274941
274962
|
description: "Create a graph middleware in a different application",
|
|
274942
|
-
command: "platform create middleware graph my-graph --application-
|
|
274963
|
+
command: "platform create middleware graph my-graph --application my-app --blockchain-node node-123"
|
|
274943
274964
|
}
|
|
274944
274965
|
]
|
|
274945
274966
|
});
|
|
@@ -274953,16 +274974,16 @@ function smartContractPortalMiddlewareCreateCommand() {
|
|
|
274953
274974
|
type: "middleware",
|
|
274954
274975
|
alias: "scp",
|
|
274955
274976
|
execute: (cmd2, baseAction) => {
|
|
274956
|
-
addClusterServiceArgs(cmd2).option("--application
|
|
274977
|
+
addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").option("--load-balancer <loadBalancer>", "Load Balancer unique name (mutually exclusive with blockchain-node)").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name (mutually exclusive with load-balancer)").option("--abis <abis...>", "Path to abi file(s)").addOption(new Option("--include-predeployed-abis <includePredeployedAbis...>", "Include pre-deployed abis").choices([
|
|
274957
274978
|
"StarterKitERC20Registry",
|
|
274958
274979
|
"StarterKitERC20Factory",
|
|
274959
274980
|
"StarterKitERC20",
|
|
274960
274981
|
"StarterKitERC20DexFactory",
|
|
274961
274982
|
"StarterKitERC20Dex"
|
|
274962
274983
|
])).action(async (name2, {
|
|
274963
|
-
|
|
274964
|
-
|
|
274965
|
-
|
|
274984
|
+
application,
|
|
274985
|
+
blockchainNode,
|
|
274986
|
+
loadBalancer,
|
|
274966
274987
|
provider,
|
|
274967
274988
|
region,
|
|
274968
274989
|
size,
|
|
@@ -274972,9 +274993,9 @@ function smartContractPortalMiddlewareCreateCommand() {
|
|
|
274972
274993
|
...defaultArgs
|
|
274973
274994
|
}) => {
|
|
274974
274995
|
return baseAction(defaultArgs, async (settlemint, env2) => {
|
|
274975
|
-
const
|
|
274976
|
-
const
|
|
274977
|
-
const
|
|
274996
|
+
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
274997
|
+
const blockchainNodeUniqueName = loadBalancer ? undefined : blockchainNode ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
|
|
274998
|
+
const loadBalancerUniqueName = blockchainNodeUniqueName ? undefined : loadBalancer ?? env2.SETTLEMINT_LOAD_BALANCER;
|
|
274978
274999
|
const parsedAbis = [];
|
|
274979
275000
|
if (abis && abis.length > 0) {
|
|
274980
275001
|
try {
|
|
@@ -274991,10 +275012,10 @@ function smartContractPortalMiddlewareCreateCommand() {
|
|
|
274991
275012
|
}
|
|
274992
275013
|
const result = await settlemint.middleware.create({
|
|
274993
275014
|
name: name2,
|
|
274994
|
-
|
|
275015
|
+
applicationUniqueName,
|
|
274995
275016
|
interface: "SMART_CONTRACT_PORTAL",
|
|
274996
|
-
|
|
274997
|
-
|
|
275017
|
+
blockchainNodeUniqueName,
|
|
275018
|
+
loadBalancerUniqueName,
|
|
274998
275019
|
abis: parsedAbis,
|
|
274999
275020
|
includePredeployedAbis,
|
|
275000
275021
|
provider,
|
|
@@ -275007,7 +275028,7 @@ function smartContractPortalMiddlewareCreateCommand() {
|
|
|
275007
275028
|
mapDefaultEnv: async () => {
|
|
275008
275029
|
return {
|
|
275009
275030
|
SETTLEMINT_APPLICATION: application,
|
|
275010
|
-
SETTLEMINT_PORTAL: result.
|
|
275031
|
+
SETTLEMINT_PORTAL: result.uniqueName,
|
|
275011
275032
|
...getPortalEndpoints(result)
|
|
275012
275033
|
};
|
|
275013
275034
|
}
|
|
@@ -275022,7 +275043,7 @@ function smartContractPortalMiddlewareCreateCommand() {
|
|
|
275022
275043
|
},
|
|
275023
275044
|
{
|
|
275024
275045
|
description: "Create a smart contract portal middleware in a different application",
|
|
275025
|
-
command: "platform create middleware smart-contract-portal my-portal --application-
|
|
275046
|
+
command: "platform create middleware smart-contract-portal my-portal --application my-app --blockchain-node node-123"
|
|
275026
275047
|
}
|
|
275027
275048
|
]
|
|
275028
275049
|
});
|
|
@@ -275040,14 +275061,15 @@ function privateKeyHdCreateCommand() {
|
|
|
275040
275061
|
type: "private key",
|
|
275041
275062
|
alias: "hd",
|
|
275042
275063
|
execute: (cmd2, baseAction) => {
|
|
275043
|
-
addClusterServiceArgs(cmd2).option("--application
|
|
275064
|
+
addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name").action(async (name2, { application, blockchainNode, provider, region, size, type: type4, ...defaultArgs }) => {
|
|
275044
275065
|
return baseAction(defaultArgs, async (settlemint, env2) => {
|
|
275045
|
-
const
|
|
275066
|
+
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
275067
|
+
const blockchainNodeUniqueName = blockchainNode ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
|
|
275046
275068
|
const result = await settlemint.privateKey.create({
|
|
275047
275069
|
name: name2,
|
|
275048
|
-
|
|
275070
|
+
applicationUniqueName,
|
|
275049
275071
|
privateKeyType: "HD_ECDSA_P256",
|
|
275050
|
-
|
|
275072
|
+
blockchainNodeUniqueNames: blockchainNodeUniqueName ? [blockchainNodeUniqueName] : [],
|
|
275051
275073
|
provider,
|
|
275052
275074
|
region,
|
|
275053
275075
|
size,
|
|
@@ -275072,11 +275094,11 @@ function privateKeyHdCreateCommand() {
|
|
|
275072
275094
|
},
|
|
275073
275095
|
{
|
|
275074
275096
|
description: "Create a private key in a different application",
|
|
275075
|
-
command: "platform create private-key hd-ecdsa-p256 my-key --application-
|
|
275097
|
+
command: "platform create private-key hd-ecdsa-p256 my-key --application my-app"
|
|
275076
275098
|
},
|
|
275077
275099
|
{
|
|
275078
275100
|
description: "Create a private key linked to a blockchain node",
|
|
275079
|
-
command: "platform create private-key hd-ecdsa-p256 my-key --blockchain-node-
|
|
275101
|
+
command: "platform create private-key hd-ecdsa-p256 my-key --blockchain-node node-123"
|
|
275080
275102
|
}
|
|
275081
275103
|
]
|
|
275082
275104
|
});
|
|
@@ -275089,14 +275111,15 @@ function privateKeyHsmCreateCommand() {
|
|
|
275089
275111
|
type: "private key",
|
|
275090
275112
|
alias: "hd",
|
|
275091
275113
|
execute: (cmd2, baseAction) => {
|
|
275092
|
-
addClusterServiceArgs(cmd2).option("--application
|
|
275114
|
+
addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name").action(async (name2, { application, blockchainNode, provider, region, size, type: type4, ...defaultArgs }) => {
|
|
275093
275115
|
return baseAction(defaultArgs, async (settlemint, env2) => {
|
|
275094
|
-
const
|
|
275116
|
+
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
275117
|
+
const blockchainNodeUniqueName = blockchainNode ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
|
|
275095
275118
|
const result = await settlemint.privateKey.create({
|
|
275096
275119
|
name: name2,
|
|
275097
|
-
|
|
275120
|
+
applicationUniqueName,
|
|
275098
275121
|
privateKeyType: "HSM_ECDSA_P256",
|
|
275099
|
-
|
|
275122
|
+
blockchainNodeUniqueNames: blockchainNodeUniqueName ? [blockchainNodeUniqueName] : [],
|
|
275100
275123
|
provider,
|
|
275101
275124
|
region,
|
|
275102
275125
|
size,
|
|
@@ -275115,11 +275138,11 @@ function privateKeyHsmCreateCommand() {
|
|
|
275115
275138
|
},
|
|
275116
275139
|
{
|
|
275117
275140
|
description: "Create a private key in a different application",
|
|
275118
|
-
command: "platform create private-key hsm-ecdsa-p256 my-key --application
|
|
275141
|
+
command: "platform create private-key hsm-ecdsa-p256 my-key --application 123456789"
|
|
275119
275142
|
},
|
|
275120
275143
|
{
|
|
275121
275144
|
description: "Create a private key linked to a blockchain node",
|
|
275122
|
-
command: "platform create private-key hsm-ecdsa-p256 my-key --blockchain-node-
|
|
275145
|
+
command: "platform create private-key hsm-ecdsa-p256 my-key --blockchain-node node-123"
|
|
275123
275146
|
}
|
|
275124
275147
|
]
|
|
275125
275148
|
});
|
|
@@ -275137,12 +275160,12 @@ function ipfsStorageCreateCommand() {
|
|
|
275137
275160
|
type: "storage",
|
|
275138
275161
|
alias: "ip",
|
|
275139
275162
|
execute: (cmd2, baseAction) => {
|
|
275140
|
-
addClusterServiceArgs(cmd2).option("--application
|
|
275163
|
+
addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").action(async (name2, { application, provider, region, size, type: type4, ...defaultArgs }) => {
|
|
275141
275164
|
return baseAction(defaultArgs, async (settlemint, env2) => {
|
|
275142
|
-
const
|
|
275165
|
+
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
275143
275166
|
const result = await settlemint.storage.create({
|
|
275144
275167
|
name: name2,
|
|
275145
|
-
|
|
275168
|
+
applicationUniqueName,
|
|
275146
275169
|
storageProtocol: "IPFS",
|
|
275147
275170
|
provider,
|
|
275148
275171
|
region,
|
|
@@ -275153,8 +275176,7 @@ function ipfsStorageCreateCommand() {
|
|
|
275153
275176
|
result,
|
|
275154
275177
|
mapDefaultEnv: () => {
|
|
275155
275178
|
return {
|
|
275156
|
-
|
|
275157
|
-
SETTLEMINT_IPFS: result.id,
|
|
275179
|
+
SETTLEMINT_IPFS: result.uniqueName,
|
|
275158
275180
|
...getIpfsEndpoints(result)
|
|
275159
275181
|
};
|
|
275160
275182
|
}
|
|
@@ -275169,7 +275191,7 @@ function ipfsStorageCreateCommand() {
|
|
|
275169
275191
|
},
|
|
275170
275192
|
{
|
|
275171
275193
|
description: "Create an IPFS storage in a different application",
|
|
275172
|
-
command: "platform create storage ipfs my-storage --application
|
|
275194
|
+
command: "platform create storage ipfs my-storage --application app-123"
|
|
275173
275195
|
}
|
|
275174
275196
|
]
|
|
275175
275197
|
});
|
|
@@ -275182,12 +275204,12 @@ function minioStorageCreateCommand() {
|
|
|
275182
275204
|
type: "storage",
|
|
275183
275205
|
alias: "m",
|
|
275184
275206
|
execute: (cmd2, baseAction) => {
|
|
275185
|
-
addClusterServiceArgs(cmd2).option("--application
|
|
275207
|
+
addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").action(async (name2, { application, provider, region, size, type: type4, ...defaultArgs }) => {
|
|
275186
275208
|
return baseAction(defaultArgs, async (settlemint, env2) => {
|
|
275187
|
-
const
|
|
275209
|
+
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
275188
275210
|
const result = await settlemint.storage.create({
|
|
275189
275211
|
name: name2,
|
|
275190
|
-
|
|
275212
|
+
applicationUniqueName,
|
|
275191
275213
|
storageProtocol: "MINIO",
|
|
275192
275214
|
provider,
|
|
275193
275215
|
region,
|
|
@@ -275199,7 +275221,7 @@ function minioStorageCreateCommand() {
|
|
|
275199
275221
|
mapDefaultEnv: () => {
|
|
275200
275222
|
return {
|
|
275201
275223
|
SETTLEMINT_APPLICATION: application,
|
|
275202
|
-
SETTLEMINT_MINIO: result.
|
|
275224
|
+
SETTLEMINT_MINIO: result.uniqueName,
|
|
275203
275225
|
...getMinioEndpoints(result)
|
|
275204
275226
|
};
|
|
275205
275227
|
}
|
|
@@ -275214,7 +275236,7 @@ function minioStorageCreateCommand() {
|
|
|
275214
275236
|
},
|
|
275215
275237
|
{
|
|
275216
275238
|
description: "Create a MinIO storage in a different application",
|
|
275217
|
-
command: "platform create storage minio my-storage --application
|
|
275239
|
+
command: "platform create storage minio my-storage --application app-123"
|
|
275218
275240
|
}
|
|
275219
275241
|
]
|
|
275220
275242
|
});
|
|
@@ -275260,11 +275282,11 @@ function getDeleteCommand({
|
|
|
275260
275282
|
deleteFunction,
|
|
275261
275283
|
usePersonalAccessToken = true
|
|
275262
275284
|
}) {
|
|
275263
|
-
return new Command2(sanitizeCommandName(name2)).alias(alias).description(`Delete a ${type4} in the SettleMint platform. Provide the ${type4}
|
|
275285
|
+
return new Command2(sanitizeCommandName(name2)).alias(alias).description(`Delete a ${type4} in the SettleMint platform. Provide the ${type4} unique name or use 'default' to delete the default ${type4} from your .env file.
|
|
275264
275286
|
${createExamples([
|
|
275265
275287
|
{
|
|
275266
|
-
description: `Deletes the specified ${type4} by
|
|
275267
|
-
command: `platform delete ${type4} <${type4}-
|
|
275288
|
+
description: `Deletes the specified ${type4} by unique name`,
|
|
275289
|
+
command: `platform delete ${type4} <${type4}-unique-name>`
|
|
275268
275290
|
},
|
|
275269
275291
|
{
|
|
275270
275292
|
description: `Deletes the default ${type4} in the production environment`,
|
|
@@ -275272,9 +275294,9 @@ ${createExamples([
|
|
|
275272
275294
|
},
|
|
275273
275295
|
{
|
|
275274
275296
|
description: `Force deletes the specified ${type4} without confirmation`,
|
|
275275
|
-
command: `platform delete ${type4} <${type4}-
|
|
275297
|
+
command: `platform delete ${type4} <${type4}-unique-name> --force`
|
|
275276
275298
|
}
|
|
275277
|
-
])}`).argument("<
|
|
275299
|
+
])}`).argument("<uniqueName>", `The unique name of the ${type4}, use 'default' to delete the default one from your .env file`).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-w, --wait", "Wait until destroyed").option("-f, --force", `Force delete the ${type4} without confirmation`).action(async (uniqueName, { acceptDefaults, prod, force, wait }) => {
|
|
275278
275300
|
intro(`Deleting ${type4} in the SettleMint platform`);
|
|
275279
275301
|
if (!force) {
|
|
275280
275302
|
await deleteConfirmationPrompt(`this ${type4}`);
|
|
@@ -275290,19 +275312,19 @@ ${createExamples([
|
|
|
275290
275312
|
accessToken,
|
|
275291
275313
|
instance
|
|
275292
275314
|
});
|
|
275293
|
-
const
|
|
275294
|
-
const
|
|
275295
|
-
if (!
|
|
275315
|
+
const isDefaultUniqueName = uniqueName === "default";
|
|
275316
|
+
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
|
275317
|
+
if (!serviceUniqueName) {
|
|
275296
275318
|
throw new Error(`No default ${type4} found in your .env file. Please provide a valid ${type4} ID or set a default ${type4} first.`);
|
|
275297
275319
|
}
|
|
275298
275320
|
const result = await spinner({
|
|
275299
275321
|
startMessage: `Deleting ${type4}`,
|
|
275300
275322
|
task: async () => {
|
|
275301
|
-
return deleteFunction(settlemint,
|
|
275323
|
+
return deleteFunction(settlemint, serviceUniqueName);
|
|
275302
275324
|
},
|
|
275303
275325
|
stopMessage: `${capitalizeFirstLetter(type4)} deleted`
|
|
275304
275326
|
});
|
|
275305
|
-
if (
|
|
275327
|
+
if (isDefaultUniqueName) {
|
|
275306
275328
|
const newEnv = {
|
|
275307
275329
|
SETTLEMINT_ACCESS_TOKEN: usePersonalAccessToken ? env2.SETTLEMINT_ACCESS_TOKEN : accessToken,
|
|
275308
275330
|
SETTLEMINT_INSTANCE: instance,
|
|
@@ -275312,7 +275334,7 @@ ${createExamples([
|
|
|
275312
275334
|
note(`${capitalizeFirstLetter(type4)} removed as default`);
|
|
275313
275335
|
}
|
|
275314
275336
|
if (wait) {
|
|
275315
|
-
await waitForCompletion({ settlemint, type: type4,
|
|
275337
|
+
await waitForCompletion({ settlemint, type: type4, uniqueName: serviceUniqueName, action: "destroy" });
|
|
275316
275338
|
}
|
|
275317
275339
|
outro(`${capitalizeFirstLetter(type4)} ${result.name} deleted successfully`);
|
|
275318
275340
|
});
|
|
@@ -275325,8 +275347,8 @@ function workspaceDeleteCommand() {
|
|
|
275325
275347
|
type: "workspace",
|
|
275326
275348
|
alias: "w",
|
|
275327
275349
|
envKey: "SETTLEMINT_WORKSPACE",
|
|
275328
|
-
deleteFunction: async (settlemint,
|
|
275329
|
-
return settlemint.workspace.delete(
|
|
275350
|
+
deleteFunction: async (settlemint, uniqueName) => {
|
|
275351
|
+
return settlemint.workspace.delete(uniqueName);
|
|
275330
275352
|
}
|
|
275331
275353
|
});
|
|
275332
275354
|
}
|
|
@@ -275375,7 +275397,7 @@ ${createExamples([
|
|
|
275375
275397
|
description: `Restarts the default ${type4} in the production environment`,
|
|
275376
275398
|
command: `platform restart ${commandName}${subType ? ` ${subType}` : ""} default --prod`
|
|
275377
275399
|
}
|
|
275378
|
-
])}`).argument("<
|
|
275400
|
+
])}`).argument("<uniqueName>", `The unique name of the ${type4}, use 'default' to restart the default one from your .env file`).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-w, --wait", "Wait until restarted").action(async (uniqueName, { acceptDefaults, prod, wait }) => {
|
|
275379
275401
|
intro(`Restarting ${type4} in the SettleMint platform`);
|
|
275380
275402
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
275381
275403
|
const env2 = await loadEnv2(false, !!prod);
|
|
@@ -275388,20 +275410,20 @@ ${createExamples([
|
|
|
275388
275410
|
accessToken,
|
|
275389
275411
|
instance
|
|
275390
275412
|
});
|
|
275391
|
-
const
|
|
275392
|
-
const
|
|
275393
|
-
if (!
|
|
275394
|
-
throw new Error(`No default ${type4} found in your .env file. Please provide a valid ${type4}
|
|
275413
|
+
const isDefaultUniqueName = uniqueName === "default";
|
|
275414
|
+
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
|
275415
|
+
if (!serviceUniqueName) {
|
|
275416
|
+
throw new Error(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
|
|
275395
275417
|
}
|
|
275396
275418
|
const result = await spinner({
|
|
275397
275419
|
startMessage: `Restarting ${type4}`,
|
|
275398
275420
|
task: async () => {
|
|
275399
|
-
return restartFunction(settlemint,
|
|
275421
|
+
return restartFunction(settlemint, serviceUniqueName);
|
|
275400
275422
|
},
|
|
275401
275423
|
stopMessage: `${capitalizeFirstLetter(type4)} restart initiated`
|
|
275402
275424
|
});
|
|
275403
275425
|
if (wait) {
|
|
275404
|
-
await waitForCompletion({ settlemint, type: type4,
|
|
275426
|
+
await waitForCompletion({ settlemint, type: type4, uniqueName: serviceUniqueName, action: "restart" });
|
|
275405
275427
|
}
|
|
275406
275428
|
outro(`${capitalizeFirstLetter(type4)} ${result.name} restart initiated successfully`);
|
|
275407
275429
|
});
|
|
@@ -275414,8 +275436,8 @@ function blockchainNetworkRestartCommand() {
|
|
|
275414
275436
|
type: "blockchain network",
|
|
275415
275437
|
alias: "bn",
|
|
275416
275438
|
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
|
275417
|
-
restartFunction: async (settlemint,
|
|
275418
|
-
return settlemint.blockchainNetwork.restart(
|
|
275439
|
+
restartFunction: async (settlemint, uniqueName) => {
|
|
275440
|
+
return settlemint.blockchainNetwork.restart(uniqueName);
|
|
275419
275441
|
}
|
|
275420
275442
|
});
|
|
275421
275443
|
}
|
|
@@ -275427,8 +275449,8 @@ function customDeploymentRestartCommand() {
|
|
|
275427
275449
|
type: "custom deployment",
|
|
275428
275450
|
alias: "cd",
|
|
275429
275451
|
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
|
275430
|
-
restartFunction: async (settlemint,
|
|
275431
|
-
return settlemint.customDeployment.restart(
|
|
275452
|
+
restartFunction: async (settlemint, uniqueName) => {
|
|
275453
|
+
return settlemint.customDeployment.restart(uniqueName);
|
|
275432
275454
|
},
|
|
275433
275455
|
usePersonalAccessToken: false
|
|
275434
275456
|
});
|
|
@@ -275442,8 +275464,8 @@ function blockscoutRestartCommand() {
|
|
|
275442
275464
|
subType: "blockscout",
|
|
275443
275465
|
alias: "bs",
|
|
275444
275466
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
|
275445
|
-
restartFunction: async (settlemint,
|
|
275446
|
-
return settlemint.insights.restart(
|
|
275467
|
+
restartFunction: async (settlemint, uniqueName) => {
|
|
275468
|
+
return settlemint.insights.restart(uniqueName);
|
|
275447
275469
|
}
|
|
275448
275470
|
});
|
|
275449
275471
|
}
|
|
@@ -275461,8 +275483,8 @@ function hasuraRestartCommand() {
|
|
|
275461
275483
|
subType: "hasura",
|
|
275462
275484
|
alias: "ha",
|
|
275463
275485
|
envKey: "SETTLEMINT_HASURA",
|
|
275464
|
-
restartFunction: async (settlemint,
|
|
275465
|
-
return settlemint.integrationTool.restart(
|
|
275486
|
+
restartFunction: async (settlemint, uniqueName) => {
|
|
275487
|
+
return settlemint.integrationTool.restart(uniqueName);
|
|
275466
275488
|
}
|
|
275467
275489
|
});
|
|
275468
275490
|
}
|
|
@@ -275494,8 +275516,8 @@ function smartContractPortalRestartCommand() {
|
|
|
275494
275516
|
subType: "smart-contract-portal",
|
|
275495
275517
|
alias: "scp",
|
|
275496
275518
|
envKey: "SETTLEMINT_PORTAL",
|
|
275497
|
-
restartFunction: async (settlemint,
|
|
275498
|
-
return settlemint.middleware.restart(
|
|
275519
|
+
restartFunction: async (settlemint, uniqueName) => {
|
|
275520
|
+
return settlemint.middleware.restart(uniqueName);
|
|
275499
275521
|
}
|
|
275500
275522
|
});
|
|
275501
275523
|
}
|
|
@@ -275513,8 +275535,8 @@ function hdEcdsaP256RestartCommand() {
|
|
|
275513
275535
|
subType: "hd-ecdsa-p256",
|
|
275514
275536
|
alias: "hd",
|
|
275515
275537
|
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
|
275516
|
-
restartFunction: async (settlemint,
|
|
275517
|
-
return settlemint.privateKey.restart(
|
|
275538
|
+
restartFunction: async (settlemint, uniqueName) => {
|
|
275539
|
+
return settlemint.privateKey.restart(uniqueName);
|
|
275518
275540
|
}
|
|
275519
275541
|
});
|
|
275520
275542
|
}
|
|
@@ -275531,8 +275553,8 @@ function ipfsRestartCommand() {
|
|
|
275531
275553
|
type: "storage",
|
|
275532
275554
|
alias: "ip",
|
|
275533
275555
|
envKey: "SETTLEMINT_IPFS",
|
|
275534
|
-
restartFunction: async (settlemint,
|
|
275535
|
-
return settlemint.storage.restart(
|
|
275556
|
+
restartFunction: async (settlemint, uniqueName) => {
|
|
275557
|
+
return settlemint.storage.restart(uniqueName);
|
|
275536
275558
|
}
|
|
275537
275559
|
});
|
|
275538
275560
|
}
|
|
@@ -275544,8 +275566,8 @@ function minioRestartCommand() {
|
|
|
275544
275566
|
type: "storage",
|
|
275545
275567
|
alias: "m",
|
|
275546
275568
|
envKey: "SETTLEMINT_MINIO",
|
|
275547
|
-
restartFunction: async (settlemint,
|
|
275548
|
-
return settlemint.storage.restart(
|
|
275569
|
+
restartFunction: async (settlemint, uniqueName) => {
|
|
275570
|
+
return settlemint.storage.restart(uniqueName);
|
|
275549
275571
|
}
|
|
275550
275572
|
});
|
|
275551
275573
|
}
|
|
@@ -275563,12 +275585,12 @@ function restartCommand() {
|
|
|
275563
275585
|
|
|
275564
275586
|
// src/commands/platform/custom-deployments/update.ts
|
|
275565
275587
|
function customDeploymentsUpdateCommand() {
|
|
275566
|
-
return new Command2("custom-deployment").alias("custom-deployments").alias("cd").argument("<tag>", "The tag to update the custom deployment to").option("--
|
|
275588
|
+
return new Command2("custom-deployment").alias("custom-deployments").alias("cd").argument("<tag>", "The tag to update the custom deployment to").option("--unique-name <uniqueName>", "The unique name of the custom deployment to update. If not provided, will use SETTLEMINT_CUSTOM_DEPLOYMENT from env").option("--prod", "Connect to your production environment").option("--wait", "Wait for the custom deployment to be redeployed").description("Update a custom deployment in the SettleMint platform").action(async (tag, { uniqueName, prod, wait }) => {
|
|
275567
275589
|
intro("Updating custom deployment in the SettleMint platform");
|
|
275568
275590
|
const env2 = await loadEnv2(false, !!prod);
|
|
275569
|
-
const
|
|
275570
|
-
if (!
|
|
275571
|
-
throw new Error("No custom deployment
|
|
275591
|
+
const customDeploymentUniqueName = uniqueName ?? env2.SETTLEMINT_CUSTOM_DEPLOYMENT;
|
|
275592
|
+
if (!customDeploymentUniqueName) {
|
|
275593
|
+
throw new Error("No custom deployment unique name specified. Please provide it either via the --unique-name flag or by setting the SETTLEMINT_CUSTOM_DEPLOYMENT environment variable");
|
|
275572
275594
|
}
|
|
275573
275595
|
const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
|
275574
275596
|
if (!accessToken) {
|
|
@@ -275582,12 +275604,17 @@ function customDeploymentsUpdateCommand() {
|
|
|
275582
275604
|
const customDeployment = await spinner({
|
|
275583
275605
|
startMessage: "Updating custom deployment",
|
|
275584
275606
|
task: async () => {
|
|
275585
|
-
return settlemint.customDeployment.update(
|
|
275607
|
+
return settlemint.customDeployment.update(customDeploymentUniqueName, tag);
|
|
275586
275608
|
},
|
|
275587
275609
|
stopMessage: "Custom deployment updated"
|
|
275588
275610
|
});
|
|
275589
275611
|
if (wait) {
|
|
275590
|
-
await waitForCompletion({
|
|
275612
|
+
await waitForCompletion({
|
|
275613
|
+
settlemint,
|
|
275614
|
+
type: "custom deployment",
|
|
275615
|
+
uniqueName: customDeployment.uniqueName,
|
|
275616
|
+
action: "deploy"
|
|
275617
|
+
});
|
|
275591
275618
|
}
|
|
275592
275619
|
outro(`${customDeployment.name} updated to ${tag}`);
|
|
275593
275620
|
});
|
|
@@ -275976,7 +276003,7 @@ function isHardhatConfig(config4) {
|
|
|
275976
276003
|
|
|
275977
276004
|
// src/commands/smart-contract-set/hardhat/deploy/remote.ts
|
|
275978
276005
|
function hardhatDeployRemoteCommand() {
|
|
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
|
|
276006
|
+
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 <blockchainNode>", "Blockchain Node unique name (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
276007
|
cmd2.action(async ({
|
|
275981
276008
|
module,
|
|
275982
276009
|
reset: reset2,
|
|
@@ -275987,7 +276014,7 @@ function hardhatDeployRemoteCommand() {
|
|
|
275987
276014
|
strategy,
|
|
275988
276015
|
prod,
|
|
275989
276016
|
acceptDefaults,
|
|
275990
|
-
|
|
276017
|
+
blockchainNode: blockchainNodeUniqueName
|
|
275991
276018
|
}) => {
|
|
275992
276019
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
275993
276020
|
const env2 = await loadEnv(false, !!prod);
|
|
@@ -276001,7 +276028,7 @@ function hardhatDeployRemoteCommand() {
|
|
|
276001
276028
|
instance
|
|
276002
276029
|
});
|
|
276003
276030
|
let node = undefined;
|
|
276004
|
-
if (!
|
|
276031
|
+
if (!blockchainNodeUniqueName) {
|
|
276005
276032
|
const blockchainNodes = await settlemint.blockchainNode.list(env2.SETTLEMINT_APPLICATION);
|
|
276006
276033
|
if (blockchainNodes.length === 0) {
|
|
276007
276034
|
cancel2("No blockchain nodes found. Please create a blockchain node and try again.");
|
|
@@ -276017,7 +276044,7 @@ function hardhatDeployRemoteCommand() {
|
|
|
276017
276044
|
}
|
|
276018
276045
|
node = blockchainNode;
|
|
276019
276046
|
} else {
|
|
276020
|
-
node = await settlemint.blockchainNode.read(
|
|
276047
|
+
node = await settlemint.blockchainNode.read(blockchainNodeUniqueName);
|
|
276021
276048
|
}
|
|
276022
276049
|
const envConfig = await settlemint.foundry.env(node.id);
|
|
276023
276050
|
const hardhatConfig = await getHardhatConfigData(envConfig);
|
|
@@ -276083,8 +276110,8 @@ function hardhatScriptLocalCommand() {
|
|
|
276083
276110
|
|
|
276084
276111
|
// src/commands/smart-contract-set/hardhat/script/remote.ts
|
|
276085
276112
|
function hardhatScriptRemoteCommand() {
|
|
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
|
|
276087
|
-
cmd2.action(async ({ script, prod,
|
|
276113
|
+
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 <blockchainNode>", "Blockchain Node unique name (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");
|
|
276114
|
+
cmd2.action(async ({ script, prod, blockchainNode: blockchainNodeUniqueName, acceptDefaults, compile }) => {
|
|
276088
276115
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
276089
276116
|
const env2 = await loadEnv(false, !!prod);
|
|
276090
276117
|
const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
|
@@ -276096,16 +276123,16 @@ function hardhatScriptRemoteCommand() {
|
|
|
276096
276123
|
accessToken,
|
|
276097
276124
|
instance
|
|
276098
276125
|
});
|
|
276099
|
-
let
|
|
276100
|
-
if (!
|
|
276126
|
+
let nodeUniqueName = blockchainNodeUniqueName;
|
|
276127
|
+
if (!nodeUniqueName) {
|
|
276101
276128
|
const blockchainNodes = await settlemint.blockchainNode.list(env2.SETTLEMINT_APPLICATION);
|
|
276102
276129
|
const blockchainNode = await blockchainNodePrompt(env2, blockchainNodes, autoAccept);
|
|
276103
276130
|
if (!blockchainNode) {
|
|
276104
276131
|
cancel2("No Blockchain Node selected. Please select one to continue.");
|
|
276105
276132
|
}
|
|
276106
|
-
|
|
276133
|
+
nodeUniqueName = blockchainNode.uniqueName;
|
|
276107
276134
|
}
|
|
276108
|
-
const envConfig = await settlemint.foundry.env(
|
|
276135
|
+
const envConfig = await settlemint.foundry.env(nodeUniqueName);
|
|
276109
276136
|
const { command, args } = await getPackageManagerExecutable();
|
|
276110
276137
|
await executeCommand(command, [...args, "hardhat", "run", script, "--network", "btp", ...compile ? ["--no-compile"] : []], { env: envConfig });
|
|
276111
276138
|
});
|
|
@@ -276508,4 +276535,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
|
|
|
276508
276535
|
cancel2(reason);
|
|
276509
276536
|
});
|
|
276510
276537
|
|
|
276511
|
-
//# debugId=
|
|
276538
|
+
//# debugId=C2FD654AB671908864756E2164756E21
|