@gmb/bitmark-parser-generator 3.34.0 → 3.36.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/README.md +4 -4
- package/dist/browser/bitmark-parser-generator.min.js +1 -1
- package/dist/browser/bundle-report.html +2 -2
- package/dist/index.cjs +33650 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +7733 -0
- package/dist/index.d.ts +7733 -0
- package/dist/index.js +33590 -0
- package/dist/index.js.map +1 -0
- package/package.json +106 -90
- package/dist/cjs/BitmarkParserGenerator.js +0 -776
- package/dist/cjs/BitmarkParserGenerator.js.map +0 -1
- package/dist/cjs/ast/Ast.js +0 -220
- package/dist/cjs/ast/Ast.js.map +0 -1
- package/dist/cjs/ast/BaseBuilder.js +0 -193
- package/dist/cjs/ast/BaseBuilder.js.map +0 -1
- package/dist/cjs/ast/Builder.js +0 -1781
- package/dist/cjs/ast/Builder.js.map +0 -1
- package/dist/cjs/ast/ResourceBuilder.js +0 -963
- package/dist/cjs/ast/ResourceBuilder.js.map +0 -1
- package/dist/cjs/ast/rules/NodeValidator.js +0 -184
- package/dist/cjs/ast/rules/NodeValidator.js.map +0 -1
- package/dist/cjs/ast/writer/FileWriter.js +0 -119
- package/dist/cjs/ast/writer/FileWriter.js.map +0 -1
- package/dist/cjs/ast/writer/StreamWriter.js +0 -89
- package/dist/cjs/ast/writer/StreamWriter.js.map +0 -1
- package/dist/cjs/ast/writer/StringWriter.js +0 -115
- package/dist/cjs/ast/writer/StringWriter.js.map +0 -1
- package/dist/cjs/ast/writer/Writer.js +0 -3
- package/dist/cjs/ast/writer/Writer.js.map +0 -1
- package/dist/cjs/breakscaping/Breakscape.js +0 -80
- package/dist/cjs/breakscaping/Breakscape.js.map +0 -1
- package/dist/cjs/breakscaping/BreakscapeLoop.js +0 -305
- package/dist/cjs/breakscaping/BreakscapeLoop.js.map +0 -1
- package/dist/cjs/breakscaping/BreakscapeOptions.js +0 -3
- package/dist/cjs/breakscaping/BreakscapeOptions.js.map +0 -1
- package/dist/cjs/breakscaping/BreakscapeRegex.js +0 -213
- package/dist/cjs/breakscaping/BreakscapeRegex.js.map +0 -1
- package/dist/cjs/breakscaping/RegexConfigs.js +0 -38
- package/dist/cjs/breakscaping/RegexConfigs.js.map +0 -1
- package/dist/cjs/config/Config.js +0 -352
- package/dist/cjs/config/Config.js.map +0 -1
- package/dist/cjs/config/ConfigHydrator.js +0 -161
- package/dist/cjs/config/ConfigHydrator.js.map +0 -1
- package/dist/cjs/config/raw/bits.js +0 -2615
- package/dist/cjs/config/raw/bits.js.map +0 -1
- package/dist/cjs/config/raw/cardSets.js +0 -549
- package/dist/cjs/config/raw/cardSets.js.map +0 -1
- package/dist/cjs/config/raw/groups.js +0 -1182
- package/dist/cjs/config/raw/groups.js.map +0 -1
- package/dist/cjs/config/raw/properties.js +0 -1006
- package/dist/cjs/config/raw/properties.js.map +0 -1
- package/dist/cjs/config/raw/resources.js +0 -103
- package/dist/cjs/config/raw/resources.js.map +0 -1
- package/dist/cjs/config/raw/tags.js +0 -48
- package/dist/cjs/config/raw/tags.js.map +0 -1
- package/dist/cjs/generated/build-info.js +0 -13
- package/dist/cjs/generated/build-info.js.map +0 -1
- package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js +0 -3168
- package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js.map +0 -1
- package/dist/cjs/generated/parser/text/text-peggy-parser.js +0 -9659
- package/dist/cjs/generated/parser/text/text-peggy-parser.js.map +0 -1
- package/dist/cjs/generator/AstWalkerGenerator.js +0 -86
- package/dist/cjs/generator/AstWalkerGenerator.js.map +0 -1
- package/dist/cjs/generator/Generator.js +0 -3
- package/dist/cjs/generator/Generator.js.map +0 -1
- package/dist/cjs/generator/bitmark/BitmarkFileGenerator.js +0 -49
- package/dist/cjs/generator/bitmark/BitmarkFileGenerator.js.map +0 -1
- package/dist/cjs/generator/bitmark/BitmarkGenerator.js +0 -2601
- package/dist/cjs/generator/bitmark/BitmarkGenerator.js.map +0 -1
- package/dist/cjs/generator/bitmark/BitmarkStringGenerator.js +0 -51
- package/dist/cjs/generator/bitmark/BitmarkStringGenerator.js.map +0 -1
- package/dist/cjs/generator/json/JsonFileGenerator.js +0 -53
- package/dist/cjs/generator/json/JsonFileGenerator.js.map +0 -1
- package/dist/cjs/generator/json/JsonGenerator.js +0 -1584
- package/dist/cjs/generator/json/JsonGenerator.js.map +0 -1
- package/dist/cjs/generator/json/JsonObjectGenerator.js +0 -51
- package/dist/cjs/generator/json/JsonObjectGenerator.js.map +0 -1
- package/dist/cjs/generator/json/JsonStringGenerator.js +0 -50
- package/dist/cjs/generator/json/JsonStringGenerator.js.map +0 -1
- package/dist/cjs/generator/text/TextGenerator.js +0 -1199
- package/dist/cjs/generator/text/TextGenerator.js.map +0 -1
- package/dist/cjs/index.js +0 -79
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/info/InfoBuilder.js +0 -43
- package/dist/cjs/info/InfoBuilder.js.map +0 -1
- package/dist/cjs/init/init.js +0 -15
- package/dist/cjs/init/init.js.map +0 -1
- package/dist/cjs/model/ast/BreakscapedString.js +0 -3
- package/dist/cjs/model/ast/BreakscapedString.js.map +0 -1
- package/dist/cjs/model/ast/NodeType.js +0 -557
- package/dist/cjs/model/ast/NodeType.js.map +0 -1
- package/dist/cjs/model/ast/Nodes.js +0 -3
- package/dist/cjs/model/ast/Nodes.js.map +0 -1
- package/dist/cjs/model/ast/StardardString.js +0 -3
- package/dist/cjs/model/ast/StardardString.js.map +0 -1
- package/dist/cjs/model/ast/TextNodes.js +0 -3
- package/dist/cjs/model/ast/TextNodes.js.map +0 -1
- package/dist/cjs/model/config/AbstractTagConfig.js +0 -18
- package/dist/cjs/model/config/AbstractTagConfig.js.map +0 -1
- package/dist/cjs/model/config/BitConfig.js +0 -72
- package/dist/cjs/model/config/BitConfig.js.map +0 -1
- package/dist/cjs/model/config/CardSetConfig.js +0 -26
- package/dist/cjs/model/config/CardSetConfig.js.map +0 -1
- package/dist/cjs/model/config/CardVariantConfig.js +0 -32
- package/dist/cjs/model/config/CardVariantConfig.js.map +0 -1
- package/dist/cjs/model/config/MarkupTagConfig.js +0 -41
- package/dist/cjs/model/config/MarkupTagConfig.js.map +0 -1
- package/dist/cjs/model/config/PropertyTagConfig.js +0 -50
- package/dist/cjs/model/config/PropertyTagConfig.js.map +0 -1
- package/dist/cjs/model/config/ResourceTagConfig.js +0 -42
- package/dist/cjs/model/config/ResourceTagConfig.js.map +0 -1
- package/dist/cjs/model/config/ResourcesConfig.js +0 -31
- package/dist/cjs/model/config/ResourcesConfig.js.map +0 -1
- package/dist/cjs/model/config/TagConfig.js +0 -3
- package/dist/cjs/model/config/TagConfig.js.map +0 -1
- package/dist/cjs/model/config/TagsConfig.js +0 -3
- package/dist/cjs/model/config/TagsConfig.js.map +0 -1
- package/dist/cjs/model/config/TagsConfigWithInfo.js +0 -3
- package/dist/cjs/model/config/TagsConfigWithInfo.js.map +0 -1
- package/dist/cjs/model/config/_Config.js +0 -3
- package/dist/cjs/model/config/_Config.js.map +0 -1
- package/dist/cjs/model/config/enum/CardSetConfigKey.js +0 -28
- package/dist/cjs/model/config/enum/CardSetConfigKey.js.map +0 -1
- package/dist/cjs/model/config/enum/ConfigKey.js +0 -29
- package/dist/cjs/model/config/enum/ConfigKey.js.map +0 -1
- package/dist/cjs/model/config/enum/GroupConfigKey.js +0 -57
- package/dist/cjs/model/config/enum/GroupConfigKey.js.map +0 -1
- package/dist/cjs/model/config/enum/GroupConfigType.js +0 -14
- package/dist/cjs/model/config/enum/GroupConfigType.js.map +0 -1
- package/dist/cjs/model/config/enum/PropertyConfigKey.js +0 -215
- package/dist/cjs/model/config/enum/PropertyConfigKey.js.map +0 -1
- package/dist/cjs/model/config/enum/ResourceConfigKey.js +0 -40
- package/dist/cjs/model/config/enum/ResourceConfigKey.js.map +0 -1
- package/dist/cjs/model/config/enum/TagConfigKey.js +0 -26
- package/dist/cjs/model/config/enum/TagConfigKey.js.map +0 -1
- package/dist/cjs/model/enum/BitTagType.js +0 -13
- package/dist/cjs/model/enum/BitTagType.js.map +0 -1
- package/dist/cjs/model/enum/BitType.js +0 -576
- package/dist/cjs/model/enum/BitType.js.map +0 -1
- package/dist/cjs/model/enum/BitmarkGeneratorOutput.js +0 -2
- package/dist/cjs/model/enum/BitmarkGeneratorOutput.js.map +0 -1
- package/dist/cjs/model/enum/BitmarkParserType.js +0 -9
- package/dist/cjs/model/enum/BitmarkParserType.js.map +0 -1
- package/dist/cjs/model/enum/BitmarkVersion.js +0 -12
- package/dist/cjs/model/enum/BitmarkVersion.js.map +0 -1
- package/dist/cjs/model/enum/BodyBitType.js +0 -14
- package/dist/cjs/model/enum/BodyBitType.js.map +0 -1
- package/dist/cjs/model/enum/BodyTextFormat.js +0 -14
- package/dist/cjs/model/enum/BodyTextFormat.js.map +0 -1
- package/dist/cjs/model/enum/CardSetVersion.js +0 -10
- package/dist/cjs/model/enum/CardSetVersion.js.map +0 -1
- package/dist/cjs/model/enum/Count.js +0 -9
- package/dist/cjs/model/enum/Count.js.map +0 -1
- package/dist/cjs/model/enum/DeprecatedTextFormat.js +0 -9
- package/dist/cjs/model/enum/DeprecatedTextFormat.js.map +0 -1
- package/dist/cjs/model/enum/ExampleType.js +0 -11
- package/dist/cjs/model/enum/ExampleType.js.map +0 -1
- package/dist/cjs/model/enum/PropertyAstKey.js +0 -18
- package/dist/cjs/model/enum/PropertyAstKey.js.map +0 -1
- package/dist/cjs/model/enum/PropertyFormat.js +0 -14
- package/dist/cjs/model/enum/PropertyFormat.js.map +0 -1
- package/dist/cjs/model/enum/PropertyJsonKey.js +0 -14
- package/dist/cjs/model/enum/PropertyJsonKey.js.map +0 -1
- package/dist/cjs/model/enum/PropertyTag.js +0 -8
- package/dist/cjs/model/enum/PropertyTag.js.map +0 -1
- package/dist/cjs/model/enum/ResourceJsonKey.js +0 -27
- package/dist/cjs/model/enum/ResourceJsonKey.js.map +0 -1
- package/dist/cjs/model/enum/ResourceTag.js +0 -37
- package/dist/cjs/model/enum/ResourceTag.js.map +0 -1
- package/dist/cjs/model/enum/Tag.js +0 -21
- package/dist/cjs/model/enum/Tag.js.map +0 -1
- package/dist/cjs/model/enum/TextFormat.js +0 -16
- package/dist/cjs/model/enum/TextFormat.js.map +0 -1
- package/dist/cjs/model/enum/TextLocation.js +0 -15
- package/dist/cjs/model/enum/TextLocation.js.map +0 -1
- package/dist/cjs/model/enum/TextMarkType.js +0 -54
- package/dist/cjs/model/enum/TextMarkType.js.map +0 -1
- package/dist/cjs/model/enum/TextNodeType.js +0 -35
- package/dist/cjs/model/enum/TextNodeType.js.map +0 -1
- package/dist/cjs/model/enum/TextSection.js +0 -18
- package/dist/cjs/model/enum/TextSection.js.map +0 -1
- package/dist/cjs/model/info/enum/InfoFormat.js +0 -11
- package/dist/cjs/model/info/enum/InfoFormat.js.map +0 -1
- package/dist/cjs/model/info/enum/InfoType.js +0 -12
- package/dist/cjs/model/info/enum/InfoType.js.map +0 -1
- package/dist/cjs/model/json/BitJson.js +0 -3
- package/dist/cjs/model/json/BitJson.js.map +0 -1
- package/dist/cjs/model/json/BitWrapperJson.js +0 -3
- package/dist/cjs/model/json/BitWrapperJson.js.map +0 -1
- package/dist/cjs/model/json/BodyBitJson.js +0 -3
- package/dist/cjs/model/json/BodyBitJson.js.map +0 -1
- package/dist/cjs/model/json/ParserJson.js +0 -3
- package/dist/cjs/model/json/ParserJson.js.map +0 -1
- package/dist/cjs/model/json/ResourceJson.js +0 -3
- package/dist/cjs/model/json/ResourceJson.js.map +0 -1
- package/dist/cjs/model/parser/ParserData.js +0 -3
- package/dist/cjs/model/parser/ParserData.js.map +0 -1
- package/dist/cjs/model/parser/ParserError.js +0 -3
- package/dist/cjs/model/parser/ParserError.js.map +0 -1
- package/dist/cjs/model/parser/ParserInfo.js +0 -3
- package/dist/cjs/model/parser/ParserInfo.js.map +0 -1
- package/dist/cjs/model/parser/ParserLocation.js +0 -3
- package/dist/cjs/model/parser/ParserLocation.js.map +0 -1
- package/dist/cjs/model/parser/ParserLocationRange.js +0 -3
- package/dist/cjs/model/parser/ParserLocationRange.js.map +0 -1
- package/dist/cjs/model/parser/TagValidationData.js +0 -3
- package/dist/cjs/model/parser/TagValidationData.js.map +0 -1
- package/dist/cjs/parser/bitmark/BitmarkParser.js +0 -25
- package/dist/cjs/parser/bitmark/BitmarkParser.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParser.js +0 -7
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParser.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js +0 -614
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js +0 -716
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js +0 -69
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js +0 -745
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/PeggyGrammarLocation.js +0 -82
- package/dist/cjs/parser/bitmark/peg/PeggyGrammarLocation.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js +0 -260
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +0 -50
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +0 -885
- package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +0 -27
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js +0 -61
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +0 -63
- package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +0 -161
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js +0 -55
- package/dist/cjs/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +0 -31
- package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +0 -59
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js +0 -16
- package/dist/cjs/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js +0 -29
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +0 -20
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js +0 -45
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +0 -44
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js +0 -11
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js +0 -57
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +0 -158
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js +0 -37
- package/dist/cjs/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +0 -24
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +0 -163
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js +0 -27
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js +0 -28
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +0 -53
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +0 -203
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +0 -24
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/json/JsonParser.js +0 -270
- package/dist/cjs/parser/json/JsonParser.js.map +0 -1
- package/dist/cjs/parser/text/TextParser.js +0 -148
- package/dist/cjs/parser/text/TextParser.js.map +0 -1
- package/dist/cjs/parser/text/peg/TextPegParser.js +0 -7
- package/dist/cjs/parser/text/peg/TextPegParser.js.map +0 -1
- package/dist/cjs/utils/ArrayUtils.js +0 -43
- package/dist/cjs/utils/ArrayUtils.js.map +0 -1
- package/dist/cjs/utils/BitUtils.js +0 -75
- package/dist/cjs/utils/BitUtils.js.map +0 -1
- package/dist/cjs/utils/BooleanUtils.js +0 -62
- package/dist/cjs/utils/BooleanUtils.js.map +0 -1
- package/dist/cjs/utils/FileUtils.js +0 -75
- package/dist/cjs/utils/FileUtils.js.map +0 -1
- package/dist/cjs/utils/NumberUtils.js +0 -62
- package/dist/cjs/utils/NumberUtils.js.map +0 -1
- package/dist/cjs/utils/ObjectUtils.js +0 -417
- package/dist/cjs/utils/ObjectUtils.js.map +0 -1
- package/dist/cjs/utils/StringUtils.js +0 -183
- package/dist/cjs/utils/StringUtils.js.map +0 -1
- package/dist/cjs/utils/UrlUtils.js +0 -37
- package/dist/cjs/utils/UrlUtils.js.map +0 -1
- package/dist/cjs/utils/env/Env.js +0 -131
- package/dist/cjs/utils/env/Env.js.map +0 -1
- package/dist/cjs/utils/env/Environment.js +0 -15
- package/dist/cjs/utils/env/Environment.js.map +0 -1
- package/dist/cjs/utils/env/Os.js +0 -14
- package/dist/cjs/utils/env/Os.js.map +0 -1
- package/dist/cjs/utils/env/Version.js +0 -12
- package/dist/cjs/utils/env/Version.js.map +0 -1
- package/dist/cjs/utils/env/userAgent.js +0 -88
- package/dist/cjs/utils/env/userAgent.js.map +0 -1
- package/dist/cjs/utils/polyfill/fs.js +0 -14
- package/dist/cjs/utils/polyfill/fs.js.map +0 -1
- package/dist/esm/BitmarkParserGenerator.js +0 -735
- package/dist/esm/BitmarkParserGenerator.js.map +0 -1
- package/dist/esm/ast/Ast.js +0 -217
- package/dist/esm/ast/Ast.js.map +0 -1
- package/dist/esm/ast/BaseBuilder.js +0 -190
- package/dist/esm/ast/BaseBuilder.js.map +0 -1
- package/dist/esm/ast/Builder.js +0 -1775
- package/dist/esm/ast/Builder.js.map +0 -1
- package/dist/esm/ast/ResourceBuilder.js +0 -960
- package/dist/esm/ast/ResourceBuilder.js.map +0 -1
- package/dist/esm/ast/rules/NodeValidator.js +0 -181
- package/dist/esm/ast/rules/NodeValidator.js.map +0 -1
- package/dist/esm/ast/writer/FileWriter.js +0 -80
- package/dist/esm/ast/writer/FileWriter.js.map +0 -1
- package/dist/esm/ast/writer/StreamWriter.js +0 -83
- package/dist/esm/ast/writer/StreamWriter.js.map +0 -1
- package/dist/esm/ast/writer/StringWriter.js +0 -112
- package/dist/esm/ast/writer/StringWriter.js.map +0 -1
- package/dist/esm/ast/writer/Writer.js +0 -2
- package/dist/esm/ast/writer/Writer.js.map +0 -1
- package/dist/esm/breakscaping/Breakscape.js +0 -77
- package/dist/esm/breakscaping/Breakscape.js.map +0 -1
- package/dist/esm/breakscaping/BreakscapeLoop.js +0 -302
- package/dist/esm/breakscaping/BreakscapeLoop.js.map +0 -1
- package/dist/esm/breakscaping/BreakscapeOptions.js +0 -2
- package/dist/esm/breakscaping/BreakscapeOptions.js.map +0 -1
- package/dist/esm/breakscaping/BreakscapeRegex.js +0 -177
- package/dist/esm/breakscaping/BreakscapeRegex.js.map +0 -1
- package/dist/esm/breakscaping/RegexConfigs.js +0 -35
- package/dist/esm/breakscaping/RegexConfigs.js.map +0 -1
- package/dist/esm/config/Config.js +0 -349
- package/dist/esm/config/Config.js.map +0 -1
- package/dist/esm/config/ConfigHydrator.js +0 -158
- package/dist/esm/config/ConfigHydrator.js.map +0 -1
- package/dist/esm/config/raw/bits.js +0 -2612
- package/dist/esm/config/raw/bits.js.map +0 -1
- package/dist/esm/config/raw/cardSets.js +0 -546
- package/dist/esm/config/raw/cardSets.js.map +0 -1
- package/dist/esm/config/raw/groups.js +0 -1179
- package/dist/esm/config/raw/groups.js.map +0 -1
- package/dist/esm/config/raw/properties.js +0 -1003
- package/dist/esm/config/raw/properties.js.map +0 -1
- package/dist/esm/config/raw/resources.js +0 -100
- package/dist/esm/config/raw/resources.js.map +0 -1
- package/dist/esm/config/raw/tags.js +0 -45
- package/dist/esm/config/raw/tags.js.map +0 -1
- package/dist/esm/generated/build-info.js +0 -10
- package/dist/esm/generated/build-info.js.map +0 -1
- package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js +0 -3163
- package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js.map +0 -1
- package/dist/esm/generated/parser/text/text-peggy-parser.js +0 -9654
- package/dist/esm/generated/parser/text/text-peggy-parser.js.map +0 -1
- package/dist/esm/generator/AstWalkerGenerator.js +0 -83
- package/dist/esm/generator/AstWalkerGenerator.js.map +0 -1
- package/dist/esm/generator/Generator.js +0 -2
- package/dist/esm/generator/Generator.js.map +0 -1
- package/dist/esm/generator/bitmark/BitmarkFileGenerator.js +0 -46
- package/dist/esm/generator/bitmark/BitmarkFileGenerator.js.map +0 -1
- package/dist/esm/generator/bitmark/BitmarkGenerator.js +0 -2598
- package/dist/esm/generator/bitmark/BitmarkGenerator.js.map +0 -1
- package/dist/esm/generator/bitmark/BitmarkStringGenerator.js +0 -48
- package/dist/esm/generator/bitmark/BitmarkStringGenerator.js.map +0 -1
- package/dist/esm/generator/json/JsonFileGenerator.js +0 -50
- package/dist/esm/generator/json/JsonFileGenerator.js.map +0 -1
- package/dist/esm/generator/json/JsonGenerator.js +0 -1578
- package/dist/esm/generator/json/JsonGenerator.js.map +0 -1
- package/dist/esm/generator/json/JsonObjectGenerator.js +0 -48
- package/dist/esm/generator/json/JsonObjectGenerator.js.map +0 -1
- package/dist/esm/generator/json/JsonStringGenerator.js +0 -47
- package/dist/esm/generator/json/JsonStringGenerator.js.map +0 -1
- package/dist/esm/generator/text/TextGenerator.js +0 -1196
- package/dist/esm/generator/text/TextGenerator.js.map +0 -1
- package/dist/esm/index.js +0 -49
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/info/InfoBuilder.js +0 -40
- package/dist/esm/info/InfoBuilder.js.map +0 -1
- package/dist/esm/init/init.js +0 -13
- package/dist/esm/init/init.js.map +0 -1
- package/dist/esm/model/ast/BreakscapedString.js +0 -2
- package/dist/esm/model/ast/BreakscapedString.js.map +0 -1
- package/dist/esm/model/ast/NodeType.js +0 -554
- package/dist/esm/model/ast/NodeType.js.map +0 -1
- package/dist/esm/model/ast/Nodes.js +0 -2
- package/dist/esm/model/ast/Nodes.js.map +0 -1
- package/dist/esm/model/ast/StardardString.js +0 -2
- package/dist/esm/model/ast/StardardString.js.map +0 -1
- package/dist/esm/model/ast/TextNodes.js +0 -2
- package/dist/esm/model/ast/TextNodes.js.map +0 -1
- package/dist/esm/model/config/AbstractTagConfig.js +0 -15
- package/dist/esm/model/config/AbstractTagConfig.js.map +0 -1
- package/dist/esm/model/config/BitConfig.js +0 -69
- package/dist/esm/model/config/BitConfig.js.map +0 -1
- package/dist/esm/model/config/CardSetConfig.js +0 -23
- package/dist/esm/model/config/CardSetConfig.js.map +0 -1
- package/dist/esm/model/config/CardVariantConfig.js +0 -29
- package/dist/esm/model/config/CardVariantConfig.js.map +0 -1
- package/dist/esm/model/config/MarkupTagConfig.js +0 -38
- package/dist/esm/model/config/MarkupTagConfig.js.map +0 -1
- package/dist/esm/model/config/PropertyTagConfig.js +0 -47
- package/dist/esm/model/config/PropertyTagConfig.js.map +0 -1
- package/dist/esm/model/config/ResourceTagConfig.js +0 -39
- package/dist/esm/model/config/ResourceTagConfig.js.map +0 -1
- package/dist/esm/model/config/ResourcesConfig.js +0 -28
- package/dist/esm/model/config/ResourcesConfig.js.map +0 -1
- package/dist/esm/model/config/TagConfig.js +0 -2
- package/dist/esm/model/config/TagConfig.js.map +0 -1
- package/dist/esm/model/config/TagsConfig.js +0 -2
- package/dist/esm/model/config/TagsConfig.js.map +0 -1
- package/dist/esm/model/config/TagsConfigWithInfo.js +0 -2
- package/dist/esm/model/config/TagsConfigWithInfo.js.map +0 -1
- package/dist/esm/model/config/_Config.js +0 -2
- package/dist/esm/model/config/_Config.js.map +0 -1
- package/dist/esm/model/config/enum/CardSetConfigKey.js +0 -25
- package/dist/esm/model/config/enum/CardSetConfigKey.js.map +0 -1
- package/dist/esm/model/config/enum/ConfigKey.js +0 -26
- package/dist/esm/model/config/enum/ConfigKey.js.map +0 -1
- package/dist/esm/model/config/enum/GroupConfigKey.js +0 -53
- package/dist/esm/model/config/enum/GroupConfigKey.js.map +0 -1
- package/dist/esm/model/config/enum/GroupConfigType.js +0 -11
- package/dist/esm/model/config/enum/GroupConfigType.js.map +0 -1
- package/dist/esm/model/config/enum/PropertyConfigKey.js +0 -211
- package/dist/esm/model/config/enum/PropertyConfigKey.js.map +0 -1
- package/dist/esm/model/config/enum/ResourceConfigKey.js +0 -36
- package/dist/esm/model/config/enum/ResourceConfigKey.js.map +0 -1
- package/dist/esm/model/config/enum/TagConfigKey.js +0 -22
- package/dist/esm/model/config/enum/TagConfigKey.js.map +0 -1
- package/dist/esm/model/enum/BitTagType.js +0 -10
- package/dist/esm/model/enum/BitTagType.js.map +0 -1
- package/dist/esm/model/enum/BitType.js +0 -573
- package/dist/esm/model/enum/BitType.js.map +0 -1
- package/dist/esm/model/enum/BitmarkGeneratorOutput.js +0 -2
- package/dist/esm/model/enum/BitmarkGeneratorOutput.js.map +0 -1
- package/dist/esm/model/enum/BitmarkParserType.js +0 -6
- package/dist/esm/model/enum/BitmarkParserType.js.map +0 -1
- package/dist/esm/model/enum/BitmarkVersion.js +0 -8
- package/dist/esm/model/enum/BitmarkVersion.js.map +0 -1
- package/dist/esm/model/enum/BodyBitType.js +0 -11
- package/dist/esm/model/enum/BodyBitType.js.map +0 -1
- package/dist/esm/model/enum/BodyTextFormat.js +0 -11
- package/dist/esm/model/enum/BodyTextFormat.js.map +0 -1
- package/dist/esm/model/enum/CardSetVersion.js +0 -7
- package/dist/esm/model/enum/CardSetVersion.js.map +0 -1
- package/dist/esm/model/enum/Count.js +0 -6
- package/dist/esm/model/enum/Count.js.map +0 -1
- package/dist/esm/model/enum/DeprecatedTextFormat.js +0 -6
- package/dist/esm/model/enum/DeprecatedTextFormat.js.map +0 -1
- package/dist/esm/model/enum/ExampleType.js +0 -8
- package/dist/esm/model/enum/ExampleType.js.map +0 -1
- package/dist/esm/model/enum/PropertyAstKey.js +0 -15
- package/dist/esm/model/enum/PropertyAstKey.js.map +0 -1
- package/dist/esm/model/enum/PropertyFormat.js +0 -11
- package/dist/esm/model/enum/PropertyFormat.js.map +0 -1
- package/dist/esm/model/enum/PropertyJsonKey.js +0 -11
- package/dist/esm/model/enum/PropertyJsonKey.js.map +0 -1
- package/dist/esm/model/enum/PropertyTag.js +0 -5
- package/dist/esm/model/enum/PropertyTag.js.map +0 -1
- package/dist/esm/model/enum/ResourceJsonKey.js +0 -24
- package/dist/esm/model/enum/ResourceJsonKey.js.map +0 -1
- package/dist/esm/model/enum/ResourceTag.js +0 -34
- package/dist/esm/model/enum/ResourceTag.js.map +0 -1
- package/dist/esm/model/enum/Tag.js +0 -18
- package/dist/esm/model/enum/Tag.js.map +0 -1
- package/dist/esm/model/enum/TextFormat.js +0 -13
- package/dist/esm/model/enum/TextFormat.js.map +0 -1
- package/dist/esm/model/enum/TextLocation.js +0 -12
- package/dist/esm/model/enum/TextLocation.js.map +0 -1
- package/dist/esm/model/enum/TextMarkType.js +0 -51
- package/dist/esm/model/enum/TextMarkType.js.map +0 -1
- package/dist/esm/model/enum/TextNodeType.js +0 -32
- package/dist/esm/model/enum/TextNodeType.js.map +0 -1
- package/dist/esm/model/enum/TextSection.js +0 -15
- package/dist/esm/model/enum/TextSection.js.map +0 -1
- package/dist/esm/model/info/enum/InfoFormat.js +0 -8
- package/dist/esm/model/info/enum/InfoFormat.js.map +0 -1
- package/dist/esm/model/info/enum/InfoType.js +0 -9
- package/dist/esm/model/info/enum/InfoType.js.map +0 -1
- package/dist/esm/model/json/BitJson.js +0 -2
- package/dist/esm/model/json/BitJson.js.map +0 -1
- package/dist/esm/model/json/BitWrapperJson.js +0 -2
- package/dist/esm/model/json/BitWrapperJson.js.map +0 -1
- package/dist/esm/model/json/BodyBitJson.js +0 -2
- package/dist/esm/model/json/BodyBitJson.js.map +0 -1
- package/dist/esm/model/json/ParserJson.js +0 -2
- package/dist/esm/model/json/ParserJson.js.map +0 -1
- package/dist/esm/model/json/ResourceJson.js +0 -2
- package/dist/esm/model/json/ResourceJson.js.map +0 -1
- package/dist/esm/model/parser/ParserData.js +0 -2
- package/dist/esm/model/parser/ParserData.js.map +0 -1
- package/dist/esm/model/parser/ParserError.js +0 -2
- package/dist/esm/model/parser/ParserError.js.map +0 -1
- package/dist/esm/model/parser/ParserInfo.js +0 -2
- package/dist/esm/model/parser/ParserInfo.js.map +0 -1
- package/dist/esm/model/parser/ParserLocation.js +0 -2
- package/dist/esm/model/parser/ParserLocation.js.map +0 -1
- package/dist/esm/model/parser/ParserLocationRange.js +0 -2
- package/dist/esm/model/parser/ParserLocationRange.js.map +0 -1
- package/dist/esm/model/parser/TagValidationData.js +0 -2
- package/dist/esm/model/parser/TagValidationData.js.map +0 -1
- package/dist/esm/parser/bitmark/BitmarkParser.js +0 -22
- package/dist/esm/parser/bitmark/BitmarkParser.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParser.js +0 -4
- package/dist/esm/parser/bitmark/peg/BitmarkPegParser.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js +0 -611
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js +0 -713
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js +0 -59
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js +0 -742
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/PeggyGrammarLocation.js +0 -79
- package/dist/esm/parser/bitmark/peg/PeggyGrammarLocation.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js +0 -257
- package/dist/esm/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +0 -48
- package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +0 -883
- package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +0 -25
- package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js +0 -58
- package/dist/esm/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +0 -61
- package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +0 -159
- package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js +0 -52
- package/dist/esm/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +0 -29
- package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +0 -57
- package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js +0 -14
- package/dist/esm/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js +0 -27
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +0 -18
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js +0 -43
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +0 -42
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js +0 -9
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js +0 -55
- package/dist/esm/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +0 -156
- package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js +0 -35
- package/dist/esm/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +0 -22
- package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +0 -160
- package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js +0 -25
- package/dist/esm/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js +0 -26
- package/dist/esm/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +0 -50
- package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +0 -201
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +0 -22
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/json/JsonParser.js +0 -267
- package/dist/esm/parser/json/JsonParser.js.map +0 -1
- package/dist/esm/parser/text/TextParser.js +0 -145
- package/dist/esm/parser/text/TextParser.js.map +0 -1
- package/dist/esm/parser/text/peg/TextPegParser.js +0 -4
- package/dist/esm/parser/text/peg/TextPegParser.js.map +0 -1
- package/dist/esm/utils/ArrayUtils.js +0 -40
- package/dist/esm/utils/ArrayUtils.js.map +0 -1
- package/dist/esm/utils/BitUtils.js +0 -72
- package/dist/esm/utils/BitUtils.js.map +0 -1
- package/dist/esm/utils/BooleanUtils.js +0 -59
- package/dist/esm/utils/BooleanUtils.js.map +0 -1
- package/dist/esm/utils/FileUtils.js +0 -36
- package/dist/esm/utils/FileUtils.js.map +0 -1
- package/dist/esm/utils/NumberUtils.js +0 -59
- package/dist/esm/utils/NumberUtils.js.map +0 -1
- package/dist/esm/utils/ObjectUtils.js +0 -411
- package/dist/esm/utils/ObjectUtils.js.map +0 -1
- package/dist/esm/utils/StringUtils.js +0 -180
- package/dist/esm/utils/StringUtils.js.map +0 -1
- package/dist/esm/utils/UrlUtils.js +0 -34
- package/dist/esm/utils/UrlUtils.js.map +0 -1
- package/dist/esm/utils/env/Env.js +0 -127
- package/dist/esm/utils/env/Env.js.map +0 -1
- package/dist/esm/utils/env/Environment.js +0 -12
- package/dist/esm/utils/env/Environment.js.map +0 -1
- package/dist/esm/utils/env/Os.js +0 -11
- package/dist/esm/utils/env/Os.js.map +0 -1
- package/dist/esm/utils/env/Version.js +0 -9
- package/dist/esm/utils/env/Version.js.map +0 -1
- package/dist/esm/utils/env/userAgent.js +0 -86
- package/dist/esm/utils/env/userAgent.js.map +0 -1
- package/dist/esm/utils/polyfill/fs.js +0 -10
- package/dist/esm/utils/polyfill/fs.js.map +0 -1
- package/dist/types/BitmarkParserGenerator.d.ts +0 -478
- package/dist/types/BitmarkParserGenerator.d.ts.map +0 -1
- package/dist/types/ast/Ast.d.ts +0 -137
- package/dist/types/ast/Ast.d.ts.map +0 -1
- package/dist/types/ast/BaseBuilder.d.ts +0 -64
- package/dist/types/ast/BaseBuilder.d.ts.map +0 -1
- package/dist/types/ast/Builder.d.ts +0 -692
- package/dist/types/ast/Builder.d.ts.map +0 -1
- package/dist/types/ast/ResourceBuilder.d.ts +0 -384
- package/dist/types/ast/ResourceBuilder.d.ts.map +0 -1
- package/dist/types/ast/rules/NodeValidator.d.ts +0 -28
- package/dist/types/ast/rules/NodeValidator.d.ts.map +0 -1
- package/dist/types/ast/writer/FileWriter.d.ts +0 -37
- package/dist/types/ast/writer/FileWriter.d.ts.map +0 -1
- package/dist/types/ast/writer/StreamWriter.d.ts +0 -29
- package/dist/types/ast/writer/StreamWriter.d.ts.map +0 -1
- package/dist/types/ast/writer/StringWriter.d.ts +0 -30
- package/dist/types/ast/writer/StringWriter.d.ts.map +0 -1
- package/dist/types/ast/writer/Writer.d.ts +0 -72
- package/dist/types/ast/writer/Writer.d.ts.map +0 -1
- package/dist/types/breakscaping/Breakscape.d.ts +0 -44
- package/dist/types/breakscaping/Breakscape.d.ts.map +0 -1
- package/dist/types/breakscaping/BreakscapeLoop.d.ts +0 -142
- package/dist/types/breakscaping/BreakscapeLoop.d.ts.map +0 -1
- package/dist/types/breakscaping/BreakscapeOptions.d.ts +0 -30
- package/dist/types/breakscaping/BreakscapeOptions.d.ts.map +0 -1
- package/dist/types/breakscaping/BreakscapeRegex.d.ts +0 -96
- package/dist/types/breakscaping/BreakscapeRegex.d.ts.map +0 -1
- package/dist/types/breakscaping/RegexConfigs.d.ts +0 -35
- package/dist/types/breakscaping/RegexConfigs.d.ts.map +0 -1
- package/dist/types/config/Config.d.ts +0 -115
- package/dist/types/config/Config.d.ts.map +0 -1
- package/dist/types/config/ConfigHydrator.d.ts +0 -16
- package/dist/types/config/ConfigHydrator.d.ts.map +0 -1
- package/dist/types/config/raw/bits.d.ts +0 -4
- package/dist/types/config/raw/bits.d.ts.map +0 -1
- package/dist/types/config/raw/cardSets.d.ts +0 -4
- package/dist/types/config/raw/cardSets.d.ts.map +0 -1
- package/dist/types/config/raw/groups.d.ts +0 -4
- package/dist/types/config/raw/groups.d.ts.map +0 -1
- package/dist/types/config/raw/properties.d.ts +0 -4
- package/dist/types/config/raw/properties.d.ts.map +0 -1
- package/dist/types/config/raw/resources.d.ts +0 -4
- package/dist/types/config/raw/resources.d.ts.map +0 -1
- package/dist/types/config/raw/tags.d.ts +0 -4
- package/dist/types/config/raw/tags.d.ts.map +0 -1
- package/dist/types/generated/build-info.d.ts +0 -8
- package/dist/types/generated/build-info.d.ts.map +0 -1
- package/dist/types/generated/parser/bitmark/bitmark-peggy-parser.d.ts +0 -12
- package/dist/types/generated/parser/bitmark/bitmark-peggy-parser.d.ts.map +0 -1
- package/dist/types/generated/parser/text/text-peggy-parser.d.ts +0 -12
- package/dist/types/generated/parser/text/text-peggy-parser.d.ts.map +0 -1
- package/dist/types/generator/AstWalkerGenerator.d.ts +0 -32
- package/dist/types/generator/AstWalkerGenerator.d.ts.map +0 -1
- package/dist/types/generator/Generator.d.ts +0 -6
- package/dist/types/generator/Generator.d.ts.map +0 -1
- package/dist/types/generator/bitmark/BitmarkFileGenerator.d.ts +0 -41
- package/dist/types/generator/bitmark/BitmarkFileGenerator.d.ts.map +0 -1
- package/dist/types/generator/bitmark/BitmarkGenerator.d.ts +0 -401
- package/dist/types/generator/bitmark/BitmarkGenerator.d.ts.map +0 -1
- package/dist/types/generator/bitmark/BitmarkStringGenerator.d.ts +0 -31
- package/dist/types/generator/bitmark/BitmarkStringGenerator.d.ts.map +0 -1
- package/dist/types/generator/json/JsonFileGenerator.d.ts +0 -45
- package/dist/types/generator/json/JsonFileGenerator.d.ts.map +0 -1
- package/dist/types/generator/json/JsonGenerator.d.ts +0 -357
- package/dist/types/generator/json/JsonGenerator.d.ts.map +0 -1
- package/dist/types/generator/json/JsonObjectGenerator.d.ts +0 -32
- package/dist/types/generator/json/JsonObjectGenerator.d.ts.map +0 -1
- package/dist/types/generator/json/JsonStringGenerator.d.ts +0 -30
- package/dist/types/generator/json/JsonStringGenerator.d.ts.map +0 -1
- package/dist/types/generator/text/TextGenerator.d.ts +0 -228
- package/dist/types/generator/text/TextGenerator.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -50
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/info/InfoBuilder.d.ts +0 -18
- package/dist/types/info/InfoBuilder.d.ts.map +0 -1
- package/dist/types/init/init.d.ts +0 -4
- package/dist/types/init/init.d.ts.map +0 -1
- package/dist/types/model/ast/BreakscapedString.d.ts +0 -4
- package/dist/types/model/ast/BreakscapedString.d.ts.map +0 -1
- package/dist/types/model/ast/NodeType.d.ts +0 -1093
- package/dist/types/model/ast/NodeType.d.ts.map +0 -1
- package/dist/types/model/ast/Nodes.d.ts +0 -268
- package/dist/types/model/ast/Nodes.d.ts.map +0 -1
- package/dist/types/model/ast/StardardString.d.ts +0 -4
- package/dist/types/model/ast/StardardString.d.ts.map +0 -1
- package/dist/types/model/ast/TextNodes.d.ts +0 -130
- package/dist/types/model/ast/TextNodes.d.ts.map +0 -1
- package/dist/types/model/config/AbstractTagConfig.d.ts +0 -24
- package/dist/types/model/config/AbstractTagConfig.d.ts.map +0 -1
- package/dist/types/model/config/BitConfig.d.ts +0 -48
- package/dist/types/model/config/BitConfig.d.ts.map +0 -1
- package/dist/types/model/config/CardSetConfig.d.ts +0 -14
- package/dist/types/model/config/CardSetConfig.d.ts.map +0 -1
- package/dist/types/model/config/CardVariantConfig.d.ts +0 -16
- package/dist/types/model/config/CardVariantConfig.d.ts.map +0 -1
- package/dist/types/model/config/MarkupTagConfig.d.ts +0 -17
- package/dist/types/model/config/MarkupTagConfig.d.ts.map +0 -1
- package/dist/types/model/config/PropertyTagConfig.d.ts +0 -23
- package/dist/types/model/config/PropertyTagConfig.d.ts.map +0 -1
- package/dist/types/model/config/ResourceTagConfig.d.ts +0 -18
- package/dist/types/model/config/ResourceTagConfig.d.ts.map +0 -1
- package/dist/types/model/config/ResourcesConfig.d.ts +0 -14
- package/dist/types/model/config/ResourcesConfig.d.ts.map +0 -1
- package/dist/types/model/config/TagConfig.d.ts +0 -5
- package/dist/types/model/config/TagConfig.d.ts.map +0 -1
- package/dist/types/model/config/TagsConfig.d.ts +0 -5
- package/dist/types/model/config/TagsConfig.d.ts.map +0 -1
- package/dist/types/model/config/TagsConfigWithInfo.d.ts +0 -9
- package/dist/types/model/config/TagsConfigWithInfo.d.ts.map +0 -1
- package/dist/types/model/config/_Config.d.ts +0 -119
- package/dist/types/model/config/_Config.d.ts.map +0 -1
- package/dist/types/model/config/enum/CardSetConfigKey.d.ts +0 -43
- package/dist/types/model/config/enum/CardSetConfigKey.d.ts.map +0 -1
- package/dist/types/model/config/enum/ConfigKey.d.ts +0 -578
- package/dist/types/model/config/enum/ConfigKey.d.ts.map +0 -1
- package/dist/types/model/config/enum/GroupConfigKey.d.ts +0 -144
- package/dist/types/model/config/enum/GroupConfigKey.d.ts.map +0 -1
- package/dist/types/model/config/enum/GroupConfigType.d.ts +0 -16
- package/dist/types/model/config/enum/GroupConfigType.d.ts.map +0 -1
- package/dist/types/model/config/enum/PropertyConfigKey.d.ts +0 -618
- package/dist/types/model/config/enum/PropertyConfigKey.d.ts.map +0 -1
- package/dist/types/model/config/enum/ResourceConfigKey.d.ts +0 -87
- package/dist/types/model/config/enum/ResourceConfigKey.d.ts.map +0 -1
- package/dist/types/model/config/enum/TagConfigKey.d.ts +0 -51
- package/dist/types/model/config/enum/TagConfigKey.d.ts.map +0 -1
- package/dist/types/model/enum/BitTagType.d.ts +0 -15
- package/dist/types/model/enum/BitTagType.d.ts.map +0 -1
- package/dist/types/model/enum/BitType.d.ts +0 -1143
- package/dist/types/model/enum/BitType.d.ts.map +0 -1
- package/dist/types/model/enum/BitmarkGeneratorOutput.d.ts +0 -1
- package/dist/types/model/enum/BitmarkGeneratorOutput.d.ts.map +0 -1
- package/dist/types/model/enum/BitmarkParserType.d.ts +0 -7
- package/dist/types/model/enum/BitmarkParserType.d.ts.map +0 -1
- package/dist/types/model/enum/BitmarkVersion.d.ts +0 -12
- package/dist/types/model/enum/BitmarkVersion.d.ts.map +0 -1
- package/dist/types/model/enum/BodyBitType.d.ts +0 -25
- package/dist/types/model/enum/BodyBitType.d.ts.map +0 -1
- package/dist/types/model/enum/BodyTextFormat.d.ts +0 -17
- package/dist/types/model/enum/BodyTextFormat.d.ts.map +0 -1
- package/dist/types/model/enum/CardSetVersion.d.ts +0 -11
- package/dist/types/model/enum/CardSetVersion.d.ts.map +0 -1
- package/dist/types/model/enum/Count.d.ts +0 -7
- package/dist/types/model/enum/Count.d.ts.map +0 -1
- package/dist/types/model/enum/DeprecatedTextFormat.d.ts +0 -7
- package/dist/types/model/enum/DeprecatedTextFormat.d.ts.map +0 -1
- package/dist/types/model/enum/ExampleType.d.ts +0 -13
- package/dist/types/model/enum/ExampleType.d.ts.map +0 -1
- package/dist/types/model/enum/PropertyAstKey.d.ts +0 -22
- package/dist/types/model/enum/PropertyAstKey.d.ts.map +0 -1
- package/dist/types/model/enum/PropertyFormat.d.ts +0 -19
- package/dist/types/model/enum/PropertyFormat.d.ts.map +0 -1
- package/dist/types/model/enum/PropertyJsonKey.d.ts +0 -10
- package/dist/types/model/enum/PropertyJsonKey.d.ts.map +0 -1
- package/dist/types/model/enum/PropertyTag.d.ts +0 -419
- package/dist/types/model/enum/PropertyTag.d.ts.map +0 -1
- package/dist/types/model/enum/ResourceJsonKey.d.ts +0 -45
- package/dist/types/model/enum/ResourceJsonKey.d.ts.map +0 -1
- package/dist/types/model/enum/ResourceTag.d.ts +0 -63
- package/dist/types/model/enum/ResourceTag.d.ts.map +0 -1
- package/dist/types/model/enum/Tag.d.ts +0 -33
- package/dist/types/model/enum/Tag.d.ts.map +0 -1
- package/dist/types/model/enum/TextFormat.d.ts +0 -17
- package/dist/types/model/enum/TextFormat.d.ts.map +0 -1
- package/dist/types/model/enum/TextLocation.d.ts +0 -16
- package/dist/types/model/enum/TextLocation.d.ts.map +0 -1
- package/dist/types/model/enum/TextMarkType.d.ts +0 -93
- package/dist/types/model/enum/TextMarkType.d.ts.map +0 -1
- package/dist/types/model/enum/TextNodeType.d.ts +0 -53
- package/dist/types/model/enum/TextNodeType.d.ts.map +0 -1
- package/dist/types/model/enum/TextSection.d.ts +0 -27
- package/dist/types/model/enum/TextSection.d.ts.map +0 -1
- package/dist/types/model/info/enum/InfoFormat.d.ts +0 -13
- package/dist/types/model/info/enum/InfoFormat.d.ts.map +0 -1
- package/dist/types/model/info/enum/InfoType.d.ts +0 -15
- package/dist/types/model/info/enum/InfoType.d.ts.map +0 -1
- package/dist/types/model/json/BitJson.d.ts +0 -479
- package/dist/types/model/json/BitJson.d.ts.map +0 -1
- package/dist/types/model/json/BitWrapperJson.d.ts +0 -8
- package/dist/types/model/json/BitWrapperJson.d.ts.map +0 -1
- package/dist/types/model/json/BodyBitJson.d.ts +0 -81
- package/dist/types/model/json/BodyBitJson.d.ts.map +0 -1
- package/dist/types/model/json/ParserJson.d.ts +0 -12
- package/dist/types/model/json/ParserJson.d.ts.map +0 -1
- package/dist/types/model/json/ResourceJson.d.ts +0 -244
- package/dist/types/model/json/ResourceJson.d.ts.map +0 -1
- package/dist/types/model/parser/ParserData.d.ts +0 -11
- package/dist/types/model/parser/ParserData.d.ts.map +0 -1
- package/dist/types/model/parser/ParserError.d.ts +0 -17
- package/dist/types/model/parser/ParserError.d.ts.map +0 -1
- package/dist/types/model/parser/ParserInfo.d.ts +0 -10
- package/dist/types/model/parser/ParserInfo.d.ts.map +0 -1
- package/dist/types/model/parser/ParserLocation.d.ts +0 -6
- package/dist/types/model/parser/ParserLocation.d.ts.map +0 -1
- package/dist/types/model/parser/ParserLocationRange.d.ts +0 -10
- package/dist/types/model/parser/ParserLocationRange.d.ts.map +0 -1
- package/dist/types/model/parser/TagValidationData.d.ts +0 -24
- package/dist/types/model/parser/TagValidationData.d.ts.map +0 -1
- package/dist/types/parser/bitmark/BitmarkParser.d.ts +0 -21
- package/dist/types/parser/bitmark/BitmarkParser.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParser.d.ts +0 -8
- package/dist/types/parser/bitmark/peg/BitmarkPegParser.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserHelper.d.ts +0 -108
- package/dist/types/parser/bitmark/peg/BitmarkPegParserHelper.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts +0 -137
- package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts +0 -333
- package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts +0 -186
- package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/PeggyGrammarLocation.d.ts +0 -61
- package/dist/types/parser/bitmark/peg/PeggyGrammarLocation.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/BodyContentProcessor.d.ts +0 -37
- package/dist/types/parser/bitmark/peg/contentProcessors/BodyContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts +0 -7
- package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.d.ts +0 -15
- package/dist/types/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.d.ts +0 -4
- package/dist/types/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/FooterContentProcessor.d.ts +0 -14
- package/dist/types/parser/bitmark/peg/contentProcessors/FooterContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts +0 -6
- package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.d.ts +0 -4
- package/dist/types/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.d.ts +0 -6
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.d.ts +0 -4
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts +0 -14
- package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts +0 -11
- package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts +0 -6
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts +0 -4
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/json/JsonParser.d.ts +0 -59
- package/dist/types/parser/json/JsonParser.d.ts.map +0 -1
- package/dist/types/parser/text/TextParser.d.ts +0 -55
- package/dist/types/parser/text/TextParser.d.ts.map +0 -1
- package/dist/types/parser/text/peg/TextPegParser.d.ts +0 -8
- package/dist/types/parser/text/peg/TextPegParser.d.ts.map +0 -1
- package/dist/types/utils/ArrayUtils.d.ts +0 -25
- package/dist/types/utils/ArrayUtils.d.ts.map +0 -1
- package/dist/types/utils/BitUtils.d.ts +0 -30
- package/dist/types/utils/BitUtils.d.ts.map +0 -1
- package/dist/types/utils/BooleanUtils.d.ts +0 -30
- package/dist/types/utils/BooleanUtils.d.ts.map +0 -1
- package/dist/types/utils/FileUtils.d.ts +0 -12
- package/dist/types/utils/FileUtils.d.ts.map +0 -1
- package/dist/types/utils/NumberUtils.d.ts +0 -47
- package/dist/types/utils/NumberUtils.d.ts.map +0 -1
- package/dist/types/utils/ObjectUtils.d.ts +0 -197
- package/dist/types/utils/ObjectUtils.d.ts.map +0 -1
- package/dist/types/utils/StringUtils.d.ts +0 -77
- package/dist/types/utils/StringUtils.d.ts.map +0 -1
- package/dist/types/utils/UrlUtils.d.ts +0 -7
- package/dist/types/utils/UrlUtils.d.ts.map +0 -1
- package/dist/types/utils/env/Env.d.ts +0 -39
- package/dist/types/utils/env/Env.d.ts.map +0 -1
- package/dist/types/utils/env/Environment.d.ts +0 -21
- package/dist/types/utils/env/Environment.d.ts.map +0 -1
- package/dist/types/utils/env/Os.d.ts +0 -19
- package/dist/types/utils/env/Os.d.ts.map +0 -1
- package/dist/types/utils/env/Version.d.ts +0 -10
- package/dist/types/utils/env/Version.d.ts.map +0 -1
- package/dist/types/utils/env/userAgent.d.ts +0 -11
- package/dist/types/utils/env/userAgent.d.ts.map +0 -1
- package/dist/types/utils/polyfill/fs.d.ts +0 -6
- package/dist/types/utils/polyfill/fs.d.ts.map +0 -1
|
@@ -1,745 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* BitmarkPegParserValidator.ts
|
|
4
|
-
* RA Sewell
|
|
5
|
-
*
|
|
6
|
-
* (c) 2023 Get More Brain AG
|
|
7
|
-
* All rights reserved.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.BitmarkPegParserValidator = void 0;
|
|
12
|
-
const Config_1 = require("../../../config/Config");
|
|
13
|
-
const BitTagType_1 = require("../../../model/enum/BitTagType");
|
|
14
|
-
const Count_1 = require("../../../model/enum/Count");
|
|
15
|
-
const PropertyTag_1 = require("../../../model/enum/PropertyTag");
|
|
16
|
-
const ResourceTag_1 = require("../../../model/enum/ResourceTag");
|
|
17
|
-
const Tag_1 = require("../../../model/enum/Tag");
|
|
18
|
-
const BitmarkPegParserTypes_1 = require("./BitmarkPegParserTypes");
|
|
19
|
-
const COMMON_MISTAKE_STRINGS = [
|
|
20
|
-
// Card divider errors
|
|
21
|
-
'----',
|
|
22
|
-
'\n==\n',
|
|
23
|
-
'\n---\n',
|
|
24
|
-
// Remark errors
|
|
25
|
-
// Comment errors
|
|
26
|
-
];
|
|
27
|
-
const COMMON_STARTS_WITH_MISTAKE_STRINGS = [
|
|
28
|
-
// Card divider errors
|
|
29
|
-
'==\n',
|
|
30
|
-
'--\n',
|
|
31
|
-
];
|
|
32
|
-
const COMMON_ENDS_WITH_MISTAKE_STRINGS = [
|
|
33
|
-
// Card divider errors
|
|
34
|
-
'\n==',
|
|
35
|
-
'\n--',
|
|
36
|
-
];
|
|
37
|
-
class BitmarkPegParserValidator {
|
|
38
|
-
/**
|
|
39
|
-
* Validate the bit tags and tag chains.
|
|
40
|
-
*
|
|
41
|
-
* Any unknown tag chains will be 'unchained' and processed as individual tags.
|
|
42
|
-
*
|
|
43
|
-
* @param context
|
|
44
|
-
* @param bitType
|
|
45
|
-
* @param resourceType the resource type specified in the bit header
|
|
46
|
-
* @param data the unvalidated bit content from the parser
|
|
47
|
-
*
|
|
48
|
-
* @returns the validated and potentially unchained bit content
|
|
49
|
-
*/
|
|
50
|
-
validateBitTags(context, data) {
|
|
51
|
-
// if (context.DEBUG_BIT_TAG_VALIDATION) context.debugPrint('bit tag validation', data);
|
|
52
|
-
if (!data)
|
|
53
|
-
return [];
|
|
54
|
-
const { bitConfig, bitType, resourceType } = context;
|
|
55
|
-
// Get the bit config to check how to parse the bit
|
|
56
|
-
const { tags: bitTags, cardSet: cardSetConfig } = bitConfig;
|
|
57
|
-
// Insert the resource tags from the resources config (which can depends on the resource type attachment in the bit header).
|
|
58
|
-
const resourcesConfig = Config_1.Config.getBitResourcesConfig(bitType, resourceType);
|
|
59
|
-
const tags = Object.assign(Object.assign({}, bitTags), resourcesConfig.tags);
|
|
60
|
-
// Validate and convert the tag chains
|
|
61
|
-
const res = this.validateTagChainsRecursive(context, BitmarkPegParserTypes_1.BitContentLevel.Bit, bitType, data, tags, cardSetConfig).validated;
|
|
62
|
-
// TODO: Check the minimum counts
|
|
63
|
-
// const minCount = tagData.minCount == null ? 0 : tagData.minCount;
|
|
64
|
-
return res;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Check the body of the bit.
|
|
68
|
-
*
|
|
69
|
-
* This function also converts the body to JSON if the text format is JSON.
|
|
70
|
-
*
|
|
71
|
-
* @param context
|
|
72
|
-
* @param bitType
|
|
73
|
-
* @param _contentDepth
|
|
74
|
-
* @param body
|
|
75
|
-
* @returns
|
|
76
|
-
*/
|
|
77
|
-
checkBody(context, _contentDepth, bitType, _textFormat, bodyParts) {
|
|
78
|
-
if (!bodyParts)
|
|
79
|
-
return bodyParts;
|
|
80
|
-
const { bitConfig } = context;
|
|
81
|
-
// Get the bit config to check how to parse the bit
|
|
82
|
-
const { bodyAllowed } = bitConfig;
|
|
83
|
-
const hasBody = bodyParts.length > 0;
|
|
84
|
-
if (hasBody && !bodyAllowed) {
|
|
85
|
-
context.addWarning(`Bit '${bitType}' should not have a body.`);
|
|
86
|
-
}
|
|
87
|
-
return bodyParts;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Check the body part of the bit.
|
|
91
|
-
*
|
|
92
|
-
* @param context
|
|
93
|
-
* @param _contentDepth
|
|
94
|
-
* @param bitType
|
|
95
|
-
* @param body
|
|
96
|
-
* @returns
|
|
97
|
-
*/
|
|
98
|
-
checkBodyPart(context, contentDepth, bodyPart) {
|
|
99
|
-
if (!bodyPart)
|
|
100
|
-
return bodyPart;
|
|
101
|
-
this.checkBodyForCommonPotentialMistakes(context, contentDepth, bodyPart);
|
|
102
|
-
return bodyPart;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Check the footer of the bit.
|
|
106
|
-
*
|
|
107
|
-
* @param context
|
|
108
|
-
* @param _contentDepth
|
|
109
|
-
* @param bitType
|
|
110
|
-
* @param body
|
|
111
|
-
* @returns
|
|
112
|
-
*/
|
|
113
|
-
checkFooter(context, contentDepth, footer) {
|
|
114
|
-
if (!footer)
|
|
115
|
-
return footer;
|
|
116
|
-
const { bitConfig, bitType } = context;
|
|
117
|
-
// Get the bit config to check how to parse the bit
|
|
118
|
-
const { footerAllowed } = bitConfig;
|
|
119
|
-
this.checkBodyForCommonPotentialMistakes(context, contentDepth, footer);
|
|
120
|
-
if (!footerAllowed) {
|
|
121
|
-
context.addWarning(`Bit '${bitType}' should not have a footer.`);
|
|
122
|
-
}
|
|
123
|
-
return footer;
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Check the footer of the bit.
|
|
127
|
-
*
|
|
128
|
-
* @param context
|
|
129
|
-
* @param _contentDepth
|
|
130
|
-
* @param bitType
|
|
131
|
-
* @param cardBody
|
|
132
|
-
* @returns
|
|
133
|
-
*/
|
|
134
|
-
checkCardBody(context, _contentDepth, bitType, cardBody, cardNo, sideNo, variantNo) {
|
|
135
|
-
if (!cardBody || !cardBody.body)
|
|
136
|
-
return cardBody;
|
|
137
|
-
const { bitConfig } = context;
|
|
138
|
-
// Get the bit config to check how to parse the bit
|
|
139
|
-
if (!bitConfig.cardSet)
|
|
140
|
-
return cardBody; // Won't happen. Just to make TS happy
|
|
141
|
-
const variantConfig = this.getVariantConfig(bitConfig.cardSet.variants, sideNo, variantNo);
|
|
142
|
-
if (!variantConfig)
|
|
143
|
-
return cardBody; // Won't happen. Just to make TS happy
|
|
144
|
-
const { bodyAllowed } = variantConfig;
|
|
145
|
-
const hasBody = cardBody.bodyString.length > 0;
|
|
146
|
-
// this.checkBodyForCommonPotentialMistakes(context, contentDepth, bitType, cardBody);
|
|
147
|
-
if (hasBody && !bodyAllowed) {
|
|
148
|
-
context.addWarning(`Bit '${bitType}' should not have a card body at card:${cardNo + 1}, side:${sideNo + 1}, variant:${variantNo + 1}.`);
|
|
149
|
-
}
|
|
150
|
-
return cardBody;
|
|
151
|
-
}
|
|
152
|
-
//
|
|
153
|
-
// Private
|
|
154
|
-
//
|
|
155
|
-
/**
|
|
156
|
-
* Validate tag chains as they are encountered, expanding any tag chains that are not valid,
|
|
157
|
-
* so they can be processed as individual tags.
|
|
158
|
-
*
|
|
159
|
-
* @param context
|
|
160
|
-
* @param contentDepth
|
|
161
|
-
* @param bitType
|
|
162
|
-
* @param data
|
|
163
|
-
* @param tags
|
|
164
|
-
* @param cardSetConfig
|
|
165
|
-
*/
|
|
166
|
-
validateTagChainsRecursive(context, contentDepth, bitType, data, tags, cardSetConfig, chainHeadType) {
|
|
167
|
-
var _a;
|
|
168
|
-
if (!data) {
|
|
169
|
-
return {
|
|
170
|
-
validated: [],
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
let remaining;
|
|
174
|
-
const dataOrNull = [...data];
|
|
175
|
-
// Get valid type keys from the tags
|
|
176
|
-
const validTypeKeys = this.convertTagsToTypeKeyMap(context, contentDepth, bitType, tags);
|
|
177
|
-
// Helper function for add extra valid type keys
|
|
178
|
-
const addExtraValidTypeKeys = (key, maxCount, minCount) => {
|
|
179
|
-
validTypeKeys.set(key, {
|
|
180
|
-
maxCount,
|
|
181
|
-
minCount,
|
|
182
|
-
_type: key,
|
|
183
|
-
_tag: key,
|
|
184
|
-
_seenCount: 0,
|
|
185
|
-
});
|
|
186
|
-
};
|
|
187
|
-
// Helper function for add extra valid property keys
|
|
188
|
-
const addExtraValidPropertyKeys = (key, maxCount, minCount) => {
|
|
189
|
-
validTypeKeys.set(`${BitmarkPegParserTypes_1.TypeKey.Property}:${key}`, {
|
|
190
|
-
maxCount,
|
|
191
|
-
minCount,
|
|
192
|
-
_type: BitTagType_1.BitTagType.property,
|
|
193
|
-
_tag: Tag_1.Tag.tag_property,
|
|
194
|
-
_seenCount: 0,
|
|
195
|
-
});
|
|
196
|
-
};
|
|
197
|
-
// Comment property tags are allowed anywhere
|
|
198
|
-
addExtraValidPropertyKeys(PropertyTag_1.PropertyTag.internalComment, Count_1.Count.infinity, 0);
|
|
199
|
-
if (contentDepth === BitmarkPegParserTypes_1.BitContentLevel.Bit) {
|
|
200
|
-
// Add the extra valid tags dependent on bit configuration
|
|
201
|
-
if (cardSetConfig)
|
|
202
|
-
addExtraValidTypeKeys(BitmarkPegParserTypes_1.TypeKey.CardSet, 1, 0);
|
|
203
|
-
// These tags are always allowed here, and validated later
|
|
204
|
-
addExtraValidTypeKeys(BitmarkPegParserTypes_1.TypeKey.TextFormat, 1, 0);
|
|
205
|
-
addExtraValidTypeKeys(BitmarkPegParserTypes_1.TypeKey.BodyText, Count_1.Count.infinity, 0);
|
|
206
|
-
addExtraValidTypeKeys(BitmarkPegParserTypes_1.TypeKey.BodyTextPlain, Count_1.Count.infinity, 0);
|
|
207
|
-
addExtraValidTypeKeys(BitmarkPegParserTypes_1.TypeKey.PlainTextDivider, Count_1.Count.infinity, 0);
|
|
208
|
-
addExtraValidTypeKeys(BitmarkPegParserTypes_1.TypeKey.FooterDivider, Count_1.Count.infinity, 0); // No warning for multiple footers, just ignore
|
|
209
|
-
}
|
|
210
|
-
else if (contentDepth === BitmarkPegParserTypes_1.BitContentLevel.Card) {
|
|
211
|
-
// These tags are always allowed here, and validated later
|
|
212
|
-
addExtraValidTypeKeys(BitmarkPegParserTypes_1.TypeKey.CardText, Count_1.Count.infinity, 0);
|
|
213
|
-
}
|
|
214
|
-
// const end = data.length;
|
|
215
|
-
for (let i = 0; i < dataOrNull.length; i++) {
|
|
216
|
-
const content = dataOrNull[i];
|
|
217
|
-
if (!content)
|
|
218
|
-
continue;
|
|
219
|
-
const { type, key } = content;
|
|
220
|
-
let typeKey = BitmarkPegParserTypes_1.TypeKey.fromValue(type);
|
|
221
|
-
if (!typeKey)
|
|
222
|
-
continue; // Should not happen
|
|
223
|
-
// Build the final type key with the property / resource key added
|
|
224
|
-
let typeKeyPlusKey = typeKey;
|
|
225
|
-
if (typeKey === BitmarkPegParserTypes_1.TypeKey.Property || typeKey === BitmarkPegParserTypes_1.TypeKey.Resource) {
|
|
226
|
-
typeKeyPlusKey = `${typeKey}:${key}`;
|
|
227
|
-
}
|
|
228
|
-
// Get the tag data for this tag type and key. If not found, the tag is not valid
|
|
229
|
-
let tagData = validTypeKeys.get(typeKeyPlusKey);
|
|
230
|
-
// Support [@ fallback to [&:
|
|
231
|
-
// See: https://github.com/getMoreBrain/cosmic/issues/7859
|
|
232
|
-
// In the case of a property tag that is not found, convert it to a resource tag and retry
|
|
233
|
-
// Only for specific tags. This is to support legacy tags for a short period and will be removed in the future
|
|
234
|
-
// (support @ instead of & for resources)
|
|
235
|
-
if (!tagData &&
|
|
236
|
-
typeKey === BitmarkPegParserTypes_1.TypeKey.Property &&
|
|
237
|
-
(key === ResourceTag_1.ResourceTag.backgroundWallpaper || key === ResourceTag_1.ResourceTag.imagePlaceholder)) {
|
|
238
|
-
tagData = validTypeKeys.get(`${BitmarkPegParserTypes_1.TypeKey.Resource}:${key}`);
|
|
239
|
-
if (tagData) {
|
|
240
|
-
typeKey = BitmarkPegParserTypes_1.TypeKey.Resource;
|
|
241
|
-
content.type = BitmarkPegParserTypes_1.TypeKey.Resource;
|
|
242
|
-
const warningMsg = `Falling back to '[&${key}]' from '[@${key}]'. Replace '[@${key}]' with '[&${key}]' to avoid this warning.`;
|
|
243
|
-
context.addWarning(warningMsg);
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
// Validate the single tag
|
|
247
|
-
const { validated: validatedTagContent, warning } = this.validateSingleTag(context, contentDepth, bitType, content, typeKey, tagData, cardSetConfig);
|
|
248
|
-
// HACK to handle 'chain-within-chain' for [@person] tags (at least to stop the parser splitting the chain)
|
|
249
|
-
if (typeKey === BitmarkPegParserTypes_1.TypeKey.Resource)
|
|
250
|
-
chainHeadType = BitmarkPegParserTypes_1.TypeKey.Resource;
|
|
251
|
-
// Tag is not valid in this position. Either remove it or reprocess by breaking the current chain
|
|
252
|
-
let addWarning = true;
|
|
253
|
-
if (!validatedTagContent) {
|
|
254
|
-
if (contentDepth === BitmarkPegParserTypes_1.BitContentLevel.Chain && chainHeadType !== BitmarkPegParserTypes_1.TypeKey.Resource) {
|
|
255
|
-
// If in a chain and the tag is invalid within the chain then break the chain and re-process the tag as a
|
|
256
|
-
// single tag with the rest of the chain as a chain [excluding resource chains].
|
|
257
|
-
remaining = content;
|
|
258
|
-
const restOfChain = dataOrNull.slice(i + 1);
|
|
259
|
-
if (restOfChain.length > 0) {
|
|
260
|
-
remaining.chain = restOfChain;
|
|
261
|
-
}
|
|
262
|
-
// Remove the data from the current chain
|
|
263
|
-
dataOrNull.splice(i);
|
|
264
|
-
// Ignore the generated warning from validateSingleTag as the tag will be reprocessed and will then
|
|
265
|
-
// be valid or will generated a warning there
|
|
266
|
-
addWarning = false;
|
|
267
|
-
}
|
|
268
|
-
else {
|
|
269
|
-
// The tag is not valid, and either this is not a chain or not a resource chain.
|
|
270
|
-
// Remove the tag from the data
|
|
271
|
-
dataOrNull.splice(i, 1, null);
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
// Add the warning generated by validateSingleTag
|
|
275
|
-
if (warning && addWarning) {
|
|
276
|
-
context.addWarning((_a = warning.warning) !== null && _a !== void 0 ? _a : '', warning.content, warning.previousContent);
|
|
277
|
-
}
|
|
278
|
-
// If the content does not have a chain, but the validation data does have a chain, and there are still more
|
|
279
|
-
// items in this chain, then the remaining items should be considered a sub-chain and processed as such.
|
|
280
|
-
// Split the remaining items off from the current chain and process them as a separate chain.
|
|
281
|
-
if (contentDepth === BitmarkPegParserTypes_1.BitContentLevel.Chain &&
|
|
282
|
-
tagData &&
|
|
283
|
-
tagData.chain &&
|
|
284
|
-
validatedTagContent &&
|
|
285
|
-
!validatedTagContent.chain) {
|
|
286
|
-
const restOfChain = dataOrNull.slice(i + 1);
|
|
287
|
-
if (restOfChain.length > 0) {
|
|
288
|
-
validatedTagContent.chain = restOfChain;
|
|
289
|
-
}
|
|
290
|
-
dataOrNull.splice(i + 1);
|
|
291
|
-
}
|
|
292
|
-
// If the content has a chain, but the validation data does not have a chain, then the chain is invalid
|
|
293
|
-
// The chain is split off from the single tag for further processing.
|
|
294
|
-
// This allows non-chained tags to be compressed into a chain without breaking the behaviour, and makes the
|
|
295
|
-
// parser more forgiving.
|
|
296
|
-
if (validatedTagContent && Array.isArray(validatedTagContent.chain) && validatedTagContent.chain.length > 0) {
|
|
297
|
-
if (tagData && tagData.chain) {
|
|
298
|
-
const { validated: validatedTagChainContent, remaining: remainingTagChainContent } = this.validateTagChainsRecursive(context, BitmarkPegParserTypes_1.BitContentLevel.Chain, bitType, validatedTagContent.chain, tagData.chain, undefined, validatedTagContent.type);
|
|
299
|
-
if (validatedTagChainContent && validatedTagChainContent.length > 0) {
|
|
300
|
-
validatedTagContent.chain = validatedTagChainContent;
|
|
301
|
-
}
|
|
302
|
-
else {
|
|
303
|
-
// Tag chain is invalid, remove it
|
|
304
|
-
validatedTagContent.chain = undefined;
|
|
305
|
-
}
|
|
306
|
-
// If there is remaining tag chain content to process, insert it into the data
|
|
307
|
-
if (remainingTagChainContent) {
|
|
308
|
-
dataOrNull.splice(i + 1, 0, remainingTagChainContent);
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
else {
|
|
312
|
-
// Tag does not have a chain in the bit config. Split the chain and process as a separate chain.
|
|
313
|
-
// This allows for 'bugs' such as [%item][%lead][!instruction] - instruction still works.
|
|
314
|
-
if (validatedTagContent.type !== BitmarkPegParserTypes_1.TypeKey.Resource) {
|
|
315
|
-
// Build the 'split-off' bit content
|
|
316
|
-
const remainingTagChainContent = validatedTagContent.chain[0];
|
|
317
|
-
if (validatedTagContent.chain.length > 1) {
|
|
318
|
-
remainingTagChainContent.chain = validatedTagContent.chain.slice(1);
|
|
319
|
-
}
|
|
320
|
-
dataOrNull.splice(i + 1, 0, remainingTagChainContent);
|
|
321
|
-
// Clear the original chain
|
|
322
|
-
validatedTagContent.chain = undefined;
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
// Raise warnings for the minimum counts
|
|
328
|
-
for (const data of validTypeKeys.values()) {
|
|
329
|
-
const { minCount, _seenCount } = data;
|
|
330
|
-
if (minCount != null && _seenCount < minCount) {
|
|
331
|
-
const warningMsg = `${this.getTagSignature(data)} is required at least ${minCount} time(s)`;
|
|
332
|
-
context.addWarning(warningMsg);
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
// Filter all the null's from the validated tags
|
|
336
|
-
const res = dataOrNull.filter((content) => content != null);
|
|
337
|
-
return {
|
|
338
|
-
validated: res,
|
|
339
|
-
remaining,
|
|
340
|
-
};
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* Validate a single bit tag
|
|
344
|
-
*
|
|
345
|
-
* @param context
|
|
346
|
-
* @param contentDepth
|
|
347
|
-
* @param bitType
|
|
348
|
-
* @param content
|
|
349
|
-
* @param typeKey
|
|
350
|
-
* @param tagValidationData
|
|
351
|
-
* @param cardSetConfig
|
|
352
|
-
*
|
|
353
|
-
* @returns validated tag, or undefined if the tag is invalid
|
|
354
|
-
*/
|
|
355
|
-
validateSingleTag(context, contentDepth, bitType, content, typeKey, tagValidationData, cardSetConfig) {
|
|
356
|
-
// if (context.DEBUG_BIT_TAG_VALIDATION) context.debugPrint('bit tag validation', data);
|
|
357
|
-
const { type, key } = content;
|
|
358
|
-
const keyStr = tagValidationData ? this.getTagSignature(tagValidationData) : this.getUnknownTagSignature(type, key);
|
|
359
|
-
const ignoredStr = ' It will be ignored';
|
|
360
|
-
let warningStr = '';
|
|
361
|
-
let validatedContent;
|
|
362
|
-
let warning;
|
|
363
|
-
// // Get seen data from the seen cache
|
|
364
|
-
// let seen = seenTypeKeys.get(typeKeyPlusKey);
|
|
365
|
-
// if (seen == undefined) {
|
|
366
|
-
// seen = {
|
|
367
|
-
// count: 0,
|
|
368
|
-
// };
|
|
369
|
-
// seenTypeKeys.set(typeKeyPlusKey, seen);
|
|
370
|
-
// }
|
|
371
|
-
// let previousContent = seen.previous;
|
|
372
|
-
// seen.count++;
|
|
373
|
-
if (tagValidationData) {
|
|
374
|
-
// Increment the seen count for this tag
|
|
375
|
-
tagValidationData._seenCount++;
|
|
376
|
-
// This type key is valid. Now check if it's been seen before and if so, how many times
|
|
377
|
-
switch (typeKey) {
|
|
378
|
-
case BitmarkPegParserTypes_1.TypeKey.Property: {
|
|
379
|
-
const { content: c, warning: w } = this.validatePropertyTag(context, contentDepth, bitType, tagValidationData, content);
|
|
380
|
-
validatedContent = c;
|
|
381
|
-
warning = w;
|
|
382
|
-
break;
|
|
383
|
-
}
|
|
384
|
-
case BitmarkPegParserTypes_1.TypeKey.Resource: {
|
|
385
|
-
const { content: c, warning: w } = this.validateResourceTag(context, contentDepth, bitType, tagValidationData, content);
|
|
386
|
-
validatedContent = c;
|
|
387
|
-
warning = w;
|
|
388
|
-
break;
|
|
389
|
-
}
|
|
390
|
-
case BitmarkPegParserTypes_1.TypeKey.CardSet: {
|
|
391
|
-
const { content: c, warning: w } = this.validateCardSet(context, bitType, tagValidationData, content, cardSetConfig);
|
|
392
|
-
validatedContent = c;
|
|
393
|
-
warning = w;
|
|
394
|
-
break;
|
|
395
|
-
}
|
|
396
|
-
default: {
|
|
397
|
-
const { content: c, warning: w } = this.validateStandardTag(context, contentDepth, bitType, tagValidationData, content);
|
|
398
|
-
validatedContent = c;
|
|
399
|
-
warning = w;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
else {
|
|
404
|
-
// type is not valid as no tag data exists for it
|
|
405
|
-
switch (typeKey) {
|
|
406
|
-
case BitmarkPegParserTypes_1.TypeKey.Property: {
|
|
407
|
-
// The property is not valid for this bit type, but since we allow extra properties, we will return it as
|
|
408
|
-
// ok but with a warning
|
|
409
|
-
warning = { extraProperty: true };
|
|
410
|
-
if (contentDepth !== BitmarkPegParserTypes_1.BitContentLevel.Chain) {
|
|
411
|
-
validatedContent = content; // Add tag anyway - we don't remove extra properties (unless in chain)
|
|
412
|
-
}
|
|
413
|
-
break;
|
|
414
|
-
}
|
|
415
|
-
case BitmarkPegParserTypes_1.TypeKey.Resource: {
|
|
416
|
-
warning = { excessResource: true };
|
|
417
|
-
validatedContent = content; // Add tag anyway, will be added as an excess resource
|
|
418
|
-
break;
|
|
419
|
-
}
|
|
420
|
-
default:
|
|
421
|
-
warning = { invalid: true };
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
// Add a warning if there is one
|
|
425
|
-
if (warning) {
|
|
426
|
-
const previousContent = tagValidationData === null || tagValidationData === void 0 ? void 0 : tagValidationData._previous;
|
|
427
|
-
// TODO - warning and ignore
|
|
428
|
-
if (warning.invalid || warning.excessResource) {
|
|
429
|
-
warningStr = `${keyStr} is not valid here (incorrectly chained?).${ignoredStr}`;
|
|
430
|
-
}
|
|
431
|
-
else if (warning.tooMany != null) {
|
|
432
|
-
warningStr = `${keyStr} is included more than ${warning.tooMany} time(s).`;
|
|
433
|
-
if (warning.tooMany > 0)
|
|
434
|
-
warningStr += ' The earlier ones will be ignored';
|
|
435
|
-
// } else if (warning.tooFew != null) {
|
|
436
|
-
// warningStr = `'${type}'${keyStr} is not included enough times(s). It should be included ${warning.tooFew} time(s)`;
|
|
437
|
-
}
|
|
438
|
-
else if (warning.extraProperty) {
|
|
439
|
-
warningStr = `${keyStr} is an unknown property. It can be excluded from the output using the 'excludeUnknownProperties' flag`;
|
|
440
|
-
}
|
|
441
|
-
else if (warning.unexpectedCardSet) {
|
|
442
|
-
warningStr = `${keyStr} is not expected here.${ignoredStr}`;
|
|
443
|
-
}
|
|
444
|
-
else if (warning.unexpectedCardSideVariant) {
|
|
445
|
-
warningStr = `${keyStr} has a card / side / variant that is not expected here.${ignoredStr}`;
|
|
446
|
-
}
|
|
447
|
-
warning.warning = warningStr;
|
|
448
|
-
warning.content = validatedContent;
|
|
449
|
-
warning.previousContent = previousContent;
|
|
450
|
-
}
|
|
451
|
-
// Update the seen data
|
|
452
|
-
if (tagValidationData) {
|
|
453
|
-
tagValidationData._previous = content;
|
|
454
|
-
}
|
|
455
|
-
return {
|
|
456
|
-
validated: validatedContent,
|
|
457
|
-
warning,
|
|
458
|
-
};
|
|
459
|
-
}
|
|
460
|
-
/**
|
|
461
|
-
* Validates a standard bit tag
|
|
462
|
-
*
|
|
463
|
-
* @param context
|
|
464
|
-
* @param bitLevel
|
|
465
|
-
* @param bitType
|
|
466
|
-
* @param tagValidationData
|
|
467
|
-
* @param content
|
|
468
|
-
* @param seen
|
|
469
|
-
*
|
|
470
|
-
* @returns validated tag (plus warning message if one is generated) or undefined if the tag is invalid
|
|
471
|
-
*/
|
|
472
|
-
validateStandardTag(_context, _contentDepth, _bitType, tagValidationData, content) {
|
|
473
|
-
// Check if the property is valid for this bit type
|
|
474
|
-
const validCount = tagValidationData.maxCount == null ? 1 : tagValidationData.maxCount;
|
|
475
|
-
// If validCount is infinity, an infinite number of this type is allowed
|
|
476
|
-
if (validCount !== Count_1.Count.infinity) {
|
|
477
|
-
if (tagValidationData._seenCount > validCount) {
|
|
478
|
-
return {
|
|
479
|
-
warning: { tooMany: validCount },
|
|
480
|
-
content: content, // Return content anyway when too many, as last wins
|
|
481
|
-
};
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
// If we get here, the property is valid and can be added
|
|
485
|
-
return {
|
|
486
|
-
content: content,
|
|
487
|
-
};
|
|
488
|
-
}
|
|
489
|
-
/**
|
|
490
|
-
* Validates a single property tag
|
|
491
|
-
*
|
|
492
|
-
* @param context
|
|
493
|
-
* @param bitLevel
|
|
494
|
-
* @param bitType
|
|
495
|
-
* @param tagValidationData
|
|
496
|
-
* @param content
|
|
497
|
-
* @param seen
|
|
498
|
-
*
|
|
499
|
-
* @returns validated tag (plus warning message if one is generated) or undefined if the tag is invalid
|
|
500
|
-
*/
|
|
501
|
-
validatePropertyTag(_context, _contentDepth, _bitType, tagValidationData, content) {
|
|
502
|
-
// Check if the property is valid for this bit type
|
|
503
|
-
const validCount = tagValidationData.maxCount == null ? 1 : tagValidationData.maxCount;
|
|
504
|
-
// If validCount is infinity, an infinite number of this type is allowed
|
|
505
|
-
if (validCount !== Count_1.Count.infinity) {
|
|
506
|
-
if (tagValidationData._seenCount > validCount) {
|
|
507
|
-
return {
|
|
508
|
-
warning: { tooMany: validCount },
|
|
509
|
-
content: content, // Return content anyway when too many, as last wins
|
|
510
|
-
};
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
// If we get here, the property is valid and can be added
|
|
514
|
-
return {
|
|
515
|
-
content: content,
|
|
516
|
-
};
|
|
517
|
-
}
|
|
518
|
-
/**
|
|
519
|
-
* Validates a single resource tag
|
|
520
|
-
*
|
|
521
|
-
* @param context
|
|
522
|
-
* @param bitLevel
|
|
523
|
-
* @param bitType
|
|
524
|
-
* @param tagValidationData
|
|
525
|
-
* @param content
|
|
526
|
-
* @param seen
|
|
527
|
-
*
|
|
528
|
-
* @returns validated tag (plus warning message if one is generated) or undefined if the tag is invalid
|
|
529
|
-
*/
|
|
530
|
-
validateResourceTag(_context, _contentDepth, _bitType, tagValidationData, content) {
|
|
531
|
-
// Check if the resource is valid for this bit type
|
|
532
|
-
const validCount = tagValidationData.maxCount == null ? 1 : tagValidationData.maxCount;
|
|
533
|
-
// If validCount is infinity, an infinite number of this type is allowed
|
|
534
|
-
if (validCount !== Count_1.Count.infinity) {
|
|
535
|
-
if (tagValidationData._seenCount > validCount) {
|
|
536
|
-
return {
|
|
537
|
-
warning: { tooMany: validCount },
|
|
538
|
-
content: content, // Return content anyway when too many, as last wins
|
|
539
|
-
};
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
// If we get here, the property is valid and can be added
|
|
543
|
-
return {
|
|
544
|
-
content: content,
|
|
545
|
-
};
|
|
546
|
-
}
|
|
547
|
-
/**
|
|
548
|
-
* Validates a card set
|
|
549
|
-
*
|
|
550
|
-
* @param context
|
|
551
|
-
* @param bitLevel
|
|
552
|
-
* @param bitType
|
|
553
|
-
* @param _tagValidationData
|
|
554
|
-
* @param content
|
|
555
|
-
* @param cardSetConfig
|
|
556
|
-
* @param depth recursion depth
|
|
557
|
-
*
|
|
558
|
-
* @returns validated tag (plus warning message if one is generated) or undefined if the tag is invalid
|
|
559
|
-
*/
|
|
560
|
-
validateCardSet(context, bitType, _tagValidationData, content, cardSetConfig) {
|
|
561
|
-
// if (context.DEBUG_BIT_TAG_VALIDATION) context.debugPrint('bit tag validation', data);
|
|
562
|
-
if (!cardSetConfig || !cardSetConfig.variants || cardSetConfig.variants.length === 0) {
|
|
563
|
-
// Card set exists with no card set config for the bit
|
|
564
|
-
return {
|
|
565
|
-
warning: { unexpectedCardSet: true },
|
|
566
|
-
};
|
|
567
|
-
}
|
|
568
|
-
const { value } = content;
|
|
569
|
-
const cardSet = value;
|
|
570
|
-
let warning;
|
|
571
|
-
// For each of the variants in the card set, validate its contents
|
|
572
|
-
let sideIndex = 0;
|
|
573
|
-
let variantIndex = 0;
|
|
574
|
-
for (const card of cardSet.cards) {
|
|
575
|
-
sideIndex = 0;
|
|
576
|
-
for (const side of card.sides) {
|
|
577
|
-
variantIndex = 0;
|
|
578
|
-
for (const variant of side.variants) {
|
|
579
|
-
const variantContent = variant.content;
|
|
580
|
-
let validatedContent;
|
|
581
|
-
const variantConfig = this.getVariantConfig(cardSetConfig.variants, sideIndex, variantIndex);
|
|
582
|
-
if (variantConfig) {
|
|
583
|
-
// Validate the variant against the config
|
|
584
|
-
const res = this.validateTagChainsRecursive(context, BitmarkPegParserTypes_1.BitContentLevel.Card, bitType, variantContent, variantConfig.tags);
|
|
585
|
-
validatedContent = res.validated;
|
|
586
|
-
}
|
|
587
|
-
else {
|
|
588
|
-
// TODO - warning!
|
|
589
|
-
warning = {
|
|
590
|
-
unexpectedCardSideVariant: true,
|
|
591
|
-
};
|
|
592
|
-
}
|
|
593
|
-
// TODO - add the validated content to the card set, or remove the invalid variant
|
|
594
|
-
if (validatedContent && validatedContent.length > 0) {
|
|
595
|
-
side.variants[variantIndex] = {
|
|
596
|
-
parser: variant.parser,
|
|
597
|
-
content: validatedContent,
|
|
598
|
-
};
|
|
599
|
-
}
|
|
600
|
-
else {
|
|
601
|
-
// Variant is invalid, remove it
|
|
602
|
-
side.variants[variantIndex] = {
|
|
603
|
-
parser: variant.parser,
|
|
604
|
-
content: [],
|
|
605
|
-
};
|
|
606
|
-
}
|
|
607
|
-
variantIndex++;
|
|
608
|
-
}
|
|
609
|
-
sideIndex++;
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
return {
|
|
613
|
-
content: content,
|
|
614
|
-
warning,
|
|
615
|
-
};
|
|
616
|
-
}
|
|
617
|
-
/**
|
|
618
|
-
* Check the body of the bit for patterns which indicate common potential bitmark language mistakes.
|
|
619
|
-
*
|
|
620
|
-
* @param context
|
|
621
|
-
* @param _contentDepth
|
|
622
|
-
* @param bitType
|
|
623
|
-
* @param body
|
|
624
|
-
* @returns
|
|
625
|
-
*/
|
|
626
|
-
checkBodyForCommonPotentialMistakes(context, _contentDepth, body) {
|
|
627
|
-
if (!body)
|
|
628
|
-
return;
|
|
629
|
-
const { bitType } = context;
|
|
630
|
-
for (const mistake of COMMON_MISTAKE_STRINGS) {
|
|
631
|
-
if (body.includes(mistake)) {
|
|
632
|
-
context.addWarning(`Bit '${bitType}' might contain a mistake: ${mistake}`);
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
for (const mistake of COMMON_STARTS_WITH_MISTAKE_STRINGS) {
|
|
636
|
-
if (body.startsWith(mistake)) {
|
|
637
|
-
context.addWarning(`Bit '${bitType}' might contain a mistake: ${mistake}`);
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
for (const mistake of COMMON_ENDS_WITH_MISTAKE_STRINGS) {
|
|
641
|
-
if (body.endsWith(mistake)) {
|
|
642
|
-
context.addWarning(`Bit '${bitType}' might contain a mistake: ${mistake}`);
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
/**
|
|
647
|
-
* Convert the tag data configuration to TypeKeys
|
|
648
|
-
*
|
|
649
|
-
* @param context
|
|
650
|
-
* @param _contentDepth
|
|
651
|
-
* @param bitType
|
|
652
|
-
* @param tags
|
|
653
|
-
* @param depth recursion depth
|
|
654
|
-
* @returns
|
|
655
|
-
*/
|
|
656
|
-
convertTagsToTypeKeyMap(_context, _contentDepth, _bitType, tags) {
|
|
657
|
-
// Using a map here as we might add the 'count' of tags valid at a later stage
|
|
658
|
-
const res = new Map();
|
|
659
|
-
// Add the tags
|
|
660
|
-
for (const v of Object.values(tags)) {
|
|
661
|
-
// Save the key in the TagData
|
|
662
|
-
const tagValidationData = {
|
|
663
|
-
minCount: v.minCount,
|
|
664
|
-
maxCount: v.maxCount,
|
|
665
|
-
isTag: v.type === BitTagType_1.BitTagType.tag,
|
|
666
|
-
isProperty: v.type === BitTagType_1.BitTagType.property,
|
|
667
|
-
isResource: v.type === BitTagType_1.BitTagType.resource,
|
|
668
|
-
chain: v.chain,
|
|
669
|
-
// Private
|
|
670
|
-
_configKey: v.configKey,
|
|
671
|
-
_type: v.type,
|
|
672
|
-
_tag: v.tag,
|
|
673
|
-
_seenCount: 0,
|
|
674
|
-
_previous: undefined,
|
|
675
|
-
};
|
|
676
|
-
if (tagValidationData.isProperty) {
|
|
677
|
-
res.set(`${BitmarkPegParserTypes_1.TypeKey.Property}:${v.tag}`, tagValidationData);
|
|
678
|
-
}
|
|
679
|
-
else if (tagValidationData.isResource) {
|
|
680
|
-
res.set(`${BitmarkPegParserTypes_1.TypeKey.Resource}:${v.tag}`, tagValidationData);
|
|
681
|
-
}
|
|
682
|
-
else {
|
|
683
|
-
// Take advantage of the same naming convention (dangerous - should be improved)
|
|
684
|
-
const typeKey = BitmarkPegParserTypes_1.TypeKey.fromValue(v.tag);
|
|
685
|
-
if (typeKey) {
|
|
686
|
-
res.set(typeKey, tagValidationData);
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
return res;
|
|
691
|
-
}
|
|
692
|
-
/**
|
|
693
|
-
* Get the configuration for a particular card side and variant
|
|
694
|
-
* (checking for infinitely repeating variants)
|
|
695
|
-
*
|
|
696
|
-
* @param config all variant configurations
|
|
697
|
-
* @param side side index
|
|
698
|
-
* @param variant variant index
|
|
699
|
-
*
|
|
700
|
-
* @returns the config if found, otherwise undefined
|
|
701
|
-
*/
|
|
702
|
-
getVariantConfig(config, side, variant) {
|
|
703
|
-
let ret;
|
|
704
|
-
if (config.length === 0)
|
|
705
|
-
return undefined;
|
|
706
|
-
const sideIdx = Math.min(side, config.length - 1);
|
|
707
|
-
const variantConfigs = config[sideIdx];
|
|
708
|
-
// Check for variant
|
|
709
|
-
const maxVariantIndex = variantConfigs.length - 1;
|
|
710
|
-
if (variant > maxVariantIndex) {
|
|
711
|
-
ret = variantConfigs[maxVariantIndex];
|
|
712
|
-
if (ret.repeatCount !== Count_1.Count.infinity)
|
|
713
|
-
return undefined;
|
|
714
|
-
}
|
|
715
|
-
else {
|
|
716
|
-
ret = variantConfigs[variant];
|
|
717
|
-
}
|
|
718
|
-
return ret;
|
|
719
|
-
}
|
|
720
|
-
getTagSignature(tagValidationData) {
|
|
721
|
-
switch (tagValidationData._type) {
|
|
722
|
-
case BitTagType_1.BitTagType.tag:
|
|
723
|
-
return `[${tagValidationData._tag}]`;
|
|
724
|
-
case BitTagType_1.BitTagType.property:
|
|
725
|
-
return `[@${tagValidationData._tag}]`;
|
|
726
|
-
case BitTagType_1.BitTagType.resource:
|
|
727
|
-
return `[&${tagValidationData._tag}]`;
|
|
728
|
-
default:
|
|
729
|
-
return `'${tagValidationData._type}' tag '${tagValidationData._tag}'`;
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
getUnknownTagSignature(type, tag) {
|
|
733
|
-
switch (type) {
|
|
734
|
-
case BitmarkPegParserTypes_1.TypeKey.Property:
|
|
735
|
-
return `[@${tag}]`;
|
|
736
|
-
case BitmarkPegParserTypes_1.TypeKey.Resource:
|
|
737
|
-
return `[&${tag}]`;
|
|
738
|
-
default:
|
|
739
|
-
return tag ? `'${type}' tag '${tag}'` : `'${type}' tag`;
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
const instance = new BitmarkPegParserValidator();
|
|
744
|
-
exports.BitmarkPegParserValidator = instance;
|
|
745
|
-
//# sourceMappingURL=BitmarkPegParserValidator.js.map
|