@senticor/hive 1.147.0 → 1.148.0
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/hive.cjs +99 -5
- package/package.json +1 -1
package/hive.cjs
CHANGED
|
@@ -10511,22 +10511,22 @@ var artifactName = injectedString(
|
|
|
10511
10511
|
true ? "hive-cli" : void 0
|
|
10512
10512
|
) || String(process.env.HIVE_CLI_ARTIFACT_NAME || "hive-cli").trim() || "hive-cli";
|
|
10513
10513
|
var packageVersion = injectedString(
|
|
10514
|
-
true ? "1.
|
|
10514
|
+
true ? "1.148.0" : void 0
|
|
10515
10515
|
) || String(process.env.HIVE_CLI_PACKAGE_VERSION || "").trim() || readPackageVersion();
|
|
10516
10516
|
var releaseVersion = injectedString(
|
|
10517
|
-
true ? "1.
|
|
10517
|
+
true ? "1.148.0" : void 0
|
|
10518
10518
|
) || String(process.env.HIVE_CLI_RELEASE_VERSION || "").trim() || packageVersion || "dev";
|
|
10519
10519
|
var releaseChannel = injectedString(
|
|
10520
10520
|
true ? "final" : void 0
|
|
10521
10521
|
) || String(process.env.HIVE_CLI_RELEASE_CHANNEL || "").trim() || (releaseVersion.includes("-rc.") ? "rc" : releaseVersion === "dev" ? "dev" : "final");
|
|
10522
10522
|
var buildCommit = injectedString(
|
|
10523
|
-
true ? "
|
|
10523
|
+
true ? "cc2fc1701caa02535cee325d04f35750f62e55d2" : void 0
|
|
10524
10524
|
) || String(process.env.HIVE_CLI_BUILD_COMMIT || "").trim() || "unknown";
|
|
10525
10525
|
var buildTimestamp = injectedString(
|
|
10526
|
-
true ? "2026-11-
|
|
10526
|
+
true ? "2026-11-12T13:33:23Z" : void 0
|
|
10527
10527
|
) || String(process.env.HIVE_CLI_BUILD_TIMESTAMP || "").trim() || "unknown";
|
|
10528
10528
|
var ociRef = injectedString(
|
|
10529
|
-
true ? "registry.onstackit.cloud/senticor/hive-cli:1.
|
|
10529
|
+
true ? "registry.onstackit.cloud/senticor/hive-cli:1.148.0" : void 0
|
|
10530
10530
|
) || String(process.env.HIVE_CLI_OCI_REF || "").trim() || `registry.onstackit.cloud/senticor/${artifactName}:${releaseVersion}`;
|
|
10531
10531
|
var RELEASE_INFO = Object.freeze({
|
|
10532
10532
|
packageVersion,
|
|
@@ -32702,6 +32702,17 @@ var orgArgs = withArgs({
|
|
|
32702
32702
|
clearOrgName: { type: "boolean", description: "rename: clear the organisation's display name, so clients show the key" },
|
|
32703
32703
|
expectOrgName: { type: "string", description: "rename: change only if the stored name is this one ('' = no name yet)" }
|
|
32704
32704
|
});
|
|
32705
|
+
var enforcementArgs = {
|
|
32706
|
+
template: { type: "string", description: "Mission template id, e.g. mt.schokoticket.v1" },
|
|
32707
|
+
reason: { type: "string", description: "Why; goes into the audit trail and the history (10 to 500 characters)" }
|
|
32708
|
+
};
|
|
32709
|
+
function enforcementInput(args) {
|
|
32710
|
+
const templateId = String(args.template ?? "").trim();
|
|
32711
|
+
if (!templateId) throw commandError("TEMPLATE_REQUIRED", 1, "Pass --template <template-id>.");
|
|
32712
|
+
const reason = String(args.reason ?? "").trim();
|
|
32713
|
+
if (!reason) throw commandError("REASON_REQUIRED", 1, "Pass --reason <why>; it goes into the audit trail.");
|
|
32714
|
+
return { templateId, reason };
|
|
32715
|
+
}
|
|
32705
32716
|
function orgNameArg(args) {
|
|
32706
32717
|
if (args.orgName === void 0) return void 0;
|
|
32707
32718
|
try {
|
|
@@ -33229,6 +33240,89 @@ var org = defineCommand({
|
|
|
33229
33240
|
})
|
|
33230
33241
|
}
|
|
33231
33242
|
}),
|
|
33243
|
+
enforcement: defineCommand({
|
|
33244
|
+
meta: { name: "enforcement", description: "Which mission templates CHOS enforces in a tenant, without a redeploy (#469)" },
|
|
33245
|
+
args: orgArgs,
|
|
33246
|
+
default: "get",
|
|
33247
|
+
subCommands: {
|
|
33248
|
+
get: defineCommand({
|
|
33249
|
+
meta: { name: "get", description: "Show the tenant's list and the deployment-wide floor (--tenant-id or --tenant-key)" },
|
|
33250
|
+
args: orgArgs,
|
|
33251
|
+
async run({ args }) {
|
|
33252
|
+
const { tenantId } = await resolveTenantId(args);
|
|
33253
|
+
const { client, fmt } = adminCtx(args);
|
|
33254
|
+
const res = await client.get(`/api/admin/orgs/${enc(tenantId)}/registry-enforcement`);
|
|
33255
|
+
ensureOk(res.status, res.data, "read the enforcement setting");
|
|
33256
|
+
return output(res.data, fmt);
|
|
33257
|
+
}
|
|
33258
|
+
}),
|
|
33259
|
+
add: defineCommand({
|
|
33260
|
+
meta: { name: "add", description: "Enforce one more template (--template <id> --reason <why>)" },
|
|
33261
|
+
args: withArgs({ ...orgArgs, ...enforcementArgs }),
|
|
33262
|
+
async run({ args }) {
|
|
33263
|
+
printContextNotice(args, { adminScope: true });
|
|
33264
|
+
const { templateId, reason } = enforcementInput(args);
|
|
33265
|
+
const { tenantId } = await resolveTenantId(args);
|
|
33266
|
+
const { client, fmt } = adminCtx(args);
|
|
33267
|
+
const res = await client.put(`/api/admin/orgs/${enc(tenantId)}/registry-enforcement/templates/${enc(templateId)}`, { reason });
|
|
33268
|
+
ensureOk(res.status, res.data, "enforce the template");
|
|
33269
|
+
return output(res.data, fmt);
|
|
33270
|
+
}
|
|
33271
|
+
}),
|
|
33272
|
+
remove: defineCommand({
|
|
33273
|
+
meta: { name: "remove", description: "Stop enforcing a template (--template <id> --reason <why>)" },
|
|
33274
|
+
args: withArgs({ ...orgArgs, ...enforcementArgs }),
|
|
33275
|
+
async run({ args }) {
|
|
33276
|
+
printContextNotice(args, { adminScope: true });
|
|
33277
|
+
const { templateId, reason } = enforcementInput(args);
|
|
33278
|
+
const { tenantId } = await resolveTenantId(args);
|
|
33279
|
+
const { client, fmt } = adminCtx(args);
|
|
33280
|
+
const res = await client.del(
|
|
33281
|
+
`/api/admin/orgs/${enc(tenantId)}/registry-enforcement/templates/${enc(templateId)}?reason=${encodeURIComponent(reason)}`
|
|
33282
|
+
);
|
|
33283
|
+
ensureOk(res.status, res.data, "stop enforcing the template");
|
|
33284
|
+
return output(res.data, fmt);
|
|
33285
|
+
}
|
|
33286
|
+
}),
|
|
33287
|
+
set: defineCommand({
|
|
33288
|
+
meta: { name: "set", description: "Replace the list (--templates a,b or --none, --reason <why>)" },
|
|
33289
|
+
args: withArgs({
|
|
33290
|
+
...orgArgs,
|
|
33291
|
+
templates: { type: "string", description: "Comma-separated template ids" },
|
|
33292
|
+
none: { type: "boolean", description: "Empty the list, so the tenant enforces only the deployment-wide floor" },
|
|
33293
|
+
reason: { type: "string", description: "Why; goes into the audit trail and the history (10 to 500 characters)" }
|
|
33294
|
+
}),
|
|
33295
|
+
async run({ args }) {
|
|
33296
|
+
printContextNotice(args, { adminScope: true });
|
|
33297
|
+
const templateIds = String(args.templates ?? "").split(",").map((s) => s.trim()).filter(Boolean);
|
|
33298
|
+
if (args.none && templateIds.length) {
|
|
33299
|
+
throw commandError("CONFLICTING_ARGS", EXIT_GUARDRAIL, "Pass --templates or --none, not both.");
|
|
33300
|
+
}
|
|
33301
|
+
if (!args.none && !templateIds.length) {
|
|
33302
|
+
throw commandError("TEMPLATE_REQUIRED", 1, "Pass --templates <id-a,id-b>, or --none to empty the list.");
|
|
33303
|
+
}
|
|
33304
|
+
const reason = String(args.reason ?? "").trim();
|
|
33305
|
+
if (!reason) throw commandError("REASON_REQUIRED", 1, "Pass --reason <why>; it goes into the audit trail.");
|
|
33306
|
+
const { tenantId } = await resolveTenantId(args);
|
|
33307
|
+
const { client, fmt } = adminCtx(args);
|
|
33308
|
+
const res = await client.put(`/api/admin/orgs/${enc(tenantId)}/registry-enforcement`, { templateIds, reason });
|
|
33309
|
+
ensureOk(res.status, res.data, "set the enforcement setting");
|
|
33310
|
+
return output(res.data, fmt);
|
|
33311
|
+
}
|
|
33312
|
+
}),
|
|
33313
|
+
history: defineCommand({
|
|
33314
|
+
meta: { name: "history", description: "Every change to the tenant's list: who, when, why, before and after" },
|
|
33315
|
+
args: orgArgs,
|
|
33316
|
+
async run({ args }) {
|
|
33317
|
+
const { tenantId } = await resolveTenantId(args);
|
|
33318
|
+
const { client, fmt } = adminCtx(args);
|
|
33319
|
+
const res = await client.get(`/api/admin/orgs/${enc(tenantId)}/registry-enforcement/history`);
|
|
33320
|
+
ensureOk(res.status, res.data, "read the enforcement history");
|
|
33321
|
+
return output(res.data, fmt);
|
|
33322
|
+
}
|
|
33323
|
+
})
|
|
33324
|
+
}
|
|
33325
|
+
}),
|
|
33232
33326
|
bootstrap: defineCommand({
|
|
33233
33327
|
meta: {
|
|
33234
33328
|
name: "bootstrap",
|