Skip to content

Commit 87f4051

Browse files
Fix runtime schema interfaces: restore isNode to NodeSpec, keep removed from FieldSpec
- Add isNode field back to NodeSpec interface while keeping it removed from FieldSpec - Update runtime schema generator to include isNode in NodeSpec objects - Update TypeScript generation to reflect correct interface structure - Regenerate all runtime schema files and test snapshots - Maintain enhanced AST generation functionality with corrected schema Co-Authored-By: Dan Lynch <[email protected]>
1 parent 8eb6df4 commit 87f4051

File tree

12 files changed

+3611
-1398
lines changed

12 files changed

+3611
-1398
lines changed

__fixtures__/output/runtime-schema/full-features/complete-schema.json

Lines changed: 255 additions & 0 deletions
Large diffs are not rendered by default.

__fixtures__/output/runtime-schema/json/custom-filename/custom-node-specs.json

Lines changed: 255 additions & 0 deletions
Large diffs are not rendered by default.

__fixtures__/output/runtime-schema/json/enabled/runtime-schema.json

Lines changed: 255 additions & 0 deletions
Large diffs are not rendered by default.

__fixtures__/output/runtime-schema/latest-proto/latest-schema.json

Lines changed: 271 additions & 0 deletions
Large diffs are not rendered by default.

__fixtures__/output/runtime-schema/typescript/custom-filename/custom-node-specs.ts

Lines changed: 256 additions & 0 deletions
Large diffs are not rendered by default.

__fixtures__/output/runtime-schema/typescript/enabled/runtime-schema.ts

Lines changed: 256 additions & 0 deletions
Large diffs are not rendered by default.

__fixtures__/output/runtime-schema/typescript/full-features/complete-schema.ts

Lines changed: 256 additions & 0 deletions
Large diffs are not rendered by default.

packages/proto-parser/__tests__/__snapshots__/runtime-schema.test.ts.snap

Lines changed: 1804 additions & 0 deletions
Large diffs are not rendered by default.

packages/proto-parser/src/runtime-schema/generator.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export class RuntimeSchemaGenerator {
5353

5454
return {
5555
name: type.name,
56+
isNode: this.nodeTypes.has(type.name),
5657
fields: fields.sort((a, b) => a.name.localeCompare(b.name))
5758
};
5859
}

packages/proto-parser/src/runtime-schema/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export interface FieldSpec {
77

88
export interface NodeSpec {
99
name: string;
10+
isNode: boolean;
1011
fields: FieldSpec[];
1112
}
1213

0 commit comments

Comments
 (0)