@spine-event-engine/proto-tools 2.0.0-snapshot.2 → 2.0.0-snapshot.20
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/README.md +54 -46
- package/REFERENCE.md +26 -4
- package/dist/src/generation/build-time-handler-analyzer.d.ts +217 -0
- package/dist/src/generation/build-time-handler-analyzer.d.ts.map +1 -0
- package/dist/src/generation/build-time-handler-analyzer.js +2806 -0
- package/dist/src/generation/build-time-handler-analyzer.js.map +1 -0
- package/dist/src/generation/entity-query-generator.d.ts +19 -0
- package/dist/src/generation/entity-query-generator.d.ts.map +1 -0
- package/dist/src/generation/entity-query-generator.js +298 -0
- package/dist/src/generation/entity-query-generator.js.map +1 -0
- package/dist/src/generation/generated-registry-writer.d.ts +58 -0
- package/dist/src/generation/generated-registry-writer.d.ts.map +1 -0
- package/dist/src/generation/generated-registry-writer.js +496 -0
- package/dist/src/generation/generated-registry-writer.js.map +1 -0
- package/dist/src/generation/generation-reuse.mjs +24 -2
- package/dist/src/generation/generator.d.ts.map +1 -1
- package/dist/src/generation/generator.js +195 -24
- package/dist/src/generation/generator.js.map +1 -1
- package/dist/src/generation/handler-codegen.d.ts +48 -0
- package/dist/src/generation/handler-codegen.d.ts.map +1 -0
- package/dist/src/generation/handler-codegen.js +214 -0
- package/dist/src/generation/handler-codegen.js.map +1 -0
- package/dist/src/generation/handler-generator.js +1 -1
- package/dist/src/generation/handler-generator.js.map +1 -1
- package/dist/src/generation/rejection-generator.d.ts +1 -0
- package/dist/src/generation/rejection-generator.d.ts.map +1 -1
- package/dist/src/generation/rejection-generator.js +14 -11
- package/dist/src/generation/rejection-generator.js.map +1 -1
- package/dist/src/testing/index.d.ts +8 -0
- package/dist/src/testing/index.d.ts.map +1 -0
- package/dist/src/testing/index.js +20 -0
- package/dist/src/testing/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -6
package/README.md
CHANGED
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
# Protobuf tooling for Spine applications
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
commands, events, and state used by Aggregates or Projections
|
|
6
|
-
|
|
3
|
+
Use this build-time package to generate TypeScript from application Proto
|
|
4
|
+
models, assemble model registries, and generate handler registries. Models can
|
|
5
|
+
define commands, events, and state used by Aggregates or Projections; this tool
|
|
6
|
+
does not run inside a server process.
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
This is an experimental snapshot. Install the snapshot explicitly while its CLI
|
|
9
|
+
and generated-output contract continue to evolve:
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
authored interface in the same model module. Do not edit output: rerun the
|
|
14
|
-
generator instead.
|
|
11
|
+
```sh
|
|
12
|
+
pnpm add -D @spine-event-engine/proto-tools@snapshot
|
|
13
|
+
```
|
|
15
14
|
|
|
16
|
-
For
|
|
17
|
-
[
|
|
15
|
+
For configuration, manifest, and generated-output details, read the
|
|
16
|
+
[reference](REFERENCE.md).
|
|
18
17
|
|
|
19
|
-
## 💡
|
|
18
|
+
## 💡 Who should use it?
|
|
20
19
|
|
|
21
|
-
- ✅
|
|
22
|
-
- ✅
|
|
23
|
-
|
|
24
|
-
-
|
|
20
|
+
- ✅ Authors of Node.js/pnpm Spine model packages and application packages.
|
|
21
|
+
- ✅ Teams with canonical `.proto` sources, the `spine-proto` CLI, and the
|
|
22
|
+
required Protobuf compiler/plugins available to their workspace.
|
|
23
|
+
- ❌ Runtime application code; import the generated model module and registry
|
|
24
|
+
instead of invoking this CLI from a server.
|
|
25
25
|
|
|
26
|
-
## 🚀
|
|
26
|
+
## 🚀 Generate and compile one model
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
Start in a Node.js/pnpm workspace with the CLI installed, a model package, and
|
|
29
|
+
the Protobuf compiler/plugin toolchain available. A model package keeps its
|
|
30
|
+
canonical `.proto` files under `proto/` and declares its generated locations in
|
|
31
|
+
`spine-proto.json`:
|
|
31
32
|
|
|
32
33
|
```json
|
|
33
34
|
{
|
|
@@ -42,17 +43,19 @@ contexts; a small application may use one combined model package.
|
|
|
42
43
|
}
|
|
43
44
|
```
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
From that model package directory, generate the model. The command emits
|
|
47
|
+
Protobuf-ES source under `generated/`, an importable `generated/proto-module.ts`,
|
|
48
|
+
and `spine-proto-manifest.json`; then compile the package.
|
|
46
49
|
|
|
47
50
|
```sh
|
|
48
|
-
spine-proto generate
|
|
51
|
+
pnpm exec spine-proto generate
|
|
52
|
+
tsc -b
|
|
49
53
|
```
|
|
50
54
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
`spine-proto-manifest.json`. Do not edit generated output by hand.
|
|
55
|
+
Do not edit generated output by hand: change the Proto source or configuration,
|
|
56
|
+
then run generation again.
|
|
54
57
|
|
|
55
|
-
## 🧩 Compose an application
|
|
58
|
+
## 🧩 Compose an application after the first model succeeds
|
|
56
59
|
|
|
57
60
|
An application lists its direct model packages and a source location for the
|
|
58
61
|
generated registry.
|
|
@@ -67,36 +70,41 @@ generated registry.
|
|
|
67
70
|
```
|
|
68
71
|
|
|
69
72
|
```sh
|
|
70
|
-
spine-proto compose
|
|
71
|
-
spine-proto handlers
|
|
73
|
+
pnpm exec spine-proto compose
|
|
74
|
+
pnpm exec spine-proto handlers
|
|
72
75
|
tsc -b
|
|
73
76
|
```
|
|
74
77
|
|
|
75
78
|
`compose` follows declared model dependencies transitively. `handlers` creates
|
|
76
|
-
the generated handler registry for decorated application classes.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
the generated handler registry for decorated application classes. Its emitted
|
|
80
|
+
source imports the Server handler-registry contract as a type from
|
|
81
|
+
`@spine-event-engine/server/spi/handler-registry`; the CLI itself has no Server
|
|
82
|
+
runtime dependency. Run both after the related model or handler changes.
|
|
83
|
+
The handler analyzer records `@Throws(...)` declarations as rejection outcomes;
|
|
84
|
+
the generated rejection companion supplies the schema used by that metadata.
|
|
85
|
+
Handler results can use native message unions, flat arrays, fixed tuples with
|
|
86
|
+
optional entries, and one outer `Promise`. Concrete local/imported aliases are
|
|
87
|
+
resolved too. The [handler return guide](https://github.com/SpineEventEngine/spine-ts/blob/master/docs/USER_GUIDE.md#choose-what-a-handler-returns)
|
|
88
|
+
shows the allowed forms and the rules for each decorator. Regenerate handlers
|
|
89
|
+
after changing a return declaration so every possible result schema is registered.
|
|
90
|
+
|
|
91
|
+
The public CLI is `spine-proto`. Programmatic config and manifest readers are
|
|
92
|
+
for build tooling that needs the same validated package contracts; application
|
|
81
93
|
code should import generated model modules instead.
|
|
82
94
|
|
|
83
|
-
|
|
84
|
-
// docs-snippet-path: packages/proto-tools/src/index.ts
|
|
85
|
-
import { ProtoConfig } from "@spine-event-engine/proto-tools";
|
|
86
|
-
|
|
87
|
-
const config = ProtoConfig.read(".");
|
|
88
|
-
void config;
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## ⚠️ Build-time only
|
|
95
|
+
## ⚠️ Cleanup and limits
|
|
92
96
|
|
|
93
97
|
Run this tooling after changing Proto files or decorated handlers. Generated
|
|
94
98
|
files are outputs, not source: never edit them by hand. Application runtime code
|
|
95
99
|
imports the generated model module and registry; it does not invoke the CLI.
|
|
96
100
|
|
|
101
|
+
Keep model-package dependencies explicit in both `package.json` and
|
|
102
|
+
`spine-proto.json`. `compose` follows declared model dependencies transitively;
|
|
103
|
+
it does not discover undeclared packages or create a running application.
|
|
104
|
+
|
|
97
105
|
## 🔗 Learn more
|
|
98
106
|
|
|
99
|
-
- [Spine Protobuf package](
|
|
100
|
-
- [Core message tools](
|
|
101
|
-
- [Message Board model example](
|
|
107
|
+
- [Spine Protobuf package](https://github.com/SpineEventEngine/spine-ts/blob/master/packages/proto/README.md)
|
|
108
|
+
- [Core message tools](https://github.com/SpineEventEngine/spine-ts/blob/master/packages/core/README.md)
|
|
109
|
+
- [Message Board model example](https://github.com/SpineEventEngine/spine-ts/blob/master/examples/message-board/model/README.md)
|
|
102
110
|
- [Reference for coding agents](REFERENCE.md)
|
package/REFERENCE.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @spine-event-engine/proto-tools reference
|
|
2
2
|
|
|
3
|
+
## Testing entry point
|
|
4
|
+
|
|
5
|
+
`@spine-event-engine/proto-tools/testing` supports compiler-focused framework
|
|
6
|
+
tests that analyze or render handler registries. Direct implementation modules
|
|
7
|
+
under `src/generation` remain private; only this deliberate testing subpath is
|
|
8
|
+
available to package-test consumers, with test-infrastructure stability only.
|
|
9
|
+
|
|
3
10
|
This reference describes the public build-time Proto tooling for coding agents.
|
|
4
11
|
|
|
5
12
|
## Interface discovery and provenance
|
|
@@ -19,11 +26,14 @@ The `spine-proto` binary is the primary public API. Run it from the package
|
|
|
19
26
|
whose `spine-proto.json` it should read:
|
|
20
27
|
|
|
21
28
|
- `spine-proto generate` accepts only model configuration and generates model
|
|
22
|
-
outputs and the manifest;
|
|
29
|
+
outputs and the manifest, including `_query.ts` companions for eligible Entity states;
|
|
23
30
|
- `spine-proto compose` accepts only application configuration and writes the
|
|
24
31
|
configured model registry source;
|
|
25
32
|
- `spine-proto handlers` accepts an application package and writes
|
|
26
|
-
`generated/handler/generated-handler-registry.ts`.
|
|
33
|
+
`generated/handler/generated-handler-registry.ts`. The emitted module imports
|
|
34
|
+
`GeneratedHandlerRegistry` as a type from
|
|
35
|
+
`@spine-event-engine/server/spi/handler-registry`; handler analysis and
|
|
36
|
+
rendering remain tooling-owned and never load Server at CLI runtime.
|
|
27
37
|
|
|
28
38
|
The package also exposes `manifestFormatVersion`, `ProtoConfig`, and
|
|
29
39
|
`ProtoManifest` for build tooling that needs to read or validate the same
|
|
@@ -48,8 +58,11 @@ version, sorted Proto files in the package, generated exports, direct
|
|
|
48
58
|
dependencies, the module export, and a generation ID. Byte-identical staged
|
|
49
59
|
output reuses its committed ID; changed output receives a new opaque ID. A model
|
|
50
60
|
with a top-level `*rejections.proto` also gets a
|
|
51
|
-
typed same-directory rejection companion.
|
|
52
|
-
|
|
61
|
+
typed same-directory rejection companion. An eligible Entity state gets a
|
|
62
|
+
same-directory `_query.ts` companion. Either companion imports core at runtime,
|
|
63
|
+
so the model must declare `@spine-event-engine/core` in its direct runtime
|
|
64
|
+
`package.json` dependencies when either is generated. Models with neither
|
|
65
|
+
companion do not need this dependency for generation.
|
|
53
66
|
|
|
54
67
|
For a cross-model Proto import, declare the other model in both `package.json`
|
|
55
68
|
and `spine-proto.json`; import the other model's canonical package path. The
|
|
@@ -66,6 +79,15 @@ sufficient because `TypeRegistry.from()` follows declared dependencies.
|
|
|
66
79
|
`handlers` must run after a decorated handler or its generated command, event,
|
|
67
80
|
or state types change. Compile the generated registry with the application.
|
|
68
81
|
|
|
82
|
+
Explicit handler return annotations may resolve to one generated message, a
|
|
83
|
+
union, a flat array, or a fixed tuple (including readonly, named, optional, and
|
|
84
|
+
union-valued entries), optionally wrapped in one built-in `Promise`. Local and
|
|
85
|
+
imported aliases must resolve to concrete generated schemas. The analyzer records
|
|
86
|
+
all possible schemas in that handler's `outcomes.returned`; it does not serialize
|
|
87
|
+
tuple positions or union branches. Handler-specific result rules and unsupported
|
|
88
|
+
shapes are documented in the
|
|
89
|
+
[server reference](https://github.com/SpineEventEngine/spine-ts/blob/master/packages/server/REFERENCE.md#handler-return-types).
|
|
90
|
+
|
|
69
91
|
## Safety and atomicity
|
|
70
92
|
|
|
71
93
|
All package-relative paths must remain inside the package and may not use unsafe
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import ts from "typescript";
|
|
2
|
+
type GeneratedHandlerKind = "command-assignment" | "command-substitution" | "command-reaction" | "event-subscription" | "state-subscription" | "event-reaction";
|
|
3
|
+
type GeneratedHandlerParameterCount = 1 | 2;
|
|
4
|
+
/**
|
|
5
|
+
* Build-time analysis result for bare decorated receiver handler methods.
|
|
6
|
+
*/
|
|
7
|
+
export interface BuildHandlerAnalysis {
|
|
8
|
+
/**
|
|
9
|
+
* All generated Entity and standalone receiver declarations.
|
|
10
|
+
*/
|
|
11
|
+
readonly receivers: readonly BuildReceiverHandlers[];
|
|
12
|
+
/**
|
|
13
|
+
* Deterministic diagnostics for unsupported handler declarations.
|
|
14
|
+
*/
|
|
15
|
+
readonly diagnostics: readonly BuildHandlerDiagnostic[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Build-time entity group shaped for later generated registry rendering.
|
|
19
|
+
*/
|
|
20
|
+
export interface BuildEntityHandlers {
|
|
21
|
+
/**
|
|
22
|
+
* Entity class declaration name.
|
|
23
|
+
*/
|
|
24
|
+
readonly className: string;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the class is imported from a default export.
|
|
27
|
+
*/
|
|
28
|
+
readonly defaultExport?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Marks this declaration as an Entity receiver.
|
|
31
|
+
*/
|
|
32
|
+
readonly receiverKind: "entity";
|
|
33
|
+
/**
|
|
34
|
+
* Source file where the entity class is declared.
|
|
35
|
+
*/
|
|
36
|
+
readonly sourceFile: string;
|
|
37
|
+
/**
|
|
38
|
+
* Importable generated schema reference for entity state.
|
|
39
|
+
*/
|
|
40
|
+
readonly stateSchema: SchemaReference;
|
|
41
|
+
/**
|
|
42
|
+
* Analyzed bare-decorator handler records.
|
|
43
|
+
*/
|
|
44
|
+
readonly handlers: readonly BuildHandlerRecord[];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Build-time standalone receiver declaration.
|
|
48
|
+
*/
|
|
49
|
+
export interface BuildStandaloneHandlers {
|
|
50
|
+
/**
|
|
51
|
+
* Marks this declaration as a standalone receiver.
|
|
52
|
+
*/
|
|
53
|
+
readonly receiverKind: "standalone";
|
|
54
|
+
/**
|
|
55
|
+
* Standalone receiver class declaration name.
|
|
56
|
+
*/
|
|
57
|
+
readonly className: string;
|
|
58
|
+
/**
|
|
59
|
+
* Indicates that the receiver class is a default export.
|
|
60
|
+
*/
|
|
61
|
+
readonly defaultExport?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Source file that declares the standalone receiver class.
|
|
64
|
+
*/
|
|
65
|
+
readonly sourceFile: string;
|
|
66
|
+
/**
|
|
67
|
+
* Analyzed decorated handler records in declaration order.
|
|
68
|
+
*/
|
|
69
|
+
readonly handlers: readonly BuildHandlerRecord[];
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* One generated receiver declaration.
|
|
73
|
+
*/
|
|
74
|
+
export type BuildReceiverHandlers = BuildEntityHandlers | BuildStandaloneHandlers;
|
|
75
|
+
/**
|
|
76
|
+
* Importable generated schema reference used by later source rendering.
|
|
77
|
+
*/
|
|
78
|
+
export interface SchemaReference {
|
|
79
|
+
/**
|
|
80
|
+
* Module specifier exactly as declared by analyzed source.
|
|
81
|
+
*/
|
|
82
|
+
readonly moduleSpecifier: string;
|
|
83
|
+
/**
|
|
84
|
+
* Generated schema export name in that module.
|
|
85
|
+
*/
|
|
86
|
+
readonly exportName: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Build-time handler record before generated source rendering.
|
|
90
|
+
*/
|
|
91
|
+
export interface BuildHandlerRecord {
|
|
92
|
+
/**
|
|
93
|
+
* Handler role inferred from the bare decorator.
|
|
94
|
+
*/
|
|
95
|
+
readonly kind: GeneratedHandlerKind;
|
|
96
|
+
/**
|
|
97
|
+
* String method name selected by the generated metadata.
|
|
98
|
+
*/
|
|
99
|
+
readonly methodName: string;
|
|
100
|
+
/**
|
|
101
|
+
* Generated schema accepted by the first handler parameter.
|
|
102
|
+
*/
|
|
103
|
+
readonly input: BuildHandlerInput;
|
|
104
|
+
/**
|
|
105
|
+
* Generated schemas returned normally or declared as thrown rejections.
|
|
106
|
+
*/
|
|
107
|
+
readonly outcomes: BuildHandlerOutcomes;
|
|
108
|
+
/**
|
|
109
|
+
* Public method arity: `handler(signal)` or `handler(signal, context)`.
|
|
110
|
+
*/
|
|
111
|
+
readonly parameterCount: GeneratedHandlerParameterCount;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Input metadata for one generated handler.
|
|
115
|
+
*/
|
|
116
|
+
export interface BuildHandlerInput {
|
|
117
|
+
/**
|
|
118
|
+
* Generated schema accepted by the handler.
|
|
119
|
+
*/
|
|
120
|
+
readonly schema: SchemaReference;
|
|
121
|
+
/**
|
|
122
|
+
* Origin required for an Event input.
|
|
123
|
+
*/
|
|
124
|
+
readonly origin: "domestic" | "external";
|
|
125
|
+
/**
|
|
126
|
+
* Optional generated Event field filter.
|
|
127
|
+
*/
|
|
128
|
+
readonly where?: BuildWhereOptions;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Normal and declared rejection outcomes for one generated handler.
|
|
132
|
+
*/
|
|
133
|
+
export interface BuildHandlerOutcomes {
|
|
134
|
+
/**
|
|
135
|
+
* Generated schemas returned normally by the handler.
|
|
136
|
+
*/
|
|
137
|
+
readonly returned: readonly SchemaReference[];
|
|
138
|
+
/**
|
|
139
|
+
* Generated rejection schemas that the handler may throw.
|
|
140
|
+
*/
|
|
141
|
+
readonly thrown: readonly SchemaReference[];
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Build-time representation of one `@Where` declaration.
|
|
145
|
+
*/
|
|
146
|
+
export interface BuildWhereOptions {
|
|
147
|
+
/**
|
|
148
|
+
* Proto source-name path selected by the declaration.
|
|
149
|
+
*/
|
|
150
|
+
readonly eventField: string;
|
|
151
|
+
/**
|
|
152
|
+
* Declared field value in Stringifier text form.
|
|
153
|
+
*/
|
|
154
|
+
readonly equals: string;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Stable diagnostic codes emitted by build-time handler analysis.
|
|
158
|
+
*/
|
|
159
|
+
export type BuildHandlerDiagnosticCode = "FRAMEWORK_ENVELOPE_RETURN" | "INVALID_EMITTED_SCHEMA" | "INVALID_HANDLER_NAME" | "INVALID_HANDLER_CONTEXT" | "INVALID_HANDLER_VISIBILITY" | "INVALID_PARAMETER_COUNT" | "INVALID_SIGNAL_TYPE" | "INVALID_EXTERNAL_ORIGIN" | "EXTERNAL_COMMAND_RECEIVER" | "INVALID_SUBSCRIBE_RETURN" | "INVALID_THROWS" | "INVALID_WHERE" | "MISSING_EMITTED_SCHEMAS" | "MISSING_ENTITY_STATE_SCHEMA" | "MISSING_RETURN_TYPE" | "MISSING_SIGNAL_TYPE" | "NON_EXPORTED_RECEIVER_CLASS" | "SCHEMA_BEARING_DECORATOR" | "TYPESCRIPT_SYNTAX_ERROR" | "UNSUPPORTED_ASSIGN_HANDLER" | "UNSUPPORTED_COMMAND_HANDLER" | "UNSUPPORTED_RETURN_TYPE";
|
|
160
|
+
/**
|
|
161
|
+
* One build-time analyzer diagnostic.
|
|
162
|
+
*/
|
|
163
|
+
export interface BuildHandlerDiagnostic {
|
|
164
|
+
/**
|
|
165
|
+
* Stable machine-readable diagnostic code.
|
|
166
|
+
*/
|
|
167
|
+
readonly code: BuildHandlerDiagnosticCode;
|
|
168
|
+
/**
|
|
169
|
+
* Source file where the diagnostic was found.
|
|
170
|
+
*/
|
|
171
|
+
readonly sourceFile: string;
|
|
172
|
+
/**
|
|
173
|
+
* One-based source line.
|
|
174
|
+
*/
|
|
175
|
+
readonly line: number;
|
|
176
|
+
/**
|
|
177
|
+
* One-based source column.
|
|
178
|
+
*/
|
|
179
|
+
readonly column: number;
|
|
180
|
+
/**
|
|
181
|
+
* Human-readable diagnostic message.
|
|
182
|
+
*/
|
|
183
|
+
readonly message: string;
|
|
184
|
+
/**
|
|
185
|
+
* Entity class name when available.
|
|
186
|
+
*/
|
|
187
|
+
readonly className?: string;
|
|
188
|
+
/**
|
|
189
|
+
* Handler method name when available.
|
|
190
|
+
*/
|
|
191
|
+
readonly methodName?: string;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Inspects configured TypeScript source files for bare Spine handler decorators.
|
|
195
|
+
*/
|
|
196
|
+
export interface BuildHandlerAnalyzer {
|
|
197
|
+
/**
|
|
198
|
+
* Inspects source files and returns receiver handler records with deterministic diagnostics.
|
|
199
|
+
*
|
|
200
|
+
* @param program TypeScript program that owns the source files and diagnostics.
|
|
201
|
+
* @param sourceFiles Application source files to inspect; defaults to program files.
|
|
202
|
+
* @returns Receiver handler records and deterministic diagnostics.
|
|
203
|
+
*/
|
|
204
|
+
analyze(program: ts.Program, sourceFiles?: readonly ts.SourceFile[]): BuildHandlerAnalysis;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Provides build-time analysis for bare Spine handler decorators.
|
|
208
|
+
*/
|
|
209
|
+
export declare const BuildHandlerAnalyzer: BuildHandlerAnalyzer;
|
|
210
|
+
/**
|
|
211
|
+
* Finds the package identity that owns an analyzed source file.
|
|
212
|
+
*/
|
|
213
|
+
export declare const PackageIdentity: Readonly<{
|
|
214
|
+
nameFor(sourceFile: string): string | undefined;
|
|
215
|
+
}>;
|
|
216
|
+
export {};
|
|
217
|
+
//# sourceMappingURL=build-time-handler-analyzer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-time-handler-analyzer.d.ts","sourceRoot":"","sources":["../../../src/generation/build-time-handler-analyzer.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,KAAK,oBAAoB,GACrB,oBAAoB,GACpB,sBAAsB,GACtB,kBAAkB,GAClB,oBAAoB,GACpB,oBAAoB,GACpB,gBAAgB,CAAC;AACrB,KAAK,8BAA8B,GAAG,CAAC,GAAG,CAAC,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,oBAAoB;IAGnC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAErD;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,SAAS,sBAAsB,EAAE,CAAC;CACzD;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAGlC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,M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