@subql/node-stellar 3.1.1-2 → 3.3.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/dist/yargs.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export declare const yargsOptions: import("yargs").Argv<import("yargs").Omit<{
2
2
  targetHeight: number;
3
- }, "batch-size" | "block-confirmations" | "config" | "db-schema" | "debug" | "dictionary-resolver" | "dictionary-timeout" | "disable-historical" | "ipfs" | "local" | "log-level" | "mmr-path" | "multi-chain" | "network-dictionary" | "network-endpoint" | "soroban-network-endpoint" | "output-fmt" | "port" | "profiler" | "proof-of-index" | "mmr-store-type" | "query-limit" | "scale-batch-size" | "pg-ca" | "pg-key" | "pg-cert" | "store-cache-threshold" | "store-cache-upper-limit" | "store-get-cache-size" | "store-cache-async" | "store-flush-interval" | "subquery" | "subquery-name" | "subscription" | "timeout" | "timestamp-field" | "unfinalized-blocks" | "unsafe" | "workers" | "root" | "query-address-limit"> & import("yargs").InferredOptionTypes<{
3
+ }, "batch-size" | "block-confirmations" | "config" | "db-schema" | "debug" | "dictionary-resolver" | "dictionary-timeout" | "dictionary-query-size" | "disable-historical" | "ipfs" | "local" | "log-level" | "multi-chain" | "network-dictionary" | "network-endpoint" | "soroban-network-endpoint" | "output-fmt" | "port" | "profiler" | "proof-of-index" | "query-limit" | "scale-batch-size" | "pg-ca" | "pg-key" | "pg-cert" | "store-cache-threshold" | "store-cache-upper-limit" | "store-get-cache-size" | "store-cache-async" | "store-flush-interval" | "subquery" | "subquery-name" | "subscription" | "timeout" | "timestamp-field" | "unfinalized-blocks" | "unsafe" | "workers" | "root" | "query-address-limit"> & import("yargs").InferredOptionTypes<{
4
4
  'batch-size': {
5
5
  demandOption: false;
6
6
  describe: string;
@@ -38,6 +38,11 @@ export declare const yargsOptions: import("yargs").Argv<import("yargs").Omit<{
38
38
  describe: string;
39
39
  type: "number";
40
40
  };
41
+ 'dictionary-query-size': {
42
+ demandOption: false;
43
+ describe: string;
44
+ type: "number";
45
+ };
41
46
  'disable-historical': {
42
47
  demandOption: false;
43
48
  default: boolean;
@@ -61,12 +66,6 @@ export declare const yargsOptions: import("yargs").Argv<import("yargs").Omit<{
61
66
  type: "string";
62
67
  choices: string[];
63
68
  };
64
- 'mmr-path': {
65
- alias: string;
66
- demandOption: false;
67
- describe: string;
68
- type: "string";
69
- };
70
69
  'multi-chain': {
71
70
  demandOption: false;
72
71
  default: boolean;
@@ -113,13 +112,6 @@ export declare const yargsOptions: import("yargs").Argv<import("yargs").Omit<{
113
112
  type: "boolean";
114
113
  default: boolean;
115
114
  };
116
- 'mmr-store-type': {
117
- demandOption: false;
118
- describe: string;
119
- type: "string";
120
- choices: string[];
121
- default: string;
122
- };
123
115
  'query-limit': {
124
116
  demandOption: false;
125
117
  describe: string;
package/dist/yargs.js CHANGED
@@ -89,6 +89,11 @@ exports.yargsOptions = (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv)
89
89
  describe: 'Max timeout for dictionary query',
90
90
  type: 'number',
91
91
  },
92
+ 'dictionary-query-size': {
93
+ demandOption: false,
94
+ describe: 'Dictionary query max block size, this specify the block height range of the dictionary query',
95
+ type: 'number',
96
+ },
92
97
  'disable-historical': {
93
98
  demandOption: false,
94
99
  default: false,
@@ -112,12 +117,6 @@ exports.yargsOptions = (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv)
112
117
  type: 'string',
113
118
  choices: ['fatal', 'error', 'warn', 'info', 'debug', 'trace', 'silent'],
114
119
  },
115
- 'mmr-path': {
116
- alias: 'm',
117
- demandOption: false,
118
- describe: 'Local path of the merkle mountain range (.mmr) file',
119
- type: 'string',
120
- },
121
120
  'multi-chain': {
122
121
  demandOption: false,
123
122
  default: false,
@@ -164,13 +163,6 @@ exports.yargsOptions = (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv)
164
163
  type: 'boolean',
165
164
  default: false,
166
165
  },
167
- 'mmr-store-type': {
168
- demandOption: false,
169
- describe: 'Store MMR in either a file or a postgres DB',
170
- type: 'string',
171
- choices: ['file', 'postgres'],
172
- default: 'postgres',
173
- },
174
166
  'query-limit': {
175
167
  demandOption: false,
176
168
  describe: 'The limit of items a project can query with store.getByField at once',
package/dist/yargs.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"yargs.js","sourceRoot":"","sources":["../src/yargs.ts"],"names":[],"mappings":";AAAA,8DAA8D;AAC9D,mCAAmC;;;;;;AAEnC,oDAAqD;AACrD,2CAAwC;AACxC,wDAAgC;AAEnB,QAAA,YAAY,GAAG,IAAA,eAAK,EAAC,IAAA,iBAAO,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KACrD,GAAG,CAAC,YAAY,CAAC;KACjB,OAAO,CAAC;IACP,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,sCAAsC;IAChD,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QAChB,IAAA,mBAAU,EACR,IAAI,CAAC,KAAe,EACpB,IAAI,CAAC,SAA+B,EACpC,IAAI,CAAC,QAA8B,CACpC,CAAC;QACF,4EAA4E;QAC5E,8DAA8D;QAC9D,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;QAC9D,OAAO,WAAW,EAAE,CAAC;IACvB,CAAC;CACF,CAAC;KACD,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,KAAe,EACpB,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,CAAC;IAC1B,CAAC;CACF,CAAC;KACD,OAA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AI,EAAE,SAAS;KAChB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,KAAK;QACnB,QAAQ,EAAE,wDAAwD;KACnE;IACD,OAAO,EAAE;QACP,KAAK,EAAE,GAAG;QACV,YAAY,EAAE,KAAK;QACnB,QAAQ,EACN,0FAA0F;QAC5F,IAAI,EAAE,QAAQ;KACf;IACD,IAAI,EAAE;QACJ,QAAQ,EACN,wKAAwK;QAC1K,IAAI,EAAE,QAAQ;KACf;IACD,qBAAqB,EAAE;QACrB,QAAQ,EACN,yEAAyE;QAC3E,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,GAAG;KACb;CACF,CAAC;KACD,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,8CAA8C","sourcesContent":["// Copyright 2020-2023 SubQuery Pte Ltd authors & contributors\n// SPDX-License-Identifier: GPL-3.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 .env('SUBQL_NODE')\n .command({\n command: 'test',\n describe: 'Run tests for a SubQuery application',\n builder: {},\n handler: (argv) => {\n initLogger(\n argv.debug as string,\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 { testingInit } = require('./subcommands/testing.init');\n return testingInit();\n },\n })\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 string,\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 string,\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 'batch-size': {\n demandOption: false,\n describe: 'Batch size of blocks to fetch in one round',\n type: 'number',\n },\n 'block-confirmations': {\n demandOption: false,\n default: 20,\n describe:\n 'The number of blocks behind the head to be considered finalized, this has no effect with Ethereum',\n type: 'number',\n },\n config: {\n alias: 'c',\n demandOption: false,\n describe: 'Specify configuration file',\n type: 'string',\n },\n 'db-schema': {\n demandOption: false,\n describe: 'Db schema name of the project',\n type: 'string',\n },\n debug: {\n demandOption: false,\n describe: `Enable debug logging for specific scopes, this will override log-level. \"*\" will enable debug everywhere, or comma separated strings for specific scopes. e.g. \"SQL,dictionary\". To disable specific scopes you can prefix them with '-'. e.g. \"*,-SQL\"`,\n type: 'string',\n },\n 'dictionary-resolver': {\n demandOption: false,\n describe: 'Use SubQuery Network dictionary resolver',\n type: 'string',\n },\n 'dictionary-timeout': {\n demandOption: false,\n describe: 'Max timeout for dictionary query',\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 ipfs: {\n demandOption: false,\n describe: 'IPFS gateway endpoint',\n type: 'string',\n },\n local: {\n deprecated: true,\n type: 'boolean',\n demandOption: false,\n describe: 'Use local mode',\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 'mmr-path': {\n alias: 'm',\n demandOption: false,\n describe: 'Local path of the merkle mountain range (.mmr) file',\n type: 'string',\n },\n 'multi-chain': {\n demandOption: false,\n default: false,\n describe:\n 'Enables indexing multiple subquery projects into the same database schema',\n type: 'boolean',\n },\n 'network-dictionary': {\n alias: 'd',\n demandOption: false,\n describe: 'Specify the dictionary api for this network',\n type: 'string',\n },\n 'network-endpoint': {\n demandOption: false,\n type: 'string',\n describe: 'Blockchain network endpoint to connect',\n },\n 'soroban-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 port: {\n alias: 'p',\n demandOption: false,\n describe: 'The port the service will bind to',\n type: 'number',\n },\n profiler: {\n demandOption: false,\n describe: 'Show profiler information to console output',\n type: 'boolean',\n default: false,\n },\n 'proof-of-index': {\n demandOption: false,\n describe: 'Enable/disable proof of index',\n type: 'boolean',\n default: false,\n },\n 'mmr-store-type': {\n demandOption: false,\n describe: 'Store MMR in either a file or a postgres DB',\n type: 'string',\n choices: ['file', 'postgres'],\n default: 'postgres',\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 'scale-batch-size': {\n type: 'boolean',\n demandOption: false,\n describe: 'scale batch size based on memory usage',\n default: false,\n },\n 'pg-ca': {\n demandOption: false,\n describe:\n 'Postgres ca certificate - to enable TLS/SSL connections to your PostgreSQL, path to the server certificate file are required, e.g /path/to/server-certificates/root.crt',\n type: 'string',\n },\n 'pg-key': {\n demandOption: false,\n describe:\n 'Postgres client key - Path to key file e.g /path/to/client-key/postgresql.key',\n type: 'string',\n },\n 'pg-cert': {\n demandOption: false,\n describe:\n 'Postgres client certificate - Path to client certificate e.g /path/to/client-certificates/postgresql.crt',\n type: 'string',\n },\n 'store-cache-threshold': {\n demandOption: false,\n describe:\n 'Store cache will flush data to the database when number of records excess this threshold',\n type: 'number',\n },\n 'store-cache-upper-limit': {\n demandOption: false,\n describe:\n 'Defines the upper limit to the store cache size. When this limit is reached indexing will wait for the cache to be flushed before continuing.',\n type: 'number',\n },\n 'store-get-cache-size': {\n demandOption: false,\n describe: 'Store get cache size for each model',\n type: 'number',\n },\n 'store-cache-async': {\n demandOption: false,\n describe:\n 'If enabled the store cache will flush data asyncronously relative to indexing data',\n type: 'boolean',\n },\n 'store-flush-interval': {\n demandOption: false,\n describe:\n 'The interval, in seconds, at which data is flushed from the cache. ' +\n 'This ensures that data is persisted regularly when there is either not much data or the project is up to date.',\n type: 'number',\n default: 5,\n },\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 subscription: {\n demandOption: false,\n describe: 'Enable subscription by create notification triggers',\n type: 'boolean',\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 'timestamp-field': {\n demandOption: false,\n describe: 'Enable/disable created_at and updated_at in schema',\n type: 'boolean',\n default: false,\n },\n 'unfinalized-blocks': {\n demandOption: false,\n default: false,\n describe: 'Enable to fetch and index unfinalized blocks',\n type: 'boolean',\n },\n unsafe: {\n type: 'boolean',\n demandOption: false,\n describe: 'Allows usage of any built-in module within the sandbox',\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 root: {\n describe:\n 'This is a hidden flag only used from the main thread to workers. It provides a root directory for the project. This is a temp directory with IPFS and GitHub projects.',\n type: 'string',\n },\n 'query-address-limit': {\n describe:\n 'Set the limit for address on dictionary queries for dynamic datasources',\n type: 'number',\n default: 100,\n },\n })\n .hide('root'); // root is hidden because its for internal use\n"]}
1
+ {"version":3,"file":"yargs.js","sourceRoot":"","sources":["../src/yargs.ts"],"names":[],"mapp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,CAAC,MAAM,CAAC,CAAC,CAAC,8CAA8C","sourcesContent":["// Copyright 2020-2023 SubQuery Pte Ltd authors & contributors\n// SPDX-License-Identifier: GPL-3.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 .env('SUBQL_NODE')\n .command({\n command: 'test',\n describe: 'Run tests for a SubQuery application',\n builder: {},\n handler: (argv) => {\n initLogger(\n argv.debug as string,\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 { testingInit } = require('./subcommands/testing.init');\n return testingInit();\n },\n })\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 string,\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 string,\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 'batch-size': {\n demandOption: false,\n describe: 'Batch size of blocks to fetch in one round',\n type: 'number',\n },\n 'block-confirmations': {\n demandOption: false,\n default: 20,\n describe:\n 'The number of blocks behind the head to be considered finalized, this has no effect with Ethereum',\n type: 'number',\n },\n config: {\n alias: 'c',\n demandOption: false,\n describe: 'Specify configuration file',\n type: 'string',\n },\n 'db-schema': {\n demandOption: false,\n describe: 'Db schema name of the project',\n type: 'string',\n },\n debug: {\n demandOption: false,\n describe: `Enable debug logging for specific scopes, this will override log-level. \"*\" will enable debug everywhere, or comma separated strings for specific scopes. e.g. \"SQL,dictionary\". To disable specific scopes you can prefix them with '-'. e.g. \"*,-SQL\"`,\n type: 'string',\n },\n 'dictionary-resolver': {\n demandOption: false,\n describe: 'Use SubQuery Network dictionary resolver',\n type: 'string',\n },\n 'dictionary-timeout': {\n demandOption: false,\n describe: 'Max timeout for dictionary query',\n type: 'number',\n },\n 'dictionary-query-size': {\n demandOption: false,\n describe:\n 'Dictionary query max block size, this specify the block height range of the dictionary query',\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 ipfs: {\n demandOption: false,\n describe: 'IPFS gateway endpoint',\n type: 'string',\n },\n local: {\n deprecated: true,\n type: 'boolean',\n demandOption: false,\n describe: 'Use local mode',\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 'multi-chain': {\n demandOption: false,\n default: false,\n describe:\n 'Enables indexing multiple subquery projects into the same database schema',\n type: 'boolean',\n },\n 'network-dictionary': {\n alias: 'd',\n demandOption: false,\n describe: 'Specify the dictionary api for this network',\n type: 'string',\n },\n 'network-endpoint': {\n demandOption: false,\n type: 'string',\n describe: 'Blockchain network endpoint to connect',\n },\n 'soroban-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 port: {\n alias: 'p',\n demandOption: false,\n describe: 'The port the service will bind to',\n type: 'number',\n },\n profiler: {\n demandOption: false,\n describe: 'Show profiler information to console output',\n type: 'boolean',\n default: false,\n },\n 'proof-of-index': {\n demandOption: false,\n describe: 'Enable/disable proof of index',\n type: 'boolean',\n default: false,\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 'scale-batch-size': {\n type: 'boolean',\n demandOption: false,\n describe: 'scale batch size based on memory usage',\n default: false,\n },\n 'pg-ca': {\n demandOption: false,\n describe:\n 'Postgres ca certificate - to enable TLS/SSL connections to your PostgreSQL, path to the server certificate file are required, e.g /path/to/server-certificates/root.crt',\n type: 'string',\n },\n 'pg-key': {\n demandOption: false,\n describe:\n 'Postgres client key - Path to key file e.g /path/to/client-key/postgresql.key',\n type: 'string',\n },\n 'pg-cert': {\n demandOption: false,\n describe:\n 'Postgres client certificate - Path to client certificate e.g /path/to/client-certificates/postgresql.crt',\n type: 'string',\n },\n 'store-cache-threshold': {\n demandOption: false,\n describe:\n 'Store cache will flush data to the database when number of records excess this threshold',\n type: 'number',\n },\n 'store-cache-upper-limit': {\n demandOption: false,\n describe:\n 'Defines the upper limit to the store cache size. When this limit is reached indexing will wait for the cache to be flushed before continuing.',\n type: 'number',\n },\n 'store-get-cache-size': {\n demandOption: false,\n describe: 'Store get cache size for each model',\n type: 'number',\n },\n 'store-cache-async': {\n demandOption: false,\n describe:\n 'If enabled the store cache will flush data asyncronously relative to indexing data',\n type: 'boolean',\n },\n 'store-flush-interval': {\n demandOption: false,\n describe:\n 'The interval, in seconds, at which data is flushed from the cache. ' +\n 'This ensures that data is persisted regularly when there is either not much data or the project is up to date.',\n type: 'number',\n default: 5,\n },\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 subscription: {\n demandOption: false,\n describe: 'Enable subscription by create notification triggers',\n type: 'boolean',\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 'timestamp-field': {\n demandOption: false,\n describe: 'Enable/disable created_at and updated_at in schema',\n type: 'boolean',\n default: false,\n },\n 'unfinalized-blocks': {\n demandOption: false,\n default: false,\n describe: 'Enable to fetch and index unfinalized blocks',\n type: 'boolean',\n },\n unsafe: {\n type: 'boolean',\n demandOption: false,\n describe: 'Allows usage of any built-in module within the sandbox',\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 root: {\n describe:\n 'This is a hidden flag only used from the main thread to workers. It provides a root directory for the project. This is a temp directory with IPFS and GitHub projects.',\n type: 'string',\n },\n 'query-address-limit': {\n describe:\n 'Set the limit for address on dictionary queries for dynamic datasources',\n type: 'number',\n default: 100,\n },\n })\n .hide('root'); // root is hidden because its for internal use\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@subql/node-stellar",
3
- "version": "3.1.1-2",
3
+ "version": "3.3.1-0",
4
4
  "description": "",
5
5
  "author": "Ian He",
6
6
  "license": "GPL-3.0",
@@ -27,7 +27,7 @@
27
27
  "@nestjs/schedule": "^3.0.1",
28
28
  "@subql/common": "^3.3.0",
29
29
  "@subql/common-stellar": "3.1.1-0",
30
- "@subql/node-core": "^6.2.0",
30
+ "@subql/node-core": "^6.3.0",
31
31
  "@subql/testing": "^2.0.0",
32
32
  "@subql/types": "^2.2.1-1",
33
33
  "@subql/types-stellar": "3.1.1-0",
@@ -66,5 +66,5 @@
66
66
  "/dist",
67
67
  "/bin"
68
68
  ],
69
- "stableVersion": "3.1.1-1"
69
+ "stableVersion": "3.3.0"
70
70
  }