@zalify/cli 0.1.0 → 0.1.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/README.md +30 -0
- package/dist/cli.js +11300 -0
- package/package.json +22 -6
- package/bin/cli.js +0 -36
package/package.json
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zalify/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Zalify CLI - command-line interface for Zalify",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "
|
|
6
|
+
"main": "dist/cli.js",
|
|
7
7
|
"bin": {
|
|
8
|
-
"zalify": "./
|
|
8
|
+
"zalify": "./dist/cli.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "bun build ./src/cli.ts --outdir=dist --target=node",
|
|
12
|
+
"dev": "bun run src/cli.ts",
|
|
13
|
+
"typecheck": "tsc --noEmit",
|
|
14
|
+
"prepublishOnly": "bun run build",
|
|
15
|
+
"release": "bun run src/release.ts"
|
|
9
16
|
},
|
|
10
17
|
"engines": {
|
|
11
|
-
"node": ">=
|
|
18
|
+
"node": ">=20",
|
|
19
|
+
"bun": ">=1.0"
|
|
12
20
|
},
|
|
13
21
|
"keywords": [
|
|
14
22
|
"zalify",
|
|
@@ -16,8 +24,16 @@
|
|
|
16
24
|
],
|
|
17
25
|
"author": "",
|
|
18
26
|
"license": "ISC",
|
|
27
|
+
"files": [
|
|
28
|
+
"dist"
|
|
29
|
+
],
|
|
19
30
|
"dependencies": {
|
|
20
|
-
"commander": "^
|
|
21
|
-
"update-notifier": "^7.
|
|
31
|
+
"commander": "^14.0.3",
|
|
32
|
+
"update-notifier": "^7.3.1"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/update-notifier": "^6.0.8",
|
|
36
|
+
"bun-types": "latest",
|
|
37
|
+
"typescript": "^5.9.3"
|
|
22
38
|
}
|
|
23
39
|
}
|
package/bin/cli.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { Command } from 'commander';
|
|
4
|
-
import updateNotifier from 'update-notifier';
|
|
5
|
-
import { createRequire } from 'node:module';
|
|
6
|
-
|
|
7
|
-
const require = createRequire(import.meta.url);
|
|
8
|
-
const pkg = require('../package.json');
|
|
9
|
-
|
|
10
|
-
const program = new Command();
|
|
11
|
-
|
|
12
|
-
program
|
|
13
|
-
.name('zalify')
|
|
14
|
-
.description('Zalify CLI - command-line interface for Zalify')
|
|
15
|
-
.version(pkg.version, '-v, --version', 'output the current version');
|
|
16
|
-
|
|
17
|
-
program
|
|
18
|
-
.command('version')
|
|
19
|
-
.description('Print Zalify CLI version and check for updates')
|
|
20
|
-
.action(async () => {
|
|
21
|
-
console.log(`Zalify CLI version: ${pkg.version}`);
|
|
22
|
-
|
|
23
|
-
try {
|
|
24
|
-
const notifier = updateNotifier({ pkg });
|
|
25
|
-
const update = await notifier.fetchInfo();
|
|
26
|
-
if (update && update.type !== 'latest' && update.latest !== update.current) {
|
|
27
|
-
console.log(
|
|
28
|
-
`\nA new version (${update.latest}) is available. Run "npm i -g @zalify/cli@latest" to update.`
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
} catch {
|
|
32
|
-
// Package not published yet or registry unreachable – ignore
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
program.parse();
|