@pagepocket/lighterceptor 0.4.1 → 0.5.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.
@@ -0,0 +1,36 @@
1
+ import type { RequestSource } from "./types.js";
2
+ export type LighterceptorOptions = {
3
+ settleTimeMs?: number;
4
+ recursion?: boolean;
5
+ requestOnly?: boolean;
6
+ baseUrl?: string;
7
+ headers?: Record<string, string>;
8
+ };
9
+ export type RequestRecord = {
10
+ url: string;
11
+ source: RequestSource | "unknown";
12
+ timestamp: number;
13
+ };
14
+ export type ResponseRecord = {
15
+ status: number;
16
+ statusText: string;
17
+ headers: Record<string, string>;
18
+ body: string;
19
+ bodyEncoding: "text" | "base64";
20
+ };
21
+ export type NetworkRecord = {
22
+ url: string;
23
+ source: RequestSource | "unknown";
24
+ method: string;
25
+ timestamp: number;
26
+ response?: ResponseRecord;
27
+ error?: string;
28
+ };
29
+ export type LighterceptorResult = {
30
+ title?: string;
31
+ capturedAt: string;
32
+ requests: RequestRecord[];
33
+ networkRecords?: NetworkRecord[];
34
+ };
35
+ export type ResourceKind = "html" | "css" | "js";
36
+ //# sourceMappingURL=lighterceptor-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lighterceptor-model.d.ts","sourceRoot":"","sources":["../../src/lighterceptor-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,MAAM,oBAAoB,GAAG;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,aAAa,GAAG,SAAS,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,GAAG,QAAQ,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,aAAa,GAAG,SAAS,CAAC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=lighterceptor-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lighterceptor-model.js","sourceRoot":"","sources":["../../src/lighterceptor-model.ts"],"names":[],"mappings":""}
@@ -1,36 +1,5 @@
1
- import type { RequestSource } from "./types.js";
2
- export type LighterceptorOptions = {
3
- settleTimeMs?: number;
4
- recursion?: boolean;
5
- requestOnly?: boolean;
6
- baseUrl?: string;
7
- };
8
- export type RequestRecord = {
9
- url: string;
10
- source: RequestSource | "unknown";
11
- timestamp: number;
12
- };
13
- export type ResponseRecord = {
14
- status: number;
15
- statusText: string;
16
- headers: Record<string, string>;
17
- body: string;
18
- bodyEncoding: "text" | "base64";
19
- };
20
- export type NetworkRecord = {
21
- url: string;
22
- source: RequestSource | "unknown";
23
- method: string;
24
- timestamp: number;
25
- response?: ResponseRecord;
26
- error?: string;
27
- };
28
- export type LighterceptorResult = {
29
- title?: string;
30
- capturedAt: string;
31
- requests: RequestRecord[];
32
- networkRecords?: NetworkRecord[];
33
- };
1
+ import type { LighterceptorOptions, LighterceptorResult } from "./lighterceptor-model.js";
2
+ export type { LighterceptorOptions, LighterceptorResult, NetworkRecord, RequestRecord, ResourceKind, ResponseRecord } from "./lighterceptor-model.js";
34
3
  export declare class Lighterceptor {
35
4
  private input;
36
5
  private options;
@@ -1 +1 @@
1
- {"version":3,"file":"lighterceptor.d.ts","sourceRoot":"","sources":["../../src/lighterceptor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,MAAM,oBAAoB,GAAG;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,aAAa,GAAG,SAAS,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,GAAG,QAAQ,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,aAAa,GAAG,SAAS,CAA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