@readme/httpsnippet 7.1.1 → 7.1.2
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/{index-ae5e535e.d.ts → index-27be831e.d.ts} +1 -1
- package/dist/{index-c415b193.d.ts → index-e612cd58.d.ts} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -4
- package/dist/index.mjs.map +1 -1
- package/dist/targets/index.d.mts +1 -1
- package/dist/targets/index.d.ts +1 -1
- package/package.json +2 -3
|
@@ -60,7 +60,7 @@ interface AvailableTarget extends TargetInfo {
|
|
|
60
60
|
clients: ClientInfo[];
|
|
61
61
|
}
|
|
62
62
|
declare const availableTargets: () => AvailableTarget[];
|
|
63
|
-
declare const extname: (targetId: TargetId) => `.${string}
|
|
63
|
+
declare const extname: (targetId: TargetId) => "" | `.${string}`;
|
|
64
64
|
|
|
65
65
|
/** is this wrong? yes. according to the spec (http://www.softwareishard.com/blog/har-12-spec/#postData) it's technically wrong since `params` and `text` are (by the spec) mutually exclusive. However, in practice, this is not what is often the case.
|
|
66
66
|
*
|
|
@@ -60,7 +60,7 @@ interface AvailableTarget extends TargetInfo {
|
|
|
60
60
|
clients: ClientInfo[];
|
|
61
61
|
}
|
|
62
62
|
declare const availableTargets: () => AvailableTarget[];
|
|
63
|
-
declare const extname: (targetId: TargetId) => `.${string}
|
|
63
|
+
declare const extname: (targetId: TargetId) => "" | `.${string}`;
|
|
64
64
|
|
|
65
65
|
/** is this wrong? yes. according to the spec (http://www.softwareishard.com/blog/har-12-spec/#postData) it's technically wrong since `params` and `text` are (by the spec) mutually exclusive. However, in practice, this is not what is often the case.
|
|
66
66
|
*
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'har-format';
|
|
2
2
|
import './helpers/reducer.mjs';
|
|
3
|
-
export { l as HTTPSnippet, k as HTTPSnippetOptions, H as HarRequest, j as Request, R as RequestExtras, f as addTarget, h as addTargetClient, m as availableTargets, n as extname } from './index-
|
|
3
|
+
export { l as HTTPSnippet, k as HTTPSnippetOptions, H as HarRequest, j as Request, R as RequestExtras, f as addTarget, h as addTargetClient, m as availableTargets, n as extname } from './index-27be831e.js';
|
|
4
4
|
import 'node:url';
|
|
5
5
|
import './helpers/code-builder.mjs';
|
|
6
6
|
import 'type-fest';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'har-format';
|
|
2
2
|
import './helpers/reducer.js';
|
|
3
|
-
export { l as HTTPSnippet, k as HTTPSnippetOptions, H as HarRequest, j as Request, R as RequestExtras, f as addTarget, h as addTargetClient, m as availableTargets, n as extname } from './index-
|
|
3
|
+
export { l as HTTPSnippet, k as HTTPSnippetOptions, H as HarRequest, j as Request, R as RequestExtras, f as addTarget, h as addTargetClient, m as availableTargets, n as extname } from './index-e612cd58.js';
|
|
4
4
|
import 'node:url';
|
|
5
5
|
import './helpers/code-builder.js';
|
|
6
6
|
import 'type-fest';
|
package/dist/index.js
CHANGED
|
@@ -1,33 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var url = require('url');
|
|
4
|
-
var eventStream = require('event-stream');
|
|
5
4
|
var FormData = require('form-data');
|
|
6
5
|
var qs = require('qs');
|
|
6
|
+
var mapStream = require('map-stream');
|
|
7
7
|
var stringifyObject9 = require('stringify-object');
|
|
8
8
|
|
|
9
9
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
|
|
11
|
-
function _interopNamespace(e) {
|
|
12
|
-
if (e && e.__esModule) return e;
|
|
13
|
-
var n = Object.create(null);
|
|
14
|
-
if (e) {
|
|
15
|
-
Object.keys(e).forEach(function (k) {
|
|
16
|
-
if (k !== 'default') {
|
|
17
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () { return e[k]; }
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
n.default = e;
|
|
26
|
-
return Object.freeze(n);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
var eventStream__namespace = /*#__PURE__*/_interopNamespace(eventStream);
|
|
30
11
|
var FormData__default = /*#__PURE__*/_interopDefault(FormData);
|
|
12
|
+
var mapStream__default = /*#__PURE__*/_interopDefault(mapStream);
|
|
31
13
|
var stringifyObject9__default = /*#__PURE__*/_interopDefault(stringifyObject9);
|
|
32
14
|
|
|
33
15
|
// src/index.ts
|
|
@@ -3566,7 +3548,6 @@ var availableTargets = () => Object.keys(targets).map((targetId) => ({
|
|
|
3566
3548
|
var extname = (targetId) => targets[targetId]?.info.extname || "";
|
|
3567
3549
|
|
|
3568
3550
|
// src/index.ts
|
|
3569
|
-
var { map: eventStreamMap } = eventStream__namespace;
|
|
3570
3551
|
var isHarEntry = (value) => typeof value === "object" && "log" in value && typeof value.log === "object" && "entries" in value.log && Array.isArray(value.log.entries);
|
|
3571
3552
|
var HTTPSnippet = class {
|
|
3572
3553
|
constructor(input, opts = {}) {
|
|
@@ -3651,8 +3632,7 @@ var HTTPSnippet = class {
|
|
|
3651
3632
|
}
|
|
3652
3633
|
} else {
|
|
3653
3634
|
form.pipe(
|
|
3654
|
-
|
|
3655
|
-
eventStreamMap((data) => {
|
|
3635
|
+
mapStream__default.default((data) => {
|
|
3656
3636
|
request2.postData.text += data;
|
|
3657
3637
|
})
|
|
3658
3638
|
);
|