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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/cli.js +15 -8
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![npm version](https://badge.fury.io/js/library.dr-conversion.svg)](https://www.npmjs.com/package/library.dr-conversion)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
7
 
8
- **Library.DR-Conversion** (v0.3.1) 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!
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 in this directory.`);
491
- if (!options.interactive) {
492
- console.log('Use --interactive to configure a new one anyway.');
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
- console.log(`\n✅ Generated ${manifestFile} successfully!\n`);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "library.dr-conversion",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Unified interface for building multi-platform chat bots (Discord, Root, and more)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",