@m8t-stack/cli 0.2.47 → 0.2.48
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 +27 -7
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1329,7 +1329,7 @@ var init_enable_hosted_brain = __esm({
|
|
|
1329
1329
|
import { Builtins, Cli } from "clipanion";
|
|
1330
1330
|
|
|
1331
1331
|
// src/lib/package-version.ts
|
|
1332
|
-
var CLI_VERSION = "0.2.
|
|
1332
|
+
var CLI_VERSION = "0.2.48";
|
|
1333
1333
|
|
|
1334
1334
|
// src/lib/render-error.ts
|
|
1335
1335
|
init_errors();
|
|
@@ -22437,6 +22437,17 @@ async function ensureGatewayRedirectUri(gatewayClientId, fqdn) {
|
|
|
22437
22437
|
}
|
|
22438
22438
|
await patchRedirectUris(appObjectId, fqdn);
|
|
22439
22439
|
}
|
|
22440
|
+
async function resolveAppObjectIdForWrite(opts) {
|
|
22441
|
+
if (opts.appObjectId) return opts.appObjectId;
|
|
22442
|
+
if (!opts.clientId) return null;
|
|
22443
|
+
try {
|
|
22444
|
+
return await azJson(
|
|
22445
|
+
["ad", "app", "show", "--id", opts.clientId, "--query", "id", "--output", "json"]
|
|
22446
|
+
) ?? null;
|
|
22447
|
+
} catch {
|
|
22448
|
+
return null;
|
|
22449
|
+
}
|
|
22450
|
+
}
|
|
22440
22451
|
async function patchRedirectUris(appObjectId, fqdn) {
|
|
22441
22452
|
const targetUri = `https://${fqdn}`;
|
|
22442
22453
|
const existing = await azJson(
|
|
@@ -22800,9 +22811,6 @@ var DeployCommand = class extends M8tCommand {
|
|
|
22800
22811
|
}
|
|
22801
22812
|
log(this.clientId ? `using existing app reg ${this.clientId}` : "ensuring Entra app reg\u2026");
|
|
22802
22813
|
const app = await ensureAppReg({ tenantId: account.tenantId, clientId: this.clientId });
|
|
22803
|
-
if (app.appObjectId === null && this.clientId) {
|
|
22804
|
-
log(colors.dim(" (BYO app reg \u2014 skipping Graph writes; ensure it has http://localhost:3000 + the deployed FQDN as SPA redirect URIs and Expose-an-API)"));
|
|
22805
|
-
}
|
|
22806
22814
|
await writeFoundryConfig({ tenantId: app.tenantId, clientId: app.clientId, projectEndpoint: foundryEndpoint });
|
|
22807
22815
|
log(`ensuring resource group ${this.resourceGroup}\u2026`);
|
|
22808
22816
|
await ensureResourceGroup(this.resourceGroup, this.location);
|
|
@@ -22848,8 +22856,16 @@ var DeployCommand = class extends M8tCommand {
|
|
|
22848
22856
|
params,
|
|
22849
22857
|
deploymentName: `m8t-deploy-${account.subscriptionId.slice(0, 8)}`
|
|
22850
22858
|
});
|
|
22851
|
-
|
|
22852
|
-
|
|
22859
|
+
const writableAppObjectId = await resolveAppObjectIdForWrite({
|
|
22860
|
+
appObjectId: app.appObjectId,
|
|
22861
|
+
clientId: this.clientId
|
|
22862
|
+
});
|
|
22863
|
+
if (writableAppObjectId) {
|
|
22864
|
+
await patchRedirectUris(writableAppObjectId, outputs.containerAppFqdn);
|
|
22865
|
+
} else {
|
|
22866
|
+
log(colors.dim(
|
|
22867
|
+
` (could not register the sign-in redirect URI automatically \u2014 add https://${outputs.containerAppFqdn} as an SPA redirect URI on app registration ${app.clientId}, or sign-in will fail with AADSTS50011)`
|
|
22868
|
+
));
|
|
22853
22869
|
}
|
|
22854
22870
|
const webappUrl = `https://${outputs.containerAppFqdn}`;
|
|
22855
22871
|
if (mode === "json") {
|
|
@@ -27232,8 +27248,12 @@ var EVENT_TIERS = {
|
|
|
27232
27248
|
};
|
|
27233
27249
|
var EVENT_ENUM = Object.keys(EVENT_TIERS);
|
|
27234
27250
|
|
|
27251
|
+
// ../../packages/telemetry-contract/artifact/cadence.ts
|
|
27252
|
+
var HEARTBEAT_CADENCE_MS = 3 * 60 * 60 * 1e3;
|
|
27253
|
+
var HEARTBEAT_CADENCE_HOURS = HEARTBEAT_CADENCE_MS / (60 * 60 * 1e3);
|
|
27254
|
+
|
|
27235
27255
|
// ../../packages/telemetry-contract/src/disclosure.ts
|
|
27236
|
-
var DISCLOSURE_TIER1 = "Operational data. To support your installation, m8t receives limited operational data linked to it \u2014 installation and update events, installed versions, and service health signals. Your installation is identified only by a random installation ID we generate at setup \u2014 an opaque value with no information encoded in it. No name, email, company, or subscription information is sent in the enrollment record unless you explicitly choose to share contact details for support. At enrollment, we also verify a cloud identity token to confirm the request comes from a real cloud account; that token names the account making the request, and is otherwise discarded immediately and never stored. This is service data used only to operate and support the platform; it contains none of your content. Details: TELEMETRY.md.";
|
|
27256
|
+
var DISCLOSURE_TIER1 = "Operational data. To support your installation, m8t receives limited operational data linked to it \u2014 installation and update events, installed versions, and service health signals. Your installation is identified only by a random installation ID we generate at setup \u2014 an opaque value with no information encoded in it. No name, email, company, or subscription information is sent in the enrollment record unless you explicitly choose to share contact details for support. At enrollment, we also verify a cloud identity token to confirm the request comes from a real cloud account; that token names the account making the request, and is otherwise discarded immediately and never stored. This is service data used only to operate and support the platform; it contains none of your content. After setup, you can turn this off in the web app's Settings, under Privacy; update checks keep working. Details: TELEMETRY.md.";
|
|
27237
27257
|
|
|
27238
27258
|
// ../../packages/telemetry-contract/src/endpoints.ts
|
|
27239
27259
|
var INGEST_BASE_URL = (process.env.M8T_INGEST_BASE_URL ?? "").trim() || "https://m8t-admin.wonderfuldesert-721e332f.eastus2.azurecontainerapps.io";
|