@opalesce/core 0.0.1 → 0.1.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.
Files changed (39) hide show
  1. package/README.md +103 -157
  2. package/dist/index.d.ts +7 -5
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +2 -2
  5. package/dist/interaction/build.d.ts +5 -0
  6. package/dist/interaction/build.d.ts.map +1 -0
  7. package/dist/interaction/build.js +315 -0
  8. package/dist/interaction/errors.d.ts +12 -0
  9. package/dist/interaction/errors.d.ts.map +1 -0
  10. package/dist/interaction/errors.js +12 -0
  11. package/dist/interaction/schema.d.ts +9 -0
  12. package/dist/interaction/schema.d.ts.map +1 -0
  13. package/dist/interaction/schema.js +178 -0
  14. package/dist/interaction/types.d.ts +69 -0
  15. package/dist/interaction/types.d.ts.map +1 -0
  16. package/dist/interaction/types.js +1 -0
  17. package/dist/orchestrator/artifacts.d.ts +1 -1
  18. package/dist/orchestrator/artifacts.d.ts.map +1 -1
  19. package/dist/orchestrator/artifacts.js +1 -1
  20. package/dist/orchestrator/errors.d.ts +1 -17
  21. package/dist/orchestrator/errors.d.ts.map +1 -1
  22. package/dist/orchestrator/errors.js +3 -27
  23. package/dist/orchestrator/run.d.ts.map +1 -1
  24. package/dist/orchestrator/run.js +35 -33
  25. package/dist/orchestrator/types.d.ts +6 -13
  26. package/dist/orchestrator/types.d.ts.map +1 -1
  27. package/dist/parseAsyncAPI.d.ts +2 -0
  28. package/dist/parseAsyncAPI.d.ts.map +1 -1
  29. package/dist/parseAsyncAPI.js +6 -0
  30. package/dist/source.d.ts +12 -0
  31. package/dist/source.d.ts.map +1 -0
  32. package/dist/source.js +39 -0
  33. package/package.json +18 -2
  34. package/dist/orchestrator/orderPlugins.d.ts +0 -3
  35. package/dist/orchestrator/orderPlugins.d.ts.map +0 -1
  36. package/dist/orchestrator/orderPlugins.js +0 -41
  37. package/dist/orchestrator/services.d.ts +0 -26
  38. package/dist/orchestrator/services.d.ts.map +0 -1
  39. package/dist/orchestrator/services.js +0 -42
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @opalesce/core
2
2
 
3
- `@opalesce/core` is the in-memory AsyncAPI generation engine for Opalesce. It parses input once, resolves plugin dependencies, runs plugin lifecycle hooks, shares typed services, and collects generated text artifacts without writing files.
3
+ `@opalesce/core` is the in-memory AsyncAPI generation engine for Opalesce. It parses input once, runs each configured plugin in declared order, and collects generated text artifacts without writing files.
4
4
 
5
5
  The package is released as a focused building block for advanced integrations. Normal consumers use the `opalesce` facade, while `@opalesce/config` and `@opalesce/cli` remain the focused config, filesystem, and command layers.
6
6
 
@@ -14,11 +14,13 @@ import { defineConfig, definePlugin } from "opalesce";
14
14
 
15
15
  const versionFile = definePlugin(() => ({
16
16
  name: "version-file",
17
- build(context) {
18
- context.emit({
19
- path: "metadata/version.txt",
20
- contents: `AsyncAPI ${context.document.version()}\n`,
21
- });
17
+ generate(context) {
18
+ return [
19
+ {
20
+ path: "metadata/version.txt",
21
+ contents: `AsyncAPI ${context.document.version()}\n`,
22
+ },
23
+ ];
22
24
  },
23
25
  }));
24
26
 
@@ -54,11 +56,13 @@ const input = {
54
56
 
55
57
  const versionFile = definePlugin((options: { readonly path: string }) => ({
56
58
  name: "version-file",
57
- build(context) {
58
- context.emit({
59
- path: options.path,
60
- contents: `AsyncAPI ${context.document.version()}\n`,
61
- });
59
+ generate(context) {
60
+ return [
61
+ {
62
+ path: options.path,
63
+ contents: `AsyncAPI ${context.document.version()}\n`,
64
+ },
65
+ ];
62
66
  },
63
67
  }));
64
68
 
@@ -72,12 +76,13 @@ const result = await run(config);
72
76
  console.log(result.artifacts);
73
77
  ```
74
78
 
75
- The result contains the official parsed AsyncAPI document, parser diagnostics, artifacts in emission order, and the resolved plugin order:
79
+ The result contains the official parsed AsyncAPI document, parser diagnostics, artifacts in return order, and the configured plugin order:
76
80
 
77
81
  ```ts
78
82
  interface PipelineResult {
79
83
  readonly document: AsyncAPIDocumentInterface;
80
84
  readonly diagnostics: readonly Diagnostic[];
85
+ readonly source?: AsyncAPISource;
81
86
  readonly artifacts: readonly GeneratedArtifact[];
82
87
  readonly pluginNames: readonly string[];
83
88
  }
@@ -107,14 +112,13 @@ The scoped package is not a normal consumer dependency; prefer the `opalesce` fa
107
112
 
108
113
  `run` executes one deterministic pipeline:
109
114
 
110
- 1. Validate plugin names and dependency relationships.
111
- 2. Resolve a stable topological plugin order.
112
- 3. Parse `config.input` once.
113
- 4. Run every plugin `setup` hook in resolved order.
114
- 5. Run every plugin `build` hook in the same order.
115
- 6. Return a frozen result with all in-memory artifacts.
115
+ 1. Snapshot `config.plugins` in declared order.
116
+ 2. Parse `config.input` once.
117
+ 3. Create one frozen plugin context with a lazy interaction contract.
118
+ 4. Run and await each plugin `generate` in declared order.
119
+ 5. Return a frozen result with all in-memory artifacts.
116
120
 
117
- Plugin configuration failures happen before parsing. Core parse failures pass through unchanged. A setup or build failure stops the pipeline immediately.
121
+ Core parse failures pass through unchanged. A generation failure stops the pipeline immediately, so later plugins do not run.
118
122
 
119
123
  ## Pipeline Configuration
120
124
 
@@ -130,7 +134,7 @@ interface PipelineConfig {
130
134
  | --------- | -------- | ------------------------------------------------------------------------------------------------------------ |
131
135
  | `input` | Yes | YAML or JSON text, a JavaScript AsyncAPI object, or an existing official AsyncAPI document accepted by Core. |
132
136
  | `parser` | No | Core parser-constructor and parse options forwarded unchanged to `parseAsyncAPI`. |
133
- | `plugins` | No | Plugins to validate, order, and execute. Defaults to an empty pipeline. |
137
+ | `plugins` | No | Plugins to execute sequentially in declared order. Defaults to an empty pipeline. |
134
138
 
135
139
  `defineConfig` is an identity helper. It preserves the concrete config type and improves TypeScript inference:
136
140
 
@@ -161,131 +165,88 @@ interface ManifestPluginOptions {
161
165
 
162
166
  export const manifestPlugin = definePlugin((options: ManifestPluginOptions) => ({
163
167
  name: "manifest",
164
- build(context) {
165
- context.emit({
166
- path: options.path,
167
- contents: JSON.stringify(
168
- {
169
- asyncapi: context.document.version(),
170
- },
171
- null,
172
- 2,
173
- ),
174
- });
168
+ generate(context) {
169
+ return [
170
+ {
171
+ path: options.path,
172
+ contents: JSON.stringify(
173
+ {
174
+ asyncapi: context.document.version(),
175
+ },
176
+ null,
177
+ 2,
178
+ ),
179
+ },
180
+ ];
175
181
  },
176
182
  }));
177
183
  ```
178
184
 
179
- A plugin can implement either or both lifecycle hooks:
185
+ A plugin has one required execution hook:
180
186
 
181
187
  ```ts
182
188
  interface OrchestrationPlugin {
183
189
  readonly name: string;
184
- readonly dependsOn?: readonly string[];
185
- setup?(context: PluginSetupContext): void | Promise<void>;
186
- build?(context: PluginBuildContext): void | Promise<void>;
190
+ generate(
191
+ context: PluginContext,
192
+ ): readonly GeneratedArtifact[] | Promise<readonly GeneratedArtifact[]>;
187
193
  }
188
194
  ```
189
195
 
190
- - `setup` registers or consumes shared in-memory services.
191
- - `build` consumes services, inspects previously emitted artifacts, and emits new artifacts.
192
- - All setup hooks finish before the first build hook starts.
193
- - Hooks run sequentially. A hook can be synchronous or asynchronous.
194
-
195
- Plugin names must be non-empty and unique in one pipeline.
196
-
197
- ## Plugin Dependencies
198
-
199
- Use `dependsOn` when a plugin requires another configured plugin:
196
+ The context separates the complete parser model from shared generation semantics:
200
197
 
201
198
  ```ts
202
- const provider = definePlugin(() => ({
203
- name: "provider",
204
- setup() {},
205
- }));
206
-
207
- const consumer = definePlugin(() => ({
208
- name: "consumer",
209
- dependsOn: ["provider"],
210
- build() {},
211
- }));
212
-
213
- const config = defineConfig({
214
- input,
215
- plugins: [consumer(), provider()],
216
- });
199
+ interface PluginContext {
200
+ readonly document: AsyncAPIDocumentInterface;
201
+ readonly interaction: InteractionContract;
202
+ readonly diagnostics: readonly Diagnostic[];
203
+ readonly source?: AsyncAPISource;
204
+ }
217
205
  ```
218
206
 
219
- The resolved order is `provider`, then `consumer`, even though the consumer appears first in the config. Config order breaks ties between plugins that are currently eligible to run.
207
+ - `document` is the complete official parser model, including bindings, servers, security, and extensions.
208
+ - `interaction` is the target-neutral schema, message, channel, parameter, operation, reply, and dependency contract shared by TypeScript, Zod, and other output plugins.
209
+ - `diagnostics` contains parser diagnostics.
210
+ - `source` is the optional unresolved source snapshot.
211
+ - `generate` returns text artifacts.
212
+ - Plugin generations run sequentially in the exact order declared in `plugins`.
213
+ - Core awaits asynchronous generation before starting the next plugin.
214
+ - Core lazily builds `interaction` on first access and returns the same immutable contract identity to every plugin in the run.
215
+ - Plugins own target-specific projection, naming, rendering, and files.
216
+ - Plugins do not receive services or artifacts from other plugins.
220
217
 
221
- The runner rejects:
218
+ Contract normalization supports AsyncAPI 2.6, 3.0, and 3.1. A plugin that never reads `interaction` does not trigger normalization, so document-only plugins retain parser-level version support. Contract construction never reads files, accesses the network, or invokes another parser.
222
219
 
223
- - Empty plugin names.
224
- - Duplicate plugin names.
225
- - Missing dependencies.
226
- - Self dependencies.
227
- - Dependency cycles.
220
+ For raw text and object inputs, `context.source.data` is an Opalesce-owned recursively frozen snapshot captured before parser reference resolution. It preserves authored `$ref` strings and boolean schemas instead of exposing the resolved, potentially cyclic parser model. `context.source.uri` contains `parse.source` when supplied. The same source identity is shared by every plugin and the pipeline result.
228
221
 
229
- These failures use `PluginConfigurationError` and occur before Core parses the input.
222
+ When `input` is an existing `AsyncAPIDocumentInterface`, `source` is `undefined`. Core does not reconstruct purported authored input from `document.json()` because that model has already been resolved.
230
223
 
231
- ## Sharing Typed Services
224
+ The name identifies a plugin in results and execution errors. Repeated entries and repeated names are executed rather than deduplicated.
232
225
 
233
- Service tokens allow one plugin to provide a typed in-memory capability to another plugin without adding untyped fields to a global context.
226
+ ## Linear Plugin Order
234
227
 
235
- ```ts
236
- import { createServiceToken, defineConfig, definePlugin, run } from "@opalesce/core";
228
+ The config array is the complete execution plan:
237
229
 
238
- interface DocumentInfo {
239
- readonly asyncapiVersion: string;
240
- }
241
-
242
- const documentInfoService = createServiceToken<DocumentInfo>("document-info");
243
-
244
- const documentInfoProvider = definePlugin(() => ({
245
- name: "document-info-provider",
246
- setup(context) {
247
- context.provide(documentInfoService, {
248
- asyncapiVersion: context.document.version(),
249
- });
250
- },
251
- }));
252
-
253
- const documentInfoFile = definePlugin(() => ({
254
- name: "document-info-file",
255
- dependsOn: ["document-info-provider"],
256
- build(context) {
257
- const documentInfo = context.get(documentInfoService);
258
-
259
- context.emit({
260
- path: "metadata/document.txt",
261
- contents: `${documentInfo.asyncapiVersion}\n`,
262
- });
263
- },
264
- }));
265
-
266
- const result = await run(
267
- defineConfig({
268
- input,
269
- plugins: [documentInfoFile(), documentInfoProvider()],
270
- }),
271
- );
230
+ ```ts
231
+ const config = defineConfig({
232
+ input,
233
+ plugins: [typescriptPlugin(), documentationPlugin(), metadataPlugin()],
234
+ });
272
235
  ```
273
236
 
274
- The generic token type controls both `provide` and `get`. Token identity, not the diagnostic name, selects the value, so two tokens with the same name remain independent.
237
+ Core does not reorder plugins. If the same plugin instance appears twice, its `generate` runs twice at those positions. Generation contexts cannot observe earlier artifacts, so config order controls execution without creating a plugin dependency API.
275
238
 
276
- A token can be provided only once per pipeline. Retrieving an unavailable token or providing the same token twice raises `ServiceRegistryError` inside the active plugin hook.
239
+ ## Returning Artifacts
277
240
 
278
- A future `@opalesce/schema` package can use this boundary to export a shared `ServiceToken<SchemaGraph>`.
279
-
280
- ## Emitting Artifacts
281
-
282
- Only build contexts expose `emit`:
241
+ `generate` returns artifact descriptions:
283
242
 
284
243
  ```ts
285
- context.emit({
286
- path: "types/UserCreated.ts",
287
- contents: "export interface UserCreated {}\n",
288
- });
244
+ return [
245
+ {
246
+ path: "types/UserCreated.ts",
247
+ contents: "export interface UserCreated {}\n",
248
+ },
249
+ ];
289
250
  ```
290
251
 
291
252
  Artifact paths must:
@@ -296,59 +257,33 @@ Artifact paths must:
296
257
  - Not be POSIX or Windows absolute paths.
297
258
  - Be unique across the complete pipeline.
298
259
 
299
- Artifacts are stored as defensive frozen copies. `context.artifacts` is a frozen snapshot of artifacts emitted so far, allowing a later plugin such as a barrel generator to inspect earlier output:
300
-
301
- ```ts
302
- const barrelPlugin = definePlugin(() => ({
303
- name: "barrel",
304
- build(context) {
305
- const modules = context.artifacts
306
- .filter((artifact) => artifact.path.endsWith(".ts"))
307
- .map((artifact) => `export * from "./${artifact.path}";`)
308
- .join("\n");
309
-
310
- context.emit({
311
- path: "index.ts",
312
- contents: `${modules}\n`,
313
- });
314
- },
315
- }));
316
- ```
260
+ Artifacts are stored as defensive frozen copies and become visible in `PipelineResult` after the complete run succeeds. A plugin cannot inspect artifacts returned by another plugin. Outputs that must be coordinated, such as modules and their barrel file, belong to one plugin.
317
261
 
318
262
  Core returns artifacts but does not write them. A facade or storage layer owns output-directory resolution, atomic writes, cleanup, and rollback.
319
263
 
320
264
  ## Error Handling
321
265
 
322
266
  ```ts
323
- import {
324
- AsyncAPIParseError,
325
- PluginConfigurationError,
326
- PluginExecutionError,
327
- run,
328
- } from "@opalesce/core";
267
+ import { AsyncAPIParseError, PluginExecutionError, run } from "@opalesce/core";
329
268
 
330
269
  try {
331
270
  await run(config);
332
271
  } catch (error) {
333
- if (error instanceof PluginConfigurationError) {
334
- console.error(error.code, error.pluginNames);
335
- } else if (error instanceof AsyncAPIParseError) {
272
+ if (error instanceof AsyncAPIParseError) {
336
273
  console.error(error.diagnostics);
337
274
  } else if (error instanceof PluginExecutionError) {
338
- console.error(error.pluginName, error.phase, error.cause);
275
+ console.error(error.pluginName, error.cause);
339
276
  } else {
340
277
  throw error;
341
278
  }
342
279
  }
343
280
  ```
344
281
 
345
- | Error | When it is raised |
346
- | -------------------------- | -------------------------------------------------------------------------------------------------------------- |
347
- | `PluginConfigurationError` | Plugin names or dependency relationships are invalid. This error is not wrapped. |
348
- | `AsyncAPIParseError` | Core cannot produce a valid AsyncAPI document. This error passes through unchanged. |
349
- | `PluginExecutionError` | A setup or build hook fails. It contains `pluginName`, `phase`, and the original `cause`. |
350
- | `ServiceRegistryError` | A hook retrieves a missing service or provides a token twice. It is available as `PluginExecutionError.cause`. |
351
- | `ArtifactError` | A hook emits an invalid or colliding artifact path. It is available as `PluginExecutionError.cause`. |
282
+ | Error | When it is raised |
283
+ | ---------------------- | --------------------------------------------------------------------------------------------- |
284
+ | `AsyncAPIParseError` | Core cannot produce a valid AsyncAPI document. This error passes through unchanged. |
285
+ | `PluginExecutionError` | Plugin generation fails. It contains `pluginName` and the original `cause`. |
286
+ | `ArtifactError` | A plugin returns an invalid or colliding artifact path. It is a `PluginExecutionError.cause`. |
352
287
 
353
288
  The pipeline is fail-fast and returns no partial result after an error.
354
289
 
@@ -361,18 +296,29 @@ Runtime exports:
361
296
  - `defineConfig`
362
297
  - `definePlugin`
363
298
  - `run`
364
- - `createServiceToken`
365
- - `PluginConfigurationError`
366
299
  - `PluginExecutionError`
367
- - `ServiceRegistryError`
368
300
  - `ArtifactError`
301
+ - `InteractionContractError`
369
302
 
370
- The root entry point also exports the parser, pipeline, plugin, context, service, artifact, and error-code types:
303
+ The root entry point also exports parser, pipeline, plugin, context, artifact, and error-code types, including:
371
304
 
372
305
  - `Input`
373
306
  - `ParseAsyncAPIOptions`
374
307
  - `AsyncAPIDocumentInterface`
375
308
  - `Diagnostic`
309
+ - `AsyncAPISource`
310
+ - `JsonValue`
311
+ - `OrchestrationPlugin`
312
+ - `PluginContext`
313
+ - `PipelineConfig`
314
+ - `PipelineResult`
315
+ - `GeneratedArtifact`
316
+ - `InteractionContract`
317
+ - `SchemaContract`
318
+ - `MessageContract`
319
+ - `ChannelContract`
320
+ - `OperationContract`
321
+ - `ReplyContract`
376
322
 
377
323
  ## Current Boundaries
378
324
 
@@ -421,7 +367,7 @@ Run commands from the repository root:
421
367
  | `just nx run-many -t build` | Build every Nx package project. |
422
368
  | `just nx run-many -t check --parallel=1` | Run package checks across the Nx workspace. |
423
369
 
424
- The package tests cover parser option forwarding, lifecycle ordering, dependency validation, typed services, artifact validation, immutable results, package exports, and error propagation.
370
+ The package tests cover parser option forwarding, declared plugin order, sequential asynchronous generation, artifact validation, immutable results, package exports, and error propagation.
425
371
 
426
372
  ## License
427
373
 
package/dist/index.d.ts CHANGED
@@ -1,10 +1,12 @@
1
- export { ArtifactError, PluginConfigurationError, PluginExecutionError, ServiceRegistryError, } from "./orchestrator/errors.js";
2
- export type { ArtifactErrorCode, PluginConfigurationErrorCode, ServiceRegistryErrorCode, } from "./orchestrator/errors.js";
1
+ export { ArtifactError, PluginExecutionError } from "./orchestrator/errors.js";
2
+ export type { ArtifactErrorCode } from "./orchestrator/errors.js";
3
3
  export { defineConfig, definePlugin } from "./orchestrator/helpers.js";
4
4
  export { run } from "./orchestrator/run.js";
5
- export { createServiceToken } from "./orchestrator/services.js";
6
- export type { ServiceToken } from "./orchestrator/services.js";
7
- export type { GeneratedArtifact, OrchestrationPlugin, PipelineConfig, PipelineResult, PluginBuildContext, PluginContext, PluginExecutionPhase, PluginSetupContext, } from "./orchestrator/types.js";
5
+ export type { GeneratedArtifact, OrchestrationPlugin, PipelineConfig, PipelineResult, PluginContext, } from "./orchestrator/types.js";
8
6
  export { AsyncAPIParseError, parseAsyncAPI } from "./parseAsyncAPI.js";
9
7
  export type { AsyncAPIDocumentInterface, AsyncAPIParserOptions, Diagnostic, Input, ParseAsyncAPIOptions, ParseOptions, ParsedAsyncAPI, } from "./parseAsyncAPI.js";
8
+ export type { AsyncAPISource, JsonArray, JsonObject, JsonPrimitive, JsonValue } from "./source.js";
9
+ export { InteractionContractError } from "./interaction/errors.js";
10
+ export type { InteractionContractErrorCode, InteractionContractErrorOptions, } from "./interaction/errors.js";
11
+ export type { ChannelContract, ChannelParameterContract, InteractionAction, InteractionAsyncAPIVersion, InteractionContract, InteractionRootKind, InteractionRootMetadata, MessageContract, OperationContract, ReplyContract, SchemaContract, SchemaDependencyContract, SchemaRoleContract, } from "./interaction/types.js";
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,iBAAiB,EACjB,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,YAAY,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,YAAY,EACV,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACvE,YAAY,EACV,yBAAyB,EACzB,qBAAqB,EACrB,UAAU,EACV,KAAK,EACL,oBAAoB,EACpB,YAAY,EACZ,cAAc,GACf,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC/E,YAAY,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,YAAY,EACV,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,aAAa,GACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACvE,YAAY,EACV,yBAAyB,EACzB,qBAAqB,EACrB,UAAU,EACV,KAAK,EACL,oBAAoB,EACpB,YAAY,EACZ,cAAc,GACf,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACnG,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,YAAY,EACV,4BAA4B,EAC5B,+BAA+B,GAChC,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,eAAe,EACf,wBAAwB,EACxB,iBAAiB,EACjB,0BAA0B,EAC1B,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- export { ArtifactError, PluginConfigurationError, PluginExecutionError, ServiceRegistryError, } from "./orchestrator/errors.js";
1
+ export { ArtifactError, PluginExecutionError } from "./orchestrator/errors.js";
2
2
  export { defineConfig, definePlugin } from "./orchestrator/helpers.js";
3
3
  export { run } from "./orchestrator/run.js";
4
- export { createServiceToken } from "./orchestrator/services.js";
5
4
  export { AsyncAPIParseError, parseAsyncAPI } from "./parseAsyncAPI.js";
5
+ export { InteractionContractError } from "./interaction/errors.js";
@@ -0,0 +1,5 @@
1
+ import type { AsyncAPIDocumentInterface } from "@asyncapi/parser";
2
+ import type { InteractionContract } from "./types.js";
3
+ import type { AsyncAPISource } from "../source.js";
4
+ export declare function buildInteractionContract(document: AsyncAPIDocumentInterface, source?: AsyncAPISource): InteractionContract;
5
+ //# sourceMappingURL=build.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/interaction/build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EAM1B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAKV,mBAAmB,EAIpB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AA2NnD,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,yBAAyB,EACnC,MAAM,CAAC,EAAE,cAAc,GACtB,mBAAmB,CAqOrB"}