@settlemint/sdk-cli 0.8.6-pr9ae75c81 → 0.8.6-prc2be80e8
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/README.md +24 -14
- package/dist/cli.js +219 -56
- package/dist/cli.js.map +27 -27
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
Integrate SettleMint into your application with ease.
|
|
8
8
|
</p>
|
|
9
9
|
</p>
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
<p align="center">
|
|
12
12
|
<a href="https://github.com/settlemint/sdk/actions?query=branch%3Amain"><img src="https://github.com/settlemint/sdk/actions/workflows/build.yml/badge.svg?event=push&branch=main" alt="CI status" /></a>
|
|
13
13
|
<a href="https://fsl.software" rel="nofollow"><img src="https://img.shields.io/npm/l/@settlemint/sdk-cli" alt="License"></a>
|
|
@@ -26,23 +26,33 @@
|
|
|
26
26
|
<br />
|
|
27
27
|
</div>
|
|
28
28
|
|
|
29
|
-
##
|
|
29
|
+
## Table of Contents
|
|
30
|
+
|
|
31
|
+
- [About](#about)
|
|
32
|
+
- [API Reference](#api-reference)
|
|
33
|
+
- [Contributing](#contributing)
|
|
34
|
+
- [License](#license)
|
|
30
35
|
|
|
31
|
-
|
|
36
|
+
## About
|
|
32
37
|
|
|
33
|
-
|
|
34
|
-
# Using npx
|
|
35
|
-
npx @settlemint/sdk-cli@latest create
|
|
38
|
+
The SettleMint CLI provides a command-line interface for interacting with the SettleMint platform. It enables you to manage your blockchain networks, deploy smart contracts, configure your SettleMint infrastructure directly from the terminal.
|
|
36
39
|
|
|
37
|
-
|
|
38
|
-
bunx @settlemint/sdk-cli@latest create
|
|
40
|
+
## API Reference
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
pnpm dlx @settlemint/sdk-cli@latest create
|
|
42
|
-
```
|
|
42
|
+
See the [documentation](./docs/settlemint.md) for available commands.
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
## Contributing
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
We welcome contributions to the SettleMint SDK! If you'd like to contribute, please follow these steps:
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
1. Fork the repository
|
|
49
|
+
2. Create a new branch for your feature or bug fix
|
|
50
|
+
3. Make your changes and commit them with a clear commit message
|
|
51
|
+
4. Push your changes to your fork
|
|
52
|
+
5. Create a pull request to the main repository
|
|
53
|
+
|
|
54
|
+
Please ensure that your code follows the existing style and includes appropriate tests and documentation.
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
|
|
58
|
+
The SettleMint SDK is released under the [FSL Software License](https://fsl.software). See the [LICENSE](LICENSE) file for more details.
|
package/dist/cli.js
CHANGED
|
@@ -19645,7 +19645,7 @@ var require_lib4 = __commonJS((exports, module) => {
|
|
|
19645
19645
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
19646
19646
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
19647
19647
|
var getPathInfo = (cmd, {
|
|
19648
|
-
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.
|
|
19648
|
+
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.4dWmgqECra:/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",
|
|
19649
19649
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
19650
19650
|
delimiter: optDelimiter = delimiter
|
|
19651
19651
|
}) => {
|
|
@@ -19849,7 +19849,7 @@ var require_lib5 = __commonJS((exports, module) => {
|
|
|
19849
19849
|
let pathToInitial;
|
|
19850
19850
|
try {
|
|
19851
19851
|
pathToInitial = which.sync(initialCmd, {
|
|
19852
|
-
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.
|
|
19852
|
+
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.4dWmgqECra:/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",
|
|
19853
19853
|
pathext: options.env && findInObject(options.env, "PATHEXT") || process.env.PATHEXT
|
|
19854
19854
|
}).toLowerCase();
|
|
19855
19855
|
} catch (err) {
|
|
@@ -20566,7 +20566,7 @@ var require_lib6 = __commonJS((exports, module) => {
|
|
|
20566
20566
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
20567
20567
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
20568
20568
|
var getPathInfo = (cmd, {
|
|
20569
|
-
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.
|
|
20569
|
+
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.4dWmgqECra:/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",
|
|
20570
20570
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
20571
20571
|
delimiter: optDelimiter = delimiter
|
|
20572
20572
|
}) => {
|
|
@@ -223340,7 +223340,7 @@ ${Bt.cyan(Yt)}
|
|
|
223340
223340
|
code: "ENOENT"
|
|
223341
223341
|
}), getPathInfo = (e9, t7) => {
|
|
223342
223342
|
var r6 = t7.colon || or;
|
|
223343
|
-
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.
|
|
223343
|
+
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.4dWmgqECra:/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)];
|
|
223344
223344
|
var n6 = nr ? t7.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
223345
223345
|
var a5 = nr ? n6.split(r6) : [""];
|
|
223346
223346
|
if (nr) {
|
|
@@ -226477,7 +226477,7 @@ ${whileRunning(e9)}`;
|
|
|
226477
226477
|
};
|
|
226478
226478
|
ni = Object.assign(async function _main() {
|
|
226479
226479
|
var e9 = new Cli({
|
|
226480
|
-
binaryVersion: "0.8.6-
|
|
226480
|
+
binaryVersion: "0.8.6-prc2be80e8",
|
|
226481
226481
|
binaryLabel: "gql.tada CLI",
|
|
226482
226482
|
binaryName: "gql.tada"
|
|
226483
226483
|
});
|
|
@@ -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.4dWmgqECra:/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) : [""];
|
|
@@ -257033,7 +257033,7 @@ ${error.stack}`));
|
|
|
257033
257033
|
var package_default = {
|
|
257034
257034
|
name: "@settlemint/sdk-cli",
|
|
257035
257035
|
description: "SettleMint SDK, integrate SettleMint into your application with ease.",
|
|
257036
|
-
version: "0.8.6-
|
|
257036
|
+
version: "0.8.6-prc2be80e8",
|
|
257037
257037
|
type: "module",
|
|
257038
257038
|
private: false,
|
|
257039
257039
|
license: "FSL-1.1-MIT",
|
|
@@ -257069,7 +257069,8 @@ var package_default = {
|
|
|
257069
257069
|
"test:coverage": "bun test --coverage",
|
|
257070
257070
|
typecheck: "tsc --noEmit",
|
|
257071
257071
|
"publish-npm": "bun publish --tag ${TAG} --access public || exit 0",
|
|
257072
|
-
docs: "bun scripts/create-docs.ts"
|
|
257072
|
+
docs: "bun scripts/create-docs.ts",
|
|
257073
|
+
prepack: "cp ../../LICENSE ."
|
|
257073
257074
|
},
|
|
257074
257075
|
dependencies: {
|
|
257075
257076
|
hardhat: "2.22.17"
|
|
@@ -257085,8 +257086,8 @@ var package_default = {
|
|
|
257085
257086
|
"@inquirer/input": "4.1.1",
|
|
257086
257087
|
"@inquirer/password": "4.0.4",
|
|
257087
257088
|
"@inquirer/select": "4.0.4",
|
|
257088
|
-
"@settlemint/sdk-js": "0.8.6-
|
|
257089
|
-
"@settlemint/sdk-utils": "0.8.6-
|
|
257089
|
+
"@settlemint/sdk-js": "0.8.6-prc2be80e8",
|
|
257090
|
+
"@settlemint/sdk-utils": "0.8.6-prc2be80e8",
|
|
257090
257091
|
"get-tsconfig": "4.8.1",
|
|
257091
257092
|
giget: "1.2.3"
|
|
257092
257093
|
},
|
|
@@ -270594,9 +270595,31 @@ export const { client } = createServerMinioClient({
|
|
|
270594
270595
|
await writeTemplate(clientTemplate, "/lib/settlemint", "minio.ts");
|
|
270595
270596
|
}
|
|
270596
270597
|
|
|
270598
|
+
// src/commands/platform/utils/create-examples.ts
|
|
270599
|
+
function createExamples(examples) {
|
|
270600
|
+
return `
|
|
270601
|
+
Examples:
|
|
270602
|
+
|
|
270603
|
+
${examples.map(({ description, command, commandPrefix }) => {
|
|
270604
|
+
return ` # ${description}
|
|
270605
|
+
$ ${commandPrefix ?? ""}settlemint ${command}`;
|
|
270606
|
+
}).join(`
|
|
270607
|
+
|
|
270608
|
+
`)}`;
|
|
270609
|
+
}
|
|
270610
|
+
|
|
270597
270611
|
// src/commands/codegen.ts
|
|
270598
270612
|
function codegenCommand() {
|
|
270599
|
-
return new Command("codegen").option("--prod", "Connect to your production environment").option("--thegraph-subgraph-names <subgraph-names...>", "The name(s) of the TheGraph subgraph(s) to generate (skip if you want to generate all)").description("Generate GraphQL and REST types and queries").
|
|
270613
|
+
return new Command("codegen").option("--prod", "Connect to your production environment").option("--thegraph-subgraph-names <subgraph-names...>", "The name(s) of the TheGraph subgraph(s) to generate (skip if you want to generate all)").description("Generate GraphQL and REST types and queries").usage(createExamples([
|
|
270614
|
+
{
|
|
270615
|
+
description: "Generate GraphQL types and queries for your dApp",
|
|
270616
|
+
command: "codegen"
|
|
270617
|
+
},
|
|
270618
|
+
{
|
|
270619
|
+
description: "Generate GraphQL types and queries for specific TheGraph subgraphs",
|
|
270620
|
+
command: "codegen --thegraph-subgraph-names subgraph1 subgraph2"
|
|
270621
|
+
}
|
|
270622
|
+
])).action(async ({ prod, thegraphSubgraphNames }) => {
|
|
270600
270623
|
intro("Generating GraphQL types and queries for your dApp");
|
|
270601
270624
|
const env2 = await loadEnv2(true, !!prod);
|
|
270602
270625
|
if (!Array.isArray(thegraphSubgraphNames)) {
|
|
@@ -274252,7 +274275,7 @@ async function downloadAndExtractNpmPackage(template, targetDir) {
|
|
|
274252
274275
|
|
|
274253
274276
|
// src/commands/create.ts
|
|
274254
274277
|
function createCommand2() {
|
|
274255
|
-
return new Command("create").description("Bootstrap your SettleMint project").option("-n, --project-name <name>", "The name for your SettleMint project").
|
|
274278
|
+
return new Command("create").description("Bootstrap your SettleMint project").option("-n, --project-name <name>", "The name for your SettleMint project").addOption(new Option("-t, --template <template>", "Thehe template for your SettleMint project").choices(templates.map((templates2) => templates2.value))).action(async ({ projectName, template }) => {
|
|
274256
274279
|
intro("Creating a new SettleMint project");
|
|
274257
274280
|
const env2 = await loadEnv2(false, false);
|
|
274258
274281
|
const name2 = await namePrompt(env2, projectName);
|
|
@@ -274298,19 +274321,6 @@ async function loginSpinner(settlemint) {
|
|
|
274298
274321
|
});
|
|
274299
274322
|
}
|
|
274300
274323
|
|
|
274301
|
-
// src/commands/platform/utils/create-examples.ts
|
|
274302
|
-
function createExamples(examples) {
|
|
274303
|
-
return `
|
|
274304
|
-
Examples:
|
|
274305
|
-
|
|
274306
|
-
${examples.map(({ description, command, commandPrefix }) => {
|
|
274307
|
-
return ` # ${description}
|
|
274308
|
-
$ ${commandPrefix ?? ""}settlemint ${command}`;
|
|
274309
|
-
}).join(`
|
|
274310
|
-
|
|
274311
|
-
`)}`;
|
|
274312
|
-
}
|
|
274313
|
-
|
|
274314
274324
|
// src/commands/connect/pat.prompt.ts
|
|
274315
274325
|
async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
274316
274326
|
const existingConfig = await getInstanceCredentials(instance);
|
|
@@ -274536,9 +274546,13 @@ function getCreateCommand({
|
|
|
274536
274546
|
alias,
|
|
274537
274547
|
examples,
|
|
274538
274548
|
execute: execute2,
|
|
274539
|
-
usePersonalAccessToken = true
|
|
274549
|
+
usePersonalAccessToken = true,
|
|
274550
|
+
requiresDeployment = true
|
|
274540
274551
|
}) {
|
|
274541
|
-
const cmd2 = new Command(sanitizeCommandName(name2)).alias(alias).description(`Create a new ${type4} in the SettleMint platform.`).usage(createExamples(examples)).argument("<name>", `The ${type4} name`).option("-a, --accept-defaults", "Accept the default values").option("-d, --default", `Save as default ${type4}`).option("
|
|
274552
|
+
const cmd2 = new Command(sanitizeCommandName(name2)).alias(alias).description(`Create a new ${type4} in the SettleMint platform.`).usage(createExamples(examples)).argument("<name>", `The ${type4} name`).option("-a, --accept-defaults", "Accept the default values").option("-d, --default", `Save as default ${type4}`).option("--prod", "Connect to production environment");
|
|
274553
|
+
if (requiresDeployment) {
|
|
274554
|
+
cmd2.option("-w, --wait", "Wait until deployed").option("-r, --restart-if-timeout", "Restart if wait time is exceeded");
|
|
274555
|
+
}
|
|
274542
274556
|
execute2(cmd2, async ({ acceptDefaults, prod, default: isDefault, wait, restartIfTimeout }, createFunction) => {
|
|
274543
274557
|
intro(`Creating ${type4} in the SettleMint platform`);
|
|
274544
274558
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
@@ -274814,7 +274828,8 @@ function workspaceCreateCommand() {
|
|
|
274814
274828
|
description: "Create a workspace and save as default",
|
|
274815
274829
|
command: "platform create workspace my-workspace -d"
|
|
274816
274830
|
}
|
|
274817
|
-
]
|
|
274831
|
+
],
|
|
274832
|
+
requiresDeployment: false
|
|
274818
274833
|
});
|
|
274819
274834
|
}
|
|
274820
274835
|
|
|
@@ -274899,7 +274914,8 @@ function applicationAccessTokenCreateCommand() {
|
|
|
274899
274914
|
description: "Create an application access token (shorthand)",
|
|
274900
274915
|
command: "platform create aat my-token"
|
|
274901
274916
|
}
|
|
274902
|
-
]
|
|
274917
|
+
],
|
|
274918
|
+
requiresDeployment: false
|
|
274903
274919
|
});
|
|
274904
274920
|
}
|
|
274905
274921
|
|
|
@@ -274940,7 +274956,8 @@ function applicationCreateCommand() {
|
|
|
274940
274956
|
description: "Create an application in a specific workspace",
|
|
274941
274957
|
command: "platform create application my-app --workspace my-workspace"
|
|
274942
274958
|
}
|
|
274943
|
-
]
|
|
274959
|
+
],
|
|
274960
|
+
requiresDeployment: false
|
|
274944
274961
|
});
|
|
274945
274962
|
}
|
|
274946
274963
|
|
|
@@ -275214,11 +275231,14 @@ function smartContractPortalMiddlewareCreateCommand() {
|
|
|
275214
275231
|
alias: "scp",
|
|
275215
275232
|
execute: (cmd2, baseAction) => {
|
|
275216
275233
|
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([
|
|
275217
|
-
"
|
|
275218
|
-
"
|
|
275219
|
-
"
|
|
275220
|
-
"
|
|
275221
|
-
"
|
|
275234
|
+
"Bond",
|
|
275235
|
+
"BondFactory",
|
|
275236
|
+
"CryptoCurrency",
|
|
275237
|
+
"CryptoCurrencyFactory",
|
|
275238
|
+
"Equity",
|
|
275239
|
+
"EquityFactory",
|
|
275240
|
+
"StableCoin",
|
|
275241
|
+
"StableCoinFactory"
|
|
275222
275242
|
])).action(async (name2, {
|
|
275223
275243
|
application,
|
|
275224
275244
|
blockchainNode,
|
|
@@ -275535,7 +275555,7 @@ function getDeleteCommand({
|
|
|
275535
275555
|
description: `Force deletes the specified ${type4} without confirmation`,
|
|
275536
275556
|
command: `platform delete ${type4} <${type4}-unique-name> --force`
|
|
275537
275557
|
}
|
|
275538
|
-
])).argument("<
|
|
275558
|
+
])).argument("<unique-name>", `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("-f, --force", `Force delete the ${type4} without confirmation`).action(async (uniqueName, { acceptDefaults, prod, force }) => {
|
|
275539
275559
|
intro2(`Deleting ${type4} in the SettleMint platform`);
|
|
275540
275560
|
if (!force) {
|
|
275541
275561
|
await deleteConfirmationPrompt(`this ${type4}`);
|
|
@@ -275573,9 +275593,6 @@ function getDeleteCommand({
|
|
|
275573
275593
|
await writeEnvSpinner(!!prod, newEnv);
|
|
275574
275594
|
note(`${capitalizeFirstLetter(type4)} removed as default`);
|
|
275575
275595
|
}
|
|
275576
|
-
if (wait) {
|
|
275577
|
-
await waitForCompletion({ settlemint, type: type4, uniqueName: serviceUniqueName, action: "destroy" });
|
|
275578
|
-
}
|
|
275579
275596
|
outro(`${capitalizeFirstLetter(type4)} ${result.name} deleted successfully`);
|
|
275580
275597
|
});
|
|
275581
275598
|
}
|
|
@@ -275636,7 +275653,7 @@ function getRestartCommand({
|
|
|
275636
275653
|
description: `Restarts the default ${type4} in the production environment`,
|
|
275637
275654
|
command: `platform restart ${commandName}${subType ? ` ${subType}` : ""} default --prod`
|
|
275638
275655
|
}
|
|
275639
|
-
])).argument("<
|
|
275656
|
+
])).argument("<unique-name>", `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 }) => {
|
|
275640
275657
|
intro(`Restarting ${type4} in the SettleMint platform`);
|
|
275641
275658
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
275642
275659
|
const env2 = await loadEnv2(false, !!prod);
|
|
@@ -275825,7 +275842,7 @@ function restartCommand() {
|
|
|
275825
275842
|
|
|
275826
275843
|
// src/commands/platform/custom-deployments/update.ts
|
|
275827
275844
|
function customDeploymentsUpdateCommand() {
|
|
275828
|
-
return new Command("custom-deployment").alias("
|
|
275845
|
+
return new Command("custom-deployment").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 }) => {
|
|
275829
275846
|
intro("Updating custom deployment in the SettleMint platform");
|
|
275830
275847
|
const env2 = await loadEnv2(false, !!prod);
|
|
275831
275848
|
const customDeploymentUniqueName = uniqueName ?? env2.SETTLEMINT_CUSTOM_DEPLOYMENT;
|
|
@@ -276123,7 +276140,20 @@ function mapPassthroughOptions(options, command) {
|
|
|
276123
276140
|
|
|
276124
276141
|
// src/commands/smart-contract-set/foundry/build.ts
|
|
276125
276142
|
function foundryBuildCommand() {
|
|
276126
|
-
return new Command("build").description("Build the smart contracts using Foundry/forge").
|
|
276143
|
+
return new Command("build").description("Build the smart contracts using Foundry/forge").usage(createExamples([
|
|
276144
|
+
{
|
|
276145
|
+
description: "Build the smart contracts using Foundry",
|
|
276146
|
+
command: "scs foundry build"
|
|
276147
|
+
},
|
|
276148
|
+
{
|
|
276149
|
+
description: "Get list of possible Forge build options",
|
|
276150
|
+
command: "scs foundry build --help"
|
|
276151
|
+
},
|
|
276152
|
+
{
|
|
276153
|
+
description: "Build the smart contracts with additional Forge options",
|
|
276154
|
+
command: "scs foundry build --optimize --force"
|
|
276155
|
+
}
|
|
276156
|
+
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).action(async (passThroughOptions, cmd2) => {
|
|
276127
276157
|
const forgeOptions = mapPassthroughOptions(passThroughOptions, cmd2);
|
|
276128
276158
|
await executeCommand("forge", ["build", ...forgeOptions]);
|
|
276129
276159
|
});
|
|
@@ -276131,7 +276161,20 @@ function foundryBuildCommand() {
|
|
|
276131
276161
|
|
|
276132
276162
|
// src/commands/smart-contract-set/foundry/format.ts
|
|
276133
276163
|
function foundryFormatCommand() {
|
|
276134
|
-
return new Command("format").description("Format the smart contracts using Foundry/forge").
|
|
276164
|
+
return new Command("format").description("Format the smart contracts using Foundry/forge").usage(createExamples([
|
|
276165
|
+
{
|
|
276166
|
+
description: "Format the smart contracts using Foundry",
|
|
276167
|
+
command: "scs foundry format"
|
|
276168
|
+
},
|
|
276169
|
+
{
|
|
276170
|
+
description: "Get list of possible Forge format options",
|
|
276171
|
+
command: "scs foundry format --help"
|
|
276172
|
+
},
|
|
276173
|
+
{
|
|
276174
|
+
description: "Format the smart contracts with additional Forge options",
|
|
276175
|
+
command: "scs foundry format --check"
|
|
276176
|
+
}
|
|
276177
|
+
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).action(async (passThroughOptions, cmd2) => {
|
|
276135
276178
|
const forgeOptions = mapPassthroughOptions(passThroughOptions, cmd2);
|
|
276136
276179
|
await executeCommand("forge", ["fmt", ...forgeOptions]);
|
|
276137
276180
|
note("Smart contract set formatted successfully!");
|
|
@@ -276140,7 +276183,20 @@ function foundryFormatCommand() {
|
|
|
276140
276183
|
|
|
276141
276184
|
// src/commands/smart-contract-set/foundry/network.ts
|
|
276142
276185
|
function foundryNetworkCommand() {
|
|
276143
|
-
return new Command("network").description("Start a development network Foundry/anvil").
|
|
276186
|
+
return new Command("network").description("Start a development network Foundry/anvil").usage(createExamples([
|
|
276187
|
+
{
|
|
276188
|
+
description: "Start a development network using Foundry",
|
|
276189
|
+
command: "scs foundry network"
|
|
276190
|
+
},
|
|
276191
|
+
{
|
|
276192
|
+
description: "Get list of possible Anvil options",
|
|
276193
|
+
command: "scs foundry network --help"
|
|
276194
|
+
},
|
|
276195
|
+
{
|
|
276196
|
+
description: "Start a development network using Foundry with a specific port",
|
|
276197
|
+
command: "scs foundry network --port 3000"
|
|
276198
|
+
}
|
|
276199
|
+
])).helpOption(false).option("-h, --help", "Get list of possible anvil options").passThroughOptions().allowUnknownOption(true).action(async (passThroughOptions, cmd2) => {
|
|
276144
276200
|
const anvilOptions = mapPassthroughOptions(passThroughOptions, cmd2);
|
|
276145
276201
|
await executeCommand("anvil", anvilOptions);
|
|
276146
276202
|
});
|
|
@@ -276148,7 +276204,20 @@ function foundryNetworkCommand() {
|
|
|
276148
276204
|
|
|
276149
276205
|
// src/commands/smart-contract-set/foundry/test.ts
|
|
276150
276206
|
function foundryTestCommand() {
|
|
276151
|
-
return new Command("test").description("Test the smart contracts using Foundry/forge").
|
|
276207
|
+
return new Command("test").description("Test the smart contracts using Foundry/forge").usage(createExamples([
|
|
276208
|
+
{
|
|
276209
|
+
description: "Run tests using Foundry",
|
|
276210
|
+
command: "scs foundry test"
|
|
276211
|
+
},
|
|
276212
|
+
{
|
|
276213
|
+
description: "Get list of possible Forge test options",
|
|
276214
|
+
command: "scs foundry test --help"
|
|
276215
|
+
},
|
|
276216
|
+
{
|
|
276217
|
+
description: "Run a specific test function",
|
|
276218
|
+
command: "scs foundry test --match-test testToken"
|
|
276219
|
+
}
|
|
276220
|
+
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).action(async (passThroughOptions, cmd2) => {
|
|
276152
276221
|
const forgeOptions = mapPassthroughOptions(passThroughOptions, cmd2);
|
|
276153
276222
|
await executeCommand("forge", ["test", ...forgeOptions]);
|
|
276154
276223
|
});
|
|
@@ -276156,7 +276225,20 @@ function foundryTestCommand() {
|
|
|
276156
276225
|
|
|
276157
276226
|
// src/commands/smart-contract-set/hardhat/build.ts
|
|
276158
276227
|
function hardhatBuildCommand() {
|
|
276159
|
-
return new Command("build").description("Build the smart contracts using Hardhat").
|
|
276228
|
+
return new Command("build").description("Build the smart contracts using Hardhat").usage(createExamples([
|
|
276229
|
+
{
|
|
276230
|
+
description: "Build the smart contracts using Hardhat",
|
|
276231
|
+
command: "scs hardhat build"
|
|
276232
|
+
},
|
|
276233
|
+
{
|
|
276234
|
+
description: "Get list of possible Hardhat compile options",
|
|
276235
|
+
command: "scs hardhat build --help"
|
|
276236
|
+
},
|
|
276237
|
+
{
|
|
276238
|
+
description: "Build the smart contracts using additional options to the Hardhat compile command",
|
|
276239
|
+
command: "scs hardhat build --concurrency 2"
|
|
276240
|
+
}
|
|
276241
|
+
])).helpOption(false).option("-h, --help", "Get list of possible hardhat compile options").passThroughOptions().allowUnknownOption(true).action(async (passThroughOptions, cmd2) => {
|
|
276160
276242
|
const hardhatOptions = mapPassthroughOptions(passThroughOptions, cmd2);
|
|
276161
276243
|
const { command, args } = await getPackageManagerExecutable();
|
|
276162
276244
|
await executeCommand(command, [...args, "hardhat", "compile", ...hardhatOptions]);
|
|
@@ -276165,7 +276247,24 @@ function hardhatBuildCommand() {
|
|
|
276165
276247
|
|
|
276166
276248
|
// src/commands/smart-contract-set/hardhat/deploy/local.ts
|
|
276167
276249
|
function hardhatDeployLocalCommand() {
|
|
276168
|
-
return new Command("local").description("Deploy the smart contracts using Hardhat/ignition to the local development network").
|
|
276250
|
+
return new Command("local").description("Deploy the smart contracts using Hardhat/ignition to the local development network").usage(createExamples([
|
|
276251
|
+
{
|
|
276252
|
+
description: "Deploy smart contracts to local network using Hardhat/Ignition",
|
|
276253
|
+
command: "scs hardhat deploy local"
|
|
276254
|
+
},
|
|
276255
|
+
{
|
|
276256
|
+
description: "Deploy a specific Ignition module",
|
|
276257
|
+
command: "scs hardhat deploy local --module ignition/modules/custom.ts"
|
|
276258
|
+
},
|
|
276259
|
+
{
|
|
276260
|
+
description: "Deploy with a clean deployment state",
|
|
276261
|
+
command: "scs hardhat deploy local --reset"
|
|
276262
|
+
},
|
|
276263
|
+
{
|
|
276264
|
+
description: "Deploy and verify contracts on Etherscan",
|
|
276265
|
+
command: "scs hardhat deploy local --verify"
|
|
276266
|
+
}
|
|
276267
|
+
])).option("-m, --module <ignitionmodule>", 'The module to deploy with Ignition, defaults to "ignition/modules/main.ts"').option("-r, --reset", "Wipes the existing deployment state before deploying").option("-v, --verify", "Verify the deployment on Etherscan").action(async ({ module, reset: reset2, verify }) => {
|
|
276169
276268
|
const { command, args } = await getPackageManagerExecutable();
|
|
276170
276269
|
await executeCommand(command, [
|
|
276171
276270
|
...args,
|
|
@@ -276244,7 +276343,32 @@ function isHardhatConfig(config4) {
|
|
|
276244
276343
|
|
|
276245
276344
|
// src/commands/smart-contract-set/hardhat/deploy/remote.ts
|
|
276246
276345
|
function hardhatDeployRemoteCommand() {
|
|
276247
|
-
const cmd2 = new Command("remote").description("Deploy the smart contracts using Hardhat/ignition to the remote network on the platform").
|
|
276346
|
+
const cmd2 = new Command("remote").description("Deploy the smart contracts using Hardhat/ignition to the remote network on the platform").usage(createExamples([
|
|
276347
|
+
{
|
|
276348
|
+
description: "Deploy smart contracts to remote network using Hardhat/Ignition",
|
|
276349
|
+
command: "scs hardhat deploy remote"
|
|
276350
|
+
},
|
|
276351
|
+
{
|
|
276352
|
+
description: "Deploy a specific Ignition module to remote network",
|
|
276353
|
+
command: "scs hardhat deploy remote --module ignition/modules/custom.ts"
|
|
276354
|
+
},
|
|
276355
|
+
{
|
|
276356
|
+
description: "Deploy with a clean deployment state to remote network",
|
|
276357
|
+
command: "scs hardhat deploy remote --reset"
|
|
276358
|
+
},
|
|
276359
|
+
{
|
|
276360
|
+
description: "Deploy and verify contracts on remote network",
|
|
276361
|
+
command: "scs hardhat deploy remote --verify"
|
|
276362
|
+
},
|
|
276363
|
+
{
|
|
276364
|
+
description: "Deploy to remote network with specific blockchain node",
|
|
276365
|
+
command: "scs hardhat deploy remote --blockchain-node my-node"
|
|
276366
|
+
},
|
|
276367
|
+
{
|
|
276368
|
+
description: "Deploy to production environment",
|
|
276369
|
+
command: "scs hardhat deploy remote --prod"
|
|
276370
|
+
}
|
|
276371
|
+
])).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");
|
|
276248
276372
|
cmd2.action(async ({
|
|
276249
276373
|
module,
|
|
276250
276374
|
reset: reset2,
|
|
@@ -276324,7 +276448,7 @@ function hardhatDeployRemoteCommand() {
|
|
|
276324
276448
|
|
|
276325
276449
|
// src/commands/smart-contract-set/hardhat/deploy.ts
|
|
276326
276450
|
function hardhatDeployCommand() {
|
|
276327
|
-
const deploy = new Command("deploy");
|
|
276451
|
+
const deploy = new Command("deploy").description("Deploy the smart contracts using Hardhat");
|
|
276328
276452
|
deploy.addCommand(hardhatDeployLocalCommand());
|
|
276329
276453
|
deploy.addCommand(hardhatDeployRemoteCommand());
|
|
276330
276454
|
return deploy;
|
|
@@ -276332,7 +276456,20 @@ function hardhatDeployCommand() {
|
|
|
276332
276456
|
|
|
276333
276457
|
// src/commands/smart-contract-set/hardhat/network.ts
|
|
276334
276458
|
function hardhatNetworkCommand() {
|
|
276335
|
-
return new Command("network").description("Start a development network using Hardhat").
|
|
276459
|
+
return new Command("network").description("Start a development network using Hardhat").usage(createExamples([
|
|
276460
|
+
{
|
|
276461
|
+
description: "Start a development network using Hardhat",
|
|
276462
|
+
command: "scs hardhat network"
|
|
276463
|
+
},
|
|
276464
|
+
{
|
|
276465
|
+
description: "Get list of possible Hardhat node options",
|
|
276466
|
+
command: "scs hardhat network --help"
|
|
276467
|
+
},
|
|
276468
|
+
{
|
|
276469
|
+
description: "Start a development network using Hardhat with a specific port",
|
|
276470
|
+
command: "scs hardhat network --port 3000"
|
|
276471
|
+
}
|
|
276472
|
+
])).helpOption(false).option("-h, --help", "Get list of possible hardhat node options").passThroughOptions().allowUnknownOption(true).action(async (passThroughOptions, cmd2) => {
|
|
276336
276473
|
const hardhatOptions = mapPassthroughOptions(passThroughOptions, cmd2);
|
|
276337
276474
|
const { command, args } = await getPackageManagerExecutable();
|
|
276338
276475
|
await executeCommand(command, [...args, "hardhat", "node", ...hardhatOptions]);
|
|
@@ -276389,7 +276526,7 @@ function hardhatScriptRemoteCommand() {
|
|
|
276389
276526
|
|
|
276390
276527
|
// src/commands/smart-contract-set/hardhat/script.ts
|
|
276391
276528
|
function hardhatScriptCommand() {
|
|
276392
|
-
const script = new Command("script");
|
|
276529
|
+
const script = new Command("script").description("Run a script using Hardhat");
|
|
276393
276530
|
script.addCommand(hardhatScriptRemoteCommand());
|
|
276394
276531
|
script.addCommand(hardhatScriptLocalCommand());
|
|
276395
276532
|
return script;
|
|
@@ -276397,7 +276534,24 @@ function hardhatScriptCommand() {
|
|
|
276397
276534
|
|
|
276398
276535
|
// src/commands/smart-contract-set/hardhat/test.ts
|
|
276399
276536
|
function hardhatTestCommand() {
|
|
276400
|
-
return new Command("test").description("Test the smart contracts using Hardhat").
|
|
276537
|
+
return new Command("test").description("Test the smart contracts using Hardhat").usage(createExamples([
|
|
276538
|
+
{
|
|
276539
|
+
description: "Run tests using Hardhat",
|
|
276540
|
+
command: "scs hardhat test"
|
|
276541
|
+
},
|
|
276542
|
+
{
|
|
276543
|
+
description: "Get list of possible Hardhat test options",
|
|
276544
|
+
command: "scs hardhat test --help"
|
|
276545
|
+
},
|
|
276546
|
+
{
|
|
276547
|
+
description: "Run tests and stop on the first test that fails",
|
|
276548
|
+
command: "scs hardhat test --bail"
|
|
276549
|
+
},
|
|
276550
|
+
{
|
|
276551
|
+
description: "Run a specific test file",
|
|
276552
|
+
command: "scs hardhat test test/token.test.ts"
|
|
276553
|
+
}
|
|
276554
|
+
])).helpOption(false).option("-h, --help", "Get list of possible hardhat test options").passThroughOptions().allowUnknownOption().action(async (options, cmd2) => {
|
|
276401
276555
|
const hardhatOptions = mapPassthroughOptions(options, cmd2);
|
|
276402
276556
|
const { command, args } = await getPackageManagerExecutable();
|
|
276403
276557
|
await executeCommand(command, [...args, "hardhat", "test", ...hardhatOptions]);
|
|
@@ -276669,7 +276823,16 @@ async function saveSubgraphName(sanitizedSubgraphName, env2, prod) {
|
|
|
276669
276823
|
|
|
276670
276824
|
// src/commands/smart-contract-set/subgraph/deploy.ts
|
|
276671
276825
|
function subgraphDeployCommand() {
|
|
276672
|
-
return new Command("deploy").description("Deploy the subgraph").
|
|
276826
|
+
return new Command("deploy").description("Deploy the subgraph").usage(createExamples([
|
|
276827
|
+
{
|
|
276828
|
+
description: "Deploy the subgraph",
|
|
276829
|
+
command: "scs subgraph deploy"
|
|
276830
|
+
},
|
|
276831
|
+
{
|
|
276832
|
+
description: "Deploy the subgraph with a specific name",
|
|
276833
|
+
command: "scs subgraph deploy my-subgraph"
|
|
276834
|
+
}
|
|
276835
|
+
])).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").argument("[subgraph-name]", "The name of the subgraph to deploy (defaults to value in .env if not provided)").action(async (subgraphName, { prod, acceptDefaults }) => {
|
|
276673
276836
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
276674
276837
|
const env2 = await loadEnv(false, !!prod);
|
|
276675
276838
|
const instance = await instancePrompt(env2, true);
|
|
@@ -276739,12 +276902,12 @@ async function updateSpecVersion(specVersion) {
|
|
|
276739
276902
|
|
|
276740
276903
|
// src/commands/smart-contract.set.ts
|
|
276741
276904
|
function smartContractSetCommand() {
|
|
276742
|
-
const foundry = new Command("foundry").alias("f").description("Foundry commands for building
|
|
276905
|
+
const foundry = new Command("foundry").alias("f").description("Foundry commands for building and testing smart contracts");
|
|
276743
276906
|
foundry.addCommand(foundryBuildCommand());
|
|
276744
276907
|
foundry.addCommand(foundryFormatCommand());
|
|
276745
276908
|
foundry.addCommand(foundryNetworkCommand());
|
|
276746
276909
|
foundry.addCommand(foundryTestCommand());
|
|
276747
|
-
const hardhat = new Command("hardhat").alias("h").description("Hardhat commands for
|
|
276910
|
+
const hardhat = new Command("hardhat").alias("h").description("Hardhat commands for building, testing and deploying smart contracts");
|
|
276748
276911
|
hardhat.addCommand(hardhatBuildCommand());
|
|
276749
276912
|
hardhat.addCommand(hardhatDeployCommand());
|
|
276750
276913
|
hardhat.addCommand(hardhatNetworkCommand());
|
|
@@ -276783,4 +276946,4 @@ function sdkCliCommand(exitOverride = undefined) {
|
|
|
276783
276946
|
ascii();
|
|
276784
276947
|
sdkCliCommand();
|
|
276785
276948
|
|
|
276786
|
-
//# debugId=
|
|
276949
|
+
//# debugId=D1045F54254D535864756E2164756E21
|