@reddoorla/maintenance 0.54.3 → 0.55.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 +123 -15
- package/dist/cli/bin.js.map +1 -1
- package/dist/cli/commands/audit.js +28 -10
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -5
|
@@ -125,6 +125,7 @@ __export(websites_exports, {
|
|
|
125
125
|
parseSecurityAdvisories: () => parseSecurityAdvisories,
|
|
126
126
|
siteSlug: () => siteSlug,
|
|
127
127
|
updateA11yCounts: () => updateA11yCounts,
|
|
128
|
+
updateAnalyticsHealth: () => updateAnalyticsHealth,
|
|
128
129
|
updateAuditFields: () => updateAuditFields,
|
|
129
130
|
updateDepsCounts: () => updateDepsCounts,
|
|
130
131
|
updateGitHubSignals: () => updateGitHubSignals,
|
|
@@ -185,6 +186,7 @@ function mapRow(rec) {
|
|
|
185
186
|
ga4PropertyId: f["GA4 property ID"] ?? null,
|
|
186
187
|
searchQuery: f["Search query"] ?? null,
|
|
187
188
|
searchConsoleProperty: f["Search Console property"] ?? null,
|
|
189
|
+
analyticsSoftFailAt: f["Analytics soft-fail at"] ?? null,
|
|
188
190
|
gitRepo: f["Git repo"] ?? null,
|
|
189
191
|
reportRecipientsTo: f["Report recipients (To)"] ?? null,
|
|
190
192
|
reportRecipientsCc: f["Report recipients (CC)"] ?? null,
|
|
@@ -327,6 +329,10 @@ function browserFields(r) {
|
|
|
327
329
|
async function updateScores(base, recordId, scores) {
|
|
328
330
|
await base(WEBSITES_TABLE).update([{ id: recordId, fields: scoreFields(scores) }]);
|
|
329
331
|
}
|
|
332
|
+
async function updateAnalyticsHealth(base, recordId, at) {
|
|
333
|
+
const fields = { "Analytics soft-fail at": at };
|
|
334
|
+
await base(WEBSITES_TABLE).update([{ id: recordId, fields }]);
|
|
335
|
+
}
|
|
330
336
|
async function updateA11yCounts(base, recordId, counts) {
|
|
331
337
|
await base(WEBSITES_TABLE).update([{ id: recordId, fields: a11yFields(counts) }]);
|
|
332
338
|
}
|
|
@@ -2104,6 +2110,20 @@ function fromJsonFile(path) {
|
|
|
2104
2110
|
}
|
|
2105
2111
|
|
|
2106
2112
|
// src/cli/fleet/resolve-sites.ts
|
|
2113
|
+
init_url();
|
|
2114
|
+
function sanitizeDynamicSites(sites) {
|
|
2115
|
+
return sites.map((s) => {
|
|
2116
|
+
if (s.deployedUrl !== void 0 && !isHttpUrl(s.deployedUrl)) {
|
|
2117
|
+
console.warn(
|
|
2118
|
+
`[inventory] dynamic inventory: ignoring deployedUrl that is not http(s) for ${s.name ?? s.path}: ${JSON.stringify(s.deployedUrl)}`
|
|
2119
|
+
);
|
|
2120
|
+
const copy = { ...s };
|
|
2121
|
+
delete copy.deployedUrl;
|
|
2122
|
+
return copy;
|
|
2123
|
+
}
|
|
2124
|
+
return s;
|
|
2125
|
+
});
|
|
2126
|
+
}
|
|
2107
2127
|
async function resolveSites(input) {
|
|
2108
2128
|
if (input.site && input.fleet) {
|
|
2109
2129
|
throw Object.assign(new Error("cannot combine a positional [site] with --fleet"), {
|
|
@@ -2120,24 +2140,22 @@ async function resolveSites(input) {
|
|
|
2120
2140
|
if (input.fleet) {
|
|
2121
2141
|
const fleetPath = resolve(input.cwd, input.fleet);
|
|
2122
2142
|
const ext = extname(fleetPath).toLowerCase();
|
|
2123
|
-
let provider;
|
|
2124
2143
|
if (ext === ".json") {
|
|
2125
|
-
|
|
2126
|
-
}
|
|
2144
|
+
return fromJsonFile(fleetPath)();
|
|
2145
|
+
}
|
|
2146
|
+
if (ext === ".js" || ext === ".mjs" || ext === ".cjs") {
|
|
2127
2147
|
const mod = await import(pathToFileURL(fleetPath).href);
|
|
2128
2148
|
if (!mod.default || typeof mod.default !== "function") {
|
|
2129
2149
|
throw Object.assign(new Error(`--fleet ${input.fleet}: default export is not a function`), {
|
|
2130
2150
|
exitCode: 2
|
|
2131
2151
|
});
|
|
2132
2152
|
}
|
|
2133
|
-
|
|
2134
|
-
} else {
|
|
2135
|
-
throw Object.assign(
|
|
2136
|
-
new Error(`--fleet ${input.fleet}: unsupported extension ${ext || "(none)"}`),
|
|
2137
|
-
{ exitCode: 2 }
|
|
2138
|
-
);
|
|
2153
|
+
return sanitizeDynamicSites(await mod.default());
|
|
2139
2154
|
}
|
|
2140
|
-
|
|
2155
|
+
throw Object.assign(
|
|
2156
|
+
new Error(`--fleet ${input.fleet}: unsupported extension ${ext || "(none)"}`),
|
|
2157
|
+
{ exitCode: 2 }
|
|
2158
|
+
);
|
|
2141
2159
|
}
|
|
2142
2160
|
return localPath(resolve(input.cwd, input.site ?? input.cwd))();
|
|
2143
2161
|
}
|