@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
| Variable | Description |
|---|---|
| E_TOON_DECODE_FAILED | Thrown when TOON decoding fails. |
| E_TOON_PEER_MISSING | Thrown when the TOON peer dependency cannot be loaded. |
| E_TYPESCRIPT_PEER_MISSING | Thrown when the TypeScript peer dependency fails to load. |
| E_XML_PARSE_FAILED | Thrown when XML parsing fails due to malformed markup. |
| E_XML_PARSER_PEER_MISSING | Thrown when the fast-xml-parser optional peer is not installed or fails to load. |
| E_YAML_PARSE_ERROR | Thrown when YAML parsing fails due to invalid syntax. |
| E_YAML_PEER_MISSING | Thrown when the js-yaml peer dependency is missing or fails to load. |
Functions
| Function | Description |
|---|---|
| registerArtifactEncodables | Registers 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