@ama-sdk/core 14.6.0-prerelease.9 → 15.1.0-prerelease.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/cjs/fwk/api-helpers.js +10 -19
- package/cjs/fwk/api-helpers.spec.js +79 -10
- package/cjs/fwk/core/api-client.js +1 -1
- package/cjs/fwk/date.js +20 -29
- package/cjs/fwk/errors.js +16 -27
- package/cjs/fwk/mocks/alf-mock-adapter.js +5 -11
- package/cjs/fwk/mocks/base-mock-adapter.js +4 -11
- package/cjs/fwk/mocks/random-mock-adapter.js +12 -20
- package/cjs/fwk/mocks/sequential-mock-adapter.js +12 -20
- package/cjs/fwk/param-deserialization.js +1 -1
- package/cjs/fwk/param-serialization.js +2 -4
- package/cjs/fwk/server.js +1 -1
- package/cjs/plugins/additional-params/additional-params-request.js +17 -24
- package/cjs/plugins/additional-params/additional-params-sync-request.js +3 -7
- package/cjs/plugins/additional-params/additional-params.spec.js +2 -5
- package/cjs/plugins/api-configuration-override/api-configuration-override-request.js +4 -11
- package/cjs/plugins/api-configuration-override/api-configuration-override.spec.js +4 -11
- package/cjs/plugins/api-key/api-key-request.js +4 -11
- package/cjs/plugins/api-key/api-key.spec.js +2 -5
- package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint-request.js +4 -11
- package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +2 -5
- package/cjs/plugins/client-facts/client-facts-request.js +4 -11
- package/cjs/plugins/client-facts/client-facts.spec.js +3 -8
- package/cjs/plugins/custom-info/custom-info-reply.js +2 -6
- package/cjs/plugins/custom-info/custom-info.spec.js +2 -5
- package/cjs/plugins/exception/exception-reply.js +2 -6
- package/cjs/plugins/exception/exception.spec.js +1 -3
- package/cjs/plugins/fetch-cache/fetch-cache-request.js +4 -9
- package/cjs/plugins/fetch-cache/fetch-cache.spec.js +2 -5
- package/cjs/plugins/fetch-credentials/fetch-credentials-request.js +2 -6
- package/cjs/plugins/fetch-credentials/fetch-credentials.spec.js +2 -5
- package/cjs/plugins/json-token/json-token-reply.js +2 -6
- package/cjs/plugins/json-token/json-token-request.js +2 -6
- package/cjs/plugins/json-token/json-token.spec.js +2 -5
- package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth-helpers.js +14 -15
- package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth-request.js +4 -11
- package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +4 -11
- package/cjs/plugins/mock-intercept/mock-intercept-request.js +6 -14
- package/cjs/plugins/mock-intercept/mock-intercept.spec.js +2 -5
- package/cjs/plugins/open-telemetry/traceparent/open-telemetry-traceparent-reply.js +5 -10
- package/cjs/plugins/open-telemetry/traceparent/open-telemetry-traceparent-reply.spec.js +2 -5
- package/cjs/plugins/open-telemetry/traceparent/open-telemetry-traceparent-request.js +4 -9
- package/cjs/plugins/open-telemetry/traceparent/open-telemetry-traceparent-request.spec.js +2 -5
- package/cjs/plugins/pii-tokenizer/pii-tokenizer-request.js +4 -11
- package/cjs/plugins/pii-tokenizer/pii-tokenizer.spec.js +13 -30
- package/cjs/plugins/raw-response-info/raw-response-info-reply.js +4 -9
- package/cjs/plugins/raw-response-info/raw-response-info.spec.js +2 -5
- package/cjs/plugins/reviver/reviver-reply.js +2 -6
- package/cjs/plugins/reviver/reviver.spec.js +2 -5
- package/cjs/plugins/session-id/session-id-request.js +2 -6
- package/cjs/plugins/session-id/session-id.spec.js +2 -5
- package/cjs/plugins/si-token/si-token-request.js +12 -20
- package/cjs/plugins/si-token/si-token.spec.js +2 -5
- package/cjs/plugins/simple-api-key-authentication/simple-api-key-authentication-request.js +4 -11
- package/cjs/plugins/simple-api-key-authentication/simple-api-key-authentication.spec.js +2 -5
- package/cjs/plugins/url-rewrite/url-rewrite-request.js +4 -11
- package/cjs/plugins/url-rewrite/url-rewrite.spec.js +2 -5
- package/cjs/utils/crypto.js +2 -5
- package/cjs/utils/encoder.js +6 -8
- package/cjs/utils/generic-api.js +4 -11
- package/cjs/utils/json-token.js +2 -5
- package/cjs/utils/json-token.spec.js +11 -14
- package/cjs/utils/perf/perf-metric.js +4 -9
- package/esm2015/fwk/api-helpers.js +11 -21
- package/esm2015/fwk/api-helpers.spec.js +80 -11
- package/esm2015/fwk/core/api-client.js +1 -1
- package/esm2015/fwk/date.js +20 -29
- package/esm2015/fwk/errors.js +16 -27
- package/esm2015/fwk/mocks/alf-mock-adapter.js +5 -11
- package/esm2015/fwk/mocks/base-mock-adapter.js +4 -11
- package/esm2015/fwk/mocks/random-mock-adapter.js +12 -20
- package/esm2015/fwk/mocks/sequential-mock-adapter.js +12 -20
- package/esm2015/fwk/param-deserialization.js +1 -1
- package/esm2015/fwk/param-serialization.js +2 -4
- package/esm2015/fwk/server.js +1 -1
- package/esm2015/plugins/additional-params/additional-params-request.js +17 -24
- package/esm2015/plugins/additional-params/additional-params-sync-request.js +3 -7
- package/esm2015/plugins/additional-params/additional-params.spec.js +2 -5
- package/esm2015/plugins/api-configuration-override/api-configuration-override-request.js +4 -11
- package/esm2015/plugins/api-configuration-override/api-configuration-override.spec.js +4 -11
- package/esm2015/plugins/api-key/api-key-request.js +4 -11
- package/esm2015/plugins/api-key/api-key.spec.js +2 -5
- package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint-request.js +4 -11
- package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +2 -5
- package/esm2015/plugins/client-facts/client-facts-request.js +4 -11
- package/esm2015/plugins/client-facts/client-facts.spec.js +3 -8
- package/esm2015/plugins/custom-info/custom-info-reply.js +2 -6
- package/esm2015/plugins/custom-info/custom-info.spec.js +2 -5
- package/esm2015/plugins/exception/exception-reply.js +2 -6
- package/esm2015/plugins/exception/exception.spec.js +1 -3
- package/esm2015/plugins/fetch-cache/fetch-cache-request.js +4 -9
- package/esm2015/plugins/fetch-cache/fetch-cache.spec.js +2 -5
- package/esm2015/plugins/fetch-credentials/fetch-credentials-request.js +2 -6
- package/esm2015/plugins/fetch-credentials/fetch-credentials.spec.js +2 -5
- package/esm2015/plugins/json-token/json-token-reply.js +2 -6
- package/esm2015/plugins/json-token/json-token-request.js +2 -6
- package/esm2015/plugins/json-token/json-token.spec.js +2 -5
- package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth-helpers.js +14 -15
- package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth-request.js +4 -11
- package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +4 -11
- package/esm2015/plugins/mock-intercept/mock-intercept-request.js +6 -14
- package/esm2015/plugins/mock-intercept/mock-intercept.spec.js +2 -5
- package/esm2015/plugins/open-telemetry/traceparent/open-telemetry-traceparent-reply.js +5 -10
- package/esm2015/plugins/open-telemetry/traceparent/open-telemetry-traceparent-reply.spec.js +2 -5
- package/esm2015/plugins/open-telemetry/traceparent/open-telemetry-traceparent-request.js +4 -9
- package/esm2015/plugins/open-telemetry/traceparent/open-telemetry-traceparent-request.spec.js +2 -5
- package/esm2015/plugins/pii-tokenizer/pii-tokenizer-request.js +4 -11
- package/esm2015/plugins/pii-tokenizer/pii-tokenizer.spec.js +5 -11
- package/esm2015/plugins/raw-response-info/raw-response-info-reply.js +4 -9
- package/esm2015/plugins/raw-response-info/raw-response-info.spec.js +2 -5
- package/esm2015/plugins/reviver/reviver-reply.js +2 -6
- package/esm2015/plugins/reviver/reviver.spec.js +2 -5
- package/esm2015/plugins/session-id/session-id-request.js +2 -6
- package/esm2015/plugins/session-id/session-id.spec.js +2 -5
- package/esm2015/plugins/si-token/si-token-request.js +12 -20
- package/esm2015/plugins/si-token/si-token.spec.js +2 -5
- package/esm2015/plugins/simple-api-key-authentication/simple-api-key-authentication-request.js +4 -11
- package/esm2015/plugins/simple-api-key-authentication/simple-api-key-authentication.spec.js +2 -5
- package/esm2015/plugins/url-rewrite/url-rewrite-request.js +4 -11
- package/esm2015/plugins/url-rewrite/url-rewrite.spec.js +2 -5
- package/esm2015/utils/crypto.js +2 -5
- package/esm2015/utils/encoder.js +6 -8
- package/esm2015/utils/generic-api.js +4 -11
- package/esm2015/utils/json-token.js +2 -5
- package/esm2015/utils/json-token.spec.js +11 -14
- package/esm2015/utils/perf/perf-metric.js +4 -9
- package/package.json +25 -25
- package/schematics/ng-add/index.js +3 -2
- package/schematics/ng-add/index.js.map +1 -1
- package/src/fwk/api-helpers.d.ts +2 -10
- package/src/fwk/api-helpers.d.ts.map +1 -1
- package/src/fwk/api-helpers.js +8 -16
- package/src/fwk/api-helpers.js.map +1 -1
- package/src/fwk/core/api-client.d.ts +2 -10
- package/src/fwk/core/api-client.d.ts.map +1 -1
- package/src/fwk/core/api-client.js +1 -1
- package/src/fwk/core/api-client.js.map +1 -1
package/cjs/fwk/api-helpers.js
CHANGED
|
@@ -21,9 +21,6 @@ _export(exports, {
|
|
|
21
21
|
get getResponseReviver () {
|
|
22
22
|
return getResponseReviver;
|
|
23
23
|
},
|
|
24
|
-
get prepareUrl () {
|
|
25
|
-
return prepareUrl;
|
|
26
|
-
},
|
|
27
24
|
get prepareUrlWithQueryParams () {
|
|
28
25
|
return prepareUrlWithQueryParams;
|
|
29
26
|
},
|
|
@@ -54,9 +51,7 @@ function _define_property(obj, key, value) {
|
|
|
54
51
|
configurable: true,
|
|
55
52
|
writable: true
|
|
56
53
|
});
|
|
57
|
-
} else
|
|
58
|
-
obj[key] = value;
|
|
59
|
-
}
|
|
54
|
+
} else obj[key] = value;
|
|
60
55
|
return obj;
|
|
61
56
|
}
|
|
62
57
|
function _iterable_to_array_limit(arr, i) {
|
|
@@ -84,7 +79,7 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
84
79
|
return _arr;
|
|
85
80
|
}
|
|
86
81
|
function _non_iterable_rest() {
|
|
87
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance
|
|
82
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
88
83
|
}
|
|
89
84
|
function _object_spread(target) {
|
|
90
85
|
for(var i = 1; i < arguments.length; i++){
|
|
@@ -116,20 +111,16 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
116
111
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
117
112
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
118
113
|
}
|
|
119
|
-
function prepareUrl(url) {
|
|
120
|
-
var queryParameters = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
121
|
-
var queryPart = Object.keys(queryParameters).filter(function(name) {
|
|
122
|
-
return typeof queryParameters[name] !== 'undefined';
|
|
123
|
-
}).map(function(name) {
|
|
124
|
-
return "".concat(name, "=").concat(queryParameters[name]);
|
|
125
|
-
}).join('&');
|
|
126
|
-
var paramsPrefix = url.includes('?') ? '&' : '?';
|
|
127
|
-
return url + (queryPart ? paramsPrefix + queryPart : '');
|
|
128
|
-
}
|
|
129
114
|
function prepareUrlWithQueryParams(url) {
|
|
130
|
-
var serializedQueryParams = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
115
|
+
var serializedQueryParams = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, enableParameterSerialization = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true;
|
|
131
116
|
var paramsPrefix = url.includes('?') ? '&' : '?';
|
|
132
|
-
var queryPart = Object.values(serializedQueryParams).join('&')
|
|
117
|
+
var queryPart = enableParameterSerialization ? Object.values(serializedQueryParams).join('&') : Object.entries(serializedQueryParams).filter(function(param) {
|
|
118
|
+
var _param = _sliced_to_array(param, 2), value = _param[1];
|
|
119
|
+
return typeof value !== 'undefined';
|
|
120
|
+
}).map(function(param) {
|
|
121
|
+
var _param = _sliced_to_array(param, 2), key = _param[0], value = _param[1];
|
|
122
|
+
return "".concat(key, "=").concat(value);
|
|
123
|
+
}).join('&');
|
|
133
124
|
return url + (queryPart ? paramsPrefix + queryPart : '');
|
|
134
125
|
}
|
|
135
126
|
function getPropertiesFromData(data, keys) {
|
|
@@ -87,16 +87,6 @@ describe('getResponseReviver - reviver as function', function() {
|
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
89
|
describe('Prepare URL', function() {
|
|
90
|
-
it('should correctly prepare url with query parameters of deprecated type', function() {
|
|
91
|
-
// primitive value
|
|
92
|
-
expect((0, _core.prepareUrl)('https://sampleUrl/samplePath/sampleOperation', {
|
|
93
|
-
id: '5'
|
|
94
|
-
})).toEqual('https://sampleUrl/samplePath/sampleOperation?id=5');
|
|
95
|
-
// array value
|
|
96
|
-
expect((0, _core.prepareUrl)('https://sampleUrl/samplePath/sampleOperation', {
|
|
97
|
-
id: '3,4,5'
|
|
98
|
-
})).toEqual('https://sampleUrl/samplePath/sampleOperation?id=3,4,5');
|
|
99
|
-
});
|
|
100
90
|
it('should correctly prepare url with serialized query parameters', function() {
|
|
101
91
|
// one parameter
|
|
102
92
|
expect((0, _core.prepareUrlWithQueryParams)('https://sampleUrl/samplePath/sampleOperation', {
|
|
@@ -110,4 +100,83 @@ describe('Prepare URL', function() {
|
|
|
110
100
|
id2: 'id2=5'
|
|
111
101
|
})).toEqual('https://sampleUrl/samplePath/sampleOperation?id1=3,4,5&id2=5');
|
|
112
102
|
});
|
|
103
|
+
it('should correctly prepare url with serialized query parameters when enableParameterSerialization is true', function() {
|
|
104
|
+
// Serialized values already contain "key=value" — Object.values is used
|
|
105
|
+
expect((0, _core.prepareUrlWithQueryParams)('https://sampleUrl/samplePath/sampleOperation', {
|
|
106
|
+
id: 'id=5'
|
|
107
|
+
}, true)).toEqual('https://sampleUrl/samplePath/sampleOperation?id=5');
|
|
108
|
+
expect((0, _core.prepareUrlWithQueryParams)('https://sampleUrl/samplePath/sampleOperation', {
|
|
109
|
+
id1: 'id1=3,4,5',
|
|
110
|
+
id2: 'id2=5'
|
|
111
|
+
}, true)).toEqual('https://sampleUrl/samplePath/sampleOperation?id1=3,4,5&id2=5');
|
|
112
|
+
});
|
|
113
|
+
it('should correctly prepare url with stringified query parameters when enableParameterSerialization is false', function() {
|
|
114
|
+
// Stringified values are bare — Object.entries is used to produce "key=value"
|
|
115
|
+
expect((0, _core.prepareUrlWithQueryParams)('https://sampleUrl/samplePath/sampleOperation', {
|
|
116
|
+
id: '5'
|
|
117
|
+
}, false)).toEqual('https://sampleUrl/samplePath/sampleOperation?id=5');
|
|
118
|
+
// no parameters
|
|
119
|
+
expect((0, _core.prepareUrlWithQueryParams)('https://sampleUrl/samplePath/sampleOperation', {}, false)).toEqual('https://sampleUrl/samplePath/sampleOperation');
|
|
120
|
+
// multiple parameters
|
|
121
|
+
expect((0, _core.prepareUrlWithQueryParams)('https://sampleUrl/samplePath/sampleOperation', {
|
|
122
|
+
id1: '3,4,5',
|
|
123
|
+
id2: '5'
|
|
124
|
+
}, false)).toEqual('https://sampleUrl/samplePath/sampleOperation?id1=3,4,5&id2=5');
|
|
125
|
+
// array-like values
|
|
126
|
+
expect((0, _core.prepareUrlWithQueryParams)('https://sampleUrl/samplePath/sampleOperation', {
|
|
127
|
+
tags: 'a,b,c'
|
|
128
|
+
}, false)).toEqual('https://sampleUrl/samplePath/sampleOperation?tags=a,b,c');
|
|
129
|
+
// undefined values should be filtered
|
|
130
|
+
expect((0, _core.prepareUrlWithQueryParams)('https://sampleUrl/samplePath/sampleOperation', {
|
|
131
|
+
id: '5',
|
|
132
|
+
filter: undefined
|
|
133
|
+
}, false)).toEqual('https://sampleUrl/samplePath/sampleOperation?id=5');
|
|
134
|
+
});
|
|
135
|
+
it('should use & as separator when url already contains ?', function() {
|
|
136
|
+
expect((0, _core.prepareUrlWithQueryParams)('https://sampleUrl/samplePath?existing=1', {
|
|
137
|
+
id: 'id=5'
|
|
138
|
+
}, true)).toEqual('https://sampleUrl/samplePath?existing=1&id=5');
|
|
139
|
+
expect((0, _core.prepareUrlWithQueryParams)('https://sampleUrl/samplePath?existing=1', {
|
|
140
|
+
id: '5'
|
|
141
|
+
}, false)).toEqual('https://sampleUrl/samplePath?existing=1&id=5');
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
describe('stringifyQueryParams', function() {
|
|
145
|
+
it('should exclude undefined values from the result', function() {
|
|
146
|
+
var queryParams = {
|
|
147
|
+
id: '5',
|
|
148
|
+
filter: undefined,
|
|
149
|
+
name: 'test'
|
|
150
|
+
};
|
|
151
|
+
var result = (0, _core.stringifyQueryParams)(queryParams);
|
|
152
|
+
expect(result).toEqual({
|
|
153
|
+
id: '5',
|
|
154
|
+
name: 'test'
|
|
155
|
+
});
|
|
156
|
+
expect('filter' in result).toBe(false);
|
|
157
|
+
});
|
|
158
|
+
it('should exclude null values from the result', function() {
|
|
159
|
+
var queryParams = {
|
|
160
|
+
id: '5',
|
|
161
|
+
filter: null,
|
|
162
|
+
name: 'test'
|
|
163
|
+
};
|
|
164
|
+
var result = (0, _core.stringifyQueryParams)(queryParams);
|
|
165
|
+
expect(result).toEqual({
|
|
166
|
+
id: '5',
|
|
167
|
+
name: 'test'
|
|
168
|
+
});
|
|
169
|
+
expect('filter' in result).toBe(false);
|
|
170
|
+
});
|
|
171
|
+
it('should produce correct URL when combined with prepareUrlWithQueryParams and enableParameterSerialization is false', function() {
|
|
172
|
+
// Simulates the template flow: stringifyQueryParams -> prepareUrlWithQueryParams(url, params, false)
|
|
173
|
+
var queryParams = {
|
|
174
|
+
id: '5',
|
|
175
|
+
filter: undefined,
|
|
176
|
+
page: '2'
|
|
177
|
+
};
|
|
178
|
+
var stringified = (0, _core.stringifyQueryParams)(queryParams);
|
|
179
|
+
var url = (0, _core.prepareUrlWithQueryParams)('https://api.example.com/resource', stringified, false);
|
|
180
|
+
expect(url).toEqual('https://api.example.com/resource?id=5&page=2');
|
|
181
|
+
});
|
|
113
182
|
});
|
|
@@ -10,5 +10,5 @@ Object.defineProperty(exports, "isApiClient", {
|
|
|
10
10
|
});
|
|
11
11
|
function isApiClient(client) {
|
|
12
12
|
var apiClient = client;
|
|
13
|
-
return !!apiClient && !!apiClient.options && typeof apiClient.stringifyQueryParams === 'function' && typeof apiClient.getRequestOptions === 'function' &&
|
|
13
|
+
return !!apiClient && !!apiClient.options && typeof apiClient.stringifyQueryParams === 'function' && typeof apiClient.getRequestOptions === 'function' && typeof apiClient.prepareUrlWithQueryParams === 'function' && typeof apiClient.processFormData === 'function' && typeof apiClient.processCall === 'function';
|
|
14
14
|
}
|
package/cjs/fwk/date.js
CHANGED
|
@@ -35,9 +35,7 @@ function _array_without_holes(arr) {
|
|
|
35
35
|
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
36
36
|
}
|
|
37
37
|
function _assert_this_initialized(self) {
|
|
38
|
-
if (self === void 0)
|
|
39
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
40
|
-
}
|
|
38
|
+
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
41
39
|
return self;
|
|
42
40
|
}
|
|
43
41
|
function _call_super(_this, derived, args) {
|
|
@@ -45,14 +43,11 @@ function _call_super(_this, derived, args) {
|
|
|
45
43
|
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
46
44
|
}
|
|
47
45
|
function _class_call_check(instance, Constructor) {
|
|
48
|
-
if (!(instance instanceof Constructor))
|
|
49
|
-
throw new TypeError("Cannot call a class as a function");
|
|
50
|
-
}
|
|
46
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
51
47
|
}
|
|
52
48
|
function _construct(Parent, args, Class) {
|
|
53
|
-
if (_is_native_reflect_construct())
|
|
54
|
-
|
|
55
|
-
} else {
|
|
49
|
+
if (_is_native_reflect_construct()) _construct = Reflect.construct;
|
|
50
|
+
else {
|
|
56
51
|
_construct = function construct(Parent, args, Class) {
|
|
57
52
|
var a = [
|
|
58
53
|
null
|
|
@@ -103,23 +98,29 @@ function _instanceof(left, right) {
|
|
|
103
98
|
"@swc/helpers - instanceof";
|
|
104
99
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
105
100
|
return !!right[Symbol.hasInstance](left);
|
|
106
|
-
} else
|
|
107
|
-
return left instanceof right;
|
|
108
|
-
}
|
|
101
|
+
} else return left instanceof right;
|
|
109
102
|
}
|
|
110
103
|
function _is_native_function(fn) {
|
|
111
104
|
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
112
105
|
}
|
|
106
|
+
function _is_native_reflect_construct() {
|
|
107
|
+
try {
|
|
108
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
109
|
+
} catch (_) {}
|
|
110
|
+
return (_is_native_reflect_construct = function() {
|
|
111
|
+
return !!result;
|
|
112
|
+
})();
|
|
113
|
+
}
|
|
113
114
|
function _iterable_to_array(iter) {
|
|
114
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
115
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
|
|
116
|
+
return Array.from(iter);
|
|
117
|
+
}
|
|
115
118
|
}
|
|
116
119
|
function _non_iterable_spread() {
|
|
117
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance
|
|
120
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
118
121
|
}
|
|
119
122
|
function _possible_constructor_return(self, call) {
|
|
120
|
-
if (call && (_type_of(call) === "object" || typeof call === "function"))
|
|
121
|
-
return call;
|
|
122
|
-
}
|
|
123
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) return call;
|
|
123
124
|
return _assert_this_initialized(self);
|
|
124
125
|
}
|
|
125
126
|
function _set_prototype_of(o, p) {
|
|
@@ -146,11 +147,9 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
146
147
|
}
|
|
147
148
|
function _wrap_native_super(Class) {
|
|
148
149
|
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
149
|
-
_wrap_native_super = function
|
|
150
|
+
_wrap_native_super = function(Class) {
|
|
150
151
|
if (Class === null || !_is_native_function(Class)) return Class;
|
|
151
|
-
if (typeof Class !== "function")
|
|
152
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
153
|
-
}
|
|
152
|
+
if (typeof Class !== "function") throw new TypeError("Super expression must either be null or a function");
|
|
154
153
|
if (typeof _cache !== "undefined") {
|
|
155
154
|
if (_cache.has(Class)) return _cache.get(Class);
|
|
156
155
|
_cache.set(Class, Wrapper);
|
|
@@ -170,14 +169,6 @@ function _wrap_native_super(Class) {
|
|
|
170
169
|
};
|
|
171
170
|
return _wrap_native_super(Class);
|
|
172
171
|
}
|
|
173
|
-
function _is_native_reflect_construct() {
|
|
174
|
-
try {
|
|
175
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
176
|
-
} catch (_) {}
|
|
177
|
-
return (_is_native_reflect_construct = function() {
|
|
178
|
-
return !!result;
|
|
179
|
-
})();
|
|
180
|
-
}
|
|
181
172
|
var _NativeDateClass = Date;
|
|
182
173
|
function pad(val) {
|
|
183
174
|
var digits = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 2;
|
package/cjs/fwk/errors.js
CHANGED
|
@@ -31,9 +31,7 @@ _export(exports, {
|
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
function _assert_this_initialized(self) {
|
|
34
|
-
if (self === void 0)
|
|
35
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
36
|
-
}
|
|
34
|
+
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
37
35
|
return self;
|
|
38
36
|
}
|
|
39
37
|
function _call_super(_this, derived, args) {
|
|
@@ -41,14 +39,11 @@ function _call_super(_this, derived, args) {
|
|
|
41
39
|
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
42
40
|
}
|
|
43
41
|
function _class_call_check(instance, Constructor) {
|
|
44
|
-
if (!(instance instanceof Constructor))
|
|
45
|
-
throw new TypeError("Cannot call a class as a function");
|
|
46
|
-
}
|
|
42
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
47
43
|
}
|
|
48
44
|
function _construct(Parent, args, Class) {
|
|
49
|
-
if (_is_native_reflect_construct())
|
|
50
|
-
|
|
51
|
-
} else {
|
|
45
|
+
if (_is_native_reflect_construct()) _construct = Reflect.construct;
|
|
46
|
+
else {
|
|
52
47
|
_construct = function construct(Parent, args, Class) {
|
|
53
48
|
var a = [
|
|
54
49
|
null
|
|
@@ -70,9 +65,7 @@ function _define_property(obj, key, value) {
|
|
|
70
65
|
configurable: true,
|
|
71
66
|
writable: true
|
|
72
67
|
});
|
|
73
|
-
} else
|
|
74
|
-
obj[key] = value;
|
|
75
|
-
}
|
|
68
|
+
} else obj[key] = value;
|
|
76
69
|
return obj;
|
|
77
70
|
}
|
|
78
71
|
function _get_prototype_of(o) {
|
|
@@ -97,10 +90,16 @@ function _inherits(subClass, superClass) {
|
|
|
97
90
|
function _is_native_function(fn) {
|
|
98
91
|
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
99
92
|
}
|
|
93
|
+
function _is_native_reflect_construct() {
|
|
94
|
+
try {
|
|
95
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
96
|
+
} catch (_) {}
|
|
97
|
+
return (_is_native_reflect_construct = function() {
|
|
98
|
+
return !!result;
|
|
99
|
+
})();
|
|
100
|
+
}
|
|
100
101
|
function _possible_constructor_return(self, call) {
|
|
101
|
-
if (call && (_type_of(call) === "object" || typeof call === "function"))
|
|
102
|
-
return call;
|
|
103
|
-
}
|
|
102
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) return call;
|
|
104
103
|
return _assert_this_initialized(self);
|
|
105
104
|
}
|
|
106
105
|
function _set_prototype_of(o, p) {
|
|
@@ -116,11 +115,9 @@ function _type_of(obj) {
|
|
|
116
115
|
}
|
|
117
116
|
function _wrap_native_super(Class) {
|
|
118
117
|
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
119
|
-
_wrap_native_super = function
|
|
118
|
+
_wrap_native_super = function(Class) {
|
|
120
119
|
if (Class === null || !_is_native_function(Class)) return Class;
|
|
121
|
-
if (typeof Class !== "function")
|
|
122
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
123
|
-
}
|
|
120
|
+
if (typeof Class !== "function") throw new TypeError("Super expression must either be null or a function");
|
|
124
121
|
if (typeof _cache !== "undefined") {
|
|
125
122
|
if (_cache.has(Class)) return _cache.get(Class);
|
|
126
123
|
_cache.set(Class, Wrapper);
|
|
@@ -140,14 +137,6 @@ function _wrap_native_super(Class) {
|
|
|
140
137
|
};
|
|
141
138
|
return _wrap_native_super(Class);
|
|
142
139
|
}
|
|
143
|
-
function _is_native_reflect_construct() {
|
|
144
|
-
try {
|
|
145
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
146
|
-
} catch (_) {}
|
|
147
|
-
return (_is_native_reflect_construct = function() {
|
|
148
|
-
return !!result;
|
|
149
|
-
})();
|
|
150
|
-
}
|
|
151
140
|
var GenericError = /*#__PURE__*/ function(Error1) {
|
|
152
141
|
"use strict";
|
|
153
142
|
_inherits(GenericError, Error1);
|
|
@@ -18,11 +18,8 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
18
18
|
reject(error);
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
|
-
if (info.done)
|
|
22
|
-
|
|
23
|
-
} else {
|
|
24
|
-
Promise.resolve(value).then(_next, _throw);
|
|
25
|
-
}
|
|
21
|
+
if (info.done) resolve(value);
|
|
22
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
26
23
|
}
|
|
27
24
|
function _async_to_generator(fn) {
|
|
28
25
|
return function() {
|
|
@@ -47,9 +44,7 @@ function _define_property(obj, key, value) {
|
|
|
47
44
|
configurable: true,
|
|
48
45
|
writable: true
|
|
49
46
|
});
|
|
50
|
-
} else
|
|
51
|
-
obj[key] = value;
|
|
52
|
-
}
|
|
47
|
+
} else obj[key] = value;
|
|
53
48
|
return obj;
|
|
54
49
|
}
|
|
55
50
|
function _object_spread(target) {
|
|
@@ -82,9 +77,8 @@ function ownKeys(object, enumerableOnly) {
|
|
|
82
77
|
}
|
|
83
78
|
function _object_spread_props(target, source) {
|
|
84
79
|
source = source != null ? source : {};
|
|
85
|
-
if (Object.getOwnPropertyDescriptors)
|
|
86
|
-
|
|
87
|
-
} else {
|
|
80
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
81
|
+
else {
|
|
88
82
|
ownKeys(Object(source)).forEach(function(key) {
|
|
89
83
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
90
84
|
});
|
|
@@ -17,11 +17,8 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
17
17
|
reject(error);
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
-
if (info.done)
|
|
21
|
-
|
|
22
|
-
} else {
|
|
23
|
-
Promise.resolve(value).then(_next, _throw);
|
|
24
|
-
}
|
|
20
|
+
if (info.done) resolve(value);
|
|
21
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
25
22
|
}
|
|
26
23
|
function _async_to_generator(fn) {
|
|
27
24
|
return function() {
|
|
@@ -39,9 +36,7 @@ function _async_to_generator(fn) {
|
|
|
39
36
|
};
|
|
40
37
|
}
|
|
41
38
|
function _class_call_check(instance, Constructor) {
|
|
42
|
-
if (!(instance instanceof Constructor))
|
|
43
|
-
throw new TypeError("Cannot call a class as a function");
|
|
44
|
-
}
|
|
39
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
45
40
|
}
|
|
46
41
|
function _defineProperties(target, props) {
|
|
47
42
|
for(var i = 0; i < props.length; i++){
|
|
@@ -65,9 +60,7 @@ function _define_property(obj, key, value) {
|
|
|
65
60
|
configurable: true,
|
|
66
61
|
writable: true
|
|
67
62
|
});
|
|
68
|
-
} else
|
|
69
|
-
obj[key] = value;
|
|
70
|
-
}
|
|
63
|
+
} else obj[key] = value;
|
|
71
64
|
return obj;
|
|
72
65
|
}
|
|
73
66
|
function _ts_generator(thisArg, body) {
|
|
@@ -10,9 +10,7 @@ Object.defineProperty(exports, "RandomMockAdapter", {
|
|
|
10
10
|
});
|
|
11
11
|
var _basemockadapter = require("./base-mock-adapter");
|
|
12
12
|
function _assert_this_initialized(self) {
|
|
13
|
-
if (self === void 0)
|
|
14
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
15
|
-
}
|
|
13
|
+
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
16
14
|
return self;
|
|
17
15
|
}
|
|
18
16
|
function _call_super(_this, derived, args) {
|
|
@@ -20,9 +18,7 @@ function _call_super(_this, derived, args) {
|
|
|
20
18
|
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
21
19
|
}
|
|
22
20
|
function _class_call_check(instance, Constructor) {
|
|
23
|
-
if (!(instance instanceof Constructor))
|
|
24
|
-
throw new TypeError("Cannot call a class as a function");
|
|
25
|
-
}
|
|
21
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
26
22
|
}
|
|
27
23
|
function _defineProperties(target, props) {
|
|
28
24
|
for(var i = 0; i < props.length; i++){
|
|
@@ -46,9 +42,7 @@ function _define_property(obj, key, value) {
|
|
|
46
42
|
configurable: true,
|
|
47
43
|
writable: true
|
|
48
44
|
});
|
|
49
|
-
} else
|
|
50
|
-
obj[key] = value;
|
|
51
|
-
}
|
|
45
|
+
} else obj[key] = value;
|
|
52
46
|
return obj;
|
|
53
47
|
}
|
|
54
48
|
function _get_prototype_of(o) {
|
|
@@ -70,10 +64,16 @@ function _inherits(subClass, superClass) {
|
|
|
70
64
|
});
|
|
71
65
|
if (superClass) _set_prototype_of(subClass, superClass);
|
|
72
66
|
}
|
|
67
|
+
function _is_native_reflect_construct() {
|
|
68
|
+
try {
|
|
69
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
70
|
+
} catch (_) {}
|
|
71
|
+
return (_is_native_reflect_construct = function() {
|
|
72
|
+
return !!result;
|
|
73
|
+
})();
|
|
74
|
+
}
|
|
73
75
|
function _possible_constructor_return(self, call) {
|
|
74
|
-
if (call && (_type_of(call) === "object" || typeof call === "function"))
|
|
75
|
-
return call;
|
|
76
|
-
}
|
|
76
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) return call;
|
|
77
77
|
return _assert_this_initialized(self);
|
|
78
78
|
}
|
|
79
79
|
function _set_prototype_of(o, p) {
|
|
@@ -87,14 +87,6 @@ function _type_of(obj) {
|
|
|
87
87
|
"@swc/helpers - typeof";
|
|
88
88
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
89
89
|
}
|
|
90
|
-
function _is_native_reflect_construct() {
|
|
91
|
-
try {
|
|
92
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
93
|
-
} catch (_) {}
|
|
94
|
-
return (_is_native_reflect_construct = function() {
|
|
95
|
-
return !!result;
|
|
96
|
-
})();
|
|
97
|
-
}
|
|
98
90
|
var RandomMockAdapter = /*#__PURE__*/ function(BaseMockAdapter) {
|
|
99
91
|
"use strict";
|
|
100
92
|
_inherits(RandomMockAdapter, BaseMockAdapter);
|
|
@@ -10,9 +10,7 @@ Object.defineProperty(exports, "SequentialMockAdapter", {
|
|
|
10
10
|
});
|
|
11
11
|
var _basemockadapter = require("./base-mock-adapter");
|
|
12
12
|
function _assert_this_initialized(self) {
|
|
13
|
-
if (self === void 0)
|
|
14
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
15
|
-
}
|
|
13
|
+
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
16
14
|
return self;
|
|
17
15
|
}
|
|
18
16
|
function _call_super(_this, derived, args) {
|
|
@@ -20,9 +18,7 @@ function _call_super(_this, derived, args) {
|
|
|
20
18
|
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
21
19
|
}
|
|
22
20
|
function _class_call_check(instance, Constructor) {
|
|
23
|
-
if (!(instance instanceof Constructor))
|
|
24
|
-
throw new TypeError("Cannot call a class as a function");
|
|
25
|
-
}
|
|
21
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
26
22
|
}
|
|
27
23
|
function _defineProperties(target, props) {
|
|
28
24
|
for(var i = 0; i < props.length; i++){
|
|
@@ -46,9 +42,7 @@ function _define_property(obj, key, value) {
|
|
|
46
42
|
configurable: true,
|
|
47
43
|
writable: true
|
|
48
44
|
});
|
|
49
|
-
} else
|
|
50
|
-
obj[key] = value;
|
|
51
|
-
}
|
|
45
|
+
} else obj[key] = value;
|
|
52
46
|
return obj;
|
|
53
47
|
}
|
|
54
48
|
function _get_prototype_of(o) {
|
|
@@ -70,10 +64,16 @@ function _inherits(subClass, superClass) {
|
|
|
70
64
|
});
|
|
71
65
|
if (superClass) _set_prototype_of(subClass, superClass);
|
|
72
66
|
}
|
|
67
|
+
function _is_native_reflect_construct() {
|
|
68
|
+
try {
|
|
69
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
70
|
+
} catch (_) {}
|
|
71
|
+
return (_is_native_reflect_construct = function() {
|
|
72
|
+
return !!result;
|
|
73
|
+
})();
|
|
74
|
+
}
|
|
73
75
|
function _possible_constructor_return(self, call) {
|
|
74
|
-
if (call && (_type_of(call) === "object" || typeof call === "function"))
|
|
75
|
-
return call;
|
|
76
|
-
}
|
|
76
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) return call;
|
|
77
77
|
return _assert_this_initialized(self);
|
|
78
78
|
}
|
|
79
79
|
function _set_prototype_of(o, p) {
|
|
@@ -87,14 +87,6 @@ function _type_of(obj) {
|
|
|
87
87
|
"@swc/helpers - typeof";
|
|
88
88
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
89
89
|
}
|
|
90
|
-
function _is_native_reflect_construct() {
|
|
91
|
-
try {
|
|
92
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
93
|
-
} catch (_) {}
|
|
94
|
-
return (_is_native_reflect_construct = function() {
|
|
95
|
-
return !!result;
|
|
96
|
-
})();
|
|
97
|
-
}
|
|
98
90
|
var SequentialMockAdapter = /*#__PURE__*/ function(BaseMockAdapter) {
|
|
99
91
|
"use strict";
|
|
100
92
|
_inherits(SequentialMockAdapter, BaseMockAdapter);
|
|
@@ -50,7 +50,7 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
50
50
|
return _arr;
|
|
51
51
|
}
|
|
52
52
|
function _non_iterable_rest() {
|
|
53
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance
|
|
53
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
54
54
|
}
|
|
55
55
|
function _sliced_to_array(arr, i) {
|
|
56
56
|
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
@@ -50,9 +50,7 @@ function _instanceof(left, right) {
|
|
|
50
50
|
"@swc/helpers - instanceof";
|
|
51
51
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
52
52
|
return !!right[Symbol.hasInstance](left);
|
|
53
|
-
} else
|
|
54
|
-
return left instanceof right;
|
|
55
|
-
}
|
|
53
|
+
} else return left instanceof right;
|
|
56
54
|
}
|
|
57
55
|
function _iterable_to_array_limit(arr, i) {
|
|
58
56
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
@@ -79,7 +77,7 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
79
77
|
return _arr;
|
|
80
78
|
}
|
|
81
79
|
function _non_iterable_rest() {
|
|
82
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance
|
|
80
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
83
81
|
}
|
|
84
82
|
function _sliced_to_array(arr, i) {
|
|
85
83
|
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
package/cjs/fwk/server.js
CHANGED
|
@@ -41,7 +41,7 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
41
41
|
return _arr;
|
|
42
42
|
}
|
|
43
43
|
function _non_iterable_rest() {
|
|
44
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance
|
|
44
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
45
45
|
}
|
|
46
46
|
function _sliced_to_array(arr, i) {
|
|
47
47
|
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|