@reddoorla/maintenance 0.39.0 → 0.41.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/cli/bin.js +26 -0
- package/dist/cli/bin.js.map +1 -1
- package/dist/cli/commands/audit.js +26 -0
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/index.d.ts +24 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/bin.js
CHANGED
|
@@ -118,6 +118,7 @@ __export(websites_exports, {
|
|
|
118
118
|
isDashboardVisible: () => isDashboardVisible,
|
|
119
119
|
listWebsites: () => listWebsites,
|
|
120
120
|
mapRow: () => mapRow,
|
|
121
|
+
parseNotifyRouting: () => parseNotifyRouting,
|
|
121
122
|
siteSlug: () => siteSlug,
|
|
122
123
|
updateA11yCounts: () => updateA11yCounts,
|
|
123
124
|
updateAuditFields: () => updateAuditFields,
|
|
@@ -135,6 +136,28 @@ function trimToNull(raw) {
|
|
|
135
136
|
const trimmed = raw.trim();
|
|
136
137
|
return trimmed.length > 0 ? trimmed : null;
|
|
137
138
|
}
|
|
139
|
+
function parseNotifyRouting(raw) {
|
|
140
|
+
if (typeof raw !== "string") return null;
|
|
141
|
+
const trimmed = raw.trim();
|
|
142
|
+
if (!trimmed) return null;
|
|
143
|
+
let parsed;
|
|
144
|
+
try {
|
|
145
|
+
parsed = JSON.parse(trimmed);
|
|
146
|
+
} catch {
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return null;
|
|
150
|
+
const o = parsed;
|
|
151
|
+
if (typeof o.field !== "string" || !o.field.trim()) return null;
|
|
152
|
+
if (!o.routes || typeof o.routes !== "object" || Array.isArray(o.routes)) return null;
|
|
153
|
+
const routing = {
|
|
154
|
+
field: o.field,
|
|
155
|
+
routes: o.routes
|
|
156
|
+
};
|
|
157
|
+
if (o.default !== void 0) routing.default = o.default;
|
|
158
|
+
if (Array.isArray(o.cc)) routing.cc = o.cc.filter((x) => typeof x === "string");
|
|
159
|
+
return routing;
|
|
160
|
+
}
|
|
138
161
|
function isDashboardVisible(site) {
|
|
139
162
|
return site.status !== null && ACTIVE_STATUSES.has(site.status);
|
|
140
163
|
}
|
|
@@ -177,6 +200,9 @@ function mapRow(rec) {
|
|
|
177
200
|
copyFooter: trimToNull(f["Copy \u2014 Footer"]),
|
|
178
201
|
launchedAt: f["Launched at"] ?? null,
|
|
179
202
|
newsletterWebhook: trimToNull(f["Newsletter Webhook"]),
|
|
203
|
+
notifyRouting: parseNotifyRouting(f["Notify Routing"]),
|
|
204
|
+
mailchimpApiKey: trimToNull(f["Mailchimp API Key"]),
|
|
205
|
+
mailchimpAudienceId: trimToNull(f["Mailchimp Audience ID"]),
|
|
180
206
|
renovateFailingCis: f["Renovate Failing CIs"] ?? null,
|
|
181
207
|
defaultBranchCi: f["Default Branch CI"] ?? null,
|
|
182
208
|
lastCommitAt: f["Last Commit At"] ?? null,
|