@fulldotdev/scan 0.1.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.
Files changed (55) hide show
  1. package/README.md +79 -0
  2. package/bin/fullscan.js +2 -0
  3. package/dist/cli.d.ts +1 -0
  4. package/dist/cli.js +239 -0
  5. package/dist/engine/analysis.d.ts +2 -0
  6. package/dist/engine/analysis.js +747 -0
  7. package/dist/engine/browser-inspection.d.ts +143 -0
  8. package/dist/engine/browser-inspection.js +567 -0
  9. package/dist/engine/browser.d.ts +22 -0
  10. package/dist/engine/browser.js +629 -0
  11. package/dist/engine/collect.d.ts +6 -0
  12. package/dist/engine/collect.js +359 -0
  13. package/dist/engine/crawl-scope.d.ts +22 -0
  14. package/dist/engine/crawl-scope.js +145 -0
  15. package/dist/engine/env.d.ts +1 -0
  16. package/dist/engine/env.js +3 -0
  17. package/dist/engine/html.d.ts +307 -0
  18. package/dist/engine/html.js +645 -0
  19. package/dist/engine/language.d.ts +13 -0
  20. package/dist/engine/language.js +75 -0
  21. package/dist/engine/lighthouse-evidence.d.ts +36 -0
  22. package/dist/engine/lighthouse-evidence.js +69 -0
  23. package/dist/engine/lighthouse.d.ts +4 -0
  24. package/dist/engine/lighthouse.js +284 -0
  25. package/dist/engine/log.d.ts +1 -0
  26. package/dist/engine/log.js +4 -0
  27. package/dist/engine/network.d.ts +53 -0
  28. package/dist/engine/network.js +296 -0
  29. package/dist/engine/proxy.d.ts +8 -0
  30. package/dist/engine/proxy.js +95 -0
  31. package/dist/engine/run.d.ts +38 -0
  32. package/dist/engine/run.js +202 -0
  33. package/dist/engine/select.d.ts +6 -0
  34. package/dist/engine/select.js +38 -0
  35. package/dist/engine/site.d.ts +186 -0
  36. package/dist/engine/site.js +758 -0
  37. package/dist/engine/srcset.d.ts +1 -0
  38. package/dist/engine/srcset.js +31 -0
  39. package/dist/engine/state.d.ts +30 -0
  40. package/dist/engine/state.js +198 -0
  41. package/dist/engine/structured-data.d.ts +83 -0
  42. package/dist/engine/structured-data.js +331 -0
  43. package/dist/engine/types.d.ts +128 -0
  44. package/dist/engine/types.js +63 -0
  45. package/dist/engine.d.ts +1 -0
  46. package/dist/engine.js +1 -0
  47. package/dist/index.d.ts +8 -0
  48. package/dist/index.js +7 -0
  49. package/dist/report/build.d.ts +377 -0
  50. package/dist/report/build.js +2263 -0
  51. package/dist/report/evidence.d.ts +58 -0
  52. package/dist/report/evidence.js +192 -0
  53. package/dist/report/rules.d.ts +41 -0
  54. package/dist/report/rules.js +301 -0
  55. package/package.json +52 -0
@@ -0,0 +1,186 @@
1
+ import { XMLParser } from "fast-xml-parser";
2
+ import { HttpClient } from "./network.js";
3
+ import { type JobResult, type Scan } from "./types.js";
4
+ export declare const xmlParser: XMLParser;
5
+ export declare function parseSitemap(body: string): {
6
+ valid: boolean;
7
+ error: string;
8
+ urls: never[];
9
+ sitemaps: never[];
10
+ } | {
11
+ error?: undefined;
12
+ valid: boolean;
13
+ urls: {
14
+ url: string;
15
+ lastmod: any;
16
+ priority: any;
17
+ changefreq: any;
18
+ }[];
19
+ sitemaps: string[];
20
+ };
21
+ export declare const botPurposes: Record<string, string[]>;
22
+ export declare function crawlerPolicy(robots: Awaited<ReturnType<HttpClient["getRobots"]>>, url: string): {
23
+ robotsUrl: string;
24
+ robotsOutcome: "blocked" | "error" | "http-error" | "inconclusive" | "ok";
25
+ bots: {
26
+ bot: string;
27
+ purpose: string;
28
+ allowed: boolean | null;
29
+ }[];
30
+ interpretation: string;
31
+ };
32
+ export declare function collectSitemap(scan: Scan, url: string, http: HttpClient): Promise<JobResult>;
33
+ export declare function dnsSnapshot(host: string): Promise<{
34
+ host: string;
35
+ domain: string;
36
+ records: any;
37
+ email: {
38
+ spf: string[];
39
+ dmarc: string[];
40
+ mtaSts: string[];
41
+ bimi: string[];
42
+ scope: string;
43
+ };
44
+ }>;
45
+ export declare function tlsSnapshot(host: string): Promise<unknown>;
46
+ export declare function discover(scan: Scan, http: HttpClient): Promise<JobResult>;
47
+ export declare function domainSnapshot(domain: string): Promise<{
48
+ status: string;
49
+ domain: string;
50
+ error: string;
51
+ expiresAt?: undefined;
52
+ daysRemaining?: undefined;
53
+ registrar?: undefined;
54
+ statuses?: undefined;
55
+ source?: undefined;
56
+ } | {
57
+ error?: undefined;
58
+ status: string;
59
+ domain: string;
60
+ expiresAt: any;
61
+ daysRemaining: number | null;
62
+ registrar: any;
63
+ statuses: any;
64
+ source: string;
65
+ }>;
66
+ export declare function fieldData(target: {
67
+ origin: string;
68
+ } | {
69
+ url: string;
70
+ }): Promise<{
71
+ source?: undefined;
72
+ available: boolean;
73
+ level: string;
74
+ note: string;
75
+ lcp?: undefined;
76
+ inp?: undefined;
77
+ cls?: undefined;
78
+ period?: undefined;
79
+ } | {
80
+ note?: undefined;
81
+ available: boolean;
82
+ level: string;
83
+ lcp: number | null;
84
+ inp: number | null;
85
+ cls: number | null;
86
+ period: {
87
+ from: string | null;
88
+ to: string | null;
89
+ };
90
+ source: string;
91
+ } | null>;
92
+ export declare function safeBrowsing(url: string): Promise<{
93
+ status: string;
94
+ error: string;
95
+ flagged?: undefined;
96
+ threats?: undefined;
97
+ } | {
98
+ error?: undefined;
99
+ status: string;
100
+ flagged: boolean;
101
+ threats: string[];
102
+ } | null>;
103
+ export declare function fieldHistory(origin: string): Promise<{
104
+ note?: undefined;
105
+ available: boolean;
106
+ points?: undefined;
107
+ } | {
108
+ available: boolean;
109
+ note: string;
110
+ points?: undefined;
111
+ } | {
112
+ note?: undefined;
113
+ available: boolean;
114
+ points: any;
115
+ } | null>;
116
+ export declare function sslLabs(host: string): Promise<{
117
+ source?: undefined;
118
+ note?: undefined;
119
+ status: string;
120
+ error: string;
121
+ grade?: undefined;
122
+ hasWarnings?: undefined;
123
+ endpoints?: undefined;
124
+ testedAt?: undefined;
125
+ } | {
126
+ error?: undefined;
127
+ source?: undefined;
128
+ status: string;
129
+ note: any;
130
+ grade?: undefined;
131
+ hasWarnings?: undefined;
132
+ endpoints?: undefined;
133
+ testedAt?: undefined;
134
+ } | {
135
+ error?: undefined;
136
+ note?: undefined;
137
+ status: string;
138
+ grade: any;
139
+ hasWarnings: boolean;
140
+ endpoints: number;
141
+ testedAt: string | null;
142
+ source: string;
143
+ }>;
144
+ export declare function hstsPreload(domain: string): Promise<{
145
+ status: string;
146
+ error: string;
147
+ preload?: undefined;
148
+ } | {
149
+ error?: undefined;
150
+ status: string;
151
+ preload: any;
152
+ }>;
153
+ export declare function certificateLogs(domain: string): Promise<{
154
+ source?: undefined;
155
+ status: string;
156
+ error: string;
157
+ hostnames?: undefined;
158
+ issuers?: undefined;
159
+ issuedLast30Days?: undefined;
160
+ } | {
161
+ error?: undefined;
162
+ status: string;
163
+ hostnames: string[];
164
+ issuers: string[];
165
+ issuedLast30Days: number;
166
+ source: string;
167
+ }>;
168
+ export declare function blocklists(domain: string, _address: string | null): Promise<{
169
+ status: string;
170
+ results: ({
171
+ list: string;
172
+ status: string;
173
+ note: string;
174
+ answers?: undefined;
175
+ } | {
176
+ note?: undefined;
177
+ list: string;
178
+ status: string;
179
+ answers: string[];
180
+ } | {
181
+ note?: undefined;
182
+ answers?: undefined;
183
+ list: string;
184
+ status: string;
185
+ })[];
186
+ }>;