api-def 0.6.0-alpha5 → 0.6.0-alpha6
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/CHANGELOG.md +1 -0
- package/cjs/Requester.js +1 -5
- package/cjs/index.d.ts +0 -1
- package/cjs/index.js +0 -1
- package/esm/Requester.js +1 -5
- package/esm/index.d.ts +0 -1
- package/esm/index.js +0 -1
- package/package.json +1 -1
- package/cjs/UtilTypes.d.ts +0 -5
- package/cjs/UtilTypes.js +0 -2
- package/esm/UtilTypes.d.ts +0 -5
- package/esm/UtilTypes.js +0 -1
package/CHANGELOG.md
CHANGED
package/cjs/Requester.js
CHANGED
|
@@ -60,7 +60,7 @@ var locks = {};
|
|
|
60
60
|
var runningOperations = {};
|
|
61
61
|
var MOCK_REQUEST_BACKEND = new MockRequestBackend_1.default();
|
|
62
62
|
var submit = function (host, config, mocking) { return __awaiter(void 0, void 0, void 0, function () {
|
|
63
|
-
var computedConfig, backend, context, key,
|
|
63
|
+
var computedConfig, backend, context, key, lock, lockedContext, response, successEventResult, error_1;
|
|
64
64
|
return __generator(this, function (_a) {
|
|
65
65
|
switch (_a.label) {
|
|
66
66
|
case 0:
|
|
@@ -71,10 +71,6 @@ var submit = function (host, config, mocking) { return __awaiter(void 0, void 0,
|
|
|
71
71
|
}
|
|
72
72
|
context = new RequestContext_1.default(backend, host, computedConfig, host.computePath(host.path, config), mocking);
|
|
73
73
|
key = context.key;
|
|
74
|
-
sameRequest = runningOperations[key];
|
|
75
|
-
if (sameRequest) {
|
|
76
|
-
return [2 /*return*/, sameRequest];
|
|
77
|
-
}
|
|
78
74
|
lock = (context.computedConfig || {}).lock;
|
|
79
75
|
if (lock) {
|
|
80
76
|
lockedContext = locks[lock];
|
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -14,7 +14,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
14
14
|
exports.LoggingMiddleware = exports.CacheMiddleware = exports.FetchRequestBackend = exports.AxiosRequestBackend = exports.LocaleForageCacheBackend = exports.LocalStorageCacheBackend = exports.setCacheBackend = exports.clearCache = exports.isRequestError = void 0;
|
|
15
15
|
__exportStar(require("./Api"), exports);
|
|
16
16
|
__exportStar(require("./ApiTypes"), exports);
|
|
17
|
-
__exportStar(require("./UtilTypes"), exports);
|
|
18
17
|
__exportStar(require("./ApiConstants"), exports);
|
|
19
18
|
var RequestError_1 = require("./RequestError");
|
|
20
19
|
Object.defineProperty(exports, "isRequestError", { enumerable: true, get: function () { return RequestError_1.isRequestError; } });
|
package/esm/Requester.js
CHANGED
|
@@ -57,7 +57,7 @@ var locks = {};
|
|
|
57
57
|
var runningOperations = {};
|
|
58
58
|
var MOCK_REQUEST_BACKEND = new MockRequestBackend();
|
|
59
59
|
export var submit = function (host, config, mocking) { return __awaiter(void 0, void 0, void 0, function () {
|
|
60
|
-
var computedConfig, backend, context, key,
|
|
60
|
+
var computedConfig, backend, context, key, lock, lockedContext, response, successEventResult, error_1;
|
|
61
61
|
return __generator(this, function (_a) {
|
|
62
62
|
switch (_a.label) {
|
|
63
63
|
case 0:
|
|
@@ -68,10 +68,6 @@ export var submit = function (host, config, mocking) { return __awaiter(void 0,
|
|
|
68
68
|
}
|
|
69
69
|
context = new RequestContext(backend, host, computedConfig, host.computePath(host.path, config), mocking);
|
|
70
70
|
key = context.key;
|
|
71
|
-
sameRequest = runningOperations[key];
|
|
72
|
-
if (sameRequest) {
|
|
73
|
-
return [2 /*return*/, sameRequest];
|
|
74
|
-
}
|
|
75
71
|
lock = (context.computedConfig || {}).lock;
|
|
76
72
|
if (lock) {
|
|
77
73
|
lockedContext = locks[lock];
|
package/esm/index.d.ts
CHANGED
package/esm/index.js
CHANGED
package/package.json
CHANGED
package/cjs/UtilTypes.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import Endpoint from "./Endpoint";
|
|
2
|
-
export declare type ResponseOf<E extends Endpoint<any, any, any, any>> = E extends Endpoint<infer R, any, any, any> ? R : never;
|
|
3
|
-
export declare type ParamsOf<E extends Endpoint<any, any, any, any>> = E extends Endpoint<any, infer P, any, any> ? P : never;
|
|
4
|
-
export declare type QueryOf<E extends Endpoint<any, any, any, any>> = E extends Endpoint<any, any, infer Q, any> ? Q : never;
|
|
5
|
-
export declare type BodyOf<E extends Endpoint<any, any, any, any>> = E extends Endpoint<any, any, any, infer B> ? B : never;
|
package/cjs/UtilTypes.js
DELETED
package/esm/UtilTypes.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import Endpoint from "./Endpoint";
|
|
2
|
-
export declare type ResponseOf<E extends Endpoint<any, any, any, any>> = E extends Endpoint<infer R, any, any, any> ? R : never;
|
|
3
|
-
export declare type ParamsOf<E extends Endpoint<any, any, any, any>> = E extends Endpoint<any, infer P, any, any> ? P : never;
|
|
4
|
-
export declare type QueryOf<E extends Endpoint<any, any, any, any>> = E extends Endpoint<any, any, infer Q, any> ? Q : never;
|
|
5
|
-
export declare type BodyOf<E extends Endpoint<any, any, any, any>> = E extends Endpoint<any, any, any, infer B> ? B : never;
|
package/esm/UtilTypes.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|