@reddoorla/maintenance 0.10.6 → 0.11.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 CHANGED
@@ -38,6 +38,7 @@ __export(websites_exports, {
38
38
  WEBSITES_TABLE: () => WEBSITES_TABLE,
39
39
  getWebsiteBySlug: () => getWebsiteBySlug,
40
40
  listWebsites: () => listWebsites,
41
+ mapRow: () => mapRow,
41
42
  siteSlug: () => siteSlug,
42
43
  updateScores: () => updateScores
43
44
  });
@@ -66,7 +67,13 @@ function mapRow(rec) {
66
67
  rScore: f["rScore"] ?? null,
67
68
  bpScore: f["bpScore"] ?? null,
68
69
  seoScore: f["seoScore"] ?? null,
69
- lastLighthouseAuditAt: f["Last lighthouse audit at"] ?? null
70
+ lastLighthouseAuditAt: f["Last lighthouse audit at"] ?? null,
71
+ dashboardToken: (() => {
72
+ const raw = f["Dashboard Token"];
73
+ if (typeof raw !== "string") return null;
74
+ const trimmed = raw.trim();
75
+ return trimmed.length > 0 ? trimmed : null;
76
+ })()
70
77
  };
71
78
  }
72
79
  async function listWebsites(base) {
@@ -1325,7 +1332,6 @@ async function lighthouseAudit(ctx) {
1325
1332
 
1326
1333
  // src/audits/a11y.ts
1327
1334
  import { readFile as readFile5, writeFile as writeFile2, mkdtemp as mkdtemp2, rm as rm2 } from "fs/promises";
1328
- import { tmpdir as tmpdir2 } from "os";
1329
1335
  import { join as join5 } from "path";
1330
1336
 
1331
1337
  // src/configs/playwright-a11y.ts
@@ -1451,7 +1457,7 @@ async function a11yAudit(ctx) {
1451
1457
  const spawn2 = ctx.spawn ?? defaultSpawn;
1452
1458
  const site = ctx.site;
1453
1459
  const label = siteLabel(site);
1454
- const specDir = await mkdtemp2(join5(tmpdir2(), "reddoor-a11y-spec-"));
1460
+ const specDir = await mkdtemp2(join5(site.path, ".reddoor-a11y-spec-"));
1455
1461
  const specPath = join5(specDir, "a11y.spec.ts");
1456
1462
  await writeFile2(specPath, buildSpec(), "utf-8");
1457
1463
  const port = await findFreePort();