api-def 0.6.0-alpha2 → 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 +7 -2
- package/cjs/Requester.js +1 -5
- package/esm/Requester.js +1 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## Breaking Changes
|
|
4
4
|
|
|
5
|
-
- axios will enforce ResponseType
|
|
5
|
+
- axios will enforce `ResponseType`
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- add `ResponseOf`, `QueryOf`, `BodyOf`, `ParamsOf` to quickly get types from endpoints
|
|
10
|
+
|
|
11
|
+
## Fixes
|
|
8
12
|
|
|
9
13
|
- absolute paths as `baseUrl` is now supported in fetch backend
|
|
14
|
+
- don't re-use same requests based upon URL to allow for concurrent POST requests
|
|
10
15
|
|
|
11
16
|
# 0.5.0
|
|
12
17
|
|
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/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];
|