@orderly.network/cli 0.9.2 → 1.0.0

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/package.json CHANGED
@@ -1,28 +1,65 @@
1
1
  {
2
2
  "name": "@orderly.network/cli",
3
- "version": "0.9.2",
4
- "description": "",
3
+ "version": "1.0.0",
4
+ "description": "CLI tool for Orderly Network trading - secure keychain-based authentication",
5
+ "main": "dist/index.js",
6
+ "type": "module",
5
7
  "bin": {
6
- "orderly": "./bin/cli.js"
8
+ "orderly": "dist/index.js"
7
9
  },
10
+ "scripts": {
11
+ "build": "node scripts/build.js",
12
+ "dev": "node scripts/build.js --watch",
13
+ "start": "node dist/index.js",
14
+ "lint": "eslint src --ext .ts --report-unused-disable-directives --max-warnings 0",
15
+ "lint:fix": "eslint src --ext .ts --fix",
16
+ "format": "prettier --write \"src/**/*.{ts,json,md}\"",
17
+ "format:check": "prettier --check \"src/**/*.{ts,json,md}\"",
18
+ "typecheck": "tsc --noEmit",
19
+ "prepublishOnly": "yarn build && yarn typecheck"
20
+ },
21
+ "keywords": [
22
+ "orderly",
23
+ "orderly-network",
24
+ "cli",
25
+ "trading",
26
+ "defi",
27
+ "perpetuals"
28
+ ],
29
+ "author": "Orderly Network",
30
+ "license": "MIT",
8
31
  "files": [
9
- "bin",
10
- "commands"
32
+ "dist"
11
33
  ],
12
- "keywords": [],
13
- "author": "leo",
14
- "license": "ISC",
15
34
  "publishConfig": {
16
35
  "access": "public"
17
36
  },
18
37
  "dependencies": {
19
- "@metamask/sdk": "^0.14.1",
20
- "configstore": "^6.0.0",
21
- "enquirer": "^2.4.1",
22
- "yargs": "^17.7.2",
23
- "@orderly.network/core": "2.6.2"
38
+ "@noble/curves": "^2.0.1",
39
+ "@orderly.network/default-solana-adapter": "^2.10.2",
40
+ "axios": "^1.13.6",
41
+ "bs58": "^6.0.0",
42
+ "cac": "6.7.14",
43
+ "ethers": "^6.16.0",
44
+ "keytar": "^7.9.0",
45
+ "kleur": "^4.1.5",
46
+ "prompts": "^2.4.2",
47
+ "zod": "^4.3.6"
24
48
  },
25
- "scripts": {
26
- "test": "echo \"Error: no test specified\" && exit 1"
49
+ "devDependencies": {
50
+ "@eslint/js": "^9.24.0",
51
+ "@types/node": "^24.0.0",
52
+ "@types/prompts": "^2.4.9",
53
+ "@typescript-eslint/eslint-plugin": "^8.57.0",
54
+ "@typescript-eslint/parser": "^8.57.0",
55
+ "esbuild": "^0.27.4",
56
+ "eslint": "^10.0.3",
57
+ "eslint-config-prettier": "^10.1.8",
58
+ "prettier": "^3.8.1",
59
+ "typescript": "^5.9.3",
60
+ "typescript-eslint": "^8.57.0"
61
+ },
62
+ "engines": {
63
+ "node": ">=22.0.0"
27
64
  }
28
- }
65
+ }
package/bin/cli.js DELETED
@@ -1,22 +0,0 @@
1
- #! /usr/bin/env node
2
-
3
- // command:
4
- // project create
5
- // theme pull/push
6
- // intl pull/push
7
-
8
- const yargs = require("yargs");
9
- const { hideBin } = require("yargs/helpers");
10
-
11
- console.clear();
12
-
13
- const create = require("../commands/create");
14
-
15
-
16
-
17
- const argv = yargs(hideBin(process.argv))
18
- // .command(create)
19
- .commandDir("../commands")
20
- .demandCommand(1,'You need at least one command before moving on')
21
- // .example('$0 create -n my-project -t react', 'create a new project')
22
- .help().argv;
File without changes
@@ -1,23 +0,0 @@
1
- function handler(argv) {
2
- console.log("create:::::", argv);
3
- }
4
-
5
- module.exports = {
6
- command: "create",
7
- describe: "create a new Orderly project",
8
- builder: (yargs) => {
9
- yargs.option("name", {
10
- alias: "n",
11
- describe: "project name",
12
- type: "string",
13
- demandOption: true,
14
- });
15
- yargs.option("template", {
16
- alias: "t",
17
- describe: "project template",
18
- type: "string",
19
- demandOption: true,
20
- });
21
- },
22
- handler,
23
- };
package/commands/intl.js DELETED
File without changes
package/commands/login.js DELETED
@@ -1,73 +0,0 @@
1
- const metaMaks = require("@metamask/sdk");
2
-
3
- const qrcode = require("qrcode-terminal");
4
-
5
-
6
-
7
- function handler(argv) {
8
- const options = {
9
- shouldShimWeb3: false,
10
- dappMetadata: {
11
- name: "NodeJS example",
12
- },
13
- logging: {
14
- sdk: false,
15
- },
16
- checkInstallationImmediately: false,
17
- // Optional: customize modal text
18
- modals: {
19
- install: ({ link }) => {
20
- qrcode.generate(link, { small: true }, (qr) => console.log(qr));
21
- return {};
22
- },
23
- otp: () => {
24
- return {
25
- mount() {},
26
- updateOTPValue: (otpValue) => {
27
- if (otpValue !== "") {
28
- console.debug(
29
- `[CUSTOMIZE TEXT] Choose the following value on your metamask mobile wallet: ${otpValue}`
30
- );
31
- }
32
- },
33
- };
34
- },
35
- },
36
- };
37
- const MMSDK = new metaMaks.MetaMaskSDK(options);
38
- console.log("create:::::", argv);
39
-
40
-
41
-
42
- // MMSDK.init();
43
-
44
- // const ethereum = MMSDK.getProvider();
45
-
46
- // ethereum.request({ method: "eth_requestAccounts" }).then((accounts) => {
47
- // console.log(accounts);
48
- // });
49
-
50
- // MMSDK.connect().then((res) => {
51
- // console.log(res)
52
- // })
53
- }
54
-
55
- module.exports = {
56
- command: "login",
57
- describe: "Connect to your Orderly account",
58
- builder: (yargs) => {
59
- // yargs.option("name", {
60
- // alias: "n",
61
- // describe: "project name",
62
- // type: "string",
63
- // demandOption: true,
64
- // });
65
- // yargs.option("template", {
66
- // alias: "t",
67
- // describe: "project template",
68
- // type: "string",
69
- // demandOption: true,
70
- // });
71
- },
72
- handler,
73
- };
package/commands/sign.js DELETED
@@ -1,26 +0,0 @@
1
- // sign message
2
-
3
- function handler(argv) {
4
- console.log("create:::::", argv);
5
- }
6
-
7
- module.exports = {
8
- command: "sign",
9
- describe: "create a new Orderly project",
10
- builder: (yargs) => {
11
- yargs.option("name", {
12
- alias: "n",
13
- describe: "project name",
14
- type: "string",
15
- demandOption: true,
16
- });
17
- yargs.option("template", {
18
- alias: "t",
19
- describe: "project template",
20
- type: "string",
21
- demandOption: true,
22
- });
23
- },
24
- handler,
25
- };
26
-
@@ -1,16 +0,0 @@
1
- exports.command = "pull";
2
-
3
- exports.describe = "Pull theme from the theming build portal";
4
-
5
- exports.builder = (yargs) => {
6
- yargs.option("themeId", {
7
- alias: "id",
8
- describe: "theme id",
9
- type: "string",
10
- demandOption: true,
11
- });
12
- };
13
-
14
- exports.handler = (argv) => {
15
- console.log("pull:::::", argv);
16
- };
File without changes
package/commands/theme.js DELETED
@@ -1,10 +0,0 @@
1
- exports.command = "theme";
2
-
3
- exports.describe = "theme commands";
4
-
5
- exports.builder = (yargs) => {
6
- yargs.commandDir("./theme");
7
- };
8
- exports.handler = (argv) => {
9
- console.log("theme:::::", argv);
10
- };