@intentius/chant 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/attrref.d.ts +35 -0
- package/dist/attrref.d.ts.map +1 -0
- package/dist/audit/catalog.d.ts +65 -0
- package/dist/audit/catalog.d.ts.map +1 -0
- package/dist/audit/core.d.ts +76 -0
- package/dist/audit/core.d.ts.map +1 -0
- package/dist/audit/discover.d.ts +76 -0
- package/dist/audit/discover.d.ts.map +1 -0
- package/dist/audit/fetch.d.ts +90 -0
- package/dist/audit/fetch.d.ts.map +1 -0
- package/dist/audit/proof.d.ts +53 -0
- package/dist/audit/proof.d.ts.map +1 -0
- package/dist/audit/report-html.d.ts +32 -0
- package/dist/audit/report-html.d.ts.map +1 -0
- package/dist/audit/report-model.d.ts +119 -0
- package/dist/audit/report-model.d.ts.map +1 -0
- package/dist/audit/report.d.ts +31 -0
- package/dist/audit/report.d.ts.map +1 -0
- package/dist/audit/rules-doc.d.ts +11 -0
- package/dist/audit/rules-doc.d.ts.map +1 -0
- package/dist/build.d.ts +120 -0
- package/dist/build.d.ts.map +1 -0
- package/dist/builder.d.ts +56 -0
- package/dist/builder.d.ts.map +1 -0
- package/dist/child-project.d.ts +34 -0
- package/dist/child-project.d.ts.map +1 -0
- package/dist/cli/commands/audit.d.ts +60 -0
- package/dist/cli/commands/audit.d.ts.map +1 -0
- package/dist/cli/commands/build.d.ts +70 -0
- package/dist/cli/commands/build.d.ts.map +1 -0
- package/dist/cli/commands/check-lexicon.d.ts +19 -0
- package/dist/cli/commands/check-lexicon.d.ts.map +1 -0
- package/dist/cli/commands/describe.d.ts +39 -0
- package/dist/cli/commands/describe.d.ts.map +1 -0
- package/dist/cli/commands/diff.d.ts +32 -0
- package/dist/cli/commands/diff.d.ts.map +1 -0
- package/dist/cli/commands/doctor.d.ts +11 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/import.d.ts +68 -0
- package/dist/cli/commands/import.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/codegen.d.ts +9 -0
- package/dist/cli/commands/init-lexicon/templates/codegen.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/docs.d.ts +9 -0
- package/dist/cli/commands/init-lexicon/templates/docs.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/examples.d.ts +8 -0
- package/dist/cli/commands/init-lexicon/templates/examples.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/lint.d.ts +8 -0
- package/dist/cli/commands/init-lexicon/templates/lint.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/lsp.d.ts +6 -0
- package/dist/cli/commands/init-lexicon/templates/lsp.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/plugin.d.ts +12 -0
- package/dist/cli/commands/init-lexicon/templates/plugin.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/project.d.ts +19 -0
- package/dist/cli/commands/init-lexicon/templates/project.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/spec.d.ts +6 -0
- package/dist/cli/commands/init-lexicon/templates/spec.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/tests.d.ts +12 -0
- package/dist/cli/commands/init-lexicon/templates/tests.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon.d.ts +37 -0
- package/dist/cli/commands/init-lexicon.d.ts.map +1 -0
- package/dist/cli/commands/init.d.ts +48 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/licenses.d.ts +23 -0
- package/dist/cli/commands/licenses.d.ts.map +1 -0
- package/dist/cli/commands/lint.d.ts +52 -0
- package/dist/cli/commands/lint.d.ts.map +1 -0
- package/dist/cli/commands/list.d.ts +38 -0
- package/dist/cli/commands/list.d.ts.map +1 -0
- package/dist/cli/commands/migrate.d.ts +51 -0
- package/dist/cli/commands/migrate.d.ts.map +1 -0
- package/dist/cli/commands/onboard.d.ts +19 -0
- package/dist/cli/commands/onboard.d.ts.map +1 -0
- package/dist/cli/commands/update.d.ts +29 -0
- package/dist/cli/commands/update.d.ts.map +1 -0
- package/dist/cli/commands/vendor.d.ts +84 -0
- package/dist/cli/commands/vendor.d.ts.map +1 -0
- package/dist/cli/conflict-check.d.ts +18 -0
- package/dist/cli/conflict-check.d.ts.map +1 -0
- package/dist/cli/debug.d.ts +5 -0
- package/dist/cli/debug.d.ts.map +1 -0
- package/dist/cli/format.d.ts +36 -0
- package/dist/cli/format.d.ts.map +1 -0
- package/dist/cli/handlers/build.d.ts +3 -0
- package/dist/cli/handlers/build.d.ts.map +1 -0
- package/dist/cli/handlers/dev.d.ts +7 -0
- package/dist/cli/handlers/dev.d.ts.map +1 -0
- package/dist/cli/handlers/graph.d.ts +8 -0
- package/dist/cli/handlers/graph.d.ts.map +1 -0
- package/dist/cli/handlers/init.d.ts +4 -0
- package/dist/cli/handlers/init.d.ts.map +1 -0
- package/dist/cli/handlers/lifecycle.d.ts +39 -0
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -0
- package/dist/cli/handlers/lint.d.ts +3 -0
- package/dist/cli/handlers/lint.d.ts.map +1 -0
- package/dist/cli/handlers/migrate.d.ts +3 -0
- package/dist/cli/handlers/migrate.d.ts.map +1 -0
- package/dist/cli/handlers/misc.d.ts +8 -0
- package/dist/cli/handlers/misc.d.ts.map +1 -0
- package/dist/cli/handlers/run-client.d.ts +107 -0
- package/dist/cli/handlers/run-client.d.ts.map +1 -0
- package/dist/cli/handlers/run-report.d.ts +5 -0
- package/dist/cli/handlers/run-report.d.ts.map +1 -0
- package/dist/cli/handlers/run.d.ts +27 -0
- package/dist/cli/handlers/run.d.ts.map +1 -0
- package/dist/cli/handlers/serve.d.ts +5 -0
- package/dist/cli/handlers/serve.d.ts.map +1 -0
- package/dist/cli/handlers/vendor.d.ts +9 -0
- package/dist/cli/handlers/vendor.d.ts.map +1 -0
- package/dist/cli/index.d.ts +4 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/lsp/capabilities.d.ts +21 -0
- package/dist/cli/lsp/capabilities.d.ts.map +1 -0
- package/dist/cli/lsp/diagnostics.d.ts +30 -0
- package/dist/cli/lsp/diagnostics.d.ts.map +1 -0
- package/dist/cli/lsp/server.d.ts +106 -0
- package/dist/cli/lsp/server.d.ts.map +1 -0
- package/dist/cli/main.d.ts +7 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/mcp/lifecycle-tools.d.ts +15 -0
- package/dist/cli/mcp/lifecycle-tools.d.ts.map +1 -0
- package/dist/cli/mcp/op-tools.d.ts +7 -0
- package/dist/cli/mcp/op-tools.d.ts.map +1 -0
- package/dist/cli/mcp/resource-handlers.d.ts +28 -0
- package/dist/cli/mcp/resource-handlers.d.ts.map +1 -0
- package/dist/cli/mcp/resources/context.d.ts +6 -0
- package/dist/cli/mcp/resources/context.d.ts.map +1 -0
- package/dist/cli/mcp/server.d.ts +44 -0
- package/dist/cli/mcp/server.d.ts.map +1 -0
- package/dist/cli/mcp/tools/build.d.ts +31 -0
- package/dist/cli/mcp/tools/build.d.ts.map +1 -0
- package/dist/cli/mcp/tools/explain.d.ts +27 -0
- package/dist/cli/mcp/tools/explain.d.ts.map +1 -0
- package/dist/cli/mcp/tools/import.d.ts +26 -0
- package/dist/cli/mcp/tools/import.d.ts.map +1 -0
- package/dist/cli/mcp/tools/lint.d.ts +26 -0
- package/dist/cli/mcp/tools/lint.d.ts.map +1 -0
- package/dist/cli/mcp/tools/scaffold.d.ts +31 -0
- package/dist/cli/mcp/tools/scaffold.d.ts.map +1 -0
- package/dist/cli/mcp/tools/search.d.ts +31 -0
- package/dist/cli/mcp/tools/search.d.ts.map +1 -0
- package/dist/cli/mcp/types.d.ts +42 -0
- package/dist/cli/mcp/types.d.ts.map +1 -0
- package/dist/cli/plugins.d.ts +21 -0
- package/dist/cli/plugins.d.ts.map +1 -0
- package/dist/cli/registry.d.ts +100 -0
- package/dist/cli/registry.d.ts.map +1 -0
- package/dist/cli/reporters/stylish.d.ts +26 -0
- package/dist/cli/reporters/stylish.d.ts.map +1 -0
- package/dist/cli/watch.d.ts +29 -0
- package/dist/cli/watch.d.ts.map +1 -0
- package/dist/codegen/bound-property-types.d.ts +38 -0
- package/dist/codegen/bound-property-types.d.ts.map +1 -0
- package/dist/codegen/coverage.d.ts +57 -0
- package/dist/codegen/coverage.d.ts.map +1 -0
- package/dist/codegen/docs-file-markers.d.ts +16 -0
- package/dist/codegen/docs-file-markers.d.ts.map +1 -0
- package/dist/codegen/docs-rule-scanning.d.ts +14 -0
- package/dist/codegen/docs-rule-scanning.d.ts.map +1 -0
- package/dist/codegen/docs-rules.d.ts +17 -0
- package/dist/codegen/docs-rules.d.ts.map +1 -0
- package/dist/codegen/docs-sections.d.ts +11 -0
- package/dist/codegen/docs-sections.d.ts.map +1 -0
- package/dist/codegen/docs-sidebar.d.ts +6 -0
- package/dist/codegen/docs-sidebar.d.ts.map +1 -0
- package/dist/codegen/docs-types.d.ts +84 -0
- package/dist/codegen/docs-types.d.ts.map +1 -0
- package/dist/codegen/docs.d.ts +28 -0
- package/dist/codegen/docs.d.ts.map +1 -0
- package/dist/codegen/fetch.d.ts +76 -0
- package/dist/codegen/fetch.d.ts.map +1 -0
- package/dist/codegen/generate-post-synth-barrel.d.ts +32 -0
- package/dist/codegen/generate-post-synth-barrel.d.ts.map +1 -0
- package/dist/codegen/generate-registry.d.ts +40 -0
- package/dist/codegen/generate-registry.d.ts.map +1 -0
- package/dist/codegen/generate-runtime-index.d.ts +40 -0
- package/dist/codegen/generate-runtime-index.d.ts.map +1 -0
- package/dist/codegen/generate-typescript.d.ts +48 -0
- package/dist/codegen/generate-typescript.d.ts.map +1 -0
- package/dist/codegen/generate.d.ts +92 -0
- package/dist/codegen/generate.d.ts.map +1 -0
- package/dist/codegen/json-patch.d.ts +12 -0
- package/dist/codegen/json-patch.d.ts.map +1 -0
- package/dist/codegen/json-schema.d.ts +82 -0
- package/dist/codegen/json-schema.d.ts.map +1 -0
- package/dist/codegen/naming.d.ts +64 -0
- package/dist/codegen/naming.d.ts.map +1 -0
- package/dist/codegen/package.d.ts +64 -0
- package/dist/codegen/package.d.ts.map +1 -0
- package/dist/codegen/topo-sort.d.ts +13 -0
- package/dist/codegen/topo-sort.d.ts.map +1 -0
- package/dist/codegen/typecheck.d.ts +10 -0
- package/dist/codegen/typecheck.d.ts.map +1 -0
- package/dist/codegen/validate.d.ts +45 -0
- package/dist/codegen/validate.d.ts.map +1 -0
- package/dist/composite.d.ts +116 -0
- package/dist/composite.d.ts.map +1 -0
- package/dist/config.d.ts +78 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/declarable.d.ts +34 -0
- package/dist/declarable.d.ts.map +1 -0
- package/dist/detectLexicon.d.ts +10 -0
- package/dist/detectLexicon.d.ts.map +1 -0
- package/dist/discovery/cache.d.ts +36 -0
- package/dist/discovery/cache.d.ts.map +1 -0
- package/dist/discovery/collect.d.ts +17 -0
- package/dist/discovery/collect.d.ts.map +1 -0
- package/dist/discovery/cycles.d.ts +23 -0
- package/dist/discovery/cycles.d.ts.map +1 -0
- package/dist/discovery/files.d.ts +7 -0
- package/dist/discovery/files.d.ts.map +1 -0
- package/dist/discovery/graph.d.ts +8 -0
- package/dist/discovery/graph.d.ts.map +1 -0
- package/dist/discovery/import.d.ts +9 -0
- package/dist/discovery/import.d.ts.map +1 -0
- package/dist/discovery/index.d.ts +25 -0
- package/dist/discovery/index.d.ts.map +1 -0
- package/dist/discovery/resolve.d.ts +10 -0
- package/dist/discovery/resolve.d.ts.map +1 -0
- package/dist/errors.d.ts +49 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/import/base-parser.d.ts +19 -0
- package/dist/import/base-parser.d.ts.map +1 -0
- package/dist/import/generator.d.ts +20 -0
- package/dist/import/generator.d.ts.map +1 -0
- package/dist/import/ir-utils.d.ts +25 -0
- package/dist/import/ir-utils.d.ts.map +1 -0
- package/dist/import/parser.d.ts +39 -0
- package/dist/import/parser.d.ts.map +1 -0
- package/dist/index.d.ts +66 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/intrinsic-interpolation.d.ts +24 -0
- package/dist/intrinsic-interpolation.d.ts.map +1 -0
- package/dist/intrinsic.d.ts +24 -0
- package/dist/intrinsic.d.ts.map +1 -0
- package/dist/lexicon-integrity.d.ts +25 -0
- package/dist/lexicon-integrity.d.ts.map +1 -0
- package/dist/lexicon-manifest.d.ts +9 -0
- package/dist/lexicon-manifest.d.ts.map +1 -0
- package/dist/lexicon-output.d.ts +66 -0
- package/dist/lexicon-output.d.ts.map +1 -0
- package/dist/lexicon-plugin-helpers.d.ts +59 -0
- package/dist/lexicon-plugin-helpers.d.ts.map +1 -0
- package/dist/lexicon-schema.d.ts +82 -0
- package/dist/lexicon-schema.d.ts.map +1 -0
- package/dist/lexicon.d.ts +383 -0
- package/dist/lexicon.d.ts.map +1 -0
- package/dist/lifecycle/affected.d.ts +57 -0
- package/dist/lifecycle/affected.d.ts.map +1 -0
- package/dist/lifecycle/change-set.d.ts +90 -0
- package/dist/lifecycle/change-set.d.ts.map +1 -0
- package/dist/lifecycle/digest.d.ts +21 -0
- package/dist/lifecycle/digest.d.ts.map +1 -0
- package/dist/lifecycle/git.d.ts +72 -0
- package/dist/lifecycle/git.d.ts.map +1 -0
- package/dist/lifecycle/index.d.ts +8 -0
- package/dist/lifecycle/index.d.ts.map +1 -0
- package/dist/lifecycle/live-diff.d.ts +67 -0
- package/dist/lifecycle/live-diff.d.ts.map +1 -0
- package/dist/lifecycle/snapshot.d.ts +20 -0
- package/dist/lifecycle/snapshot.d.ts.map +1 -0
- package/dist/lifecycle/types.d.ts +61 -0
- package/dist/lifecycle/types.d.ts.map +1 -0
- package/dist/lint/config.d.ts +100 -0
- package/dist/lint/config.d.ts.map +1 -0
- package/dist/lint/declarative.d.ts +56 -0
- package/dist/lint/declarative.d.ts.map +1 -0
- package/dist/lint/discover.d.ts +35 -0
- package/dist/lint/discover.d.ts.map +1 -0
- package/dist/lint/engine.d.ts +21 -0
- package/dist/lint/engine.d.ts.map +1 -0
- package/dist/lint/named-checks.d.ts +19 -0
- package/dist/lint/named-checks.d.ts.map +1 -0
- package/dist/lint/parser.d.ts +9 -0
- package/dist/lint/parser.d.ts.map +1 -0
- package/dist/lint/policy.d.ts +22 -0
- package/dist/lint/policy.d.ts.map +1 -0
- package/dist/lint/post-synth.d.ts +69 -0
- package/dist/lint/post-synth.d.ts.map +1 -0
- package/dist/lint/presets/strict.json +19 -0
- package/dist/lint/rule-loader.d.ts +16 -0
- package/dist/lint/rule-loader.d.ts.map +1 -0
- package/dist/lint/rule-registry.d.ts +37 -0
- package/dist/lint/rule-registry.d.ts.map +1 -0
- package/dist/lint/rule.d.ts +82 -0
- package/dist/lint/rule.d.ts.map +1 -0
- package/dist/lint/rules/composite-scope.d.ts +18 -0
- package/dist/lint/rules/composite-scope.d.ts.map +1 -0
- package/dist/lint/rules/cor017-composite-name-match.d.ts +3 -0
- package/dist/lint/rules/cor017-composite-name-match.d.ts.map +1 -0
- package/dist/lint/rules/cor018-composite-prefer-lexicon-type.d.ts +3 -0
- package/dist/lint/rules/cor018-composite-prefer-lexicon-type.d.ts.map +1 -0
- package/dist/lint/rules/declarable-naming-convention.d.ts +3 -0
- package/dist/lint/rules/declarable-naming-convention.d.ts.map +1 -0
- package/dist/lint/rules/evl001-non-literal-expression.d.ts +3 -0
- package/dist/lint/rules/evl001-non-literal-expression.d.ts.map +1 -0
- package/dist/lint/rules/evl002-control-flow-resource.d.ts +3 -0
- package/dist/lint/rules/evl002-control-flow-resource.d.ts.map +1 -0
- package/dist/lint/rules/evl003-dynamic-property-access.d.ts +3 -0
- package/dist/lint/rules/evl003-dynamic-property-access.d.ts.map +1 -0
- package/dist/lint/rules/evl004-spread-non-const.d.ts +3 -0
- package/dist/lint/rules/evl004-spread-non-const.d.ts.map +1 -0
- package/dist/lint/rules/evl005-resource-block-body.d.ts +3 -0
- package/dist/lint/rules/evl005-resource-block-body.d.ts.map +1 -0
- package/dist/lint/rules/evl007-invalid-siblings.d.ts +3 -0
- package/dist/lint/rules/evl007-invalid-siblings.d.ts.map +1 -0
- package/dist/lint/rules/evl009-composite-no-constant.d.ts +3 -0
- package/dist/lint/rules/evl009-composite-no-constant.d.ts.map +1 -0
- package/dist/lint/rules/evl010-composite-no-transform.d.ts +3 -0
- package/dist/lint/rules/evl010-composite-no-transform.d.ts.map +1 -0
- package/dist/lint/rules/export-required.d.ts +3 -0
- package/dist/lint/rules/export-required.d.ts.map +1 -0
- package/dist/lint/rules/file-declarable-limit.d.ts +3 -0
- package/dist/lint/rules/file-declarable-limit.d.ts.map +1 -0
- package/dist/lint/rules/flat-declarations.d.ts +3 -0
- package/dist/lint/rules/flat-declarations.d.ts.map +1 -0
- package/dist/lint/rules/index.d.ts +31 -0
- package/dist/lint/rules/index.d.ts.map +1 -0
- package/dist/lint/rules/no-cyclic-declarable-ref.d.ts +3 -0
- package/dist/lint/rules/no-cyclic-declarable-ref.d.ts.map +1 -0
- package/dist/lint/rules/no-redundant-type-import.d.ts +10 -0
- package/dist/lint/rules/no-redundant-type-import.d.ts.map +1 -0
- package/dist/lint/rules/no-redundant-value-cast.d.ts +3 -0
- package/dist/lint/rules/no-redundant-value-cast.d.ts.map +1 -0
- package/dist/lint/rules/no-string-ref.d.ts +3 -0
- package/dist/lint/rules/no-string-ref.d.ts.map +1 -0
- package/dist/lint/rules/no-unused-declarable-import.d.ts +3 -0
- package/dist/lint/rules/no-unused-declarable-import.d.ts.map +1 -0
- package/dist/lint/rules/no-unused-declarable.d.ts +3 -0
- package/dist/lint/rules/no-unused-declarable.d.ts.map +1 -0
- package/dist/lint/rules/single-concern-file.d.ts +3 -0
- package/dist/lint/rules/single-concern-file.d.ts.map +1 -0
- package/dist/lint/selectors.d.ts +21 -0
- package/dist/lint/selectors.d.ts.map +1 -0
- package/dist/lsp/lexicon-providers.d.ts +61 -0
- package/dist/lsp/lexicon-providers.d.ts.map +1 -0
- package/dist/lsp/types.d.ts +64 -0
- package/dist/lsp/types.d.ts.map +1 -0
- package/dist/mcp/types.d.ts +21 -0
- package/dist/mcp/types.d.ts.map +1 -0
- package/dist/op/activity-registry.d.ts +57 -0
- package/dist/op/activity-registry.d.ts.map +1 -0
- package/dist/op/builders.d.ts +69 -0
- package/dist/op/builders.d.ts.map +1 -0
- package/dist/op/discover.d.ts +16 -0
- package/dist/op/discover.d.ts.map +1 -0
- package/dist/op/index.d.ts +11 -0
- package/dist/op/index.d.ts.map +1 -0
- package/dist/op/local-executor.d.ts +54 -0
- package/dist/op/local-executor.d.ts.map +1 -0
- package/dist/op/local-output.d.ts +16 -0
- package/dist/op/local-output.d.ts.map +1 -0
- package/dist/op/resource.d.ts +7 -0
- package/dist/op/resource.d.ts.map +1 -0
- package/dist/op/types.d.ts +71 -0
- package/dist/op/types.d.ts.map +1 -0
- package/dist/ownership.d.ts +75 -0
- package/dist/ownership.d.ts.map +1 -0
- package/dist/project-validation.d.ts +28 -0
- package/dist/project-validation.d.ts.map +1 -0
- package/dist/provenance.d.ts +26 -0
- package/dist/provenance.d.ts.map +1 -0
- package/dist/pseudo-parameter.d.ts +32 -0
- package/dist/pseudo-parameter.d.ts.map +1 -0
- package/dist/resource-attributes.d.ts +17 -0
- package/dist/resource-attributes.d.ts.map +1 -0
- package/dist/runtime-adapter.d.ts +41 -0
- package/dist/runtime-adapter.d.ts.map +1 -0
- package/dist/runtime.d.ts +23 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/serializer-walker.d.ts +21 -0
- package/dist/serializer-walker.d.ts.map +1 -0
- package/dist/serializer.d.ts +64 -0
- package/dist/serializer.d.ts.map +1 -0
- package/dist/sort.d.ts +8 -0
- package/dist/sort.d.ts.map +1 -0
- package/dist/stack-output.d.ts +52 -0
- package/dist/stack-output.d.ts.map +1 -0
- package/dist/toml-emit.d.ts +22 -0
- package/dist/toml-emit.d.ts.map +1 -0
- package/dist/toml-parse.d.ts +14 -0
- package/dist/toml-parse.d.ts.map +1 -0
- package/dist/toml-utils.d.ts +20 -0
- package/dist/toml-utils.d.ts.map +1 -0
- package/dist/toml.d.ts +9 -0
- package/dist/toml.d.ts.map +1 -0
- package/dist/types.d.ts +47 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils.d.ts +30 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/validation.d.ts +42 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/yaml.d.ts +42 -0
- package/dist/yaml.d.ts.map +1 -0
- package/package.json +31 -6
- package/src/audit/bundle-decoupling.test.ts +56 -0
- package/src/audit/catalog.test.ts +17 -2
- package/src/audit/catalog.ts +357 -4
- package/src/audit/core.test.ts +15 -0
- package/src/audit/core.ts +0 -0
- package/src/audit/detect-bundle.test.ts +35 -0
- package/src/audit/discover.test.ts +72 -0
- package/src/audit/discover.ts +329 -0
- package/src/audit/edge-init-safety.test.ts +43 -0
- package/src/audit/fetch.test.ts +86 -55
- package/src/audit/fetch.ts +118 -87
- package/src/audit/remote-discovery.test.ts +80 -0
- package/src/audit/report-html.ts +14 -6
- package/src/audit/report-model.ts +13 -1
- package/src/audit/report.test.ts +3 -1
- package/src/audit/report.ts +13 -5
- package/src/audit/rules-doc.ts +4 -0
- package/src/cli/commands/__fixtures__/audit-aws/stack.yaml +11 -0
- package/src/cli/commands/__fixtures__/audit-aws/template.json +7 -0
- package/src/cli/commands/__fixtures__/audit-azure/azuredeploy.json +13 -0
- package/src/cli/commands/__fixtures__/audit-gcp/bucket.yaml +6 -0
- package/src/cli/commands/__fixtures__/audit-gcp/firewall.yaml +9 -0
- package/src/cli/commands/__fixtures__/audit-helm/mychart/Chart.yaml +3 -0
- package/src/cli/commands/__fixtures__/audit-helm/mychart/templates/deployment.yaml +12 -0
- package/src/cli/commands/__fixtures__/audit-helm/mychart/values.yaml +1 -0
- package/src/cli/commands/__fixtures__/audit-mixed/.github/workflows/ci.yml +5 -0
- package/src/cli/commands/__fixtures__/audit-mixed/Dockerfile +2 -0
- package/src/cli/commands/__fixtures__/audit-mixed/cfn/template.json +1 -0
- package/src/cli/commands/__fixtures__/audit-mixed/k8s/deploy.yaml +12 -0
- package/src/cli/commands/audit.test.ts +80 -14
- package/src/cli/commands/audit.ts +28 -126
- package/src/codegen/bound-property-types.test.ts +57 -0
- package/src/codegen/bound-property-types.ts +110 -0
- package/src/codegen/generate-post-synth-barrel.test.ts +37 -0
- package/src/codegen/generate-post-synth-barrel.ts +75 -0
- package/src/codegen/post-synth-barrel-guards.test.ts +63 -0
- package/src/codegen/validate.ts +13 -1
- package/src/lint/discover.ts +1 -1
- package/src/meta/peer-deps.test.ts +29 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topo-sort.d.ts","sourceRoot":"","sources":["../../src/codegen/topo-sort.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EACxB,KAAK,EAAE,CAAC,EAAE,EACV,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,EAC1B,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,EAAE,GAC9B,CAAC,EAAE,CA6BL"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface TypeCheckResult {
|
|
2
|
+
ok: boolean;
|
|
3
|
+
diagnostics: string[];
|
|
4
|
+
fileCount: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Type-check a .d.ts content string by writing to a temp file and running tsc.
|
|
8
|
+
*/
|
|
9
|
+
export declare function typecheckDTS(content: string): Promise<TypeCheckResult>;
|
|
10
|
+
//# sourceMappingURL=typecheck.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typecheck.d.ts","sourceRoot":"","sources":["../../src/codegen/typecheck.ts"],"names":[],"mappings":"AAqDA,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,OAAO,CAAC;IACZ,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CA0E5E"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic validation framework for lexicon artifacts.
|
|
3
|
+
*
|
|
4
|
+
* Provides configurable validation checks that any lexicon can use
|
|
5
|
+
* by passing lexicon-specific configuration.
|
|
6
|
+
*/
|
|
7
|
+
import { type CoverageThresholds } from "./coverage.js";
|
|
8
|
+
export interface ValidateCheck {
|
|
9
|
+
name: string;
|
|
10
|
+
ok: boolean;
|
|
11
|
+
error?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ValidateResult {
|
|
14
|
+
success: boolean;
|
|
15
|
+
checks: ValidateCheck[];
|
|
16
|
+
}
|
|
17
|
+
export interface LexiconValidationConfig {
|
|
18
|
+
/** Filename of the lexicon JSON (e.g. "lexicon-mydom.json") */
|
|
19
|
+
lexiconJsonFilename: string;
|
|
20
|
+
/** Required backward-compatible export names to check in lexicon JSON */
|
|
21
|
+
requiredNames: string[];
|
|
22
|
+
/**
|
|
23
|
+
* When true, a required name is satisfied if it appears as a substring of any
|
|
24
|
+
* lexicon JSON key (not only as an exact key). Lexicons that bound their
|
|
25
|
+
* generated type expansion (e.g. azure, #438) emit shared types under
|
|
26
|
+
* resource-prefixed/variant names, so the bare curated name is present only
|
|
27
|
+
* as a substring. Defaults to false (exact-key match).
|
|
28
|
+
*/
|
|
29
|
+
requiredNamesMatchSubstring?: boolean;
|
|
30
|
+
/** Base path of the lexicon package */
|
|
31
|
+
basePath: string;
|
|
32
|
+
/** Path to the generated directory (defaults to basePath/src/generated) */
|
|
33
|
+
generatedDir?: string;
|
|
34
|
+
/** Coverage thresholds (optional) */
|
|
35
|
+
coverageThresholds?: CoverageThresholds;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Validate generated lexicon artifacts using the provided configuration.
|
|
39
|
+
*/
|
|
40
|
+
export declare function validateLexiconArtifacts(config: LexiconValidationConfig): Promise<ValidateResult>;
|
|
41
|
+
/**
|
|
42
|
+
* Print validation results to stderr and throw on failure.
|
|
43
|
+
*/
|
|
44
|
+
export declare function printValidationResult(result: ValidateResult): void;
|
|
45
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/codegen/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAoC,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEvF,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,aAAa,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,uBAAuB;IACtC,+DAA+D;IAC/D,mBAAmB,EAAE,MAAM,CAAC;IAC5B,yEAAyE;IACzE,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB;;;;;;OAMG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC;AAED;;GAEG;AACH,wBAAsB,wBAAwB,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,cAAc,CAAC,CA4GvG;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAWlE"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { type Declarable } from "./declarable.js";
|
|
2
|
+
/**
|
|
3
|
+
* Marker symbol for Composite type identification.
|
|
4
|
+
*/
|
|
5
|
+
export declare const COMPOSITE_MARKER: unique symbol;
|
|
6
|
+
/**
|
|
7
|
+
* A record of named Declarable members produced by a composite factory.
|
|
8
|
+
*/
|
|
9
|
+
export type CompositeMembers = Record<string, Declarable>;
|
|
10
|
+
/**
|
|
11
|
+
* The result of instantiating a composite — contains the marker and expanded members.
|
|
12
|
+
*/
|
|
13
|
+
export interface CompositeInstance<M extends CompositeMembers = CompositeMembers> {
|
|
14
|
+
readonly [COMPOSITE_MARKER]: true;
|
|
15
|
+
readonly members: M;
|
|
16
|
+
readonly _definition: CompositeDefinition<any, M>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A composite definition: a callable that produces a CompositeInstance.
|
|
20
|
+
*/
|
|
21
|
+
export interface CompositeDefinition<P, M extends CompositeMembers = CompositeMembers> {
|
|
22
|
+
(props: P): CompositeInstance<M> & M;
|
|
23
|
+
readonly compositeName: string;
|
|
24
|
+
readonly _id: symbol;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Type guard: is this value a CompositeInstance?
|
|
28
|
+
*/
|
|
29
|
+
export declare function isCompositeInstance(value: unknown): value is CompositeInstance;
|
|
30
|
+
/**
|
|
31
|
+
* Global registry of composite definitions.
|
|
32
|
+
*/
|
|
33
|
+
export declare class CompositeRegistry {
|
|
34
|
+
private static definitions;
|
|
35
|
+
static register(definition: CompositeDefinition<unknown>): void;
|
|
36
|
+
static getAll(): CompositeDefinition<unknown>[];
|
|
37
|
+
static clear(): void;
|
|
38
|
+
static get size(): number;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Creates a composite definition from a factory closure.
|
|
42
|
+
*
|
|
43
|
+
* Usage:
|
|
44
|
+
* ```ts
|
|
45
|
+
* const SecureStorage = Composite<{ name: string }>((props) => {
|
|
46
|
+
* const bucket = new Bucket({ bucketName: props.name });
|
|
47
|
+
* const role = new Role({ policies: [{ resource: bucket.arn }] });
|
|
48
|
+
* return { bucket, role };
|
|
49
|
+
* });
|
|
50
|
+
* export const storage = SecureStorage({ name: "data" });
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export declare function Composite<P, M extends CompositeMembers = CompositeMembers>(factory: (props: P) => M, name?: string): CompositeDefinition<P, M>;
|
|
54
|
+
/**
|
|
55
|
+
* Expands a CompositeInstance into a flat Map of prefixed entity names to Declarables.
|
|
56
|
+
* Handles nested composites recursively.
|
|
57
|
+
*/
|
|
58
|
+
export declare function expandComposite(prefix: string, instance: CompositeInstance): Map<string, Declarable>;
|
|
59
|
+
/**
|
|
60
|
+
* Type helpers for withDefaults.
|
|
61
|
+
*/
|
|
62
|
+
type PartialByDefault<P, D extends Partial<P>> = Omit<P, keyof D> & Partial<Pick<P, keyof D & keyof P>>;
|
|
63
|
+
type Simplify<T> = {
|
|
64
|
+
[K in keyof T]: T[K];
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Wraps a CompositeDefinition with pre-applied default values.
|
|
68
|
+
* Props that have defaults become optional in the returned type.
|
|
69
|
+
*
|
|
70
|
+
* ```ts
|
|
71
|
+
* const SecureApi = withDefaults(LambdaApi, { runtime: "nodejs20.x", timeout: 10 });
|
|
72
|
+
* const api = SecureApi({ name: "myApi", code: "./dist" }); // runtime and timeout are optional
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
export declare function withDefaults<P, M extends CompositeMembers, D extends Partial<P>>(definition: CompositeDefinition<P, M>, defaults: D | ((props: Partial<P>) => D)): CompositeDefinition<Simplify<PartialByDefault<P, D>>, M>;
|
|
76
|
+
/**
|
|
77
|
+
* Symbol key for shared props attached by propagate().
|
|
78
|
+
*/
|
|
79
|
+
export declare const SHARED_PROPS: unique symbol;
|
|
80
|
+
/**
|
|
81
|
+
* Attaches shared properties to a composite instance.
|
|
82
|
+
* During expandComposite(), shared props are merged into every member's props.
|
|
83
|
+
*
|
|
84
|
+
* Merge semantics:
|
|
85
|
+
* - Scalars: member-specific value wins
|
|
86
|
+
* - Arrays (e.g. tags): concatenate shared + member-specific
|
|
87
|
+
* - undefined values in shared props are stripped
|
|
88
|
+
*
|
|
89
|
+
* ```ts
|
|
90
|
+
* export const storage = propagate(
|
|
91
|
+
* SecureStorage({ name: "data" }),
|
|
92
|
+
* { tags: [{ key: "env", value: "prod" }] },
|
|
93
|
+
* );
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
export declare function propagate<M extends CompositeMembers>(instance: CompositeInstance<M> & M, sharedProps: Record<string, unknown>): CompositeInstance<M> & M;
|
|
97
|
+
/**
|
|
98
|
+
* Marker function for resource declarations within composites.
|
|
99
|
+
* At runtime, simply calls `new Type(props)` and returns the result.
|
|
100
|
+
* Exists so lint tooling can validate composite member construction (EVL005).
|
|
101
|
+
*/
|
|
102
|
+
export declare function resource<T extends Declarable, P>(Type: new (props: P, attributes?: Record<string, unknown>) => T, props: P, attributes?: Record<string, unknown>): T;
|
|
103
|
+
/**
|
|
104
|
+
* Shallow-merges override values into a base props object.
|
|
105
|
+
*
|
|
106
|
+
* Merge semantics:
|
|
107
|
+
* - `undefined` values in overrides are skipped
|
|
108
|
+
* - Arrays: concatenated (base + overrides), matching `propagate()` semantics
|
|
109
|
+
* - Scalars / objects: override wins
|
|
110
|
+
*
|
|
111
|
+
* No deep merge — too dangerous with IaC props where nested objects
|
|
112
|
+
* (e.g. policy documents) should be replaced wholesale.
|
|
113
|
+
*/
|
|
114
|
+
export declare function mergeDefaults<T extends Record<string, unknown>>(base: T, overrides?: Partial<T>): T;
|
|
115
|
+
export {};
|
|
116
|
+
//# sourceMappingURL=composite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composite.d.ts","sourceRoot":"","sources":["../src/composite.ts"],"names":[],"mappings":"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"}
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { LintConfig } from "./lint/config.js";
|
|
3
|
+
import type { OwnershipMarker } from "./ownership.js";
|
|
4
|
+
/**
|
|
5
|
+
* Zod schema for ChantConfig validation.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ChantConfigSchema: z.ZodObject<{
|
|
8
|
+
lexicons: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
|
+
sourceDir: z.ZodOptional<z.ZodString>;
|
|
11
|
+
lint: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
12
|
+
ownership: z.ZodOptional<z.ZodObject<{
|
|
13
|
+
stack: z.ZodOptional<z.ZodString>;
|
|
14
|
+
env: z.ZodOptional<z.ZodString>;
|
|
15
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
}, z.core.$loose>;
|
|
18
|
+
/**
|
|
19
|
+
* Top-level chant project configuration.
|
|
20
|
+
*
|
|
21
|
+
* Loaded from `chant.config.ts` (preferred) or `chant.config.json`.
|
|
22
|
+
*/
|
|
23
|
+
export interface ChantConfig {
|
|
24
|
+
/** Lexicon package names to load (e.g. ["aws"]) */
|
|
25
|
+
lexicons?: string[];
|
|
26
|
+
/** Environment names (e.g. ["staging", "prod"]) */
|
|
27
|
+
environments?: string[];
|
|
28
|
+
/**
|
|
29
|
+
* Directory (relative to the project root) that holds the chant infrastructure
|
|
30
|
+
* source. Lifecycle commands (`snapshot`/`diff`/`plan`) build from here instead
|
|
31
|
+
* of the project root, so a mixed-layout project — chant `src/` alongside app
|
|
32
|
+
* code that has import side effects — can scope the build to just the infra.
|
|
33
|
+
* Defaults to "." (the project root). The `--src` flag overrides it.
|
|
34
|
+
*/
|
|
35
|
+
sourceDir?: string;
|
|
36
|
+
/** Lint configuration (rules, extends, overrides, plugins) */
|
|
37
|
+
lint?: LintConfig;
|
|
38
|
+
/**
|
|
39
|
+
* Opt-in cloud-side ownership marking. When `stack` is set (and `enabled`
|
|
40
|
+
* is not false), the serializer stamps a chant ownership marker carrying
|
|
41
|
+
* this stack/env identity onto every supported resource. See {@link
|
|
42
|
+
* resolveOwnershipMarker}.
|
|
43
|
+
*/
|
|
44
|
+
ownership?: {
|
|
45
|
+
/** Stack identity stamped onto resources (required to enable stamping). */
|
|
46
|
+
stack?: string;
|
|
47
|
+
/** Optional environment identity. */
|
|
48
|
+
env?: string;
|
|
49
|
+
/** Set false to disable stamping even when `stack` is present. */
|
|
50
|
+
enabled?: boolean;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Resolved project configuration with metadata about how it was loaded.
|
|
55
|
+
*/
|
|
56
|
+
export interface ResolvedConfig {
|
|
57
|
+
/** The loaded configuration */
|
|
58
|
+
config: ChantConfig;
|
|
59
|
+
/** Path to the config file that was loaded, or undefined if defaults */
|
|
60
|
+
configPath?: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Default configuration when no config file exists.
|
|
64
|
+
*/
|
|
65
|
+
export declare const DEFAULT_CHANT_CONFIG: ChantConfig;
|
|
66
|
+
/**
|
|
67
|
+
* Load project configuration from a directory.
|
|
68
|
+
*
|
|
69
|
+
* Tries `chant.config.ts` first (via dynamic import), then `chant.config.json`.
|
|
70
|
+
* Returns default config if neither exists.
|
|
71
|
+
*/
|
|
72
|
+
export declare function loadChantConfig(dir: string): Promise<ResolvedConfig>;
|
|
73
|
+
/**
|
|
74
|
+
* Resolve the ownership marker to stamp from project config, or undefined when
|
|
75
|
+
* ownership marking is off (no `stack`, or `enabled: false`).
|
|
76
|
+
*/
|
|
77
|
+
export declare function resolveOwnershipMarker(config: ChantConfig): OwnershipMarker | undefined;
|
|
78
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;iBAUd,CAAC;AAEjB;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAEpB,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAExB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,8DAA8D;IAC9D,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB;;;;;OAKG;IACH,SAAS,CAAC,EAAE;QACV,2EAA2E;QAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,qCAAqC;QACrC,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,kEAAkE;QAClE,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,+BAA+B;IAC/B,MAAM,EAAE,WAAW,CAAC;IAEpB,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAAgB,CAAC;AAEpD;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAmB1E;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,WAAW,GAAG,eAAe,GAAG,SAAS,CAIvF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Marker symbol for Declarable type identification
|
|
3
|
+
*/
|
|
4
|
+
export declare const DECLARABLE_MARKER: unique symbol;
|
|
5
|
+
/**
|
|
6
|
+
* Base interface for all declarable entities
|
|
7
|
+
*/
|
|
8
|
+
export interface Declarable {
|
|
9
|
+
readonly lexicon: string;
|
|
10
|
+
readonly entityType: string;
|
|
11
|
+
readonly kind?: "resource" | "property" | "output";
|
|
12
|
+
readonly [DECLARABLE_MARKER]: true;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Core parameter type for lexicon-agnostic parameters
|
|
16
|
+
*/
|
|
17
|
+
export interface CoreParameter extends Declarable {
|
|
18
|
+
readonly parameterType: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Core output type for lexicon-agnostic outputs
|
|
22
|
+
*/
|
|
23
|
+
export interface CoreOutput extends Declarable {
|
|
24
|
+
readonly value: unknown;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Type guard to check if a value is a Declarable
|
|
28
|
+
*/
|
|
29
|
+
export declare function isDeclarable(value: unknown): value is Declarable;
|
|
30
|
+
/**
|
|
31
|
+
* Type guard to check if a Declarable is a property-level type
|
|
32
|
+
*/
|
|
33
|
+
export declare function isPropertyDeclarable(value: Declarable): boolean;
|
|
34
|
+
//# sourceMappingURL=declarable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declarable.d.ts","sourceRoot":"","sources":["../src/declarable.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,iBAAiB,eAAiC,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;IACnD,QAAQ,CAAC,CAAC,iBAAiB,CAAC,EAAE,IAAI,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,UAAU;IAC5C,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAOhE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAE/D"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detects which lexicons are being used by analyzing import statements
|
|
3
|
+
* in the provided infrastructure files. Matches any `@intentius/chant-lexicon-*` package.
|
|
4
|
+
*
|
|
5
|
+
* @param files - Array of file paths to analyze
|
|
6
|
+
* @returns Array of detected lexicon names
|
|
7
|
+
* @throws Error if no lexicon is detected
|
|
8
|
+
*/
|
|
9
|
+
export declare function detectLexicons(files: string[]): Promise<string[]>;
|
|
10
|
+
//# sourceMappingURL=detectLexicon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detectLexicon.d.ts","sourceRoot":"","sources":["../src/detectLexicon.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA4BvE"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discovery cache for incremental rebuilds.
|
|
3
|
+
*
|
|
4
|
+
* Tracks file mtimes and file→entity mappings so that only changed files
|
|
5
|
+
* need to be re-imported during watch-mode rebuilds.
|
|
6
|
+
*/
|
|
7
|
+
export declare class DiscoveryCache {
|
|
8
|
+
private files;
|
|
9
|
+
/**
|
|
10
|
+
* Check if a file has changed since it was last tracked.
|
|
11
|
+
* Returns true if the file is new or its mtime has changed.
|
|
12
|
+
*/
|
|
13
|
+
hasFileChanged(filePath: string): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Record a successful import, storing the file's mtime and entity names.
|
|
16
|
+
*/
|
|
17
|
+
trackFileImport(filePath: string, mtime: number, entityNames: string[]): void;
|
|
18
|
+
/**
|
|
19
|
+
* Invalidate cache entries for the given files.
|
|
20
|
+
* Returns the set of entity names that were invalidated.
|
|
21
|
+
*/
|
|
22
|
+
invalidate(changedFiles: string[]): Set<string>;
|
|
23
|
+
/**
|
|
24
|
+
* Get all tracked file paths.
|
|
25
|
+
*/
|
|
26
|
+
trackedFiles(): string[];
|
|
27
|
+
/**
|
|
28
|
+
* Get entity names for a tracked file.
|
|
29
|
+
*/
|
|
30
|
+
getFileEntities(filePath: string): string[] | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Clear all cached data.
|
|
33
|
+
*/
|
|
34
|
+
clear(): void;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/discovery/cache.ts"],"names":[],"mappings":"AAYA;;;;;GAKG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,KAAK,CAAqC;IAElD;;;OAGG;IACH,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAazC;;OAEG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI;IAI7E;;;OAGG;IACH,UAAU,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC;IAgB/C;;OAEG;IACH,YAAY,IAAI,MAAM,EAAE;IAIxB;;OAEG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;IAIvD;;OAEG;IACH,KAAK,IAAI,IAAI;CAGd"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Declarable } from "../declarable.js";
|
|
2
|
+
/**
|
|
3
|
+
* Collects all declarable entities from imported modules.
|
|
4
|
+
* CompositeInstance exports are expanded into individual entities
|
|
5
|
+
* with `{exportName}_{memberName}` naming.
|
|
6
|
+
* LexiconOutput exports are also collected so that build() can
|
|
7
|
+
* extract them and pass them to the serializer.
|
|
8
|
+
*
|
|
9
|
+
* @param modules - Array of module records with their exports
|
|
10
|
+
* @returns Map of export name to Declarable entity
|
|
11
|
+
* @throws {DiscoveryError} with type "resolution" if duplicate export names are found
|
|
12
|
+
*/
|
|
13
|
+
export declare function collectEntities(modules: Array<{
|
|
14
|
+
file: string;
|
|
15
|
+
exports: Record<string, unknown>;
|
|
16
|
+
}>): Map<string, Declarable>;
|
|
17
|
+
//# sourceMappingURL=collect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collect.d.ts","sourceRoot":"","sources":["../../src/discovery/collect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAM9D;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC,GACjE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAoEzB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cycle detection using DFS with three-color marking (white/gray/black).
|
|
3
|
+
*
|
|
4
|
+
* Accepts either `Map<string, Set<string>>` or `Record<string, string[]>` as input.
|
|
5
|
+
* Returns deduplicated cycles, each represented as an array of node IDs.
|
|
6
|
+
*/
|
|
7
|
+
type GraphInput = Map<string, Set<string>> | Record<string, string[]>;
|
|
8
|
+
/**
|
|
9
|
+
* Detects cycles in a directed graph using DFS with three-color marking.
|
|
10
|
+
*
|
|
11
|
+
* @param graph - Adjacency list: node → neighbors. Accepts Map<string, Set<string>>
|
|
12
|
+
* or Record<string, string[]>.
|
|
13
|
+
* @returns Array of deduplicated cycles. Each cycle is a node ID array
|
|
14
|
+
* (e.g. ["A", "B", "C"]). Self-loops return ["A"].
|
|
15
|
+
*/
|
|
16
|
+
export declare function detectCycles(graph: GraphInput): string[][];
|
|
17
|
+
/**
|
|
18
|
+
* Normalize a cycle for deduplication.
|
|
19
|
+
* Rotate to start with the lexicographically smallest node.
|
|
20
|
+
*/
|
|
21
|
+
export declare function normalizeCycleKey(cycle: string[]): string;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=cycles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cycles.d.ts","sourceRoot":"","sources":["../../src/discovery/cycles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,KAAK,UAAU,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;AActE;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,EAAE,EAAE,CA4D1D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAWzD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recursively find all TypeScript infrastructure files in a directory
|
|
3
|
+
* @param path - The directory path to search
|
|
4
|
+
* @returns Array of file paths to .ts files (excluding test files)
|
|
5
|
+
*/
|
|
6
|
+
export declare function findInfraFiles(path: string): Promise<string[]>;
|
|
7
|
+
//# sourceMappingURL=files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/discovery/files.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAmDpE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Declarable } from "../declarable.js";
|
|
2
|
+
/**
|
|
3
|
+
* Builds a dependency graph from a collection of entities
|
|
4
|
+
* @param entities - Map of export name to Declarable entity
|
|
5
|
+
* @returns Map of entity name to set of entity names it depends on
|
|
6
|
+
*/
|
|
7
|
+
export declare function buildDependencyGraph(entities: Map<string, Declarable>): Map<string, Set<string>>;
|
|
8
|
+
//# sourceMappingURL=graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/discovery/graph.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAIhD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,GAChC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAuB1B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dynamically import a module and return its exports.
|
|
3
|
+
*
|
|
4
|
+
* @param path - The file path to import
|
|
5
|
+
* @returns The module exports
|
|
6
|
+
* @throws {DiscoveryError} with type "import" if the import fails
|
|
7
|
+
*/
|
|
8
|
+
export declare function importModule(path: string): Promise<Record<string, unknown>>;
|
|
9
|
+
//# sourceMappingURL=import.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../src/discovery/import.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAQlC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Declarable } from "../declarable.js";
|
|
2
|
+
import type { DiscoveryError } from "../errors.js";
|
|
3
|
+
/**
|
|
4
|
+
* Result of the discovery process
|
|
5
|
+
*/
|
|
6
|
+
export interface DiscoveryResult {
|
|
7
|
+
/** Map of entity name to Declarable entity */
|
|
8
|
+
entities: Map<string, Declarable>;
|
|
9
|
+
/** Map of entity name to set of entity names it depends on */
|
|
10
|
+
dependencies: Map<string, Set<string>>;
|
|
11
|
+
/** Array of source file paths that were processed */
|
|
12
|
+
sourceFiles: string[];
|
|
13
|
+
/** Array of errors encountered during discovery */
|
|
14
|
+
errors: DiscoveryError[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Discovers all declarable entities in a directory by scanning files,
|
|
18
|
+
* importing modules, collecting entities, resolving references, and building
|
|
19
|
+
* a dependency graph.
|
|
20
|
+
*
|
|
21
|
+
* @param path - The directory path to discover entities in
|
|
22
|
+
* @returns DiscoveryResult with entities, dependencies, sourceFiles, and errors
|
|
23
|
+
*/
|
|
24
|
+
export declare function discover(path: string): Promise<DiscoveryResult>;
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/discovery/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAOhD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,8CAA8C;IAC9C,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAClC,8DAA8D;IAC9D,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IACvC,qDAAqD;IACrD,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,mDAAmD;IACnD,MAAM,EAAE,cAAc,EAAE,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAqGrE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Declarable } from "../declarable.js";
|
|
2
|
+
/**
|
|
3
|
+
* Resolves all AttrRef instances in a collection of entities
|
|
4
|
+
* Sets logical names on entities and resolves parent references in AttrRefs
|
|
5
|
+
*
|
|
6
|
+
* @param entities - Map of export name to Declarable entity
|
|
7
|
+
* @throws {Error} If an AttrRef parent cannot be found in the entities collection
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveAttrRefs(entities: Map<string, Declarable>): void;
|
|
10
|
+
//# sourceMappingURL=resolve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/discovery/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAIhD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,IAAI,CA0CvE"}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error types for chant discovery, build, and lint failures
|
|
3
|
+
*/
|
|
4
|
+
export type DiscoveryErrorType = "import" | "resolution" | "circular";
|
|
5
|
+
/**
|
|
6
|
+
* Error during file discovery or module import
|
|
7
|
+
*/
|
|
8
|
+
export declare class DiscoveryError extends Error {
|
|
9
|
+
readonly file: string;
|
|
10
|
+
readonly type: DiscoveryErrorType;
|
|
11
|
+
constructor(file: string, message: string, type: DiscoveryErrorType);
|
|
12
|
+
toJSON(): {
|
|
13
|
+
name: string;
|
|
14
|
+
file: string;
|
|
15
|
+
message: string;
|
|
16
|
+
type: DiscoveryErrorType;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Error during build/serialization
|
|
21
|
+
*/
|
|
22
|
+
export declare class BuildError extends Error {
|
|
23
|
+
readonly entityName: string;
|
|
24
|
+
constructor(entityName: string, message: string);
|
|
25
|
+
toJSON(): {
|
|
26
|
+
name: string;
|
|
27
|
+
entityName: string;
|
|
28
|
+
message: string;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Error from lint rule violation
|
|
33
|
+
*/
|
|
34
|
+
export declare class LintError extends Error {
|
|
35
|
+
readonly file: string;
|
|
36
|
+
readonly line: number;
|
|
37
|
+
readonly column: number;
|
|
38
|
+
readonly ruleId: string;
|
|
39
|
+
constructor(file: string, line: number, column: number, ruleId: string, message: string);
|
|
40
|
+
toJSON(): {
|
|
41
|
+
name: string;
|
|
42
|
+
file: string;
|
|
43
|
+
line: number;
|
|
44
|
+
column: number;
|
|
45
|
+
ruleId: string;
|
|
46
|
+
message: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,YAAY,GAAG,UAAU,CAAC;AAEtE;;GAEG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;gBAEtB,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB;IAOnE,MAAM;;;;;;CAQP;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;IACnC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBAEhB,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAM/C,MAAM;;;;;CAOP;AAED;;GAEG;AACH,qBAAa,SAAU,SAAQ,KAAK;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAGtB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM;IAUjB,MAAM;;;;;;;;CAUP"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base class for template value parsers.
|
|
3
|
+
*
|
|
4
|
+
* Implements the generic recursive walk: null → array → single-key
|
|
5
|
+
* intrinsic dispatch → plain object → primitive. Subclasses provide
|
|
6
|
+
* format-specific intrinsic dispatch.
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class BaseValueParser {
|
|
9
|
+
/**
|
|
10
|
+
* Try to interpret a single-key object as an intrinsic function.
|
|
11
|
+
* Return the parsed intrinsic value, or null if this key isn't an intrinsic.
|
|
12
|
+
*/
|
|
13
|
+
protected abstract dispatchIntrinsic(key: string, value: unknown, obj: Record<string, unknown>): unknown | null;
|
|
14
|
+
/**
|
|
15
|
+
* Parse a value recursively: null → array → single-key intrinsic → object → primitive.
|
|
16
|
+
*/
|
|
17
|
+
parseValue(value: unknown): unknown;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=base-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-parser.d.ts","sourceRoot":"","sources":["../../src/import/base-parser.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,8BAAsB,eAAe;IACnC;;;OAGG;IACH,SAAS,CAAC,QAAQ,CAAC,iBAAiB,CAClC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,OAAO,EACd,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B,OAAO,GAAG,IAAI;IAEjB;;OAEG;IACH,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;CAyBpC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TemplateIR } from "./parser.js";
|
|
2
|
+
/**
|
|
3
|
+
* Represents a generated TypeScript file
|
|
4
|
+
*/
|
|
5
|
+
export interface GeneratedFile {
|
|
6
|
+
readonly path: string;
|
|
7
|
+
readonly content: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Interface for TypeScript code generators that convert IR to TypeScript
|
|
11
|
+
*/
|
|
12
|
+
export interface TypeScriptGenerator {
|
|
13
|
+
/**
|
|
14
|
+
* Generate TypeScript files from intermediate representation
|
|
15
|
+
* @param ir - Intermediate representation of the template
|
|
16
|
+
* @returns Array of generated TypeScript files
|
|
17
|
+
*/
|
|
18
|
+
generate(ir: TemplateIR): GeneratedFile[];
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/import/generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,EAAE,UAAU,GAAG,aAAa,EAAE,CAAC;CAC3C"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IR intrinsic scanning utilities.
|
|
3
|
+
*
|
|
4
|
+
* Generic recursive walkers that scan the import IR value trees for
|
|
5
|
+
* intrinsic markers and dependency references.
|
|
6
|
+
*/
|
|
7
|
+
import type { TemplateIR } from "./parser.js";
|
|
8
|
+
/**
|
|
9
|
+
* Check if a value tree contains an intrinsic with the given name.
|
|
10
|
+
* Looks for `{ __intrinsic: name }` objects recursively.
|
|
11
|
+
*/
|
|
12
|
+
export declare function hasIntrinsicInValue(value: unknown, name: string): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Check if any resource in the IR uses a given intrinsic.
|
|
15
|
+
*/
|
|
16
|
+
export declare function irUsesIntrinsic(ir: TemplateIR, name: string): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Collect dependency references from a value tree.
|
|
19
|
+
*
|
|
20
|
+
* @param value - The value tree to scan
|
|
21
|
+
* @param isDependency - Given an object, returns a logical ID if it represents
|
|
22
|
+
* a dependency, or null otherwise. Each lexicon provides its own predicate.
|
|
23
|
+
*/
|
|
24
|
+
export declare function collectDependencies(value: unknown, isDependency: (obj: Record<string, unknown>) => string | null): Set<string>;
|
|
25
|
+
//# sourceMappingURL=ir-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ir-utils.d.ts","sourceRoot":"","sources":["../../src/import/ir-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAkBzE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAOrE;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,OAAO,EACd,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,GAAG,IAAI,GAC5D,GAAG,CAAC,MAAM,CAAC,CAIb"}
|