@reddoorla/maintenance 0.96.0 → 0.97.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/README.md +5 -6
- package/dist/{announce-45HVP4J4.js → announce-5ZD2SBGD.js} +39 -31
- package/dist/announce-5ZD2SBGD.js.map +1 -0
- package/dist/attachments-JFGFQRXQ.js +10 -0
- package/dist/{blux-RUFMNOUJ.js → blux-NXQLMS4W.js} +5 -5
- package/dist/{bump-deps-EL3TKMIL.js → bump-deps-775VLDYB.js} +6 -6
- package/dist/{chunk-IMYL67JV.js → chunk-3RLDX3Q2.js} +5 -5
- package/dist/{chunk-CA6ADGOC.js → chunk-6PGXKN6F.js} +2 -2
- package/dist/{chunk-Y5BVR4HW.js → chunk-6THEZQLA.js} +3 -3
- package/dist/chunk-ASLDCWBF.js +41 -0
- package/dist/chunk-ASLDCWBF.js.map +1 -0
- package/dist/{chunk-DVJNYPFR.js → chunk-AYDQQBNG.js} +2 -2
- package/dist/{chunk-GEUC5VGM.js → chunk-BINFZQ2T.js} +49 -4
- package/dist/chunk-BINFZQ2T.js.map +1 -0
- package/dist/{chunk-72FJZ6LO.js → chunk-DRNZVORX.js} +26 -22
- package/dist/chunk-DRNZVORX.js.map +1 -0
- package/dist/{chunk-SHGIDTYF.js → chunk-DYTYPKFN.js} +2 -2
- package/dist/{chunk-NVLREB5R.js → chunk-EN6CTBUN.js} +7 -7
- package/dist/{chunk-ZH5LOQET.js → chunk-FHFXJ3EM.js} +7 -5
- package/dist/chunk-FHFXJ3EM.js.map +1 -0
- package/dist/{chunk-H445EH33.js → chunk-FP6HOW6J.js} +10 -7
- package/dist/chunk-FP6HOW6J.js.map +1 -0
- package/dist/{chunk-RRE74VWI.js → chunk-HSMN35LU.js} +2 -2
- package/dist/chunk-ICSRWW5Q.js +148 -0
- package/dist/chunk-ICSRWW5Q.js.map +1 -0
- package/dist/{chunk-XG2A6GIG.js → chunk-IDBPII6G.js} +4 -4
- package/dist/{chunk-XG2A6GIG.js.map → chunk-IDBPII6G.js.map} +1 -1
- package/dist/{chunk-T76MA2FH.js → chunk-IOTOOTII.js} +12 -1
- package/dist/{chunk-T76MA2FH.js.map → chunk-IOTOOTII.js.map} +1 -1
- package/dist/{chunk-ECDJDHKT.js → chunk-JHJNNJLG.js} +2 -2
- package/dist/{chunk-XY7YV2YQ.js → chunk-L3S3QZXL.js} +2 -2
- package/dist/{chunk-XED2DNAI.js → chunk-LAG6IP7Y.js} +7 -7
- package/dist/{chunk-P4A6D6HO.js → chunk-LDHRIQUW.js} +32 -18
- package/dist/chunk-LDHRIQUW.js.map +1 -0
- package/dist/{chunk-UIITN37J.js → chunk-LF2TJN4X.js} +2 -2
- package/dist/chunk-LF2TJN4X.js.map +1 -0
- package/dist/{chunk-SQ4FSNYL.js → chunk-LUF52EIY.js} +2 -2
- package/dist/{chunk-MZZDMBDT.js → chunk-LZMAG73U.js} +19 -19
- package/dist/chunk-LZMAG73U.js.map +1 -0
- package/dist/{chunk-6INOBNRO.js → chunk-MMSMZC7S.js} +2 -2
- package/dist/{chunk-CGQZFQAY.js → chunk-MVKNU4QD.js} +2 -3
- package/dist/chunk-MVKNU4QD.js.map +1 -0
- package/dist/{chunk-62YWOFVN.js → chunk-PARKXDXI.js} +3 -3
- package/dist/{chunk-62YWOFVN.js.map → chunk-PARKXDXI.js.map} +1 -1
- package/dist/{chunk-44SDGPGQ.js → chunk-PZZ6HM5T.js} +3 -3
- package/dist/chunk-RQJFGK3A.js +51 -0
- package/dist/chunk-RQJFGK3A.js.map +1 -0
- package/dist/{chunk-KN52PM63.js → chunk-TC4GANMX.js} +47 -149
- package/dist/chunk-TC4GANMX.js.map +1 -0
- package/dist/{chunk-F3JWOPTG.js → chunk-TEMQPSCM.js} +45 -105
- package/dist/chunk-TEMQPSCM.js.map +1 -0
- package/dist/{chunk-4UTJ4G6P.js → chunk-TJLKWQOX.js} +2 -2
- package/dist/{chunk-VEIIUCYL.js → chunk-TV76A6GN.js} +2 -2
- package/dist/{chunk-D3CTOCUR.js → chunk-TVZ6QCOE.js} +3 -3
- package/dist/{chunk-3EA43S3R.js → chunk-U2ZI6G7H.js} +12 -12
- package/dist/chunk-UPE6D4AT.js +69 -0
- package/dist/chunk-UPE6D4AT.js.map +1 -0
- package/dist/{chunk-OTEVKRAH.js → chunk-VMGHQUTV.js} +7 -16
- package/dist/chunk-VMGHQUTV.js.map +1 -0
- package/dist/chunk-VQMAAQ5M.js +53 -0
- package/dist/chunk-VQMAAQ5M.js.map +1 -0
- package/dist/{chunk-EASYCD6F.js → chunk-WMF5S2MB.js} +1 -1
- package/dist/{chunk-EASYCD6F.js.map → chunk-WMF5S2MB.js.map} +1 -1
- package/dist/{chunk-37B4LVB3.js → chunk-X56LAKPR.js} +3 -3
- package/dist/chunk-X56LAKPR.js.map +1 -0
- package/dist/{chunk-IY6256GK.js → chunk-YJBSB4LP.js} +6 -1
- package/dist/chunk-YJBSB4LP.js.map +1 -0
- package/dist/{chunk-EQQ4H6L3.js → chunk-YXWBM26P.js} +2 -2
- package/dist/cli/bin.js +92 -50
- package/dist/cli/bin.js.map +1 -1
- package/dist/cli/commands/audit.d.ts +33 -3
- package/dist/cli/commands/audit.js +25 -22
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/client-DGTO65WB.js +11 -0
- package/dist/{convert-to-pnpm-4DON7IFS.js → convert-to-pnpm-KLWA53N5.js} +6 -6
- package/dist/{db-5K4CDEGJ.js → db-II5WAK4D.js} +13 -13
- package/dist/{digest-5AJGWS33.js → digest-CWKK2DMR.js} +28 -27
- package/dist/digest-CWKK2DMR.js.map +1 -0
- package/dist/{digest-collectors-MC5NWEUA.js → digest-collectors-CYTN2EUX.js} +15 -12
- package/dist/ensure-site-2QZHFVQ3.js +70 -0
- package/dist/ensure-site-2QZHFVQ3.js.map +1 -0
- package/dist/ensure-site-JEKV2ODE.js +105 -0
- package/dist/ensure-site-JEKV2ODE.js.map +1 -0
- package/dist/{ensure-site-XESZHZEB.js → ensure-site-OO4UPWNQ.js} +19 -42
- package/dist/ensure-site-OO4UPWNQ.js.map +1 -0
- package/dist/fleet-events-CkOZpMVC.d.ts +435 -0
- package/dist/{fleet-state-GJWGKTLD.js → fleet-state-RJROYXKO.js} +17 -7
- package/dist/{forms-notify-target-4NPLX2UG.js → forms-notify-target-X6UEOI2M.js} +17 -13
- package/dist/forms-notify-target-X6UEOI2M.js.map +1 -0
- package/dist/{github-signals-DMU74SAX.js → github-signals-QIRTHHET.js} +20 -15
- package/dist/github-signals-QIRTHHET.js.map +1 -0
- package/dist/{header-image-BRTOLHJF.js → header-image-H7ZJAV26.js} +13 -17
- package/dist/header-image-H7ZJAV26.js.map +1 -0
- package/dist/{health-endpoint-UCLMSSCN.js → health-endpoint-BJ6BKRHF.js} +7 -7
- package/dist/{health-mirror-ONRT4DQ5.js → health-mirror-KU3G7V2Y.js} +10 -10
- package/dist/{import-airtable-IIK2QUUF.js → import-airtable-UBF5GYAL.js} +3 -3
- package/dist/index.d.ts +102 -494
- package/dist/index.js +60 -49
- package/dist/index.js.map +1 -1
- package/dist/{init-3LMZTCVD.js → init-GOWDA5QS.js} +15 -15
- package/dist/{launch-XTDMC6LD.js → launch-7N3X2MXB.js} +36 -34
- package/dist/launch-7N3X2MXB.js.map +1 -0
- package/dist/lighthouse-airtable-M45OPVRV.js +14 -0
- package/dist/{chunk-IHHAYXKY.js → match-harness-GBCDSVPS.js} +70 -4
- package/dist/match-harness-GBCDSVPS.js.map +1 -0
- package/dist/migrate-XZ7U5DFC.js +7 -0
- package/dist/notify-K3WVH3DM.js +1 -1
- package/dist/{onboard-CZYBWVWH.js → onboard-JQQIMQW7.js} +6 -6
- package/dist/{orchestrate-TGDFGY52.js → orchestrate-L2A5BZFY.js} +13 -10
- package/dist/parity-2JGVUCZD.js +14 -0
- package/dist/{preflight-POZZI3GN.js → preflight-O7Q6FWHU.js} +35 -11
- package/dist/preflight-O7Q6FWHU.js.map +1 -0
- package/dist/{prismic-ci-AHY5ULJR.js → prismic-ci-NAPWOXXD.js} +11 -11
- package/dist/prismic-ci-NAPWOXXD.js.map +1 -0
- package/dist/{prismic-models-URYGODNY.js → prismic-models-LL6ORTQ2.js} +19 -16
- package/dist/prismic-models-LL6ORTQ2.js.map +1 -0
- package/dist/{prospect-audit-AJEE3Z4L.js → prospect-audit-FMPGQIRQ.js} +2 -2
- package/dist/{protection-audit-3J3UEOVT.js → protection-audit-YXJKFU6O.js} +3 -3
- package/dist/{protection-audit-3J3UEOVT.js.map → protection-audit-YXJKFU6O.js.map} +1 -1
- package/dist/recipes/sync-configs.js +3 -3
- package/dist/{render-from-row-65DC6ZP3.js → render-from-row-75JTED2Z.js} +6 -4
- package/dist/{renovate-dispatch-ONJMBUHJ.js → renovate-dispatch-2IHAZDVA.js} +13 -8
- package/dist/{renovate-dispatch-ONJMBUHJ.js.map → renovate-dispatch-2IHAZDVA.js.map} +1 -1
- package/dist/{report-RC5LGPU3.js → report-IAHXN5CW.js} +102 -58
- package/dist/report-IAHXN5CW.js.map +1 -0
- package/dist/{report-mirror-KKZZ6RMZ.js → report-mirror-4QM57LMS.js} +28 -10
- package/dist/report-mirror-4QM57LMS.js.map +1 -0
- package/dist/roster-GDNSIRAK.js +19 -0
- package/dist/roster-GDNSIRAK.js.map +1 -0
- package/dist/{self-updating-RKKIYNV4.js → self-updating-ZUWPGYUP.js} +7 -7
- package/dist/{selftest-AFLR7YV7.js → selftest-G4W3LIBQ.js} +21 -17
- package/dist/{selftest-AFLR7YV7.js.map → selftest-G4W3LIBQ.js.map} +1 -1
- package/dist/site-create-ZU3ACBTO.js +45 -0
- package/dist/site-create-ZU3ACBTO.js.map +1 -0
- package/dist/{site-mirror-H2FYMN55.js → site-mirror-WR7ACXOV.js} +10 -10
- package/dist/site-mirror-WR7ACXOV.js.map +1 -0
- package/dist/{smoke-suite-BWHR3XX5.js → smoke-suite-WAUPI6EJ.js} +7 -7
- package/dist/{submissions-II5J35QM.js → submissions-2SHCFOKD.js} +11 -6
- package/dist/submissions-2SHCFOKD.js.map +1 -0
- package/dist/{svelte-codemods-QWGIRNN6.js → svelte-codemods-VOLOKKFI.js} +6 -6
- package/dist/{sync-NKPDCMYW.js → sync-F4USL4K5.js} +6 -6
- package/dist/{sync-configs-HGLQV55H.js → sync-configs-OXSWKVZ2.js} +6 -6
- package/dist/turso-KQKBBQCK.js +24 -0
- package/dist/turso-KQKBBQCK.js.map +1 -0
- package/dist/{upgrade-WZ44IARG.js → upgrade-EVAL3JTO.js} +6 -6
- package/dist/util/git.d.ts +1 -1
- package/dist/util/git.js +1 -1
- package/dist/{websites-6DHIHJ2D.js → websites-Y6FN2XFD.js} +26 -21
- package/dist/{write-audits-to-airtable-BIK6LNVC.js → write-audits-to-airtable-TI3JMWSY.js} +6 -4
- package/package.json +1 -1
- package/dist/airtable-SJV4ZSMS.js +0 -9
- package/dist/announce-45HVP4J4.js.map +0 -1
- package/dist/attachments-NLZIJ5NU.js +0 -9
- package/dist/chunk-37B4LVB3.js.map +0 -1
- package/dist/chunk-72FJZ6LO.js.map +0 -1
- package/dist/chunk-74QRWE6G.js +0 -53
- package/dist/chunk-74QRWE6G.js.map +0 -1
- package/dist/chunk-CGQZFQAY.js.map +0 -1
- package/dist/chunk-F3JWOPTG.js.map +0 -1
- package/dist/chunk-GEUC5VGM.js.map +0 -1
- package/dist/chunk-H445EH33.js.map +0 -1
- package/dist/chunk-IHHAYXKY.js.map +0 -1
- package/dist/chunk-IY6256GK.js.map +0 -1
- package/dist/chunk-KN52PM63.js.map +0 -1
- package/dist/chunk-MZZDMBDT.js.map +0 -1
- package/dist/chunk-OTEVKRAH.js.map +0 -1
- package/dist/chunk-P4A6D6HO.js.map +0 -1
- package/dist/chunk-UIITN37J.js.map +0 -1
- package/dist/chunk-YFAXOD7Z.js +0 -42
- package/dist/chunk-YFAXOD7Z.js.map +0 -1
- package/dist/chunk-ZH5LOQET.js.map +0 -1
- package/dist/client-L7NAUG6J.js +0 -11
- package/dist/digest-5AJGWS33.js.map +0 -1
- package/dist/ensure-site-XESZHZEB.js.map +0 -1
- package/dist/fleet-events-cF2Om88w.d.ts +0 -24
- package/dist/forms-notify-target-4NPLX2UG.js.map +0 -1
- package/dist/github-signals-DMU74SAX.js.map +0 -1
- package/dist/header-image-BRTOLHJF.js.map +0 -1
- package/dist/launch-XTDMC6LD.js.map +0 -1
- package/dist/lighthouse-airtable-3NOFB42B.js +0 -12
- package/dist/match-harness-OW45CB5H.js +0 -77
- package/dist/match-harness-OW45CB5H.js.map +0 -1
- package/dist/migrate-NE3DUMTM.js +0 -7
- package/dist/parity-AEKYSLN6.js +0 -14
- package/dist/preflight-POZZI3GN.js.map +0 -1
- package/dist/prismic-ci-AHY5ULJR.js.map +0 -1
- package/dist/prismic-models-URYGODNY.js.map +0 -1
- package/dist/report-RC5LGPU3.js.map +0 -1
- package/dist/report-mirror-KKZZ6RMZ.js.map +0 -1
- package/dist/site-mirror-H2FYMN55.js.map +0 -1
- package/dist/submissions-II5J35QM.js.map +0 -1
- package/dist/write-audits-to-airtable-BIK6LNVC.js.map +0 -1
- /package/dist/{airtable-SJV4ZSMS.js.map → attachments-JFGFQRXQ.js.map} +0 -0
- /package/dist/{blux-RUFMNOUJ.js.map → blux-NXQLMS4W.js.map} +0 -0
- /package/dist/{bump-deps-EL3TKMIL.js.map → bump-deps-775VLDYB.js.map} +0 -0
- /package/dist/{chunk-IMYL67JV.js.map → chunk-3RLDX3Q2.js.map} +0 -0
- /package/dist/{chunk-CA6ADGOC.js.map → chunk-6PGXKN6F.js.map} +0 -0
- /package/dist/{chunk-Y5BVR4HW.js.map → chunk-6THEZQLA.js.map} +0 -0
- /package/dist/{chunk-DVJNYPFR.js.map → chunk-AYDQQBNG.js.map} +0 -0
- /package/dist/{chunk-SHGIDTYF.js.map → chunk-DYTYPKFN.js.map} +0 -0
- /package/dist/{chunk-NVLREB5R.js.map → chunk-EN6CTBUN.js.map} +0 -0
- /package/dist/{chunk-RRE74VWI.js.map → chunk-HSMN35LU.js.map} +0 -0
- /package/dist/{chunk-ECDJDHKT.js.map → chunk-JHJNNJLG.js.map} +0 -0
- /package/dist/{chunk-XY7YV2YQ.js.map → chunk-L3S3QZXL.js.map} +0 -0
- /package/dist/{chunk-XED2DNAI.js.map → chunk-LAG6IP7Y.js.map} +0 -0
- /package/dist/{chunk-SQ4FSNYL.js.map → chunk-LUF52EIY.js.map} +0 -0
- /package/dist/{chunk-6INOBNRO.js.map → chunk-MMSMZC7S.js.map} +0 -0
- /package/dist/{chunk-44SDGPGQ.js.map → chunk-PZZ6HM5T.js.map} +0 -0
- /package/dist/{chunk-4UTJ4G6P.js.map → chunk-TJLKWQOX.js.map} +0 -0
- /package/dist/{chunk-VEIIUCYL.js.map → chunk-TV76A6GN.js.map} +0 -0
- /package/dist/{chunk-D3CTOCUR.js.map → chunk-TVZ6QCOE.js.map} +0 -0
- /package/dist/{chunk-3EA43S3R.js.map → chunk-U2ZI6G7H.js.map} +0 -0
- /package/dist/{chunk-EQQ4H6L3.js.map → chunk-YXWBM26P.js.map} +0 -0
- /package/dist/{attachments-NLZIJ5NU.js.map → client-DGTO65WB.js.map} +0 -0
- /package/dist/{convert-to-pnpm-4DON7IFS.js.map → convert-to-pnpm-KLWA53N5.js.map} +0 -0
- /package/dist/{db-5K4CDEGJ.js.map → db-II5WAK4D.js.map} +0 -0
- /package/dist/{client-L7NAUG6J.js.map → digest-collectors-CYTN2EUX.js.map} +0 -0
- /package/dist/{digest-collectors-MC5NWEUA.js.map → fleet-state-RJROYXKO.js.map} +0 -0
- /package/dist/{health-endpoint-UCLMSSCN.js.map → health-endpoint-BJ6BKRHF.js.map} +0 -0
- /package/dist/{health-mirror-ONRT4DQ5.js.map → health-mirror-KU3G7V2Y.js.map} +0 -0
- /package/dist/{fleet-state-GJWGKTLD.js.map → import-airtable-UBF5GYAL.js.map} +0 -0
- /package/dist/{init-3LMZTCVD.js.map → init-GOWDA5QS.js.map} +0 -0
- /package/dist/{import-airtable-IIK2QUUF.js.map → lighthouse-airtable-M45OPVRV.js.map} +0 -0
- /package/dist/{lighthouse-airtable-3NOFB42B.js.map → migrate-XZ7U5DFC.js.map} +0 -0
- /package/dist/{onboard-CZYBWVWH.js.map → onboard-JQQIMQW7.js.map} +0 -0
- /package/dist/{migrate-NE3DUMTM.js.map → orchestrate-L2A5BZFY.js.map} +0 -0
- /package/dist/{orchestrate-TGDFGY52.js.map → parity-2JGVUCZD.js.map} +0 -0
- /package/dist/{prospect-audit-AJEE3Z4L.js.map → prospect-audit-FMPGQIRQ.js.map} +0 -0
- /package/dist/{parity-AEKYSLN6.js.map → render-from-row-75JTED2Z.js.map} +0 -0
- /package/dist/{self-updating-RKKIYNV4.js.map → self-updating-ZUWPGYUP.js.map} +0 -0
- /package/dist/{smoke-suite-BWHR3XX5.js.map → smoke-suite-WAUPI6EJ.js.map} +0 -0
- /package/dist/{svelte-codemods-QWGIRNN6.js.map → svelte-codemods-VOLOKKFI.js.map} +0 -0
- /package/dist/{sync-NKPDCMYW.js.map → sync-F4USL4K5.js.map} +0 -0
- /package/dist/{sync-configs-HGLQV55H.js.map → sync-configs-OXSWKVZ2.js.map} +0 -0
- /package/dist/{upgrade-WZ44IARG.js.map → upgrade-EVAL3JTO.js.map} +0 -0
- /package/dist/{render-from-row-65DC6ZP3.js.map → websites-Y6FN2XFD.js.map} +0 -0
- /package/dist/{websites-6DHIHJ2D.js.map → write-audits-to-airtable-TI3JMWSY.js.map} +0 -0
|
@@ -5,20 +5,20 @@ import {
|
|
|
5
5
|
appendSkipNotice,
|
|
6
6
|
fleetWorkdir,
|
|
7
7
|
prepareFleetSites
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DYTYPKFN.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveSites
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-FP6HOW6J.js";
|
|
12
12
|
import {
|
|
13
13
|
convertToPnpm
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-AYDQQBNG.js";
|
|
15
|
+
import "./chunk-LUF52EIY.js";
|
|
16
16
|
import "./chunk-OTGB6YQO.js";
|
|
17
17
|
import "./chunk-Z3JXLULD.js";
|
|
18
18
|
import "./chunk-LBYOLBW7.js";
|
|
19
19
|
import "./chunk-RARREDQE.js";
|
|
20
20
|
import "./chunk-XXTZBPUY.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-WMF5S2MB.js";
|
|
22
22
|
|
|
23
23
|
// src/cli/commands/convert-to-pnpm.ts
|
|
24
24
|
import { resolve } from "path";
|
|
@@ -51,4 +51,4 @@ async function runConvertToPnpmCommand(site, opts) {
|
|
|
51
51
|
export {
|
|
52
52
|
runConvertToPnpmCommand
|
|
53
53
|
};
|
|
54
|
-
//# sourceMappingURL=convert-to-pnpm-
|
|
54
|
+
//# sourceMappingURL=convert-to-pnpm-KLWA53N5.js.map
|
|
@@ -10,9 +10,9 @@ function freezeGuardsDbWrite(action, force, authoritative) {
|
|
|
10
10
|
}
|
|
11
11
|
async function runDbCommand(action, opts, deps = {}) {
|
|
12
12
|
if (action === "migrate") {
|
|
13
|
-
const { readDbConfig } = await import("./client-
|
|
13
|
+
const { readDbConfig } = await import("./client-DGTO65WB.js");
|
|
14
14
|
const cfg = opts.url ? { url: opts.url } : readDbConfig();
|
|
15
|
-
const { runMigrations } = await import("./migrate-
|
|
15
|
+
const { runMigrations } = await import("./migrate-XZ7U5DFC.js");
|
|
16
16
|
const { createClient } = await import("@libsql/client");
|
|
17
17
|
const client = createClient(cfg.url === ":memory:" ? { url: ":memory:" } : cfg);
|
|
18
18
|
const ran = await runMigrations(client);
|
|
@@ -22,7 +22,7 @@ async function runDbCommand(action, opts, deps = {}) {
|
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
if (action === "replay-deadletters") {
|
|
25
|
-
const { readDbConfig, openDb } = await import("./client-
|
|
25
|
+
const { readDbConfig, openDb } = await import("./client-DGTO65WB.js");
|
|
26
26
|
if (opts.abandon !== void 0) {
|
|
27
27
|
const reason = (opts.reason ?? "").trim();
|
|
28
28
|
if (reason === "") {
|
|
@@ -44,8 +44,8 @@ async function runDbCommand(action, opts, deps = {}) {
|
|
|
44
44
|
}
|
|
45
45
|
const db = await openDb(opts.url ? { url: opts.url } : readDbConfig());
|
|
46
46
|
const { openBase, readAirtableConfig } = await import("./client-EPVO3FEH.js");
|
|
47
|
-
const { getWebsiteBySlug } = await import("./websites-
|
|
48
|
-
const { getSiteBySlug } = await import("./fleet-state-
|
|
47
|
+
const { getWebsiteBySlug } = await import("./websites-Y6FN2XFD.js");
|
|
48
|
+
const { getSiteBySlug } = await import("./fleet-state-RJROYXKO.js");
|
|
49
49
|
const { makeLazySiteLookup } = await import("./site-lookup-DTOLJ4EA.js");
|
|
50
50
|
const lookupSite = makeLazySiteLookup({
|
|
51
51
|
fromDb: (s) => getSiteBySlug(db, s),
|
|
@@ -112,7 +112,7 @@ async function runDbCommand(action, opts, deps = {}) {
|
|
|
112
112
|
const { TURSO_IS_AUTHORITATIVE } = await import("./freeze-GUQ43EAU.js");
|
|
113
113
|
const refused = freezeGuardsDbWrite(action, opts.force === true, TURSO_IS_AUTHORITATIVE);
|
|
114
114
|
if (refused) return refused;
|
|
115
|
-
const { readDbConfig, openDb } = await import("./client-
|
|
115
|
+
const { readDbConfig, openDb } = await import("./client-DGTO65WB.js");
|
|
116
116
|
const db = await openDb(opts.url ? { url: opts.url } : readDbConfig());
|
|
117
117
|
const { openBase, readAirtableConfig } = await import("./client-EPVO3FEH.js");
|
|
118
118
|
const base = openBase(readAirtableConfig());
|
|
@@ -126,7 +126,7 @@ async function runDbCommand(action, opts, deps = {}) {
|
|
|
126
126
|
now: () => /* @__PURE__ */ new Date()
|
|
127
127
|
};
|
|
128
128
|
if (action === "import-airtable") {
|
|
129
|
-
const { importFleetState, formatReapSummary } = await import("./import-airtable-
|
|
129
|
+
const { importFleetState, formatReapSummary } = await import("./import-airtable-UBF5GYAL.js");
|
|
130
130
|
const summary = await importFleetState(db, {
|
|
131
131
|
...io,
|
|
132
132
|
// Attachment bodies ride expiring signed URLs; a failed fetch imports the
|
|
@@ -153,7 +153,7 @@ async function runDbCommand(action, opts, deps = {}) {
|
|
|
153
153
|
return { output: lines.join("\n"), code: 0 };
|
|
154
154
|
}
|
|
155
155
|
if (action === "sync") {
|
|
156
|
-
const { syncFleetState, formatSyncResult } = await import("./sync-
|
|
156
|
+
const { syncFleetState, formatSyncResult } = await import("./sync-F4USL4K5.js");
|
|
157
157
|
const result2 = await syncFleetState(db, {
|
|
158
158
|
...io,
|
|
159
159
|
fetchAttachment: async (url) => {
|
|
@@ -170,12 +170,12 @@ async function runDbCommand(action, opts, deps = {}) {
|
|
|
170
170
|
code: result2.parity.mismatches.length > 0 ? 1 : 0
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
|
-
const { checkFleetParity, formatParityResult } = await import("./parity-
|
|
173
|
+
const { checkFleetParity, formatParityResult } = await import("./parity-2JGVUCZD.js");
|
|
174
174
|
const result = await checkFleetParity(db, io);
|
|
175
175
|
return { output: formatParityResult(result), code: result.mismatches.length > 0 ? 1 : 0 };
|
|
176
176
|
}
|
|
177
177
|
if (action === "backfill-header-images") {
|
|
178
|
-
const { readDbConfig, openDb } = await import("./client-
|
|
178
|
+
const { readDbConfig, openDb } = await import("./client-DGTO65WB.js");
|
|
179
179
|
const db = await openDb(opts.url ? { url: opts.url } : readDbConfig());
|
|
180
180
|
const { openBase, readAirtableConfig } = await import("./client-EPVO3FEH.js");
|
|
181
181
|
const base = openBase(readAirtableConfig());
|
|
@@ -197,7 +197,7 @@ async function runDbCommand(action, opts, deps = {}) {
|
|
|
197
197
|
return { output: formatBackfillResult(result), code: result.failed.length > 0 ? 1 : 0 };
|
|
198
198
|
}
|
|
199
199
|
if (action === "backfill-digest-state") {
|
|
200
|
-
const { readDbConfig, openDb } = await import("./client-
|
|
200
|
+
const { readDbConfig, openDb } = await import("./client-DGTO65WB.js");
|
|
201
201
|
const db = await openDb(opts.url ? { url: opts.url } : readDbConfig());
|
|
202
202
|
const { readDigestState: readTurso, writeDigestState: writeTurso } = await import("./digest-state-ZDPKR7MW.js");
|
|
203
203
|
const existing = await readTurso(db);
|
|
@@ -222,7 +222,7 @@ async function runDbCommand(action, opts, deps = {}) {
|
|
|
222
222
|
};
|
|
223
223
|
}
|
|
224
224
|
if (action === "dump") {
|
|
225
|
-
const { readDbConfig } = await import("./client-
|
|
225
|
+
const { readDbConfig } = await import("./client-DGTO65WB.js");
|
|
226
226
|
const cfg = opts.url ? { url: opts.url } : readDbConfig();
|
|
227
227
|
const { createClient } = await import("@libsql/client");
|
|
228
228
|
const client = createClient(cfg.url === ":memory:" ? { url: ":memory:" } : cfg);
|
|
@@ -375,4 +375,4 @@ export {
|
|
|
375
375
|
freezeGuardsDbWrite,
|
|
376
376
|
runDbCommand
|
|
377
377
|
};
|
|
378
|
-
//# sourceMappingURL=db-
|
|
378
|
+
//# sourceMappingURL=db-II5WAK4D.js.map
|
|
@@ -14,43 +14,46 @@ import {
|
|
|
14
14
|
collectRenovateAlerts,
|
|
15
15
|
collectTurnstileGuardrailAlerts,
|
|
16
16
|
collectVulnAlerts
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-PARKXDXI.js";
|
|
18
|
+
import "./chunk-VMGHQUTV.js";
|
|
19
19
|
import "./chunk-PZR4EBPY.js";
|
|
20
20
|
import {
|
|
21
21
|
isIdempotencyConflict
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-LDHRIQUW.js";
|
|
23
23
|
import {
|
|
24
|
-
isPendingApproval,
|
|
25
24
|
listAllReports
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-VAD43MOR.js";
|
|
25
|
+
} from "./chunk-TEMQPSCM.js";
|
|
28
26
|
import {
|
|
29
27
|
diffAttention,
|
|
30
28
|
writeDigestState
|
|
31
29
|
} from "./chunk-BRYXFH77.js";
|
|
32
|
-
import
|
|
30
|
+
import {
|
|
31
|
+
isPendingApproval
|
|
32
|
+
} from "./chunk-ASLDCWBF.js";
|
|
33
|
+
import "./chunk-VAD43MOR.js";
|
|
34
|
+
import "./chunk-YJBSB4LP.js";
|
|
33
35
|
import {
|
|
34
36
|
openBase,
|
|
35
37
|
readAirtableConfig
|
|
36
38
|
} from "./chunk-HN6I2XWI.js";
|
|
37
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-6THEZQLA.js";
|
|
38
40
|
import "./chunk-GECESMVS.js";
|
|
39
41
|
import "./chunk-KJGKZLCT.js";
|
|
40
42
|
import {
|
|
41
43
|
escapeHtml
|
|
42
44
|
} from "./chunk-BGTYPVLT.js";
|
|
43
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-LZMAG73U.js";
|
|
46
|
+
import "./chunk-TC4GANMX.js";
|
|
44
47
|
import {
|
|
45
|
-
listWebsites,
|
|
46
48
|
siteSlug
|
|
47
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-ICSRWW5Q.js";
|
|
50
|
+
import "./chunk-RQJFGK3A.js";
|
|
48
51
|
import {
|
|
49
52
|
defaultResendClient
|
|
50
53
|
} from "./chunk-WEKL2HYJ.js";
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
53
|
-
import "./chunk-
|
|
54
|
+
import "./chunk-YXWBM26P.js";
|
|
55
|
+
import "./chunk-MMSMZC7S.js";
|
|
56
|
+
import "./chunk-IOTOOTII.js";
|
|
54
57
|
import "./chunk-RARREDQE.js";
|
|
55
58
|
import "./chunk-6VAL7XJT.js";
|
|
56
59
|
|
|
@@ -150,7 +153,7 @@ async function listPendingApproval(base) {
|
|
|
150
153
|
async function fetchNotifyBounceCounts(now) {
|
|
151
154
|
try {
|
|
152
155
|
const [{ openDb, readDbConfig }, { countNotifyBouncedBySite }, { screenOutsSince }] = await Promise.all([
|
|
153
|
-
import("./client-
|
|
156
|
+
import("./client-DGTO65WB.js"),
|
|
154
157
|
import("./submissions-JDZP35JM.js"),
|
|
155
158
|
import("./screenouts-7P5GOZMV.js")
|
|
156
159
|
]);
|
|
@@ -164,7 +167,7 @@ async function fetchNotifyBounceCounts(now) {
|
|
|
164
167
|
async function fetchDeadLetterCounts() {
|
|
165
168
|
try {
|
|
166
169
|
const [{ openDb, readDbConfig }, { countUnreplayedDeadLettersBySlug }] = await Promise.all([
|
|
167
|
-
import("./client-
|
|
170
|
+
import("./client-DGTO65WB.js"),
|
|
168
171
|
import("./deadletter-G4M3HSVM.js")
|
|
169
172
|
]);
|
|
170
173
|
const db = await openDb(readDbConfig());
|
|
@@ -176,7 +179,7 @@ async function fetchDeadLetterCounts() {
|
|
|
176
179
|
}
|
|
177
180
|
async function readDigestStateFromDb() {
|
|
178
181
|
const [{ openDb, readDbConfig }, { readDigestState }] = await Promise.all([
|
|
179
|
-
import("./client-
|
|
182
|
+
import("./client-DGTO65WB.js"),
|
|
180
183
|
import("./digest-state-ZDPKR7MW.js")
|
|
181
184
|
]);
|
|
182
185
|
return readDigestState(await openDb(readDbConfig()));
|
|
@@ -190,7 +193,7 @@ async function writeRollupOnce(options, now) {
|
|
|
190
193
|
}
|
|
191
194
|
async function writeDigestStateToDb(next) {
|
|
192
195
|
const [{ openDb, readDbConfig }, { writeDigestState: writeDigestState2 }] = await Promise.all([
|
|
193
|
-
import("./client-
|
|
196
|
+
import("./client-DGTO65WB.js"),
|
|
194
197
|
import("./digest-state-ZDPKR7MW.js")
|
|
195
198
|
]);
|
|
196
199
|
await writeDigestState2(await openDb(readDbConfig()), next);
|
|
@@ -198,11 +201,11 @@ async function writeDigestStateToDb(next) {
|
|
|
198
201
|
async function writeCockpitRollupToDb(now) {
|
|
199
202
|
if (!process.env.TURSO_DATABASE_URL) return "absent";
|
|
200
203
|
const [{ openDb, readDbConfig }, { writeCockpitRollup }, screenouts, submissions, collectors] = await Promise.all([
|
|
201
|
-
import("./client-
|
|
204
|
+
import("./client-DGTO65WB.js"),
|
|
202
205
|
import("./digest-state-ZDPKR7MW.js"),
|
|
203
206
|
import("./screenouts-7P5GOZMV.js"),
|
|
204
207
|
import("./submissions-JDZP35JM.js"),
|
|
205
|
-
import("./digest-collectors-
|
|
208
|
+
import("./digest-collectors-CYTN2EUX.js")
|
|
206
209
|
]);
|
|
207
210
|
const db = await openDb(readDbConfig());
|
|
208
211
|
const SCREEN_OUT_WINDOW_DAYS = 30;
|
|
@@ -256,7 +259,7 @@ var SUBMISSIONS_DIGEST_WINDOW_MS = 24 * 60 * 60 * 1e3;
|
|
|
256
259
|
async function fetchSubmissionsDigestCounts(now) {
|
|
257
260
|
try {
|
|
258
261
|
const [{ openDb, readDbConfig }, { countSubmissionsSinceBySite }] = await Promise.all([
|
|
259
|
-
import("./client-
|
|
262
|
+
import("./client-DGTO65WB.js"),
|
|
260
263
|
import("./submissions-JDZP35JM.js")
|
|
261
264
|
]);
|
|
262
265
|
const db = await openDb(readDbConfig());
|
|
@@ -298,8 +301,7 @@ function runCollector(label, fn) {
|
|
|
298
301
|
}
|
|
299
302
|
}
|
|
300
303
|
async function collectAttention(deps) {
|
|
301
|
-
const reports
|
|
302
|
-
const websites = deps.websites ?? await listWebsites(deps.base);
|
|
304
|
+
const { reports, websites } = deps;
|
|
303
305
|
const now = deps.now ?? /* @__PURE__ */ new Date();
|
|
304
306
|
const notifyBounces = deps.notifyBounces ?? await fetchNotifyBounceCounts(now);
|
|
305
307
|
const deadLetters = deps.deadLetters ?? await fetchDeadLetterCounts();
|
|
@@ -338,8 +340,8 @@ async function runDigest(options) {
|
|
|
338
340
|
const today = options.now ?? /* @__PURE__ */ new Date();
|
|
339
341
|
try {
|
|
340
342
|
const base = options.base ?? openBase(readAirtableConfig());
|
|
341
|
-
const reports = await
|
|
342
|
-
const websites = await
|
|
343
|
+
const reports = await options.allReports();
|
|
344
|
+
const websites = await options.roster();
|
|
343
345
|
const sites = new Map(websites.map((w) => [w.id, w]));
|
|
344
346
|
const pending = reports.filter(isPendingApproval);
|
|
345
347
|
const readyForYourYes = [];
|
|
@@ -356,7 +358,6 @@ async function runDigest(options) {
|
|
|
356
358
|
});
|
|
357
359
|
}
|
|
358
360
|
const collected = await collectAttention({
|
|
359
|
-
base,
|
|
360
361
|
baseUrl: options.baseUrl,
|
|
361
362
|
websites,
|
|
362
363
|
reports,
|
|
@@ -447,4 +448,4 @@ export {
|
|
|
447
448
|
renderDigestHtml,
|
|
448
449
|
runDigest
|
|
449
450
|
};
|
|
450
|
-
//# sourceMappingURL=digest-
|
|
451
|
+
//# sourceMappingURL=digest-CWKK2DMR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/reports/digest.ts"],"sourcesContent":["// src/reports/digest.ts\nimport { openBase, readAirtableConfig, type AirtableBase } from \"./airtable/client.js\";\nimport { listAllReports, isPendingApproval } from \"./airtable/reports.js\";\nimport type { ReportRow } from \"./airtable/reports.js\";\nimport type { NotifyBounceCounts } from \"../db/submissions.js\";\nimport { siteSlug, type WebsiteRow } from \"../fleet/site-row.js\";\nimport { defaultResendClient, type ResendClient } from \"./send/resend.js\";\nimport { isIdempotencyConflict } from \"./send/idempotency.js\";\nimport {\n collectVulnAlerts,\n collectDeliveryFailures,\n collectPreflightBlocked,\n collectLighthouseAlerts,\n collectRenovateAlerts,\n collectCiAlerts,\n collectAnalyticsFailures,\n collectTurnstileGuardrailAlerts,\n collectNotifyBounceAlerts,\n collectDeadLetterAlerts,\n collectPrismicDriftAlerts,\n NOTIFY_BOUNCE_WINDOW_DAYS,\n} from \"../alerts/digest-collectors.js\";\nimport { diffAttention } from \"../alerts/digest-state.js\";\nimport {\n writeDigestState as writeAirtableDigestState,\n type DigestSnapshot,\n} from \"../alerts/digest-state.js\";\nimport { escapeHtml as esc } from \"../util/html.js\";\nimport { operatorEmail } from \"../util/operator.js\";\nimport type {\n AttentionItem,\n AttentionSeverity,\n AttentionStatus,\n ReadyItem,\n DigestSections,\n SubmissionsDigestSection,\n} from \"../alerts/attention.js\";\n// Type-only: erased at compile time, so the kysely/libsql devDependency never loads\n// in a consuming fleet site (the runtime read is the dynamic import in\n// fetchSubmissionsDigestCounts, same rule as fetchNotifyBounceCounts).\nimport type { SiteSubmissionCounts } from \"../db/submissions.js\";\n\n// The attention/digest contract lives in `../alerts/attention.ts` (a dependency-free\n// types module) so the `alerts/*` collectors can depend on it without importing back\n// from this renderer/IO module — see attention.ts for the cycle it breaks. Re-exported\n// here so existing `from \"./digest.js\"` type importers keep resolving.\nexport type {\n AttentionItem,\n AttentionSeverity,\n AttentionStatus,\n ReadyItem,\n DigestSections,\n SubmissionsDigestSection,\n} from \"../alerts/attention.js\";\n\nconst GREY = \"#757575\";\nconst RED = \"#C00\";\n\n/** Shared anchor style — Gmail does not inherit font-family into <a> tags. */\nconst ANCHOR_STYLE = `color:${RED};font-family:helvetica,sans-serif`;\n\nfunction readySection(items: ReadyItem[]): string {\n const heading = `<h2 style=\"color:${RED};font-family:helvetica,sans-serif;font-size:20px;font-weight:700;margin:32px 0 8px\">Ready for your yes</h2>`;\n if (items.length === 0) {\n return `${heading}<p style=\"color:${GREY};font-family:helvetica,sans-serif;font-size:16px;margin:0\">Nothing waiting on you.</p>`;\n }\n const rows = items\n .map((it) => {\n const safeUrl = it.dashboardUrl.startsWith(\"https://\") ? it.dashboardUrl : undefined;\n const link = safeUrl\n ? `<a href=\"${esc(safeUrl)}\" style=\"${ANCHOR_STYLE}\">review & approve</a>`\n : `review & approve`;\n return `\n <tr>\n <td style=\"color:${GREY};font-family:helvetica,sans-serif;font-size:16px;line-height:24px;padding-bottom:8px\">\n <strong style=\"color:#222\">${esc(it.siteName)}</strong> — ${esc(it.reportType)} (${esc(it.period)})\n — ${link}\n </td>\n </tr>`;\n })\n .join(\"\");\n return `${heading}<table role=\"presentation\" style=\"border-collapse:collapse;margin:0\">${rows}</table>`;\n}\n\nconst SEVERITY_ORDER: Record<AttentionSeverity, number> = { critical: 0, warning: 1 };\n\n/** Render the per-item status badge (\"NEW\"/\"WORSE\"); standing items get nothing. */\nfunction attentionBadge(status?: AttentionStatus): string {\n if (status === \"new\")\n return `<strong style=\"color:${RED};font-family:helvetica,sans-serif\">NEW</strong> `;\n if (status === \"worse\")\n return `<strong style=\"color:${RED};font-family:helvetica,sans-serif\">WORSE</strong> `;\n return \"\";\n}\n\nfunction attentionSection(items: AttentionItem[]): string {\n const heading = `<h2 style=\"color:${RED};font-family:helvetica,sans-serif;font-size:20px;font-weight:700;margin:32px 0 8px\">Needs attention</h2>`;\n if (items.length === 0) {\n return `${heading}<p style=\"color:${GREY};font-family:helvetica,sans-serif;font-size:16px;margin:0\">All clear — nothing needs attention.</p>`;\n }\n\n // Group by siteName, preserving first-seen site order; sort within a site by\n // severity (critical first).\n const bySite = new Map<string, AttentionItem[]>();\n for (const it of items) {\n const bucket = bySite.get(it.siteName);\n if (bucket) bucket.push(it);\n else bySite.set(it.siteName, [it]);\n }\n\n const groups = [...bySite.entries()]\n .map(([siteName, siteItems]) => {\n const sorted = [...siteItems].sort(\n (a, b) => SEVERITY_ORDER[a.severity] - SEVERITY_ORDER[b.severity],\n );\n const rows = sorted\n .map((it) => {\n const safeUrl = it.url?.startsWith(\"https://\") ? it.url : undefined;\n const titleHtml = safeUrl\n ? `<a href=\"${esc(safeUrl)}\" style=\"${ANCHOR_STYLE}\">${esc(it.title)}</a>`\n : esc(it.title);\n return `\n <tr>\n <td style=\"color:${GREY};font-family:helvetica,sans-serif;font-size:16px;line-height:24px;padding-bottom:8px\">${attentionBadge(it.status)}${titleHtml}</td>\n </tr>`;\n })\n .join(\"\");\n return `\n <tr>\n <td style=\"color:#222;font-family:helvetica,sans-serif;font-size:16px;font-weight:700;padding:8px 0 4px\">${esc(siteName)}</td>\n </tr>\n ${rows}`;\n })\n .join(\"\");\n\n return `${heading}<table role=\"presentation\" style=\"border-collapse:collapse;margin:0\">${groups}</table>`;\n}\n\n/** The \"Submissions (24h)\" telemetry block: fleet totals + a per-site glance line.\n * Context, not an alarm — absent/null section or all-zero totals render nothing\n * (no-noise), and the section never triggers a send on its own (see runDigest). */\nfunction submissionsSection(s: SubmissionsDigestSection | null | undefined): string {\n if (!s) return \"\";\n if (s.leads === 0 && s.signups === 0 && s.spamAuto === 0) return \"\";\n const heading = `<h2 style=\"color:${RED};font-family:helvetica,sans-serif;font-size:20px;font-weight:700;margin:32px 0 8px\">Submissions (24h)</h2>`;\n // All three terms always render together — omitting a zero term next to a nonzero\n // one reads as \"not measured\" rather than \"none\"; simplest honest form.\n const totals = [\n `${s.leads} new lead${s.leads === 1 ? \"\" : \"s\"}`,\n `${s.signups} newsletter/RSVP signup${s.signups === 1 ? \"\" : \"s\"}`,\n `${s.spamAuto} auto-filtered spam`,\n ].join(\" · \");\n const totalLine = `<p style=\"color:${GREY};font-family:helvetica,sans-serif;font-size:16px;margin:0\">${totals}</p>`;\n if (s.bySite.length === 0) return `${heading}${totalLine}`;\n const rows = s.bySite\n .map((site) => {\n const parts: string[] = [];\n if (site.leads > 0) parts.push(`${site.leads} lead${site.leads === 1 ? \"\" : \"s\"}`);\n if (site.signups > 0) parts.push(`${site.signups} signup${site.signups === 1 ? \"\" : \"s\"}`);\n if (site.spamAuto > 0) parts.push(`${site.spamAuto} auto-filtered`);\n return `\n <tr>\n <td style=\"color:${GREY};font-family:helvetica,sans-serif;font-size:16px;line-height:24px;padding-bottom:8px\">\n <strong style=\"color:#222\">${esc(site.siteName)}</strong> — ${parts.join(\" · \")}\n </td>\n </tr>`;\n })\n .join(\"\");\n return `${heading}${totalLine}<table role=\"presentation\" style=\"border-collapse:collapse;margin:8px 0 0\">${rows}</table>`;\n}\n\nconst FROM_ADDRESS = \"Reddoor Reports <reports@reddoorla.com>\";\n\n/** UTC \"YYYY-MM-DD\" — the Resend idempotency key suffix, so a same-day cron re-fire dedupes. */\nfunction digestDateKey(d: Date): string {\n return d.toISOString().slice(0, 10);\n}\n\n/**\n * The gate for \"Ready for your yes\": Draft ready ∧ ¬Approved to send ∧ Sent at BLANK.\n *\n * Implemented as `listAllReports(base).filter(...)` (the authorized deviation from the plan's\n * draft, which pre-dated Slice 1's merged fix): `listAllReports` already calls `mapRow`, which\n * handles `Period` correctly, so no local `rawToReportRow` duplicate is needed. The JS filter\n * does real work — the test fake does NOT evaluate `filterByFormula` — so correctness is\n * test-provable here.\n *\n * Exported: the fleet homepage (Task 3.5b) reuses it for the pending-approval count.\n */\nexport async function listPendingApproval(base: AirtableBase): Promise<ReportRow[]> {\n return (await listAllReports(base)).filter(isPendingApproval);\n}\n\n// ── collectAttention (IO wrapper, sibling to runDigest) ──────────────────────\n\nexport type CollectAttentionDeps = {\n /** Same baseUrl value runDigest threads; used for the /s/<slug> links. */\n baseUrl: string;\n /** The run's Websites rows. Read ONCE by runDigest — from Turso since #646\n * step 4 — and threaded in; collectAttention never opens a store of its own\n * for them. Required since that step: an optional array with a store-reading\n * fallback is how a test silently reaches a live base. */\n websites: WebsiteRow[];\n /** The run's Reports rows, on the same contract as `websites`. */\n reports: ReportRow[];\n /** Clock for the GitHub-signals staleness gate (collectCiAlerts /\n * collectRenovateAlerts skip a >3-day-stale sweep). Defaults to wall-clock;\n * runDigest threads its run-start `today` so a quiet repo's frozen CI/Renovate\n * signal stops badging once its sweep goes stale. */\n now?: Date;\n /** Pre-fetched per-site bounced-lead-notification counts (tests, or a caller with\n * an open db). When omitted, collectAttention reads them from libSQL itself —\n * defensively, so a missing TURSO env or a Turso blip drops just this signal. */\n notifyBounces?: ReadonlyMap<string, NotifyBounceCounts>;\n /** Pre-fetched unreplayed dead-letter counts per SLUG (#645). Same contract as\n * `notifyBounces`: omitted → read from libSQL, defensively. */\n deadLetters?: ReadonlyMap<string, number>;\n};\n\n/** Per-site bounced-notification counts for the notify-bounce collector, read from\n * libSQL over the collector's own window. The db modules are imported DYNAMICALLY:\n * src/db/submissions.ts pulls kysely at top level, and kysely/libsql live in\n * devDependencies consuming fleet sites don't install — a static import here would\n * crash their CLI at require time (same rule as openDb's own lazy loads). Any\n * failure (no TURSO env, Turso down) logs and yields an empty map: the digest\n * must never blank over a missing optional signal. */\nasync function fetchNotifyBounceCounts(\n now: Date,\n): Promise<ReadonlyMap<string, NotifyBounceCounts>> {\n try {\n const [{ openDb, readDbConfig }, { countNotifyBouncedBySite }, { screenOutsSince }] =\n await Promise.all([\n import(\"../db/client.js\"),\n import(\"../db/submissions.js\"),\n import(\"../db/screenouts.js\"),\n ]);\n const db = await openDb(readDbConfig());\n return await countNotifyBouncedBySite(db, screenOutsSince(now, NOTIFY_BOUNCE_WINDOW_DAYS));\n } catch (e) {\n console.warn(`⚠ notify-bounce counts unavailable (libSQL): ${(e as Error).message}`);\n return new Map();\n }\n}\n\n/** Unreplayed dead-letter counts per slug for the #645 collector. Dynamically\n * imported and defensive for exactly the same reasons as\n * `fetchNotifyBounceCounts` above: kysely/libsql are devDependencies consuming\n * fleet sites do not install, and the digest must never blank over a missing\n * optional signal. */\nasync function fetchDeadLetterCounts(): Promise<ReadonlyMap<string, number>> {\n try {\n const [{ openDb, readDbConfig }, { countUnreplayedDeadLettersBySlug }] = await Promise.all([\n import(\"../db/client.js\"),\n import(\"../db/deadletter.js\"),\n ]);\n const db = await openDb(readDbConfig());\n return await countUnreplayedDeadLettersBySlug(db);\n } catch (e) {\n console.warn(`⚠ dead-letter counts unavailable (libSQL): ${(e as Error).message}`);\n return new Map();\n }\n}\n\n/** The prior snapshot, from Turso (#609). Dynamically imported for the same\n * reason as fetchNotifyBounceCounts: kysely/libsql are devDependencies that\n * consuming fleet sites do not install, so a static import would crash their\n * CLI at require time.\n *\n * NOT defensive, deliberately — the Airtable read it replaces was not either.\n * Swallowing a failure here would silently badge every item NEW, which reads\n * as \"the whole fleet degraded overnight\" in the operator's inbox. A thrown\n * error is the honest outcome. */\nasync function readDigestStateFromDb(): Promise<DigestSnapshot> {\n const [{ openDb, readDbConfig }, { readDigestState }] = await Promise.all([\n import(\"../db/client.js\"),\n import(\"../db/digest-state.js\"),\n ]);\n return readDigestState(await openDb(readDbConfig()));\n}\n\n/** Bridge the injectable seam (returns void) onto the three-state contract the\n * log line reports. An injected writer that resolves is a real write. */\nasync function writeRollupOnce(\n options: DigestRunOptions,\n now: Date,\n): Promise<\"written\" | \"absent\"> {\n if (options.cockpitRollup) {\n await options.cockpitRollup.write(now);\n return \"written\";\n }\n return writeCockpitRollupToDb(now);\n}\n\n/** The write half of {@link readDigestStateFromDb}, same lazy-import rule. */\nasync function writeDigestStateToDb(next: DigestSnapshot): Promise<void> {\n const [{ openDb, readDbConfig }, { writeDigestState }] = await Promise.all([\n import(\"../db/client.js\"),\n import(\"../db/digest-state.js\"),\n ]);\n await writeDigestState(await openDb(readDbConfig()), next);\n}\n\n/**\n * Compute the cockpit's \"since a window\" roll-ups once, here, instead of on\n * every page load (MED-16 of the 2026-08-26 review).\n *\n * Both aggregates read the whole `submissions` table — the one unbounded-growth\n * table in the schema — and the cockpit root is the operator's most-loaded page.\n * Turso meters row scans, so recomputing them per request is a cost that grows\n * forever against numbers that move once a day.\n *\n * The trade is explicit: the figures become up to 24h old. That is why the\n * payload carries `computedAt` and the windows it used, and why an absent\n * roll-up reads as null rather than zero — a stale or unmeasured number\n * presented as live is worse than no number.\n *\n * Best-effort, like the snapshot write beside it: the digest has already been\n * sent by the time this runs, and a failed roll-up costs one strip on one page\n * until tomorrow, never the digest.\n */\nasync function writeCockpitRollupToDb(now: Date): Promise<\"written\" | \"absent\"> {\n // No Turso configured is a THIRD state, not a failure: it is what every unit\n // test looks like, and reporting it as `rollup=0` would train the eye to\n // ignore the number that is supposed to catch a dead writer. Same three-state\n // vocabulary the site mirrors already use (`mirrored=1|0|absent`).\n if (!process.env.TURSO_DATABASE_URL) return \"absent\";\n const [{ openDb, readDbConfig }, { writeCockpitRollup }, screenouts, submissions, collectors] =\n await Promise.all([\n import(\"../db/client.js\"),\n import(\"../db/digest-state.js\"),\n import(\"../db/screenouts.js\"),\n import(\"../db/submissions.js\"),\n import(\"../alerts/digest-collectors.js\"),\n ]);\n const db = await openDb(readDbConfig());\n const SCREEN_OUT_WINDOW_DAYS = 30;\n const screenOutSince = screenouts.screenOutsSince(now, SCREEN_OUT_WINDOW_DAYS);\n const bounceSince = screenouts.screenOutsSince(now, collectors.NOTIFY_BOUNCE_WINDOW_DAYS);\n\n const totals = { honeypot: 0, tooFast: 0, markedSpam: 0 };\n for (const t of (await screenouts.listScreenOutsSince(db, screenOutSince)).values()) {\n totals.honeypot += t.honeypot;\n totals.tooFast += t.tooFast;\n totals.markedSpam += t.markedSpam;\n }\n const bounces = await submissions.countNotifyBouncedBySite(db, bounceSince);\n\n await writeCockpitRollup(db, {\n spamTotals: totals,\n notifyBounces: Object.fromEntries(bounces),\n windowDays: {\n screenOuts: SCREEN_OUT_WINDOW_DAYS,\n bounces: collectors.NOTIFY_BOUNCE_WINDOW_DAYS,\n },\n computedAt: now.toISOString(),\n });\n return \"written\";\n}\n\n/** Persist the next snapshot to BOTH stores (#609 dual-write).\n *\n * Turso is the read side, so a failure there is the one that actually costs\n * correct NEW badges tomorrow — but Airtable keeps being written so the move\n * stays reversible while Phase 5 is in flight. Both are best-effort: the\n * digest has already been sent (or deliberately skipped) by the time this\n * runs, and a snapshot write failure re-news at worst.\n *\n * The DIGEST_STATE_WRITE line exists because of #585: a dual-write that\n * silently stopped running looked identical to a healthy one for weeks. One\n * line, always emitted, naming both halves. */\nasync function persistDigestState(\n base: AirtableBase,\n next: DigestSnapshot,\n writeState?: (snap: DigestSnapshot) => Promise<void>,\n writeRollup?: () => Promise<\"written\" | \"absent\">,\n): Promise<void> {\n let turso = 0;\n let airtable = 0;\n let rollup: \"1\" | \"0\" | \"absent\" = \"0\";\n try {\n await (writeState ?? writeDigestStateToDb)(next);\n turso = 1;\n } catch (e) {\n console.warn(`⚠ digest state write failed (turso): ${(e as Error).message}`);\n }\n try {\n await writeAirtableDigestState(base, next);\n airtable = 1;\n } catch (e) {\n console.warn(`⚠ digest state write failed (airtable): ${(e as Error).message}`);\n }\n // The cockpit roll-up rides the same \"already sent, best-effort\" contract, and\n // gets its own counter on the line for the #585 reason: a dual-write that\n // silently stopped running looked identical to a healthy one for weeks. An\n // ABSENT `rollup=` is a different failure from `rollup=0`.\n if (writeRollup) {\n try {\n rollup = (await writeRollup()) === \"absent\" ? \"absent\" : \"1\";\n } catch (e) {\n rollup = \"0\";\n console.warn(`⚠ cockpit rollup write failed: ${(e as Error).message}`);\n }\n }\n console.log(`DIGEST_STATE_WRITE turso=${turso} airtable=${airtable} rollup=${rollup}`);\n}\n\n/** The \"Submissions (24h)\" telemetry window — a precise 24h ISO-timestamp compare\n * (unlike screenOutsSince's date-only strings). */\nconst SUBMISSIONS_DIGEST_WINDOW_MS = 24 * 60 * 60 * 1000;\n\n/** Per-site submission counts for the digest telemetry section, read from libSQL.\n * Dynamic imports + fail-soft for the same reason as fetchNotifyBounceCounts:\n * kysely/libsql are devDependencies consuming fleet sites don't install, and a\n * Turso blip must drop just this section, never the digest. Returns null (not an\n * empty map) on failure so the renderer can omit the section rather than claim a\n * quiet fleet. */\nasync function fetchSubmissionsDigestCounts(\n now: Date,\n): Promise<ReadonlyMap<string, SiteSubmissionCounts> | null> {\n try {\n const [{ openDb, readDbConfig }, { countSubmissionsSinceBySite }] = await Promise.all([\n import(\"../db/client.js\"),\n import(\"../db/submissions.js\"),\n ]);\n const db = await openDb(readDbConfig());\n return await countSubmissionsSinceBySite(\n db,\n new Date(now.getTime() - SUBMISSIONS_DIGEST_WINDOW_MS).toISOString(),\n );\n } catch (e) {\n console.warn(`⚠ submissions telemetry unavailable (libSQL): ${(e as Error).message}`);\n return null;\n }\n}\n\n/** Assemble the \"Submissions (24h)\" section from the per-site counts. PURE (exported\n * for direct tests). Totals sum ALL map entries — an orphan site id still counts in\n * the fleet totals. bySite lists only ids that resolve in `sitesById` AND carry any\n * nonzero count, sorted by total volume desc then siteName A-Z. null counts (libSQL\n * unavailable) → null (section omitted). */\nexport function buildSubmissionsDigestSection(\n counts: ReadonlyMap<string, SiteSubmissionCounts> | null,\n sitesById: ReadonlyMap<string, WebsiteRow>,\n): SubmissionsDigestSection | null {\n if (counts === null) return null;\n let leads = 0;\n let signups = 0;\n let spamAuto = 0;\n const bySite: SubmissionsDigestSection[\"bySite\"] = [];\n for (const [siteId, c] of counts) {\n leads += c.leads;\n signups += c.signups;\n spamAuto += c.spamAuto;\n const site = sitesById.get(siteId);\n if (site && c.leads + c.signups + c.spamAuto > 0) {\n bySite.push({ siteName: site.name, ...c });\n }\n }\n bySite.sort(\n (a, b) =>\n b.leads + b.signups + b.spamAuto - (a.leads + a.signups + a.spamAuto) ||\n a.siteName.localeCompare(b.siteName),\n );\n return { leads, signups, spamAuto, bySite };\n}\n\n/** Run a single collector under a try/catch: a thrown collector logs and yields []\n * so one broken signal never blanks the whole \"Needs attention\" section. */\nfunction runCollector(label: string, fn: () => AttentionItem[]): AttentionItem[] {\n try {\n return fn();\n } catch (e) {\n console.warn(`⚠ attention collector \"${label}\" failed: ${(e as Error).message}`);\n return [];\n }\n}\n\n/**\n * Take the run's `reports`/`websites` (runDigest read them once, from Turso since\n * #646 step 4), build the sitesById map the delivery collector needs, and run each\n * pure collector isolated. Returns the union of items; diffing/badging happens in\n * runDigest. This function opens no store of its own for those two datasets.\n *\n * The Renovate + CI signals come from the SAME persisted collectors the operator\n * cockpit (`buildCockpitModel`) runs — `collectRenovateAlerts` (key\n * `renovate:<siteId>`) and `collectCiAlerts` (key `ci:<siteId>`), reading the\n * nightly-persisted `renovateFailingCis`/`defaultBranchCi` fields. This is the\n * key-space unification: because the digest writes the shared Digest State\n * snapshot with these same keys, the cockpit's NEW/WORSE diff finds them and the\n * two surfaces agree (the prior live per-PR `renovate:<repo>#<n>` sweep never\n * matched the cockpit's keys, so its cards badged NEW forever).\n */\nexport async function collectAttention(deps: CollectAttentionDeps): Promise<AttentionItem[]> {\n const { reports, websites } = deps;\n const now = deps.now ?? new Date();\n const notifyBounces = deps.notifyBounces ?? (await fetchNotifyBounceCounts(now));\n const deadLetters = deps.deadLetters ?? (await fetchDeadLetterCounts());\n const sitesById = new Map<string, WebsiteRow>(websites.map((w) => [w.id, w]));\n return [\n ...runCollector(\"vuln\", () => collectVulnAlerts(websites, deps.baseUrl)),\n ...runCollector(\"delivery\", () => collectDeliveryFailures(reports, sitesById, deps.baseUrl)),\n ...runCollector(\"preflight\", () => collectPreflightBlocked(reports, sitesById, deps.baseUrl)),\n ...runCollector(\"lighthouse\", () => collectLighthouseAlerts(websites, deps.baseUrl)),\n ...runCollector(\"renovate\", () => collectRenovateAlerts(websites, deps.baseUrl, now)),\n ...runCollector(\"ci\", () => collectCiAlerts(websites, deps.baseUrl, now)),\n ...runCollector(\"analytics\", () => collectAnalyticsFailures(websites, deps.baseUrl, now)),\n ...runCollector(\"turnstile\", () =>\n collectTurnstileGuardrailAlerts(websites, deps.baseUrl, now),\n ),\n ...runCollector(\"notify-bounce\", () =>\n collectNotifyBounceAlerts(websites, notifyBounces, deps.baseUrl),\n ),\n // #645. The dead-letter alarm. The digest is the SURFACE that matters for\n // this kind: the cockpit groups items onto site cards, and the worst flavour\n // — a slug that resolves to no fleet site — has no card by construction. The\n // digest renders every item flat by title, so it carries both flavours.\n ...runCollector(\"deadletter\", () =>\n collectDeadLetterAlerts(websites, deadLetters, deps.baseUrl),\n ),\n // Same collector the cockpit runs, over the same persisted `Prismic Models`\n // columns and the same keys — so the snapshot this digest writes is the one\n // the cockpit diffs NEW/WORSE against, and the two surfaces agree.\n ...runCollector(\"prismic-drift\", () => collectPrismicDriftAlerts(websites, deps.baseUrl, now)),\n ];\n}\n\nexport type DigestRunOptions = {\n resend?: ResendClient;\n /** Dashboard origin for the /s/<slug> links, e.g. \"https://reddoor-maintenance.netlify.app\". */\n baseUrl: string;\n /**\n * The run's two datasets. Since #646 step 4 they come from TURSO, read by the\n * command that calls this (one connection, both reads) — Airtable cannot see a\n * `site_<ULID>` site at all, so a digest built from it is silently short.\n *\n * Functions rather than arrays, and required rather than defaulted: a read\n * failure must still be able to red the run (it is caught below and reported as\n * `digest failed:`), and no caller — least of all a test — can reach a store\n * this did not hand it.\n */\n roster: () => Promise<WebsiteRow[]>;\n allReports: () => Promise<ReportRow[]>;\n /**\n * Inject a pre-opened Airtable base (tests, server handlers) for the digest-state\n * SHADOW write — the only Airtable call left in this run. When omitted,\n * `openBase(readAirtableConfig())` is called from the environment.\n */\n base?: AirtableBase;\n /** Per-site submission counts for the \"Submissions (24h)\" section. undefined =\n * fetch from libSQL; null = simulate unavailable (section omitted); a Map =\n * injected (tests). */\n submissionCounts?: ReadonlyMap<string, SiteSubmissionCounts> | null;\n /**\n * The prior-run snapshot store (#609). Production omits it and gets Turso.\n *\n * Injectable because the read is deliberately NOT defensive: swallowing a\n * failure would badge every item NEW, which lands in the operator's inbox\n * reading as \"the whole fleet degraded overnight\". That makes Turso a hard\n * requirement of a real run — so tests, which have no libSQL, need a seam\n * rather than an env var.\n */\n digestState?: {\n read: () => Promise<DigestSnapshot>;\n write: (snap: DigestSnapshot) => Promise<void>;\n };\n /**\n * The cockpit roll-up writer (MED-16). Same seam and same reason as\n * `digestState`: production omits it and gets Turso, tests inject.\n *\n * Without a seam this would be untestable in exactly the way that matters —\n * `writeCockpitRollupToDb` opens a db from env, so in a test it throws and is\n * caught, and the run reports `rollup=0` forever while looking healthy. That\n * is the #585 shape the counter on the log line exists to expose.\n */\n cockpitRollup?: { write: (now: Date) => Promise<void> };\n /**\n * The run clock. Production omits it and gets `new Date()`.\n *\n * Injectable because several collectors this run feeds are AGE-SENSITIVE —\n * `collectPrismicDriftAlerts` alone changes an item's key and its wording once\n * a verdict crosses `PRISMIC_DRIFT_STALE_DAYS` — so a digest test that cannot\n * fix the clock is asserting on the day it happens to run. Two did, and both\n * went red four days after they were written, reporting the staleness wording\n * as if the drift wiring had broken. `collectAttention` already takes a `now`\n * for exactly this reason; this threads the same lever one layer out.\n */\n now?: Date;\n};\n\nexport async function runDigest(\n options: DigestRunOptions,\n): Promise<{ output: string; code: number }> {\n // Capture clock BEFORE any await so the idempotency key can't roll past midnight mid-run.\n const today = options.now ?? new Date();\n try {\n // Airtable is opened for ONE thing now: the digest-state shadow write at the\n // end of the run (#646 step 4 moved both reads to Turso).\n const base = options.base ?? openBase(readAirtableConfig());\n // Read each dataset ONCE for the whole run, then thread the arrays into\n // collectAttention so it doesn't re-fetch. Pending is derived in-line with\n // listPendingApproval's exact predicate.\n const reports = await options.allReports();\n const websites = await options.roster();\n const sites = new Map(websites.map((w) => [w.id, w]));\n\n const pending = reports.filter(isPendingApproval);\n\n const readyForYourYes: ReadyItem[] = [];\n const baseUrl = options.baseUrl.replace(/\\/$/, \"\");\n for (const r of pending) {\n const site = sites.get(r.siteId);\n if (!site) continue; // orphan report → skip rather than render a broken link\n // An empty Name slugs to \"\" → `/s/` is a dead link (getWebsiteBySlug can't\n // match it). Fall back to the fleet homepage so the operator still lands\n // somewhere usable instead of a 404.\n const slug = siteSlug(site.name);\n readyForYourYes.push({\n siteName: site.name,\n reportType: r.reportType,\n period: r.period ?? \"—\",\n dashboardUrl: slug ? `${baseUrl}/s/${slug}` : baseUrl,\n });\n }\n\n // M5: collect the free signals (isolated), diff against yesterday's snapshot.\n // Renovate + CI come from the persisted collectors (the same ones the cockpit\n // runs), so the snapshot this digest writes carries the `renovate:<siteId>` /\n // `ci:<siteId>` keys the cockpit diffs against — no live GitHub sweep here.\n const collected = await collectAttention({\n baseUrl: options.baseUrl,\n websites,\n reports,\n now: today,\n });\n // #609: Turso is the read side now. Airtable keeps being WRITTEN below\n // (dual-write, Phase 5's pattern everywhere else) so the move stays\n // reversible, but nothing reads it any more.\n const prior = await (options.digestState?.read ?? readDigestStateFromDb)();\n const { tagged, next } = diffAttention(collected, prior, digestDateKey(today));\n // The operator only HEARS about a vuln once Renovate's auto-fix is exhausted\n // (tried and failed a couple of nightly cycles) — before that the fleet is\n // still self-patching and the cockpit's amber Watch band is the only surface.\n // Filter the EMAIL list only: `next` (written below) must keep every vuln key\n // so the cockpit's diff against this same snapshot stays consistent, and so\n // the exhausted-flip diffs as WORSE instead of arriving pre-badged-away.\n const needsAttention = tagged.filter(\n (it) => it.kind !== \"vuln\" || it.autoFixExhausted === true,\n );\n\n // No-noise default: skip entirely when there's nothing to report.\n if (readyForYourYes.length === 0 && needsAttention.length === 0) {\n // Persist `next` even on a skip: a key that resolved on a quiet day clears so a\n // later recurrence diffs as NEW (spec §10), and — since the skip can now fire\n // with muted pre-exhaustion vulns collected — their keys keep snapshotting so\n // the eventual exhausted-flip diffs as WORSE. Wrapped: a write failure can't\n // fail the skip.\n await persistDigestState(base, next, options.digestState?.write, () =>\n writeRollupOnce(options, today),\n );\n return { output: \"Digest skipped (nothing ready, nothing needs attention).\", code: 0 };\n }\n\n // Submissions telemetry rides only on a digest that is ALREADY sending — the\n // skip predicate above is deliberately unchanged (leads already fire their own\n // ingest-time notification; this is context, not an alarm), and fetching AFTER\n // the skip check keeps quiet days from touching libSQL at all.\n const counts =\n options.submissionCounts !== undefined\n ? options.submissionCounts\n : await fetchSubmissionsDigestCounts(today);\n const submissions = buildSubmissionsDigestSection(counts, sites);\n\n const html = renderDigestHtml({ readyForYourYes, needsAttention, submissions });\n const client = options.resend ?? defaultResendClient();\n const to = [operatorEmail()];\n const n = readyForYourYes.length;\n const reportWord = n === 1 ? \"report\" : \"reports\";\n let result: Awaited<ReturnType<typeof client.send>>;\n try {\n result = await client.send({\n from: FROM_ADDRESS,\n to,\n subject: `Your fleet — ${digestDateKey(today)}: ${n} ${reportWord} ready for your yes`,\n html,\n idempotencyKey: `digest-${digestDateKey(today)}`,\n });\n } catch (err) {\n // A same-UTC-day re-run whose content changed re-sends with the same\n // `digest-<date>` idempotency key but a DIFFERENT body. Resend rejects that\n // with a 409 (`invalid_idempotent_request`) — \"This idempotency key has been\n // used ... but the request body was modified ...\". The operator already got\n // today's digest on the first send, so re-sending a changed version same-day\n // would just be a duplicate: treat it as an \"already sent today\" no-op.\n //\n // ResendClient (send/resend.ts) wraps the API error as a plain Error and only\n // preserves the *message* string (no name/statusCode), so the message\n // substring is the only reliable discriminator — match defensively on it.\n // Any OTHER send error re-throws to the outer catch → {code:1}, so a genuine\n // Resend/network failure still fails loudly.\n if (isIdempotencyConflict(err)) {\n // Do NOT write the snapshot: the first send already persisted it; writing\n // this run's `next` would diff against the first run's snapshot and mis-badge.\n return {\n output:\n \"Digest already sent today (content changed since the first send) — skipped to avoid a duplicate.\",\n code: 0,\n };\n }\n throw err;\n }\n // Persist the next snapshot AFTER a successful send. A write failure is caught +\n // logged: the digest already went out, tomorrow re-news at worst. (The send-FAILURE\n // path never reaches here — the outer catch returns code 1 with no write, preserving\n // the NEW badge for the retry.)\n await persistDigestState(base, next, options.digestState?.write, () =>\n writeRollupOnce(options, today),\n );\n return { output: `Digest sent to ${to.join(\", \")} (${result.messageId})`, code: 0 };\n } catch (err) {\n // Re-throw config errors (exitCode=2: missing env vars, bad config) so runOrExit\n // surfaces them with the correct process exit code rather than collapsing to 1.\n if (typeof (err as { exitCode?: unknown }).exitCode === \"number\") {\n throw err;\n }\n const message = err instanceof Error ? err.message : String(err);\n return { output: `digest failed: ${message}`, code: 1 };\n }\n}\n\n/** Pure render of the unified daily operator digest. No IO — the caller (runDigest)\n * collects the rows and decides whether to send. */\nexport function renderDigestHtml(sections: DigestSections): string {\n return `<!doctype html>\n<html>\n <head><meta charset=\"utf-8\"></head>\n <body style=\"margin:0;padding:0;background:#ffffff\">\n <table width=\"100%\" style=\"border-collapse:collapse\">\n <tr>\n <td align=\"center\" style=\"padding:24px\">\n <table width=\"600\" style=\"border-collapse:collapse\">\n <tr>\n <td>\n <h1 style=\"color:${RED};font-family:helvetica,sans-serif;font-size:24px;font-weight:700;margin:0 0 8px\">Your fleet today</h1>\n ${readySection(sections.readyForYourYes)}\n ${attentionSection(sections.needsAttention)}\n ${submissionsSection(sections.submissions)}\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </body>\n</html>`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,IAAM,OAAO;AACb,IAAM,M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S,iBAAiB,UAAkC;AACjE,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mCAU0B,GAAG;AAAA,kBACpB,aAAa,SAAS,eAAe,CAAC;AAAA,kBACtC,iBAAiB,SAAS,cAAc,CAAC;AAAA,kBACzC,mBAAmB,SAAS,WAAW,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS1D;","names":["writeDigestState"]}
|
|
@@ -13,24 +13,27 @@ import {
|
|
|
13
13
|
collectTurnstileGuardrailAlerts,
|
|
14
14
|
collectVulnAlerts,
|
|
15
15
|
prismicAckIsLive
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-PARKXDXI.js";
|
|
17
|
+
import "./chunk-VMGHQUTV.js";
|
|
18
18
|
import "./chunk-PZR4EBPY.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-LDHRIQUW.js";
|
|
20
|
+
import "./chunk-TEMQPSCM.js";
|
|
21
|
+
import "./chunk-ASLDCWBF.js";
|
|
21
22
|
import "./chunk-VAD43MOR.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-YJBSB4LP.js";
|
|
23
24
|
import "./chunk-HN6I2XWI.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-6THEZQLA.js";
|
|
25
26
|
import "./chunk-GECESMVS.js";
|
|
26
27
|
import "./chunk-KJGKZLCT.js";
|
|
27
28
|
import "./chunk-BGTYPVLT.js";
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-LZMAG73U.js";
|
|
30
|
+
import "./chunk-TC4GANMX.js";
|
|
31
|
+
import "./chunk-ICSRWW5Q.js";
|
|
32
|
+
import "./chunk-RQJFGK3A.js";
|
|
30
33
|
import "./chunk-WEKL2HYJ.js";
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-YXWBM26P.js";
|
|
35
|
+
import "./chunk-MMSMZC7S.js";
|
|
36
|
+
import "./chunk-IOTOOTII.js";
|
|
34
37
|
import "./chunk-RARREDQE.js";
|
|
35
38
|
import "./chunk-6VAL7XJT.js";
|
|
36
39
|
export {
|
|
@@ -49,4 +52,4 @@ export {
|
|
|
49
52
|
collectVulnAlerts,
|
|
50
53
|
prismicAckIsLive
|
|
51
54
|
};
|
|
52
|
-
//# sourceMappingURL=digest-collectors-
|
|
55
|
+
//# sourceMappingURL=digest-collectors-CYTN2EUX.js.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// src/cli/commands/ensure-site.ts
|
|
2
|
+
async function defaultAirtable(db) {
|
|
3
|
+
const { openBase, readAirtableConfig } = await import("./client-EPVO3FEH.js");
|
|
4
|
+
let cfg;
|
|
5
|
+
try {
|
|
6
|
+
cfg = readAirtableConfig();
|
|
7
|
+
} catch {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
const base = openBase(cfg);
|
|
11
|
+
const { findWebsiteRecordBySlug } = await import("./ensure-site-OO4UPWNQ.js");
|
|
12
|
+
const { updateSiteFields } = await import("./websites-Y6FN2XFD.js");
|
|
13
|
+
const { mirrorSiteInsert } = await import("./fleet-state-RJROYXKO.js");
|
|
14
|
+
return {
|
|
15
|
+
findBySlug: (slug) => findWebsiteRecordBySlug(base, slug),
|
|
16
|
+
// The #645 heal: the importer's own mapping, so an adopted row is exactly what
|
|
17
|
+
// the import would have written.
|
|
18
|
+
adopt: (rec) => mirrorSiteInsert(db, rec, (/* @__PURE__ */ new Date()).toISOString()),
|
|
19
|
+
update: (recordId, patch) => {
|
|
20
|
+
const fields = {};
|
|
21
|
+
if (patch.name !== void 0) fields["Name"] = patch.name;
|
|
22
|
+
if (patch.url !== void 0) fields["url"] = patch.url;
|
|
23
|
+
if (patch.pointOfContact !== void 0) fields["point of contact"] = patch.pointOfContact;
|
|
24
|
+
if (patch.gitRepo !== void 0) fields["Git repo"] = patch.gitRepo;
|
|
25
|
+
return updateSiteFields(base, recordId, fields);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
async function runEnsureSiteCommand(slug, opts, deps = {}) {
|
|
30
|
+
if (!slug) return { output: "Provide a <slug> (e.g. `ensure-site roalson`).", code: 2 };
|
|
31
|
+
try {
|
|
32
|
+
const open = deps.openDb ?? (async () => {
|
|
33
|
+
const { openDb, readDbConfig } = await import("./client-DGTO65WB.js");
|
|
34
|
+
return openDb(readDbConfig());
|
|
35
|
+
});
|
|
36
|
+
const db = await open();
|
|
37
|
+
const { makeSiteStore } = await import("./site-create-ZU3ACBTO.js");
|
|
38
|
+
const { ensureSite } = await import("./ensure-site-JEKV2ODE.js");
|
|
39
|
+
const airtable = deps.airtable ? await deps.airtable() : await defaultAirtable(db);
|
|
40
|
+
const result = await ensureSite(
|
|
41
|
+
{
|
|
42
|
+
slug,
|
|
43
|
+
...opts.name ? { displayName: opts.name } : {},
|
|
44
|
+
...opts.url ? { url: opts.url } : {},
|
|
45
|
+
...opts.contact ? { pointOfContact: opts.contact } : {},
|
|
46
|
+
...opts.gitRepo ? { gitRepo: opts.gitRepo } : {}
|
|
47
|
+
},
|
|
48
|
+
{ store: makeSiteStore(db), airtable }
|
|
49
|
+
);
|
|
50
|
+
const renamed = result.updatedFields.includes("name") ? ` \u2014 name set to "${opts.name}"` : "";
|
|
51
|
+
const blanks = result.updatedFields.filter((f) => f !== "name");
|
|
52
|
+
const filled = blanks.length > 0 ? ` \u2014 filled blank field(s): ${blanks.join(", ")}` : "";
|
|
53
|
+
const skipped = result.skippedMismatches.length > 0 ? ` \u2014 differs from existing, left untouched (edit on the dashboard site page): ${result.skippedMismatches.join(", ")}` : "";
|
|
54
|
+
const healed = result.healedDbRow ? ` \u2014 HEALED: the Turso row was MISSING and has been adopted from Airtable; leads for this slug were being dropped (run \`db replay-deadletters\`)` : "";
|
|
55
|
+
const nameNote = result.status === "created" && !opts.name ? ` \u2014 name set to "${slug}"; re-run with --name before forms/announce go live` : "";
|
|
56
|
+
const batchNote = result.status === "created" ? `
|
|
57
|
+
note: no Airtable record was created (the site id is not an Airtable id). Batch jobs that still enumerate the fleet from Airtable \u2014 nightly audits incl. form-e2e, report drafting, digest \u2014 will not see this site until #646 step 4 moves them to Turso. Form ingest and the dashboard see it now.` : "";
|
|
58
|
+
return {
|
|
59
|
+
output: `[${slug}] ${result.status} (${result.siteId})${healed}${renamed}${filled}${skipped}${nameNote}${batchNote}`,
|
|
60
|
+
code: 0
|
|
61
|
+
};
|
|
62
|
+
} catch (err) {
|
|
63
|
+
const e = err;
|
|
64
|
+
return { output: e.message ?? String(err), code: e.exitCode ?? 1 };
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
runEnsureSiteCommand
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=ensure-site-2QZHFVQ3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli/commands/ensure-site.ts"],"sourcesContent":["import type { Db } from \"../../db/client.js\";\nimport type { LegacyAirtableSites } from \"../../fleet/ensure-site.js\";\n\nexport type EnsureSiteCommandOptions = {\n name?: string;\n url?: string;\n contact?: string;\n gitRepo?: string;\n cwd?: string;\n};\n\n/** The two stores, injectable so tests never open a real libSQL handle (even with\n * `TURSO_*` exported) or reach Airtable. */\nexport type EnsureSiteCommandDeps = {\n openDb?: () => Promise<Db>;\n /** `null` = no Airtable wired (no creds): no #645 heal lookup, no `rec` shadow. */\n airtable?: () => Promise<LegacyAirtableSites | null>;\n};\n\n/** Wire the legacy Airtable half only when credentials exist. Airtable is a shadow\n * now, so its absence is a supported state — a missing PAT must not stop a site\n * from being created. */\nasync function defaultAirtable(db: Db): Promise<LegacyAirtableSites | null> {\n const { openBase, readAirtableConfig } = await import(\"../../reports/airtable/client.js\");\n let cfg: ReturnType<typeof readAirtableConfig>;\n try {\n cfg = readAirtableConfig();\n } catch {\n return null;\n }\n const base = openBase(cfg);\n const { findWebsiteRecordBySlug } = await import(\"../../reports/airtable/ensure-site.js\");\n const { updateSiteFields } = await import(\"../../reports/airtable/websites.js\");\n const { mirrorSiteInsert } = await import(\"../../db/fleet-state.js\");\n return {\n findBySlug: (slug) => findWebsiteRecordBySlug(base, slug),\n // The #645 heal: the importer's own mapping, so an adopted row is exactly what\n // the import would have written.\n adopt: (rec) => mirrorSiteInsert(db, rec, new Date().toISOString()),\n update: (recordId, patch) => {\n const fields: Record<string, string> = {};\n if (patch.name !== undefined) fields[\"Name\"] = patch.name;\n if (patch.url !== undefined) fields[\"url\"] = patch.url;\n if (patch.pointOfContact !== undefined) fields[\"point of contact\"] = patch.pointOfContact;\n if (patch.gitRepo !== undefined) fields[\"Git repo\"] = patch.gitRepo;\n return updateSiteFields(base, recordId, fields);\n },\n };\n}\n\n/**\n * `ensure-site <slug>` — create/verify a site's fleet row (#646 step 3: in Turso,\n * with a `site_<ULID>` id for a new site). Day-one step of the /new-site bootstrap\n * skill. Fill-blanks-only; safe to re-run; `--name` renames without moving the slug.\n */\nexport async function runEnsureSiteCommand(\n slug: string | undefined,\n opts: EnsureSiteCommandOptions,\n deps: EnsureSiteCommandDeps = {},\n): Promise<{ output: string; code: number }> {\n if (!slug) return { output: \"Provide a <slug> (e.g. `ensure-site roalson`).\", code: 2 };\n try {\n const open =\n deps.openDb ??\n (async () => {\n const { openDb, readDbConfig } = await import(\"../../db/client.js\");\n return openDb(readDbConfig());\n });\n const db = await open();\n const { makeSiteStore } = await import(\"../../db/site-create.js\");\n const { ensureSite } = await import(\"../../fleet/ensure-site.js\");\n const airtable = deps.airtable ? await deps.airtable() : await defaultAirtable(db);\n const result = await ensureSite(\n {\n slug,\n ...(opts.name ? { displayName: opts.name } : {}),\n ...(opts.url ? { url: opts.url } : {}),\n ...(opts.contact ? { pointOfContact: opts.contact } : {}),\n ...(opts.gitRepo ? { gitRepo: opts.gitRepo } : {}),\n },\n { store: makeSiteStore(db), airtable },\n );\n // #664: a name change on the exists path is a rename the operator asked for.\n const renamed = result.updatedFields.includes(\"name\") ? ` — name set to \"${opts.name}\"` : \"\";\n const blanks = result.updatedFields.filter((f) => f !== \"name\");\n const filled = blanks.length > 0 ? ` — filled blank field(s): ${blanks.join(\", \")}` : \"\";\n const skipped =\n result.skippedMismatches.length > 0\n ? ` — differs from existing, left untouched (edit on the dashboard site page): ${result.skippedMismatches.join(\", \")}`\n : \"\";\n // #645. Loud, and its own clause: a healed row means this site's leads were\n // being answered `unknown-site` and dropped until this run.\n const healed = result.healedDbRow\n ? ` — HEALED: the Turso row was MISSING and has been adopted from Airtable; leads for this slug were being dropped (run \\`db replay-deadletters\\`)`\n : \"\";\n const nameNote =\n result.status === \"created\" && !opts.name\n ? ` — name set to \"${slug}\"; re-run with --name before forms/announce go live`\n : \"\";\n // The honest cost of a Turso-only site until #646 step 4 lands (see\n // src/fleet/ensure-site.ts): say it where the operator is looking.\n const batchNote =\n result.status === \"created\"\n ? `\\n note: no Airtable record was created (the site id is not an Airtable id). Batch jobs that still enumerate the fleet from Airtable — nightly audits incl. form-e2e, report drafting, digest — will not see this site until #646 step 4 moves them to Turso. Form ingest and the dashboard see it now.`\n : \"\";\n return {\n output: `[${slug}] ${result.status} (${result.siteId})${healed}${renamed}${filled}${skipped}${nameNote}${batchNote}`,\n code: 0,\n };\n } catch (err) {\n const e = err as { message?: string; exitCode?: number };\n return { output: e.message ?? String(err), code: e.exitCode ?? 1 };\n }\n}\n"],"mappings":";AAsBA,eAAe,gBAAgB,IAA6C;AAC1E,QAAM,EAAE,UAAU,mBAAmB,IAAI,MAAM,OAAO,sBAAkC;AACxF,MAAI;AACJ,MAAI;AACF,UAAM,mBAAmB;AAAA,EAC3B,QAAQ;AACN,WAAO;AAAA,EACT;AACA,QAAM,OAAO,SAAS,GAAG;AACzB,QAAM,EAAE,wBAAwB,IAAI,MAAM,OAAO,2BAAuC;AACxF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JFGK3A.js";
|
|
9
|
+
|
|
10
|
+
// src/fleet/ensure-site.ts
|
|
11
|
+
var slugTaken = (err) => typeof err === "object" && err !== null && err.code === "SLUG_TAKEN";
|
|
12
|
+
async function ensureSite(input, deps) {
|
|
13
|
+
const { store } = deps;
|
|
14
|
+
const airtable = deps.airtable ?? null;
|
|
15
|
+
const slug = siteSlug(input.slug);
|
|
16
|
+
if (!slug) throw new Error(`ensure-site: '${input.slug}' does not slugify to a usable slug`);
|
|
17
|
+
if (input.displayName !== void 0 && siteSlug(input.displayName) !== slug) {
|
|
18
|
+
throw new Error(
|
|
19
|
+
`ensure-site: display name '${input.displayName}' slugifies to '${siteSlug(input.displayName)}', not '${slug}' \u2014 a rename never changes the slug`
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
let existing = await store.findBySlug(slug);
|
|
23
|
+
let healedDbRow = false;
|
|
24
|
+
if (!existing && airtable) {
|
|
25
|
+
const legacy = await airtable.findBySlug(slug);
|
|
26
|
+
if (legacy) {
|
|
27
|
+
await airtable.adopt(legacy);
|
|
28
|
+
existing = await store.findBySlug(slug);
|
|
29
|
+
if (!existing) {
|
|
30
|
+
throw new Error(
|
|
31
|
+
`ensure-site: adopted Airtable record ${legacy.id} for '${slug}' but Turso still has no row for the slug`
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
healedDbRow = true;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (!existing) {
|
|
38
|
+
const id = (deps.mintId ?? mintSiteId)();
|
|
39
|
+
try {
|
|
40
|
+
await store.create({
|
|
41
|
+
id,
|
|
42
|
+
slug,
|
|
43
|
+
name: input.displayName ?? slug,
|
|
44
|
+
status: "building",
|
|
45
|
+
url: input.url ?? null,
|
|
46
|
+
pointOfContact: input.pointOfContact ?? null,
|
|
47
|
+
gitRepo: input.gitRepo ?? `reddoorla/${slug}`
|
|
48
|
+
});
|
|
49
|
+
} catch (err) {
|
|
50
|
+
if (!slugTaken(err)) throw err;
|
|
51
|
+
const owner = await store.findBySlug(slug).catch(() => null);
|
|
52
|
+
throw new Error(
|
|
53
|
+
`ensure-site: slug '${slug}' is already taken${owner ? ` by site ${owner.id}` : ""} \u2014 it was created after this run looked; re-run to resume that site`,
|
|
54
|
+
{ cause: err }
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
skipsAirtableShadow("ensureSite.create", id);
|
|
58
|
+
return {
|
|
59
|
+
status: "created",
|
|
60
|
+
siteId: id,
|
|
61
|
+
updatedFields: [],
|
|
62
|
+
skippedMismatches: [],
|
|
63
|
+
healedDbRow: false,
|
|
64
|
+
airtableShadow: "skipped"
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
const patch = {};
|
|
68
|
+
const skippedMismatches = [];
|
|
69
|
+
const consider = (key, provided, current) => {
|
|
70
|
+
if (!provided) return;
|
|
71
|
+
if (current === null || current === "") patch[key] = provided;
|
|
72
|
+
else if (current !== provided) skippedMismatches.push(key);
|
|
73
|
+
};
|
|
74
|
+
consider("url", input.url, existing.url);
|
|
75
|
+
consider("pointOfContact", input.pointOfContact, existing.pointOfContact);
|
|
76
|
+
consider("gitRepo", input.gitRepo, existing.gitRepo);
|
|
77
|
+
if (input.displayName !== void 0 && existing.name !== input.displayName) {
|
|
78
|
+
patch.name = input.displayName;
|
|
79
|
+
}
|
|
80
|
+
const updatedFields = Object.keys(patch);
|
|
81
|
+
let airtableShadow = "none";
|
|
82
|
+
if (updatedFields.length > 0) {
|
|
83
|
+
if (skipsAirtableShadow("ensureSite.update", existing.id)) {
|
|
84
|
+
airtableShadow = "skipped";
|
|
85
|
+
} else if (airtable && isAirtableRecordId(existing.id)) {
|
|
86
|
+
await airtable.update(existing.id, patch);
|
|
87
|
+
airtableShadow = "written";
|
|
88
|
+
}
|
|
89
|
+
if (!await store.updateIdentity(existing.id, patch)) {
|
|
90
|
+
throw new Error(`ensure-site: site ${existing.id} vanished from Turso mid-run`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
status: "exists",
|
|
95
|
+
siteId: existing.id,
|
|
96
|
+
updatedFields,
|
|
97
|
+
skippedMismatches,
|
|
98
|
+
healedDbRow,
|
|
99
|
+
airtableShadow
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
export {
|
|
103
|
+
ensureSite
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=ensure-site-JEKV2ODE.js.map
|