@wirecat/zoom-cli 0.40.0 → 0.42.0
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 +3 -3
- package/dist/agent-skill.d.ts.map +1 -1
- package/dist/agent-skill.js +3 -1
- package/dist/agent-skill.js.map +1 -1
- package/dist/answer-entities.d.ts +736 -0
- package/dist/answer-entities.d.ts.map +1 -0
- package/dist/answer-entities.js +201 -0
- package/dist/answer-entities.js.map +1 -0
- package/dist/answer-output.d.ts +0 -1
- package/dist/answer-output.d.ts.map +1 -1
- package/dist/answer-output.js +2 -2
- package/dist/answer-output.js.map +1 -1
- package/dist/answer-policy.d.ts +0 -4
- package/dist/answer-policy.d.ts.map +1 -1
- package/dist/answer-policy.js +0 -16
- package/dist/answer-policy.js.map +1 -1
- package/dist/archive-commands.d.ts.map +1 -1
- package/dist/archive-commands.js +72 -52
- package/dist/archive-commands.js.map +1 -1
- package/dist/commands.d.ts +0 -2
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +6 -52
- package/dist/commands.js.map +1 -1
- package/dist/execution.d.ts +5 -10
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +11 -27
- package/dist/execution.js.map +1 -1
- package/dist/first-screen.d.ts +8 -0
- package/dist/first-screen.d.ts.map +1 -1
- package/dist/first-screen.js +18 -18
- package/dist/first-screen.js.map +1 -1
- package/dist/json-fields.d.ts +1 -6
- package/dist/json-fields.d.ts.map +1 -1
- package/dist/json-fields.js +2 -22
- package/dist/json-fields.js.map +1 -1
- package/dist/local-transcription-commands.d.ts.map +1 -1
- package/dist/local-transcription-commands.js +1 -1
- package/dist/local-transcription-commands.js.map +1 -1
- package/dist/mcp-command.d.ts +2 -1
- package/dist/mcp-command.d.ts.map +1 -1
- package/dist/mcp-command.js +12 -2
- package/dist/mcp-command.js.map +1 -1
- package/dist/mcp.d.ts +4 -2
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +20 -13
- package/dist/mcp.js.map +1 -1
- package/dist/models-commands.d.ts.map +1 -1
- package/dist/models-commands.js +7 -36
- package/dist/models-commands.js.map +1 -1
- package/dist/permissions.d.ts +6 -0
- package/dist/permissions.d.ts.map +1 -1
- package/dist/permissions.js +34 -11
- package/dist/permissions.js.map +1 -1
- package/dist/profile-word.d.ts +0 -15
- package/dist/profile-word.d.ts.map +1 -1
- package/dist/profile-word.js +0 -48
- package/dist/profile-word.js.map +1 -1
- package/dist/program-bindings.d.ts +5 -0
- package/dist/program-bindings.d.ts.map +1 -0
- package/dist/program-bindings.js +424 -0
- package/dist/program-bindings.js.map +1 -0
- package/dist/program.d.ts +8 -5
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +17 -417
- package/dist/program.js.map +1 -1
- package/dist/progress-commands.d.ts +9 -0
- package/dist/progress-commands.d.ts.map +1 -0
- package/dist/progress-commands.js +49 -0
- package/dist/progress-commands.js.map +1 -0
- package/dist/read-only.d.ts.map +1 -1
- package/dist/read-only.js +6 -17
- package/dist/read-only.js.map +1 -1
- package/dist/recording-schedule-commands.d.ts.map +1 -1
- package/dist/recording-schedule-commands.js +8 -8
- package/dist/recording-schedule-commands.js.map +1 -1
- package/dist/recording-sync-store.d.ts +2 -1
- package/dist/recording-sync-store.d.ts.map +1 -1
- package/dist/recording-sync-store.js +10 -0
- package/dist/recording-sync-store.js.map +1 -1
- package/dist/run.d.ts +8 -0
- package/dist/run.d.ts.map +1 -0
- package/dist/run.js +50 -0
- package/dist/run.js.map +1 -0
- package/dist/setup-commands.d.ts +0 -3
- package/dist/setup-commands.d.ts.map +1 -1
- package/dist/setup-commands.js +5 -11
- package/dist/setup-commands.js.map +1 -1
- package/dist/sync-progress.d.ts +11 -0
- package/dist/sync-progress.d.ts.map +1 -0
- package/dist/sync-progress.js +31 -0
- package/dist/sync-progress.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/watch-commands.d.ts.map +1 -1
- package/dist/watch-commands.js +1 -1
- package/dist/watch-commands.js.map +1 -1
- package/package.json +2 -2
- package/skills/zoom-cli/SKILL.md +5 -5
package/dist/models-commands.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { createHash } from "node:crypto";
|
|
2
|
-
import { createReadStream, existsSync } from "node:fs";
|
|
3
|
-
import { rm } from "node:fs/promises";
|
|
4
1
|
import { join } from "node:path";
|
|
5
2
|
import { annotate } from "@wirecat/cli-base/commands";
|
|
6
3
|
import { defineQuery } from "@wirecat/cli-base/query";
|
|
7
4
|
import { FETCH, itemOf, LOCAL_READ, listOf, NO_EFFECTS, queryTerms, termField, typedQuery, withQuery, } from "@wirecat/cli-core/cli";
|
|
8
|
-
import { install, installedBytes, isInstalled, MODELS,
|
|
5
|
+
import { install, installedBytes, isInstalled, MODELS, modelsDirectory, speechModel, } from "@wirecat/cli-core/speech";
|
|
9
6
|
/** The shared `models list` fields; zm ships speech models only, so `kind:text` lists none. */
|
|
10
7
|
const MODELS_QUERY = defineQuery({
|
|
11
8
|
entity: "model",
|
|
@@ -27,27 +24,6 @@ const itemOfModel = (model, directory) => ({
|
|
|
27
24
|
default: false,
|
|
28
25
|
path: join(directory, model.id),
|
|
29
26
|
});
|
|
30
|
-
const sha256 = (path) => new Promise((resolve) => {
|
|
31
|
-
const hash = createHash("sha256");
|
|
32
|
-
createReadStream(path)
|
|
33
|
-
.on("data", (chunk) => hash.update(chunk))
|
|
34
|
-
.on("end", () => resolve(hash.digest("hex")))
|
|
35
|
-
.on("error", () => resolve(null));
|
|
36
|
-
});
|
|
37
|
-
/** A file of the right size can still be another version or broken, so its hash decides; a wrong one goes. */
|
|
38
|
-
const removeMismatched = async (model, directory) => {
|
|
39
|
-
const path = modelPath(directory, model);
|
|
40
|
-
const files = [...model.files.map((file) => [file.sha256, path(file.name)]), [VAD.sha256, vadPath(directory)]];
|
|
41
|
-
const removed = [];
|
|
42
|
-
for (const [expected, file] of files) {
|
|
43
|
-
const actual = await sha256(file);
|
|
44
|
-
if (actual === null || actual === expected)
|
|
45
|
-
continue;
|
|
46
|
-
await rm(file, { force: true });
|
|
47
|
-
removed.push(file);
|
|
48
|
-
}
|
|
49
|
-
return removed;
|
|
50
|
-
};
|
|
51
27
|
/**
|
|
52
28
|
* `models list|download`: the speech models `meetings transcribe` runs, in the folder every WireCat CLI shares,
|
|
53
29
|
* so a model downloaded by tg serves zm too. Downloading is the owner's command; transcription never downloads.
|
|
@@ -72,22 +48,17 @@ export const addModelsCommands = (program, deps) => {
|
|
|
72
48
|
.filter((item) => downloaded === undefined || item.downloaded === (downloaded === "true"));
|
|
73
49
|
deps.output(listOf("models list", { items, limit: Math.max(1, items.length), has_more: false }));
|
|
74
50
|
});
|
|
75
|
-
annotate(models.command("download"), {
|
|
51
|
+
annotate(models.command("download"), {
|
|
52
|
+
effects: FETCH,
|
|
53
|
+
output: { entity: "model" },
|
|
54
|
+
examples: ["zm models download parakeet-v3 --json"],
|
|
55
|
+
})
|
|
76
56
|
.argument("<model>", "a model id from `models list`")
|
|
77
57
|
.description("download a speech model, or repair one, checking every file's sha256")
|
|
78
58
|
.action(async (id) => {
|
|
79
59
|
const model = speechModel(id);
|
|
80
60
|
const directory = modelsDirectory(deps.env());
|
|
81
|
-
|
|
82
|
-
deps.diagnostic(`${file}: not the file this version expects, downloading it again\n`);
|
|
83
|
-
if (!isInstalled(model, directory)) {
|
|
84
|
-
const path = modelPath(directory, model);
|
|
85
|
-
const missing = [...model.files.map((file) => [file.bytes, path(file.name)]), [VAD.bytes, vadPath(directory)]]
|
|
86
|
-
.filter(([, file]) => !existsSync(file))
|
|
87
|
-
.reduce((sum, [bytes]) => sum + bytes, 0);
|
|
88
|
-
deps.diagnostic(`${model.id}: ${megabytes(missing)} to download\n`);
|
|
89
|
-
await install(model, directory, { progress: (line) => deps.diagnostic(`${line}\n`) });
|
|
90
|
-
}
|
|
61
|
+
await install(model, directory, { verifyExisting: true, progress: (line) => deps.diagnostic(`${line}\n`) });
|
|
91
62
|
deps.output(itemOf(itemOfModel(model, directory)));
|
|
92
63
|
});
|
|
93
64
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models-commands.js","sourceRoot":"","sources":["../src/models-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"models-commands.js","sourceRoot":"","sources":["../src/models-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAEL,KAAK,EACL,MAAM,EACN,UAAU,EACV,MAAM,EACN,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,SAAS,GACV,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,OAAO,EACP,cAAc,EACd,WAAW,EACX,MAAM,EACN,eAAe,EAEf,WAAW,GACZ,MAAM,0BAA0B,CAAA;AAGjC,+FAA+F;AAC/F,MAAM,YAAY,GAAG,WAAW,CAAC;IAC/B,MAAM,EAAE,OAAO;IACf,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE;QACN,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;QACtE,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,gBAAgB,CAAC;QACvC,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,iBAAiB,CAAC;KACnD;CACF,CAAC,CAAA;AAEF,MAAM,WAAW,GAAG,CAAC,KAAkB,EAAE,SAAiB,EAAE,EAAE,CAAC,CAAC;IAC9D,EAAE,EAAE,KAAK,CAAC,EAAE;IACZ,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,KAAK,CAAC,KAAK;IAClB,SAAS,EAAE,KAAK,CAAC,SAAS;IAC1B,UAAU,EAAE,cAAc,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CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;IACpD,CAAC,CAAC,CAAA;AACN,CAAC,CAAA"}
|
package/dist/permissions.d.ts
CHANGED
|
@@ -3,8 +3,14 @@ import type { Command } from "commander";
|
|
|
3
3
|
import type { ZoomConfig } from "./config.js";
|
|
4
4
|
/** A change to Zoom asks first. A built-in default only tightens what the owner set (WC-PERM-7). */
|
|
5
5
|
export declare const DEFAULT_PERMISSIONS: Readonly<Record<string, Level>>;
|
|
6
|
+
/** A saved denial must be reviewed when the two recording download paths become one. */
|
|
7
|
+
export declare const recordingPermissions: (levels: Readonly<Record<string, Level>>) => Readonly<Record<string, Level>>;
|
|
8
|
+
export declare const discoveryLevels: (own: Readonly<Record<string, Level>>, env: NodeJS.ProcessEnv) => {
|
|
9
|
+
"*"?: "allow" | "ask" | "deny" | "readonly" | undefined;
|
|
10
|
+
};
|
|
6
11
|
export declare const pathOf: (command: Command) => string[];
|
|
7
12
|
/** The command's path, dotted — `remote-meetings.cancel` — or null for housekeeping. */
|
|
13
|
+
export declare const permissionKeyForPath: (path: readonly string[]) => string | null;
|
|
8
14
|
export declare const permissionKeyOf: (command: Command) => string | null;
|
|
9
15
|
/** Every key a permission may name: each command's path and every group above it. */
|
|
10
16
|
export declare const permissionKeys: (program: Command) => Set<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../src/permissions.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../src/permissions.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,KAAK,EAGX,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAExC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAG7C,oGAAoG;AACpG,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,M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AAY,YACd,OAAO,OACX,MAAM,CAAC,UAAU,WACb,IAAI,CAAC,iBAAiB,EAAE,SAAS,CAAC,YACjC,iBAAiB,CAAC,SAAS,CAAC,KACrC,OAAO,CAAC,IAAI,CAAC,GAAG,SAIlB,CAAA"}
|
package/dist/permissions.js
CHANGED
|
@@ -1,11 +1,33 @@
|
|
|
1
1
|
import { CliError } from "@wirecat/cli-base";
|
|
2
2
|
import { metaOf } from "@wirecat/cli-base/commands";
|
|
3
|
-
import { setupPermissionCeiling } from "@wirecat/cli-core/cli";
|
|
4
|
-
import { CEILING_KEY, LEVELS, levelFor } from "@wirecat/cli-core/sends";
|
|
3
|
+
import { readOnlyLockOf, setupPermissionCeiling } from "@wirecat/cli-core/cli";
|
|
4
|
+
import { CEILING_KEY, keyForCommand, LEVELS, levelFor, DEFAULT_PERMISSIONS as SHARED_DEFAULT_PERMISSIONS, } from "@wirecat/cli-core/sends";
|
|
5
5
|
import { PROFILE_FREE } from "./commands.js";
|
|
6
|
-
import { refusalOf, refuseChangeWhenReadOnly } from "./read-only.js";
|
|
6
|
+
import { refusalOf, refuseChangeWhenReadOnly, ZM } from "./read-only.js";
|
|
7
7
|
/** A change to Zoom asks first. A built-in default only tightens what the owner set (WC-PERM-7). */
|
|
8
|
-
export const DEFAULT_PERMISSIONS = {
|
|
8
|
+
export const DEFAULT_PERMISSIONS = {
|
|
9
|
+
...SHARED_DEFAULT_PERMISSIONS,
|
|
10
|
+
"remote-meetings": "ask",
|
|
11
|
+
};
|
|
12
|
+
/** A saved denial must be reviewed when the two recording download paths become one. */
|
|
13
|
+
export const recordingPermissions = (levels) => {
|
|
14
|
+
if (Object.hasOwn(levels, "recordings.sync"))
|
|
15
|
+
throw new CliError("configuration_error", "permission path moved — rename permissions.recordings.sync to permissions.recordings.download", {
|
|
16
|
+
permission: "recordings.sync",
|
|
17
|
+
replacement: "recordings.download",
|
|
18
|
+
retryable: false,
|
|
19
|
+
});
|
|
20
|
+
return levels;
|
|
21
|
+
};
|
|
22
|
+
export const discoveryLevels = (own, env) => {
|
|
23
|
+
const ceiling = setupPermissionCeiling(env);
|
|
24
|
+
return {
|
|
25
|
+
...DEFAULT_PERMISSIONS,
|
|
26
|
+
...own,
|
|
27
|
+
...(ceiling ? { [CEILING_KEY]: ceiling } : {}),
|
|
28
|
+
...(readOnlyLockOf(ZM, env) ? { [CEILING_KEY]: "readonly" } : {}),
|
|
29
|
+
};
|
|
30
|
+
};
|
|
9
31
|
/** Looking after the tool — its settings, its login, its help — is never gated (WC-PERM-5). */
|
|
10
32
|
const HOUSEKEEPING = new Set([...PROFILE_FREE, "session", "serve", "mcp"]);
|
|
11
33
|
export const pathOf = (command) => {
|
|
@@ -15,17 +37,18 @@ export const pathOf = (command) => {
|
|
|
15
37
|
return words;
|
|
16
38
|
};
|
|
17
39
|
/** The command's path, dotted — `remote-meetings.cancel` — or null for housekeeping. */
|
|
18
|
-
export const
|
|
19
|
-
|
|
20
|
-
return path.length === 0 || HOUSEKEEPING.has(path[0]) ? null : path.join(".");
|
|
21
|
-
};
|
|
40
|
+
export const permissionKeyForPath = (path) => path.length === 0 || (HOUSEKEEPING.has(path[0]) && keyForCommand(path) === null) ? null : path.join(".");
|
|
41
|
+
export const permissionKeyOf = (command) => permissionKeyForPath(pathOf(command));
|
|
22
42
|
/** Every key a permission may name: each command's path and every group above it. */
|
|
23
43
|
export const permissionKeys = (program) => {
|
|
24
44
|
const keys = new Set(["mcp.authority"]);
|
|
25
45
|
const walk = (command) => {
|
|
26
46
|
const key = permissionKeyOf(command);
|
|
27
|
-
if (key)
|
|
28
|
-
|
|
47
|
+
if (key) {
|
|
48
|
+
const parts = key.split(".");
|
|
49
|
+
for (let size = 1; size <= parts.length; size++)
|
|
50
|
+
keys.add(parts.slice(0, size).join("."));
|
|
51
|
+
}
|
|
29
52
|
for (const child of command.commands)
|
|
30
53
|
walk(child);
|
|
31
54
|
};
|
|
@@ -64,7 +87,7 @@ export const checkPermission = (command, context) => {
|
|
|
64
87
|
return;
|
|
65
88
|
const named = context.profile();
|
|
66
89
|
const profile = named ?? "<profile>";
|
|
67
|
-
const own = named === undefined ? {} : (context.config().permissions[named] ?? {});
|
|
90
|
+
const own = recordingPermissions(named === undefined ? {} : (context.config().permissions[named] ?? {}));
|
|
68
91
|
const levels = context.ceiling ? { ...own, [CEILING_KEY]: context.ceiling } : own;
|
|
69
92
|
const { level, key: by } = levelFor(levels, key, DEFAULT_PERMISSIONS);
|
|
70
93
|
const at = by ?? key;
|
package/dist/permissions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissions.js","sourceRoot":"","sources":["../src/permissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"permissions.js","sourceRoot":"","sources":["../src/permissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,EACL,WAAW,EACX,aAAa,EACb,MAAM,EAEN,QAAQ,EACR,mBAAmB,IAAI,0BAA0B,GAClD,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAE5C,OAAO,EAAE,SAAS,EAAE,wBAAwB,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAA;AAExE,oGAAoG;AACpG,MAAM,CAAC,MAAM,mBAAmB,GAAoC;IAClE,GAAG,0BAA0B;IAC7B,iBAAiB,EAAE,KAAK;CACzB,CAAA;AAED,wFAAwF;AACxF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,M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E,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAA;AACnH,CAAC,CAAA"}
|
package/dist/profile-word.d.ts
CHANGED
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
import { type Command } from "commander";
|
|
2
1
|
export declare const PROFILE_HELP: string;
|
|
3
|
-
/** Takes the profile word off the command line, in Commander's `parseAsync` argument shape. */
|
|
4
|
-
export declare const liftProfileWord: (program: Command, [argv, settings]: Parameters<Command["parseAsync"]>) => {
|
|
5
|
-
profile?: string;
|
|
6
|
-
args: Parameters<Command["parseAsync"]>;
|
|
7
|
-
};
|
|
8
|
-
/** Commander builds a usage line from the command tree, where the profile is not a word. */
|
|
9
|
-
export declare const showProfileInUsage: (program: Command) => void;
|
|
10
|
-
/** One parse's profile: `lift` takes the word off the command line, `profile()` resolves it when a command needs it. */
|
|
11
|
-
export declare const profileSelection: (env: NodeJS.ProcessEnv, profiles: () => readonly string[]) => {
|
|
12
|
-
lift: (program: Command, args: Parameters<Command["parseAsync"]>) => Parameters<Command["parseAsync"]>;
|
|
13
|
-
profile: () => string;
|
|
14
|
-
/** The profile when one is named, by word or environment; undefined instead of the error that lists them. */
|
|
15
|
-
named: () => string | undefined;
|
|
16
|
-
};
|
|
17
2
|
/**
|
|
18
3
|
* Importing or syncing lists the profile it stores for. On a computer with no profile that makes the first one; beside
|
|
19
4
|
* others an unknown name is refused before anything is stored, since it is far more often a typo than a new account —
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-word.d.ts","sourceRoot":"","sources":["../src/profile-word.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"profile-word.d.ts","sourceRoot":"","sources":["../src/profile-word.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,QAGgF,CAAA;AAEzG;;;;GAIG;AACH,eAAO,MAAM,aAAa,eAAgB,MAAM,WAAW,MAAM,KAAG,IAWnE,CAAA"}
|
package/dist/profile-word.js
CHANGED
|
@@ -1,56 +1,8 @@
|
|
|
1
1
|
import { CliError } from "@wirecat/cli-base";
|
|
2
|
-
import { commandWords, liftProfile } from "@wirecat/cli-core/cli";
|
|
3
|
-
import { Help } from "commander";
|
|
4
|
-
import { PROFILE_FREE } from "./commands.js";
|
|
5
2
|
import { addProfile, readConfig } from "./config.js";
|
|
6
|
-
import { chooseProfile } from "./profile.js";
|
|
7
3
|
export const PROFILE_HELP = "The first word is the profile whenever it is not a command — `zm personal meetings list`.\n" +
|
|
8
4
|
"`ZM_PROFILE` says the same thing for a whole shell session.\n" +
|
|
9
5
|
"No profile is assumed: without one, a command that uses an account stops and lists the profiles here.";
|
|
10
|
-
/** The root options that take the next word as their value, so `zm --timeout 30s personal …` finds the profile. */
|
|
11
|
-
const valuedOptions = (program) => new Set(program.options
|
|
12
|
-
.filter((option) => option.required)
|
|
13
|
-
.flatMap((option) => [option.long, option.short].filter((flag) => flag !== undefined)));
|
|
14
|
-
/** Takes the profile word off the command line, in Commander's `parseAsync` argument shape. */
|
|
15
|
-
export const liftProfileWord = (program, [argv = process.argv, settings]) => {
|
|
16
|
-
const head = settings?.from === "user" ? [] : argv.slice(0, 2);
|
|
17
|
-
const named = liftProfile(argv.slice(head.length), commandWords(program), valuedOptions(program));
|
|
18
|
-
return { profile: named.profile, args: [[...head, ...named.rest], settings] };
|
|
19
|
-
};
|
|
20
|
-
/** Commander builds a usage line from the command tree, where the profile is not a word. */
|
|
21
|
-
export const showProfileInUsage = (program) => {
|
|
22
|
-
const withProfile = (command) => {
|
|
23
|
-
command.configureHelp({
|
|
24
|
-
...command.configureHelp(),
|
|
25
|
-
commandUsage: (shown) => `zm <profile>${new Help().commandUsage(shown).slice("zm".length)}`,
|
|
26
|
-
});
|
|
27
|
-
for (const child of command.commands)
|
|
28
|
-
withProfile(child);
|
|
29
|
-
};
|
|
30
|
-
for (const top of program.commands)
|
|
31
|
-
if (!PROFILE_FREE.has(top.name()))
|
|
32
|
-
withProfile(top);
|
|
33
|
-
};
|
|
34
|
-
/** One parse's profile: `lift` takes the word off the command line, `profile()` resolves it when a command needs it. */
|
|
35
|
-
export const profileSelection = (env, profiles) => {
|
|
36
|
-
let word;
|
|
37
|
-
let chosen;
|
|
38
|
-
const profile = () => {
|
|
39
|
-
chosen ??= chooseProfile({ word, env, profiles });
|
|
40
|
-
return chosen;
|
|
41
|
-
};
|
|
42
|
-
return {
|
|
43
|
-
lift: (program, args) => {
|
|
44
|
-
const named = liftProfileWord(program, args);
|
|
45
|
-
word = named.profile;
|
|
46
|
-
chosen = undefined;
|
|
47
|
-
return named.args;
|
|
48
|
-
},
|
|
49
|
-
profile,
|
|
50
|
-
/** The profile when one is named, by word or environment; undefined instead of the error that lists them. */
|
|
51
|
-
named: () => word !== undefined || env.ZM_PROFILE?.trim() || env.ZM_PROFILE_LOCK?.trim() ? profile() : undefined,
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
6
|
/**
|
|
55
7
|
* Importing or syncing lists the profile it stores for. On a computer with no profile that makes the first one; beside
|
|
56
8
|
* others an unknown name is refused before anything is stored, since it is far more often a typo than a new account —
|
package/dist/profile-word.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-word.js","sourceRoot":"","sources":["../src/profile-word.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"profile-word.js","sourceRoot":"","sources":["../src/profile-word.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAEpD,MAAM,CAAC,MAAM,YAAY,GACvB,6FAA6F;IAC7F,+DAA+D;IAC/D,uGAAuG,CAAA;AAEzG;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,UAAkB,EAAE,OAAe,EAAQ,EAAE;IACzE,MAAM,IAAI,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAA;IAC5C,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;QAAE,OAAM;IAClC,IAAI,IAAI,CAAC,MAAM;QACb,MAAM,IAAI,QAAQ,CAChB,kBAAkB,EAClB,uBAAuB,OAAO,0BAA0B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,0BAA0B;YAC/F,QAAQ,OAAO,yCAAyC,EAC1D,EAAE,QAAQ,EAAE,IAAI,EAAE,CACnB,CAAA;IACH,UAAU,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA;AACjC,CAAC,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import type { ProgramDeps } from "./program.js";
|
|
3
|
+
import type { ZoomLifecycle } from "./run.js";
|
|
4
|
+
export declare const bindZoomProgram: (program: Command, given: ProgramDeps, lifecycle: ZoomLifecycle, execute: (args: string[], deps: ProgramDeps) => Promise<number>) => void;
|
|
5
|
+
//# sourceMappingURL=program-bindings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"program-bindings.d.ts","sourceRoot":"","sources":["../src/program-bindings.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAqBxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAa/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAgB7C,eAAO,MAAM,eAAe,YACjB,OAAO,SACT,WAAW,aACP,aAAa,WACf,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,MAAM,CAAC,KAC9D,IAmYF,CAAA"}
|