@reddoorla/maintenance 0.43.0 → 0.45.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 +41 -19
- package/dist/cli/bin.js.map +1 -1
- package/dist/index.js +23 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/bin.js
CHANGED
|
@@ -577,7 +577,9 @@ var init_write_audits_to_airtable = __esm({
|
|
|
577
577
|
|
|
578
578
|
// src/reports/checklist.ts
|
|
579
579
|
function checklistFor(type) {
|
|
580
|
-
|
|
580
|
+
if (type === "Maintenance") return MAINTENANCE_CHECKLIST;
|
|
581
|
+
if (type === "Testing") return [...MAINTENANCE_CHECKLIST, ...TESTING_CHECKLIST];
|
|
582
|
+
return [];
|
|
581
583
|
}
|
|
582
584
|
function isChecklistComplete(report) {
|
|
583
585
|
return checklistFor(report.reportType).every((i) => report.checklist[i.field] === true);
|
|
@@ -587,20 +589,25 @@ var init_checklist = __esm({
|
|
|
587
589
|
"src/reports/checklist.ts"() {
|
|
588
590
|
"use strict";
|
|
589
591
|
MAINTENANCE_CHECKLIST = [
|
|
590
|
-
{ key: "
|
|
592
|
+
{ key: "deploy", label: "Deploy & Function Health", field: "Maint: Deploy & Function Health" },
|
|
591
593
|
{ key: "cms", label: "CMS Checked", field: "Maint: CMS Checked" },
|
|
592
|
-
{ key: "
|
|
594
|
+
{ key: "domain", label: "Domain, DNS & SSL", field: "Maint: Domain, DNS & SSL" },
|
|
593
595
|
{ key: "google", label: "Google Indexed", field: "Maint: Google Indexed" },
|
|
594
|
-
{ key: "
|
|
595
|
-
{ key: "
|
|
596
|
+
{ key: "security", label: "Security Updates", field: "Maint: Security Updates" },
|
|
597
|
+
{ key: "uptime", label: "Uptime Checked", field: "Maint: Uptime Checked" }
|
|
596
598
|
];
|
|
597
599
|
TESTING_CHECKLIST = [
|
|
598
600
|
{ key: "desktop", label: "Desktop Browsers", field: "Test: Desktop Browsers" },
|
|
599
601
|
{ key: "mobile", label: "Mobile Browsers", field: "Test: Mobile Browsers" },
|
|
600
|
-
{ key: "
|
|
601
|
-
{ key: "
|
|
602
|
+
{ key: "titles", label: "Page Titles & Meta", field: "Test: Page Titles & Meta" },
|
|
603
|
+
{ key: "links", label: "Links & Navigation", field: "Test: Links & Navigation" },
|
|
602
604
|
{ key: "forms", label: "Form Functionality", field: "Test: Form Functionality" },
|
|
603
|
-
{
|
|
605
|
+
{
|
|
606
|
+
key: "interactions",
|
|
607
|
+
label: "Interactions & Animations",
|
|
608
|
+
field: "Test: Interactions & Animations"
|
|
609
|
+
},
|
|
610
|
+
{ key: "updates", label: "Verified After Updates", field: "Test: Verified After Updates" }
|
|
604
611
|
];
|
|
605
612
|
ALL_CHECKLIST_FIELDS = [...MAINTENANCE_CHECKLIST, ...TESTING_CHECKLIST].map(
|
|
606
613
|
(i) => i.field
|
|
@@ -786,21 +793,22 @@ var init_copy = __esm({
|
|
|
786
793
|
DEFAULT_COPY = {
|
|
787
794
|
maintenanceIntro: "Includes checking the hosting, DNS, Content Management System (CMS, if applicable), search indexing and security of the site for major flaws and updating as necessary.",
|
|
788
795
|
maintenanceChecks: [
|
|
789
|
-
"
|
|
796
|
+
"Deploy & Function Health",
|
|
790
797
|
"CMS Checked",
|
|
791
|
-
"DNS
|
|
798
|
+
"Domain, DNS & SSL",
|
|
792
799
|
"Google Indexed",
|
|
793
|
-
"
|
|
794
|
-
"
|
|
800
|
+
"Security Updates",
|
|
801
|
+
"Uptime Checked"
|
|
795
802
|
],
|
|
796
803
|
testingIntro: "Testing includes checks similar to those at launch: testing on common browsers and operating systems, at different screen sizes, and checking every function, and updating all packages for performance rather than just those needed for security.",
|
|
797
804
|
testingChecklist: [
|
|
798
805
|
"Desktop Browsers",
|
|
799
806
|
"Mobile Browsers",
|
|
800
|
-
"
|
|
801
|
-
"
|
|
807
|
+
"Page Titles & Meta",
|
|
808
|
+
"Links & Navigation",
|
|
802
809
|
"Form Functionality",
|
|
803
|
-
"
|
|
810
|
+
"Interactions & Animations",
|
|
811
|
+
"Verified After Updates"
|
|
804
812
|
],
|
|
805
813
|
notesHeader: "NOTES",
|
|
806
814
|
seoCta: "Contact us if you are interested in more in-depth data or have questions about SEO.",
|
|
@@ -5959,6 +5967,17 @@ async function derivePeriodStart(base, siteRow, reportType, today) {
|
|
|
5959
5967
|
}
|
|
5960
5968
|
|
|
5961
5969
|
// src/cli/commands/report.ts
|
|
5970
|
+
function parseSingleSiteReportType(raw) {
|
|
5971
|
+
if (raw === void 0 || raw.trim() === "") return "Maintenance";
|
|
5972
|
+
const norm = raw.trim().toLowerCase();
|
|
5973
|
+
if (norm === "maintenance") return "Maintenance";
|
|
5974
|
+
if (norm === "testing") return "Testing";
|
|
5975
|
+
const hint = norm === "launch" ? " \u2014 use the `launch <site>` command" : norm === "announcement" ? " \u2014 use the `announce <site>` command" : "";
|
|
5976
|
+
throw Object.assign(
|
|
5977
|
+
new Error(`--type must be Maintenance or Testing (got ${JSON.stringify(raw)})${hint}`),
|
|
5978
|
+
{ exitCode: 2 }
|
|
5979
|
+
);
|
|
5980
|
+
}
|
|
5962
5981
|
function dashboardBaseUrl() {
|
|
5963
5982
|
return process.env.DASHBOARD_BASE_URL?.trim() || "https://reddoor-maintenance.netlify.app";
|
|
5964
5983
|
}
|
|
@@ -5975,10 +5994,13 @@ async function runReportCommand(slug, opts) {
|
|
|
5975
5994
|
return runDueDraft();
|
|
5976
5995
|
}
|
|
5977
5996
|
if (slug) {
|
|
5978
|
-
|
|
5997
|
+
const reportType = parseSingleSiteReportType(opts.type);
|
|
5998
|
+
return runSingleSiteDraft(slug, { previewOnly: Boolean(opts.preview), reportType });
|
|
5979
5999
|
}
|
|
5980
6000
|
throw Object.assign(
|
|
5981
|
-
new Error(
|
|
6001
|
+
new Error(
|
|
6002
|
+
"Usage: reddoor-maint report [<slug>] [--type <Maintenance|Testing>] [--due] [--preview] [--send-ready] [--digest]"
|
|
6003
|
+
),
|
|
5982
6004
|
{
|
|
5983
6005
|
exitCode: 2
|
|
5984
6006
|
}
|
|
@@ -6059,7 +6081,7 @@ async function runSingleSiteDraft(slug, opts) {
|
|
|
6059
6081
|
if (!site) {
|
|
6060
6082
|
throw Object.assign(new Error(`No Websites row matched slug "${slug}"`), { exitCode: 2 });
|
|
6061
6083
|
}
|
|
6062
|
-
const result = await draftReportForSite(opts.previewOnly ? null : base, site,
|
|
6084
|
+
const result = await draftReportForSite(opts.previewOnly ? null : base, site, opts.reportType, {
|
|
6063
6085
|
previewOnly: opts.previewOnly
|
|
6064
6086
|
});
|
|
6065
6087
|
if (opts.previewOnly) {
|
|
@@ -6778,7 +6800,7 @@ cli.command(
|
|
|
6778
6800
|
).action(
|
|
6779
6801
|
async (site, opts) => runOrExit(() => runAnnounceCommand(site, opts), opts)
|
|
6780
6802
|
);
|
|
6781
|
-
cli.command("report [site]", "Draft or send maintenance/testing reports.").option("--due", "Scan all Websites and draft overdue reports.").option(
|
|
6803
|
+
cli.command("report [site]", "Draft or send maintenance/testing reports.").option("--due", "Scan all Websites and draft overdue reports.").option("--type <type>", "Single-site draft report type: Maintenance (default) or Testing.").option(
|
|
6782
6804
|
"--preview",
|
|
6783
6805
|
"Single-site dry run; writes reports/<slug>/draft.html, never touches Airtable."
|
|
6784
6806
|
).option(
|