@bonginkan/maria 3.0.5 → 3.0.7
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 +561 -212
- package/bin/maria +74 -0
- package/bin/maria.d.ts +2 -0
- package/bin/maria.js +46663 -0
- package/bin/maria.js.map +1 -0
- package/dist/cli.d.ts +15 -0
- package/dist/cli.js +61 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +56 -5148
- package/dist/index.js.map +1 -1
- package/images/CLI_visual.png +0 -0
- package/package.json +33 -76
- package/dist/bin/maria.cjs +0 -50879
- package/dist/bin/maria.cjs.map +0 -1
- package/dist/cli.cjs +0 -37601
- package/dist/cli.cjs.map +0 -1
package/bin/maria
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* MARIA CODE - Smart Entry Point
|
|
5
|
+
* Launches either command mode or beautiful interactive CLI
|
|
6
|
+
* Bonginkan Inc.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
const { spawn } = require('child_process');
|
|
10
|
+
const path = require('path');
|
|
11
|
+
const fs = require('fs');
|
|
12
|
+
|
|
13
|
+
// Get the script directory and project root
|
|
14
|
+
const binDir = __dirname;
|
|
15
|
+
const projectRoot = path.dirname(binDir);
|
|
16
|
+
const mariaFile = path.join(projectRoot, 'dist', 'bin', 'maria.js');
|
|
17
|
+
const cliFile = path.join(projectRoot, 'dist', 'cli.js');
|
|
18
|
+
|
|
19
|
+
// Check if running with arguments or in interactive mode
|
|
20
|
+
const hasArgs = process.argv.length > 2;
|
|
21
|
+
|
|
22
|
+
if (hasArgs) {
|
|
23
|
+
// If arguments provided, use the built CLI for commands
|
|
24
|
+
console.log('🚀 MARIA CODE CLI - Command Mode');
|
|
25
|
+
|
|
26
|
+
// Check if built maria file exists
|
|
27
|
+
if (!fs.existsSync(mariaFile)) {
|
|
28
|
+
console.error('❌ Built file not found:', mariaFile);
|
|
29
|
+
console.error('💡 Please run: pnpm build');
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Launch the maria entry point with version check
|
|
34
|
+
const child = spawn('node', ['--no-deprecation', mariaFile, ...process.argv.slice(2)], {
|
|
35
|
+
stdio: 'inherit',
|
|
36
|
+
cwd: process.cwd(),
|
|
37
|
+
env: { ...process.env, NODE_NO_WARNINGS: '1' }
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
child.on('error', (err) => {
|
|
41
|
+
console.error('❌ Error:', err.message);
|
|
42
|
+
process.exit(1);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
child.on('exit', (code) => {
|
|
46
|
+
process.exit(code || 0);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
} else {
|
|
50
|
+
// If no arguments, launch interactive mode directly
|
|
51
|
+
|
|
52
|
+
// Check if maria.js file exists
|
|
53
|
+
if (!fs.existsSync(mariaFile)) {
|
|
54
|
+
console.error('❌ Built file not found:', mariaFile);
|
|
55
|
+
console.error('💡 Please run: pnpm build');
|
|
56
|
+
process.exit(1);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Launch the maria entry point directly for interactive mode
|
|
60
|
+
const child = spawn('node', ['--no-deprecation', mariaFile], {
|
|
61
|
+
stdio: 'inherit',
|
|
62
|
+
cwd: process.cwd(),
|
|
63
|
+
env: { ...process.env, NODE_NO_WARNINGS: '1' }
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
child.on('error', (err) => {
|
|
67
|
+
console.error('❌ Error:', err.message);
|
|
68
|
+
process.exit(1);
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
child.on('exit', (code) => {
|
|
72
|
+
process.exit(code || 0);
|
|
73
|
+
});
|
|
74
|
+
}
|
package/bin/maria.d.ts
ADDED