@immich/cli 2.2.78 → 2.2.97
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/.nvmrc +1 -1
- package/README.md +19 -11
- package/dist/index.js +36 -4
- package/package.json +15 -16
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
22.
|
|
1
|
+
22.20.0
|
package/README.md
CHANGED
|
@@ -1,30 +1,38 @@
|
|
|
1
1
|
A command-line interface for interfacing with the self-hosted photo manager [Immich](https://immich.app/).
|
|
2
2
|
|
|
3
|
-
Please see the [Immich CLI documentation](https://immich.app/
|
|
3
|
+
Please see the [Immich CLI documentation](https://docs.immich.app/features/command-line-interface).
|
|
4
4
|
|
|
5
5
|
# For developers
|
|
6
6
|
|
|
7
7
|
Before building the CLI, you must build the immich server and the open-api client. To build the server run the following in the server folder:
|
|
8
8
|
|
|
9
|
-
$
|
|
10
|
-
$
|
|
9
|
+
$ pnpm install
|
|
10
|
+
$ pnpm run build
|
|
11
11
|
|
|
12
12
|
Then, to build the open-api client run the following in the open-api folder:
|
|
13
13
|
|
|
14
14
|
$ ./bin/generate-open-api.sh
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
## Run from build
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
$ npm run build
|
|
20
|
-
$ ts-node .
|
|
18
|
+
Go to the cli folder and build it:
|
|
21
19
|
|
|
22
|
-
|
|
20
|
+
$ pnpm install
|
|
21
|
+
$ pnpm run build
|
|
22
|
+
$ node dist/index.js
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
## Run and Debug from source (VSCode)
|
|
25
|
+
|
|
26
|
+
With VScode you can run and debug the Immich CLI. Go to the launch.json file, find the Immich CLI config and change this with the command you need to debug
|
|
27
|
+
|
|
28
|
+
`"args": ["upload", "--help"],`
|
|
29
|
+
|
|
30
|
+
replace that for the command of your choice.
|
|
31
|
+
|
|
32
|
+
## Install from build
|
|
25
33
|
|
|
26
34
|
You can also build and install the CLI using
|
|
27
35
|
|
|
28
|
-
$
|
|
29
|
-
$
|
|
36
|
+
$ pnpm run build
|
|
37
|
+
$ pnpm install -g .
|
|
30
38
|
****
|
package/dist/index.js
CHANGED
|
@@ -3289,6 +3289,8 @@ var NotificationType;
|
|
|
3289
3289
|
NotificationType2["JobFailed"] = "JobFailed";
|
|
3290
3290
|
NotificationType2["BackupFailed"] = "BackupFailed";
|
|
3291
3291
|
NotificationType2["SystemMessage"] = "SystemMessage";
|
|
3292
|
+
NotificationType2["AlbumInvite"] = "AlbumInvite";
|
|
3293
|
+
NotificationType2["AlbumUpdate"] = "AlbumUpdate";
|
|
3292
3294
|
NotificationType2["Custom"] = "Custom";
|
|
3293
3295
|
})(NotificationType || (NotificationType = {}));
|
|
3294
3296
|
var UserStatus;
|
|
@@ -3327,6 +3329,13 @@ var AssetTypeEnum;
|
|
|
3327
3329
|
AssetTypeEnum2["Audio"] = "AUDIO";
|
|
3328
3330
|
AssetTypeEnum2["Other"] = "OTHER";
|
|
3329
3331
|
})(AssetTypeEnum || (AssetTypeEnum = {}));
|
|
3332
|
+
var BulkIdErrorReason;
|
|
3333
|
+
(function(BulkIdErrorReason2) {
|
|
3334
|
+
BulkIdErrorReason2["Duplicate"] = "duplicate";
|
|
3335
|
+
BulkIdErrorReason2["NoPermission"] = "no_permission";
|
|
3336
|
+
BulkIdErrorReason2["NotFound"] = "not_found";
|
|
3337
|
+
BulkIdErrorReason2["Unknown"] = "unknown";
|
|
3338
|
+
})(BulkIdErrorReason || (BulkIdErrorReason = {}));
|
|
3330
3339
|
var Error$1;
|
|
3331
3340
|
(function(Error3) {
|
|
3332
3341
|
Error3["Duplicate"] = "duplicate";
|
|
@@ -3465,6 +3474,10 @@ var Permission;
|
|
|
3465
3474
|
Permission2["AdminUserDelete"] = "adminUser.delete";
|
|
3466
3475
|
Permission2["AdminAuthUnlinkAll"] = "adminAuth.unlinkAll";
|
|
3467
3476
|
})(Permission || (Permission = {}));
|
|
3477
|
+
var AssetMetadataKey;
|
|
3478
|
+
(function(AssetMetadataKey2) {
|
|
3479
|
+
AssetMetadataKey2["MobileApp"] = "mobile-app";
|
|
3480
|
+
})(AssetMetadataKey || (AssetMetadataKey = {}));
|
|
3468
3481
|
var AssetMediaStatus;
|
|
3469
3482
|
(function(AssetMediaStatus2) {
|
|
3470
3483
|
AssetMediaStatus2["Created"] = "created";
|
|
@@ -3565,6 +3578,8 @@ var SyncEntityType;
|
|
|
3565
3578
|
SyncEntityType2["AssetV1"] = "AssetV1";
|
|
3566
3579
|
SyncEntityType2["AssetDeleteV1"] = "AssetDeleteV1";
|
|
3567
3580
|
SyncEntityType2["AssetExifV1"] = "AssetExifV1";
|
|
3581
|
+
SyncEntityType2["AssetMetadataV1"] = "AssetMetadataV1";
|
|
3582
|
+
SyncEntityType2["AssetMetadataDeleteV1"] = "AssetMetadataDeleteV1";
|
|
3568
3583
|
SyncEntityType2["PartnerV1"] = "PartnerV1";
|
|
3569
3584
|
SyncEntityType2["PartnerDeleteV1"] = "PartnerDeleteV1";
|
|
3570
3585
|
SyncEntityType2["PartnerAssetV1"] = "PartnerAssetV1";
|
|
@@ -3603,6 +3618,7 @@ var SyncEntityType;
|
|
|
3603
3618
|
SyncEntityType2["UserMetadataDeleteV1"] = "UserMetadataDeleteV1";
|
|
3604
3619
|
SyncEntityType2["SyncAckV1"] = "SyncAckV1";
|
|
3605
3620
|
SyncEntityType2["SyncResetV1"] = "SyncResetV1";
|
|
3621
|
+
SyncEntityType2["SyncCompleteV1"] = "SyncCompleteV1";
|
|
3606
3622
|
})(SyncEntityType || (SyncEntityType = {}));
|
|
3607
3623
|
var SyncRequestType;
|
|
3608
3624
|
(function(SyncRequestType2) {
|
|
@@ -3613,6 +3629,7 @@ var SyncRequestType;
|
|
|
3613
3629
|
SyncRequestType2["AlbumAssetExifsV1"] = "AlbumAssetExifsV1";
|
|
3614
3630
|
SyncRequestType2["AssetsV1"] = "AssetsV1";
|
|
3615
3631
|
SyncRequestType2["AssetExifsV1"] = "AssetExifsV1";
|
|
3632
|
+
SyncRequestType2["AssetMetadataV1"] = "AssetMetadataV1";
|
|
3616
3633
|
SyncRequestType2["AuthUsersV1"] = "AuthUsersV1";
|
|
3617
3634
|
SyncRequestType2["MemoriesV1"] = "MemoriesV1";
|
|
3618
3635
|
SyncRequestType2["MemoryToAssetsV1"] = "MemoryToAssetsV1";
|
|
@@ -3703,9 +3720,12 @@ var OAuthTokenEndpointAuthMethod;
|
|
|
3703
3720
|
function isHttpError(error2) {
|
|
3704
3721
|
return error2 instanceof l;
|
|
3705
3722
|
}
|
|
3706
|
-
const init = ({ baseUrl, apiKey }) => {
|
|
3723
|
+
const init = ({ baseUrl, apiKey, headers }) => {
|
|
3707
3724
|
setBaseUrl(baseUrl);
|
|
3708
3725
|
setApiKey(apiKey);
|
|
3726
|
+
if (headers) {
|
|
3727
|
+
setHeaders(headers);
|
|
3728
|
+
}
|
|
3709
3729
|
};
|
|
3710
3730
|
const setBaseUrl = (baseUrl) => {
|
|
3711
3731
|
defaults.baseUrl = baseUrl;
|
|
@@ -3714,6 +3734,18 @@ const setApiKey = (apiKey) => {
|
|
|
3714
3734
|
defaults.headers = defaults.headers || {};
|
|
3715
3735
|
defaults.headers["x-api-key"] = apiKey;
|
|
3716
3736
|
};
|
|
3737
|
+
const setHeaders = (headers) => {
|
|
3738
|
+
defaults.headers = defaults.headers || {};
|
|
3739
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
3740
|
+
assertNoApiKey(key);
|
|
3741
|
+
defaults.headers[key] = value;
|
|
3742
|
+
}
|
|
3743
|
+
};
|
|
3744
|
+
const assertNoApiKey = (headerKey) => {
|
|
3745
|
+
if (headerKey.toLowerCase() === "x-api-key") {
|
|
3746
|
+
throw new Error("The API key header can only be set using setApiKey().");
|
|
3747
|
+
}
|
|
3748
|
+
};
|
|
3717
3749
|
let defaultOptions$1 = {};
|
|
3718
3750
|
const _options = /* @__PURE__ */ new WeakMap();
|
|
3719
3751
|
const referenceTables = {
|
|
@@ -6450,7 +6482,7 @@ function toFinite(value) {
|
|
|
6450
6482
|
return value === 0 ? value : 0;
|
|
6451
6483
|
}
|
|
6452
6484
|
value = toNumber(value);
|
|
6453
|
-
if (value === INFINITY || value === -
|
|
6485
|
+
if (value === INFINITY || value === -INFINITY) {
|
|
6454
6486
|
var sign = value < 0 ? -1 : 1;
|
|
6455
6487
|
return sign * MAX_INTEGER;
|
|
6456
6488
|
}
|
|
@@ -13374,7 +13406,7 @@ ${indent}`) + "'";
|
|
|
13374
13406
|
}
|
|
13375
13407
|
function blockString({ comment, type: type2, value }, ctx, onComment, onChompKeep) {
|
|
13376
13408
|
const { blockQuote, commentString, lineWidth } = ctx.options;
|
|
13377
|
-
if (!blockQuote || /\n[\t ]+$/.test(value)
|
|
13409
|
+
if (!blockQuote || /\n[\t ]+$/.test(value)) {
|
|
13378
13410
|
return quotedString(value, ctx);
|
|
13379
13411
|
}
|
|
13380
13412
|
const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? " " : "");
|
|
@@ -20015,7 +20047,7 @@ const serverInfo = async (options2) => {
|
|
|
20015
20047
|
console.log(` Videos: ${stats.videos}`);
|
|
20016
20048
|
console.log(` Total: ${stats.total}`);
|
|
20017
20049
|
};
|
|
20018
|
-
const version = "2.2.
|
|
20050
|
+
const version = "2.2.97";
|
|
20019
20051
|
const defaultConfigDirectory = path$1.join(os.homedir(), ".config/immich/");
|
|
20020
20052
|
const program = new Command().name("immich").version(version).description("Command line interface for Immich").addOption(
|
|
20021
20053
|
new Option("-d, --config-directory <directory>", "Configuration directory where auth.yml will be stored").env("IMMICH_CONFIG_DIR").default(defaultConfigDirectory)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@immich/cli",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.97",
|
|
4
4
|
"description": "Command Line Interface (CLI) for Immich",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./dist/index.js",
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
"cli"
|
|
14
14
|
],
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@eslint/eslintrc": "^3.1.0",
|
|
17
16
|
"@eslint/js": "^9.8.0",
|
|
18
17
|
"@immich/sdk": "file:../open-api/typescript-sdk",
|
|
19
18
|
"@types/byte-size": "^8.1.0",
|
|
@@ -21,7 +20,7 @@
|
|
|
21
20
|
"@types/lodash-es": "^4.17.12",
|
|
22
21
|
"@types/micromatch": "^4.0.9",
|
|
23
22
|
"@types/mock-fs": "^4.13.1",
|
|
24
|
-
"@types/node": "^22.
|
|
23
|
+
"@types/node": "^22.18.8",
|
|
25
24
|
"@vitest/coverage-v8": "^3.0.0",
|
|
26
25
|
"byte-size": "^9.0.0",
|
|
27
26
|
"cli-progress": "^3.12.0",
|
|
@@ -42,17 +41,6 @@
|
|
|
42
41
|
"vitest-fetch-mock": "^0.4.0",
|
|
43
42
|
"yaml": "^2.3.1"
|
|
44
43
|
},
|
|
45
|
-
"scripts": {
|
|
46
|
-
"build": "vite build",
|
|
47
|
-
"lint": "eslint \"src/**/*.ts\" --max-warnings 0",
|
|
48
|
-
"lint:fix": "npm run lint -- --fix",
|
|
49
|
-
"prepack": "npm run build",
|
|
50
|
-
"test": "vitest",
|
|
51
|
-
"test:cov": "vitest --coverage",
|
|
52
|
-
"format": "prettier --check .",
|
|
53
|
-
"format:fix": "prettier --write .",
|
|
54
|
-
"check": "tsc --noEmit"
|
|
55
|
-
},
|
|
56
44
|
"repository": {
|
|
57
45
|
"type": "git",
|
|
58
46
|
"url": "git+https://github.com/immich-app/immich.git",
|
|
@@ -69,6 +57,17 @@
|
|
|
69
57
|
"micromatch": "^4.0.8"
|
|
70
58
|
},
|
|
71
59
|
"volta": {
|
|
72
|
-
"node": "22.
|
|
60
|
+
"node": "22.20.0"
|
|
61
|
+
},
|
|
62
|
+
"scripts": {
|
|
63
|
+
"build": "vite build",
|
|
64
|
+
"build:dev": "vite build --sourcemap true",
|
|
65
|
+
"lint": "eslint \"src/**/*.ts\" --max-warnings 0",
|
|
66
|
+
"lint:fix": "npm run lint -- --fix",
|
|
67
|
+
"test": "vitest",
|
|
68
|
+
"test:cov": "vitest --coverage",
|
|
69
|
+
"format": "prettier --check .",
|
|
70
|
+
"format:fix": "prettier --write .",
|
|
71
|
+
"check": "tsc --noEmit"
|
|
73
72
|
}
|
|
74
|
-
}
|
|
73
|
+
}
|