@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.
@@ -1,4 +1,4 @@
1
- export declare type PostProcessor = (unreplacedCode: string) => string;
1
+ export type PostProcessor = (unreplacedCode: string) => string;
2
2
  export interface CodeBuilderOptions {
3
3
  /**
4
4
  * Desired indentation character for aggregated lines of code
@@ -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]) {
@@ -1,4 +1,4 @@
1
- declare type Headers<T> = Record<string, T>;
1
+ type Headers<T> = Record<string, T>;
2
2
  /**
3
3
  * Given a headers object retrieve a specific header out of it via a case-insensitive key.
4
4
  */
@@ -1,4 +1,4 @@
1
- export declare type ReducedHelperObject = Record<string, string[] | string>;
1
+ export type ReducedHelperObject = Record<string, string[] | string>;
2
2
  export declare const reducer: <T extends {
3
3
  name: string;
4
4
  value: string;
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
- declare type PostDataBase = PostDataCommon & {
14
+ type PostDataBase = PostDataCommon & {
15
15
  text?: string;
16
16
  params?: Param[];
17
17
  };
18
- export declare type HarRequest = Omit<NpmHarRequest, 'postData'> & {
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 declare type Request = HarRequest & RequestExtras;
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 declare type PowershellCommand = 'Invoke-RestMethod' | 'Invoke-WebRequest';
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 declare type TargetId = keyof typeof targets;
5
- export declare type ClientId = string;
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 declare type Converter<T extends Record<string, any>> = (request: Request, options?: Merge<CodeBuilderOptions, T>) => string;
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 declare type Extension = `.${string}` | null;
17
+ export type Extension = `.${string}` | null;
18
18
  export interface TargetInfo {
19
19
  key: TargetId;
20
20
  title: string;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.1.0",
2
+ "version": "4.1.1",
3
3
  "name": "@readme/httpsnippet",
4
4
  "description": "HTTP Request snippet generator for *most* languages",
5
5
  "homepage": "https://github.com/readmeio/httpsnippet",