@storyshelf/notify-chat 0.7.0 → 0.8.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/dist/index.d.mts +0 -2
- package/dist/index.mjs +1 -2
- package/dist/log.d.mts +0 -2
- package/dist/log.mjs +2 -3
- package/dist/slack.d.mts +0 -2
- package/dist/slack.mjs +2 -3
- package/dist/teams.d.mts +0 -2
- package/dist/teams.mjs +2 -3
- package/dist/types.d.mts +0 -2
- package/dist/types.mjs +1 -2
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -4,9 +4,7 @@ import { logConfigSchema, logNotifier } from "./log.mjs";
|
|
|
4
4
|
import { ChatToggles, chatTogglesSchema } from "./types.mjs";
|
|
5
5
|
import { slackWebhookConfigSchema, slackWebhookNotifier } from "./slack.mjs";
|
|
6
6
|
import { teamsWorkflowConfigSchema, teamsWorkflowNotifier } from "./teams.mjs";
|
|
7
|
-
//#region src/index.d.ts
|
|
8
7
|
/** All chat providers in one list for `ShelfOptions.notifications.notifiers`. */
|
|
9
8
|
declare const chatNotifiers: import("@storyshelf/core/adapter/notifier").MessageNotifierProvider[];
|
|
10
|
-
//#endregion
|
|
11
9
|
export { type ChatToggles, chatNotifiers, chatTogglesSchema, logConfigSchema, logNotifier, slackWebhookConfigSchema, slackWebhookNotifier, teamsWorkflowConfigSchema, teamsWorkflowNotifier };
|
|
12
10
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { logConfigSchema, logNotifier } from "./log.mjs";
|
|
|
5
5
|
import { chatTogglesSchema } from "./types.mjs";
|
|
6
6
|
import { slackWebhookConfigSchema, slackWebhookNotifier } from "./slack.mjs";
|
|
7
7
|
import { teamsWorkflowConfigSchema, teamsWorkflowNotifier } from "./teams.mjs";
|
|
8
|
-
|
|
8
|
+
// src/index.ts
|
|
9
9
|
/**
|
|
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).
|
|
@@ -16,7 +16,6 @@ const chatNotifiers = [
|
|
|
16
16
|
teamsWorkflowNotifier,
|
|
17
17
|
logNotifier
|
|
18
18
|
];
|
|
19
|
-
//#endregion
|
|
20
19
|
export { chatNotifiers, chatTogglesSchema, logConfigSchema, logNotifier, slackWebhookConfigSchema, slackWebhookNotifier, teamsWorkflowConfigSchema, teamsWorkflowNotifier };
|
|
21
20
|
|
|
22
21
|
//# sourceMappingURL=index.mjs.map
|
package/dist/log.d.mts
CHANGED
|
@@ -2,13 +2,11 @@ import __tsdown_shims_path from 'node:path';
|
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { MessageNotifierProvider } from "@storyshelf/core/adapter/notifier";
|
|
5
|
-
//#region src/log.d.ts
|
|
6
5
|
/** Validation schema for the log provider config (accepts anything). */
|
|
7
6
|
declare const logConfigSchema: z.ZodObject<{}, z.core.$loose>;
|
|
8
7
|
/** Log-only chat provider for tests, dev, and unconfigured servers. */
|
|
9
8
|
declare const logNotifier: MessageNotifierProvider;
|
|
10
9
|
/** Describe the log provider (name, version, config schema). */
|
|
11
10
|
declare function getMetadata(): MessageNotifierProvider["metadata"];
|
|
12
|
-
//#endregion
|
|
13
11
|
export { getMetadata, logConfigSchema, logNotifier };
|
|
14
12
|
//# sourceMappingURL=log.d.mts.map
|
package/dist/log.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
|
|
5
|
+
// src/log.ts
|
|
6
6
|
/** Validation schema for the log provider config (accepts anything). */
|
|
7
7
|
const logConfigSchema = z.object({}).loose();
|
|
8
8
|
/** Log-only chat provider for tests, dev, and unconfigured servers. */
|
|
@@ -26,14 +26,13 @@ const logNotifier = {
|
|
|
26
26
|
function getMetadata() {
|
|
27
27
|
return {
|
|
28
28
|
name: "Log",
|
|
29
|
-
version: "0.
|
|
29
|
+
version: "0.8.0",
|
|
30
30
|
description: "Chat notifications to the server log (tests and dev)",
|
|
31
31
|
kind: "log",
|
|
32
32
|
category: "notifier",
|
|
33
33
|
schema: logConfigSchema
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
//#endregion
|
|
37
36
|
export { getMetadata, logConfigSchema, logNotifier };
|
|
38
37
|
|
|
39
38
|
//# sourceMappingURL=log.mjs.map
|
package/dist/slack.d.mts
CHANGED
|
@@ -2,7 +2,6 @@ import __tsdown_shims_path from 'node:path';
|
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { ChatToggles } from "./types.mjs";
|
|
4
4
|
import { MessageNotifierProvider } from "@storyshelf/core/adapter/notifier";
|
|
5
|
-
//#region src/slack.d.ts
|
|
6
5
|
/** Validation schema for the Slack incoming-webhook config. */
|
|
7
6
|
declare const slackWebhookConfigSchema: import("zod").ZodObject<{
|
|
8
7
|
style: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
@@ -19,6 +18,5 @@ declare const slackWebhookConfigSchema: import("zod").ZodObject<{
|
|
|
19
18
|
declare const slackWebhookNotifier: MessageNotifierProvider;
|
|
20
19
|
/** Describe the Slack provider (name, version, config schema). */
|
|
21
20
|
declare function getMetadata(): MessageNotifierProvider["metadata"];
|
|
22
|
-
//#endregion
|
|
23
21
|
export { type ChatToggles, getMetadata, slackWebhookConfigSchema, slackWebhookNotifier };
|
|
24
22
|
//# sourceMappingURL=slack.d.mts.map
|
package/dist/slack.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import "node:url";
|
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { chatTogglesSchema } from "./types.mjs";
|
|
5
5
|
import { httpText } from "@storyshelf/core/utils";
|
|
6
|
-
|
|
6
|
+
// src/slack.ts
|
|
7
7
|
/** Validation schema for the Slack incoming-webhook config. */
|
|
8
8
|
const slackWebhookConfigSchema = chatTogglesSchema;
|
|
9
9
|
/** Slack incoming-webhook chat provider (Block Kit section + fallback text). */
|
|
@@ -21,7 +21,7 @@ const slackWebhookNotifier = {
|
|
|
21
21
|
function getMetadata() {
|
|
22
22
|
return {
|
|
23
23
|
name: "Slack",
|
|
24
|
-
version: "0.
|
|
24
|
+
version: "0.8.0",
|
|
25
25
|
description: "Chat messages via Slack incoming webhooks",
|
|
26
26
|
kind: "slack-webhook",
|
|
27
27
|
category: "notifier",
|
|
@@ -61,7 +61,6 @@ function requireWebhookUrl(secret) {
|
|
|
61
61
|
if (!secret) throw new Error("Slack channel is missing its webhook URL secret");
|
|
62
62
|
return secret;
|
|
63
63
|
}
|
|
64
|
-
//#endregion
|
|
65
64
|
export { getMetadata, slackWebhookConfigSchema, slackWebhookNotifier };
|
|
66
65
|
|
|
67
66
|
//# sourceMappingURL=slack.mjs.map
|
package/dist/teams.d.mts
CHANGED
|
@@ -2,7 +2,6 @@ import __tsdown_shims_path from 'node:path';
|
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { ChatToggles } from "./types.mjs";
|
|
4
4
|
import { MessageNotifierProvider } from "@storyshelf/core/adapter/notifier";
|
|
5
|
-
//#region src/teams.d.ts
|
|
6
5
|
/** Validation schema for the Teams workflow-webhook config. */
|
|
7
6
|
declare const teamsWorkflowConfigSchema: import("zod").ZodObject<{
|
|
8
7
|
style: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
@@ -19,6 +18,5 @@ declare const teamsWorkflowConfigSchema: import("zod").ZodObject<{
|
|
|
19
18
|
declare const teamsWorkflowNotifier: MessageNotifierProvider;
|
|
20
19
|
/** Describe the Teams provider (name, version, config schema). */
|
|
21
20
|
declare function getMetadata(): MessageNotifierProvider["metadata"];
|
|
22
|
-
//#endregion
|
|
23
21
|
export { type ChatToggles, getMetadata, teamsWorkflowConfigSchema, teamsWorkflowNotifier };
|
|
24
22
|
//# sourceMappingURL=teams.d.mts.map
|
package/dist/teams.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import "node:url";
|
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { chatTogglesSchema } from "./types.mjs";
|
|
5
5
|
import { httpText } from "@storyshelf/core/utils";
|
|
6
|
-
|
|
6
|
+
// src/teams.ts
|
|
7
7
|
/** Validation schema for the Teams workflow-webhook config. */
|
|
8
8
|
const teamsWorkflowConfigSchema = chatTogglesSchema;
|
|
9
9
|
/** Teams workflow-webhook chat provider (Adaptive Card message). */
|
|
@@ -21,7 +21,7 @@ const teamsWorkflowNotifier = {
|
|
|
21
21
|
function getMetadata() {
|
|
22
22
|
return {
|
|
23
23
|
name: "Microsoft Teams",
|
|
24
|
-
version: "0.
|
|
24
|
+
version: "0.8.0",
|
|
25
25
|
description: "Chat messages via Teams workflow webhooks",
|
|
26
26
|
kind: "teams-workflow",
|
|
27
27
|
category: "notifier",
|
|
@@ -69,7 +69,6 @@ function requireWebhookUrl(secret) {
|
|
|
69
69
|
if (!secret) throw new Error("Teams channel is missing its workflow URL secret");
|
|
70
70
|
return secret;
|
|
71
71
|
}
|
|
72
|
-
//#endregion
|
|
73
72
|
export { getMetadata, teamsWorkflowConfigSchema, teamsWorkflowNotifier };
|
|
74
73
|
|
|
75
74
|
//# sourceMappingURL=teams.mjs.map
|
package/dist/types.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
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
|
-
//#region src/types.d.ts
|
|
5
4
|
/** Display toggles shared by chat providers (Brand + toggles v1). */
|
|
6
5
|
declare const chatTogglesSchema: z.ZodObject<{
|
|
7
6
|
style: z.ZodOptional<z.ZodEnum<{
|
|
@@ -16,6 +15,5 @@ declare const chatTogglesSchema: z.ZodObject<{
|
|
|
16
15
|
}, z.core.$strip>;
|
|
17
16
|
/** Display toggles shared by chat providers. */
|
|
18
17
|
type ChatToggles = z.infer<typeof chatTogglesSchema>;
|
|
19
|
-
//#endregion
|
|
20
18
|
export { ChatToggles, chatTogglesSchema };
|
|
21
19
|
//# sourceMappingURL=types.d.mts.map
|
package/dist/types.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
|
|
5
|
+
// src/types.ts
|
|
6
6
|
/** Display toggles shared by chat providers (Brand + toggles v1). */
|
|
7
7
|
const chatTogglesSchema = z.object({
|
|
8
8
|
style: z.enum(["compact", "verbose"]).optional(),
|
|
@@ -12,7 +12,6 @@ const chatTogglesSchema = z.object({
|
|
|
12
12
|
includeCounts: z.boolean().optional(),
|
|
13
13
|
username: z.string().min(1).optional()
|
|
14
14
|
});
|
|
15
|
-
//#endregion
|
|
16
15
|
export { chatTogglesSchema };
|
|
17
16
|
|
|
18
17
|
//# sourceMappingURL=types.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storyshelf/notify-chat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Chat notification providers for StoryShelf (Slack and Teams incoming webhooks).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"notifications",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"prepublishOnly": "nub run build"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@storyshelf/core": "0.
|
|
71
|
-
"zod": "^4.
|
|
70
|
+
"@storyshelf/core": "0.8.0",
|
|
71
|
+
"zod": "^4.6.7"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@types/node": "^26.0.0",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"oxlint-tsgolint": "^7.0.2001",
|
|
79
79
|
"tsdown": "^0.22.14",
|
|
80
80
|
"typescript": "^7.0.2",
|
|
81
|
-
"vitest": "^5.0.
|
|
81
|
+
"vitest": "^5.0.5"
|
|
82
82
|
},
|
|
83
83
|
"engines": {
|
|
84
84
|
"node": ">=24"
|