8000 flush() has been updated (#17) · apisearch-io/javascript-client@d01429f · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jun 25, 2025. It is now read-only.

Commit d01429f

Browse files
authored
flush() has been updated (#17)
* all calls are done in parallel, in order to improve the performance
1 parent 6ad9f0d commit d01429f

33 files changed

+724
-905
lines changed

dist/apisearch.js

Lines changed: 372 additions & 406 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/apisearch.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/apisearch.min.js

Lines changed: 17 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/apisearch.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/Apisearch.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
"use strict";
2-
var __assign = (this && this.__assign) || Object.assign || function(t) {
3-
for (var s, i = 1, n = arguments.length; i < n; i++) {
4-
s = arguments[i];
5-
for (var p in s) if (Object.prototyp 10000 e.hasOwnProperty.call(s, p))
6-
t[p] = s[p];
7-
}
8-
return t;
9-
};
102
exports.__esModule = true;
3+
var tslib_1 = require("tslib");
114
var NoCache_1 = require("./Cache/NoCache");
125
var AxiosClient_1 = require("./Http/AxiosClient");
136
var RetryMap_1 = require("./Http/RetryMap");
@@ -34,7 +27,7 @@ var Apisearch = /** @class */ (function () {
3427
*/
3528
Apisearch.createRepository = function (config) {
3629
Apisearch.ensureRepositoryConfigIsValid(config);
37-
config.options = __assign({ api_version: "v1", cache: new NoCache_1.NoCache(), timeout: 5000, override_queries: true }, config.options);
30+
config.options = tslib_1.__assign({ api_version: "v1", cache: new NoCache_1.NoCache(), timeout: 5000, override_queries: true }, config.options);
3831
/**
3932
* Client
4033
*/

lib/Cache/InMemoryCache.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
"use strict";
2-
var __assign = (this && this.__assign) || Object.assign || function(t) {
3-
for (var s, i = 1, n = arguments.length; i < n; i++) {
4-
s = arguments[i];
5-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6-
t[p] = s[p];
7-
}
8-
return t;
9-
};
102
exports.__esModule = true;
3+
var tslib_1 = require("tslib");
114
/**
125
* Cache class
136
*/
@@ -31,7 +24,7 @@ var InMemoryCache = /** @class */ (function () {
3124
*/
3225
InMemoryCache.prototype.set = function (key, value) {
3326
var _a;
34-
this.cache = __assign({}, this.cache, (_a = {}, _a[key] = value, _a));
27+
this.cache = tslib_1.__assign({}, this.cache, (_a = {}, _a[key] = value, _a));
3528
this.size = this.size + 1;
3629
};
3730
/**

lib/Error/ConnectionError.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
"use strict";
2-
var __extends = (this && this.__extends) || (function () {
3-
var extendStatics = Object.setPrototypeOf ||
4-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6-
return function (d, b) {
7-
extendStatics(d, b);
8-
function __() { this.constructor = d; }
9-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10-
};
11-
})();
122
exports.__esModule = true;
3+
var tslib_1 = require("tslib");
134
var ErrorWithMessage_1 = require("./ErrorWithMessage");
145
/**
156
* Connection error
167
*/
178
var ConnectionError = /** @class */ (function (_super) {
18-
__extends(ConnectionError, _super);
9+
tslib_1.__extends(ConnectionError, _super);
1910
function ConnectionError() {
2011
return _super !== null && _super.apply(this, arguments) || this;
2112
}

lib/Error/EventError.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
"use strict";
2-
var __extends = (this && this.__extends) || (function () {
3-
var extendStatics = Object.< 97AE /span>setPrototypeOf ||
4-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6-
return function (d, b) {
7-
extendStatics(d, b);
8-
function __() { this.constructor = d; }
9-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10-
};
11-
})();
122
exports.__esModule = true;
3+
var tslib_1 = require("tslib");
134
var ErrorWithMessage_1 = require("./ErrorWithMessage");
145
/**
156
* EventError
167
*/
178
var EventError = /** @class */ (function (_super) {
18-
__extends(EventError, _super);
9+
tslib_1.__extends(EventError, _super);
1910
function EventError() {
2011
return _super !== null && _super.apply(this, arguments) || this;
2112
}

lib/Error/ForbiddenError.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
"use strict";
2-
var __extends = (this && this.__extends) || (function () {
3-
var extendStatics = Object.setPrototypeOf ||
4-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6-
return function (d, b) {
7-
extendStatics(d, b);
8-
function __() { this.constructor = d; }
9-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10-
};
11-
})();
122
exports.__esModule = true;
3+
var tslib_1 = require("tslib");
134
var ErrorWithMessage_1 = require("./ErrorWithMessage");
145
/**
156
* Forbidden Error
167
*/
178
var ForbiddenError = /** @class */ (function (_super) {
18-
__extends(ForbiddenError, _super);
9+
tslib_1.__extends(ForbiddenError, _super);
1910
function ForbiddenError() {
2011
return _super !== null && _super.apply(this, arguments) || this;
2112
}

lib/Error/InvalidFormatError.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
"use strict";
2-
var __extends = (this && this.__extends) || (function () {
3-
var extendStatics = Object.setPrototypeOf ||
4-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6-
return function (d, b) {
7-
extendStatics(d, b);
8-
function __() { this.constructor = d; }
9-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10-
};
11-
})();
122
exports.__esModule = true;
3+
var tslib_1 = require("tslib");
134
var ErrorWithMessage_1 = require("./ErrorWithMessage");
145
/**
156
* Class InvalidFormatError
167
*/
178
var InvalidFormatError = /** @class */ (function (_super) {
18-
__extends(InvalidFormatError, _super);
9+
tslib_1.__extends(InvalidFormatError, _super);
1910
function InvalidFormatError() {
2011
return _super !== null && _super.apply(this, arguments) || this;
2112
}

0 commit comments

Comments
 (0)
0