@readme/httpsnippet 4.1.0 → 4.1.1
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/helpers/code-builder.d.ts +1 -1
- package/dist/helpers/form-data.js +1 -1
- package/dist/helpers/headers.d.ts +1 -1
- package/dist/helpers/reducer.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/targets/powershell/common.d.ts +1 -1
- package/dist/targets/targets.d.ts +4 -4
- package/package.json +1 -1
|
@@ -32,7 +32,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
32
32
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
33
33
|
function step(op) {
|
|
34
34
|
if (f) throw new TypeError("Generator is already executing.");
|
|
35
|
-
while (_) try {
|
|
35
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
36
36
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
37
37
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
38
38
|
switch (op[0]) {
|
package/dist/index.d.ts
CHANGED
|
@@ -11,11 +11,11 @@ export { addTarget, addTargetClient } from './targets/targets';
|
|
|
11
11
|
*
|
|
12
12
|
* Then, in addition to that, it really adds to complexity with TypeScript (TypeScript takes this constraint very very seriously) in a way that's not actually super useful. So, we treat this object as though it could have both or either of `params` and/or `text`.
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
type PostDataBase = PostDataCommon & {
|
|
15
15
|
text?: string;
|
|
16
16
|
params?: Param[];
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type HarRequest = Omit<NpmHarRequest, 'postData'> & {
|
|
19
19
|
postData: PostDataBase;
|
|
20
20
|
};
|
|
21
21
|
export interface RequestExtras {
|
|
@@ -31,7 +31,7 @@ export interface RequestExtras {
|
|
|
31
31
|
cookiesObj: ReducedHelperObject;
|
|
32
32
|
allHeaders: ReducedHelperObject;
|
|
33
33
|
}
|
|
34
|
-
export
|
|
34
|
+
export type Request = HarRequest & RequestExtras;
|
|
35
35
|
interface Entry {
|
|
36
36
|
request: Partial<HarRequest>;
|
|
37
37
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Converter } from '../targets';
|
|
2
|
-
export
|
|
2
|
+
export type PowershellCommand = 'Invoke-RestMethod' | 'Invoke-WebRequest';
|
|
3
3
|
export declare const generatePowershellConvert: (command: PowershellCommand) => Converter<any>;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import type { Request } from '..';
|
|
2
2
|
import type { CodeBuilderOptions } from '../helpers/code-builder';
|
|
3
3
|
import type { Merge } from 'type-fest';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type TargetId = keyof typeof targets;
|
|
5
|
+
export type ClientId = string;
|
|
6
6
|
export interface ClientInfo {
|
|
7
7
|
key: ClientId;
|
|
8
8
|
title: string;
|
|
9
9
|
link: string;
|
|
10
10
|
description: string;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export type Converter<T extends Record<string, any>> = (request: Request, options?: Merge<CodeBuilderOptions, T>) => string;
|
|
13
13
|
export interface Client<T extends Record<string, any> = Record<string, any>> {
|
|
14
14
|
info: ClientInfo;
|
|
15
15
|
convert: Converter<T>;
|
|
16
16
|
}
|
|
17
|
-
export
|
|
17
|
+
export type Extension = `.${string}` | null;
|
|
18
18
|
export interface TargetInfo {
|
|
19
19
|
key: TargetId;
|
|
20
20
|
title: string;
|
package/package.json
CHANGED