@0xobelisk/sui-cli 1.2.0-pre.12 → 1.2.0-pre.120

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.
Files changed (40) hide show
  1. package/README.md +7 -7
  2. package/dist/dubhe.js +152 -51
  3. package/dist/dubhe.js.map +1 -1
  4. package/package.json +31 -19
  5. package/src/commands/build.ts +61 -18
  6. package/src/commands/call.ts +83 -83
  7. package/src/commands/checkBalance.ts +27 -12
  8. package/src/commands/convertJson.ts +84 -0
  9. package/src/commands/doctor.ts +1515 -0
  10. package/src/commands/faucet.ts +20 -10
  11. package/src/commands/generate.ts +61 -0
  12. package/src/commands/generateKey.ts +3 -2
  13. package/src/commands/index.ts +20 -11
  14. package/src/commands/info.ts +61 -0
  15. package/src/commands/loadMetadata.ts +68 -0
  16. package/src/commands/localnode.ts +22 -6
  17. package/src/commands/publish.ts +55 -7
  18. package/src/commands/query.ts +101 -101
  19. package/src/commands/shell.ts +208 -0
  20. package/src/commands/{configStore.ts → storeConfig.ts} +13 -5
  21. package/src/commands/switchEnv.ts +33 -0
  22. package/src/commands/test.ts +143 -31
  23. package/src/commands/upgrade.ts +46 -6
  24. package/src/commands/wait.ts +333 -22
  25. package/src/commands/watch.ts +9 -8
  26. package/src/dubhe.ts +12 -4
  27. package/src/utils/axios-downloader.ts +116 -0
  28. package/src/utils/callHandler.ts +118 -118
  29. package/src/utils/checkBalance.ts +6 -2
  30. package/src/utils/constants.ts +9 -0
  31. package/src/utils/generateAccount.ts +1 -1
  32. package/src/utils/index.ts +4 -3
  33. package/src/utils/metadataHandler.ts +17 -0
  34. package/src/utils/publishHandler.ts +404 -289
  35. package/src/utils/queryStorage.ts +141 -141
  36. package/src/utils/startNode.ts +115 -16
  37. package/src/utils/storeConfig.ts +50 -10
  38. package/src/utils/upgradeHandler.ts +210 -86
  39. package/src/utils/utils.ts +1025 -63
  40. package/src/commands/schemagen.ts +0 -40
package/README.md CHANGED
@@ -4,7 +4,7 @@ The Dubhe CLI is used for building and developing a Dubhe project.
4
4
 
5
5
  It comes with
6
6
 
7
- 1. `schemagen`: Autogenerate Dubhe schemas based on the store schemas config file
7
+ 1. `generate`: Generate Move code from dubhe.config.ts
8
8
  2. `publish`: Deploy your own project on the specified sui network.
9
9
  3. `upgrade`: Upgrade your own project on the specified sui network.
10
10
  4. `localnode`: Start a local Sui node for development
@@ -12,25 +12,25 @@ It comes with
12
12
 
13
13
  ## Installation
14
14
 
15
- We dont recommend installing the CLI globally.
15
+ We don't recommend installing the CLI globally.
16
16
 
17
17
  Instead, you should add the CLI as a dev dependency to your project (done automatically if you start from a starter kit using `pnpm create dubhe`), and use it with `pnpm build` inside your project directory.
18
18
 
19
19
  ## Using the CLI
20
20
 
21
- Some commands expect a Dubhe config in the same folder where the CLI is being executed. This includes `schemagen` and `publish`.
21
+ Some commands expect a Dubhe config in the same folder where the CLI is being executed. This includes `generate` and `publish`.
22
22
 
23
23
  `faucet`, and `localnode` can be executed anywhere.
24
24
 
25
25
  ## Commands
26
26
 
27
- ### `schemagen`
27
+ ### `generate`
28
28
 
29
- Generates Store libraries from a `dubhe.config.ts` file. See the [Store Config and `schemagen` documentation](../schemas/config) in the Store section for more details.
29
+ Generates Store libraries from a `dubhe.config.ts` file. See the [Store Config and `generate` documentation](https://dubhe-docs.obelisk.build/dubhe/sui/store/config) in the Store section for more details.
30
30
 
31
31
  ```bash
32
32
  # in a folder with a dubhe.config.ts
33
- dubhe schemagen --config-path dubhe.config.ts
33
+ dubhe generate --config-path dubhe.config.ts
34
34
  ```
35
35
 
36
36
  ### `publish`
@@ -58,7 +58,7 @@ dubhe publish --network mainnet
58
58
 
59
59
  Upgrade Dubhe contract project.
60
60
 
61
- When you add a new schema or modify the system code, you need to upgrade the contract through the `upgrade` method. ([Contract upgrade specification](../migrating-from-others))
61
+ When you add a new schema or modify the system code, you need to upgrade the contract through the `upgrade` method. ([Migration Guide](https://dubhe-docs.obelisk.build/dubhe/migration))
62
62
 
63
63
  ```bash
64
64
  dubhe upgrade --network <network:mainnet/testnet/devnet/localnet>