@haakco/hostingctl 1.0.865 → 1.0.868
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/main.js +227 -15
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
- package/platform/darwin-arm64/hostingctl +0 -0
- package/platform/darwin-x64/hostingctl +0 -0
- package/platform/linux-arm64/hostingctl +0 -0
- package/platform/linux-x64/hostingctl +0 -0
- package/platform/windows-x64/hostingctl.exe +0 -0
package/dist/main.js
CHANGED
|
@@ -37012,6 +37012,22 @@ function hostingSiteInsightsIncidents(options) {
|
|
|
37012
37012
|
}));
|
|
37013
37013
|
}
|
|
37014
37014
|
/**
|
|
37015
|
+
* {@link /c/:company/hosting/environments/:environmentUuid/site-insights/:siteUuid/page-rechecks/:recheckUuid}
|
|
37016
|
+
*/
|
|
37017
|
+
function hostingSiteInsightsPageRecheck(options) {
|
|
37018
|
+
const { client: request = client, ...config } = options;
|
|
37019
|
+
return withUnwrap(request({
|
|
37020
|
+
method: "GET",
|
|
37021
|
+
url: "/c/{company}/hosting/environments/{environmentUuid}/site-insights/{siteUuid}/page-rechecks/{recheckUuid}",
|
|
37022
|
+
security: [{
|
|
37023
|
+
type: "http",
|
|
37024
|
+
scheme: "bearer"
|
|
37025
|
+
}],
|
|
37026
|
+
...config,
|
|
37027
|
+
throwOnError: config.throwOnError ?? true
|
|
37028
|
+
}));
|
|
37029
|
+
}
|
|
37030
|
+
/**
|
|
37015
37031
|
* {@link /c/:company/hosting/environments/:environmentUuid/site-insights/:siteUuid/search/:provider}
|
|
37016
37032
|
*/
|
|
37017
37033
|
function hostingSiteInsightsConnectSearch(options) {
|
|
@@ -37093,6 +37109,23 @@ function hostingSiteInsightsAudit(options) {
|
|
|
37093
37109
|
}));
|
|
37094
37110
|
}
|
|
37095
37111
|
/**
|
|
37112
|
+
* {@link /c/:company/hosting/environments/:environmentUuid/site-insights/:siteUuid/page-rechecks}
|
|
37113
|
+
*/
|
|
37114
|
+
function hostingSiteInsightsRequestPageRecheck(options) {
|
|
37115
|
+
const { client: request = client, ...config } = options;
|
|
37116
|
+
return withUnwrap(request({
|
|
37117
|
+
method: "POST",
|
|
37118
|
+
url: "/c/{company}/hosting/environments/{environmentUuid}/site-insights/{siteUuid}/page-rechecks",
|
|
37119
|
+
security: [{
|
|
37120
|
+
type: "http",
|
|
37121
|
+
scheme: "bearer"
|
|
37122
|
+
}],
|
|
37123
|
+
contentType: { request: "application/json" },
|
|
37124
|
+
...config,
|
|
37125
|
+
throwOnError: config.throwOnError ?? true
|
|
37126
|
+
}));
|
|
37127
|
+
}
|
|
37128
|
+
/**
|
|
37096
37129
|
* {@link /c/:company/hosting/environments/:environmentUuid/site-insights/:siteUuid/fixes/:fix}
|
|
37097
37130
|
*/
|
|
37098
37131
|
function hostingSiteInsightsFix(options) {
|
|
@@ -48536,7 +48569,17 @@ var createHostingDatabaseRequestExtensionsEnum = {
|
|
|
48536
48569
|
autoinc: "autoinc",
|
|
48537
48570
|
insert_username: "insert_username",
|
|
48538
48571
|
moddatetime: "moddatetime",
|
|
48539
|
-
refint: "refint"
|
|
48572
|
+
refint: "refint",
|
|
48573
|
+
pgfaceting: "pgfaceting",
|
|
48574
|
+
pg_partman: "pg_partman",
|
|
48575
|
+
zson: "zson",
|
|
48576
|
+
pgmq: "pgmq",
|
|
48577
|
+
postgis_topology: "postgis_topology",
|
|
48578
|
+
address_standardizer_data_us: "address_standardizer_data_us",
|
|
48579
|
+
pointcloud: "pointcloud",
|
|
48580
|
+
pointcloud_postgis: "pointcloud_postgis",
|
|
48581
|
+
amcheck: "amcheck",
|
|
48582
|
+
pg_background: "pg_background"
|
|
48540
48583
|
};
|
|
48541
48584
|
var hostingWorkloadEnum = {
|
|
48542
48585
|
wordpress: "wordpress",
|
|
@@ -57192,7 +57235,17 @@ var createHostingDatabaseRequestSchema = object({
|
|
|
57192
57235
|
"autoinc",
|
|
57193
57236
|
"insert_username",
|
|
57194
57237
|
"moddatetime",
|
|
57195
|
-
"refint"
|
|
57238
|
+
"refint",
|
|
57239
|
+
"pgfaceting",
|
|
57240
|
+
"pg_partman",
|
|
57241
|
+
"zson",
|
|
57242
|
+
"pgmq",
|
|
57243
|
+
"postgis_topology",
|
|
57244
|
+
"address_standardizer_data_us",
|
|
57245
|
+
"pointcloud",
|
|
57246
|
+
"pointcloud_postgis",
|
|
57247
|
+
"amcheck",
|
|
57248
|
+
"pg_background"
|
|
57196
57249
|
])).max(16).refine((items) => new Set(items).size === items.length, { message: "Array entries must be unique" }).optional().describe("PostgreSQL extensions. Validated against the catalogue that knows what each one needs to be\nloaded, so a name that would be silently ignored is refused instead."),
|
|
57197
57250
|
bindings: array(uuid()).max(16).refine((items) => new Set(items).size === items.length, { message: "Array entries must be unique" }).optional(),
|
|
57198
57251
|
applicationUuid: string().optional()
|
|
@@ -60201,6 +60254,10 @@ var hostingReleaseHttpProbeDataSchema = object({
|
|
|
60201
60254
|
readinessFailureThreshold: int(),
|
|
60202
60255
|
protocol: hostingClientImageProtocolEnumSchema.describe("What a client image's listener speaks (`run.protocol`, schema 1.25). The value is the URL scheme a reference hands to the application that reads it (`{service: db, field: url}` → `postgres://host:port`), and it decides exposure: only `http` is routed; every other protocol is private, reached only by the applications that reference it, and checked for readiness by a TCP connect instead of an HTTP path. The schema enum and this enum are the same list.\n")
|
|
60203
60256
|
});
|
|
60257
|
+
var hostingImageUserDataSchema = object({
|
|
60258
|
+
uid: int(),
|
|
60259
|
+
gid: int()
|
|
60260
|
+
});
|
|
60204
60261
|
var hostingReleaseImageDataSchema = object({
|
|
60205
60262
|
connectionUuid: string(),
|
|
60206
60263
|
connectionVersion: int(),
|
|
@@ -60217,7 +60274,8 @@ var hostingReleaseImageDataSchema = object({
|
|
|
60217
60274
|
importedAt: datetime().nullable(),
|
|
60218
60275
|
sourceReference: string(),
|
|
60219
60276
|
httpProbe: union([hostingReleaseHttpProbeDataSchema, _null()]),
|
|
60220
|
-
user: string().nullable()
|
|
60277
|
+
user: string().nullable(),
|
|
60278
|
+
identity: union([hostingImageUserDataSchema, _null()])
|
|
60221
60279
|
});
|
|
60222
60280
|
var hostingReleaseDataSchema = object({
|
|
60223
60281
|
uuid: string(),
|
|
@@ -61781,6 +61839,15 @@ var hostingSiteChecksDataSchema = object({
|
|
|
61781
61839
|
openIncidentStartedAt: string().nullable(),
|
|
61782
61840
|
openIncidentCause: string().nullable()
|
|
61783
61841
|
});
|
|
61842
|
+
var siteGeneratedFixSchema = object({
|
|
61843
|
+
format: string(),
|
|
61844
|
+
code: string()
|
|
61845
|
+
});
|
|
61846
|
+
var siteRemedySchema = object({
|
|
61847
|
+
kind: string(),
|
|
61848
|
+
element: string(),
|
|
61849
|
+
generated: union([siteGeneratedFixSchema, _null()])
|
|
61850
|
+
});
|
|
61784
61851
|
var hostingSiteFixEnumSchema = _enum([
|
|
61785
61852
|
"https-redirect",
|
|
61786
61853
|
"compression",
|
|
@@ -61799,6 +61866,7 @@ var hostingSiteFixDataSchema = object({
|
|
|
61799
61866
|
summary: string()
|
|
61800
61867
|
});
|
|
61801
61868
|
var hostingSiteFindingDataSchema = object({
|
|
61869
|
+
findingUuid: string(),
|
|
61802
61870
|
rule: string(),
|
|
61803
61871
|
severity: string(),
|
|
61804
61872
|
title: string(),
|
|
@@ -61807,6 +61875,8 @@ var hostingSiteFindingDataSchema = object({
|
|
|
61807
61875
|
fix: string(),
|
|
61808
61876
|
source: string(),
|
|
61809
61877
|
firstSeenAt: string(),
|
|
61878
|
+
remedy: siteRemedySchema,
|
|
61879
|
+
recheckable: boolean(),
|
|
61810
61880
|
hostingFix: union([hostingSiteFixDataSchema, _null()])
|
|
61811
61881
|
});
|
|
61812
61882
|
var hostingSiteIdentityAssignmentStatusEnumSchema = _enum([
|
|
@@ -61847,6 +61917,29 @@ var hostingSiteInsightStateEnumSchema = _enum([
|
|
|
61847
61917
|
"audited",
|
|
61848
61918
|
"unavailable"
|
|
61849
61919
|
]).describe("Where one site stands with Custd's audits, as the environment page shows it.\n| |\n|---|\n| `registering` <br/> Hosting has not yet claimed the domain in Custd; the next pass does. |\n| `awaiting-verification` <br/> Custd waits for the DNS record that proves the domain is the customer's. |\n| `withdrawing-attestation` <br/> Hosting's authority ended and Custd has yet to confirm withdrawal. |\n| `auditing` <br/> Verified; the first audit has not finished yet. |\n| `audited` <br/> At least one audit finished; its findings are shown. |\n| `unavailable` <br/> Custd could not be read just now; nothing is wrong with the site because of it. |");
|
|
61920
|
+
var siteNextActionTargetSchema = object({
|
|
61921
|
+
place: string(),
|
|
61922
|
+
findingUuid: string().nullable(),
|
|
61923
|
+
pageUrl: string().nullable()
|
|
61924
|
+
});
|
|
61925
|
+
var siteNextActionSchema = object({
|
|
61926
|
+
kind: string(),
|
|
61927
|
+
title: string(),
|
|
61928
|
+
why: string(),
|
|
61929
|
+
severity: string(),
|
|
61930
|
+
affectedCount: int(),
|
|
61931
|
+
target: siteNextActionTargetSchema,
|
|
61932
|
+
recheckable: boolean(),
|
|
61933
|
+
rule: string().nullable()
|
|
61934
|
+
});
|
|
61935
|
+
var hostingSiteNextActionsDataSchema = object({
|
|
61936
|
+
status: string(),
|
|
61937
|
+
headline: string(),
|
|
61938
|
+
checkedAt: string().nullable(),
|
|
61939
|
+
notChecked: array(string()),
|
|
61940
|
+
actionCount: int(),
|
|
61941
|
+
actions: array(siteNextActionSchema)
|
|
61942
|
+
});
|
|
61850
61943
|
var hostingSiteInsightDataSchema = object({
|
|
61851
61944
|
uuid: string(),
|
|
61852
61945
|
hostname: string(),
|
|
@@ -61858,6 +61951,7 @@ var hostingSiteInsightDataSchema = object({
|
|
|
61858
61951
|
lastAuditedAt: string().nullable(),
|
|
61859
61952
|
summary: union([hostingSiteAuditSummaryDataSchema, _null()]),
|
|
61860
61953
|
checks: union([hostingSiteChecksDataSchema, _null()]),
|
|
61954
|
+
nextActions: union([hostingSiteNextActionsDataSchema, _null()]),
|
|
61861
61955
|
findings: array(hostingSiteFindingDataSchema)
|
|
61862
61956
|
});
|
|
61863
61957
|
object({
|
|
@@ -61896,6 +61990,20 @@ object({
|
|
|
61896
61990
|
days: int(),
|
|
61897
61991
|
runs: array(siteLighthouseRunSchema)
|
|
61898
61992
|
});
|
|
61993
|
+
var sitePageRecheckStateSchema = _enum([
|
|
61994
|
+
"queued",
|
|
61995
|
+
"checked",
|
|
61996
|
+
"failed"
|
|
61997
|
+
]).describe("SitePageRecheckState is where a one-page recheck is: waiting for the scheduler, done, or failed.\n");
|
|
61998
|
+
object({
|
|
61999
|
+
recheckUuid: string(),
|
|
62000
|
+
url: string(),
|
|
62001
|
+
state: sitePageRecheckStateSchema.describe("SitePageRecheckState is where a one-page recheck is: waiting for the scheduler, done, or failed.\n"),
|
|
62002
|
+
requestedAt: string(),
|
|
62003
|
+
checkedAt: string().nullable(),
|
|
62004
|
+
openRules: array(string()),
|
|
62005
|
+
fixedRules: array(string())
|
|
62006
|
+
});
|
|
61899
62007
|
var siteUptimeStatusSchema = _enum([
|
|
61900
62008
|
"unknown",
|
|
61901
62009
|
"up",
|
|
@@ -62003,12 +62111,15 @@ object({
|
|
|
62003
62111
|
certificate: siteReportCertificateSchema,
|
|
62004
62112
|
speed: array(siteReportSpeedSchema),
|
|
62005
62113
|
search: siteReportSearchSchema,
|
|
62006
|
-
audit: siteReportAuditSchema
|
|
62114
|
+
audit: siteReportAuditSchema,
|
|
62115
|
+
template: string().nullable(),
|
|
62116
|
+
nextActions: array(siteNextActionSchema)
|
|
62007
62117
|
});
|
|
62008
62118
|
var siteReportShareSchema = object({
|
|
62009
62119
|
shareUuid: string(),
|
|
62010
62120
|
createdAt: string(),
|
|
62011
|
-
expiresAt: string()
|
|
62121
|
+
expiresAt: string(),
|
|
62122
|
+
reportUuid: string().nullable()
|
|
62012
62123
|
});
|
|
62013
62124
|
var hostingSiteReportLinkDataSchema = object({
|
|
62014
62125
|
share: siteReportShareSchema,
|
|
@@ -68893,16 +69004,22 @@ object({
|
|
|
68893
69004
|
environmentUuid: string(),
|
|
68894
69005
|
siteUuid: string()
|
|
68895
69006
|
});
|
|
69007
|
+
_enum(["executive", "full"]).optional();
|
|
68896
69008
|
union([
|
|
68897
69009
|
object({ message: string().describe("Error overview.") }),
|
|
68898
69010
|
object({ message: string().describe("Error overview.") }),
|
|
68899
|
-
messageDataSchema
|
|
69011
|
+
messageDataSchema,
|
|
69012
|
+
object({
|
|
69013
|
+
message: string().describe("Errors overview."),
|
|
69014
|
+
errors: record$3(string(), array(string())).describe("A detailed description of each field that failed validation.")
|
|
69015
|
+
})
|
|
68900
69016
|
]);
|
|
68901
69017
|
object({
|
|
68902
69018
|
company: string(),
|
|
68903
69019
|
environmentUuid: string(),
|
|
68904
69020
|
siteUuid: string()
|
|
68905
69021
|
});
|
|
69022
|
+
object({ template: _enum(["executive", "full"]).optional() });
|
|
68906
69023
|
int().min(1).max(90).optional();
|
|
68907
69024
|
union([
|
|
68908
69025
|
object({ message: string().describe("Error overview.") }),
|
|
@@ -68939,6 +69056,13 @@ object({
|
|
|
68939
69056
|
environmentUuid: string(),
|
|
68940
69057
|
siteUuid: string()
|
|
68941
69058
|
});
|
|
69059
|
+
union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
|
|
69060
|
+
object({
|
|
69061
|
+
company: string(),
|
|
69062
|
+
environmentUuid: string(),
|
|
69063
|
+
siteUuid: string(),
|
|
69064
|
+
recheckUuid: string()
|
|
69065
|
+
});
|
|
68942
69066
|
union([
|
|
68943
69067
|
object({ message: string().describe("Error overview.") }),
|
|
68944
69068
|
object({ message: string().describe("Error overview.") }),
|
|
@@ -68993,6 +69117,21 @@ object({
|
|
|
68993
69117
|
environmentUuid: string(),
|
|
68994
69118
|
siteUuid: string()
|
|
68995
69119
|
});
|
|
69120
|
+
union([
|
|
69121
|
+
object({ message: string().describe("Error overview.") }),
|
|
69122
|
+
object({ message: string().describe("Error overview.") }),
|
|
69123
|
+
object({
|
|
69124
|
+
message: string().describe("Errors overview."),
|
|
69125
|
+
errors: record$3(string(), array(string())).describe("A detailed description of each field that failed validation.")
|
|
69126
|
+
}),
|
|
69127
|
+
messageDataSchema
|
|
69128
|
+
]);
|
|
69129
|
+
object({ url: url().max(2048) });
|
|
69130
|
+
object({
|
|
69131
|
+
company: string(),
|
|
69132
|
+
environmentUuid: string(),
|
|
69133
|
+
siteUuid: string()
|
|
69134
|
+
});
|
|
68996
69135
|
union([
|
|
68997
69136
|
object({ message: string().describe("Error overview.") }),
|
|
68998
69137
|
object({ message: string().describe("Error overview.") }),
|
|
@@ -80207,6 +80346,21 @@ var SITE_INSIGHTS_FLAG_SPECS = [
|
|
|
80207
80346
|
takesValue: true,
|
|
80208
80347
|
description: "The number of days of Lighthouse lab runs, from 1 to 30."
|
|
80209
80348
|
},
|
|
80349
|
+
{
|
|
80350
|
+
name: "--template",
|
|
80351
|
+
takesValue: true,
|
|
80352
|
+
description: "The report layout: executive for the short summary, or full. Defaults to full."
|
|
80353
|
+
},
|
|
80354
|
+
{
|
|
80355
|
+
name: "--url",
|
|
80356
|
+
takesValue: true,
|
|
80357
|
+
description: "The page `environment site-insights-page-recheck` checks again, on the site's own address."
|
|
80358
|
+
},
|
|
80359
|
+
{
|
|
80360
|
+
name: "--recheck",
|
|
80361
|
+
takesValue: true,
|
|
80362
|
+
description: "The page check UUID `environment site-insights-page-recheck` prints."
|
|
80363
|
+
},
|
|
80210
80364
|
{
|
|
80211
80365
|
name: "--expires-in-days",
|
|
80212
80366
|
takesValue: true,
|
|
@@ -80300,19 +80454,24 @@ var SITE_REPORT_COMMANDS = [
|
|
|
80300
80454
|
"site-insights-incidents",
|
|
80301
80455
|
"site-insights-report-shares",
|
|
80302
80456
|
"site-insights-report-share-create",
|
|
80303
|
-
"site-insights-report-share-revoke"
|
|
80457
|
+
"site-insights-report-share-revoke",
|
|
80458
|
+
"site-insights-page-recheck",
|
|
80459
|
+
"site-insights-page-recheck-status"
|
|
80304
80460
|
];
|
|
80461
|
+
var REPORT_TEMPLATES = ["executive", "full"];
|
|
80305
80462
|
var USAGE$30 = [
|
|
80306
80463
|
"Usage: hostingctl environment <command> <environment-uuid> --site <site-uuid> --company <slug>",
|
|
80307
|
-
" site-insights-report Read the authenticated report.",
|
|
80464
|
+
" site-insights-report Read the authenticated report [--template <executive|full>].",
|
|
80308
80465
|
" site-insights-uptime-history Read hourly response times [--response-days <1-90>].",
|
|
80309
80466
|
" site-insights-lighthouse-history Read Lighthouse lab runs [--days <1-30>].",
|
|
80310
80467
|
" site-insights-incidents Read up to twenty recent outages.",
|
|
80311
80468
|
" site-insights-report-shares List share identifiers and expiry.",
|
|
80312
80469
|
" site-insights-report-share-create Create a one-time link [--expires-in-days <1-90>].",
|
|
80313
80470
|
" site-insights-report-share-revoke Revoke the link named by --share <uuid>.",
|
|
80471
|
+
" site-insights-page-recheck Check the page named by --url <url> again now.",
|
|
80472
|
+
" site-insights-page-recheck-status Read the check named by --recheck <uuid>.",
|
|
80314
80473
|
"",
|
|
80315
|
-
"Creation and
|
|
80474
|
+
"Creation, revocation and a page check need --confirm. Use --dry-run to preview any write."
|
|
80316
80475
|
].join("\n");
|
|
80317
80476
|
function isSiteReportCommand(action) {
|
|
80318
80477
|
return SITE_REPORT_COMMANDS.some((command) => command === action);
|
|
@@ -80330,7 +80489,10 @@ async function environmentSiteReport(context, action, args) {
|
|
|
80330
80489
|
switch (action) {
|
|
80331
80490
|
case "site-insights-report": return {
|
|
80332
80491
|
kind: action,
|
|
80333
|
-
report: (await hostingSiteInsightsReport({
|
|
80492
|
+
report: (await hostingSiteInsightsReport({
|
|
80493
|
+
path,
|
|
80494
|
+
query: context.flags.has("--template") ? { template: templateFlag(context) } : void 0
|
|
80495
|
+
})).data
|
|
80334
80496
|
};
|
|
80335
80497
|
case "site-insights-uptime-history": return {
|
|
80336
80498
|
kind: action,
|
|
@@ -80362,8 +80524,35 @@ async function environmentSiteReport(context, action, args) {
|
|
|
80362
80524
|
kind: action,
|
|
80363
80525
|
outcome: await revokeShare(context, path)
|
|
80364
80526
|
};
|
|
80527
|
+
case "site-insights-page-recheck": return {
|
|
80528
|
+
kind: action,
|
|
80529
|
+
outcome: await requestPageRecheck(context, path)
|
|
80530
|
+
};
|
|
80531
|
+
case "site-insights-page-recheck-status": {
|
|
80532
|
+
const recheckUuid = requiredFlag$4(context, "--recheck", USAGE$30);
|
|
80533
|
+
return {
|
|
80534
|
+
kind: action,
|
|
80535
|
+
recheck: (await hostingSiteInsightsPageRecheck({ path: {
|
|
80536
|
+
...path,
|
|
80537
|
+
recheckUuid
|
|
80538
|
+
} })).data
|
|
80539
|
+
};
|
|
80540
|
+
}
|
|
80365
80541
|
}
|
|
80366
80542
|
}
|
|
80543
|
+
function templateFlag(context) {
|
|
80544
|
+
const value = requiredFlag$4(context, "--template", USAGE$30);
|
|
80545
|
+
const template = REPORT_TEMPLATES.find((candidate) => candidate === value);
|
|
80546
|
+
if (template === void 0) throw new UsageError("--template must be executive or full.");
|
|
80547
|
+
return template;
|
|
80548
|
+
}
|
|
80549
|
+
function requestPageRecheck(context, path) {
|
|
80550
|
+
const url = requiredFlag$4(context, "--url", USAGE$30);
|
|
80551
|
+
return confirmableWrite(context, `check ${url} again for site ${path.siteUuid} on environment ${path.environmentUuid}`, async () => (await hostingSiteInsightsRequestPageRecheck({
|
|
80552
|
+
path,
|
|
80553
|
+
body: { url }
|
|
80554
|
+
})).data);
|
|
80555
|
+
}
|
|
80367
80556
|
function daysFlag(context, flag, maximum) {
|
|
80368
80557
|
if (!context.flags.has(flag)) return void 0;
|
|
80369
80558
|
const value = requiredFlag$4(context, flag, USAGE$30);
|
|
@@ -80683,7 +80872,10 @@ var ENVIRONMENT_USAGE = [
|
|
|
80683
80872
|
" site-insights Custd's audits of each application's primary domain: state, TXT record, uptime, TLS and",
|
|
80684
80873
|
" findings. -verify, -audit and -fix act on one --site; -fix takes --fix <name>.",
|
|
80685
80874
|
" site-insights-report, site-insights-uptime-history, site-insights-lighthouse-history and",
|
|
80686
|
-
" site-insights-incidents read one --site. Use --response-days for uptime and --days for Lighthouse
|
|
80875
|
+
" site-insights-incidents read one --site. Use --response-days for uptime and --days for Lighthouse,",
|
|
80876
|
+
" and --template <executive|full> for the report.",
|
|
80877
|
+
" site-insights-page-recheck --url <url> checks one page again; read the result with",
|
|
80878
|
+
" site-insights-page-recheck-status --recheck <uuid>.",
|
|
80687
80879
|
" site-insights-report-shares lists one site's shares. Use site-insights-report-share-create",
|
|
80688
80880
|
" [--expires-in-days <1-90>] to get a link, or site-insights-report-share-revoke --share <uuid>.",
|
|
80689
80881
|
" site-insights-search reads one site's search providers. Use site-insights-search-connect",
|
|
@@ -82473,6 +82665,12 @@ function checksLines(checks) {
|
|
|
82473
82665
|
/** One site: where it stands, what proves it, and what the last audit found. */
|
|
82474
82666
|
function siteLines(site) {
|
|
82475
82667
|
const lines = [` ${site.hostname} ${site.state} site ${site.uuid}`, ` application ${site.applicationName ?? "none"}`];
|
|
82668
|
+
const next = site.nextActions;
|
|
82669
|
+
if (next !== null) {
|
|
82670
|
+
lines.push(` next ${next.headline}`);
|
|
82671
|
+
const [first] = next.actions;
|
|
82672
|
+
if (first !== void 0) lines.push(` first ${first.title}: ${first.why}`);
|
|
82673
|
+
}
|
|
82476
82674
|
const record = site.verificationRecord;
|
|
82477
82675
|
if (record !== null) lines.push(` record ${record.type} ${record.name} ${record.value}`);
|
|
82478
82676
|
if (site.lastFailure !== null) lines.push(` failure ${site.lastFailure}`);
|
|
@@ -82513,8 +82711,10 @@ function reportText(report) {
|
|
|
82513
82711
|
["30 days", uptime.windows.last30d]
|
|
82514
82712
|
];
|
|
82515
82713
|
return [
|
|
82516
|
-
`${report.host} · uptime ${uptime.status} · generated ${report.generatedAt}`,
|
|
82714
|
+
`${report.host} · uptime ${uptime.status} · generated ${report.generatedAt} · ${report.template ?? "full"} report`,
|
|
82517
82715
|
...uptime.downSince === null ? [] : [`Down since ${uptime.downSince}`],
|
|
82716
|
+
...report.nextActions.length === 0 ? [] : ["What to do next"],
|
|
82717
|
+
...report.nextActions.map((action, index) => ` ${index + 1}. ${action.title}: ${action.why}`),
|
|
82518
82718
|
"Uptime",
|
|
82519
82719
|
...windows.map(([label, window]) => ` ${label} ${window.upPercent === null ? "unknown" : `${window.upPercent}%`} (${window.checks} checks)`),
|
|
82520
82720
|
`TLS ${certificate.problem ? "needs attention" : certificate.issuer ?? "issuer unknown"} · expires ${certificate.validTo ?? "unknown"}`,
|
|
@@ -82538,8 +82738,20 @@ function environmentSiteReportText(answer) {
|
|
|
82538
82738
|
case "site-insights-report-shares": return answer.shares.length === 0 ? "No report shares." : answer.shares.map((share) => ` ${share.shareUuid} · created ${share.createdAt} · expires ${share.expiresAt}`).join("\n");
|
|
82539
82739
|
case "site-insights-report-share-create": return renderWriteOutcome(answer.outcome, (result) => `Share ${result.share.shareUuid} expires ${result.share.expiresAt}. Copy this link now.\n${result.url}`);
|
|
82540
82740
|
case "site-insights-report-share-revoke": return renderWriteOutcome(answer.outcome, () => "Report share revoked.");
|
|
82741
|
+
case "site-insights-page-recheck": return renderWriteOutcome(answer.outcome, recheckText);
|
|
82742
|
+
case "site-insights-page-recheck-status": return recheckText(answer.recheck);
|
|
82541
82743
|
}
|
|
82542
82744
|
}
|
|
82745
|
+
/** A page check's state; a rule is fixed only when a finished check lists it as fixed. */
|
|
82746
|
+
function recheckText(recheck) {
|
|
82747
|
+
if (recheck.state === "queued") return `Check ${recheck.recheckUuid} of ${recheck.url} is queued. Read it with site-insights-page-recheck-status --recheck ${recheck.recheckUuid}.`;
|
|
82748
|
+
if (recheck.state === "failed") return `The check of ${recheck.url} failed. Try again later.`;
|
|
82749
|
+
return [
|
|
82750
|
+
`Checked ${recheck.url} at ${recheck.checkedAt ?? "unknown"}`,
|
|
82751
|
+
` fixed ${recheck.fixedRules.join(", ") || "none"}`,
|
|
82752
|
+
` open ${recheck.openRules.join(", ") || "none"}`
|
|
82753
|
+
].join("\n");
|
|
82754
|
+
}
|
|
82543
82755
|
function milliseconds(value) {
|
|
82544
82756
|
return value === null ? "unknown" : `${value} ms`;
|
|
82545
82757
|
}
|
|
@@ -93847,7 +94059,7 @@ function writeUpdateState(state, env = process.env) {
|
|
|
93847
94059
|
} catch {}
|
|
93848
94060
|
}
|
|
93849
94061
|
// src/version.ts
|
|
93850
|
-
var VERSION = "1.0.
|
|
94062
|
+
var VERSION = "1.0.868";
|
|
93851
94063
|
// src/commands/update.ts
|
|
93852
94064
|
/**
|
|
93853
94065
|
* `update` — bring this copy of the CLI up to the published version.
|
|
@@ -93921,7 +94133,7 @@ var update = {
|
|
|
93921
94133
|
}, process.env);
|
|
93922
94134
|
return {
|
|
93923
94135
|
...known,
|
|
93924
|
-
current: after ?? "1.0.
|
|
94136
|
+
current: after ?? "1.0.868",
|
|
93925
94137
|
latest: after ?? latest,
|
|
93926
94138
|
upToDate: after !== null && (latest === null || !isNewerVersion(latest, after)),
|
|
93927
94139
|
action: "run",
|
|
@@ -94207,7 +94419,7 @@ async function printUpdateNotice(options) {
|
|
|
94207
94419
|
}, env, { waitMs: NOTICE_LOCK_WAIT_MS });
|
|
94208
94420
|
} catch {}
|
|
94209
94421
|
if (latest === null) return;
|
|
94210
|
-
if (!isNewerVersion(latest, "1.0.
|
|
94422
|
+
if (!isNewerVersion(latest, "1.0.868")) return;
|
|
94211
94423
|
process.stderr.write(`A newer hostingctl is published: ${latest} (this copy is ${VERSION}). Run \`hostingctl update\` to update.\n`);
|
|
94212
94424
|
}
|
|
94213
94425
|
/** Whether an environment variable is set to something, which is how CI and the opt-out are read. */
|