@m8t-stack/cli 0.2.85 → 0.2.86
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/dist/cli.js +39 -14
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1462,7 +1462,7 @@ var init_enable_hosted_brain = __esm({
|
|
|
1462
1462
|
import { Builtins, Cli } from "clipanion";
|
|
1463
1463
|
|
|
1464
1464
|
// src/lib/package-version.ts
|
|
1465
|
-
var CLI_VERSION = "0.2.
|
|
1465
|
+
var CLI_VERSION = "0.2.86";
|
|
1466
1466
|
|
|
1467
1467
|
// src/lib/render-error.ts
|
|
1468
1468
|
init_errors();
|
|
@@ -22043,6 +22043,13 @@ async function buildConvergeDeps(args) {
|
|
|
22043
22043
|
const target = infraTargetSha(ctx.manifest, args.tree);
|
|
22044
22044
|
const infraTable = await openInfraParamsTable({ credential: args.credential, subscriptionId: args.subscriptionId, resourceGroup: args.resourceGroup });
|
|
22045
22045
|
const stamped = (await readInfraParams(infraTable))?.bicep;
|
|
22046
|
+
if (!stamped) {
|
|
22047
|
+
throw new LocalCliError({
|
|
22048
|
+
code: "PLATFORM_INFRA_PARAMS_MISSING",
|
|
22049
|
+
message: "This install has no stamped system/infra-params row, so the updater cannot converge infra: the row is the only place the real tenantId/clientId/Foundry endpoint survive, and they cannot be reconstructed from scratch.",
|
|
22050
|
+
hint: "Run `m8t platform enable-auto-update` against this deployment (it captures the full bicep parameter set), then let the next tick retry."
|
|
22051
|
+
});
|
|
22052
|
+
}
|
|
22046
22053
|
args.onProgress?.("subscription-scoped modules skipped: updater is RG-scoped; sub-level changes require a founder-run CLI converge.");
|
|
22047
22054
|
const gatewayName = args.suffix ? `m8t-gateway-${args.suffix}` : void 0;
|
|
22048
22055
|
const voiceInternalSecret = gatewayName ? await readLiveVoiceInternalSecret({
|
|
@@ -22058,17 +22065,18 @@ async function buildConvergeDeps(args) {
|
|
|
22058
22065
|
const opts = {
|
|
22059
22066
|
suffix: args.suffix,
|
|
22060
22067
|
assignSubscriptionRoles: false,
|
|
22061
|
-
|
|
22062
|
-
|
|
22063
|
-
|
|
22064
|
-
|
|
22065
|
-
|
|
22066
|
-
|
|
22067
|
-
|
|
22068
|
-
|
|
22069
|
-
|
|
22070
|
-
|
|
22071
|
-
} : {},
|
|
22068
|
+
// Unconditional: the guard above has already refused an absent row. The
|
|
22069
|
+
// ternary that used to be here read as "these are optional" — which is
|
|
22070
|
+
// how the empty-endpoint death got written in the first place.
|
|
22071
|
+
tenantId: stamped.tenantId,
|
|
22072
|
+
clientId: stamped.clientId,
|
|
22073
|
+
foundryEndpoint: stamped.foundryProjectEndpoint,
|
|
22074
|
+
foundryResourceId: stamped.foundryResourceId,
|
|
22075
|
+
acrPullIdentity: stamped.acrPullIdentityResourceId,
|
|
22076
|
+
acrResourceId: stamped.acrResourceId,
|
|
22077
|
+
...stamped.foundryTracingMode ? { foundryTracingMode: stamped.foundryTracingMode } : {},
|
|
22078
|
+
...stamped.channelUrl ? { channelUrl: stamped.channelUrl } : {},
|
|
22079
|
+
...stamped.location ? { location: stamped.location } : {},
|
|
22072
22080
|
...voiceInternalSecret ? { voiceInternalSecret } : {}
|
|
22073
22081
|
};
|
|
22074
22082
|
return applyInfraDeploy(a, ctx, target, opts);
|
|
@@ -22619,7 +22627,21 @@ async function rollbackOrHold(args, notify, error) {
|
|
|
22619
22627
|
return "held";
|
|
22620
22628
|
}
|
|
22621
22629
|
if (rollbackTarget) {
|
|
22622
|
-
|
|
22630
|
+
try {
|
|
22631
|
+
await reconvergeToPrevious(args, rollbackTarget);
|
|
22632
|
+
} catch (e) {
|
|
22633
|
+
const clip = (s) => s.length > 4e3 ? `${s.slice(0, 4e3)} \u2026[truncated]` : s;
|
|
22634
|
+
const combined = `${clip(error)} \u2014 and the rollback to ${rollbackTarget} failed: ${clip(e.message)} \u2014 the rollback may have partially applied; check the installed stamp's components before retrying.`;
|
|
22635
|
+
await patchApplyRequest(args.client, (r) => ({
|
|
22636
|
+
...r,
|
|
22637
|
+
status: "held",
|
|
22638
|
+
breaker: "held",
|
|
22639
|
+
result: { appliedVersion: r.result?.appliedVersion ?? null, error: combined },
|
|
22640
|
+
updatedAt: args.now().toISOString()
|
|
22641
|
+
}));
|
|
22642
|
+
await notify({ outcome: "held", target, error: combined });
|
|
22643
|
+
return "held";
|
|
22644
|
+
}
|
|
22623
22645
|
}
|
|
22624
22646
|
await patchApplyRequest(args.client, (r) => ({
|
|
22625
22647
|
...r,
|
|
@@ -22860,6 +22882,9 @@ var PlatformConvergeCommand = class extends M8tCommand {
|
|
|
22860
22882
|
channelUrl: ctx.channelUrl,
|
|
22861
22883
|
repoRoot,
|
|
22862
22884
|
now: () => /* @__PURE__ */ new Date()
|
|
22885
|
+
}).catch(async (e) => {
|
|
22886
|
+
await failIfStillInFlight(client, now, e.message);
|
|
22887
|
+
throw e;
|
|
22863
22888
|
});
|
|
22864
22889
|
log(`converge outcome: ${outcome}.`);
|
|
22865
22890
|
return outcome === "success" ? 0 : 1;
|
|
@@ -30827,7 +30852,7 @@ ${colors.error("\u2717")} The GitHub App on disk is installed on ${colors.field(
|
|
|
30827
30852
|
// src/commands/bootstrap/launch.ts
|
|
30828
30853
|
var DEFAULT_RG = "rg-m8t-stack";
|
|
30829
30854
|
var DEFAULT_INSTALLER = "ghcr.io/m8t-labs/m8t-installer";
|
|
30830
|
-
var DEFAULT_INSTALLER_TAG = "v0.1.
|
|
30855
|
+
var DEFAULT_INSTALLER_TAG = "v0.1.63";
|
|
30831
30856
|
var ACI_NAME = "m8t-installer";
|
|
30832
30857
|
var MI_NAME = "m8t-installer-mi";
|
|
30833
30858
|
var BootstrapLaunchCommand = class extends M8tCommand {
|