@dryvcode/author 0.0.1
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 +341 -0
- package/dist/behavior/duration.d.ts +7 -0
- package/dist/behavior/duration.d.ts.map +1 -0
- package/dist/behavior/duration.js +20 -0
- package/dist/behavior/duration.js.map +1 -0
- package/dist/behavior/event.d.ts +23 -0
- package/dist/behavior/event.d.ts.map +1 -0
- package/dist/behavior/event.js +57 -0
- package/dist/behavior/event.js.map +1 -0
- package/dist/behavior/failure.d.ts +19 -0
- package/dist/behavior/failure.d.ts.map +1 -0
- package/dist/behavior/failure.js +48 -0
- package/dist/behavior/failure.js.map +1 -0
- package/dist/behavior/index.d.ts +6 -0
- package/dist/behavior/index.d.ts.map +1 -0
- package/dist/behavior/index.js +6 -0
- package/dist/behavior/index.js.map +1 -0
- package/dist/behavior/operation.d.ts +72 -0
- package/dist/behavior/operation.d.ts.map +1 -0
- package/dist/behavior/operation.js +193 -0
- package/dist/behavior/operation.js.map +1 -0
- package/dist/behavior/policy.d.ts +29 -0
- package/dist/behavior/policy.d.ts.map +1 -0
- package/dist/behavior/policy.js +80 -0
- package/dist/behavior/policy.js.map +1 -0
- package/dist/composition/application.d.ts +28 -0
- package/dist/composition/application.d.ts.map +1 -0
- package/dist/composition/application.js +64 -0
- package/dist/composition/application.js.map +1 -0
- package/dist/composition/feature.d.ts +37 -0
- package/dist/composition/feature.d.ts.map +1 -0
- package/dist/composition/feature.js +82 -0
- package/dist/composition/feature.js.map +1 -0
- package/dist/composition/index.d.ts +3 -0
- package/dist/composition/index.d.ts.map +1 -0
- package/dist/composition/index.js +3 -0
- package/dist/composition/index.js.map +1 -0
- package/dist/contracts/behavior.d.ts +106 -0
- package/dist/contracts/behavior.d.ts.map +1 -0
- package/dist/contracts/behavior.js +2 -0
- package/dist/contracts/behavior.js.map +1 -0
- package/dist/contracts/composition.d.ts +20 -0
- package/dist/contracts/composition.d.ts.map +1 -0
- package/dist/contracts/composition.js +2 -0
- package/dist/contracts/composition.js.map +1 -0
- package/dist/contracts/definitions.d.ts +286 -0
- package/dist/contracts/definitions.d.ts.map +1 -0
- package/dist/contracts/definitions.js +35 -0
- package/dist/contracts/definitions.js.map +1 -0
- package/dist/contracts/expressions.d.ts +44 -0
- package/dist/contracts/expressions.d.ts.map +1 -0
- package/dist/contracts/expressions.js +2 -0
- package/dist/contracts/expressions.js.map +1 -0
- package/dist/contracts/foundation.d.ts +141 -0
- package/dist/contracts/foundation.d.ts.map +1 -0
- package/dist/contracts/foundation.js +2 -0
- package/dist/contracts/foundation.js.map +1 -0
- package/dist/contracts/index.d.ts +10 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +10 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/interaction.d.ts +52 -0
- package/dist/contracts/interaction.d.ts.map +1 -0
- package/dist/contracts/interaction.js +2 -0
- package/dist/contracts/interaction.js.map +1 -0
- package/dist/contracts/interfaces.d.ts +73 -0
- package/dist/contracts/interfaces.d.ts.map +1 -0
- package/dist/contracts/interfaces.js +2 -0
- package/dist/contracts/interfaces.js.map +1 -0
- package/dist/contracts/orchestration.d.ts +56 -0
- package/dist/contracts/orchestration.d.ts.map +1 -0
- package/dist/contracts/orchestration.js +2 -0
- package/dist/contracts/orchestration.js.map +1 -0
- package/dist/contracts/project.d.ts +70 -0
- package/dist/contracts/project.d.ts.map +1 -0
- package/dist/contracts/project.js +2 -0
- package/dist/contracts/project.js.map +1 -0
- package/dist/data/index.d.ts +2 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +2 -0
- package/dist/data/index.js.map +1 -0
- package/dist/data/storage.d.ts +23 -0
- package/dist/data/storage.d.ts.map +1 -0
- package/dist/data/storage.js +93 -0
- package/dist/data/storage.js.map +1 -0
- package/dist/definitions/expressions/expression.d.ts +49 -0
- package/dist/definitions/expressions/expression.d.ts.map +1 -0
- package/dist/definitions/expressions/expression.js +181 -0
- package/dist/definitions/expressions/expression.js.map +1 -0
- package/dist/definitions/expressions/index.d.ts +2 -0
- package/dist/definitions/expressions/index.d.ts.map +1 -0
- package/dist/definitions/expressions/index.js +2 -0
- package/dist/definitions/expressions/index.js.map +1 -0
- package/dist/definitions/index.d.ts +7 -0
- package/dist/definitions/index.d.ts.map +1 -0
- package/dist/definitions/index.js +7 -0
- package/dist/definitions/index.js.map +1 -0
- package/dist/definitions/properties/advanced.d.ts +27 -0
- package/dist/definitions/properties/advanced.d.ts.map +1 -0
- package/dist/definitions/properties/advanced.js +95 -0
- package/dist/definitions/properties/advanced.js.map +1 -0
- package/dist/definitions/properties/base.d.ts +29 -0
- package/dist/definitions/properties/base.d.ts.map +1 -0
- package/dist/definitions/properties/base.js +60 -0
- package/dist/definitions/properties/base.js.map +1 -0
- package/dist/definitions/properties/composite.d.ts +14 -0
- package/dist/definitions/properties/composite.d.ts.map +1 -0
- package/dist/definitions/properties/composite.js +41 -0
- package/dist/definitions/properties/composite.js.map +1 -0
- package/dist/definitions/properties/enumeration.d.ts +17 -0
- package/dist/definitions/properties/enumeration.d.ts.map +1 -0
- package/dist/definitions/properties/enumeration.js +48 -0
- package/dist/definitions/properties/enumeration.js.map +1 -0
- package/dist/definitions/properties/generic.d.ts +22 -0
- package/dist/definitions/properties/generic.d.ts.map +1 -0
- package/dist/definitions/properties/generic.js +61 -0
- package/dist/definitions/properties/generic.js.map +1 -0
- package/dist/definitions/properties/index.d.ts +12 -0
- package/dist/definitions/properties/index.d.ts.map +1 -0
- package/dist/definitions/properties/index.js +3 -0
- package/dist/definitions/properties/index.js.map +1 -0
- package/dist/definitions/properties/metadata.d.ts +6 -0
- package/dist/definitions/properties/metadata.d.ts.map +1 -0
- package/dist/definitions/properties/metadata.js +4 -0
- package/dist/definitions/properties/metadata.js.map +1 -0
- package/dist/definitions/properties/primitive.d.ts +66 -0
- package/dist/definitions/properties/primitive.d.ts.map +1 -0
- package/dist/definitions/properties/primitive.js +266 -0
- package/dist/definitions/properties/primitive.js.map +1 -0
- package/dist/definitions/properties/property.d.ts +171 -0
- package/dist/definitions/properties/property.d.ts.map +1 -0
- package/dist/definitions/properties/property.js +211 -0
- package/dist/definitions/properties/property.js.map +1 -0
- package/dist/definitions/properties/temporal.d.ts +37 -0
- package/dist/definitions/properties/temporal.d.ts.map +1 -0
- package/dist/definitions/properties/temporal.js +115 -0
- package/dist/definitions/properties/temporal.js.map +1 -0
- package/dist/definitions/schemas/field.d.ts +123 -0
- package/dist/definitions/schemas/field.d.ts.map +1 -0
- package/dist/definitions/schemas/field.js +329 -0
- package/dist/definitions/schemas/field.js.map +1 -0
- package/dist/definitions/schemas/index.d.ts +6 -0
- package/dist/definitions/schemas/index.d.ts.map +1 -0
- package/dist/definitions/schemas/index.js +6 -0
- package/dist/definitions/schemas/index.js.map +1 -0
- package/dist/definitions/schemas/projection.d.ts +90 -0
- package/dist/definitions/schemas/projection.d.ts.map +1 -0
- package/dist/definitions/schemas/projection.js +146 -0
- package/dist/definitions/schemas/projection.js.map +1 -0
- package/dist/definitions/schemas/relation.d.ts +12 -0
- package/dist/definitions/schemas/relation.d.ts.map +1 -0
- package/dist/definitions/schemas/relation.js +27 -0
- package/dist/definitions/schemas/relation.js.map +1 -0
- package/dist/definitions/schemas/schema.d.ts +46 -0
- package/dist/definitions/schemas/schema.d.ts.map +1 -0
- package/dist/definitions/schemas/schema.js +134 -0
- package/dist/definitions/schemas/schema.js.map +1 -0
- package/dist/definitions/schemas/source.d.ts +30 -0
- package/dist/definitions/schemas/source.d.ts.map +1 -0
- package/dist/definitions/schemas/source.js +73 -0
- package/dist/definitions/schemas/source.js.map +1 -0
- package/dist/definitions/types/expressions.d.ts +28 -0
- package/dist/definitions/types/expressions.d.ts.map +1 -0
- package/dist/definitions/types/expressions.js +81 -0
- package/dist/definitions/types/expressions.js.map +1 -0
- package/dist/definitions/types/index.d.ts +4 -0
- package/dist/definitions/types/index.d.ts.map +1 -0
- package/dist/definitions/types/index.js +4 -0
- package/dist/definitions/types/index.js.map +1 -0
- package/dist/definitions/types/parameter.d.ts +9 -0
- package/dist/definitions/types/parameter.d.ts.map +1 -0
- package/dist/definitions/types/parameter.js +24 -0
- package/dist/definitions/types/parameter.js.map +1 -0
- package/dist/definitions/types/spec.d.ts +26 -0
- package/dist/definitions/types/spec.d.ts.map +1 -0
- package/dist/definitions/types/spec.js +74 -0
- package/dist/definitions/types/spec.js.map +1 -0
- package/dist/foundation/declaration.d.ts +24 -0
- package/dist/foundation/declaration.d.ts.map +1 -0
- package/dist/foundation/declaration.js +43 -0
- package/dist/foundation/declaration.js.map +1 -0
- package/dist/foundation/group.d.ts +55 -0
- package/dist/foundation/group.d.ts.map +1 -0
- package/dist/foundation/group.js +199 -0
- package/dist/foundation/group.js.map +1 -0
- package/dist/foundation/index.d.ts +7 -0
- package/dist/foundation/index.d.ts.map +1 -0
- package/dist/foundation/index.js +7 -0
- package/dist/foundation/index.js.map +1 -0
- package/dist/foundation/metadata.d.ts +22 -0
- package/dist/foundation/metadata.d.ts.map +1 -0
- package/dist/foundation/metadata.js +43 -0
- package/dist/foundation/metadata.js.map +1 -0
- package/dist/foundation/ref.d.ts +200 -0
- package/dist/foundation/ref.d.ts.map +1 -0
- package/dist/foundation/ref.js +230 -0
- package/dist/foundation/ref.js.map +1 -0
- package/dist/foundation/scope.d.ts +13 -0
- package/dist/foundation/scope.d.ts.map +1 -0
- package/dist/foundation/scope.js +63 -0
- package/dist/foundation/scope.js.map +1 -0
- package/dist/foundation/value-declaration.d.ts +9 -0
- package/dist/foundation/value-declaration.d.ts.map +1 -0
- package/dist/foundation/value-declaration.js +2 -0
- package/dist/foundation/value-declaration.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/interaction/index.d.ts +3 -0
- package/dist/interaction/index.d.ts.map +1 -0
- package/dist/interaction/index.js +3 -0
- package/dist/interaction/index.js.map +1 -0
- package/dist/interaction/part.d.ts +58 -0
- package/dist/interaction/part.d.ts.map +1 -0
- package/dist/interaction/part.js +178 -0
- package/dist/interaction/part.js.map +1 -0
- package/dist/interaction/view.d.ts +34 -0
- package/dist/interaction/view.d.ts.map +1 -0
- package/dist/interaction/view.js +109 -0
- package/dist/interaction/view.js.map +1 -0
- package/dist/interfaces/facet.d.ts +6 -0
- package/dist/interfaces/facet.d.ts.map +1 -0
- package/dist/interfaces/facet.js +2 -0
- package/dist/interfaces/facet.js.map +1 -0
- package/dist/interfaces/http.d.ts +39 -0
- package/dist/interfaces/http.d.ts.map +1 -0
- package/dist/interfaces/http.js +109 -0
- package/dist/interfaces/http.js.map +1 -0
- package/dist/interfaces/index.d.ts +7 -0
- package/dist/interfaces/index.d.ts.map +1 -0
- package/dist/interfaces/index.js +7 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/interfaces/representation.d.ts +14 -0
- package/dist/interfaces/representation.d.ts.map +1 -0
- package/dist/interfaces/representation.js +25 -0
- package/dist/interfaces/representation.js.map +1 -0
- package/dist/interfaces/schedule.d.ts +14 -0
- package/dist/interfaces/schedule.d.ts.map +1 -0
- package/dist/interfaces/schedule.js +46 -0
- package/dist/interfaces/schedule.js.map +1 -0
- package/dist/interfaces/surface.d.ts +22 -0
- package/dist/interfaces/surface.d.ts.map +1 -0
- package/dist/interfaces/surface.js +44 -0
- package/dist/interfaces/surface.js.map +1 -0
- package/dist/interfaces/websocket.d.ts +11 -0
- package/dist/interfaces/websocket.d.ts.map +1 -0
- package/dist/interfaces/websocket.js +25 -0
- package/dist/interfaces/websocket.js.map +1 -0
- package/dist/orchestration/index.d.ts +4 -0
- package/dist/orchestration/index.d.ts.map +1 -0
- package/dist/orchestration/index.js +4 -0
- package/dist/orchestration/index.js.map +1 -0
- package/dist/orchestration/steps.d.ts +41 -0
- package/dist/orchestration/steps.d.ts.map +1 -0
- package/dist/orchestration/steps.js +105 -0
- package/dist/orchestration/steps.js.map +1 -0
- package/dist/orchestration/value-source.d.ts +8 -0
- package/dist/orchestration/value-source.d.ts.map +1 -0
- package/dist/orchestration/value-source.js +10 -0
- package/dist/orchestration/value-source.js.map +1 -0
- package/dist/orchestration/workflow.d.ts +38 -0
- package/dist/orchestration/workflow.d.ts.map +1 -0
- package/dist/orchestration/workflow.js +116 -0
- package/dist/orchestration/workflow.js.map +1 -0
- package/dist/project/index.d.ts +2 -0
- package/dist/project/index.d.ts.map +1 -0
- package/dist/project/index.js +2 -0
- package/dist/project/index.js.map +1 -0
- package/dist/project/project.d.ts +27 -0
- package/dist/project/project.d.ts.map +1 -0
- package/dist/project/project.js +161 -0
- package/dist/project/project.js.map +1 -0
- package/dist/project/registry.d.ts +33 -0
- package/dist/project/registry.d.ts.map +1 -0
- package/dist/project/registry.js +58 -0
- package/dist/project/registry.js.map +1 -0
- package/dist/project/snapshot.d.ts +4 -0
- package/dist/project/snapshot.d.ts.map +1 -0
- package/dist/project/snapshot.js +15 -0
- package/dist/project/snapshot.js.map +1 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +3 -0
- package/dist/version.js.map +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { ExplanationKindState, ExplanationState } from "../contracts/index.js";
|
|
2
|
+
import type { CollectPartState, DeclarationRef, InvokePartState, PartState, PresentPartState } from "../contracts/index.js";
|
|
3
|
+
import type { OperationPortRef, OperationRef, TupleIndex, ValueRefTuple } from "../foundation/ref.js";
|
|
4
|
+
interface ViewOwner {
|
|
5
|
+
ref(): DeclarationRef<"view">;
|
|
6
|
+
hasContext(name: string): boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare class OutputFrom<T = unknown> {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(port: OperationPortRef<T, "output">, select?: readonly string[]);
|
|
11
|
+
toState(): PresentPartState["source"];
|
|
12
|
+
}
|
|
13
|
+
export declare function outputFrom<T>(port: OperationPortRef<T, "output">, select?: readonly string[]): OutputFrom<T>;
|
|
14
|
+
export declare class InputFrom<T = unknown> {
|
|
15
|
+
#private;
|
|
16
|
+
constructor(port: OperationPortRef<T, "input">, collect?: readonly string[], context?: Readonly<Record<string, string>>);
|
|
17
|
+
toState(view: ViewOwner): CollectPartState["target"];
|
|
18
|
+
}
|
|
19
|
+
export declare function inputFrom<T>(port: OperationPortRef<T, "input">, collect?: readonly string[], context?: Readonly<Record<string, string>>): InputFrom<T>;
|
|
20
|
+
export declare abstract class PartDeclaration {
|
|
21
|
+
private _description?;
|
|
22
|
+
private _tags;
|
|
23
|
+
private _explanations;
|
|
24
|
+
private _view?;
|
|
25
|
+
description(value: string): this;
|
|
26
|
+
tags(...values: readonly string[]): this;
|
|
27
|
+
explain(kind: ExplanationKindState, text: string): this;
|
|
28
|
+
attach(view: ViewOwner): void;
|
|
29
|
+
protected view(): ViewOwner;
|
|
30
|
+
protected descriptionState(): {
|
|
31
|
+
readonly description?: string;
|
|
32
|
+
readonly tags?: readonly string[];
|
|
33
|
+
readonly explanations?: readonly ExplanationState[];
|
|
34
|
+
};
|
|
35
|
+
abstract toState(): PartState;
|
|
36
|
+
}
|
|
37
|
+
export declare class PresentPartDeclaration extends PartDeclaration {
|
|
38
|
+
#private;
|
|
39
|
+
constructor(source: OutputFrom);
|
|
40
|
+
toState(): PresentPartState;
|
|
41
|
+
}
|
|
42
|
+
export declare class CollectPartDeclaration extends PartDeclaration {
|
|
43
|
+
#private;
|
|
44
|
+
constructor(target: InputFrom);
|
|
45
|
+
toState(): CollectPartState;
|
|
46
|
+
}
|
|
47
|
+
export declare class InvokePartDeclaration<TInputs extends ValueRefTuple = ValueRefTuple> extends PartDeclaration {
|
|
48
|
+
#private;
|
|
49
|
+
constructor(operation: OperationRef<TInputs>, context?: Readonly<Partial<Record<TupleIndex<TInputs>, string>>>);
|
|
50
|
+
toState(): InvokePartState;
|
|
51
|
+
}
|
|
52
|
+
export declare const part: Readonly<{
|
|
53
|
+
present: (source: OutputFrom) => PresentPartDeclaration;
|
|
54
|
+
collect: (target: InputFrom) => CollectPartDeclaration;
|
|
55
|
+
invoke: <TInputs extends ValueRefTuple>(operation: OperationRef<TInputs>, context?: Readonly<Partial<Record<TupleIndex<TInputs>, string>>>) => InvokePartDeclaration<TInputs>;
|
|
56
|
+
}>;
|
|
57
|
+
export {};
|
|
58
|
+
//# sourceMappingURL=part.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"part.d.ts","sourceRoot":"","sources":["../../src/interaction/part.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAMhF,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,SAAS,EACT,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,aAAa,EACd,MAAM,kBAAkB,CAAC;AAG1B,UAAU,SAAS;IACjB,GAAG,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;IAC9B,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CACnC;AA0BD,qBAAa,UAAU,CAAC,CAAC,GAAG,OAAO;;IAIjC,YAAY,IAAI,EAAE,gBAAgB,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,EAG1E;IAED,OAAO,IAAI,gBAAgB,CAAC,QAAQ,CAAC,CAKpC;CACF;AAED,wBAAgB,UAAU,CAAC,CAAC,EAC1B,IAAI,EAAE,gBAAgB,CAAC,CAAC,EAAE,QAAQ,CAAC,EACnC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GACzB,UAAU,CAAC,CAAC,CAAC,CAEf;AAED,qBAAa,SAAS,CAAC,CAAC,GAAG,OAAO;;IAKhC,YACE,IAAI,EAAE,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,EAClC,OAAO,C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EAG7B;IAED,OAAO,IAAI,gBAAgB,CAO1B;CACF;AAED,qBAAa,sBAAuB,SAAQ,eAAe;;IAGzD,YAAY,MAAM,EAAE,SAAS,EAG5B;IAED,OAAO,IAAI,gBAAgB,CAM1B;CACF;AAED,qBAAa,qBAAqB,CAChC,OAAO,SAAS,aAAa,GAAG,aAAa,CAC7C,SAAQ,eAAe;;IAIvB,YACE,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC,EAChC,OAAO,GAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC,CAAM,EAKrE;IAED,OAAO,IAAI,eAAe,CAyBzB;CACF;AAED,eAAO,MAAM,IAAI;sBACG,UAAU,KAAG,sBAAsB;sBAEnC,SAAS,KAAG,sBAAsB;aAE3C,OAAO,SAAS,aAAa,aACzB,YAAY,CAAC,OAAO,CAAC,YACvB,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,KAC9D,qBAAqB,CAAC,OAAO,CAAC;EAEjC,CAAC"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { explanation, normalizeTags, optionalSemanticMetadata, } from "../foundation/metadata.js";
|
|
2
|
+
import { optionalDescription, requireText } from "../foundation/metadata.js";
|
|
3
|
+
function semanticPath(value, field) {
|
|
4
|
+
const result = requireText(value, field);
|
|
5
|
+
const segments = result.split(".");
|
|
6
|
+
if (segments.some((segment) => !segment)) {
|
|
7
|
+
throw new TypeError(`${field} must not contain empty path segments`);
|
|
8
|
+
}
|
|
9
|
+
return result;
|
|
10
|
+
}
|
|
11
|
+
function semanticPaths(values, field) {
|
|
12
|
+
if (values === undefined)
|
|
13
|
+
return undefined;
|
|
14
|
+
if (values.length === 0) {
|
|
15
|
+
throw new TypeError(`${field} must be omitted when empty`);
|
|
16
|
+
}
|
|
17
|
+
const normalized = values.map((value) => semanticPath(value, field));
|
|
18
|
+
if (new Set(normalized).size !== normalized.length) {
|
|
19
|
+
throw new TypeError(`${field} paths must be unique`);
|
|
20
|
+
}
|
|
21
|
+
return normalized;
|
|
22
|
+
}
|
|
23
|
+
export class OutputFrom {
|
|
24
|
+
#port;
|
|
25
|
+
#select;
|
|
26
|
+
constructor(port, select) {
|
|
27
|
+
this.#port = port;
|
|
28
|
+
this.#select = semanticPaths(select, "output selector");
|
|
29
|
+
}
|
|
30
|
+
toState() {
|
|
31
|
+
return {
|
|
32
|
+
port: this.#port.toState(),
|
|
33
|
+
...(this.#select === undefined ? {} : { select: [...this.#select] }),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export function outputFrom(port, select) {
|
|
38
|
+
return new OutputFrom(port, select);
|
|
39
|
+
}
|
|
40
|
+
export class InputFrom {
|
|
41
|
+
#port;
|
|
42
|
+
#collect;
|
|
43
|
+
#context;
|
|
44
|
+
constructor(port, collect, context = {}) {
|
|
45
|
+
this.#port = port;
|
|
46
|
+
this.#collect = semanticPaths(collect, "input collection selector");
|
|
47
|
+
this.#context = Object.fromEntries(Object.entries(context).map(([path, name]) => [
|
|
48
|
+
semanticPath(path, "context target path"),
|
|
49
|
+
requireText(name, "view context name"),
|
|
50
|
+
]));
|
|
51
|
+
if (Object.keys(this.#context).length > 0 && this.#collect === undefined) {
|
|
52
|
+
throw new TypeError("inputFrom context bindings require explicit collected paths");
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
toState(view) {
|
|
56
|
+
const context = Object.entries(this.#context)
|
|
57
|
+
.sort(([a], [b]) => a.localeCompare(b))
|
|
58
|
+
.map(([path, name]) => {
|
|
59
|
+
if (!view.hasContext(name)) {
|
|
60
|
+
throw new TypeError(`unknown view context: ${name}`);
|
|
61
|
+
}
|
|
62
|
+
return { path, context: name };
|
|
63
|
+
});
|
|
64
|
+
return {
|
|
65
|
+
port: this.#port.toState(),
|
|
66
|
+
...(this.#collect === undefined ? {} : { collect: [...this.#collect] }),
|
|
67
|
+
...(context.length === 0 ? {} : { context }),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
export function inputFrom(port, collect, context = {}) {
|
|
72
|
+
return new InputFrom(port, collect, context);
|
|
73
|
+
}
|
|
74
|
+
export class PartDeclaration {
|
|
75
|
+
_description;
|
|
76
|
+
_tags = [];
|
|
77
|
+
_explanations = [];
|
|
78
|
+
_view;
|
|
79
|
+
description(value) {
|
|
80
|
+
this._description = requireText(value, "part description");
|
|
81
|
+
return this;
|
|
82
|
+
}
|
|
83
|
+
tags(...values) {
|
|
84
|
+
this._tags = [...normalizeTags(values, "tags")];
|
|
85
|
+
return this;
|
|
86
|
+
}
|
|
87
|
+
explain(kind, text) {
|
|
88
|
+
this._explanations.push(explanation(kind, text, "explanation"));
|
|
89
|
+
return this;
|
|
90
|
+
}
|
|
91
|
+
attach(view) {
|
|
92
|
+
if (this._view !== undefined) {
|
|
93
|
+
throw new TypeError("part is already attached to a view");
|
|
94
|
+
}
|
|
95
|
+
this._view = view;
|
|
96
|
+
}
|
|
97
|
+
view() {
|
|
98
|
+
if (this._view === undefined) {
|
|
99
|
+
throw new TypeError("part must be attached to a view before snapshot");
|
|
100
|
+
}
|
|
101
|
+
return this._view;
|
|
102
|
+
}
|
|
103
|
+
descriptionState() {
|
|
104
|
+
return {
|
|
105
|
+
...optionalDescription(this._description),
|
|
106
|
+
...optionalSemanticMetadata(this._tags, this._explanations),
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
export class PresentPartDeclaration extends PartDeclaration {
|
|
111
|
+
#source;
|
|
112
|
+
constructor(source) {
|
|
113
|
+
super();
|
|
114
|
+
this.#source = source;
|
|
115
|
+
}
|
|
116
|
+
toState() {
|
|
117
|
+
this.view();
|
|
118
|
+
return {
|
|
119
|
+
kind: "present",
|
|
120
|
+
source: this.#source.toState(),
|
|
121
|
+
...this.descriptionState(),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
export class CollectPartDeclaration extends PartDeclaration {
|
|
126
|
+
#target;
|
|
127
|
+
constructor(target) {
|
|
128
|
+
super();
|
|
129
|
+
this.#target = target;
|
|
130
|
+
}
|
|
131
|
+
toState() {
|
|
132
|
+
return {
|
|
133
|
+
kind: "collect",
|
|
134
|
+
target: this.#target.toState(this.view()),
|
|
135
|
+
...this.descriptionState(),
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
export class InvokePartDeclaration extends PartDeclaration {
|
|
140
|
+
#operation;
|
|
141
|
+
#context;
|
|
142
|
+
constructor(operation, context = {}) {
|
|
143
|
+
super();
|
|
144
|
+
this.#operation = operation;
|
|
145
|
+
this.#context = context;
|
|
146
|
+
}
|
|
147
|
+
toState() {
|
|
148
|
+
const view = this.view();
|
|
149
|
+
const context = Object.entries(this.#context)
|
|
150
|
+
.map(([indexText, name]) => {
|
|
151
|
+
const index = Number(indexText);
|
|
152
|
+
if (!Number.isInteger(index) || index < 0) {
|
|
153
|
+
throw new TypeError(`invalid operation input index: ${indexText}`);
|
|
154
|
+
}
|
|
155
|
+
const contextName = requireText(name, "view context name");
|
|
156
|
+
if (!view.hasContext(contextName)) {
|
|
157
|
+
throw new TypeError(`unknown view context: ${contextName}`);
|
|
158
|
+
}
|
|
159
|
+
return {
|
|
160
|
+
target: this.#operation.input(index).toState(),
|
|
161
|
+
context: contextName,
|
|
162
|
+
};
|
|
163
|
+
})
|
|
164
|
+
.sort((a, b) => a.target.index - b.target.index);
|
|
165
|
+
return {
|
|
166
|
+
kind: "invoke",
|
|
167
|
+
operation: this.#operation.ref(),
|
|
168
|
+
...(context.length === 0 ? {} : { context }),
|
|
169
|
+
...this.descriptionState(),
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
export const part = Object.freeze({
|
|
174
|
+
present: (source) => new PresentPartDeclaration(source),
|
|
175
|
+
collect: (target) => new CollectPartDeclaration(target),
|
|
176
|
+
invoke: (operation, context = {}) => new InvokePartDeclaration(operation, context),
|
|
177
|
+
});
|
|
178
|
+
//# sourceMappingURL=part.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"part.js","sourceRoot":"","sources":["../../src/interaction/part.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,aAAa,EACb,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAc/B,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAOzE,SAAS,YAAY,CAAC,KAAa,EAAE,KAAa;IAChD,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACzC,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnC,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;QACzC,MAAM,IAAI,SAAS,CAAC,GAAG,KAAK,uCAAuC,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,aAAa,CACpB,MAAqC,EACrC,KAAa;IAEb,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC3C,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,SAAS,CAAC,GAAG,KAAK,6BAA6B,CAAC,CAAC;IAC7D,CAAC;IACD,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IACrE,IAAI,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,IAAI,KAAK,UAAU,CAAC,MAAM,EAAE,CAAC;QACnD,MAAM,IAAI,SAAS,CAAC,GAAG,KAAK,uBAAuB,CAAC,CAAC;IACvD,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leState } from "../contracts/index.js";
|
|
2
|
+
import type { DeclarationRef, ViewState } from "../contracts/index.js";
|
|
3
|
+
import { Declaration } from "../foundation/declaration.js";
|
|
4
|
+
import type { SurfaceRef, ValueRef } from "../foundation/ref.js";
|
|
5
|
+
import type { PartDeclaration } from "./part.js";
|
|
6
|
+
export type ViewContextMap = Readonly<Record<string, ValueRef>>;
|
|
7
|
+
export type PartMap = Readonly<Record<string, PartDeclaration>>;
|
|
8
|
+
export type ViewPresentationMap = Readonly<Record<string, SurfaceRef>>;
|
|
9
|
+
export declare class ViewDeclaration<TContext extends ViewContextMap = {}, TParts extends PartMap = {}, TPresentations extends ViewPresentationMap = {}> extends Declaration<"view"> {
|
|
10
|
+
readonly __parts?: TParts;
|
|
11
|
+
private _description?;
|
|
12
|
+
private _tags;
|
|
13
|
+
private _explanations;
|
|
14
|
+
private _role?;
|
|
15
|
+
private _context;
|
|
16
|
+
private _parts;
|
|
17
|
+
private _presentations;
|
|
18
|
+
constructor();
|
|
19
|
+
description(value: string): this;
|
|
20
|
+
tags(...values: readonly string[]): this;
|
|
21
|
+
explain(kind: ExplanationKindState, text: string): this;
|
|
22
|
+
role(value: ViewRoleState): this;
|
|
23
|
+
context<K extends string, V extends ValueRef>(name: K, value: V): ViewDeclaration<TContext & Readonly<Record<K, V>>, TParts, TPresentations>;
|
|
24
|
+
contexts<const T extends ViewContextMap>(values: T): ViewDeclaration<TContext & T, TParts, TPresentations>;
|
|
25
|
+
hasContext(name: string): boolean;
|
|
26
|
+
part<K extends string, V extends PartDeclaration>(name: K, value: V): ViewDeclaration<TContext, TParts & Readonly<Record<K, V>>, TPresentations>;
|
|
27
|
+
parts<const T extends PartMap>(values: T): ViewDeclaration<TContext, TParts & T, TPresentations>;
|
|
28
|
+
presentation<K extends string, V extends SurfaceRef>(name: K, surface: V): ViewDeclaration<TContext, TParts, TPresentations & Readonly<Record<K, V>>>;
|
|
29
|
+
presentations<const T extends ViewPresentationMap>(values: T): ViewDeclaration<TContext, TParts, TPresentations & T>;
|
|
30
|
+
ref(): DeclarationRef<"view">;
|
|
31
|
+
toState(): ViewState;
|
|
32
|
+
}
|
|
33
|
+
export declare function view(): ViewDeclaration;
|
|
34
|
+
//# sourceMappingURL=view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../src/interaction/view.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,oBAAoB,EAEpB,aAAa,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,cAAc,EAGd,SAAS,EACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAO7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;AAChE,MAAM,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;AAChE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AAEvE,qBAAa,eAAe,CAC1B,QAAQ,SAAS,cAAc,GAAG,EAAE,EACpC,MAAM,SAAS,OAAO,GAAG,EAAE,EAC3B,cAAc,SAAS,mBAAmB,GAAG,EAAE,CAC/C,SAAQ,WAAW,CAAC,MAAM,CAAC;IAC3B,SAAiB,OAAO,CAAC,EAAE,MAAM,CAAC;IAClC,OAAO,CAAC,YAAY,CAAC,CAAS;IAC9B,OAAO,CAAC,KAAK,CAAgB;IAC7B,OAAO,CAAC,aAAa,CAA0B;IAC/C,OAAO,CAAC,KAAK,CAAC,CAAgB;IAC9B,OAAO,CAAC,QAA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,OAAO,EAAE,CAAC,GACT,eAAe,CAChB,QAAQ,EACR,MAAM,EACN,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CACxC,CAWA;IAED,aAAa,CAAC,KAAK,CAAC,CAAC,SAAS,mBAAmB,EAC/C,MAAM,EAAE,CAAC,GACR,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,GAAG,CAAC,CAAC,CASvD;IAEQ,GAAG,IAAI,cAAc,CAAC,MAAM,CAAC,CAErC;IAEQ,OAAO,IAAI,SAAS,CA0B5B;CACF;AAED,wBAAgB,IAAI,IAAI,eAAe,CAEtC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { explanation, normalizeTags, optionalSemanticMetadata, } from "../foundation/metadata.js";
|
|
2
|
+
import { Declaration } from "../foundation/declaration.js";
|
|
3
|
+
import { optionalDescription, optionalOwner, optionalOrigin, requireText, } from "../foundation/metadata.js";
|
|
4
|
+
export class ViewDeclaration extends Declaration {
|
|
5
|
+
_description;
|
|
6
|
+
_tags = [];
|
|
7
|
+
_explanations = [];
|
|
8
|
+
_role;
|
|
9
|
+
_context = {};
|
|
10
|
+
_parts = {};
|
|
11
|
+
_presentations = {};
|
|
12
|
+
constructor() {
|
|
13
|
+
super("view");
|
|
14
|
+
}
|
|
15
|
+
description(value) {
|
|
16
|
+
this._description = requireText(value, "view description");
|
|
17
|
+
return this;
|
|
18
|
+
}
|
|
19
|
+
tags(...values) {
|
|
20
|
+
this._tags = [...normalizeTags(values, "tags")];
|
|
21
|
+
return this;
|
|
22
|
+
}
|
|
23
|
+
explain(kind, text) {
|
|
24
|
+
this._explanations.push(explanation(kind, text, "explanation"));
|
|
25
|
+
return this;
|
|
26
|
+
}
|
|
27
|
+
role(value) {
|
|
28
|
+
this._role = value;
|
|
29
|
+
return this;
|
|
30
|
+
}
|
|
31
|
+
context(name, value) {
|
|
32
|
+
const key = requireText(name, "view context name");
|
|
33
|
+
if (this._context[key] !== undefined) {
|
|
34
|
+
throw new TypeError(`duplicate view context name: ${key}`);
|
|
35
|
+
}
|
|
36
|
+
this._context = { ...this._context, [key]: value };
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
39
|
+
contexts(values) {
|
|
40
|
+
for (const [name, value] of Object.entries(values)) {
|
|
41
|
+
this.context(name, value);
|
|
42
|
+
}
|
|
43
|
+
return this;
|
|
44
|
+
}
|
|
45
|
+
hasContext(name) {
|
|
46
|
+
return this._context[name] !== undefined;
|
|
47
|
+
}
|
|
48
|
+
part(name, value) {
|
|
49
|
+
const key = requireText(name, "part name");
|
|
50
|
+
if (this._parts[key] !== undefined) {
|
|
51
|
+
throw new TypeError(`duplicate view part name: ${key}`);
|
|
52
|
+
}
|
|
53
|
+
value.attach(this);
|
|
54
|
+
this._parts = { ...this._parts, [key]: value };
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
57
|
+
parts(values) {
|
|
58
|
+
for (const [name, value] of Object.entries(values)) {
|
|
59
|
+
this.part(name, value);
|
|
60
|
+
}
|
|
61
|
+
return this;
|
|
62
|
+
}
|
|
63
|
+
presentation(name, surface) {
|
|
64
|
+
const key = requireText(name, "view presentation name");
|
|
65
|
+
if (this._presentations[key] !== undefined) {
|
|
66
|
+
throw new TypeError(`duplicate view presentation name: ${key}`);
|
|
67
|
+
}
|
|
68
|
+
this._presentations = { ...this._presentations, [key]: surface };
|
|
69
|
+
return this;
|
|
70
|
+
}
|
|
71
|
+
presentations(values) {
|
|
72
|
+
for (const [name, surface] of Object.entries(values)) {
|
|
73
|
+
this.presentation(name, surface);
|
|
74
|
+
}
|
|
75
|
+
return this;
|
|
76
|
+
}
|
|
77
|
+
ref() {
|
|
78
|
+
return { kind: "view", identity: this.identity };
|
|
79
|
+
}
|
|
80
|
+
toState() {
|
|
81
|
+
const context = Object.fromEntries(Object.entries(this._context)
|
|
82
|
+
.sort(([a], [b]) => a.localeCompare(b))
|
|
83
|
+
.map(([name, value]) => [name, value.ref()]));
|
|
84
|
+
const parts = {};
|
|
85
|
+
for (const key of Object.keys(this._parts).sort()) {
|
|
86
|
+
parts[key] = this._parts[key].toState();
|
|
87
|
+
}
|
|
88
|
+
const presentations = {};
|
|
89
|
+
for (const key of Object.keys(this._presentations).sort()) {
|
|
90
|
+
presentations[key] = { surface: this._presentations[key].ref() };
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
identity: this.identity,
|
|
94
|
+
kind: "view",
|
|
95
|
+
...optionalSemanticMetadata(this._tags, this._explanations),
|
|
96
|
+
...(this._role === undefined ? {} : { role: this._role }),
|
|
97
|
+
context,
|
|
98
|
+
parts,
|
|
99
|
+
presentations,
|
|
100
|
+
...optionalDescription(this._description),
|
|
101
|
+
...optionalOwner(this._group, this._feature),
|
|
102
|
+
...optionalOrigin(this._origin),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
export function view() {
|
|
107
|
+
return new ViewDeclaration();
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.js","sourceRoot":"","sources":["../../src/interaction/view.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,aAAa,EACb,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAY/B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,WAAW,GACZ,MAAM,uBAAuB,CAAC;AAO/B,MAAM,OAAO,eAIX,SAAQ,WAAmB;IAEnB,YAAY,CAAU;IACtB,KAAK,GAAa,EAAE,CAAC;IACrB,aAAa,GAAuB,EAAE,CAAC;IACvC,KAAK,CAAiB;IACtB,QAAQ,GAAmB,EAAE,CAAC;IAC9B,MAAM,GAAY,EAAE,CAAC;IACrB,cAAc,GAAwB,EAAE,CAAC;IAEjD;QACE,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB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,GAAG,wBAAwB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC;YAC3D,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;YACzD,OAAO;YACP,KAAK;YACL,aAAa;YACb,GAAG,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC;YACzC,GAAG,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC;YAC5C,GAAG,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC;SAChC,CAAC;IACJ,CAAC;CACF;AAED,MAAM,UAAU,IAAI;IAClB,OAAO,IAAI,eAAe,EAAE,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facet.d.ts","sourceRoot":"","sources":["../../src/interfaces/facet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,+EAA+E;AAC/E,MAAM,WAAW,gBAAgB;IAC/B,OAAO,IAAI,UAAU,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facet.js","sourceRoot":"","sources":["../../src/interfaces/facet.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { HttpFacetState, HttpInputState, HttpOutputState } from "../contracts/index.js";
|
|
2
|
+
import type { FailureRef, OperationPortRef } from "../foundation/ref.js";
|
|
3
|
+
import type { FacetDeclaration } from "./facet.js";
|
|
4
|
+
import { type Representation } from "./representation.js";
|
|
5
|
+
export declare class HttpInput {
|
|
6
|
+
#private;
|
|
7
|
+
constructor(state: HttpInputState);
|
|
8
|
+
toState(): HttpInputState;
|
|
9
|
+
}
|
|
10
|
+
export declare const path: (name: string) => HttpInput;
|
|
11
|
+
export declare const query: (name: string) => HttpInput;
|
|
12
|
+
export declare const queryObject: () => HttpInput;
|
|
13
|
+
export declare const header: (name: string) => HttpInput;
|
|
14
|
+
export declare const cookie: (name: string) => HttpInput;
|
|
15
|
+
export declare const body: (value?: Representation) => HttpInput;
|
|
16
|
+
export declare const multipart: (name: string) => HttpInput;
|
|
17
|
+
export declare const form: (name: string) => HttpInput;
|
|
18
|
+
export declare class HttpOutput {
|
|
19
|
+
#private;
|
|
20
|
+
constructor(status?: number, representations?: readonly Representation[]);
|
|
21
|
+
toState(): HttpOutputState;
|
|
22
|
+
}
|
|
23
|
+
export declare function respond(status?: number, ...representations: readonly Representation[]): HttpOutput;
|
|
24
|
+
export type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS" | "TRACE";
|
|
25
|
+
export declare class HttpFacetDeclaration implements FacetDeclaration {
|
|
26
|
+
#private;
|
|
27
|
+
private _description?;
|
|
28
|
+
private _inputs;
|
|
29
|
+
private _outputs;
|
|
30
|
+
private _failures;
|
|
31
|
+
constructor(method: HttpMethod, pathValue: string);
|
|
32
|
+
description(value: string): this;
|
|
33
|
+
input(port: OperationPortRef<unknown, "input">, source: HttpInput): this;
|
|
34
|
+
output(port: OperationPortRef<unknown, "output">, response?: HttpOutput): this;
|
|
35
|
+
failure(value: FailureRef, status: number, representationValue?: Representation): this;
|
|
36
|
+
toState(): HttpFacetState;
|
|
37
|
+
}
|
|
38
|
+
export declare function http(method: HttpMethod, pathValue: string): HttpFacetDeclaration;
|
|
39
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/interfaces/http.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EAEd,cAAc,EACd,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAA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,MAAM,GAAG,IAAI,CAG/B;IAED,KAAK,CAAC,IAAI,EAAE,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAGvE;IAED,MAAM,CACJ,IAAI,EAAE,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,EACzC,QAAQ,GAAE,UAAsB,GAC/B,IAAI,CAGN;IAED,OAAO,CACL,KAAK,EAAE,UAAU,EACjB,MAAM,EAAE,MAAM,EACd,mBAAmB,CAAC,EAAE,cAAc,GACnC,IAAI,CAYN;IAED,OAAO,IAAI,cAAc,CAkBxB;CACF;AAED,wBAAgB,IAAI,CAClB,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,MAAM,GAChB,oBAAoB,CAEtB"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { requireText } from "../foundation/metadata.js";
|
|
2
|
+
import { json } from "./representation.js";
|
|
3
|
+
export class HttpInput {
|
|
4
|
+
#state;
|
|
5
|
+
constructor(state) {
|
|
6
|
+
this.#state = state;
|
|
7
|
+
}
|
|
8
|
+
toState() {
|
|
9
|
+
return this.#state;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export const path = (name) => new HttpInput({ kind: "path", name: requireText(name, "path input name") });
|
|
13
|
+
export const query = (name) => new HttpInput({ kind: "query", name: requireText(name, "query input name") });
|
|
14
|
+
export const queryObject = () => new HttpInput({ kind: "query-object" });
|
|
15
|
+
export const header = (name) => new HttpInput({
|
|
16
|
+
kind: "header",
|
|
17
|
+
name: requireText(name, "header input name"),
|
|
18
|
+
});
|
|
19
|
+
export const cookie = (name) => new HttpInput({
|
|
20
|
+
kind: "cookie",
|
|
21
|
+
name: requireText(name, "cookie input name"),
|
|
22
|
+
});
|
|
23
|
+
export const body = (value = json()) => new HttpInput({ kind: "body", representation: value.toState() });
|
|
24
|
+
export const multipart = (name) => new HttpInput({
|
|
25
|
+
kind: "multipart",
|
|
26
|
+
name: requireText(name, "multipart input name"),
|
|
27
|
+
});
|
|
28
|
+
export const form = (name) => new HttpInput({ kind: "form", name: requireText(name, "form input name") });
|
|
29
|
+
export class HttpOutput {
|
|
30
|
+
#state;
|
|
31
|
+
constructor(status = 200, representations = [json()]) {
|
|
32
|
+
if (!Number.isInteger(status) || status < 100 || status > 599) {
|
|
33
|
+
throw new TypeError("HTTP status must be between 100 and 599");
|
|
34
|
+
}
|
|
35
|
+
this.#state = {
|
|
36
|
+
status,
|
|
37
|
+
representations: representations.map((item) => item.toState()),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
toState() {
|
|
41
|
+
return {
|
|
42
|
+
...this.#state,
|
|
43
|
+
representations: [...this.#state.representations],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export function respond(status = 200, ...representations) {
|
|
48
|
+
return new HttpOutput(status, representations.length === 0 ? [json()] : representations);
|
|
49
|
+
}
|
|
50
|
+
export class HttpFacetDeclaration {
|
|
51
|
+
#method;
|
|
52
|
+
#path;
|
|
53
|
+
_description;
|
|
54
|
+
_inputs = [];
|
|
55
|
+
_outputs = [];
|
|
56
|
+
_failures = [];
|
|
57
|
+
constructor(method, pathValue) {
|
|
58
|
+
this.#method = method;
|
|
59
|
+
this.#path = requireText(pathValue, "HTTP path");
|
|
60
|
+
}
|
|
61
|
+
description(value) {
|
|
62
|
+
this._description = requireText(value, "HTTP facet description");
|
|
63
|
+
return this;
|
|
64
|
+
}
|
|
65
|
+
input(port, source) {
|
|
66
|
+
this._inputs.push({ port, source });
|
|
67
|
+
return this;
|
|
68
|
+
}
|
|
69
|
+
output(port, response = respond()) {
|
|
70
|
+
this._outputs.push({ port, response });
|
|
71
|
+
return this;
|
|
72
|
+
}
|
|
73
|
+
failure(value, status, representationValue) {
|
|
74
|
+
if (!Number.isInteger(status) || status < 100 || status > 599) {
|
|
75
|
+
throw new TypeError("HTTP failure status must be between 100 and 599");
|
|
76
|
+
}
|
|
77
|
+
this._failures.push({
|
|
78
|
+
failure: value.ref(),
|
|
79
|
+
status,
|
|
80
|
+
...(representationValue === undefined
|
|
81
|
+
? {}
|
|
82
|
+
: { representation: representationValue.toState() }),
|
|
83
|
+
});
|
|
84
|
+
return this;
|
|
85
|
+
}
|
|
86
|
+
toState() {
|
|
87
|
+
return {
|
|
88
|
+
kind: "http",
|
|
89
|
+
...(this._description === undefined
|
|
90
|
+
? {}
|
|
91
|
+
: { description: this._description }),
|
|
92
|
+
method: this.#method,
|
|
93
|
+
path: this.#path,
|
|
94
|
+
inputs: this._inputs.map(({ port, source }) => ({
|
|
95
|
+
port: port.toState(),
|
|
96
|
+
source: source.toState(),
|
|
97
|
+
})),
|
|
98
|
+
outputs: this._outputs.map(({ port, response }) => ({
|
|
99
|
+
port: port.toState(),
|
|
100
|
+
response: response.toState(),
|
|
101
|
+
})),
|
|
102
|
+
failures: this._failures.map((item) => ({ ...item })),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
export function http(method, pathValue) {
|
|
107
|
+
return new HttpFacetDeclaration(method, pathValue);
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/interfaces/http.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAE,IAAI,EAAuB,MAAM,6BAA6B,CAAC;AAExE,MAAM,OAAO,SAAS;IACX,MAAM,CAAiB;IAEhC,YAAY,KAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CACF;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,IAAY,EAAa,EAAE,CAC9C,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW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IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;gBAC9C,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE;gBACpB,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE;aACzB,CAAC,CAAC;YACH,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;gBAClD,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE;gBACpB,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAAE;aAC7B,CAAC,CAAC;YACH,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;SACtD,CAAC;IACJ,CAAC;CACF;AAED,MAAM,UAAU,IAAI,CAClB,MAAkB,EAClB,SAAiB;IAEjB,OAAO,IAAI,oBAAoB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { RepresentationKind, RepresentationState } from "../contracts/index.js";
|
|
2
|
+
export declare class Representation {
|
|
3
|
+
#private;
|
|
4
|
+
constructor(kind: RepresentationKind, mediaType?: string);
|
|
5
|
+
toState(): RepresentationState;
|
|
6
|
+
}
|
|
7
|
+
export declare function representation(kind: RepresentationKind, mediaType?: string): Representation;
|
|
8
|
+
export declare const json: (mediaType?: string) => Representation;
|
|
9
|
+
export declare const xml: (mediaType?: string) => Representation;
|
|
10
|
+
export declare const csv: (mediaType?: string) => Representation;
|
|
11
|
+
export declare const text: (mediaType?: string) => Representation;
|
|
12
|
+
export declare const bytes: (mediaType?: string) => Representation;
|
|
13
|
+
export declare const eventStream: (mediaType?: string) => Representation;
|
|
14
|
+
//# sourceMappingURL=representation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"representation.d.ts","sourceRoot":"","sources":["../../src/interfaces/representation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAG3B,qBAAa,cAAc;;IAGzB,YAAY,IAAI,EAAE,kBAAkB,EAAE,SAAS,CAAC,EAAE,MAAM,EAOvD;IAED,OAAO,IAAI,mBAAmB,CAE7B;CACF;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,kBAAkB,EACxB,SAAS,CAAC,EAAE,MAAM,GACjB,cAAc,CAEhB;AAED,eAAO,MAAM,IAAI,eAAgB,MAAM,KAAG,cACP,CAAC;AACpC,eAAO,MAAM,GAAG,eAAgB,MAAM,KAAG,cACP,CAAC;AACnC,eAAO,MAAM,GAAG,eAAgB,MAAM,KAAG,cACP,CAAC;AACnC,eAAO,MAAM,IAAI,eAAgB,MAAM,KAAG,cACP,CAAC;AACpC,eAAO,MAAM,KAAK,eAAgB,MAAM,KAAG,cACP,CAAC;AACrC,eAAO,MAAM,WAAW,eAAgB,MAAM,KAAG,cACN,CAAC"}
|