@ornncompute/cli 1.0.120 → 1.0.121
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/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getContainerRegistry } from "../vendor/api-client/orchestrator.js";
|
|
1
2
|
import {
|
|
2
3
|
listApiKeys,
|
|
3
4
|
createApiKey,
|
|
@@ -23,7 +24,7 @@ async function login({
|
|
|
23
24
|
spawnProcess = spawnProcessDefault,
|
|
24
25
|
hostname = os.hostname(),
|
|
25
26
|
}) {
|
|
26
|
-
const registry = await fetch
|
|
27
|
+
const registry = await getContainerRegistry(fetch);
|
|
27
28
|
const session = await getCliSession(fetch);
|
|
28
29
|
const organizationId = (session?.selectedOrganization ?? session?.selected_organization)?.id;
|
|
29
30
|
if (typeof organizationId !== "string" || !organizationId) {
|
|
@@ -370,6 +370,43 @@ function deleteComputeDealAddOn(request, id2, addOnId, body) {
|
|
|
370
370
|
});
|
|
371
371
|
}
|
|
372
372
|
|
|
373
|
+
// ../../packages/api-client/dist/commerce/contract-extractions.js
|
|
374
|
+
var extractions = "/internal/v1/gtm/contract-extractions";
|
|
375
|
+
var extractionPath = (id2) => `${extractions}/${encodeURIComponent(id2)}`;
|
|
376
|
+
function listContractExtractions(request, input = {}, signal) {
|
|
377
|
+
return request(extractions + queryString(input), { method: "GET", signal });
|
|
378
|
+
}
|
|
379
|
+
async function listAllContractExtractions(request, input = {}, signal) {
|
|
380
|
+
const runs = [];
|
|
381
|
+
const seen = /* @__PURE__ */ new Set();
|
|
382
|
+
let after;
|
|
383
|
+
for (; ; ) {
|
|
384
|
+
const page = await listContractExtractions(request, { ...input, after }, signal);
|
|
385
|
+
runs.push(...page.runs);
|
|
386
|
+
if (!page.nextCursor)
|
|
387
|
+
return { ...page, runs };
|
|
388
|
+
if (seen.has(page.nextCursor))
|
|
389
|
+
throw new Error("Contract extractions returned an incomplete list.");
|
|
390
|
+
seen.add(page.nextCursor);
|
|
391
|
+
after = page.nextCursor;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
function createContractExtraction(request, body) {
|
|
395
|
+
return request(extractions, { method: "POST", body });
|
|
396
|
+
}
|
|
397
|
+
function getContractExtraction(request, id2, signal) {
|
|
398
|
+
return request(extractionPath(id2), { method: "GET", signal });
|
|
399
|
+
}
|
|
400
|
+
function updateContractExtractionField(request, id2, fieldId, body) {
|
|
401
|
+
return request(`${extractionPath(id2)}/fields/${encodeURIComponent(fieldId)}`, {
|
|
402
|
+
method: "PUT",
|
|
403
|
+
body
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
function deleteContractExtraction(request, id2, body) {
|
|
407
|
+
return request(extractionPath(id2), { method: "DELETE", body });
|
|
408
|
+
}
|
|
409
|
+
|
|
373
410
|
// ../../packages/api-client/dist/commerce/compute-contract-line-matches.js
|
|
374
411
|
var matchesPath = "/internal/v1/gtm/compute-contract-line-matches";
|
|
375
412
|
var capacityPath = "/internal/v1/gtm/compute-contract-line-capacity";
|
|
@@ -711,6 +748,7 @@ export {
|
|
|
711
748
|
createCapacityListing,
|
|
712
749
|
createComputeDeal,
|
|
713
750
|
createComputeDealAddOn,
|
|
751
|
+
createContractExtraction,
|
|
714
752
|
createControlplaneLicense,
|
|
715
753
|
createCreditAdjustment,
|
|
716
754
|
createDowntime,
|
|
@@ -727,6 +765,7 @@ export {
|
|
|
727
765
|
deleteCapacityTerms,
|
|
728
766
|
deleteComputeDeal,
|
|
729
767
|
deleteComputeDealAddOn,
|
|
768
|
+
deleteContractExtraction,
|
|
730
769
|
deleteContractFile,
|
|
731
770
|
deleteGTMComment,
|
|
732
771
|
deleteGTMCompany,
|
|
@@ -743,6 +782,7 @@ export {
|
|
|
743
782
|
getCapacityListingImage,
|
|
744
783
|
getCapacityListingSpecPdf,
|
|
745
784
|
getCommerceOrganization,
|
|
785
|
+
getContractExtraction,
|
|
746
786
|
getContractFile,
|
|
747
787
|
getControlplaneLicense,
|
|
748
788
|
getGTMPersonalWorkspace,
|
|
@@ -764,6 +804,7 @@ export {
|
|
|
764
804
|
listAdminInvoices,
|
|
765
805
|
listAllCapacityListings,
|
|
766
806
|
listAllComputeDeals,
|
|
807
|
+
listAllContractExtractions,
|
|
767
808
|
listAllContractFiles,
|
|
768
809
|
listAllFacilities,
|
|
769
810
|
listAllInvoices,
|
|
@@ -777,6 +818,7 @@ export {
|
|
|
777
818
|
listComputeContractLineMatches,
|
|
778
819
|
listComputeDealAddOns,
|
|
779
820
|
listComputeDeals,
|
|
821
|
+
listContractExtractions,
|
|
780
822
|
listContractFiles,
|
|
781
823
|
listControlplaneLicenses,
|
|
782
824
|
listCreditAdjustments,
|
|
@@ -812,6 +854,7 @@ export {
|
|
|
812
854
|
transferReservation,
|
|
813
855
|
updateComputeDeal,
|
|
814
856
|
updateComputeDealAddOn,
|
|
857
|
+
updateContractExtractionField,
|
|
815
858
|
updateDowntime,
|
|
816
859
|
updateGTMComment,
|
|
817
860
|
updateGTMCompany,
|
|
@@ -13,6 +13,84 @@ function getSoftwareCatalog(request, signal) {
|
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
// ../../packages/api-client/dist/orchestrator/disks.js
|
|
17
|
+
var disksSocketPath = "/v1/orchestrator/disks/ws";
|
|
18
|
+
function listDisks(request, query = {}, signal) {
|
|
19
|
+
const params = new URLSearchParams();
|
|
20
|
+
for (const key of ["scope", "organization_id", "limit", "q", "exclude_failed"]) {
|
|
21
|
+
if (query[key] !== void 0)
|
|
22
|
+
params.set(key, String(query[key]));
|
|
23
|
+
}
|
|
24
|
+
return request(`/v1/orchestrator/disks${params.size ? `?${params}` : ""}`, {
|
|
25
|
+
method: "GET",
|
|
26
|
+
...signal ? { signal } : {}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function createDisk(request, body) {
|
|
30
|
+
return request("/v1/orchestrator/disks", { method: "POST", body });
|
|
31
|
+
}
|
|
32
|
+
function updateDisk(request, id, body) {
|
|
33
|
+
return request(`/v1/orchestrator/disks/${encodeURIComponent(id)}`, {
|
|
34
|
+
method: "PATCH",
|
|
35
|
+
body
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function deleteDisk(request, id) {
|
|
39
|
+
return request(`/v1/orchestrator/disks/${encodeURIComponent(id)}`, {
|
|
40
|
+
method: "DELETE"
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function startDiskUpload(request, body) {
|
|
44
|
+
return request("/v1/orchestrator/disks/uploads", {
|
|
45
|
+
method: "POST",
|
|
46
|
+
body
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function postDiskObject(request, body) {
|
|
50
|
+
return request("/v1/orchestrator/disks/objects", { method: "POST", body });
|
|
51
|
+
}
|
|
52
|
+
function completeDiskUpload(request, id, body) {
|
|
53
|
+
return request(`/v1/orchestrator/disks/uploads/${encodeURIComponent(id)}/complete`, {
|
|
54
|
+
method: "POST",
|
|
55
|
+
body
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function importDisk(request, body) {
|
|
59
|
+
return request("/v1/orchestrator/disks/imports", { method: "POST", body });
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// ../../packages/api-client/dist/orchestrator/images.js
|
|
63
|
+
function listCatalogImages(request, query = {}, signal) {
|
|
64
|
+
const params = new URLSearchParams();
|
|
65
|
+
if (query.include_pending !== void 0) {
|
|
66
|
+
params.set("include_pending", String(query.include_pending));
|
|
67
|
+
}
|
|
68
|
+
return request(`/v1/orchestrator/catalog/images${params.size ? `?${params}` : ""}`, {
|
|
69
|
+
method: "GET",
|
|
70
|
+
...signal ? { signal } : {}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function startImageUpload(request, body) {
|
|
74
|
+
return request("/v1/orchestrator/images/uploads", {
|
|
75
|
+
method: "POST",
|
|
76
|
+
body
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function postImageObject(request, body) {
|
|
80
|
+
return request("/v1/orchestrator/images/objects", { method: "POST", body });
|
|
81
|
+
}
|
|
82
|
+
function completeImageUpload(request, id, body) {
|
|
83
|
+
return request(`/v1/orchestrator/images/uploads/${encodeURIComponent(id)}/complete`, {
|
|
84
|
+
method: "POST",
|
|
85
|
+
body
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
function deleteImage(request, id) {
|
|
89
|
+
return request(`/v1/orchestrator/images/${encodeURIComponent(id)}`, {
|
|
90
|
+
method: "DELETE"
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
16
94
|
// ../../packages/api-client/dist/orchestrator/locality.js
|
|
17
95
|
var localityGeolocatePath = "/v1/orchestrator/locality/geolocate";
|
|
18
96
|
function listLocalityRegions(request, signal) {
|
|
@@ -29,6 +107,35 @@ function geolocate(request, query, signal) {
|
|
|
29
107
|
});
|
|
30
108
|
}
|
|
31
109
|
|
|
110
|
+
// ../../packages/api-client/dist/orchestrator/registry.js
|
|
111
|
+
function getContainerRegistry(request) {
|
|
112
|
+
return request("/v1/orchestrator/registry", { method: "GET" });
|
|
113
|
+
}
|
|
114
|
+
function listRegistryRepositories(request) {
|
|
115
|
+
return request("/v1/orchestrator/registry/repositories", { method: "GET" });
|
|
116
|
+
}
|
|
117
|
+
function listRegistryTags(request, repository) {
|
|
118
|
+
return request(`/v1/orchestrator/registry/tags?${new URLSearchParams({ repository })}`, {
|
|
119
|
+
method: "GET"
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
function getRegistryUsage(request) {
|
|
123
|
+
return request("/v1/orchestrator/registry/usage", { method: "GET" });
|
|
124
|
+
}
|
|
125
|
+
function listRegistryCaches(request, query = {}) {
|
|
126
|
+
const params = new URLSearchParams();
|
|
127
|
+
if (query.controller_id !== void 0)
|
|
128
|
+
params.set("controller_id", query.controller_id);
|
|
129
|
+
return request(`/v1/orchestrator/registry/caches${params.size ? `?${params}` : ""}`, {
|
|
130
|
+
method: "GET"
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function deleteRegistryTag(request, repository, tag) {
|
|
134
|
+
return request(`/v1/orchestrator/registry/tags?${new URLSearchParams({ repository, tag })}`, {
|
|
135
|
+
method: "DELETE"
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
32
139
|
// ../../packages/api-client/dist/orchestrator/shell.js
|
|
33
140
|
var sessionsPath = "/v1/orchestrator/shell/sessions";
|
|
34
141
|
function createShellSession(fetcher) {
|
|
@@ -45,13 +152,33 @@ function shellSessionAttachPath(id) {
|
|
|
45
152
|
}
|
|
46
153
|
export {
|
|
47
154
|
closeShellSession,
|
|
155
|
+
completeDiskUpload,
|
|
156
|
+
completeImageUpload,
|
|
157
|
+
createDisk,
|
|
48
158
|
createShellSession,
|
|
159
|
+
deleteDisk,
|
|
160
|
+
deleteImage,
|
|
161
|
+
deleteRegistryTag,
|
|
162
|
+
disksSocketPath,
|
|
49
163
|
geolocate,
|
|
164
|
+
getContainerRegistry,
|
|
50
165
|
getCurrentShellSession,
|
|
51
166
|
getHardwareCatalog,
|
|
167
|
+
getRegistryUsage,
|
|
52
168
|
getSoftwareCatalog,
|
|
53
169
|
hardwareCatalogPath,
|
|
170
|
+
importDisk,
|
|
171
|
+
listCatalogImages,
|
|
172
|
+
listDisks,
|
|
54
173
|
listLocalityRegions,
|
|
174
|
+
listRegistryCaches,
|
|
175
|
+
listRegistryRepositories,
|
|
176
|
+
listRegistryTags,
|
|
55
177
|
localityGeolocatePath,
|
|
56
|
-
|
|
178
|
+
postDiskObject,
|
|
179
|
+
postImageObject,
|
|
180
|
+
shellSessionAttachPath,
|
|
181
|
+
startDiskUpload,
|
|
182
|
+
startImageUpload,
|
|
183
|
+
updateDisk
|
|
57
184
|
};
|
|
@@ -1339,6 +1339,35 @@ function geolocate(request, query3, signal) {
|
|
|
1339
1339
|
});
|
|
1340
1340
|
}
|
|
1341
1341
|
|
|
1342
|
+
// ../../packages/api-client/dist/orchestrator/registry.js
|
|
1343
|
+
function getContainerRegistry(request) {
|
|
1344
|
+
return request("/v1/orchestrator/registry", { method: "GET" });
|
|
1345
|
+
}
|
|
1346
|
+
function listRegistryRepositories(request) {
|
|
1347
|
+
return request("/v1/orchestrator/registry/repositories", { method: "GET" });
|
|
1348
|
+
}
|
|
1349
|
+
function listRegistryTags(request, repository) {
|
|
1350
|
+
return request(`/v1/orchestrator/registry/tags?${new URLSearchParams({ repository })}`, {
|
|
1351
|
+
method: "GET"
|
|
1352
|
+
});
|
|
1353
|
+
}
|
|
1354
|
+
function getRegistryUsage(request) {
|
|
1355
|
+
return request("/v1/orchestrator/registry/usage", { method: "GET" });
|
|
1356
|
+
}
|
|
1357
|
+
function listRegistryCaches(request, query3 = {}) {
|
|
1358
|
+
const params = new URLSearchParams();
|
|
1359
|
+
if (query3.controller_id !== void 0)
|
|
1360
|
+
params.set("controller_id", query3.controller_id);
|
|
1361
|
+
return request(`/v1/orchestrator/registry/caches${params.size ? `?${params}` : ""}`, {
|
|
1362
|
+
method: "GET"
|
|
1363
|
+
});
|
|
1364
|
+
}
|
|
1365
|
+
function deleteRegistryTag(request, repository, tag) {
|
|
1366
|
+
return request(`/v1/orchestrator/registry/tags?${new URLSearchParams({ repository, tag })}`, {
|
|
1367
|
+
method: "DELETE"
|
|
1368
|
+
});
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1342
1371
|
// ../../packages/capabilities/dist/capabilities/staff-shared.js
|
|
1343
1372
|
function statusOf(error) {
|
|
1344
1373
|
if (error && typeof error === "object" && "status" in error) {
|
|
@@ -6955,9 +6984,6 @@ function formatBytes(bytes) {
|
|
|
6955
6984
|
}
|
|
6956
6985
|
return `${value >= 10 || unit === 0 ? Math.round(value) : value.toFixed(1)} ${units[unit]}`;
|
|
6957
6986
|
}
|
|
6958
|
-
async function registryOf(context) {
|
|
6959
|
-
return await context.fetch(REGISTRY_PATH, { method: "GET" });
|
|
6960
|
-
}
|
|
6961
6987
|
function repositoryArgument(input, interaction2) {
|
|
6962
6988
|
const raw = input.repository ?? input.$positionals[0];
|
|
6963
6989
|
if (!raw) {
|
|
@@ -6996,7 +7022,7 @@ var registryShowCapability = defineCapability({
|
|
|
6996
7022
|
},
|
|
6997
7023
|
slack: false,
|
|
6998
7024
|
execute: async (context) => {
|
|
6999
|
-
const registry = await
|
|
7025
|
+
const registry = await getContainerRegistry(context.fetch);
|
|
7000
7026
|
const interaction2 = cliInteraction(context);
|
|
7001
7027
|
if (!interaction2)
|
|
7002
7028
|
return registry;
|
|
@@ -7031,11 +7057,11 @@ var registryRepositoriesListCapability = defineCapability({
|
|
|
7031
7057
|
},
|
|
7032
7058
|
slack: false,
|
|
7033
7059
|
execute: async (context) => {
|
|
7034
|
-
const listed = await context.fetch
|
|
7060
|
+
const listed = await listRegistryRepositories(context.fetch);
|
|
7035
7061
|
const interaction2 = cliInteraction(context);
|
|
7036
7062
|
if (!interaction2)
|
|
7037
7063
|
return listed;
|
|
7038
|
-
const registry = await
|
|
7064
|
+
const registry = await getContainerRegistry(context.fetch);
|
|
7039
7065
|
return interaction2.result({
|
|
7040
7066
|
data: listed,
|
|
7041
7067
|
presentation: {
|
|
@@ -7069,9 +7095,9 @@ var registryTagsListCapability = defineCapability({
|
|
|
7069
7095
|
slack: false,
|
|
7070
7096
|
execute: async (context, input) => {
|
|
7071
7097
|
const interaction2 = cliInteraction(context);
|
|
7072
|
-
const registry = await
|
|
7098
|
+
const registry = await getContainerRegistry(context.fetch);
|
|
7073
7099
|
const repository = qualifiedRepository(repositoryArgument(input, interaction2).repository, registry);
|
|
7074
|
-
const listed = await context.fetch
|
|
7100
|
+
const listed = await listRegistryTags(context.fetch, repository);
|
|
7075
7101
|
if (!interaction2)
|
|
7076
7102
|
return listed;
|
|
7077
7103
|
return interaction2.result({
|
|
@@ -7108,7 +7134,7 @@ var registryTagsDeleteCapability = defineCapability({
|
|
|
7108
7134
|
slack: false,
|
|
7109
7135
|
execute: async (context, input) => {
|
|
7110
7136
|
const interaction2 = cliInteraction(context);
|
|
7111
|
-
const registry = await
|
|
7137
|
+
const registry = await getContainerRegistry(context.fetch);
|
|
7112
7138
|
const argument = repositoryArgument(input, interaction2);
|
|
7113
7139
|
const repository = qualifiedRepository(argument.repository, registry);
|
|
7114
7140
|
if (!argument.tag) {
|
|
@@ -7142,9 +7168,7 @@ var registryTagsDeleteCapability = defineCapability({
|
|
|
7142
7168
|
} else if (!context.confirmed) {
|
|
7143
7169
|
return preview("registry.tags.delete", target);
|
|
7144
7170
|
}
|
|
7145
|
-
await context.fetch
|
|
7146
|
-
method: "DELETE"
|
|
7147
|
-
});
|
|
7171
|
+
await deleteRegistryTag(context.fetch, target.repository, target.tag);
|
|
7148
7172
|
const deleted = { deleted: true, ...target };
|
|
7149
7173
|
if (!interaction2)
|
|
7150
7174
|
return deleted;
|
|
@@ -7176,7 +7200,7 @@ var registryUsageCapability = defineCapability({
|
|
|
7176
7200
|
},
|
|
7177
7201
|
slack: false,
|
|
7178
7202
|
execute: async (context) => {
|
|
7179
|
-
const usage = await context.fetch
|
|
7203
|
+
const usage = await getRegistryUsage(context.fetch);
|
|
7180
7204
|
const interaction2 = cliInteraction(context);
|
|
7181
7205
|
if (!interaction2)
|
|
7182
7206
|
return usage;
|
|
@@ -7207,7 +7231,7 @@ var registryCopiesListCapability = defineCapability({
|
|
|
7207
7231
|
}
|
|
7208
7232
|
},
|
|
7209
7233
|
slack: false,
|
|
7210
|
-
execute:
|
|
7234
|
+
execute: (context) => listRegistryCaches(context.fetch)
|
|
7211
7235
|
});
|
|
7212
7236
|
var registryLoginCapability = defineCapability({
|
|
7213
7237
|
id: "registry.login",
|