@storyshelf/notify-chat 0.6.2 → 0.7.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/README.md +14 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/log.d.mts +3 -3
- package/dist/log.mjs +1 -1
- package/dist/log.mjs.map +1 -1
- package/dist/slack.d.mts +3 -3
- package/dist/slack.mjs +1 -1
- package/dist/slack.mjs.map +1 -1
- package/dist/teams.d.mts +3 -3
- package/dist/teams.mjs +1 -1
- package/dist/teams.mjs.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ nub add @storyshelf/notify-chat
|
|
|
14
14
|
import { createShelfApp } from "@storyshelf/app";
|
|
15
15
|
import { chatNotifiers } from "@storyshelf/notify-chat";
|
|
16
16
|
|
|
17
|
-
const app = createShelfApp({ database, storage, notifiers: chatNotifiers });
|
|
17
|
+
const app = createShelfApp({ database, storage, notifications: { notifiers: chatNotifiers } });
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
## Subpaths
|
|
@@ -27,4 +27,16 @@ import { teamsWorkflowNotifier } from "@storyshelf/notify-chat/teams";
|
|
|
27
27
|
import { logNotifier } from "@storyshelf/notify-chat/log";
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
## Providers
|
|
31
|
+
|
|
32
|
+
| Provider kind | Posts to | Use for |
|
|
33
|
+
| ---------------- | ------------------------------ | ----------------------------------------- |
|
|
34
|
+
| `slack-webhook` | A Slack incoming webhook URL | Build and admin alerts in a Slack channel |
|
|
35
|
+
| `teams-workflow` | A Teams workflow (webhook) URL | The same, in Microsoft Teams |
|
|
36
|
+
| `log` | The server log | Tests and local development |
|
|
37
|
+
|
|
38
|
+
## Channels
|
|
39
|
+
|
|
40
|
+
Providers only make a kind _available_. Project admins then add **channels** of that kind — in **Settings → Notifications** or via the API — each with an event filter and display toggles. A webhook URL is a channel secret: it is encrypted at rest (AES-256-GCM) and decrypted in memory only when a message is sent.
|
|
41
|
+
|
|
42
|
+
See [Notifications](https://storyshelf.js.org/guides/notifications/) for channels, subscriptions, and the events you can subscribe to.
|
package/dist/index.d.mts
CHANGED
|
@@ -5,8 +5,8 @@ import { ChatToggles, chatTogglesSchema } from "./types.mjs";
|
|
|
5
5
|
import { slackWebhookConfigSchema, slackWebhookNotifier } from "./slack.mjs";
|
|
6
6
|
import { teamsWorkflowConfigSchema, teamsWorkflowNotifier } from "./teams.mjs";
|
|
7
7
|
//#region src/index.d.ts
|
|
8
|
-
/** All chat providers in one list for `ShelfOptions.notifiers`. */
|
|
9
|
-
declare const chatNotifiers: import("@storyshelf/core/adapter/notifier").
|
|
8
|
+
/** All chat providers in one list for `ShelfOptions.notifications.notifiers`. */
|
|
9
|
+
declare const chatNotifiers: import("@storyshelf/core/adapter/notifier").MessageNotifierProvider[];
|
|
10
10
|
//#endregion
|
|
11
11
|
export { type ChatToggles, chatNotifiers, chatTogglesSchema, logConfigSchema, logNotifier, slackWebhookConfigSchema, slackWebhookNotifier, teamsWorkflowConfigSchema, teamsWorkflowNotifier };
|
|
12
12
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { teamsWorkflowConfigSchema, teamsWorkflowNotifier } from "./teams.mjs";
|
|
|
10
10
|
* Chat notification providers: formatted build and admin alerts over
|
|
11
11
|
* Slack and Teams incoming webhooks (plus a log provider for tests/dev).
|
|
12
12
|
*/
|
|
13
|
-
/** All chat providers in one list for `ShelfOptions.notifiers`. */
|
|
13
|
+
/** All chat providers in one list for `ShelfOptions.notifications.notifiers`. */
|
|
14
14
|
const chatNotifiers = [
|
|
15
15
|
slackWebhookNotifier,
|
|
16
16
|
teamsWorkflowNotifier,
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * Chat notification providers: formatted build and admin alerts over\n * Slack and Teams incoming webhooks (plus a log provider for tests/dev).\n */\nimport { logNotifier } from \"./log.ts\";\nimport { slackWebhookNotifier } from \"./slack.ts\";\nimport { teamsWorkflowNotifier } from \"./teams.ts\";\n\n/** Slack incoming-webhook provider (`slack-webhook`). */\nexport { slackWebhookNotifier };\n/** Teams workflow-webhook provider (`teams-workflow`). */\nexport { teamsWorkflowNotifier };\n/** Log-only provider for tests, dev, and unconfigured servers (`log`). */\nexport { logNotifier };\n\n/** All chat providers in one list for `ShelfOptions.notifiers`. */\nexport const chatNotifiers = [slackWebhookNotifier, teamsWorkflowNotifier, logNotifier];\n\nexport type { ChatToggles } from \"./types.ts\";\nexport { chatTogglesSchema } from \"./types.ts\";\nexport { logConfigSchema } from \"./log.ts\";\nexport { slackWebhookConfigSchema } from \"./slack.ts\";\nexport { teamsWorkflowConfigSchema } from \"./teams.ts\";\n"],"mappings":";;;;;;;;;;;;;AAgBA,MAAa,gBAAgB;CAAC;CAAsB;CAAuB;AAAW"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * Chat notification providers: formatted build and admin alerts over\n * Slack and Teams incoming webhooks (plus a log provider for tests/dev).\n */\nimport { logNotifier } from \"./log.ts\";\nimport { slackWebhookNotifier } from \"./slack.ts\";\nimport { teamsWorkflowNotifier } from \"./teams.ts\";\n\n/** Slack incoming-webhook provider (`slack-webhook`). */\nexport { slackWebhookNotifier };\n/** Teams workflow-webhook provider (`teams-workflow`). */\nexport { teamsWorkflowNotifier };\n/** Log-only provider for tests, dev, and unconfigured servers (`log`). */\nexport { logNotifier };\n\n/** All chat providers in one list for `ShelfOptions.notifications.notifiers`. */\nexport const chatNotifiers = [slackWebhookNotifier, teamsWorkflowNotifier, logNotifier];\n\nexport type { ChatToggles } from \"./types.ts\";\nexport { chatTogglesSchema } from \"./types.ts\";\nexport { logConfigSchema } from \"./log.ts\";\nexport { slackWebhookConfigSchema } from \"./slack.ts\";\nexport { teamsWorkflowConfigSchema } from \"./teams.ts\";\n"],"mappings":";;;;;;;;;;;;;AAgBA,MAAa,gBAAgB;CAAC;CAAsB;CAAuB;AAAW"}
|
package/dist/log.d.mts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import {
|
|
4
|
+
import { MessageNotifierProvider } from "@storyshelf/core/adapter/notifier";
|
|
5
5
|
//#region src/log.d.ts
|
|
6
6
|
/** Validation schema for the log provider config (accepts anything). */
|
|
7
7
|
declare const logConfigSchema: z.ZodObject<{}, z.core.$loose>;
|
|
8
8
|
/** Log-only chat provider for tests, dev, and unconfigured servers. */
|
|
9
|
-
declare const logNotifier:
|
|
9
|
+
declare const logNotifier: MessageNotifierProvider;
|
|
10
10
|
/** Describe the log provider (name, version, config schema). */
|
|
11
|
-
declare function getMetadata():
|
|
11
|
+
declare function getMetadata(): MessageNotifierProvider["metadata"];
|
|
12
12
|
//#endregion
|
|
13
13
|
export { getMetadata, logConfigSchema, logNotifier };
|
|
14
14
|
//# sourceMappingURL=log.d.mts.map
|
package/dist/log.mjs
CHANGED
|
@@ -26,7 +26,7 @@ const logNotifier = {
|
|
|
26
26
|
function getMetadata() {
|
|
27
27
|
return {
|
|
28
28
|
name: "Log",
|
|
29
|
-
version:
|
|
29
|
+
version: "0.7.0",
|
|
30
30
|
description: "Chat notifications to the server log (tests and dev)",
|
|
31
31
|
kind: "log",
|
|
32
32
|
category: "notifier",
|
package/dist/log.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.mjs","names":[],"sources":["../src/log.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"log.mjs","names":[],"sources":["../src/log.ts"],"sourcesContent":["import type {\n MessageNotifierAdapter,\n MessageNotifierProvider,\n} from \"@storyshelf/core/adapter/notifier\";\nimport type { Logger } from \"@storyshelf/core/logger\";\nimport { z } from \"zod\";\n\ndeclare const __PKG_VERSION__: string | undefined;\n\n/** Validation schema for the log provider config (accepts anything). */\nexport const logConfigSchema = z.object({}).loose();\n\n/** Log-only chat provider for tests, dev, and unconfigured servers. */\nexport const logNotifier: MessageNotifierProvider = {\n metadata: getMetadata(),\n create(opts: { config: unknown; secret?: string; logger?: Logger }): MessageNotifierAdapter {\n logConfigSchema.parse(opts.config);\n const logger = opts.logger?.child({ component: \"notify-chat-log\" }) ?? opts.logger;\n return {\n metadata: getMetadata(),\n // oxlint-disable-next-line eslint/require-await -- send is async by contract\n async send(input): Promise<void> {\n logger?.info(\n { channelId: input.channel.id, subject: input.formatted.subject },\n \"chat notification (log)\",\n );\n },\n };\n },\n};\n\n/** Describe the log provider (name, version, config schema). */\nexport function getMetadata(): MessageNotifierProvider[\"metadata\"] {\n return {\n name: \"Log\",\n version: typeof __PKG_VERSION__ === \"string\" ? __PKG_VERSION__ : \"0.0.0\",\n description: \"Chat notifications to the server log (tests and dev)\",\n kind: \"log\",\n category: \"notifier\",\n schema: logConfigSchema,\n };\n}\n"],"mappings":";;;;;;AAUA,MAAa,kBAAkB,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM;;AAGlD,MAAa,cAAuC;CAClD,UAAU,YAAY;CACtB,OAAO,MAAqF;EAC1F,gBAAgB,MAAM,KAAK,MAAM;EACjC,MAAM,SAAS,KAAK,QAAQ,MAAM,EAAE,WAAW,kBAAkB,CAAC,KAAK,KAAK;EAC5E,OAAO;GACL,UAAU,YAAY;GAEtB,MAAM,KAAK,OAAsB;IAC/B,QAAQ,KACN;KAAE,WAAW,MAAM,QAAQ;KAAI,SAAS,MAAM,UAAU;IAAQ,GAChE,yBACF;GACF;EACF;CACF;AACF;;AAGA,SAAgB,cAAmD;CACjE,OAAO;EACL,MAAM;EACN,SAAA;EACA,aAAa;EACb,MAAM;EACN,UAAU;EACV,QAAQ;CACV;AACF"}
|
package/dist/slack.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { ChatToggles } from "./types.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { MessageNotifierProvider } from "@storyshelf/core/adapter/notifier";
|
|
5
5
|
//#region src/slack.d.ts
|
|
6
6
|
/** Validation schema for the Slack incoming-webhook config. */
|
|
7
7
|
declare const slackWebhookConfigSchema: import("zod").ZodObject<{
|
|
@@ -16,9 +16,9 @@ declare const slackWebhookConfigSchema: import("zod").ZodObject<{
|
|
|
16
16
|
username: import("zod").ZodOptional<import("zod").ZodString>;
|
|
17
17
|
}, import("zod/v4/core").$strip>;
|
|
18
18
|
/** Slack incoming-webhook chat provider (Block Kit section + fallback text). */
|
|
19
|
-
declare const slackWebhookNotifier:
|
|
19
|
+
declare const slackWebhookNotifier: MessageNotifierProvider;
|
|
20
20
|
/** Describe the Slack provider (name, version, config schema). */
|
|
21
|
-
declare function getMetadata():
|
|
21
|
+
declare function getMetadata(): MessageNotifierProvider["metadata"];
|
|
22
22
|
//#endregion
|
|
23
23
|
export { type ChatToggles, getMetadata, slackWebhookConfigSchema, slackWebhookNotifier };
|
|
24
24
|
//# sourceMappingURL=slack.d.mts.map
|
package/dist/slack.mjs
CHANGED
|
@@ -21,7 +21,7 @@ const slackWebhookNotifier = {
|
|
|
21
21
|
function getMetadata() {
|
|
22
22
|
return {
|
|
23
23
|
name: "Slack",
|
|
24
|
-
version:
|
|
24
|
+
version: "0.7.0",
|
|
25
25
|
description: "Chat messages via Slack incoming webhooks",
|
|
26
26
|
kind: "slack-webhook",
|
|
27
27
|
category: "notifier",
|
package/dist/slack.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slack.mjs","names":[],"sources":["../src/slack.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"slack.mjs","names":[],"sources":["../src/slack.ts"],"sourcesContent":["import type {\n MessageNotifierAdapter,\n MessageNotifierProvider,\n} from \"@storyshelf/core/adapter/notifier\";\nimport type { Logger } from \"@storyshelf/core/logger\";\nimport { httpText } from \"@storyshelf/core/utils\";\nimport { chatTogglesSchema, type ChatToggles } from \"./types.ts\";\n\nexport type { ChatToggles };\n\ndeclare const __PKG_VERSION__: string | undefined;\n\n/** Validation schema for the Slack incoming-webhook config. */\nexport const slackWebhookConfigSchema = chatTogglesSchema;\n\n/** Slack incoming-webhook chat provider (Block Kit section + fallback text). */\nexport const slackWebhookNotifier: MessageNotifierProvider = {\n metadata: getMetadata(),\n create(opts: { config: unknown; secret?: string; logger?: Logger }): MessageNotifierAdapter {\n const config = slackWebhookConfigSchema.parse(opts.config);\n return createSlackAdapter({ config, webhookUrl: opts.secret, logger: opts.logger });\n },\n};\n\ninterface SlackAdapterOptions {\n config: ChatToggles;\n webhookUrl?: string;\n logger?: Logger;\n}\n\n/** Describe the Slack provider (name, version, config schema). */\nexport function getMetadata(): MessageNotifierProvider[\"metadata\"] {\n return {\n name: \"Slack\",\n version: typeof __PKG_VERSION__ === \"string\" ? __PKG_VERSION__ : \"0.0.0\",\n description: \"Chat messages via Slack incoming webhooks\",\n kind: \"slack-webhook\",\n category: \"notifier\",\n logo: \"slack\",\n schema: slackWebhookConfigSchema,\n };\n}\n\nfunction createSlackAdapter(options: SlackAdapterOptions): MessageNotifierAdapter {\n const logger = options.logger?.child({ component: \"notify-chat-slack\" });\n return {\n metadata: getMetadata(),\n async send(input): Promise<void> {\n const url = requireWebhookUrl(options.webhookUrl);\n const payload = {\n text: input.formatted.subject,\n username: options.config.username,\n blocks: [\n {\n type: \"section\",\n text: { type: \"mrkdwn\", text: input.formatted.markdown },\n },\n ],\n };\n logger?.debug({ channelId: input.channel.id }, \"posting slack message\");\n await httpText(url, { method: \"POST\", json: payload, logger });\n logger?.info({ channelId: input.channel.id }, \"slack message posted\");\n },\n };\n}\n\n/** Incoming-webhook URL arrives as the decrypted channel secret. */\nfunction requireWebhookUrl(secret: string | undefined): string {\n if (!secret) {\n throw new Error(\"Slack channel is missing its webhook URL secret\");\n }\n return secret;\n}\n"],"mappings":";;;;;;;AAaA,MAAa,2BAA2B;;AAGxC,MAAa,uBAAgD;CAC3D,UAAU,YAAY;CACtB,OAAO,MAAqF;EAE1F,OAAO,mBAAmB;GAAE,QADb,yBAAyB,MAAM,KAAK,MAClB;GAAG,YAAY,KAAK;GAAQ,QAAQ,KAAK;EAAO,CAAC;CACpF;AACF;;AASA,SAAgB,cAAmD;CACjE,OAAO;EACL,MAAM;EACN,SAAA;EACA,aAAa;EACb,MAAM;EACN,UAAU;EACV,MAAM;EACN,QAAQ;CACV;AACF;AAEA,SAAS,mBAAmB,SAAsD;CAChF,MAAM,SAAS,QAAQ,QAAQ,MAAM,EAAE,WAAW,oBAAoB,CAAC;CACvE,OAAO;EACL,UAAU,YAAY;EACtB,MAAM,KAAK,OAAsB;GAC/B,MAAM,MAAM,kBAAkB,QAAQ,UAAU;GAChD,MAAM,UAAU;IACd,MAAM,MAAM,UAAU;IACtB,UAAU,QAAQ,OAAO;IACzB,QAAQ,CACN;KACE,MAAM;KACN,MAAM;MAAE,MAAM;MAAU,MAAM,MAAM,UAAU;KAAS;IACzD,CACF;GACF;GACA,QAAQ,MAAM,EAAE,WAAW,MAAM,QAAQ,GAAG,GAAG,uBAAuB;GACtE,MAAM,SAAS,KAAK;IAAE,QAAQ;IAAQ,MAAM;IAAS;GAAO,CAAC;GAC7D,QAAQ,KAAK,EAAE,WAAW,MAAM,QAAQ,GAAG,GAAG,sBAAsB;EACtE;CACF;AACF;;AAGA,SAAS,kBAAkB,QAAoC;CAC7D,IAAI,CAAC,QACH,MAAM,IAAI,MAAM,iDAAiD;CAEnE,OAAO;AACT"}
|
package/dist/teams.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { ChatToggles } from "./types.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { MessageNotifierProvider } from "@storyshelf/core/adapter/notifier";
|
|
5
5
|
//#region src/teams.d.ts
|
|
6
6
|
/** Validation schema for the Teams workflow-webhook config. */
|
|
7
7
|
declare const teamsWorkflowConfigSchema: import("zod").ZodObject<{
|
|
@@ -16,9 +16,9 @@ declare const teamsWorkflowConfigSchema: import("zod").ZodObject<{
|
|
|
16
16
|
username: import("zod").ZodOptional<import("zod").ZodString>;
|
|
17
17
|
}, import("zod/v4/core").$strip>;
|
|
18
18
|
/** Teams workflow-webhook chat provider (Adaptive Card message). */
|
|
19
|
-
declare const teamsWorkflowNotifier:
|
|
19
|
+
declare const teamsWorkflowNotifier: MessageNotifierProvider;
|
|
20
20
|
/** Describe the Teams provider (name, version, config schema). */
|
|
21
|
-
declare function getMetadata():
|
|
21
|
+
declare function getMetadata(): MessageNotifierProvider["metadata"];
|
|
22
22
|
//#endregion
|
|
23
23
|
export { type ChatToggles, getMetadata, teamsWorkflowConfigSchema, teamsWorkflowNotifier };
|
|
24
24
|
//# sourceMappingURL=teams.d.mts.map
|
package/dist/teams.mjs
CHANGED
|
@@ -21,7 +21,7 @@ const teamsWorkflowNotifier = {
|
|
|
21
21
|
function getMetadata() {
|
|
22
22
|
return {
|
|
23
23
|
name: "Microsoft Teams",
|
|
24
|
-
version:
|
|
24
|
+
version: "0.7.0",
|
|
25
25
|
description: "Chat messages via Teams workflow webhooks",
|
|
26
26
|
kind: "teams-workflow",
|
|
27
27
|
category: "notifier",
|
package/dist/teams.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teams.mjs","names":[],"sources":["../src/teams.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"teams.mjs","names":[],"sources":["../src/teams.ts"],"sourcesContent":["import type {\n MessageNotifierAdapter,\n MessageNotifierProvider,\n} from \"@storyshelf/core/adapter/notifier\";\nimport type { Logger } from \"@storyshelf/core/logger\";\nimport { httpText } from \"@storyshelf/core/utils\";\nimport { chatTogglesSchema, type ChatToggles } from \"./types.ts\";\n\nexport type { ChatToggles };\n\ndeclare const __PKG_VERSION__: string | undefined;\n\n/** Validation schema for the Teams workflow-webhook config. */\nexport const teamsWorkflowConfigSchema = chatTogglesSchema;\n\n/** Teams workflow-webhook chat provider (Adaptive Card message). */\nexport const teamsWorkflowNotifier: MessageNotifierProvider = {\n metadata: getMetadata(),\n create(opts: { config: unknown; secret?: string; logger?: Logger }): MessageNotifierAdapter {\n const config = teamsWorkflowConfigSchema.parse(opts.config);\n return createTeamsAdapter({ config, webhookUrl: opts.secret, logger: opts.logger });\n },\n};\n\ninterface TeamsAdapterOptions {\n config: ChatToggles;\n webhookUrl?: string;\n logger?: Logger;\n}\n\n/** Describe the Teams provider (name, version, config schema). */\nexport function getMetadata(): MessageNotifierProvider[\"metadata\"] {\n return {\n name: \"Microsoft Teams\",\n version: typeof __PKG_VERSION__ === \"string\" ? __PKG_VERSION__ : \"0.0.0\",\n description: \"Chat messages via Teams workflow webhooks\",\n kind: \"teams-workflow\",\n category: \"notifier\",\n logo: \"teams\",\n schema: teamsWorkflowConfigSchema,\n };\n}\n\nfunction createTeamsAdapter(options: TeamsAdapterOptions): MessageNotifierAdapter {\n const logger = options.logger?.child({ component: \"notify-chat-teams\" });\n return {\n metadata: getMetadata(),\n async send(input): Promise<void> {\n const url = requireWebhookUrl(options.webhookUrl);\n const payload = {\n type: \"message\",\n attachments: [\n {\n contentType: \"application/vnd.microsoft.card.adaptive\",\n content: {\n type: \"AdaptiveCard\",\n version: \"1.4\",\n body: [\n { type: \"TextBlock\", text: input.formatted.subject, weight: \"Bolder\" },\n { type: \"TextBlock\", text: input.formatted.text, wrap: true },\n ],\n },\n },\n ],\n };\n logger?.debug({ channelId: input.channel.id }, \"posting teams message\");\n await httpText(url, { method: \"POST\", json: payload, logger });\n logger?.info({ channelId: input.channel.id }, \"teams message posted\");\n },\n };\n}\n\n/** Workflow URL arrives as the decrypted channel secret. */\nfunction requireWebhookUrl(secret: string | undefined): string {\n if (!secret) {\n throw new Error(\"Teams channel is missing its workflow URL secret\");\n }\n return secret;\n}\n"],"mappings":";;;;;;;AAaA,MAAa,4BAA4B;;AAGzC,MAAa,wBAAiD;CAC5D,UAAU,YAAY;CACtB,OAAO,MAAqF;EAE1F,OAAO,mBAAmB;GAAE,QADb,0BAA0B,MAAM,KAAK,MACnB;GAAG,YAAY,KAAK;GAAQ,QAAQ,KAAK;EAAO,CAAC;CACpF;AACF;;AASA,SAAgB,cAAmD;CACjE,OAAO;EACL,MAAM;EACN,SAAA;EACA,aAAa;EACb,MAAM;EACN,UAAU;EACV,MAAM;EACN,QAAQ;CACV;AACF;AAEA,SAAS,mBAAmB,SAAsD;CAChF,MAAM,SAAS,QAAQ,QAAQ,MAAM,EAAE,WAAW,oBAAoB,CAAC;CACvE,OAAO;EACL,UAAU,YAAY;EACtB,MAAM,KAAK,OAAsB;GAC/B,MAAM,MAAM,kBAAkB,QAAQ,UAAU;GAChD,MAAM,UAAU;IACd,MAAM;IACN,aAAa,CACX;KACE,aAAa;KACb,SAAS;MACP,MAAM;MACN,SAAS;MACT,MAAM,CACJ;OAAE,MAAM;OAAa,MAAM,MAAM,UAAU;OAAS,QAAQ;MAAS,GACrE;OAAE,MAAM;OAAa,MAAM,MAAM,UAAU;OAAM,MAAM;MAAK,CAC9D;KACF;IACF,CACF;GACF;GACA,QAAQ,MAAM,EAAE,WAAW,MAAM,QAAQ,GAAG,GAAG,uBAAuB;GACtE,MAAM,SAAS,KAAK;IAAE,QAAQ;IAAQ,MAAM;IAAS;GAAO,CAAC;GAC7D,QAAQ,KAAK,EAAE,WAAW,MAAM,QAAQ,GAAG,GAAG,sBAAsB;EACtE;CACF;AACF;;AAGA,SAAS,kBAAkB,QAAoC;CAC7D,IAAI,CAAC,QACH,MAAM,IAAI,MAAM,kDAAkD;CAEpE,OAAO;AACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storyshelf/notify-chat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Chat notification providers for StoryShelf (Slack and Teams incoming webhooks).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"notifications",
|
|
@@ -27,9 +27,6 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"type": "module",
|
|
30
|
-
"engines": {
|
|
31
|
-
"node": ">=24"
|
|
32
|
-
},
|
|
33
30
|
"sideEffects": false,
|
|
34
31
|
"types": "./dist/index.d.mts",
|
|
35
32
|
"exports": {
|
|
@@ -70,7 +67,7 @@
|
|
|
70
67
|
"prepublishOnly": "nub run build"
|
|
71
68
|
},
|
|
72
69
|
"dependencies": {
|
|
73
|
-
"@storyshelf/core": "0.
|
|
70
|
+
"@storyshelf/core": "0.7.0",
|
|
74
71
|
"zod": "^4.2.0"
|
|
75
72
|
},
|
|
76
73
|
"devDependencies": {
|
|
@@ -83,6 +80,9 @@
|
|
|
83
80
|
"typescript": "^7.0.2",
|
|
84
81
|
"vitest": "^5.0.0"
|
|
85
82
|
},
|
|
83
|
+
"engines": {
|
|
84
|
+
"node": ">=24"
|
|
85
|
+
},
|
|
86
86
|
"jsr": {
|
|
87
87
|
"runtimeCompat": {
|
|
88
88
|
"node": true,
|