Skip to content

Commit

Permalink
Remove name from datasource in v0.2.0 manifest spec
Browse files Browse the repository at this point in the history
  • Loading branch information
stwiname committed Oct 4, 2021
1 parent 608a9ad commit e3db9ef
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions packages/common/src/project/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ export class RuntimeDataSourceBase<M extends SubqlMapping> implements SubqlRunti
@Type(() => Mapping)
@ValidateNested()
mapping: M;
@IsString()
name: string;
@IsOptional()
@IsInt()
startBlock?: number;
Expand Down
1 change: 0 additions & 1 deletion packages/common/src/project/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export interface SubqlMapping {
}

export interface SubqlDatasource<M extends SubqlMapping> {
name: string;
kind: SubqlKind;
startBlock?: number;
mapping: M;
Expand Down
2 changes: 2 additions & 0 deletions packages/common/src/project/versioned/v0_0_1/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export class RuntimeDataSourceV0_0_1Impl
extends RuntimeDataSourceBase<SubqlMapping>
implements RuntimeDataSrouceV0_0_1
{
@IsString()
name: string;
@IsOptional()
@ValidateNested()
@Type(() => NetworkFilter)
Expand Down
1 change: 1 addition & 0 deletions packages/common/src/project/versioned/v0_0_1/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {IProjectManifest, ProjectNetworkConfig, SubqlRuntimeDatasource, SubqlNet
export type ProjectNetworkConfigV0_0_1 = ProjectNetworkConfig & RegisteredTypes;

export interface RuntimeDataSrouceV0_0_1 extends SubqlRuntimeDatasource {
name: string;
filter?: SubqlNetworkFilter;
}

Expand Down
3 changes: 1 addition & 2 deletions packages/common/test/project_0.2.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ network:
file: ./types.json

dataSources:
- name: main
kind: substrate/Runtime
- kind: substrate/Runtime
startBlock: 1
mapping:
file: dist/index.js
Expand Down
3 changes: 1 addition & 2 deletions packages/node/test/projectFixture/v0.2.0/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ network:
file: ./types.yaml

dataSources:
- name: main
kind: substrate/Runtime
- kind: substrate/Runtime
startBlock: 1
mapping:
file: dist/index.js
Expand Down

0 comments on commit e3db9ef

Please sign in to comment.