@0xobelisk/sui-cli 1.2.0-pre.12 → 1.2.0-pre.121
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 +7 -7
- package/dist/dubhe.js +152 -51
- package/dist/dubhe.js.map +1 -1
- package/package.json +31 -19
- package/src/commands/build.ts +61 -18
- package/src/commands/call.ts +83 -83
- package/src/commands/checkBalance.ts +27 -12
- package/src/commands/convertJson.ts +85 -0
- package/src/commands/doctor.ts +1515 -0
- package/src/commands/faucet.ts +20 -10
- package/src/commands/generate.ts +61 -0
- package/src/commands/generateKey.ts +3 -2
- package/src/commands/index.ts +20 -11
- package/src/commands/info.ts +61 -0
- package/src/commands/loadMetadata.ts +68 -0
- package/src/commands/localnode.ts +22 -6
- package/src/commands/publish.ts +55 -7
- package/src/commands/query.ts +101 -101
- package/src/commands/shell.ts +208 -0
- package/src/commands/{configStore.ts → storeConfig.ts} +13 -5
- package/src/commands/switchEnv.ts +33 -0
- package/src/commands/test.ts +143 -31
- package/src/commands/upgrade.ts +46 -6
- package/src/commands/wait.ts +333 -22
- package/src/commands/watch.ts +9 -8
- package/src/dubhe.ts +12 -4
- package/src/utils/axios-downloader.ts +116 -0
- package/src/utils/callHandler.ts +118 -118
- package/src/utils/checkBalance.ts +6 -2
- package/src/utils/constants.ts +9 -0
- package/src/utils/generateAccount.ts +1 -1
- package/src/utils/index.ts +4 -3
- package/src/utils/metadataHandler.ts +17 -0
- package/src/utils/publishHandler.ts +408 -289
- package/src/utils/queryStorage.ts +141 -141
- package/src/utils/startNode.ts +115 -16
- package/src/utils/storeConfig.ts +50 -10
- package/src/utils/upgradeHandler.ts +218 -85
- package/src/utils/utils.ts +1041 -63
- package/src/commands/schemagen.ts +0 -40
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { CommandModule } from 'yargs';
|
|
2
|
-
import { schemaGen, loadConfig, DubheConfig } from '@0xobelisk/sui-common';
|
|
3
|
-
import chalk from 'chalk';
|
|
4
|
-
|
|
5
|
-
type Options = {
|
|
6
|
-
'config-path'?: string;
|
|
7
|
-
network?: 'mainnet' | 'testnet' | 'devnet' | 'localnet';
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const commandModule: CommandModule<Options, Options> = {
|
|
11
|
-
command: 'schemagen',
|
|
12
|
-
|
|
13
|
-
describe: 'Autogenerate Dubhe schemas based on the config file',
|
|
14
|
-
|
|
15
|
-
builder: {
|
|
16
|
-
'config-path': {
|
|
17
|
-
type: 'string',
|
|
18
|
-
default: 'dubhe.config.ts',
|
|
19
|
-
desc: 'Path to the config file'
|
|
20
|
-
},
|
|
21
|
-
network: {
|
|
22
|
-
type: 'string',
|
|
23
|
-
choices: ['mainnet', 'testnet', 'devnet', 'localnet'] as const,
|
|
24
|
-
desc: 'Node network (mainnet/testnet/devnet/localnet)'
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
async handler({ 'config-path': configPath, network }) {
|
|
29
|
-
try {
|
|
30
|
-
const dubheConfig = (await loadConfig(configPath)) as DubheConfig;
|
|
31
|
-
await schemaGen(dubheConfig, undefined, network);
|
|
32
|
-
process.exit(0);
|
|
33
|
-
} catch (error: any) {
|
|
34
|
-
console.log(chalk.red('Schemagen failed!'));
|
|
35
|
-
console.error(error.message);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export default commandModule;
|