openmates 0.17.0-alpha.6 → 0.17.0-alpha.7
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/{chunk-AN3XZFIH.js → chunk-SGX23ATJ.js} +18 -4
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -26469,7 +26469,9 @@ function buildOperationalDeliveryReceipt(input) {
|
|
|
26469
26469
|
state: input.state,
|
|
26470
26470
|
attemptCount: input.attemptCount,
|
|
26471
26471
|
occurredAt: input.occurredAt,
|
|
26472
|
-
...input.sanitizedFailureClass ? { sanitizedFailureClass: input.sanitizedFailureClass } : {}
|
|
26472
|
+
...input.sanitizedFailureClass ? { sanitizedFailureClass: input.sanitizedFailureClass } : {},
|
|
26473
|
+
...input.destinationSource ? { destinationSource: input.destinationSource } : {},
|
|
26474
|
+
...input.fallbackUsed !== void 0 ? { fallbackUsed: input.fallbackUsed } : {}
|
|
26473
26475
|
};
|
|
26474
26476
|
}
|
|
26475
26477
|
async function probeRuntimeEmailService(config) {
|
|
@@ -28772,10 +28774,14 @@ function runtimeNotificationConfig(installPath) {
|
|
|
28772
28774
|
const webhookSecret = value("OPENMATES_RUNTIME_HEALTH_WEBHOOK_SECRET");
|
|
28773
28775
|
const allowLocalDevelopmentFixture = value("SERVER_ENVIRONMENT") === "development" && value("OPENMATES_RUNTIME_HEALTH_ALLOW_LOCAL_WEBHOOK_FIXTURE") === "true";
|
|
28774
28776
|
const genericWebhook = webhookUrl && webhookSecret ? { url: webhookUrl, secret: webhookSecret, allowLocalDevelopmentFixture } : void 0;
|
|
28775
|
-
const
|
|
28777
|
+
const canonicalDiscordWebhookUrl = deploymentMode === "self_host" ? value("DISCORD_WEBHOOK_OPERATIONAL_MONITORING_SELF_HOST") || value("OPENMATES_RUNTIME_HEALTH_DISCORD_WEBHOOK_URL_SELF_HOST") || value("OPENMATES_RUNTIME_HEALTH_DISCORD_WEBHOOK_URL") : serverEnvironment === "production" ? value("OPENMATES_RUNTIME_HEALTH_DISCORD_WEBHOOK_URL_PRODUCTION") || value("DISCORD_WEBHOOK_OPERATIONAL_MONITORING_PRODUCTION") : value("OPENMATES_RUNTIME_HEALTH_DISCORD_WEBHOOK_URL_DEVELOPMENT") || value("DISCORD_WEBHOOK_OPERATIONAL_MONITORING_DEVELOPMENT");
|
|
28778
|
+
const fallbackDiscordWebhookUrl = deploymentMode === "self_host" ? void 0 : serverEnvironment === "production" ? value("DISCORD_WEBHOOK_PROD_SMOKE") : value("DISCORD_WEBHOOK_DEV_NIGHTLY") || value("DISCORD_WEBHOOK_DEV_SMOKE");
|
|
28779
|
+
const discordWebhookUrl = canonicalDiscordWebhookUrl || fallbackDiscordWebhookUrl;
|
|
28776
28780
|
return {
|
|
28777
28781
|
email,
|
|
28778
28782
|
discordWebhookUrl,
|
|
28783
|
+
discordDestinationSource: canonicalDiscordWebhookUrl ? "canonical" : fallbackDiscordWebhookUrl ? serverEnvironment === "production" ? "prod_smoke_fallback" : "dev_fallback" : "missing",
|
|
28784
|
+
discordFallbackUsed: !canonicalDiscordWebhookUrl && Boolean(fallbackDiscordWebhookUrl),
|
|
28779
28785
|
genericWebhook
|
|
28780
28786
|
};
|
|
28781
28787
|
}
|
|
@@ -29324,7 +29330,9 @@ async function serverMonitoring(rest, flags) {
|
|
|
29324
29330
|
state: receipt.state,
|
|
29325
29331
|
attemptCount: receipt.attempt_count,
|
|
29326
29332
|
occurredAt: receipt.occurred_at,
|
|
29327
|
-
sanitizedFailureClass: receipt.sanitized_failure_class
|
|
29333
|
+
sanitizedFailureClass: receipt.sanitized_failure_class,
|
|
29334
|
+
destinationSource: receipt.destination_source,
|
|
29335
|
+
fallbackUsed: receipt.fallback_used
|
|
29328
29336
|
}));
|
|
29329
29337
|
const receiptDir = join6(installPath, ".openmates", "runtime-health", "receipts");
|
|
29330
29338
|
mkdirSync5(receiptDir, { recursive: true, mode: 448 });
|
|
@@ -29419,7 +29427,13 @@ async function serverNotifications(rest, flags) {
|
|
|
29419
29427
|
checkIds: ["monitor"],
|
|
29420
29428
|
sanitizedReason: "operator_requested_delivery_test"
|
|
29421
29429
|
});
|
|
29422
|
-
const output = {
|
|
29430
|
+
const output = {
|
|
29431
|
+
command: "notifications test",
|
|
29432
|
+
role,
|
|
29433
|
+
configured: deliveries.length > 0,
|
|
29434
|
+
discordDestination: channel === "discord" || channel === "all" ? { source: notificationConfig.discordDestinationSource, fallbackUsed: notificationConfig.discordFallbackUsed } : void 0,
|
|
29435
|
+
deliveries
|
|
29436
|
+
};
|
|
29423
29437
|
if (flags.json === true) printJson(output);
|
|
29424
29438
|
else console.log(JSON.stringify(output, null, 2));
|
|
29425
29439
|
if (deliveries.some((delivery) => delivery.status === "exhausted")) throw new Error("One or more notification delivery tests failed.");
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED