@subql/node-ethereum 1.10.1-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/CHANGELOG.md +7 -0
- package/LICENSE +201 -0
- package/README.md +76 -0
- package/bin/run +4 -0
- package/bin/run.cmd +3 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/app.module.d.ts +2 -0
- package/dist/app.module.js +35 -0
- package/dist/app.module.js.map +1 -0
- package/dist/configure/SubqueryProject.d.ts +29 -0
- package/dist/configure/SubqueryProject.js +82 -0
- package/dist/configure/SubqueryProject.js.map +1 -0
- package/dist/configure/configure.module.d.ts +7 -0
- package/dist/configure/configure.module.js +172 -0
- package/dist/configure/configure.module.js.map +1 -0
- package/dist/configure/configure.module.spec.d.ts +1 -0
- package/dist/configure/configure.module.spec.js +26 -0
- package/dist/configure/configure.module.spec.js.map +1 -0
- package/dist/ethereum/api.ethereum.d.ts +21 -0
- package/dist/ethereum/api.ethereum.js +190 -0
- package/dist/ethereum/api.ethereum.js.map +1 -0
- package/dist/ethereum/api.service.ethereum.d.ts +8 -0
- package/dist/ethereum/api.service.ethereum.js +57 -0
- package/dist/ethereum/api.service.ethereum.js.map +1 -0
- package/dist/ethereum/block.ethereum.d.ts +15 -0
- package/dist/ethereum/block.ethereum.js +87 -0
- package/dist/ethereum/block.ethereum.js.map +1 -0
- package/dist/ethereum/index.d.ts +2 -0
- package/dist/ethereum/index.js +21 -0
- package/dist/ethereum/index.js.map +1 -0
- package/dist/ethereum/utils.ethereum.d.ts +6 -0
- package/dist/ethereum/utils.ethereum.js +131 -0
- package/dist/ethereum/utils.ethereum.js.map +1 -0
- package/dist/indexer/dictionary.service.d.ts +7 -0
- package/dist/indexer/dictionary.service.js +29 -0
- package/dist/indexer/dictionary.service.js.map +1 -0
- package/dist/indexer/ds-processor.service.d.ts +26 -0
- package/dist/indexer/ds-processor.service.js +133 -0
- package/dist/indexer/ds-processor.service.js.map +1 -0
- package/dist/indexer/dynamic-ds.service.d.ts +23 -0
- package/dist/indexer/dynamic-ds.service.js +105 -0
- package/dist/indexer/dynamic-ds.service.js.map +1 -0
- package/dist/indexer/fetch.module.d.ts +2 -0
- package/dist/indexer/fetch.module.js +68 -0
- package/dist/indexer/fetch.module.js.map +1 -0
- package/dist/indexer/fetch.service.d.ts +43 -0
- package/dist/indexer/fetch.service.js +359 -0
- package/dist/indexer/fetch.service.js.map +1 -0
- package/dist/indexer/indexer.manager.d.ts +36 -0
- package/dist/indexer/indexer.manager.js +256 -0
- package/dist/indexer/indexer.manager.js.map +1 -0
- package/dist/indexer/indexer.module.d.ts +2 -0
- package/dist/indexer/indexer.module.js +52 -0
- package/dist/indexer/indexer.module.js.map +1 -0
- package/dist/indexer/project.service.d.ts +39 -0
- package/dist/indexer/project.service.js +255 -0
- package/dist/indexer/project.service.js.map +1 -0
- package/dist/indexer/sandbox.service.d.ts +12 -0
- package/dist/indexer/sandbox.service.js +58 -0
- package/dist/indexer/sandbox.service.js.map +1 -0
- package/dist/indexer/types.d.ts +10 -0
- package/dist/indexer/types.js +11 -0
- package/dist/indexer/types.js.map +1 -0
- package/dist/indexer/worker/block-dispatcher.service.d.ts +69 -0
- package/dist/indexer/worker/block-dispatcher.service.js +356 -0
- package/dist/indexer/worker/block-dispatcher.service.js.map +1 -0
- package/dist/indexer/worker/worker.d.ts +14 -0
- package/dist/indexer/worker/worker.js +85 -0
- package/dist/indexer/worker/worker.js.map +1 -0
- package/dist/indexer/worker/worker.module.d.ts +2 -0
- package/dist/indexer/worker/worker.module.js +33 -0
- package/dist/indexer/worker/worker.module.js.map +1 -0
- package/dist/indexer/worker/worker.service.d.ts +28 -0
- package/dist/indexer/worker/worker.service.js +79 -0
- package/dist/indexer/worker/worker.service.js.map +1 -0
- package/dist/init.d.ts +1 -0
- package/dist/init.js +54 -0
- package/dist/init.js.map +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +14 -0
- package/dist/main.js.map +1 -0
- package/dist/meta/meta.controller.d.ts +23 -0
- package/dist/meta/meta.controller.js +36 -0
- package/dist/meta/meta.controller.js.map +1 -0
- package/dist/meta/meta.module.d.ts +2 -0
- package/dist/meta/meta.module.js +77 -0
- package/dist/meta/meta.module.js.map +1 -0
- package/dist/meta/meta.service.d.ts +42 -0
- package/dist/meta/meta.service.js +110 -0
- package/dist/meta/meta.service.js.map +1 -0
- package/dist/subcommands/forceClean.init.d.ts +1 -0
- package/dist/subcommands/forceClean.init.js +25 -0
- package/dist/subcommands/forceClean.init.js.map +1 -0
- package/dist/subcommands/forceClean.module.d.ts +4 -0
- package/dist/subcommands/forceClean.module.js +38 -0
- package/dist/subcommands/forceClean.module.js.map +1 -0
- package/dist/subcommands/forceClean.service.d.ts +8 -0
- package/dist/subcommands/forceClean.service.js +65 -0
- package/dist/subcommands/forceClean.service.js.map +1 -0
- package/dist/subcommands/reindex.init.d.ts +1 -0
- package/dist/subcommands/reindex.init.js +25 -0
- package/dist/subcommands/reindex.init.js.map +1 -0
- package/dist/subcommands/reindex.module.d.ts +4 -0
- package/dist/subcommands/reindex.module.js +39 -0
- package/dist/subcommands/reindex.module.js.map +1 -0
- package/dist/subcommands/reindex.service.d.ts +24 -0
- package/dist/subcommands/reindex.service.js +114 -0
- package/dist/subcommands/reindex.service.js.map +1 -0
- package/dist/utils/project.d.ts +13 -0
- package/dist/utils/project.js +191 -0
- package/dist/utils/project.js.map +1 -0
- package/dist/utils/string.d.ts +4 -0
- package/dist/utils/string.js +32 -0
- package/dist/utils/string.js.map +1 -0
- package/dist/yargs.d.ts +154 -0
- package/dist/yargs.js +193 -0
- package/dist/yargs.js.map +1 -0
- package/package.json +77 -0
package/dist/yargs.d.ts
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
export declare const yargsOptions: import("yargs").Argv<import("yargs").Omit<{
|
|
2
|
+
targetHeight: number;
|
|
3
|
+
}, "subquery" | "subquery-name" | "config" | "local" | "db-schema" | "unsafe" | "subscription" | "batch-size" | "scale-batch-size" | "timeout" | "debug" | "profiler" | "network-endpoint" | "output-fmt" | "log-level" | "migrate" | "timestamp-field" | "network-dictionary" | "dictionary-timeout" | "mmr-path" | "proof-of-index" | "ipfs" | "port" | "disable-historical" | "workers" | "query-limit"> & import("yargs").InferredOptionTypes<{
|
|
4
|
+
subquery: {
|
|
5
|
+
alias: string;
|
|
6
|
+
demandOption: true;
|
|
7
|
+
default: string;
|
|
8
|
+
describe: string;
|
|
9
|
+
type: "string";
|
|
10
|
+
};
|
|
11
|
+
'subquery-name': {
|
|
12
|
+
deprecated: true;
|
|
13
|
+
demandOption: false;
|
|
14
|
+
describe: string;
|
|
15
|
+
type: "string";
|
|
16
|
+
};
|
|
17
|
+
config: {
|
|
18
|
+
alias: string;
|
|
19
|
+
demandOption: false;
|
|
20
|
+
describe: string;
|
|
21
|
+
type: "string";
|
|
22
|
+
};
|
|
23
|
+
local: {
|
|
24
|
+
deprecated: true;
|
|
25
|
+
type: "boolean";
|
|
26
|
+
demandOption: false;
|
|
27
|
+
describe: string;
|
|
28
|
+
};
|
|
29
|
+
'db-schema': {
|
|
30
|
+
demandOption: false;
|
|
31
|
+
describe: string;
|
|
32
|
+
type: "string";
|
|
33
|
+
};
|
|
34
|
+
unsafe: {
|
|
35
|
+
type: "boolean";
|
|
36
|
+
demandOption: false;
|
|
37
|
+
describe: string;
|
|
38
|
+
};
|
|
39
|
+
subscription: {
|
|
40
|
+
demandOption: false;
|
|
41
|
+
describe: string;
|
|
42
|
+
type: "boolean";
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
45
|
+
'batch-size': {
|
|
46
|
+
demandOption: false;
|
|
47
|
+
describe: string;
|
|
48
|
+
type: "number";
|
|
49
|
+
};
|
|
50
|
+
'scale-batch-size': {
|
|
51
|
+
type: "boolean";
|
|
52
|
+
demandOption: false;
|
|
53
|
+
describe: string;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
56
|
+
timeout: {
|
|
57
|
+
demandOption: false;
|
|
58
|
+
describe: string;
|
|
59
|
+
type: "number";
|
|
60
|
+
};
|
|
61
|
+
debug: {
|
|
62
|
+
demandOption: false;
|
|
63
|
+
describe: string;
|
|
64
|
+
type: "boolean";
|
|
65
|
+
default: boolean;
|
|
66
|
+
};
|
|
67
|
+
profiler: {
|
|
68
|
+
demandOption: false;
|
|
69
|
+
describe: string;
|
|
70
|
+
type: "boolean";
|
|
71
|
+
default: boolean;
|
|
72
|
+
};
|
|
73
|
+
'network-endpoint': {
|
|
74
|
+
demandOption: false;
|
|
75
|
+
type: "string";
|
|
76
|
+
describe: string;
|
|
77
|
+
};
|
|
78
|
+
'output-fmt': {
|
|
79
|
+
demandOption: false;
|
|
80
|
+
describe: string;
|
|
81
|
+
type: "string";
|
|
82
|
+
choices: string[];
|
|
83
|
+
};
|
|
84
|
+
'log-level': {
|
|
85
|
+
demandOption: false;
|
|
86
|
+
describe: string;
|
|
87
|
+
type: "string";
|
|
88
|
+
choices: string[];
|
|
89
|
+
};
|
|
90
|
+
migrate: {
|
|
91
|
+
demandOption: false;
|
|
92
|
+
describe: string;
|
|
93
|
+
type: "boolean";
|
|
94
|
+
default: boolean;
|
|
95
|
+
};
|
|
96
|
+
'timestamp-field': {
|
|
97
|
+
demandOption: false;
|
|
98
|
+
describe: string;
|
|
99
|
+
type: "boolean";
|
|
100
|
+
default: boolean;
|
|
101
|
+
};
|
|
102
|
+
'network-dictionary': {
|
|
103
|
+
alias: string;
|
|
104
|
+
demandOption: false;
|
|
105
|
+
describe: string;
|
|
106
|
+
type: "string";
|
|
107
|
+
};
|
|
108
|
+
'dictionary-timeout': {
|
|
109
|
+
demandOption: false;
|
|
110
|
+
describe: string;
|
|
111
|
+
type: "number";
|
|
112
|
+
};
|
|
113
|
+
'mmr-path': {
|
|
114
|
+
alias: string;
|
|
115
|
+
demandOption: false;
|
|
116
|
+
describe: string;
|
|
117
|
+
type: "string";
|
|
118
|
+
};
|
|
119
|
+
'proof-of-index': {
|
|
120
|
+
demandOption: false;
|
|
121
|
+
describe: string;
|
|
122
|
+
type: "boolean";
|
|
123
|
+
default: boolean;
|
|
124
|
+
};
|
|
125
|
+
ipfs: {
|
|
126
|
+
demandOption: false;
|
|
127
|
+
describe: string;
|
|
128
|
+
type: "string";
|
|
129
|
+
};
|
|
130
|
+
port: {
|
|
131
|
+
alias: string;
|
|
132
|
+
demandOption: false;
|
|
133
|
+
describe: string;
|
|
134
|
+
type: "number";
|
|
135
|
+
};
|
|
136
|
+
'disable-historical': {
|
|
137
|
+
demandOption: false;
|
|
138
|
+
default: boolean;
|
|
139
|
+
describe: string;
|
|
140
|
+
type: "boolean";
|
|
141
|
+
};
|
|
142
|
+
workers: {
|
|
143
|
+
alias: string;
|
|
144
|
+
demandOption: false;
|
|
145
|
+
describe: string;
|
|
146
|
+
type: "number";
|
|
147
|
+
};
|
|
148
|
+
'query-limit': {
|
|
149
|
+
demandOption: false;
|
|
150
|
+
describe: string;
|
|
151
|
+
type: "number";
|
|
152
|
+
default: number;
|
|
153
|
+
};
|
|
154
|
+
}>>;
|
package/dist/yargs.js
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2020-2022 OnFinality Limited authors & contributors
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
6
|
+
};
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.yargsOptions = void 0;
|
|
9
|
+
const logger_1 = require("@subql/node-core/logger");
|
|
10
|
+
const helpers_1 = require("yargs/helpers");
|
|
11
|
+
const yargs_1 = __importDefault(require("yargs/yargs"));
|
|
12
|
+
exports.yargsOptions = (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv))
|
|
13
|
+
.command({
|
|
14
|
+
command: 'force-clean',
|
|
15
|
+
describe: 'Clean the database dropping project schemas and tables. Once the command is executed, the application would exit upon completion.',
|
|
16
|
+
builder: {},
|
|
17
|
+
handler: (argv) => {
|
|
18
|
+
(0, logger_1.initLogger)(argv.debug, argv.outputFmt, argv.logLevel);
|
|
19
|
+
// lazy import to make sure logger is instantiated before all other services
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
21
|
+
const { forceCleanInit } = require('./subcommands/forceClean.init');
|
|
22
|
+
return forceCleanInit();
|
|
23
|
+
},
|
|
24
|
+
})
|
|
25
|
+
.command({
|
|
26
|
+
command: 'reindex',
|
|
27
|
+
describe: 'Reindex to specified block height. Historical must be enabled for the targeted project (--disable-historical=false). Once the command is executed, the application would exit upon completion.',
|
|
28
|
+
builder: (yargs) => yargs.options('targetHeight', {
|
|
29
|
+
type: 'number',
|
|
30
|
+
description: 'set targetHeight',
|
|
31
|
+
require: true,
|
|
32
|
+
}),
|
|
33
|
+
handler: (argv) => {
|
|
34
|
+
(0, logger_1.initLogger)(argv.debug, argv.outputFmt, argv.logLevel);
|
|
35
|
+
// lazy import to make sure logger is instantiated before all other services
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
37
|
+
const { reindexInit } = require('./subcommands/reindex.init');
|
|
38
|
+
return reindexInit(argv.targetHeight);
|
|
39
|
+
},
|
|
40
|
+
})
|
|
41
|
+
.options({
|
|
42
|
+
subquery: {
|
|
43
|
+
alias: 'f',
|
|
44
|
+
demandOption: true,
|
|
45
|
+
default: process.cwd(),
|
|
46
|
+
describe: 'Local path or IPFS cid of the subquery project',
|
|
47
|
+
type: 'string',
|
|
48
|
+
},
|
|
49
|
+
'subquery-name': {
|
|
50
|
+
deprecated: true,
|
|
51
|
+
demandOption: false,
|
|
52
|
+
describe: 'Name of the subquery project',
|
|
53
|
+
type: 'string',
|
|
54
|
+
},
|
|
55
|
+
config: {
|
|
56
|
+
alias: 'c',
|
|
57
|
+
demandOption: false,
|
|
58
|
+
describe: 'Specify configuration file',
|
|
59
|
+
type: 'string',
|
|
60
|
+
},
|
|
61
|
+
local: {
|
|
62
|
+
deprecated: true,
|
|
63
|
+
type: 'boolean',
|
|
64
|
+
demandOption: false,
|
|
65
|
+
describe: 'Use local mode',
|
|
66
|
+
},
|
|
67
|
+
'db-schema': {
|
|
68
|
+
demandOption: false,
|
|
69
|
+
describe: 'Db schema name of the project',
|
|
70
|
+
type: 'string',
|
|
71
|
+
},
|
|
72
|
+
unsafe: {
|
|
73
|
+
type: 'boolean',
|
|
74
|
+
demandOption: false,
|
|
75
|
+
describe: 'Allows usage of any built-in module within the sandbox',
|
|
76
|
+
},
|
|
77
|
+
subscription: {
|
|
78
|
+
demandOption: false,
|
|
79
|
+
describe: 'Enable subscription by create notification triggers',
|
|
80
|
+
type: 'boolean',
|
|
81
|
+
default: false,
|
|
82
|
+
},
|
|
83
|
+
'batch-size': {
|
|
84
|
+
demandOption: false,
|
|
85
|
+
describe: 'Batch size of blocks to fetch in one round',
|
|
86
|
+
type: 'number',
|
|
87
|
+
},
|
|
88
|
+
'scale-batch-size': {
|
|
89
|
+
type: 'boolean',
|
|
90
|
+
demandOption: false,
|
|
91
|
+
describe: 'scale batch size based on memory usage',
|
|
92
|
+
default: false,
|
|
93
|
+
},
|
|
94
|
+
timeout: {
|
|
95
|
+
demandOption: false,
|
|
96
|
+
describe: 'Timeout for indexer sandbox to execute the mapping functions',
|
|
97
|
+
type: 'number',
|
|
98
|
+
},
|
|
99
|
+
debug: {
|
|
100
|
+
demandOption: false,
|
|
101
|
+
describe: 'Show debug information to console output. will forcefully set log level to debug',
|
|
102
|
+
type: 'boolean',
|
|
103
|
+
default: false,
|
|
104
|
+
},
|
|
105
|
+
profiler: {
|
|
106
|
+
demandOption: false,
|
|
107
|
+
describe: 'Show profiler information to console output',
|
|
108
|
+
type: 'boolean',
|
|
109
|
+
default: false,
|
|
110
|
+
},
|
|
111
|
+
'network-endpoint': {
|
|
112
|
+
demandOption: false,
|
|
113
|
+
type: 'string',
|
|
114
|
+
describe: 'Blockchain network endpoint to connect',
|
|
115
|
+
},
|
|
116
|
+
'output-fmt': {
|
|
117
|
+
demandOption: false,
|
|
118
|
+
describe: 'Print log as json or plain text',
|
|
119
|
+
type: 'string',
|
|
120
|
+
choices: ['json', 'colored'],
|
|
121
|
+
},
|
|
122
|
+
'log-level': {
|
|
123
|
+
demandOption: false,
|
|
124
|
+
describe: 'Specify log level to print. Ignored when --debug is used',
|
|
125
|
+
type: 'string',
|
|
126
|
+
choices: ['fatal', 'error', 'warn', 'info', 'debug', 'trace', 'silent'],
|
|
127
|
+
},
|
|
128
|
+
migrate: {
|
|
129
|
+
demandOption: false,
|
|
130
|
+
describe: 'Migrate db schema (for management tables only)',
|
|
131
|
+
type: 'boolean',
|
|
132
|
+
default: false,
|
|
133
|
+
},
|
|
134
|
+
'timestamp-field': {
|
|
135
|
+
demandOption: false,
|
|
136
|
+
describe: 'Enable/disable created_at and updated_at in schema',
|
|
137
|
+
type: 'boolean',
|
|
138
|
+
default: false,
|
|
139
|
+
},
|
|
140
|
+
'network-dictionary': {
|
|
141
|
+
alias: 'd',
|
|
142
|
+
demandOption: false,
|
|
143
|
+
describe: 'Specify the dictionary api for this network',
|
|
144
|
+
type: 'string',
|
|
145
|
+
},
|
|
146
|
+
'dictionary-timeout': {
|
|
147
|
+
demandOption: false,
|
|
148
|
+
describe: 'Max timeout for dictionary query',
|
|
149
|
+
type: 'number',
|
|
150
|
+
},
|
|
151
|
+
'mmr-path': {
|
|
152
|
+
alias: 'm',
|
|
153
|
+
demandOption: false,
|
|
154
|
+
describe: 'Local path of the merkle mountain range (.mmr) file',
|
|
155
|
+
type: 'string',
|
|
156
|
+
},
|
|
157
|
+
'proof-of-index': {
|
|
158
|
+
demandOption: false,
|
|
159
|
+
describe: 'Enable/disable proof of index',
|
|
160
|
+
type: 'boolean',
|
|
161
|
+
default: false,
|
|
162
|
+
},
|
|
163
|
+
ipfs: {
|
|
164
|
+
demandOption: false,
|
|
165
|
+
describe: 'IPFS gateway endpoint',
|
|
166
|
+
type: 'string',
|
|
167
|
+
},
|
|
168
|
+
port: {
|
|
169
|
+
alias: 'p',
|
|
170
|
+
demandOption: false,
|
|
171
|
+
describe: 'The port the service will bind to',
|
|
172
|
+
type: 'number',
|
|
173
|
+
},
|
|
174
|
+
'disable-historical': {
|
|
175
|
+
demandOption: false,
|
|
176
|
+
default: false,
|
|
177
|
+
describe: 'Disable storing historical state entities',
|
|
178
|
+
type: 'boolean',
|
|
179
|
+
},
|
|
180
|
+
workers: {
|
|
181
|
+
alias: 'w',
|
|
182
|
+
demandOption: false,
|
|
183
|
+
describe: 'Number of worker threads to use for fetching and processing blocks. Disabled by default.',
|
|
184
|
+
type: 'number',
|
|
185
|
+
},
|
|
186
|
+
'query-limit': {
|
|
187
|
+
demandOption: false,
|
|
188
|
+
describe: 'The limit of items a project can query with store.getByField at once',
|
|
189
|
+
type: 'number',
|
|
190
|
+
default: 100,
|
|
191
|
+
},
|
|
192
|
+
});
|
|
193
|
+
//# sourceMappingURL=yargs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yargs.js","sourceRoot":"","sources":["../src/yargs.ts"],"names":[],"mappings":";AAAA,gEAAgE;AAChE,sCAAsC;;;;;;AAEtC,oDAAqD;AACrD,2CAAwC;AACxC,wDAAgC;AAEnB,QAAA,YAAY,GAAG,IAAA,eAAK,EAAC,IAAA,iBAAO,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KACrD,OAAO,CAAC;IACP,OAAO,EAAE,aAAa;IACtB,QAAQ,EACN,mIAAmI;IACrI,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QAChB,IAAA,mBAAU,EACR,IAAI,CAAC,KAAgB,EACrB,IAAI,CAAC,SAA+B,EACpC,IAAI,CAAC,QAA8B,CACpC,CAAC;QAEF,4EAA4E;QAC5E,8DAA8D;QAC9D,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAAC;QACpE,OAAO,cAAc,EAAE,C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Q,EACN,sEAAsE;QACxE,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,GAAG;KACb;CACF,CAAC,CAAC","sourcesContent":["// Copyright 2020-2022 OnFinality Limited authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { initLogger } from '@subql/node-core/logger';\nimport { hideBin } from 'yargs/helpers';\nimport yargs from 'yargs/yargs';\n\nexport const yargsOptions = yargs(hideBin(process.argv))\n .command({\n command: 'force-clean',\n describe:\n 'Clean the database dropping project schemas and tables. Once the command is executed, the application would exit upon completion.',\n builder: {},\n handler: (argv) => {\n initLogger(\n argv.debug as boolean,\n argv.outputFmt as 'json' | 'colored',\n argv.logLevel as string | undefined,\n );\n\n // lazy import to make sure logger is instantiated before all other services\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { forceCleanInit } = require('./subcommands/forceClean.init');\n return forceCleanInit();\n },\n })\n .command({\n command: 'reindex',\n describe:\n 'Reindex to specified block height. Historical must be enabled for the targeted project (--disable-historical=false). Once the command is executed, the application would exit upon completion.',\n builder: (yargs) =>\n yargs.options('targetHeight', {\n type: 'number',\n description: 'set targetHeight',\n require: true,\n }),\n handler: (argv) => {\n initLogger(\n argv.debug as boolean,\n argv.outputFmt as 'json' | 'colored',\n argv.logLevel as string | undefined,\n );\n // lazy import to make sure logger is instantiated before all other services\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { reindexInit } = require('./subcommands/reindex.init');\n return reindexInit(argv.targetHeight);\n },\n })\n .options({\n subquery: {\n alias: 'f',\n demandOption: true,\n default: process.cwd(),\n describe: 'Local path or IPFS cid of the subquery project',\n type: 'string',\n },\n 'subquery-name': {\n deprecated: true,\n demandOption: false,\n describe: 'Name of the subquery project',\n type: 'string',\n },\n config: {\n alias: 'c',\n demandOption: false,\n describe: 'Specify configuration file',\n type: 'string',\n },\n local: {\n deprecated: true,\n type: 'boolean',\n demandOption: false,\n describe: 'Use local mode',\n },\n 'db-schema': {\n demandOption: false,\n describe: 'Db schema name of the project',\n type: 'string',\n },\n unsafe: {\n type: 'boolean',\n demandOption: false,\n describe: 'Allows usage of any built-in module within the sandbox',\n },\n subscription: {\n demandOption: false,\n describe: 'Enable subscription by create notification triggers',\n type: 'boolean',\n default: false,\n },\n 'batch-size': {\n demandOption: false,\n describe: 'Batch size of blocks to fetch in one round',\n type: 'number',\n },\n 'scale-batch-size': {\n type: 'boolean',\n demandOption: false,\n describe: 'scale batch size based on memory usage',\n default: false,\n },\n timeout: {\n demandOption: false,\n describe: 'Timeout for indexer sandbox to execute the mapping functions',\n type: 'number',\n },\n debug: {\n demandOption: false,\n describe:\n 'Show debug information to console output. will forcefully set log level to debug',\n type: 'boolean',\n default: false,\n },\n profiler: {\n demandOption: false,\n describe: 'Show profiler information to console output',\n type: 'boolean',\n default: false,\n },\n 'network-endpoint': {\n demandOption: false,\n type: 'string',\n describe: 'Blockchain network endpoint to connect',\n },\n 'output-fmt': {\n demandOption: false,\n describe: 'Print log as json or plain text',\n type: 'string',\n choices: ['json', 'colored'],\n },\n 'log-level': {\n demandOption: false,\n describe: 'Specify log level to print. Ignored when --debug is used',\n type: 'string',\n choices: ['fatal', 'error', 'warn', 'info', 'debug', 'trace', 'silent'],\n },\n migrate: {\n demandOption: false,\n describe: 'Migrate db schema (for management tables only)',\n type: 'boolean',\n default: false,\n },\n 'timestamp-field': {\n demandOption: false,\n describe: 'Enable/disable created_at and updated_at in schema',\n type: 'boolean',\n default: false,\n },\n 'network-dictionary': {\n alias: 'd',\n demandOption: false,\n describe: 'Specify the dictionary api for this network',\n type: 'string',\n },\n 'dictionary-timeout': {\n demandOption: false,\n describe: 'Max timeout for dictionary query',\n type: 'number',\n },\n 'mmr-path': {\n alias: 'm',\n demandOption: false,\n describe: 'Local path of the merkle mountain range (.mmr) file',\n type: 'string',\n },\n 'proof-of-index': {\n demandOption: false,\n describe: 'Enable/disable proof of index',\n type: 'boolean',\n default: false,\n },\n ipfs: {\n demandOption: false,\n describe: 'IPFS gateway endpoint',\n type: 'string',\n },\n port: {\n alias: 'p',\n demandOption: false,\n describe: 'The port the service will bind to',\n type: 'number',\n },\n 'disable-historical': {\n demandOption: false,\n default: false,\n describe: 'Disable storing historical state entities',\n type: 'boolean',\n },\n workers: {\n alias: 'w',\n demandOption: false,\n describe:\n 'Number of worker threads to use for fetching and processing blocks. Disabled by default.',\n type: 'number',\n },\n 'query-limit': {\n demandOption: false,\n describe:\n 'The limit of items a project can query with store.getByField at once',\n type: 'number',\n default: 100,\n },\n });\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@subql/node-ethereum",
|
|
3
|
+
"version": "1.10.1-0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"author": "Ian He",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"prebuild": "rimraf dist",
|
|
9
|
+
"build": "rm -rf dist && tsc -b",
|
|
10
|
+
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
11
|
+
"start": "nest start",
|
|
12
|
+
"start:dev": "nodemon",
|
|
13
|
+
"start:prod": "node dist/main"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://github.com/subquery/subql",
|
|
16
|
+
"repository": "github:subquery/subql",
|
|
17
|
+
"bin": {
|
|
18
|
+
"subql-node-ethereum": "./bin/run"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@apollo/client": "3.5.8",
|
|
22
|
+
"@nestjs/common": "^8.2.6",
|
|
23
|
+
"@nestjs/core": "^8.2.6",
|
|
24
|
+
"@nestjs/event-emitter": "^1.3.0",
|
|
25
|
+
"@nestjs/platform-express": "^8.2.6",
|
|
26
|
+
"@nestjs/schedule": "^1.0.2",
|
|
27
|
+
"@subql/common": "latest",
|
|
28
|
+
"@subql/common-ethereum": "0.0.1-0",
|
|
29
|
+
"@subql/node-core": "latest",
|
|
30
|
+
"@subql/types-ethereum": "0.0.0",
|
|
31
|
+
"@subql/utils": "latest",
|
|
32
|
+
"@subql/x-merkle-mountain-range": "2.0.0-0.1.2",
|
|
33
|
+
"@willsoto/nestjs-prometheus": "^4.4.0",
|
|
34
|
+
"algosdk": "^1.13.1",
|
|
35
|
+
"app-module-path": "^2.2.0",
|
|
36
|
+
"dayjs": "^1.10.7",
|
|
37
|
+
"ethers": "^5.6.1",
|
|
38
|
+
"eventemitter2": "^6.4.5",
|
|
39
|
+
"lodash": "^4.17.21",
|
|
40
|
+
"merkle-tools": "^1.4.1",
|
|
41
|
+
"parse-json": "^6.0.2",
|
|
42
|
+
"pg": "^8.7.1",
|
|
43
|
+
"prom-client": "^14.0.1",
|
|
44
|
+
"reflect-metadata": "^0.1.13",
|
|
45
|
+
"rimraf": "^3.0.2",
|
|
46
|
+
"rxjs": "^7.5.2",
|
|
47
|
+
"sequelize": "6.23.0",
|
|
48
|
+
"tar": "^6.1.11",
|
|
49
|
+
"typescript": "^4.4.4",
|
|
50
|
+
"web3-providers-http": "^1.8.0",
|
|
51
|
+
"web3-providers-ws": "^1.8.0",
|
|
52
|
+
"yargs": "^16.2.0"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@nestjs/schematics": "^8.0.5",
|
|
56
|
+
"@nestjs/testing": "^8.2.6",
|
|
57
|
+
"@types/app-module-path": "^2.2.0",
|
|
58
|
+
"@types/express": "^4.17.13",
|
|
59
|
+
"@types/jest": "^27.4.0",
|
|
60
|
+
"@types/lodash": "^4.14.178",
|
|
61
|
+
"@types/pino": "^6.3.12",
|
|
62
|
+
"@types/supertest": "^2.0.11",
|
|
63
|
+
"@types/tar": "^6.1.1",
|
|
64
|
+
"@types/yargs": "^16.0.4",
|
|
65
|
+
"dotenv": "^15.0.1",
|
|
66
|
+
"nodemon": "^2.0.15",
|
|
67
|
+
"supertest": "^6.2.2"
|
|
68
|
+
},
|
|
69
|
+
"resolutions": {
|
|
70
|
+
"@polkadot/util": "^9"
|
|
71
|
+
},
|
|
72
|
+
"files": [
|
|
73
|
+
"/dist",
|
|
74
|
+
"/bin"
|
|
75
|
+
],
|
|
76
|
+
"stableVersion": "1.10.0"
|
|
77
|
+
}
|