@buka/nestjs-kit 4.4.4 → 4.4.6
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 +14 -0
- package/dist/index.d.mts +67 -4
- package/dist/index.d.ts +67 -4
- package/dist/index.js +37 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +39 -18
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.4.6](https://github.com/buka-ltd/npm.nestjs-kit/compare/v4.4.5...v4.4.6) (2026-06-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* wrong package depenpencies version ([2bd531a](https://github.com/buka-ltd/npm.nestjs-kit/commit/2bd531ad6a24cc80d7b72a3f566c2539d59e71d4))
|
|
9
|
+
|
|
10
|
+
## [4.4.5](https://github.com/buka-ltd/npm.nestjs-kit/compare/v4.4.4...v4.4.5) (2026-06-30)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Performance Improvements
|
|
14
|
+
|
|
15
|
+
* upgrade keq to 5.0.0-beta.14 ([8e93f73](https://github.com/buka-ltd/npm.nestjs-kit/commit/8e93f73a58dc178a0bda06ffc1dc3546db1a5885))
|
|
16
|
+
|
|
3
17
|
## [4.4.4](https://github.com/buka-ltd/npm.nestjs-kit/compare/v4.4.3...v4.4.4) (2026-06-28)
|
|
4
18
|
|
|
5
19
|
|
package/dist/index.d.mts
CHANGED
|
@@ -4,7 +4,7 @@ import { AnyEntity, Collection, Config, Cursor, DefineConfig, EmbeddedOptions, E
|
|
|
4
4
|
import { ValidationOptions } from "class-validator";
|
|
5
5
|
import { ApiPropertyOptions, OpenAPIObject } from "@nestjs/swagger";
|
|
6
6
|
import { Keq, KeqMiddleware, KeqOperation, KeqPathParameterInit, KeqQueryInit, KeqRequest, RequestException } from "keq";
|
|
7
|
-
import {
|
|
7
|
+
import { KeqConsumer, KeqModuleOptions } from "@keq-request/nestjs";
|
|
8
8
|
import { Base32, ErrorCategory, ErrorCategory as ErrorCategory$1, ErrorCode, ErrorCode as ErrorCode$1, ErrorCodeOptions } from "@buka/error-codes";
|
|
9
9
|
import { Exception, ExceptionDetail, ExceptionDetail as ExceptionDetail$1, ExceptionOptions as ExceptionOptions$1 } from "@buka/exception";
|
|
10
10
|
import { Logger, LoggerErrorInterceptor } from "nestjs-pino";
|
|
@@ -2086,6 +2086,70 @@ declare class OpenBaoTokenManager implements OnModuleInit, OnModuleDestroy {
|
|
|
2086
2086
|
private renewToken;
|
|
2087
2087
|
}
|
|
2088
2088
|
//#endregion
|
|
2089
|
+
//#region src/apis/open-bao-http/open-bao-http.module.d.ts
|
|
2090
|
+
interface OpenBaoHttpModuleOptions extends KeqModuleOptions {
|
|
2091
|
+
/**
|
|
2092
|
+
* Whether to register the module globally.
|
|
2093
|
+
* @default false
|
|
2094
|
+
*/
|
|
2095
|
+
isGlobal?: boolean;
|
|
2096
|
+
}
|
|
2097
|
+
declare const ConfigurableModuleClass$4: _$_nestjs_common0.ConfigurableModuleCls<OpenBaoHttpModuleOptions, "register", "create", {
|
|
2098
|
+
isGlobal: boolean;
|
|
2099
|
+
}>;
|
|
2100
|
+
/**
|
|
2101
|
+
* NestJS module that provides the {@link OpenBaoHttpClient} for dependency injection.
|
|
2102
|
+
*
|
|
2103
|
+
* This module requires a `KeqRequest` instance, which can be provided in two ways:
|
|
2104
|
+
*
|
|
2105
|
+
* **Option 1: Use the global `KeqModule` (recommended)**
|
|
2106
|
+
*
|
|
2107
|
+
* Import `KeqModule` globally, then register this module.
|
|
2108
|
+
* The module will fork from the global KeqRequest and inherit its middlewares.
|
|
2109
|
+
*
|
|
2110
|
+
* ```typescript
|
|
2111
|
+
* // app.module.ts
|
|
2112
|
+
* import { KeqModule } from '@keq-request/nestjs'
|
|
2113
|
+
*
|
|
2114
|
+
* @Module({
|
|
2115
|
+
* imports: [
|
|
2116
|
+
* KeqModule,
|
|
2117
|
+
* OpenBaoHttpModule.register({
|
|
2118
|
+
* isGlobal: true, // optional, default false
|
|
2119
|
+
* middlewares: [], // module-level middlewares
|
|
2120
|
+
* }),
|
|
2121
|
+
* ],
|
|
2122
|
+
* })
|
|
2123
|
+
* export class AppModule {}
|
|
2124
|
+
* ```
|
|
2125
|
+
*
|
|
2126
|
+
* **Option 2: Provide an isolated `KeqRequest` instance**
|
|
2127
|
+
*
|
|
2128
|
+
* ```typescript
|
|
2129
|
+
* @Module({
|
|
2130
|
+
* imports: [
|
|
2131
|
+
* OpenBaoHttpModule.register({
|
|
2132
|
+
* isolate: true, // no inherited middlewares
|
|
2133
|
+
* }),
|
|
2134
|
+
* ],
|
|
2135
|
+
* })
|
|
2136
|
+
* export class SomeFeatureModule {}
|
|
2137
|
+
* ```
|
|
2138
|
+
*
|
|
2139
|
+
* Then inject `OpenBaoHttpClient` in your services:
|
|
2140
|
+
*
|
|
2141
|
+
* ```typescript
|
|
2142
|
+
* @Injectable()
|
|
2143
|
+
* export class SomeService {
|
|
2144
|
+
* constructor(private readonly client: OpenBaoHttpClient) {}
|
|
2145
|
+
* }
|
|
2146
|
+
* ```
|
|
2147
|
+
*/
|
|
2148
|
+
declare class OpenBaoHttpModule extends ConfigurableModuleClass$4 {
|
|
2149
|
+
static readonly KEQ_REQUEST: symbol;
|
|
2150
|
+
static readonly KEQ_CONSUMER: symbol;
|
|
2151
|
+
}
|
|
2152
|
+
//#endregion
|
|
2089
2153
|
//#region src/modules/open-bao/open-bao.module-definition.d.ts
|
|
2090
2154
|
declare const ConfigurableModuleClass$3: _$_nestjs_common0.ConfigurableModuleCls<OpenBaoModuleOptions, "register", "create", {}>, MODULE_OPTIONS_TOKEN: string | symbol;
|
|
2091
2155
|
//#endregion
|
|
@@ -2140,11 +2204,10 @@ declare const ConfigurableModuleClass$3: _$_nestjs_common0.ConfigurableModuleCls
|
|
|
2140
2204
|
* })
|
|
2141
2205
|
* ```
|
|
2142
2206
|
*/
|
|
2143
|
-
declare class OpenBaoModule extends ConfigurableModuleClass$3
|
|
2207
|
+
declare class OpenBaoModule extends ConfigurableModuleClass$3 {
|
|
2144
2208
|
private readonly options;
|
|
2145
2209
|
private readonly tokenManager;
|
|
2146
|
-
constructor(options: OpenBaoModuleOptions, tokenManager: OpenBaoTokenManager);
|
|
2147
|
-
configureKeqMiddleware(consumer: KeqMiddlewareConsumer): void;
|
|
2210
|
+
constructor(options: OpenBaoModuleOptions, tokenManager: OpenBaoTokenManager, consumer: KeqConsumer<typeof OpenBaoHttpModule>);
|
|
2148
2211
|
}
|
|
2149
2212
|
//#endregion
|
|
2150
2213
|
//#region src/modules/open-bao/open-bao.config.d.ts
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import * as _$_nestjs_common0 from "@nestjs/common";
|
|
|
5
5
|
import { ArgumentMetadata, ArgumentsHost, DynamicModule, ExceptionFilter, HttpStatus, OnApplicationBootstrap, OnModuleDestroy, OnModuleInit, PipeTransform, Type, ValidationPipe, ValidationPipeOptions } from "@nestjs/common";
|
|
6
6
|
import { ValidationOptions } from "class-validator";
|
|
7
7
|
import { AnyEntity, Collection, Config, Cursor, DefineConfig, EmbeddedOptions, EntityManager, EntityName, EnumOptions, Hidden, HiddenProps, ManyToManyOptions, ManyToOneOptions, MikroORM, OneToManyOptions, OneToOneOptions, Opt, OptionalProps, Options, Primary, PrimaryKeyProp, PrimaryProperty, PropertyOptions, QueryOrderMap, Ref } from "@mikro-orm/core";
|
|
8
|
-
import {
|
|
8
|
+
import { KeqConsumer, KeqModuleOptions } from "@keq-request/nestjs";
|
|
9
9
|
import { Keq, KeqMiddleware, KeqOperation, KeqPathParameterInit, KeqQueryInit, KeqRequest, RequestException } from "keq";
|
|
10
10
|
import { Base32, ErrorCategory, ErrorCategory as ErrorCategory$1, ErrorCode, ErrorCode as ErrorCode$1, ErrorCodeOptions } from "@buka/error-codes";
|
|
11
11
|
import { Exception, ExceptionDetail, ExceptionDetail as ExceptionDetail$1, ExceptionOptions as ExceptionOptions$1 } from "@buka/exception";
|
|
@@ -2086,6 +2086,70 @@ declare class OpenBaoTokenManager implements OnModuleInit, OnModuleDestroy {
|
|
|
2086
2086
|
private renewToken;
|
|
2087
2087
|
}
|
|
2088
2088
|
//#endregion
|
|
2089
|
+
//#region src/apis/open-bao-http/open-bao-http.module.d.ts
|
|
2090
|
+
interface OpenBaoHttpModuleOptions extends KeqModuleOptions {
|
|
2091
|
+
/**
|
|
2092
|
+
* Whether to register the module globally.
|
|
2093
|
+
* @default false
|
|
2094
|
+
*/
|
|
2095
|
+
isGlobal?: boolean;
|
|
2096
|
+
}
|
|
2097
|
+
declare const ConfigurableModuleClass$4: _$_nestjs_common0.ConfigurableModuleCls<OpenBaoHttpModuleOptions, "register", "create", {
|
|
2098
|
+
isGlobal: boolean;
|
|
2099
|
+
}>;
|
|
2100
|
+
/**
|
|
2101
|
+
* NestJS module that provides the {@link OpenBaoHttpClient} for dependency injection.
|
|
2102
|
+
*
|
|
2103
|
+
* This module requires a `KeqRequest` instance, which can be provided in two ways:
|
|
2104
|
+
*
|
|
2105
|
+
* **Option 1: Use the global `KeqModule` (recommended)**
|
|
2106
|
+
*
|
|
2107
|
+
* Import `KeqModule` globally, then register this module.
|
|
2108
|
+
* The module will fork from the global KeqRequest and inherit its middlewares.
|
|
2109
|
+
*
|
|
2110
|
+
* ```typescript
|
|
2111
|
+
* // app.module.ts
|
|
2112
|
+
* import { KeqModule } from '@keq-request/nestjs'
|
|
2113
|
+
*
|
|
2114
|
+
* @Module({
|
|
2115
|
+
* imports: [
|
|
2116
|
+
* KeqModule,
|
|
2117
|
+
* OpenBaoHttpModule.register({
|
|
2118
|
+
* isGlobal: true, // optional, default false
|
|
2119
|
+
* middlewares: [], // module-level middlewares
|
|
2120
|
+
* }),
|
|
2121
|
+
* ],
|
|
2122
|
+
* })
|
|
2123
|
+
* export class AppModule {}
|
|
2124
|
+
* ```
|
|
2125
|
+
*
|
|
2126
|
+
* **Option 2: Provide an isolated `KeqRequest` instance**
|
|
2127
|
+
*
|
|
2128
|
+
* ```typescript
|
|
2129
|
+
* @Module({
|
|
2130
|
+
* imports: [
|
|
2131
|
+
* OpenBaoHttpModule.register({
|
|
2132
|
+
* isolate: true, // no inherited middlewares
|
|
2133
|
+
* }),
|
|
2134
|
+
* ],
|
|
2135
|
+
* })
|
|
2136
|
+
* export class SomeFeatureModule {}
|
|
2137
|
+
* ```
|
|
2138
|
+
*
|
|
2139
|
+
* Then inject `OpenBaoHttpClient` in your services:
|
|
2140
|
+
*
|
|
2141
|
+
* ```typescript
|
|
2142
|
+
* @Injectable()
|
|
2143
|
+
* export class SomeService {
|
|
2144
|
+
* constructor(private readonly client: OpenBaoHttpClient) {}
|
|
2145
|
+
* }
|
|
2146
|
+
* ```
|
|
2147
|
+
*/
|
|
2148
|
+
declare class OpenBaoHttpModule extends ConfigurableModuleClass$4 {
|
|
2149
|
+
static readonly KEQ_REQUEST: symbol;
|
|
2150
|
+
static readonly KEQ_CONSUMER: symbol;
|
|
2151
|
+
}
|
|
2152
|
+
//#endregion
|
|
2089
2153
|
//#region src/modules/open-bao/open-bao.module-definition.d.ts
|
|
2090
2154
|
declare const ConfigurableModuleClass$3: _$_nestjs_common0.ConfigurableModuleCls<OpenBaoModuleOptions, "register", "create", {}>, MODULE_OPTIONS_TOKEN: string | symbol;
|
|
2091
2155
|
//#endregion
|
|
@@ -2140,11 +2204,10 @@ declare const ConfigurableModuleClass$3: _$_nestjs_common0.ConfigurableModuleCls
|
|
|
2140
2204
|
* })
|
|
2141
2205
|
* ```
|
|
2142
2206
|
*/
|
|
2143
|
-
declare class OpenBaoModule extends ConfigurableModuleClass$3
|
|
2207
|
+
declare class OpenBaoModule extends ConfigurableModuleClass$3 {
|
|
2144
2208
|
private readonly options;
|
|
2145
2209
|
private readonly tokenManager;
|
|
2146
|
-
constructor(options: OpenBaoModuleOptions, tokenManager: OpenBaoTokenManager);
|
|
2147
|
-
configureKeqMiddleware(consumer: KeqMiddlewareConsumer): void;
|
|
2210
|
+
constructor(options: OpenBaoModuleOptions, tokenManager: OpenBaoTokenManager, consumer: KeqConsumer<typeof OpenBaoHttpModule>);
|
|
2148
2211
|
}
|
|
2149
2212
|
//#endregion
|
|
2150
2213
|
//#region src/modules/open-bao/open-bao.config.d.ts
|
package/dist/index.js
CHANGED
|
@@ -2722,7 +2722,7 @@ const Column = {
|
|
|
2722
2722
|
};
|
|
2723
2723
|
//#endregion
|
|
2724
2724
|
//#region src/modules/mikro-orm/models/timestamped-entity.ts
|
|
2725
|
-
var _ref$14, _ref2$
|
|
2725
|
+
var _ref$14, _ref2$4;
|
|
2726
2726
|
var TimestampedEntity = class {
|
|
2727
2727
|
[_mikro_orm_core.OptionalProps];
|
|
2728
2728
|
createdAt = /* @__PURE__ */ new Date();
|
|
@@ -2737,7 +2737,7 @@ __decorate([Column.Timestamptz({
|
|
|
2737
2737
|
onUpdate: () => /* @__PURE__ */ new Date(),
|
|
2738
2738
|
defaultRaw: "CURRENT_TIMESTAMP",
|
|
2739
2739
|
comment: "更新时间"
|
|
2740
|
-
}), __decorateMetadata("design:type", typeof (_ref2$
|
|
2740
|
+
}), __decorateMetadata("design:type", typeof (_ref2$4 = typeof Date !== "undefined" && Date) === "function" ? _ref2$4 : Object)], TimestampedEntity.prototype, "updatedAt", void 0);
|
|
2741
2741
|
//#endregion
|
|
2742
2742
|
//#region src/modules/mikro-orm/models/linear-entity.ts
|
|
2743
2743
|
var LinearEntity = class extends TimestampedEntity {
|
|
@@ -3194,7 +3194,7 @@ __decorate([
|
|
|
3194
3194
|
], DatabaseConfig.prototype, "poolIdleTimeoutMillis", void 0);
|
|
3195
3195
|
//#endregion
|
|
3196
3196
|
//#region src/modules/core/pipes/validation.pipe.ts
|
|
3197
|
-
var _ref$13, _ref2$
|
|
3197
|
+
var _ref$13, _ref2$3, _ref3$1, _BukaValidationPipe;
|
|
3198
3198
|
function deepMap(obj, fn) {
|
|
3199
3199
|
if (Array.isArray(obj)) return obj.map((item) => deepMap(item, fn));
|
|
3200
3200
|
else return fn(obj);
|
|
@@ -3255,7 +3255,7 @@ let BukaValidationPipe = _BukaValidationPipe = class BukaValidationPipe extends
|
|
|
3255
3255
|
};
|
|
3256
3256
|
BukaValidationPipe = _BukaValidationPipe = __decorate([(0, _nestjs_common.Injectable)(), __decorateMetadata("design:paramtypes", [
|
|
3257
3257
|
typeof (_ref$13 = typeof _mikro_orm_core.MikroORM !== "undefined" && _mikro_orm_core.MikroORM) === "function" ? _ref$13 : Object,
|
|
3258
|
-
typeof (_ref2$
|
|
3258
|
+
typeof (_ref2$3 = typeof _mikro_orm_core.EntityManager !== "undefined" && _mikro_orm_core.EntityManager) === "function" ? _ref2$3 : Object,
|
|
3259
3259
|
typeof (_ref3$1 = typeof _nestjs_common.ValidationPipeOptions !== "undefined" && _nestjs_common.ValidationPipeOptions) === "function" ? _ref3$1 : Object
|
|
3260
3260
|
])], BukaValidationPipe);
|
|
3261
3261
|
//#endregion
|
|
@@ -6488,6 +6488,7 @@ OpenBaoHttpClient = _OpenBaoHttpClient = __decorate([(0, _nestjs_common.Injectab
|
|
|
6488
6488
|
//#endregion
|
|
6489
6489
|
//#region src/apis/open-bao-http/open-bao-http.module.ts
|
|
6490
6490
|
const KEQ_REQUEST_TOKEN = Symbol("OpenBaoHttpKeqRequest");
|
|
6491
|
+
const KEQ_CONSUMER_TOKEN = Symbol("OpenBaoHttpKeqConsumer");
|
|
6491
6492
|
const { ConfigurableModuleClass: ConfigurableModuleClass$3, MODULE_OPTIONS_TOKEN: MODULE_OPTIONS_TOKEN$3 } = new _nestjs_common.ConfigurableModuleBuilder().setExtras({ isGlobal: false }, (definition, extras) => ({
|
|
6492
6493
|
...definition,
|
|
6493
6494
|
global: extras.isGlobal
|
|
@@ -6510,12 +6511,23 @@ const CLIENT_PROVIDER = {
|
|
|
6510
6511
|
useFactory: (request) => new OpenBaoHttpClient(request),
|
|
6511
6512
|
inject: [KEQ_REQUEST_TOKEN]
|
|
6512
6513
|
};
|
|
6514
|
+
const CONSUMER_PROVIDER = {
|
|
6515
|
+
provide: KEQ_CONSUMER_TOKEN,
|
|
6516
|
+
useFactory: (request) => new _keq_request_nestjs.KeqConsumer(request),
|
|
6517
|
+
inject: [KEQ_REQUEST_TOKEN]
|
|
6518
|
+
};
|
|
6513
6519
|
let OpenBaoHttpModule = class OpenBaoHttpModule extends ConfigurableModuleClass$3 {
|
|
6514
6520
|
static KEQ_REQUEST = KEQ_REQUEST_TOKEN;
|
|
6521
|
+
static KEQ_CONSUMER = KEQ_CONSUMER_TOKEN;
|
|
6515
6522
|
};
|
|
6516
6523
|
OpenBaoHttpModule = __decorate([(0, _nestjs_common.Module)({
|
|
6517
|
-
|
|
6518
|
-
|
|
6524
|
+
imports: [_keq_request_nestjs.KeqModule],
|
|
6525
|
+
providers: [
|
|
6526
|
+
REQUEST_PROVIDER,
|
|
6527
|
+
CONSUMER_PROVIDER,
|
|
6528
|
+
CLIENT_PROVIDER
|
|
6529
|
+
],
|
|
6530
|
+
exports: [OpenBaoHttpClient, KEQ_CONSUMER_TOKEN]
|
|
6519
6531
|
})], OpenBaoHttpModule);
|
|
6520
6532
|
//#endregion
|
|
6521
6533
|
//#region src/modules/open-bao/set-open-bao-token.middleware.ts
|
|
@@ -6572,6 +6584,7 @@ function setOpenBaoToken(getToken) {
|
|
|
6572
6584
|
}
|
|
6573
6585
|
//#endregion
|
|
6574
6586
|
//#region src/modules/open-bao/request/format-error.ts
|
|
6587
|
+
const logger$1 = new _nestjs_common.Logger("ClarifyOpenbaoError");
|
|
6575
6588
|
/**
|
|
6576
6589
|
* 根据 HTTP 状态码生成中文操作建议
|
|
6577
6590
|
*/
|
|
@@ -6588,14 +6601,19 @@ function getStatusCodeGuidance(statusCode) {
|
|
|
6588
6601
|
* 必须注册在 `validateStatusCode` 之后,作为中间件链的最外层,
|
|
6589
6602
|
* 捕获 `RequestException` 并重写其错误消息,补充请求上下文和操作建议。
|
|
6590
6603
|
*
|
|
6591
|
-
* 非 RequestException
|
|
6604
|
+
* 非 RequestException 错误(网络故障、超时等)记录日志后原样透传。
|
|
6592
6605
|
*/
|
|
6593
|
-
function
|
|
6606
|
+
function clarifyOpenbaoError() {
|
|
6594
6607
|
const middleware = async (ctx, next) => {
|
|
6595
6608
|
try {
|
|
6596
6609
|
await next();
|
|
6597
6610
|
} catch (err) {
|
|
6598
|
-
if (!(err instanceof keq.RequestException))
|
|
6611
|
+
if (!(err instanceof keq.RequestException)) {
|
|
6612
|
+
const method = ctx.request.method.toUpperCase();
|
|
6613
|
+
const url = ctx.request.url.toString();
|
|
6614
|
+
logger$1.error(`OpenBaoModule API 请求异常: ${method} ${url}`, err instanceof Error ? err.stack : void 0);
|
|
6615
|
+
throw err;
|
|
6616
|
+
}
|
|
6599
6617
|
const method = ctx.request.method.toUpperCase();
|
|
6600
6618
|
const url = ctx.request.url.toString();
|
|
6601
6619
|
const statusCode = err.statusCode;
|
|
@@ -6612,20 +6630,18 @@ function formatError() {
|
|
|
6612
6630
|
throw err;
|
|
6613
6631
|
}
|
|
6614
6632
|
};
|
|
6615
|
-
middleware.__keqMiddlewareName__ = "
|
|
6633
|
+
middleware.__keqMiddlewareName__ = "clarifyOpenbaoError";
|
|
6616
6634
|
return middleware;
|
|
6617
6635
|
}
|
|
6618
6636
|
//#endregion
|
|
6619
6637
|
//#region src/modules/open-bao/open-bao.module.ts
|
|
6620
|
-
var _ref$10;
|
|
6638
|
+
var _ref$10, _ref2$2;
|
|
6621
6639
|
let OpenBaoModule = class OpenBaoModule extends ConfigurableModuleClass$4 {
|
|
6622
|
-
constructor(options, tokenManager) {
|
|
6640
|
+
constructor(options, tokenManager, consumer) {
|
|
6623
6641
|
super();
|
|
6624
6642
|
this.options = options;
|
|
6625
6643
|
this.tokenManager = tokenManager;
|
|
6626
|
-
|
|
6627
|
-
configureKeqMiddleware(consumer) {
|
|
6628
|
-
consumer.apply(formatError(), (0, _keq_request_url.setBaseUrl)(this.options.address + "/v1/"), setOpenBaoToken(() => this.tokenManager.getToken()), (0, _keq_request_exception.validateStatusCode)()).forRoutes(OpenBaoHttpModule);
|
|
6644
|
+
consumer.apply(clarifyOpenbaoError(), (0, _keq_request_url.setBaseUrl)(this.options.address + "/v1/"), setOpenBaoToken(() => this.tokenManager.getToken()), (0, _keq_request_exception.validateStatusCode)(), (0, _keq_request_exception.clarifyFetchFailed)()).forRoutes(_keq_request_nestjs.KEQ_ROUTES.ALL);
|
|
6629
6645
|
}
|
|
6630
6646
|
};
|
|
6631
6647
|
OpenBaoModule = __decorate([
|
|
@@ -6636,7 +6652,12 @@ OpenBaoModule = __decorate([
|
|
|
6636
6652
|
exports: [OpenBaoTokenManager, OpenBaoHttpModule]
|
|
6637
6653
|
}),
|
|
6638
6654
|
__decorateParam(0, (0, _nestjs_common.Inject)(MODULE_OPTIONS_TOKEN$4)),
|
|
6639
|
-
|
|
6655
|
+
__decorateParam(2, (0, _keq_request_nestjs.InjectKeqConsumer)(OpenBaoHttpModule)),
|
|
6656
|
+
__decorateMetadata("design:paramtypes", [
|
|
6657
|
+
Object,
|
|
6658
|
+
typeof (_ref$10 = typeof OpenBaoTokenManager !== "undefined" && OpenBaoTokenManager) === "function" ? _ref$10 : Object,
|
|
6659
|
+
typeof (_ref2$2 = typeof _keq_request_nestjs.KeqConsumer !== "undefined" && _keq_request_nestjs.KeqConsumer) === "function" ? _ref2$2 : Object
|
|
6660
|
+
])
|
|
6640
6661
|
], OpenBaoModule);
|
|
6641
6662
|
//#endregion
|
|
6642
6663
|
//#region src/modules/open-bao/open-bao.config.ts
|