@acala-network/chopsticks 0.12.0 → 0.12.1-1

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.
@@ -42,6 +42,7 @@ const cli = (y)=>{
42
42
  });
43
43
  process.exit(0);
44
44
  } catch (e) {
45
+ _fetchstorages.logger.error(e);
45
46
  process.exit(1);
46
47
  }
47
48
  }
@@ -118,7 +118,6 @@ const getPrefixesFromConfig = async (config, api)=>{
118
118
  };
119
119
  const fetchStorages = async ({ block, endpoint, dbPath, config })=>{
120
120
  if (!endpoint) throw new Error('endpoint is required');
121
- if (!block) throw new Error('block is required');
122
121
  const provider = new _rpcprovider.WsProvider(endpoint, 3_000);
123
122
  const apiPromise = new _api.ApiPromise({
124
123
  provider
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import _ from 'lodash';
3
3
  import { configSchema, getYargsOptions } from '../../schema/index.js';
4
- import { fetchStorages } from '../../utils/fetch-storages.js';
4
+ import { fetchStorages, logger } from '../../utils/fetch-storages.js';
5
5
  const schema = z.object(_.pick(configSchema.shape, [
6
6
  'endpoint',
7
7
  'block',
@@ -27,6 +27,7 @@ export const cli = (y)=>{
27
27
  });
28
28
  process.exit(0);
29
29
  } catch (e) {
30
+ logger.error(e);
30
31
  process.exit(1);
31
32
  }
32
33
  }
@@ -93,7 +93,6 @@ const checkPalletStorageByName = (meta, palletName, storageName)=>{
93
93
  * Fetch storages and save in a local db
94
94
  */ export const fetchStorages = async ({ block, endpoint, dbPath, config })=>{
95
95
  if (!endpoint) throw new Error('endpoint is required');
96
- if (!block) throw new Error('block is required');
97
96
  const provider = new WsProvider(endpoint, 3_000);
98
97
  const apiPromise = new ApiPromise({
99
98
  provider
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acala-network/chopsticks",
3
- "version": "0.12.0",
3
+ "version": "0.12.1-1",
4
4
  "author": "Acala Developers <hello@acala.network>",
5
5
  "license": "Apache-2.0",
6
6
  "bin": "./chopsticks.cjs",
@@ -10,17 +10,21 @@
10
10
  "build": "yarn clean && yarn build:cjs && yarn build:esm",
11
11
  "build:cjs": "swc ./src --config-file ../../.cjsswcrc -d dist/cjs --copy-files && tsc -p tsconfig.json --declarationDir dist/cjs && echo '{\"type\": \"commonjs\"}' > dist/cjs/package.json",
12
12
  "build:esm": "swc ./src --config-file ../../.esmswcrc -d dist/esm --copy-files && tsc -p tsconfig.json --declarationDir dist/esm",
13
- "docs:prep": "typedoc"
13
+ "docs:prep": "typedoc",
14
+ "depcheck": "npx depcheck --ignore-patterns='*.test.ts'"
14
15
  },
15
16
  "dependencies": {
16
- "@acala-network/chopsticks-core": "0.12.0",
17
- "@acala-network/chopsticks-db": "0.12.0",
17
+ "@acala-network/chopsticks-core": "0.12.1-1",
18
+ "@acala-network/chopsticks-db": "0.12.1-1",
18
19
  "@pnpm/npm-conf": "^2.2.2",
20
+ "@polkadot/api": "^10.11.2",
19
21
  "@polkadot/api-augment": "^10.11.2",
22
+ "@polkadot/rpc-provider": "^10.11.2",
20
23
  "@polkadot/types": "^10.11.2",
21
24
  "@polkadot/util": "^12.6.2",
22
25
  "@polkadot/util-crypto": "^12.6.2",
23
26
  "axios": "^1.6.8",
27
+ "comlink": "^4.4.1",
24
28
  "dotenv": "^16.4.5",
25
29
  "global-agent": "^3.0.0",
26
30
  "js-yaml": "^4.1.0",
@@ -39,8 +43,7 @@
39
43
  "@types/node": "^20.11.5",
40
44
  "@types/ws": "^8.5.10",
41
45
  "@types/yargs": "^17.0.32",
42
- "typescript": "^5.3.3",
43
- "vitest": "^1.4.0"
46
+ "typescript": "^5.3.3"
44
47
  },
45
48
  "files": [
46
49
  "dist/esm/**",