@fairfox/polly 0.11.0 → 0.12.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/dist/src/client/index.d.ts +33 -0
- package/dist/src/client/index.js +586 -0
- package/dist/src/client/index.js.map +13 -0
- package/dist/src/client/wrapper.d.ts +54 -0
- package/dist/src/core/clock.d.ts +63 -0
- package/dist/src/elysia/index.d.ts +43 -0
- package/dist/src/elysia/index.js +241 -0
- package/dist/src/elysia/index.js.map +12 -0
- package/dist/src/elysia/plugin.d.ts +5 -0
- package/dist/src/elysia/tla-generator.d.ts +16 -0
- package/dist/src/elysia/types.d.ts +137 -0
- package/dist/src/utils/function-serialization.d.ts +14 -0
- package/dist/tools/analysis/src/extract/adr.d.ts +37 -0
- package/dist/tools/analysis/src/extract/architecture.d.ts +42 -0
- package/dist/tools/analysis/src/extract/contexts.d.ts +74 -0
- package/dist/tools/analysis/src/extract/flows.d.ts +68 -0
- package/dist/tools/analysis/src/extract/handlers.d.ts +330 -0
- package/dist/tools/analysis/src/extract/index.d.ts +9 -0
- package/dist/tools/analysis/src/extract/integrations.d.ts +77 -0
- package/dist/tools/analysis/src/extract/manifest.d.ts +64 -0
- package/dist/tools/analysis/src/extract/project-detector.d.ts +103 -0
- package/dist/tools/analysis/src/extract/relationships.d.ts +119 -0
- package/dist/tools/analysis/src/extract/types.d.ts +139 -0
- package/dist/tools/analysis/src/index.d.ts +2 -0
- package/dist/tools/analysis/src/types/adr.d.ts +39 -0
- package/dist/tools/analysis/src/types/architecture.d.ts +198 -0
- package/dist/tools/analysis/src/types/core.d.ts +178 -0
- package/dist/tools/analysis/src/types/index.d.ts +4 -0
- package/dist/tools/teach/src/cli.js +140 -69
- package/dist/tools/teach/src/cli.js.map +12 -12
- package/dist/tools/teach/src/index.d.ts +28 -0
- package/dist/tools/teach/src/index.js +145 -72
- package/dist/tools/teach/src/index.js.map +13 -13
- package/dist/tools/verify/src/cli.js +33 -11
- package/dist/tools/verify/src/cli.js.map +5 -5
- package/dist/tools/visualize/src/cli.js +125 -66
- package/dist/tools/visualize/src/cli.js.map +11 -11
- package/dist/tools/visualize/src/codegen/structurizr.d.ts +343 -0
- package/dist/tools/visualize/src/types/structurizr.d.ts +235 -0
- package/package.json +6 -5
|
@@ -3757,7 +3757,10 @@ class HandlerExtractor {
|
|
|
3757
3757
|
if (!body) {
|
|
3758
3758
|
return;
|
|
3759
3759
|
}
|
|
3760
|
-
const
|
|
3760
|
+
const firstAwait = awaitExpressions[0];
|
|
3761
|
+
if (!firstAwait)
|
|
3762
|
+
return;
|
|
3763
|
+
const firstAwaitPos = firstAwait.getStart();
|
|
3761
3764
|
funcNode.forEachDescendant((node) => {
|
|
3762
3765
|
if (Node2.isBinaryExpression(node)) {
|
|
3763
3766
|
this.checkBinaryExpressionMutation(node, firstAwaitPos, mutations);
|
|
@@ -3808,6 +3811,8 @@ class HandlerExtractor {
|
|
|
3808
3811
|
return null;
|
|
3809
3812
|
}
|
|
3810
3813
|
const conditionArg = args[0];
|
|
3814
|
+
if (!conditionArg)
|
|
3815
|
+
return null;
|
|
3811
3816
|
const expression = conditionArg.getText();
|
|
3812
3817
|
let message;
|
|
3813
3818
|
if (args.length >= 2 && Node2.isStringLiteral(args[1])) {
|
|
@@ -4113,12 +4118,17 @@ class HandlerExtractor {
|
|
|
4113
4118
|
return;
|
|
4114
4119
|
}
|
|
4115
4120
|
extractMessageTypeFromTypePredicateFunction(node, returnTypeNode) {
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4121
|
+
if (!Node2.isTypePredicate(returnTypeNode)) {
|
|
4122
|
+
return null;
|
|
4123
|
+
}
|
|
4124
|
+
if ("getTypeNode" in returnTypeNode && typeof returnTypeNode.getTypeNode === "function") {
|
|
4125
|
+
const typeNode = returnTypeNode.getTypeNode();
|
|
4126
|
+
if (typeNode) {
|
|
4127
|
+
const typeName = typeNode.getText();
|
|
4128
|
+
const messageType = this.extractMessageTypeFromTypeName(typeName);
|
|
4129
|
+
if (messageType) {
|
|
4130
|
+
return messageType;
|
|
4131
|
+
}
|
|
4122
4132
|
}
|
|
4123
4133
|
}
|
|
4124
4134
|
return this.extractMessageTypeFromFunctionBodyText(node);
|
|
@@ -4418,11 +4428,20 @@ class TypeExtractor {
|
|
|
4418
4428
|
const handlerAnalysis = this.extractHandlerAnalysis();
|
|
4419
4429
|
const validMessageTypes = this.filterAndLogMessageTypes(messageTypes, handlerAnalysis.messageTypes);
|
|
4420
4430
|
const validHandlers = this.filterAndLogHandlers(handlerAnalysis.handlers);
|
|
4431
|
+
const completeHandlers = validHandlers.map((h) => ({
|
|
4432
|
+
messageType: h.messageType,
|
|
4433
|
+
node: h.node || "unknown",
|
|
4434
|
+
assignments: h.assignments || [],
|
|
4435
|
+
preconditions: h.preconditions || [],
|
|
4436
|
+
postconditions: h.postconditions || [],
|
|
4437
|
+
location: h.location,
|
|
4438
|
+
relationships: h.relationships
|
|
4439
|
+
}));
|
|
4421
4440
|
return {
|
|
4422
4441
|
stateType,
|
|
4423
4442
|
messageTypes: validMessageTypes,
|
|
4424
4443
|
fields,
|
|
4425
|
-
handlers:
|
|
4444
|
+
handlers: completeHandlers,
|
|
4426
4445
|
stateConstraints: handlerAnalysis.stateConstraints
|
|
4427
4446
|
};
|
|
4428
4447
|
}
|
|
@@ -4524,7 +4543,7 @@ class TypeExtractor {
|
|
|
4524
4543
|
if (type.getAliasSymbol()) {
|
|
4525
4544
|
return this.extractFromTypeAlias(type, typeName, sourceFile, warnings);
|
|
4526
4545
|
}
|
|
4527
|
-
if (type.isConditionalType
|
|
4546
|
+
if (typeof type.isConditionalType === "function" && type.isConditionalType()) {
|
|
4528
4547
|
return this.extractFromConditionalType(type, warnings);
|
|
4529
4548
|
}
|
|
4530
4549
|
if (type.getText().includes("[K in ")) {
|
|
@@ -4589,7 +4608,10 @@ class TypeExtractor {
|
|
|
4589
4608
|
if (parts.length < 2) {
|
|
4590
4609
|
return messageTypes;
|
|
4591
4610
|
}
|
|
4592
|
-
const
|
|
4611
|
+
const secondPart = parts[1];
|
|
4612
|
+
if (!secondPart)
|
|
4613
|
+
return messageTypes;
|
|
4614
|
+
const branches = secondPart.split(":");
|
|
4593
4615
|
for (const branch of branches) {
|
|
4594
4616
|
const extracted = this.extractStringLiteralFromBranch(branch);
|
|
4595
4617
|
if (extracted) {
|
|
@@ -5316,4 +5338,4 @@ main().catch((error) => {
|
|
|
5316
5338
|
process.exit(1);
|
|
5317
5339
|
});
|
|
5318
5340
|
|
|
5319
|
-
//# debugId=
|
|
5341
|
+
//# debugId=1F176417DE7AA13D64756E2164756E21
|