ddex-parser
Advanced tools
+10
-0
@@ -128,2 +128,10 @@ /* tslint:disable */ | ||
| } | ||
| export interface DetailedError { | ||
| errorType: string | ||
| message: string | ||
| field?: string | ||
| value?: string | ||
| context?: string | ||
| suggestions: Array<string> | ||
| } | ||
| export interface StreamedRelease { | ||
@@ -147,2 +155,4 @@ releaseReference: string | ||
| stream(xml: string, options?: StreamOptions | undefined | null): ReleaseStream | ||
| /** Get detailed error information for debugging - useful for error handling in JavaScript */ | ||
| getDetailedError(xml: string): DetailedError | ||
| } | ||
@@ -149,0 +159,0 @@ export declare class ReleaseStream { |
+10
-10
| { | ||
| "name": "ddex-parser", | ||
| "version": "0.4.3", | ||
| "version": "0.4.4", | ||
| "description": "DDEX XML parser with native and WASM bindings", | ||
@@ -76,12 +76,12 @@ "main": "index.js", | ||
| "optionalDependencies": { | ||
| "ddex-parser-win32-x64-msvc": "0.4.3", | ||
| "ddex-parser-darwin-x64": "0.4.3", | ||
| "ddex-parser-linux-x64-gnu": "0.4.3", | ||
| "ddex-parser-linux-x64-musl": "0.4.3", | ||
| "ddex-parser-linux-arm64-gnu": "0.4.3", | ||
| "ddex-parser-darwin-arm64": "0.4.3", | ||
| "ddex-parser-android-arm64": "0.4.3", | ||
| "ddex-parser-android-arm-eabi": "0.4.3", | ||
| "ddex-parser-linux-arm-gnueabihf": "0.4.3" | ||
| "ddex-parser-win32-x64-msvc": "0.4.4", | ||
| "ddex-parser-darwin-x64": "0.4.4", | ||
| "ddex-parser-linux-x64-gnu": "0.4.4", | ||
| "ddex-parser-linux-x64-musl": "0.4.4", | ||
| "ddex-parser-linux-arm64-gnu": "0.4.4", | ||
| "ddex-parser-darwin-arm64": "0.4.4", | ||
| "ddex-parser-android-arm64": "0.4.4", | ||
| "ddex-parser-android-arm-eabi": "0.4.4", | ||
| "ddex-parser-linux-arm-gnueabihf": "0.4.4" | ||
| } | ||
| } |
+27
-0
@@ -15,2 +15,4 @@ # DDEX Parser - JavaScript/TypeScript Bindings | ||
| npm install ddex-parser | ||
| # or for specific version | ||
| npm install ddex-parser@0.4.4 | ||
| # or | ||
@@ -20,2 +22,5 @@ yarn add ddex-parser | ||
| > **⚠️ v0.4.4 Breaking Changes** | ||
| > Enhanced validation now properly fails on missing required fields instead of using placeholder values. Ensure your error handling can catch validation errors for incomplete DDEX files. | ||
| ## Quick Start | ||
@@ -50,2 +55,24 @@ | ||
| ### Error Handling (v0.4.4+) | ||
| ```javascript | ||
| const { DdexParser } = require('ddex-parser'); | ||
| const parser = new DdexParser(); | ||
| try { | ||
| const result = parser.parseSync(xmlContent); | ||
| console.log('Parse successful:', result.messageId); | ||
| } catch (error) { | ||
| console.error('Parse failed:', error.message); | ||
| // v0.4.4+ provides detailed field-specific errors | ||
| if (error.message.includes('missing required field')) { | ||
| console.log('Incomplete DDEX file - missing required fields'); | ||
| } else if (error.message.includes('XML parsing failed')) { | ||
| console.log('Malformed XML structure'); | ||
| } | ||
| } | ||
| ``` | ||
| ### Browser (ES Modules) | ||
@@ -52,0 +79,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
2128249
4.28%465
2.2%365
7.99%