@subql/common-stellar 2.2.1-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +674 -0
  3. package/dist/.tsbuildinfo +1 -0
  4. package/dist/index.d.ts +1 -0
  5. package/dist/index.js +20 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/project/index.d.ts +5 -0
  8. package/dist/project/index.js +24 -0
  9. package/dist/project/index.js.map +1 -0
  10. package/dist/project/load.d.ts +3 -0
  11. package/dist/project/load.js +40 -0
  12. package/dist/project/load.js.map +1 -0
  13. package/dist/project/models.d.ts +46 -0
  14. package/dist/project/models.js +183 -0
  15. package/dist/project/models.js.map +1 -0
  16. package/dist/project/project.spec.d.ts +1 -0
  17. package/dist/project/project.spec.js +71 -0
  18. package/dist/project/project.spec.js.map +1 -0
  19. package/dist/project/types.d.ts +8 -0
  20. package/dist/project/types.js +10 -0
  21. package/dist/project/types.js.map +1 -0
  22. package/dist/project/utils.d.ts +4 -0
  23. package/dist/project/utils.js +19 -0
  24. package/dist/project/utils.js.map +1 -0
  25. package/dist/project/versioned/ProjectManifestVersioned.d.ts +26 -0
  26. package/dist/project/versioned/ProjectManifestVersioned.js +55 -0
  27. package/dist/project/versioned/ProjectManifestVersioned.js.map +1 -0
  28. package/dist/project/versioned/index.d.ts +2 -0
  29. package/dist/project/versioned/index.js +21 -0
  30. package/dist/project/versioned/index.js.map +1 -0
  31. package/dist/project/versioned/v1_0_0/index.d.ts +2 -0
  32. package/dist/project/versioned/v1_0_0/index.js +21 -0
  33. package/dist/project/versioned/v1_0_0/index.js.map +1 -0
  34. package/dist/project/versioned/v1_0_0/model.d.ts +56 -0
  35. package/dist/project/versioned/v1_0_0/model.js +226 -0
  36. package/dist/project/versioned/v1_0_0/model.js.map +1 -0
  37. package/dist/project/versioned/v1_0_0/types.d.ts +7 -0
  38. package/dist/project/versioned/v1_0_0/types.js +5 -0
  39. package/dist/project/versioned/v1_0_0/types.js.map +1 -0
  40. package/package.json +31 -0
  41. package/src/index.ts +4 -0
  42. package/src/project/index.ts +8 -0
  43. package/src/project/load.ts +33 -0
  44. package/src/project/models.ts +135 -0
  45. package/src/project/project.spec.ts +83 -0
  46. package/src/project/types.ts +28 -0
  47. package/src/project/utils.ts +25 -0
  48. package/src/project/versioned/ProjectManifestVersioned.ts +71 -0
  49. package/src/project/versioned/index.ts +5 -0
  50. package/src/project/versioned/v1_0_0/index.ts +5 -0
  51. package/src/project/versioned/v1_0_0/model.ts +202 -0
  52. package/src/project/versioned/v1_0_0/types.ts +13 -0
  53. package/test/project_1.0.0.yaml +34 -0
  54. package/tsconfig.json +11 -0
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ // Copyright 2020-2023 SubQuery Pte Ltd authors & contributors
3
+ // SPDX-License-Identifier: GPL-3.0
4
+ var __importDefault = (this && this.__importDefault) || function (mod) {
5
+ return (mod && mod.__esModule) ? mod : { "default": mod };
6
+ };
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ const path_1 = __importDefault(require("path"));
9
+ const common_1 = require("@subql/common");
10
+ const class_validator_1 = require("class-validator");
11
+ const v1_0_0_1 = require("../project/versioned/v1_0_0");
12
+ const load_1 = require("./load");
13
+ const projectsDir = path_1.default.join(__dirname, '../../test');
14
+ describe('project.yaml', () => {
15
+ it('can validate project.yaml', () => {
16
+ expect(() => (0, load_1.loadStellarProjectManifest)(path_1.default.join(projectsDir, 'project_falsy.yaml'))).toThrow();
17
+ expect(() => (0, load_1.loadStellarProjectManifest)(path_1.default.join(projectsDir, 'project_falsy_array.yaml'))).toThrow();
18
+ });
19
+ it('can fail validation if version not supported', () => {
20
+ expect(() => (0, load_1.loadStellarProjectManifest)(path_1.default.join(projectsDir, 'project_invalid_version.yaml'))).toThrow();
21
+ });
22
+ it('can validate a v1.0.0 project.yaml with templates', () => {
23
+ expect(() => (0, load_1.loadStellarProjectManifest)(path_1.default.join(projectsDir, 'project_1.0.0.yaml'))).not.toThrow();
24
+ });
25
+ it('get v1.0.0 deployment mapping filter', () => {
26
+ const manifestVersioned = (0, load_1.loadStellarProjectManifest)(path_1.default.join(projectsDir, 'project_1.0.0.yaml'));
27
+ const deployment = manifestVersioned.asV1_0_0.deployment;
28
+ const filter = deployment.dataSources[0].mapping.handlers[0].filter;
29
+ const deploymentString = manifestVersioned.toDeployment();
30
+ expect(filter).not.toBeNull();
31
+ expect(deploymentString).toContain('COUNTER');
32
+ });
33
+ it('can convert genesis hash in v1.0.0 to chainId in deployment', () => {
34
+ const deployment = (0, load_1.loadStellarProjectManifest)(path_1.default.join(projectsDir, 'project_1.0.0.yaml')).asV1_0_0.deployment;
35
+ expect(deployment.network.chainId).not.toBeNull();
36
+ console.log(deployment.network.chainId);
37
+ });
38
+ it.skip('can get chainId for deployment', () => {
39
+ const deployment = (0, load_1.loadStellarProjectManifest)(path_1.default.join(projectsDir, 'project_1.0.0_chainId.yaml')).asV1_0_0
40
+ .deployment;
41
+ expect(deployment.network.chainId).toBe('moonbeamChainId');
42
+ });
43
+ it('can validate deployment runner versions', () => {
44
+ const deployment = new v1_0_0_1.DeploymentV1_0_0();
45
+ const nodeImp = new v1_0_0_1.StellarRunnerNodeImpl();
46
+ const queryImp = new common_1.RunnerQueryBaseModel();
47
+ deployment.specVersion = '1.0.0';
48
+ deployment.runner = new v1_0_0_1.StellarRunnerSpecsImpl();
49
+ nodeImp.name = '@subql/node-stellar';
50
+ nodeImp.version = '0.29.1';
51
+ deployment.runner.node = nodeImp;
52
+ queryImp.name = '@subql/query';
53
+ queryImp.version = '0.213.1';
54
+ deployment.runner.query = queryImp;
55
+ (0, class_validator_1.validateSync)(deployment.runner, { whitelist: true, forbidNonWhitelisted: true });
56
+ });
57
+ it('can validate a v1.0.0 project.yaml with unsupported runner node', () => {
58
+ expect(() => (0, load_1.loadStellarProjectManifest)(path_1.default.join(projectsDir, 'project_1.0.0_bad_runner.yaml'))).toThrow();
59
+ });
60
+ //TODO, pre-release should be excluded
61
+ it.skip('can throw error with unsupported runner version', () => {
62
+ expect(() => (0, load_1.loadStellarProjectManifest)(path_1.default.join(projectsDir, 'project_1.0.0_bad_runner_version.yaml'))).toThrow();
63
+ });
64
+ it('can validate a v1.0.0 project.yaml runner and datasource mismatches', () => {
65
+ expect(() => (0, load_1.loadStellarProjectManifest)(path_1.default.join(projectsDir, 'project_1.0.0_runner_ds_mismatch.yaml'))).toThrow();
66
+ });
67
+ it('can fail validation if custom ds missing processor', () => {
68
+ expect(() => (0, load_1.loadStellarProjectManifest)(path_1.default.join(projectsDir, 'project_0.2.0_invalid_custom_ds.yaml'))).toThrow();
69
+ });
70
+ });
71
+ //# sourceMappingURL=project.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.spec.js","sourceRoot":"","sources":["../../src/project/project.spec.ts"],"names":[],"mappings":";AAAA,8DAA8D;AAC9D,mCAAmC;;;;;AAEnC,gDAAwB;AACxB,0CAAmD;AACnD,qDAA6C;AAC7C,wDAA4G;AAC5G,iCAAkD;AAElD,MAAM,WAAW,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAEvD,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,2BAA2B,EAAE,GAAG,EAAE;QACnC,MAAM,CAAC,GAAG,EAAE,CAAC,IAAA,iCAA0B,EAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;QACjG,MAAM,CAAC,GAAG,EAAE,CAAC,IAAA,iCAA0B,EAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,0BAA0B,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IACzG,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACtD,MAAM,CAAC,GAAG,EAAE,CAAC,IAAA,iCAA0B,EA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C,CAAC,CAAC,OAAO,EAAE,CAAC;IAC9G,CAAC,CAAC,CAAC;IAEH,sCAAsC;IACtC,EAAE,CAAC,IAAI,CAAC,iDAAiD,EAAE,GAAG,EAAE;QAC9D,MAAM,CAAC,GAAG,EAAE,CAAC,IAAA,iCAA0B,EAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,uCAAuC,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IACtH,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qEAAqE,EAAE,GAAG,EAAE;QAC7E,MAAM,CAAC,GAAG,EAAE,CAAC,IAAA,iCAA0B,EAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,uCAAuC,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IACtH,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE;QAC5D,MAAM,CAAC,GAAG,EAAE,CAAC,IAAA,iCAA0B,EAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,sCAAsC,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IACrH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// Copyright 2020-2023 SubQuery Pte Ltd authors & contributors\n// SPDX-License-Identifier: GPL-3.0\n\nimport path from 'path';\nimport {RunnerQueryBaseModel} from '@subql/common';\nimport {validateSync} from 'class-validator';\nimport {DeploymentV1_0_0, StellarRunnerNodeImpl, StellarRunnerSpecsImpl} from '../project/versioned/v1_0_0';\nimport {loadStellarProjectManifest} from './load';\n\nconst projectsDir = path.join(__dirname, '../../test');\n\ndescribe('project.yaml', () => {\n it('can validate project.yaml', () => {\n expect(() => loadStellarProjectManifest(path.join(projectsDir, 'project_falsy.yaml'))).toThrow();\n expect(() => loadStellarProjectManifest(path.join(projectsDir, 'project_falsy_array.yaml'))).toThrow();\n });\n\n it('can fail validation if version not supported', () => {\n expect(() => loadStellarProjectManifest(path.join(projectsDir, 'project_invalid_version.yaml'))).toThrow();\n });\n\n it('can validate a v1.0.0 project.yaml with templates', () => {\n expect(() => loadStellarProjectManifest(path.join(projectsDir, 'project_1.0.0.yaml'))).not.toThrow();\n });\n\n it('get v1.0.0 deployment mapping filter', () => {\n const manifestVersioned = loadStellarProjectManifest(path.join(projectsDir, 'project_1.0.0.yaml'));\n\n const deployment = manifestVersioned.asV1_0_0.deployment;\n const filter = deployment.dataSources[0].mapping.handlers[0].filter;\n const deploymentString = manifestVersioned.toDeployment();\n expect(filter).not.toBeNull();\n expect(deploymentString).toContain('COUNTER');\n });\n\n it('can convert genesis hash in v1.0.0 to chainId in deployment', () => {\n const deployment = loadStellarProjectManifest(path.join(projectsDir, 'project_1.0.0.yaml')).asV1_0_0.deployment;\n expect(deployment.network.chainId).not.toBeNull();\n console.log(deployment.network.chainId);\n });\n\n it.skip('can get chainId for deployment', () => {\n const deployment = loadStellarProjectManifest(path.join(projectsDir, 'project_1.0.0_chainId.yaml')).asV1_0_0\n .deployment;\n expect(deployment.network.chainId).toBe('moonbeamChainId');\n });\n\n it('can validate deployment runner versions', () => {\n const deployment = new DeploymentV1_0_0();\n const nodeImp = new StellarRunnerNodeImpl();\n const queryImp = new RunnerQueryBaseModel();\n deployment.specVersion = '1.0.0';\n deployment.runner = new StellarRunnerSpecsImpl();\n\n nodeImp.name = '@subql/node-stellar';\n nodeImp.version = '0.29.1';\n deployment.runner.node = nodeImp;\n\n queryImp.name = '@subql/query';\n queryImp.version = '0.213.1';\n\n deployment.runner.query = queryImp;\n\n validateSync(deployment.runner, {whitelist: true, forbidNonWhitelisted: true});\n });\n\n it('can validate a v1.0.0 project.yaml with unsupported runner node', () => {\n expect(() => loadStellarProjectManifest(path.join(projectsDir, 'project_1.0.0_bad_runner.yaml'))).toThrow();\n });\n\n //TODO, pre-release should be excluded\n it.skip('can throw error with unsupported runner version', () => {\n expect(() => loadStellarProjectManifest(path.join(projectsDir, 'project_1.0.0_bad_runner_version.yaml'))).toThrow();\n });\n\n it('can validate a v1.0.0 project.yaml runner and datasource mismatches', () => {\n expect(() => loadStellarProjectManifest(path.join(projectsDir, 'project_1.0.0_runner_ds_mismatch.yaml'))).toThrow();\n });\n\n it('can fail validation if custom ds missing processor', () => {\n expect(() => loadStellarProjectManifest(path.join(projectsDir, 'project_0.2.0_invalid_custom_ds.yaml'))).toThrow();\n });\n});\n"]}
@@ -0,0 +1,8 @@
1
+ import { IProjectManifest, ProjectNetworkConfig } from '@subql/common';
2
+ import { SubqlDatasource } from '@subql/types-stellar';
3
+ export { SubqlStellarProcessorOptions, SubqlRuntimeHandler, SubqlCustomHandler, SubqlHandler, StellarHandlerKind, SubqlDatasource as SubqlStellarDataSource, SubqlCustomDatasource as SubqlStellarCustomDataSource, StellarEventFilter, SubqlDatasourceProcessor, SubqlHandlerFilter, StellarDatasourceKind, StellarRuntimeHandlerInputMap as StellarRuntimeHandlerInputMap, } from '@subql/types-stellar';
4
+ export type IStellarProjectManifest = IProjectManifest<SubqlDatasource>;
5
+ export interface StellarProjectNetworkConfig extends ProjectNetworkConfig {
6
+ genesisHash?: string;
7
+ chainId?: string;
8
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ // Copyright 2020-2023 SubQuery Pte Ltd authors & contributors
3
+ // SPDX-License-Identifier: GPL-3.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.StellarDatasourceKind = exports.StellarHandlerKind = void 0;
6
+ // All of these used to be redefined in this file, re-exporting for simplicity
7
+ var types_stellar_1 = require("@subql/types-stellar");
8
+ Object.defineProperty(exports, "StellarHandlerKind", { enumerable: true, get: function () { return types_stellar_1.StellarHandlerKind; } });
9
+ Object.defineProperty(exports, "StellarDatasourceKind", { enumerable: true, get: function () { return types_stellar_1.StellarDatasourceKind; } });
10
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/project/types.ts"],"names":[],"mappings":";AAAA,8DAA8D;AAC9D,mCAAmC;;;AAKnC,8EAA8E;AAC9E,sDAa8B;AAR5B,mHAAA,kBAAkB,OAAA;AAMlB,sHAAA,qBAAqB,OAAA","sourcesContent":["// Copyright 2020-2023 SubQuery Pte Ltd authors & contributors\n// SPDX-License-Identifier: GPL-3.0\n\nimport {IProjectManifest, ProjectNetworkConfig} from '@subql/common';\nimport {SubqlDatasource} from '@subql/types-stellar';\n\n// All of these used to be redefined in this file, re-exporting for simplicity\nexport {\n SubqlStellarProcessorOptions,\n SubqlRuntimeHandler,\n SubqlCustomHandler,\n SubqlHandler,\n StellarHandlerKind,\n SubqlDatasource as SubqlStellarDataSource,\n SubqlCustomDatasource as SubqlStellarCustomDataSource,\n StellarEventFilter,\n SubqlDatasourceProcessor,\n SubqlHandlerFilter,\n StellarDatasourceKind,\n StellarRuntimeHandlerInputMap as StellarRuntimeHandlerInputMap,\n} from '@subql/types-stellar';\n\nexport type IStellarProjectManifest = IProjectManifest<SubqlDatasource>;\n\nexport interface StellarProjectNetworkConfig extends ProjectNetworkConfig {\n genesisHash?: string;\n chainId?: string;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import { SecondLayerHandlerProcessor, SubqlCustomDatasource, SubqlDatasource, StellarHandlerKind, SubqlRuntimeDatasource } from '@subql/types-stellar';
2
+ export declare function isEventHandlerProcessor<E>(hp: SecondLayerHandlerProcessor<StellarHandlerKind, unknown, unknown>): hp is SecondLayerHandlerProcessor<StellarHandlerKind.Event, unknown, E>;
3
+ export declare function isCustomDs(ds: SubqlDatasource): ds is SubqlCustomDatasource<string>;
4
+ export declare function isRuntimeDs(ds: SubqlDatasource): ds is SubqlRuntimeDatasource;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ // Copyright 2020-2023 SubQuery Pte Ltd authors & contributors
3
+ // SPDX-License-Identifier: GPL-3.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.isRuntimeDs = exports.isCustomDs = exports.isEventHandlerProcessor = void 0;
6
+ const types_stellar_1 = require("@subql/types-stellar");
7
+ function isEventHandlerProcessor(hp) {
8
+ return hp.baseHandlerKind === types_stellar_1.StellarHandlerKind.Event;
9
+ }
10
+ exports.isEventHandlerProcessor = isEventHandlerProcessor;
11
+ function isCustomDs(ds) {
12
+ return ds.kind !== types_stellar_1.StellarDatasourceKind.Runtime && !!ds.processor;
13
+ }
14
+ exports.isCustomDs = isCustomDs;
15
+ function isRuntimeDs(ds) {
16
+ return ds.kind === types_stellar_1.StellarDatasourceKind.Runtime;
17
+ }
18
+ exports.isRuntimeDs = isRuntimeDs;
19
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/project/utils.ts"],"names":[],"mappings":";AAAA,8DAA8D;AAC9D,mCAAmC;;;AAEnC,wDAO8B;AAE9B,SAAgB,uBAAuB,CACrC,EAAqE;IAErE,OAAO,EAAE,CAAC,eAAe,KAAK,kCAAkB,CAAC,KAAK,CAAC;AACzD,CAAC;AAJD,0DAIC;AAED,SAAgB,UAAU,CAAC,EAAmB;IAC5C,OAAO,EAAE,CAAC,IAAI,KAAK,qCAAqB,CAAC,OAAO,IAAI,CAAC,CAAE,EAAoC,CAAC,SAAS,CAAC;AACxG,CAAC;AAFD,gCAEC;AAED,SAAgB,WAAW,CAAC,EAAmB;IAC7C,OAAO,EAAE,CAAC,IAAI,KAAK,qCAAqB,CAAC,OAAO,CAAC;AACnD,CAAC;AAFD,kCAEC","sourcesContent":["// Copyright 2020-2023 SubQuery Pte Ltd authors & contributors\n// SPDX-License-Identifier: GPL-3.0\n\nimport {\n SecondLayerHandlerProcessor,\n SubqlCustomDatasource,\n SubqlDatasource,\n StellarDatasourceKind,\n StellarHandlerKind,\n SubqlRuntimeDatasource,\n} from '@subql/types-stellar';\n\nexport function isEventHandlerProcessor<E>(\n hp: SecondLayerHandlerProcessor<StellarHandlerKind, unknown, unknown>\n): hp is SecondLayerHandlerProcessor<StellarHandlerKind.Event, unknown, E> {\n return hp.baseHandlerKind === StellarHandlerKind.Event;\n}\n\nexport function isCustomDs(ds: SubqlDatasource): ds is SubqlCustomDatasource<string> {\n return ds.kind !== StellarDatasourceKind.Runtime && !!(ds as SubqlCustomDatasource<string>).processor;\n}\n\nexport function isRuntimeDs(ds: SubqlDatasource): ds is SubqlRuntimeDatasource {\n return ds.kind === StellarDatasourceKind.Runtime;\n}\n"]}
@@ -0,0 +1,26 @@
1
+ import { IStellarProjectManifest, SubqlStellarDataSource } from '../types';
2
+ import { ProjectManifestV1_0_0Impl } from './v1_0_0';
3
+ export type VersionedProjectManifest = {
4
+ specVersion: string;
5
+ };
6
+ declare const SOROBAN_SUPPORTED_VERSIONS: {
7
+ '1.0.0': typeof ProjectManifestV1_0_0Impl;
8
+ };
9
+ type Versions = keyof typeof SOROBAN_SUPPORTED_VERSIONS;
10
+ type ProjectManifestImpls = InstanceType<(typeof SOROBAN_SUPPORTED_VERSIONS)[Versions]>;
11
+ export declare function manifestIsV1_0_0(manifest: IStellarProjectManifest): manifest is ProjectManifestV1_0_0Impl;
12
+ export declare class StellarProjectManifestVersioned implements IStellarProjectManifest {
13
+ private _impl;
14
+ constructor(projectManifest: VersionedProjectManifest);
15
+ get asImpl(): ProjectManifestImpls;
16
+ get isV1_0_0(): boolean;
17
+ get asV1_0_0(): ProjectManifestV1_0_0Impl;
18
+ toDeployment(): string | undefined;
19
+ validate(): void;
20
+ get dataSources(): SubqlStellarDataSource[];
21
+ get schema(): string;
22
+ get specVersion(): string;
23
+ get description(): string;
24
+ get repository(): string;
25
+ }
26
+ export {};
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ // Copyright 2020-2023 SubQuery Pte Ltd authors & contributors
3
+ // SPDX-License-Identifier: GPL-3.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.StellarProjectManifestVersioned = exports.manifestIsV1_0_0 = void 0;
6
+ const class_transformer_1 = require("class-transformer");
7
+ const v1_0_0_1 = require("./v1_0_0");
8
+ const SOROBAN_SUPPORTED_VERSIONS = {
9
+ '1.0.0': v1_0_0_1.ProjectManifestV1_0_0Impl,
10
+ };
11
+ function manifestIsV1_0_0(manifest) {
12
+ return manifest.specVersion === '1.0.0';
13
+ }
14
+ exports.manifestIsV1_0_0 = manifestIsV1_0_0;
15
+ class StellarProjectManifestVersioned {
16
+ constructor(projectManifest) {
17
+ const klass = SOROBAN_SUPPORTED_VERSIONS[projectManifest.specVersion];
18
+ if (!klass) {
19
+ throw new Error('specVersion not supported for project manifest file');
20
+ }
21
+ this._impl = (0, class_transformer_1.plainToClass)(klass, projectManifest);
22
+ }
23
+ get asImpl() {
24
+ return this._impl;
25
+ }
26
+ get isV1_0_0() {
27
+ return this.specVersion === '1.0.0';
28
+ }
29
+ get asV1_0_0() {
30
+ return this._impl;
31
+ }
32
+ toDeployment() {
33
+ return this._impl.toDeployment();
34
+ }
35
+ validate() {
36
+ return this._impl.validate();
37
+ }
38
+ get dataSources() {
39
+ return this._impl.dataSources;
40
+ }
41
+ get schema() {
42
+ return this._impl.schema.file;
43
+ }
44
+ get specVersion() {
45
+ return this._impl.specVersion;
46
+ }
47
+ get description() {
48
+ return this._impl.description;
49
+ }
50
+ get repository() {
51
+ return this._impl.repository;
52
+ }
53
+ }
54
+ exports.StellarProjectManifestVersioned = StellarProjectManifestVersioned;
55
+ //# sourceMappingURL=ProjectManifestVersioned.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProjectManifestVersioned.js","sourceRoot":"","sources":["../../../src/project/versioned/ProjectManifestVersioned.ts"],"names":[],"mappings":";AAAA,8DAA8D;AAC9D,mCAAmC;;;AAEnC,yDAA+C;AAE/C,qCAAmD;AAGnD,MAAM,0BAA0B,GAAG;IACjC,OAAO,EAAE,kCAAyB;CACnC,CAAC;AAMF,SAAgB,gBAAgB,CAAC,QAAiC;IAChE,OAAO,QAAQ,CAAC,WAAW,KAAK,OAAO,CAAC;AAC1C,CAAC;AAFD,4CAEC;AAED,MAAa,+BAA+B;IAG1C,YAAY,eAAyC;QACnD,MAAM,KAAK,GAAG,0BAA0B,CAAC,eAAe,CAAC,WAAuB,CAAC,CAAC;QAClF,IAAI,CAAC,KAAK,EAAE;YACV,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;SACxE;QACD,IAAI,CAAC,KAAK,GAAG,IAAA,gCAAY,EAAiD,KAAK,EAAE,eAAe,CAAC,CAAC;IACpG,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,WAAW,KAAK,OAAO,CAAC;IACtC,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,KAAkC,CAAC;IACjD,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;IACnC,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC/B,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;IAChC,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;IAChC,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;IAChC,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;IAChC,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;IAC/B,CAAC;CACF;AAlDD,0EAkDC","sourcesContent":["// Copyright 2020-2023 SubQuery Pte Ltd authors & contributors\n// SPDX-License-Identifier: GPL-3.0\n\nimport {plainToClass} from 'class-transformer';\nimport {IStellarProjectManifest, SubqlStellarDataSource} from '../types';\nimport {ProjectManifestV1_0_0Impl} from './v1_0_0';\nexport type VersionedProjectManifest = {specVersion: string};\n\nconst SOROBAN_SUPPORTED_VERSIONS = {\n '1.0.0': ProjectManifestV1_0_0Impl,\n};\n\ntype Versions = keyof typeof SOROBAN_SUPPORTED_VERSIONS;\n\ntype ProjectManifestImpls = InstanceType<(typeof SOROBAN_SUPPORTED_VERSIONS)[Versions]>;\n\nexport function manifestIsV1_0_0(manifest: IStellarProjectManifest): manifest is ProjectManifestV1_0_0Impl {\n return manifest.specVersion === '1.0.0';\n}\n\nexport class StellarProjectManifestVersioned implements IStellarProjectManifest {\n private _impl: ProjectManifestImpls;\n\n constructor(projectManifest: VersionedProjectManifest) {\n const klass = SOROBAN_SUPPORTED_VERSIONS[projectManifest.specVersion as Versions];\n if (!klass) {\n throw new Error('specVersion not supported for project manifest file');\n }\n this._impl = plainToClass<ProjectManifestImpls, VersionedProjectManifest>(klass, projectManifest);\n }\n\n get asImpl(): ProjectManifestImpls {\n return this._impl;\n }\n\n get isV1_0_0(): boolean {\n return this.specVersion === '1.0.0';\n }\n\n get asV1_0_0(): ProjectManifestV1_0_0Impl {\n return this._impl as ProjectManifestV1_0_0Impl;\n }\n\n toDeployment(): string | undefined {\n return this._impl.toDeployment();\n }\n\n validate(): void {\n return this._impl.validate();\n }\n\n get dataSources(): SubqlStellarDataSource[] {\n return this._impl.dataSources;\n }\n\n get schema(): string {\n return this._impl.schema.file;\n }\n\n get specVersion(): string {\n return this._impl.specVersion;\n }\n\n get description(): string {\n return this._impl.description;\n }\n\n get repository(): string {\n return this._impl.repository;\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './ProjectManifestVersioned';
2
+ export * from './v1_0_0';
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // Copyright 2020-2023 SubQuery Pte Ltd authors & contributors
3
+ // SPDX-License-Identifier: GPL-3.0
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ __exportStar(require("./ProjectManifestVersioned"), exports);
20
+ __exportStar(require("./v1_0_0"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/project/versioned/index.ts"],"names":[],"mappings":";AAAA,8DAA8D;AAC9D,mCAAmC;;;;;;;;;;;;;;;;AAEnC,6DAA2C;AAC3C,2CAAyB","sourcesContent":["// Copyright 2020-2023 SubQuery Pte Ltd authors & contributors\n// SPDX-License-Identifier: GPL-3.0\n\nexport * from './ProjectManifestVersioned';\nexport * from './v1_0_0';\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './model';
2
+ export * from './types';
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // Copyright 2020-2023 SubQuery Pte Ltd authors & contributors
3
+ // SPDX-License-Identifier: GPL-3.0
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ __exportStar(require("./model"), exports);
20
+ __exportStar(require("./types"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/project/versioned/v1_0_0/index.ts"],"names":[],"mappings":";AAAA,8DAA8D;AAC9D,mCAAmC;;;;;;;;;;;;;;;;AAEnC,0CAAwB;AACxB,0CAAwB","sourcesContent":["// Copyright 2020-2023 SubQuery Pte Ltd authors & contributors\n// SPDX-License-Identifier: GPL-3.0\n\nexport * from './model';\nexport * from './types';\n"]}
@@ -0,0 +1,56 @@
1
+ import { BaseMapping, FileType, NodeSpec, ProjectManifestBaseImpl, QuerySpec, RunnerNodeImpl, RunnerSpecs } from '@subql/common';
2
+ import { SubqlCustomDatasource, SubqlMapping, SubqlRuntimeDatasource } from '@subql/types-stellar';
3
+ import { CustomDataSourceBase, StellarMapping, RuntimeDataSourceBase } from '../../models';
4
+ import { SubqlStellarDataSource, SubqlRuntimeHandler } from '../../types';
5
+ import { CustomDatasourceTemplate, StellarProjectManifestV1_0_0, RuntimeDatasourceTemplate } from './types';
6
+ export declare class StellarProjectMapping extends StellarMapping {
7
+ file: string;
8
+ }
9
+ export declare class StellarRunnerNodeImpl extends RunnerNodeImpl {
10
+ name: string;
11
+ }
12
+ export declare class StellarRuntimeDataSourceImpl extends RuntimeDataSourceBase<SubqlMapping<SubqlRuntimeHandler>> implements SubqlRuntimeDatasource {
13
+ validate(): void;
14
+ }
15
+ export declare class StellarCustomDataSourceImpl<K extends string = string, M extends BaseMapping<any, any> = BaseMapping<Record<string, unknown>, any>> extends CustomDataSourceBase<K, M> implements SubqlCustomDatasource<K, M> {
16
+ validate(): void;
17
+ }
18
+ export declare class RuntimeDatasourceTemplateImpl extends StellarRuntimeDataSourceImpl implements RuntimeDatasourceTemplate {
19
+ name: string;
20
+ }
21
+ export declare class CustomDatasourceTemplateImpl extends StellarCustomDataSourceImpl implements CustomDatasourceTemplate {
22
+ name: string;
23
+ }
24
+ export declare class StellarRunnerSpecsImpl implements RunnerSpecs {
25
+ node: NodeSpec;
26
+ query: QuerySpec;
27
+ }
28
+ export declare class ProjectNetworkDeploymentV1_0_0 {
29
+ chainId: string;
30
+ chaintypes?: FileType;
31
+ bypassBlocks?: (number | string)[];
32
+ }
33
+ export declare class ProjectNetworkV1_0_0 extends ProjectNetworkDeploymentV1_0_0 {
34
+ endpoint?: string | string[];
35
+ dictionary?: string;
36
+ }
37
+ export declare class DeploymentV1_0_0 {
38
+ network: ProjectNetworkDeploymentV1_0_0;
39
+ specVersion: string;
40
+ runner: RunnerSpecs;
41
+ schema: FileType;
42
+ dataSources: (SubqlRuntimeDatasource | SubqlCustomDatasource)[];
43
+ templates?: (RuntimeDatasourceTemplate | CustomDatasourceTemplate)[];
44
+ }
45
+ export declare class ProjectManifestV1_0_0Impl<D extends object = DeploymentV1_0_0> extends ProjectManifestBaseImpl<D> implements StellarProjectManifestV1_0_0 {
46
+ specVersion: string;
47
+ dataSources: SubqlStellarDataSource[];
48
+ network: ProjectNetworkV1_0_0;
49
+ name: string;
50
+ version: string;
51
+ schema: FileType;
52
+ templates?: (RuntimeDatasourceTemplate | CustomDatasourceTemplate)[];
53
+ runner: RunnerSpecs;
54
+ protected _deployment: D;
55
+ get deployment(): D;
56
+ }
@@ -0,0 +1,226 @@
1
+ "use strict";
2
+ // Copyright 2020-2023 SubQuery Pte Ltd authors & contributors
3
+ // SPDX-License-Identifier: GPL-3.0
4
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
5
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
6
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
7
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
8
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
9
+ };
10
+ var __metadata = (this && this.__metadata) || function (k, v) {
11
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.ProjectManifestV1_0_0Impl = exports.DeploymentV1_0_0 = exports.ProjectNetworkV1_0_0 = exports.ProjectNetworkDeploymentV1_0_0 = exports.StellarRunnerSpecsImpl = exports.CustomDatasourceTemplateImpl = exports.RuntimeDatasourceTemplateImpl = exports.StellarCustomDataSourceImpl = exports.StellarRuntimeDataSourceImpl = exports.StellarRunnerNodeImpl = exports.StellarProjectMapping = void 0;
15
+ const common_1 = require("@subql/common");
16
+ const class_transformer_1 = require("class-transformer");
17
+ const class_validator_1 = require("class-validator");
18
+ const models_1 = require("../../models");
19
+ const Stellar_NODE_NAME = `@subql/node-stellar`;
20
+ class StellarProjectMapping extends models_1.StellarMapping {
21
+ }
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ __metadata("design:type", String)
25
+ ], StellarProjectMapping.prototype, "file", void 0);
26
+ exports.StellarProjectMapping = StellarProjectMapping;
27
+ class StellarRunnerNodeImpl extends common_1.RunnerNodeImpl {
28
+ }
29
+ __decorate([
30
+ (0, class_validator_1.IsIn)([Stellar_NODE_NAME], {
31
+ message: `Runner Substrate node name incorrect, suppose be '${Stellar_NODE_NAME}'`,
32
+ }),
33
+ __metadata("design:type", String)
34
+ ], StellarRunnerNodeImpl.prototype, "name", void 0);
35
+ exports.StellarRunnerNodeImpl = StellarRunnerNodeImpl;
36
+ class StellarRuntimeDataSourceImpl extends models_1.RuntimeDataSourceBase {
37
+ validate() {
38
+ return (0, common_1.validateObject)(this, 'failed to validate runtime datasource.');
39
+ }
40
+ }
41
+ exports.StellarRuntimeDataSourceImpl = StellarRuntimeDataSourceImpl;
42
+ class StellarCustomDataSourceImpl extends models_1.CustomDataSourceBase {
43
+ validate() {
44
+ return (0, common_1.validateObject)(this, 'failed to validate custom datasource.');
45
+ }
46
+ }
47
+ exports.StellarCustomDataSourceImpl = StellarCustomDataSourceImpl;
48
+ class RuntimeDatasourceTemplateImpl extends StellarRuntimeDataSourceImpl {
49
+ }
50
+ __decorate([
51
+ (0, class_validator_1.IsString)(),
52
+ __metadata("design:type", String)
53
+ ], RuntimeDatasourceTemplateImpl.prototype, "name", void 0);
54
+ exports.RuntimeDatasourceTemplateImpl = RuntimeDatasourceTemplateImpl;
55
+ class CustomDatasourceTemplateImpl extends StellarCustomDataSourceImpl {
56
+ }
57
+ __decorate([
58
+ (0, class_validator_1.IsString)(),
59
+ __metadata("design:type", String)
60
+ ], CustomDatasourceTemplateImpl.prototype, "name", void 0);
61
+ exports.CustomDatasourceTemplateImpl = CustomDatasourceTemplateImpl;
62
+ class StellarRunnerSpecsImpl {
63
+ }
64
+ __decorate([
65
+ (0, class_validator_1.IsObject)(),
66
+ (0, class_validator_1.ValidateNested)(),
67
+ (0, class_transformer_1.Type)(() => StellarRunnerNodeImpl),
68
+ __metadata("design:type", Object)
69
+ ], StellarRunnerSpecsImpl.prototype, "node", void 0);
70
+ __decorate([
71
+ (0, class_validator_1.IsObject)(),
72
+ (0, class_validator_1.ValidateNested)(),
73
+ (0, class_transformer_1.Type)(() => common_1.RunnerQueryBaseModel),
74
+ __metadata("design:type", Object)
75
+ ], StellarRunnerSpecsImpl.prototype, "query", void 0);
76
+ exports.StellarRunnerSpecsImpl = StellarRunnerSpecsImpl;
77
+ class ProjectNetworkDeploymentV1_0_0 {
78
+ }
79
+ __decorate([
80
+ (0, class_validator_1.IsNotEmpty)(),
81
+ (0, class_transformer_1.Transform)(({ value }) => value.trim()),
82
+ (0, class_validator_1.IsString)(),
83
+ __metadata("design:type", String)
84
+ ], ProjectNetworkDeploymentV1_0_0.prototype, "chainId", void 0);
85
+ __decorate([
86
+ (0, class_validator_1.ValidateNested)(),
87
+ (0, class_transformer_1.Type)(() => common_1.FileType),
88
+ (0, class_validator_1.IsOptional)(),
89
+ __metadata("design:type", common_1.FileType)
90
+ ], ProjectNetworkDeploymentV1_0_0.prototype, "chaintypes", void 0);
91
+ __decorate([
92
+ (0, class_validator_1.IsOptional)(),
93
+ (0, class_validator_1.IsArray)(),
94
+ __metadata("design:type", Array)
95
+ ], ProjectNetworkDeploymentV1_0_0.prototype, "bypassBlocks", void 0);
96
+ exports.ProjectNetworkDeploymentV1_0_0 = ProjectNetworkDeploymentV1_0_0;
97
+ class ProjectNetworkV1_0_0 extends ProjectNetworkDeploymentV1_0_0 {
98
+ }
99
+ __decorate([
100
+ (0, class_validator_1.IsString)({ each: true }),
101
+ (0, class_validator_1.IsOptional)(),
102
+ __metadata("design:type", Object)
103
+ ], ProjectNetworkV1_0_0.prototype, "endpoint", void 0);
104
+ __decorate([
105
+ (0, class_validator_1.IsString)(),
106
+ (0, class_validator_1.IsOptional)(),
107
+ __metadata("design:type", String)
108
+ ], ProjectNetworkV1_0_0.prototype, "dictionary", void 0);
109
+ exports.ProjectNetworkV1_0_0 = ProjectNetworkV1_0_0;
110
+ class DeploymentV1_0_0 {
111
+ }
112
+ __decorate([
113
+ (0, class_transformer_1.Transform)((params) => {
114
+ if (params.value.genesisHash && !params.value.chainId) {
115
+ params.value.chainId = params.value.genesisHash;
116
+ }
117
+ return (0, class_transformer_1.plainToClass)(ProjectNetworkDeploymentV1_0_0, params.value);
118
+ }),
119
+ (0, class_validator_1.ValidateNested)(),
120
+ (0, class_transformer_1.Type)(() => ProjectNetworkDeploymentV1_0_0),
121
+ __metadata("design:type", ProjectNetworkDeploymentV1_0_0)
122
+ ], DeploymentV1_0_0.prototype, "network", void 0);
123
+ __decorate([
124
+ (0, class_validator_1.Equals)('1.0.0'),
125
+ (0, class_validator_1.IsString)(),
126
+ __metadata("design:type", String)
127
+ ], DeploymentV1_0_0.prototype, "specVersion", void 0);
128
+ __decorate([
129
+ (0, class_validator_1.IsObject)(),
130
+ (0, class_validator_1.ValidateNested)(),
131
+ (0, class_transformer_1.Type)(() => StellarRunnerSpecsImpl),
132
+ __metadata("design:type", Object)
133
+ ], DeploymentV1_0_0.prototype, "runner", void 0);
134
+ __decorate([
135
+ (0, class_validator_1.ValidateNested)(),
136
+ (0, class_transformer_1.Type)(() => common_1.FileType),
137
+ __metadata("design:type", common_1.FileType)
138
+ ], DeploymentV1_0_0.prototype, "schema", void 0);
139
+ __decorate([
140
+ (0, class_validator_1.IsArray)(),
141
+ (0, class_validator_1.ValidateNested)(),
142
+ (0, class_transformer_1.Type)(() => StellarCustomDataSourceImpl, {
143
+ discriminator: {
144
+ property: 'kind',
145
+ subTypes: [{ value: StellarRuntimeDataSourceImpl, name: 'stellar/Runtime' }],
146
+ },
147
+ keepDiscriminatorProperty: true,
148
+ }),
149
+ __metadata("design:type", Array)
150
+ ], DeploymentV1_0_0.prototype, "dataSources", void 0);
151
+ __decorate([
152
+ (0, class_validator_1.IsOptional)(),
153
+ (0, class_validator_1.IsArray)(),
154
+ (0, class_validator_1.ValidateNested)(),
155
+ (0, class_transformer_1.Type)(() => CustomDatasourceTemplateImpl, {
156
+ discriminator: {
157
+ property: 'kind',
158
+ subTypes: [{ value: RuntimeDatasourceTemplateImpl, name: 'stellar/Runtime' }],
159
+ },
160
+ keepDiscriminatorProperty: true,
161
+ }),
162
+ __metadata("design:type", Array)
163
+ ], DeploymentV1_0_0.prototype, "templates", void 0);
164
+ exports.DeploymentV1_0_0 = DeploymentV1_0_0;
165
+ class ProjectManifestV1_0_0Impl extends common_1.ProjectManifestBaseImpl {
166
+ get deployment() {
167
+ if (!this._deployment) {
168
+ this._deployment = (0, class_transformer_1.plainToClass)(DeploymentV1_0_0, this);
169
+ //validateSync(this._deployment.)
170
+ (0, class_validator_1.validateSync)(this._deployment, { whitelist: true });
171
+ }
172
+ return this._deployment;
173
+ }
174
+ }
175
+ __decorate([
176
+ (0, class_validator_1.Equals)('1.0.0'),
177
+ __metadata("design:type", String)
178
+ ], ProjectManifestV1_0_0Impl.prototype, "specVersion", void 0);
179
+ __decorate([
180
+ (0, class_transformer_1.Type)(() => StellarCustomDataSourceImpl, {
181
+ discriminator: {
182
+ property: 'kind',
183
+ subTypes: [{ value: StellarRuntimeDataSourceImpl, name: 'stellar/Runtime' }],
184
+ },
185
+ keepDiscriminatorProperty: true,
186
+ }),
187
+ __metadata("design:type", Array)
188
+ ], ProjectManifestV1_0_0Impl.prototype, "dataSources", void 0);
189
+ __decorate([
190
+ (0, class_transformer_1.Type)(() => ProjectNetworkV1_0_0),
191
+ __metadata("design:type", ProjectNetworkV1_0_0)
192
+ ], ProjectManifestV1_0_0Impl.prototype, "network", void 0);
193
+ __decorate([
194
+ (0, class_validator_1.IsString)(),
195
+ __metadata("design:type", String)
196
+ ], ProjectManifestV1_0_0Impl.prototype, "name", void 0);
197
+ __decorate([
198
+ (0, class_validator_1.IsString)(),
199
+ __metadata("design:type", String)
200
+ ], ProjectManifestV1_0_0Impl.prototype, "version", void 0);
201
+ __decorate([
202
+ (0, class_validator_1.ValidateNested)(),
203
+ (0, class_transformer_1.Type)(() => common_1.FileType),
204
+ __metadata("design:type", common_1.FileType)
205
+ ], ProjectManifestV1_0_0Impl.prototype, "schema", void 0);
206
+ __decorate([
207
+ (0, class_validator_1.IsOptional)(),
208
+ (0, class_validator_1.IsArray)(),
209
+ (0, class_validator_1.ValidateNested)(),
210
+ (0, class_transformer_1.Type)(() => CustomDatasourceTemplateImpl, {
211
+ discriminator: {
212
+ property: 'kind',
213
+ subTypes: [{ value: RuntimeDatasourceTemplateImpl, name: 'stellar/Runtime' }],
214
+ },
215
+ keepDiscriminatorProperty: true,
216
+ }),
217
+ __metadata("design:type", Array)
218
+ ], ProjectManifestV1_0_0Impl.prototype, "templates", void 0);
219
+ __decorate([
220
+ (0, class_validator_1.IsObject)(),
221
+ (0, class_validator_1.ValidateNested)(),
222
+ (0, class_transformer_1.Type)(() => StellarRunnerSpecsImpl),
223
+ __metadata("design:type", Object)
224
+ ], ProjectManifestV1_0_0Impl.prototype, "runner", void 0);
225
+ exports.ProjectManifestV1_0_0Impl = ProjectManifestV1_0_0Impl;
226
+ //# sourceMappingURL=model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../../../src/project/versioned/v1_0_0/model.ts"],"names":[],"mappings":";AAAA,8DAA8D;AAC9D,mCAAmC;;;;;;;;;;;;AAEnC,0CAUuB;AAEvB,yDAAmF;AACnF,qDAUyB;AACzB,yCAAyF;AAIzF,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;AAEhD,MAAa,qBAAsB,SAAQ,uBAAc;CAGxD;AAFC;IAAC,IAAA,0BAAQ,GAAE;;mDACE;AAFf,sDAGC;AAED,MAAa,qBAAsB,SAAQ,uBAAc;CAKxD;AAJC;IAAC,IAAA,sBAAI,EAAC,CAAC,iBAAiB,CAAC,EAAE;QACzB,OAAO,EAAE,qDAAqD,iBAAiB,GAAG;KACnF,CAAC;;mDACW;AAJf,sDAKC;AAED,MAAa,4BACX,SAAQ,8BAAwD;IAGhE,QAAQ;QACN,OAAO,IAAA,uBAAc,EAAC,IAAI,EAAE,wCAAwC,CAAC,CAAC;IACxE,CAAC;CACF;AAPD,oEAOC;AAED,MAAa,2BAIX,SAAQ,6BAA0B;IAGlC,QAAQ;QACN,OAAO,IAAA,uBAAc,EAAC,IAAI,EAAE,uCAAuC,CAAC,CAAC;IACvE,CAAC;CACF;AAVD,kEAUC;AAED,MAAa,6BAA8B,SAAQ,4BAA4B;CAG9E;AAFC;IAAC,IAAA,0BAAQ,GAAE;;2DACE;AAFf,sEAGC;AAED,MAAa,4BAA6B,SAAQ,2BAA2B;CAG5E;AAFC;IAAC,IAAA,0BAAQ,GAAE;;0DACE;AAFf,oEAGC;AAED,MAAa,sBAAsB;CASlC;AARC;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC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,CAAC;SACnD;QACD,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;CACF;AA5CC;IAAC,IAAA,wBAAM,EAAC,OAAO,CAAC;;8DACI;AACpB;IAAC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,2BAA2B,EAAE;QACvC,aAAa,EAAE;YACb,QAAQ,EAAE,MAAM;YAChB,QAAQ,EAAE,CAAC,EAAC,KAAK,EAAE,4BAA4B,EAAE,IAAI,EAAE,iBAAiB,EAAC,CAAC;SAC3E;QACD,yBAAyB,EAAE,IAAI;KAChC,CAAC;;8DACoC;AACtC;IAAC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,oBAAoB,CAAC;8BACxB,oBAAoB;0DAAC;AAC9B;IAAC,IAAA,0BAAQ,GAAE;;uDACE;AACb;IAAC,IAAA,0BAAQ,GAAE;;0DACK;AAChB;IAAC,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,iBAAQ,CAAC;8BACb,iBAAQ;yDAAC;AACjB;IAAC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,4BAA4B,EAAE;QACxC,aAAa,EAAE;YACb,QAAQ,EAAE,MAAM;YAChB,QAAQ,EAAE,CAAC,EAAC,KAAK,EAAE,6BAA6B,EAAE,IAAI,EAAE,iBAAiB,EAAC,CAAC;SAC5E;QACD,yBAAyB,EAAE,IAAI;KAChC,CAAC;;4DACmE;AACrE;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;;yDACf;AArCtB,8DAgDC","sourcesContent":["// Copyright 2020-2023 SubQuery Pte Ltd authors & contributors\n// SPDX-License-Identifier: GPL-3.0\n\nimport {\n BaseMapping,\n FileType,\n NodeSpec,\n ProjectManifestBaseImpl,\n QuerySpec,\n RunnerNodeImpl,\n RunnerQueryBaseModel,\n RunnerSpecs,\n validateObject,\n} from '@subql/common';\nimport {SubqlCustomDatasource, SubqlMapping, SubqlRuntimeDatasource} from '@subql/types-stellar';\nimport {plainToClass, Transform, TransformFnParams, Type} from 'class-transformer';\nimport {\n Equals,\n IsArray,\n IsIn,\n IsNotEmpty,\n IsObject,\n IsOptional,\n IsString,\n ValidateNested,\n validateSync,\n} from 'class-validator';\nimport {CustomDataSourceBase, StellarMapping, RuntimeDataSourceBase} from '../../models';\nimport {SubqlStellarDataSource, SubqlRuntimeHandler} from '../../types';\nimport {CustomDatasourceTemplate, StellarProjectManifestV1_0_0, RuntimeDatasourceTemplate} from './types';\n\nconst Stellar_NODE_NAME = `@subql/node-stellar`;\n\nexport class StellarProjectMapping extends StellarMapping {\n @IsString()\n file: string;\n}\n\nexport class StellarRunnerNodeImpl extends RunnerNodeImpl {\n @IsIn([Stellar_NODE_NAME], {\n message: `Runner Substrate node name incorrect, suppose be '${Stellar_NODE_NAME}'`,\n })\n name: string;\n}\n\nexport class StellarRuntimeDataSourceImpl\n extends RuntimeDataSourceBase<SubqlMapping<SubqlRuntimeHandler>>\n implements SubqlRuntimeDatasource\n{\n validate(): void {\n return validateObject(this, 'failed to validate runtime datasource.');\n }\n}\n\nexport class StellarCustomDataSourceImpl<\n K extends string = string,\n M extends BaseMapping<any, any> = BaseMapping<Record<string, unknown>, any>\n >\n extends CustomDataSourceBase<K, M>\n implements SubqlCustomDatasource<K, M>\n{\n validate(): void {\n return validateObject(this, 'failed to validate custom datasource.');\n }\n}\n\nexport class RuntimeDatasourceTemplateImpl extends StellarRuntimeDataSourceImpl implements RuntimeDatasourceTemplate {\n @IsString()\n name: string;\n}\n\nexport class CustomDatasourceTemplateImpl extends StellarCustomDataSourceImpl implements CustomDatasourceTemplate {\n @IsString()\n name: string;\n}\n\nexport class StellarRunnerSpecsImpl implements RunnerSpecs {\n @IsObject()\n @ValidateNested()\n @Type(() => StellarRunnerNodeImpl)\n node: NodeSpec;\n @IsObject()\n @ValidateNested()\n @Type(() => RunnerQueryBaseModel)\n query: QuerySpec;\n}\n\nexport class ProjectNetworkDeploymentV1_0_0 {\n @IsNotEmpty()\n @Transform(({value}: TransformFnParams) => value.trim())\n @IsString()\n chainId: string;\n @ValidateNested()\n @Type(() => FileType)\n @IsOptional()\n chaintypes?: FileType;\n @IsOptional()\n @IsArray()\n bypassBlocks?: (number | string)[];\n}\n\nexport class ProjectNetworkV1_0_0 extends ProjectNetworkDeploymentV1_0_0 {\n @IsString({each: true})\n @IsOptional()\n endpoint?: string | string[];\n @IsString()\n @IsOptional()\n dictionary?: string;\n}\n\nexport class DeploymentV1_0_0 {\n @Transform((params) => {\n if (params.value.genesisHash && !params.value.chainId) {\n params.value.chainId = params.value.genesisHash;\n }\n return plainToClass(ProjectNetworkDeploymentV1_0_0, params.value);\n })\n @ValidateNested()\n @Type(() => ProjectNetworkDeploymentV1_0_0)\n network: ProjectNetworkDeploymentV1_0_0;\n @Equals('1.0.0')\n @IsString()\n specVersion: string;\n @IsObject()\n @ValidateNested()\n @Type(() => StellarRunnerSpecsImpl)\n runner: RunnerSpecs;\n @ValidateNested()\n @Type(() => FileType)\n schema: FileType;\n @IsArray()\n @ValidateNested()\n @Type(() => StellarCustomDataSourceImpl, {\n discriminator: {\n property: 'kind',\n subTypes: [{value: StellarRuntimeDataSourceImpl, name: 'stellar/Runtime'}],\n },\n keepDiscriminatorProperty: true,\n })\n dataSources: (SubqlRuntimeDatasource | SubqlCustomDatasource)[];\n @IsOptional()\n @IsArray()\n @ValidateNested()\n @Type(() => CustomDatasourceTemplateImpl, {\n discriminator: {\n property: 'kind',\n subTypes: [{value: RuntimeDatasourceTemplateImpl, name: 'stellar/Runtime'}],\n },\n keepDiscriminatorProperty: true,\n })\n templates?: (RuntimeDatasourceTemplate | CustomDatasourceTemplate)[];\n}\n\nexport class ProjectManifestV1_0_0Impl<D extends object = DeploymentV1_0_0>\n extends ProjectManifestBaseImpl<D>\n implements StellarProjectManifestV1_0_0\n{\n @Equals('1.0.0')\n specVersion: string;\n @Type(() => StellarCustomDataSourceImpl, {\n discriminator: {\n property: 'kind',\n subTypes: [{value: StellarRuntimeDataSourceImpl, name: 'stellar/Runtime'}],\n },\n keepDiscriminatorProperty: true,\n })\n dataSources: SubqlStellarDataSource[];\n @Type(() => ProjectNetworkV1_0_0)\n network: ProjectNetworkV1_0_0;\n @IsString()\n name: string;\n @IsString()\n version: string;\n @ValidateNested()\n @Type(() => FileType)\n schema: FileType;\n @IsOptional()\n @IsArray()\n @ValidateNested()\n @Type(() => CustomDatasourceTemplateImpl, {\n discriminator: {\n property: 'kind',\n subTypes: [{value: RuntimeDatasourceTemplateImpl, name: 'stellar/Runtime'}],\n },\n keepDiscriminatorProperty: true,\n })\n templates?: (RuntimeDatasourceTemplate | CustomDatasourceTemplate)[];\n @IsObject()\n @ValidateNested()\n @Type(() => StellarRunnerSpecsImpl)\n runner: RunnerSpecs;\n protected _deployment: D;\n\n get deployment(): D {\n if (!this._deployment) {\n this._deployment = plainToClass(DeploymentV1_0_0, this) as unknown as D;\n //validateSync(this._deployment.)\n validateSync(this._deployment, {whitelist: true});\n }\n return this._deployment;\n }\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import { ProjectManifestV1_0_0, TemplateBase } from '@subql/common';
2
+ import { SubqlCustomDatasource, SubqlRuntimeDatasource } from '@subql/types-stellar';
3
+ export interface RuntimeDatasourceTemplate extends Omit<SubqlRuntimeDatasource, 'name'>, TemplateBase {
4
+ }
5
+ export interface CustomDatasourceTemplate extends Omit<SubqlCustomDatasource, 'name'>, TemplateBase {
6
+ }
7
+ export type StellarProjectManifestV1_0_0 = ProjectManifestV1_0_0<RuntimeDatasourceTemplate | CustomDatasourceTemplate, SubqlRuntimeDatasource | SubqlCustomDatasource>;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // Copyright 2020-2023 SubQuery Pte Ltd authors & contributors
3
+ // SPDX-License-Identifier: GPL-3.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/project/versioned/v1_0_0/types.ts"],"names":[],"mappings":";AAAA,8DAA8D;AAC9D,mCAAmC","sourcesContent":["// Copyright 2020-2023 SubQuery Pte Ltd authors & contributors\n// SPDX-License-Identifier: GPL-3.0\n\nimport {ProjectManifestV1_0_0, TemplateBase} from '@subql/common';\nimport {SubqlCustomDatasource, SubqlRuntimeDatasource} from '@subql/types-stellar';\n\nexport interface RuntimeDatasourceTemplate extends Omit<SubqlRuntimeDatasource, 'name'>, TemplateBase {}\nexport interface CustomDatasourceTemplate extends Omit<SubqlCustomDatasource, 'name'>, TemplateBase {}\n\nexport type StellarProjectManifestV1_0_0 = ProjectManifestV1_0_0<\n RuntimeDatasourceTemplate | CustomDatasourceTemplate,\n SubqlRuntimeDatasource | SubqlCustomDatasource\n>;\n"]}