@norskvideo/ctl-commands 0.1.17 → 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 +14 -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;
|
|
@@ -73,6 +76,10 @@ export interface ProductAddOpts {
|
|
|
73
76
|
/** BYOL license file path — required unless marketplaceProvider is given. */
|
|
74
77
|
licenseFile?: string;
|
|
75
78
|
marketplaceProvider?: string;
|
|
79
|
+
/** Deploy-time environment for a container product's control plane, each
|
|
80
|
+
* entry a `"KEY=VALUE"` string. Repeatable: renders as `--env A=1 --env B=2`
|
|
81
|
+
* and lands on the persisted container spec. */
|
|
82
|
+
env?: string[];
|
|
76
83
|
}
|
|
77
84
|
export interface ProductPullOpts {
|
|
78
85
|
/** Also fetch the product's CUDA sideload bundles. Opt-in: a host having a GPU
|
|
@@ -140,6 +147,7 @@ export interface InstanceLaunchTemplateOpts {
|
|
|
140
147
|
containerUser?: string;
|
|
141
148
|
memoryLimit?: string;
|
|
142
149
|
restartPolicy?: RestartPolicy;
|
|
150
|
+
openFileLimit?: number;
|
|
143
151
|
}
|
|
144
152
|
/** Runtime source for the `get` vocabulary — the CLI's yargs `choices` and
|
|
145
153
|
* help text derive from it, so the type and the accepted words cannot drift.
|
|
@@ -367,6 +375,11 @@ export declare const commands: {
|
|
|
367
375
|
readonly list: LeafCmd<() => {
|
|
368
376
|
readonly kind: "user.list";
|
|
369
377
|
}>;
|
|
378
|
+
readonly role: LeafCmd<(name: string, role: PlatformRoleName) => {
|
|
379
|
+
readonly kind: "user.role";
|
|
380
|
+
readonly name: string;
|
|
381
|
+
readonly role: PlatformRoleName;
|
|
382
|
+
}>;
|
|
370
383
|
};
|
|
371
384
|
};
|
|
372
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";
|