@shortlink-org/portolan 0.2.2 → 0.2.3
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/portolan-go.wasm +0 -0
- 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/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/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 +1339 -0
- package/src/catalog-validation.ts +1570 -0
- package/src/catalog.test.ts +16 -0
- package/src/catalog.ts +6 -3306
- package/src/components/{PageHeader.test.ts → PageHeader.test.tsx} +9 -10
- package/src/components/ProblemRow.tsx +3 -0
- package/src/components/SourcePreview.tsx +1 -1
- package/src/index.css +0 -17
- package/src/landing/LandingPage.tsx +4 -4
- package/src/lib/all-problems.ts +1 -1
- package/src/lib/derive.ts +1 -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/merge.test.ts +46 -0
- package/src/merge.ts +35 -1
- package/src/pages/Settings.tsx +1 -126
- package/src/pages/settings/AboutSettings.tsx +129 -0
- package/src/pages/settings/DeliverySettings.tsx +71 -15
- 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
|
@@ -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];
|