eth-graph-query 1.0.0 → 1.0.2

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/README.md CHANGED
@@ -1,7 +1,55 @@
1
- <div align="center">
2
- Eth graph query
3
- </div>
1
+ <h1>
2
+ eth-graph-query
3
+ </h1>
4
+
5
+ Simple package for create query command to the GraphQL in ethereum
6
+
7
+ ---
4
8
 
5
9
  ### Installation
6
10
 
11
+ ```shell
12
+ npm install eth-graph-query
13
+
14
+ ```
15
+
16
+ ---
17
+
7
18
  ### Usage
19
+
20
+ - The first thing you have to do is create a query instance
21
+
22
+ ```js
23
+ const query = new EthGraphQuery(root);
24
+ ```
25
+
26
+ - This package has two query options. To create simple query
27
+
28
+ ```js
29
+ const result = await query.query('collection1', { elements: ['element1', 'element2'] });
30
+ ```
31
+
32
+ - To create a multiple query
33
+
34
+ ```js
35
+ const result = await query.mergeQuery([
36
+ {collection: 'collection1', {element: ['element11', 'element12']}},
37
+ {collection: 'collection2', {element: ['element21', 'element22']}}
38
+ ])
39
+ ```
40
+
41
+ ---
42
+
43
+ ### For develop
44
+
45
+ - To test package, you can run below command
46
+
47
+ ```shell
48
+ npm run test
49
+ ```
50
+
51
+ - Before running above command, you must create `.env` file
52
+
53
+ ```shell
54
+ cp .env.example .env
55
+ ```
@@ -0,0 +1,12 @@
1
+ import { AxiosRequestConfig } from 'axios';
2
+ import NormalQuery from './normal-query';
3
+ import { GraphParams } from './type';
4
+ export default class EthGraphQuery extends NormalQuery {
5
+ constructor(rootUrl: string, config?: AxiosRequestConfig);
6
+ private _fetch;
7
+ query(collection: string, params?: GraphParams): Promise<any>;
8
+ mergeQuery(data: Array<{
9
+ collection: string;
10
+ params?: GraphParams;
11
+ }>): Promise<any>;
12
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const normal_query_1 = require("./normal-query");
4
+ const query_builder_1 = require("./query-builder");
5
+ class EthGraphQuery extends normal_query_1.default {
6
+ constructor(rootUrl, config) {
7
+ super(rootUrl, config);
8
+ }
9
+ async _fetch(query) {
10
+ return await this.post('', { query: query });
11
+ }
12
+ async query(collection, params) {
13
+ const sQuery = query_builder_1.default.buildQuery(collection, params);
14
+ return await this._fetch(query_builder_1.default.makeFullQuery(sQuery));
15
+ }
16
+ async mergeQuery(data) {
17
+ const sQuery = query_builder_1.default.mergeQuery(data);
18
+ return await this._fetch(query_builder_1.default.makeFullQuery(sQuery));
19
+ }
20
+ }
21
+ exports.default = EthGraphQuery;
@@ -0,0 +1,14 @@
1
+ import { AxiosRequestConfig } from 'axios';
2
+ export declare const defaultHeader: {
3
+ Accept: string;
4
+ 'Content-Type': string;
5
+ };
6
+ export default class NormalQuery {
7
+ root: string;
8
+ config: AxiosRequestConfig;
9
+ constructor(rootUrl: string, config?: AxiosRequestConfig);
10
+ get<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>;
11
+ post<B = any, T = any>(url: string, data?: B, config?: AxiosRequestConfig): Promise<T>;
12
+ put<B = any, T = any>(url: string, data?: B, config?: AxiosRequestConfig): Promise<T>;
13
+ del<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>;
14
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultHeader = void 0;
4
+ /* eslint-disable @typescript-eslint/no-explicit-any */
5
+ const axios_1 = require("axios");
6
+ exports.defaultHeader = { Accept: 'application/json', 'Content-Type': 'application/json' };
7
+ function responseBody(res) {
8
+ return res.data;
9
+ }
10
+ class NormalQuery {
11
+ constructor(rootUrl, config) {
12
+ this.root = rootUrl;
13
+ this.config = config ? { ...config, ...{ headers: exports.defaultHeader } } : { headers: exports.defaultHeader };
14
+ }
15
+ async get(url, config) {
16
+ return await axios_1.default.get(`${this.root}${url}`, { ...config, ...this.config }).then(responseBody);
17
+ }
18
+ async post(url, data, config) {
19
+ return await axios_1.default.post(`${this.root}${url}`, data, { ...config, ...this.config }).then(responseBody);
20
+ }
21
+ async put(url, data, config) {
22
+ return await axios_1.default.put(`${this.root}${url}`, data, { ...config, ...this.config }).then(responseBody);
23
+ }
24
+ async del(url, config) {
25
+ return await axios_1.default.delete(`${this.root}${url}`, { ...config, ...this.config }).then(responseBody);
26
+ }
27
+ }
28
+ exports.default = NormalQuery;
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,10 @@
1
+ import { GraphParams, QueryJson } from './type';
2
+ export default class QueryBuilder {
3
+ static buildJsonQuery(query: QueryJson): string;
4
+ static buildQuery(collection: string, params?: GraphParams): string;
5
+ static mergeQuery(data: Array<{
6
+ collection: string;
7
+ params?: GraphParams;
8
+ }>): string;
9
+ static makeFullQuery(query: string): string;
10
+ }
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class QueryBuilder {
4
+ static buildJsonQuery(query) {
5
+ const whereList = [];
6
+ for (const key in query) {
7
+ if (query[key] != undefined) {
8
+ if (Array.isArray(query[key])) {
9
+ const queryArray = query[key];
10
+ whereList.push(`${key}: [${queryArray.map((item) => `"${item}"`).join(', ')}]`);
11
+ }
12
+ else if (typeof query[key] == 'object')
13
+ whereList.push(`${key}: {${this.buildJsonQuery(query[key])}}`);
14
+ else if (typeof query[key] == 'string')
15
+ whereList.push(`${key}: "${query[key]}"`);
16
+ else
17
+ whereList.push(`${key}: ${query[key]}`);
18
+ }
19
+ }
20
+ return whereList.join(', ');
21
+ }
22
+ static buildQuery(collection, params) {
23
+ const filters = [];
24
+ if (params?.id != undefined)
25
+ filters.push(`id: ${params.id}`);
26
+ if (params?.orderBy)
27
+ filters.push(`orderBy: ${params.orderBy}`);
28
+ if (params?.orderDirection)
29
+ filters.push(`orderDirection: ${params.orderDirection}`);
30
+ if (params?.first != undefined) {
31
+ if (params.first < 0)
32
+ params.first = 0;
33
+ else if (params.first > 1000)
34
+ params.first = 1000;
35
+ filters.push(`first: ${params.first}`);
36
+ }
37
+ if (params?.skip != undefined) {
38
+ if (params.skip < 0)
39
+ params.skip = 0;
40
+ else if (params.skip > 5000)
41
+ params.skip = 5000;
42
+ filters.push(`skip: ${params.skip}`);
43
+ }
44
+ if (params?.where) {
45
+ const sWhere = this.buildJsonQuery(params.where);
46
+ if (sWhere.length > 0)
47
+ filters.push(`where: {${sWhere}}`);
48
+ }
49
+ if (params?.block) {
50
+ const sBlock = this.buildJsonQuery(params.block);
51
+ if (sBlock.length > 0)
52
+ filters.push(`block: {${sBlock}}`);
53
+ }
54
+ const filterString = filters.join(', ');
55
+ let elements = ['id'];
56
+ if (params?.elements)
57
+ if (params.elements.length > 0)
58
+ elements = params.elements;
59
+ if (filterString.length > 0)
60
+ return `${collection}(${filterString}) {${elements.join(' ')}}`;
61
+ else
62
+ return `${collection} {${elements.join(' ')}}`;
63
+ }
64
+ static mergeQuery(data) {
65
+ const queries = [];
66
+ for (const item of data)
67
+ queries.push(this.buildQuery(item.collection, item.params));
68
+ return queries.join(' ');
69
+ }
70
+ static makeFullQuery(query) {
71
+ return `query MyQuery {${query}}`;
72
+ }
73
+ }
74
+ exports.default = QueryBuilder;
@@ -0,0 +1,19 @@
1
+ export type QueryJson = {
2
+ [key: string]: QueryJson | Array<string> | string | number | boolean | undefined;
3
+ };
4
+ export type BlockQuery = {
5
+ hash?: string;
6
+ number?: number;
7
+ number_gte?: number;
8
+ };
9
+ export interface GraphParams {
10
+ elements?: Array<string>;
11
+ where?: QueryJson;
12
+ id?: string;
13
+ first?: number;
14
+ orderBy?: string;
15
+ orderDirection?: 'asc' | 'desc';
16
+ skip?: number;
17
+ subgraphError?: 'allow' | 'deny';
18
+ block?: BlockQuery;
19
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import { AxiosRequestConfig } from 'axios';
2
+ import NormalQuery from './normal-query';
3
+ import { GraphParams } from './type';
4
+ export default class EthGraphQuery extends NormalQuery {
5
+ constructor(rootUrl: string, config?: AxiosRequestConfig);
6
+ private _fetch;
7
+ query(collection: string, params?: GraphParams): Promise<any>;
8
+ mergeQuery(data: Array<{
9
+ collection: string;
10
+ params?: GraphParams;
11
+ }>): Promise<any>;
12
+ }
@@ -0,0 +1,18 @@
1
+ import NormalQuery from './normal-query';
2
+ import QueryBuilder from './query-builder';
3
+ export default class EthGraphQuery extends NormalQuery {
4
+ constructor(rootUrl, config) {
5
+ super(rootUrl, config);
6
+ }
7
+ async _fetch(query) {
8
+ return await this.post('', { query: query });
9
+ }
10
+ async query(collection, params) {
11
+ const sQuery = QueryBuilder.buildQuery(collection, params);
12
+ return await this._fetch(QueryBuilder.makeFullQuery(sQuery));
13
+ }
14
+ async mergeQuery(data) {
15
+ const sQuery = QueryBuilder.mergeQuery(data);
16
+ return await this._fetch(QueryBuilder.makeFullQuery(sQuery));
17
+ }
18
+ }
@@ -0,0 +1,14 @@
1
+ import { AxiosRequestConfig } from 'axios';
2
+ export declare const defaultHeader: {
3
+ Accept: string;
4
+ 'Content-Type': string;
5
+ };
6
+ export default class NormalQuery {
7
+ root: string;
8
+ config: AxiosRequestConfig;
9
+ constructor(rootUrl: string, config?: AxiosRequestConfig);
10
+ get<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>;
11
+ post<B = any, T = any>(url: string, data?: B, config?: AxiosRequestConfig): Promise<T>;
12
+ put<B = any, T = any>(url: string, data?: B, config?: AxiosRequestConfig): Promise<T>;
13
+ del<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>;
14
+ }
@@ -0,0 +1,24 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import axios from 'axios';
3
+ export const defaultHeader = { Accept: 'application/json', 'Content-Type': 'application/json' };
4
+ function responseBody(res) {
5
+ return res.data;
6
+ }
7
+ export default class NormalQuery {
8
+ constructor(rootUrl, config) {
9
+ this.root = rootUrl;
10
+ this.config = config ? { ...config, ...{ headers: defaultHeader } } : { headers: defaultHeader };
11
+ }
12
+ async get(url, config) {
13
+ return await axios.get(`${this.root}${url}`, { ...config, ...this.config }).then(responseBody);
14
+ }
15
+ async post(url, data, config) {
16
+ return await axios.post(`${this.root}${url}`, data, { ...config, ...this.config }).then(responseBody);
17
+ }
18
+ async put(url, data, config) {
19
+ return await axios.put(`${this.root}${url}`, data, { ...config, ...this.config }).then(responseBody);
20
+ }
21
+ async del(url, config) {
22
+ return await axios.delete(`${this.root}${url}`, { ...config, ...this.config }).then(responseBody);
23
+ }
24
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -0,0 +1,10 @@
1
+ import { GraphParams, QueryJson } from './type';
2
+ export default class QueryBuilder {
3
+ static buildJsonQuery(query: QueryJson): string;
4
+ static buildQuery(collection: string, params?: GraphParams): string;
5
+ static mergeQuery(data: Array<{
6
+ collection: string;
7
+ params?: GraphParams;
8
+ }>): string;
9
+ static makeFullQuery(query: string): string;
10
+ }
@@ -0,0 +1,71 @@
1
+ export default class QueryBuilder {
2
+ static buildJsonQuery(query) {
3
+ const whereList = [];
4
+ for (const key in query) {
5
+ if (query[key] != undefined) {
6
+ if (Array.isArray(query[key])) {
7
+ const queryArray = query[key];
8
+ whereList.push(`${key}: [${queryArray.map((item) => `"${item}"`).join(', ')}]`);
9
+ }
10
+ else if (typeof query[key] == 'object')
11
+ whereList.push(`${key}: {${this.buildJsonQuery(query[key])}}`);
12
+ else if (typeof query[key] == 'string')
13
+ whereList.push(`${key}: "${query[key]}"`);
14
+ else
15
+ whereList.push(`${key}: ${query[key]}`);
16
+ }
17
+ }
18
+ return whereList.join(', ');
19
+ }
20
+ static buildQuery(collection, params) {
21
+ const filters = [];
22
+ if (params?.id != undefined)
23
+ filters.push(`id: ${params.id}`);
24
+ if (params?.orderBy)
25
+ filters.push(`orderBy: ${params.orderBy}`);
26
+ if (params?.orderDirection)
27
+ filters.push(`orderDirection: ${params.orderDirection}`);
28
+ if (params?.first != undefined) {
29
+ if (params.first < 0)
30
+ params.first = 0;
31
+ else if (params.first > 1000)
32
+ params.first = 1000;
33
+ filters.push(`first: ${params.first}`);
34
+ }
35
+ if (params?.skip != undefined) {
36
+ if (params.skip < 0)
37
+ params.skip = 0;
38
+ else if (params.skip > 5000)
39
+ params.skip = 5000;
40
+ filters.push(`skip: ${params.skip}`);
41
+ }
42
+ if (params?.where) {
43
+ const sWhere = this.buildJsonQuery(params.where);
44
+ if (sWhere.length > 0)
45
+ filters.push(`where: {${sWhere}}`);
46
+ }
47
+ if (params?.block) {
48
+ const sBlock = this.buildJsonQuery(params.block);
49
+ if (sBlock.length > 0)
50
+ filters.push(`block: {${sBlock}}`);
51
+ }
52
+ const filterString = filters.join(', ');
53
+ let elements = ['id'];
54
+ if (params?.elements)
55
+ if (params.elements.length > 0)
56
+ elements = params.elements;
57
+ if (filterString.length > 0)
58
+ return `${collection}(${filterString}) {${elements.join(' ')}}`;
59
+ else
60
+ return `${collection} {${elements.join(' ')}}`;
61
+ }
62
+ static mergeQuery(data) {
63
+ const queries = [];
64
+ for (const item of data)
65
+ queries.push(this.buildQuery(item.collection, item.params));
66
+ return queries.join(' ');
67
+ }
68
+ static makeFullQuery(query) {
69
+ return `query MyQuery {${query}}`;
70
+ }
71
+ }
@@ -0,0 +1,19 @@
1
+ export type QueryJson = {
2
+ [key: string]: QueryJson | Array<string> | string | number | boolean | undefined;
3
+ };
4
+ export type BlockQuery = {
5
+ hash?: string;
6
+ number?: number;
7
+ number_gte?: number;
8
+ };
9
+ export interface GraphParams {
10
+ elements?: Array<string>;
11
+ where?: QueryJson;
12
+ id?: string;
13
+ first?: number;
14
+ orderBy?: string;
15
+ orderDirection?: 'asc' | 'desc';
16
+ skip?: number;
17
+ subgraphError?: 'allow' | 'deny';
18
+ block?: BlockQuery;
19
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/axios/index.d.ts","../src/normal-query.ts","../src/type.ts","../src/query-builder.ts","../src/index.ts","../node_modules/@types/cookie/index.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/dom-events.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/readline/promises.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/test.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/cors/index.d.ts","../node_modules/@types/json-schema/index.d.ts","../node_modules/@types/json5/index.d.ts","../node_modules/@types/minimist/index.d.ts","../node_modules/@types/normalize-package-data/index.d.ts","../node_modules/@types/semver/classes/semver.d.ts","../node_modules/@types/semver/functions/parse.d.ts","../node_modules/@types/semver/functions/valid.d.ts","../node_modules/@types/semver/functions/clean.d.ts","../node_modules/@types/semver/functions/inc.d.ts","../node_modules/@types/semver/functions/diff.d.ts","../node_modules/@types/semver/functions/major.d.ts","../node_modules/@types/semver/functions/minor.d.ts","../node_modules/@types/semver/functions/patch.d.ts","../node_modules/@types/semver/functions/prerelease.d.ts","../node_modules/@types/semver/functions/compare.d.ts","../node_modules/@types/semver/functions/rcompare.d.ts","../node_modules/@types/semver/functions/compare-loose.d.ts","../node_modules/@types/semver/functions/compare-build.d.ts","../node_modules/@types/semver/functions/sort.d.ts","../node_modules/@types/semver/functions/rsort.d.ts","../node_modules/@types/semver/functions/gt.d.ts","../node_modules/@types/semver/functions/lt.d.ts","../node_modules/@types/semver/functions/eq.d.ts","../node_modules/@types/semver/functions/neq.d.ts","../node_modules/@types/semver/functions/gte.d.ts","../node_modules/@types/semver/functions/lte.d.ts","../node_modules/@types/semver/functions/cmp.d.ts","../node_modules/@types/semver/functions/coerce.d.ts","../node_modules/@types/semver/classes/comparator.d.ts","../node_modules/@types/semver/classes/range.d.ts","../node_modules/@types/semver/functions/satisfies.d.ts","../node_modules/@types/semver/ranges/max-satisfying.d.ts","../node_modules/@types/semver/ranges/min-satisfying.d.ts","../node_modules/@types/semver/ranges/to-comparators.d.ts","../node_modules/@types/semver/ranges/min-version.d.ts","../node_modules/@types/semver/ranges/valid.d.ts","../node_modules/@types/semver/ranges/outside.d.ts","../node_modules/@types/semver/ranges/gtr.d.ts","../node_modules/@types/semver/ranges/ltr.d.ts","../node_modules/@types/semver/ranges/intersects.d.ts","../node_modules/@types/semver/ranges/simplify.d.ts","../node_modules/@types/semver/ranges/subset.d.ts","../node_modules/@types/semver/internals/identifiers.d.ts","../node_modules/@types/semver/index.d.ts","../node_modules/@types/through/index.d.ts","../node_modules/@types/tape/index.d.ts"],"fileInfos":[{"version":"6a6b471e7e43e15ef6f8fe617a22ce4ecb0e34efa6c3dfcfe7cebd392bcca9d2","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4",{"version":"fcd3ecc9f764f06f4d5c467677f4f117f6abf49dee6716283aa204ff1162498b","affectsGlobalScope":true},{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"5114a95689b63f96b957e00216bc04baf9e1a1782aa4d8ee7e5e9acbf768e301","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"b7e9f95a7387e3f66be0ed6db43600c49cec33a3900437ce2fd350d9b7cb16f2","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"1d729ea435a93e1a70519d06a6f13fa418c4c39a52b69e6db86750ebfcdf5554",{"version":"1b3a6578e6d53c836d8655935c4561c4e8ed358571a141be7c7560abcc6a3208","signature":"a60fb45da7d3beceb9050de84a2675a72e22bea90a1a0c06a117eed67da0a4e5"},{"version":"3b38396994eba298e09e940c765349ecdb6f8bb69cd9f806fec8985f107589d7","signature":"780ff41cc6b6b97222c7006b9bb80b867320f4a9045aa36b0d7c36c8b3852121"},{"version":"1cf864bf0c2c6e62518d7f0ed7e86c50367b8eabd4fbcc7d613686e5987e0651","signature":"24650cee800791a33abfe21a11b93d127b03bd97f9b41d60a5a965a9b0623dbd"},{"version":"4dba035b6d39723a48a186f9c43073ac6830d7706f7600fe2a373fa15961a742","signature":"7d42b19baf4917175d09daf0ed828d68be4f48207f5a21e052ead6e4689880ad"},"117ffeecf6c55e25b6446f449ad079029b5e7317399b0a693858faaaea5ca73e","587f13f1e8157bd8cec0adda0de4ef558bb8573daa9d518d1e2af38e87ecc91f","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"bce910d9164785c9f0d4dcea4be359f5f92130c7c7833dea6138ab1db310a1f9","affectsGlobalScope":true},"7a435e0c814f58f23e9a0979045ec0ef5909aac95a70986e8bcce30c27dff228",{"version":"241a2e19e03fd1d884e0f304429378d05bc2c1b26b5693c84868f7ad0674982d","affectsGlobalScope":true},"db71be322f07f769200108aa19b79a75dd19a187c9dca2a30c4537b233aa2863","1edfef06edaa8ed3d1d220e739080d6899eb2cc476d3dcd9fdc385782aa98d92",{"version":"49479e21a040c0177d1b1bc05a124c0383df7a08a0726ad4d9457619642e875a","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","3fd0f1af75fb7abe0ea376aa71541daaf489f3d87c394b1165db684ea44b48be","3690133deae19c8127c5505fcb67b04bdc9eb053796008538a9b9abbb70d85aa","5b1c0a23f464f894e7c2b2b6c56df7b9afa60ed48c5345f8618d389a636b2108","be2b092f2765222757c6441b86c53a5ea8dfed47bbc43eab4c5fe37942c866b3","8e6b05abc98adba15e1ac78e137c64576c74002e301d682e66feb77a23907ab8","1ca735bb3d407b2af4fbee7665f3a0a83be52168c728cc209755060ba7ed67bd",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"b85c02e14ecb2a873dad5a1de72319b265160ba48f1b83661aeb3bba1366c1bc","affectsGlobalScope":true},"f1a0b2dde686cb8a995d4ed11848be5eaf76fd5d56532942e0737b39d4a02c6d","fc3764040518a1008dd04bdc80964591b566b896283e00df85c95851c1f46237","55709608060f77965c270ac10ac646286589f1bd1cb174fff1778a2dd9a7ef31","790623a47c5eda62910098884ecb154dc0e5f3a23fc36c1bfb3b5b9ed44e2c2d","42b40e40f2a358cda332456214fad311e1806a6abf3cebaaac72496e07556642","354612fe1d49ecc9551ea3a27d94eef2887b64ef4a71f72ca444efe0f2f0ba80",{"version":"125af9d85cb9d5e508353f10a8d52f01652d2d48b2cea54789a33e5b4d289c1c","affectsGlobalScope":true},"6a325d4c96569bdd5a9a59f819a672e2d5644ee6cf98ab910e0064402557af8d","5e2b91328a540a0933ab5c2203f4358918e6f0fe7505d22840a891a6117735f1","3abc3512fa04aa0230f59ea1019311fd8667bd935d28306311dccc8b17e79d5d",{"version":"14a50dafe3f45713f7f27cb6320dff07c6ac31678f07959c2134260061bf91ff","affectsGlobalScope":true},{"version":"5761c90b0cabdd6bd1f5fb1c3bf942088fdd39e18ed35dbe39b0c34bc733bf13","affectsGlobalScope":true},"1349077576abb41f0e9c78ec30762ff75b710208aff77f5fdcc6a8c8ce6289dd","e2ce82603102b5c0563f59fb40314cc1ff95a4d521a66ad14146e130ea80d89c","a3e0395220255a350aa9c6d56f882bfcb5b85c19fddf5419ec822cf22246a26d","c27b01e8ddff5cd280711af5e13aecd9a3228d1c256ea797dd64f8fdec5f7df5","898840e876dfd21843db9f2aa6ae38ba2eab550eb780ff62b894b9fbfebfae6b","0cab4d7d4edc40cd3af9eea7c3ed6d1016910c0954c49c4297e479bf3822a625","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","785e5be57d4f20f290a20e7b0c6263f6c57fd6e51283050756cef07d6d651c68","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","164deb2409ac5f4da3cd139dbcee7f7d66753d90363a4d7e2db8d8874f272270","1fb6c5ec52332a8b531a8d7a5300ac9301f98c4fe62f68e744e0841ccba65e7e",{"version":"ab294c4b7279318ee2a8fdf681305457ecc05970c94108d304933f18823eeac1","affectsGlobalScope":true},"ad08154d9602429522cac965a715fde27d421d69b24756c5d291877dda75353e","bbda6ea452a2386093a1eda18a6e26a989e98869f1b9f37e46f510a986d2e740","812b25f798033c202baedf386a1ccc41f9191b122f089bffd10fdccce99fba11","244cdeb8c344eb42e6142cbb0727752b9b735443fba7007c11b14ca06ebed97c",{"version":"75dd741ca6a6c8d2437a6ca8349b64b816421dbf9fe82dd026afaba965576962","affectsGlobalScope":true},{"version":"8799401a7ab57764f0d464513a7fa7c72e1d70a226b172ec60fff534ea94d108","affectsGlobalScope":true},"2ce2210032ccaff7710e2abf6a722e62c54960458e73e356b6a365c93ab6ca66","92db194ef7d208d5e4b6242a3434573fd142a621ff996d84cc9dbba3553277d0","69f5747ad0887c24c76858ed458712101771349f2287e21871fcd1562daa7dc0",{"version":"0bd9543cd8fc0959c76fb8f4f5a26626c2ed62ef4be98fd857bce268066db0a2","affectsGlobalScope":true},"1ca6858a0cbcd74d7db72d7b14c5360a928d1d16748a55ecfa6bfaff8b83071b",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"220717df86539e219f619d31965d177e7235185e4bc6f6e6ed7e11a9b004d5ca","efdced704bd09db6984a2a26e3573bc43cdc2379bdef3bcff6cff77efe8ba82b","dca41e86e89dfb2e85e6935260250f02eb6683b86c2fa16bec729ddd1bcd9b4b","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a","2b93035328f7778d200252681c1d86285d501ed424825a18f81e4c3028aa51d9","2ac9c8332c5f8510b8bdd571f8271e0f39b0577714d5e95c1e79a12b2616f069","42c21aa963e7b86fa00801d96e88b36803188018d5ad91db2a9101bccd40b3ff","d31eb848cdebb4c55b4893b335a7c0cca95ad66dee13cbb7d0893810c0a9c301","b9f96255e1048ed2ea33ec553122716f0e57fc1c3ad778e9aa15f5b46547bd23","7a9e0a564fee396cacf706523b5aeed96e04c6b871a8bebefad78499fbffc5bc","906c751ef5822ec0dadcea2f0e9db64a33fb4ee926cc9f7efa38afe5d5371b2a","5387c049e9702f2d2d7ece1a74836a14b47fbebe9bbeb19f94c580a37c855351","c68391fb9efad5d99ff332c65b1606248c4e4a9f1dd9a087204242b56c7126d6","e9cf02252d3a0ced987d24845dcb1f11c1be5541f17e5daa44c6de2d18138d0c","e8b02b879754d85f48489294f99147aeccc352c760d95a6fe2b6e49cd400b2fe","9f6908ab3d8a86c68b86e38578afc7095114e66b2fc36a2a96e9252aac3998e0","0eedb2344442b143ddcd788f87096961cd8572b64f10b4afc3356aa0460171c6","71405cc70f183d029cc5018375f6c35117ffdaf11846c35ebf85ee3956b1b2a6","c68baff4d8ba346130e9753cefe2e487a16731bf17e05fdacc81e8c9a26aae9d","2cd15528d8bb5d0453aa339b4b52e0696e8b07e790c153831c642c3dea5ac8af","479d622e66283ffa9883fbc33e441f7fc928b2277ff30aacbec7b7761b4e9579","ade307876dc5ca267ca308d09e737b611505e015c535863f22420a11fffc1c54","f8cdefa3e0dee639eccbe9794b46f90291e5fd3989fcba60d2f08fde56179fb9","86c5a62f99aac7053976e317dbe9acb2eaf903aaf3d2e5bb1cafe5c2df7b37a8","2b300954ce01a8343866f737656e13243e86e5baef51bd0631b21dcef1f6e954","a2d409a9ffd872d6b9d78ead00baa116bbc73cfa959fce9a2f29d3227876b2a1","b288936f560cd71f4a6002953290de9ff8dfbfbf37f5a9391be5c83322324898","61178a781ef82e0ff54f9430397e71e8f365fc1e3725e0e5346f2de7b0d50dfa","6a6ccb37feb3aad32d9be026a3337db195979cd5727a616fc0f557e974101a54","c649ea79205c029a02272ef55b7ab14ada0903db26144d2205021f24727ac7a3","38e2b02897c6357bbcff729ef84c736727b45cc152abe95a7567caccdfad2a1d","d6610ea7e0b1a7686dba062a1e5544dd7d34140f4545305b7c6afaebfb348341","3dee35db743bdba2c8d19aece7ac049bde6fa587e195d86547c882784e6ba34c","b15e55c5fa977c2f25ca0b1db52cfa2d1fd4bf0baf90a8b90d4a7678ca462ff1","f41d30972724714763a2698ae949fbc463afb203b5fa7c4ad7e4de0871129a17","843dd7b6a7c6269fd43827303f5cbe65c1fecabc30b4670a50d5a15d57daeeb9","f06d8b8567ee9fd799bf7f806efe93b67683ef24f4dea5b23ef12edff4434d9d","6017384f697ff38bc3ef6a546df5b230c3c31329db84cbfe686c83bec011e2b2","e1a5b30d9248549ca0c0bb1d653bafae20c64c4aa5928cc4cd3017b55c2177b0","a593632d5878f17295bd53e1c77f27bf4c15212822f764a2bfc1702f4b413fa0","a868a534ba1c2ca9060b8a13b0ffbbbf78b4be7b0ff80d8c75b02773f7192c29","da7545aba8f54a50fde23e2ede00158dc8112560d934cee58098dfb03aae9b9d","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","a1a261624efb3a00ff346b13580f70f3463b8cdcc58b60f5793ff11785d52cab","656424ca784760c679bf2677d8aaf55d1cb8452cd0ac04bbe1c0f659f45f8c11","cb8ed3ddd905348316761644f6f81ce0cad5c5eb9669c629e8f0b99e5375d0b1"],"root":[[46,49]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"downlevelIteration":true,"emitDecoratorMetadata":true,"esModuleInterop":false,"experimentalDecorators":true,"module":1,"outDir":"./cjs","rootDir":"../src","strict":true,"target":7},"fileIdsList":[[97],[70,97,104],[51,97],[54,97],[55,60,88,97],[56,67,68,75,85,96,97],[56,57,67,75,97],[58,97],[59,60,68,76,97],[60,85,93,97],[61,63,67,75,97],[62,97],[63,64,97],[67,97],[65,67,97],[67,68,69,85,96,97],[67,68,69,82,85,88,97],[97,101],[63,67,70,75,85,96,97],[67,68,70,71,75,85,93,96,97],[70,72,85,93,96,97],[51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103],[67,73,97],[74,96,97],[63,67,75,85,97],[76,97],[77,97],[54,78,97],[79,95,97,101],[80,97],[81,97],[67,82,83,97],[82,84,97,99],[55,67,85,86,87,88,97],[55,85,87,97],[85,86,97],[88,97],[89,97],[85,97],[67,91,92,97],[91,92,97],[60,75,85,93,97],[94,97],[75,95,97],[55,70,81,96,97],[60,97],[85,97,98],[97,99],[97,100],[55,60,67,69,78,85,96,97,99,101],[85,97,102],[97,110,149],[97,110,134,149],[97,149],[97,110],[97,110,135,149],[97,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148],[97,135,149],[97,104,150],[85,97,104],[45,46,47,48,97],[45,97],[47,97],[45,46,47],[45],[47]],"referencedMap":[[50,1],[105,2],[106,1],[107,1],[108,1],[51,3],[52,3],[54,4],[55,5],[56,6],[57,7],[58,8],[59,9],[60,10],[61,11],[62,12],[63,13],[64,13],[66,14],[65,15],[67,14],[68,16],[69,17],[53,18],[103,1],[70,19],[71,20],[72,21],[104,22],[73,23],[74,24],[75,25],[76,26],[77,27],[78,28],[79,29],[80,30],[81,31],[82,32],[83,32],[84,33],[85,34],[87,35],[86,36],[88,37],[89,38],[90,39],[91,40],[92,41],[93,42],[94,43],[95,44],[96,45],[97,46],[98,47],[99,48],[100,49],[101,50],[102,51],[109,1],[134,52],[135,53],[110,54],[113,54],[132,52],[133,52],[123,52],[122,55],[120,52],[115,52],[128,52],[126,52],[130,52],[114,52],[127,52],[131,52],[116,52],[117,52],[129,52],[111,52],[118,52],[119,52],[121,52],[125,52],[136,56],[124,52],[112,52],[149,57],[148,1],[143,56],[145,58],[144,56],[137,56],[138,56],[140,56],[142,56],[146,58],[147,58],[139,58],[141,58],[151,59],[150,60],[45,1],[43,1],[44,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[33,1],[30,1],[31,1],[32,1],[34,1],[7,1],[35,1],[40,1],[41,1],[36,1],[37,1],[38,1],[39,1],[1,1],[42,1],[49,61],[46,62],[48,63],[47,1]],"exportedModulesMap":[[50,1],[105,2],[106,1],[107,1],[108,1],[51,3],[52,3],[54,4],[55,5],[56,6],[57,7],[58,8],[59,9],[60,10],[61,11],[62,12],[63,13],[64,13],[66,14],[65,15],[67,14],[68,16],[69,17],[53,18],[103,1],[70,19],[71,20],[72,21],[104,22],[73,23],[74,24],[75,25],[76,26],[77,27],[78,28],[79,29],[80,30],[81,31],[82,32],[83,32],[84,33],[85,34],[87,35],[86,36],[88,37],[89,38],[90,39],[91,40],[92,41],[93,42],[94,43],[95,44],[96,45],[97,46],[98,47],[99,48],[100,49],[101,50],[102,51],[109,1],[134,52],[135,53],[110,54],[113,54],[132,52],[133,52],[123,52],[122,55],[120,52],[115,52],[128,52],[126,52],[130,52],[114,52],[127,52],[131,52],[116,52],[117,52],[129,52],[111,52],[118,52],[119,52],[121,52],[125,52],[136,56],[124,52],[112,52],[149,57],[148,1],[143,56],[145,58],[144,56],[137,56],[138,56],[140,56],[142,56],[146,58],[147,58],[139,58],[141,58],[151,59],[150,60],[45,1],[43,1],[44,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[33,1],[30,1],[31,1],[32,1],[34,1],[7,1],[35,1],[40,1],[41,1],[36,1],[37,1],[38,1],[39,1],[1,1],[42,1],[49,64],[46,65],[48,66]],"semanticDiagnosticsPerFile":[50,105,106,107,108,51,52,54,55,56,57,58,59,60,61,62,63,64,66,65,67,68,69,53,103,70,71,72,104,73,74,75,76,77,78,79,80,81,82,83,84,85,87,86,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,109,134,135,110,113,132,133,123,122,120,115,128,126,130,114,127,131,116,117,129,111,118,119,121,125,136,124,112,149,148,143,145,144,137,138,140,142,146,147,139,141,151,150,45,43,44,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,1,42,49,46,48,47],"latestChangedDtsFile":"./cjs/index.d.ts"},"version":"5.0.4"}
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/axios/index.d.ts","../src/normal-query.ts","../src/type.ts","../src/query-builder.ts","../src/index.ts","../node_modules/@types/cookie/index.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/dom-events.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/readline/promises.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/test.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/cors/index.d.ts","../node_modules/@types/json-schema/index.d.ts","../node_modules/@types/json5/index.d.ts","../node_modules/@types/minimist/index.d.ts","../node_modules/@types/normalize-package-data/index.d.ts","../node_modules/@types/semver/classes/semver.d.ts","../node_modules/@types/semver/functions/parse.d.ts","../node_modules/@types/semver/functions/valid.d.ts","../node_modules/@types/semver/functions/clean.d.ts","../node_modules/@types/semver/functions/inc.d.ts","../node_modules/@types/semver/functions/diff.d.ts","../node_modules/@types/semver/functions/major.d.ts","../node_modules/@types/semver/functions/minor.d.ts","../node_modules/@types/semver/functions/patch.d.ts","../node_modules/@types/semver/functions/prerelease.d.ts","../node_modules/@types/semver/functions/compare.d.ts","../node_modules/@types/semver/functions/rcompare.d.ts","../node_modules/@types/semver/functions/compare-loose.d.ts","../node_modules/@types/semver/functions/compare-build.d.ts","../node_modules/@types/semver/functions/sort.d.ts","../node_modules/@types/semver/functions/rsort.d.ts","../node_modules/@types/semver/functions/gt.d.ts","../node_modules/@types/semver/functions/lt.d.ts","../node_modules/@types/semver/functions/eq.d.ts","../node_modules/@types/semver/functions/neq.d.ts","../node_modules/@types/semver/functions/gte.d.ts","../node_modules/@types/semver/functions/lte.d.ts","../node_modules/@types/semver/functions/cmp.d.ts","../node_modules/@types/semver/functions/coerce.d.ts","../node_modules/@types/semver/classes/comparator.d.ts","../node_modules/@types/semver/classes/range.d.ts","../node_modules/@types/semver/functions/satisfies.d.ts","../node_modules/@types/semver/ranges/max-satisfying.d.ts","../node_modules/@types/semver/ranges/min-satisfying.d.ts","../node_modules/@types/semver/ranges/to-comparators.d.ts","../node_modules/@types/semver/ranges/min-version.d.ts","../node_modules/@types/semver/ranges/valid.d.ts","../node_modules/@types/semver/ranges/outside.d.ts","../node_modules/@types/semver/ranges/gtr.d.ts","../node_modules/@types/semver/ranges/ltr.d.ts","../node_modules/@types/semver/ranges/intersects.d.ts","../node_modules/@types/semver/ranges/simplify.d.ts","../node_modules/@types/semver/ranges/subset.d.ts","../node_modules/@types/semver/internals/identifiers.d.ts","../node_modules/@types/semver/index.d.ts","../node_modules/@types/through/index.d.ts","../node_modules/@types/tape/index.d.ts"],"fileInfos":[{"version":"6a6b471e7e43e15ef6f8fe617a22ce4ecb0e34efa6c3dfcfe7cebd392bcca9d2","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4",{"version":"fcd3ecc9f764f06f4d5c467677f4f117f6abf49dee6716283aa204ff1162498b","affectsGlobalScope":true},{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"5114a95689b63f96b957e00216bc04baf9e1a1782aa4d8ee7e5e9acbf768e301","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"b7e9f95a7387e3f66be0ed6db43600c49cec33a3900437ce2fd350d9b7cb16f2","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"1d729ea435a93e1a70519d06a6f13fa418c4c39a52b69e6db86750ebfcdf5554",{"version":"1b3a6578e6d53c836d8655935c4561c4e8ed358571a141be7c7560abcc6a3208","signature":"a60fb45da7d3beceb9050de84a2675a72e22bea90a1a0c06a117eed67da0a4e5"},{"version":"3b38396994eba298e09e940c765349ecdb6f8bb69cd9f806fec8985f107589d7","signature":"780ff41cc6b6b97222c7006b9bb80b867320f4a9045aa36b0d7c36c8b3852121"},{"version":"1cf864bf0c2c6e62518d7f0ed7e86c50367b8eabd4fbcc7d613686e5987e0651","signature":"24650cee800791a33abfe21a11b93d127b03bd97f9b41d60a5a965a9b0623dbd"},{"version":"4dba035b6d39723a48a186f9c43073ac6830d7706f7600fe2a373fa15961a742","signature":"7d42b19baf4917175d09daf0ed828d68be4f48207f5a21e052ead6e4689880ad"},"117ffeecf6c55e25b6446f449ad079029b5e7317399b0a693858faaaea5ca73e","587f13f1e8157bd8cec0adda0de4ef558bb8573daa9d518d1e2af38e87ecc91f","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"bce910d9164785c9f0d4dcea4be359f5f92130c7c7833dea6138ab1db310a1f9","affectsGlobalScope":true},"7a435e0c814f58f23e9a0979045ec0ef5909aac95a70986e8bcce30c27dff228",{"version":"241a2e19e03fd1d884e0f304429378d05bc2c1b26b5693c84868f7ad0674982d","affectsGlobalScope":true},"db71be322f07f769200108aa19b79a75dd19a187c9dca2a30c4537b233aa2863","1edfef06edaa8ed3d1d220e739080d6899eb2cc476d3dcd9fdc385782aa98d92",{"version":"49479e21a040c0177d1b1bc05a124c0383df7a08a0726ad4d9457619642e875a","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","3fd0f1af75fb7abe0ea376aa71541daaf489f3d87c394b1165db684ea44b48be","3690133deae19c8127c5505fcb67b04bdc9eb053796008538a9b9abbb70d85aa","5b1c0a23f464f894e7c2b2b6c56df7b9afa60ed48c5345f8618d389a636b2108","be2b092f2765222757c6441b86c53a5ea8dfed47bbc43eab4c5fe37942c866b3","8e6b05abc98adba15e1ac78e137c64576c74002e301d682e66feb77a23907ab8","1ca735bb3d407b2af4fbee7665f3a0a83be52168c728cc209755060ba7ed67bd",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"b85c02e14ecb2a873dad5a1de72319b265160ba48f1b83661aeb3bba1366c1bc","affectsGlobalScope":true},"f1a0b2dde686cb8a995d4ed11848be5eaf76fd5d56532942e0737b39d4a02c6d","fc3764040518a1008dd04bdc80964591b566b896283e00df85c95851c1f46237","55709608060f77965c270ac10ac646286589f1bd1cb174fff1778a2dd9a7ef31","790623a47c5eda62910098884ecb154dc0e5f3a23fc36c1bfb3b5b9ed44e2c2d","42b40e40f2a358cda332456214fad311e1806a6abf3cebaaac72496e07556642","354612fe1d49ecc9551ea3a27d94eef2887b64ef4a71f72ca444efe0f2f0ba80",{"version":"125af9d85cb9d5e508353f10a8d52f01652d2d48b2cea54789a33e5b4d289c1c","affectsGlobalScope":true},"6a325d4c96569bdd5a9a59f819a672e2d5644ee6cf98ab910e0064402557af8d","5e2b91328a540a0933ab5c2203f4358918e6f0fe7505d22840a891a6117735f1","3abc3512fa04aa0230f59ea1019311fd8667bd935d28306311dccc8b17e79d5d",{"version":"14a50dafe3f45713f7f27cb6320dff07c6ac31678f07959c2134260061bf91ff","affectsGlobalScope":true},{"version":"5761c90b0cabdd6bd1f5fb1c3bf942088fdd39e18ed35dbe39b0c34bc733bf13","affectsGlobalScope":true},"1349077576abb41f0e9c78ec30762ff75b710208aff77f5fdcc6a8c8ce6289dd","e2ce82603102b5c0563f59fb40314cc1ff95a4d521a66ad14146e130ea80d89c","a3e0395220255a350aa9c6d56f882bfcb5b85c19fddf5419ec822cf22246a26d","c27b01e8ddff5cd280711af5e13aecd9a3228d1c256ea797dd64f8fdec5f7df5","898840e876dfd21843db9f2aa6ae38ba2eab550eb780ff62b894b9fbfebfae6b","0cab4d7d4edc40cd3af9eea7c3ed6d1016910c0954c49c4297e479bf3822a625","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","785e5be57d4f20f290a20e7b0c6263f6c57fd6e51283050756cef07d6d651c68","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","164deb2409ac5f4da3cd139dbcee7f7d66753d90363a4d7e2db8d8874f272270","1fb6c5ec52332a8b531a8d7a5300ac9301f98c4fe62f68e744e0841ccba65e7e",{"version":"ab294c4b7279318ee2a8fdf681305457ecc05970c94108d304933f18823eeac1","affectsGlobalScope":true},"ad08154d9602429522cac965a715fde27d421d69b24756c5d291877dda75353e","bbda6ea452a2386093a1eda18a6e26a989e98869f1b9f37e46f510a986d2e740","812b25f798033c202baedf386a1ccc41f9191b122f089bffd10fdccce99fba11","244cdeb8c344eb42e6142cbb0727752b9b735443fba7007c11b14ca06ebed97c",{"version":"75dd741ca6a6c8d2437a6ca8349b64b816421dbf9fe82dd026afaba965576962","affectsGlobalScope":true},{"version":"8799401a7ab57764f0d464513a7fa7c72e1d70a226b172ec60fff534ea94d108","affectsGlobalScope":true},"2ce2210032ccaff7710e2abf6a722e62c54960458e73e356b6a365c93ab6ca66","92db194ef7d208d5e4b6242a3434573fd142a621ff996d84cc9dbba3553277d0","69f5747ad0887c24c76858ed458712101771349f2287e21871fcd1562daa7dc0",{"version":"0bd9543cd8fc0959c76fb8f4f5a26626c2ed62ef4be98fd857bce268066db0a2","affectsGlobalScope":true},"1ca6858a0cbcd74d7db72d7b14c5360a928d1d16748a55ecfa6bfaff8b83071b",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"220717df86539e219f619d31965d177e7235185e4bc6f6e6ed7e11a9b004d5ca","efdced704bd09db6984a2a26e3573bc43cdc2379bdef3bcff6cff77efe8ba82b","dca41e86e89dfb2e85e6935260250f02eb6683b86c2fa16bec729ddd1bcd9b4b","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a","2b93035328f7778d200252681c1d86285d501ed424825a18f81e4c3028aa51d9","2ac9c8332c5f8510b8bdd571f8271e0f39b0577714d5e95c1e79a12b2616f069","42c21aa963e7b86fa00801d96e88b36803188018d5ad91db2a9101bccd40b3ff","d31eb848cdebb4c55b4893b335a7c0cca95ad66dee13cbb7d0893810c0a9c301","b9f96255e1048ed2ea33ec553122716f0e57fc1c3ad778e9aa15f5b46547bd23","7a9e0a564fee396cacf706523b5aeed96e04c6b871a8bebefad78499fbffc5bc","906c751ef5822ec0dadcea2f0e9db64a33fb4ee926cc9f7efa38afe5d5371b2a","5387c049e9702f2d2d7ece1a74836a14b47fbebe9bbeb19f94c580a37c855351","c68391fb9efad5d99ff332c65b1606248c4e4a9f1dd9a087204242b56c7126d6","e9cf02252d3a0ced987d24845dcb1f11c1be5541f17e5daa44c6de2d18138d0c","e8b02b879754d85f48489294f99147aeccc352c760d95a6fe2b6e49cd400b2fe","9f6908ab3d8a86c68b86e38578afc7095114e66b2fc36a2a96e9252aac3998e0","0eedb2344442b143ddcd788f87096961cd8572b64f10b4afc3356aa0460171c6","71405cc70f183d029cc5018375f6c35117ffdaf11846c35ebf85ee3956b1b2a6","c68baff4d8ba346130e9753cefe2e487a16731bf17e05fdacc81e8c9a26aae9d","2cd15528d8bb5d0453aa339b4b52e0696e8b07e790c153831c642c3dea5ac8af","479d622e66283ffa9883fbc33e441f7fc928b2277ff30aacbec7b7761b4e9579","ade307876dc5ca267ca308d09e737b611505e015c535863f22420a11fffc1c54","f8cdefa3e0dee639eccbe9794b46f90291e5fd3989fcba60d2f08fde56179fb9","86c5a62f99aac7053976e317dbe9acb2eaf903aaf3d2e5bb1cafe5c2df7b37a8","2b300954ce01a8343866f737656e13243e86e5baef51bd0631b21dcef1f6e954","a2d409a9ffd872d6b9d78ead00baa116bbc73cfa959fce9a2f29d3227876b2a1","b288936f560cd71f4a6002953290de9ff8dfbfbf37f5a9391be5c83322324898","61178a781ef82e0ff54f9430397e71e8f365fc1e3725e0e5346f2de7b0d50dfa","6a6ccb37feb3aad32d9be026a3337db195979cd5727a616fc0f557e974101a54","c649ea79205c029a02272ef55b7ab14ada0903db26144d2205021f24727ac7a3","38e2b02897c6357bbcff729ef84c736727b45cc152abe95a7567caccdfad2a1d","d6610ea7e0b1a7686dba062a1e5544dd7d34140f4545305b7c6afaebfb348341","3dee35db743bdba2c8d19aece7ac049bde6fa587e195d86547c882784e6ba34c","b15e55c5fa977c2f25ca0b1db52cfa2d1fd4bf0baf90a8b90d4a7678ca462ff1","f41d30972724714763a2698ae949fbc463afb203b5fa7c4ad7e4de0871129a17","843dd7b6a7c6269fd43827303f5cbe65c1fecabc30b4670a50d5a15d57daeeb9","f06d8b8567ee9fd799bf7f806efe93b67683ef24f4dea5b23ef12edff4434d9d","6017384f697ff38bc3ef6a546df5b230c3c31329db84cbfe686c83bec011e2b2","e1a5b30d9248549ca0c0bb1d653bafae20c64c4aa5928cc4cd3017b55c2177b0","a593632d5878f17295bd53e1c77f27bf4c15212822f764a2bfc1702f4b413fa0","a868a534ba1c2ca9060b8a13b0ffbbbf78b4be7b0ff80d8c75b02773f7192c29","da7545aba8f54a50fde23e2ede00158dc8112560d934cee58098dfb03aae9b9d","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","a1a261624efb3a00ff346b13580f70f3463b8cdcc58b60f5793ff11785d52cab","656424ca784760c679bf2677d8aaf55d1cb8452cd0ac04bbe1c0f659f45f8c11","cb8ed3ddd905348316761644f6f81ce0cad5c5eb9669c629e8f0b99e5375d0b1"],"root":[[46,49]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"downlevelIteration":true,"emitDecoratorMetadata":true,"esModuleInterop":false,"experimentalDecorators":true,"module":99,"outDir":"./esm","rootDir":"../src","strict":true,"target":7},"fileIdsList":[[97],[70,97,104],[51,97],[54,97],[55,60,88,97],[56,67,68,75,85,96,97],[56,57,67,75,97],[58,97],[59,60,68,76,97],[60,85,93,97],[61,63,67,75,97],[62,97],[63,64,97],[67,97],[65,67,97],[67,68,69,85,96,97],[67,68,69,82,85,88,97],[97,101],[63,67,70,75,85,96,97],[67,68,70,71,75,85,93,96,97],[70,72,85,93,96,97],[51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103],[67,73,97],[74,96,97],[63,67,75,85,97],[76,97],[77,97],[54,78,97],[79,95,97,101],[80,97],[81,97],[67,82,83,97],[82,84,97,99],[55,67,85,86,87,88,97],[55,85,87,97],[85,86,97],[88,97],[89,97],[85,97],[67,91,92,97],[91,92,97],[60,75,85,93,97],[94,97],[75,95,97],[55,70,81,96,97],[60,97],[85,97,98],[97,99],[97,100],[55,60,67,69,78,85,96,97,99,101],[85,97,102],[97,110,149],[97,110,134,149],[97,149],[97,110],[97,110,135,149],[97,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148],[97,135,149],[97,104,150],[85,97,104],[45,46,47,48,97],[45,97],[47,97],[45,46,47],[45],[47]],"referencedMap":[[50,1],[105,2],[106,1],[107,1],[108,1],[51,3],[52,3],[54,4],[55,5],[56,6],[57,7],[58,8],[59,9],[60,10],[61,11],[62,12],[63,13],[64,13],[66,14],[65,15],[67,14],[68,16],[69,17],[53,18],[103,1],[70,19],[71,20],[72,21],[104,22],[73,23],[74,24],[75,25],[76,26],[77,27],[78,28],[79,29],[80,30],[81,31],[82,32],[83,32],[84,33],[85,34],[87,35],[86,36],[88,37],[89,38],[90,39],[91,40],[92,41],[93,42],[94,43],[95,44],[96,45],[97,46],[98,47],[99,48],[100,49],[101,50],[102,51],[109,1],[134,52],[135,53],[110,54],[113,54],[132,52],[133,52],[123,52],[122,55],[120,52],[115,52],[128,52],[126,52],[130,52],[114,52],[127,52],[131,52],[116,52],[117,52],[129,52],[111,52],[118,52],[119,52],[121,52],[125,52],[136,56],[124,52],[112,52],[149,57],[148,1],[143,56],[145,58],[144,56],[137,56],[138,56],[140,56],[142,56],[146,58],[147,58],[139,58],[141,58],[151,59],[150,60],[45,1],[43,1],[44,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[33,1],[30,1],[31,1],[32,1],[34,1],[7,1],[35,1],[40,1],[41,1],[36,1],[37,1],[38,1],[39,1],[1,1],[42,1],[49,61],[46,62],[48,63],[47,1]],"exportedModulesMap":[[50,1],[105,2],[106,1],[107,1],[108,1],[51,3],[52,3],[54,4],[55,5],[56,6],[57,7],[58,8],[59,9],[60,10],[61,11],[62,12],[63,13],[64,13],[66,14],[65,15],[67,14],[68,16],[69,17],[53,18],[103,1],[70,19],[71,20],[72,21],[104,22],[73,23],[74,24],[75,25],[76,26],[77,27],[78,28],[79,29],[80,30],[81,31],[82,32],[83,32],[84,33],[85,34],[87,35],[86,36],[88,37],[89,38],[90,39],[91,40],[92,41],[93,42],[94,43],[95,44],[96,45],[97,46],[98,47],[99,48],[100,49],[101,50],[102,51],[109,1],[134,52],[135,53],[110,54],[113,54],[132,52],[133,52],[123,52],[122,55],[120,52],[115,52],[128,52],[126,52],[130,52],[114,52],[127,52],[131,52],[116,52],[117,52],[129,52],[111,52],[118,52],[119,52],[121,52],[125,52],[136,56],[124,52],[112,52],[149,57],[148,1],[143,56],[145,58],[144,56],[137,56],[138,56],[140,56],[142,56],[146,58],[147,58],[139,58],[141,58],[151,59],[150,60],[45,1],[43,1],[44,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[33,1],[30,1],[31,1],[32,1],[34,1],[7,1],[35,1],[40,1],[41,1],[36,1],[37,1],[38,1],[39,1],[1,1],[42,1],[49,64],[46,65],[48,66]],"semanticDiagnosticsPerFile":[50,105,106,107,108,51,52,54,55,56,57,58,59,60,61,62,63,64,66,65,67,68,69,53,103,70,71,72,104,73,74,75,76,77,78,79,80,81,82,83,84,85,87,86,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,109,134,135,110,113,132,133,123,122,120,115,128,126,130,114,127,131,116,117,129,111,118,119,121,125,136,124,112,149,148,143,145,144,137,138,140,142,146,147,139,141,151,150,45,43,44,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,1,42,49,46,48,47],"latestChangedDtsFile":"./esm/index.d.ts"},"version":"5.0.4"}
package/package.json CHANGED
@@ -1,22 +1,36 @@
1
1
  {
2
2
  "name": "eth-graph-query",
3
- "version": "1.0.0",
4
- "description": "simple package for create query command to graph database in ethereum",
5
- "main": "lib/index.js",
6
- "types": "lib/index.d.ts",
3
+ "version": "1.0.2",
4
+ "description": "simple package for create query command to the GraphQL in ethereum",
5
+ "main": "dist/cjs/index.js",
6
+ "module": "dist/esm/index.js",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/esm/index.js",
10
+ "require": "./dist/cjs/index.js"
11
+ }
12
+ },
7
13
  "files": [
8
- "lib"
14
+ "dist",
15
+ "src"
9
16
  ],
10
17
  "scripts": {
11
- "build": "tsc",
12
- "prepare": "npm run build"
18
+ "build": "./scripts/ts-build.sh",
19
+ "prepare": "npm run build && husky install",
20
+ "tape": "tape -r ts-node/register",
21
+ "test:browser": "karma start karma.conf.js",
22
+ "test:node": "npm run tape -- test/*.spec.ts",
23
+ "test": "npm run test:node && npm run test:browser",
24
+ "eslint": "eslint . --ext .ts",
25
+ "prepublish": "npm run build && npm run test"
13
26
  },
14
27
  "repository": {
15
28
  "type": "git",
16
29
  "url": "git+https://github.com/phamhongphuc1999/eth-graph-query.git"
17
30
  },
18
31
  "keywords": [
19
- "graph"
32
+ "graphql",
33
+ "ethereum"
20
34
  ],
21
35
  "author": "phamhongphuc1999",
22
36
  "license": "ISC",
@@ -24,7 +38,52 @@
24
38
  "url": "https://github.com/phamhongphuc1999/eth-graph-query/issues"
25
39
  },
26
40
  "homepage": "https://github.com/phamhongphuc1999/eth-graph-query#readme",
41
+ "dependencies": {
42
+ "axios": "^1.4.0"
43
+ },
27
44
  "devDependencies": {
28
- "typescript": "^5.1.3"
45
+ "@commitlint/cli": "^17.6.5",
46
+ "@commitlint/config-conventional": "^17.6.5",
47
+ "@types/tape": "^5.6.0",
48
+ "@typescript-eslint/eslint-plugin": "5.59.6",
49
+ "dotenv": "^16.1.4",
50
+ "eslint": "^8.40.0",
51
+ "eslint-config-prettier": "^8.8.0",
52
+ "eslint-import-resolver-alias": "^1.1.2",
53
+ "eslint-plugin-import": "^2.26.0",
54
+ "eslint-plugin-prettier": "^4.2.1",
55
+ "husky": "^8.0.3",
56
+ "karma": "^6.4.2",
57
+ "karma-chrome-launcher": "^3.2.0",
58
+ "karma-tap": "^4.2.0",
59
+ "karma-typescript": "^5.5.4",
60
+ "karma-typescript-es6-transform": "^5.5.4",
61
+ "lint-staged": "^13.2.2",
62
+ "prettier": "^2.8.8",
63
+ "tape": "^5.6.3",
64
+ "ts-node": "10.9.1",
65
+ "typescript": "5.0.4"
66
+ },
67
+ "contributors": [
68
+ {
69
+ "name": "Phạm Hồng Phúc",
70
+ "email": "phamhongphuc12atm1@gmail.com",
71
+ "url": "https://github.com/phamhongphuc1999"
72
+ }
73
+ ],
74
+ "engines": {
75
+ "node": ">=14",
76
+ "npm": ">=7"
77
+ },
78
+ "commitlint": {
79
+ "extends": [
80
+ "@commitlint/config-conventional"
81
+ ]
82
+ },
83
+ "lint-staged": {
84
+ "*.{js,jsx,ts,tsx}": "eslint --config ./.eslintrc-staged.js --cache --fix",
85
+ "*.{json,yml,md}": [
86
+ "prettier --write"
87
+ ]
29
88
  }
30
89
  }
package/src/index.js ADDED
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const normal_query_1 = require("./normal-query");
13
+ const query_builder_1 = require("./query-builder");
14
+ class EthGraphQuery extends normal_query_1.default {
15
+ constructor(rootUrl, config) {
16
+ super(rootUrl, config);
17
+ }
18
+ _fetch(query) {
19
+ return __awaiter(this, void 0, void 0, function* () {
20
+ return yield this.post('', { query: query });
21
+ });
22
+ }
23
+ query(collection, params) {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ const sQuery = query_builder_1.default.buildQuery(collection, params);
26
+ return yield this._fetch(query_builder_1.default.makeFullQuery(sQuery));
27
+ });
28
+ }
29
+ mergeQuery(data) {
30
+ return __awaiter(this, void 0, void 0, function* () {
31
+ const sQuery = query_builder_1.default.mergeQuery(data);
32
+ return yield this._fetch(query_builder_1.default.makeFullQuery(sQuery));
33
+ });
34
+ }
35
+ }
36
+ exports.default = EthGraphQuery;
package/src/index.ts ADDED
@@ -0,0 +1,24 @@
1
+ import { AxiosRequestConfig } from 'axios';
2
+ import NormalQuery from './normal-query';
3
+ import QueryBuilder from './query-builder';
4
+ import { GraphParams } from './type';
5
+
6
+ export default class EthGraphQuery extends NormalQuery {
7
+ constructor(rootUrl: string, config?: AxiosRequestConfig) {
8
+ super(rootUrl, config);
9
+ }
10
+
11
+ private async _fetch(query: string) {
12
+ return await this.post('', { query: query });
13
+ }
14
+
15
+ async query(collection: string, params?: GraphParams) {
16
+ const sQuery = QueryBuilder.buildQuery(collection, params);
17
+ return await this._fetch(QueryBuilder.makeFullQuery(sQuery));
18
+ }
19
+
20
+ async mergeQuery(data: Array<{ collection: string; params?: GraphParams }>) {
21
+ const sQuery = QueryBuilder.mergeQuery(data);
22
+ return await this._fetch(QueryBuilder.makeFullQuery(sQuery));
23
+ }
24
+ }
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.defaultHeader = void 0;
13
+ /* eslint-disable @typescript-eslint/no-explicit-any */
14
+ const axios_1 = require("axios");
15
+ exports.defaultHeader = { Accept: 'application/json', 'Content-Type': 'application/json' };
16
+ function responseBody(res) {
17
+ return res.data;
18
+ }
19
+ class NormalQuery {
20
+ constructor(rootUrl, config) {
21
+ this.root = rootUrl;
22
+ this.config = config ? Object.assign(Object.assign({}, config), { headers: exports.defaultHeader }) : { headers: exports.defaultHeader };
23
+ }
24
+ get(url, config) {
25
+ return __awaiter(this, void 0, void 0, function* () {
26
+ return yield axios_1.default.get(`${this.root}${url}`, Object.assign(Object.assign({}, config), this.config)).then(responseBody);
27
+ });
28
+ }
29
+ post(url, data, config) {
30
+ return __awaiter(this, void 0, void 0, function* () {
31
+ return yield axios_1.default.post(`${this.root}${url}`, data, Object.assign(Object.assign({}, config), this.config)).then(responseBody);
32
+ });
33
+ }
34
+ put(url, data, config) {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ return yield axios_1.default.put(`${this.root}${url}`, data, Object.assign(Object.assign({}, config), this.config)).then(responseBody);
37
+ });
38
+ }
39
+ del(url, config) {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ return yield axios_1.default.delete(`${this.root}${url}`, Object.assign(Object.assign({}, config), this.config)).then(responseBody);
42
+ });
43
+ }
44
+ }
45
+ exports.default = NormalQuery;
@@ -0,0 +1,34 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import axios, { AxiosRequestConfig, AxiosResponse } from 'axios';
3
+
4
+ export const defaultHeader = { Accept: 'application/json', 'Content-Type': 'application/json' };
5
+
6
+ function responseBody<T>(res: AxiosResponse<T>) {
7
+ return res.data;
8
+ }
9
+
10
+ export default class NormalQuery {
11
+ root: string;
12
+ config: AxiosRequestConfig;
13
+
14
+ constructor(rootUrl: string, config?: AxiosRequestConfig) {
15
+ this.root = rootUrl;
16
+ this.config = config ? { ...config, ...{ headers: defaultHeader } } : { headers: defaultHeader };
17
+ }
18
+
19
+ async get<T = any>(url: string, config?: AxiosRequestConfig) {
20
+ return await axios.get(`${this.root}${url}`, { ...config, ...this.config }).then<T>(responseBody);
21
+ }
22
+
23
+ async post<B = any, T = any>(url: string, data?: B, config?: AxiosRequestConfig) {
24
+ return await axios.post(`${this.root}${url}`, data, { ...config, ...this.config }).then<T>(responseBody);
25
+ }
26
+
27
+ async put<B = any, T = any>(url: string, data?: B, config?: AxiosRequestConfig) {
28
+ return await axios.put(`${this.root}${url}`, data, { ...config, ...this.config }).then<T>(responseBody);
29
+ }
30
+
31
+ async del<T = any>(url: string, config?: AxiosRequestConfig) {
32
+ return await axios.delete(`${this.root}${url}`, { ...config, ...this.config }).then<T>(responseBody);
33
+ }
34
+ }
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class QueryBuilder {
4
+ static buildJsonQuery(query) {
5
+ const whereList = [];
6
+ for (const key in query) {
7
+ if (query[key] != undefined) {
8
+ if (Array.isArray(query[key])) {
9
+ const queryArray = query[key];
10
+ whereList.push(`${key}: [${queryArray.map((item) => `"${item}"`).join(', ')}]`);
11
+ }
12
+ else if (typeof query[key] == 'object')
13
+ whereList.push(`${key}: {${this.buildJsonQuery(query[key])}}`);
14
+ else if (typeof query[key] == 'string')
15
+ whereList.push(`${key}: "${query[key]}"`);
16
+ else
17
+ whereList.push(`${key}: ${query[key]}`);
18
+ }
19
+ }
20
+ return whereList.join(', ');
21
+ }
22
+ static buildQuery(collection, params) {
23
+ const filters = [];
24
+ if ((params === null || params === void 0 ? void 0 : params.id) != undefined)
25
+ filters.push(`id: ${params.id}`);
26
+ if (params === null || params === void 0 ? void 0 : params.orderBy)
27
+ filters.push(`orderBy: ${params.orderBy}`);
28
+ if (params === null || params === void 0 ? void 0 : params.orderDirection)
29
+ filters.push(`orderDirection: ${params.orderDirection}`);
30
+ if ((params === null || params === void 0 ? void 0 : params.first) != undefined) {
31
+ if (params.first < 0)
32
+ params.first = 0;
33
+ else if (params.first > 1000)
34
+ params.first = 1000;
35
+ filters.push(`first: ${params.first}`);
36
+ }
37
+ if ((params === null || params === void 0 ? void 0 : params.skip) != undefined) {
38
+ if (params.skip < 0)
39
+ params.skip = 0;
40
+ else if (params.skip > 5000)
41
+ params.skip = 5000;
42
+ filters.push(`skip: ${params.skip}`);
43
+ }
44
+ if (params === null || params === void 0 ? void 0 : params.where) {
45
+ const sWhere = this.buildJsonQuery(params.where);
46
+ if (sWhere.length > 0)
47
+ filters.push(`where: {${sWhere}}`);
48
+ }
49
+ if (params === null || params === void 0 ? void 0 : params.block) {
50
+ const sBlock = this.buildJsonQuery(params.block);
51
+ if (sBlock.length > 0)
52
+ filters.push(`block: {${sBlock}}`);
53
+ }
54
+ const filterString = filters.join(', ');
55
+ let elements = ['id'];
56
+ if (params === null || params === void 0 ? void 0 : params.elements)
57
+ if (params.elements.length > 0)
58
+ elements = params.elements;
59
+ if (filterString.length > 0)
60
+ return `${collection}(${filterString}) {${elements.join(' ')}}`;
61
+ else
62
+ return `${collection} {${elements.join(' ')}}`;
63
+ }
64
+ static mergeQuery(data) {
65
+ const queries = [];
66
+ for (const item of data)
67
+ queries.push(this.buildQuery(item.collection, item.params));
68
+ return queries.join(' ');
69
+ }
70
+ static makeFullQuery(query) {
71
+ return `query MyQuery {${query}}`;
72
+ }
73
+ }
74
+ exports.default = QueryBuilder;
@@ -0,0 +1,59 @@
1
+ import { GraphParams, QueryJson } from './type';
2
+
3
+ export default class QueryBuilder {
4
+ static buildJsonQuery(query: QueryJson): string {
5
+ const whereList = [];
6
+ for (const key in query) {
7
+ if (query[key] != undefined) {
8
+ if (Array.isArray(query[key])) {
9
+ const queryArray = query[key] as Array<string>;
10
+ whereList.push(`${key}: [${queryArray.map((item) => `"${item}"`).join(', ')}]`);
11
+ } else if (typeof query[key] == 'object')
12
+ whereList.push(`${key}: {${this.buildJsonQuery(query[key] as QueryJson)}}`);
13
+ else if (typeof query[key] == 'string') whereList.push(`${key}: "${query[key]}"`);
14
+ else whereList.push(`${key}: ${query[key]}`);
15
+ }
16
+ }
17
+ return whereList.join(', ');
18
+ }
19
+
20
+ static buildQuery(collection: string, params?: GraphParams) {
21
+ const filters: Array<string> = [];
22
+ if (params?.id != undefined) filters.push(`id: ${params.id}`);
23
+ if (params?.orderBy) filters.push(`orderBy: ${params.orderBy}`);
24
+ if (params?.orderDirection) filters.push(`orderDirection: ${params.orderDirection}`);
25
+ if (params?.first != undefined) {
26
+ if (params.first < 0) params.first = 0;
27
+ else if (params.first > 1000) params.first = 1000;
28
+ filters.push(`first: ${params.first}`);
29
+ }
30
+ if (params?.skip != undefined) {
31
+ if (params.skip < 0) params.skip = 0;
32
+ else if (params.skip > 5000) params.skip = 5000;
33
+ filters.push(`skip: ${params.skip}`);
34
+ }
35
+ if (params?.where) {
36
+ const sWhere = this.buildJsonQuery(params.where);
37
+ if (sWhere.length > 0) filters.push(`where: {${sWhere}}`);
38
+ }
39
+ if (params?.block) {
40
+ const sBlock = this.buildJsonQuery(params.block);
41
+ if (sBlock.length > 0) filters.push(`block: {${sBlock}}`);
42
+ }
43
+ const filterString = filters.join(', ');
44
+ let elements = ['id'];
45
+ if (params?.elements) if (params.elements.length > 0) elements = params.elements;
46
+ if (filterString.length > 0) return `${collection}(${filterString}) {${elements.join(' ')}}`;
47
+ else return `${collection} {${elements.join(' ')}}`;
48
+ }
49
+
50
+ static mergeQuery(data: Array<{ collection: string; params?: GraphParams }>) {
51
+ const queries: Array<string> = [];
52
+ for (const item of data) queries.push(this.buildQuery(item.collection, item.params));
53
+ return queries.join(' ');
54
+ }
55
+
56
+ static makeFullQuery(query: string) {
57
+ return `query MyQuery {${query}}`;
58
+ }
59
+ }
package/src/type.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/src/type.ts ADDED
@@ -0,0 +1,14 @@
1
+ export type QueryJson = { [key: string]: QueryJson | Array<string> | string | number | boolean | undefined };
2
+ export type BlockQuery = { hash?: string; number?: number; number_gte?: number };
3
+
4
+ export interface GraphParams {
5
+ elements?: Array<string>;
6
+ where?: QueryJson;
7
+ id?: string;
8
+ first?: number;
9
+ orderBy?: string;
10
+ orderDirection?: 'asc' | 'desc';
11
+ skip?: number;
12
+ subgraphError?: 'allow' | 'deny';
13
+ block?: BlockQuery;
14
+ }
package/lib/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare function greet(name: string): string;
package/lib/index.js DELETED
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.greet = void 0;
4
- function greet(name) {
5
- return `Hello ${name}`;
6
- }
7
- exports.greet = greet;