@intentius/chant 0.124.71 → 0.124.73
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/ci-commit.d.ts +41 -1
- package/dist/ci-commit.d.ts.map +1 -1
- package/dist/ci-commit.js +54 -8
- package/dist/ci-estate/delivery.d.ts +75 -2
- package/dist/ci-estate/delivery.d.ts.map +1 -1
- package/dist/ci-estate/delivery.js +129 -0
- package/dist/ci-estate.d.ts +3 -1
- package/dist/ci-estate.d.ts.map +1 -1
- package/dist/ci-estate.js +3 -1
- package/dist/ci-product.d.ts +1 -1
- package/dist/ci-product.d.ts.map +1 -1
- package/dist/ci-product.js +1 -1
- package/dist/cli/handlers/commit.d.ts.map +1 -1
- package/dist/cli/handlers/commit.js +5 -2
- package/dist/cli/handlers/notify-relay.d.ts.map +1 -1
- package/dist/cli/handlers/notify-relay.js +22 -2
- package/dist/config.d.ts +14 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +7 -0
- package/dist/lexicon.d.ts +17 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/publish-forge.d.ts.map +1 -1
- package/dist/lifecycle/publish-forge.js +1 -2
- package/dist/lifecycle/release-images.d.ts.map +1 -1
- package/dist/lifecycle/release-images.js +1 -2
- package/dist/notify-relay.d.ts +41 -1
- package/dist/notify-relay.d.ts.map +1 -1
- package/dist/notify-relay.js +39 -0
- package/dist/notify.d.ts +16 -3
- package/dist/notify.d.ts.map +1 -1
- package/dist/notify.js +16 -10
- package/dist/op/activities/activity-contracts.d.ts +4 -4
- package/dist/release-floors.d.ts +1 -1
- package/dist/release-floors.js +1 -1
- package/dist/wave-runtime.mjs +237 -237
- package/dist/workspace/release-workflow.d.ts +24 -0
- package/dist/workspace/release-workflow.d.ts.map +1 -1
- package/dist/workspace/release-workflow.js +61 -8
- package/package.json +1 -1
- package/src/ci-commit.test.ts +22 -1
- package/src/ci-commit.ts +79 -8
- package/src/ci-estate/__fixtures__/terragucci-dora.json +1305 -0
- package/src/ci-estate/delivery.ts +186 -2
- package/src/ci-estate/records-delivery.test.ts +55 -0
- package/src/ci-estate.ts +9 -0
- package/src/ci-product.ts +1 -0
- package/src/cli/handlers/commit.ts +4 -1
- package/src/cli/handlers/notify-relay.ts +21 -2
- package/src/config.ts +7 -0
- package/src/lexicon.ts +16 -0
- package/src/lifecycle/publish-forge.ts +1 -2
- package/src/lifecycle/release-images.ts +1 -2
- package/src/notify-relay.test.ts +55 -1
- package/src/notify-relay.ts +48 -1
- package/src/notify.ts +25 -12
- package/src/release-floors.ts +1 -1
- package/src/workspace/release-workflow.test.ts +49 -1
- package/src/workspace/release-workflow.ts +91 -7
package/dist/notify.js
CHANGED
|
@@ -209,18 +209,24 @@ export function slackMessage(e, relay) {
|
|
|
209
209
|
const text = lines.join("\n");
|
|
210
210
|
if (!relay)
|
|
211
211
|
return { text };
|
|
212
|
+
return { text, blocks: [{ type: "section", text: { type: "mrkdwn", text } }, slackRelayActions(relay)] };
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* The Slack actions block with the relay's Approve and Decline buttons
|
|
216
|
+
* (#4611), for a product that renders its own Slack message: its clicks reach
|
|
217
|
+
* `chant notify relay` like those on chant's own message.
|
|
218
|
+
*/
|
|
219
|
+
export function slackRelayActions(relay) {
|
|
212
220
|
const button = (label, action, style) => ({ type: "button", text: { type: "plain_text", text: label }, action_id: action, value: relay.token, ...(style ? { style } : {}) });
|
|
213
|
-
return {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
],
|
|
219
|
-
};
|
|
221
|
+
return { type: "actions", elements: [button("Approve", RELAY_APPROVE_ACTION, "primary"), button("Decline", RELAY_DECLINE_ACTION)] };
|
|
222
|
+
}
|
|
223
|
+
/** The Teams reply that approves through the relay's outgoing webhook (#4611): `approve <token>`, after a mention of the relay. */
|
|
224
|
+
export function teamsRelayReply(relay, action = "approve") {
|
|
225
|
+
return `${action} ${relay.token}`;
|
|
220
226
|
}
|
|
221
227
|
/** A Teams incoming webhook's body (a Workflows webhook): one Adaptive Card, with buttons that open the review page and the run. With `relay`, the reply that approves through the relay (#4611). */
|
|
222
228
|
export function teamsMessage(e, relay) {
|
|
223
|
-
const all = [...facts(e), ...(relay ? [{ title: "Approve in chat", value: `mention the relay and reply:
|
|
229
|
+
const all = [...facts(e), ...(relay ? [{ title: "Approve in chat", value: `mention the relay and reply: ${teamsRelayReply(relay)}` }] : [])];
|
|
224
230
|
const actions = [
|
|
225
231
|
...(e.approve?.review ? [{ type: "Action.OpenUrl", title: "Review and approve", url: e.approve.review.url }] : []),
|
|
226
232
|
...(e.run?.url ? [{ type: "Action.OpenUrl", title: "Open the run", url: e.run.url }] : []),
|
|
@@ -382,8 +388,8 @@ export async function sendNotify(config, event, options = {}) {
|
|
|
382
388
|
log(`notify: ${config.relay} is not set, so the message carries no relay buttons`);
|
|
383
389
|
const buttons = ref && relayKey ? { token: relayToken(relayKey, ref) } : undefined;
|
|
384
390
|
if (config.slack)
|
|
385
|
-
await deliver("slack", config.slack, () => json(options.render?.slack ? options.render.slack(event) : slackMessage(event, buttons)));
|
|
391
|
+
await deliver("slack", config.slack, () => json(options.render?.slack ? options.render.slack(event, buttons) : slackMessage(event, buttons)));
|
|
386
392
|
if (config.teams)
|
|
387
|
-
await deliver("teams", config.teams, () => json(options.render?.teams ? options.render.teams(event) : teamsMessage(event, buttons)));
|
|
393
|
+
await deliver("teams", config.teams, () => json(options.render?.teams ? options.render.teams(event, buttons) : teamsMessage(event, buttons)));
|
|
388
394
|
return out;
|
|
389
395
|
}
|
|
@@ -357,11 +357,11 @@ export declare const decideContract: import("../index.js").ActivityContract<{
|
|
|
357
357
|
backends?: Record<string, {
|
|
358
358
|
url: string;
|
|
359
359
|
key?: {
|
|
360
|
+
env: string;
|
|
361
|
+
} | {
|
|
360
362
|
capability: string;
|
|
361
363
|
member?: string | undefined;
|
|
362
364
|
env?: string | undefined;
|
|
363
|
-
} | {
|
|
364
|
-
env: string;
|
|
365
365
|
} | undefined;
|
|
366
366
|
timeoutMs?: number | undefined;
|
|
367
367
|
}> | undefined;
|
|
@@ -450,11 +450,11 @@ export declare const factoryAskContract: import("../index.js").ActivityContract<
|
|
|
450
450
|
backends?: Record<string, {
|
|
451
451
|
url: string;
|
|
452
452
|
key?: {
|
|
453
|
+
env: string;
|
|
454
|
+
} | {
|
|
453
455
|
capability: string;
|
|
454
456
|
member?: string | undefined;
|
|
455
457
|
env?: string | undefined;
|
|
456
|
-
} | {
|
|
457
|
-
env: string;
|
|
458
458
|
} | undefined;
|
|
459
459
|
timeoutMs?: number | undefined;
|
|
460
460
|
}> | undefined;
|
package/dist/release-floors.d.ts
CHANGED
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
* this constant to the next patch (#4501). The check fails while a floor
|
|
20
20
|
* still names this constant after its version shipped.
|
|
21
21
|
*/
|
|
22
|
-
export declare const NEXT_RELEASE = "0.124.
|
|
22
|
+
export declare const NEXT_RELEASE = "0.124.73";
|
|
23
23
|
//# sourceMappingURL=release-floors.d.ts.map
|
package/dist/release-floors.js
CHANGED