feat: update production release flow to validate less strictly (#1238)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Enhanced error handling during plugin file validation to ensure that
any invalid XML inputs are promptly flagged and processed gracefully.

- **Chores**
- Updated the release workflow configuration to utilize a more flexible
XML parsing approach, improving overall validation stability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Eli Bosley
2025-03-18 11:52:43 -04:00
committed by GitHub
parent a0021bf682
commit bd69b3383f
2 changed files with 16 additions and 3 deletions

View File

@@ -66,8 +66,23 @@ jobs:
// Validate the plugin file is valid XML
const xml2js = require('xml2js');
const parser = new xml2js.Parser();
const parser = new xml2js.Parser({
explicitCharkey: true,
trim: true,
explicitRoot: true,
explicitArray: false,
attrkey: 'ATTR',
charkey: 'TEXT',
xmlnskey: 'XMLNS',
normalizeTags: false,
normalize: false,
strict: false // Try with less strict parsing
});
parser.parseStringPromise(pluginContent).then((result) => {
if (!result) {
console.error('Plugin file is not valid XML');
process.exit(1);
}
console.log('Plugin file is valid XML');
// Write back to file