@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,613 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MarkdownParser = void 0;
|
|
4
|
+
const commonmark_1 = require("commonmark");
|
|
5
|
+
const yaml_1 = require("yaml");
|
|
6
|
+
/**
|
|
7
|
+
* Pattern to match YAML front-matter block at the start of the document.
|
|
8
|
+
* Captures the YAML content between the opening and closing `---` fences.
|
|
9
|
+
*/
|
|
10
|
+
const FRONTMATTER_PATTERN = /^---\r?\n([\s\S]*?)\r?\n---/;
|
|
11
|
+
/**
|
|
12
|
+
* Convert commonmark Node to simplified MarkdownNode
|
|
13
|
+
*/
|
|
14
|
+
function convertNode(node) {
|
|
15
|
+
const sourceRange = node.sourcepos
|
|
16
|
+
? {
|
|
17
|
+
start: {
|
|
18
|
+
line: node.sourcepos[0][0],
|
|
19
|
+
column: node.sourcepos[0][1],
|
|
20
|
+
},
|
|
21
|
+
end: {
|
|
22
|
+
line: node.sourcepos[1][0],
|
|
23
|
+
column: node.sourcepos[1][1],
|
|
24
|
+
},
|
|
25
|
+
}
|
|
26
|
+
: null;
|
|
27
|
+
const markdownNode = {
|
|
28
|
+
type: node.type,
|
|
29
|
+
literal: node.literal,
|
|
30
|
+
destination: node.destination,
|
|
31
|
+
title: node.title,
|
|
32
|
+
info: node.info,
|
|
33
|
+
level: node.level,
|
|
34
|
+
listType: node.listType,
|
|
35
|
+
listTight: node.listTight,
|
|
36
|
+
listStart: node.listStart,
|
|
37
|
+
listDelimiter: node.listDelimiter,
|
|
38
|
+
data: null,
|
|
39
|
+
sourceRange,
|
|
40
|
+
children: [],
|
|
41
|
+
};
|
|
42
|
+
// Convert children
|
|
43
|
+
let child = node.firstChild;
|
|
44
|
+
while (child) {
|
|
45
|
+
markdownNode.children.push(convertNode(child));
|
|
46
|
+
child = child.next;
|
|
47
|
+
}
|
|
48
|
+
return markdownNode;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* MarkdownParser - CommonMark compliant markdown AST parser
|
|
52
|
+
*
|
|
53
|
+
* This parser uses the official commonmark.js library which is the reference
|
|
54
|
+
* implementation of the CommonMark specification.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* const parser = new MarkdownParser();
|
|
59
|
+
* const ast = parser.parse("# Hello World\n\nThis is a paragraph.");
|
|
60
|
+
*
|
|
61
|
+
* // Walk the AST
|
|
62
|
+
* parser.walk(ast, (node, entering) => {
|
|
63
|
+
* if (entering && node.type === "heading") {
|
|
64
|
+
* console.log(`Found heading level ${node.level}`);
|
|
65
|
+
* }
|
|
66
|
+
* });
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
class MarkdownParser {
|
|
70
|
+
/**
|
|
71
|
+
* Create a new MarkdownParser instance
|
|
72
|
+
*
|
|
73
|
+
* @param options - Parser configuration options
|
|
74
|
+
*/
|
|
75
|
+
constructor(options = {}) {
|
|
76
|
+
this.parser = new commonmark_1.Parser({
|
|
77
|
+
smart: options.smart ?? false,
|
|
78
|
+
});
|
|
79
|
+
this.enableFrontmatter = options.enableFrontmatter ?? true;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Parse markdown text into an AST
|
|
83
|
+
*
|
|
84
|
+
* When front-matter parsing is enabled (default), the leading
|
|
85
|
+
* `---...---` YAML block is extracted, parsed, and inserted as a
|
|
86
|
+
* "frontmatter" node at the beginning of the document's children.
|
|
87
|
+
*
|
|
88
|
+
* @param markdown - The markdown text to parse
|
|
89
|
+
* @returns The root node of the AST (document node)
|
|
90
|
+
*/
|
|
91
|
+
parse(markdown) {
|
|
92
|
+
let frontmatterNode = null;
|
|
93
|
+
let body = markdown;
|
|
94
|
+
let lineOffset = 0;
|
|
95
|
+
if (this.enableFrontmatter) {
|
|
96
|
+
const extracted = this.extractFrontmatter(markdown);
|
|
97
|
+
if (extracted) {
|
|
98
|
+
frontmatterNode = extracted.node;
|
|
99
|
+
body = extracted.body;
|
|
100
|
+
lineOffset = extracted.node.sourceRange.end.line;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const rawAst = this.parser.parse(body);
|
|
104
|
+
const document = convertNode(rawAst);
|
|
105
|
+
if (lineOffset > 0) {
|
|
106
|
+
this.offsetSourceRanges(document, lineOffset);
|
|
107
|
+
}
|
|
108
|
+
if (frontmatterNode) {
|
|
109
|
+
document.children.unshift(frontmatterNode);
|
|
110
|
+
}
|
|
111
|
+
return document;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Parse markdown and return the raw commonmark Node
|
|
115
|
+
*
|
|
116
|
+
* This is useful when you need access to the full commonmark API
|
|
117
|
+
*
|
|
118
|
+
* @param markdown - The markdown text to parse
|
|
119
|
+
* @returns The raw commonmark Node
|
|
120
|
+
*/
|
|
121
|
+
parseRaw(markdown) {
|
|
122
|
+
return this.parser.parse(markdown);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Walk the AST and call the visitor function for each node
|
|
126
|
+
*
|
|
127
|
+
* @param ast - The root node to start walking from
|
|
128
|
+
* @param visitor - Function called for each node (entering and leaving)
|
|
129
|
+
*/
|
|
130
|
+
walk(ast, visitor) {
|
|
131
|
+
this.walkNode(ast, visitor);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Walk the AST with type-specific visitors
|
|
135
|
+
*
|
|
136
|
+
* @param ast - The root node to start walking from
|
|
137
|
+
* @param visitors - Object mapping node types to visitor functions
|
|
138
|
+
*/
|
|
139
|
+
walkTyped(ast, visitors) {
|
|
140
|
+
this.walk(ast, (node, entering) => {
|
|
141
|
+
const visitor = visitors[node.type];
|
|
142
|
+
if (visitor) {
|
|
143
|
+
visitor(node, entering);
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Find all nodes of a specific type
|
|
149
|
+
*
|
|
150
|
+
* @param ast - The root node to search from
|
|
151
|
+
* @param type - The node type to find
|
|
152
|
+
* @returns Array of matching nodes
|
|
153
|
+
*/
|
|
154
|
+
findByType(ast, type) {
|
|
155
|
+
const results = [];
|
|
156
|
+
this.walk(ast, (node, entering) => {
|
|
157
|
+
if (entering && node.type === type) {
|
|
158
|
+
results.push(node);
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
return results;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Find all nodes matching a predicate
|
|
165
|
+
*
|
|
166
|
+
* @param ast - The root node to search from
|
|
167
|
+
* @param predicate - Function that returns true for matching nodes
|
|
168
|
+
* @returns Array of matching nodes
|
|
169
|
+
*/
|
|
170
|
+
findAll(ast, predicate) {
|
|
171
|
+
const results = [];
|
|
172
|
+
this.walk(ast, (node, entering) => {
|
|
173
|
+
if (entering && predicate(node)) {
|
|
174
|
+
results.push(node);
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
return results;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Find the first node matching a predicate
|
|
181
|
+
*
|
|
182
|
+
* @param ast - The root node to search from
|
|
183
|
+
* @param predicate - Function that returns true for matching nodes
|
|
184
|
+
* @returns The first matching node, or null if not found
|
|
185
|
+
*/
|
|
186
|
+
findFirst(ast, predicate) {
|
|
187
|
+
let result = null;
|
|
188
|
+
this.walk(ast, (node, entering) => {
|
|
189
|
+
if (result === null && entering && predicate(node)) {
|
|
190
|
+
result = node;
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
return result;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Get all text content from the AST
|
|
197
|
+
*
|
|
198
|
+
* @param ast - The root node to extract text from
|
|
199
|
+
* @returns Combined text content
|
|
200
|
+
*/
|
|
201
|
+
getTextContent(ast) {
|
|
202
|
+
const texts = [];
|
|
203
|
+
this.walk(ast, (node, entering) => {
|
|
204
|
+
if (entering) {
|
|
205
|
+
if (node.type === "text" || node.type === "code") {
|
|
206
|
+
if (node.literal) {
|
|
207
|
+
texts.push(node.literal);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
else if (node.type === "softbreak") {
|
|
211
|
+
texts.push(" ");
|
|
212
|
+
}
|
|
213
|
+
else if (node.type === "linebreak") {
|
|
214
|
+
texts.push("\n");
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
return texts.join("");
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Get all headings from the document
|
|
222
|
+
*
|
|
223
|
+
* @param ast - The root node
|
|
224
|
+
* @returns Array of heading nodes with their text content
|
|
225
|
+
*/
|
|
226
|
+
getHeadings(ast) {
|
|
227
|
+
const headings = this.findByType(ast, "heading");
|
|
228
|
+
return headings.map((node) => ({
|
|
229
|
+
level: node.level ?? 1,
|
|
230
|
+
text: this.getTextContent(node),
|
|
231
|
+
node,
|
|
232
|
+
}));
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Get all links from the document
|
|
236
|
+
*
|
|
237
|
+
* @param ast - The root node
|
|
238
|
+
* @returns Array of link information
|
|
239
|
+
*/
|
|
240
|
+
getLinks(ast) {
|
|
241
|
+
const links = this.findByType(ast, "link");
|
|
242
|
+
return links.map((node) => ({
|
|
243
|
+
url: node.destination ?? "",
|
|
244
|
+
title: node.title,
|
|
245
|
+
text: this.getTextContent(node),
|
|
246
|
+
node,
|
|
247
|
+
}));
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Get all images from the document
|
|
251
|
+
*
|
|
252
|
+
* @param ast - The root node
|
|
253
|
+
* @returns Array of image information
|
|
254
|
+
*/
|
|
255
|
+
getImages(ast) {
|
|
256
|
+
const images = this.findByType(ast, "image");
|
|
257
|
+
return images.map((node) => ({
|
|
258
|
+
src: node.destination ?? "",
|
|
259
|
+
alt: this.getTextContent(node),
|
|
260
|
+
title: node.title,
|
|
261
|
+
node,
|
|
262
|
+
}));
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Get all code blocks from the document
|
|
266
|
+
*
|
|
267
|
+
* @param ast - The root node
|
|
268
|
+
* @returns Array of code block information
|
|
269
|
+
*/
|
|
270
|
+
getCodeBlocks(ast) {
|
|
271
|
+
const codeBlocks = this.findByType(ast, "code_block");
|
|
272
|
+
return codeBlocks.map((node) => ({
|
|
273
|
+
language: node.info || null,
|
|
274
|
+
code: node.literal ?? "",
|
|
275
|
+
node,
|
|
276
|
+
}));
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Get the parsed front-matter data from the document AST
|
|
280
|
+
*
|
|
281
|
+
* @param ast - The root document node
|
|
282
|
+
* @returns The parsed YAML data object, or null if no
|
|
283
|
+
* front-matter is present
|
|
284
|
+
*/
|
|
285
|
+
getFrontmatter(ast) {
|
|
286
|
+
const node = this.findFirst(ast, (n) => n.type === "frontmatter");
|
|
287
|
+
return node?.data ?? null;
|
|
288
|
+
}
|
|
289
|
+
// ── Semantic query helpers ──
|
|
290
|
+
/**
|
|
291
|
+
* Return the document body children, excluding the frontmatter node.
|
|
292
|
+
*/
|
|
293
|
+
getBodyChildren(doc) {
|
|
294
|
+
return doc.children.filter((c) => c.type !== "frontmatter");
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Extract a heading section's content nodes.
|
|
298
|
+
*
|
|
299
|
+
* Finds the first heading at `level` whose text matches `title`,
|
|
300
|
+
* then returns all sibling nodes from that heading up to (but not
|
|
301
|
+
* including) the next heading at the same or higher level.
|
|
302
|
+
*
|
|
303
|
+
* @returns The content nodes, or null if the heading is not found.
|
|
304
|
+
*/
|
|
305
|
+
getSection(doc, level, title) {
|
|
306
|
+
const body = this.getBodyChildren(doc);
|
|
307
|
+
const idx = body.findIndex((c) => c.type === "heading" &&
|
|
308
|
+
(c.level ?? 1) === level &&
|
|
309
|
+
this.getTextContent(c).trim() === title);
|
|
310
|
+
if (idx < 0)
|
|
311
|
+
return null;
|
|
312
|
+
const start = idx + 1;
|
|
313
|
+
let end = body.length;
|
|
314
|
+
for (let i = start; i < body.length; i++) {
|
|
315
|
+
if (body[i].type === "heading" && (body[i].level ?? 1) <= level) {
|
|
316
|
+
end = i;
|
|
317
|
+
break;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
return body.slice(start, end);
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Text-line variant of getSection for rules that need raw-line
|
|
324
|
+
* processing (e.g. regex-based bullet validation).
|
|
325
|
+
*
|
|
326
|
+
* @returns The lines within the section and the 1-based start line
|
|
327
|
+
* number, or null if the heading is not found.
|
|
328
|
+
*/
|
|
329
|
+
getSectionText(source, level, title) {
|
|
330
|
+
const prefix = "#".repeat(level);
|
|
331
|
+
const heading = `${prefix} ${title}`;
|
|
332
|
+
const allLines = source.split(/\r?\n/);
|
|
333
|
+
const headingIdx = allLines.findIndex((l) => l.trim() === heading);
|
|
334
|
+
if (headingIdx < 0)
|
|
335
|
+
return null;
|
|
336
|
+
const sameOrHigher = new RegExp(`^#{1,${level}}\\s+`);
|
|
337
|
+
let endIdx = allLines.length;
|
|
338
|
+
for (let i = headingIdx + 1; i < allLines.length; i++) {
|
|
339
|
+
if (sameOrHigher.test(allLines[i].trim())) {
|
|
340
|
+
endIdx = i;
|
|
341
|
+
break;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
return {
|
|
345
|
+
lines: allLines.slice(headingIdx + 1, endIdx),
|
|
346
|
+
startLine: headingIdx + 2,
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Extract the original source lines that correspond to an AST node,
|
|
351
|
+
* using its `sourceRange`.
|
|
352
|
+
*
|
|
353
|
+
* Returns the same shape as `getSectionText` so that rules can switch
|
|
354
|
+
* seamlessly between section-level and node-level text processing.
|
|
355
|
+
*
|
|
356
|
+
* @param source - The full markdown source text
|
|
357
|
+
* @param node - An AST node with a non-null `sourceRange`
|
|
358
|
+
* @returns The source lines spanning the node and the 1-based start
|
|
359
|
+
* line number, or null if the node has no `sourceRange`.
|
|
360
|
+
*/
|
|
361
|
+
getNodeText(source, node) {
|
|
362
|
+
const range = node.sourceRange;
|
|
363
|
+
if (!range)
|
|
364
|
+
return null;
|
|
365
|
+
const allLines = source.split(/\r?\n/);
|
|
366
|
+
const startIdx = range.start.line - 1;
|
|
367
|
+
const endIdx = range.end.line - 1;
|
|
368
|
+
if (startIdx < 0 || endIdx >= allLines.length || startIdx > endIdx) {
|
|
369
|
+
return null;
|
|
370
|
+
}
|
|
371
|
+
return {
|
|
372
|
+
lines: allLines.slice(startIdx, endIdx + 1),
|
|
373
|
+
startLine: range.start.line,
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Get the logical text lines of a node by walking its AST.
|
|
378
|
+
*
|
|
379
|
+
* Unlike {@link getNodeText}, which returns verbatim source lines,
|
|
380
|
+
* this method merges soft-break wrapped lines into single logical
|
|
381
|
+
* lines. Hard line breaks (trailing double-space or backslash)
|
|
382
|
+
* still produce separate logical lines.
|
|
383
|
+
*
|
|
384
|
+
* For container nodes (list, item, block_quote, document) the
|
|
385
|
+
* method recurses into block-level children so that each
|
|
386
|
+
* paragraph / heading yields its own set of logical lines.
|
|
387
|
+
*
|
|
388
|
+
* @param source - The full markdown source text
|
|
389
|
+
* @param node - An AST node with a non-null `sourceRange`
|
|
390
|
+
* @returns Logical text lines and the 1-based start line number,
|
|
391
|
+
* or null if the node has no `sourceRange`.
|
|
392
|
+
*/
|
|
393
|
+
getLogicalLines(source, node) {
|
|
394
|
+
const range = node.sourceRange;
|
|
395
|
+
if (!range)
|
|
396
|
+
return null;
|
|
397
|
+
if (node.type === "paragraph" || node.type === "heading") {
|
|
398
|
+
const raw = this.getNodeText(source, node);
|
|
399
|
+
if (!raw)
|
|
400
|
+
return null;
|
|
401
|
+
return {
|
|
402
|
+
lines: this.mergeSoftWraps(raw.lines),
|
|
403
|
+
startLine: raw.startLine,
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
if (node.type === "code_block" || node.type === "html_block") {
|
|
407
|
+
return this.getNodeText(source, node);
|
|
408
|
+
}
|
|
409
|
+
if (node.type === "thematic_break" || node.type === "frontmatter") {
|
|
410
|
+
return null;
|
|
411
|
+
}
|
|
412
|
+
const lines = [];
|
|
413
|
+
let startLine = range.start.line;
|
|
414
|
+
let foundFirst = false;
|
|
415
|
+
for (const child of node.children) {
|
|
416
|
+
const childResult = this.getLogicalLines(source, child);
|
|
417
|
+
if (childResult) {
|
|
418
|
+
if (!foundFirst) {
|
|
419
|
+
startLine = childResult.startLine;
|
|
420
|
+
foundFirst = true;
|
|
421
|
+
}
|
|
422
|
+
lines.push(...childResult.lines);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
return { lines, startLine };
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* Flatten markdown list nodes into their direct item nodes.
|
|
429
|
+
*/
|
|
430
|
+
getBulletItems(listNodes) {
|
|
431
|
+
const items = [];
|
|
432
|
+
for (const listNode of listNodes) {
|
|
433
|
+
if (listNode.type !== "list")
|
|
434
|
+
continue;
|
|
435
|
+
for (const child of listNode.children) {
|
|
436
|
+
if (child.type === "item") {
|
|
437
|
+
items.push(child);
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
return items;
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* Extract a bullet item's first line in normalized "* " form.
|
|
445
|
+
*/
|
|
446
|
+
getItemBulletLine(source, item) {
|
|
447
|
+
if (item.type !== "item")
|
|
448
|
+
return null;
|
|
449
|
+
const nodeText = this.getNodeText(source, item);
|
|
450
|
+
if (!nodeText || nodeText.lines.length === 0)
|
|
451
|
+
return null;
|
|
452
|
+
const firstLine = nodeText.lines[0].trim();
|
|
453
|
+
if (!firstLine)
|
|
454
|
+
return null;
|
|
455
|
+
return {
|
|
456
|
+
text: firstLine.startsWith("* ") ? firstLine : `* ${firstLine}`,
|
|
457
|
+
startLine: nodeText.startLine,
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* Find the next sibling of `anchor` within `parent`'s children.
|
|
462
|
+
*
|
|
463
|
+
* If a predicate is given, skips siblings that don't match.
|
|
464
|
+
* Only looks forward (nodes after `anchor`), returns the first match.
|
|
465
|
+
*/
|
|
466
|
+
getNextSibling(parent, anchor, predicate) {
|
|
467
|
+
const children = parent.type === "document"
|
|
468
|
+
? this.getBodyChildren(parent)
|
|
469
|
+
: parent.children;
|
|
470
|
+
const idx = children.indexOf(anchor);
|
|
471
|
+
if (idx < 0 || idx + 1 >= children.length)
|
|
472
|
+
return null;
|
|
473
|
+
for (let i = idx + 1; i < children.length; i++) {
|
|
474
|
+
if (!predicate || predicate(children[i])) {
|
|
475
|
+
return children[i];
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
return null;
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Filter nodes by type from a flat node list.
|
|
482
|
+
*/
|
|
483
|
+
filterByType(nodes, type) {
|
|
484
|
+
return nodes.filter((n) => n.type === type);
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Check whether `parent` has a direct child matching the predicate
|
|
488
|
+
* at the given position.
|
|
489
|
+
*/
|
|
490
|
+
hasChild(parent, predicate, position = "any") {
|
|
491
|
+
const children = parent.children;
|
|
492
|
+
if (children.length === 0)
|
|
493
|
+
return false;
|
|
494
|
+
switch (position) {
|
|
495
|
+
case "first":
|
|
496
|
+
return predicate(children[0]);
|
|
497
|
+
case "last":
|
|
498
|
+
return predicate(children[children.length - 1]);
|
|
499
|
+
case "any":
|
|
500
|
+
return children.some(predicate);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Extract front-matter from the beginning of a markdown string.
|
|
505
|
+
*
|
|
506
|
+
* @returns An object containing the frontmatter MarkdownNode and
|
|
507
|
+
* the remaining body text, or null if no front-matter
|
|
508
|
+
* was found.
|
|
509
|
+
*/
|
|
510
|
+
extractFrontmatter(markdown) {
|
|
511
|
+
const match = markdown.match(FRONTMATTER_PATTERN);
|
|
512
|
+
if (!match) {
|
|
513
|
+
return null;
|
|
514
|
+
}
|
|
515
|
+
const fullMatch = match[0];
|
|
516
|
+
const yamlContent = match[1];
|
|
517
|
+
const linesBefore = fullMatch.split(/\r?\n/);
|
|
518
|
+
const endLine = linesBefore.length;
|
|
519
|
+
const endColumn = linesBefore[linesBefore.length - 1].length;
|
|
520
|
+
const sourceRange = {
|
|
521
|
+
start: { line: 1, column: 1 },
|
|
522
|
+
end: { line: endLine, column: endColumn },
|
|
523
|
+
};
|
|
524
|
+
let parsedData = null;
|
|
525
|
+
try {
|
|
526
|
+
const result = (0, yaml_1.parse)(yamlContent);
|
|
527
|
+
if (result !== null &&
|
|
528
|
+
typeof result === "object" &&
|
|
529
|
+
!Array.isArray(result)) {
|
|
530
|
+
parsedData = result;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
catch {
|
|
534
|
+
// YAML parse failure — keep data as null
|
|
535
|
+
}
|
|
536
|
+
const node = {
|
|
537
|
+
type: "frontmatter",
|
|
538
|
+
literal: yamlContent,
|
|
539
|
+
destination: null,
|
|
540
|
+
title: null,
|
|
541
|
+
info: null,
|
|
542
|
+
level: null,
|
|
543
|
+
listType: null,
|
|
544
|
+
listTight: null,
|
|
545
|
+
listStart: null,
|
|
546
|
+
listDelimiter: null,
|
|
547
|
+
data: parsedData,
|
|
548
|
+
sourceRange,
|
|
549
|
+
children: [],
|
|
550
|
+
};
|
|
551
|
+
const body = markdown.slice(fullMatch.length).replace(/^\r?\n/, "");
|
|
552
|
+
return { node, body };
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Shift all sourceRange line numbers in the subtree by `offset`.
|
|
556
|
+
* Used after frontmatter extraction so that body-node positions
|
|
557
|
+
* are absolute with respect to the original document.
|
|
558
|
+
*/
|
|
559
|
+
offsetSourceRanges(node, offset) {
|
|
560
|
+
if (node.sourceRange) {
|
|
561
|
+
node.sourceRange.start.line += offset;
|
|
562
|
+
node.sourceRange.end.line += offset;
|
|
563
|
+
}
|
|
564
|
+
for (const child of node.children) {
|
|
565
|
+
this.offsetSourceRanges(child, offset);
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
* Merge soft-wrapped source lines into logical lines.
|
|
570
|
+
*
|
|
571
|
+
* A line ending with two or more trailing spaces or a backslash is
|
|
572
|
+
* treated as a CommonMark hard line break — the logical line is
|
|
573
|
+
* split there. All other intra-paragraph newlines are soft breaks
|
|
574
|
+
* and are collapsed into a single space.
|
|
575
|
+
*
|
|
576
|
+
* Continuation indentation (leading whitespace on lines after the
|
|
577
|
+
* first) is stripped before merging so that list-item continuation
|
|
578
|
+
* and block-quote prefixes do not leak into the logical text.
|
|
579
|
+
*/
|
|
580
|
+
mergeSoftWraps(rawLines) {
|
|
581
|
+
if (rawLines.length <= 1)
|
|
582
|
+
return [...rawLines];
|
|
583
|
+
const result = [];
|
|
584
|
+
let buf = rawLines[0];
|
|
585
|
+
for (let i = 1; i < rawLines.length; i++) {
|
|
586
|
+
const isHardBreak = / {2,}$/.test(buf) || buf.endsWith("\\");
|
|
587
|
+
const cont = rawLines[i].replace(/^\s+/, "");
|
|
588
|
+
if (isHardBreak) {
|
|
589
|
+
result.push(buf.replace(/( {2,}|\\)$/, ""));
|
|
590
|
+
buf = cont;
|
|
591
|
+
}
|
|
592
|
+
else {
|
|
593
|
+
buf += " " + cont;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
if (buf) {
|
|
597
|
+
result.push(buf);
|
|
598
|
+
}
|
|
599
|
+
return result;
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* Internal recursive walk implementation
|
|
603
|
+
*/
|
|
604
|
+
walkNode(node, visitor) {
|
|
605
|
+
visitor(node, true);
|
|
606
|
+
for (const child of node.children) {
|
|
607
|
+
this.walkNode(child, visitor);
|
|
608
|
+
}
|
|
609
|
+
visitor(node, false);
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
exports.MarkdownParser = MarkdownParser;
|
|
613
|
+
//# sourceMappingURL=parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../../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