@buenojs/bueno 0.8.2 → 0.8.3
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/dist/cli/index.js +6 -26
- package/package.json +1 -1
- package/src/cli/index.ts +7 -2
package/dist/cli/index.js
CHANGED
|
@@ -1,32 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __export = (target, all) => {
|
|
5
|
-
for (var name in all)
|
|
6
|
-
__defProp(target, name, {
|
|
7
|
-
get: all[name],
|
|
8
|
-
enumerable: true,
|
|
9
|
-
configurable: true,
|
|
10
|
-
set: (newValue) => all[name] = () => newValue
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var __legacyDecorateClassTS = function(decorators, target, key, desc) {
|
|
14
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
16
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
-
else
|
|
18
|
-
for (var i = decorators.length - 1;i >= 0; i--)
|
|
19
|
-
if (d = decorators[i])
|
|
20
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __legacyMetadataTS = (k, v) => {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
25
|
-
return Reflect.metadata(k, v);
|
|
26
|
-
};
|
|
27
|
-
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
28
3
|
var __require = import.meta.require;
|
|
29
4
|
|
|
5
|
+
// src/cli/index.ts
|
|
6
|
+
import { readFileSync as readFileSync2 } from "fs";
|
|
7
|
+
import { join as join2 } from "path";
|
|
8
|
+
|
|
30
9
|
// src/cli/core/args.ts
|
|
31
10
|
function parseArgs(argv = process.argv.slice(2)) {
|
|
32
11
|
const result = {
|
|
@@ -3233,7 +3212,8 @@ Bueno CLI - Available Commands
|
|
|
3233
3212
|
}
|
|
3234
3213
|
});
|
|
3235
3214
|
// src/cli/index.ts
|
|
3236
|
-
var
|
|
3215
|
+
var packageJson = JSON.parse(readFileSync2(join2(import.meta.dir, "../../package.json"), "utf-8"));
|
|
3216
|
+
var VERSION = packageJson.version;
|
|
3237
3217
|
class CLIError extends Error {
|
|
3238
3218
|
type;
|
|
3239
3219
|
exitCode;
|
package/package.json
CHANGED
package/src/cli/index.ts
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* Main entry point for the Bueno CLI
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import { readFileSync } from 'fs';
|
|
8
|
+
import { join } from 'path';
|
|
7
9
|
import { parseArgs, hasFlag, generateGlobalHelpText, generateHelpText, type ParsedArgs } from './core/args';
|
|
8
10
|
import { cliConsole, colors, setColorEnabled } from './core/console';
|
|
9
11
|
import { registry } from './commands';
|
|
@@ -17,8 +19,11 @@ import './commands/build';
|
|
|
17
19
|
import './commands/start';
|
|
18
20
|
import './commands/help';
|
|
19
21
|
|
|
20
|
-
//
|
|
21
|
-
const
|
|
22
|
+
// Read version from package.json dynamically
|
|
23
|
+
const packageJson = JSON.parse(
|
|
24
|
+
readFileSync(join(import.meta.dir, '../../package.json'), 'utf-8')
|
|
25
|
+
);
|
|
26
|
+
const VERSION = packageJson.version;
|
|
22
27
|
|
|
23
28
|
/**
|
|
24
29
|
* CLI error types
|