@subql/common-stellar 2.3.1-0 → 2.3.2-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/project/load.d.ts +0 -1
- package/dist/project/load.js +1 -28
- package/dist/project/load.js.map +1 -1
- package/dist/project/models.d.ts +4 -3
- package/dist/project/models.js +5 -1
- package/dist/project/models.js.map +1 -1
- package/dist/project/project.spec.js +36 -15
- package/dist/project/project.spec.js.map +1 -1
- package/dist/project/types.d.ts +2 -3
- package/dist/project/types.js.map +1 -1
- package/dist/project/utils.d.ts +6 -6
- package/dist/project/utils.js.map +1 -1
- package/dist/project/versioned/ProjectManifestVersioned.js +1 -1
- package/dist/project/versioned/ProjectManifestVersioned.js.map +1 -1
- package/dist/project/versioned/v1_0_0/index.d.ts +0 -1
- package/dist/project/versioned/v1_0_0/index.js +0 -1
- package/dist/project/versioned/v1_0_0/index.js.map +1 -1
- package/dist/project/versioned/v1_0_0/model.d.ts +10 -15
- package/dist/project/versioned/v1_0_0/model.js +16 -41
- package/dist/project/versioned/v1_0_0/model.js.map +1 -1
- package/package.json +4 -4
- package/src/project/load.ts +0 -23
- package/src/project/models.ts +10 -6
- package/src/project/project.spec.ts +23 -2
- package/src/project/types.ts +2 -3
- package/src/project/utils.ts +18 -18
- package/src/project/versioned/ProjectManifestVersioned.ts +1 -1
- package/src/project/versioned/v1_0_0/index.ts +0 -1
- package/src/project/versioned/v1_0_0/model.ts +29 -42
- package/test/project_1.0.0.yaml +1 -1
- package/dist/project/versioned/v1_0_0/types.d.ts +0 -7
- package/dist/project/versioned/v1_0_0/types.js +0 -5
- package/dist/project/versioned/v1_0_0/types.js.map +0 -1
- package/src/project/versioned/v1_0_0/types.ts +0 -13
package/src/project/load.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
// Copyright 2020-2023 SubQuery Pte Ltd authors & contributors
|
|
2
2
|
// SPDX-License-Identifier: GPL-3.0
|
|
3
3
|
|
|
4
|
-
import fs from 'fs';
|
|
5
|
-
import path from 'path';
|
|
6
|
-
import {loadFromJsonOrYaml} from '@subql/common';
|
|
7
4
|
import {StellarProjectManifestVersioned, VersionedProjectManifest} from './versioned';
|
|
8
5
|
|
|
9
6
|
export function parseStellarProjectManifest(raw: unknown): StellarProjectManifestVersioned {
|
|
@@ -11,23 +8,3 @@ export function parseStellarProjectManifest(raw: unknown): StellarProjectManifes
|
|
|
11
8
|
projectManifest.validate();
|
|
12
9
|
return projectManifest;
|
|
13
10
|
}
|
|
14
|
-
|
|
15
|
-
export function loadStellarProjectManifest(file: string): StellarProjectManifestVersioned {
|
|
16
|
-
let manifestPath = file;
|
|
17
|
-
if (fs.existsSync(file) && fs.lstatSync(file).isDirectory()) {
|
|
18
|
-
const yamlFilePath = path.join(file, 'project.yaml');
|
|
19
|
-
const jsonFilePath = path.join(file, 'project.json');
|
|
20
|
-
if (fs.existsSync(yamlFilePath)) {
|
|
21
|
-
manifestPath = yamlFilePath;
|
|
22
|
-
} else if (fs.existsSync(jsonFilePath)) {
|
|
23
|
-
manifestPath = jsonFilePath;
|
|
24
|
-
} else {
|
|
25
|
-
throw new Error(`Could not find project manifest under dir ${file}`);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const doc = loadFromJsonOrYaml(manifestPath);
|
|
30
|
-
const projectManifest = new StellarProjectManifestVersioned(doc as VersionedProjectManifest);
|
|
31
|
-
projectManifest.validate();
|
|
32
|
-
return projectManifest;
|
|
33
|
-
}
|
package/src/project/models.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// Copyright 2020-2023 SubQuery Pte Ltd authors & contributors
|
|
2
2
|
// SPDX-License-Identifier: GPL-3.0
|
|
3
3
|
|
|
4
|
-
import {forbidNonWhitelisted} from '@subql/common';
|
|
4
|
+
import {forbidNonWhitelisted, ProcessorImpl} from '@subql/common';
|
|
5
|
+
import {Processor, FileReference} from '@subql/types-core';
|
|
5
6
|
import {
|
|
6
7
|
StellarHandlerKind,
|
|
7
8
|
StellarDatasourceKind,
|
|
@@ -12,7 +13,6 @@ import {
|
|
|
12
13
|
SubqlRuntimeHandler,
|
|
13
14
|
SubqlRuntimeDatasource,
|
|
14
15
|
SubqlCustomDatasource,
|
|
15
|
-
FileReference,
|
|
16
16
|
CustomDataSourceAsset,
|
|
17
17
|
StellarBlockFilter,
|
|
18
18
|
StellarTransactionFilter,
|
|
@@ -76,6 +76,7 @@ export class BlockHandler implements SubqlBlockHandler {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
export class TransactionHandler implements SubqlTransactionHandler {
|
|
79
|
+
@forbidNonWhitelisted({account: ''})
|
|
79
80
|
@IsObject()
|
|
80
81
|
@IsOptional()
|
|
81
82
|
@Type(() => TransactionFilter)
|
|
@@ -87,6 +88,7 @@ export class TransactionHandler implements SubqlTransactionHandler {
|
|
|
87
88
|
}
|
|
88
89
|
|
|
89
90
|
export class SorobanTransactionHandler implements SubqlSorobanTransactionHandler {
|
|
91
|
+
@forbidNonWhitelisted({account: ''})
|
|
90
92
|
@IsObject()
|
|
91
93
|
@IsOptional()
|
|
92
94
|
@Type(() => TransactionFilter)
|
|
@@ -98,6 +100,7 @@ export class SorobanTransactionHandler implements SubqlSorobanTransactionHandler
|
|
|
98
100
|
}
|
|
99
101
|
|
|
100
102
|
export class OperationHandler implements SubqlOperationHandler {
|
|
103
|
+
@forbidNonWhitelisted({type: '', sourceAccount: ''})
|
|
101
104
|
@IsObject()
|
|
102
105
|
@IsOptional()
|
|
103
106
|
@Type(() => OperationFilter)
|
|
@@ -109,6 +112,7 @@ export class OperationHandler implements SubqlOperationHandler {
|
|
|
109
112
|
}
|
|
110
113
|
|
|
111
114
|
export class EffectHandler implements SubqlEffectHandler {
|
|
115
|
+
@forbidNonWhitelisted({type: '', account: ''})
|
|
112
116
|
@IsObject()
|
|
113
117
|
@IsOptional()
|
|
114
118
|
@Type(() => EffectFilter)
|
|
@@ -221,8 +225,8 @@ export class FileReferenceImpl implements FileReference {
|
|
|
221
225
|
file: string;
|
|
222
226
|
}
|
|
223
227
|
|
|
224
|
-
export class CustomDataSourceBase<K extends string, M extends SubqlMapping = SubqlMapping<SubqlCustomHandler
|
|
225
|
-
implements SubqlCustomDatasource<K, M>
|
|
228
|
+
export class CustomDataSourceBase<K extends string, M extends SubqlMapping = SubqlMapping<SubqlCustomHandler>, O = any>
|
|
229
|
+
implements SubqlCustomDatasource<K, M, O>
|
|
226
230
|
{
|
|
227
231
|
@IsString()
|
|
228
232
|
kind: K;
|
|
@@ -235,9 +239,9 @@ export class CustomDataSourceBase<K extends string, M extends SubqlMapping = Sub
|
|
|
235
239
|
@Type(() => FileReferenceImpl)
|
|
236
240
|
@ValidateNested({each: true})
|
|
237
241
|
assets: Map<string, CustomDataSourceAsset>;
|
|
238
|
-
@Type(() =>
|
|
242
|
+
@Type(() => ProcessorImpl)
|
|
239
243
|
@IsObject()
|
|
240
|
-
processor:
|
|
244
|
+
processor: Processor<O>;
|
|
241
245
|
@IsOptional()
|
|
242
246
|
@ValidateNested()
|
|
243
247
|
options?: StellarProcessorOptions;
|
|
@@ -1,14 +1,35 @@
|
|
|
1
1
|
// Copyright 2020-2023 SubQuery Pte Ltd authors & contributors
|
|
2
2
|
// SPDX-License-Identifier: GPL-3.0
|
|
3
3
|
|
|
4
|
+
import fs from 'fs';
|
|
4
5
|
import path from 'path';
|
|
5
|
-
import {RunnerQueryBaseModel} from '@subql/common';
|
|
6
|
+
import {RunnerQueryBaseModel, loadFromJsonOrYaml} from '@subql/common';
|
|
6
7
|
import {validateSync} from 'class-validator';
|
|
7
8
|
import {DeploymentV1_0_0, StellarRunnerNodeImpl, StellarRunnerSpecsImpl} from '../project/versioned/v1_0_0';
|
|
8
|
-
import {
|
|
9
|
+
import {StellarProjectManifestVersioned, VersionedProjectManifest} from './versioned';
|
|
9
10
|
|
|
10
11
|
const projectsDir = path.join(__dirname, '../../test');
|
|
11
12
|
|
|
13
|
+
function loadStellarProjectManifest(file: string): StellarProjectManifestVersioned {
|
|
14
|
+
let manifestPath = file;
|
|
15
|
+
if (fs.existsSync(file) && fs.lstatSync(file).isDirectory()) {
|
|
16
|
+
const yamlFilePath = path.join(file, 'project.yaml');
|
|
17
|
+
const jsonFilePath = path.join(file, 'project.json');
|
|
18
|
+
if (fs.existsSync(yamlFilePath)) {
|
|
19
|
+
manifestPath = yamlFilePath;
|
|
20
|
+
} else if (fs.existsSync(jsonFilePath)) {
|
|
21
|
+
manifestPath = jsonFilePath;
|
|
22
|
+
} else {
|
|
23
|
+
throw new Error(`Could not find project manifest under dir ${file}`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const doc = loadFromJsonOrYaml(manifestPath);
|
|
28
|
+
const projectManifest = new StellarProjectManifestVersioned(doc as VersionedProjectManifest);
|
|
29
|
+
projectManifest.validate();
|
|
30
|
+
return projectManifest;
|
|
31
|
+
}
|
|
32
|
+
|
|
12
33
|
describe('project.yaml', () => {
|
|
13
34
|
it('can validate project.yaml', () => {
|
|
14
35
|
expect(() => loadStellarProjectManifest(path.join(projectsDir, 'project_falsy.yaml'))).toThrow();
|
package/src/project/types.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright 2020-2023 SubQuery Pte Ltd authors & contributors
|
|
2
2
|
// SPDX-License-Identifier: GPL-3.0
|
|
3
3
|
|
|
4
|
-
import {IProjectManifest, ProjectNetworkConfig} from '@subql/
|
|
4
|
+
import {IProjectManifest, ProjectNetworkConfig} from '@subql/types-core';
|
|
5
5
|
import {SubqlDatasource} from '@subql/types-stellar';
|
|
6
6
|
|
|
7
7
|
// All of these used to be redefined in this file, re-exporting for simplicity
|
|
@@ -26,7 +26,6 @@ export {
|
|
|
26
26
|
export type IStellarProjectManifest = IProjectManifest<SubqlDatasource>;
|
|
27
27
|
|
|
28
28
|
export interface StellarProjectNetworkConfig extends ProjectNetworkConfig {
|
|
29
|
-
|
|
30
|
-
chainId?: string;
|
|
29
|
+
chainId: string;
|
|
31
30
|
sorobanEndpoint: string;
|
|
32
31
|
}
|
package/src/project/utils.ts
CHANGED
|
@@ -10,39 +10,39 @@ import {
|
|
|
10
10
|
SubqlRuntimeDatasource,
|
|
11
11
|
} from '@subql/types-stellar';
|
|
12
12
|
|
|
13
|
-
export function isBlockHandlerProcessor<B>(
|
|
14
|
-
hp: SecondLayerHandlerProcessor<StellarHandlerKind,
|
|
15
|
-
): hp is SecondLayerHandlerProcessor<StellarHandlerKind.Block,
|
|
13
|
+
export function isBlockHandlerProcessor<F extends Record<string, unknown>, B>(
|
|
14
|
+
hp: SecondLayerHandlerProcessor<StellarHandlerKind, F, unknown>
|
|
15
|
+
): hp is SecondLayerHandlerProcessor<StellarHandlerKind.Block, F, B> {
|
|
16
16
|
return hp.baseHandlerKind === StellarHandlerKind.Block;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export function isTransactionHandlerProcessor<T>(
|
|
20
|
-
hp: SecondLayerHandlerProcessor<StellarHandlerKind,
|
|
21
|
-
): hp is SecondLayerHandlerProcessor<StellarHandlerKind.Transaction,
|
|
19
|
+
export function isTransactionHandlerProcessor<F extends Record<string, unknown>, T>(
|
|
20
|
+
hp: SecondLayerHandlerProcessor<StellarHandlerKind, F, unknown>
|
|
21
|
+
): hp is SecondLayerHandlerProcessor<StellarHandlerKind.Transaction, F, T> {
|
|
22
22
|
return hp.baseHandlerKind === StellarHandlerKind.Transaction;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
export function isSorobanTransactionHandlerProcessor<T>(
|
|
26
|
-
hp: SecondLayerHandlerProcessor<StellarHandlerKind,
|
|
27
|
-
): hp is SecondLayerHandlerProcessor<StellarHandlerKind.SorobanTransaction,
|
|
25
|
+
export function isSorobanTransactionHandlerProcessor<F extends Record<string, unknown>, T>(
|
|
26
|
+
hp: SecondLayerHandlerProcessor<StellarHandlerKind, F, unknown>
|
|
27
|
+
): hp is SecondLayerHandlerProcessor<StellarHandlerKind.SorobanTransaction, F, T> {
|
|
28
28
|
return hp.baseHandlerKind === StellarHandlerKind.SorobanTransaction;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
export function isOperationHandlerProcessor<O>(
|
|
32
|
-
hp: SecondLayerHandlerProcessor<StellarHandlerKind,
|
|
33
|
-
): hp is SecondLayerHandlerProcessor<StellarHandlerKind.Operation,
|
|
31
|
+
export function isOperationHandlerProcessor<F extends Record<string, unknown>, O>(
|
|
32
|
+
hp: SecondLayerHandlerProcessor<StellarHandlerKind, F, unknown>
|
|
33
|
+
): hp is SecondLayerHandlerProcessor<StellarHandlerKind.Operation, F, O> {
|
|
34
34
|
return hp.baseHandlerKind === StellarHandlerKind.Operation;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
export function isEffectHandlerProcessor<E>(
|
|
38
|
-
hp: SecondLayerHandlerProcessor<StellarHandlerKind,
|
|
39
|
-
): hp is SecondLayerHandlerProcessor<StellarHandlerKind.Effects,
|
|
37
|
+
export function isEffectHandlerProcessor<F extends Record<string, unknown>, E>(
|
|
38
|
+
hp: SecondLayerHandlerProcessor<StellarHandlerKind, F, unknown>
|
|
39
|
+
): hp is SecondLayerHandlerProcessor<StellarHandlerKind.Effects, F, E> {
|
|
40
40
|
return hp.baseHandlerKind === StellarHandlerKind.Effects;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
export function isEventHandlerProcessor<E>(
|
|
44
|
-
hp: SecondLayerHandlerProcessor<StellarHandlerKind,
|
|
45
|
-
): hp is SecondLayerHandlerProcessor<StellarHandlerKind.Event,
|
|
43
|
+
export function isEventHandlerProcessor<F extends Record<string, unknown>, E>(
|
|
44
|
+
hp: SecondLayerHandlerProcessor<StellarHandlerKind, F, unknown>
|
|
45
|
+
): hp is SecondLayerHandlerProcessor<StellarHandlerKind.Event, F, E> {
|
|
46
46
|
return hp.baseHandlerKind === StellarHandlerKind.Event;
|
|
47
47
|
}
|
|
48
48
|
|
|
@@ -2,18 +2,25 @@
|
|
|
2
2
|
// SPDX-License-Identifier: GPL-3.0
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
|
-
BaseMapping,
|
|
6
5
|
FileType,
|
|
7
|
-
NodeSpec,
|
|
8
6
|
ProjectManifestBaseImpl,
|
|
9
|
-
|
|
7
|
+
ParentProjectModel,
|
|
10
8
|
RunnerNodeImpl,
|
|
11
9
|
RunnerQueryBaseModel,
|
|
12
|
-
RunnerSpecs,
|
|
13
10
|
validateObject,
|
|
11
|
+
CommonProjectNetworkV1_0_0,
|
|
12
|
+
BaseDeploymentV1_0_0,
|
|
14
13
|
} from '@subql/common';
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
14
|
+
import {BaseMapping, NodeSpec, ParentProject, QuerySpec, RunnerSpecs} from '@subql/types-core';
|
|
15
|
+
import {
|
|
16
|
+
CustomDatasourceTemplate,
|
|
17
|
+
RuntimeDatasourceTemplate,
|
|
18
|
+
StellarProjectManifestV1_0_0,
|
|
19
|
+
SubqlCustomDatasource,
|
|
20
|
+
SubqlMapping,
|
|
21
|
+
SubqlRuntimeDatasource,
|
|
22
|
+
} from '@subql/types-stellar';
|
|
23
|
+
import {plainToInstance, Transform, TransformFnParams, Type} from 'class-transformer';
|
|
17
24
|
import {
|
|
18
25
|
Equals,
|
|
19
26
|
IsArray,
|
|
@@ -27,7 +34,6 @@ import {
|
|
|
27
34
|
} from 'class-validator';
|
|
28
35
|
import {CustomDataSourceBase, StellarMapping, RuntimeDataSourceBase} from '../../models';
|
|
29
36
|
import {SubqlStellarDataSource, SubqlRuntimeHandler} from '../../types';
|
|
30
|
-
import {CustomDatasourceTemplate, StellarProjectManifestV1_0_0, RuntimeDatasourceTemplate} from './types';
|
|
31
37
|
|
|
32
38
|
const Stellar_NODE_NAME = `@subql/node-stellar`;
|
|
33
39
|
|
|
@@ -52,10 +58,7 @@ export class StellarRuntimeDataSourceImpl
|
|
|
52
58
|
}
|
|
53
59
|
}
|
|
54
60
|
|
|
55
|
-
export class StellarCustomDataSourceImpl<
|
|
56
|
-
K extends string = string,
|
|
57
|
-
M extends BaseMapping<any, any> = BaseMapping<Record<string, unknown>, any>
|
|
58
|
-
>
|
|
61
|
+
export class StellarCustomDataSourceImpl<K extends string = string, M extends BaseMapping<any> = BaseMapping<any>>
|
|
59
62
|
extends CustomDataSourceBase<K, M>
|
|
60
63
|
implements SubqlCustomDatasource<K, M>
|
|
61
64
|
{
|
|
@@ -90,47 +93,32 @@ export class ProjectNetworkDeploymentV1_0_0 {
|
|
|
90
93
|
@Transform(({value}: TransformFnParams) => value.trim())
|
|
91
94
|
@IsString()
|
|
92
95
|
chainId: string;
|
|
93
|
-
|
|
94
|
-
@Type(() => FileType)
|
|
95
|
-
@IsOptional()
|
|
96
|
-
chaintypes?: FileType;
|
|
96
|
+
|
|
97
97
|
@IsOptional()
|
|
98
98
|
@IsArray()
|
|
99
99
|
bypassBlocks?: (number | string)[];
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
export class
|
|
103
|
-
@IsString({each: true})
|
|
104
|
-
@IsOptional()
|
|
105
|
-
endpoint?: string | string[];
|
|
102
|
+
export class StellarProjectNetwork extends CommonProjectNetworkV1_0_0<FileType> {
|
|
106
103
|
@IsString()
|
|
107
104
|
@IsOptional()
|
|
108
105
|
soroban?: string;
|
|
109
|
-
@IsString()
|
|
110
|
-
@IsOptional()
|
|
111
|
-
dictionary?: string;
|
|
112
106
|
}
|
|
113
107
|
|
|
114
|
-
export class DeploymentV1_0_0 {
|
|
108
|
+
export class DeploymentV1_0_0 extends BaseDeploymentV1_0_0 {
|
|
115
109
|
@Transform((params) => {
|
|
116
110
|
if (params.value.genesisHash && !params.value.chainId) {
|
|
117
111
|
params.value.chainId = params.value.genesisHash;
|
|
118
112
|
}
|
|
119
|
-
return
|
|
113
|
+
return plainToInstance(ProjectNetworkDeploymentV1_0_0, params.value);
|
|
120
114
|
})
|
|
121
115
|
@ValidateNested()
|
|
122
116
|
@Type(() => ProjectNetworkDeploymentV1_0_0)
|
|
123
117
|
network: ProjectNetworkDeploymentV1_0_0;
|
|
124
|
-
@Equals('1.0.0')
|
|
125
|
-
@IsString()
|
|
126
|
-
specVersion: string;
|
|
127
118
|
@IsObject()
|
|
128
119
|
@ValidateNested()
|
|
129
120
|
@Type(() => StellarRunnerSpecsImpl)
|
|
130
121
|
runner: RunnerSpecs;
|
|
131
|
-
@ValidateNested()
|
|
132
|
-
@Type(() => FileType)
|
|
133
|
-
schema: FileType;
|
|
134
122
|
@IsArray()
|
|
135
123
|
@ValidateNested()
|
|
136
124
|
@Type(() => StellarCustomDataSourceImpl, {
|
|
@@ -155,9 +143,13 @@ export class DeploymentV1_0_0 {
|
|
|
155
143
|
}
|
|
156
144
|
|
|
157
145
|
export class ProjectManifestV1_0_0Impl<D extends object = DeploymentV1_0_0>
|
|
158
|
-
extends ProjectManifestBaseImpl<
|
|
146
|
+
extends ProjectManifestBaseImpl<DeploymentV1_0_0>
|
|
159
147
|
implements StellarProjectManifestV1_0_0
|
|
160
148
|
{
|
|
149
|
+
constructor() {
|
|
150
|
+
super(DeploymentV1_0_0);
|
|
151
|
+
}
|
|
152
|
+
|
|
161
153
|
@Equals('1.0.0')
|
|
162
154
|
specVersion: string;
|
|
163
155
|
@Type(() => StellarCustomDataSourceImpl, {
|
|
@@ -168,8 +160,8 @@ export class ProjectManifestV1_0_0Impl<D extends object = DeploymentV1_0_0>
|
|
|
168
160
|
keepDiscriminatorProperty: true,
|
|
169
161
|
})
|
|
170
162
|
dataSources: SubqlStellarDataSource[];
|
|
171
|
-
@Type(() =>
|
|
172
|
-
network:
|
|
163
|
+
@Type(() => StellarProjectNetwork)
|
|
164
|
+
network: StellarProjectNetwork;
|
|
173
165
|
@IsString()
|
|
174
166
|
name: string;
|
|
175
167
|
@IsString()
|
|
@@ -192,14 +184,9 @@ export class ProjectManifestV1_0_0Impl<D extends object = DeploymentV1_0_0>
|
|
|
192
184
|
@ValidateNested()
|
|
193
185
|
@Type(() => StellarRunnerSpecsImpl)
|
|
194
186
|
runner: RunnerSpecs;
|
|
195
|
-
protected _deployment: D;
|
|
196
187
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
validateSync(this._deployment, {whitelist: true});
|
|
202
|
-
}
|
|
203
|
-
return this._deployment;
|
|
204
|
-
}
|
|
188
|
+
@IsOptional()
|
|
189
|
+
@IsObject()
|
|
190
|
+
@Type(() => ParentProjectModel)
|
|
191
|
+
parent?: ParentProject;
|
|
205
192
|
}
|
package/test/project_1.0.0.yaml
CHANGED
|
@@ -32,7 +32,7 @@ dataSources:
|
|
|
32
32
|
- handler: handleOperation
|
|
33
33
|
kind: stellar/OperationHandler
|
|
34
34
|
filter:
|
|
35
|
-
|
|
35
|
+
sourceAccount: 'GAKNXHJ5PCZYFIBNBWB4RCQHH6GDEO7Z334N74BOQUQCHKOURQEPMXCH'
|
|
36
36
|
type: 'account_merge'
|
|
37
37
|
- handler: handleEffect
|
|
38
38
|
kind: stellar/EffectHandler
|
|
@@ -1,7 +0,0 @@
|
|
|
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>;
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// Copyright 2020-2023 SubQuery Pte Ltd authors & contributors
|
|
2
|
-
// SPDX-License-Identifier: GPL-3.0
|
|
3
|
-
|
|
4
|
-
import {ProjectManifestV1_0_0, TemplateBase} from '@subql/common';
|
|
5
|
-
import {SubqlCustomDatasource, SubqlRuntimeDatasource} from '@subql/types-stellar';
|
|
6
|
-
|
|
7
|
-
export interface RuntimeDatasourceTemplate extends Omit<SubqlRuntimeDatasource, 'name'>, TemplateBase {}
|
|
8
|
-
export interface CustomDatasourceTemplate extends Omit<SubqlCustomDatasource, 'name'>, TemplateBase {}
|
|
9
|
-
|
|
10
|
-
export type StellarProjectManifestV1_0_0 = ProjectManifestV1_0_0<
|
|
11
|
-
RuntimeDatasourceTemplate | CustomDatasourceTemplate,
|
|
12
|
-
SubqlRuntimeDatasource | SubqlCustomDatasource
|
|
13
|
-
>;
|