@reddoorla/maintenance 0.47.0 → 0.49.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 +334 -235
- package/dist/cli/bin.js.map +1 -1
- package/dist/cli/commands/audit.js +7 -3
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.js +254 -208
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -122,6 +122,9 @@ function parseNotifyRouting(raw) {
|
|
|
122
122
|
function isDashboardVisible(site) {
|
|
123
123
|
return site.status !== null && ACTIVE_STATUSES.has(site.status);
|
|
124
124
|
}
|
|
125
|
+
function toFrequency(raw) {
|
|
126
|
+
return typeof raw === "string" && FREQUENCIES.includes(raw) ? raw : "None";
|
|
127
|
+
}
|
|
125
128
|
function mapRow(rec) {
|
|
126
129
|
const f = rec.fields;
|
|
127
130
|
const attachments = f["Header image"] ?? [];
|
|
@@ -132,8 +135,8 @@ function mapRow(rec) {
|
|
|
132
135
|
url: String(f["url"] ?? ""),
|
|
133
136
|
status: f["Status"] ?? null,
|
|
134
137
|
pointOfContact: f["point of contact"] ?? null,
|
|
135
|
-
maintenanceFreq: f["maintenence freq"]
|
|
136
|
-
testingFreq: f["testing freq"]
|
|
138
|
+
maintenanceFreq: toFrequency(f["maintenence freq"]),
|
|
139
|
+
testingFreq: toFrequency(f["testing freq"]),
|
|
137
140
|
maintenanceDay: f["maintenance day"] ?? null,
|
|
138
141
|
testingDay: f["testing day"] ?? null,
|
|
139
142
|
ga4PropertyId: f["GA4 property ID"] ?? null,
|
|
@@ -256,7 +259,7 @@ async function updateLaunched(base, recordId, at) {
|
|
|
256
259
|
const fields = { Status: "maintenance", "Launched at": at };
|
|
257
260
|
await base(WEBSITES_TABLE).update([{ id: recordId, fields }]);
|
|
258
261
|
}
|
|
259
|
-
var WEBSITES_TABLE, ACTIVE_STATUSES;
|
|
262
|
+
var WEBSITES_TABLE, ACTIVE_STATUSES, FREQUENCIES;
|
|
260
263
|
var init_websites = __esm({
|
|
261
264
|
"src/reports/airtable/websites.ts"() {
|
|
262
265
|
"use strict";
|
|
@@ -265,6 +268,7 @@ var init_websites = __esm({
|
|
|
265
268
|
"maintenance",
|
|
266
269
|
"launch period"
|
|
267
270
|
]);
|
|
271
|
+
FREQUENCIES = ["None", "Monthly", "Quarterly", "Yearly"];
|
|
268
272
|
}
|
|
269
273
|
});
|
|
270
274
|
|