@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,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const RuntimeConfigParserRegistry_js_1 = require("./RuntimeConfigParserRegistry.js");
|
|
4
|
+
class FakeYamlParser {
|
|
5
|
+
supports(format) {
|
|
6
|
+
return format === 'yaml';
|
|
7
|
+
}
|
|
8
|
+
parse(content) {
|
|
9
|
+
return { content };
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
describe('RuntimeConfigParserRegistry.defaults', () => {
|
|
13
|
+
it('shoud include json and yaml parsers by default', () => {
|
|
14
|
+
const registry = RuntimeConfigParserRegistry_js_1.RuntimeConfigParserRegistry.defaults();
|
|
15
|
+
expect(registry.resolve('json').parse('{"ok":true}')).toEqual({ ok: true });
|
|
16
|
+
expect(registry.resolve('yaml').parse('value: ok')).toEqual({
|
|
17
|
+
value: 'ok',
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
describe('RuntimeConfigParserRegistry.register', () => {
|
|
22
|
+
it('shoud return a new registry without mutating the original', () => {
|
|
23
|
+
const base = RuntimeConfigParserRegistry_js_1.RuntimeConfigParserRegistry.defaults();
|
|
24
|
+
const next = base.register(new FakeYamlParser());
|
|
25
|
+
expect(base.resolve('yaml').parse('value: ok')).toEqual({ value: 'ok' });
|
|
26
|
+
expect(next.resolve('yaml').parse('value: ok')).toEqual({ value: 'ok' });
|
|
27
|
+
});
|
|
28
|
+
it('shoud allow registering parsers on an empty registry', () => {
|
|
29
|
+
const base = new RuntimeConfigParserRegistry_js_1.RuntimeConfigParserRegistry();
|
|
30
|
+
const next = base.register(new FakeYamlParser());
|
|
31
|
+
expect(() => base.resolve('yaml')).toThrow("No RuntimeConfigParser registered for format 'yaml'");
|
|
32
|
+
expect(next.resolve('yaml').parse('value: ok')).toEqual({
|
|
33
|
+
content: 'value: ok',
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
describe('RuntimeConfigParserRegistry.use', () => {
|
|
38
|
+
it('shoud combine parser registries immutably', () => {
|
|
39
|
+
const one = RuntimeConfigParserRegistry_js_1.RuntimeConfigParserRegistry.defaults();
|
|
40
|
+
const two = new RuntimeConfigParserRegistry_js_1.RuntimeConfigParserRegistry([new FakeYamlParser()]);
|
|
41
|
+
const combined = one.use(two);
|
|
42
|
+
expect(one.resolve('yaml').parse('value: ok')).toEqual({ value: 'ok' });
|
|
43
|
+
expect(combined.resolve('yaml').parse('value: ok')).toEqual({
|
|
44
|
+
value: 'ok',
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
describe('RuntimeConfigParserRegistry.resolve', () => {
|
|
49
|
+
it('shoud throw when parser format is not registered', () => {
|
|
50
|
+
const registry = RuntimeConfigParserRegistry_js_1.RuntimeConfigParserRegistry.defaults();
|
|
51
|
+
expect(() => registry.resolve('toml')).toThrow("No RuntimeConfigParser registered for format 'toml'");
|
|
52
|
+
});
|
|
53
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RuntimeConfigDocument, RuntimeConfigSource } from '../RuntimeConfigSource.js';
|
|
2
|
+
export declare class FileRuntimeConfigSource implements RuntimeConfigSource {
|
|
3
|
+
readonly filePath: string;
|
|
4
|
+
private readonly format?;
|
|
5
|
+
constructor(filePath: string, format?: string | undefined);
|
|
6
|
+
read(): Promise<RuntimeConfigDocument>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileRuntimeConfigSource = void 0;
|
|
4
|
+
const promises_1 = require("node:fs/promises");
|
|
5
|
+
const RuntimeConfigSource_js_1 = require("../RuntimeConfigSource.js");
|
|
6
|
+
class FileRuntimeConfigSource {
|
|
7
|
+
filePath;
|
|
8
|
+
format;
|
|
9
|
+
constructor(filePath, format) {
|
|
10
|
+
this.filePath = filePath;
|
|
11
|
+
this.format = format;
|
|
12
|
+
}
|
|
13
|
+
async read() {
|
|
14
|
+
return {
|
|
15
|
+
content: await (0, promises_1.readFile)(this.filePath, 'utf8'),
|
|
16
|
+
format: this.format ?? (0, RuntimeConfigSource_js_1.inferRuntimeConfigFormatFromReference)(this.filePath),
|
|
17
|
+
reference: this.filePath,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.FileRuntimeConfigSource = FileRuntimeConfigSource;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const promises_1 = require("node:fs/promises");
|
|
4
|
+
const node_os_1 = require("node:os");
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
6
|
+
const FileRuntimeConfigSource_js_1 = require("./FileRuntimeConfigSource.js");
|
|
7
|
+
describe('FileRuntimeConfigSource.read', () => {
|
|
8
|
+
it('shoud infer format from file extension when format is omitted', async () => {
|
|
9
|
+
const dir = await (0, promises_1.mkdtemp)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'runtime-config-source-file-'));
|
|
10
|
+
const filePath = (0, node_path_1.join)(dir, 'runtime.json');
|
|
11
|
+
await (0, promises_1.writeFile)(filePath, '{"profiles":{}}', 'utf8');
|
|
12
|
+
try {
|
|
13
|
+
const source = new FileRuntimeConfigSource_js_1.FileRuntimeConfigSource(filePath);
|
|
14
|
+
await expect(source.read()).resolves.toEqual({
|
|
15
|
+
content: '{"profiles":{}}',
|
|
16
|
+
format: 'json',
|
|
17
|
+
reference: filePath,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
finally {
|
|
21
|
+
await (0, promises_1.rm)(dir, { recursive: true, force: true });
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
it('shoud prefer explicit format over inferred extension format', async () => {
|
|
25
|
+
const dir = await (0, promises_1.mkdtemp)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'runtime-config-source-file-'));
|
|
26
|
+
const filePath = (0, node_path_1.join)(dir, 'runtime.json');
|
|
27
|
+
await (0, promises_1.writeFile)(filePath, 'profiles: {}', 'utf8');
|
|
28
|
+
try {
|
|
29
|
+
const source = new FileRuntimeConfigSource_js_1.FileRuntimeConfigSource(filePath, 'yaml');
|
|
30
|
+
await expect(source.read()).resolves.toEqual({
|
|
31
|
+
content: 'profiles: {}',
|
|
32
|
+
format: 'yaml',
|
|
33
|
+
reference: filePath,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
finally {
|
|
37
|
+
await (0, promises_1.rm)(dir, { recursive: true, force: true });
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RuntimeConfigDocument, RuntimeConfigSource } from '../RuntimeConfigSource.js';
|
|
2
|
+
export declare class InMemoryRuntimeConfigSource implements RuntimeConfigSource {
|
|
3
|
+
private readonly content;
|
|
4
|
+
private readonly format;
|
|
5
|
+
private readonly reference;
|
|
6
|
+
constructor(content: string, format?: string, reference?: string);
|
|
7
|
+
read(): Promise<RuntimeConfigDocument>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InMemoryRuntimeConfigSource = void 0;
|
|
4
|
+
class InMemoryRuntimeConfigSource {
|
|
5
|
+
content;
|
|
6
|
+
format;
|
|
7
|
+
reference;
|
|
8
|
+
constructor(content, format = 'json', reference = 'in-memory') {
|
|
9
|
+
this.content = content;
|
|
10
|
+
this.format = format;
|
|
11
|
+
this.reference = reference;
|
|
12
|
+
}
|
|
13
|
+
async read() {
|
|
14
|
+
return {
|
|
15
|
+
content: this.content,
|
|
16
|
+
format: this.format,
|
|
17
|
+
reference: this.reference,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.InMemoryRuntimeConfigSource = InMemoryRuntimeConfigSource;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const InMemoryRuntimeConfigSource_js_1 = require("./InMemoryRuntimeConfigSource.js");
|
|
4
|
+
describe('InMemoryRuntimeConfigSource.read', () => {
|
|
5
|
+
it('shoud return default metadata when optional constructor args are omitted', async () => {
|
|
6
|
+
const source = new InMemoryRuntimeConfigSource_js_1.InMemoryRuntimeConfigSource('{}');
|
|
7
|
+
await expect(source.read()).resolves.toEqual({
|
|
8
|
+
content: '{}',
|
|
9
|
+
format: 'json',
|
|
10
|
+
reference: 'in-memory',
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
it('shoud return provided format and reference metadata', async () => {
|
|
14
|
+
const source = new InMemoryRuntimeConfigSource_js_1.InMemoryRuntimeConfigSource('{}', 'yaml', 'memory://cfg');
|
|
15
|
+
await expect(source.read()).resolves.toEqual({
|
|
16
|
+
content: '{}',
|
|
17
|
+
format: 'yaml',
|
|
18
|
+
reference: 'memory://cfg',
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RuntimeConfigDocument, RuntimeConfigSource } from '../RuntimeConfigSource.js';
|
|
2
|
+
export declare class YamlRuntimeConfigSource implements RuntimeConfigSource {
|
|
3
|
+
private readonly source;
|
|
4
|
+
constructor(source: RuntimeConfigSource);
|
|
5
|
+
read(): Promise<RuntimeConfigDocument>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.YamlRuntimeConfigSource = void 0;
|
|
4
|
+
class YamlRuntimeConfigSource {
|
|
5
|
+
source;
|
|
6
|
+
constructor(source) {
|
|
7
|
+
this.source = source;
|
|
8
|
+
}
|
|
9
|
+
async read() {
|
|
10
|
+
const document = await this.source.read();
|
|
11
|
+
return {
|
|
12
|
+
...document,
|
|
13
|
+
format: 'yaml',
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.YamlRuntimeConfigSource = YamlRuntimeConfigSource;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const YamlRuntimeConfigSource_js_1 = require("./YamlRuntimeConfigSource.js");
|
|
4
|
+
class FakeRuntimeConfigSource {
|
|
5
|
+
document;
|
|
6
|
+
constructor(document) {
|
|
7
|
+
this.document = document;
|
|
8
|
+
}
|
|
9
|
+
async read() {
|
|
10
|
+
return this.document;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
describe('YamlRuntimeConfigSource.read', () => {
|
|
14
|
+
it('shoud force the format to yaml while preserving content and reference', async () => {
|
|
15
|
+
const source = new YamlRuntimeConfigSource_js_1.YamlRuntimeConfigSource(new FakeRuntimeConfigSource({
|
|
16
|
+
content: 'profiles:\n test: {}',
|
|
17
|
+
format: 'json',
|
|
18
|
+
reference: '/tmp/config.any',
|
|
19
|
+
}));
|
|
20
|
+
await expect(source.read()).resolves.toEqual({
|
|
21
|
+
content: 'profiles:\n test: {}',
|
|
22
|
+
format: 'yaml',
|
|
23
|
+
reference: '/tmp/config.any',
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
it('shoud set yaml format when source format is missing', async () => {
|
|
27
|
+
const source = new YamlRuntimeConfigSource_js_1.YamlRuntimeConfigSource(new FakeRuntimeConfigSource({
|
|
28
|
+
content: 'profiles:\n test: {}',
|
|
29
|
+
reference: 'memory://yaml',
|
|
30
|
+
}));
|
|
31
|
+
await expect(source.read()).resolves.toEqual({
|
|
32
|
+
content: 'profiles:\n test: {}',
|
|
33
|
+
format: 'yaml',
|
|
34
|
+
reference: 'memory://yaml',
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./FileRuntimeConfigSource.js"), exports);
|
|
18
|
+
__exportStar(require("./InMemoryRuntimeConfigSource.js"), exports);
|
|
19
|
+
__exportStar(require("./YamlRuntimeConfigSource.js"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type RuntimeConfigDocument = {
|
|
2
|
+
content: string;
|
|
3
|
+
format?: string;
|
|
4
|
+
reference?: string;
|
|
5
|
+
};
|
|
6
|
+
export interface RuntimeConfigSource {
|
|
7
|
+
read(): Promise<RuntimeConfigDocument>;
|
|
8
|
+
}
|
|
9
|
+
export declare const normalizeRuntimeConfigFormat: (format: string) => string;
|
|
10
|
+
export declare const inferRuntimeConfigFormatFromReference: (reference: string | undefined) => string | undefined;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.inferRuntimeConfigFormatFromReference = exports.normalizeRuntimeConfigFormat = void 0;
|
|
4
|
+
const node_path_1 = require("node:path");
|
|
5
|
+
const normalizeRuntimeConfigFormat = (format) => format.trim().toLowerCase();
|
|
6
|
+
exports.normalizeRuntimeConfigFormat = normalizeRuntimeConfigFormat;
|
|
7
|
+
const inferRuntimeConfigFormatFromReference = (reference) => {
|
|
8
|
+
if (!reference) {
|
|
9
|
+
return undefined;
|
|
10
|
+
}
|
|
11
|
+
const extension = (0, exports.normalizeRuntimeConfigFormat)((0, node_path_1.extname)(reference));
|
|
12
|
+
if (extension === '.json') {
|
|
13
|
+
return 'json';
|
|
14
|
+
}
|
|
15
|
+
if (extension === '.yaml' || extension === '.yml') {
|
|
16
|
+
return 'yaml';
|
|
17
|
+
}
|
|
18
|
+
return undefined;
|
|
19
|
+
};
|
|
20
|
+
exports.inferRuntimeConfigFormatFromReference = inferRuntimeConfigFormatFromReference;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const RuntimeConfigSource_js_1 = require("./RuntimeConfigSource.js");
|
|
4
|
+
describe('RuntimeConfigSource.normalizeRuntimeConfigFormat', () => {
|
|
5
|
+
it('shoud normalize format strings by trimming and lowering case', () => {
|
|
6
|
+
expect((0, RuntimeConfigSource_js_1.normalizeRuntimeConfigFormat)(' JSON ')).toBe('json');
|
|
7
|
+
});
|
|
8
|
+
});
|
|
9
|
+
describe('RuntimeConfigSource.inferRuntimeConfigFormatFromReference', () => {
|
|
10
|
+
it('shoud infer json from file extension', () => {
|
|
11
|
+
expect((0, RuntimeConfigSource_js_1.inferRuntimeConfigFormatFromReference)('/tmp/config.JSON')).toBe('json');
|
|
12
|
+
});
|
|
13
|
+
it('shoud infer yaml from file extensions', () => {
|
|
14
|
+
expect((0, RuntimeConfigSource_js_1.inferRuntimeConfigFormatFromReference)('/tmp/config.yaml')).toBe('yaml');
|
|
15
|
+
expect((0, RuntimeConfigSource_js_1.inferRuntimeConfigFormatFromReference)('/tmp/config.yml')).toBe('yaml');
|
|
16
|
+
});
|
|
17
|
+
it('shoud return undefined for unknown extensions', () => {
|
|
18
|
+
expect((0, RuntimeConfigSource_js_1.inferRuntimeConfigFormatFromReference)('/tmp/config.toml')).toBe(undefined);
|
|
19
|
+
});
|
|
20
|
+
it('shoud return undefined for missing references', () => {
|
|
21
|
+
expect((0, RuntimeConfigSource_js_1.inferRuntimeConfigFormatFromReference)(undefined)).toBe(undefined);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SerializedRuntimeConfig } from '../RuntimeCatalogLoader.js';
|
|
2
|
+
import { RuntimeConfigValidator } from '../RuntimeConfigValidator.js';
|
|
3
|
+
export declare class ZodRuntimeConfigValidator<TOptions extends Record<string, unknown> = Record<string, unknown>> implements RuntimeConfigValidator<TOptions> {
|
|
4
|
+
validate(input: unknown): SerializedRuntimeConfig<TOptions>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ZodRuntimeConfigValidator = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const RulePlan_js_1 = require("../../Graph/Rules/RulePlan.js");
|
|
6
|
+
const namedRuleRefSchema = zod_1.z.object({ namedRule: zod_1.z.string().min(1) }).strict();
|
|
7
|
+
const namedRuleSetRefSchema = zod_1.z
|
|
8
|
+
.object({
|
|
9
|
+
namedRuleSet: zod_1.z.string().min(1),
|
|
10
|
+
})
|
|
11
|
+
.strict();
|
|
12
|
+
const serializedRuleSchema = zod_1.z
|
|
13
|
+
.object({
|
|
14
|
+
id: zod_1.z.string().min(1),
|
|
15
|
+
config: zod_1.z.object({}).passthrough(),
|
|
16
|
+
})
|
|
17
|
+
.strict();
|
|
18
|
+
const phaseRuleSchema = zod_1.z.union([
|
|
19
|
+
serializedRuleSchema,
|
|
20
|
+
namedRuleRefSchema,
|
|
21
|
+
namedRuleSetRefSchema,
|
|
22
|
+
]);
|
|
23
|
+
const namedPhaseSchema = zod_1.z.enum(RulePlan_js_1.NAMED_PHASES);
|
|
24
|
+
const phasePlanSchema = zod_1.z.array(zod_1.z
|
|
25
|
+
.object({
|
|
26
|
+
phase: namedPhaseSchema,
|
|
27
|
+
rules: zod_1.z.array(phaseRuleSchema),
|
|
28
|
+
})
|
|
29
|
+
.strict());
|
|
30
|
+
const renderSchema = zod_1.z
|
|
31
|
+
.object({
|
|
32
|
+
renderer: zod_1.z.string().min(1).optional(),
|
|
33
|
+
options: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
|
|
34
|
+
})
|
|
35
|
+
.strict();
|
|
36
|
+
const pluginRefSchema = zod_1.z
|
|
37
|
+
.object({
|
|
38
|
+
plugin: zod_1.z.string().min(1),
|
|
39
|
+
options: zod_1.z.unknown().optional(),
|
|
40
|
+
})
|
|
41
|
+
.strict();
|
|
42
|
+
const serializedRuntimeProfileSchema = zod_1.z
|
|
43
|
+
.object({
|
|
44
|
+
supports: zod_1.z.string().min(1).optional(),
|
|
45
|
+
render: renderSchema.optional(),
|
|
46
|
+
phases: phasePlanSchema.optional(),
|
|
47
|
+
plugins: zod_1.z.array(pluginRefSchema).optional(),
|
|
48
|
+
usesProfiles: zod_1.z.array(zod_1.z.string().min(1)).optional(),
|
|
49
|
+
})
|
|
50
|
+
.strict();
|
|
51
|
+
const serializedRuleSetSchema = zod_1.z
|
|
52
|
+
.object({
|
|
53
|
+
name: zod_1.z.string().optional(),
|
|
54
|
+
rules: zod_1.z.array(phaseRuleSchema).optional(),
|
|
55
|
+
})
|
|
56
|
+
.strict();
|
|
57
|
+
const serializedRuntimeConfigSchema = zod_1.z
|
|
58
|
+
.object({
|
|
59
|
+
providers: zod_1.z.array(zod_1.z.string().min(1)).optional(),
|
|
60
|
+
namedRules: zod_1.z.record(zod_1.z.string(), serializedRuleSchema).optional(),
|
|
61
|
+
namedRuleSets: zod_1.z.record(zod_1.z.string(), serializedRuleSetSchema).optional(),
|
|
62
|
+
profiles: zod_1.z.record(zod_1.z.string(), serializedRuntimeProfileSchema).optional(),
|
|
63
|
+
run: zod_1.z
|
|
64
|
+
.object({
|
|
65
|
+
profile: zod_1.z.string().min(1),
|
|
66
|
+
render: renderSchema.optional(),
|
|
67
|
+
})
|
|
68
|
+
.strict()
|
|
69
|
+
.optional(),
|
|
70
|
+
})
|
|
71
|
+
.strict();
|
|
72
|
+
class ZodRuntimeConfigValidator {
|
|
73
|
+
validate(input) {
|
|
74
|
+
return serializedRuntimeConfigSchema.parse(input);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.ZodRuntimeConfigValidator = ZodRuntimeConfigValidator;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const RemoveNode_js_1 = require("../../Graph/Rules/Node/RemoveNode.js");
|
|
4
|
+
const ZodRuntimeConfigValidator_js_1 = require("./ZodRuntimeConfigValidator.js");
|
|
5
|
+
describe('ZodRuntimeConfigValidator.validate', () => {
|
|
6
|
+
it('shoud validate and return serialized runtime config', () => {
|
|
7
|
+
const validator = new ZodRuntimeConfigValidator_js_1.ZodRuntimeConfigValidator();
|
|
8
|
+
const result = validator.validate({
|
|
9
|
+
providers: ['@acme/terra-provider'],
|
|
10
|
+
namedRules: {
|
|
11
|
+
removeAlways: {
|
|
12
|
+
id: RemoveNode_js_1.RemoveNode.name,
|
|
13
|
+
config: { node: { any: true } },
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
profiles: {
|
|
17
|
+
profile: {
|
|
18
|
+
phases: [{ phase: 'main', rules: [{ namedRule: 'removeAlways' }] }],
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
expect(result.profiles?.profile.phases).toHaveLength(1);
|
|
23
|
+
expect(result.providers).toEqual(['@acme/terra-provider']);
|
|
24
|
+
});
|
|
25
|
+
it('shoud throw when serialized runtime config is invalid', () => {
|
|
26
|
+
const validator = new ZodRuntimeConfigValidator_js_1.ZodRuntimeConfigValidator();
|
|
27
|
+
expect(() => validator.validate({
|
|
28
|
+
profiles: {
|
|
29
|
+
profile: {
|
|
30
|
+
phases: [{ phase: 'invalid_phase', rules: [] }],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
})).toThrow();
|
|
34
|
+
});
|
|
35
|
+
it('shoud allow unknown profile references in usesProfiles', () => {
|
|
36
|
+
const validator = new ZodRuntimeConfigValidator_js_1.ZodRuntimeConfigValidator();
|
|
37
|
+
const result = validator.validate({
|
|
38
|
+
profiles: {
|
|
39
|
+
child: {
|
|
40
|
+
usesProfiles: ['missing'],
|
|
41
|
+
phases: [],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
expect(result.profiles?.child.usesProfiles).toEqual(['missing']);
|
|
46
|
+
});
|
|
47
|
+
it('shoud accept profiles that reference known parents', () => {
|
|
48
|
+
const validator = new ZodRuntimeConfigValidator_js_1.ZodRuntimeConfigValidator();
|
|
49
|
+
const result = validator.validate({
|
|
50
|
+
profiles: {
|
|
51
|
+
base: {
|
|
52
|
+
phases: [],
|
|
53
|
+
},
|
|
54
|
+
child: {
|
|
55
|
+
usesProfiles: ['base'],
|
|
56
|
+
phases: [],
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
expect(result.profiles?.child.usesProfiles).toEqual(['base']);
|
|
61
|
+
});
|
|
62
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ZodRuntimeConfigValidator.js';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ZodRuntimeConfigValidator.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
describe('RuntimeConfigValidator.validate', () => {
|
|
4
|
+
it('shoud allow implementations to return serialized runtime config', () => {
|
|
5
|
+
class PassthroughValidator {
|
|
6
|
+
validate(input) {
|
|
7
|
+
return input;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
const validator = new PassthroughValidator();
|
|
11
|
+
const input = {
|
|
12
|
+
profiles: {
|
|
13
|
+
profile: {
|
|
14
|
+
phases: [],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
expect(validator.validate(input)).toEqual(input);
|
|
19
|
+
});
|
|
20
|
+
it('shoud allow implementations to throw validation errors', () => {
|
|
21
|
+
class ThrowingValidator {
|
|
22
|
+
validate(_input) {
|
|
23
|
+
throw new Error('invalid-runtime-config');
|
|
24
|
+
// Unreachable return keeps the method aligned with the contract type.
|
|
25
|
+
// biome-ignore lint/correctness/noUnreachable: <explanation>
|
|
26
|
+
return {
|
|
27
|
+
profiles: {},
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
const validator = new ThrowingValidator();
|
|
32
|
+
expect(() => validator.validate({
|
|
33
|
+
profiles: {
|
|
34
|
+
profile: {
|
|
35
|
+
phases: [],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
})).toThrow('invalid-runtime-config');
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SupportedAdapterOperationsRegistry } from '../Graph/Serialization/Registry.js';
|
|
2
|
+
import { RuntimeCatalogProvider } from './RuntimeCatalog.js';
|
|
3
|
+
export type RuntimeProvider = RuntimeCatalogProvider & {
|
|
4
|
+
supportedAdapterOperationsRegistry?: SupportedAdapterOperationsRegistry;
|
|
5
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
describe('RuntimeProvider', () => {
|
|
4
|
+
it('shoud allow catalog and adapter contributions in one object', () => {
|
|
5
|
+
const provider = {
|
|
6
|
+
supportedAdapterOperationsRegistry: {},
|
|
7
|
+
};
|
|
8
|
+
expect(provider).toEqual({
|
|
9
|
+
supportedAdapterOperationsRegistry: {},
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RuntimeProvider } from '../RuntimeProvider.js';
|
|
2
|
+
import { RuntimeProviderLoadInput, RuntimeProviderLoader } from '../RuntimeProviderLoader.js';
|
|
3
|
+
type RuntimeProviderModuleShape = RuntimeProvider | (() => RuntimeProvider | Promise<RuntimeProvider>) | {
|
|
4
|
+
runtimeProvider?: RuntimeProvider | (() => RuntimeProvider | Promise<RuntimeProvider>);
|
|
5
|
+
default?: RuntimeProvider | (() => RuntimeProvider | Promise<RuntimeProvider>);
|
|
6
|
+
};
|
|
7
|
+
export declare const __test__: {
|
|
8
|
+
toProvider: (value: RuntimeProviderModuleShape) => Promise<RuntimeProvider>;
|
|
9
|
+
resolveImportSpecifier: (specifier: string, sourceReference?: string) => string;
|
|
10
|
+
};
|
|
11
|
+
export declare class ModuleRuntimeProviderLoader implements RuntimeProviderLoader {
|
|
12
|
+
load(input: RuntimeProviderLoadInput): Promise<RuntimeProvider>;
|
|
13
|
+
}
|
|
14
|
+
export {};
|