@celilo/cli 0.7.1 → 0.8.1
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/drizzle/meta/_journal.json +0 -7
- package/package.json +1 -1
- package/src/api-clients/proxmox.ts +0 -17
- package/src/cli/command-registry.ts +1 -65
- package/src/cli/commands/module-changeset.test.ts +52 -0
- package/src/cli/commands/module-changeset.ts +65 -0
- package/src/cli/commands/module-publish.ts +10 -1
- package/src/cli/commands/module-version.test.ts +118 -0
- package/src/cli/commands/module-version.ts +155 -0
- package/src/cli/commands/proxmox-node-list.ts +34 -1
- package/src/cli/completion.ts +3 -11
- package/src/cli/index.ts +6 -15
- package/src/db/schema.ts +0 -11
- package/src/manifest/schema.ts +24 -0
- package/src/module/versioning/changeset-version.test.ts +108 -0
- package/src/module/versioning/changeset-version.ts +139 -0
- package/src/services/deployed-systems.test.ts +1 -73
- package/src/services/deployed-systems.ts +0 -72
- package/src/services/module-validator/git-hygiene.test.ts +35 -0
- package/src/services/module-validator/git-hygiene.ts +36 -17
- package/src/services/module-validator/index.ts +2 -1
- package/src/variables/context.ts +7 -36
- package/drizzle/0012_module_systems_sizing.sql +0 -3
- package/src/cli/commands/proxmox-instance-list.test.ts +0 -77
- package/src/cli/commands/proxmox-instance-list.ts +0 -137
- package/src/cli/commands/proxmox-instance-resize.ts +0 -233
- package/src/cli/commands/proxmox-resize-guards.test.ts +0 -55
- package/src/cli/commands/proxmox-resize-guards.ts +0 -102
- package/src/cli/commands/proxmox-service.ts +0 -38
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared Proxmox-service resolution for the `celilo proxmox …` command tree
|
|
3
|
-
* (node list, vm/ct list|show|resize). Resolves an explicit service-id arg, else
|
|
4
|
-
* the sole Proxmox service; errors when ambiguous or unknown.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import type { listContainerServices } from '../../services/container-service';
|
|
8
|
-
|
|
9
|
-
type Services = Awaited<ReturnType<typeof listContainerServices>>;
|
|
10
|
-
|
|
11
|
-
export function resolveProxmoxService(
|
|
12
|
-
services: Services,
|
|
13
|
-
requested: string | undefined,
|
|
14
|
-
): { service: Services[number] } | { error: string } {
|
|
15
|
-
const proxmox = services.filter((s) => s.providerName === 'proxmox');
|
|
16
|
-
if (proxmox.length === 0) {
|
|
17
|
-
return {
|
|
18
|
-
error: 'No Proxmox container service configured. Add one: celilo service add proxmox',
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
if (requested) {
|
|
22
|
-
const match = proxmox.find((s) => s.serviceId === requested);
|
|
23
|
-
if (!match) {
|
|
24
|
-
return {
|
|
25
|
-
error: `No Proxmox service '${requested}'. Known: ${proxmox.map((s) => s.serviceId).join(', ')}`,
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
return { service: match };
|
|
29
|
-
}
|
|
30
|
-
if (proxmox.length > 1) {
|
|
31
|
-
return {
|
|
32
|
-
error: `Multiple Proxmox services — specify one with <service-id>:\n ${proxmox
|
|
33
|
-
.map((s) => s.serviceId)
|
|
34
|
-
.join('\n ')}`,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
return { service: proxmox[0] };
|
|
38
|
-
}
|