@shortlink-org/portolan 0.2.2 → 0.2.4
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 +7 -2
- package/cli/portolan.mjs +36 -6
- package/package.json +4 -4
- package/plugins/README.md +5 -0
- package/plugins/extract-python-kafka/README.md +6 -0
- package/plugins/extract-python-kafka/extract.py +2 -2
- package/plugins/extract-python-kafka/extract_test.py +17 -1
- package/plugins/portolan-go.wasm +0 -0
- package/plugins/pyplugin/catalog.py +12 -1
- package/plugins/pyplugin/kafka.py +74 -3
- package/scripts/builtin-plugins.mjs +3 -2
- package/scripts/catalog-sources.mjs +2 -1
- package/scripts/catalog-sources.test.mjs +11 -1
- package/scripts/delivery-presets.mjs +207 -24
- package/scripts/diff.mjs +5 -1
- package/scripts/gen-likec4.mjs +78 -20
- package/scripts/gen-likec4.test.mjs +25 -2
- package/scripts/local-api.mjs +26 -377
- package/scripts/local-api.test.mjs +50 -0
- package/scripts/local-discovery.mjs +378 -0
- package/scripts/manifest.mjs +42 -1
- package/scripts/manifest.test.mjs +24 -1
- package/scripts/run-builtin.mjs +4 -2
- package/scripts/schema.mjs +4 -0
- package/scripts/site-docs.mjs +2 -2
- package/src/app/Breadcrumbs.test.ts +4 -0
- package/src/app/Breadcrumbs.tsx +1 -0
- package/src/app/CatalogApp.tsx +4 -4
- package/src/app/Sidebar.tsx +13 -730
- package/src/app/SidebarFlowSections.tsx +251 -0
- package/src/app/SidebarFooter.tsx +160 -0
- package/src/app/SidebarTree.tsx +322 -0
- package/src/catalog-index.ts +485 -0
- package/src/catalog-model.ts +1360 -0
- package/src/catalog-stores.test.ts +17 -0
- package/src/catalog-validation.ts +1611 -0
- package/src/catalog.test.ts +29 -2
- package/src/catalog.ts +6 -3306
- package/src/components/ChannelRows.messagepack.test.tsx +28 -0
- package/src/components/ChannelRows.test.tsx +54 -0
- package/src/components/ChannelRows.tsx +57 -10
- package/src/components/LifecycleDiagram.tsx +28 -12
- package/src/components/{PageHeader.test.ts → PageHeader.test.tsx} +9 -10
- package/src/components/ProblemRow.tsx +7 -0
- package/src/components/SourcePreview.tsx +1 -1
- package/src/components/WhatLinksHere.tsx +6 -4
- package/src/enrich.test.ts +4 -5
- package/src/flow/StepDetail.tsx +98 -54
- package/src/flow/answers.test.ts +18 -1
- package/src/flow/answers.ts +37 -8
- package/src/index.css +0 -17
- package/src/landing/LandingPage.tsx +4 -4
- package/src/lib/all-problems.ts +1 -1
- package/src/lib/backlinks.test.ts +16 -1
- package/src/lib/backlinks.ts +20 -0
- package/src/lib/catalog-diff.test.ts +18 -0
- package/src/lib/catalog-diff.ts +19 -1
- package/src/lib/derive.ts +2 -0
- package/src/lib/kafka-ui.test.ts +87 -0
- package/src/lib/kafka-ui.ts +105 -0
- package/src/lib/local-api.ts +19 -7
- package/src/lib/motion.test.ts +4 -2
- package/src/lib/motion.tsx +5 -4
- package/src/lib/proto-problems.test.ts +170 -3
- package/src/lib/proto-problems.ts +176 -4
- package/src/lib/wire-problems.test.ts +21 -0
- package/src/lib/wire-problems.ts +62 -1
- package/src/likec4/FlowView.tsx +2 -6
- package/src/likec4/flow-edges.test.ts +64 -1
- package/src/likec4/flow-edges.ts +43 -7
- package/src/likec4/view-index.ts +8 -2
- package/src/merge.test.ts +69 -0
- package/src/merge.ts +52 -2
- package/src/pages/CatalogFailure.tsx +2 -2
- package/src/pages/Settings.tsx +12 -129
- package/src/pages/settings/AboutSettings.tsx +129 -0
- package/src/pages/settings/DeliverySettings.tsx +71 -15
- package/src/pages/settings/IntegrationsSettings.tsx +117 -0
- package/src/routes.test.ts +2 -0
- package/src/routes.ts +2 -1
- package/src/selection/DetailPanel.tsx +46 -1
- package/src/selection/pages.test.ts +14 -1
- package/src/selection/pages.ts +9 -3
- package/vite.config.ts +3 -1
package/src/catalog.test.ts
CHANGED
|
@@ -105,7 +105,7 @@ describe("validateCatalog", () => {
|
|
|
105
105
|
if (!step) throw new Error("fixture has no steps");
|
|
106
106
|
step.ref = "shop.oms.order.NoSuchEvent";
|
|
107
107
|
expect(() => validateCatalog(bad)).toThrowError(
|
|
108
|
-
/resolves to neither an Event nor
|
|
108
|
+
/resolves to neither an Event, an RpcCall nor a method/,
|
|
109
109
|
);
|
|
110
110
|
step.status = "unresolved";
|
|
111
111
|
expect(() => validateCatalog(bad)).not.toThrow();
|
|
@@ -895,6 +895,22 @@ describe("validateCatalog: interfaces and modules", () => {
|
|
|
895
895
|
expect(() => validateCatalog(bad)).toThrow(/not in this catalog/);
|
|
896
896
|
});
|
|
897
897
|
|
|
898
|
+
it("rejects a vendored interface naming a module nobody declared", () => {
|
|
899
|
+
const bad = clone();
|
|
900
|
+
const service = bad.contexts[0]?.services[0];
|
|
901
|
+
if (!service) throw new Error("nothing to break");
|
|
902
|
+
service.copies = [
|
|
903
|
+
{
|
|
904
|
+
id: "pricing.v1.Pricing",
|
|
905
|
+
methods: [{ name: "GetQuote" }],
|
|
906
|
+
source: "internal/pricing.proto",
|
|
907
|
+
module: "buf.build/acme/nowhere",
|
|
908
|
+
},
|
|
909
|
+
];
|
|
910
|
+
|
|
911
|
+
expect(() => validateCatalog(bad)).toThrow(/not in this catalog/);
|
|
912
|
+
});
|
|
913
|
+
|
|
898
914
|
it("rejects a module owned by something that is not a service", () => {
|
|
899
915
|
const bad = withModule(clone());
|
|
900
916
|
const module = bad.modules?.[0];
|
|
@@ -1061,7 +1077,10 @@ describe("validateCatalog: channels", () => {
|
|
|
1061
1077
|
}
|
|
1062
1078
|
|
|
1063
1079
|
it("accepts a service that declares what it says on the bus", () => {
|
|
1064
|
-
|
|
1080
|
+
const good = speaking();
|
|
1081
|
+
good.contexts[0]!.services[0]!.channels![0]!.messages[0]!.encoding = "msgpack";
|
|
1082
|
+
good.contexts[0]!.services[0]!.channels![0]!.messages[0]!.contentType = "application/msgpack";
|
|
1083
|
+
expect(() => validateCatalog(good)).not.toThrow();
|
|
1065
1084
|
});
|
|
1066
1085
|
|
|
1067
1086
|
// A service with no document is the normal case, and it is not a service
|
|
@@ -1114,6 +1133,14 @@ describe("validateCatalog: channels", () => {
|
|
|
1114
1133
|
|
|
1115
1134
|
expect(() => validateCatalog(bad)).toThrow(/neither send nor receive/);
|
|
1116
1135
|
});
|
|
1136
|
+
|
|
1137
|
+
it("rejects an explicitly empty message encoding", () => {
|
|
1138
|
+
const bad = speaking();
|
|
1139
|
+
const message = bad.contexts[0]!.services[0]!.channels![0]!.messages[0]!;
|
|
1140
|
+
message.encoding = "";
|
|
1141
|
+
|
|
1142
|
+
expect(() => validateCatalog(bad)).toThrow(/empty encoding/);
|
|
1143
|
+
});
|
|
1117
1144
|
});
|
|
1118
1145
|
|
|
1119
1146
|
// A system outside the estate with a contract sits at the root beside the
|