@koine/api 2.0.0-beta.20 → 2.0.0-beta.22
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/cjs/createApi.d.ts +1 -0
- package/cjs/createApi.js +1 -1
- package/cjs/createApiResultFail.d.ts +1 -0
- package/cjs/createApiResultOk.d.ts +1 -0
- package/cjs/nextApiResponse.d.ts +1 -0
- package/cjs/package.json +1 -1
- package/createApi.d.ts +1 -0
- package/createApi.js +1 -1
- package/createApiResultFail.d.ts +1 -0
- package/createApiResultOk.d.ts +1 -0
- package/nextApiResponse.d.ts +1 -0
- package/package.json +4 -5
package/cjs/createApi.d.ts
CHANGED
package/cjs/createApi.js
CHANGED
|
@@ -104,7 +104,7 @@ var createApi = function (apiName, baseUrl, options) {
|
|
|
104
104
|
if (throwErr && (result === null || result === void 0 ? void 0 : result.fail)) {
|
|
105
105
|
throw result;
|
|
106
106
|
}
|
|
107
|
-
if (process.env["NODE_ENV"]
|
|
107
|
+
if (process.env["NODE_ENV"] === "development") {
|
|
108
108
|
logMsg = "".concat(result === null || result === void 0 ? void 0 : result.status, ": api[").concat(apiName, "] ").concat(method.toUpperCase(), " ").concat(url);
|
|
109
109
|
if (result === null || result === void 0 ? void 0 : result.ok) {
|
|
110
110
|
console.info("\uD83D\uDFE2 ".concat(logMsg));
|
package/cjs/nextApiResponse.d.ts
CHANGED
package/cjs/package.json
CHANGED
package/createApi.d.ts
CHANGED
package/createApi.js
CHANGED
|
@@ -101,7 +101,7 @@ export var createApi = function (apiName, baseUrl, options) {
|
|
|
101
101
|
if (throwErr && (result === null || result === void 0 ? void 0 : result.fail)) {
|
|
102
102
|
throw result;
|
|
103
103
|
}
|
|
104
|
-
if (process.env["NODE_ENV"]
|
|
104
|
+
if (process.env["NODE_ENV"] === "development") {
|
|
105
105
|
logMsg = "".concat(result === null || result === void 0 ? void 0 : result.status, ": api[").concat(apiName, "] ").concat(method.toUpperCase(), " ").concat(url);
|
|
106
106
|
if (result === null || result === void 0 ? void 0 : result.ok) {
|
|
107
107
|
console.info("\uD83D\uDFE2 ".concat(logMsg));
|
package/createApiResultFail.d.ts
CHANGED
package/createApiResultOk.d.ts
CHANGED
package/nextApiResponse.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@koine/api",
|
|
3
3
|
"sideEffects": false,
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@koine/utils": "2.0.0-beta.
|
|
5
|
+
"@koine/utils": "2.0.0-beta.22"
|
|
6
6
|
},
|
|
7
7
|
"peerDependenciesMeta": {
|
|
8
8
|
"next": {
|
|
@@ -12,10 +12,9 @@
|
|
|
12
12
|
"optional": true
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
|
-
"main": "./cjs/index.js",
|
|
16
|
-
"types": "./index.d.ts",
|
|
17
|
-
"type": "module",
|
|
18
15
|
"module": "./index.js",
|
|
16
|
+
"type": "module",
|
|
17
|
+
"main": "./cjs/index.js",
|
|
19
18
|
"exports": {
|
|
20
19
|
".": {
|
|
21
20
|
"require": "./cjs/index.js",
|
|
@@ -51,5 +50,5 @@
|
|
|
51
50
|
}
|
|
52
51
|
},
|
|
53
52
|
"peerDependencies": {},
|
|
54
|
-
"version": "2.0.0-beta.
|
|
53
|
+
"version": "2.0.0-beta.22"
|
|
55
54
|
}
|