@velocity-astro/cms-plugins 0.0.0-stage → 0.1.0-beta.1
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 +21 -0
- package/README.md +12 -2
- package/dist/hubspot/plugin.d.ts +10 -0
- package/dist/hubspot/plugin.d.ts.map +1 -0
- package/dist/hubspot/plugin.js +92 -0
- package/dist/hubspot/plugin.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/mailchimp/plugin.d.ts +14 -0
- package/dist/mailchimp/plugin.d.ts.map +1 -0
- package/dist/mailchimp/plugin.js +128 -0
- package/dist/mailchimp/plugin.js.map +1 -0
- package/dist/seo/analyse.d.ts +40 -0
- package/dist/seo/analyse.d.ts.map +1 -0
- package/dist/seo/analyse.js +34 -0
- package/dist/seo/analyse.js.map +1 -0
- package/dist/seo/editor.d.ts +20 -0
- package/dist/seo/editor.d.ts.map +1 -0
- package/dist/seo/editor.js +189 -0
- package/dist/seo/editor.js.map +1 -0
- package/dist/seo/plugin.d.ts +7 -0
- package/dist/seo/plugin.d.ts.map +1 -0
- package/dist/seo/plugin.js +155 -0
- package/dist/seo/plugin.js.map +1 -0
- package/dist/slack/plugin.d.ts +13 -0
- package/dist/slack/plugin.d.ts.map +1 -0
- package/dist/slack/plugin.js +98 -0
- package/dist/slack/plugin.js.map +1 -0
- package/dist/webhooks/plugin.d.ts +14 -0
- package/dist/webhooks/plugin.d.ts.map +1 -0
- package/dist/webhooks/plugin.js +161 -0
- package/dist/webhooks/plugin.js.map +1 -0
- package/package.json +34 -3
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { ValidationError, definePlugin, liveFields } from '@velocity-astro/cms-core';
|
|
2
|
+
/** How long the other side has to answer before a try counts as failed. */
|
|
3
|
+
const ANSWER_WITHIN_MS = 5000;
|
|
4
|
+
const SEND = 'send';
|
|
5
|
+
/** The groups of events an address can ask for, as the settings name them. */
|
|
6
|
+
const GROUPS = ['submissions', 'contacts', 'deals', 'published'];
|
|
7
|
+
const isRecord = (value) => typeof value === 'object' && value !== null;
|
|
8
|
+
const isDelivery = (value) => isRecord(value) && typeof value['url'] === 'string' && typeof value['event'] === 'string' && typeof value['at'] === 'string';
|
|
9
|
+
const toHex = (bytes) => [...bytes].map((byte) => byte.toString(16).padStart(2, '0')).join('');
|
|
10
|
+
/**
|
|
11
|
+
* The address as it may be sent to, or why it may not. Only `https`, and never this machine or a
|
|
12
|
+
* bare number: an address typed into settings must not become a way to reach what sits beside
|
|
13
|
+
* the site.
|
|
14
|
+
*/
|
|
15
|
+
export function deliveryAddress(text) {
|
|
16
|
+
let url;
|
|
17
|
+
try {
|
|
18
|
+
url = new URL(text);
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
throw new ValidationError(`"${text}" is not an address. Write it in full, such as https://example.com/hooks/velocity.`, [{ path: ['endpoints'], message: 'Not an address.' }]);
|
|
22
|
+
}
|
|
23
|
+
const host = url.hostname.toLowerCase();
|
|
24
|
+
const refuse = (why) => new ValidationError(`Nothing is sent to ${url.host}: ${why}`, [{ path: ['endpoints'], message: why }]);
|
|
25
|
+
if (url.protocol !== 'https:')
|
|
26
|
+
throw refuse('the address must start with https://.');
|
|
27
|
+
if (url.username !== '' || url.password !== '')
|
|
28
|
+
throw refuse('the address must not hold a name or a password. Use the signing secret instead.');
|
|
29
|
+
if (host === 'localhost' || host.endsWith('.localhost') || host.endsWith('.local') || host.endsWith('.internal') || !host.includes('.') || /^[\d.]+$/.test(host) || host.startsWith('[')) {
|
|
30
|
+
throw refuse('it must be a public address with a name, not this machine or a number.');
|
|
31
|
+
}
|
|
32
|
+
return url;
|
|
33
|
+
}
|
|
34
|
+
/** The addresses the owner listed, with the groups each asked for. One that ticked none gets everything. */
|
|
35
|
+
async function endpointsOf(cms) {
|
|
36
|
+
const { endpoints } = await cms.settings.get();
|
|
37
|
+
if (!Array.isArray(endpoints))
|
|
38
|
+
return [];
|
|
39
|
+
return endpoints.filter(isRecord).flatMap((endpoint) => {
|
|
40
|
+
const url = typeof endpoint['url'] === 'string' ? endpoint['url'].trim() : '';
|
|
41
|
+
const ticked = GROUPS.filter((group) => endpoint[group] === true);
|
|
42
|
+
return url === '' ? [] : [{ url, groups: ticked.length > 0 ? ticked : GROUPS }];
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/** What a visitor sent, by field key, with the form it came through. */
|
|
46
|
+
function submissionData(form, submission) {
|
|
47
|
+
const fields = Object.fromEntries(liveFields(form.fields).flatMap((field) => (submission.data[field.id] === undefined ? [] : [[field.key, submission.data[field.id]]])));
|
|
48
|
+
return {
|
|
49
|
+
form: { id: form.id, key: form.key, label: form.label },
|
|
50
|
+
submission: { id: submission.id, createdAt: submission.createdAt, ...(submission.email !== undefined && { email: submission.email }), ...(submission.page !== undefined && { page: submission.page }), ...(submission.locale !== undefined && { locale: submission.locale }), fields },
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
const contactData = ({ revision: _revision, ...contact }) => ({ contact });
|
|
54
|
+
const dealData = ({ revision: _revision, ...deal }) => ({ deal });
|
|
55
|
+
/**
|
|
56
|
+
* Webhooks: tells other services what happens on the site, as it happens. Each address an owner
|
|
57
|
+
* lists is sent a small JSON message when a form is submitted, a contact or a deal changes, or a
|
|
58
|
+
* page is published. A message that cannot be delivered is tried again for about a day, and the
|
|
59
|
+
* owner sees each one under Plugins. Built on the plugin surface alone.
|
|
60
|
+
*/
|
|
61
|
+
export const webhooks = definePlugin({
|
|
62
|
+
name: 'webhooks',
|
|
63
|
+
apiVersion: 1,
|
|
64
|
+
label: { en: 'Webhooks' },
|
|
65
|
+
description: { en: 'Send form submissions, contacts, deals and published pages to any other service: Zapier, Make, n8n or your own code. Failed deliveries are tried again.' },
|
|
66
|
+
version: '1.0.0',
|
|
67
|
+
permissions: ['entry:read', 'submission:read', 'contact:read'],
|
|
68
|
+
enabledByDefault: false,
|
|
69
|
+
settings: [
|
|
70
|
+
{
|
|
71
|
+
key: 'endpoints',
|
|
72
|
+
type: 'list',
|
|
73
|
+
label: { en: 'Addresses' },
|
|
74
|
+
help: { en: 'Where messages are sent. Each must start with https://. Tick what an address should hear of, or tick nothing to send it everything.' },
|
|
75
|
+
options: {
|
|
76
|
+
max: 10,
|
|
77
|
+
of: {
|
|
78
|
+
type: 'group',
|
|
79
|
+
options: {
|
|
80
|
+
fields: [
|
|
81
|
+
{ key: 'url', type: 'url', label: { en: 'Address' }, required: true },
|
|
82
|
+
{ key: 'submissions', type: 'boolean', label: { en: 'Form submissions' } },
|
|
83
|
+
{ key: 'contacts', type: 'boolean', label: { en: 'Contacts' } },
|
|
84
|
+
{ key: 'deals', type: 'boolean', label: { en: 'Deals' } },
|
|
85
|
+
{ key: 'published', type: 'boolean', label: { en: 'Pages published and unpublished' } },
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
secrets: [
|
|
93
|
+
{
|
|
94
|
+
key: 'signingSecret',
|
|
95
|
+
label: { en: 'Signing secret' },
|
|
96
|
+
help: { en: 'Optional. With one saved, every message carries an X-Velocity-Signature header (sha256= and the HMAC of the body), so the other side can check it came from this site.' },
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
setup(cms) {
|
|
100
|
+
cms.tasks.define(SEND, async (payload, task) => {
|
|
101
|
+
if (!isDelivery(payload))
|
|
102
|
+
throw new Error('This delivery was kept in a form this version cannot read.');
|
|
103
|
+
const url = deliveryAddress(payload.url);
|
|
104
|
+
// A public name can lead to a machine beside the site. Where the site can look, it does.
|
|
105
|
+
if (!(await cms.net.isPublic(url.hostname)))
|
|
106
|
+
throw new Error(`${url.host} does not lead to a public address, so nothing is sent to it.`);
|
|
107
|
+
const body = JSON.stringify({ id: task.id, event: payload.event, createdAt: payload.at, data: payload.data });
|
|
108
|
+
const secret = await cms.secrets.get('signingSecret');
|
|
109
|
+
const headers = { 'content-type': 'application/json', 'user-agent': 'Velocity-CMS-Webhooks/1', 'x-velocity-event': payload.event, 'x-velocity-delivery': task.id };
|
|
110
|
+
if (secret !== undefined) {
|
|
111
|
+
const key = await globalThis.crypto.subtle.importKey('raw', new TextEncoder().encode(secret), { name: 'HMAC', hash: 'SHA-256' }, false, ['sign']);
|
|
112
|
+
headers['x-velocity-signature'] = `sha256=${toHex(new Uint8Array(await globalThis.crypto.subtle.sign('HMAC', key, new TextEncoder().encode(body))))}`;
|
|
113
|
+
}
|
|
114
|
+
let answer;
|
|
115
|
+
try {
|
|
116
|
+
// A redirect is not followed: it could lead where the address itself may not.
|
|
117
|
+
answer = await fetch(url, { method: 'POST', headers, body, redirect: 'manual', signal: AbortSignal.timeout(ANSWER_WITHIN_MS) });
|
|
118
|
+
}
|
|
119
|
+
catch {
|
|
120
|
+
// Why it failed can hold the address's query, which may be a key: only the host is said.
|
|
121
|
+
throw new Error(`${url.host} could not be reached within ${ANSWER_WITHIN_MS / 1000} seconds.`);
|
|
122
|
+
}
|
|
123
|
+
if (!answer.ok)
|
|
124
|
+
throw new Error(`${url.host} answered ${answer.status}. It must answer 2xx to accept a message.`);
|
|
125
|
+
});
|
|
126
|
+
/** Asks for one delivery to each address that wants this group. An address that may not be sent to is a fault, said under Plugins. */
|
|
127
|
+
const tell = async (group, event, data) => {
|
|
128
|
+
const at = new Date().toISOString();
|
|
129
|
+
let refused;
|
|
130
|
+
for (const endpoint of await endpointsOf(cms)) {
|
|
131
|
+
if (!endpoint.groups.includes(group))
|
|
132
|
+
continue;
|
|
133
|
+
try {
|
|
134
|
+
const { host } = deliveryAddress(endpoint.url);
|
|
135
|
+
const delivery = { url: endpoint.url, event, at, data };
|
|
136
|
+
await cms.tasks.add(SEND, delivery, { label: `${event} to ${host}` });
|
|
137
|
+
}
|
|
138
|
+
catch (error) {
|
|
139
|
+
refused ??= error;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
if (refused !== undefined)
|
|
143
|
+
throw refused;
|
|
144
|
+
};
|
|
145
|
+
/** An entry as other services know it: by the key of its type and its address part. */
|
|
146
|
+
const entryData = async (entry) => {
|
|
147
|
+
const type = await cms.schema.get(entry.typeId);
|
|
148
|
+
return { entry: { id: entry.id, type: type.key, locale: entry.locale, slug: entry.published?.slug ?? entry.slug, updatedAt: entry.updatedAt } };
|
|
149
|
+
};
|
|
150
|
+
// What looks like spam is kept in the inbox and told to nobody else.
|
|
151
|
+
cms.events.on('submission.received', ({ submission, form }) => (submission.status === 'spam' ? undefined : tell('submissions', 'submission.received', submissionData(form, submission))));
|
|
152
|
+
cms.events.on('contact.saved', ({ contact }) => tell('contacts', 'contact.saved', contactData(contact)));
|
|
153
|
+
// Someone who was forgotten: the other side is told who, so it can forget them too.
|
|
154
|
+
cms.events.on('contact.deleted', ({ contact }) => tell('contacts', 'contact.deleted', { contact: { id: contact.id, email: contact.email } }));
|
|
155
|
+
cms.events.on('deal.saved', ({ deal }) => tell('deals', 'deal.saved', dealData(deal)));
|
|
156
|
+
cms.events.on('deal.deleted', ({ deal }) => tell('deals', 'deal.deleted', { deal: { id: deal.id, contactId: deal.contactId } }));
|
|
157
|
+
cms.events.on('entry.published', async ({ entry }) => tell('published', 'entry.published', await entryData(entry)));
|
|
158
|
+
cms.events.on('entry.unpublished', async ({ entry }) => tell('published', 'entry.unpublished', await entryData(entry)));
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/webhooks/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,EAA0F,MAAM,0BAA0B,CAAC;AAE7K,2EAA2E;AAC3E,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,MAAM,IAAI,GAAG,MAAM,CAAC;AAEpB,8EAA8E;AAC9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AE,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC;QACjI,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,iBAAiB,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACpH,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,mBAAmB,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1H,CAAC;CACF,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velocity-astro/cms-plugins",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0-beta.1",
|
|
4
|
+
"description": "The plugins that come with Velocity CMS. Every site lists them under Plugins, switched off until an owner activates one.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/Velocity-Astro/velocity-cms.git",
|
|
10
|
+
"directory": "packages/cms-plugins"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://docs.deployvelocity.com/cms/",
|
|
13
|
+
"bugs": "https://github.com/Velocity-Astro/velocity-cms/issues",
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=22.23.4"
|
|
16
|
+
},
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"default": "./dist/index.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"!dist/**/*.test.*"
|
|
30
|
+
],
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@velocity-astro/cms-core": "0.1.0-beta.1"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@velocity-astro/cms-admin": "0.1.0-beta.1"
|
|
36
|
+
}
|
|
6
37
|
}
|