@microlink/mql 0.16.0 → 0.16.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/LICENSE.md CHANGED
File without changes
package/dist/index.js CHANGED
@@ -1811,7 +1811,7 @@ var distribution = /*#__PURE__*/Object.freeze({
1811
1811
 
1812
1812
  var require$$1 = /*@__PURE__*/getAugmentedNamespace(distribution);
1813
1813
 
1814
- const VERSION = '0.16.0';
1814
+ const VERSION = '0.16.1';
1815
1815
 
1816
1816
  var constants = {
1817
1817
  VERSION,
@@ -1984,7 +1984,7 @@ var constants = {
1984
1984
  const getApiUrl = (
1985
1985
  url,
1986
1986
  { data, apiKey, endpoint, ...opts } = {},
1987
- { responseType = 'json', headers: responseHeaders = {}, ...gotOpts } = {}
1987
+ { responseType = 'json', headers: reqHeaders = {}, ...gotOpts } = {}
1988
1988
  ) => {
1989
1989
  const isPro = !!apiKey;
1990
1990
  const apiEndpoint = endpoint || ENDPOINT[isPro ? 'PRO' : 'FREE'];
@@ -1995,9 +1995,7 @@ var constants = {
1995
1995
  ...flatten(opts)
1996
1996
  })}`;
1997
1997
 
1998
- const headers = isPro
1999
- ? { ...responseHeaders, 'x-api-key': apiKey }
2000
- : responseHeaders;
1998
+ const headers = isPro ? { ...reqHeaders, 'x-api-key': apiKey } : reqHeaders;
2001
1999
 
2002
2000
  if (opts.stream) responseType = STREAM_RESPONSE_TYPE;
2003
2001
 
package/dist/index.umd.js CHANGED
@@ -1817,7 +1817,7 @@
1817
1817
 
1818
1818
  var require$$1 = /*@__PURE__*/getAugmentedNamespace(distribution);
1819
1819
 
1820
- const VERSION = '0.16.0';
1820
+ const VERSION = '0.16.1';
1821
1821
 
1822
1822
  var constants = {
1823
1823
  VERSION,
@@ -1990,7 +1990,7 @@
1990
1990
  const getApiUrl = (
1991
1991
  url,
1992
1992
  { data, apiKey, endpoint, ...opts } = {},
1993
- { responseType = 'json', headers: responseHeaders = {}, ...gotOpts } = {}
1993
+ { responseType = 'json', headers: reqHeaders = {}, ...gotOpts } = {}
1994
1994
  ) => {
1995
1995
  const isPro = !!apiKey;
1996
1996
  const apiEndpoint = endpoint || ENDPOINT[isPro ? 'PRO' : 'FREE'];
@@ -2001,9 +2001,7 @@
2001
2001
  ...flatten(opts)
2002
2002
  })}`;
2003
2003
 
2004
- const headers = isPro
2005
- ? { ...responseHeaders, 'x-api-key': apiKey }
2006
- : responseHeaders;
2004
+ const headers = isPro ? { ...reqHeaders, 'x-api-key': apiKey } : reqHeaders;
2007
2005
 
2008
2006
  if (opts.stream) responseType = STREAM_RESPONSE_TYPE;
2009
2007
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@microlink/mql",
3
3
  "description": "Microlink Query Language. The official HTTP client to interact with Microlink API for Node.js, browsers & Deno.",
4
4
  "homepage": "https://microlink.io/mql",
5
- "version": "0.16.0",
5
+ "version": "0.16.1",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
8
8
  "types": "./dist/index.d.ts",
@@ -54,7 +54,6 @@
54
54
  "devDependencies": {
55
55
  "@commitlint/cli": "latest",
56
56
  "@commitlint/config-conventional": "latest",
57
- "@ksmithut/prettier-standard": "latest",
58
57
  "@rollup/plugin-commonjs": "latest",
59
58
  "@rollup/plugin-node-resolve": "latest",
60
59
  "@rollup/plugin-replace": "latest",
@@ -84,6 +83,22 @@
84
83
  "src/index.js",
85
84
  "src/main.mjs"
86
85
  ],
86
+ "scripts": {
87
+ "build": "rollup -c rollup.config.js --bundleConfigAsCjs",
88
+ "clean": "rm -rf node_modules",
89
+ "clean:build": "rm -rf dist/index.js",
90
+ "contributors": "(npx git-authors-cli && npx finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
91
+ "dev": "npm run build -- -w",
92
+ "lint": "standard && tsd",
93
+ "postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)",
94
+ "prebuild": "npm run clean:build",
95
+ "prepublishOnly": "npm run build",
96
+ "pretest": "npm run lint && npm run build",
97
+ "release": "standard-version -a",
98
+ "release:github": "github-generate-release",
99
+ "release:tags": "git push --follow-tags origin HEAD:master",
100
+ "test": "c8 ava --verbose"
101
+ },
87
102
  "license": "MIT",
88
103
  "ava": {
89
104
  "files": [
@@ -104,7 +119,7 @@
104
119
  },
105
120
  "nano-staged": {
106
121
  "*.js": [
107
- "prettier-standard",
122
+ "npx -y @kikobeats/prettier-standard",
108
123
  "standard --fix"
109
124
  ],
110
125
  "*.md": [
@@ -134,20 +149,5 @@
134
149
  }
135
150
  },
136
151
  "directory": "test"
137
- },
138
- "scripts": {
139
- "build": "rollup -c rollup.config.js --bundleConfigAsCjs",
140
- "clean": "rm -rf node_modules",
141
- "clean:build": "rm -rf dist/index.js",
142
- "contributors": "(npx git-authors-cli && npx finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
143
- "dev": "npm run build -- -w",
144
- "lint": "standard && tsd",
145
- "postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)",
146
- "prebuild": "npm run clean:build",
147
- "pretest": "npm run lint && npm run build",
148
- "release": "standard-version -a",
149
- "release:github": "github-generate-release",
150
- "release:tags": "git push --follow-tags origin HEAD:master",
151
- "test": "c8 ava --verbose"
152
152
  }
153
- }
153
+ }
package/src/index.js CHANGED
@@ -154,7 +154,7 @@ const fetchFromApi = async (apiUrl, opts = {}) => {
154
154
  const getApiUrl = (
155
155
  url,
156
156
  { data, apiKey, endpoint, ...opts } = {},
157
- { responseType = 'json', headers: responseHeaders = {}, ...gotOpts } = {}
157
+ { responseType = 'json', headers: reqHeaders = {}, ...gotOpts } = {}
158
158
  ) => {
159
159
  const isPro = !!apiKey
160
160
  const apiEndpoint = endpoint || ENDPOINT[isPro ? 'PRO' : 'FREE']
@@ -165,9 +165,7 @@ const getApiUrl = (
165
165
  ...flatten(opts)
166
166
  })}`
167
167
 
168
- const headers = isPro
169
- ? { ...responseHeaders, 'x-api-key': apiKey }
170
- : responseHeaders
168
+ const headers = isPro ? { ...reqHeaders, 'x-api-key': apiKey } : reqHeaders
171
169
 
172
170
  if (opts.stream) responseType = STREAM_RESPONSE_TYPE
173
171