httpsnippet-client-api 6.0.1 → 6.1.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/dist/index.d.ts CHANGED
@@ -3,8 +3,8 @@ import type { OASDocument } from 'oas/dist/rmoas.types';
3
3
  export interface APIOptions {
4
4
  apiDefinition: OASDocument;
5
5
  apiDefinitionUri: string;
6
- indent?: string | false;
7
6
  escapeBrackets?: boolean;
7
+ indent?: string | false;
8
8
  }
9
9
  declare const client: Client<APIOptions>;
10
10
  export default client;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "httpsnippet-client-api",
3
- "version": "6.0.1",
3
+ "version": "6.1.0",
4
4
  "description": "An HTTPSnippet client for generating snippets for the `api` module.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -8,7 +8,7 @@
8
8
  "build": "tsc",
9
9
  "prebuild": "rm -rf dist/",
10
10
  "prepack": "npm run build",
11
- "test": "nyc mocha \"test/**/*.test.ts\""
11
+ "test": "jest --coverage"
12
12
  },
13
13
  "repository": {
14
14
  "type": "git",
@@ -35,23 +35,15 @@
35
35
  "@readme/oas-examples": "^5.9.0",
36
36
  "@readme/openapi-parser": "^2.4.0",
37
37
  "@types/content-type": "^1.1.5",
38
+ "@types/jest": "^29.5.2",
38
39
  "@types/stringify-object": "^4.0.2",
39
- "api": "^6.0.0",
40
- "chai": "^4.3.7",
40
+ "api": "^6.1.0",
41
41
  "fetch-mock": "^9.11.0",
42
42
  "isomorphic-fetch": "^3.0.0",
43
- "mocha": "^10.2.0",
44
- "nyc": "^15.1.0",
45
- "sinon": "^15.0.1",
46
- "sinon-chai": "^3.7.0",
43
+ "jest": "^29.6.1",
44
+ "ts-jest": "^29.1.1",
47
45
  "typescript": "^4.9.5"
48
46
  },
49
47
  "prettier": "@readme/eslint-config/prettier",
50
- "nyc": {
51
- "exclude": [
52
- "dist/",
53
- "test/"
54
- ]
55
- },
56
- "gitHead": "5fe262d794d82935f08863341b0d95b9eb8ac39b"
48
+ "gitHead": "244093f2ad00e5ea527420f49bdb541bc2095806"
57
49
  }
package/src/index.ts CHANGED
@@ -35,7 +35,7 @@ function buildAuthSnippet(authKey: string | string[]) {
35
35
  }
36
36
 
37
37
  function getAuthSources(operation: Operation) {
38
- const matchers: { header: Record<string, string>; query: string[]; cookie: string[] } = {
38
+ const matchers: { cookie: string[]; header: Record<string, string>; query: string[] } = {
39
39
  header: {},
40
40
  query: [],
41
41
  cookie: [],
@@ -79,8 +79,8 @@ function getAuthSources(operation: Operation) {
79
79
  export interface APIOptions {
80
80
  apiDefinition: OASDocument;
81
81
  apiDefinitionUri: string;
82
- indent?: string | false;
83
82
  escapeBrackets?: boolean;
83
+ indent?: string | false;
84
84
  }
85
85
 
86
86
  const client: Client<APIOptions> = {