Skip to content

Commit 39201f0

Browse files
authored
fix: use static consistent cli name (#33)
1 parent 8229039 commit 39201f0

File tree

7 files changed

+14
-8
lines changed

7 files changed

+14
-8
lines changed

.changeset/swift-bulldogs-admire.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@deeplx/cli": patch
3+
---
4+
5+
fix: use static consistent cli name

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ deeplx -h
8282
```console
8383
Usage: deeplx [options]
8484

85-
An unofficial Node package to translate text using [DeepL](https://www.deepl.com) by porting [OwO-Network/DeepLX](https://github.com/OwO-Network/DeepLX).
85+
The cli for [`@deeplx/core`](https://github.com/un-ts/deeplx/blob/master/packages/@deeplx/core).
8686

8787
Options:
8888
-V, --version output the version number

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"build:r": "r -f cjs",
1818
"build:tsc": "tsc -b tsconfig.lib.json",
1919
"clean": "rimraf --glob .type-coverage coverage '.*cache' 'packages/**/{lib,*.tsbuildinfo}'",
20-
"deeplx": "tsx packages/deeplx/src/cli.ts",
20+
"deeplx": "tsx packages/@deeplx/cli/src/cli.ts",
2121
"format": "prettier --write .",
2222
"lint": "run-p 'lint:*'",
2323
"lint:es": "eslint . --cache --max-warnings 10",

packages/@deeplx/cli/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ deeplx -h
7878
```console
7979
Usage: deeplx [options]
8080

81-
An unofficial Node package to translate text using [DeepL](https://www.deepl.com) by porting [OwO-Network/DeepLX](https://github.com/OwO-Network/DeepLX).
81+
The cli for [`@deeplx/core`](https://github.com/un-ts/deeplx/blob/master/packages/@deeplx/core).
8282

8383
Options:
8484
-V, --version output the version number

packages/@deeplx/cli/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
"engines": {
1212
"node": "^12.20 || ^14.18.0 || >=16.0.0"
1313
},
14-
"bin": "./lib/cli.js",
14+
"bin": {
15+
"deeplx": "./lib/cli.js"
16+
},
1517
"exports": {
1618
".": {
1719
"types": "./lib/cli.d.ts",

packages/@deeplx/cli/src/cli.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,15 @@ export interface DeepLXCliOptions {
2121
formal?: boolean
2222
}
2323

24-
const { name, version, description } = cjsRequire<{
25-
name: string
24+
const { version, description } = cjsRequire<{
2625
version: string
2726
description: string
2827
}>(fileURLToPath(new URL('../package.json', import.meta.url)))
2928

3029
const FALSY_VALUES = new Set(['0', 'false', 'n', 'no', 'off'])
3130

3231
program
33-
.name(name)
32+
.name('deeplx')
3433
.version(version)
3534
.description(description)
3635
.option('-s, --source <text>', 'Source language of your text')

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2338,7 +2338,7 @@ __metadata:
23382338
commander: "npm:^13.1.0"
23392339
node-fetch: "npm:^3.3.2"
23402340
bin:
2341-
cli: ./lib/cli.js
2341+
deeplx: ./lib/cli.js
23422342
languageName: unknown
23432343
linkType: soft
23442344

0 commit comments

Comments
 (0)