@readme/oas-to-har 39.0.1 → 40.0.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/README.md +1 -1
- package/dist/index.cjs +1098 -1228
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +154 -14
- package/dist/index.d.ts +156 -16
- package/dist/index.js +1070 -1226
- package/dist/index.js.map +1 -1
- package/dist/lib/configure-security.cjs +66 -6
- package/dist/lib/configure-security.cjs.map +1 -1
- package/dist/lib/configure-security.d.cts +8 -8
- package/dist/lib/configure-security.d.ts +10 -10
- package/dist/lib/configure-security.js +68 -6
- package/dist/lib/configure-security.js.map +1 -1
- package/dist/lib/types.cjs +0 -1
- package/dist/lib/types.d.cts +11 -12
- package/dist/lib/types.d.ts +11 -12
- package/dist/lib/types.js +1 -1
- package/package.json +10 -10
- package/dist/chunk-6CVT7KVT.cjs +0 -83
- package/dist/chunk-6CVT7KVT.cjs.map +0 -1
- package/dist/chunk-JWXX5N4N.js +0 -83
- package/dist/chunk-JWXX5N4N.js.map +0 -1
- package/dist/lib/types.cjs.map +0 -1
- package/dist/lib/types.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,17 +1,157 @@
|
|
|
1
|
-
import { oasToHarOptions } from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { AuthForHAR, DataForHAR, oasToHarOptions } from "./lib/types.cjs";
|
|
2
|
+
import Oas from "oas";
|
|
3
|
+
import { Operation } from "oas/operation";
|
|
4
|
+
/**
|
|
5
|
+
* This object contains detailed info about performed request.
|
|
6
|
+
*
|
|
7
|
+
* http://www.softwareishard.com/blog/har-12-spec/#request
|
|
8
|
+
*/
|
|
9
|
+
interface Request {
|
|
10
|
+
/** Request method (`GET`, `POST`, ...). */
|
|
11
|
+
method: string;
|
|
12
|
+
/** Absolute URL of the request (fragments are not included). */
|
|
13
|
+
url: string;
|
|
14
|
+
/** Request HTTP Version. */
|
|
15
|
+
httpVersion: string;
|
|
16
|
+
/** List of cookie objects. */
|
|
17
|
+
cookies: Cookie[];
|
|
18
|
+
/** List of header objects. */
|
|
19
|
+
headers: Header[];
|
|
20
|
+
/** List of query parameter objects. */
|
|
21
|
+
queryString: QueryString[];
|
|
22
|
+
/** Posted data info. */
|
|
23
|
+
postData?: PostData | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Total number of bytes from the start of the HTTP request message until
|
|
26
|
+
* (and including) the double CRLF before the body.
|
|
27
|
+
*
|
|
28
|
+
* Set to `-1` if the info is not available.
|
|
29
|
+
*/
|
|
30
|
+
headersSize: number;
|
|
31
|
+
/**
|
|
32
|
+
* Size of the request body (POST data payload) in bytes.
|
|
33
|
+
*
|
|
34
|
+
* Set to `-1` if the info is not available.
|
|
35
|
+
*/
|
|
36
|
+
bodySize: number;
|
|
37
|
+
/** A comment provided by the user or the application */
|
|
38
|
+
comment?: string | undefined;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* This object contains list of all cookies (used in `request` and `response`
|
|
42
|
+
* objects).
|
|
43
|
+
*
|
|
44
|
+
* http://www.softwareishard.com/blog/har-12-spec/#cookies
|
|
45
|
+
*/
|
|
46
|
+
interface Cookie {
|
|
47
|
+
/** The name of the cookie. */
|
|
48
|
+
name: string;
|
|
49
|
+
/** The cookie value. */
|
|
50
|
+
value: string;
|
|
51
|
+
/** The path pertaining to the cookie. */
|
|
52
|
+
path?: string | undefined;
|
|
53
|
+
/** The host of the cookie. */
|
|
54
|
+
domain?: string | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Cookie expiration time.
|
|
57
|
+
* (ISO 8601 - `YYYY-MM-DDThh:mm:ss.sTZD`,
|
|
58
|
+
* e.g. `2009-07-24T19:20:30.123+02:00`).
|
|
59
|
+
*/
|
|
60
|
+
expires?: string | undefined;
|
|
61
|
+
/** Set to true if the cookie is HTTP only, false otherwise. */
|
|
62
|
+
httpOnly?: boolean | undefined;
|
|
63
|
+
/** True if the cookie was transmitted over ssl, false otherwise. */
|
|
64
|
+
secure?: boolean | undefined;
|
|
65
|
+
/** A comment provided by the user or the application */
|
|
66
|
+
comment?: string | undefined;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* This object represents a headers (used in `request` and `response` objects).
|
|
70
|
+
*
|
|
71
|
+
* http://www.softwareishard.com/blog/har-12-spec/#headers
|
|
72
|
+
*/
|
|
73
|
+
interface Header {
|
|
74
|
+
name: string;
|
|
75
|
+
value: string;
|
|
76
|
+
/** A comment provided by the user or the application */
|
|
77
|
+
comment?: string | undefined;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* This object represents a parameter & value parsed from a query string,
|
|
81
|
+
* if any (embedded in `request` object).
|
|
82
|
+
*
|
|
83
|
+
* http://www.softwareishard.com/blog/har-12-spec/#queryString
|
|
84
|
+
*/
|
|
85
|
+
interface QueryString {
|
|
86
|
+
name: string;
|
|
87
|
+
value: string;
|
|
88
|
+
/** A comment provided by the user or the application */
|
|
89
|
+
comment?: string | undefined;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* This object describes posted data, if any (embedded in `request` object).
|
|
93
|
+
*
|
|
94
|
+
* http://www.softwareishard.com/blog/har-12-spec/#postData
|
|
95
|
+
*/
|
|
96
|
+
type PostData = PostDataCommon & (PostDataParams | PostDataText);
|
|
97
|
+
/**
|
|
98
|
+
* The common properties of PostData
|
|
99
|
+
*/
|
|
100
|
+
interface PostDataCommon {
|
|
101
|
+
/** Mime type of posted data. */
|
|
102
|
+
mimeType: string;
|
|
103
|
+
/** A comment provided by the user or the application */
|
|
104
|
+
comment?: string | undefined;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Post data with `params` specified.
|
|
108
|
+
*/
|
|
109
|
+
interface PostDataParams {
|
|
110
|
+
/**
|
|
111
|
+
* List of posted parameters (in case of URL encoded parameters).
|
|
112
|
+
*/
|
|
113
|
+
params: Param[];
|
|
114
|
+
/**
|
|
115
|
+
* _`params` and `text` fields are mutually exclusive._
|
|
116
|
+
*/
|
|
117
|
+
text?: never | undefined;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Post data with `text` specified.
|
|
121
|
+
*/
|
|
122
|
+
interface PostDataText {
|
|
123
|
+
/**
|
|
124
|
+
* Plain text posted data
|
|
125
|
+
*/
|
|
126
|
+
text: string;
|
|
127
|
+
/**
|
|
128
|
+
* _`params` and `text` fields are mutually exclusive._
|
|
129
|
+
*/
|
|
130
|
+
params?: never | undefined;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* List of posted parameters, if any (embedded in `postData` object).
|
|
134
|
+
*
|
|
135
|
+
* http://www.softwareishard.com/blog/har-12-spec/#params
|
|
136
|
+
*/
|
|
137
|
+
interface Param {
|
|
138
|
+
/** name of a posted parameter. */
|
|
139
|
+
name: string;
|
|
140
|
+
/** value of a posted parameter or content of a posted file */
|
|
141
|
+
value?: string | undefined;
|
|
142
|
+
/** name of a posted file. */
|
|
143
|
+
fileName?: string | undefined;
|
|
144
|
+
/** content type of a posted file. */
|
|
145
|
+
contentType?: string | undefined;
|
|
146
|
+
/** A comment provided by the user or the application */
|
|
147
|
+
comment?: string | undefined;
|
|
148
|
+
}
|
|
7
149
|
declare function oasToHar(oas: Oas, operationSchema?: Operation, values?: DataForHAR, auth?: AuthForHAR, opts?: oasToHarOptions): {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
];
|
|
14
|
-
};
|
|
150
|
+
log: {
|
|
151
|
+
entries: readonly [{
|
|
152
|
+
readonly request: Request;
|
|
153
|
+
}];
|
|
154
|
+
};
|
|
15
155
|
};
|
|
16
|
-
|
|
17
156
|
export = oasToHar;
|
|
157
|
+
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,157 @@
|
|
|
1
|
-
import { oasToHarOptions } from
|
|
2
|
-
import {
|
|
3
|
-
import Oas from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { AuthForHAR, DataForHAR, oasToHarOptions } from "./lib/types.js";
|
|
2
|
+
import { Operation } from "oas/operation";
|
|
3
|
+
import Oas from "oas";
|
|
4
|
+
/**
|
|
5
|
+
* This object contains detailed info about performed request.
|
|
6
|
+
*
|
|
7
|
+
* http://www.softwareishard.com/blog/har-12-spec/#request
|
|
8
|
+
*/
|
|
9
|
+
interface Request {
|
|
10
|
+
/** Request method (`GET`, `POST`, ...). */
|
|
11
|
+
method: string;
|
|
12
|
+
/** Absolute URL of the request (fragments are not included). */
|
|
13
|
+
url: string;
|
|
14
|
+
/** Request HTTP Version. */
|
|
15
|
+
httpVersion: string;
|
|
16
|
+
/** List of cookie objects. */
|
|
17
|
+
cookies: Cookie[];
|
|
18
|
+
/** List of header objects. */
|
|
19
|
+
headers: Header[];
|
|
20
|
+
/** List of query parameter objects. */
|
|
21
|
+
queryString: QueryString[];
|
|
22
|
+
/** Posted data info. */
|
|
23
|
+
postData?: PostData | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Total number of bytes from the start of the HTTP request message until
|
|
26
|
+
* (and including) the double CRLF before the body.
|
|
27
|
+
*
|
|
28
|
+
* Set to `-1` if the info is not available.
|
|
29
|
+
*/
|
|
30
|
+
headersSize: number;
|
|
31
|
+
/**
|
|
32
|
+
* Size of the request body (POST data payload) in bytes.
|
|
33
|
+
*
|
|
34
|
+
* Set to `-1` if the info is not available.
|
|
35
|
+
*/
|
|
36
|
+
bodySize: number;
|
|
37
|
+
/** A comment provided by the user or the application */
|
|
38
|
+
comment?: string | undefined;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* This object contains list of all cookies (used in `request` and `response`
|
|
42
|
+
* objects).
|
|
43
|
+
*
|
|
44
|
+
* http://www.softwareishard.com/blog/har-12-spec/#cookies
|
|
45
|
+
*/
|
|
46
|
+
interface Cookie {
|
|
47
|
+
/** The name of the cookie. */
|
|
48
|
+
name: string;
|
|
49
|
+
/** The cookie value. */
|
|
50
|
+
value: string;
|
|
51
|
+
/** The path pertaining to the cookie. */
|
|
52
|
+
path?: string | undefined;
|
|
53
|
+
/** The host of the cookie. */
|
|
54
|
+
domain?: string | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Cookie expiration time.
|
|
57
|
+
* (ISO 8601 - `YYYY-MM-DDThh:mm:ss.sTZD`,
|
|
58
|
+
* e.g. `2009-07-24T19:20:30.123+02:00`).
|
|
59
|
+
*/
|
|
60
|
+
expires?: string | undefined;
|
|
61
|
+
/** Set to true if the cookie is HTTP only, false otherwise. */
|
|
62
|
+
httpOnly?: boolean | undefined;
|
|
63
|
+
/** True if the cookie was transmitted over ssl, false otherwise. */
|
|
64
|
+
secure?: boolean | undefined;
|
|
65
|
+
/** A comment provided by the user or the application */
|
|
66
|
+
comment?: string | undefined;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* This object represents a headers (used in `request` and `response` objects).
|
|
70
|
+
*
|
|
71
|
+
* http://www.softwareishard.com/blog/har-12-spec/#headers
|
|
72
|
+
*/
|
|
73
|
+
interface Header {
|
|
74
|
+
name: string;
|
|
75
|
+
value: string;
|
|
76
|
+
/** A comment provided by the user or the application */
|
|
77
|
+
comment?: string | undefined;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* This object represents a parameter & value parsed from a query string,
|
|
81
|
+
* if any (embedded in `request` object).
|
|
82
|
+
*
|
|
83
|
+
* http://www.softwareishard.com/blog/har-12-spec/#queryString
|
|
84
|
+
*/
|
|
85
|
+
interface QueryString {
|
|
86
|
+
name: string;
|
|
87
|
+
value: string;
|
|
88
|
+
/** A comment provided by the user or the application */
|
|
89
|
+
comment?: string | undefined;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* This object describes posted data, if any (embedded in `request` object).
|
|
93
|
+
*
|
|
94
|
+
* http://www.softwareishard.com/blog/har-12-spec/#postData
|
|
95
|
+
*/
|
|
96
|
+
type PostData = PostDataCommon & (PostDataParams | PostDataText);
|
|
97
|
+
/**
|
|
98
|
+
* The common properties of PostData
|
|
99
|
+
*/
|
|
100
|
+
interface PostDataCommon {
|
|
101
|
+
/** Mime type of posted data. */
|
|
102
|
+
mimeType: string;
|
|
103
|
+
/** A comment provided by the user or the application */
|
|
104
|
+
comment?: string | undefined;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Post data with `params` specified.
|
|
108
|
+
*/
|
|
109
|
+
interface PostDataParams {
|
|
110
|
+
/**
|
|
111
|
+
* List of posted parameters (in case of URL encoded parameters).
|
|
112
|
+
*/
|
|
113
|
+
params: Param[];
|
|
114
|
+
/**
|
|
115
|
+
* _`params` and `text` fields are mutually exclusive._
|
|
116
|
+
*/
|
|
117
|
+
text?: never | undefined;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Post data with `text` specified.
|
|
121
|
+
*/
|
|
122
|
+
interface PostDataText {
|
|
123
|
+
/**
|
|
124
|
+
* Plain text posted data
|
|
125
|
+
*/
|
|
126
|
+
text: string;
|
|
127
|
+
/**
|
|
128
|
+
* _`params` and `text` fields are mutually exclusive._
|
|
129
|
+
*/
|
|
130
|
+
params?: never | undefined;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* List of posted parameters, if any (embedded in `postData` object).
|
|
134
|
+
*
|
|
135
|
+
* http://www.softwareishard.com/blog/har-12-spec/#params
|
|
136
|
+
*/
|
|
137
|
+
interface Param {
|
|
138
|
+
/** name of a posted parameter. */
|
|
139
|
+
name: string;
|
|
140
|
+
/** value of a posted parameter or content of a posted file */
|
|
141
|
+
value?: string | undefined;
|
|
142
|
+
/** name of a posted file. */
|
|
143
|
+
fileName?: string | undefined;
|
|
144
|
+
/** content type of a posted file. */
|
|
145
|
+
contentType?: string | undefined;
|
|
146
|
+
/** A comment provided by the user or the application */
|
|
147
|
+
comment?: string | undefined;
|
|
148
|
+
}
|
|
149
|
+
export default function oasToHar(oas: Oas, operationSchema?: Operation, values?: DataForHAR, auth?: AuthForHAR, opts?: oasToHarOptions): {
|
|
150
|
+
log: {
|
|
151
|
+
entries: readonly [{
|
|
152
|
+
readonly request: Request;
|
|
153
|
+
}];
|
|
154
|
+
};
|
|
15
155
|
};
|
|
16
|
-
|
|
17
|
-
|
|
156
|
+
export {};
|
|
157
|
+
//# sourceMappingURL=index.d.ts.map
|