adorn-api 1.0.13 → 1.0.15
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/dist/adapter/express/auth.d.ts +8 -0
- package/dist/adapter/express/auth.d.ts.map +1 -1
- package/dist/adapter/express/bootstrap.d.ts +14 -1
- package/dist/adapter/express/bootstrap.d.ts.map +1 -1
- package/dist/adapter/express/coercion.d.ts +81 -1
- package/dist/adapter/express/coercion.d.ts.map +1 -1
- package/dist/adapter/express/index.d.ts +1 -0
- package/dist/adapter/express/index.d.ts.map +1 -1
- package/dist/adapter/express/merge.d.ts +17 -0
- package/dist/adapter/express/merge.d.ts.map +1 -1
- package/dist/adapter/express/openapi.d.ts +55 -0
- package/dist/adapter/express/openapi.d.ts.map +1 -1
- package/dist/adapter/express/router.d.ts +6 -0
- package/dist/adapter/express/router.d.ts.map +1 -1
- package/dist/adapter/express/swagger.d.ts +6 -0
- package/dist/adapter/express/swagger.d.ts.map +1 -1
- package/dist/adapter/express/types.d.ts +39 -0
- package/dist/adapter/express/types.d.ts.map +1 -1
- package/dist/adapter/express/validation.d.ts +19 -2
- package/dist/adapter/express/validation.d.ts.map +1 -1
- package/dist/cli.cjs +192 -11
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +192 -11
- package/dist/cli.js.map +1 -1
- package/dist/compiler/analyze/index.d.ts +5 -0
- package/dist/compiler/analyze/index.d.ts.map +1 -0
- package/dist/compiler/analyze/scanControllers.d.ts +52 -0
- package/dist/compiler/analyze/scanControllers.d.ts.map +1 -1
- package/dist/compiler/cache/isStale.d.ts +26 -0
- package/dist/compiler/cache/isStale.d.ts.map +1 -1
- package/dist/compiler/cache/loadArtifacts.d.ts +36 -0
- package/dist/compiler/cache/loadArtifacts.d.ts.map +1 -1
- package/dist/compiler/cache/schema.d.ts +14 -0
- package/dist/compiler/cache/schema.d.ts.map +1 -1
- package/dist/compiler/cache/writeCache.d.ts +6 -0
- package/dist/compiler/cache/writeCache.d.ts.map +1 -1
- package/dist/compiler/gems.d.ts +75 -0
- package/dist/compiler/gems.d.ts.map +1 -0
- package/dist/compiler/generator/index.d.ts +7 -0
- package/dist/compiler/generator/index.d.ts.map +1 -0
- package/dist/compiler/generator/manifest.d.ts +23 -0
- package/dist/compiler/generator/manifest.d.ts.map +1 -0
- package/dist/compiler/generator/openapi.d.ts +118 -0
- package/dist/compiler/generator/openapi.d.ts.map +1 -0
- package/dist/compiler/graph/builder.d.ts +24 -0
- package/dist/compiler/graph/builder.d.ts.map +1 -0
- package/dist/compiler/graph/index.d.ts +7 -0
- package/dist/compiler/graph/index.d.ts.map +1 -0
- package/dist/compiler/graph/schemaGraph.d.ts +67 -0
- package/dist/compiler/graph/schemaGraph.d.ts.map +1 -0
- package/dist/compiler/graph/types.d.ts +203 -0
- package/dist/compiler/graph/types.d.ts.map +1 -0
- package/dist/compiler/index.d.ts +12 -0
- package/dist/compiler/index.d.ts.map +1 -0
- package/dist/compiler/ir/index.d.ts +7 -0
- package/dist/compiler/ir/index.d.ts.map +1 -0
- package/dist/compiler/ir/pipeline.d.ts +82 -0
- package/dist/compiler/ir/pipeline.d.ts.map +1 -0
- package/dist/compiler/ir/stages.d.ts +40 -0
- package/dist/compiler/ir/stages.d.ts.map +1 -0
- package/dist/compiler/ir/visitor.d.ts +98 -0
- package/dist/compiler/ir/visitor.d.ts.map +1 -0
- package/dist/compiler/manifest/emit.d.ts +14 -0
- package/dist/compiler/manifest/emit.d.ts.map +1 -1
- package/dist/compiler/manifest/format.d.ts +42 -0
- package/dist/compiler/manifest/format.d.ts.map +1 -1
- package/dist/compiler/manifest/index.d.ts +6 -0
- package/dist/compiler/manifest/index.d.ts.map +1 -0
- package/dist/compiler/runner/createProgram.d.ts +16 -0
- package/dist/compiler/runner/createProgram.d.ts.map +1 -1
- package/dist/compiler/runner/index.d.ts +5 -0
- package/dist/compiler/runner/index.d.ts.map +1 -0
- package/dist/compiler/schema/extractAnnotations.d.ts +47 -0
- package/dist/compiler/schema/extractAnnotations.d.ts.map +1 -1
- package/dist/compiler/schema/index.d.ts +6 -0
- package/dist/compiler/schema/index.d.ts.map +1 -0
- package/dist/compiler/schema/intersectionHandler.d.ts +37 -0
- package/dist/compiler/schema/intersectionHandler.d.ts.map +1 -1
- package/dist/compiler/schema/objectHandler.d.ts +86 -0
- package/dist/compiler/schema/objectHandler.d.ts.map +1 -1
- package/dist/compiler/schema/openapi.d.ts +15 -0
- package/dist/compiler/schema/openapi.d.ts.map +1 -1
- package/dist/compiler/schema/parameters.d.ts +72 -0
- package/dist/compiler/schema/parameters.d.ts.map +1 -1
- package/dist/compiler/schema/primitives.d.ts +58 -0
- package/dist/compiler/schema/primitives.d.ts.map +1 -1
- package/dist/compiler/schema/typeToJsonSchema.d.ts +20 -0
- package/dist/compiler/schema/typeToJsonSchema.d.ts.map +1 -1
- package/dist/compiler/schema/types.d.ts +15 -0
- package/dist/compiler/schema/types.d.ts.map +1 -1
- package/dist/compiler/schema/unionHandler.d.ts +60 -0
- package/dist/compiler/schema/unionHandler.d.ts.map +1 -1
- package/dist/compiler/transform/dedup.d.ts +35 -0
- package/dist/compiler/transform/dedup.d.ts.map +1 -0
- package/dist/compiler/transform/flatten.d.ts +50 -0
- package/dist/compiler/transform/flatten.d.ts.map +1 -0
- package/dist/compiler/transform/index.d.ts +7 -0
- package/dist/compiler/transform/index.d.ts.map +1 -0
- package/dist/compiler/transform/inline.d.ts +46 -0
- package/dist/compiler/transform/inline.d.ts.map +1 -0
- package/dist/compiler/validation/emitPrecompiledValidators.d.ts +16 -0
- package/dist/compiler/validation/emitPrecompiledValidators.d.ts.map +1 -1
- package/dist/compiler/validation/index.d.ts +5 -0
- package/dist/compiler/validation/index.d.ts.map +1 -0
- package/dist/decorators/Auth.d.ts +17 -0
- package/dist/decorators/Auth.d.ts.map +1 -1
- package/dist/decorators/Controller.d.ts +15 -0
- package/dist/decorators/Controller.d.ts.map +1 -1
- package/dist/decorators/Public.d.ts +13 -0
- package/dist/decorators/Public.d.ts.map +1 -1
- package/dist/decorators/Use.d.ts +18 -0
- package/dist/decorators/Use.d.ts.map +1 -1
- package/dist/decorators/methods.d.ts +20 -0
- package/dist/decorators/methods.d.ts.map +1 -1
- package/dist/express.cjs +71 -11
- package/dist/express.cjs.map +1 -1
- package/dist/express.d.ts +1 -0
- package/dist/express.d.ts.map +1 -1
- package/dist/express.js +71 -11
- package/dist/express.js.map +1 -1
- package/dist/index.cjs +160 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +155 -2
- package/dist/index.js.map +1 -1
- package/dist/metal/applyListQuery.d.ts +73 -0
- package/dist/metal/applyListQuery.d.ts.map +1 -1
- package/dist/metal/index.cjs.map +1 -1
- package/dist/metal/index.d.ts +4 -0
- package/dist/metal/index.d.ts.map +1 -1
- package/dist/metal/index.js.map +1 -1
- package/dist/metal/listQuery.d.ts +19 -0
- package/dist/metal/listQuery.d.ts.map +1 -1
- package/dist/metal/queryOptions.d.ts +8 -0
- package/dist/metal/queryOptions.d.ts.map +1 -1
- package/dist/metal/readMetalBag.d.ts +36 -0
- package/dist/metal/readMetalBag.d.ts.map +1 -1
- package/dist/metal/registerMetalEntities.d.ts +20 -0
- package/dist/metal/registerMetalEntities.d.ts.map +1 -1
- package/dist/metal/schemaFromEntity.d.ts +30 -0
- package/dist/metal/schemaFromEntity.d.ts.map +1 -1
- package/dist/metal/searchWhere.d.ts +39 -0
- package/dist/metal/searchWhere.d.ts.map +1 -1
- package/dist/metal/symbolMetadata.d.ts +6 -0
- package/dist/metal/symbolMetadata.d.ts.map +1 -1
- package/dist/runtime/auth/runtime.d.ts +155 -6
- package/dist/runtime/auth/runtime.d.ts.map +1 -1
- package/dist/runtime/metadata/bucket.d.ts +1 -2
- package/dist/runtime/metadata/bucket.d.ts.map +1 -1
- package/dist/runtime/metadata/key.d.ts +1 -1
- package/dist/runtime/metadata/key.d.ts.map +1 -1
- package/dist/runtime/metadata/read.d.ts +1 -2
- package/dist/runtime/metadata/read.d.ts.map +1 -1
- package/dist/runtime/metadata/types.d.ts +74 -0
- package/dist/runtime/metadata/types.d.ts.map +1 -1
- package/dist/runtime/polyfill.d.ts +1 -1
- package/dist/runtime/polyfill.d.ts.map +1 -1
- package/dist/runtime/upload.d.ts +37 -0
- package/dist/runtime/upload.d.ts.map +1 -1
- package/dist/runtime/validation/ajv.d.ts +100 -0
- package/dist/runtime/validation/ajv.d.ts.map +1 -1
- package/dist/runtime/validation/index.d.ts +9 -0
- package/dist/runtime/validation/index.d.ts.map +1 -1
- package/dist/scripts/adorn-example.cjs +238 -6
- package/dist/scripts/adorn-example.cjs.map +1 -1
- package/dist/utils/port.d.ts +9 -0
- package/dist/utils/port.d.ts.map +1 -0
- package/package.json +3 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaGraph.d.ts","sourceRoot":"","sources":["../../../src/compiler/graph/schemaGraph.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAgB,MAAM,YAAY,CAAC;AAG9D;;GAEG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,SAAS,CAAuC;IACxD,OAAO,CAAC,gBAAgB,CAAuC;gBAEnD,KAAK,EAAE,KAAK;IAKxB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAc3B;;OAEG;IACH,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE;IAaxC;;OAEG;IACH,YAAY,IAAI,WAAW;IAkB3B;;OAEG;IACH,OAAO,CAAC,eAAe;IA0BvB;;OAEG;IACH,+BAA+B,IAAI,MAAM,EAAE,EAAE;IA8C7C;;OAEG;IACH,eAAe,IAAI,MAAM,EAAE;IAwC3B;;OAEG;IACH,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IAuB/C;;OAEG;IACH,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI;IA0B/D;;OAEG;IACH,OAAO,CAAC,eAAe;IAiBvB;;OAEG;IACH,cAAc,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAqCvC;;OAEG;IACH,QAAQ,IAAI,KAAK;CAGlB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Graph-Based Intermediate Representation (GBIR) type definitions.
|
|
3
|
+
* Provides the core data structures for the graph-based compiler architecture.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Unique identifier for a node in the graph
|
|
7
|
+
*/
|
|
8
|
+
export type NodeId = string;
|
|
9
|
+
/**
|
|
10
|
+
* All possible node kinds in the compiler graph
|
|
11
|
+
*/
|
|
12
|
+
export type NodeKind = 'TypeDefinition' | 'Controller' | 'Operation' | 'Parameter' | 'SchemaComponent' | 'Validator' | 'Interface' | 'Enum' | 'Union' | 'Intersection';
|
|
13
|
+
/**
|
|
14
|
+
* Relationship types between graph nodes
|
|
15
|
+
*/
|
|
16
|
+
export type EdgeRelation = 'uses' | 'extends' | 'implements' | 'validates' | 'references' | 'dependsOn' | 'generates' | 'annotates' | 'contains';
|
|
17
|
+
/**
|
|
18
|
+
* Edge in the graph with metadata
|
|
19
|
+
*/
|
|
20
|
+
export interface GraphEdge {
|
|
21
|
+
targetId: NodeId;
|
|
22
|
+
relation: EdgeRelation;
|
|
23
|
+
properties?: Record<string, unknown>;
|
|
24
|
+
weight?: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Source location for debugging and error reporting
|
|
28
|
+
*/
|
|
29
|
+
export interface SourceLocation {
|
|
30
|
+
filePath: string;
|
|
31
|
+
line: number;
|
|
32
|
+
column: number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Node metadata shared across all node types
|
|
36
|
+
*/
|
|
37
|
+
export interface NodeMetadata {
|
|
38
|
+
name: string;
|
|
39
|
+
sourceLocation: SourceLocation;
|
|
40
|
+
tags?: Set<string>;
|
|
41
|
+
annotations?: Map<string, unknown>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Base interface for all graph nodes
|
|
45
|
+
*/
|
|
46
|
+
export interface GraphNode {
|
|
47
|
+
id: NodeId;
|
|
48
|
+
kind: NodeKind;
|
|
49
|
+
metadata: NodeMetadata;
|
|
50
|
+
edges: GraphEdge[];
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Type definition node (class, interface, type alias)
|
|
54
|
+
*/
|
|
55
|
+
export interface TypeDefinitionNode extends GraphNode {
|
|
56
|
+
kind: 'TypeDefinition';
|
|
57
|
+
typeDef: {
|
|
58
|
+
isGeneric: boolean;
|
|
59
|
+
typeParameters?: string[];
|
|
60
|
+
properties?: Map<string, NodeId>;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Controller node representing a controller class
|
|
65
|
+
*/
|
|
66
|
+
export interface ControllerNode extends GraphNode {
|
|
67
|
+
kind: 'Controller';
|
|
68
|
+
controller: {
|
|
69
|
+
basePath: string;
|
|
70
|
+
consumes?: string[];
|
|
71
|
+
produces?: string[];
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Operation node representing an HTTP endpoint
|
|
76
|
+
*/
|
|
77
|
+
export interface OperationNode extends GraphNode {
|
|
78
|
+
kind: 'Operation';
|
|
79
|
+
operation: {
|
|
80
|
+
httpMethod: string;
|
|
81
|
+
path: string;
|
|
82
|
+
operationId: string;
|
|
83
|
+
returnType: NodeId;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Parameter node for operation parameters
|
|
88
|
+
*/
|
|
89
|
+
export interface ParameterNode extends GraphNode {
|
|
90
|
+
kind: 'Parameter';
|
|
91
|
+
parameter: {
|
|
92
|
+
index: number;
|
|
93
|
+
location: 'path' | 'query' | 'body' | 'header' | 'cookie';
|
|
94
|
+
type: NodeId;
|
|
95
|
+
isOptional: boolean;
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Schema component node (for OpenAPI/JSON Schema components)
|
|
100
|
+
*/
|
|
101
|
+
export interface SchemaComponentNode extends GraphNode {
|
|
102
|
+
kind: 'SchemaComponent';
|
|
103
|
+
schema: {
|
|
104
|
+
schemaType: 'object' | 'array' | 'primitive' | 'enum' | 'union' | 'intersection';
|
|
105
|
+
definition: unknown;
|
|
106
|
+
isExternal: boolean;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Validator node for runtime validation
|
|
111
|
+
*/
|
|
112
|
+
export interface ValidatorNode extends GraphNode {
|
|
113
|
+
kind: 'Validator';
|
|
114
|
+
validator: {
|
|
115
|
+
schemaRef: NodeId;
|
|
116
|
+
mode: 'ajv-runtime' | 'precompiled';
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Interface definition node
|
|
121
|
+
*/
|
|
122
|
+
export interface InterfaceNode extends GraphNode {
|
|
123
|
+
kind: 'Interface';
|
|
124
|
+
interfaceDef: {
|
|
125
|
+
methods?: Map<string, NodeId>;
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Enum definition node
|
|
130
|
+
*/
|
|
131
|
+
export interface EnumNode extends GraphNode {
|
|
132
|
+
kind: 'Enum';
|
|
133
|
+
enumDef: {
|
|
134
|
+
values: string[];
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Union type node
|
|
139
|
+
*/
|
|
140
|
+
export interface UnionNode extends GraphNode {
|
|
141
|
+
kind: 'Union';
|
|
142
|
+
union: {
|
|
143
|
+
types: NodeId[];
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Intersection type node
|
|
148
|
+
*/
|
|
149
|
+
export interface IntersectionNode extends GraphNode {
|
|
150
|
+
kind: 'Intersection';
|
|
151
|
+
intersection: {
|
|
152
|
+
types: NodeId[];
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Union type for all possible graph nodes
|
|
157
|
+
*/
|
|
158
|
+
export type AnyNode = TypeDefinitionNode | ControllerNode | OperationNode | ParameterNode | SchemaComponentNode | ValidatorNode | InterfaceNode | EnumNode | UnionNode | IntersectionNode;
|
|
159
|
+
/**
|
|
160
|
+
* The main graph structure containing nodes and relationships
|
|
161
|
+
*/
|
|
162
|
+
export interface Graph {
|
|
163
|
+
nodes: Map<NodeId, AnyNode>;
|
|
164
|
+
roots: Set<NodeId>;
|
|
165
|
+
version: string;
|
|
166
|
+
metadata: {
|
|
167
|
+
createdAt: string;
|
|
168
|
+
generatedBy: string;
|
|
169
|
+
tsVersion?: string;
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Create a new empty graph
|
|
174
|
+
*/
|
|
175
|
+
export declare function createGraph(tsVersion?: string): Graph;
|
|
176
|
+
/**
|
|
177
|
+
* Generate a unique node ID
|
|
178
|
+
*/
|
|
179
|
+
export declare function generateNodeId(kind: NodeKind, name: string): NodeId;
|
|
180
|
+
/**
|
|
181
|
+
* Add a node to the graph
|
|
182
|
+
*/
|
|
183
|
+
export declare function addNode(graph: Graph, node: AnyNode): void;
|
|
184
|
+
/**
|
|
185
|
+
* Remove a node from the graph
|
|
186
|
+
*/
|
|
187
|
+
export declare function removeNode(graph: Graph, nodeId: NodeId): void;
|
|
188
|
+
/**
|
|
189
|
+
* Add an edge between two nodes
|
|
190
|
+
*/
|
|
191
|
+
export declare function addEdge(graph: Graph, sourceId: NodeId, targetId: NodeId, relation: EdgeRelation, properties?: Record<string, unknown>): void;
|
|
192
|
+
/**
|
|
193
|
+
* Get all nodes of a specific kind
|
|
194
|
+
*/
|
|
195
|
+
export declare function getNodesByKind<T extends AnyNode>(graph: Graph, kind: T['kind']): T[];
|
|
196
|
+
/**
|
|
197
|
+
* Get all edges of a specific relation type
|
|
198
|
+
*/
|
|
199
|
+
export declare function getEdgesByRelation(graph: Graph, relation: EdgeRelation): {
|
|
200
|
+
sourceId: NodeId;
|
|
201
|
+
edge: GraphEdge;
|
|
202
|
+
}[];
|
|
203
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/compiler/graph/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC;AAE5B;;GAEG;AACH,MAAM,MAAM,QAAQ,GAChB,gBAAgB,GAChB,YAAY,GACZ,WAAW,GACX,WAAW,GACX,iBAAiB,GACjB,WAAW,GACX,WAAW,GACX,MAAM,GACN,OAAO,GACP,cAAc,CAAC;AAEnB;;GAEG;AACH,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,SAAS,GACT,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,WAAW,GACX,WAAW,GACX,WAAW,GACX,UAAU,CAAC;AAEf;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,YAAY,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,M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,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,YAAY,GACrB;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,SAAS,CAAA;CAAE,EAAE,CAYzC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compiler exports - GEMS Graph-Based Compiler
|
|
3
|
+
*/
|
|
4
|
+
export * from './gems.js';
|
|
5
|
+
export * from './graph/index.js';
|
|
6
|
+
export * from './ir/index.js';
|
|
7
|
+
export * from './transform/index.js';
|
|
8
|
+
export * from './generator/index.js';
|
|
9
|
+
export * from './runner/createProgram.js';
|
|
10
|
+
export * from './graph/schemaGraph.js';
|
|
11
|
+
export * from './graph/builder.js';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/compiler/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/compiler/ir/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IR Pipeline orchestrator for multi-stage graph transformation.
|
|
3
|
+
* Manages compilation stages with dependency resolution.
|
|
4
|
+
*/
|
|
5
|
+
import type { Graph } from "../graph/types.js";
|
|
6
|
+
/**
|
|
7
|
+
* Transformation stage in the IR pipeline
|
|
8
|
+
*/
|
|
9
|
+
export interface IRStage {
|
|
10
|
+
name: string;
|
|
11
|
+
process(graph: Graph): Promise<Graph> | Graph;
|
|
12
|
+
dependencies?: string[];
|
|
13
|
+
description?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Pipeline execution result
|
|
17
|
+
*/
|
|
18
|
+
export interface PipelineResult {
|
|
19
|
+
graph: Graph;
|
|
20
|
+
stagesExecuted: string[];
|
|
21
|
+
duration: number;
|
|
22
|
+
errors: Error[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* IR Pipeline for multi-stage compilation
|
|
26
|
+
*/
|
|
27
|
+
export declare class IRPipeline {
|
|
28
|
+
private stages;
|
|
29
|
+
private executionHistory;
|
|
30
|
+
/**
|
|
31
|
+
* Register a transformation stage
|
|
32
|
+
*/
|
|
33
|
+
addStage(stage: IRStage): void;
|
|
34
|
+
/**
|
|
35
|
+
* Remove a stage from the pipeline
|
|
36
|
+
*/
|
|
37
|
+
removeStage(stageName: string): void;
|
|
38
|
+
/**
|
|
39
|
+
* Get a stage by name
|
|
40
|
+
*/
|
|
41
|
+
getStage(stageName: string): IRStage | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Get all registered stages
|
|
44
|
+
*/
|
|
45
|
+
getAllStages(): IRStage[];
|
|
46
|
+
/**
|
|
47
|
+
* Execute the entire pipeline
|
|
48
|
+
*/
|
|
49
|
+
execute(initialGraph: Graph): Promise<PipelineResult>;
|
|
50
|
+
/**
|
|
51
|
+
* Execute only specific stages
|
|
52
|
+
*/
|
|
53
|
+
executeFrom(initialGraph: Graph, fromStage: string): Promise<PipelineResult>;
|
|
54
|
+
/**
|
|
55
|
+
* Execute only up to a specific stage
|
|
56
|
+
*/
|
|
57
|
+
executeTo(initialGraph: Graph, toStage: string): Promise<PipelineResult>;
|
|
58
|
+
/**
|
|
59
|
+
* Resolve execution order based on dependencies
|
|
60
|
+
*/
|
|
61
|
+
private resolveExecutionOrder;
|
|
62
|
+
/**
|
|
63
|
+
* Get execution history
|
|
64
|
+
*/
|
|
65
|
+
getExecutionHistory(): string[];
|
|
66
|
+
/**
|
|
67
|
+
* Clear execution history
|
|
68
|
+
*/
|
|
69
|
+
clearHistory(): void;
|
|
70
|
+
/**
|
|
71
|
+
* Validate pipeline configuration
|
|
72
|
+
*/
|
|
73
|
+
validate(): {
|
|
74
|
+
valid: boolean;
|
|
75
|
+
errors: string[];
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Create a default pipeline with standard stages
|
|
80
|
+
*/
|
|
81
|
+
export declare function createDefaultPipeline(): IRPipeline;
|
|
82
|
+
//# sourceMappingURL=pipeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../../src/compiler/ir/pipeline.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;IAC9C,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,KAAK,CAAC;IACb,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,KAAK,EAAE,CAAC;CACjB;AAED;;GAEG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAmC;IACjD,OAAO,CAAC,gBAAgB,CAAgB;IAExC;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAI9B;;OAEG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAIpC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAIhD;;OAEG;IACH,YAAY,IAAI,OAAO,EAAE;IAIzB;;OAEG;IACG,OAAO,CAAC,YAAY,EAAE,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC;IAkD3D;;OAEG;IACG,WAAW,CACf,YAAY,EAAE,KAAK,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,cAAc,CAAC;IAsB1B;;OAEG;IACG,SAAS,CACb,YAAY,EAAE,KAAK,EACnB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,cAAc,CAAC;IAsB1B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAwC7B;;OAEG;IACH,mBAAmB,IAAI,MAAM,EAAE;IAI/B;;OAEG;IACH,YAAY,IAAI,IAAI;IAIpB;;OAEG;IACH,QAAQ,IAAI;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE;CA0BjD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,UAAU,CAOlD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { IRStage } from "./pipeline.js";
|
|
2
|
+
/**
|
|
3
|
+
* Stage names
|
|
4
|
+
*/
|
|
5
|
+
export declare const STAGE_NAMES: {
|
|
6
|
+
readonly PARSE: "parse";
|
|
7
|
+
readonly TYPE_RESOLVE: "type-resolve";
|
|
8
|
+
readonly NORMALIZE: "normalize";
|
|
9
|
+
readonly OPTIMIZE: "optimize";
|
|
10
|
+
readonly GENERATE: "generate";
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Parse stage - builds graph from AST
|
|
14
|
+
*/
|
|
15
|
+
export declare const parseStage: IRStage;
|
|
16
|
+
/**
|
|
17
|
+
* Type resolution stage - resolves type references
|
|
18
|
+
*/
|
|
19
|
+
export declare const typeResolveStage: IRStage;
|
|
20
|
+
/**
|
|
21
|
+
* Normalization stage - normalizes graph structure
|
|
22
|
+
*/
|
|
23
|
+
export declare const normalizeStage: IRStage;
|
|
24
|
+
/**
|
|
25
|
+
* Optimization stage - applies optimizations
|
|
26
|
+
*/
|
|
27
|
+
export declare const optimizeStage: IRStage;
|
|
28
|
+
/**
|
|
29
|
+
* Generation stage - generates outputs
|
|
30
|
+
*/
|
|
31
|
+
export declare const generateStage: IRStage;
|
|
32
|
+
/**
|
|
33
|
+
* Get all default stages
|
|
34
|
+
*/
|
|
35
|
+
export declare function getAllStages(): IRStage[];
|
|
36
|
+
/**
|
|
37
|
+
* Create custom pipeline with selected stages
|
|
38
|
+
*/
|
|
39
|
+
export declare function createCustomPipeline(stageNames: (typeof STAGE_NAMES)[keyof typeof STAGE_NAMES][]): IRStage[];
|
|
40
|
+
//# sourceMappingURL=stages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stages.d.ts","sourceRoot":"","sources":["../../../src/compiler/ir/stages.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;CAMd,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,OASxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,OAS9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,OAS5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,OAS3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,OAS3B,CAAC;AAEF;;GAEG;AACH,wBAAgB,YAAY,IAAI,OAAO,EAAE,CAQxC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,EAAE,GAC3D,OAAO,EAAE,CAmCX"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Visitor pattern for graph transformations.
|
|
3
|
+
* Provides flexible way to traverse and transform graph nodes.
|
|
4
|
+
*/
|
|
5
|
+
import type { GraphEdge, AnyNode, NodeKind } from "../graph/types.js";
|
|
6
|
+
import type { Graph } from "../graph/types.js";
|
|
7
|
+
/**
|
|
8
|
+
* Visitor context for tracking state during traversal
|
|
9
|
+
*/
|
|
10
|
+
export interface VisitorContext {
|
|
11
|
+
graph: Graph;
|
|
12
|
+
visited: Set<string>;
|
|
13
|
+
skipChildren: boolean;
|
|
14
|
+
replacements: Map<string, AnyNode>;
|
|
15
|
+
metadata: Map<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Create a new visitor context
|
|
19
|
+
*/
|
|
20
|
+
export declare function createVisitorContext(graph: Graph): VisitorContext;
|
|
21
|
+
/**
|
|
22
|
+
* Base visitor interface
|
|
23
|
+
*/
|
|
24
|
+
export interface GraphVisitor {
|
|
25
|
+
visitNode?(node: AnyNode, context: VisitorContext): AnyNode | null | void;
|
|
26
|
+
visitEdge?(edge: GraphEdge, sourceId: string, context: VisitorContext): GraphEdge | null | void;
|
|
27
|
+
beforeTraversal?(context: VisitorContext): void;
|
|
28
|
+
afterTraversal?(context: VisitorContext): void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Node transformer for specific node kinds
|
|
32
|
+
*/
|
|
33
|
+
export type NodeTransformer = (node: AnyNode, context: VisitorContext) => AnyNode | null | void;
|
|
34
|
+
/**
|
|
35
|
+
* Edge transformer
|
|
36
|
+
*/
|
|
37
|
+
export type EdgeTransformer = (edge: GraphEdge, sourceId: string, context: VisitorContext) => GraphEdge | null | void;
|
|
38
|
+
/**
|
|
39
|
+
* Transforming visitor that applies transformations to nodes and edges
|
|
40
|
+
*/
|
|
41
|
+
export declare class TransformingVisitor implements GraphVisitor {
|
|
42
|
+
private nodeTransformers;
|
|
43
|
+
private edgeTransformer?;
|
|
44
|
+
private beforeCallback?;
|
|
45
|
+
private afterCallback?;
|
|
46
|
+
/**
|
|
47
|
+
* Register a transformer for a specific node kind
|
|
48
|
+
*/
|
|
49
|
+
registerTransformer(kind: NodeKind, transformer: NodeTransformer): void;
|
|
50
|
+
/**
|
|
51
|
+
* Register a transformer for all edges
|
|
52
|
+
*/
|
|
53
|
+
registerEdgeTransformer(transformer: EdgeTransformer): void;
|
|
54
|
+
/**
|
|
55
|
+
* Set callback before traversal
|
|
56
|
+
*/
|
|
57
|
+
onBeforeTraversal(callback: (context: VisitorContext) => void): void;
|
|
58
|
+
/**
|
|
59
|
+
* Set callback after traversal
|
|
60
|
+
*/
|
|
61
|
+
onAfterTraversal(callback: (context: VisitorContext) => void): void;
|
|
62
|
+
visitNode(node: AnyNode, context: VisitorContext): AnyNode | null;
|
|
63
|
+
visitEdge(edge: GraphEdge, sourceId: string, context: VisitorContext): GraphEdge | null;
|
|
64
|
+
beforeTraversal(context: VisitorContext): void;
|
|
65
|
+
afterTraversal(context: VisitorContext): void;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Compose multiple visitors together
|
|
69
|
+
*/
|
|
70
|
+
export declare class CompositeVisitor implements GraphVisitor {
|
|
71
|
+
private visitors;
|
|
72
|
+
constructor(...visitors: GraphVisitor[]);
|
|
73
|
+
addVisitor(visitor: GraphVisitor): void;
|
|
74
|
+
visitNode(node: AnyNode, context: VisitorContext): AnyNode | null;
|
|
75
|
+
visitEdge(edge: GraphEdge, sourceId: string, context: VisitorContext): GraphEdge | null;
|
|
76
|
+
beforeTraversal(context: VisitorContext): void;
|
|
77
|
+
afterTraversal(context: VisitorContext): void;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Traverse the graph with a visitor
|
|
81
|
+
*/
|
|
82
|
+
export declare function traverseGraph(graph: Graph, visitor: GraphVisitor, options?: {
|
|
83
|
+
order?: 'preorder' | 'postorder' | 'levelorder';
|
|
84
|
+
startNodes?: Set<string>;
|
|
85
|
+
}): Graph;
|
|
86
|
+
/**
|
|
87
|
+
* Filter visitor that only visits nodes matching a predicate
|
|
88
|
+
*/
|
|
89
|
+
export declare class FilterVisitor implements GraphVisitor {
|
|
90
|
+
private predicate;
|
|
91
|
+
private innerVisitor;
|
|
92
|
+
constructor(predicate: (node: AnyNode) => boolean, innerVisitor: GraphVisitor);
|
|
93
|
+
visitNode(node: AnyNode, context: VisitorContext): AnyNode | null;
|
|
94
|
+
visitEdge(edge: GraphEdge, sourceId: string, context: VisitorContext): GraphEdge | null;
|
|
95
|
+
beforeTraversal(context: VisitorContext): void;
|
|
96
|
+
afterTraversal(context: VisitorContext): void;
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=visitor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visitor.d.ts","sourceRoot":"","sources":["../../../src/compiler/ir/visitor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAEV,SAAS,EACT,OAAO,EACP,QAAQ,EACT,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,KAAK,GAAG,cAAc,CAQjE;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1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,GAAG,IAAI;IAQvF,eAAe,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAI9C,cAAc,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;CAG9C"}
|
|
@@ -1,7 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Manifest generation module.
|
|
3
|
+
* Creates the manifest file describing the compiled API structure.
|
|
4
|
+
*/
|
|
1
5
|
import type { ScannedController } from "../analyze/scanControllers.js";
|
|
2
6
|
import type { ManifestV1 } from "./format.js";
|
|
3
7
|
import ts from "typescript";
|
|
4
8
|
type ValidationMode = "none" | "ajv-runtime" | "precompiled";
|
|
9
|
+
/**
|
|
10
|
+
* Generates the manifest file content from scanned controllers.
|
|
11
|
+
* The manifest describes the complete API structure including all controllers, operations, and their parameters.
|
|
12
|
+
*
|
|
13
|
+
* @param controllers - Array of scanned controllers to include in the manifest
|
|
14
|
+
* @param checker - TypeScript type checker for analyzing types
|
|
15
|
+
* @param version - Version of the adorn-api package
|
|
16
|
+
* @param validationMode - Validation mode to specify in the manifest (default: "ajv-runtime")
|
|
17
|
+
* @returns The generated manifest object
|
|
18
|
+
*/
|
|
5
19
|
export declare function generateManifest(controllers: ScannedController[], checker: ts.TypeChecker, version: string, validationMode?: ValidationMode): ManifestV1;
|
|
6
20
|
export {};
|
|
7
21
|
//# sourceMappingURL=emit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emit.d.ts","sourceRoot":"","sources":["../../../src/compiler/manifest/emit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAoB,MAAM,+BAA+B,CAAC;AACzF,OAAO,KAAK,EAAE,UAAU,EAAyD,MAAM,aAAa,CAAC;AAGrG,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,KAAK,cAAc,GAAG,MAAM,GAAG,aAAa,GAAG,aAAa,CAAC;AAE7D,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,iBAAiB,EAAE,EAChC,OAAO,EAAE,EAAE,CAAC,WAAW,EACvB,OAAO,EAAE,MAAM,EACf,cAAc,GAAE,cAA8B,GAC7C,UAAU,CAuCZ"}
|
|
1
|
+
{"version":3,"file":"emit.d.ts","sourceRoot":"","sources":["../../../src/compiler/manifest/emit.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAoB,MAAM,+BAA+B,CAAC;AACzF,OAAO,KAAK,EAAE,UAAU,EAAyD,MAAM,aAAa,CAAC;AAGrG,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,KAAK,cAAc,GAAG,MAAM,GAAG,aAAa,GAAG,aAAa,CAAC;AAE7D;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,iBAAiB,EAAE,EAChC,OAAO,EAAE,EAAE,CAAC,WAAW,EACvB,OAAO,EAAE,MAAM,EACf,cAAc,GAAE,cAA8B,GAC7C,UAAU,CAuCZ"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Manifest type definitions.
|
|
3
|
+
* Describes the structure of the manifest file generated during compilation.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Supported HTTP methods for API operations.
|
|
7
|
+
*/
|
|
1
8
|
export type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD";
|
|
9
|
+
/**
|
|
10
|
+
* Supported content types for request and response bodies.
|
|
11
|
+
*/
|
|
2
12
|
export type ContentType = "application/json" | "text/plain" | "application/octet-stream" | "multipart/form-data" | string;
|
|
13
|
+
/**
|
|
14
|
+
* Root manifest interface representing the complete API metadata.
|
|
15
|
+
* Contains version, generation info, schema references, and all controller definitions.
|
|
16
|
+
*/
|
|
3
17
|
export interface ManifestV1 {
|
|
4
18
|
manifestVersion: 1;
|
|
5
19
|
generatedAt: string;
|
|
@@ -19,11 +33,19 @@ export interface ManifestV1 {
|
|
|
19
33
|
};
|
|
20
34
|
controllers: ControllerEntry[];
|
|
21
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Represents a controller entry in the manifest.
|
|
38
|
+
* Contains the controller identifier and all its operations.
|
|
39
|
+
*/
|
|
22
40
|
export interface ControllerEntry {
|
|
23
41
|
controllerId: string;
|
|
24
42
|
basePath: string;
|
|
25
43
|
operations: OperationEntry[];
|
|
26
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Represents a single API operation (endpoint) in the manifest.
|
|
47
|
+
* Contains operation ID, HTTP method/path, handler reference, arguments, and responses.
|
|
48
|
+
*/
|
|
27
49
|
export interface OperationEntry {
|
|
28
50
|
operationId: string;
|
|
29
51
|
http: {
|
|
@@ -36,6 +58,10 @@ export interface OperationEntry {
|
|
|
36
58
|
args: ArgsSpec;
|
|
37
59
|
responses: ResponseSpec[];
|
|
38
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Specification of all arguments for an operation.
|
|
63
|
+
* Groups arguments by their location (body, path, query, headers, cookies).
|
|
64
|
+
*/
|
|
39
65
|
export interface ArgsSpec {
|
|
40
66
|
body: BodyArgSpec | null;
|
|
41
67
|
path: NamedArgSpec[];
|
|
@@ -43,6 +69,9 @@ export interface ArgsSpec {
|
|
|
43
69
|
headers: NamedArgSpec[];
|
|
44
70
|
cookies: NamedArgSpec[];
|
|
45
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Specification for a request body argument.
|
|
74
|
+
*/
|
|
46
75
|
export interface BodyArgSpec {
|
|
47
76
|
index: number;
|
|
48
77
|
required: boolean;
|
|
@@ -50,10 +79,17 @@ export interface BodyArgSpec {
|
|
|
50
79
|
schemaRef: string;
|
|
51
80
|
encoding?: Record<string, EncodingSpec>;
|
|
52
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Encoding options for multipart request bodies.
|
|
84
|
+
*/
|
|
53
85
|
export interface EncodingSpec {
|
|
54
86
|
contentType?: string;
|
|
55
87
|
headers?: Record<string, string>;
|
|
56
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* Specification for named arguments (path, query, headers, cookies).
|
|
91
|
+
* Contains the parameter name, index, requirement status, and schema reference.
|
|
92
|
+
*/
|
|
57
93
|
export interface NamedArgSpec {
|
|
58
94
|
name: string;
|
|
59
95
|
index: number;
|
|
@@ -63,11 +99,17 @@ export interface NamedArgSpec {
|
|
|
63
99
|
serialization?: SerializationSpec;
|
|
64
100
|
content?: "application/json";
|
|
65
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* Serialization options for complex parameter types.
|
|
104
|
+
*/
|
|
66
105
|
export interface SerializationSpec {
|
|
67
106
|
style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject";
|
|
68
107
|
explode?: boolean;
|
|
69
108
|
allowReserved?: boolean;
|
|
70
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Specification for an operation response.
|
|
112
|
+
*/
|
|
71
113
|
export interface ResponseSpec {
|
|
72
114
|
status: number;
|
|
73
115
|
contentType: ContentType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/compiler/manifest/format.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAClB,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAC3C,SAAS,GAAG,MAAM,CAAC;AAEvB,MAAM,MAAM,WAAW,GACnB,kBAAkB,GAClB,YAAY,GACZ,0BAA0B,GAC1B,qBAAqB,GACrB,MAAM,CAAC;AAEX,MAAM,WAAW,UAAU;IACzB,eAAe,EAAE,CAAC,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE;QACT,IAAI,EAAE,WAAW,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IAEF,OAAO,EAAE;QACP,IAAI,EAAE,aAAa,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,wBAAwB,EAAE,MAAM,CAAC;K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,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC/B,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,MAAM,GAAG,gBAAgB,GAAG,eAAe,GAAG,YAAY,CAAC;IACnE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/compiler/manifest/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,YAAY,EACV,UAAU,EACV,eAAe,EACf,cAAc,EACd,UAAU,EACX,MAAM,aAAa,CAAC"}
|
|
@@ -1,8 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript program creation module.
|
|
3
|
+
* Sets up the TypeScript compiler API for source analysis.
|
|
4
|
+
*/
|
|
1
5
|
import ts from "typescript";
|
|
6
|
+
/**
|
|
7
|
+
* Context object containing the TypeScript program, type checker, and source files.
|
|
8
|
+
* Used throughout the compiler for source analysis and type information.
|
|
9
|
+
*/
|
|
2
10
|
export interface ProgramContext {
|
|
3
11
|
program: ts.Program;
|
|
4
12
|
checker: ts.TypeChecker;
|
|
5
13
|
sourceFiles: ts.SourceFile[];
|
|
6
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Creates a TypeScript program from a tsconfig.json file.
|
|
17
|
+
* Parses the configuration and sets up the compiler host for source analysis.
|
|
18
|
+
*
|
|
19
|
+
* @param tsconfigPath - Path to the TypeScript configuration file
|
|
20
|
+
* @returns ProgramContext containing the program, checker, and filtered source files
|
|
21
|
+
* @throws Error if the config file cannot be read or parsed
|
|
22
|
+
*/
|
|
7
23
|
export declare function createProgramFromConfig(tsconfigPath: string): ProgramContext;
|
|
8
24
|
//# sourceMappingURL=createProgram.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createProgram.d.ts","sourceRoot":"","sources":["../../../src/compiler/runner/createProgram.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAI5B,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC;IACpB,OAAO,EAAE,EAAE,CAAC,WAAW,CAAC;IACxB,WAAW,EAAE,EAAE,CAAC,UAAU,EAAE,CAAC;CAC9B;AAED,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc,CAwB5E"}
|
|
1
|
+
{"version":3,"file":"createProgram.d.ts","sourceRoot":"","sources":["../../../src/compiler/runner/createProgram.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,YAAY,CAAC;AAI5B;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC;IACpB,OAAO,EAAE,EAAE,CAAC,WAAW,CAAC;IACxB,WAAW,EAAE,EAAE,CAAC,UAAU,EAAE,CAAC;CAC9B;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc,CAwB5E"}
|