faces-cli 1.6.11 → 1.6.13
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/commands/catalog/backup.js +1 -1
- package/dist/commands/catalog/doctor.js +2 -2
- package/dist/commands/face/{update.d.ts → edit.d.ts} +1 -1
- package/dist/commands/face/{update.js → edit.js} +4 -4
- package/dist/commands/face/get.js +6 -3
- package/dist/commands/team/{update.d.ts → edit.d.ts} +1 -1
- package/dist/commands/team/{update.js → edit.js} +3 -3
- package/oclif.manifest.json +376 -376
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ export default class CatalogBackup extends BaseCommand {
|
|
|
16
16
|
// Fetch all faces with tags included
|
|
17
17
|
let faces;
|
|
18
18
|
try {
|
|
19
|
-
const resp = await client.get('/v1/faces?include=tags');
|
|
19
|
+
const resp = await client.get('/v1/faces?include=tags,profile');
|
|
20
20
|
faces = (resp.data ?? resp);
|
|
21
21
|
}
|
|
22
22
|
catch (err) {
|
|
@@ -21,12 +21,12 @@ export default class CatalogDoctor extends BaseCommand {
|
|
|
21
21
|
// Fetch all faces from API (with tags)
|
|
22
22
|
let remoteFaces;
|
|
23
23
|
try {
|
|
24
|
-
const resp = await client.get('/v1/faces?include=tags');
|
|
24
|
+
const resp = await client.get('/v1/faces?include=tags,profile');
|
|
25
25
|
const arr = resp.data ?? resp;
|
|
26
26
|
// Fetch full details for each face (tags come from list, but need description etc.)
|
|
27
27
|
remoteFaces = await Promise.all(arr.map(async (f) => {
|
|
28
28
|
try {
|
|
29
|
-
const full = await client.get(`/v1/faces/${f.alias}?include=tags`);
|
|
29
|
+
const full = await client.get(`/v1/faces/${f.alias}?include=tags,profile`);
|
|
30
30
|
return full;
|
|
31
31
|
}
|
|
32
32
|
catch {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseCommand } from '../../base.js';
|
|
2
|
-
export default class
|
|
2
|
+
export default class FaceEdit extends BaseCommand {
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
5
|
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -3,8 +3,8 @@ import { BaseCommand } from '../../base.js';
|
|
|
3
3
|
import { FacesAPIError } from '../../client.js';
|
|
4
4
|
import { CatalogService } from '../../catalog.js';
|
|
5
5
|
import { renameFaceFields } from '../../utils.js';
|
|
6
|
-
export default class
|
|
7
|
-
static description = "
|
|
6
|
+
export default class FaceEdit extends BaseCommand {
|
|
7
|
+
static description = "Edit a face's metadata";
|
|
8
8
|
static flags = {
|
|
9
9
|
...BaseCommand.baseFlags,
|
|
10
10
|
name: Flags.string({ description: 'New display name' }),
|
|
@@ -19,7 +19,7 @@ export default class FaceUpdate extends BaseCommand {
|
|
|
19
19
|
face_id: Args.string({ description: 'Face alias', required: true }),
|
|
20
20
|
};
|
|
21
21
|
async run() {
|
|
22
|
-
const { args, flags } = await this.parse(
|
|
22
|
+
const { args, flags } = await this.parse(FaceEdit);
|
|
23
23
|
const client = this.makeClient(flags);
|
|
24
24
|
const payload = {};
|
|
25
25
|
if (flags.name)
|
|
@@ -58,7 +58,7 @@ export default class FaceUpdate extends BaseCommand {
|
|
|
58
58
|
}
|
|
59
59
|
else {
|
|
60
60
|
try {
|
|
61
|
-
data = await client.get(`/v1/faces/${args.face_id}`);
|
|
61
|
+
data = await client.get(`/v1/faces/${args.face_id}?include=profile`);
|
|
62
62
|
}
|
|
63
63
|
catch (err) {
|
|
64
64
|
if (err instanceof FacesAPIError)
|
|
@@ -14,9 +14,12 @@ export default class FaceGet extends BaseCommand {
|
|
|
14
14
|
async run() {
|
|
15
15
|
const { args, flags } = await this.parse(FaceGet);
|
|
16
16
|
const client = this.makeClient(flags);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
// Always include profile; merge with user's --include
|
|
18
|
+
const includes = new Set(['profile']);
|
|
19
|
+
if (flags.include)
|
|
20
|
+
for (const v of flags.include.split(','))
|
|
21
|
+
includes.add(v.trim());
|
|
22
|
+
const path = `/v1/faces/${args.face_id}?include=${[...includes].join(',')}`;
|
|
20
23
|
let data;
|
|
21
24
|
try {
|
|
22
25
|
data = await client.get(path);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseCommand } from '../../base.js';
|
|
2
|
-
export default class
|
|
2
|
+
export default class TeamEdit extends BaseCommand {
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
5
|
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -3,8 +3,8 @@ import fs from 'node:fs';
|
|
|
3
3
|
import { BaseCommand } from '../../base.js';
|
|
4
4
|
import { FacesAPIError } from '../../client.js';
|
|
5
5
|
import { TeamCatalogService } from '../../team-catalog.js';
|
|
6
|
-
export default class
|
|
7
|
-
static description = '
|
|
6
|
+
export default class TeamEdit extends BaseCommand {
|
|
7
|
+
static description = 'Edit a team';
|
|
8
8
|
static flags = {
|
|
9
9
|
...BaseCommand.baseFlags,
|
|
10
10
|
name: Flags.string({ description: 'New team name' }),
|
|
@@ -16,7 +16,7 @@ export default class TeamUpdate extends BaseCommand {
|
|
|
16
16
|
team_id: Args.string({ description: 'Team ID', required: true }),
|
|
17
17
|
};
|
|
18
18
|
async run() {
|
|
19
|
-
const { args, flags } = await this.parse(
|
|
19
|
+
const { args, flags } = await this.parse(TeamEdit);
|
|
20
20
|
const client = this.makeClient(flags);
|
|
21
21
|
let protocol = flags.protocol;
|
|
22
22
|
if (flags['protocol-file']) {
|