@settlemint/sdk-cli 0.9.3-pr523f6cc8 → 0.9.3-pr68bd35cb
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 +13 -3
- package/dist/cli.js +87 -72
- package/dist/cli.js.map +7 -7
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
- [Generating code for your dApp](#generating-code-for-your-dapp)
|
|
44
44
|
- [Start your dApp in development mode](#start-your-dapp-in-development-mode)
|
|
45
45
|
- [Creating a new project from a smart contract template](#creating-a-new-project-from-a-smart-contract-template)
|
|
46
|
-
- [Testing your smart contracts
|
|
46
|
+
- [Testing your smart contracts](#testing-your-smart-contracts)
|
|
47
47
|
- [Deploying your smart contracts and subgraphs](#deploying-your-smart-contracts-and-subgraphs)
|
|
48
48
|
- [API Reference](#api-reference)
|
|
49
49
|
- [Contributing](#contributing)
|
|
@@ -186,7 +186,17 @@ settlemint codegen
|
|
|
186
186
|
#### Start your dApp in development mode
|
|
187
187
|
|
|
188
188
|
```bash
|
|
189
|
+
# bun
|
|
189
190
|
bun run dev
|
|
191
|
+
|
|
192
|
+
# npm
|
|
193
|
+
npm run dev
|
|
194
|
+
|
|
195
|
+
# yarn
|
|
196
|
+
yarn dev
|
|
197
|
+
|
|
198
|
+
# pnpm
|
|
199
|
+
pnpm dev
|
|
190
200
|
```
|
|
191
201
|
|
|
192
202
|
### Creating a new project from a smart contract template
|
|
@@ -197,7 +207,7 @@ To create a new project from a smart contract template, use the `create` command
|
|
|
197
207
|
settlemint scs create --project-name <project-name> --use-case <use-case-name>
|
|
198
208
|
```
|
|
199
209
|
|
|
200
|
-
#### Testing your smart contracts
|
|
210
|
+
#### Testing your smart contracts
|
|
201
211
|
|
|
202
212
|
To test your smart contracts, you can use the `test` command.
|
|
203
213
|
|
|
@@ -221,7 +231,7 @@ settlemint scs subgraph deploy --accept-defaults <subgraph-name>
|
|
|
221
231
|
|
|
222
232
|
## API Reference
|
|
223
233
|
|
|
224
|
-
See the [documentation](https://github.com/settlemint/sdk/tree/v0.9.3/sdk/cli/docs/settlemint.md) for available commands.
|
|
234
|
+
See the [documentation](https://github.com/settlemint/sdk/tree/v0.9.3-main39fa6d4d/sdk/cli/docs/settlemint.md) for available commands.
|
|
225
235
|
|
|
226
236
|
## Contributing
|
|
227
237
|
|
package/dist/cli.js
CHANGED
|
@@ -19613,7 +19613,7 @@ var require_lib4 = __commonJS((exports, module) => {
|
|
|
19613
19613
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
19614
19614
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
19615
19615
|
var getPathInfo = (cmd, {
|
|
19616
|
-
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.
|
|
19616
|
+
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.cN1iZXyWck:/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",
|
|
19617
19617
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
19618
19618
|
delimiter: optDelimiter = delimiter
|
|
19619
19619
|
}) => {
|
|
@@ -19817,7 +19817,7 @@ var require_lib5 = __commonJS((exports, module) => {
|
|
|
19817
19817
|
let pathToInitial;
|
|
19818
19818
|
try {
|
|
19819
19819
|
pathToInitial = which.sync(initialCmd, {
|
|
19820
|
-
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.
|
|
19820
|
+
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.cN1iZXyWck:/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",
|
|
19821
19821
|
pathext: options.env && findInObject(options.env, "PATHEXT") || process.env.PATHEXT
|
|
19822
19822
|
}).toLowerCase();
|
|
19823
19823
|
} catch (err) {
|
|
@@ -20534,7 +20534,7 @@ var require_lib6 = __commonJS((exports, module) => {
|
|
|
20534
20534
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
20535
20535
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
20536
20536
|
var getPathInfo = (cmd, {
|
|
20537
|
-
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.
|
|
20537
|
+
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.cN1iZXyWck:/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",
|
|
20538
20538
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
20539
20539
|
delimiter: optDelimiter = delimiter
|
|
20540
20540
|
}) => {
|
|
@@ -223327,7 +223327,7 @@ ${Bt.cyan(Yt)}
|
|
|
223327
223327
|
code: "ENOENT"
|
|
223328
223328
|
}), getPathInfo = (e9, t7) => {
|
|
223329
223329
|
var r6 = t7.colon || or;
|
|
223330
|
-
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.
|
|
223330
|
+
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.cN1iZXyWck:/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)];
|
|
223331
223331
|
var n6 = nr ? t7.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
223332
223332
|
var a5 = nr ? n6.split(r6) : [""];
|
|
223333
223333
|
if (nr) {
|
|
@@ -226464,7 +226464,7 @@ ${whileRunning(e9)}`;
|
|
|
226464
226464
|
};
|
|
226465
226465
|
ni = Object.assign(async function _main() {
|
|
226466
226466
|
var e9 = new Cli({
|
|
226467
|
-
binaryVersion: "0.9.3-
|
|
226467
|
+
binaryVersion: "0.9.3-pr68bd35cb",
|
|
226468
226468
|
binaryLabel: "gql.tada CLI",
|
|
226469
226469
|
binaryName: "gql.tada"
|
|
226470
226470
|
});
|
|
@@ -234964,7 +234964,7 @@ var require_which2 = __commonJS((exports, module) => {
|
|
|
234964
234964
|
const colon = opt2.colon || COLON;
|
|
234965
234965
|
const pathEnv = cmd2.match(/\//) || isWindows2 && cmd2.match(/\\/) ? [""] : [
|
|
234966
234966
|
...isWindows2 ? [process.cwd()] : [],
|
|
234967
|
-
...(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.
|
|
234967
|
+
...(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.cN1iZXyWck:/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)
|
|
234968
234968
|
];
|
|
234969
234969
|
const pathExtExe = isWindows2 ? opt2.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
234970
234970
|
const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
|
|
@@ -256788,7 +256788,7 @@ ${error.stack}`));
|
|
|
256788
256788
|
var package_default = {
|
|
256789
256789
|
name: "@settlemint/sdk-cli",
|
|
256790
256790
|
description: "SettleMint SDK, integrate SettleMint into your application with ease.",
|
|
256791
|
-
version: "0.9.3-
|
|
256791
|
+
version: "0.9.3-pr68bd35cb",
|
|
256792
256792
|
type: "module",
|
|
256793
256793
|
private: false,
|
|
256794
256794
|
license: "FSL-1.1-MIT",
|
|
@@ -256841,8 +256841,8 @@ var package_default = {
|
|
|
256841
256841
|
"@inquirer/input": "4.1.1",
|
|
256842
256842
|
"@inquirer/password": "4.0.4",
|
|
256843
256843
|
"@inquirer/select": "4.0.4",
|
|
256844
|
-
"@settlemint/sdk-js": "0.9.3-
|
|
256845
|
-
"@settlemint/sdk-utils": "0.9.3-
|
|
256844
|
+
"@settlemint/sdk-js": "0.9.3-pr68bd35cb",
|
|
256845
|
+
"@settlemint/sdk-utils": "0.9.3-pr68bd35cb",
|
|
256846
256846
|
"get-tsconfig": "4.8.1",
|
|
256847
256847
|
giget: "1.2.3"
|
|
256848
256848
|
},
|
|
@@ -267561,7 +267561,7 @@ var et = l((Re, tt) => {
|
|
|
267561
267561
|
var g = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", Y = h("path"), Bt = g ? ";" : ":", V = U(), J = (t) => Object.assign(new Error(`not found: ${t}`), { code: "ENOENT" }), Q = (t, e) => {
|
|
267562
267562
|
let n = e.colon || Bt, r = t.match(/\//) || g && t.match(/\\/) ? [""] : [
|
|
267563
267563
|
...g ? [process.cwd()] : [],
|
|
267564
|
-
...(e.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.
|
|
267564
|
+
...(e.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.cN1iZXyWck:/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(n)
|
|
267565
267565
|
], s = g ? e.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", o = g ? s.split(n) : [""];
|
|
267566
267566
|
return g && t.indexOf(".") !== -1 && o[0] !== "" && o.unshift(""), {
|
|
267567
267567
|
pathEnv: r,
|
|
@@ -268232,6 +268232,28 @@ async function isPackageInstalled(name, path5) {
|
|
|
268232
268232
|
const inPeerDependencies = !!pkgJson.content.peerDependencies?.[name];
|
|
268233
268233
|
return inDependencies || inDevDependencies || inPeerDependencies;
|
|
268234
268234
|
}
|
|
268235
|
+
async function retryWhenFailed(fn, maxRetries = 5, initialSleepTime = 3000, stopOnError) {
|
|
268236
|
+
let attempt = 0;
|
|
268237
|
+
while (attempt < maxRetries) {
|
|
268238
|
+
try {
|
|
268239
|
+
return await fn();
|
|
268240
|
+
} catch (e) {
|
|
268241
|
+
if (typeof stopOnError === "function") {
|
|
268242
|
+
const error = e;
|
|
268243
|
+
if (stopOnError(error)) {
|
|
268244
|
+
throw error;
|
|
268245
|
+
}
|
|
268246
|
+
}
|
|
268247
|
+
attempt += 1;
|
|
268248
|
+
if (attempt >= maxRetries) {
|
|
268249
|
+
throw e;
|
|
268250
|
+
}
|
|
268251
|
+
const jitter = 0.5 + Math.random();
|
|
268252
|
+
const delay = 2 ** attempt * initialSleepTime * jitter;
|
|
268253
|
+
await new Promise((resolve2) => setTimeout(resolve2, delay));
|
|
268254
|
+
}
|
|
268255
|
+
}
|
|
268256
|
+
}
|
|
268235
268257
|
function capitalizeFirstLetter(val) {
|
|
268236
268258
|
return String(val).charAt(0).toUpperCase() + String(val).slice(1);
|
|
268237
268259
|
}
|
|
@@ -268514,50 +268536,41 @@ async function testGqlEndpoint({
|
|
|
268514
268536
|
accessToken,
|
|
268515
268537
|
hasuraAdminSecret,
|
|
268516
268538
|
gqlEndpoint,
|
|
268517
|
-
isHasura = false
|
|
268518
|
-
maxRetries = 3
|
|
268539
|
+
isHasura = false
|
|
268519
268540
|
}) {
|
|
268520
268541
|
if (!gqlEndpoint) {
|
|
268521
268542
|
return false;
|
|
268522
268543
|
}
|
|
268523
|
-
|
|
268524
|
-
|
|
268525
|
-
|
|
268526
|
-
|
|
268527
|
-
|
|
268528
|
-
|
|
268529
|
-
|
|
268530
|
-
|
|
268531
|
-
|
|
268532
|
-
|
|
268533
|
-
query
|
|
268534
|
-
|
|
268535
|
-
|
|
268536
|
-
|
|
268537
|
-
name
|
|
268538
|
-
}
|
|
268544
|
+
const result = await retryWhenFailed(async () => {
|
|
268545
|
+
const response = await fetch(gqlEndpoint, {
|
|
268546
|
+
method: "POST",
|
|
268547
|
+
headers: {
|
|
268548
|
+
"x-auth-token": accessToken,
|
|
268549
|
+
...isHasura ? { "x-hasura-admin-secret": hasuraAdminSecret ?? "" } : {},
|
|
268550
|
+
"Content-Type": "application/json"
|
|
268551
|
+
},
|
|
268552
|
+
body: JSON.stringify({
|
|
268553
|
+
query: `
|
|
268554
|
+
query {
|
|
268555
|
+
__schema {
|
|
268556
|
+
types {
|
|
268557
|
+
name
|
|
268539
268558
|
}
|
|
268540
268559
|
}
|
|
268541
|
-
|
|
268542
|
-
|
|
268543
|
-
})
|
|
268544
|
-
|
|
268545
|
-
|
|
268546
|
-
}
|
|
268547
|
-
const data = await response.json();
|
|
268548
|
-
if (data.errors) {
|
|
268549
|
-
throw new Error("GraphQL errors in response");
|
|
268550
|
-
}
|
|
268551
|
-
return true;
|
|
268552
|
-
} catch (error5) {
|
|
268553
|
-
if (attempt === maxRetries - 1) {
|
|
268554
|
-
return false;
|
|
268555
|
-
}
|
|
268556
|
-
const delay2 = 2 ** attempt * 1000;
|
|
268557
|
-
await new Promise((resolve4) => setTimeout(resolve4, delay2));
|
|
268560
|
+
}
|
|
268561
|
+
`
|
|
268562
|
+
})
|
|
268563
|
+
});
|
|
268564
|
+
if (!response.ok) {
|
|
268565
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
268558
268566
|
}
|
|
268559
|
-
|
|
268560
|
-
|
|
268567
|
+
const data = await response.json();
|
|
268568
|
+
if (data.errors) {
|
|
268569
|
+
throw new Error("GraphQL errors in response");
|
|
268570
|
+
}
|
|
268571
|
+
return true;
|
|
268572
|
+
});
|
|
268573
|
+
return result ?? false;
|
|
268561
268574
|
}
|
|
268562
268575
|
|
|
268563
268576
|
// ../../node_modules/get-tsconfig/dist/index.mjs
|
|
@@ -271149,12 +271162,12 @@ async function writeEnvSpinner(prod, env2) {
|
|
|
271149
271162
|
}
|
|
271150
271163
|
|
|
271151
271164
|
// src/utils/get-cluster-service-endpoint.ts
|
|
271152
|
-
async function getGraphEndpoint(service, env2) {
|
|
271165
|
+
async function getGraphEndpoint(service, env2, graphName) {
|
|
271153
271166
|
if (!service || service.__typename !== "HAGraphMiddleware") {
|
|
271154
271167
|
return {};
|
|
271155
271168
|
}
|
|
271156
271169
|
const isStarterKit = (id) => id.endsWith("-starterkits");
|
|
271157
|
-
const testEndpoint = service.subgraphs.find(({ graphqlQueryEndpoint }) => !isStarterKit(graphqlQueryEndpoint?.id))?.graphqlQueryEndpoint?.displayValue;
|
|
271170
|
+
const testEndpoint = service.subgraphs.find(({ graphqlQueryEndpoint }) => graphName ? graphqlQueryEndpoint?.id.endsWith(graphName) : !isStarterKit(graphqlQueryEndpoint?.id))?.graphqlQueryEndpoint?.displayValue;
|
|
271158
271171
|
const starterKitEndpoint = service.subgraphs.find(({ graphqlQueryEndpoint }) => isStarterKit(graphqlQueryEndpoint?.id))?.graphqlQueryEndpoint?.displayValue;
|
|
271159
271172
|
const hasEndpoint = testEndpoint && env2.SETTLEMINT_ACCESS_TOKEN ? await testGqlEndpoint({ accessToken: env2.SETTLEMINT_ACCESS_TOKEN, gqlEndpoint: testEndpoint }) : false;
|
|
271160
271173
|
const endpoints = hasEndpoint ? service.subgraphs.map(({ graphqlQueryEndpoint }) => graphqlQueryEndpoint?.displayValue) : starterKitEndpoint ? [starterKitEndpoint] : [];
|
|
@@ -273153,28 +273166,20 @@ function createSettleMintClient(options) {
|
|
|
273153
273166
|
"x-auth-token": validatedOptions.accessToken
|
|
273154
273167
|
},
|
|
273155
273168
|
fetch: async (input, init2) => {
|
|
273156
|
-
const
|
|
273157
|
-
|
|
273158
|
-
|
|
273159
|
-
|
|
273160
|
-
|
|
273161
|
-
|
|
273162
|
-
|
|
273163
|
-
}
|
|
273164
|
-
if (response.status < 500 && response.status !== 429 && response.status !== 408 && response.status !== 0) {
|
|
273165
|
-
return response;
|
|
273166
|
-
}
|
|
273167
|
-
if (attempt === maxRetries) {
|
|
273168
|
-
return response;
|
|
273169
|
-
}
|
|
273170
|
-
} catch (error5) {
|
|
273171
|
-
if (attempt === maxRetries) {
|
|
273172
|
-
throw error5;
|
|
273173
|
-
}
|
|
273169
|
+
const response = await retryWhenFailed(async () => {
|
|
273170
|
+
const response2 = await fetch(input, init2);
|
|
273171
|
+
if (response2.ok) {
|
|
273172
|
+
return response2;
|
|
273173
|
+
}
|
|
273174
|
+
if (response2.status < 500 && response2.status !== 429 && response2.status !== 408 && response2.status !== 0) {
|
|
273175
|
+
return response2;
|
|
273174
273176
|
}
|
|
273175
|
-
|
|
273177
|
+
throw new Error(response2.statusText);
|
|
273178
|
+
});
|
|
273179
|
+
if (!response) {
|
|
273180
|
+
throw new Error("Failed to fetch");
|
|
273176
273181
|
}
|
|
273177
|
-
|
|
273182
|
+
return response;
|
|
273178
273183
|
}
|
|
273179
273184
|
});
|
|
273180
273185
|
return {
|
|
@@ -277516,8 +277521,8 @@ function subgraphDeployCommand() {
|
|
|
277516
277521
|
accessToken,
|
|
277517
277522
|
instance
|
|
277518
277523
|
});
|
|
277519
|
-
const middleware = await
|
|
277520
|
-
const graphEndpoints = await getGraphEndpoint(middleware, env2);
|
|
277524
|
+
const middleware = await retryWhenFailed(() => getMiddlewareAndValidateSubgraphIsAvailable(theGraphMiddleware.uniqueName, settlemintClient, graphName));
|
|
277525
|
+
const graphEndpoints = await getGraphEndpoint(middleware, env2, graphName);
|
|
277521
277526
|
await writeEnvSpinner(!!prod, {
|
|
277522
277527
|
...env2,
|
|
277523
277528
|
SETTLEMINT_THEGRAPH: theGraphMiddleware.uniqueName,
|
|
@@ -277530,6 +277535,16 @@ async function updateSpecVersion(specVersion) {
|
|
|
277530
277535
|
yamlConfig.specVersion = specVersion;
|
|
277531
277536
|
await updateSubgraphYamlConfig(yamlConfig);
|
|
277532
277537
|
}
|
|
277538
|
+
async function getMiddlewareAndValidateSubgraphIsAvailable(uniqueName, settlemintClient, graphName) {
|
|
277539
|
+
const middleware = await settlemintClient.middleware.read(uniqueName);
|
|
277540
|
+
if (middleware.__typename === "HAGraphMiddleware") {
|
|
277541
|
+
if (middleware.subgraphs.some((s8) => s8.name === graphName)) {
|
|
277542
|
+
return middleware;
|
|
277543
|
+
}
|
|
277544
|
+
throw new Error("Subgraph not available");
|
|
277545
|
+
}
|
|
277546
|
+
return middleware;
|
|
277547
|
+
}
|
|
277533
277548
|
|
|
277534
277549
|
// src/commands/smart-contract.set.ts
|
|
277535
277550
|
function smartContractSetCommand() {
|
|
@@ -277577,4 +277592,4 @@ function sdkCliCommand(exitOverride = undefined) {
|
|
|
277577
277592
|
ascii();
|
|
277578
277593
|
sdkCliCommand();
|
|
277579
277594
|
|
|
277580
|
-
//# debugId=
|
|
277595
|
+
//# debugId=C1DACBA90329623764756E2164756E21
|