@epilot/message-client 1.1.6 → 1.2.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/dist/client.d.ts +1 -0
- package/dist/client.js +10 -2
- package/package.json +4 -4
package/dist/client.d.ts
CHANGED
package/dist/client.js
CHANGED
|
@@ -14,16 +14,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.getClient = void 0;
|
|
17
|
+
exports.createClient = exports.getClient = void 0;
|
|
18
18
|
var lambda_powertools_correlation_ids_1 = __importDefault(require("@dazn/lambda-powertools-correlation-ids"));
|
|
19
19
|
var openapi_client_axios_1 = __importDefault(require("openapi-client-axios"));
|
|
20
20
|
var definition_1 = __importDefault(require("./definition"));
|
|
21
|
+
var client;
|
|
21
22
|
var getClient = function () {
|
|
23
|
+
if (!client) {
|
|
24
|
+
client = (0, exports.createClient)();
|
|
25
|
+
}
|
|
26
|
+
return client;
|
|
27
|
+
};
|
|
28
|
+
exports.getClient = getClient;
|
|
29
|
+
var createClient = function () {
|
|
22
30
|
var _a;
|
|
23
31
|
var api = new openapi_client_axios_1.default({ definition: definition_1.default, quick: true });
|
|
24
32
|
var apiClient = api.initSync();
|
|
25
33
|
apiClient.defaults.headers.common = __assign(__assign({}, ((_a = apiClient.defaults.headers.common) !== null && _a !== void 0 ? _a : {})), (lambda_powertools_correlation_ids_1.default.get() || {}));
|
|
26
34
|
return apiClient;
|
|
27
35
|
};
|
|
28
|
-
exports.
|
|
36
|
+
exports.createClient = createClient;
|
|
29
37
|
//# sourceMappingURL=client.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/message-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "API Client for epilot Message API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@dazn/lambda-powertools-correlation-ids": "^1.28.1",
|
|
52
52
|
"buffer": "^6.0.3",
|
|
53
53
|
"https-browserify": "^1.0.0",
|
|
54
|
-
"openapi-client-axios": "^
|
|
54
|
+
"openapi-client-axios": "^6.0.0",
|
|
55
55
|
"stream-http": "^3.1.1",
|
|
56
56
|
"url": "^0.11.0",
|
|
57
57
|
"util": "^0.12.3"
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"copy-webpack-plugin": "^7.0.0",
|
|
63
63
|
"jest": "^26.6.3",
|
|
64
64
|
"json-loader": "^0.5.7",
|
|
65
|
-
"openapi-client-axios-typegen": "^
|
|
65
|
+
"openapi-client-axios-typegen": "^6.0.0",
|
|
66
66
|
"openapicmd": "^1.6.2",
|
|
67
67
|
"ts-jest": "^26.5.0",
|
|
68
68
|
"ts-loader": "^8.0.14",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"webpack": "~5.18.0",
|
|
72
72
|
"webpack-cli": "^4.4.0"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "d41cf7334964ffb68c562b531d6cf3c286367f76"
|
|
75
75
|
}
|