@thymian/plugin-har 0.1.7-canary.20260420-67bb013
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/har-schema.d.ts +4 -0
- package/dist/har-schema.d.ts.map +1 -0
- package/dist/har-schema.js +102 -0
- package/dist/har-schema.js.map +1 -0
- package/dist/har-transformer.d.ts +14 -0
- package/dist/har-transformer.d.ts.map +1 -0
- package/dist/har-transformer.js +90 -0
- package/dist/har-transformer.js.map +1 -0
- package/dist/har-types.d.ts +35 -0
- package/dist/har-types.d.ts.map +1 -0
- package/dist/har-types.js +2 -0
- package/dist/har-types.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +79 -0
- package/dist/index.js.map +1 -0
- package/dist/load-transactions.d.ts +10 -0
- package/dist/load-transactions.d.ts.map +1 -0
- package/dist/load-transactions.js +52 -0
- package/dist/load-transactions.js.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"har-schema.d.ts","sourceRoot":"","sources":["../src/har-schema.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAkG7C,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,MAAM,CAEzD;AAED,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { ajv } from '@thymian/core';
|
|
2
|
+
/**
|
|
3
|
+
* Minimal JSON Schema for HAR 1.2 structure validation.
|
|
4
|
+
* Validates only the fields consumed by the plugin — additional
|
|
5
|
+
* HAR properties are allowed via `additionalProperties: true`.
|
|
6
|
+
*/
|
|
7
|
+
const harLogSchema = {
|
|
8
|
+
type: 'object',
|
|
9
|
+
required: ['log'],
|
|
10
|
+
additionalProperties: true,
|
|
11
|
+
properties: {
|
|
12
|
+
log: {
|
|
13
|
+
type: 'object',
|
|
14
|
+
required: ['entries'],
|
|
15
|
+
additionalProperties: true,
|
|
16
|
+
properties: {
|
|
17
|
+
version: { type: 'string' },
|
|
18
|
+
entries: {
|
|
19
|
+
type: 'array',
|
|
20
|
+
items: {
|
|
21
|
+
type: 'object',
|
|
22
|
+
required: ['request', 'time'],
|
|
23
|
+
additionalProperties: true,
|
|
24
|
+
properties: {
|
|
25
|
+
time: { type: 'number' },
|
|
26
|
+
request: {
|
|
27
|
+
type: 'object',
|
|
28
|
+
required: ['method', 'url', 'headers'],
|
|
29
|
+
additionalProperties: true,
|
|
30
|
+
properties: {
|
|
31
|
+
method: { type: 'string' },
|
|
32
|
+
url: { type: 'string' },
|
|
33
|
+
headers: {
|
|
34
|
+
type: 'array',
|
|
35
|
+
items: {
|
|
36
|
+
type: 'object',
|
|
37
|
+
required: ['name', 'value'],
|
|
38
|
+
additionalProperties: true,
|
|
39
|
+
properties: {
|
|
40
|
+
name: { type: 'string' },
|
|
41
|
+
value: { type: 'string' },
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
postData: {
|
|
46
|
+
type: 'object',
|
|
47
|
+
nullable: true,
|
|
48
|
+
additionalProperties: true,
|
|
49
|
+
properties: {
|
|
50
|
+
text: { type: 'string', nullable: true },
|
|
51
|
+
mimeType: { type: 'string', nullable: true },
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
response: {
|
|
57
|
+
type: 'object',
|
|
58
|
+
nullable: true,
|
|
59
|
+
required: ['status', 'headers', 'content'],
|
|
60
|
+
additionalProperties: true,
|
|
61
|
+
properties: {
|
|
62
|
+
status: { type: 'number' },
|
|
63
|
+
headers: {
|
|
64
|
+
type: 'array',
|
|
65
|
+
items: {
|
|
66
|
+
type: 'object',
|
|
67
|
+
required: ['name', 'value'],
|
|
68
|
+
additionalProperties: true,
|
|
69
|
+
properties: {
|
|
70
|
+
name: { type: 'string' },
|
|
71
|
+
value: { type: 'string' },
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
content: {
|
|
76
|
+
type: 'object',
|
|
77
|
+
required: ['size'],
|
|
78
|
+
additionalProperties: true,
|
|
79
|
+
properties: {
|
|
80
|
+
text: { type: 'string', nullable: true },
|
|
81
|
+
size: { type: 'number' },
|
|
82
|
+
mimeType: { type: 'string', nullable: true },
|
|
83
|
+
encoding: { type: 'string', nullable: true },
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
const validateFn = ajv.compile(harLogSchema);
|
|
96
|
+
export function validateHar(data) {
|
|
97
|
+
return validateFn(data);
|
|
98
|
+
}
|
|
99
|
+
export function getValidationErrors() {
|
|
100
|
+
return ajv.errorsText(validateFn.errors);
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=har-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"har-schema.js","sourceRoot":"","sources":["../src/har-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAIpC;;;;GAIG;AACH,MAAM,YAAY,GAAG;IACnB,IAAI,EAAE,QAAiB;IACvB,QAAQ,EAAE,CAAC,KAAK,CAAU;IAC1B,oBAAoB,EAAE,IAAI;IAC1B,UAAU,EAAE;QACV,GAAG,EAAE;YACH,IAAI,EAAE,QAAiB;YACvB,QAAQ,EAAE,CAAC,SAAS,CAAU;YAC9B,oBAAoB,EAAE,IAAI;YAC1B,UAAU,EAAE;gBACV,OAAO,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE;gBACpC,OAAO,EAAE;oBACP,IAAI,EAAE,OAAgB;oBACtB,KAAK,EAAE;wBACL,IAAI,EAAE,QAAiB;wBACvB,Q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ACnC,OAAO,EAAE;wCACP,IAAI,EAAE,OAAgB;wCACtB,KAAK,EAAE;4CACL,IAAI,EAAE,QAAiB;4CACvB,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,CAAU;4CACpC,oBAAoB,EAAE,IAAI;4CAC1B,UAAU,EAAE;gDACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE;gDACjC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE;6CACnC;yCACF;qCACF;oCACD,OAAO,EAAE;wCACP,IAAI,EAAE,QAAiB;wCACvB,QAAQ,EAAE,CAAC,MAAM,CAAU;wCAC3B,oBAAoB,EAAE,IAAI;wCAC1B,UAAU,EAAE;4CACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE;4CACjD,IAAI,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE;4CACjC,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE;4CACrD,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE;yCACtD;qCACF;iCACF;6BACF;yBACF;qBACF;iBACF;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;AAE7C,MAAM,UAAU,WAAW,CAAC,IAAa;IACvC,OAAO,UAAU,CAAC,IAAI,CAAY,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,mBAAmB;IACjC,OAAO,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CapturedTransaction, HttpParticipantRole } from '@thymian/core';
|
|
2
|
+
import type { HarEntry, HarHeader, HarLog } from './har-types.js';
|
|
3
|
+
export declare function transformHarHeaders(headers: HarHeader[]): Record<string, string | string[] | undefined>;
|
|
4
|
+
export declare function parseUrl(url: string): {
|
|
5
|
+
origin: string;
|
|
6
|
+
path: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function transformHarEntry(entry: HarEntry, clientRole: HttpParticipantRole, serverRole: HttpParticipantRole): CapturedTransaction | null;
|
|
9
|
+
export declare function transformHar(har: HarLog, clientRole: HttpParticipantRole, serverRole: HttpParticipantRole): {
|
|
10
|
+
transactions: CapturedTransaction[];
|
|
11
|
+
skippedCount: number;
|
|
12
|
+
skippedReasons: string[];
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=har-transformer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"har-transformer.d.ts","sourceRoot":"","sources":["../src/har-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAE9E,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAElE,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,SAAS,EAAE,GACnB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAiB/C;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAMtE;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,QAAQ,EACf,UAAU,EAAE,mBAAmB,EAC/B,UAAU,EAAE,mBAAmB,GAC9B,mBAAmB,GAAG,IAAI,CAuC5B;AAED,wBAAgB,YAAY,CAC1B,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,mBAAmB,EAC/B,UAAU,EAAE,mBAAmB,GAC9B;IACD,YAAY,EAAE,mBAAmB,EAAE,CAAC;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CA4BA"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export function transformHarHeaders(headers) {
|
|
2
|
+
const result = {};
|
|
3
|
+
for (const header of headers) {
|
|
4
|
+
const key = header.name.toLowerCase();
|
|
5
|
+
const existing = result[key];
|
|
6
|
+
if (existing === undefined) {
|
|
7
|
+
result[key] = header.value;
|
|
8
|
+
}
|
|
9
|
+
else if (Array.isArray(existing)) {
|
|
10
|
+
existing.push(header.value);
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
result[key] = [existing, header.value];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return result;
|
|
17
|
+
}
|
|
18
|
+
export function parseUrl(url) {
|
|
19
|
+
const parsed = new URL(url);
|
|
20
|
+
return {
|
|
21
|
+
origin: parsed.origin,
|
|
22
|
+
path: parsed.pathname + parsed.search,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export function transformHarEntry(entry, clientRole, serverRole) {
|
|
26
|
+
if (!entry.response) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
let origin;
|
|
30
|
+
let path;
|
|
31
|
+
try {
|
|
32
|
+
const parsed = parseUrl(entry.request.url);
|
|
33
|
+
origin = parsed.origin;
|
|
34
|
+
path = parsed.path;
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
request: {
|
|
41
|
+
data: {
|
|
42
|
+
method: entry.request.method.toLowerCase(),
|
|
43
|
+
origin,
|
|
44
|
+
path,
|
|
45
|
+
headers: transformHarHeaders(entry.request.headers),
|
|
46
|
+
body: entry.request.postData?.text,
|
|
47
|
+
},
|
|
48
|
+
meta: { role: clientRole },
|
|
49
|
+
},
|
|
50
|
+
response: {
|
|
51
|
+
data: {
|
|
52
|
+
statusCode: entry.response.status,
|
|
53
|
+
headers: transformHarHeaders(entry.response.headers),
|
|
54
|
+
body: entry.response.content.text,
|
|
55
|
+
bodyEncoding: entry.response.content.encoding,
|
|
56
|
+
trailers: {},
|
|
57
|
+
duration: entry.time,
|
|
58
|
+
},
|
|
59
|
+
meta: { role: serverRole },
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export function transformHar(har, clientRole, serverRole) {
|
|
64
|
+
const transactions = [];
|
|
65
|
+
let skippedCount = 0;
|
|
66
|
+
const skippedReasons = [];
|
|
67
|
+
for (const entry of har.log.entries) {
|
|
68
|
+
if (!entry.response) {
|
|
69
|
+
skippedCount++;
|
|
70
|
+
skippedReasons.push('missing response');
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
let transaction;
|
|
74
|
+
try {
|
|
75
|
+
transaction = transformHarEntry(entry, clientRole, serverRole);
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
transaction = null;
|
|
79
|
+
}
|
|
80
|
+
if (transaction) {
|
|
81
|
+
transactions.push(transaction);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
skippedCount++;
|
|
85
|
+
skippedReasons.push('invalid request URL');
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return { transactions, skippedCount, skippedReasons };
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=har-transformer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"har-transformer.js","sourceRoot":"","sources":["../src/har-transformer.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,mBAAmB,CACjC,OAAoB;IAEpB,MAAM,MAAM,GAAkD,EAAE,CAAC;IAEjE,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;QACtC,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAE7B,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,CAAC,GAAG,CAAC,GAAG,MA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C;YACf,cAAc,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;IAED,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type HarHeader = {
|
|
2
|
+
name: string;
|
|
3
|
+
value: string;
|
|
4
|
+
};
|
|
5
|
+
export type HarRequest = {
|
|
6
|
+
method: string;
|
|
7
|
+
url: string;
|
|
8
|
+
headers: HarHeader[];
|
|
9
|
+
postData?: {
|
|
10
|
+
text?: string;
|
|
11
|
+
mimeType?: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export type HarResponse = {
|
|
15
|
+
status: number;
|
|
16
|
+
headers: HarHeader[];
|
|
17
|
+
content: {
|
|
18
|
+
text?: string;
|
|
19
|
+
size: number;
|
|
20
|
+
mimeType?: string;
|
|
21
|
+
encoding?: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export type HarEntry = {
|
|
25
|
+
request: HarRequest;
|
|
26
|
+
response?: HarResponse;
|
|
27
|
+
time: number;
|
|
28
|
+
};
|
|
29
|
+
export type HarLog = {
|
|
30
|
+
log: {
|
|
31
|
+
version: string;
|
|
32
|
+
entries: HarEntry[];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=har-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"har-types.d.ts","sourceRoot":"","sources":["../src/har-types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE;QACT,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,OAAO,EAAE;QACP,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,OAAO,EAAE,UAAU,CAAC;IACpB,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACnB,GAAG,EAAE;QACH,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,QAAQ,EAAE,CAAC;KACrB,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"har-types.js","sourceRoot":"","sources":["../src/har-types.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { HttpParticipantRole, ThymianPlugin } from '@thymian/core';
|
|
2
|
+
export type HarPluginOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* Maximum allowed HAR file size in bytes.
|
|
5
|
+
* Files exceeding this limit cause a `ThymianBaseError` to be thrown.
|
|
6
|
+
* @default 52_428_800 (50 MB)
|
|
7
|
+
*/
|
|
8
|
+
maxFileSize?: number;
|
|
9
|
+
/**
|
|
10
|
+
* The HTTP participant role to assign to requests loaded from HAR files.
|
|
11
|
+
* This determines which RFC rules apply to the client side of the loaded traffic.
|
|
12
|
+
* @default 'user-agent'
|
|
13
|
+
*/
|
|
14
|
+
clientRole?: HttpParticipantRole;
|
|
15
|
+
/**
|
|
16
|
+
* The HTTP participant role to assign to responses loaded from HAR files.
|
|
17
|
+
* This determines which RFC rules apply to the server side of the loaded traffic.
|
|
18
|
+
* @default 'origin server'
|
|
19
|
+
*/
|
|
20
|
+
serverRole?: HttpParticipantRole;
|
|
21
|
+
};
|
|
22
|
+
export declare function createHarPlugin(pluginName?: string): ThymianPlugin<HarPluginOptions>;
|
|
23
|
+
export declare const harPlugin: ThymianPlugin<HarPluginOptions>;
|
|
24
|
+
export default harPlugin;
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,mBAAmB,EAEnB,aAAa,EACd,MAAM,eAAe,CAAC;AAOvB,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,UAAU,CAAC,EAAE,mBAAmB,CAAC;IAEjC;;;;OAIG;IACH,UAAU,CAAC,EAAE,mBAAmB,CAAC;CAClC,CAAC;AAEF,wBAAgB,eAAe,CAC7B,UAAU,SAAwB,GACjC,aAAa,CAAC,gBAAgB,CAAC,CA0FjC;AAED,eAAO,MAAM,SAAS,iCAAoB,CAAC;AAE3C,eAAe,SAAS,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { loadTransactionsFromHar } from './load-transactions.js';
|
|
2
|
+
/** 50 MB — covers typical browser DevTools HAR exports. */
|
|
3
|
+
const DEFAULT_MAX_FILE_SIZE_BYTES = 50 * 1024 * 1024;
|
|
4
|
+
export function createHarPlugin(pluginName = '@thymian/plugin-har') {
|
|
5
|
+
return {
|
|
6
|
+
name: pluginName,
|
|
7
|
+
version: '0.x',
|
|
8
|
+
options: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
nullable: true,
|
|
11
|
+
properties: {
|
|
12
|
+
maxFileSize: { type: 'number', nullable: true },
|
|
13
|
+
clientRole: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
nullable: true,
|
|
16
|
+
default: 'user-agent',
|
|
17
|
+
enum: [
|
|
18
|
+
'intermediary',
|
|
19
|
+
'proxy',
|
|
20
|
+
'gateway',
|
|
21
|
+
'tunnel',
|
|
22
|
+
'origin server',
|
|
23
|
+
'server',
|
|
24
|
+
'client',
|
|
25
|
+
'user-agent',
|
|
26
|
+
'cache',
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
serverRole: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
nullable: true,
|
|
32
|
+
default: 'origin server',
|
|
33
|
+
enum: [
|
|
34
|
+
'intermediary',
|
|
35
|
+
'proxy',
|
|
36
|
+
'gateway',
|
|
37
|
+
'tunnel',
|
|
38
|
+
'origin server',
|
|
39
|
+
'server',
|
|
40
|
+
'client',
|
|
41
|
+
'user-agent',
|
|
42
|
+
'cache',
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
additionalProperties: false,
|
|
47
|
+
},
|
|
48
|
+
actions: {
|
|
49
|
+
listensOn: ['core.traffic.load'],
|
|
50
|
+
},
|
|
51
|
+
async plugin(emitter, logger, options) {
|
|
52
|
+
const maxFileSize = options.maxFileSize ?? DEFAULT_MAX_FILE_SIZE_BYTES;
|
|
53
|
+
const clientRole = options.clientRole ?? 'user-agent';
|
|
54
|
+
const serverRole = options.serverRole ?? 'origin server';
|
|
55
|
+
emitter.onAction('core.traffic.load', async (input, ctx) => {
|
|
56
|
+
const harInputs = input.inputs.filter((i) => i.type === 'har');
|
|
57
|
+
if (harInputs.length === 0) {
|
|
58
|
+
logger.info('No HAR inputs found, skipping HAR processing.');
|
|
59
|
+
return ctx.reply({ transactions: [] });
|
|
60
|
+
}
|
|
61
|
+
const allTransactions = [];
|
|
62
|
+
for (const harInput of harInputs) {
|
|
63
|
+
logger.info(`Loading traffic from HAR file: ${String(harInput.location)}`);
|
|
64
|
+
const transactions = await loadTransactionsFromHar(String(harInput.location), logger, options.cwd, maxFileSize, clientRole, serverRole);
|
|
65
|
+
// Avoid spread (`allTransactions.push(...transactions)`) because
|
|
66
|
+
// large HAR files can contain thousands of entries, which would
|
|
67
|
+
// exceed the JavaScript call-stack size limit.
|
|
68
|
+
for (const t of transactions) {
|
|
69
|
+
allTransactions.push(t);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
ctx.reply({ transactions: allTransactions });
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export const harPlugin = createHarPlugin();
|
|
78
|
+
export default harPlugin;
|
|
79
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,2DAA2D;AAC3D,MAAM,2BAA2B,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAyBrD,MAAM,UAAU,eAAe,CAC7B,UAAU,GAAG,qBAAqB;IAElC,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,KAAK;QACd,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE;gBACV,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/C,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,IAAI;oBACd,OAAO,EAAE,YAAY;oBACrB,IAAI,EAAE;wBACJ,cAAc;wBACd,OAAO;wBACP,SAAS;wBACT,QAAQ;wBACR,eAAe;wBACf,QAAQ;wBACR,QAAQ;wBACR,YAAY;wBACZ,OAAO;qBACR;iBACF;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;o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AAM,EACN,OAAO,CAAC,GAAG,EACX,WAAW,EACX,UAAU,EACV,UAAU,CACX,CAAC;oBAEF,iEAAiE;oBACjE,gEAAgE;oBAChE,+CAA+C;oBAC/C,KAAK,MAAM,CAAC,IAAI,YAAY,EAAE,CAAC;wBAC7B,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;oBAC1B,CAAC;gBACH,CAAC;gBAED,GAAG,CAAC,KAAK,CAAC,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC,CAAC;YAC/C,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,EAAE,CAAC;AAE3C,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CapturedTransaction, HttpParticipantRole, Logger } from '@thymian/core';
|
|
2
|
+
/**
|
|
3
|
+
* Reads a single HAR file, validates its structure, and returns
|
|
4
|
+
* the transformed transactions.
|
|
5
|
+
*
|
|
6
|
+
* @throws {ThymianBaseError} if the file is too large, unreadable,
|
|
7
|
+
* not valid JSON, or not a valid HAR structure.
|
|
8
|
+
*/
|
|
9
|
+
export declare function loadTransactionsFromHar(location: string, logger: Logger, cwd: string, maxFileSize: number, clientRole: HttpParticipantRole, serverRole: HttpParticipantRole): Promise<CapturedTransaction[]>;
|
|
10
|
+
//# sourceMappingURL=load-transactions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-transactions.d.ts","sourceRoot":"","sources":["../src/load-transactions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACnB,MAAM,EACP,MAAM,eAAe,CAAC;AAMvB;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CAC3C,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,mBAAmB,EAC/B,UAAU,EAAE,mBAAmB,GAC9B,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAsDhC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { readFile, stat } from 'node:fs/promises';
|
|
2
|
+
import { isAbsolute, join } from 'node:path';
|
|
3
|
+
import { ThymianBaseError } from '@thymian/core';
|
|
4
|
+
import { getValidationErrors, validateHar } from './har-schema.js';
|
|
5
|
+
import { transformHar } from './har-transformer.js';
|
|
6
|
+
/**
|
|
7
|
+
* Reads a single HAR file, validates its structure, and returns
|
|
8
|
+
* the transformed transactions.
|
|
9
|
+
*
|
|
10
|
+
* @throws {ThymianBaseError} if the file is too large, unreadable,
|
|
11
|
+
* not valid JSON, or not a valid HAR structure.
|
|
12
|
+
*/
|
|
13
|
+
export async function loadTransactionsFromHar(location, logger, cwd, maxFileSize, clientRole, serverRole) {
|
|
14
|
+
const filePath = isAbsolute(location) ? location : join(cwd, location);
|
|
15
|
+
// Guard against oversized files to prevent out-of-memory crashes.
|
|
16
|
+
// JSON.parse roughly doubles memory usage, so capping the file size
|
|
17
|
+
// keeps total heap impact predictable.
|
|
18
|
+
const fileStats = await stat(filePath).catch((err) => {
|
|
19
|
+
throw new ThymianBaseError(`Failed to read HAR file: ${filePath}`, {
|
|
20
|
+
cause: err instanceof Error ? err : undefined,
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
if (fileStats.size > maxFileSize) {
|
|
24
|
+
throw new ThymianBaseError(`HAR file exceeds maximum size (${fileStats.size.toString()} bytes > ${maxFileSize.toString()} bytes): ${filePath}`);
|
|
25
|
+
}
|
|
26
|
+
let content;
|
|
27
|
+
try {
|
|
28
|
+
content = await readFile(filePath, 'utf-8');
|
|
29
|
+
}
|
|
30
|
+
catch (err) {
|
|
31
|
+
throw new ThymianBaseError(`Failed to read HAR file: ${filePath}`, {
|
|
32
|
+
cause: err instanceof Error ? err : undefined,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
let parsed;
|
|
36
|
+
try {
|
|
37
|
+
parsed = JSON.parse(content);
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
throw new ThymianBaseError(`Failed to parse HAR file as JSON: ${filePath}`);
|
|
41
|
+
}
|
|
42
|
+
if (!validateHar(parsed)) {
|
|
43
|
+
throw new ThymianBaseError(`Invalid HAR structure in ${filePath}: ${getValidationErrors()}`);
|
|
44
|
+
}
|
|
45
|
+
const { transactions, skippedCount, skippedReasons } = transformHar(parsed, clientRole, serverRole);
|
|
46
|
+
if (skippedCount > 0) {
|
|
47
|
+
const uniqueReasons = [...new Set(skippedReasons)].join(', ');
|
|
48
|
+
logger.warn(`Skipped ${skippedCount.toString()} HAR ${skippedCount === 1 ? 'entry' : 'entries'} in ${filePath} due to: ${uniqueReasons}`);
|
|
49
|
+
}
|
|
50
|
+
return transactions;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=load-transactions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-transactions.js","sourceRoot":"","sources":["../src/load-transactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAO7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,QAAgB,EAChB,MAAc,EACd,GAAW,EACX,WAAmB,EACnB,UAA+B,EAC/B,UAA+B;IAE/B,MAAM,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,QAA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CAAC;IAED,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,YAAY,CACjE,MAAM,EACN,UAAU,EACV,UAAU,CACX,CAAC;IAEF,IAAI,YAAY,GAAG,CAAC,EAAE,CAAC;QACrB,MAAM,aAAa,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9D,MAAM,CAAC,IAAI,CACT,WAAW,YAAY,CAAC,QAAQ,EAAE,QAAQ,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,OAAO,QAAQ,YAAY,aAAa,EAAE,CAC7H,CAAC;IACJ,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@thymian/plugin-har",
|
|
3
|
+
"version": "0.1.7-canary.20260420-67bb013",
|
|
4
|
+
"description": "Thymian plugin for loading HAR (HTTP Archive) files into the traffic pipeline",
|
|
5
|
+
"license": "AGPL-3.0-only",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/thymianofficial/thymian/issues"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://thymian.dev",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/thymianofficial/thymian.git",
|
|
13
|
+
"directory": "packages/plugin-har"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"thymian",
|
|
20
|
+
"har",
|
|
21
|
+
"http-archive",
|
|
22
|
+
"traffic-loader",
|
|
23
|
+
"api-conformance"
|
|
24
|
+
],
|
|
25
|
+
"main": "./dist/index.js",
|
|
26
|
+
"module": "./dist/index.js",
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"type": "module",
|
|
29
|
+
"exports": {
|
|
30
|
+
"./package.json": "./package.json",
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"import": "./dist/index.js",
|
|
34
|
+
"default": "./dist/index.js"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"!**/*.tsbuildinfo"
|
|
40
|
+
],
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@thymian/core": "0.1.7-canary.20260420-67bb013",
|
|
43
|
+
"tslib": "^2.3.0"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@thymian/core-testing": "0.1.7-canary.20260420-67bb013"
|
|
47
|
+
}
|
|
48
|
+
}
|