@norskvideo/ctl-commands 0.1.18 → 0.1.19
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/commands.d.ts +10 -1
- package/commands.js +1 -0
- package/package.json +1 -1
- package/types.d.ts +1 -0
package/commands.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CertSource, HardwareProfile, NetworkMode, ProductNetworkMode, RestartPolicy } from "./types.js";
|
|
1
|
+
import type { CertSource, HardwareProfile, NetworkMode, PlatformRoleName, ProductNetworkMode, RestartPolicy } from "./types.js";
|
|
2
2
|
/** A factory function tagged with its help-display signature. */
|
|
3
3
|
export type LeafCmd<F extends (...args: never[]) => unknown> = F & {
|
|
4
4
|
readonly __sig: string;
|
|
@@ -66,6 +66,9 @@ export interface UpgradeOpts {
|
|
|
66
66
|
}
|
|
67
67
|
export interface UserSetOpts {
|
|
68
68
|
password: string;
|
|
69
|
+
/** Platform role for a user being created. Omitted, the daemon decides.
|
|
70
|
+
* Ignored when the user already exists — a password change never re-grants. */
|
|
71
|
+
role?: PlatformRoleName;
|
|
69
72
|
}
|
|
70
73
|
export interface ProductAddOpts {
|
|
71
74
|
image?: string;
|
|
@@ -144,6 +147,7 @@ export interface InstanceLaunchTemplateOpts {
|
|
|
144
147
|
containerUser?: string;
|
|
145
148
|
memoryLimit?: string;
|
|
146
149
|
restartPolicy?: RestartPolicy;
|
|
150
|
+
openFileLimit?: number;
|
|
147
151
|
}
|
|
148
152
|
/** Runtime source for the `get` vocabulary — the CLI's yargs `choices` and
|
|
149
153
|
* help text derive from it, so the type and the accepted words cannot drift.
|
|
@@ -371,6 +375,11 @@ export declare const commands: {
|
|
|
371
375
|
readonly list: LeafCmd<() => {
|
|
372
376
|
readonly kind: "user.list";
|
|
373
377
|
}>;
|
|
378
|
+
readonly role: LeafCmd<(name: string, role: PlatformRoleName) => {
|
|
379
|
+
readonly kind: "user.role";
|
|
380
|
+
readonly name: string;
|
|
381
|
+
readonly role: PlatformRoleName;
|
|
382
|
+
}>;
|
|
374
383
|
};
|
|
375
384
|
};
|
|
376
385
|
/** Every leaf in a factory subtree, as a union of its `LeafCmd` types. */
|
package/commands.js
CHANGED
|
@@ -119,5 +119,6 @@ export const commands = {
|
|
|
119
119
|
set: leaf("user.set", (name, opts) => ({ kind: "user.set", name, opts }), "name"),
|
|
120
120
|
delete: leaf("user.delete", (name) => ({ kind: "user.delete", name }), "name"),
|
|
121
121
|
list: leaf("user.list", () => ({ kind: "user.list" })),
|
|
122
|
+
role: leaf("user.role", (name, role) => ({ kind: "user.role", name, role }), "name", "role"),
|
|
122
123
|
},
|
|
123
124
|
};
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type NetworkMode = "docker" | "hybrid";
|
|
2
2
|
export type CertSource = "mkcert" | "self-signed" | "user" | "certbot";
|
|
3
3
|
export type HardwareProfile = "none" | "nvidia" | "quadra";
|
|
4
|
+
export type PlatformRoleName = "viewer" | "operator" | "builder" | "admin";
|
|
4
5
|
export type ProductNetworkMode = "docker" | "hybrid";
|
|
5
6
|
export type RestartPolicy = "unless-stopped" | "always" | "on-failure" | "no";
|