@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,776 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
|
-
};
|
|
47
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.Output = exports.Input = exports.BitmarkParserGenerator = void 0;
|
|
49
|
-
/* eslint-disable arca/import-ordering */
|
|
50
|
-
const superenum_1 = require("@ncoderz/superenum");
|
|
51
|
-
const Ast_1 = require("./ast/Ast");
|
|
52
|
-
const BitmarkStringGenerator_1 = require("./generator/bitmark/BitmarkStringGenerator");
|
|
53
|
-
const JsonObjectGenerator_1 = require("./generator/json/JsonObjectGenerator");
|
|
54
|
-
const BitmarkParserType_1 = require("./model/enum/BitmarkParserType");
|
|
55
|
-
const BitmarkParser_1 = require("./parser/bitmark/BitmarkParser");
|
|
56
|
-
const JsonParser_1 = require("./parser/json/JsonParser");
|
|
57
|
-
const Env_1 = require("./utils/env/Env");
|
|
58
|
-
const InfoBuilder_1 = require("./info/InfoBuilder");
|
|
59
|
-
const InfoType_1 = require("./model/info/enum/InfoType");
|
|
60
|
-
const InfoFormat_1 = require("./model/info/enum/InfoFormat");
|
|
61
|
-
const Config_1 = require("./config/Config");
|
|
62
|
-
// import { TextFormat, TextFormatType } from './model/enum/TextFormat';
|
|
63
|
-
const TextGenerator_1 = require("./generator/text/TextGenerator");
|
|
64
|
-
const TextParser_1 = require("./parser/text/TextParser");
|
|
65
|
-
/*
|
|
66
|
-
* NOTE:
|
|
67
|
-
*
|
|
68
|
-
* We want to be able to strip out the NodeJS specific functions from the final bundle.
|
|
69
|
-
* Any code between the comments STRIP:START and STRIP:END will be removed.
|
|
70
|
-
*
|
|
71
|
-
* However, the Typescript compiler will remove comments that it does not believe are associated with code.
|
|
72
|
-
* Therefore we have to use some dummy code to prevent it from removing the STRIP stripping comments.
|
|
73
|
-
*/
|
|
74
|
-
const STRIP = 0;
|
|
75
|
-
/* STRIP:START */
|
|
76
|
-
STRIP;
|
|
77
|
-
/* eslint-disable arca/import-ordering */
|
|
78
|
-
const fs = __importStar(require("fs-extra"));
|
|
79
|
-
const path_1 = __importDefault(require("path"));
|
|
80
|
-
const BitmarkFileGenerator_1 = require("./generator/bitmark/BitmarkFileGenerator");
|
|
81
|
-
const JsonFileGenerator_1 = require("./generator/json/JsonFileGenerator");
|
|
82
|
-
const Breakscape_1 = require("./breakscaping/Breakscape");
|
|
83
|
-
const TextLocation_1 = require("./model/enum/TextLocation");
|
|
84
|
-
const TextFormat_1 = require("./model/enum/TextFormat");
|
|
85
|
-
/* STRIP:END */
|
|
86
|
-
STRIP;
|
|
87
|
-
/**
|
|
88
|
-
* Input type enumeration
|
|
89
|
-
*/
|
|
90
|
-
const Input = (0, superenum_1.superenum)({
|
|
91
|
-
/**
|
|
92
|
-
* Input is as a string
|
|
93
|
-
*/
|
|
94
|
-
string: 'string',
|
|
95
|
-
/**
|
|
96
|
-
* Input is as a file path
|
|
97
|
-
*/
|
|
98
|
-
file: 'file',
|
|
99
|
-
});
|
|
100
|
-
exports.Input = Input;
|
|
101
|
-
/**
|
|
102
|
-
* Output type enumeration
|
|
103
|
-
*/
|
|
104
|
-
const Output = (0, superenum_1.superenum)({
|
|
105
|
-
/**
|
|
106
|
-
* Output bitmark string
|
|
107
|
-
*/
|
|
108
|
-
bitmark: 'bitmark',
|
|
109
|
-
/**
|
|
110
|
-
* Output JSON as a plain JS object, or a file
|
|
111
|
-
*/
|
|
112
|
-
json: 'json',
|
|
113
|
-
/**
|
|
114
|
-
* Output AST as a plain JS object, or a file
|
|
115
|
-
*/
|
|
116
|
-
ast: 'ast',
|
|
117
|
-
});
|
|
118
|
-
exports.Output = Output;
|
|
119
|
-
/**
|
|
120
|
-
* Bitmark tool for manipulating bitmark in all its formats.
|
|
121
|
-
*
|
|
122
|
-
*/
|
|
123
|
-
class BitmarkParserGenerator {
|
|
124
|
-
constructor() {
|
|
125
|
-
this.ast = new Ast_1.Ast();
|
|
126
|
-
this.jsonParser = new JsonParser_1.JsonParser();
|
|
127
|
-
this.bitmarkParser = new BitmarkParser_1.BitmarkParser();
|
|
128
|
-
this.textParser = new TextParser_1.TextParser();
|
|
129
|
-
this.textGenerator = new TextGenerator_1.TextGenerator();
|
|
130
|
-
/**
|
|
131
|
-
* Stringify / prettify a plain JS object to a JSON string, depending on the JSON options
|
|
132
|
-
*
|
|
133
|
-
* @param json
|
|
134
|
-
* @param options
|
|
135
|
-
* @param forceStringify
|
|
136
|
-
* @returns
|
|
137
|
-
*/
|
|
138
|
-
this.jsonStringifyPrettify = (json, options, forceStringify) => {
|
|
139
|
-
const prettifySpace = options.prettify === true ? 2 : options.prettify || undefined;
|
|
140
|
-
const stringify = forceStringify || options.stringify === true || prettifySpace !== undefined;
|
|
141
|
-
if (stringify) {
|
|
142
|
-
return JSON.stringify(json, null, prettifySpace);
|
|
143
|
-
}
|
|
144
|
-
return json;
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Get the version of the bitmark-parser-generator library
|
|
149
|
-
*/
|
|
150
|
-
version() {
|
|
151
|
-
return Env_1.env.appVersion.full;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Get information about the bitmark-parser-generator library
|
|
155
|
-
*/
|
|
156
|
-
info(options) {
|
|
157
|
-
const opts = Object.assign({}, options);
|
|
158
|
-
const builder = new InfoBuilder_1.InfoBuilder();
|
|
159
|
-
let res;
|
|
160
|
-
const outputString = !opts.outputFormat || opts.outputFormat === InfoFormat_1.InfoFormat.text;
|
|
161
|
-
const outputJson = opts.outputFormat === InfoFormat_1.InfoFormat.json;
|
|
162
|
-
const all = opts.type === InfoType_1.InfoType.all;
|
|
163
|
-
const deprecated = opts.type === InfoType_1.InfoType.deprecated;
|
|
164
|
-
const includeNonDeprecated = all || !deprecated;
|
|
165
|
-
const includeDeprecated = all || deprecated;
|
|
166
|
-
if (opts.type === InfoType_1.InfoType.bit) {
|
|
167
|
-
const bitConfigs = builder.getSupportedBitConfigs().filter((b) => {
|
|
168
|
-
if (!opts.bit)
|
|
169
|
-
return true;
|
|
170
|
-
const bitType = Config_1.Config.getBitType(opts.bit);
|
|
171
|
-
return bitType === b.bitType;
|
|
172
|
-
});
|
|
173
|
-
if (outputString) {
|
|
174
|
-
res = bitConfigs
|
|
175
|
-
.map((b) => b.toString({
|
|
176
|
-
includeChains: true,
|
|
177
|
-
includeConfigs: true,
|
|
178
|
-
}))
|
|
179
|
-
.join('\n\n--------------\n\n');
|
|
180
|
-
}
|
|
181
|
-
else {
|
|
182
|
-
res = bitConfigs;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
|
-
// List / List Deprecated
|
|
187
|
-
const supportedBits = builder
|
|
188
|
-
.getSupportedBits({
|
|
189
|
-
includeNonDeprecated,
|
|
190
|
-
includeDeprecated,
|
|
191
|
-
})
|
|
192
|
-
.filter((b) => {
|
|
193
|
-
if (!opts.bit)
|
|
194
|
-
return true;
|
|
195
|
-
const bitType = Config_1.Config.getBitType(opts.bit);
|
|
196
|
-
if (b.name === bitType)
|
|
197
|
-
return true;
|
|
198
|
-
});
|
|
199
|
-
if (outputString) {
|
|
200
|
-
res = this.supportedBitsAsString(supportedBits);
|
|
201
|
-
}
|
|
202
|
-
else {
|
|
203
|
-
res = supportedBits;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
if (outputJson) {
|
|
207
|
-
const prettifySpace = opts.prettify === true ? 2 : opts.prettify || undefined;
|
|
208
|
-
res = JSON.stringify(res, null, prettifySpace);
|
|
209
|
-
}
|
|
210
|
-
return res;
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* Convert bitmark from bitmark to JSON, or JSON to bitmark.
|
|
214
|
-
*
|
|
215
|
-
* Input type is detected automatically and may be:
|
|
216
|
-
* - string: bitmark, JSON, or AST
|
|
217
|
-
* - object: JSON or AST
|
|
218
|
-
* - file: bitmark, JSON, or AST
|
|
219
|
-
*
|
|
220
|
-
* Output type is selected automatically based on input type detection:
|
|
221
|
-
* - input(JSON/AST) ==> output(bitmark)
|
|
222
|
-
* - input(bitmark) ==> output(JSON)
|
|
223
|
-
*
|
|
224
|
-
* By default, the result is returned as a string for bitmark, or a plain JS object for JSON/AST.
|
|
225
|
-
*
|
|
226
|
-
* The options can be used to write the output to a file and to set conversion options or override defaults.
|
|
227
|
-
*
|
|
228
|
-
* If both the input and output formats are the same, the input will be validated and rewritten.
|
|
229
|
-
* This feature be used to upgrade bitmark or JSON to the latest version.
|
|
230
|
-
*
|
|
231
|
-
* @param input - bitmark or JSON or AST as a string, JSON or AST as plain JS object, or path to a file containing
|
|
232
|
-
* bitmark, JSON, or AST.
|
|
233
|
-
* @param options - the conversion options
|
|
234
|
-
* @returns Promise that resolves to string if converting to bitmark, a plain JS object if converting to JSON, or
|
|
235
|
-
* void if writing to a file
|
|
236
|
-
* @throws Error if any error occurs
|
|
237
|
-
*/
|
|
238
|
-
convert(input, options) {
|
|
239
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
240
|
-
let res;
|
|
241
|
-
const opts = Object.assign({}, options);
|
|
242
|
-
// const fileOptions = Object.assign({}, opts.fileOptions);
|
|
243
|
-
// const bitmarkOptions = Object.assign({}, opts.bitmarkOptions);
|
|
244
|
-
const jsonOptions = Object.assign({}, opts.jsonOptions);
|
|
245
|
-
const outputFormat = opts.outputFormat;
|
|
246
|
-
const outputBitmark = outputFormat === Output.bitmark;
|
|
247
|
-
const outputJson = outputFormat === Output.json;
|
|
248
|
-
const outputAst = outputFormat === Output.ast;
|
|
249
|
-
const bitmarkParserType = BitmarkParserType_1.BitmarkParserType.peggy; // Option is no longer used as only Peggy parser supported
|
|
250
|
-
let inStr = input;
|
|
251
|
-
// Check if we are trying to write to a file in the browser
|
|
252
|
-
if (Env_1.env.isBrowser && opts.outputFile) {
|
|
253
|
-
throw new Error('Cannot write to file in browser environment');
|
|
254
|
-
}
|
|
255
|
-
// If a file, read the file in
|
|
256
|
-
if (!opts.inputFormat || opts.inputFormat === Input.file) {
|
|
257
|
-
if (Env_1.env.isNode) {
|
|
258
|
-
if (fs.existsSync(inStr)) {
|
|
259
|
-
inStr = fs.readFileSync(inStr, {
|
|
260
|
-
encoding: 'utf8',
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
// Preprocess as AST to see if AST
|
|
266
|
-
let ast = this.ast.preprocessAst(inStr);
|
|
267
|
-
const isAst = !!ast;
|
|
268
|
-
if (!isAst) {
|
|
269
|
-
// Not AST, so process as JSON to see if we have JSON
|
|
270
|
-
ast = this.jsonParser.toAst(inStr);
|
|
271
|
-
}
|
|
272
|
-
const isJson = !!(ast === null || ast === void 0 ? void 0 : ast.bits);
|
|
273
|
-
const isBitmark = !isJson && !isAst; // Assume bitmark since not AST or JSON
|
|
274
|
-
// Helper conversion functions
|
|
275
|
-
const bitmarkToBitmark = (bitmarkStr) => __awaiter(this, void 0, void 0, function* () {
|
|
276
|
-
// Validate and prettify
|
|
277
|
-
yield bitmarkToAst(bitmarkStr);
|
|
278
|
-
yield astToBitmark(res);
|
|
279
|
-
});
|
|
280
|
-
const bitmarkToAst = (bitmarkStr) => __awaiter(this, void 0, void 0, function* () {
|
|
281
|
-
res = this.bitmarkParser.toAst(bitmarkStr, {
|
|
282
|
-
parserType: bitmarkParserType,
|
|
283
|
-
});
|
|
284
|
-
});
|
|
285
|
-
const bitmarkToJson = (bitmarkStr) => __awaiter(this, void 0, void 0, function* () {
|
|
286
|
-
if (bitmarkParserType === BitmarkParserType_1.BitmarkParserType.peggy) {
|
|
287
|
-
// Convert the bitmark to JSON using the peggy parser (aways true, only peggy parser supported)
|
|
288
|
-
// Generate AST from the Bitmark markup
|
|
289
|
-
ast = this.bitmarkParser.toAst(bitmarkStr, {
|
|
290
|
-
parserType: bitmarkParserType,
|
|
291
|
-
});
|
|
292
|
-
// Convert the AST to JSON
|
|
293
|
-
if (opts.outputFile) {
|
|
294
|
-
// Write JSON file
|
|
295
|
-
const generator = new JsonFileGenerator_1.JsonFileGenerator(opts.outputFile, opts);
|
|
296
|
-
yield generator.generate(ast);
|
|
297
|
-
}
|
|
298
|
-
else {
|
|
299
|
-
// Generate JSON object
|
|
300
|
-
const generator = new JsonObjectGenerator_1.JsonObjectGenerator(opts);
|
|
301
|
-
const json = yield generator.generate(ast);
|
|
302
|
-
// Return JSON as object or string depending on prettify/stringify option
|
|
303
|
-
res = this.jsonStringifyPrettify(json, jsonOptions);
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
});
|
|
307
|
-
const astToBitmark = (astJson) => __awaiter(this, void 0, void 0, function* () {
|
|
308
|
-
// Convert the AST to bitmark
|
|
309
|
-
if (opts.outputFile) {
|
|
310
|
-
// Write markup file
|
|
311
|
-
const generator = new BitmarkFileGenerator_1.BitmarkFileGenerator(opts.outputFile, opts);
|
|
312
|
-
yield generator.generate(astJson);
|
|
313
|
-
}
|
|
314
|
-
else {
|
|
315
|
-
// Generate markup string
|
|
316
|
-
const generator = new BitmarkStringGenerator_1.BitmarkStringGenerator(opts);
|
|
317
|
-
res = yield generator.generate(astJson);
|
|
318
|
-
}
|
|
319
|
-
});
|
|
320
|
-
const astToAst = (astJson) => __awaiter(this, void 0, void 0, function* () {
|
|
321
|
-
// Return JSON as object or string depending on prettify/stringify option
|
|
322
|
-
res = this.jsonStringifyPrettify(astJson, jsonOptions);
|
|
323
|
-
});
|
|
324
|
-
const astToJson = (astJson) => __awaiter(this, void 0, void 0, function* () {
|
|
325
|
-
// Convert the AST to JSON
|
|
326
|
-
if (opts.outputFile) {
|
|
327
|
-
// Write JSON file
|
|
328
|
-
const generator = new JsonFileGenerator_1.JsonFileGenerator(opts.outputFile, opts);
|
|
329
|
-
yield generator.generate(astJson);
|
|
330
|
-
}
|
|
331
|
-
else {
|
|
332
|
-
// Generate JSON object
|
|
333
|
-
const generator = new JsonObjectGenerator_1.JsonObjectGenerator(opts);
|
|
334
|
-
const json = yield generator.generate(astJson);
|
|
335
|
-
// Return JSON as object or string depending on prettify/stringify option
|
|
336
|
-
res = this.jsonStringifyPrettify(json, jsonOptions);
|
|
337
|
-
}
|
|
338
|
-
});
|
|
339
|
-
const jsonToBitmark = (astJson) => __awaiter(this, void 0, void 0, function* () {
|
|
340
|
-
// We already have the ast from detecting the input type, so use the AST we already have
|
|
341
|
-
// Convert the JSON to bitmark
|
|
342
|
-
if (opts.outputFile) {
|
|
343
|
-
// Write markup file
|
|
344
|
-
const generator = new BitmarkFileGenerator_1.BitmarkFileGenerator(opts.outputFile, opts);
|
|
345
|
-
yield generator.generate(astJson);
|
|
346
|
-
}
|
|
347
|
-
else {
|
|
348
|
-
// Generate markup string
|
|
349
|
-
const generator = new BitmarkStringGenerator_1.BitmarkStringGenerator(opts);
|
|
350
|
-
res = yield generator.generate(astJson);
|
|
351
|
-
}
|
|
352
|
-
});
|
|
353
|
-
const jsonToAst = (astJson) => __awaiter(this, void 0, void 0, function* () {
|
|
354
|
-
// We already have the ast from detecting the input type, so just return the AST we already have
|
|
355
|
-
// Return JSON as object or string depending on prettify/stringify option
|
|
356
|
-
res = this.jsonStringifyPrettify(astJson, jsonOptions);
|
|
357
|
-
});
|
|
358
|
-
const jsonToJson = (astJson) => __awaiter(this, void 0, void 0, function* () {
|
|
359
|
-
// Validate and prettify
|
|
360
|
-
yield astToJson(astJson);
|
|
361
|
-
});
|
|
362
|
-
// Convert
|
|
363
|
-
if (isBitmark) {
|
|
364
|
-
// Input was Bitmark
|
|
365
|
-
if (outputBitmark) {
|
|
366
|
-
// Bitmark ==> Bitmark
|
|
367
|
-
yield bitmarkToBitmark(inStr);
|
|
368
|
-
}
|
|
369
|
-
else if (outputAst) {
|
|
370
|
-
// Bitmark ==> AST
|
|
371
|
-
yield bitmarkToAst(inStr);
|
|
372
|
-
}
|
|
373
|
-
else {
|
|
374
|
-
// Bitmark ==> JSON
|
|
375
|
-
yield bitmarkToJson(inStr);
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
else if (isAst) {
|
|
379
|
-
// Input was AST
|
|
380
|
-
ast = ast;
|
|
381
|
-
if (outputAst) {
|
|
382
|
-
// AST ==> AST
|
|
383
|
-
yield astToAst(ast);
|
|
384
|
-
}
|
|
385
|
-
else if (outputJson) {
|
|
386
|
-
// AST ==> JSON
|
|
387
|
-
yield astToJson(ast);
|
|
388
|
-
}
|
|
389
|
-
else {
|
|
390
|
-
// AST ==> Bitmark
|
|
391
|
-
yield astToBitmark(ast);
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
else {
|
|
395
|
-
// Input was JSON
|
|
396
|
-
ast = ast;
|
|
397
|
-
if (outputJson) {
|
|
398
|
-
// JSON ==> JSON
|
|
399
|
-
yield jsonToJson(ast);
|
|
400
|
-
}
|
|
401
|
-
else if (outputAst) {
|
|
402
|
-
// JSON ==> AST
|
|
403
|
-
yield jsonToAst(ast);
|
|
404
|
-
}
|
|
405
|
-
else {
|
|
406
|
-
// JSON ==> Bitmark
|
|
407
|
-
yield jsonToBitmark(ast);
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
return res;
|
|
411
|
-
});
|
|
412
|
-
}
|
|
413
|
-
/**
|
|
414
|
-
* Upgrade bitmark or JSON, upgrading to the latest supported syntax, removing unrecognised data in the process.
|
|
415
|
-
*
|
|
416
|
-
* THIS FEATURE SHOULD BE USED WITH CAUTION. IT WILL POTENTIALLY DELETE DATA.
|
|
417
|
-
*
|
|
418
|
-
* Input type is detected automatically and may be:
|
|
419
|
-
* - string: bitmark, JSON
|
|
420
|
-
* - object: JSON
|
|
421
|
-
* - file: bitmark, JSON
|
|
422
|
-
*
|
|
423
|
-
* Output type is the same as the detected input type
|
|
424
|
-
*
|
|
425
|
-
* By default, the result is returned as a string for bitmark, or a plain JS object for JSON.
|
|
426
|
-
*
|
|
427
|
-
* The options can be used to write the output to a file and to set conversion options or override defaults.
|
|
428
|
-
*
|
|
429
|
-
* If both the input and output formats are the same, the input will be validated and rewritten.
|
|
430
|
-
*
|
|
431
|
-
* @param input - bitmark or JSON or AST as a string, JSON or AST as plain JS object, or path to a file containing
|
|
432
|
-
* bitmark, JSON, or AST.
|
|
433
|
-
* @param options - the conversion options
|
|
434
|
-
* @returns Promise that resolves to string if upgrading to bitmark, a plain JS object if converting to JSON, or
|
|
435
|
-
* void if writing to a file
|
|
436
|
-
* @throws Error if any error occurs
|
|
437
|
-
*/
|
|
438
|
-
upgrade(input, options) {
|
|
439
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
440
|
-
let res;
|
|
441
|
-
const opts = Object.assign({}, options);
|
|
442
|
-
// const fileOptions = Object.assign({}, opts.fileOptions);
|
|
443
|
-
// const bitmarkOptions = Object.assign({}, opts.bitmarkOptions);
|
|
444
|
-
const jsonOptions = Object.assign({}, opts.jsonOptions);
|
|
445
|
-
const bitmarkParserType = opts.bitmarkParserType;
|
|
446
|
-
let inStr = input;
|
|
447
|
-
// Check if we are trying to write to a file in the browser
|
|
448
|
-
if (Env_1.env.isBrowser && opts.outputFile) {
|
|
449
|
-
throw new Error('Cannot write to file in browser environment');
|
|
450
|
-
}
|
|
451
|
-
// If a file, read the file in
|
|
452
|
-
if (!opts.inputFormat || opts.inputFormat === Input.file) {
|
|
453
|
-
if (Env_1.env.isNode) {
|
|
454
|
-
if (fs.existsSync(inStr)) {
|
|
455
|
-
inStr = fs.readFileSync(inStr, {
|
|
456
|
-
encoding: 'utf8',
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
// Process as JSON to see if we have JSON
|
|
462
|
-
let ast = this.jsonParser.toAst(inStr);
|
|
463
|
-
const isJson = !!(ast === null || ast === void 0 ? void 0 : ast.bits);
|
|
464
|
-
const isBitmark = !isJson; // Assume bitmark since not JSON
|
|
465
|
-
// Helper conversion functions
|
|
466
|
-
const bitmarkToBitmark = (bitmarkStr) => __awaiter(this, void 0, void 0, function* () {
|
|
467
|
-
// Validate and upgrade
|
|
468
|
-
const astJson = this.bitmarkParser.toAst(bitmarkStr, {
|
|
469
|
-
parserType: bitmarkParserType,
|
|
470
|
-
});
|
|
471
|
-
// Convert the AST to bitmark
|
|
472
|
-
if (opts.outputFile) {
|
|
473
|
-
// Write markup file
|
|
474
|
-
const generator = new BitmarkFileGenerator_1.BitmarkFileGenerator(opts.outputFile, opts);
|
|
475
|
-
yield generator.generate(astJson);
|
|
476
|
-
}
|
|
477
|
-
else {
|
|
478
|
-
// Generate markup string
|
|
479
|
-
const generator = new BitmarkStringGenerator_1.BitmarkStringGenerator(opts);
|
|
480
|
-
res = yield generator.generate(astJson);
|
|
481
|
-
}
|
|
482
|
-
});
|
|
483
|
-
const jsonToJson = (astJson) => __awaiter(this, void 0, void 0, function* () {
|
|
484
|
-
// Validate and upgrade
|
|
485
|
-
// Convert the AST to JSON
|
|
486
|
-
if (opts.outputFile) {
|
|
487
|
-
// Write JSON file
|
|
488
|
-
const generator = new JsonFileGenerator_1.JsonFileGenerator(opts.outputFile, opts);
|
|
489
|
-
yield generator.generate(astJson);
|
|
490
|
-
}
|
|
491
|
-
else {
|
|
492
|
-
// Generate JSON object
|
|
493
|
-
const generator = new JsonObjectGenerator_1.JsonObjectGenerator(opts);
|
|
494
|
-
const json = yield generator.generate(astJson);
|
|
495
|
-
// Return JSON as object or string depending on prettify/stringify option
|
|
496
|
-
res = this.jsonStringifyPrettify(json, jsonOptions);
|
|
497
|
-
}
|
|
498
|
-
});
|
|
499
|
-
// Validate and Upgrade
|
|
500
|
-
if (isBitmark) {
|
|
501
|
-
// Bitmark ==> Bitmark
|
|
502
|
-
yield bitmarkToBitmark(inStr);
|
|
503
|
-
}
|
|
504
|
-
else {
|
|
505
|
-
// JSON ==> JSON
|
|
506
|
-
ast = ast;
|
|
507
|
-
yield jsonToJson(ast);
|
|
508
|
-
}
|
|
509
|
-
return res;
|
|
510
|
-
});
|
|
511
|
-
}
|
|
512
|
-
/**
|
|
513
|
-
* Create a bitmark AST (Abstract Syntax Tree) from bitmark or JSON or AST
|
|
514
|
-
*
|
|
515
|
-
* Input type is detected automatically and may be string, object (JSON or AST), or file
|
|
516
|
-
*
|
|
517
|
-
* @param input the JSON or bitmark to convert to a bitmark AST
|
|
518
|
-
* @param options - the create AST options
|
|
519
|
-
* @returns bitmark AST
|
|
520
|
-
* @throws Error if any error occurs
|
|
521
|
-
*/
|
|
522
|
-
createAst(input, options) {
|
|
523
|
-
let res;
|
|
524
|
-
let inStr = input;
|
|
525
|
-
const opts = Object.assign({}, options);
|
|
526
|
-
// If a file, read the file in
|
|
527
|
-
if (!opts.inputFormat || opts.inputFormat === Input.file) {
|
|
528
|
-
if (Env_1.env.isNode) {
|
|
529
|
-
if (fs.existsSync(inStr)) {
|
|
530
|
-
inStr = fs.readFileSync(inStr, {
|
|
531
|
-
encoding: 'utf8',
|
|
532
|
-
});
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
// Preprocess as AST to see if AST
|
|
537
|
-
let ast = this.ast.preprocessAst(inStr);
|
|
538
|
-
const isAst = !!ast;
|
|
539
|
-
if (!isAst) {
|
|
540
|
-
// Not AST, so process as JSON to see if we have JSON
|
|
541
|
-
ast = this.jsonParser.toAst(inStr);
|
|
542
|
-
}
|
|
543
|
-
const isJson = !!(ast === null || ast === void 0 ? void 0 : ast.bits);
|
|
544
|
-
const isBitmark = !isJson && !isAst; // Assume bitmark since not AST or JSON
|
|
545
|
-
if (isBitmark) {
|
|
546
|
-
// Bitmark ==> AST
|
|
547
|
-
res = this.bitmarkParser.toAst(inStr);
|
|
548
|
-
}
|
|
549
|
-
else {
|
|
550
|
-
// JSON / AST ==> AST
|
|
551
|
-
res = ast;
|
|
552
|
-
}
|
|
553
|
-
return res;
|
|
554
|
-
}
|
|
555
|
-
/**
|
|
556
|
-
* Convert bitmark text from JSON, or JSON to bitmark text.
|
|
557
|
-
*
|
|
558
|
-
* Input type is detected automatically and may be:
|
|
559
|
-
* - string: bitmark text or JSON
|
|
560
|
-
* - object: JSON
|
|
561
|
-
* - file: bitmark text or JSON
|
|
562
|
-
*
|
|
563
|
-
* Output type is selected automatically based on input type detection:
|
|
564
|
-
* - input(JSON) ==> output(bitmark text)
|
|
565
|
-
* - input(bitmark text) ==> output(JSON)
|
|
566
|
-
*
|
|
567
|
-
* By default, the result is returned as a string for bitmark text, or a plain JS object for JSON.
|
|
568
|
-
*
|
|
569
|
-
* The options can be used to write the output to a file and to set conversion options or override defaults.
|
|
570
|
-
*
|
|
571
|
-
* @param input - bitmark text or JSON as a string, JSON as plain JS object, or path to a file containing
|
|
572
|
-
* bitmark text or JSON.
|
|
573
|
-
* @param options - the conversion options
|
|
574
|
-
* @returns Promise that resolves to string if converting to bitmark text, a plain JS object if converting to JSON, or
|
|
575
|
-
* void if writing to a file
|
|
576
|
-
* @throws Error if any error occurs
|
|
577
|
-
*/
|
|
578
|
-
convertText(input, options) {
|
|
579
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
580
|
-
var _a, _b;
|
|
581
|
-
let res;
|
|
582
|
-
let preRes;
|
|
583
|
-
const opts = Object.assign({}, options);
|
|
584
|
-
const fileOptions = Object.assign({}, opts.fileOptions);
|
|
585
|
-
const jsonOptions = Object.assign({}, opts.jsonOptions);
|
|
586
|
-
const textFormat = (_a = TextFormat_1.TextFormat.fromValue(opts.textFormat)) !== null && _a !== void 0 ? _a : TextFormat_1.TextFormat.bitmarkText;
|
|
587
|
-
const textLocation = (_b = opts.textLocation) !== null && _b !== void 0 ? _b : TextLocation_1.TextLocation.body;
|
|
588
|
-
let inStr = input;
|
|
589
|
-
// Check if we are trying to write to a file in the browser
|
|
590
|
-
if (Env_1.env.isBrowser && opts.outputFile) {
|
|
591
|
-
throw new Error('Cannot write to file in browser environment');
|
|
592
|
-
}
|
|
593
|
-
// If a file, read the file in
|
|
594
|
-
if (!opts.inputFormat || opts.inputFormat === Input.file) {
|
|
595
|
-
if (Env_1.env.isNode) {
|
|
596
|
-
if (fs.existsSync(inStr)) {
|
|
597
|
-
inStr = fs.readFileSync(inStr, {
|
|
598
|
-
encoding: 'utf8',
|
|
599
|
-
});
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
// Preprocess as text AST to see if text AST
|
|
604
|
-
const ast = this.textParser.preprocessAst(inStr);
|
|
605
|
-
const isAst = !!ast;
|
|
606
|
-
if (!isAst) {
|
|
607
|
-
preRes = this.textParser.toAst(inStr, {
|
|
608
|
-
format: textFormat,
|
|
609
|
-
location: TextLocation_1.TextLocation.body,
|
|
610
|
-
});
|
|
611
|
-
}
|
|
612
|
-
else {
|
|
613
|
-
preRes = yield this.textGenerator.generate(ast, textFormat, textLocation);
|
|
614
|
-
}
|
|
615
|
-
if (opts.outputFile) {
|
|
616
|
-
const output = opts.outputFile.toString();
|
|
617
|
-
let strRes = preRes;
|
|
618
|
-
if (!isAst) {
|
|
619
|
-
strRes = this.jsonStringifyPrettify(preRes, jsonOptions, true);
|
|
620
|
-
}
|
|
621
|
-
// Write JSON to file
|
|
622
|
-
const flag = fileOptions.append ? 'a' : 'w';
|
|
623
|
-
fs.ensureDirSync(path_1.default.dirname(output));
|
|
624
|
-
fs.writeFileSync(output, strRes, {
|
|
625
|
-
flag,
|
|
626
|
-
});
|
|
627
|
-
}
|
|
628
|
-
else {
|
|
629
|
-
if (!isAst) {
|
|
630
|
-
res = this.jsonStringifyPrettify(preRes, jsonOptions);
|
|
631
|
-
}
|
|
632
|
-
else {
|
|
633
|
-
res = preRes;
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
return res;
|
|
637
|
-
});
|
|
638
|
-
}
|
|
639
|
-
/**
|
|
640
|
-
* Breakscape bitmark text.
|
|
641
|
-
*
|
|
642
|
-
* Input type is detected automatically and may be:
|
|
643
|
-
* - string: text
|
|
644
|
-
* - file: path to a file containing text
|
|
645
|
-
*
|
|
646
|
-
* By default, the result is returned as a string.
|
|
647
|
-
* By default, the text is breakscaped as if it was bitmark text in the body.
|
|
648
|
-
* Use the options to change this behaviour.
|
|
649
|
-
*
|
|
650
|
-
* The options can be used to write the output to a file.
|
|
651
|
-
*
|
|
652
|
-
* @param input - text, or path to a file containing text.
|
|
653
|
-
* @param options - the conversion options
|
|
654
|
-
* @returns breakscaped string, or void if writing to a file
|
|
655
|
-
* @throws Error if any error occurs
|
|
656
|
-
*/
|
|
657
|
-
breakscapeText(input, options) {
|
|
658
|
-
var _a, _b;
|
|
659
|
-
if (!input)
|
|
660
|
-
return input;
|
|
661
|
-
const opts = Object.assign({}, options);
|
|
662
|
-
const fileOptions = Object.assign({}, opts.fileOptions);
|
|
663
|
-
const textFormat = (_a = TextFormat_1.TextFormat.fromValue(opts.textFormat)) !== null && _a !== void 0 ? _a : TextFormat_1.TextFormat.bitmarkText;
|
|
664
|
-
const textLocation = (_b = opts.textLocation) !== null && _b !== void 0 ? _b : TextLocation_1.TextLocation.body;
|
|
665
|
-
let inStr = input;
|
|
666
|
-
// Check if we are trying to write to a file in the browser
|
|
667
|
-
if (Env_1.env.isBrowser && opts.outputFile) {
|
|
668
|
-
throw new Error('Cannot write to file in browser environment');
|
|
669
|
-
}
|
|
670
|
-
// If a file, read the file in
|
|
671
|
-
if (!opts.inputFormat || opts.inputFormat === Input.file) {
|
|
672
|
-
if (Env_1.env.isNode) {
|
|
673
|
-
if (fs.existsSync(inStr)) {
|
|
674
|
-
inStr = fs.readFileSync(inStr, {
|
|
675
|
-
encoding: 'utf8',
|
|
676
|
-
});
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
// Do the breakscape
|
|
681
|
-
const res = Breakscape_1.Breakscape.breakscape(inStr, {
|
|
682
|
-
format: textFormat,
|
|
683
|
-
location: textLocation,
|
|
684
|
-
});
|
|
685
|
-
if (opts.outputFile) {
|
|
686
|
-
const output = opts.outputFile.toString();
|
|
687
|
-
// Write JSON to file
|
|
688
|
-
const flag = fileOptions.append ? 'a' : 'w';
|
|
689
|
-
fs.ensureDirSync(path_1.default.dirname(output));
|
|
690
|
-
fs.writeFileSync(output, res, {
|
|
691
|
-
flag,
|
|
692
|
-
});
|
|
693
|
-
}
|
|
694
|
-
else {
|
|
695
|
-
return res;
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
/**
|
|
699
|
-
* Unescape (unbreakscape) bitmark text
|
|
700
|
-
*
|
|
701
|
-
* Input type is detected automatically and may be:
|
|
702
|
-
* - string: text
|
|
703
|
-
* - file: path to a file containing text
|
|
704
|
-
*
|
|
705
|
-
* By default, the result is returned as a string.
|
|
706
|
-
* By default, the text is unbreakscaped as if it was bitmark text in the body.
|
|
707
|
-
* Use the options to change this behaviour.
|
|
708
|
-
*
|
|
709
|
-
* The options can be used to write the output to a file.
|
|
710
|
-
*
|
|
711
|
-
* @param input - text, or path to a file containing text.
|
|
712
|
-
* @param options - the conversion options
|
|
713
|
-
* @returns unbreakscaped string, or void if writing to a file
|
|
714
|
-
* @throws Error if any error occurs
|
|
715
|
-
*/
|
|
716
|
-
unbreakscapeText(input, options) {
|
|
717
|
-
var _a, _b;
|
|
718
|
-
if (!input)
|
|
719
|
-
return input;
|
|
720
|
-
const opts = Object.assign({}, options);
|
|
721
|
-
const fileOptions = Object.assign({}, opts.fileOptions);
|
|
722
|
-
const textFormat = (_a = TextFormat_1.TextFormat.fromValue(opts.textFormat)) !== null && _a !== void 0 ? _a : TextFormat_1.TextFormat.bitmarkText;
|
|
723
|
-
const textLocation = (_b = opts.textLocation) !== null && _b !== void 0 ? _b : TextLocation_1.TextLocation.body;
|
|
724
|
-
let inStr = input;
|
|
725
|
-
// Check if we are trying to write to a file in the browser
|
|
726
|
-
if (Env_1.env.isBrowser && opts.outputFile) {
|
|
727
|
-
throw new Error('Cannot write to file in browser environment');
|
|
728
|
-
}
|
|
729
|
-
// If a file, read the file in
|
|
730
|
-
if (!opts.inputFormat || opts.inputFormat === Input.file) {
|
|
731
|
-
if (Env_1.env.isNode) {
|
|
732
|
-
if (fs.existsSync(inStr)) {
|
|
733
|
-
inStr = fs.readFileSync(inStr, {
|
|
734
|
-
encoding: 'utf8',
|
|
735
|
-
});
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
// Do the unbreakscape
|
|
740
|
-
const res = Breakscape_1.Breakscape.unbreakscape(inStr, {
|
|
741
|
-
format: textFormat,
|
|
742
|
-
location: textLocation,
|
|
743
|
-
});
|
|
744
|
-
if (opts.outputFile) {
|
|
745
|
-
const output = opts.outputFile.toString();
|
|
746
|
-
// Write JSON to file
|
|
747
|
-
const flag = fileOptions.append ? 'a' : 'w';
|
|
748
|
-
fs.ensureDirSync(path_1.default.dirname(output));
|
|
749
|
-
fs.writeFileSync(output, res, {
|
|
750
|
-
flag,
|
|
751
|
-
});
|
|
752
|
-
}
|
|
753
|
-
else {
|
|
754
|
-
return res;
|
|
755
|
-
}
|
|
756
|
-
return;
|
|
757
|
-
}
|
|
758
|
-
/**
|
|
759
|
-
* Get the supported bits as a formatted strings
|
|
760
|
-
*
|
|
761
|
-
* @param supportedBits
|
|
762
|
-
* @returns
|
|
763
|
-
*/
|
|
764
|
-
supportedBitsAsString(supportedBits) {
|
|
765
|
-
let res = '';
|
|
766
|
-
for (const rootBit of supportedBits) {
|
|
767
|
-
res += `${rootBit.name} (since: ${rootBit.since}`;
|
|
768
|
-
if (rootBit.deprecated)
|
|
769
|
-
res += `, deprecated: ${rootBit.deprecated}`;
|
|
770
|
-
res += ')\n';
|
|
771
|
-
}
|
|
772
|
-
return res;
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
exports.BitmarkParserGenerator = BitmarkParserGenerator;
|
|
776
|
-
//# sourceMappingURL=BitmarkParserGenerator.js.map
|