From e836efe6ee36ded27cec47eb54204535ee2b0215 Mon Sep 17 00:00:00 2001 From: Tate Date: Wed, 25 Sep 2024 10:03:03 +0000 Subject: [PATCH 1/7] Support subqery _metadata query --- CHANGELOG.md | 6 + package.json | 3 + src/config/graphile.config.ts | 3 + src/config/yargs.ts | 5 + src/plugins/GetMetadataPlugin.ts | 1 + src/plugins/GetSubqueryMetadataPlugin.ts | 214 +++++++++ src/plugins/filter/utils.ts | 2 +- src/utils/asyncInterval.ts | 35 ++ test/subgraph.test.ts | 7 +- yarn.lock | 566 ++++++++++++++++++++++- 10 files changed, 835 insertions(+), 7 deletions(-) create mode 100644 src/plugins/GetSubqueryMetadataPlugin.ts create mode 100644 src/utils/asyncInterval.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 363e3ce..7b82572 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added +- Support subqery _metadata query(#4) + +### Fixed +- Bigint query type not match + ## [0.1.0] - 2024-09-20 ### Fixed - Package rename @subql/query-subgraph diff --git a/package.json b/package.json index 6a61644..f3d0f91 100644 --- a/package.json +++ b/package.json @@ -21,9 +21,11 @@ }, "dependencies": { "@graphile/simplify-inflection": "^8.0.0-beta.5", + "@subql/utils": "^2.14.0", "@types/yargs": "^17.0.33", "dotenv": "^16.4.5", "eslint": "^8.8.0", + "node-fetch": "^2.6.11", "postgraphile": "^5.0.0-beta.28", "yargs": "latest" }, @@ -33,6 +35,7 @@ "@geut/chan": "^3.2.9", "@tsconfig/node20": "^20.1.4", "@types/jest": "^29.5.12", + "@types/node-fetch": "^2.6.11", "@typescript-eslint/eslint-plugin": "^5", "@typescript-eslint/parser": "5", "eslint-config-prettier": "^8.3.0", diff --git a/src/config/graphile.config.ts b/src/config/graphile.config.ts index df710a2..d334247 100644 --- a/src/config/graphile.config.ts +++ b/src/config/graphile.config.ts @@ -14,6 +14,7 @@ import { ArgFilterLogicalOperatorsPlugin } from '../plugins/filter/ArgFilterLogi import { ArgFilterPlugin } from '../plugins/filter/ArgFilterPlugin'; import { OrderByAttributesPlugin } from '../plugins/filter/OrderByAttributesPlugin'; import { CreateMetadataPlugin } from '../plugins/GetMetadataPlugin'; +import { CreateSubqueryMetadataPlugin } from '../plugins/GetSubqueryMetadataPlugin'; import historicalPlugins from '../plugins/historical'; import { OffsetToSkipPlugin } from '../plugins/OffsetToSkipPlugin'; import { PgIdToNodeIdPlugin } from '../plugins/PgIdToNodeIdPlugin'; @@ -37,6 +38,7 @@ export function genPreset(args: ArgsInterface) { const SchemaSmartTagsPlugin = CreateSchemaSmartTagsPlugin(pgSchema); const metadataPlugin = CreateMetadataPlugin(pgSchema); + const subqueryMetadataPlugin = CreateSubqueryMetadataPlugin(pgSchema, args); const preset: GraphileConfig.Preset = { extends: [PostGraphileAmberPreset, PgSimplifyInflectionPreset], grafserv: { port: DEFAULT_PORT }, @@ -62,6 +64,7 @@ export function genPreset(args: ArgsInterface) { SchemaSmartTagsPlugin, ...historicalPlugins, metadataPlugin, + subqueryMetadataPlugin, PgRowByVirtualIdPlugin, PgIdToNodeIdPlugin, ArgFilterPlugin, diff --git a/src/config/yargs.ts b/src/config/yargs.ts index d21ca69..49b4a03 100644 --- a/src/config/yargs.ts +++ b/src/config/yargs.ts @@ -48,6 +48,11 @@ export const yargsOptions = { type: 'boolean', default: false, }, + indexer: { + demandOption: false, + describe: 'Url that allows query to access indexer metadata', + type: 'string', + }, } satisfies { [key: string]: Options }; export type ArgsInterface = ArgumentsCamelCase>; diff --git a/src/plugins/GetMetadataPlugin.ts b/src/plugins/GetMetadataPlugin.ts index dbe09fb..aabf892 100644 --- a/src/plugins/GetMetadataPlugin.ts +++ b/src/plugins/GetMetadataPlugin.ts @@ -29,6 +29,7 @@ type MetaEntry = { key: string; value: MetaType }; export function CreateMetadataPlugin(schemaName: string) { return makeExtendSchemaPlugin((build) => { + // TODO Only handled the single-chain scenario, multi-chains may have unexpected results. const metadata = build.input.pgRegistry.pgResources._metadata; return { diff --git a/src/plugins/GetSubqueryMetadataPlugin.ts b/src/plugins/GetSubqueryMetadataPlugin.ts new file mode 100644 index 0000000..5edae2a --- /dev/null +++ b/src/plugins/GetSubqueryMetadataPlugin.ts @@ -0,0 +1,214 @@ +// Copyright 2020-2024 SubQuery Pte Ltd authors & contributors +// SPDX-License-Identifier: GPL-3.0 + +import { URL } from 'url'; +import { + getMetadataTableName, + MetaData, + METADATA_REGEX, + MULTI_METADATA_REGEX, + TableEstimate, +} from '@subql/utils'; +import { makeExtendSchemaPlugin, gql, ExtensionDefinition } from 'graphile-utils'; +import fetch, { Response } from 'node-fetch'; +import { PgClient, withPgClientTransaction } from 'postgraphile/@dataplan/pg'; +import { constant } from 'postgraphile/grafast'; +import { ArgsInterface } from '../config/yargs'; + +const extensionsTypeDefs: ExtensionDefinition['typeDefs'] = gql` + type TableEstimate { + table: String + estimate: Int + } + type _Metadata { + lastProcessedHeight: Int + lastProcessedTimestamp: Date + targetHeight: Int + chain: String + specName: String + genesisHash: String + startHeight: Int + indexerHealthy: Boolean + indexerNodeVersion: String + queryNodeVersion: String + queryNodeStyle: String + rowCountEstimate: [TableEstimate] + dynamicDatasources: [JSON] + evmChainId: String + deployments: JSON + lastFinalizedVerifiedHeight: Int + unfinalizedBlocks: String + lastCreatedPoiHeight: Int + latestSyncedPoiHeight: Int + dbSize: BigInt + } + type _Metadatas { + totalCount: Int! + nodes: [_Metadata]! + } + extend type Query { + _metadata(chainId: String): _Metadata + _metadatas(after: Cursor, before: Cursor): _Metadatas + } +`; +type MetaType = number | string | boolean; +type MetaEntry = { key: string; value: MetaType }; +type MetadatasConnection = { + totalCount?: number; + nodes?: MetaData[]; +}; + +const { version: packageVersion } = require('../../package.json'); +const META_JSON_FIELDS = ['deployments']; + +// TODO Is it necessary to update the SDK util package? +const metaCache = { + queryNodeVersion: packageVersion, + queryNodeStyle: 'subgraph', +} as MetaData & { queryNodeStyle: 'subgraph' }; + +async function fetchFromApi(argv: ArgsInterface): Promise { + let health: Response; + let meta: Response; + + const indexerUrl = argv.indexer; + + try { + meta = await fetch(new URL(`meta`, indexerUrl)); + const result = await meta.json(); + Object.assign(metaCache, result); + } catch (e: any) { + metaCache.indexerHealthy = false; + console.warn(`Failed to fetch indexer meta, `, e.message); + } + + try { + health = await fetch(new URL(`health`, indexerUrl)); + metaCache.indexerHealthy = !!health.ok; + } catch (e: any) { + metaCache.indexerHealthy = false; + console.warn(`Failed to fetch indexer health, `, e.message); + } +} + +function matchMetadataTableName(name: string): boolean { + return METADATA_REGEX.test(name) || MULTI_METADATA_REGEX.test(name); +} + +async function getTableEstimate(schemaName: string, pgClient: PgClient) { + const { rows } = await pgClient.query({ + text: `select relname as table , reltuples::bigint as estimate from pg_class + where + relnamespace in (select oid from pg_namespace where nspname = $1) + and + relname in (select table_name from information_schema.tables where table_schema = $1)`, + values: [schemaName], + }); + return rows; +} + +export function CreateSubqueryMetadataPlugin(schemaName: string, args: ArgsInterface) { + return makeExtendSchemaPlugin((build) => { + // Find all metadata table + const pgResources = build.input.pgRegistry.pgResources; + const metadataTables = Object.keys(build.input.pgRegistry.pgResources).filter((tableName) => + matchMetadataTableName(tableName) + ); + const metadataPgResource = metadataTables.reduce( + (result, key) => { + result[key] = pgResources[key]; + return result; + }, + {} as { [key: string]: (typeof pgResources)[keyof typeof pgResources] } + ); + + // TODO Is this feature necessary? + // if (args.indexer) { + // setAsyncInterval(async () => await fetchFromApi(args), 10000); + // } + + return { + typeDefs: extensionsTypeDefs, + + plans: { + Query: { + _metadata($parent, { $chainId }, ...args) { + const totalCountInput = $parent.get('totalCount'); + if ($chainId === undefined) { + return; + } + + const chainId = $chainId.eval(); + const metadataTableName = chainId ? getMetadataTableName(chainId) : '_metadata'; + const $metadata = metadataPgResource[metadataTableName]; + if (!$metadata) throw new Error(`Not Found Metadata, chainId: ${chainId}`); + const $metadataResult = withPgClientTransaction( + $metadata.executor, + $chainId, + async (pgClient, input) => { + const { rows } = await pgClient.query({ + text: `select value, key from "${schemaName}"."${metadataTableName}"`, + }); + const result: any = {}; + rows.forEach((item: any) => { + if (META_JSON_FIELDS.includes(item.key)) { + result[item.key] = JSON.parse(item.value); + } else { + result[item.key] = item.value; + } + }); + + // TODO How to check if the field should be returned. + result.rowCountEstimate = await getTableEstimate(schemaName, pgClient); + result.queryNodeVersion = packageVersion; + result.queryNodeStyle = 'subgraph'; + return result; + } + ); + + return $metadataResult; + }, + _metadatas(_, $input) { + const totalCount = Object.keys(metadataPgResource).length; + const pgTable = metadataPgResource[metadataTables[0]]; + if (!totalCount || !pgTable) { + return constant({ totalCount: 0, nodes: [] }); + } + + const $metadataResult = withPgClientTransaction( + pgTable.executor, + $input.getRaw(''), + async (pgClient, input): Promise => { + const nodes = await Promise.all( + metadataTables.map(async (tableName) => { + const { rows } = await pgClient.query({ + text: `select value, key from "${schemaName}"."${tableName}"`, + }); + const result: any = {}; + rows.forEach((item: any) => { + if (META_JSON_FIELDS.includes(item.key)) { + result[item.key] = JSON.parse(item.value); + } else { + result[item.key] = item.value; + } + }); + + // TODO How to check if the field should be returned. + result.rowCountEstimate = await getTableEstimate(schemaName, pgClient); + result.queryNodeVersion = packageVersion; + result.queryNodeStyle = 'subgraph'; + return result; + }) + ); + + return { totalCount, nodes }; + } + ); + + return $metadataResult; + }, + }, + }, + }; + }); +} diff --git a/src/plugins/filter/utils.ts b/src/plugins/filter/utils.ts index 114e535..f175604 100644 --- a/src/plugins/filter/utils.ts +++ b/src/plugins/filter/utils.ts @@ -105,11 +105,11 @@ export function ConvertGraphqlType(fieldType: string): GraphQLInputType | undefi return GraphQLString; case 'int2': case 'int4': - case 'int8': case 'float8': case 'float4': case 'numeric': return GraphQLFloat; + case 'int8': case 'timestamp': return GraphQLString; case 'varchar': diff --git a/src/utils/asyncInterval.ts b/src/utils/asyncInterval.ts new file mode 100644 index 0000000..daf84a3 --- /dev/null +++ b/src/utils/asyncInterval.ts @@ -0,0 +1,35 @@ +// Copyright 2020-2024 SubQuery Pte Ltd authors & contributors +// SPDX-License-Identifier: GPL-3.0 + +//improve util method from : https://dev.to/jsmccrumb/asynchronous-setinterval-4j69 + +const asyncIntervals: { run: boolean; id: number | NodeJS.Timeout }[] = []; + +const runAsyncInterval = async (cb: any, interval: any, intervalIndex: any) => { + await cb(); + if (asyncIntervals[intervalIndex].run) { + asyncIntervals[intervalIndex].id = setTimeout( + // eslint-disable-next-line @typescript-eslint/no-misused-promises + () => runAsyncInterval(cb, interval, intervalIndex), + interval + ); + } +}; + +export const setAsyncInterval = (cb: any, interval: any) => { + if (cb && typeof cb === 'function') { + const intervalIndex = asyncIntervals.length; + asyncIntervals.push({ run: true, id: 0 }); + runAsyncInterval(cb, interval, intervalIndex); + return intervalIndex; + } else { + throw new Error('Callback must be a function'); + } +}; + +const clearAsyncInterval = (intervalIndex: any) => { + if (asyncIntervals[intervalIndex].run) { + clearTimeout(asyncIntervals[intervalIndex].id); + asyncIntervals[intervalIndex].run = false; + } +}; diff --git a/test/subgraph.test.ts b/test/subgraph.test.ts index 3224708..755bb3c 100644 --- a/test/subgraph.test.ts +++ b/test/subgraph.test.ts @@ -123,7 +123,7 @@ describe("subgraph plugin test", () => { queryExplain: true, queryTimeout: '3000', } as ArgsInterface); - + apolloClient = new ApolloClient({ uri: 'http://localhost:3001/graphql', cache: new InMemoryCache() }); }); @@ -489,4 +489,9 @@ describe("subgraph plugin test", () => { expect(fetchedMeta.accounts.length).toBe(2); }); }); + + describe("subqery _metadata query", () => { + // TODO + + }) }); diff --git a/yarn.lock b/yarn.lock index d2a8d1a..bc4cafb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1021,6 +1021,22 @@ __metadata: languageName: node linkType: hard +"@noble/curves@npm:^1.3.0": + version: 1.6.0 + resolution: "@noble/curves@npm:1.6.0" + dependencies: + "@noble/hashes": 1.5.0 + checksum: 258f3feb2a6098cf35521562ecb7d452fd728e8a008ff9f1ef435184f9d0c782ceb8f7b7fa8df3317c3be7a19f53995ee124cd05c8080b130bd42e3cb072f24d + languageName: node + linkType: hard + +"@noble/hashes@npm:1.5.0, @noble/hashes@npm:^1.3.3": + version: 1.5.0 + resolution: "@noble/hashes@npm:1.5.0" + checksum: 9cc031d5c888c455bfeef76af649b87f75380a4511405baea633c1e4912fd84aff7b61e99716f0231d244c9cfeda1fafd7d718963e6a0c674ed705e9b1b4f76b + languageName: node + linkType: hard + "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -1194,6 +1210,184 @@ __metadata: languageName: node linkType: hard +"@polkadot/networks@npm:13.1.1": + version: 13.1.1 + resolution: "@polkadot/networks@npm:13.1.1" + dependencies: + "@polkadot/util": 13.1.1 + "@substrate/ss58-registry": ^1.50.0 + tslib: ^2.7.0 + checksum: 82c11848e900259dc4c7a9b4829b566003bfb1db815316047042704d73820fb4658e1acdeb71a87de3bcbf531f89180de2f51ca8ef83659126073ef16efadb16 + languageName: node + linkType: hard + +"@polkadot/util-crypto@npm:^13.0.2": + version: 13.1.1 + resolution: "@polkadot/util-crypto@npm:13.1.1" + dependencies: + "@noble/curves": ^1.3.0 + "@noble/hashes": ^1.3.3 + "@polkadot/networks": 13.1.1 + "@polkadot/util": 13.1.1 + "@polkadot/wasm-crypto": ^7.3.2 + "@polkadot/wasm-util": ^7.3.2 + "@polkadot/x-bigint": 13.1.1 + "@polkadot/x-randomvalues": 13.1.1 + "@scure/base": ^1.1.7 + tslib: ^2.7.0 + peerDependencies: + "@polkadot/util": 13.1.1 + checksum: 54a99d68ffe3cc2c455f4a919e5b64e801f0a029b22823d8fb387a97ca70dafaf125449a9f0d713abce96f7e3cb997f1920c6a669f42f3c162792fb48f18e7b8 + languageName: node + linkType: hard + +"@polkadot/util@npm:13.1.1, @polkadot/util@npm:^13.0.2": + version: 13.1.1 + resolution: "@polkadot/util@npm:13.1.1" + dependencies: + "@polkadot/x-bigint": 13.1.1 + "@polkadot/x-global": 13.1.1 + "@polkadot/x-textdecoder": 13.1.1 + "@polkadot/x-textencoder": 13.1.1 + "@types/bn.js": ^5.1.5 + bn.js: ^5.2.1 + tslib: ^2.7.0 + checksum: 88c2095454539f9583b1cef96b7265c9890bd7c345823f572ea345f0ee7d9f8b088144a34b84d43a298f3e41fc5f2932e7ec95e137aa09891f28509d0a3d5733 + languageName: node + linkType: hard + +"@polkadot/wasm-bridge@npm:7.3.2": + version: 7.3.2 + resolution: "@polkadot/wasm-bridge@npm:7.3.2" + dependencies: + "@polkadot/wasm-util": 7.3.2 + tslib: ^2.6.2 + peerDependencies: + "@polkadot/util": "*" + "@polkadot/x-randomvalues": "*" + checksum: 8c68b78cbd62347ebdf3fa66f2ffd1f7e883df71d770f5099ff652b083a79f1d7e9e7826a6acd8e986e9da0b07c0170a3f77b6a35726c6b24d856e3f8d08d201 + languageName: node + linkType: hard + +"@polkadot/wasm-crypto-asmjs@npm:7.3.2": + version: 7.3.2 + resolution: "@polkadot/wasm-crypto-asmjs@npm:7.3.2" + dependencies: + tslib: ^2.6.2 + peerDependencies: + "@polkadot/util": "*" + checksum: 669ea001565301f9b1a8feecb0e301c854fc318e5605316b57be7e83d717e7ee8ac460001cd44b18075a3d028c32c4a605c0e0e2e95ae00865282321b009ed26 + languageName: node + linkType: hard + +"@polkadot/wasm-crypto-init@npm:7.3.2": + version: 7.3.2 + resolution: "@polkadot/wasm-crypto-init@npm:7.3.2" + dependencies: + "@polkadot/wasm-bridge": 7.3.2 + "@polkadot/wasm-crypto-asmjs": 7.3.2 + "@polkadot/wasm-crypto-wasm": 7.3.2 + "@polkadot/wasm-util": 7.3.2 + tslib: ^2.6.2 + peerDependencies: + "@polkadot/util": "*" + "@polkadot/x-randomvalues": "*" + checksum: af7bc62bba16f1fbbfd76601ecf18ed8f4dfc685807e2e89ef8e8d02f824d1a1ed1635e9c2448c6c12a9a183192b18943f9ce077d6b7781c4d43cdb5c45c9161 + languageName: node + linkType: hard + +"@polkadot/wasm-crypto-wasm@npm:7.3.2": + version: 7.3.2 + resolution: "@polkadot/wasm-crypto-wasm@npm:7.3.2" + dependencies: + "@polkadot/wasm-util": 7.3.2 + tslib: ^2.6.2 + peerDependencies: + "@polkadot/util": "*" + checksum: e112ea3d4f8858a95fdaad47341b422db3db3256b7e7d709d1c3e0bc4c4bbdf81028eaa556b688078b32ff15be33af093b903c680f54eb1552072afede621a6a + languageName: node + linkType: hard + +"@polkadot/wasm-crypto@npm:^7.3.2": + version: 7.3.2 + resolution: "@polkadot/wasm-crypto@npm:7.3.2" + dependencies: + "@polkadot/wasm-bridge": 7.3.2 + "@polkadot/wasm-crypto-asmjs": 7.3.2 + "@polkadot/wasm-crypto-init": 7.3.2 + "@polkadot/wasm-crypto-wasm": 7.3.2 + "@polkadot/wasm-util": 7.3.2 + tslib: ^2.6.2 + peerDependencies: + "@polkadot/util": "*" + "@polkadot/x-randomvalues": "*" + checksum: 574006cdcc3e76af28cc79102726a79fdcd765ca5b45cbc4807d70917d82131b59f50b5cc07bd165b2863ed131b8764fef74b00c68ba5ec30a21c04c72061f8f + languageName: node + linkType: hard + +"@polkadot/wasm-util@npm:7.3.2, @polkadot/wasm-util@npm:^7.3.2": + version: 7.3.2 + resolution: "@polkadot/wasm-util@npm:7.3.2" + dependencies: + tslib: ^2.6.2 + peerDependencies: + "@polkadot/util": "*" + checksum: 44bd445043714aac6d184ce02d62fbdb97a117fd4d8bdbf3f2c1d14f6911a7d87ed6bb4682035eb757524ade995f7f4f8aaa07c8a194f761884ded25a6b383a9 + languageName: node + linkType: hard + +"@polkadot/x-bigint@npm:13.1.1": + version: 13.1.1 + resolution: "@polkadot/x-bigint@npm:13.1.1" + dependencies: + "@polkadot/x-global": 13.1.1 + tslib: ^2.7.0 + checksum: 1c2ca55a7e49306a1c5ae5110c5dd13ad7c14e8a6f0ec36226571ab8c4ad468351f97c36ddea2ad88bd540c786dc27941db6ee92dfede42e75e053982e439559 + languageName: node + linkType: hard + +"@polkadot/x-global@npm:13.1.1": + version: 13.1.1 + resolution: "@polkadot/x-global@npm:13.1.1" + dependencies: + tslib: ^2.7.0 + checksum: 0cea1b38cb19b07ec1d50d2913f3187e1ecd7a72e58c49017cad93d1f944d0236842e224b5f4ebe5d1f99ca31483643c33500e385553ed774128e0f00edecee8 + languageName: node + linkType: hard + +"@polkadot/x-randomvalues@npm:13.1.1": + version: 13.1.1 + resolution: "@polkadot/x-randomvalues@npm:13.1.1" + dependencies: + "@polkadot/x-global": 13.1.1 + tslib: ^2.7.0 + peerDependencies: + "@polkadot/util": 13.1.1 + "@polkadot/wasm-util": "*" + checksum: 30d8d0c4063d5f85d6f4e55c14822dc0304bb115c46a040f8a74a89fecbe20cfc8f8ef826ab816eedc0b80986ecec20d6d76de2095fa7caf203c761a6c2f1a45 + languageName: node + linkType: hard + +"@polkadot/x-textdecoder@npm:13.1.1": + version: 13.1.1 + resolution: "@polkadot/x-textdecoder@npm:13.1.1" + dependencies: + "@polkadot/x-global": 13.1.1 + tslib: ^2.7.0 + checksum: 03007249aee07501e8747a2e19448cb435ee5ca7c4e7dc1de667e811ee813e960311f26f1c1ca989391fb5d28600f68b72eded96ee643d0673b4d8e84cfb2ca0 + languageName: node + linkType: hard + +"@polkadot/x-textencoder@npm:13.1.1": + version: 13.1.1 + resolution: "@polkadot/x-textencoder@npm:13.1.1" + dependencies: + "@polkadot/x-global": 13.1.1 + tslib: ^2.7.0 + checksum: 9a72e477a3db29c273f245317cfc72e2752322a3317bc5aa6818e3c620e17551f5bd0685290ed7b67ccc8d3bf94118d806f6c64cff958983e6d8f45278769f29 + languageName: node + linkType: hard + "@rtsao/scc@npm:^1.1.0": version: 1.1.0 resolution: "@rtsao/scc@npm:1.1.0" @@ -1201,6 +1395,13 @@ __metadata: languageName: node linkType: hard +"@scure/base@npm:^1.1.7": + version: 1.1.9 + resolution: "@scure/base@npm:1.1.9" + checksum: 120820a37dfe9dfe4cab2b7b7460552d08e67dee8057ed5354eb68d8e3440890ae983ce3bee957d2b45684950b454a2b6d71d5ee77c1fd3fddc022e2a510337f + languageName: node + linkType: hard + "@sinclair/typebox@npm:^0.27.8": version: 0.27.8 resolution: "@sinclair/typebox@npm:0.27.8" @@ -1234,8 +1435,10 @@ __metadata: "@apollo/client": 3.0.0 "@geut/chan": ^3.2.9 "@graphile/simplify-inflection": ^8.0.0-beta.5 + "@subql/utils": ^2.14.0 "@tsconfig/node20": ^20.1.4 "@types/jest": ^29.5.12 + "@types/node-fetch": ^2.6.11 "@types/yargs": ^17.0.33 "@typescript-eslint/eslint-plugin": ^5 "@typescript-eslint/parser": 5 @@ -1249,6 +1452,7 @@ __metadata: husky: ^9.1.5 jest: ^29.7.0 lint-staged: ^15.2.7 + node-fetch: ^2.6.11 postgraphile: ^5.0.0-beta.28 prettier: ^3.3.3 pretty-quick: ^4.0.0 @@ -1261,6 +1465,75 @@ __metadata: languageName: unknown linkType: soft +"@subql/utils@npm:^2.14.0": + version: 2.14.0 + resolution: "@subql/utils@npm:2.14.0" + dependencies: + "@polkadot/util": ^13.0.2 + "@polkadot/util-crypto": ^13.0.2 + "@subql/x-sequelize": 6.32.0-0.0.4 + chalk: ^4.1.2 + detect-port: ^1.6.1 + flatted: ^3.3.1 + graphql: ^15.8.0 + graphql-tag: ^2.12.6 + lodash: ^4.17.21 + pino: ^6.13.3 + rotating-file-stream: ^3.2.3 + checksum: 0a56114494cb5e8c5dcf62e1d24fb7b2ba7b445472e61661ab9eec61df7a09449dd7251d78d6cd11a6da9939c5d54d2d57e16639b5d0986756513ab8810cf3e5 + languageName: node + linkType: hard + +"@subql/x-sequelize@npm:6.32.0-0.0.4": + version: 6.32.0-0.0.4 + resolution: "@subql/x-sequelize@npm:6.32.0-0.0.4" + dependencies: + "@types/debug": ^4.1.7 + "@types/validator": ^13.7.1 + debug: ^4.3.3 + dottie: ^2.0.2 + inflection: ^1.13.2 + lodash: ^4.17.21 + moment: ^2.29.1 + moment-timezone: ^0.5.35 + pg-connection-string: ^2.5.0 + retry-as-promised: ^7.0.3 + semver: ^7.3.5 + sequelize-pool: ^7.1.0 + toposort-class: ^1.0.1 + uuid: ^8.3.2 + validator: ^13.7.0 + wkx: ^0.5.0 + peerDependenciesMeta: + ibm_db: + optional: true + mariadb: + optional: true + mysql2: + optional: true + oracledb: + optional: true + pg: + optional: true + pg-hstore: + optional: true + snowflake-sdk: + optional: true + sqlite3: + optional: true + tedious: + optional: true + checksum: 1a648338693be8a2516ddfa79134f3f90239804985113ed1931ca154be850fc6d945c5c77d82f589b6d0711d4ad94fd70b468adfabb3f7f5f1e358c7e1d84d71 + languageName: node + linkType: hard + +"@substrate/ss58-registry@npm:^1.50.0": + version: 1.50.0 + resolution: "@substrate/ss58-registry@npm:1.50.0" + checksum: d19d933fadf9bfbebd1c4a62c750620de34bd920ca6beb3ad8d66147c6d672e0773b57fce8394ec52a36c60d0564a92b7961ed1eac8508bca0248e23f62b8460 + languageName: node + linkType: hard + "@tsconfig/node10@npm:^1.0.7": version: 1.0.11 resolution: "@tsconfig/node10@npm:1.0.11" @@ -1337,6 +1610,24 @@ __metadata: languageName: node linkType: hard +"@types/bn.js@npm:^5.1.5": + version: 5.1.6 + resolution: "@types/bn.js@npm:5.1.6" + dependencies: + "@types/node": "*" + checksum: 887411126d40e3d28aef2df8075cda2832db2b0e926bb4046039bbb026f2e3cfbcf1a3ce90bd935be0fcc039f8009e32026dfbb84a11c1f5d051cd7f8194ba23 + languageName: node + linkType: hard + +"@types/debug@npm:^4.1.7": + version: 4.1.12 + resolution: "@types/debug@npm:4.1.12" + dependencies: + "@types/ms": "*" + checksum: 47876a852de8240bfdaf7481357af2b88cb660d30c72e73789abf00c499d6bc7cd5e52f41c915d1b9cd8ec9fef5b05688d7b7aef17f7f272c2d04679508d1053 + languageName: node + linkType: hard + "@types/graceful-fs@npm:^4.1.3": version: 4.1.9 resolution: "@types/graceful-fs@npm:4.1.9" @@ -1413,6 +1704,23 @@ __metadata: languageName: node linkType: hard +"@types/ms@npm:*": + version: 0.7.34 + resolution: "@types/ms@npm:0.7.34" + checksum: f38d36e7b6edecd9badc9cf50474159e9da5fa6965a75186cceaf883278611b9df6669dc3a3cc122b7938d317b68a9e3d573d316fcb35d1be47ec9e468c6bd8a + languageName: node + linkType: hard + +"@types/node-fetch@npm:^2.6.11": + version: 2.6.11 + resolution: "@types/node-fetch@npm:2.6.11" + dependencies: + "@types/node": "*" + form-data: ^4.0.0 + checksum: 180e4d44c432839bdf8a25251ef8c47d51e37355ddd78c64695225de8bc5dc2b50b7bb855956d471c026bb84bd7295688a0960085e7158cbbba803053492568b + languageName: node + linkType: hard + "@types/node@npm:*": version: 22.5.4 resolution: "@types/node@npm:22.5.4" @@ -1470,6 +1778,13 @@ __metadata: languageName: node linkType: hard +"@types/validator@npm:^13.7.1": + version: 13.12.2 + resolution: "@types/validator@npm:13.12.2" + checksum: 4e989f76e155a93a94f53c2362d5695f0a95fb6f36e05f215b1af893e1dc70a7db2d8422c9a0c14dadb4fd3c32a7698c86bce3b81ff99116c8c7f21888875a2f + languageName: node + linkType: hard + "@types/yargs-parser@npm:*": version: 21.0.3 resolution: "@types/yargs-parser@npm:21.0.3" @@ -1673,6 +1988,13 @@ __metadata: languageName: node linkType: hard +"address@npm:^1.0.1": + version: 1.2.2 + resolution: "address@npm:1.2.2" + checksum: ace439960c1e3564d8f523aff23a841904bf33a2a7c2e064f7f60a064194075758b9690e65bd9785692a4ef698a998c57eb74d145881a1cecab8ba658ddb1607 + languageName: node + linkType: hard + "agent-base@npm:^7.0.2, agent-base@npm:^7.1.0, agent-base@npm:^7.1.1": version: 7.1.1 resolution: "agent-base@npm:7.1.1" @@ -1902,6 +2224,20 @@ __metadata: languageName: node linkType: hard +"asynckit@npm:^0.4.0": + version: 0.4.0 + resolution: "asynckit@npm:0.4.0" + checksum: 7b78c451df768adba04e2d02e63e2d0bf3b07adcd6e42b4cf665cb7ce899bedd344c69a1dcbce355b5f972d597b25aaa1c1742b52cffd9caccb22f348114f6be + languageName: node + linkType: hard + +"atomic-sleep@npm:^1.0.0": + version: 1.0.0 + resolution: "atomic-sleep@npm:1.0.0" + checksum: b95275afb2f80732f22f43a60178430c468906a415a7ff18bcd0feeebc8eec3930b51250aeda91a476062a90e07132b43a1794e8d8ffcf9b650e8139be75fa36 + languageName: node + linkType: hard + "available-typed-arrays@npm:^1.0.7": version: 1.0.7 resolution: "available-typed-arrays@npm:1.0.7" @@ -2011,6 +2347,13 @@ __metadata: languageName: node linkType: hard +"bn.js@npm:^5.2.1": + version: 5.2.1 + resolution: "bn.js@npm:5.2.1" + checksum: 3dd8c8d38055fedfa95c1d5fc3c99f8dd547b36287b37768db0abab3c239711f88ff58d18d155dd8ad902b0b0cee973747b7ae20ea12a09473272b0201c9edd3 + languageName: node + linkType: hard + "boolbase@npm:^1.0.0": version: 1.0.0 resolution: "boolbase@npm:1.0.0" @@ -2343,6 +2686,15 @@ __metadata: languageName: node linkType: hard +"combined-stream@npm:^1.0.8": + version: 1.0.8 + resolution: "combined-stream@npm:1.0.8" + dependencies: + delayed-stream: ~1.0.0 + checksum: 49fa4aeb4916567e33ea81d088f6584749fc90c7abec76fd516bf1c5aa5c79f3584b5ba3de6b86d26ddd64bae5329c4c7479343250cfe71c75bb366eae53bb7c + languageName: node + linkType: hard + "commander@npm:~12.1.0": version: 12.1.0 resolution: "commander@npm:12.1.0" @@ -2439,7 +2791,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:~4.3.6": +"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:~4.3.6": version: 4.3.7 resolution: "debug@npm:4.3.7" dependencies: @@ -2522,6 +2874,13 @@ __metadata: languageName: node linkType: hard +"delayed-stream@npm:~1.0.0": + version: 1.0.0 + resolution: "delayed-stream@npm:1.0.0" + checksum: 46fe6e83e2cb1d85ba50bd52803c68be9bd953282fa7096f51fc29edd5d67ff84ff753c51966061e5ba7cb5e47ef6d36a91924eddb7f3f3483b1c560f77a0020 + languageName: node + linkType: hard + "deprecation@npm:^2.0.0, deprecation@npm:^2.3.1": version: 2.3.1 resolution: "deprecation@npm:2.3.1" @@ -2536,6 +2895,19 @@ __metadata: languageName: node linkType: hard +"detect-port@npm:^1.6.1": + version: 1.6.1 + resolution: "detect-port@npm:1.6.1" + dependencies: + address: ^1.0.1 + debug: 4 + bin: + detect: bin/detect-port.js + detect-port: bin/detect-port.js + checksum: 0429fa423abb15fc453face64e6ffa406e375f51f5b4421a7886962e680dc05824eae9b6ee4594ba273685c3add415ad00982b5da54802ac3de6f846173284c3 + languageName: node + linkType: hard + "diff-sequences@npm:^29.6.3": version: 29.6.3 resolution: "diff-sequences@npm:29.6.3" @@ -2584,6 +2956,13 @@ __metadata: languageName: node linkType: hard +"dottie@npm:^2.0.2": + version: 2.0.6 + resolution: "dottie@npm:2.0.6" + checksum: 4c778df9dc631a1108a32ef390916836814999a7411d10883f4151bd49c9c6934dc329b3f50fc7692849aa75ba87dba880fd54be501a3b39a6b9c23d6f772a09 + languageName: node + linkType: hard + "eastasianwidth@npm:^0.2.0": version: 0.2.0 resolution: "eastasianwidth@npm:0.2.0" @@ -3190,6 +3569,20 @@ __metadata: languageName: node linkType: hard +"fast-redact@npm:^3.0.0": + version: 3.5.0 + resolution: "fast-redact@npm:3.5.0" + checksum: ef03f0d1849da074a520a531ad299bf346417b790a643931ab4e01cb72275c8d55b60dc8512fb1f1818647b696790edefaa96704228db9f012da935faa1940af + languageName: node + linkType: hard + +"fast-safe-stringify@npm:^2.0.8": + version: 2.1.1 + resolution: "fast-safe-stringify@npm:2.1.1" + checksum: a851cbddc451745662f8f00ddb622d6766f9bd97642dabfd9a405fb0d646d69fc0b9a1243cbf67f5f18a39f40f6fa821737651ff1bceeba06c9992ca2dc5bd3d + languageName: node + linkType: hard + "fastq@npm:^1.6.0": version: 1.17.1 resolution: "fastq@npm:1.17.1" @@ -3291,7 +3684,14 @@ __metadata: languageName: node linkType: hard -"flatted@npm:^3.2.9": +"flatstr@npm:^1.0.12": + version: 1.0.12 + resolution: "flatstr@npm:1.0.12" + checksum: e1bb562c94b119e958bf37e55738b172b5f8aaae6532b9660ecd877779f8559dbbc89613ba6b29ccc13447e14c59277d41450f785cf75c30df9fce62f459e9a8 + languageName: node + linkType: hard + +"flatted@npm:^3.2.9, flatted@npm:^3.3.1": version: 3.3.1 resolution: "flatted@npm:3.3.1" checksum: 85ae7181650bb728c221e7644cbc9f4bf28bc556f2fc89bb21266962bdf0ce1029cc7acc44bb646cd469d9baac7c317f64e841c4c4c00516afa97320cdac7f94 @@ -3327,6 +3727,17 @@ __metadata: languageName: node linkType: hard +"form-data@npm:^4.0.0": + version: 4.0.0 + resolution: "form-data@npm:4.0.0" + dependencies: + asynckit: ^0.4.0 + combined-stream: ^1.0.8 + mime-types: ^2.1.12 + checksum: 01135bf8675f9d5c61ff18e2e2932f719ca4de964e3be90ef4c36aacfc7b9cb2fceb5eca0b7e0190e3383fe51c5b37f4cb80b62ca06a99aaabfcfd6ac7c9328c + languageName: node + linkType: hard + "fs-minipass@npm:^2.0.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" @@ -3746,7 +4157,7 @@ __metadata: languageName: node linkType: hard -"graphql-tag@npm:^2.10.4": +"graphql-tag@npm:^2.10.4, graphql-tag@npm:^2.12.6": version: 2.12.6 resolution: "graphql-tag@npm:2.12.6" dependencies: @@ -3766,6 +4177,13 @@ __metadata: languageName: node linkType: hard +"graphql@npm:^15.8.0": + version: 15.9.0 + resolution: "graphql@npm:15.9.0" + checksum: fecf48b878baf8bd1d943b79860554f9e0bdf8d23a8f014356209fedcc1f1353729388538842d8a4a79078ea75b3f24d504d074223c815acf9b6059837c5c934 + languageName: node + linkType: hard + "graphql@npm:^16.1.0-experimental-stream-defer.6": version: 16.9.0 resolution: "graphql@npm:16.9.0" @@ -3964,6 +4382,13 @@ __metadata: languageName: node linkType: hard +"inflection@npm:^1.13.2": + version: 1.13.4 + resolution: "inflection@npm:1.13.4" + checksum: 6744feede9998ad8abd2b1db4af79f494a166e656a0aa949d90c8f4a945c1d07038a3756bf7af78c8f6fce368ba213a7ebf35da3edeffd39f1da0ff465eed6eb + languageName: node + linkType: hard + "inflight@npm:^1.0.4": version: 1.0.6 resolution: "inflight@npm:1.0.6" @@ -5367,6 +5792,22 @@ __metadata: languageName: node linkType: hard +"mime-db@npm:1.52.0": + version: 1.52.0 + resolution: "mime-db@npm:1.52.0" + checksum: 0d99a03585f8b39d68182803b12ac601d9c01abfa28ec56204fa330bc9f3d1c5e14beb049bafadb3dbdf646dfb94b87e24d4ec7b31b7279ef906a8ea9b6a513f + languageName: node + linkType: hard + +"mime-types@npm:^2.1.12": + version: 2.1.35 + resolution: "mime-types@npm:2.1.35" + dependencies: + mime-db: 1.52.0 + checksum: 89a5b7f1def9f3af5dad6496c5ed50191ae4331cc5389d7c521c8ad28d5fdad2d06fd81baf38fed813dc4e46bb55c8145bb0ff406330818c9cf712fb2e9b3836 + languageName: node + linkType: hard + "mimic-fn@npm:^2.1.0": version: 2.1.0 resolution: "mimic-fn@npm:2.1.0" @@ -5515,6 +5956,22 @@ __metadata: languageName: node linkType: hard +"moment-timezone@npm:^0.5.35": + version: 0.5.45 + resolution: "moment-timezone@npm:0.5.45" + dependencies: + moment: ^2.29.4 + checksum: a22e9f983fbe1a01757ce30685bce92e3f6efa692eb682afd47b82da3ff960b3c8c2c3883ec6715c124bc985a342b57cba1f6ba25a1c8b4c7ad766db3cd5e1d0 + languageName: node + linkType: hard + +"moment@npm:^2.29.1, moment@npm:^2.29.4": + version: 2.30.1 + resolution: "moment@npm:2.30.1" + checksum: 859236bab1e88c3e5802afcf797fc801acdbd0ee509d34ea3df6eea21eb6bcc2abd4ae4e4e64aa7c986aa6cba563c6e62806218e6412a765010712e5fa121ba6 + languageName: node + linkType: hard + "mri@npm:^1.2.0": version: 1.2.0 resolution: "mri@npm:1.2.0" @@ -5559,7 +6016,7 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:^2.6.7": +"node-fetch@npm:^2.6.11, node-fetch@npm:^2.6.7": version: 2.7.0 resolution: "node-fetch@npm:2.7.0" dependencies: @@ -6022,6 +6479,13 @@ __metadata: languageName: node linkType: hard +"pg-connection-string@npm:^2.5.0": + version: 2.7.0 + resolution: "pg-connection-string@npm:2.7.0" + checksum: 68015a8874b7ca5dad456445e4114af3d2602bac2fdb8069315ecad0ff9660ec93259b9af7186606529ac4f6f72a06831e6f20897a689b16cc7fda7ca0e247fd + languageName: node + linkType: hard + "pg-connection-string@npm:^2.6.4": version: 2.6.4 resolution: "pg-connection-string@npm:2.6.4" @@ -6174,6 +6638,30 @@ __metadata: languageName: node linkType: hard +"pino-std-serializers@npm:^3.1.0": + version: 3.2.0 + resolution: "pino-std-serializers@npm:3.2.0" + checksum: 77e29675b116e42ae9fe6d4ef52ef3a082ffc54922b122d85935f93ddcc20277f0b0c873c5c6c5274a67b0409c672aaae3de6bcea10a2d84699718dda55ba95b + languageName: node + linkType: hard + +"pino@npm:^6.13.3": + version: 6.14.0 + resolution: "pino@npm:6.14.0" + dependencies: + fast-redact: ^3.0.0 + fast-safe-stringify: ^2.0.8 + flatstr: ^1.0.12 + pino-std-serializers: ^3.1.0 + process-warning: ^1.0.0 + quick-format-unescaped: ^4.0.3 + sonic-boom: ^1.0.2 + bin: + pino: bin.js + checksum: eb13e12e3a3d682abe4a4da426455a9f4e041e55e4fa57d72d9677ee8d188a9c952f69347e728a3761c8262cdce76ef24bee29e1a53ab15aa9c5e851099163d0 + languageName: node + linkType: hard + "pirates@npm:^4.0.4": version: 4.0.6 resolution: "pirates@npm:4.0.6" @@ -6389,6 +6877,13 @@ __metadata: languageName: node linkType: hard +"process-warning@npm:^1.0.0": + version: 1.0.0 + resolution: "process-warning@npm:1.0.0" + checksum: c708a03241deec3cabaeee39c4f9ee8c4d71f1c5ef9b746c8252cdb952a6059068cfcdaf348399775244cbc441b6ae5e26a9c87ed371f88335d84f26d19180f9 + languageName: node + linkType: hard + "promise-retry@npm:^2.0.1": version: 2.0.1 resolution: "promise-retry@npm:2.0.1" @@ -6476,6 +6971,13 @@ __metadata: languageName: node linkType: hard +"quick-format-unescaped@npm:^4.0.3": + version: 4.0.4 + resolution: "quick-format-unescaped@npm:4.0.4" + checksum: 7bc32b99354a1aa46c089d2a82b63489961002bb1d654cee3e6d2d8778197b68c2d854fd23d8422436ee1fdfd0abaddc4d4da120afe700ade68bd357815b26fd + languageName: node + linkType: hard + "react-is@npm:^16.13.1, react-is@npm:^16.7.0": version: 16.13.1 resolution: "react-is@npm:16.13.1" @@ -6607,6 +7109,13 @@ __metadata: languageName: node linkType: hard +"retry-as-promised@npm:^7.0.3": + version: 7.0.4 + resolution: "retry-as-promised@npm:7.0.4" + checksum: 2b0dcddb06649d42b1384ec1f933c7cb4461939c28004460b0c4be0c8ae16cabaed2411aa5d46e734a320f33f4a1d480078a19b97c743c754bd32e896b3f8ea2 + languageName: node + linkType: hard + "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" @@ -6639,6 +7148,13 @@ __metadata: languageName: node linkType: hard +"rotating-file-stream@npm:^3.2.3": + version: 3.2.5 + resolution: "rotating-file-stream@npm:3.2.5" + checksum: 9b0975afc580a1551984095a0edf840d29c271fc3e619224b477fa62bcf28d24342dc04ba9317d2395d13078aecfd6c65d36f97f4adb97f89797e1bd80244bd9 + languageName: node + linkType: hard + "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" @@ -6722,6 +7238,13 @@ __metadata: languageName: node linkType: hard +"sequelize-pool@npm:^7.1.0": + version: 7.1.0 + resolution: "sequelize-pool@npm:7.1.0" + checksum: b11d06d02de9e8fc428ba3020b86f05fe7adad764e57f23c5901f924e31867901a5e7a090180337dc3b90de3934b64f34ae552fde37b0f3d37b09c0c8ecbddc7 + languageName: node + linkType: hard + "set-function-length@npm:^1.2.1": version: 1.2.2 resolution: "set-function-length@npm:1.2.2" @@ -6863,6 +7386,16 @@ __metadata: languageName: node linkType: hard +"sonic-boom@npm:^1.0.2": + version: 1.4.1 + resolution: "sonic-boom@npm:1.4.1" + dependencies: + atomic-sleep: ^1.0.0 + flatstr: ^1.0.12 + checksum: 189fa8fe5c2dc05d3513fc1a4926a2f16f132fa6fa0b511745a436010cdcd9c1d3b3cb6a9d7c05bd32a965dc77673a5ac0eb0992e920bdedd16330d95323124f + languageName: node + linkType: hard + "source-map-support@npm:0.5.13": version: 0.5.13 resolution: "source-map-support@npm:0.5.13" @@ -7213,6 +7746,13 @@ __metadata: languageName: node linkType: hard +"toposort-class@npm:^1.0.1": + version: 1.0.1 + resolution: "toposort-class@npm:1.0.1" + checksum: c5e3229d4899b23350b09ed26cfb7a28aadd0889550625f1bcadc0da266cdf2790fb0ccc3e92be93ba6ad64f57bc2fd1ab94446cb4ae83054dab263753157f5f + languageName: node + linkType: hard + "tr46@npm:~0.0.3": version: 0.0.3 resolution: "tr46@npm:0.0.3" @@ -7330,7 +7870,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.1.0, tslib@npm:^2.6.2": +"tslib@npm:^2.1.0, tslib@npm:^2.6.2, tslib@npm:^2.7.0": version: 2.7.0 resolution: "tslib@npm:2.7.0" checksum: 1606d5c89f88d466889def78653f3aab0f88692e80bb2066d090ca6112ae250ec1cfa9dbfaab0d17b60da15a4186e8ec4d893801c67896b277c17374e36e1d28 @@ -7694,6 +8234,13 @@ __metadata: languageName: node linkType: hard +"validator@npm:^13.7.0": + version: 13.12.0 + resolution: "validator@npm:13.12.0" + checksum: fb8f070724770b1449ea1a968605823fdb112dbd10507b2802f8841cda3e7b5c376c40f18c84e6a7b59de320a06177e471554101a85f1fa8a70bac1a84e48adf + languageName: node + linkType: hard + "vfile-message@npm:^2.0.0": version: 2.0.4 resolution: "vfile-message@npm:2.0.4" @@ -7799,6 +8346,15 @@ __metadata: languageName: node linkType: hard +"wkx@npm:^0.5.0": + version: 0.5.0 + resolution: "wkx@npm:0.5.0" + dependencies: + "@types/node": "*" + checksum: 47b27387de81fbd077528c1c11be996bf5a6dbeb94858ea0e2fa6619c2af626aa2f127f6fee1b4b57057a7cbef8a810b39a67815f2eb54ed33b1790e29db86ee + languageName: node + linkType: hard + "word-wrap@npm:^1.2.5": version: 1.2.5 resolution: "word-wrap@npm:1.2.5" From d574efd40d4f09d2cafcbcb4ca4fa1bfc3b0feb4 Mon Sep 17 00:00:00 2001 From: Tate Date: Thu, 26 Sep 2024 03:35:31 +0000 Subject: [PATCH 2/7] remove index flag --- package.json | 2 - src/config/yargs.ts | 5 -- src/plugins/GetSubqueryMetadataPlugin.ts | 60 +++++----------------- src/utils/asyncInterval.ts | 35 ------------- yarn.lock | 64 +----------------------- 5 files changed, 13 insertions(+), 153 deletions(-) delete mode 100644 src/utils/asyncInterval.ts diff --git a/package.json b/package.json index f3d0f91..7f00e6a 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ "@types/yargs": "^17.0.33", "dotenv": "^16.4.5", "eslint": "^8.8.0", - "node-fetch": "^2.6.11", "postgraphile": "^5.0.0-beta.28", "yargs": "latest" }, @@ -35,7 +34,6 @@ "@geut/chan": "^3.2.9", "@tsconfig/node20": "^20.1.4", "@types/jest": "^29.5.12", - "@types/node-fetch": "^2.6.11", "@typescript-eslint/eslint-plugin": "^5", "@typescript-eslint/parser": "5", "eslint-config-prettier": "^8.3.0", diff --git a/src/config/yargs.ts b/src/config/yargs.ts index 49b4a03..d21ca69 100644 --- a/src/config/yargs.ts +++ b/src/config/yargs.ts @@ -48,11 +48,6 @@ export const yargsOptions = { type: 'boolean', default: false, }, - indexer: { - demandOption: false, - describe: 'Url that allows query to access indexer metadata', - type: 'string', - }, } satisfies { [key: string]: Options }; export type ArgsInterface = ArgumentsCamelCase>; diff --git a/src/plugins/GetSubqueryMetadataPlugin.ts b/src/plugins/GetSubqueryMetadataPlugin.ts index 5edae2a..e0da08b 100644 --- a/src/plugins/GetSubqueryMetadataPlugin.ts +++ b/src/plugins/GetSubqueryMetadataPlugin.ts @@ -10,7 +10,6 @@ import { TableEstimate, } from '@subql/utils'; import { makeExtendSchemaPlugin, gql, ExtensionDefinition } from 'graphile-utils'; -import fetch, { Response } from 'node-fetch'; import { PgClient, withPgClientTransaction } from 'postgraphile/@dataplan/pg'; import { constant } from 'postgraphile/grafast'; import { ArgsInterface } from '../config/yargs'; @@ -55,42 +54,12 @@ type MetaType = number | string | boolean; type MetaEntry = { key: string; value: MetaType }; type MetadatasConnection = { totalCount?: number; - nodes?: MetaData[]; + nodes?: Partial[]; }; const { version: packageVersion } = require('../../package.json'); const META_JSON_FIELDS = ['deployments']; -// TODO Is it necessary to update the SDK util package? -const metaCache = { - queryNodeVersion: packageVersion, - queryNodeStyle: 'subgraph', -} as MetaData & { queryNodeStyle: 'subgraph' }; - -async function fetchFromApi(argv: ArgsInterface): Promise { - let health: Response; - let meta: Response; - - const indexerUrl = argv.indexer; - - try { - meta = await fetch(new URL(`meta`, indexerUrl)); - const result = await meta.json(); - Object.assign(metaCache, result); - } catch (e: any) { - metaCache.indexerHealthy = false; - console.warn(`Failed to fetch indexer meta, `, e.message); - } - - try { - health = await fetch(new URL(`health`, indexerUrl)); - metaCache.indexerHealthy = !!health.ok; - } catch (e: any) { - metaCache.indexerHealthy = false; - console.warn(`Failed to fetch indexer health, `, e.message); - } -} - function matchMetadataTableName(name: string): boolean { return METADATA_REGEX.test(name) || MULTI_METADATA_REGEX.test(name); } @@ -122,11 +91,6 @@ export function CreateSubqueryMetadataPlugin(schemaName: string, args: ArgsInter {} as { [key: string]: (typeof pgResources)[keyof typeof pgResources] } ); - // TODO Is this feature necessary? - // if (args.indexer) { - // setAsyncInterval(async () => await fetchFromApi(args), 10000); - // } - return { typeDefs: extensionsTypeDefs, @@ -145,21 +109,21 @@ export function CreateSubqueryMetadataPlugin(schemaName: string, args: ArgsInter const $metadataResult = withPgClientTransaction( $metadata.executor, $chainId, - async (pgClient, input) => { - const { rows } = await pgClient.query({ + async (pgClient, input): Promise> => { + const rowCountEstimate = await getTableEstimate(schemaName, pgClient); + const { rows } = await pgClient.query({ text: `select value, key from "${schemaName}"."${metadataTableName}"`, }); - const result: any = {}; - rows.forEach((item: any) => { + const result: Record = {}; + rows.forEach((item) => { if (META_JSON_FIELDS.includes(item.key)) { - result[item.key] = JSON.parse(item.value); + result[item.key] = JSON.parse(item.value as string); } else { result[item.key] = item.value; } }); - // TODO How to check if the field should be returned. - result.rowCountEstimate = await getTableEstimate(schemaName, pgClient); + result.rowCountEstimate = rowCountEstimate; result.queryNodeVersion = packageVersion; result.queryNodeStyle = 'subgraph'; return result; @@ -179,12 +143,13 @@ export function CreateSubqueryMetadataPlugin(schemaName: string, args: ArgsInter pgTable.executor, $input.getRaw(''), async (pgClient, input): Promise => { + const rowCountEstimate = await getTableEstimate(schemaName, pgClient); const nodes = await Promise.all( - metadataTables.map(async (tableName) => { + metadataTables.map(async (tableName): Promise> => { const { rows } = await pgClient.query({ text: `select value, key from "${schemaName}"."${tableName}"`, }); - const result: any = {}; + const result: Record = {}; rows.forEach((item: any) => { if (META_JSON_FIELDS.includes(item.key)) { result[item.key] = JSON.parse(item.value); @@ -193,8 +158,7 @@ export function CreateSubqueryMetadataPlugin(schemaName: string, args: ArgsInter } }); - // TODO How to check if the field should be returned. - result.rowCountEstimate = await getTableEstimate(schemaName, pgClient); + result.rowCountEstimate = rowCountEstimate; result.queryNodeVersion = packageVersion; result.queryNodeStyle = 'subgraph'; return result; diff --git a/src/utils/asyncInterval.ts b/src/utils/asyncInterval.ts deleted file mode 100644 index daf84a3..0000000 --- a/src/utils/asyncInterval.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2020-2024 SubQuery Pte Ltd authors & contributors -// SPDX-License-Identifier: GPL-3.0 - -//improve util method from : https://dev.to/jsmccrumb/asynchronous-setinterval-4j69 - -const asyncIntervals: { run: boolean; id: number | NodeJS.Timeout }[] = []; - -const runAsyncInterval = async (cb: any, interval: any, intervalIndex: any) => { - await cb(); - if (asyncIntervals[intervalIndex].run) { - asyncIntervals[intervalIndex].id = setTimeout( - // eslint-disable-next-line @typescript-eslint/no-misused-promises - () => runAsyncInterval(cb, interval, intervalIndex), - interval - ); - } -}; - -export const setAsyncInterval = (cb: any, interval: any) => { - if (cb && typeof cb === 'function') { - const intervalIndex = asyncIntervals.length; - asyncIntervals.push({ run: true, id: 0 }); - runAsyncInterval(cb, interval, intervalIndex); - return intervalIndex; - } else { - throw new Error('Callback must be a function'); - } -}; - -const clearAsyncInterval = (intervalIndex: any) => { - if (asyncIntervals[intervalIndex].run) { - clearTimeout(asyncIntervals[intervalIndex].id); - asyncIntervals[intervalIndex].run = false; - } -}; diff --git a/yarn.lock b/yarn.lock index bc4cafb..c18c8cb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1438,7 +1438,6 @@ __metadata: "@subql/utils": ^2.14.0 "@tsconfig/node20": ^20.1.4 "@types/jest": ^29.5.12 - "@types/node-fetch": ^2.6.11 "@types/yargs": ^17.0.33 "@typescript-eslint/eslint-plugin": ^5 "@typescript-eslint/parser": 5 @@ -1452,7 +1451,6 @@ __metadata: husky: ^9.1.5 jest: ^29.7.0 lint-staged: ^15.2.7 - node-fetch: ^2.6.11 postgraphile: ^5.0.0-beta.28 prettier: ^3.3.3 pretty-quick: ^4.0.0 @@ -1711,16 +1709,6 @@ __metadata: languageName: node linkType: hard -"@types/node-fetch@npm:^2.6.11": - version: 2.6.11 - resolution: "@types/node-fetch@npm:2.6.11" - dependencies: - "@types/node": "*" - form-data: ^4.0.0 - checksum: 180e4d44c432839bdf8a25251ef8c47d51e37355ddd78c64695225de8bc5dc2b50b7bb855956d471c026bb84bd7295688a0960085e7158cbbba803053492568b - languageName: node - linkType: hard - "@types/node@npm:*": version: 22.5.4 resolution: "@types/node@npm:22.5.4" @@ -2224,13 +2212,6 @@ __metadata: languageName: node linkType: hard -"asynckit@npm:^0.4.0": - version: 0.4.0 - resolution: "asynckit@npm:0.4.0" - checksum: 7b78c451df768adba04e2d02e63e2d0bf3b07adcd6e42b4cf665cb7ce899bedd344c69a1dcbce355b5f972d597b25aaa1c1742b52cffd9caccb22f348114f6be - languageName: node - linkType: hard - "atomic-sleep@npm:^1.0.0": version: 1.0.0 resolution: "atomic-sleep@npm:1.0.0" @@ -2686,15 +2667,6 @@ __metadata: languageName: node linkType: hard -"combined-stream@npm:^1.0.8": - version: 1.0.8 - resolution: "combined-stream@npm:1.0.8" - dependencies: - delayed-stream: ~1.0.0 - checksum: 49fa4aeb4916567e33ea81d088f6584749fc90c7abec76fd516bf1c5aa5c79f3584b5ba3de6b86d26ddd64bae5329c4c7479343250cfe71c75bb366eae53bb7c - languageName: node - linkType: hard - "commander@npm:~12.1.0": version: 12.1.0 resolution: "commander@npm:12.1.0" @@ -2874,13 +2846,6 @@ __metadata: languageName: node linkType: hard -"delayed-stream@npm:~1.0.0": - version: 1.0.0 - resolution: "delayed-stream@npm:1.0.0" - checksum: 46fe6e83e2cb1d85ba50bd52803c68be9bd953282fa7096f51fc29edd5d67ff84ff753c51966061e5ba7cb5e47ef6d36a91924eddb7f3f3483b1c560f77a0020 - languageName: node - linkType: hard - "deprecation@npm:^2.0.0, deprecation@npm:^2.3.1": version: 2.3.1 resolution: "deprecation@npm:2.3.1" @@ -3727,17 +3692,6 @@ __metadata: languageName: node linkType: hard -"form-data@npm:^4.0.0": - version: 4.0.0 - resolution: "form-data@npm:4.0.0" - dependencies: - asynckit: ^0.4.0 - combined-stream: ^1.0.8 - mime-types: ^2.1.12 - checksum: 01135bf8675f9d5c61ff18e2e2932f719ca4de964e3be90ef4c36aacfc7b9cb2fceb5eca0b7e0190e3383fe51c5b37f4cb80b62ca06a99aaabfcfd6ac7c9328c - languageName: node - linkType: hard - "fs-minipass@npm:^2.0.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" @@ -5792,22 +5746,6 @@ __metadata: languageName: node linkType: hard -"mime-db@npm:1.52.0": - version: 1.52.0 - resolution: "mime-db@npm:1.52.0" - checksum: 0d99a03585f8b39d68182803b12ac601d9c01abfa28ec56204fa330bc9f3d1c5e14beb049bafadb3dbdf646dfb94b87e24d4ec7b31b7279ef906a8ea9b6a513f - languageName: node - linkType: hard - -"mime-types@npm:^2.1.12": - version: 2.1.35 - resolution: "mime-types@npm:2.1.35" - dependencies: - mime-db: 1.52.0 - checksum: 89a5b7f1def9f3af5dad6496c5ed50191ae4331cc5389d7c521c8ad28d5fdad2d06fd81baf38fed813dc4e46bb55c8145bb0ff406330818c9cf712fb2e9b3836 - languageName: node - linkType: hard - "mimic-fn@npm:^2.1.0": version: 2.1.0 resolution: "mimic-fn@npm:2.1.0" @@ -6016,7 +5954,7 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:^2.6.11, node-fetch@npm:^2.6.7": +"node-fetch@npm:^2.6.7": version: 2.7.0 resolution: "node-fetch@npm:2.7.0" dependencies: From 00f1412ea61cc508226fc964c68008129a8f95e1 Mon Sep 17 00:00:00 2001 From: Tate Date: Thu, 26 Sep 2024 08:30:09 +0000 Subject: [PATCH 3/7] unit test --- test/subgraph.test.ts | 74 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 72 insertions(+), 2 deletions(-) diff --git a/test/subgraph.test.ts b/test/subgraph.test.ts index 755bb3c..e499821 100644 --- a/test/subgraph.test.ts +++ b/test/subgraph.test.ts @@ -124,7 +124,7 @@ describe("subgraph plugin test", () => { queryTimeout: '3000', } as ArgsInterface); - apolloClient = new ApolloClient({ uri: 'http://localhost:3001/graphql', cache: new InMemoryCache() }); + apolloClient = new ApolloClient({ uri: 'http://localhost:3001/graphql', cache: new InMemoryCache({ addTypename: false }) }); }); afterAll(async () => { @@ -491,7 +491,77 @@ describe("subgraph plugin test", () => { }); describe("subqery _metadata query", () => { - // TODO + it("block height", async () => { + const results = await graphqlQuery(gql` + query MyQuery { + _metadata { + lastProcessedHeight + lastProcessedTimestamp + targetHeight + chain + specName + genesisHash + startHeight + indexerHealthy + indexerNodeVersion + queryNodeVersion + evmChainId + deployments + lastFinalizedVerifiedHeight + unfinalizedBlocks + lastCreatedPoiHeight + latestSyncedPoiHeight + dbSize + queryNodeStyle + dynamicDatasources + rowCountEstimate { + estimate + table + } + } + } + `); + const fetchedMeta = results.data; + expect(fetchedMeta).toEqual({ + _metadata: { + "chain": "Polkadot", + "dbSize": null, + "deployments": { + "1": "/polkadot-test", + }, + "dynamicDatasources": [], + "evmChainId": null, + "genesisHash": "0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3", + "indexerHealthy": true, + "indexerNodeVersion": "5.2.2", + "lastCreatedPoiHeight": null, + "lastFinalizedVerifiedHeight": null, + "lastProcessedHeight": 1205725, + "lastProcessedTimestamp": "1725960100839", + "latestSyncedPoiHeight": null, + "queryNodeStyle": "subgraph", + "queryNodeVersion": "0.1.0", + "specName": "polkadot", + "startHeight": 1, + "targetHeight": 22472571, + "unfinalizedBlocks": null, + "rowCountEstimate": [ + { + "estimate": -1, + "table": "transfers", + }, + { + "estimate": -1, + "table": "accounts", + }, + { + "estimate": -1, + "table": "_metadata", + }, + ], + } + }); + }); }) }); From bdab6d2ce513bd995683a86e719256b7d6d6a42b Mon Sep 17 00:00:00 2001 From: Tate Date: Sun, 29 Sep 2024 04:16:05 +0000 Subject: [PATCH 4/7] GraphiQL control flag --- CHANGELOG.md | 1 + src/config/graphile.config.ts | 7 ++++++- src/config/yargs.ts | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b82572..78286ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Support subqery _metadata query(#4) +- GraphiQL control flag - `playground` ### Fixed - Bigint query type not match diff --git a/src/config/graphile.config.ts b/src/config/graphile.config.ts index d334247..beddf13 100644 --- a/src/config/graphile.config.ts +++ b/src/config/graphile.config.ts @@ -41,7 +41,12 @@ export function genPreset(args: ArgsInterface) { const subqueryMetadataPlugin = CreateSubqueryMetadataPlugin(pgSchema, args); const preset: GraphileConfig.Preset = { extends: [PostGraphileAmberPreset, PgSimplifyInflectionPreset], - grafserv: { port: DEFAULT_PORT }, + grafserv: { + port: DEFAULT_PORT, + graphiql: args.playground, + graphiqlOnGraphQLGET: false, + graphqlPath: '/', + }, pgServices: [ makePgService({ connectionString: pgConnection, diff --git a/src/config/yargs.ts b/src/config/yargs.ts index d21ca69..2ff92d8 100644 --- a/src/config/yargs.ts +++ b/src/config/yargs.ts @@ -28,6 +28,7 @@ export const yargsOptions = { demandOption: false, describe: 'Enable graphql playground', type: 'boolean', + default: false, }, // TODO 'query-limit': { From 1ea57d9a5baba0f8311abc3e3e1feb455ed92072 Mon Sep 17 00:00:00 2001 From: Tate Date: Wed, 9 Oct 2024 10:00:37 +0000 Subject: [PATCH 5/7] set graphiqlPath --- src/config/graphile.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/config/graphile.config.ts b/src/config/graphile.config.ts index beddf13..0f4f091 100644 --- a/src/config/graphile.config.ts +++ b/src/config/graphile.config.ts @@ -44,6 +44,7 @@ export function genPreset(args: ArgsInterface) { grafserv: { port: DEFAULT_PORT, graphiql: args.playground, + graphiqlPath: '/graphiql', graphiqlOnGraphQLGET: false, graphqlPath: '/', }, From da09cf01c9aa204431dc8cb5f9af1b0f2c6ae3be Mon Sep 17 00:00:00 2001 From: Tate Date: Thu, 10 Oct 2024 01:52:18 +0000 Subject: [PATCH 6/7] health check api --- package.json | 2 + src/server.ts | 19 +- yarn.lock | 525 +++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 537 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 7f00e6a..6158062 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "@types/yargs": "^17.0.33", "dotenv": "^16.4.5", "eslint": "^8.8.0", + "express": "^4.21.1", "postgraphile": "^5.0.0-beta.28", "yargs": "latest" }, @@ -33,6 +34,7 @@ "@apollo/client": "3.0.0", "@geut/chan": "^3.2.9", "@tsconfig/node20": "^20.1.4", + "@types/express": "^4", "@types/jest": "^29.5.12", "@typescript-eslint/eslint-plugin": "^5", "@typescript-eslint/parser": "5", diff --git a/src/server.ts b/src/server.ts index 02417a1..c10899e 100644 --- a/src/server.ts +++ b/src/server.ts @@ -2,8 +2,10 @@ // SPDX-License-Identifier: GPL-3.0 import { createServer } from 'node:http'; +import express from 'express'; +import { grafserv } from 'grafserv/express/v4'; import { postgraphile } from 'postgraphile'; -import { grafserv } from 'postgraphile/grafserv/node'; +// import { grafserv } from 'postgraphile/grafserv/node'; import { genPreset, ArgsInterface } from './config/index'; export function startServer(args: ArgsInterface) { @@ -11,12 +13,23 @@ export function startServer(args: ArgsInterface) { const pgl = postgraphile(preset); const serv = pgl.createServ(grafserv); - const server = createServer(); + const app = express(); + app.use((req, res, next) => { + console.log(req.url); + if (req.url === '/.well-known/apollo/server-health') { + res.setHeader('Content-Type', 'application/health+json'); + res.end('{"status":"pass"}'); + return; + } + next(); + }); + const server = createServer(app); + server.on('error', (e) => { console.error(e); }); - serv.addTo(server).catch((e) => { + serv.addTo(app, server).catch((e) => { console.error(e); process.exit(1); }); diff --git a/yarn.lock b/yarn.lock index c18c8cb..05dfcdd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1437,6 +1437,7 @@ __metadata: "@graphile/simplify-inflection": ^8.0.0-beta.5 "@subql/utils": ^2.14.0 "@tsconfig/node20": ^20.1.4 + "@types/express": ^4 "@types/jest": ^29.5.12 "@types/yargs": ^17.0.33 "@typescript-eslint/eslint-plugin": ^5 @@ -1448,6 +1449,7 @@ __metadata: eslint-plugin-import: ^2.25.4 eslint-plugin-prettier: ^5.1.3 eslint-plugin-sort-destructure-keys: ^1.4.0 + express: ^4.21.1 husky: ^9.1.5 jest: ^29.7.0 lint-staged: ^15.2.7 @@ -1617,6 +1619,25 @@ __metadata: languageName: node linkType: hard +"@types/body-parser@npm:*": + version: 1.19.5 + resolution: "@types/body-parser@npm:1.19.5" + dependencies: + "@types/connect": "*" + "@types/node": "*" + checksum: 1e251118c4b2f61029cc43b0dc028495f2d1957fe8ee49a707fb940f86a9bd2f9754230805598278fe99958b49e9b7e66eec8ef6a50ab5c1f6b93e1ba2aaba82 + languageName: node + linkType: hard + +"@types/connect@npm:*": + version: 3.4.38 + resolution: "@types/connect@npm:3.4.38" + dependencies: + "@types/node": "*" + checksum: 7eb1bc5342a9604facd57598a6c62621e244822442976c443efb84ff745246b10d06e8b309b6e80130026a396f19bf6793b7cecd7380169f369dac3bfc46fb99 + languageName: node + linkType: hard + "@types/debug@npm:^4.1.7": version: 4.1.12 resolution: "@types/debug@npm:4.1.12" @@ -1626,6 +1647,30 @@ __metadata: languageName: node linkType: hard +"@types/express-serve-static-core@npm:^4.17.33": + version: 4.19.6 + resolution: "@types/express-serve-static-core@npm:4.19.6" + dependencies: + "@types/node": "*" + "@types/qs": "*" + "@types/range-parser": "*" + "@types/send": "*" + checksum: b0576eddc2d25ccdf10e68ba09598b87a4d7b2ad04a81dc847cb39fe56beb0b6a5cc017b1e00aa0060cb3b38e700384ce96d291a116a0f1e54895564a104aae9 + languageName: node + linkType: hard + +"@types/express@npm:^4": + version: 4.17.21 + resolution: "@types/express@npm:4.17.21" + dependencies: + "@types/body-parser": "*" + "@types/express-serve-static-core": ^4.17.33 + "@types/qs": "*" + "@types/serve-static": "*" + checksum: fb238298630370a7392c7abdc80f495ae6c716723e114705d7e3fb67e3850b3859bbfd29391463a3fb8c0b32051847935933d99e719c0478710f8098ee7091c5 + languageName: node + linkType: hard + "@types/graceful-fs@npm:^4.1.3": version: 4.1.9 resolution: "@types/graceful-fs@npm:4.1.9" @@ -1635,6 +1680,13 @@ __metadata: languageName: node linkType: hard +"@types/http-errors@npm:*": + version: 2.0.4 + resolution: "@types/http-errors@npm:2.0.4" + checksum: 1f3d7c3b32c7524811a45690881736b3ef741bf9849ae03d32ad1ab7062608454b150a4e7f1351f83d26a418b2d65af9bdc06198f1c079d75578282884c4e8e3 + languageName: node + linkType: hard + "@types/interpret@npm:^1.1.1": version: 1.1.3 resolution: "@types/interpret@npm:1.1.3" @@ -1702,6 +1754,13 @@ __metadata: languageName: node linkType: hard +"@types/mime@npm:^1": + version: 1.3.5 + resolution: "@types/mime@npm:1.3.5" + checksum: e29a5f9c4776f5229d84e525b7cd7dd960b51c30a0fb9a028c0821790b82fca9f672dab56561e2acd9e8eed51d431bde52eafdfef30f643586c4162f1aecfc78 + languageName: node + linkType: hard + "@types/ms@npm:*": version: 0.7.34 resolution: "@types/ms@npm:0.7.34" @@ -1745,6 +1804,20 @@ __metadata: languageName: node linkType: hard +"@types/qs@npm:*": + version: 6.9.16 + resolution: "@types/qs@npm:6.9.16" + checksum: 2e8918150c12735630f7ee16b770c72949274938c30306025f68aaf977227f41fe0c698ed93db1099e04916d582ac5a1faf7e3c7061c8d885d9169f59a184b6c + languageName: node + linkType: hard + +"@types/range-parser@npm:*": + version: 1.2.7 + resolution: "@types/range-parser@npm:1.2.7" + checksum: 95640233b689dfbd85b8c6ee268812a732cf36d5affead89e806fe30da9a430767af8ef2cd661024fd97e19d61f3dec75af2df5e80ec3bea000019ab7028629a + languageName: node + linkType: hard + "@types/semver@npm:^7.3.12, @types/semver@npm:^7.5.1": version: 7.5.8 resolution: "@types/semver@npm:7.5.8" @@ -1752,6 +1825,27 @@ __metadata: languageName: node linkType: hard +"@types/send@npm:*": + version: 0.17.4 + resolution: "@types/send@npm:0.17.4" + dependencies: + "@types/mime": ^1 + "@types/node": "*" + checksum: cf4db48251bbb03cd6452b4de6e8e09e2d75390a92fd798eca4a803df06444adc94ed050246c94c7ed46fb97be1f63607f0e1f13c3ce83d71788b3e08640e5e0 + languageName: node + linkType: hard + +"@types/serve-static@npm:*": + version: 1.15.7 + resolution: "@types/serve-static@npm:1.15.7" + dependencies: + "@types/http-errors": "*" + "@types/node": "*" + "@types/send": "*" + checksum: bbbf00dbd84719da2250a462270dc68964006e8d62f41fe3741abd94504ba3688f420a49afb2b7478921a1544d3793183ffa097c5724167da777f4e0c7f1a7d6 + languageName: node + linkType: hard + "@types/stack-utils@npm:^2.0.0": version: 2.0.3 resolution: "@types/stack-utils@npm:2.0.3" @@ -1949,6 +2043,16 @@ __metadata: languageName: node linkType: hard +"accepts@npm:~1.3.8": + version: 1.3.8 + resolution: "accepts@npm:1.3.8" + dependencies: + mime-types: ~2.1.34 + negotiator: 0.6.3 + checksum: 50c43d32e7b50285ebe84b613ee4a3aa426715a7d131b65b786e2ead0fd76b6b60091b9916d3478a75f11f162628a2139991b6c03ab3f1d9ab7c86075dc8eab4 + languageName: node + linkType: hard + "acorn-jsx@npm:^5.3.2": version: 5.3.2 resolution: "acorn-jsx@npm:5.3.2" @@ -2130,6 +2234,13 @@ __metadata: languageName: node linkType: hard +"array-flatten@npm:1.1.1": + version: 1.1.1 + resolution: "array-flatten@npm:1.1.1" + checksum: a9925bf3512d9dce202112965de90c222cd59a4fbfce68a0951d25d965cf44642931f40aac72309c41f12df19afa010ecadceb07cfff9ccc1621e99d89ab5f3b + languageName: node + linkType: hard + "array-includes@npm:^3.1.8": version: 3.1.8 resolution: "array-includes@npm:3.1.8" @@ -2335,6 +2446,26 @@ __metadata: languageName: node linkType: hard +"body-parser@npm:1.20.3": + version: 1.20.3 + resolution: "body-parser@npm:1.20.3" + dependencies: + bytes: 3.1.2 + content-type: ~1.0.5 + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + http-errors: 2.0.0 + iconv-lite: 0.4.24 + on-finished: 2.4.1 + qs: 6.13.0 + raw-body: 2.5.2 + type-is: ~1.6.18 + unpipe: 1.0.0 + checksum: 1a35c59a6be8d852b00946330141c4f142c6af0f970faa87f10ad74f1ee7118078056706a05ae3093c54dabca9cd3770fa62a170a85801da1a4324f04381167d + languageName: node + linkType: hard + "boolbase@npm:^1.0.0": version: 1.0.0 resolution: "boolbase@npm:1.0.0" @@ -2432,6 +2563,13 @@ __metadata: languageName: node linkType: hard +"bytes@npm:3.1.2": + version: 3.1.2 + resolution: "bytes@npm:3.1.2" + checksum: e4bcd3948d289c5127591fbedf10c0b639ccbf00243504e4e127374a15c3bc8eed0d28d4aaab08ff6f1cf2abc0cce6ba3085ed32f4f90e82a5683ce0014e1b6e + languageName: node + linkType: hard + "cacache@npm:^18.0.0": version: 18.0.4 resolution: "cacache@npm:18.0.4" @@ -2681,6 +2819,22 @@ __metadata: languageName: node linkType: hard +"content-disposition@npm:0.5.4": + version: 0.5.4 + resolution: "content-disposition@npm:0.5.4" + dependencies: + safe-buffer: 5.2.1 + checksum: afb9d545e296a5171d7574fcad634b2fdf698875f4006a9dd04a3e1333880c5c0c98d47b560d01216fb6505a54a2ba6a843ee3a02ec86d7e911e8315255f56c3 + languageName: node + linkType: hard + +"content-type@npm:~1.0.4, content-type@npm:~1.0.5": + version: 1.0.5 + resolution: "content-type@npm:1.0.5" + checksum: 566271e0a251642254cde0f845f9dd4f9856e52d988f4eb0d0dcffbb7a1f8ec98de7a5215fc628f3bce30fe2fb6fd2bc064b562d721658c59b544e2d34ea2766 + languageName: node + linkType: hard + "convert-source-map@npm:^2.0.0": version: 2.0.0 resolution: "convert-source-map@npm:2.0.0" @@ -2688,6 +2842,20 @@ __metadata: languageName: node linkType: hard +"cookie-signature@npm:1.0.6": + version: 1.0.6 + resolution: "cookie-signature@npm:1.0.6" + checksum: f4e1b0a98a27a0e6e66fd7ea4e4e9d8e038f624058371bf4499cfcd8f3980be9a121486995202ba3fca74fbed93a407d6d54d43a43f96fd28d0bd7a06761591a + languageName: node + linkType: hard + +"cookie@npm:0.7.1": + version: 0.7.1 + resolution: "cookie@npm:0.7.1" + checksum: cec5e425549b3650eb5c3498a9ba3cde0b9cd419e3b36e4b92739d30b4d89e0b678b98c1ddc209ce7cf958cd3215671fd6ac47aec21f10c2a0cc68abd399d8a7 + languageName: node + linkType: hard + "create-jest@npm:^29.7.0": version: 29.7.0 resolution: "create-jest@npm:29.7.0" @@ -2763,6 +2931,15 @@ __metadata: languageName: node linkType: hard +"debug@npm:2.6.9": + version: 2.6.9 + resolution: "debug@npm:2.6.9" + dependencies: + ms: 2.0.0 + checksum: d2f51589ca66df60bf36e1fa6e4386b318c3f1e06772280eea5b1ae9fd3d05e9c2b7fd8a7d862457d00853c75b00451aa2d7459b924629ee385287a650f58fe6 + languageName: node + linkType: hard + "debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:~4.3.6": version: 4.3.7 resolution: "debug@npm:4.3.7" @@ -2846,6 +3023,13 @@ __metadata: languageName: node linkType: hard +"depd@npm:2.0.0": + version: 2.0.0 + resolution: "depd@npm:2.0.0" + checksum: abbe19c768c97ee2eed6282d8ce3031126662252c58d711f646921c9623f9052e3e1906443066beec1095832f534e57c523b7333f8e7e0d93051ab6baef5ab3a + languageName: node + linkType: hard + "deprecation@npm:^2.0.0, deprecation@npm:^2.3.1": version: 2.3.1 resolution: "deprecation@npm:2.3.1" @@ -2853,6 +3037,13 @@ __metadata: languageName: node linkType: hard +"destroy@npm:1.2.0": + version: 1.2.0 + resolution: "destroy@npm:1.2.0" + checksum: 0acb300b7478a08b92d810ab229d5afe0d2f4399272045ab22affa0d99dbaf12637659411530a6fcd597a9bdac718fc94373a61a95b4651bbc7b83684a565e38 + languageName: node + linkType: hard + "detect-newline@npm:^3.0.0": version: 3.1.0 resolution: "detect-newline@npm:3.1.0" @@ -2951,6 +3142,13 @@ __metadata: languageName: node linkType: hard +"ee-first@npm:1.1.1": + version: 1.1.1 + resolution: "ee-first@npm:1.1.1" + checksum: 1b4cac778d64ce3b582a7e26b218afe07e207a0f9bfe13cc7395a6d307849cfe361e65033c3251e00c27dd060cab43014c2d6b2647676135e18b77d2d05b3f4f + languageName: node + linkType: hard + "ejs@npm:^3.1.10": version: 3.1.10 resolution: "ejs@npm:3.1.10" @@ -2997,6 +3195,20 @@ __metadata: languageName: node linkType: hard +"encodeurl@npm:~1.0.2": + version: 1.0.2 + resolution: "encodeurl@npm:1.0.2" + checksum: e50e3d508cdd9c4565ba72d2012e65038e5d71bdc9198cb125beb6237b5b1ade6c0d343998da9e170fb2eae52c1bed37d4d6d98a46ea423a0cddbed5ac3f780c + languageName: node + linkType: hard + +"encodeurl@npm:~2.0.0": + version: 2.0.0 + resolution: "encodeurl@npm:2.0.0" + checksum: abf5cd51b78082cf8af7be6785813c33b6df2068ce5191a40ca8b1afe6a86f9230af9a9ce694a5ce4665955e5c1120871826df9c128a642e09c58d592e2807fe + languageName: node + linkType: hard + "encoding@npm:^0.1.13": version: 0.1.13 resolution: "encoding@npm:0.1.13" @@ -3153,6 +3365,13 @@ __metadata: languageName: node linkType: hard +"escape-html@npm:~1.0.3": + version: 1.0.3 + resolution: "escape-html@npm:1.0.3" + checksum: 6213ca9ae00d0ab8bccb6d8d4e0a98e76237b2410302cf7df70aaa6591d509a2a37ce8998008cbecae8fc8ffaadf3fb0229535e6a145f3ce0b211d060decbb24 + languageName: node + linkType: hard + "escape-string-regexp@npm:^1.0.5": version: 1.0.5 resolution: "escape-string-regexp@npm:1.0.5" @@ -3411,6 +3630,13 @@ __metadata: languageName: node linkType: hard +"etag@npm:~1.8.1": + version: 1.8.1 + resolution: "etag@npm:1.8.1" + checksum: 571aeb3dbe0f2bbd4e4fadbdb44f325fc75335cd5f6f6b6a091e6a06a9f25ed5392f0863c5442acb0646787446e816f13cbfc6edce5b07658541dff573cab1ff + languageName: node + linkType: hard + "eventemitter3@npm:^4.0.0": version: 4.0.7 resolution: "eventemitter3@npm:4.0.7" @@ -3486,6 +3712,45 @@ __metadata: languageName: node linkType: hard +"express@npm:^4.21.1": + version: 4.21.1 + resolution: "express@npm:4.21.1" + dependencies: + accepts: ~1.3.8 + array-flatten: 1.1.1 + body-parser: 1.20.3 + content-disposition: 0.5.4 + content-type: ~1.0.4 + cookie: 0.7.1 + cookie-signature: 1.0.6 + debug: 2.6.9 + depd: 2.0.0 + encodeurl: ~2.0.0 + escape-html: ~1.0.3 + etag: ~1.8.1 + finalhandler: 1.3.1 + fresh: 0.5.2 + http-errors: 2.0.0 + merge-descriptors: 1.0.3 + methods: ~1.1.2 + on-finished: 2.4.1 + parseurl: ~1.3.3 + path-to-regexp: 0.1.10 + proxy-addr: ~2.0.7 + qs: 6.13.0 + range-parser: ~1.2.1 + safe-buffer: 5.2.1 + send: 0.19.0 + serve-static: 1.16.2 + setprototypeof: 1.2.0 + statuses: 2.0.1 + type-is: ~1.6.18 + utils-merge: 1.0.1 + vary: ~1.1.2 + checksum: 5ac2b26d8aeddda5564fc0907227d29c100f90c0ead2ead9d474dc5108e8fb306c2de2083c4e3ba326e0906466f2b73417dbac16961f4075ff9f03785fd940fe + languageName: node + linkType: hard + "extend@npm:^3.0.0": version: 3.0.2 resolution: "extend@npm:3.0.2" @@ -3609,6 +3874,21 @@ __metadata: languageName: node linkType: hard +"finalhandler@npm:1.3.1": + version: 1.3.1 + resolution: "finalhandler@npm:1.3.1" + dependencies: + debug: 2.6.9 + encodeurl: ~2.0.0 + escape-html: ~1.0.3 + on-finished: 2.4.1 + parseurl: ~1.3.3 + statuses: 2.0.1 + unpipe: ~1.0.0 + checksum: a8c58cd97c9cd47679a870f6833a7b417043f5a288cd6af6d0f49b476c874a506100303a128b6d3b654c3d74fa4ff2ffed68a48a27e8630cda5c918f2977dcf4 + languageName: node + linkType: hard + "find-up@npm:^2.0.0": version: 2.1.0 resolution: "find-up@npm:2.1.0" @@ -3692,6 +3972,20 @@ __metadata: languageName: node linkType: hard +"forwarded@npm:0.2.0": + version: 0.2.0 + resolution: "forwarded@npm:0.2.0" + checksum: fd27e2394d8887ebd16a66ffc889dc983fbbd797d5d3f01087c020283c0f019a7d05ee85669383d8e0d216b116d720fc0cef2f6e9b7eb9f4c90c6e0bc7fd28e6 + languageName: node + linkType: hard + +"fresh@npm:0.5.2": + version: 0.5.2 + resolution: "fresh@npm:0.5.2" + checksum: 13ea8b08f91e669a64e3ba3a20eb79d7ca5379a81f1ff7f4310d54e2320645503cc0c78daedc93dfb6191287295f6479544a649c64d8e41a1c0fb0c221552346 + languageName: node + linkType: hard + "fs-minipass@npm:^2.0.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" @@ -4230,6 +4524,19 @@ __metadata: languageName: node linkType: hard +"http-errors@npm:2.0.0": + version: 2.0.0 + resolution: "http-errors@npm:2.0.0" + dependencies: + depd: 2.0.0 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 2.0.1 + toidentifier: 1.0.1 + checksum: 9b0a3782665c52ce9dc658a0d1560bcb0214ba5699e4ea15aefb2a496e2ca83db03ebc42e1cce4ac1f413e4e0d2d736a3fd755772c556a9a06853ba2a0b7d920 + languageName: node + linkType: hard + "http-proxy-agent@npm:^7.0.0": version: 7.0.2 resolution: "http-proxy-agent@npm:7.0.2" @@ -4284,6 +4591,15 @@ __metadata: languageName: node linkType: hard +"iconv-lite@npm:0.4.24": + version: 0.4.24 + resolution: "iconv-lite@npm:0.4.24" + dependencies: + safer-buffer: ">= 2.1.2 < 3" + checksum: bd9f120f5a5b306f0bc0b9ae1edeb1577161503f5f8252a20f1a9e56ef8775c9959fd01c55f2d3a39d9a8abaf3e30c1abeb1895f367dcbbe0a8fd1c9ca01c4f6 + languageName: node + linkType: hard + "iconv-lite@npm:^0.6.2": version: 0.6.3 resolution: "iconv-lite@npm:0.6.3" @@ -4353,7 +4669,7 @@ __metadata: languageName: node linkType: hard -"inherits@npm:2": +"inherits@npm:2, inherits@npm:2.0.4": version: 2.0.4 resolution: "inherits@npm:2.0.4" checksum: 4a48a733847879d6cf6691860a6b1e3f0f4754176e4d71494c41f3475553768b10f84b5ce1d40fbd0e34e6bfbb864ee35858ad4dd2cf31e02fc4a154b724d7f1 @@ -4395,6 +4711,13 @@ __metadata: languageName: node linkType: hard +"ipaddr.js@npm:1.9.1": + version: 1.9.1 + resolution: "ipaddr.js@npm:1.9.1" + checksum: f88d3825981486f5a1942414c8d77dd6674dd71c065adcfa46f578d677edcb99fda25af42675cb59db492fdf427b34a5abfcde3982da11a8fd83a500b41cfe77 + languageName: node + linkType: hard + "is-alphabetical@npm:^1.0.0": version: 1.0.4 resolution: "is-alphabetical@npm:1.0.4" @@ -5712,6 +6035,20 @@ __metadata: languageName: node linkType: hard +"media-typer@npm:0.3.0": + version: 0.3.0 + resolution: "media-typer@npm:0.3.0" + checksum: af1b38516c28ec95d6b0826f6c8f276c58aec391f76be42aa07646b4e39d317723e869700933ca6995b056db4b09a78c92d5440dc23657e6764be5d28874bba1 + languageName: node + linkType: hard + +"merge-descriptors@npm:1.0.3": + version: 1.0.3 + resolution: "merge-descriptors@npm:1.0.3" + checksum: 52117adbe0313d5defa771c9993fe081e2d2df9b840597e966aadafde04ae8d0e3da46bac7ca4efc37d4d2b839436582659cd49c6a43eacb3fe3050896a105d1 + languageName: node + linkType: hard + "merge-stream@npm:^2.0.0": version: 2.0.0 resolution: "merge-stream@npm:2.0.0" @@ -5726,6 +6063,13 @@ __metadata: languageName: node linkType: hard +"methods@npm:~1.1.2": + version: 1.1.2 + resolution: "methods@npm:1.1.2" + checksum: 0917ff4041fa8e2f2fda5425a955fe16ca411591fbd123c0d722fcf02b73971ed6f764d85f0a6f547ce49ee0221ce2c19a5fa692157931cecb422984f1dcd13a + languageName: node + linkType: hard + "micromark@npm:~2.11.0": version: 2.11.4 resolution: "micromark@npm:2.11.4" @@ -5746,6 +6090,31 @@ __metadata: languageName: node linkType: hard +"mime-db@npm:1.52.0": + version: 1.52.0 + resolution: "mime-db@npm:1.52.0" + checksum: 0d99a03585f8b39d68182803b12ac601d9c01abfa28ec56204fa330bc9f3d1c5e14beb049bafadb3dbdf646dfb94b87e24d4ec7b31b7279ef906a8ea9b6a513f + languageName: node + linkType: hard + +"mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": + version: 2.1.35 + resolution: "mime-types@npm:2.1.35" + dependencies: + mime-db: 1.52.0 + checksum: 89a5b7f1def9f3af5dad6496c5ed50191ae4331cc5389d7c521c8ad28d5fdad2d06fd81baf38fed813dc4e46bb55c8145bb0ff406330818c9cf712fb2e9b3836 + languageName: node + linkType: hard + +"mime@npm:1.6.0": + version: 1.6.0 + resolution: "mime@npm:1.6.0" + bin: + mime: cli.js + checksum: fef25e39263e6d207580bdc629f8872a3f9772c923c7f8c7e793175cee22777bbe8bba95e5d509a40aaa292d8974514ce634ae35769faa45f22d17edda5e8557 + languageName: node + linkType: hard + "mimic-fn@npm:^2.1.0": version: 2.1.0 resolution: "mimic-fn@npm:2.1.0" @@ -5917,7 +6286,14 @@ __metadata: languageName: node linkType: hard -"ms@npm:^2.1.1, ms@npm:^2.1.3": +"ms@npm:2.0.0": + version: 2.0.0 + resolution: "ms@npm:2.0.0" + checksum: 0e6a22b8b746d2e0b65a430519934fefd41b6db0682e3477c10f60c76e947c4c0ad06f63ffdf1d78d335f83edee8c0aa928aa66a36c7cd95b69b26f468d527f4 + languageName: node + linkType: hard + +"ms@npm:2.1.3, ms@npm:^2.1.1, ms@npm:^2.1.3": version: 2.1.3 resolution: "ms@npm:2.1.3" checksum: aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d @@ -5938,7 +6314,7 @@ __metadata: languageName: node linkType: hard -"negotiator@npm:^0.6.3": +"negotiator@npm:0.6.3, negotiator@npm:^0.6.3": version: 0.6.3 resolution: "negotiator@npm:0.6.3" checksum: b8ffeb1e262eff7968fc90a2b6767b04cfd9842582a9d0ece0af7049537266e7b2506dfb1d107a32f06dd849ab2aea834d5830f7f4d0e5cb7d36e1ae55d021d9 @@ -6128,6 +6504,15 @@ __metadata: languageName: node linkType: hard +"on-finished@npm:2.4.1": + version: 2.4.1 + resolution: "on-finished@npm:2.4.1" + dependencies: + ee-first: 1.1.1 + checksum: d20929a25e7f0bb62f937a425b5edeb4e4cde0540d77ba146ec9357f00b0d497cdb3b9b05b9c8e46222407d1548d08166bff69cc56dfa55ba0e4469228920ff0 + languageName: node + linkType: hard + "once@npm:^1.3.0, once@npm:^1.4.0": version: 1.4.0 resolution: "once@npm:1.4.0" @@ -6351,6 +6736,13 @@ __metadata: languageName: node linkType: hard +"parseurl@npm:~1.3.3": + version: 1.3.3 + resolution: "parseurl@npm:1.3.3" + checksum: 407cee8e0a3a4c5cd472559bca8b6a45b82c124e9a4703302326e9ab60fc1081442ada4e02628efef1eb16197ddc7f8822f5a91fd7d7c86b51f530aedb17dfa2 + languageName: node + linkType: hard + "path-exists@npm:^3.0.0": version: 3.0.0 resolution: "path-exists@npm:3.0.0" @@ -6403,6 +6795,13 @@ __metadata: languageName: node linkType: hard +"path-to-regexp@npm:0.1.10": + version: 0.1.10 + resolution: "path-to-regexp@npm:0.1.10" + checksum: ab7a3b7a0b914476d44030340b0a65d69851af2a0f33427df1476100ccb87d409c39e2182837a96b98fb38c4ef2ba6b87bdad62bb70a2c153876b8061760583c + languageName: node + linkType: hard + "path-type@npm:^4.0.0": version: 4.0.0 resolution: "path-type@npm:4.0.0" @@ -6867,6 +7266,16 @@ __metadata: languageName: node linkType: hard +"proxy-addr@npm:~2.0.7": + version: 2.0.7 + resolution: "proxy-addr@npm:2.0.7" + dependencies: + forwarded: 0.2.0 + ipaddr.js: 1.9.1 + checksum: 29c6990ce9364648255454842f06f8c46fcd124d3e6d7c5066df44662de63cdc0bad032e9bf5a3d653ff72141cc7b6019873d685708ac8210c30458ad99f2b74 + languageName: node + linkType: hard + "punycode@npm:^2.1.0": version: 2.3.1 resolution: "punycode@npm:2.3.1" @@ -6881,7 +7290,7 @@ __metadata: languageName: node linkType: hard -"qs@npm:^6.9.4": +"qs@npm:6.13.0, qs@npm:^6.9.4": version: 6.13.0 resolution: "qs@npm:6.13.0" dependencies: @@ -6916,6 +7325,25 @@ __metadata: languageName: node linkType: hard +"range-parser@npm:~1.2.1": + version: 1.2.1 + resolution: "range-parser@npm:1.2.1" + checksum: 0a268d4fea508661cf5743dfe3d5f47ce214fd6b7dec1de0da4d669dd4ef3d2144468ebe4179049eff253d9d27e719c88dae55be64f954e80135a0cada804ec9 + languageName: node + linkType: hard + +"raw-body@npm:2.5.2": + version: 2.5.2 + resolution: "raw-body@npm:2.5.2" + dependencies: + bytes: 3.1.2 + http-errors: 2.0.0 + iconv-lite: 0.4.24 + unpipe: 1.0.0 + checksum: ba1583c8d8a48e8fbb7a873fdbb2df66ea4ff83775421bfe21ee120140949ab048200668c47d9ae3880012f6e217052690628cf679ddfbd82c9fc9358d574676 + languageName: node + linkType: hard + "react-is@npm:^16.13.1, react-is@npm:^16.7.0": version: 16.13.1 resolution: "react-is@npm:16.13.1" @@ -7133,7 +7561,7 @@ __metadata: languageName: node linkType: hard -"safe-buffer@npm:^5.0.1": +"safe-buffer@npm:5.2.1, safe-buffer@npm:^5.0.1": version: 5.2.1 resolution: "safe-buffer@npm:5.2.1" checksum: b99c4b41fdd67a6aaf280fcd05e9ffb0813654894223afb78a31f14a19ad220bba8aba1cb14eddce1fcfb037155fe6de4e861784eb434f7d11ed58d1e70dd491 @@ -7151,7 +7579,7 @@ __metadata: languageName: node linkType: hard -"safer-buffer@npm:>= 2.1.2 < 3.0.0": +"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0": version: 2.1.2 resolution: "safer-buffer@npm:2.1.2" checksum: cab8f25ae6f1434abee8d80023d7e72b598cf1327164ddab31003c51215526801e40b66c5e65d658a0af1e9d6478cadcb4c745f4bd6751f97d8644786c0978b0 @@ -7176,6 +7604,27 @@ __metadata: languageName: node linkType: hard +"send@npm:0.19.0": + version: 0.19.0 + resolution: "send@npm:0.19.0" + dependencies: + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + encodeurl: ~1.0.2 + escape-html: ~1.0.3 + etag: ~1.8.1 + fresh: 0.5.2 + http-errors: 2.0.0 + mime: 1.6.0 + ms: 2.1.3 + on-finished: 2.4.1 + range-parser: ~1.2.1 + statuses: 2.0.1 + checksum: 5ae11bd900c1c2575525e2aa622e856804e2f96a09281ec1e39610d089f53aa69e13fd8db84b52f001d0318cf4bb0b3b904ad532fc4c0014eb90d32db0cff55f + languageName: node + linkType: hard + "sequelize-pool@npm:^7.1.0": version: 7.1.0 resolution: "sequelize-pool@npm:7.1.0" @@ -7183,6 +7632,18 @@ __metadata: languageName: node linkType: hard +"serve-static@npm:1.16.2": + version: 1.16.2 + resolution: "serve-static@npm:1.16.2" + dependencies: + encodeurl: ~2.0.0 + escape-html: ~1.0.3 + parseurl: ~1.3.3 + send: 0.19.0 + checksum: dffc52feb4cc5c68e66d0c7f3c1824d4e989f71050aefc9bd5f822a42c54c9b814f595fc5f2b717f4c7cc05396145f3e90422af31186a93f76cf15f707019759 + languageName: node + linkType: hard + "set-function-length@npm:^1.2.1": version: 1.2.2 resolution: "set-function-length@npm:1.2.2" @@ -7209,6 +7670,13 @@ __metadata: languageName: node linkType: hard +"setprototypeof@npm:1.2.0": + version: 1.2.0 + resolution: "setprototypeof@npm:1.2.0" + checksum: be18cbbf70e7d8097c97f713a2e76edf84e87299b40d085c6bf8b65314e994cc15e2e317727342fa6996e38e1f52c59720b53fe621e2eb593a6847bf0356db89 + languageName: node + linkType: hard + "shebang-command@npm:^2.0.0": version: 2.0.0 resolution: "shebang-command@npm:2.0.0" @@ -7397,6 +7865,13 @@ __metadata: languageName: node linkType: hard +"statuses@npm:2.0.1": + version: 2.0.1 + resolution: "statuses@npm:2.0.1" + checksum: 18c7623fdb8f646fb213ca4051be4df7efb3484d4ab662937ca6fbef7ced9b9e12842709872eb3020cc3504b93bde88935c9f6417489627a7786f24f8031cbcb + languageName: node + linkType: hard + "strict-uri-encode@npm:^2.0.0": version: 2.0.0 resolution: "strict-uri-encode@npm:2.0.0" @@ -7684,6 +8159,13 @@ __metadata: languageName: node linkType: hard +"toidentifier@npm:1.0.1": + version: 1.0.1 + resolution: "toidentifier@npm:1.0.1" + checksum: 952c29e2a85d7123239b5cfdd889a0dde47ab0497f0913d70588f19c53f7e0b5327c95f4651e413c74b785147f9637b17410ac8c846d5d4a20a5a33eb6dc3a45 + languageName: node + linkType: hard + "toposort-class@npm:^1.0.1": version: 1.0.1 resolution: "toposort-class@npm:1.0.1" @@ -7870,6 +8352,16 @@ __metadata: languageName: node linkType: hard +"type-is@npm:~1.6.18": + version: 1.6.18 + resolution: "type-is@npm:1.6.18" + dependencies: + media-typer: 0.3.0 + mime-types: ~2.1.24 + checksum: 2c8e47675d55f8b4e404bcf529abdf5036c537a04c2b20177bcf78c9e3c1da69da3942b1346e6edb09e823228c0ee656ef0e033765ec39a70d496ef601a0c657 + languageName: node + linkType: hard + "typed-array-buffer@npm:^1.0.2": version: 1.0.2 resolution: "typed-array-buffer@npm:1.0.2" @@ -8122,6 +8614,13 @@ __metadata: languageName: node linkType: hard +"unpipe@npm:1.0.0, unpipe@npm:~1.0.0": + version: 1.0.0 + resolution: "unpipe@npm:1.0.0" + checksum: 4fa18d8d8d977c55cb09715385c203197105e10a6d220087ec819f50cb68870f02942244f1017565484237f1f8c5d3cd413631b1ae104d3096f24fdfde1b4aa2 + languageName: node + linkType: hard + "update-browserslist-db@npm:^1.1.0": version: 1.1.0 resolution: "update-browserslist-db@npm:1.1.0" @@ -8145,6 +8644,13 @@ __metadata: languageName: node linkType: hard +"utils-merge@npm:1.0.1": + version: 1.0.1 + resolution: "utils-merge@npm:1.0.1" + checksum: c81095493225ecfc28add49c106ca4f09cdf56bc66731aa8dabc2edbbccb1e1bfe2de6a115e5c6a380d3ea166d1636410b62ef216bb07b3feb1cfde1d95d5080 + languageName: node + linkType: hard + "uuid@npm:^8.3.2": version: 8.3.2 resolution: "uuid@npm:8.3.2" @@ -8179,6 +8685,13 @@ __metadata: languageName: node linkType: hard +"vary@npm:~1.1.2": + version: 1.1.2 + resolution: "vary@npm:1.1.2" + checksum: ae0123222c6df65b437669d63dfa8c36cee20a504101b2fcd97b8bf76f91259c17f9f2b4d70a1e3c6bbcee7f51b28392833adb6b2770b23b01abec84e369660b + languageName: node + linkType: hard + "vfile-message@npm:^2.0.0": version: 2.0.4 resolution: "vfile-message@npm:2.0.4" From 29300f7d49d6c29e88073d41475ab569a045f69d Mon Sep 17 00:00:00 2001 From: Tate Date: Thu, 10 Oct 2024 01:53:15 +0000 Subject: [PATCH 7/7] change log --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78286ab..9204499 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Support subqery _metadata query(#4) - GraphiQL control flag - `playground` +- Health check API `/.well-known/apollo/server-health` ### Fixed - Bigint query type not match