@codejeet/oadm 0.0.5 → 0.0.6
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.js +7 -1
- package/package.json +2 -1
package/dist/cli.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from 'commander';
|
|
3
|
+
import { createRequire } from 'node:module';
|
|
3
4
|
import chalk from 'chalk';
|
|
4
5
|
import { readConfig, writeConfig } from './config.js';
|
|
5
6
|
import { getJson, postJson } from './http.js';
|
|
7
|
+
const require = createRequire(import.meta.url);
|
|
8
|
+
const pkg = require('../package.json');
|
|
6
9
|
const program = new Command();
|
|
7
|
-
program
|
|
10
|
+
program
|
|
11
|
+
.name('oadm')
|
|
12
|
+
.description('OADM Inbox CLI')
|
|
13
|
+
.version(pkg.version ?? '0.0.0');
|
|
8
14
|
program
|
|
9
15
|
.option('--api <url>', 'API base URL (or set OADM_API_URL)', '')
|
|
10
16
|
.hook('preAction', (thisCommand) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codejeet/oadm",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"oadm": "dist/cli.js"
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"dev": "tsx src/cli.ts",
|
|
13
13
|
"build": "tsc -p tsconfig.json",
|
|
14
14
|
"prepack": "tsc -p tsconfig.json",
|
|
15
|
+
"smoke:version": "pnpm build && node ./scripts/smoke-version.mjs",
|
|
15
16
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
16
17
|
},
|
|
17
18
|
"dependencies": {
|