@lokalise/node-core 10.0.0-RC1 → 10.0.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/README.md +16 -60
- package/dist/index.d.ts +12 -7
- package/dist/index.js +19 -14
- package/dist/index.js.map +1 -1
- package/dist/src/errors/InternalError.d.ts +1 -0
- package/dist/src/errors/InternalError.js +3 -1
- package/dist/src/errors/InternalError.js.map +1 -1
- package/dist/src/errors/PublicNonRecoverableError.d.ts +1 -0
- package/dist/src/errors/PublicNonRecoverableError.js +3 -1
- package/dist/src/errors/PublicNonRecoverableError.js.map +1 -1
- package/dist/src/errors/errorTypeGuards.d.ts +2 -2
- package/dist/src/errors/errorTypeGuards.js +5 -4
- package/dist/src/errors/errorTypeGuards.js.map +1 -1
- package/dist/src/errors/globalErrorHandler.d.ts +8 -7
- package/dist/src/errors/globalErrorHandler.js +15 -16
- package/dist/src/errors/globalErrorHandler.js.map +1 -1
- package/dist/src/errors/publicErrors.d.ts +5 -4
- package/dist/src/errors/publicErrors.js +15 -1
- package/dist/src/errors/publicErrors.js.map +1 -1
- package/dist/src/logging/commonLogger.d.ts +17 -0
- package/dist/src/logging/commonLogger.js +3 -0
- package/dist/src/logging/commonLogger.js.map +1 -0
- package/dist/src/observability/observabilityTypes.d.ts +22 -0
- package/dist/src/observability/observabilityTypes.js +3 -0
- package/dist/src/observability/observabilityTypes.js.map +1 -0
- package/dist/src/utils/checksumUtils.d.ts +7 -0
- package/dist/src/utils/checksumUtils.js +38 -0
- package/dist/src/utils/checksumUtils.js.map +1 -0
- package/dist/src/utils/encryptionUtility.d.ts +21 -0
- package/dist/src/utils/encryptionUtility.js +58 -0
- package/dist/src/utils/encryptionUtility.js.map +1 -0
- package/dist/src/utils/hashUtils.d.ts +9 -0
- package/dist/src/utils/hashUtils.js +19 -0
- package/dist/src/utils/hashUtils.js.map +1 -0
- package/dist/src/utils/objectUtils.d.ts +17 -0
- package/dist/src/utils/objectUtils.js +58 -1
- package/dist/src/utils/objectUtils.js.map +1 -1
- package/dist/src/utils/streamUtils.d.ts +38 -0
- package/dist/src/utils/streamUtils.js +85 -0
- package/dist/src/utils/streamUtils.js.map +1 -0
- package/package.json +20 -26
- package/dist/index.cjs +0 -898
- package/dist/index.d.cts +0 -304
- package/dist/index.d.mts +0 -304
- package/dist/index.mjs +0 -848
- package/dist/src/config/ConfigScope.spec.d.ts +0 -1
- package/dist/src/config/ConfigScope.spec.js +0 -587
- package/dist/src/config/ConfigScope.spec.js.map +0 -1
- package/dist/src/config/configTransformers.spec.d.ts +0 -1
- package/dist/src/config/configTransformers.spec.js +0 -28
- package/dist/src/config/configTransformers.spec.js.map +0 -1
- package/dist/src/errors/PublicNonRecoverableError.spec.d.ts +0 -1
- package/dist/src/errors/PublicNonRecoverableError.spec.js +0 -13
- package/dist/src/errors/PublicNonRecoverableError.spec.js.map +0 -1
- package/dist/src/errors/ResponseStatusError.d.ts +0 -7
- package/dist/src/errors/ResponseStatusError.js +0 -27
- package/dist/src/errors/ResponseStatusError.js.map +0 -1
- package/dist/src/errors/errorTypeGuards.spec.d.ts +0 -1
- package/dist/src/errors/errorTypeGuards.spec.js +0 -23
- package/dist/src/errors/errorTypeGuards.spec.js.map +0 -1
- package/dist/src/errors/globalErrorHandler.spec.d.ts +0 -1
- package/dist/src/errors/globalErrorHandler.spec.js +0 -30
- package/dist/src/errors/globalErrorHandler.spec.js.map +0 -1
- package/dist/src/http/httpClient.d.ts +0 -50
- package/dist/src/http/httpClient.js +0 -180
- package/dist/src/http/httpClient.js.map +0 -1
- package/dist/src/http/httpClient.spec.d.ts +0 -1
- package/dist/src/http/httpClient.spec.js +0 -777
- package/dist/src/http/httpClient.spec.js.map +0 -1
- package/dist/src/http/mock-data/mockProduct1.json +0 -12
- package/dist/src/http/mock-data/mockProductsLimit3.json +0 -38
- package/dist/src/logging/loggerConfigResolver.spec.d.ts +0 -1
- package/dist/src/logging/loggerConfigResolver.spec.js +0 -34
- package/dist/src/logging/loggerConfigResolver.spec.js.map +0 -1
- package/dist/src/utils/arrayUtils.spec.d.ts +0 -1
- package/dist/src/utils/arrayUtils.spec.js +0 -60
- package/dist/src/utils/arrayUtils.spec.js.map +0 -1
- package/dist/src/utils/objectUtils.spec.d.ts +0 -1
- package/dist/src/utils/objectUtils.spec.js +0 -612
- package/dist/src/utils/objectUtils.spec.js.map +0 -1
- package/dist/src/utils/typeUtils.spec.d.ts +0 -1
- package/dist/src/utils/typeUtils.spec.js +0 -115
- package/dist/src/utils/typeUtils.spec.js.map +0 -1
- package/dist/src/utils/waitUtils.spec.d.ts +0 -1
- package/dist/src/utils/waitUtils.spec.js +0 -50
- package/dist/src/utils/waitUtils.spec.js.map +0 -1
- package/dist/vitest.config.d.ts +0 -2
- package/dist/vitest.config.js +0 -34
- package/dist/vitest.config.js.map +0 -1
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const configTransformers_1 = require("./configTransformers");
|
|
4
|
-
describe('configTransformers', () => {
|
|
5
|
-
describe('ensureClosingSlashTransformer', () => {
|
|
6
|
-
it('adds missing slash', () => {
|
|
7
|
-
const resolveValue = (0, configTransformers_1.ensureClosingSlashTransformer)('main');
|
|
8
|
-
expect(resolveValue).toBe('main/');
|
|
9
|
-
});
|
|
10
|
-
it('returns empty string for null', () => {
|
|
11
|
-
const resolveValue = (0, configTransformers_1.ensureClosingSlashTransformer)(null);
|
|
12
|
-
expect(resolveValue).toBe('');
|
|
13
|
-
});
|
|
14
|
-
it('returns empty string for undefined', () => {
|
|
15
|
-
const resolveValue = (0, configTransformers_1.ensureClosingSlashTransformer)(undefined);
|
|
16
|
-
expect(resolveValue).toBe('');
|
|
17
|
-
});
|
|
18
|
-
it('returns empty string for empty string', () => {
|
|
19
|
-
const resolveValue = (0, configTransformers_1.ensureClosingSlashTransformer)('');
|
|
20
|
-
expect(resolveValue).toBe('');
|
|
21
|
-
});
|
|
22
|
-
it('keeps existing slash', () => {
|
|
23
|
-
const resolveValue = (0, configTransformers_1.ensureClosingSlashTransformer)('pre-1/');
|
|
24
|
-
expect(resolveValue).toBe('pre-1/');
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
//# sourceMappingURL=configTransformers.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"configTransformers.spec.js","sourceRoot":"","sources":["../../../src/config/configTransformers.spec.ts"],"names":[],"mappings":";;AAAA,6DAAoE;AAEpE,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,QAAQ,CAAC,+BAA+B,EAAE,GAAG,EAAE;QAC7C,EAAE,CAAC,oBAAoB,EAAE,GAAG,EAAE;YAC5B,MAAM,YAAY,GAAG,IAAA,kDAA6B,EAAC,MAAM,CAAC,CAAA;YAE1D,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;YACvC,MAAM,YAAY,GAAG,IAAA,kDAA6B,EAAC,IAAI,CAAC,CAAA;YAExD,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAC/B,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;YAC5C,MAAM,YAAY,GAAG,IAAA,kDAA6B,EAAC,SAAS,CAAC,CAAA;YAE7D,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAC/B,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;YAC/C,MAAM,YAAY,GAAG,IAAA,kDAA6B,EAAC,EAAE,CAAC,CAAA;YAEtD,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAC/B,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,sBAAsB,EAAE,GAAG,EAAE;YAC9B,MAAM,YAAY,GAAG,IAAA,kDAA6B,EAAC,QAAQ,CAAC,CAAA;YAE5D,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QACrC,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const PublicNonRecoverableError_1 = require("./PublicNonRecoverableError");
|
|
4
|
-
describe('PublicNonRecoverableError', () => {
|
|
5
|
-
it('sets http status code to 500 by default', () => {
|
|
6
|
-
const error = new PublicNonRecoverableError_1.PublicNonRecoverableError({
|
|
7
|
-
message: 'error',
|
|
8
|
-
errorCode: 'PUBLIC_ERROR',
|
|
9
|
-
});
|
|
10
|
-
expect(error.httpStatusCode).toBe(500);
|
|
11
|
-
});
|
|
12
|
-
});
|
|
13
|
-
//# sourceMappingURL=PublicNonRecoverableError.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PublicNonRecoverableError.spec.js","sourceRoot":"","sources":["../../../src/errors/PublicNonRecoverableError.spec.ts"],"names":[],"mappings":";;AAAA,2EAAuE;AAEvE,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACzC,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QACjD,MAAM,KAAK,GAAG,IAAI,qDAAyB,CAAC;YAC1C,OAAO,EAAE,OAAO;YAChB,SAAS,EAAE,cAAc;SAC1B,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACxC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { RequestResult } from 'undici-retry';
|
|
2
|
-
import { InternalError } from './InternalError';
|
|
3
|
-
export declare class ResponseStatusError extends InternalError {
|
|
4
|
-
readonly response: RequestResult<any>;
|
|
5
|
-
readonly isResponseStatusError = true;
|
|
6
|
-
constructor(requestResult: RequestResult<any>, requestLabel?: string);
|
|
7
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ResponseStatusError = void 0;
|
|
4
|
-
const InternalError_1 = require("./InternalError");
|
|
5
|
-
class ResponseStatusError extends InternalError_1.InternalError {
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
|
-
response;
|
|
8
|
-
isResponseStatusError = true;
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
-
constructor(requestResult, requestLabel = 'N/A') {
|
|
11
|
-
super({
|
|
12
|
-
message: `Response status code ${requestResult.statusCode}`,
|
|
13
|
-
details: {
|
|
14
|
-
requestLabel,
|
|
15
|
-
response: {
|
|
16
|
-
statusCode: requestResult.statusCode,
|
|
17
|
-
body: requestResult.body,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
errorCode: 'REQUEST_ERROR',
|
|
21
|
-
});
|
|
22
|
-
this.response = requestResult;
|
|
23
|
-
this.name = 'ResponseStatusError';
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.ResponseStatusError = ResponseStatusError;
|
|
27
|
-
//# sourceMappingURL=ResponseStatusError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseStatusError.js","sourceRoot":"","sources":["../../../src/errors/ResponseStatusError.ts"],"names":[],"mappings":";;;AAEA,mDAA+C;AAE/C,MAAa,mBAAoB,SAAQ,6BAAa;IACpD,8DAA8D;IAC9C,QAAQ,CAAoB;IAC5B,qBAAqB,GAAG,IAAI,CAAA;IAE5C,8DAA8D;IAC9D,YAAY,aAAiC,EAAE,YAAY,GAAG,KAAK;QACjE,KAAK,CAAC;YACJ,OAAO,EAAE,wBAAwB,aAAa,CAAC,UAAU,EAAE;YAC3D,OAAO,EAAE;gBACP,YAAY;gBACZ,QAAQ,EAAE;oBACR,UAAU,EAAE,aAAa,CAAC,UAAU;oBACpC,IAAI,EAAE,aAAa,CAAC,IAAI;iBACzB;aACF;YACD,SAAS,EAAE,eAAe;SAC3B,CAAC,CAAA;QACF,IAAI,CAAC,QAAQ,GAAG,aAAa,CAAA;QAC7B,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAA;IACnC,CAAC;CACF;AArBD,kDAqBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const vitest_1 = require("vitest");
|
|
4
|
-
const InternalError_1 = require("./InternalError");
|
|
5
|
-
const ResponseStatusError_1 = require("./ResponseStatusError");
|
|
6
|
-
const errorTypeGuards_1 = require("./errorTypeGuards");
|
|
7
|
-
(0, vitest_1.describe)('errorTypeGuards', () => {
|
|
8
|
-
(0, vitest_1.describe)('isResponseStatusError', () => {
|
|
9
|
-
it('Returns true for ResponseStatusError', () => {
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-explicit-any
|
|
11
|
-
const error = new ResponseStatusError_1.ResponseStatusError({}, 'label');
|
|
12
|
-
expect((0, errorTypeGuards_1.isResponseStatusError)(error)).toBe(true);
|
|
13
|
-
});
|
|
14
|
-
it('Returns false for not a ResponseStatusError', () => {
|
|
15
|
-
const error = new InternalError_1.InternalError({
|
|
16
|
-
message: 'message',
|
|
17
|
-
errorCode: 'CODE',
|
|
18
|
-
});
|
|
19
|
-
expect((0, errorTypeGuards_1.isResponseStatusError)(error)).toBe(false);
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
//# sourceMappingURL=errorTypeGuards.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errorTypeGuards.spec.js","sourceRoot":"","sources":["../../../src/errors/errorTypeGuards.spec.ts"],"names":[],"mappings":";;AAAA,mCAAiC;AAEjC,mDAA+C;AAC/C,+DAA2D;AAC3D,uDAAyD;AAEzD,IAAA,iBAAQ,EAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,IAAA,iBAAQ,EAAC,uBAAuB,EAAE,GAAG,EAAE;QACrC,EAAE,CAAC,sCAAsC,EAAE,GAAG,EAAE;YAC9C,oGAAoG;YACpG,MAAM,KAAK,GAAG,IAAI,yCAAmB,CAAC,EAAS,EAAE,OAAO,CAAC,CAAA;YAEzD,MAAM,CAAC,IAAA,uCAAqB,EAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACjD,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,6CAA6C,EAAE,GAAG,EAAE;YACrD,MAAM,KAAK,GAAG,IAAI,6BAAa,CAAC;gBAC9B,OAAO,EAAE,SAAS;gBAClB,SAAS,EAAE,MAAM;aAClB,CAAC,CAAA;YAEF,MAAM,CAAC,IAAA,uCAAqB,EAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAClD,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const globalErrorHandler_1 = require("./globalErrorHandler");
|
|
4
|
-
describe('globalErrorHandler', () => {
|
|
5
|
-
describe('resolveGlobalErrorLogObject', () => {
|
|
6
|
-
it('converts plain error to serializable object', () => {
|
|
7
|
-
const error = new Error('text');
|
|
8
|
-
const resolvedError = (0, globalErrorHandler_1.resolveGlobalErrorLogObject)(error);
|
|
9
|
-
expect(resolvedError).toMatchObject({
|
|
10
|
-
correlationID: undefined,
|
|
11
|
-
message: 'text',
|
|
12
|
-
type: 'Error',
|
|
13
|
-
stack: expect.any(String),
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
it('converts something with message to serializable object', () => {
|
|
17
|
-
const error = {
|
|
18
|
-
message: 'text',
|
|
19
|
-
};
|
|
20
|
-
const resolvedError = (0, globalErrorHandler_1.resolveGlobalErrorLogObject)(error);
|
|
21
|
-
expect(resolvedError).toBe('text');
|
|
22
|
-
});
|
|
23
|
-
it('converts something unexpected to fixed string', () => {
|
|
24
|
-
const error = () => { };
|
|
25
|
-
const resolvedError = (0, globalErrorHandler_1.resolveGlobalErrorLogObject)(error);
|
|
26
|
-
expect(resolvedError).toBe('Unknown error');
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
//# sourceMappingURL=globalErrorHandler.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"globalErrorHandler.spec.js","sourceRoot":"","sources":["../../../src/errors/globalErrorHandler.spec.ts"],"names":[],"mappings":";;AAAA,6DAAkE;AAElE,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;QAC3C,EAAE,CAAC,6CAA6C,EAAE,GAAG,EAAE;YACrD,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAA;YAE/B,MAAM,aAAa,GAAG,IAAA,gDAA2B,EAAC,KAAK,CAAC,CAAA;YAExD,MAAM,CAAC,aAAa,CAAC,CAAC,aAAa,CAAC;gBAClC,aAAa,EAAE,SAAS;gBACxB,OAAO,EAAE,MAAM;gBACf,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;aAC1B,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;YAChE,MAAM,KAAK,GAAG;gBACZ,OAAO,EAAE,MAAM;aAChB,CAAA;YAED,MAAM,aAAa,GAAG,IAAA,gDAA2B,EAAC,KAAK,CAAC,CAAA;YAExD,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;YACvD,MAAM,KAAK,GAAG,GAAG,EAAE,GAAE,CAAC,CAAA;YAEtB,MAAM,aAAa,GAAG,IAAA,gDAA2B,EAAC,KAAK,CAAC,CAAA;YAExD,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;QAC7C,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import type { Readable } from 'stream';
|
|
4
|
-
import { Client } from 'undici';
|
|
5
|
-
import type { FormData } from 'undici';
|
|
6
|
-
import type { RequestResult, RetryConfig } from 'undici-retry';
|
|
7
|
-
import type { DefiniteEither } from '../errors/either';
|
|
8
|
-
type RecordObject = Record<string, any>;
|
|
9
|
-
export type HttpRequestContext = {
|
|
10
|
-
reqId: string;
|
|
11
|
-
};
|
|
12
|
-
export type ResponseSchema<Output = any> = {
|
|
13
|
-
parse(data: unknown): Output;
|
|
14
|
-
};
|
|
15
|
-
export type RequestOptions<T> = {
|
|
16
|
-
headers?: RecordObject;
|
|
17
|
-
query?: RecordObject;
|
|
18
|
-
timeout: number | undefined;
|
|
19
|
-
throwOnError?: boolean;
|
|
20
|
-
reqContext?: HttpRequestContext;
|
|
21
|
-
safeParseJson?: boolean;
|
|
22
|
-
blobResponseBody?: boolean;
|
|
23
|
-
requestLabel: string;
|
|
24
|
-
disableKeepAlive?: boolean;
|
|
25
|
-
retryConfig?: RetryConfig;
|
|
26
|
-
clientOptions?: Client.Options;
|
|
27
|
-
responseSchema?: ResponseSchema<T>;
|
|
28
|
-
validateResponse: boolean;
|
|
29
|
-
};
|
|
30
|
-
export type Response<T> = {
|
|
31
|
-
body: T;
|
|
32
|
-
headers: RecordObject;
|
|
33
|
-
statusCode: number;
|
|
34
|
-
};
|
|
35
|
-
export declare function sendGet<T>(client: Client, path: string, options?: Partial<RequestOptions<T>>): Promise<DefiniteEither<RequestResult<unknown>, RequestResult<T>>>;
|
|
36
|
-
export declare function sendDelete<T>(client: Client, path: string, options?: Partial<RequestOptions<T>>): Promise<DefiniteEither<RequestResult<unknown>, RequestResult<T>>>;
|
|
37
|
-
export declare function sendPost<T>(client: Client, path: string, body: RecordObject | undefined, options?: Partial<RequestOptions<T>>): Promise<DefiniteEither<RequestResult<unknown>, RequestResult<T>>>;
|
|
38
|
-
export declare function sendPostBinary<T>(client: Client, path: string, body: Buffer | Uint8Array | Readable | FormData | null, options?: Partial<RequestOptions<T>>): Promise<DefiniteEither<RequestResult<unknown>, RequestResult<T>>>;
|
|
39
|
-
export declare function sendPut<T>(client: Client, path: string, body: RecordObject | undefined, options?: Partial<RequestOptions<T>>): Promise<DefiniteEither<RequestResult<unknown>, RequestResult<T>>>;
|
|
40
|
-
export declare function sendPutBinary<T>(client: Client, path: string, body: Buffer | Uint8Array | Readable | FormData | null, options?: Partial<RequestOptions<T>>): Promise<DefiniteEither<RequestResult<unknown>, RequestResult<T>>>;
|
|
41
|
-
export declare function sendPatch<T>(client: Client, path: string, body: RecordObject | undefined, options?: Partial<RequestOptions<T>>): Promise<DefiniteEither<RequestResult<unknown>, RequestResult<T>>>;
|
|
42
|
-
export declare function buildClient(baseUrl: string, clientOptions?: Client.Options): Client;
|
|
43
|
-
export declare const httpClient: {
|
|
44
|
-
get: typeof sendGet;
|
|
45
|
-
post: typeof sendPost;
|
|
46
|
-
put: typeof sendPut;
|
|
47
|
-
patch: typeof sendPatch;
|
|
48
|
-
del: typeof sendDelete;
|
|
49
|
-
};
|
|
50
|
-
export {};
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.httpClient = exports.buildClient = exports.sendPatch = exports.sendPutBinary = exports.sendPut = exports.sendPostBinary = exports.sendPost = exports.sendDelete = exports.sendGet = void 0;
|
|
4
|
-
const undici_1 = require("undici");
|
|
5
|
-
const undici_retry_1 = require("undici-retry");
|
|
6
|
-
const ResponseStatusError_1 = require("../errors/ResponseStatusError");
|
|
7
|
-
const objectUtils_1 = require("../utils/objectUtils");
|
|
8
|
-
const DEFAULT_OPTIONS = {
|
|
9
|
-
validateResponse: true,
|
|
10
|
-
throwOnError: true,
|
|
11
|
-
timeout: 30000,
|
|
12
|
-
};
|
|
13
|
-
const defaultClientOptions = {
|
|
14
|
-
keepAliveMaxTimeout: 300000,
|
|
15
|
-
keepAliveTimeout: 4000,
|
|
16
|
-
};
|
|
17
|
-
async function sendGet(client, path, options = {}) {
|
|
18
|
-
const result = await (0, undici_retry_1.sendWithRetry)(client, {
|
|
19
|
-
...DEFAULT_OPTIONS,
|
|
20
|
-
path: path,
|
|
21
|
-
method: 'GET',
|
|
22
|
-
query: options.query,
|
|
23
|
-
headers: (0, objectUtils_1.copyWithoutUndefined)({
|
|
24
|
-
'x-request-id': options.reqContext?.reqId,
|
|
25
|
-
...options.headers,
|
|
26
|
-
}),
|
|
27
|
-
reset: options.disableKeepAlive ?? false,
|
|
28
|
-
bodyTimeout: options.timeout,
|
|
29
|
-
throwOnError: false,
|
|
30
|
-
}, resolveRetryConfig(options), resolveRequestConfig(options));
|
|
31
|
-
return resolveResult(result, options.throwOnError ?? DEFAULT_OPTIONS.throwOnError, options.validateResponse ?? DEFAULT_OPTIONS.validateResponse, options.responseSchema, options.requestLabel);
|
|
32
|
-
}
|
|
33
|
-
exports.sendGet = sendGet;
|
|
34
|
-
async function sendDelete(client, path, options = {}) {
|
|
35
|
-
const result = await (0, undici_retry_1.sendWithRetry)(client, {
|
|
36
|
-
...DEFAULT_OPTIONS,
|
|
37
|
-
path,
|
|
38
|
-
method: 'DELETE',
|
|
39
|
-
query: options.query,
|
|
40
|
-
headers: (0, objectUtils_1.copyWithoutUndefined)({
|
|
41
|
-
'x-request-id': options.reqContext?.reqId,
|
|
42
|
-
...options.headers,
|
|
43
|
-
}),
|
|
44
|
-
reset: options.disableKeepAlive ?? false,
|
|
45
|
-
bodyTimeout: options.timeout,
|
|
46
|
-
throwOnError: false,
|
|
47
|
-
}, resolveRetryConfig(options), resolveRequestConfig(options));
|
|
48
|
-
return resolveResult(result, options.throwOnError ?? DEFAULT_OPTIONS.throwOnError, options.validateResponse ?? DEFAULT_OPTIONS.validateResponse, options.responseSchema);
|
|
49
|
-
}
|
|
50
|
-
exports.sendDelete = sendDelete;
|
|
51
|
-
async function sendPost(client, path, body, options = {}) {
|
|
52
|
-
const result = await (0, undici_retry_1.sendWithRetry)(client, {
|
|
53
|
-
...DEFAULT_OPTIONS,
|
|
54
|
-
path: path,
|
|
55
|
-
method: 'POST',
|
|
56
|
-
body: body ? JSON.stringify(body) : undefined,
|
|
57
|
-
query: options.query,
|
|
58
|
-
headers: (0, objectUtils_1.copyWithoutUndefined)({
|
|
59
|
-
'x-request-id': options.reqContext?.reqId,
|
|
60
|
-
...options.headers,
|
|
61
|
-
}),
|
|
62
|
-
reset: options.disableKeepAlive ?? false,
|
|
63
|
-
bodyTimeout: options.timeout,
|
|
64
|
-
throwOnError: false,
|
|
65
|
-
}, resolveRetryConfig(options), resolveRequestConfig(options));
|
|
66
|
-
return resolveResult(result, options.throwOnError ?? DEFAULT_OPTIONS.throwOnError, options.validateResponse ?? DEFAULT_OPTIONS.validateResponse, options.responseSchema);
|
|
67
|
-
}
|
|
68
|
-
exports.sendPost = sendPost;
|
|
69
|
-
async function sendPostBinary(client, path, body, options = {}) {
|
|
70
|
-
const result = await (0, undici_retry_1.sendWithRetry)(client, {
|
|
71
|
-
...DEFAULT_OPTIONS,
|
|
72
|
-
path: path,
|
|
73
|
-
method: 'POST',
|
|
74
|
-
body,
|
|
75
|
-
query: options.query,
|
|
76
|
-
headers: (0, objectUtils_1.copyWithoutUndefined)({
|
|
77
|
-
'x-request-id': options.reqContext?.reqId,
|
|
78
|
-
...options.headers,
|
|
79
|
-
}),
|
|
80
|
-
reset: options.disableKeepAlive ?? false,
|
|
81
|
-
bodyTimeout: options.timeout,
|
|
82
|
-
throwOnError: false,
|
|
83
|
-
}, resolveRetryConfig(options), resolveRequestConfig(options));
|
|
84
|
-
return resolveResult(result, options.throwOnError ?? DEFAULT_OPTIONS.throwOnError, options.validateResponse ?? DEFAULT_OPTIONS.validateResponse, options.responseSchema);
|
|
85
|
-
}
|
|
86
|
-
exports.sendPostBinary = sendPostBinary;
|
|
87
|
-
async function sendPut(client, path, body, options = {}) {
|
|
88
|
-
const result = await (0, undici_retry_1.sendWithRetry)(client, {
|
|
89
|
-
...DEFAULT_OPTIONS,
|
|
90
|
-
path: path,
|
|
91
|
-
method: 'PUT',
|
|
92
|
-
body: body ? JSON.stringify(body) : undefined,
|
|
93
|
-
query: options.query,
|
|
94
|
-
headers: (0, objectUtils_1.copyWithoutUndefined)({
|
|
95
|
-
'x-request-id': options.reqContext?.reqId,
|
|
96
|
-
...options.headers,
|
|
97
|
-
}),
|
|
98
|
-
reset: options.disableKeepAlive ?? false,
|
|
99
|
-
bodyTimeout: options.timeout,
|
|
100
|
-
throwOnError: false,
|
|
101
|
-
}, resolveRetryConfig(options), resolveRequestConfig(options));
|
|
102
|
-
return resolveResult(result, options.throwOnError ?? DEFAULT_OPTIONS.throwOnError, options.validateResponse ?? DEFAULT_OPTIONS.validateResponse, options.responseSchema);
|
|
103
|
-
}
|
|
104
|
-
exports.sendPut = sendPut;
|
|
105
|
-
async function sendPutBinary(client, path, body, options = {}) {
|
|
106
|
-
const result = await (0, undici_retry_1.sendWithRetry)(client, {
|
|
107
|
-
...DEFAULT_OPTIONS,
|
|
108
|
-
path: path,
|
|
109
|
-
method: 'PUT',
|
|
110
|
-
body,
|
|
111
|
-
query: options.query,
|
|
112
|
-
headers: (0, objectUtils_1.copyWithoutUndefined)({
|
|
113
|
-
'x-request-id': options.reqContext?.reqId,
|
|
114
|
-
...options.headers,
|
|
115
|
-
}),
|
|
116
|
-
reset: options.disableKeepAlive ?? false,
|
|
117
|
-
bodyTimeout: options.timeout,
|
|
118
|
-
throwOnError: false,
|
|
119
|
-
}, resolveRetryConfig(options), resolveRequestConfig(options));
|
|
120
|
-
return resolveResult(result, options.throwOnError ?? DEFAULT_OPTIONS.throwOnError, options.validateResponse ?? DEFAULT_OPTIONS.validateResponse, options.responseSchema);
|
|
121
|
-
}
|
|
122
|
-
exports.sendPutBinary = sendPutBinary;
|
|
123
|
-
async function sendPatch(client, path, body, options = {}) {
|
|
124
|
-
const result = await (0, undici_retry_1.sendWithRetry)(client, {
|
|
125
|
-
...DEFAULT_OPTIONS,
|
|
126
|
-
path: path,
|
|
127
|
-
method: 'PATCH',
|
|
128
|
-
body: body ? JSON.stringify(body) : undefined,
|
|
129
|
-
query: options.query,
|
|
130
|
-
headers: (0, objectUtils_1.copyWithoutUndefined)({
|
|
131
|
-
'x-request-id': options.reqContext?.reqId,
|
|
132
|
-
...options.headers,
|
|
133
|
-
}),
|
|
134
|
-
reset: options.disableKeepAlive ?? false,
|
|
135
|
-
bodyTimeout: options.timeout,
|
|
136
|
-
throwOnError: false,
|
|
137
|
-
}, resolveRetryConfig(options), resolveRequestConfig(options));
|
|
138
|
-
return resolveResult(result, options.throwOnError ?? DEFAULT_OPTIONS.throwOnError, options.validateResponse ?? DEFAULT_OPTIONS.validateResponse, options.responseSchema);
|
|
139
|
-
}
|
|
140
|
-
exports.sendPatch = sendPatch;
|
|
141
|
-
function resolveRequestConfig(options) {
|
|
142
|
-
return {
|
|
143
|
-
safeParseJson: options.safeParseJson ?? false,
|
|
144
|
-
blobBody: options.blobResponseBody ?? false,
|
|
145
|
-
throwOnInternalError: false,
|
|
146
|
-
requestLabel: options.requestLabel,
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
function resolveRetryConfig(options) {
|
|
150
|
-
return options.retryConfig ?? undici_retry_1.NO_RETRY_CONFIG;
|
|
151
|
-
}
|
|
152
|
-
function buildClient(baseUrl, clientOptions) {
|
|
153
|
-
const newClient = new undici_1.Client(baseUrl, {
|
|
154
|
-
...defaultClientOptions,
|
|
155
|
-
...clientOptions,
|
|
156
|
-
});
|
|
157
|
-
return newClient;
|
|
158
|
-
}
|
|
159
|
-
exports.buildClient = buildClient;
|
|
160
|
-
function resolveResult(requestResult, throwOnError, validateResponse, validationSchema, requestLabel) {
|
|
161
|
-
// Throw response error
|
|
162
|
-
if (requestResult.error && throwOnError) {
|
|
163
|
-
if ((0, undici_retry_1.isRequestResult)(requestResult.error)) {
|
|
164
|
-
throw new ResponseStatusError_1.ResponseStatusError(requestResult.error, requestLabel);
|
|
165
|
-
}
|
|
166
|
-
throw requestResult.error;
|
|
167
|
-
}
|
|
168
|
-
if (requestResult.result && validateResponse && validationSchema) {
|
|
169
|
-
requestResult.result.body = validationSchema.parse(requestResult.result.body);
|
|
170
|
-
}
|
|
171
|
-
return requestResult;
|
|
172
|
-
}
|
|
173
|
-
exports.httpClient = {
|
|
174
|
-
get: sendGet,
|
|
175
|
-
post: sendPost,
|
|
176
|
-
put: sendPut,
|
|
177
|
-
patch: sendPatch,
|
|
178
|
-
del: sendDelete,
|
|
179
|
-
};
|
|
180
|
-
//# sourceMappingURL=httpClient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"httpClient.js","sourceRoot":"","sources":["../../../src/http/httpClient.ts"],"names":[],"mappings":";;;AAEA,mCAA+B;AAE/B,+CAA8E;AAI9E,uEAAmE;AAEnE,sDAA2D;AAgC3D,MAAM,eAAe,GAAG;IACtB,gBAAgB,E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