0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-02-11 01:18:24 -05:00

chore(cli): add version option (#5237)

* chore(cli): add version option

* chore: update build path

* fix: defer to package details for path to entrypoint

---------

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
Alex 2023-11-21 13:12:40 -06:00 committed by GitHub
parent 55f7cf3ca9
commit af1113bf9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 4 deletions

2
cli/package-lock.json generated
View file

@ -18,7 +18,7 @@
"yaml": "^2.3.1" "yaml": "^2.3.1"
}, },
"bin": { "bin": {
"immich": "dist/index.js" "immich": "dist/src/index.js"
}, },
"devDependencies": { "devDependencies": {
"@types/byte-size": "^8.1.0", "@types/byte-size": "^8.1.0",

View file

@ -4,7 +4,7 @@
"description": "Command Line Interface (CLI) for Immich", "description": "Command Line Interface (CLI) for Immich",
"main": "dist/index.js", "main": "dist/index.js",
"bin": { "bin": {
"immich": "./dist/index.js" "immich": "./dist/src/index.js"
}, },
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {

View file

@ -5,8 +5,9 @@ import Upload from './commands/upload';
import ServerInfo from './commands/server-info'; import ServerInfo from './commands/server-info';
import LoginKey from './commands/login/key'; import LoginKey from './commands/login/key';
import Logout from './commands/logout'; import Logout from './commands/logout';
import { version } from '../package.json';
program.name('immich').description('Immich command line interface'); program.name('immich').description('Immich command line interface').version(version);
program program
.command('upload') .command('upload')

View file

@ -1,2 +1,2 @@
#!/usr/bin/env bash #!/usr/bin/env bash
node ./node_modules/@immich/cli/dist/index "$@" npx immich "$@"