@greyworld/code-check-core 1.0.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/facade/code-checker.d.ts +14 -0
- package/dist/facade/code-checker.d.ts.map +1 -0
- package/dist/facade/code-checker.js +63 -0
- package/dist/facade/code-checker.js.map +1 -0
- package/dist/facade/index.d.ts +3 -0
- package/dist/facade/index.d.ts.map +1 -0
- package/dist/facade/index.js +6 -0
- package/dist/facade/index.js.map +1 -0
- package/dist/facade/types.d.ts +24 -0
- package/dist/facade/types.d.ts.map +1 -0
- package/dist/facade/types.js +3 -0
- package/dist/facade/types.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/ast-parser/go/index.d.ts +3 -0
- package/dist/tools/ast-parser/go/index.d.ts.map +1 -0
- package/dist/tools/ast-parser/go/index.js +6 -0
- package/dist/tools/ast-parser/go/index.js.map +1 -0
- package/dist/tools/ast-parser/go/parser.d.ts +56 -0
- package/dist/tools/ast-parser/go/parser.d.ts.map +1 -0
- package/dist/tools/ast-parser/go/parser.js +147 -0
- package/dist/tools/ast-parser/go/parser.js.map +1 -0
- package/dist/tools/ast-parser/go/schema-extractor.d.ts +103 -0
- package/dist/tools/ast-parser/go/schema-extractor.d.ts.map +1 -0
- package/dist/tools/ast-parser/go/schema-extractor.js +487 -0
- package/dist/tools/ast-parser/go/schema-extractor.js.map +1 -0
- package/dist/tools/ast-parser/go/semantic-normalizer.d.ts +51 -0
- package/dist/tools/ast-parser/go/semantic-normalizer.d.ts.map +1 -0
- package/dist/tools/ast-parser/go/semantic-normalizer.js +263 -0
- package/dist/tools/ast-parser/go/semantic-normalizer.js.map +1 -0
- package/dist/tools/ast-parser/go/types.d.ts +131 -0
- package/dist/tools/ast-parser/go/types.d.ts.map +1 -0
- package/dist/tools/ast-parser/go/types.js +3 -0
- package/dist/tools/ast-parser/go/types.js.map +1 -0
- package/dist/tools/ast-parser/markdown/index.d.ts +28 -0
- package/dist/tools/ast-parser/markdown/index.d.ts.map +1 -0
- package/dist/tools/ast-parser/markdown/index.js +31 -0
- package/dist/tools/ast-parser/markdown/index.js.map +1 -0
- package/dist/tools/ast-parser/markdown/parser.d.ts +271 -0
- package/dist/tools/ast-parser/markdown/parser.d.ts.map +1 -0
- package/dist/tools/ast-parser/markdown/parser.js +613 -0
- package/dist/tools/ast-parser/markdown/parser.js.map +1 -0
- package/dist/tools/ast-parser/markdown/types.d.ts +131 -0
- package/dist/tools/ast-parser/markdown/types.d.ts.map +1 -0
- package/dist/tools/ast-parser/markdown/types.js +3 -0
- package/dist/tools/ast-parser/markdown/types.js.map +1 -0
- package/dist/tools/env/index.d.ts +2 -0
- package/dist/tools/env/index.d.ts.map +1 -0
- package/dist/tools/env/index.js +6 -0
- package/dist/tools/env/index.js.map +1 -0
- package/dist/tools/env/load-env.d.ts +9 -0
- package/dist/tools/env/load-env.d.ts.map +1 -0
- package/dist/tools/env/load-env.js +39 -0
- package/dist/tools/env/load-env.js.map +1 -0
- package/dist/tools/line-pattern/index.d.ts +15 -0
- package/dist/tools/line-pattern/index.d.ts.map +1 -0
- package/dist/tools/line-pattern/index.js +25 -0
- package/dist/tools/line-pattern/index.js.map +1 -0
- package/dist/tools/line-pattern/line-pattern.d.ts +53 -0
- package/dist/tools/line-pattern/line-pattern.d.ts.map +1 -0
- package/dist/tools/line-pattern/line-pattern.js +88 -0
- package/dist/tools/line-pattern/line-pattern.js.map +1 -0
- package/dist/tools/line-pattern/segment.d.ts +24 -0
- package/dist/tools/line-pattern/segment.d.ts.map +1 -0
- package/dist/tools/line-pattern/segment.js +15 -0
- package/dist/tools/line-pattern/segment.js.map +1 -0
- package/dist/tools/line-pattern/segments.d.ts +43 -0
- package/dist/tools/line-pattern/segments.d.ts.map +1 -0
- package/dist/tools/line-pattern/segments.js +91 -0
- package/dist/tools/line-pattern/segments.js.map +1 -0
- package/dist/tools/llm/description-intent/format-spec.d.ts +3 -0
- package/dist/tools/llm/description-intent/format-spec.d.ts.map +1 -0
- package/dist/tools/llm/description-intent/format-spec.js +167 -0
- package/dist/tools/llm/description-intent/format-spec.js.map +1 -0
- package/dist/tools/llm/description-intent/index.d.ts +7 -0
- package/dist/tools/llm/description-intent/index.d.ts.map +1 -0
- package/dist/tools/llm/description-intent/index.js +15 -0
- package/dist/tools/llm/description-intent/index.js.map +1 -0
- package/dist/tools/llm/description-intent/intent-detector.d.ts +8 -0
- package/dist/tools/llm/description-intent/intent-detector.d.ts.map +1 -0
- package/dist/tools/llm/description-intent/intent-detector.js +103 -0
- package/dist/tools/llm/description-intent/intent-detector.js.map +1 -0
- package/dist/tools/llm/description-intent/normalizer.d.ts +12 -0
- package/dist/tools/llm/description-intent/normalizer.d.ts.map +1 -0
- package/dist/tools/llm/description-intent/normalizer.js +73 -0
- package/dist/tools/llm/description-intent/normalizer.js.map +1 -0
- package/dist/tools/llm/description-intent/slot-extractor.d.ts +3 -0
- package/dist/tools/llm/description-intent/slot-extractor.d.ts.map +1 -0
- package/dist/tools/llm/description-intent/slot-extractor.js +66 -0
- package/dist/tools/llm/description-intent/slot-extractor.js.map +1 -0
- package/dist/tools/llm/description-intent/types.d.ts +28 -0
- package/dist/tools/llm/description-intent/types.d.ts.map +1 -0
- package/dist/tools/llm/description-intent/types.js +19 -0
- package/dist/tools/llm/description-intent/types.js.map +1 -0
- package/dist/tools/llm/index.d.ts +16 -0
- package/dist/tools/llm/index.d.ts.map +1 -0
- package/dist/tools/llm/index.js +26 -0
- package/dist/tools/llm/index.js.map +1 -0
- package/dist/tools/llm/model.d.ts +3 -0
- package/dist/tools/llm/model.d.ts.map +1 -0
- package/dist/tools/llm/model.js +18 -0
- package/dist/tools/llm/model.js.map +1 -0
- package/dist/tools/llm/structured-caller.d.ts +86 -0
- package/dist/tools/llm/structured-caller.d.ts.map +1 -0
- package/dist/tools/llm/structured-caller.js +181 -0
- package/dist/tools/llm/structured-caller.js.map +1 -0
- package/dist/tools/node-pattern/index.d.ts +17 -0
- package/dist/tools/node-pattern/index.d.ts.map +1 -0
- package/dist/tools/node-pattern/index.js +36 -0
- package/dist/tools/node-pattern/index.js.map +1 -0
- package/dist/tools/node-pattern/matchers.d.ts +61 -0
- package/dist/tools/node-pattern/matchers.d.ts.map +1 -0
- package/dist/tools/node-pattern/matchers.js +154 -0
- package/dist/tools/node-pattern/matchers.js.map +1 -0
- package/dist/tools/node-pattern/node-matcher.d.ts +69 -0
- package/dist/tools/node-pattern/node-matcher.d.ts.map +1 -0
- package/dist/tools/node-pattern/node-matcher.js +122 -0
- package/dist/tools/node-pattern/node-matcher.js.map +1 -0
- package/dist/tools/node-pattern/node-pattern.d.ts +65 -0
- package/dist/tools/node-pattern/node-pattern.d.ts.map +1 -0
- package/dist/tools/node-pattern/node-pattern.js +129 -0
- package/dist/tools/node-pattern/node-pattern.js.map +1 -0
- package/dist/tools/section-check/index.d.ts +4 -0
- package/dist/tools/section-check/index.d.ts.map +1 -0
- package/dist/tools/section-check/index.js +10 -0
- package/dist/tools/section-check/index.js.map +1 -0
- package/dist/tools/section-check/section-check.d.ts +46 -0
- package/dist/tools/section-check/section-check.d.ts.map +1 -0
- package/dist/tools/section-check/section-check.js +264 -0
- package/dist/tools/section-check/section-check.js.map +1 -0
- package/dist/tools/section-check/types.d.ts +35 -0
- package/dist/tools/section-check/types.d.ts.map +1 -0
- package/dist/tools/section-check/types.js +23 -0
- package/dist/tools/section-check/types.js.map +1 -0
- package/dist/tools/text-grep/index.d.ts +10 -0
- package/dist/tools/text-grep/index.d.ts.map +1 -0
- package/dist/tools/text-grep/index.js +13 -0
- package/dist/tools/text-grep/index.js.map +1 -0
- package/dist/tools/text-grep/regex-grep.d.ts +92 -0
- package/dist/tools/text-grep/regex-grep.d.ts.map +1 -0
- package/dist/tools/text-grep/regex-grep.js +141 -0
- package/dist/tools/text-grep/regex-grep.js.map +1 -0
- package/dist/workflow/context/context.d.ts +13 -0
- package/dist/workflow/context/context.d.ts.map +1 -0
- package/dist/workflow/context/context.js +29 -0
- package/dist/workflow/context/context.js.map +1 -0
- package/dist/workflow/implement/resource-check/context-keys.d.ts +30 -0
- package/dist/workflow/implement/resource-check/context-keys.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/context-keys.js +33 -0
- package/dist/workflow/implement/resource-check/context-keys.js.map +1 -0
- package/dist/workflow/implement/resource-check/resource-check-workflow.d.ts +20 -0
- package/dist/workflow/implement/resource-check/resource-check-workflow.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/resource-check-workflow.js +325 -0
- package/dist/workflow/implement/resource-check/resource-check-workflow.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/index.d.ts +5 -0
- package/dist/workflow/implement/resource-check/rules/index.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/index.js +21 -0
- package/dist/workflow/implement/resource-check/rules/index.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/arguments/argument-section-format-rule.d.ts +8 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/arguments/argument-section-format-rule.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/arguments/argument-section-format-rule.js +51 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/arguments/argument-section-format-rule.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/attributes/attribute-section-format-rule.d.ts +8 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/attributes/attribute-section-format-rule.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/attributes/attribute-section-format-rule.js +60 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/attributes/attribute-section-format-rule.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/blank-line-between-blocks-rule.d.ts +9 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/blank-line-between-blocks-rule.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/blank-line-between-blocks-rule.js +80 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/blank-line-between-blocks-rule.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/example/example-section-exists-rule.d.ts +8 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/example/example-section-exists-rule.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/example/example-section-exists-rule.js +42 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/example/example-section-exists-rule.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/example-section-exists-rule.d.ts +8 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/example-section-exists-rule.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/example-section-exists-rule.js +34 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/example-section-exists-rule.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/frontmatter/frontmatter-check-rule.d.ts +8 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/frontmatter/frontmatter-check-rule.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/frontmatter/frontmatter-check-rule.js +33 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/frontmatter/frontmatter-check-rule.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/frontmatter-check-rule.d.ts +8 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/frontmatter-check-rule.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/frontmatter-check-rule.js +33 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/frontmatter-check-rule.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/h1-exists-rule.d.ts +8 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/h1-exists-rule.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/h1-exists-rule.js +34 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/h1-exists-rule.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/index.d.ts +11 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/index.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/index.js +38 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/index.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/line-length-rule.d.ts +15 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/line-length-rule.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/line-length-rule.js +77 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/line-length-rule.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/number-format-rule.d.ts +23 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/number-format-rule.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/number-format-rule.js +128 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/number-format-rule.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/shared/section-check-result.d.ts +9 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/shared/section-check-result.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/shared/section-check-result.js +19 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/shared/section-check-result.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/title/h1-exists-rule.d.ts +8 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/title/h1-exists-rule.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/title/h1-exists-rule.js +44 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/title/h1-exists-rule.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/total/blank-line-between-blocks-rule.d.ts +9 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/total/blank-line-between-blocks-rule.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/total/blank-line-between-blocks-rule.js +80 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/total/blank-line-between-blocks-rule.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/total/line-length-rule.d.ts +15 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/total/line-length-rule.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/total/line-length-rule.js +77 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/total/line-length-rule.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/total/number-format-rule.d.ts +23 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/total/number-format-rule.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/total/number-format-rule.js +128 -0
- package/dist/workflow/implement/resource-check/rules/markdown-format/total/number-format-rule.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/argument-section-semantic-rule.d.ts +11 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/argument-section-semantic-rule.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/argument-section-semantic-rule.js +145 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/argument-section-semantic-rule.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/arguments/argument-section-semantic-rule.d.ts +11 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/arguments/argument-section-semantic-rule.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/arguments/argument-section-semantic-rule.js +145 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/arguments/argument-section-semantic-rule.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/attribute-section-semantic-rule.d.ts +9 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/attribute-section-semantic-rule.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/attribute-section-semantic-rule.js +83 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/attribute-section-semantic-rule.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/attributes/attribute-section-semantic-rule.d.ts +9 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/attributes/attribute-section-semantic-rule.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/attributes/attribute-section-semantic-rule.js +83 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/attributes/attribute-section-semantic-rule.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/index.d.ts +7 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/index.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/index.js +15 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/index.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/section-existence-rule.d.ts +9 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/section-existence-rule.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/section-existence-rule.js +96 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/section-existence-rule.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/total/section-existence-rule.d.ts +9 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/total/section-existence-rule.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/total/section-existence-rule.js +109 -0
- package/dist/workflow/implement/resource-check/rules/markdown-semantic/total/section-existence-rule.js.map +1 -0
- package/dist/workflow/implement/resource-check/rules/stage-placeholder-rule.d.ts +19 -0
- package/dist/workflow/implement/resource-check/rules/stage-placeholder-rule.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/rules/stage-placeholder-rule.js +31 -0
- package/dist/workflow/implement/resource-check/rules/stage-placeholder-rule.js.map +1 -0
- package/dist/workflow/implement/resource-check/tools/doc-semantic/builder.d.ts +15 -0
- package/dist/workflow/implement/resource-check/tools/doc-semantic/builder.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/tools/doc-semantic/builder.js +554 -0
- package/dist/workflow/implement/resource-check/tools/doc-semantic/builder.js.map +1 -0
- package/dist/workflow/implement/resource-check/tools/doc-semantic/index.d.ts +5 -0
- package/dist/workflow/implement/resource-check/tools/doc-semantic/index.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/tools/doc-semantic/index.js +16 -0
- package/dist/workflow/implement/resource-check/tools/doc-semantic/index.js.map +1 -0
- package/dist/workflow/implement/resource-check/tools/doc-semantic/types.d.ts +94 -0
- package/dist/workflow/implement/resource-check/tools/doc-semantic/types.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/tools/doc-semantic/types.js +42 -0
- package/dist/workflow/implement/resource-check/tools/doc-semantic/types.js.map +1 -0
- package/dist/workflow/implement/resource-check/tools/schema-semantic/builder.d.ts +4 -0
- package/dist/workflow/implement/resource-check/tools/schema-semantic/builder.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/tools/schema-semantic/builder.js +103 -0
- package/dist/workflow/implement/resource-check/tools/schema-semantic/builder.js.map +1 -0
- package/dist/workflow/implement/resource-check/tools/schema-semantic/index.d.ts +3 -0
- package/dist/workflow/implement/resource-check/tools/schema-semantic/index.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/tools/schema-semantic/index.js +6 -0
- package/dist/workflow/implement/resource-check/tools/schema-semantic/index.js.map +1 -0
- package/dist/workflow/implement/resource-check/tools/schema-semantic/types.d.ts +47 -0
- package/dist/workflow/implement/resource-check/tools/schema-semantic/types.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/tools/schema-semantic/types.js +3 -0
- package/dist/workflow/implement/resource-check/tools/schema-semantic/types.js.map +1 -0
- package/dist/workflow/implement/resource-check/tools/terraform-schema/index.d.ts +4 -0
- package/dist/workflow/implement/resource-check/tools/terraform-schema/index.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/tools/terraform-schema/index.js +8 -0
- package/dist/workflow/implement/resource-check/tools/terraform-schema/index.js.map +1 -0
- package/dist/workflow/implement/resource-check/tools/terraform-schema/schema-extractor.d.ts +108 -0
- package/dist/workflow/implement/resource-check/tools/terraform-schema/schema-extractor.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/tools/terraform-schema/schema-extractor.js +498 -0
- package/dist/workflow/implement/resource-check/tools/terraform-schema/schema-extractor.js.map +1 -0
- package/dist/workflow/implement/resource-check/tools/terraform-schema/semantic-normalizer.d.ts +51 -0
- package/dist/workflow/implement/resource-check/tools/terraform-schema/semantic-normalizer.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/tools/terraform-schema/semantic-normalizer.js +271 -0
- package/dist/workflow/implement/resource-check/tools/terraform-schema/semantic-normalizer.js.map +1 -0
- package/dist/workflow/implement/resource-check/tools/terraform-schema/types.d.ts +133 -0
- package/dist/workflow/implement/resource-check/tools/terraform-schema/types.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/tools/terraform-schema/types.js +3 -0
- package/dist/workflow/implement/resource-check/tools/terraform-schema/types.js.map +1 -0
- package/dist/workflow/implement/resource-check/types.d.ts +18 -0
- package/dist/workflow/implement/resource-check/types.d.ts.map +1 -0
- package/dist/workflow/implement/resource-check/types.js +107 -0
- package/dist/workflow/implement/resource-check/types.js.map +1 -0
- package/dist/workflow/types/rule/rule.d.ts +72 -0
- package/dist/workflow/types/rule/rule.d.ts.map +1 -0
- package/dist/workflow/types/rule/rule.js +110 -0
- package/dist/workflow/types/rule/rule.js.map +1 -0
- package/dist/workflow/workflow.d.ts +52 -0
- package/dist/workflow/workflow.d.ts.map +1 -0
- package/dist/workflow/workflow.js +121 -0
- package/dist/workflow/workflow.js.map +1 -0
- package/package.json +36 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { Node } from "commonmark";
|
|
2
|
+
import type { MarkdownNode, MarkdownNodeType, ParserOptions, NodeVisitor, TypedVisitors } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* MarkdownParser - CommonMark compliant markdown AST parser
|
|
5
|
+
*
|
|
6
|
+
* This parser uses the official commonmark.js library which is the reference
|
|
7
|
+
* implementation of the CommonMark specification.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const parser = new MarkdownParser();
|
|
12
|
+
* const ast = parser.parse("# Hello World\n\nThis is a paragraph.");
|
|
13
|
+
*
|
|
14
|
+
* // Walk the AST
|
|
15
|
+
* parser.walk(ast, (node, entering) => {
|
|
16
|
+
* if (entering && node.type === "heading") {
|
|
17
|
+
* console.log(`Found heading level ${node.level}`);
|
|
18
|
+
* }
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare class MarkdownParser {
|
|
23
|
+
private parser;
|
|
24
|
+
private enableFrontmatter;
|
|
25
|
+
/**
|
|
26
|
+
* Create a new MarkdownParser instance
|
|
27
|
+
*
|
|
28
|
+
* @param options - Parser configuration options
|
|
29
|
+
*/
|
|
30
|
+
constructor(options?: ParserOptions);
|
|
31
|
+
/**
|
|
32
|
+
* Parse markdown text into an AST
|
|
33
|
+
*
|
|
34
|
+
* When front-matter parsing is enabled (default), the leading
|
|
35
|
+
* `---...---` YAML block is extracted, parsed, and inserted as a
|
|
36
|
+
* "frontmatter" node at the beginning of the document's children.
|
|
37
|
+
*
|
|
38
|
+
* @param markdown - The markdown text to parse
|
|
39
|
+
* @returns The root node of the AST (document node)
|
|
40
|
+
*/
|
|
41
|
+
parse(markdown: string): MarkdownNode;
|
|
42
|
+
/**
|
|
43
|
+
* Parse markdown and return the raw commonmark Node
|
|
44
|
+
*
|
|
45
|
+
* This is useful when you need access to the full commonmark API
|
|
46
|
+
*
|
|
47
|
+
* @param markdown - The markdown text to parse
|
|
48
|
+
* @returns The raw commonmark Node
|
|
49
|
+
*/
|
|
50
|
+
parseRaw(markdown: string): Node;
|
|
51
|
+
/**
|
|
52
|
+
* Walk the AST and call the visitor function for each node
|
|
53
|
+
*
|
|
54
|
+
* @param ast - The root node to start walking from
|
|
55
|
+
* @param visitor - Function called for each node (entering and leaving)
|
|
56
|
+
*/
|
|
57
|
+
walk(ast: MarkdownNode, visitor: NodeVisitor): void;
|
|
58
|
+
/**
|
|
59
|
+
* Walk the AST with type-specific visitors
|
|
60
|
+
*
|
|
61
|
+
* @param ast - The root node to start walking from
|
|
62
|
+
* @param visitors - Object mapping node types to visitor functions
|
|
63
|
+
*/
|
|
64
|
+
walkTyped(ast: MarkdownNode, visitors: TypedVisitors): void;
|
|
65
|
+
/**
|
|
66
|
+
* Find all nodes of a specific type
|
|
67
|
+
*
|
|
68
|
+
* @param ast - The root node to search from
|
|
69
|
+
* @param type - The node type to find
|
|
70
|
+
* @returns Array of matching nodes
|
|
71
|
+
*/
|
|
72
|
+
findByType(ast: MarkdownNode, type: MarkdownNodeType): MarkdownNode[];
|
|
73
|
+
/**
|
|
74
|
+
* Find all nodes matching a predicate
|
|
75
|
+
*
|
|
76
|
+
* @param ast - The root node to search from
|
|
77
|
+
* @param predicate - Function that returns true for matching nodes
|
|
78
|
+
* @returns Array of matching nodes
|
|
79
|
+
*/
|
|
80
|
+
findAll(ast: MarkdownNode, predicate: (node: MarkdownNode) => boolean): MarkdownNode[];
|
|
81
|
+
/**
|
|
82
|
+
* Find the first node matching a predicate
|
|
83
|
+
*
|
|
84
|
+
* @param ast - The root node to search from
|
|
85
|
+
* @param predicate - Function that returns true for matching nodes
|
|
86
|
+
* @returns The first matching node, or null if not found
|
|
87
|
+
*/
|
|
88
|
+
findFirst(ast: MarkdownNode, predicate: (node: MarkdownNode) => boolean): MarkdownNode | null;
|
|
89
|
+
/**
|
|
90
|
+
* Get all text content from the AST
|
|
91
|
+
*
|
|
92
|
+
* @param ast - The root node to extract text from
|
|
93
|
+
* @returns Combined text content
|
|
94
|
+
*/
|
|
95
|
+
getTextContent(ast: MarkdownNode): string;
|
|
96
|
+
/**
|
|
97
|
+
* Get all headings from the document
|
|
98
|
+
*
|
|
99
|
+
* @param ast - The root node
|
|
100
|
+
* @returns Array of heading nodes with their text content
|
|
101
|
+
*/
|
|
102
|
+
getHeadings(ast: MarkdownNode): Array<{
|
|
103
|
+
level: number;
|
|
104
|
+
text: string;
|
|
105
|
+
node: MarkdownNode;
|
|
106
|
+
}>;
|
|
107
|
+
/**
|
|
108
|
+
* Get all links from the document
|
|
109
|
+
*
|
|
110
|
+
* @param ast - The root node
|
|
111
|
+
* @returns Array of link information
|
|
112
|
+
*/
|
|
113
|
+
getLinks(ast: MarkdownNode): Array<{
|
|
114
|
+
url: string;
|
|
115
|
+
title: string | null;
|
|
116
|
+
text: string;
|
|
117
|
+
node: MarkdownNode;
|
|
118
|
+
}>;
|
|
119
|
+
/**
|
|
120
|
+
* Get all images from the document
|
|
121
|
+
*
|
|
122
|
+
* @param ast - The root node
|
|
123
|
+
* @returns Array of image information
|
|
124
|
+
*/
|
|
125
|
+
getImages(ast: MarkdownNode): Array<{
|
|
126
|
+
src: string;
|
|
127
|
+
alt: string;
|
|
128
|
+
title: string | null;
|
|
129
|
+
node: MarkdownNode;
|
|
130
|
+
}>;
|
|
131
|
+
/**
|
|
132
|
+
* Get all code blocks from the document
|
|
133
|
+
*
|
|
134
|
+
* @param ast - The root node
|
|
135
|
+
* @returns Array of code block information
|
|
136
|
+
*/
|
|
137
|
+
getCodeBlocks(ast: MarkdownNode): Array<{
|
|
138
|
+
language: string | null;
|
|
139
|
+
code: string;
|
|
140
|
+
node: MarkdownNode;
|
|
141
|
+
}>;
|
|
142
|
+
/**
|
|
143
|
+
* Get the parsed front-matter data from the document AST
|
|
144
|
+
*
|
|
145
|
+
* @param ast - The root document node
|
|
146
|
+
* @returns The parsed YAML data object, or null if no
|
|
147
|
+
* front-matter is present
|
|
148
|
+
*/
|
|
149
|
+
getFrontmatter(ast: MarkdownNode): Record<string, unknown> | null;
|
|
150
|
+
/**
|
|
151
|
+
* Return the document body children, excluding the frontmatter node.
|
|
152
|
+
*/
|
|
153
|
+
getBodyChildren(doc: MarkdownNode): MarkdownNode[];
|
|
154
|
+
/**
|
|
155
|
+
* Extract a heading section's content nodes.
|
|
156
|
+
*
|
|
157
|
+
* Finds the first heading at `level` whose text matches `title`,
|
|
158
|
+
* then returns all sibling nodes from that heading up to (but not
|
|
159
|
+
* including) the next heading at the same or higher level.
|
|
160
|
+
*
|
|
161
|
+
* @returns The content nodes, or null if the heading is not found.
|
|
162
|
+
*/
|
|
163
|
+
getSection(doc: MarkdownNode, level: number, title: string): MarkdownNode[] | null;
|
|
164
|
+
/**
|
|
165
|
+
* Text-line variant of getSection for rules that need raw-line
|
|
166
|
+
* processing (e.g. regex-based bullet validation).
|
|
167
|
+
*
|
|
168
|
+
* @returns The lines within the section and the 1-based start line
|
|
169
|
+
* number, or null if the heading is not found.
|
|
170
|
+
*/
|
|
171
|
+
getSectionText(source: string, level: number, title: string): {
|
|
172
|
+
lines: string[];
|
|
173
|
+
startLine: number;
|
|
174
|
+
} | null;
|
|
175
|
+
/**
|
|
176
|
+
* Extract the original source lines that correspond to an AST node,
|
|
177
|
+
* using its `sourceRange`.
|
|
178
|
+
*
|
|
179
|
+
* Returns the same shape as `getSectionText` so that rules can switch
|
|
180
|
+
* seamlessly between section-level and node-level text processing.
|
|
181
|
+
*
|
|
182
|
+
* @param source - The full markdown source text
|
|
183
|
+
* @param node - An AST node with a non-null `sourceRange`
|
|
184
|
+
* @returns The source lines spanning the node and the 1-based start
|
|
185
|
+
* line number, or null if the node has no `sourceRange`.
|
|
186
|
+
*/
|
|
187
|
+
getNodeText(source: string, node: MarkdownNode): {
|
|
188
|
+
lines: string[];
|
|
189
|
+
startLine: number;
|
|
190
|
+
} | null;
|
|
191
|
+
/**
|
|
192
|
+
* Get the logical text lines of a node by walking its AST.
|
|
193
|
+
*
|
|
194
|
+
* Unlike {@link getNodeText}, which returns verbatim source lines,
|
|
195
|
+
* this method merges soft-break wrapped lines into single logical
|
|
196
|
+
* lines. Hard line breaks (trailing double-space or backslash)
|
|
197
|
+
* still produce separate logical lines.
|
|
198
|
+
*
|
|
199
|
+
* For container nodes (list, item, block_quote, document) the
|
|
200
|
+
* method recurses into block-level children so that each
|
|
201
|
+
* paragraph / heading yields its own set of logical lines.
|
|
202
|
+
*
|
|
203
|
+
* @param source - The full markdown source text
|
|
204
|
+
* @param node - An AST node with a non-null `sourceRange`
|
|
205
|
+
* @returns Logical text lines and the 1-based start line number,
|
|
206
|
+
* or null if the node has no `sourceRange`.
|
|
207
|
+
*/
|
|
208
|
+
getLogicalLines(source: string, node: MarkdownNode): {
|
|
209
|
+
lines: string[];
|
|
210
|
+
startLine: number;
|
|
211
|
+
} | null;
|
|
212
|
+
/**
|
|
213
|
+
* Flatten markdown list nodes into their direct item nodes.
|
|
214
|
+
*/
|
|
215
|
+
getBulletItems(listNodes: MarkdownNode[]): MarkdownNode[];
|
|
216
|
+
/**
|
|
217
|
+
* Extract a bullet item's first line in normalized "* " form.
|
|
218
|
+
*/
|
|
219
|
+
getItemBulletLine(source: string, item: MarkdownNode): {
|
|
220
|
+
text: string;
|
|
221
|
+
startLine: number;
|
|
222
|
+
} | null;
|
|
223
|
+
/**
|
|
224
|
+
* Find the next sibling of `anchor` within `parent`'s children.
|
|
225
|
+
*
|
|
226
|
+
* If a predicate is given, skips siblings that don't match.
|
|
227
|
+
* Only looks forward (nodes after `anchor`), returns the first match.
|
|
228
|
+
*/
|
|
229
|
+
getNextSibling(parent: MarkdownNode, anchor: MarkdownNode, predicate?: (node: MarkdownNode) => boolean): MarkdownNode | null;
|
|
230
|
+
/**
|
|
231
|
+
* Filter nodes by type from a flat node list.
|
|
232
|
+
*/
|
|
233
|
+
filterByType(nodes: MarkdownNode[], type: MarkdownNodeType): MarkdownNode[];
|
|
234
|
+
/**
|
|
235
|
+
* Check whether `parent` has a direct child matching the predicate
|
|
236
|
+
* at the given position.
|
|
237
|
+
*/
|
|
238
|
+
hasChild(parent: MarkdownNode, predicate: (node: MarkdownNode) => boolean, position?: "first" | "last" | "any"): boolean;
|
|
239
|
+
/**
|
|
240
|
+
* Extract front-matter from the beginning of a markdown string.
|
|
241
|
+
*
|
|
242
|
+
* @returns An object containing the frontmatter MarkdownNode and
|
|
243
|
+
* the remaining body text, or null if no front-matter
|
|
244
|
+
* was found.
|
|
245
|
+
*/
|
|
246
|
+
private extractFrontmatter;
|
|
247
|
+
/**
|
|
248
|
+
* Shift all sourceRange line numbers in the subtree by `offset`.
|
|
249
|
+
* Used after frontmatter extraction so that body-node positions
|
|
250
|
+
* are absolute with respect to the original document.
|
|
251
|
+
*/
|
|
252
|
+
private offsetSourceRanges;
|
|
253
|
+
/**
|
|
254
|
+
* Merge soft-wrapped source lines into logical lines.
|
|
255
|
+
*
|
|
256
|
+
* A line ending with two or more trailing spaces or a backslash is
|
|
257
|
+
* treated as a CommonMark hard line break — the logical line is
|
|
258
|
+
* split there. All other intra-paragraph newlines are soft breaks
|
|
259
|
+
* and are collapsed into a single space.
|
|
260
|
+
*
|
|
261
|
+
* Continuation indentation (leading whitespace on lines after the
|
|
262
|
+
* first) is stripped before merging so that list-item continuation
|
|
263
|
+
* and block-quote prefixes do not leak into the logical text.
|
|
264
|
+
*/
|
|
265
|
+
private mergeSoftWraps;
|
|
266
|
+
/**
|
|
267
|
+
* Internal recursive walk implementation
|
|
268
|
+
*/
|
|
269
|
+
private walkNode;
|
|
270
|
+
}
|
|
271
|
+
//# sourceMappingURL=parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../../src/tools/ast-parser/markdown/parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,IAAI,EAAc,MAAM,YAAY,CAAC;AAEtD,OAAO,KAAK,EACR,YAAY,EACZ,gBAAgB,EAGhB,aAAa,EAEb,WAAW,EACX,aAAa,EAChB,MAAM,SAAS,CAAC;AAmDjB;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,cAAc;IACvB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,iBAAiB,CAAU;I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