@homeflare/distilled-proxmox 0.2.0 → 0.3.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/README.md +15 -10
- package/dist/config-not-found.test.d.ts +2 -0
- package/dist/config-not-found.test.d.ts.map +1 -0
- package/dist/config-not-found.test.js +96 -0
- package/dist/config-not-found.test.js.map +1 -0
- package/dist/delete-query-binding.test.d.ts +2 -0
- package/dist/delete-query-binding.test.d.ts.map +1 -0
- package/dist/delete-query-binding.test.js +49 -0
- package/dist/delete-query-binding.test.js.map +1 -0
- package/dist/errors.d.ts +14 -7
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +12 -5
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/not-found-errors.test.d.ts +2 -0
- package/dist/not-found-errors.test.d.ts.map +1 -0
- package/dist/not-found-errors.test.js +59 -0
- package/dist/not-found-errors.test.js.map +1 -0
- package/dist/protocol-form.d.ts +18 -0
- package/dist/protocol-form.d.ts.map +1 -0
- package/dist/protocol-form.js +37 -0
- package/dist/protocol-form.js.map +1 -0
- package/dist/protocol-form.test.d.ts +2 -0
- package/dist/protocol-form.test.d.ts.map +1 -0
- package/dist/protocol-form.test.js +68 -0
- package/dist/protocol-form.test.js.map +1 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +28 -9
- package/dist/protocol.js.map +1 -1
- package/dist/services/access.d.ts +22 -2
- package/dist/services/access.d.ts.map +1 -1
- package/dist/services/access.js +17 -9
- package/dist/services/access.js.map +1 -1
- package/dist/services/cluster.d.ts +25 -5
- package/dist/services/cluster.d.ts.map +1 -1
- package/dist/services/cluster.js +56 -82
- package/dist/services/cluster.js.map +1 -1
- package/dist/services/nodes.d.ts +22 -2
- package/dist/services/nodes.d.ts.map +1 -1
- package/dist/services/nodes.js +60 -72
- package/dist/services/nodes.js.map +1 -1
- package/dist/services/pools.d.ts +16 -6
- package/dist/services/pools.d.ts.map +1 -1
- package/dist/services/pools.js +20 -13
- package/dist/services/pools.js.map +1 -1
- package/dist/services/storage.d.ts +11 -1
- package/dist/services/storage.d.ts.map +1 -1
- package/dist/services/storage.js +8 -1
- package/dist/services/storage.js.map +1 -1
- package/package.json +1 -7
- package/src/config-not-found.test.ts +153 -0
- package/src/delete-query-binding.test.ts +65 -0
- package/src/errors.ts +16 -17
- package/src/index.ts +0 -1
- package/src/not-found-errors.test.ts +112 -0
- package/src/protocol-form.test.ts +102 -0
- package/src/protocol-form.ts +49 -0
- package/src/protocol.ts +31 -9
- package/src/services/access.ts +25 -11
- package/src/services/cluster.ts +76 -89
- package/src/services/nodes.ts +71 -74
- package/src/services/pools.ts +29 -21
- package/src/services/storage.ts +12 -2
- package/dist/task.d.ts +0 -51
- package/dist/task.d.ts.map +0 -1
- package/dist/task.js +0 -60
- package/dist/task.js.map +0 -1
- package/src/task.ts +0 -87
package/dist/services/nodes.d.ts
CHANGED
|
@@ -2,6 +2,26 @@ import * as S from "@distilled.cloud/core/schema";
|
|
|
2
2
|
import * as API from "@distilled.cloud/core/api";
|
|
3
3
|
import { type ProxmoxOpError, type ProxmoxOpContext } from "../protocol.ts";
|
|
4
4
|
export type { ProxmoxOpError, ProxmoxOpContext };
|
|
5
|
+
declare const CephFsNotFound_base: S.Class<CephFsNotFound, S.TaggedStruct<"CephFsNotFound", {
|
|
6
|
+
readonly message: any;
|
|
7
|
+
}>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
|
|
8
|
+
"@distilled.cloud/error/categories": {
|
|
9
|
+
BadRequestError: true;
|
|
10
|
+
};
|
|
11
|
+
});
|
|
12
|
+
/** The Ceph filesystem does not exist. PVE's `destroyfs` dies synchronously with `no such cephfs '<name>'` when the named filesystem is already gone (an async task is never even queued, so this surfaces directly from the DELETE call, not from polling its UPID). This shape states the honest status (404) while matching the wire's real one — 500, the same class PVE answers for a missing user/group/storage/pool. Traced to source, not paraphrased (correcting an earlier draft of this patch, which carried forward the kit's own paraphrase, 'no such cephfs' with no filesystem name — the kit comments it cited, `ceph-fs-wire.ts:203-206` and `ceph-fs.ts:230-233`, never claimed to quote the wire text verbatim either): `pve-manager` (commit f6997e698c7933ea8e62319e2bf1bf7262daa56a, "bump version to 9.2.11") `PVE/API2/Ceph/FS.pm:327`, inside the `DELETE .../ceph/fs/{name}` handler's `code => sub`: `die "no such cephfs '$fs_name'\n" if !$fs;` — reached only when `$fs_name` (the `name` path label) is not found in `PVE::Ceph::Tools::ls_fs()`'s list. No live DELETE was run to confirm this byte-for-byte (per this pass's read-only-GET constraint); the regex is anchored on the verified-from-source prefix and object-kind qualifier only, deliberately not asserting the exact trailing punctuation/newline. */
|
|
13
|
+
export declare class CephFsNotFound extends /*@__PURE__*/ CephFsNotFound_base {
|
|
14
|
+
}
|
|
15
|
+
declare const CephPoolNotFound_base: S.Class<CephPoolNotFound, S.TaggedStruct<"CephPoolNotFound", {
|
|
16
|
+
readonly message: any;
|
|
17
|
+
}>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
|
|
18
|
+
"@distilled.cloud/error/categories": {
|
|
19
|
+
BadRequestError: true;
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
/** The Ceph pool does not exist. PVE shells out to `ceph osd pool get` and reports its failure verbatim as HTTP 500 with `{"data":null,"message":"error with 'osd pool get': mon_cmd failed - unrecognized pool '<name>'\n"}` — a generic command failure, not a parsed field, but distinctively named ('unrecognized pool'), unlike ZfsPool's equivalent 'exit code 1' shape (deliberately left untyped — see zfs-pool-read-failure.test.ts: that message names no object kind at all, so typing it would risk folding an unrelated zpool-command failure into 'absent'). This shape states the honest status (404) while matching the wire's real one. Call site traced to source: `pve-manager` (git.proxmox.com/git/pve-manager.git, commit f6997e698c7933ea8e62319e2bf1bf7262daa56a, "bump version to 9.2.11" — the SDK's own pinned version, matching `pve-docs`'s own repoid for this snapshot) `PVE/API2/Ceph/Pool.pm` (~line 850), inside the `status` GET handler: `$rados->mon_command({ prefix => 'osd pool get', pool => "$pool", var => 'all' })`. `mon_cmd failed - unrecognized pool '<name>'` is Ceph's/librados's own wire text for a missing pool, not a PVE-authored string, so it was not independently re-derived from Perl source (there is none to read — it crosses into Ceph's own C++ `mon_command` implementation, out of scope for this pass). Measured: `taslabs-net/homeflare-kit`'s `packages/alchemy/src/proxmox/ceph-pool-write.test.ts:5-14`, live cluster TB4 `n2`, `GET /nodes/{node}/ceph/pool/{name}/status`, 2026-09-24, read-role, read-only probe. */
|
|
23
|
+
export declare class CephPoolNotFound extends /*@__PURE__*/ CephPoolNotFound_base {
|
|
24
|
+
}
|
|
5
25
|
declare const ClusterNodeUnreachable_base: S.Class<ClusterNodeUnreachable, S.TaggedStruct<"ClusterNodeUnreachable", {
|
|
6
26
|
readonly message: any;
|
|
7
27
|
}>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
|
|
@@ -7022,7 +7042,7 @@ export declare const createNodeVzdump: API.OperationMethod<CreateNodeVzdumpReque
|
|
|
7022
7042
|
export type CreateNodeWakeonlanError = ProxmoxOpError;
|
|
7023
7043
|
/** Try to wake a node via 'wake on LAN' network packet. (root-privileged endpoint) */
|
|
7024
7044
|
export declare const createNodeWakeonlan: API.OperationMethod<CreateNodeWakeonlanRequest, CreateNodeWakeonlanResponse, CreateNodeWakeonlanError, ProxmoxOpContext>;
|
|
7025
|
-
export type DeleteNodeCephFsError = ProxmoxOpError;
|
|
7045
|
+
export type DeleteNodeCephFsError = CephFsNotFound | ProxmoxOpError;
|
|
7026
7046
|
/** Destroy a Ceph filesystem. Refuses if any PVE storage entry of type 'cephfs' still references the filesystem and is not disabled. Optionally also removes the storage entries and/or the underlying metadata and data pools. (root-privileged endpoint) */
|
|
7027
7047
|
export declare const deleteNodeCephFs: API.OperationMethod<DeleteNodeCephFsRequest, DeleteNodeCephFsResponse, DeleteNodeCephFsError, ProxmoxOpContext>;
|
|
7028
7048
|
export type DeleteNodeCephMdsError = ProxmoxOpError;
|
|
@@ -7163,7 +7183,7 @@ export declare const getNodeCephOsdMetadata: API.OperationMethod<GetNodeCephOsdM
|
|
|
7163
7183
|
export type GetNodeCephPoolError = ProxmoxOpError;
|
|
7164
7184
|
/** Pool index. */
|
|
7165
7185
|
export declare const getNodeCephPool: API.OperationMethod<GetNodeCephPoolRequest, GetNodeCephPoolResponse, GetNodeCephPoolError, ProxmoxOpContext>;
|
|
7166
|
-
export type GetNodeCephPoolStatusError = ProxmoxOpError;
|
|
7186
|
+
export type GetNodeCephPoolStatusError = CephPoolNotFound | ProxmoxOpError;
|
|
7167
7187
|
/** Show the current pool status. (root-privileged endpoint) */
|
|
7168
7188
|
export declare const getNodeCephPoolStatus: API.OperationMethod<GetNodeCephPoolStatusRequest, GetNodeCephPoolStatusResponse, GetNodeCephPoolStatusError, ProxmoxOpContext>;
|
|
7169
7189
|
export type GetNodeCephStatusError = ProxmoxOpError;
|