@premium-cms/plugin-webhook-notifier 0.2.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/LICENSE +9 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.mjs +42 -0
- package/dist/manifest.json +62 -0
- package/dist/plugin.d.mts +89 -0
- package/dist/plugin.mjs +2 -0
- package/emdash-plugin.jsonc +26 -0
- package/package.json +46 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
The MIT License
|
|
2
|
+
|
|
3
|
+
Copyright 2026 Cloudflare Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/dist/index.d.mts
ADDED
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Auto-generated by emdash-plugin build. Do not edit.
|
|
2
|
+
// Source: emdash-plugin.jsonc + package.json
|
|
3
|
+
//
|
|
4
|
+
// Default-exports a sandboxed plugin descriptor. Pass it directly into
|
|
5
|
+
// emdash's `plugins:` or `sandboxed:` array — no factory call needed.
|
|
6
|
+
|
|
7
|
+
/** @type {import("@premium-cms/emdash").PluginDescriptor} */
|
|
8
|
+
const descriptor = Object.freeze({
|
|
9
|
+
"id": "webhook-notifier",
|
|
10
|
+
"version": "0.2.0",
|
|
11
|
+
"format": "standard",
|
|
12
|
+
"entrypoint": "@premium-cms/plugin-webhook-notifier/sandbox",
|
|
13
|
+
"capabilities": [
|
|
14
|
+
"network:request:unrestricted"
|
|
15
|
+
],
|
|
16
|
+
"allowedHosts": [],
|
|
17
|
+
"storage": {
|
|
18
|
+
"deliveries": {
|
|
19
|
+
"indexes": [
|
|
20
|
+
"timestamp",
|
|
21
|
+
"webhookUrl",
|
|
22
|
+
"status"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"adminPages": [
|
|
27
|
+
{
|
|
28
|
+
"path": "/settings",
|
|
29
|
+
"label": "Webhook Settings",
|
|
30
|
+
"icon": "send"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"adminWidgets": [
|
|
34
|
+
{
|
|
35
|
+
"id": "status",
|
|
36
|
+
"title": "Webhooks",
|
|
37
|
+
"size": "third"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
export default descriptor;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "webhook-notifier",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"declaredAccess": {
|
|
5
|
+
"network": {
|
|
6
|
+
"request": {}
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
"capabilities": [
|
|
10
|
+
"network:request:unrestricted"
|
|
11
|
+
],
|
|
12
|
+
"allowedHosts": [],
|
|
13
|
+
"storage": {
|
|
14
|
+
"deliveries": {
|
|
15
|
+
"indexes": [
|
|
16
|
+
"timestamp",
|
|
17
|
+
"webhookUrl",
|
|
18
|
+
"status"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"hooks": [
|
|
23
|
+
{
|
|
24
|
+
"name": "content:afterSave",
|
|
25
|
+
"priority": 210,
|
|
26
|
+
"timeout": 10000
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "content:afterDelete",
|
|
30
|
+
"priority": 210,
|
|
31
|
+
"timeout": 10000
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "media:afterUpload",
|
|
35
|
+
"priority": 210,
|
|
36
|
+
"timeout": 10000
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"routes": [
|
|
40
|
+
"admin",
|
|
41
|
+
"status",
|
|
42
|
+
"settings",
|
|
43
|
+
"settings/save",
|
|
44
|
+
"test"
|
|
45
|
+
],
|
|
46
|
+
"admin": {
|
|
47
|
+
"pages": [
|
|
48
|
+
{
|
|
49
|
+
"path": "/settings",
|
|
50
|
+
"label": "Webhook Settings",
|
|
51
|
+
"icon": "send"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"widgets": [
|
|
55
|
+
{
|
|
56
|
+
"id": "status",
|
|
57
|
+
"title": "Webhooks",
|
|
58
|
+
"size": "third"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import * as _premium_cms_emdash_plugin0 from "@premium-cms/emdash/plugin";
|
|
2
|
+
import { PluginContext } from "@premium-cms/emdash/plugin";
|
|
3
|
+
import * as _premium_cms_plugin_types0 from "@premium-cms/plugin-types";
|
|
4
|
+
|
|
5
|
+
//#region src/plugin.d.ts
|
|
6
|
+
interface WebhookPayload {
|
|
7
|
+
event: string;
|
|
8
|
+
timestamp: string;
|
|
9
|
+
collection?: string;
|
|
10
|
+
resourceId: string;
|
|
11
|
+
resourceType: "content" | "media";
|
|
12
|
+
data?: Record<string, unknown>;
|
|
13
|
+
metadata?: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
declare const _default: {
|
|
16
|
+
hooks: {
|
|
17
|
+
"content:afterSave": {
|
|
18
|
+
priority: number;
|
|
19
|
+
timeout: number;
|
|
20
|
+
dependencies: string[];
|
|
21
|
+
errorPolicy: "continue";
|
|
22
|
+
handler: (event: _premium_cms_emdash_plugin0.ContentHookEvent, ctx: PluginContext<_premium_cms_plugin_types0.PluginStorageConfig>) => Promise<void>;
|
|
23
|
+
};
|
|
24
|
+
"content:afterDelete": {
|
|
25
|
+
priority: number;
|
|
26
|
+
timeout: number;
|
|
27
|
+
dependencies: string[];
|
|
28
|
+
errorPolicy: "continue";
|
|
29
|
+
handler: (event: _premium_cms_emdash_plugin0.ContentDeleteEvent, ctx: PluginContext<_premium_cms_plugin_types0.PluginStorageConfig>) => Promise<void>;
|
|
30
|
+
};
|
|
31
|
+
"media:afterUpload": {
|
|
32
|
+
priority: number;
|
|
33
|
+
timeout: number;
|
|
34
|
+
errorPolicy: "continue";
|
|
35
|
+
handler: (event: _premium_cms_emdash_plugin0.MediaAfterUploadEvent, ctx: PluginContext<_premium_cms_plugin_types0.PluginStorageConfig>) => Promise<void>;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
routes: {
|
|
39
|
+
admin: {
|
|
40
|
+
handler: (routeCtx: _premium_cms_emdash_plugin0.SandboxedRouteContext, ctx: PluginContext<_premium_cms_plugin_types0.PluginStorageConfig>) => Promise<{
|
|
41
|
+
blocks: unknown[];
|
|
42
|
+
}>;
|
|
43
|
+
};
|
|
44
|
+
status: {
|
|
45
|
+
handler: (_routeCtx: _premium_cms_emdash_plugin0.SandboxedRouteContext, ctx: PluginContext<_premium_cms_plugin_types0.PluginStorageConfig>) => Promise<{
|
|
46
|
+
configured: boolean;
|
|
47
|
+
enabled: boolean;
|
|
48
|
+
stats: {
|
|
49
|
+
successful: number;
|
|
50
|
+
failed: number;
|
|
51
|
+
pending: number;
|
|
52
|
+
};
|
|
53
|
+
}>;
|
|
54
|
+
};
|
|
55
|
+
settings: {
|
|
56
|
+
handler: (_routeCtx: _premium_cms_emdash_plugin0.SandboxedRouteContext, ctx: PluginContext<_premium_cms_plugin_types0.PluginStorageConfig>) => Promise<{
|
|
57
|
+
webhookUrl: string;
|
|
58
|
+
enabled: boolean;
|
|
59
|
+
includeData: boolean;
|
|
60
|
+
events: string;
|
|
61
|
+
}>;
|
|
62
|
+
};
|
|
63
|
+
"settings/save": {
|
|
64
|
+
handler: (routeCtx: _premium_cms_emdash_plugin0.SandboxedRouteContext, ctx: PluginContext<_premium_cms_plugin_types0.PluginStorageConfig>) => Promise<{
|
|
65
|
+
success: boolean;
|
|
66
|
+
error?: undefined;
|
|
67
|
+
} | {
|
|
68
|
+
success: boolean;
|
|
69
|
+
error: string;
|
|
70
|
+
}>;
|
|
71
|
+
};
|
|
72
|
+
test: {
|
|
73
|
+
handler: (routeCtx: _premium_cms_emdash_plugin0.SandboxedRouteContext, ctx: PluginContext<_premium_cms_plugin_types0.PluginStorageConfig>) => Promise<{
|
|
74
|
+
success: boolean;
|
|
75
|
+
error: string;
|
|
76
|
+
status?: undefined;
|
|
77
|
+
payload?: undefined;
|
|
78
|
+
} | {
|
|
79
|
+
success: boolean;
|
|
80
|
+
status: number | undefined;
|
|
81
|
+
error: string | undefined;
|
|
82
|
+
payload: WebhookPayload;
|
|
83
|
+
}>;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
//#endregion
|
|
88
|
+
export { _default as default };
|
|
89
|
+
//# sourceMappingURL=plugin.d.mts.map
|
package/dist/plugin.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=/^\[|\]$/g,t=new Set([`localhost`,`metadata.google.internal`,`[::1]`]),n=[{start:127<<24>>>0,end:2147483647},{start:10<<24>>>0,end:184549375},{start:2886729728,end:2887778303},{start:3232235520,end:3232301055},{start:2851995648,end:2852061183},{start:0,end:16777215}];function r(r){let i;try{i=new URL(r)}catch{throw Error(`Invalid webhook URL`)}if(i.protocol!==`http:`&&i.protocol!==`https:`)throw Error(`Webhook URL scheme '${i.protocol}' is not allowed`);let a=i.hostname.replace(e,``);if(t.has(a.toLowerCase()))throw Error(`Webhook URLs targeting internal hosts are not allowed`);let o=a.split(`.`);if(o.length===4){let e=o.map(Number);if(e.every(e=>!isNaN(e)&&e>=0&&e<=255)){let t=(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0;if(n.some(e=>t>=e.start&&t<=e.end))throw Error(`Webhook URLs targeting private IP addresses are not allowed`)}}if(a===`::1`||a.startsWith(`fe80:`)||a.startsWith(`fc`)||a.startsWith(`fd`))throw Error(`Webhook URLs targeting internal addresses are not allowed`)}async function i(e,t,n,i,a,o){r(n);let s,c;for(let r=1;r<=o;r++){try{let l={"Content-Type":`application/json`,"X-EmDash-Event":i.event};a&&(l.Authorization=`Bearer ${a}`);let u=await e(n,{method:`POST`,headers:l,body:JSON.stringify(i)});if(c=u.status,u.ok)return t.info(`Delivered ${i.event} to ${n} (${u.status})`),{success:!0,status:u.status};s=`HTTP ${u.status}: ${u.statusText}`,t.warn(`Attempt ${r}/${o} failed: ${s}`)}catch(e){s=e instanceof Error?e.message:`Unknown error`,t.warn(`Attempt ${r}/${o} failed: ${s}`)}r<o&&await new Promise(e=>setTimeout(e,100*2**(r-1)))}return t.error(`Failed to deliver ${i.event} after ${o} attempts`),{success:!1,status:c,error:s}}function a(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function o(e,t){if(!a(e))return;let n=e[t];return typeof n==`string`?n:void 0}async function s(e){return{url:await e.kv.get(`settings:webhookUrl`),token:await e.kv.get(`settings:secretToken`),enabled:await e.kv.get(`settings:enabled`)}}function c(e){if(!e.http)throw Error(`Webhook notifier requires network:request capability`);return e.http.fetch}var l={hooks:{"content:afterSave":{priority:210,timeout:1e4,dependencies:[`audit-log`],errorPolicy:`continue`,handler:async(e,t)=>{let{url:n,token:r,enabled:a}=await s(t);if(a===!1||!n)return;let o=typeof e.content.id==`string`?e.content.id:String(e.content.id),l={event:e.isNew?`content:create`:`content:update`,timestamp:new Date().toISOString(),collection:e.collection,resourceId:o,resourceType:`content`,metadata:{slug:e.content.slug,status:e.content.status}};await i(c(t),t.log,n,l,r??void 0,3)}},"content:afterDelete":{priority:210,timeout:1e4,dependencies:[`audit-log`],errorPolicy:`continue`,handler:async(e,t)=>{let{url:n,token:r,enabled:a}=await s(t);if(a===!1||!n)return;let o={event:`content:delete`,timestamp:new Date().toISOString(),collection:e.collection,resourceId:e.id,resourceType:`content`};await i(c(t),t.log,n,o,r??void 0,3)}},"media:afterUpload":{priority:210,timeout:1e4,errorPolicy:`continue`,handler:async(e,t)=>{let{url:n,token:r,enabled:a}=await s(t);if(a===!1||!n)return;let o={event:`media:upload`,timestamp:new Date().toISOString(),resourceId:e.media.id,resourceType:`media`};await i(c(t),t.log,n,o,r??void 0,3)}}},routes:{admin:{handler:async(e,t)=>{let n=e.input;return n.type===`page_load`&&n.page===`widget:webhook-status`?u(t):n.type===`page_load`&&n.page===`/settings`?d(t):n.type===`form_submit`&&n.action_id===`save_settings`?f(t,n.values??{}):n.type===`block_action`&&n.action_id===`test_webhook`?p(t):{blocks:[]}}},status:{handler:async(e,t)=>{try{let e=await t.kv.get(`settings:webhookUrl`),n=await t.kv.get(`settings:enabled`),r=t.storage.deliveries,i=await r.count({status:`success`}),a=await r.count({status:`failed`}),o=await r.count({status:`pending`});return{configured:!!e,enabled:n??!0,stats:{successful:i,failed:a,pending:o}}}catch(e){return t.log.error(`Failed to get status`,e),{configured:!1,enabled:!0,stats:{successful:0,failed:0,pending:0}}}}},settings:{handler:async(e,t)=>{try{let e=await t.kv.list(`settings:`),n={};for(let t of e)n[t.key.replace(`settings:`,``)]=t.value;return{webhookUrl:typeof n.webhookUrl==`string`?n.webhookUrl:``,enabled:typeof n.enabled==`boolean`?n.enabled:!0,includeData:typeof n.includeData==`boolean`?n.includeData:!1,events:typeof n.events==`string`?n.events:`all`}}catch(e){return t.log.error(`Failed to get settings`,e),{webhookUrl:``,enabled:!0,includeData:!1,events:`all`}}}},"settings/save":{handler:async(e,t)=>{try{let n=a(e.input)?e.input:{};return typeof n.webhookUrl==`string`&&await t.kv.set(`settings:webhookUrl`,n.webhookUrl),typeof n.enabled==`boolean`&&await t.kv.set(`settings:enabled`,n.enabled),typeof n.includeData==`boolean`&&await t.kv.set(`settings:includeData`,n.includeData),typeof n.events==`string`&&await t.kv.set(`settings:events`,n.events),{success:!0}}catch(e){return t.log.error(`Failed to save settings`,e),{success:!1,error:String(e)}}}},test:{handler:async(e,t)=>{let n=o(e.input,`url`);if(!n)return{success:!1,error:`No webhook URL provided`};let r=await t.kv.get(`settings:secretToken`),a={event:`content:create`,timestamp:new Date().toISOString(),resourceId:`test-`+Date.now(),resourceType:`content`,metadata:{test:!0,message:`Webhook test from EmDash CMS`}},s=await i(c(t),t.log,n,a,r??void 0,1);return{success:s.success,status:s.status,error:s.error,payload:a}}}}};async function u(e){try{let t=await e.kv.get(`settings:webhookUrl`),n=await e.kv.get(`settings:enabled`),r=!!t&&n!==!1,i=0,a=0,o=0;try{let t=e.storage.deliveries;i=await t.count({status:`success`}),a=await t.count({status:`failed`}),o=await t.count({status:`pending`})}catch{}let s=[{type:`fields`,fields:[{label:`Status`,value:r?`Active`:`Not Configured`},{label:`Endpoint`,value:t||`None`}]}];return r?s.push({type:`stats`,stats:[{label:`Delivered`,value:String(i)},{label:`Failed`,value:String(a)},{label:`Pending`,value:String(o)}]}):s.push({type:`context`,text:`Configure a webhook URL in settings to start sending events.`}),{blocks:s}}catch(t){return e.log.error(`Failed to build status widget`,t),{blocks:[{type:`context`,text:`Failed to load webhook status`}]}}}async function d(e){try{let t=await e.kv.get(`settings:webhookUrl`)??``,n=await e.kv.get(`settings:enabled`)??!0,r=await e.kv.get(`settings:includeData`)??!1,i=await e.kv.get(`settings:events`)??`all`,a=JSON.stringify({event:`content:create`,timestamp:new Date().toISOString(),collection:`posts`,resourceId:`abc123`,resourceType:`content`,...r&&{data:{title:`Example Post`,slug:`example-post`}},metadata:{slug:`example-post`,status:`published`}},null,2);return{blocks:[{type:`header`,text:`Webhook Settings`},{type:`context`,text:`Send notifications to external services when content changes.`},{type:`divider`},{type:`form`,block_id:`webhook-settings`,fields:[{type:`text_input`,action_id:`webhookUrl`,label:`Webhook URL`,initial_value:t},{type:`secret_input`,action_id:`secretToken`,label:`Secret Token`},{type:`toggle`,action_id:`enabled`,label:`Enable Webhooks`,initial_value:n},{type:`select`,action_id:`events`,label:`Events to Send`,options:[{label:`All events`,value:`all`},{label:`Content changes only`,value:`content`},{label:`Media uploads only`,value:`media`}],initial_value:i},{type:`toggle`,action_id:`includeData`,label:`Include Content Data`,initial_value:r}],submit:{label:`Save Settings`,action_id:`save_settings`}},{type:`divider`},{type:`section`,text:`**Payload Preview**`},{type:`section`,text:"```json\n"+a+"\n```"},{type:`actions`,elements:[{type:`button`,text:`Test Webhook`,action_id:`test_webhook`,style:`primary`}]}]}}catch(t){return e.log.error(`Failed to build settings page`,t),{blocks:[{type:`context`,text:`Failed to load settings`}]}}}async function f(e,t){try{return typeof t.webhookUrl==`string`&&await e.kv.set(`settings:webhookUrl`,t.webhookUrl),typeof t.secretToken==`string`&&t.secretToken!==``&&await e.kv.set(`settings:secretToken`,t.secretToken),typeof t.enabled==`boolean`&&await e.kv.set(`settings:enabled`,t.enabled),typeof t.events==`string`&&await e.kv.set(`settings:events`,t.events),typeof t.includeData==`boolean`&&await e.kv.set(`settings:includeData`,t.includeData),{...await d(e),toast:{message:`Settings saved`,type:`success`}}}catch(t){return e.log.error(`Failed to save settings`,t),{blocks:[{type:`banner`,style:`error`,text:`Failed to save settings`}],toast:{message:`Failed to save settings`,type:`error`}}}}async function p(e){let t=await e.kv.get(`settings:webhookUrl`);if(!t)return{blocks:[{type:`banner`,style:`warning`,text:`Enter a webhook URL first.`}],toast:{message:`No webhook URL configured`,type:`error`}};let n=await e.kv.get(`settings:secretToken`),r={event:`content:create`,timestamp:new Date().toISOString(),resourceId:`test-`+Date.now(),resourceType:`content`,metadata:{test:!0,message:`Webhook test from EmDash CMS`}};try{let a=await i(c(e),e.log,t,r,n??void 0,1);return a.success?{...await d(e),toast:{message:`Test sent -- HTTP ${a.status}`,type:`success`}}:{...await d(e),toast:{message:`Test failed: ${a.error??`Unknown error`}`,type:`error`}}}catch(t){let n=t instanceof Error?t.message:String(t);return{...await d(e),toast:{message:`Test failed: ${n}`,type:`error`}}}}export{l as default};
|
|
2
|
+
//# sourceMappingURL=plugin.mjs.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../plugin-cli/schemas/emdash-plugin.schema.json",
|
|
3
|
+
|
|
4
|
+
"slug": "webhook-notifier",
|
|
5
|
+
"publisher": "did:plc:xyraubanwc5fwemkduw3upi6", // plugins.emdashcms.com
|
|
6
|
+
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"author": { "name": "Matt Kane" },
|
|
9
|
+
"security": { "url": "https://github.com/emdash-cms/emdash/security/advisories/new" },
|
|
10
|
+
"description": "Posts to user-configured external URLs when content or media changes.",
|
|
11
|
+
|
|
12
|
+
// Trust contract. Outbound HTTP is unrestricted because the
|
|
13
|
+
// webhook URLs are user-supplied at runtime — there's no fixed
|
|
14
|
+
// allow-list we could pin at publish time. Declares the
|
|
15
|
+
// `deliveries` storage collection for audit + retry state.
|
|
16
|
+
"capabilities": ["network:request:unrestricted"],
|
|
17
|
+
"allowedHosts": [],
|
|
18
|
+
"storage": {
|
|
19
|
+
"deliveries": { "indexes": ["timestamp", "webhookUrl", "status"] },
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
"admin": {
|
|
23
|
+
"pages": [{ "path": "/settings", "label": "Webhook Settings", "icon": "send" }],
|
|
24
|
+
"widgets": [{ "id": "status", "title": "Webhooks", "size": "third" }],
|
|
25
|
+
},
|
|
26
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@premium-cms/plugin-webhook-notifier",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Webhook notification plugin for EmDash CMS - posts to external URLs on content changes",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.mjs",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./dist/index.mjs",
|
|
10
|
+
"types": "./dist/index.d.mts"
|
|
11
|
+
},
|
|
12
|
+
"./sandbox": "./dist/plugin.mjs"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"emdash-plugin.jsonc"
|
|
17
|
+
],
|
|
18
|
+
"keywords": [
|
|
19
|
+
"@premium-cms/emdash",
|
|
20
|
+
"cms",
|
|
21
|
+
"plugin",
|
|
22
|
+
"webhook",
|
|
23
|
+
"notifications",
|
|
24
|
+
"integration"
|
|
25
|
+
],
|
|
26
|
+
"author": "Matt Kane",
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"@premium-cms/emdash": ">=0.15.0"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"tsdown": "0.20.3",
|
|
33
|
+
"typescript": "^6.0.3",
|
|
34
|
+
"@premium-cms/plugin-cli": "0.8.1"
|
|
35
|
+
},
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/emdash-cms/emdash.git",
|
|
39
|
+
"directory": "packages/plugins/webhook-notifier"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "node node_modules/@premium-cms/plugin-cli/dist/index.mjs build",
|
|
43
|
+
"dev": "emdash-plugin dev",
|
|
44
|
+
"typecheck": "tsgo --noEmit"
|
|
45
|
+
}
|
|
46
|
+
}
|