library.dr-conversion 0.3.1 → 0.3.2
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 +1 -1
- package/cli.js +15 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/library.dr-conversion)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
|
-
**Library.DR-Conversion** (v0.3.
|
|
8
|
+
**Library.DR-Conversion** (v0.3.2) is a TypeScript library that provides a unified, platform-agnostic interface for building chat bots that work across multiple platforms like Discord, Root, and potentially others. Write your bot logic once, and deploy it anywhere!
|
|
9
9
|
|
|
10
10
|
## ✨ Features
|
|
11
11
|
|
package/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* CLI tool for Library.DR-Conversion
|
|
@@ -487,10 +487,9 @@ program
|
|
|
487
487
|
|
|
488
488
|
// Check if manifest already exists
|
|
489
489
|
if (fs.existsSync(manifestFile)) {
|
|
490
|
-
console.log(`⚠️ ${manifestFile} already exists
|
|
491
|
-
if (
|
|
492
|
-
console.log('
|
|
493
|
-
return;
|
|
490
|
+
console.log(`⚠️ ${manifestFile} already exists — it will be overwritten.`);
|
|
491
|
+
if (options.interactive) {
|
|
492
|
+
console.log('Interactive mode will update fields and overwrite the manifest.');
|
|
494
493
|
}
|
|
495
494
|
}
|
|
496
495
|
|
|
@@ -633,13 +632,21 @@ program
|
|
|
633
632
|
rl.close();
|
|
634
633
|
}
|
|
635
634
|
|
|
636
|
-
// Write manifest file
|
|
635
|
+
// Write manifest file (overwrite if exists)
|
|
637
636
|
fs.writeFileSync(
|
|
638
637
|
manifestFile,
|
|
639
638
|
JSON.stringify(manifest, null, 2)
|
|
640
639
|
);
|
|
641
|
-
|
|
642
|
-
|
|
640
|
+
|
|
641
|
+
// Validate generated manifest
|
|
642
|
+
const validation = validateManifestObject(manifest);
|
|
643
|
+
if (!validation.valid) {
|
|
644
|
+
console.error('\n❌ Generated manifest failed validation:');
|
|
645
|
+
for (const e of validation.errors) console.error(' -', e);
|
|
646
|
+
process.exit(1);
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
console.log(`\n✅ Generated and validated ${manifestFile} successfully!\n`);
|
|
643
650
|
console.log('📋 Manifest Details:');
|
|
644
651
|
console.log(` Platform: ${isRootBot ? 'Root Bot (server-side)' : 'Root App (client-side)'}`);
|
|
645
652
|
console.log(` ID: ${manifest.id}`);
|
package/package.json
CHANGED