Skip to content
1 min read · 282 words

@nhtio/adk/batteries/artifacts ​

Artifacts battery: structured query tools for multiple document formats.

Remarks ​

Exports the four artifact classes (SpooledToonArtifact, SpooledYamlArtifact, SpooledXmlArtifact, SpooledEcmaScriptArtifact) and their converters from their respective batteries. Also exports the registerArtifactEncodables function for encoding support.

Note: decode() on artifact instances throws until registerArtifactEncodables() has been called. encode() requires no setup — the classes carry the Symbol.for('@nhtio/encoder:toEncoded') method with zero dependency on the encoder.

Variables ​

VariableDescription
E_TOON_DECODE_FAILEDThrown when TOON decoding fails.
E_TOON_PEER_MISSINGThrown when the TOON peer dependency cannot be loaded.
E_TYPESCRIPT_PEER_MISSINGThrown when the TypeScript peer dependency fails to load.
E_XML_PARSE_FAILEDThrown when XML parsing fails due to malformed markup.
E_XML_PARSER_PEER_MISSINGThrown when the fast-xml-parser optional peer is not installed or fails to load.
E_YAML_PARSE_ERRORThrown when YAML parsing fails due to invalid syntax.
E_YAML_PEER_MISSINGThrown when the js-yaml peer dependency is missing or fails to load.

Functions ​

FunctionDescription
registerArtifactEncodablesRegisters the four artifact classes with the '@nhtio/encoder' decoder.

References ​

EcmaScriptExport ​

Re-exports EcmaScriptExport


EcmaScriptImport ​

Re-exports EcmaScriptImport


EcmaScriptSymbol ​

Re-exports EcmaScriptSymbol


IdentifierReference ​

Re-exports IdentifierReference


jsonToToonTool ​

Re-exports jsonToToonTool


jsonToXmlTool ​

Re-exports jsonToXmlTool


jsonToYamlTool ​

Re-exports jsonToYamlTool


OutlineEntry ​

Re-exports OutlineEntry


OutlineMember ​

Re-exports OutlineMember


SpooledEcmaScriptArtifact ​

Re-exports SpooledEcmaScriptArtifact


SpooledToonArtifact ​

Re-exports SpooledToonArtifact


SpooledXmlArtifact ​

Re-exports SpooledXmlArtifact


SpooledYamlArtifact ​

Re-exports SpooledYamlArtifact


ToonDecodeOptions ​

Re-exports ToonDecodeOptions


toonToJsonTool ​

Re-exports toonToJsonTool


xmlToJsonTool ​

Re-exports xmlToJsonTool


yamlToJsonTool ​

Re-exports yamlToJsonTool