@composurecdk/core 0.1.2 → 0.3.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.
- package/README.md +98 -0
- package/dist/compose.d.ts +83 -6
- package/dist/compose.d.ts.map +1 -1
- package/dist/compose.js +32 -9
- package/dist/compose.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# @composurecdk/core
|
|
2
|
+
|
|
3
|
+
Core primitives for [ComposureCDK](../../README.md).
|
|
4
|
+
|
|
5
|
+
This package provides the foundational types and utilities that all ComposureCDK resource packages build on: the fluent `Builder` proxy, the `compose` function for assembling component systems with dependency resolution, lazy `Ref` cross-references, and stack strategies for routing components to scopes.
|
|
6
|
+
|
|
7
|
+
Most users interact with these primitives indirectly through resource packages (e.g., `@composurecdk/lambda`, `@composurecdk/s3`). Use this package directly when building a custom ComposureCDK resource package or when composing systems.
|
|
8
|
+
|
|
9
|
+
## Builder
|
|
10
|
+
|
|
11
|
+
Generic fluent-builder factory that wraps a class, exposing every property in `Props` as an overloaded getter/setter method. Resource packages use this internally to create their builders.
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { Builder, type IBuilder } from "@composurecdk/core";
|
|
15
|
+
|
|
16
|
+
type IMyBuilder = IBuilder<MyProps, MyLifecycle>;
|
|
17
|
+
|
|
18
|
+
export function createMyBuilder(): IMyBuilder {
|
|
19
|
+
return Builder<MyProps, MyLifecycle>(MyLifecycle);
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## compose
|
|
24
|
+
|
|
25
|
+
Composes a set of `Lifecycle` components into a single system with automatic dependency resolution. Dependencies are declared as data; the system builds components in topological order and passes resolved outputs as context.
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { compose } from "@composurecdk/core";
|
|
29
|
+
|
|
30
|
+
const system = compose(
|
|
31
|
+
{ handler: createFunctionBuilder(), api: createRestApiBuilder() },
|
|
32
|
+
{ handler: [], api: ["handler"] },
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
system.build(stack, "MySystem");
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Cyclic dependencies are detected at composition time and throw a `CyclicDependencyError`.
|
|
39
|
+
|
|
40
|
+
### Stack routing
|
|
41
|
+
|
|
42
|
+
Route components to different scopes (typically Stacks) using `withStacks` or `withStackStrategy`:
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
// Explicit scope mapping
|
|
46
|
+
system.withStacks({ handler: serviceStack, api: apiStack }).build(app, "MySystem");
|
|
47
|
+
|
|
48
|
+
// Strategy-based routing
|
|
49
|
+
import { singleStack, groupedStacks } from "@composurecdk/core";
|
|
50
|
+
|
|
51
|
+
system.withStackStrategy(singleStack(myFactory)).build(app, "MySystem");
|
|
52
|
+
|
|
53
|
+
system
|
|
54
|
+
.withStackStrategy(groupedStacks((key) => (key === "handler" ? "compute" : "api"), myFactory))
|
|
55
|
+
.build(app, "MySystem");
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Post-build hooks
|
|
59
|
+
|
|
60
|
+
Register callbacks that run after all components are built via `afterBuild`. Domain-specific packages provide helper functions that return hooks — for example, `outputs()` from `@composurecdk/cloudformation`.
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
system
|
|
64
|
+
.afterBuild((scope, id, results) => {
|
|
65
|
+
console.log("Built:", Object.keys(results));
|
|
66
|
+
})
|
|
67
|
+
.build(stack, "MySystem");
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Ref
|
|
71
|
+
|
|
72
|
+
Lazy cross-component references that are resolved at build time. Use `ref` to reference a dependency's output at configuration time — the value is resolved when the system is built.
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
import { ref } from "@composurecdk/core";
|
|
76
|
+
import type { FunctionBuilderResult } from "@composurecdk/lambda";
|
|
77
|
+
|
|
78
|
+
// Reference the full build result
|
|
79
|
+
ref<FunctionBuilderResult>("handler");
|
|
80
|
+
|
|
81
|
+
// Narrow to a specific property
|
|
82
|
+
ref<FunctionBuilderResult>("handler").get("function");
|
|
83
|
+
|
|
84
|
+
// Transform the referenced value
|
|
85
|
+
ref<FunctionBuilderResult>("handler")
|
|
86
|
+
.get("function")
|
|
87
|
+
.map((fn) => new LambdaIntegration(fn));
|
|
88
|
+
|
|
89
|
+
// Shorthand with inline transform
|
|
90
|
+
ref<FunctionBuilderResult>("handler", (r) => new LambdaIntegration(r.function));
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Examples
|
|
94
|
+
|
|
95
|
+
- [MultiStackApp](../examples/src/multi-stack-app.ts) — System composed with `withStacks` for multi-stack routing
|
|
96
|
+
- [StrategyStackApp](../examples/src/strategy-stack-app.ts) — System composed with `withStackStrategy`
|
|
97
|
+
- [LambdaApiStack](../examples/src/lambda-api-app.ts) — Cross-component wiring with `ref`
|
|
98
|
+
- [StaticWebsiteStack](../examples/src/static-website/app.ts) — S3 + CloudFront composed system with `ref` and `afterBuild`
|
package/dist/compose.d.ts
CHANGED
|
@@ -21,9 +21,32 @@ type BuildResult<T extends {
|
|
|
21
21
|
* @typeParam Components - The full set of components in the system.
|
|
22
22
|
*/
|
|
23
23
|
type Dependency<Components extends Record<string, Lifecycle>> = (keyof Components)[];
|
|
24
|
+
/**
|
|
25
|
+
* A callback invoked after all components in a composed system have been
|
|
26
|
+
* built. Receives the scope, system id, and the fully-typed build results
|
|
27
|
+
* of every component. Use this to create additional constructs that depend
|
|
28
|
+
* on the composed system's outputs — CloudFormation outputs, tags, alarms,
|
|
29
|
+
* dashboards, etc.
|
|
30
|
+
*
|
|
31
|
+
* Domain-specific packages provide helper functions that return hooks. For
|
|
32
|
+
* example, `@composurecdk/cloudformation` exports {@link outputs} which
|
|
33
|
+
* creates `CfnOutput` constructs from {@link Ref}-based definitions.
|
|
34
|
+
*
|
|
35
|
+
* @typeParam T - The build result type of the composed system.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const logResults: AfterBuildHook<{ site: BucketBuilderResult }> =
|
|
40
|
+
* (_scope, _id, results) => {
|
|
41
|
+
* console.log("Bucket:", results.site.bucket.bucketName);
|
|
42
|
+
* };
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export type AfterBuildHook<T extends object> = (scope: IConstruct, id: string, results: T) => void;
|
|
24
46
|
/**
|
|
25
47
|
* A {@link Lifecycle} produced by {@link compose}, extended with methods
|
|
26
|
-
* for controlling how components are routed to scopes
|
|
48
|
+
* for controlling how components are routed to scopes and for registering
|
|
49
|
+
* post-build hooks.
|
|
27
50
|
*
|
|
28
51
|
* Because `ComposedSystem` extends `Lifecycle`, a composed system can be
|
|
29
52
|
* nested as a component inside another `compose` call — composition is
|
|
@@ -50,13 +73,18 @@ export interface ComposedSystem<Components extends Record<string, Lifecycle>> ex
|
|
|
50
73
|
*/
|
|
51
74
|
withStacks(stacks: {
|
|
52
75
|
[K in keyof Components]?: IConstruct;
|
|
53
|
-
}):
|
|
76
|
+
}): ConfiguredSystem<Components>;
|
|
54
77
|
/**
|
|
55
|
-
* Returns a new {@link
|
|
56
|
-
* determine each component's scope during build.
|
|
78
|
+
* Returns a new {@link ConfiguredSystem} that uses a {@link StackStrategy}
|
|
79
|
+
* to determine each component's scope during build. The returned system
|
|
80
|
+
* supports further chaining of {@link ConfiguredSystem.afterBuild | .afterBuild()} hooks.
|
|
81
|
+
*
|
|
82
|
+
* Mutually exclusive with {@link withStacks} — calling one locks the
|
|
83
|
+
* stack routing; further stack-routing methods are not available on the
|
|
84
|
+
* returned {@link ConfiguredSystem}.
|
|
57
85
|
*
|
|
58
86
|
* @param strategy - The strategy that resolves scopes for components.
|
|
59
|
-
* @returns A {@link
|
|
87
|
+
* @returns A {@link ConfiguredSystem} with strategy-based stack routing applied.
|
|
60
88
|
*
|
|
61
89
|
* @example
|
|
62
90
|
* ```ts
|
|
@@ -65,10 +93,59 @@ export interface ComposedSystem<Components extends Record<string, Lifecycle>> ex
|
|
|
65
93
|
* key => key === "table" ? "persistence" : "service",
|
|
66
94
|
* (app, id) => new Stack(app, id),
|
|
67
95
|
* ))
|
|
96
|
+
* .afterBuild(outputs({ ... }))
|
|
68
97
|
* .build(app, "MySystem");
|
|
69
98
|
* ```
|
|
70
99
|
*/
|
|
71
|
-
withStackStrategy(strategy: StackStrategy):
|
|
100
|
+
withStackStrategy(strategy: StackStrategy): ConfiguredSystem<Components>;
|
|
101
|
+
/**
|
|
102
|
+
* Returns a new {@link ConfiguredSystem} that invokes the given hook after
|
|
103
|
+
* all components have been built. The hook receives the scope, system id,
|
|
104
|
+
* and the fully-typed build results.
|
|
105
|
+
*
|
|
106
|
+
* Multiple hooks can be chained — each `.afterBuild()` appends to the
|
|
107
|
+
* hook list and returns the same {@link ConfiguredSystem} for further
|
|
108
|
+
* chaining.
|
|
109
|
+
*
|
|
110
|
+
* This is the extension point for adding post-build behaviour to a
|
|
111
|
+
* composed system without modifying the system itself. Domain-specific
|
|
112
|
+
* packages provide helper functions that return hooks — for example,
|
|
113
|
+
* `outputs()` from `@composurecdk/cloudformation` creates CfnOutput
|
|
114
|
+
* constructs.
|
|
115
|
+
*
|
|
116
|
+
* @param hook - A callback invoked after all components are built.
|
|
117
|
+
* @returns A {@link ConfiguredSystem} with the hook applied.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```ts
|
|
121
|
+
* compose({ site, cdn }, { site: [], cdn: ["site"] })
|
|
122
|
+
* .afterBuild(outputs({
|
|
123
|
+
* Url: { value: ref("cdn", r => r.distribution.domainName) },
|
|
124
|
+
* }))
|
|
125
|
+
* .build(stack, "MySystem");
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
afterBuild(hook: AfterBuildHook<BuildResult<Components>>): ConfiguredSystem<Components>;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* A {@link Lifecycle} with stack routing or post-build hooks applied.
|
|
132
|
+
* Returned by {@link ComposedSystem.withStacks},
|
|
133
|
+
* {@link ComposedSystem.withStackStrategy}, and
|
|
134
|
+
* {@link ComposedSystem.afterBuild}.
|
|
135
|
+
*
|
|
136
|
+
* Supports chaining further {@link afterBuild} hooks. Stack routing methods
|
|
137
|
+
* are not available — they are mutually exclusive and must be chosen on
|
|
138
|
+
* the original {@link ComposedSystem}.
|
|
139
|
+
*/
|
|
140
|
+
export interface ConfiguredSystem<Components extends Record<string, Lifecycle>> extends Lifecycle<BuildResult<Components>> {
|
|
141
|
+
/**
|
|
142
|
+
* Appends a post-build hook. Multiple hooks can be chained; they execute
|
|
143
|
+
* in registration order after all components have been built.
|
|
144
|
+
*
|
|
145
|
+
* @param hook - A callback invoked after all components are built.
|
|
146
|
+
* @returns This {@link ConfiguredSystem} for further chaining.
|
|
147
|
+
*/
|
|
148
|
+
afterBuild(hook: AfterBuildHook<BuildResult<Components>>): ConfiguredSystem<Components>;
|
|
72
149
|
}
|
|
73
150
|
/**
|
|
74
151
|
* Composes a set of {@link Lifecycle} components into a single system that
|
package/dist/compose.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../src/compose.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD;;;;;;GAMG;AACH,KAAK,WAAW,CAAC,CAAC,SAAS;KAAG,QAAQ,IAAI,MAAM,CAAC,GAAG,SAAS;CAAE,IAAI;KAChE,QAAQ,IAAI,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,OAAO,CA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UAAU,CAAC,CAAC;IAE3F;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,iBAAiB,CAAC,QAAQ,EAAE,aAAa,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAEzE;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,UAAU,CAAC,IAAI,EAAE,cAAc,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;CACzF;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,gBAAgB,CAAC,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAE,SAAQ,SAAS,CAC/F,WAAW,CAAC,UAAU,CAAC,CACxB;IACC;;;;;;OAMG;IACH,UAAU,CAAC,IAAI,EAAE,cAAc,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;CACzF;AAwFD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,OAAO,CAAC,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,EAClE,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE;KAAG,QAAQ,IAAI,MAAM,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;CAAE,GACvE,cAAc,CAAC,UAAU,CAAC,CAE5B"}
|
package/dist/compose.js
CHANGED
|
@@ -33,17 +33,16 @@ class ComposedLifecycle {
|
|
|
33
33
|
this.graph = buildDependencyGraph(components, dependencies);
|
|
34
34
|
}
|
|
35
35
|
withStacks(stacks) {
|
|
36
|
-
return
|
|
37
|
-
build: (scope, id) => this.buildWith(scope, id, stacks),
|
|
38
|
-
};
|
|
36
|
+
return new ConfiguredLifecycle((scope, id) => this.buildWith(scope, id, stacks));
|
|
39
37
|
}
|
|
40
38
|
withStackStrategy(strategy) {
|
|
41
|
-
return {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
return new ConfiguredLifecycle((scope, id) => {
|
|
40
|
+
const stacks = Object.fromEntries(Object.keys(this.components).map((key) => [key, strategy.resolve(scope, id, key)]));
|
|
41
|
+
return this.buildWith(scope, id, stacks);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
afterBuild(hook) {
|
|
45
|
+
return new ConfiguredLifecycle((scope, id) => this.buildWith(scope, id)).afterBuild(hook);
|
|
47
46
|
}
|
|
48
47
|
build(scope, id) {
|
|
49
48
|
return this.buildWith(scope, id);
|
|
@@ -59,6 +58,30 @@ class ComposedLifecycle {
|
|
|
59
58
|
return results;
|
|
60
59
|
}
|
|
61
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* A configured lifecycle that accumulates post-build hooks and applies them
|
|
63
|
+
* after the underlying build function completes. Returned by
|
|
64
|
+
* {@link ComposedLifecycle}'s `withStacks`, `withStackStrategy`, and
|
|
65
|
+
* `afterBuild` methods.
|
|
66
|
+
*/
|
|
67
|
+
class ConfiguredLifecycle {
|
|
68
|
+
buildFn;
|
|
69
|
+
hooks = [];
|
|
70
|
+
constructor(buildFn) {
|
|
71
|
+
this.buildFn = buildFn;
|
|
72
|
+
}
|
|
73
|
+
afterBuild(hook) {
|
|
74
|
+
this.hooks.push(hook);
|
|
75
|
+
return this;
|
|
76
|
+
}
|
|
77
|
+
build(scope, id) {
|
|
78
|
+
const results = this.buildFn(scope, id);
|
|
79
|
+
for (const hook of this.hooks) {
|
|
80
|
+
hook(scope, id, results);
|
|
81
|
+
}
|
|
82
|
+
return results;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
62
85
|
/**
|
|
63
86
|
* Composes a set of {@link Lifecycle} components into a single system that
|
|
64
87
|
* manages their build order and dependency resolution.
|
package/dist/compose.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.js","sourceRoot":"","sources":["../src/compose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,GAAG,EAAE,IAAI,EAAE,MAAM,mBAA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KAAK,CAAC,cAAc,EAAE,GAAG,EAAE,IAAI,GAAG,EAAE,EAAE,OAAO,CAAC,CAAC;QACrF,CAAC;QAED,OAAO,OAAkC,CAAC;IAC5C,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,mBAAmB;IAMJ;IAHF,KAAK,GAA8C,EAAE,CAAC;IAEvE,YACmB,OAAmE;QAAnE,YAAO,GAAP,OAAO,CAA4D;IACnF,CAAC;IAEJ,UAAU,CAAC,IAA6C;QACtD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,KAAiB,EAAE,EAAU;QACjC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACxC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAC9B,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;QAC3B,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,OAAO,CACrB,UAAsB,EACtB,YAAwE;IAExE,OAAO,IAAI,iBAAiB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;AACzD,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Builder, type IBuilder } from "./builder.js";
|
|
2
|
-
export { compose, type ComposedSystem } from "./compose.js";
|
|
2
|
+
export { compose, type ComposedSystem, type ConfiguredSystem, type AfterBuildHook, } from "./compose.js";
|
|
3
3
|
export { CyclicDependencyError } from "./cyclic-dependency-error.js";
|
|
4
4
|
export { type Lifecycle } from "./lifecycle.js";
|
|
5
5
|
export { Ref, ref, resolve, isRef, type Resolvable } from "./ref.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EACL,OAAO,EACP,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,WAAW,EACX,aAAa,GACd,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Builder } from "./builder.js";
|
|
2
|
-
export { compose } from "./compose.js";
|
|
2
|
+
export { compose, } from "./compose.js";
|
|
3
3
|
export { CyclicDependencyError } from "./cyclic-dependency-error.js";
|
|
4
4
|
export { Ref, ref, resolve, isRef } from "./ref.js";
|
|
5
5
|
export { singleStack, groupedStacks, } from "./stack-strategy.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAiB,MAAM,cAAc,CAAC;AACtD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAiB,MAAM,cAAc,CAAC;AACtD,OAAO,EACL,OAAO,GAIR,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAmB,MAAM,UAAU,CAAC;AACrE,OAAO,EAGL,WAAW,EACX,aAAa,GACd,MAAM,qBAAqB,CAAC"}
|