@terra-graph/core 1.0.0-rc.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/LICENSE +201 -0
- package/README.md +70 -0
- package/dist/cjs/Graph/Adapter.d.ts +8 -0
- package/dist/cjs/Graph/Adapter.js +5 -0
- package/dist/cjs/Graph/Adapters/DotAdapter.d.ts +17 -0
- package/dist/cjs/Graph/Adapters/DotAdapter.js +31 -0
- package/dist/cjs/Graph/Adapters/DotAdapter.test.d.ts +1 -0
- package/dist/cjs/Graph/Adapters/DotAdapter.test.js +45 -0
- package/dist/cjs/Graph/Adapters/GraphologyAdapter.d.ts +36 -0
- package/dist/cjs/Graph/Adapters/GraphologyAdapter.js +273 -0
- package/dist/cjs/Graph/Adapters/GraphologyAdapter.test.d.ts +1 -0
- package/dist/cjs/Graph/Adapters/GraphologyAdapter.test.js +561 -0
- package/dist/cjs/Graph/Adapters/index.d.ts +2 -0
- package/dist/cjs/Graph/Adapters/index.js +18 -0
- package/dist/cjs/Graph/GraphPlugin.d.ts +53 -0
- package/dist/cjs/Graph/GraphPlugin.js +223 -0
- package/dist/cjs/Graph/GraphPlugin.test.d.ts +1 -0
- package/dist/cjs/Graph/GraphPlugin.test.js +831 -0
- package/dist/cjs/Graph/GraphResolver.d.ts +21 -0
- package/dist/cjs/Graph/GraphResolver.js +80 -0
- package/dist/cjs/Graph/GraphResolver.test.d.ts +1 -0
- package/dist/cjs/Graph/GraphResolver.test.js +273 -0
- package/dist/cjs/Graph/Importer.d.ts +7 -0
- package/dist/cjs/Graph/Importer.js +2 -0
- package/dist/cjs/Graph/Importers/TerraformDotImporter.d.ts +12 -0
- package/dist/cjs/Graph/Importers/TerraformDotImporter.js +245 -0
- package/dist/cjs/Graph/Importers/TerraformDotImporter.test.d.ts +1 -0
- package/dist/cjs/Graph/Importers/TerraformDotImporter.test.js +343 -0
- package/dist/cjs/Graph/Importers/index.d.ts +1 -0
- package/dist/cjs/Graph/Importers/index.js +17 -0
- package/dist/cjs/Graph/Operations/Matchers/NodeMatchFn.d.ts +3 -0
- package/dist/cjs/Graph/Operations/Matchers/NodeMatchFn.js +2 -0
- package/dist/cjs/Graph/Operations/Matchers/NodeQuery/NodeQuery.d.ts +21 -0
- package/dist/cjs/Graph/Operations/Matchers/NodeQuery/NodeQuery.js +143 -0
- package/dist/cjs/Graph/Operations/Matchers/NodeQuery/NodeQuery.test.d.ts +1 -0
- package/dist/cjs/Graph/Operations/Matchers/NodeQuery/NodeQuery.test.js +308 -0
- package/dist/cjs/Graph/Operations/Matchers/NodeQuery/QuerySchema.d.ts +155 -0
- package/dist/cjs/Graph/Operations/Matchers/NodeQuery/QuerySchema.js +67 -0
- package/dist/cjs/Graph/Operations/Matchers/NodeQuery/QuerySchema.test.d.ts +1 -0
- package/dist/cjs/Graph/Operations/Matchers/NodeQuery/QuerySchema.test.js +51 -0
- package/dist/cjs/Graph/Operations/Matchers/NodeQuery/index.d.ts +2 -0
- package/dist/cjs/Graph/Operations/Matchers/NodeQuery/index.js +18 -0
- package/dist/cjs/Graph/Operations/Matchers/index.d.ts +2 -0
- package/dist/cjs/Graph/Operations/Matchers/index.js +18 -0
- package/dist/cjs/Graph/Operations/Operations.d.ts +21 -0
- package/dist/cjs/Graph/Operations/Operations.js +2 -0
- package/dist/cjs/Graph/Operations/index.d.ts +2 -0
- package/dist/cjs/Graph/Operations/index.js +18 -0
- package/dist/cjs/Graph/Profile.d.ts +55 -0
- package/dist/cjs/Graph/Profile.js +223 -0
- package/dist/cjs/Graph/Profile.test.d.ts +1 -0
- package/dist/cjs/Graph/Profile.test.js +841 -0
- package/dist/cjs/Graph/ProfileRegistry.d.ts +18 -0
- package/dist/cjs/Graph/ProfileRegistry.js +61 -0
- package/dist/cjs/Graph/ProfileRegistry.test.d.ts +1 -0
- package/dist/cjs/Graph/ProfileRegistry.test.js +98 -0
- package/dist/cjs/Graph/Renderer.d.ts +9 -0
- package/dist/cjs/Graph/Renderer.js +2 -0
- package/dist/cjs/Graph/Renderers/DotRenderer.d.ts +27 -0
- package/dist/cjs/Graph/Renderers/DotRenderer.js +186 -0
- package/dist/cjs/Graph/Renderers/DotRenderer.test.d.ts +1 -0
- package/dist/cjs/Graph/Renderers/DotRenderer.test.js +1143 -0
- package/dist/cjs/Graph/Renderers/JsonRenderer.d.ts +5 -0
- package/dist/cjs/Graph/Renderers/JsonRenderer.js +13 -0
- package/dist/cjs/Graph/Renderers/JsonRenderer.test.d.ts +1 -0
- package/dist/cjs/Graph/Renderers/JsonRenderer.test.js +29 -0
- package/dist/cjs/Graph/Renderers/RendererRegistry.d.ts +15 -0
- package/dist/cjs/Graph/Renderers/RendererRegistry.js +33 -0
- package/dist/cjs/Graph/Renderers/RendererRegistry.test.d.ts +1 -0
- package/dist/cjs/Graph/Renderers/RendererRegistry.test.js +39 -0
- package/dist/cjs/Graph/Renderers/TgNodeLabel.d.ts +11 -0
- package/dist/cjs/Graph/Renderers/TgNodeLabel.js +43 -0
- package/dist/cjs/Graph/Renderers/TgNodeLabel.test.d.ts +1 -0
- package/dist/cjs/Graph/Renderers/TgNodeLabel.test.js +76 -0
- package/dist/cjs/Graph/Renderers/index.d.ts +4 -0
- package/dist/cjs/Graph/Renderers/index.js +20 -0
- package/dist/cjs/Graph/RuleError.d.ts +12 -0
- package/dist/cjs/Graph/RuleError.js +19 -0
- package/dist/cjs/Graph/RuleError.test.d.ts +1 -0
- package/dist/cjs/Graph/RuleError.test.js +25 -0
- package/dist/cjs/Graph/Rules/Edge/AlignNodes.d.ts +7 -0
- package/dist/cjs/Graph/Rules/Edge/AlignNodes.js +39 -0
- package/dist/cjs/Graph/Rules/Edge/AlignNodes.test.d.ts +1 -0
- package/dist/cjs/Graph/Rules/Edge/AlignNodes.test.js +194 -0
- package/dist/cjs/Graph/Rules/Edge/EdgeDirectionSemantic.d.ts +8 -0
- package/dist/cjs/Graph/Rules/Edge/EdgeDirectionSemantic.js +78 -0
- package/dist/cjs/Graph/Rules/Edge/EdgeDirectionSemantic.test.d.ts +1 -0
- package/dist/cjs/Graph/Rules/Edge/EdgeDirectionSemantic.test.js +454 -0
- package/dist/cjs/Graph/Rules/Edge/EdgeDotProperties.d.ts +9 -0
- package/dist/cjs/Graph/Rules/Edge/EdgeDotProperties.js +50 -0
- package/dist/cjs/Graph/Rules/Edge/EdgeDotProperties.test.d.ts +1 -0
- package/dist/cjs/Graph/Rules/Edge/EdgeDotProperties.test.js +333 -0
- package/dist/cjs/Graph/Rules/Edge/EdgeLegend.d.ts +8 -0
- package/dist/cjs/Graph/Rules/Edge/EdgeLegend.js +47 -0
- package/dist/cjs/Graph/Rules/Edge/EdgeLegend.test.d.ts +1 -0
- package/dist/cjs/Graph/Rules/Edge/EdgeLegend.test.js +186 -0
- package/dist/cjs/Graph/Rules/Edge/EdgeReverse.d.ts +6 -0
- package/dist/cjs/Graph/Rules/Edge/EdgeReverse.js +30 -0
- package/dist/cjs/Graph/Rules/Edge/EdgeReverse.test.d.ts +1 -0
- package/dist/cjs/Graph/Rules/Edge/EdgeReverse.test.js +134 -0
- package/dist/cjs/Graph/Rules/Edge/EdgeSemanticLegend.d.ts +8 -0
- package/dist/cjs/Graph/Rules/Edge/EdgeSemanticLegend.js +72 -0
- package/dist/cjs/Graph/Rules/Edge/EdgeSemanticLegend.test.d.ts +1 -0
- package/dist/cjs/Graph/Rules/Edge/EdgeSemanticLegend.test.js +511 -0
- package/dist/cjs/Graph/Rules/Edge/ExplicitEdge.d.ts +6 -0
- package/dist/cjs/Graph/Rules/Edge/ExplicitEdge.js +28 -0
- package/dist/cjs/Graph/Rules/Edge/ExplicitEdge.test.d.ts +1 -0
- package/dist/cjs/Graph/Rules/Edge/ExplicitEdge.test.js +125 -0
- package/dist/cjs/Graph/Rules/Edge/RemoveEdge.d.ts +6 -0
- package/dist/cjs/Graph/Rules/Edge/RemoveEdge.js +28 -0
- package/dist/cjs/Graph/Rules/Edge/RemoveEdge.test.d.ts +1 -0
- package/dist/cjs/Graph/Rules/Edge/RemoveEdge.test.js +135 -0
- package/dist/cjs/Graph/Rules/Edge/index.d.ts +8 -0
- package/dist/cjs/Graph/Rules/Edge/index.js +24 -0
- package/dist/cjs/Graph/Rules/NamedRuleRegistry.d.ts +20 -0
- package/dist/cjs/Graph/Rules/NamedRuleRegistry.js +71 -0
- package/dist/cjs/Graph/Rules/NamedRuleRegistry.test.d.ts +1 -0
- package/dist/cjs/Graph/Rules/NamedRuleRegistry.test.js +243 -0
- package/dist/cjs/Graph/Rules/NamedRuleSetRegistry.d.ts +19 -0
- package/dist/cjs/Graph/Rules/NamedRuleSetRegistry.js +62 -0
- package/dist/cjs/Graph/Rules/NamedRuleSetRegistry.test.d.ts +1 -0
- package/dist/cjs/Graph/Rules/NamedRuleSetRegistry.test.js +80 -0
- package/dist/cjs/Graph/Rules/Node/ConvertNodeToEdge.d.ts +6 -0
- package/dist/cjs/Graph/Rules/Node/ConvertNodeToEdge.js +32 -0
- package/dist/cjs/Graph/Rules/Node/ConvertNodeToEdge.test.d.ts +1 -0
- package/dist/cjs/Graph/Rules/Node/ConvertNodeToEdge.test.js +152 -0
- package/dist/cjs/Graph/Rules/Node/NodeDotProperties.d.ts +9 -0
- package/dist/cjs/Graph/Rules/Node/NodeDotProperties.js +43 -0
- package/dist/cjs/Graph/Rules/Node/NodeDotProperties.test.d.ts +1 -0
- package/dist/cjs/Graph/Rules/Node/NodeDotProperties.test.js +226 -0
- package/dist/cjs/Graph/Rules/Node/NodeProperties.d.ts +12 -0
- package/dist/cjs/Graph/Rules/Node/NodeProperties.js +81 -0
- package/dist/cjs/Graph/Rules/Node/NodeProperties.test.d.ts +1 -0
- package/dist/cjs/Graph/Rules/Node/NodeProperties.test.js +371 -0
- package/dist/cjs/Graph/Rules/Node/RemoveLeafChain.d.ts +12 -0
- package/dist/cjs/Graph/Rules/Node/RemoveLeafChain.js +82 -0
- package/dist/cjs/Graph/Rules/Node/RemoveLeafChain.test.d.ts +1 -0
- package/dist/cjs/Graph/Rules/Node/RemoveLeafChain.test.js +399 -0
- package/dist/cjs/Graph/Rules/Node/RemoveNode.d.ts +6 -0
- package/dist/cjs/Graph/Rules/Node/RemoveNode.js +14 -0
- package/dist/cjs/Graph/Rules/Node/RemoveNode.test.d.ts +1 -0
- package/dist/cjs/Graph/Rules/Node/RemoveNode.test.js +33 -0
- package/dist/cjs/Graph/Rules/Node/RemoveNodeAndReconnectEdges.d.ts +6 -0
- package/dist/cjs/Graph/Rules/Node/RemoveNodeAndReconnectEdges.js +38 -0
- package/dist/cjs/Graph/Rules/Node/RemoveNodeAndReconnectEdges.test.d.ts +1 -0
- package/dist/cjs/Graph/Rules/Node/RemoveNodeAndReconnectEdges.test.js +113 -0
- package/dist/cjs/Graph/Rules/Node/index.d.ts +6 -0
- package/dist/cjs/Graph/Rules/Node/index.js +22 -0
- package/dist/cjs/Graph/Rules/Rule.d.ts +40 -0
- package/dist/cjs/Graph/Rules/Rule.js +91 -0
- package/dist/cjs/Graph/Rules/Rule.test.d.ts +1 -0
- package/dist/cjs/Graph/Rules/Rule.test.js +127 -0
- package/dist/cjs/Graph/Rules/RuleConfig.d.ts +20 -0
- package/dist/cjs/Graph/Rules/RuleConfig.js +2 -0
- package/dist/cjs/Graph/Rules/RulePlan.d.ts +27 -0
- package/dist/cjs/Graph/Rules/RulePlan.js +28 -0
- package/dist/cjs/Graph/Rules/RuleSet.d.ts +25 -0
- package/dist/cjs/Graph/Rules/RuleSet.js +89 -0
- package/dist/cjs/Graph/Rules/RuleSet.test.d.ts +1 -0
- package/dist/cjs/Graph/Rules/RuleSet.test.js +222 -0
- package/dist/cjs/Graph/Rules/index.d.ts +8 -0
- package/dist/cjs/Graph/Rules/index.js +24 -0
- package/dist/cjs/Graph/Rules/registerAll.d.ts +14 -0
- package/dist/cjs/Graph/Rules/registerAll.js +16 -0
- package/dist/cjs/Graph/Serialization/Registry.d.ts +5 -0
- package/dist/cjs/Graph/Serialization/Registry.js +2 -0
- package/dist/cjs/Graph/Serialization/index.d.ts +1 -0
- package/dist/cjs/Graph/Serialization/index.js +17 -0
- package/dist/cjs/Graph/TgGraph.d.ts +82 -0
- package/dist/cjs/Graph/TgGraph.js +55 -0
- package/dist/cjs/Graph/TgGraph.test.d.ts +1 -0
- package/dist/cjs/Graph/TgGraph.test.js +61 -0
- package/dist/cjs/Graph/index.d.ts +15 -0
- package/dist/cjs/Graph/index.js +31 -0
- package/dist/cjs/Output/ArtifactTransformer/DotCliArtifactTransformer.d.ts +25 -0
- package/dist/cjs/Output/ArtifactTransformer/DotCliArtifactTransformer.js +86 -0
- package/dist/cjs/Output/ArtifactTransformer/DotCliArtifactTransformer.test.d.ts +1 -0
- package/dist/cjs/Output/ArtifactTransformer/DotCliArtifactTransformer.test.js +200 -0
- package/dist/cjs/Output/ArtifactTransformer/index.d.ts +1 -0
- package/dist/cjs/Output/ArtifactTransformer/index.js +17 -0
- package/dist/cjs/Output/ArtifactTransformer.d.ts +7 -0
- package/dist/cjs/Output/ArtifactTransformer.js +2 -0
- package/dist/cjs/Output/ArtifactTransformerFactory/DefaultArtifactTransformerFactory.d.ts +17 -0
- package/dist/cjs/Output/ArtifactTransformerFactory/DefaultArtifactTransformerFactory.js +78 -0
- package/dist/cjs/Output/ArtifactTransformerFactory/DefaultArtifactTransformerFactory.test.d.ts +1 -0
- package/dist/cjs/Output/ArtifactTransformerFactory/DefaultArtifactTransformerFactory.test.js +80 -0
- package/dist/cjs/Output/ArtifactTransformerFactory/OclifTransformerFlagParser.d.ts +9 -0
- package/dist/cjs/Output/ArtifactTransformerFactory/OclifTransformerFlagParser.js +80 -0
- package/dist/cjs/Output/ArtifactTransformerFactory/OclifTransformerFlagParser.test.d.ts +1 -0
- package/dist/cjs/Output/ArtifactTransformerFactory/OclifTransformerFlagParser.test.js +156 -0
- package/dist/cjs/Output/ArtifactTransformerFactory/index.d.ts +2 -0
- package/dist/cjs/Output/ArtifactTransformerFactory/index.js +18 -0
- package/dist/cjs/Output/ArtifactTransformerFactory.d.ts +10 -0
- package/dist/cjs/Output/ArtifactTransformerFactory.js +2 -0
- package/dist/cjs/Output/ArtifactWriter/FileArtifactWriter.d.ts +9 -0
- package/dist/cjs/Output/ArtifactWriter/FileArtifactWriter.js +25 -0
- package/dist/cjs/Output/ArtifactWriter/FileArtifactWriter.test.d.ts +1 -0
- package/dist/cjs/Output/ArtifactWriter/FileArtifactWriter.test.js +77 -0
- package/dist/cjs/Output/ArtifactWriter/StdoutArtifactWriter.d.ts +6 -0
- package/dist/cjs/Output/ArtifactWriter/StdoutArtifactWriter.js +17 -0
- package/dist/cjs/Output/ArtifactWriter/StdoutArtifactWriter.test.d.ts +1 -0
- package/dist/cjs/Output/ArtifactWriter/StdoutArtifactWriter.test.js +83 -0
- package/dist/cjs/Output/ArtifactWriter/index.d.ts +2 -0
- package/dist/cjs/Output/ArtifactWriter/index.js +18 -0
- package/dist/cjs/Output/ArtifactWriter.d.ts +8 -0
- package/dist/cjs/Output/ArtifactWriter.js +2 -0
- package/dist/cjs/Output/RenderPipeline.d.ts +12 -0
- package/dist/cjs/Output/RenderPipeline.js +17 -0
- package/dist/cjs/Output/RenderPipeline.test.d.ts +1 -0
- package/dist/cjs/Output/RenderPipeline.test.js +80 -0
- package/dist/cjs/Output/index.d.ts +7 -0
- package/dist/cjs/Output/index.js +23 -0
- package/dist/cjs/Runtime/RuntimeCatalog.d.ts +25 -0
- package/dist/cjs/Runtime/RuntimeCatalog.js +51 -0
- package/dist/cjs/Runtime/RuntimeCatalog.test.d.ts +1 -0
- package/dist/cjs/Runtime/RuntimeCatalog.test.js +165 -0
- package/dist/cjs/Runtime/RuntimeCatalogBuilder/RuntimeCatalogFromConfigBuilder.d.ts +5 -0
- package/dist/cjs/Runtime/RuntimeCatalogBuilder/RuntimeCatalogFromConfigBuilder.js +10 -0
- package/dist/cjs/Runtime/RuntimeCatalogBuilder/RuntimeCatalogFromConfigBuilder.test.d.ts +1 -0
- package/dist/cjs/Runtime/RuntimeCatalogBuilder/RuntimeCatalogFromConfigBuilder.test.js +31 -0
- package/dist/cjs/Runtime/RuntimeCatalogBuilder/index.d.ts +1 -0
- package/dist/cjs/Runtime/RuntimeCatalogBuilder/index.js +17 -0
- package/dist/cjs/Runtime/RuntimeCatalogBuilder.d.ts +11 -0
- package/dist/cjs/Runtime/RuntimeCatalogBuilder.js +2 -0
- package/dist/cjs/Runtime/RuntimeCatalogBuilder.test.d.ts +1 -0
- package/dist/cjs/Runtime/RuntimeCatalogBuilder.test.js +27 -0
- package/dist/cjs/Runtime/RuntimeCatalogLoader.d.ts +37 -0
- package/dist/cjs/Runtime/RuntimeCatalogLoader.js +106 -0
- package/dist/cjs/Runtime/RuntimeCatalogLoader.test.d.ts +1 -0
- package/dist/cjs/Runtime/RuntimeCatalogLoader.test.js +454 -0
- package/dist/cjs/Runtime/RuntimeConfigLoader.d.ts +33 -0
- package/dist/cjs/Runtime/RuntimeConfigLoader.js +93 -0
- package/dist/cjs/Runtime/RuntimeConfigLoader.test.d.ts +1 -0
- package/dist/cjs/Runtime/RuntimeConfigLoader.test.js +345 -0
- package/dist/cjs/Runtime/RuntimeConfigParser/JsonRuntimeConfigParser.d.ts +5 -0
- package/dist/cjs/Runtime/RuntimeConfigParser/JsonRuntimeConfigParser.js +16 -0
- package/dist/cjs/Runtime/RuntimeConfigParser/JsonRuntimeConfigParser.test.d.ts +1 -0
- package/dist/cjs/Runtime/RuntimeConfigParser/JsonRuntimeConfigParser.test.js +22 -0
- package/dist/cjs/Runtime/RuntimeConfigParser/YamlRuntimeConfigParser.d.ts +5 -0
- package/dist/cjs/Runtime/RuntimeConfigParser/YamlRuntimeConfigParser.js +20 -0
- package/dist/cjs/Runtime/RuntimeConfigParser/YamlRuntimeConfigParser.test.d.ts +1 -0
- package/dist/cjs/Runtime/RuntimeConfigParser/YamlRuntimeConfigParser.test.js +31 -0
- package/dist/cjs/Runtime/RuntimeConfigParser/index.d.ts +2 -0
- package/dist/cjs/Runtime/RuntimeConfigParser/index.js +18 -0
- package/dist/cjs/Runtime/RuntimeConfigParser.d.ts +5 -0
- package/dist/cjs/Runtime/RuntimeConfigParser.js +6 -0
- package/dist/cjs/Runtime/RuntimeConfigParser.test.d.ts +1 -0
- package/dist/cjs/Runtime/RuntimeConfigParser.test.js +8 -0
- package/dist/cjs/Runtime/RuntimeConfigParserRegistry.d.ts +9 -0
- package/dist/cjs/Runtime/RuntimeConfigParserRegistry.js +36 -0
- package/dist/cjs/Runtime/RuntimeConfigParserRegistry.test.d.ts +1 -0
- package/dist/cjs/Runtime/RuntimeConfigParserRegistry.test.js +53 -0
- package/dist/cjs/Runtime/RuntimeConfigSource/FileRuntimeConfigSource.d.ts +7 -0
- package/dist/cjs/Runtime/RuntimeConfigSource/FileRuntimeConfigSource.js +21 -0
- package/dist/cjs/Runtime/RuntimeConfigSource/FileRuntimeConfigSource.test.d.ts +1 -0
- package/dist/cjs/Runtime/RuntimeConfigSource/FileRuntimeConfigSource.test.js +40 -0
- package/dist/cjs/Runtime/RuntimeConfigSource/InMemoryRuntimeConfigSource.d.ts +8 -0
- package/dist/cjs/Runtime/RuntimeConfigSource/InMemoryRuntimeConfigSource.js +21 -0
- package/dist/cjs/Runtime/RuntimeConfigSource/InMemoryRuntimeConfigSource.test.d.ts +1 -0
- package/dist/cjs/Runtime/RuntimeConfigSource/InMemoryRuntimeConfigSource.test.js +21 -0
- package/dist/cjs/Runtime/RuntimeConfigSource/YamlRuntimeConfigSource.d.ts +6 -0
- package/dist/cjs/Runtime/RuntimeConfigSource/YamlRuntimeConfigSource.js +17 -0
- package/dist/cjs/Runtime/RuntimeConfigSource/YamlRuntimeConfigSource.test.d.ts +1 -0
- package/dist/cjs/Runtime/RuntimeConfigSource/YamlRuntimeConfigSource.test.js +37 -0
- package/dist/cjs/Runtime/RuntimeConfigSource/index.d.ts +3 -0
- package/dist/cjs/Runtime/RuntimeConfigSource/index.js +19 -0
- package/dist/cjs/Runtime/RuntimeConfigSource.d.ts +10 -0
- package/dist/cjs/Runtime/RuntimeConfigSource.js +20 -0
- package/dist/cjs/Runtime/RuntimeConfigSource.test.d.ts +1 -0
- package/dist/cjs/Runtime/RuntimeConfigSource.test.js +23 -0
- package/dist/cjs/Runtime/RuntimeConfigValidator/ZodRuntimeConfigValidator.d.ts +5 -0
- package/dist/cjs/Runtime/RuntimeConfigValidator/ZodRuntimeConfigValidator.js +77 -0
- package/dist/cjs/Runtime/RuntimeConfigValidator/ZodRuntimeConfigValidator.test.d.ts +1 -0
- package/dist/cjs/Runtime/RuntimeConfigValidator/ZodRuntimeConfigValidator.test.js +62 -0
- package/dist/cjs/Runtime/RuntimeConfigValidator/index.d.ts +1 -0
- package/dist/cjs/Runtime/RuntimeConfigValidator/index.js +17 -0
- package/dist/cjs/Runtime/RuntimeConfigValidator.d.ts +4 -0
- package/dist/cjs/Runtime/RuntimeConfigValidator.js +2 -0
- package/dist/cjs/Runtime/RuntimeConfigValidator.test.d.ts +1 -0
- package/dist/cjs/Runtime/RuntimeConfigValidator.test.js +40 -0
- package/dist/cjs/Runtime/RuntimeProvider.d.ts +5 -0
- package/dist/cjs/Runtime/RuntimeProvider.js +2 -0
- package/dist/cjs/Runtime/RuntimeProvider.test.d.ts +1 -0
- package/dist/cjs/Runtime/RuntimeProvider.test.js +12 -0
- package/dist/cjs/Runtime/RuntimeProviderLoader/ModuleRuntimeProviderLoader.d.ts +14 -0
- package/dist/cjs/Runtime/RuntimeProviderLoader/ModuleRuntimeProviderLoader.js +87 -0
- package/dist/cjs/Runtime/RuntimeProviderLoader/ModuleRuntimeProviderLoader.test.d.ts +1 -0
- package/dist/cjs/Runtime/RuntimeProviderLoader/ModuleRuntimeProviderLoader.test.js +148 -0
- package/dist/cjs/Runtime/RuntimeProviderLoader/index.d.ts +1 -0
- package/dist/cjs/Runtime/RuntimeProviderLoader/index.js +17 -0
- package/dist/cjs/Runtime/RuntimeProviderLoader.d.ts +8 -0
- package/dist/cjs/Runtime/RuntimeProviderLoader.js +2 -0
- package/dist/cjs/Runtime/RuntimeProviderLoader.test.d.ts +1 -0
- package/dist/cjs/Runtime/RuntimeProviderLoader.test.js +25 -0
- package/dist/cjs/Runtime/index.d.ts +15 -0
- package/dist/cjs/Runtime/index.js +31 -0
- package/dist/cjs/index.d.ts +3 -0
- package/dist/cjs/index.js +19 -0
- package/dist/cjs/package.json +1 -0
- package/dist/esm/Graph/Adapter.d.ts +8 -0
- package/dist/esm/Graph/Adapter.js +4 -0
- package/dist/esm/Graph/Adapters/DotAdapter.d.ts +17 -0
- package/dist/esm/Graph/Adapters/DotAdapter.js +27 -0
- package/dist/esm/Graph/Adapters/DotAdapter.test.d.ts +1 -0
- package/dist/esm/Graph/Adapters/DotAdapter.test.js +43 -0
- package/dist/esm/Graph/Adapters/GraphologyAdapter.d.ts +36 -0
- package/dist/esm/Graph/Adapters/GraphologyAdapter.js +269 -0
- package/dist/esm/Graph/Adapters/GraphologyAdapter.test.d.ts +1 -0
- package/dist/esm/Graph/Adapters/GraphologyAdapter.test.js +559 -0
- package/dist/esm/Graph/Adapters/index.d.ts +2 -0
- package/dist/esm/Graph/Adapters/index.js +2 -0
- package/dist/esm/Graph/GraphPlugin.d.ts +53 -0
- package/dist/esm/Graph/GraphPlugin.js +217 -0
- package/dist/esm/Graph/GraphPlugin.test.d.ts +1 -0
- package/dist/esm/Graph/GraphPlugin.test.js +829 -0
- package/dist/esm/Graph/GraphResolver.d.ts +21 -0
- package/dist/esm/Graph/GraphResolver.js +76 -0
- package/dist/esm/Graph/GraphResolver.test.d.ts +1 -0
- package/dist/esm/Graph/GraphResolver.test.js +271 -0
- package/dist/esm/Graph/Importer.d.ts +7 -0
- package/dist/esm/Graph/Importer.js +1 -0
- package/dist/esm/Graph/Importers/TerraformDotImporter.d.ts +12 -0
- package/dist/esm/Graph/Importers/TerraformDotImporter.js +238 -0
- package/dist/esm/Graph/Importers/TerraformDotImporter.test.d.ts +1 -0
- package/dist/esm/Graph/Importers/TerraformDotImporter.test.js +338 -0
- package/dist/esm/Graph/Importers/index.d.ts +1 -0
- package/dist/esm/Graph/Importers/index.js +1 -0
- package/dist/esm/Graph/Operations/Matchers/NodeMatchFn.d.ts +3 -0
- package/dist/esm/Graph/Operations/Matchers/NodeMatchFn.js +1 -0
- package/dist/esm/Graph/Operations/Matchers/NodeQuery/NodeQuery.d.ts +21 -0
- package/dist/esm/Graph/Operations/Matchers/NodeQuery/NodeQuery.js +139 -0
- package/dist/esm/Graph/Operations/Matchers/NodeQuery/NodeQuery.test.d.ts +1 -0
- package/dist/esm/Graph/Operations/Matchers/NodeQuery/NodeQuery.test.js +306 -0
- package/dist/esm/Graph/Operations/Matchers/NodeQuery/QuerySchema.d.ts +155 -0
- package/dist/esm/Graph/Operations/Matchers/NodeQuery/QuerySchema.js +64 -0
- package/dist/esm/Graph/Operations/Matchers/NodeQuery/QuerySchema.test.d.ts +1 -0
- package/dist/esm/Graph/Operations/Matchers/NodeQuery/QuerySchema.test.js +49 -0
- package/dist/esm/Graph/Operations/Matchers/NodeQuery/index.d.ts +2 -0
- package/dist/esm/Graph/Operations/Matchers/NodeQuery/index.js +2 -0
- package/dist/esm/Graph/Operations/Matchers/index.d.ts +2 -0
- package/dist/esm/Graph/Operations/Matchers/index.js +2 -0
- package/dist/esm/Graph/Operations/Operations.d.ts +21 -0
- package/dist/esm/Graph/Operations/Operations.js +1 -0
- package/dist/esm/Graph/Operations/index.d.ts +2 -0
- package/dist/esm/Graph/Operations/index.js +2 -0
- package/dist/esm/Graph/Profile.d.ts +55 -0
- package/dist/esm/Graph/Profile.js +219 -0
- package/dist/esm/Graph/Profile.test.d.ts +1 -0
- package/dist/esm/Graph/Profile.test.js +839 -0
- package/dist/esm/Graph/ProfileRegistry.d.ts +18 -0
- package/dist/esm/Graph/ProfileRegistry.js +57 -0
- package/dist/esm/Graph/ProfileRegistry.test.d.ts +1 -0
- package/dist/esm/Graph/ProfileRegistry.test.js +96 -0
- package/dist/esm/Graph/Renderer.d.ts +9 -0
- package/dist/esm/Graph/Renderer.js +1 -0
- package/dist/esm/Graph/Renderers/DotRenderer.d.ts +27 -0
- package/dist/esm/Graph/Renderers/DotRenderer.js +179 -0
- package/dist/esm/Graph/Renderers/DotRenderer.test.d.ts +1 -0
- package/dist/esm/Graph/Renderers/DotRenderer.test.js +1141 -0
- package/dist/esm/Graph/Renderers/JsonRenderer.d.ts +5 -0
- package/dist/esm/Graph/Renderers/JsonRenderer.js +9 -0
- package/dist/esm/Graph/Renderers/JsonRenderer.test.d.ts +1 -0
- package/dist/esm/Graph/Renderers/JsonRenderer.test.js +27 -0
- package/dist/esm/Graph/Renderers/RendererRegistry.d.ts +15 -0
- package/dist/esm/Graph/Renderers/RendererRegistry.js +29 -0
- package/dist/esm/Graph/Renderers/RendererRegistry.test.d.ts +1 -0
- package/dist/esm/Graph/Renderers/RendererRegistry.test.js +37 -0
- package/dist/esm/Graph/Renderers/TgNodeLabel.d.ts +11 -0
- package/dist/esm/Graph/Renderers/TgNodeLabel.js +39 -0
- package/dist/esm/Graph/Renderers/TgNodeLabel.test.d.ts +1 -0
- package/dist/esm/Graph/Renderers/TgNodeLabel.test.js +74 -0
- package/dist/esm/Graph/Renderers/index.d.ts +4 -0
- package/dist/esm/Graph/Renderers/index.js +4 -0
- package/dist/esm/Graph/RuleError.d.ts +12 -0
- package/dist/esm/Graph/RuleError.js +14 -0
- package/dist/esm/Graph/RuleError.test.d.ts +1 -0
- package/dist/esm/Graph/RuleError.test.js +23 -0
- package/dist/esm/Graph/Rules/Edge/AlignNodes.d.ts +7 -0
- package/dist/esm/Graph/Rules/Edge/AlignNodes.js +35 -0
- package/dist/esm/Graph/Rules/Edge/AlignNodes.test.d.ts +1 -0
- package/dist/esm/Graph/Rules/Edge/AlignNodes.test.js +192 -0
- package/dist/esm/Graph/Rules/Edge/EdgeDirectionSemantic.d.ts +8 -0
- package/dist/esm/Graph/Rules/Edge/EdgeDirectionSemantic.js +74 -0
- package/dist/esm/Graph/Rules/Edge/EdgeDirectionSemantic.test.d.ts +1 -0
- package/dist/esm/Graph/Rules/Edge/EdgeDirectionSemantic.test.js +452 -0
- package/dist/esm/Graph/Rules/Edge/EdgeDotProperties.d.ts +9 -0
- package/dist/esm/Graph/Rules/Edge/EdgeDotProperties.js +46 -0
- package/dist/esm/Graph/Rules/Edge/EdgeDotProperties.test.d.ts +1 -0
- package/dist/esm/Graph/Rules/Edge/EdgeDotProperties.test.js +331 -0
- package/dist/esm/Graph/Rules/Edge/EdgeLegend.d.ts +8 -0
- package/dist/esm/Graph/Rules/Edge/EdgeLegend.js +43 -0
- package/dist/esm/Graph/Rules/Edge/EdgeLegend.test.d.ts +1 -0
- package/dist/esm/Graph/Rules/Edge/EdgeLegend.test.js +184 -0
- package/dist/esm/Graph/Rules/Edge/EdgeReverse.d.ts +6 -0
- package/dist/esm/Graph/Rules/Edge/EdgeReverse.js +26 -0
- package/dist/esm/Graph/Rules/Edge/EdgeReverse.test.d.ts +1 -0
- package/dist/esm/Graph/Rules/Edge/EdgeReverse.test.js +132 -0
- package/dist/esm/Graph/Rules/Edge/EdgeSemanticLegend.d.ts +8 -0
- package/dist/esm/Graph/Rules/Edge/EdgeSemanticLegend.js +68 -0
- package/dist/esm/Graph/Rules/Edge/EdgeSemanticLegend.test.d.ts +1 -0
- package/dist/esm/Graph/Rules/Edge/EdgeSemanticLegend.test.js +509 -0
- package/dist/esm/Graph/Rules/Edge/ExplicitEdge.d.ts +6 -0
- package/dist/esm/Graph/Rules/Edge/ExplicitEdge.js +24 -0
- package/dist/esm/Graph/Rules/Edge/ExplicitEdge.test.d.ts +1 -0
- package/dist/esm/Graph/Rules/Edge/ExplicitEdge.test.js +123 -0
- package/dist/esm/Graph/Rules/Edge/RemoveEdge.d.ts +6 -0
- package/dist/esm/Graph/Rules/Edge/RemoveEdge.js +24 -0
- package/dist/esm/Graph/Rules/Edge/RemoveEdge.test.d.ts +1 -0
- package/dist/esm/Graph/Rules/Edge/RemoveEdge.test.js +133 -0
- package/dist/esm/Graph/Rules/Edge/index.d.ts +8 -0
- package/dist/esm/Graph/Rules/Edge/index.js +8 -0
- package/dist/esm/Graph/Rules/NamedRuleRegistry.d.ts +20 -0
- package/dist/esm/Graph/Rules/NamedRuleRegistry.js +67 -0
- package/dist/esm/Graph/Rules/NamedRuleRegistry.test.d.ts +1 -0
- package/dist/esm/Graph/Rules/NamedRuleRegistry.test.js +241 -0
- package/dist/esm/Graph/Rules/NamedRuleSetRegistry.d.ts +19 -0
- package/dist/esm/Graph/Rules/NamedRuleSetRegistry.js +58 -0
- package/dist/esm/Graph/Rules/NamedRuleSetRegistry.test.d.ts +1 -0
- package/dist/esm/Graph/Rules/NamedRuleSetRegistry.test.js +78 -0
- package/dist/esm/Graph/Rules/Node/ConvertNodeToEdge.d.ts +6 -0
- package/dist/esm/Graph/Rules/Node/ConvertNodeToEdge.js +28 -0
- package/dist/esm/Graph/Rules/Node/ConvertNodeToEdge.test.d.ts +1 -0
- package/dist/esm/Graph/Rules/Node/ConvertNodeToEdge.test.js +150 -0
- package/dist/esm/Graph/Rules/Node/NodeDotProperties.d.ts +9 -0
- package/dist/esm/Graph/Rules/Node/NodeDotProperties.js +39 -0
- package/dist/esm/Graph/Rules/Node/NodeDotProperties.test.d.ts +1 -0
- package/dist/esm/Graph/Rules/Node/NodeDotProperties.test.js +224 -0
- package/dist/esm/Graph/Rules/Node/NodeProperties.d.ts +12 -0
- package/dist/esm/Graph/Rules/Node/NodeProperties.js +77 -0
- package/dist/esm/Graph/Rules/Node/NodeProperties.test.d.ts +1 -0
- package/dist/esm/Graph/Rules/Node/NodeProperties.test.js +369 -0
- package/dist/esm/Graph/Rules/Node/RemoveLeafChain.d.ts +12 -0
- package/dist/esm/Graph/Rules/Node/RemoveLeafChain.js +78 -0
- package/dist/esm/Graph/Rules/Node/RemoveLeafChain.test.d.ts +1 -0
- package/dist/esm/Graph/Rules/Node/RemoveLeafChain.test.js +397 -0
- package/dist/esm/Graph/Rules/Node/RemoveNode.d.ts +6 -0
- package/dist/esm/Graph/Rules/Node/RemoveNode.js +10 -0
- package/dist/esm/Graph/Rules/Node/RemoveNode.test.d.ts +1 -0
- package/dist/esm/Graph/Rules/Node/RemoveNode.test.js +31 -0
- package/dist/esm/Graph/Rules/Node/RemoveNodeAndReconnectEdges.d.ts +6 -0
- package/dist/esm/Graph/Rules/Node/RemoveNodeAndReconnectEdges.js +34 -0
- package/dist/esm/Graph/Rules/Node/RemoveNodeAndReconnectEdges.test.d.ts +1 -0
- package/dist/esm/Graph/Rules/Node/RemoveNodeAndReconnectEdges.test.js +111 -0
- package/dist/esm/Graph/Rules/Node/index.d.ts +6 -0
- package/dist/esm/Graph/Rules/Node/index.js +6 -0
- package/dist/esm/Graph/Rules/Rule.d.ts +40 -0
- package/dist/esm/Graph/Rules/Rule.js +85 -0
- package/dist/esm/Graph/Rules/Rule.test.d.ts +1 -0
- package/dist/esm/Graph/Rules/Rule.test.js +125 -0
- package/dist/esm/Graph/Rules/RuleConfig.d.ts +20 -0
- package/dist/esm/Graph/Rules/RuleConfig.js +1 -0
- package/dist/esm/Graph/Rules/RulePlan.d.ts +27 -0
- package/dist/esm/Graph/Rules/RulePlan.js +22 -0
- package/dist/esm/Graph/Rules/RuleSet.d.ts +25 -0
- package/dist/esm/Graph/Rules/RuleSet.js +85 -0
- package/dist/esm/Graph/Rules/RuleSet.test.d.ts +1 -0
- package/dist/esm/Graph/Rules/RuleSet.test.js +220 -0
- package/dist/esm/Graph/Rules/index.d.ts +8 -0
- package/dist/esm/Graph/Rules/index.js +8 -0
- package/dist/esm/Graph/Rules/registerAll.d.ts +14 -0
- package/dist/esm/Graph/Rules/registerAll.js +14 -0
- package/dist/esm/Graph/Serialization/Registry.d.ts +5 -0
- package/dist/esm/Graph/Serialization/Registry.js +1 -0
- package/dist/esm/Graph/Serialization/index.d.ts +1 -0
- package/dist/esm/Graph/Serialization/index.js +1 -0
- package/dist/esm/Graph/TgGraph.d.ts +82 -0
- package/dist/esm/Graph/TgGraph.js +46 -0
- package/dist/esm/Graph/TgGraph.test.d.ts +1 -0
- package/dist/esm/Graph/TgGraph.test.js +59 -0
- package/dist/esm/Graph/index.d.ts +15 -0
- package/dist/esm/Graph/index.js +15 -0
- package/dist/esm/Output/ArtifactTransformer/DotCliArtifactTransformer.d.ts +25 -0
- package/dist/esm/Output/ArtifactTransformer/DotCliArtifactTransformer.js +82 -0
- package/dist/esm/Output/ArtifactTransformer/DotCliArtifactTransformer.test.d.ts +1 -0
- package/dist/esm/Output/ArtifactTransformer/DotCliArtifactTransformer.test.js +198 -0
- package/dist/esm/Output/ArtifactTransformer/index.d.ts +1 -0
- package/dist/esm/Output/ArtifactTransformer/index.js +1 -0
- package/dist/esm/Output/ArtifactTransformer.d.ts +7 -0
- package/dist/esm/Output/ArtifactTransformer.js +1 -0
- package/dist/esm/Output/ArtifactTransformerFactory/DefaultArtifactTransformerFactory.d.ts +17 -0
- package/dist/esm/Output/ArtifactTransformerFactory/DefaultArtifactTransformerFactory.js +74 -0
- package/dist/esm/Output/ArtifactTransformerFactory/DefaultArtifactTransformerFactory.test.d.ts +1 -0
- package/dist/esm/Output/ArtifactTransformerFactory/DefaultArtifactTransformerFactory.test.js +78 -0
- package/dist/esm/Output/ArtifactTransformerFactory/OclifTransformerFlagParser.d.ts +9 -0
- package/dist/esm/Output/ArtifactTransformerFactory/OclifTransformerFlagParser.js +76 -0
- package/dist/esm/Output/ArtifactTransformerFactory/OclifTransformerFlagParser.test.d.ts +1 -0
- package/dist/esm/Output/ArtifactTransformerFactory/OclifTransformerFlagParser.test.js +154 -0
- package/dist/esm/Output/ArtifactTransformerFactory/index.d.ts +2 -0
- package/dist/esm/Output/ArtifactTransformerFactory/index.js +2 -0
- package/dist/esm/Output/ArtifactTransformerFactory.d.ts +10 -0
- package/dist/esm/Output/ArtifactTransformerFactory.js +1 -0
- package/dist/esm/Output/ArtifactWriter/FileArtifactWriter.d.ts +9 -0
- package/dist/esm/Output/ArtifactWriter/FileArtifactWriter.js +21 -0
- package/dist/esm/Output/ArtifactWriter/FileArtifactWriter.test.d.ts +1 -0
- package/dist/esm/Output/ArtifactWriter/FileArtifactWriter.test.js +75 -0
- package/dist/esm/Output/ArtifactWriter/StdoutArtifactWriter.d.ts +6 -0
- package/dist/esm/Output/ArtifactWriter/StdoutArtifactWriter.js +13 -0
- package/dist/esm/Output/ArtifactWriter/StdoutArtifactWriter.test.d.ts +1 -0
- package/dist/esm/Output/ArtifactWriter/StdoutArtifactWriter.test.js +81 -0
- package/dist/esm/Output/ArtifactWriter/index.d.ts +2 -0
- package/dist/esm/Output/ArtifactWriter/index.js +2 -0
- package/dist/esm/Output/ArtifactWriter.d.ts +8 -0
- package/dist/esm/Output/ArtifactWriter.js +1 -0
- package/dist/esm/Output/RenderPipeline.d.ts +12 -0
- package/dist/esm/Output/RenderPipeline.js +13 -0
- package/dist/esm/Output/RenderPipeline.test.d.ts +1 -0
- package/dist/esm/Output/RenderPipeline.test.js +78 -0
- package/dist/esm/Output/index.d.ts +7 -0
- package/dist/esm/Output/index.js +7 -0
- package/dist/esm/Runtime/RuntimeCatalog.d.ts +25 -0
- package/dist/esm/Runtime/RuntimeCatalog.js +47 -0
- package/dist/esm/Runtime/RuntimeCatalog.test.d.ts +1 -0
- package/dist/esm/Runtime/RuntimeCatalog.test.js +163 -0
- package/dist/esm/Runtime/RuntimeCatalogBuilder/RuntimeCatalogFromConfigBuilder.d.ts +5 -0
- package/dist/esm/Runtime/RuntimeCatalogBuilder/RuntimeCatalogFromConfigBuilder.js +6 -0
- package/dist/esm/Runtime/RuntimeCatalogBuilder/RuntimeCatalogFromConfigBuilder.test.d.ts +1 -0
- package/dist/esm/Runtime/RuntimeCatalogBuilder/RuntimeCatalogFromConfigBuilder.test.js +29 -0
- package/dist/esm/Runtime/RuntimeCatalogBuilder/index.d.ts +1 -0
- package/dist/esm/Runtime/RuntimeCatalogBuilder/index.js +1 -0
- package/dist/esm/Runtime/RuntimeCatalogBuilder.d.ts +11 -0
- package/dist/esm/Runtime/RuntimeCatalogBuilder.js +1 -0
- package/dist/esm/Runtime/RuntimeCatalogBuilder.test.d.ts +1 -0
- package/dist/esm/Runtime/RuntimeCatalogBuilder.test.js +25 -0
- package/dist/esm/Runtime/RuntimeCatalogLoader.d.ts +37 -0
- package/dist/esm/Runtime/RuntimeCatalogLoader.js +102 -0
- package/dist/esm/Runtime/RuntimeCatalogLoader.test.d.ts +1 -0
- package/dist/esm/Runtime/RuntimeCatalogLoader.test.js +452 -0
- package/dist/esm/Runtime/RuntimeConfigLoader.d.ts +33 -0
- package/dist/esm/Runtime/RuntimeConfigLoader.js +89 -0
- package/dist/esm/Runtime/RuntimeConfigLoader.test.d.ts +1 -0
- package/dist/esm/Runtime/RuntimeConfigLoader.test.js +343 -0
- package/dist/esm/Runtime/RuntimeConfigParser/JsonRuntimeConfigParser.d.ts +5 -0
- package/dist/esm/Runtime/RuntimeConfigParser/JsonRuntimeConfigParser.js +12 -0
- package/dist/esm/Runtime/RuntimeConfigParser/JsonRuntimeConfigParser.test.d.ts +1 -0
- package/dist/esm/Runtime/RuntimeConfigParser/JsonRuntimeConfigParser.test.js +20 -0
- package/dist/esm/Runtime/RuntimeConfigParser/YamlRuntimeConfigParser.d.ts +5 -0
- package/dist/esm/Runtime/RuntimeConfigParser/YamlRuntimeConfigParser.js +16 -0
- package/dist/esm/Runtime/RuntimeConfigParser/YamlRuntimeConfigParser.test.d.ts +1 -0
- package/dist/esm/Runtime/RuntimeConfigParser/YamlRuntimeConfigParser.test.js +29 -0
- package/dist/esm/Runtime/RuntimeConfigParser/index.d.ts +2 -0
- package/dist/esm/Runtime/RuntimeConfigParser/index.js +2 -0
- package/dist/esm/Runtime/RuntimeConfigParser.d.ts +5 -0
- package/dist/esm/Runtime/RuntimeConfigParser.js +2 -0
- package/dist/esm/Runtime/RuntimeConfigParser.test.d.ts +1 -0
- package/dist/esm/Runtime/RuntimeConfigParser.test.js +6 -0
- package/dist/esm/Runtime/RuntimeConfigParserRegistry.d.ts +9 -0
- package/dist/esm/Runtime/RuntimeConfigParserRegistry.js +32 -0
- package/dist/esm/Runtime/RuntimeConfigParserRegistry.test.d.ts +1 -0
- package/dist/esm/Runtime/RuntimeConfigParserRegistry.test.js +51 -0
- package/dist/esm/Runtime/RuntimeConfigSource/FileRuntimeConfigSource.d.ts +7 -0
- package/dist/esm/Runtime/RuntimeConfigSource/FileRuntimeConfigSource.js +17 -0
- package/dist/esm/Runtime/RuntimeConfigSource/FileRuntimeConfigSource.test.d.ts +1 -0
- package/dist/esm/Runtime/RuntimeConfigSource/FileRuntimeConfigSource.test.js +38 -0
- package/dist/esm/Runtime/RuntimeConfigSource/InMemoryRuntimeConfigSource.d.ts +8 -0
- package/dist/esm/Runtime/RuntimeConfigSource/InMemoryRuntimeConfigSource.js +17 -0
- package/dist/esm/Runtime/RuntimeConfigSource/InMemoryRuntimeConfigSource.test.d.ts +1 -0
- package/dist/esm/Runtime/RuntimeConfigSource/InMemoryRuntimeConfigSource.test.js +19 -0
- package/dist/esm/Runtime/RuntimeConfigSource/YamlRuntimeConfigSource.d.ts +6 -0
- package/dist/esm/Runtime/RuntimeConfigSource/YamlRuntimeConfigSource.js +13 -0
- package/dist/esm/Runtime/RuntimeConfigSource/YamlRuntimeConfigSource.test.d.ts +1 -0
- package/dist/esm/Runtime/RuntimeConfigSource/YamlRuntimeConfigSource.test.js +35 -0
- package/dist/esm/Runtime/RuntimeConfigSource/index.d.ts +3 -0
- package/dist/esm/Runtime/RuntimeConfigSource/index.js +3 -0
- package/dist/esm/Runtime/RuntimeConfigSource.d.ts +10 -0
- package/dist/esm/Runtime/RuntimeConfigSource.js +15 -0
- package/dist/esm/Runtime/RuntimeConfigSource.test.d.ts +1 -0
- package/dist/esm/Runtime/RuntimeConfigSource.test.js +21 -0
- package/dist/esm/Runtime/RuntimeConfigValidator/ZodRuntimeConfigValidator.d.ts +5 -0
- package/dist/esm/Runtime/RuntimeConfigValidator/ZodRuntimeConfigValidator.js +73 -0
- package/dist/esm/Runtime/RuntimeConfigValidator/ZodRuntimeConfigValidator.test.d.ts +1 -0
- package/dist/esm/Runtime/RuntimeConfigValidator/ZodRuntimeConfigValidator.test.js +60 -0
- package/dist/esm/Runtime/RuntimeConfigValidator/index.d.ts +1 -0
- package/dist/esm/Runtime/RuntimeConfigValidator/index.js +1 -0
- package/dist/esm/Runtime/RuntimeConfigValidator.d.ts +4 -0
- package/dist/esm/Runtime/RuntimeConfigValidator.js +1 -0
- package/dist/esm/Runtime/RuntimeConfigValidator.test.d.ts +1 -0
- package/dist/esm/Runtime/RuntimeConfigValidator.test.js +39 -0
- package/dist/esm/Runtime/RuntimeProvider.d.ts +5 -0
- package/dist/esm/Runtime/RuntimeProvider.js +1 -0
- package/dist/esm/Runtime/RuntimeProvider.test.d.ts +1 -0
- package/dist/esm/Runtime/RuntimeProvider.test.js +11 -0
- package/dist/esm/Runtime/RuntimeProviderLoader/ModuleRuntimeProviderLoader.d.ts +14 -0
- package/dist/esm/Runtime/RuntimeProviderLoader/ModuleRuntimeProviderLoader.js +50 -0
- package/dist/esm/Runtime/RuntimeProviderLoader/ModuleRuntimeProviderLoader.test.d.ts +1 -0
- package/dist/esm/Runtime/RuntimeProviderLoader/ModuleRuntimeProviderLoader.test.js +146 -0
- package/dist/esm/Runtime/RuntimeProviderLoader/index.d.ts +1 -0
- package/dist/esm/Runtime/RuntimeProviderLoader/index.js +1 -0
- package/dist/esm/Runtime/RuntimeProviderLoader.d.ts +8 -0
- package/dist/esm/Runtime/RuntimeProviderLoader.js +1 -0
- package/dist/esm/Runtime/RuntimeProviderLoader.test.d.ts +1 -0
- package/dist/esm/Runtime/RuntimeProviderLoader.test.js +24 -0
- package/dist/esm/Runtime/index.d.ts +15 -0
- package/dist/esm/Runtime/index.js +15 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +3 -0
- package/package.json +110 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { RenderPipeline } from './RenderPipeline.js';
|
|
2
|
+
class AppendSuffixTransformer {
|
|
3
|
+
suffix;
|
|
4
|
+
constructor(suffix) {
|
|
5
|
+
this.suffix = suffix;
|
|
6
|
+
}
|
|
7
|
+
async transform(input) {
|
|
8
|
+
if (typeof input.artifact.content !== 'string') {
|
|
9
|
+
throw new Error('Expected text artifact');
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
...input.artifact,
|
|
13
|
+
content: `${input.artifact.content}${this.suffix}`,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
class CaptureWriter {
|
|
18
|
+
lastInput;
|
|
19
|
+
async write(input) {
|
|
20
|
+
this.lastInput = input;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
describe('RenderPipeline.execute', () => {
|
|
24
|
+
it('shoud apply transformers in order and pass the final artifact to writer', async () => {
|
|
25
|
+
const pipeline = new RenderPipeline();
|
|
26
|
+
const writer = new CaptureWriter();
|
|
27
|
+
const result = await pipeline.execute({
|
|
28
|
+
artifact: {
|
|
29
|
+
content: 'base',
|
|
30
|
+
mediaType: 'text/plain',
|
|
31
|
+
},
|
|
32
|
+
transformers: [
|
|
33
|
+
new AppendSuffixTransformer('-one'),
|
|
34
|
+
new AppendSuffixTransformer('-two'),
|
|
35
|
+
],
|
|
36
|
+
writer,
|
|
37
|
+
write: {
|
|
38
|
+
target: '/tmp/out.txt',
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
expect(result).toEqual({
|
|
42
|
+
content: 'base-one-two',
|
|
43
|
+
mediaType: 'text/plain',
|
|
44
|
+
});
|
|
45
|
+
expect(writer.lastInput).toEqual({
|
|
46
|
+
target: '/tmp/out.txt',
|
|
47
|
+
artifact: {
|
|
48
|
+
content: 'base-one-two',
|
|
49
|
+
mediaType: 'text/plain',
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
it('shoud write the original artifact when no transformers are provided', async () => {
|
|
54
|
+
const pipeline = new RenderPipeline();
|
|
55
|
+
const writer = new CaptureWriter();
|
|
56
|
+
const result = await pipeline.execute({
|
|
57
|
+
artifact: {
|
|
58
|
+
content: 'base',
|
|
59
|
+
mediaType: 'text/plain',
|
|
60
|
+
},
|
|
61
|
+
writer,
|
|
62
|
+
write: {
|
|
63
|
+
target: '/tmp/out.txt',
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
expect(result).toEqual({
|
|
67
|
+
content: 'base',
|
|
68
|
+
mediaType: 'text/plain',
|
|
69
|
+
});
|
|
70
|
+
expect(writer.lastInput).toEqual({
|
|
71
|
+
target: '/tmp/out.txt',
|
|
72
|
+
artifact: {
|
|
73
|
+
content: 'base',
|
|
74
|
+
mediaType: 'text/plain',
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './ArtifactTransformer.js';
|
|
2
|
+
export * from './ArtifactTransformer/index.js';
|
|
3
|
+
export * from './ArtifactTransformerFactory.js';
|
|
4
|
+
export * from './ArtifactTransformerFactory/index.js';
|
|
5
|
+
export * from './ArtifactWriter.js';
|
|
6
|
+
export * from './ArtifactWriter/index.js';
|
|
7
|
+
export * from './RenderPipeline.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './ArtifactTransformer.js';
|
|
2
|
+
export * from './ArtifactTransformer/index.js';
|
|
3
|
+
export * from './ArtifactTransformerFactory.js';
|
|
4
|
+
export * from './ArtifactTransformerFactory/index.js';
|
|
5
|
+
export * from './ArtifactWriter.js';
|
|
6
|
+
export * from './ArtifactWriter/index.js';
|
|
7
|
+
export * from './RenderPipeline.js';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { GraphPluginRegistry } from '../Graph/GraphPlugin.js';
|
|
2
|
+
import { Profile } from '../Graph/Profile.js';
|
|
3
|
+
import { ProfileRegistry } from '../Graph/ProfileRegistry.js';
|
|
4
|
+
import { NamedRuleRegistry } from '../Graph/Rules/NamedRuleRegistry.js';
|
|
5
|
+
import { NamedRuleSetRegistry } from '../Graph/Rules/NamedRuleSetRegistry.js';
|
|
6
|
+
import { BaseRule } from '../Graph/Rules/Rule.js';
|
|
7
|
+
export type RuntimeCatalogProvider = {
|
|
8
|
+
namedRules?: NamedRuleRegistry;
|
|
9
|
+
namedRuleSets?: NamedRuleSetRegistry;
|
|
10
|
+
profiles?: ProfileRegistry;
|
|
11
|
+
plugins?: GraphPluginRegistry;
|
|
12
|
+
};
|
|
13
|
+
export declare class RuntimeCatalog {
|
|
14
|
+
readonly namedRules: NamedRuleRegistry;
|
|
15
|
+
readonly namedRuleSets: NamedRuleSetRegistry;
|
|
16
|
+
readonly profiles: ProfileRegistry;
|
|
17
|
+
readonly plugins: GraphPluginRegistry;
|
|
18
|
+
constructor(input?: RuntimeCatalogProvider);
|
|
19
|
+
static from(providers: RuntimeCatalogProvider[]): RuntimeCatalog;
|
|
20
|
+
use(provider: RuntimeCatalogProvider): RuntimeCatalog;
|
|
21
|
+
resolveProfile(name: string): Profile;
|
|
22
|
+
resolveProfilePhases(name: string): BaseRule[][];
|
|
23
|
+
resolveProfileRendererOptions<TOptions = Record<string, unknown>>(name: string): TOptions | undefined;
|
|
24
|
+
resolveProfileRenderer(name: string): string | undefined;
|
|
25
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { GraphPluginRegistry } from '../Graph/GraphPlugin.js';
|
|
2
|
+
import { ProfileRegistry } from '../Graph/ProfileRegistry.js';
|
|
3
|
+
import { NamedRuleRegistry } from '../Graph/Rules/NamedRuleRegistry.js';
|
|
4
|
+
import { NamedRuleSetRegistry } from '../Graph/Rules/NamedRuleSetRegistry.js';
|
|
5
|
+
export class RuntimeCatalog {
|
|
6
|
+
namedRules;
|
|
7
|
+
namedRuleSets;
|
|
8
|
+
profiles;
|
|
9
|
+
plugins;
|
|
10
|
+
constructor(input = {}) {
|
|
11
|
+
this.namedRules = input.namedRules ?? new NamedRuleRegistry();
|
|
12
|
+
this.namedRuleSets = input.namedRuleSets ?? new NamedRuleSetRegistry();
|
|
13
|
+
this.profiles = input.profiles ?? new ProfileRegistry();
|
|
14
|
+
this.plugins = input.plugins ?? new GraphPluginRegistry();
|
|
15
|
+
}
|
|
16
|
+
static from(providers) {
|
|
17
|
+
return providers.reduce((combined, provider) => combined.use(provider), new RuntimeCatalog());
|
|
18
|
+
}
|
|
19
|
+
use(provider) {
|
|
20
|
+
return new RuntimeCatalog({
|
|
21
|
+
namedRules: provider.namedRules
|
|
22
|
+
? this.namedRules.use(provider.namedRules)
|
|
23
|
+
: this.namedRules,
|
|
24
|
+
namedRuleSets: provider.namedRuleSets
|
|
25
|
+
? this.namedRuleSets.use(provider.namedRuleSets)
|
|
26
|
+
: this.namedRuleSets,
|
|
27
|
+
profiles: provider.profiles
|
|
28
|
+
? this.profiles.use(provider.profiles)
|
|
29
|
+
: this.profiles,
|
|
30
|
+
plugins: provider.plugins
|
|
31
|
+
? this.plugins.use(provider.plugins)
|
|
32
|
+
: this.plugins,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
resolveProfile(name) {
|
|
36
|
+
return this.profiles.resolve(name);
|
|
37
|
+
}
|
|
38
|
+
resolveProfilePhases(name) {
|
|
39
|
+
return this.resolveProfile(name).resolvePhases(this.namedRules, this.namedRuleSets, this.plugins);
|
|
40
|
+
}
|
|
41
|
+
resolveProfileRendererOptions(name) {
|
|
42
|
+
return this.resolveProfile(name).resolveRendererOptions();
|
|
43
|
+
}
|
|
44
|
+
resolveProfileRenderer(name) {
|
|
45
|
+
return this.resolveProfile(name).resolveRenderer();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { GraphPlugin, GraphPluginRegistry } from '../Graph/GraphPlugin.js';
|
|
2
|
+
import { Profile } from '../Graph/Profile.js';
|
|
3
|
+
import { ProfileRegistry } from '../Graph/ProfileRegistry.js';
|
|
4
|
+
import { NamedRuleRegistry } from '../Graph/Rules/NamedRuleRegistry.js';
|
|
5
|
+
import { NamedRuleSetRegistry } from '../Graph/Rules/NamedRuleSetRegistry.js';
|
|
6
|
+
import { RemoveNode } from '../Graph/Rules/Node/RemoveNode.js';
|
|
7
|
+
import { RuntimeCatalog } from './RuntimeCatalog.js';
|
|
8
|
+
describe('RuntimeCatalog.from', () => {
|
|
9
|
+
it('shoud combine providers into one runtime catalog', () => {
|
|
10
|
+
const namedRules = new NamedRuleRegistry({
|
|
11
|
+
ruleOne: new RemoveNode({
|
|
12
|
+
node: { any: true },
|
|
13
|
+
}),
|
|
14
|
+
});
|
|
15
|
+
const namedRuleSets = new NamedRuleSetRegistry({
|
|
16
|
+
setOne: {
|
|
17
|
+
rules: [{ namedRule: 'ruleOne' }],
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
const profiles = new ProfileRegistry({
|
|
21
|
+
'example.profile': new Profile('example.profile', {}),
|
|
22
|
+
});
|
|
23
|
+
class ExamplePlugin extends GraphPlugin {
|
|
24
|
+
constructor() {
|
|
25
|
+
super('example.plugin');
|
|
26
|
+
}
|
|
27
|
+
build() {
|
|
28
|
+
return {};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
const plugins = new GraphPluginRegistry({
|
|
32
|
+
'example.plugin': new ExamplePlugin(),
|
|
33
|
+
});
|
|
34
|
+
const catalog = RuntimeCatalog.from([
|
|
35
|
+
{ namedRules },
|
|
36
|
+
{ namedRuleSets },
|
|
37
|
+
{ profiles },
|
|
38
|
+
{ plugins },
|
|
39
|
+
]);
|
|
40
|
+
expect(catalog.namedRules.names()).toEqual(['ruleOne']);
|
|
41
|
+
expect(catalog.namedRuleSets.names()).toEqual(['setOne']);
|
|
42
|
+
expect(catalog.profiles.names()).toEqual(['example.profile']);
|
|
43
|
+
expect(catalog.plugins.names()).toEqual(['example.plugin']);
|
|
44
|
+
});
|
|
45
|
+
it('shoud prefer later providers when names collide', () => {
|
|
46
|
+
const first = RuntimeCatalog.from([
|
|
47
|
+
{
|
|
48
|
+
namedRules: new NamedRuleRegistry({
|
|
49
|
+
shared: new RemoveNode({
|
|
50
|
+
node: { attr: { key: 'label', eq: 'first' } },
|
|
51
|
+
}),
|
|
52
|
+
}),
|
|
53
|
+
},
|
|
54
|
+
]);
|
|
55
|
+
const second = {
|
|
56
|
+
namedRules: new NamedRuleRegistry({
|
|
57
|
+
shared: new RemoveNode({
|
|
58
|
+
node: { attr: { key: 'label', eq: 'second' } },
|
|
59
|
+
}),
|
|
60
|
+
}),
|
|
61
|
+
};
|
|
62
|
+
const combined = first.use(second);
|
|
63
|
+
const resolved = combined.namedRules.resolve('shared');
|
|
64
|
+
expect(resolved.serialize()).toEqual({
|
|
65
|
+
id: 'RemoveNode',
|
|
66
|
+
config: { node: { attr: { key: 'label', eq: 'second' } } },
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
describe('RuntimeCatalog.resolveProfile', () => {
|
|
71
|
+
it('shoud resolve a profile by name', () => {
|
|
72
|
+
const profile = new Profile('example.profile', {});
|
|
73
|
+
const catalog = new RuntimeCatalog({
|
|
74
|
+
profiles: new ProfileRegistry({
|
|
75
|
+
'example.profile': profile,
|
|
76
|
+
}),
|
|
77
|
+
});
|
|
78
|
+
expect(catalog.resolveProfile('example.profile')).toBe(profile);
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
describe('RuntimeCatalog.resolveProfilePhases', () => {
|
|
82
|
+
it('shoud resolve phases using catalog registries', () => {
|
|
83
|
+
const profile = new Profile('example.profile', {
|
|
84
|
+
phases: [
|
|
85
|
+
{
|
|
86
|
+
phase: 'main',
|
|
87
|
+
rules: [{ namedRuleSet: 'wrapper' }],
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
});
|
|
91
|
+
const catalog = new RuntimeCatalog({
|
|
92
|
+
profiles: new ProfileRegistry({
|
|
93
|
+
'example.profile': profile,
|
|
94
|
+
}),
|
|
95
|
+
namedRules: new NamedRuleRegistry({
|
|
96
|
+
removeAlways: new RemoveNode({
|
|
97
|
+
node: { any: true },
|
|
98
|
+
}),
|
|
99
|
+
}),
|
|
100
|
+
namedRuleSets: new NamedRuleSetRegistry({
|
|
101
|
+
wrapper: {
|
|
102
|
+
rules: [{ namedRule: 'removeAlways' }],
|
|
103
|
+
},
|
|
104
|
+
}),
|
|
105
|
+
});
|
|
106
|
+
const phases = catalog.resolveProfilePhases('example.profile');
|
|
107
|
+
expect(phases).toHaveLength(1);
|
|
108
|
+
expect(phases[0]).toHaveLength(1);
|
|
109
|
+
expect(phases[0][0].serialize()).toEqual({
|
|
110
|
+
id: 'RemoveNode',
|
|
111
|
+
config: { node: { any: true } },
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
describe('RuntimeCatalog.resolveProfileRendererOptions', () => {
|
|
116
|
+
it('shoud resolve renderer options through the profile registry', () => {
|
|
117
|
+
const profile = new Profile('example.profile', {
|
|
118
|
+
render: {
|
|
119
|
+
options: {
|
|
120
|
+
graph: { rankdir: 'LR' },
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
const catalog = new RuntimeCatalog({
|
|
125
|
+
profiles: new ProfileRegistry({
|
|
126
|
+
'example.profile': profile,
|
|
127
|
+
}),
|
|
128
|
+
});
|
|
129
|
+
const options = catalog.resolveProfileRendererOptions('example.profile');
|
|
130
|
+
expect(options).toEqual({
|
|
131
|
+
graph: { rankdir: 'LR' },
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
describe('RuntimeCatalog.resolveProfileRenderer', () => {
|
|
136
|
+
it('shoud resolve renderer by name through the profile registry', () => {
|
|
137
|
+
const profile = new Profile('example.profile', {
|
|
138
|
+
render: { renderer: 'dot' },
|
|
139
|
+
});
|
|
140
|
+
const catalog = new RuntimeCatalog({
|
|
141
|
+
profiles: new ProfileRegistry({
|
|
142
|
+
'example.profile': profile,
|
|
143
|
+
}),
|
|
144
|
+
});
|
|
145
|
+
expect(catalog.resolveProfileRenderer('example.profile')).toBe('dot');
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
describe('RuntimeCatalog.use', () => {
|
|
149
|
+
it('shoud preserve existing registries when provider omits them', () => {
|
|
150
|
+
const base = new RuntimeCatalog({
|
|
151
|
+
namedRules: new NamedRuleRegistry({
|
|
152
|
+
baseRule: new RemoveNode({ node: { any: true } }),
|
|
153
|
+
}),
|
|
154
|
+
});
|
|
155
|
+
const updated = base.use({
|
|
156
|
+
profiles: new ProfileRegistry({
|
|
157
|
+
'example.profile': new Profile('example.profile', {}),
|
|
158
|
+
}),
|
|
159
|
+
});
|
|
160
|
+
expect(updated.namedRules.names()).toEqual(['baseRule']);
|
|
161
|
+
expect(updated.profiles.names()).toEqual(['example.profile']);
|
|
162
|
+
});
|
|
163
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RuntimeCatalog } from '../RuntimeCatalog.js';
|
|
2
|
+
import { RuntimeCatalogBuildInput, RuntimeCatalogBuilder } from '../RuntimeCatalogBuilder.js';
|
|
3
|
+
export declare class RuntimeCatalogFromConfigBuilder<TOptions extends Record<string, unknown> = Record<string, unknown>> implements RuntimeCatalogBuilder<TOptions> {
|
|
4
|
+
build(input: RuntimeCatalogBuildInput<TOptions>): RuntimeCatalog;
|
|
5
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { RemoveNode } from '../../Graph/Rules/Node/RemoveNode.js';
|
|
2
|
+
import { RuntimeCatalogFromConfigBuilder } from './RuntimeCatalogFromConfigBuilder.js';
|
|
3
|
+
describe('RuntimeCatalogFromConfigBuilder.build', () => {
|
|
4
|
+
it('shoud build a runtime catalog from serialized runtime config', () => {
|
|
5
|
+
const builder = new RuntimeCatalogFromConfigBuilder();
|
|
6
|
+
const catalog = builder.build({
|
|
7
|
+
config: {
|
|
8
|
+
namedRules: {
|
|
9
|
+
removeAlways: {
|
|
10
|
+
id: RemoveNode.name,
|
|
11
|
+
config: { node: { any: true } },
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
profiles: {
|
|
15
|
+
profile: {
|
|
16
|
+
phases: [{ phase: 'main', rules: [{ namedRule: 'removeAlways' }] }],
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
const phases = catalog.resolveProfilePhases('profile');
|
|
22
|
+
expect(phases).toHaveLength(1);
|
|
23
|
+
expect(phases[0]).toHaveLength(1);
|
|
24
|
+
expect(phases[0][0].serialize()).toEqual({
|
|
25
|
+
id: RemoveNode.name,
|
|
26
|
+
config: { node: { any: true } },
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './RuntimeCatalogFromConfigBuilder.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './RuntimeCatalogFromConfigBuilder.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SupportedAdapterOperationsRegistry } from '../Graph/Serialization/Registry.js';
|
|
2
|
+
import { RuntimeCatalog, RuntimeCatalogProvider } from './RuntimeCatalog.js';
|
|
3
|
+
import { SerializedRuntimeConfig } from './RuntimeCatalogLoader.js';
|
|
4
|
+
export type RuntimeCatalogBuildInput<TOptions extends Record<string, unknown> = Record<string, unknown>> = {
|
|
5
|
+
providers?: RuntimeCatalogProvider[];
|
|
6
|
+
config: SerializedRuntimeConfig<TOptions>;
|
|
7
|
+
supportedAdapterOperationsRegistry?: SupportedAdapterOperationsRegistry;
|
|
8
|
+
};
|
|
9
|
+
export interface RuntimeCatalogBuilder<TOptions extends Record<string, unknown> = Record<string, unknown>> {
|
|
10
|
+
build(input: RuntimeCatalogBuildInput<TOptions>): RuntimeCatalog;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RuntimeCatalog } from './RuntimeCatalog.js';
|
|
2
|
+
describe('RuntimeCatalogBuilder.build', () => {
|
|
3
|
+
it('shoud allow implementations to consume runtime build input', () => {
|
|
4
|
+
class CaptureBuilder {
|
|
5
|
+
captured;
|
|
6
|
+
build(input) {
|
|
7
|
+
this.captured = input;
|
|
8
|
+
return new RuntimeCatalog();
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
const builder = new CaptureBuilder();
|
|
12
|
+
const input = {
|
|
13
|
+
config: {
|
|
14
|
+
profiles: {
|
|
15
|
+
profile: {
|
|
16
|
+
phases: [],
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
const catalog = builder.build(input);
|
|
22
|
+
expect(catalog).toBeInstanceOf(RuntimeCatalog);
|
|
23
|
+
expect(builder.captured).toEqual(input);
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { SerializedProfile } from '../Graph/Profile.js';
|
|
2
|
+
import { ProfileRegistry } from '../Graph/ProfileRegistry.js';
|
|
3
|
+
import { SerializedRule } from '../Graph/Rules/RuleConfig.js';
|
|
4
|
+
import { SerializedRuleSet } from '../Graph/Rules/RuleSet.js';
|
|
5
|
+
import { SupportedAdapterOperationsRegistry } from '../Graph/Serialization/Registry.js';
|
|
6
|
+
import { RuntimeCatalog, RuntimeCatalogProvider } from './RuntimeCatalog.js';
|
|
7
|
+
export type SerializedRuntimeProfile<TOptions extends Record<string, unknown> = Record<string, unknown>> = Omit<SerializedProfile<TOptions>, 'name' | 'usesProfiles'> & {
|
|
8
|
+
usesProfiles?: string[];
|
|
9
|
+
};
|
|
10
|
+
export type SerializedRuntimeConfig<TOptions extends Record<string, unknown> = Record<string, unknown>> = {
|
|
11
|
+
providers?: string[];
|
|
12
|
+
namedRules?: Record<string, SerializedRule>;
|
|
13
|
+
namedRuleSets?: Record<string, SerializedRuleSet>;
|
|
14
|
+
profiles?: Record<string, SerializedRuntimeProfile<TOptions>>;
|
|
15
|
+
run?: {
|
|
16
|
+
profile: string;
|
|
17
|
+
render?: {
|
|
18
|
+
renderer?: string;
|
|
19
|
+
options?: TOptions;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export type RuntimeCatalogLoaderInput<TOptions extends Record<string, unknown> = Record<string, unknown>> = {
|
|
24
|
+
providers?: RuntimeCatalogProvider[];
|
|
25
|
+
config?: SerializedRuntimeConfig<TOptions>;
|
|
26
|
+
supportedAdapterOperationsRegistry?: SupportedAdapterOperationsRegistry;
|
|
27
|
+
};
|
|
28
|
+
export declare class RuntimeCatalogLoader<TOptions extends Record<string, unknown> = Record<string, unknown>> {
|
|
29
|
+
private readonly input;
|
|
30
|
+
constructor(input?: RuntimeCatalogLoaderInput<TOptions>);
|
|
31
|
+
load(config?: SerializedRuntimeConfig<TOptions> | undefined): RuntimeCatalog;
|
|
32
|
+
fromSerialized(config: SerializedRuntimeConfig<TOptions>): RuntimeCatalog;
|
|
33
|
+
static fromSerialized<TOptions extends Record<string, unknown> = Record<string, unknown>>(config: SerializedRuntimeConfig<TOptions>, supportedAdapterOperationsRegistry?: SupportedAdapterOperationsRegistry, externalProfiles?: ProfileRegistry): RuntimeCatalog;
|
|
34
|
+
static load<TOptions extends Record<string, unknown> = Record<string, unknown>>(input?: RuntimeCatalogLoaderInput<TOptions>): RuntimeCatalog;
|
|
35
|
+
private static resolveProfilesFromSerialized;
|
|
36
|
+
private static coerceSerializedProfile;
|
|
37
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { Profile } from '../Graph/Profile.js';
|
|
2
|
+
import { ProfileRegistry } from '../Graph/ProfileRegistry.js';
|
|
3
|
+
import { NamedRuleRegistry } from '../Graph/Rules/NamedRuleRegistry.js';
|
|
4
|
+
import { NamedRuleSetRegistry } from '../Graph/Rules/NamedRuleSetRegistry.js';
|
|
5
|
+
import { RuntimeCatalog } from './RuntimeCatalog.js';
|
|
6
|
+
export class RuntimeCatalogLoader {
|
|
7
|
+
input;
|
|
8
|
+
constructor(input = {}) {
|
|
9
|
+
this.input = input;
|
|
10
|
+
}
|
|
11
|
+
load(config = this.input.config) {
|
|
12
|
+
return RuntimeCatalogLoader.load({
|
|
13
|
+
...this.input,
|
|
14
|
+
config,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
fromSerialized(config) {
|
|
18
|
+
return RuntimeCatalogLoader.fromSerialized(config, this.input.supportedAdapterOperationsRegistry);
|
|
19
|
+
}
|
|
20
|
+
static fromSerialized(config, supportedAdapterOperationsRegistry, externalProfiles) {
|
|
21
|
+
return new RuntimeCatalog({
|
|
22
|
+
namedRules: new NamedRuleRegistry(config.namedRules ?? {}),
|
|
23
|
+
namedRuleSets: new NamedRuleSetRegistry(config.namedRuleSets ?? {}),
|
|
24
|
+
profiles: RuntimeCatalogLoader.resolveProfilesFromSerialized(config.profiles ?? {}, supportedAdapterOperationsRegistry, externalProfiles),
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
static load(input = {}) {
|
|
28
|
+
const providerCatalog = RuntimeCatalog.from(input.providers ?? []);
|
|
29
|
+
if (!input.config) {
|
|
30
|
+
return providerCatalog;
|
|
31
|
+
}
|
|
32
|
+
return RuntimeCatalog.from([
|
|
33
|
+
providerCatalog,
|
|
34
|
+
RuntimeCatalogLoader.fromSerialized(input.config, input.supportedAdapterOperationsRegistry, providerCatalog.profiles),
|
|
35
|
+
]);
|
|
36
|
+
}
|
|
37
|
+
static resolveProfilesFromSerialized(profiles, supportedAdapterOperationsRegistry, externalProfiles) {
|
|
38
|
+
const externalNames = new Set(externalProfiles?.names() ?? []);
|
|
39
|
+
const externalSerialized = new Map();
|
|
40
|
+
const definitions = new Map();
|
|
41
|
+
for (const [name, profile] of Object.entries(profiles)) {
|
|
42
|
+
definitions.set(name, {
|
|
43
|
+
profile: {
|
|
44
|
+
name,
|
|
45
|
+
supports: profile.supports,
|
|
46
|
+
render: profile.render,
|
|
47
|
+
phases: profile.phases,
|
|
48
|
+
plugins: profile.plugins,
|
|
49
|
+
},
|
|
50
|
+
usesProfiles: [...(profile.usesProfiles ?? [])],
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
const resolved = new Map();
|
|
54
|
+
const resolve = (name, stack = []) => {
|
|
55
|
+
const existing = resolved.get(name);
|
|
56
|
+
if (existing) {
|
|
57
|
+
return existing;
|
|
58
|
+
}
|
|
59
|
+
if (stack.includes(name)) {
|
|
60
|
+
throw new Error(`Runtime config profile inheritance cycle detected: ${[...stack, name].join(' -> ')}`);
|
|
61
|
+
}
|
|
62
|
+
const definition = definitions.get(name);
|
|
63
|
+
if (!definition) {
|
|
64
|
+
throw new Error(`Runtime config profile '${name}' is not defined`);
|
|
65
|
+
}
|
|
66
|
+
const usedProfiles = definition.usesProfiles.map((used) => {
|
|
67
|
+
if (!definitions.has(used)) {
|
|
68
|
+
if (externalNames.has(used)) {
|
|
69
|
+
const cached = externalSerialized.get(used);
|
|
70
|
+
if (cached) {
|
|
71
|
+
return RuntimeCatalogLoader.coerceSerializedProfile(cached);
|
|
72
|
+
}
|
|
73
|
+
const externalProfile = externalProfiles?.resolve(used);
|
|
74
|
+
if (externalProfile) {
|
|
75
|
+
const serialized = externalProfile.serialize();
|
|
76
|
+
externalSerialized.set(used, serialized);
|
|
77
|
+
return RuntimeCatalogLoader.coerceSerializedProfile(serialized);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
throw new Error(`Runtime config profile '${name}' uses unknown profile '${used}'`);
|
|
81
|
+
}
|
|
82
|
+
return resolve(used, [...stack, name]);
|
|
83
|
+
});
|
|
84
|
+
const profile = {
|
|
85
|
+
...definition.profile,
|
|
86
|
+
usesProfiles: usedProfiles,
|
|
87
|
+
};
|
|
88
|
+
resolved.set(name, profile);
|
|
89
|
+
return profile;
|
|
90
|
+
};
|
|
91
|
+
for (const name of definitions.keys()) {
|
|
92
|
+
resolve(name);
|
|
93
|
+
}
|
|
94
|
+
return new ProfileRegistry(Object.fromEntries([...resolved.entries()].map(([name, profile]) => [
|
|
95
|
+
name,
|
|
96
|
+
() => Profile.deseriaize(profile, supportedAdapterOperationsRegistry),
|
|
97
|
+
])));
|
|
98
|
+
}
|
|
99
|
+
static coerceSerializedProfile(profile) {
|
|
100
|
+
return profile;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|