@lark-apaas/fullstack-nestjs-core 1.1.4-alpha.5 → 1.1.4-alpha.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/dist/index.cjs +22 -85
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +14 -78
- package/package.json +7 -5
package/dist/index.cjs
CHANGED
|
@@ -44,12 +44,15 @@ __export(index_exports, {
|
|
|
44
44
|
module.exports = __toCommonJS(index_exports);
|
|
45
45
|
|
|
46
46
|
// src/modules/platform/module.ts
|
|
47
|
-
var
|
|
48
|
-
var
|
|
47
|
+
var import_common5 = require("@nestjs/common");
|
|
48
|
+
var import_core = require("@nestjs/core");
|
|
49
|
+
var import_nestjs_common = require("@lark-apaas/nestjs-common");
|
|
49
50
|
var import_config2 = require("@nestjs/config");
|
|
51
|
+
var import_nestjs_observable = require("@lark-apaas/nestjs-observable");
|
|
50
52
|
var import_nestjs_logger = require("@lark-apaas/nestjs-logger");
|
|
51
53
|
var import_nestjs_datapaas = require("@lark-apaas/nestjs-datapaas");
|
|
52
54
|
var import_nestjs_authnpaas = require("@lark-apaas/nestjs-authnpaas");
|
|
55
|
+
var import_nestjs_trigger = require("@lark-apaas/nestjs-trigger");
|
|
53
56
|
|
|
54
57
|
// src/middlewares/user-context/index.ts
|
|
55
58
|
var import_common = require("@nestjs/common");
|
|
@@ -96,7 +99,8 @@ var UserContextMiddleware = class {
|
|
|
96
99
|
env: webUser?.env ?? "runtime",
|
|
97
100
|
userName: webUser?.user_name?.zh_cn ?? "",
|
|
98
101
|
userNameEn: webUser?.user_name?.en_us ?? "",
|
|
99
|
-
userNameI18n: webUser?.user_name ?? {}
|
|
102
|
+
userNameI18n: webUser?.user_name ?? {},
|
|
103
|
+
isSystemAccount: webUser?.is_system_account ?? false
|
|
100
104
|
};
|
|
101
105
|
next();
|
|
102
106
|
}
|
|
@@ -306,9 +310,7 @@ var app_config_default = (0, import_config.registerAs)(NAMESPACE, () => {
|
|
|
306
310
|
};
|
|
307
311
|
});
|
|
308
312
|
|
|
309
|
-
// src/
|
|
310
|
-
var import_common5 = require("@nestjs/common");
|
|
311
|
-
var import_core = require("@nestjs/core");
|
|
313
|
+
// src/modules/platform/module.ts
|
|
312
314
|
function _ts_decorate5(decorators, target, key, desc) {
|
|
313
315
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
314
316
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -316,73 +318,6 @@ function _ts_decorate5(decorators, target, key, desc) {
|
|
|
316
318
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
317
319
|
}
|
|
318
320
|
__name(_ts_decorate5, "_ts_decorate");
|
|
319
|
-
function _ts_metadata(k, v) {
|
|
320
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
321
|
-
}
|
|
322
|
-
__name(_ts_metadata, "_ts_metadata");
|
|
323
|
-
var processStartTimestamp = Date.now();
|
|
324
|
-
var FrameworkDebugMiddleware = class {
|
|
325
|
-
static {
|
|
326
|
-
__name(this, "FrameworkDebugMiddleware");
|
|
327
|
-
}
|
|
328
|
-
httpAdapterHost;
|
|
329
|
-
constructor(httpAdapterHost) {
|
|
330
|
-
this.httpAdapterHost = httpAdapterHost;
|
|
331
|
-
}
|
|
332
|
-
use(_req, res) {
|
|
333
|
-
res.json(this.getDebugInfo());
|
|
334
|
-
}
|
|
335
|
-
getDebugInfo() {
|
|
336
|
-
const routes = this.getRoutes();
|
|
337
|
-
const uptimeSeconds = Math.floor(process.uptime());
|
|
338
|
-
return {
|
|
339
|
-
["\u8DEF\u7531\u914D\u7F6E"]: routes,
|
|
340
|
-
["\u8FDB\u7A0B\u5B58\u6D3B\u65F6\u95F4\uFF08\u79D2\uFF09"]: uptimeSeconds,
|
|
341
|
-
["\u8FDB\u7A0B\u542F\u52A8\u65F6\u95F4\uFF08\u79D2\uFF09"]: new Date(processStartTimestamp).toISOString(),
|
|
342
|
-
["\u8FD0\u884C\u65F6\u7248\u672C"]: process.versions
|
|
343
|
-
};
|
|
344
|
-
}
|
|
345
|
-
getRoutes() {
|
|
346
|
-
const server = this.httpAdapterHost.httpAdapter;
|
|
347
|
-
const router = server.getInstance()._router;
|
|
348
|
-
if (!router) {
|
|
349
|
-
return {
|
|
350
|
-
error: "Router \u4E0D\u53EF\u7528"
|
|
351
|
-
};
|
|
352
|
-
}
|
|
353
|
-
const routes = [];
|
|
354
|
-
router.stack.forEach((middleware, index) => {
|
|
355
|
-
if (middleware.route) {
|
|
356
|
-
routes.push({
|
|
357
|
-
order: String(index),
|
|
358
|
-
path: middleware.route.path,
|
|
359
|
-
method: middleware.method,
|
|
360
|
-
regexp: middleware.regexp?.toString()
|
|
361
|
-
});
|
|
362
|
-
}
|
|
363
|
-
});
|
|
364
|
-
return {
|
|
365
|
-
total: routes.length,
|
|
366
|
-
routes
|
|
367
|
-
};
|
|
368
|
-
}
|
|
369
|
-
};
|
|
370
|
-
FrameworkDebugMiddleware = _ts_decorate5([
|
|
371
|
-
(0, import_common5.Injectable)(),
|
|
372
|
-
_ts_metadata("design:type", Function),
|
|
373
|
-
_ts_metadata("design:paramtypes", [
|
|
374
|
-
typeof import_core.HttpAdapterHost === "undefined" ? Object : import_core.HttpAdapterHost
|
|
375
|
-
])
|
|
376
|
-
], FrameworkDebugMiddleware);
|
|
377
|
-
|
|
378
|
-
// src/modules/platform/module.ts
|
|
379
|
-
function _ts_decorate6(decorators, target, key, desc) {
|
|
380
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
381
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
382
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
383
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
384
|
-
}
|
|
385
|
-
__name(_ts_decorate6, "_ts_decorate");
|
|
386
321
|
var PLATFORM_MODULE_OPTIONS = "PLATFORM_MODULE_OPTIONS";
|
|
387
322
|
var PlatformModule = class _PlatformModule {
|
|
388
323
|
static {
|
|
@@ -404,7 +339,9 @@ var PlatformModule = class _PlatformModule {
|
|
|
404
339
|
app_config_default
|
|
405
340
|
]
|
|
406
341
|
}),
|
|
342
|
+
import_nestjs_common.CommonModule,
|
|
407
343
|
import_nestjs_logger.LoggerModule,
|
|
344
|
+
import_nestjs_observable.NestjsObservableModule.forRoot(),
|
|
408
345
|
import_nestjs_datapaas.DataPaasModule.forRootAsync({
|
|
409
346
|
imports: [
|
|
410
347
|
import_config2.ConfigModule,
|
|
@@ -419,10 +356,10 @@ var PlatformModule = class _PlatformModule {
|
|
|
419
356
|
const appLogger = args[1];
|
|
420
357
|
const drizzleLogger = {
|
|
421
358
|
logQuery(query, params) {
|
|
422
|
-
appLogger.log?.("SQL Query"
|
|
359
|
+
appLogger.log?.("SQL Query " + JSON.stringify({
|
|
423
360
|
query,
|
|
424
361
|
params
|
|
425
|
-
}, "Database");
|
|
362
|
+
}), "Database");
|
|
426
363
|
}
|
|
427
364
|
};
|
|
428
365
|
return {
|
|
@@ -431,7 +368,8 @@ var PlatformModule = class _PlatformModule {
|
|
|
431
368
|
};
|
|
432
369
|
}, "useFactory")
|
|
433
370
|
}),
|
|
434
|
-
import_nestjs_authnpaas.AuthNPaasModule.forRoot()
|
|
371
|
+
import_nestjs_authnpaas.AuthNPaasModule.forRoot(),
|
|
372
|
+
import_nestjs_trigger.AutomationModule.forRoot()
|
|
435
373
|
],
|
|
436
374
|
providers: [
|
|
437
375
|
{
|
|
@@ -439,8 +377,8 @@ var PlatformModule = class _PlatformModule {
|
|
|
439
377
|
useValue: options
|
|
440
378
|
},
|
|
441
379
|
{
|
|
442
|
-
provide:
|
|
443
|
-
useValue: new
|
|
380
|
+
provide: import_core.APP_PIPE,
|
|
381
|
+
useValue: new import_common5.ValidationPipe({
|
|
444
382
|
transform: true,
|
|
445
383
|
transformOptions: {
|
|
446
384
|
enableImplicitConversion: true
|
|
@@ -460,9 +398,6 @@ var PlatformModule = class _PlatformModule {
|
|
|
460
398
|
configure(consumer) {
|
|
461
399
|
const options = _PlatformModule.moduleOptions;
|
|
462
400
|
consumer.apply(apiResponseInterceptor).forRoutes("/api/*");
|
|
463
|
-
if (process.env.NODE_ENV === "development") {
|
|
464
|
-
consumer.apply(FrameworkDebugMiddleware).forRoutes("/api/__framework__/debug");
|
|
465
|
-
}
|
|
466
401
|
consumer.apply(UserContextMiddleware, import_nestjs_logger.LoggerContextMiddleware, import_nestjs_datapaas.SqlExecutionContextMiddleware).forRoutes("/*");
|
|
467
402
|
consumer.apply(CsrfTokenMiddleware, ViewContextMiddleware).exclude("/api/(.*)").forRoutes("*");
|
|
468
403
|
if (options.enableCsrf !== false) {
|
|
@@ -477,9 +412,9 @@ var PlatformModule = class _PlatformModule {
|
|
|
477
412
|
}
|
|
478
413
|
}
|
|
479
414
|
};
|
|
480
|
-
PlatformModule =
|
|
481
|
-
(0,
|
|
482
|
-
(0,
|
|
415
|
+
PlatformModule = _ts_decorate5([
|
|
416
|
+
(0, import_common5.Global)(),
|
|
417
|
+
(0, import_common5.Module)({})
|
|
483
418
|
], PlatformModule);
|
|
484
419
|
|
|
485
420
|
// src/setup.ts
|
|
@@ -512,6 +447,7 @@ __name(configureApp, "configureApp");
|
|
|
512
447
|
var import_nestjs_openapi_devtools2 = require("@lark-apaas/nestjs-openapi-devtools");
|
|
513
448
|
__reExport(index_exports, require("@lark-apaas/nestjs-authnpaas"), module.exports);
|
|
514
449
|
__reExport(index_exports, require("@lark-apaas/nestjs-datapaas"), module.exports);
|
|
450
|
+
__reExport(index_exports, require("@lark-apaas/nestjs-trigger"), module.exports);
|
|
515
451
|
// Annotate the CommonJS export names for ESM import in node:
|
|
516
452
|
0 && (module.exports = {
|
|
517
453
|
CsrfMiddleware,
|
|
@@ -523,5 +459,6 @@ __reExport(index_exports, require("@lark-apaas/nestjs-datapaas"), module.exports
|
|
|
523
459
|
ViewContextMiddleware,
|
|
524
460
|
configureApp,
|
|
525
461
|
...require("@lark-apaas/nestjs-authnpaas"),
|
|
526
|
-
...require("@lark-apaas/nestjs-datapaas")
|
|
462
|
+
...require("@lark-apaas/nestjs-datapaas"),
|
|
463
|
+
...require("@lark-apaas/nestjs-trigger")
|
|
527
464
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -4,6 +4,7 @@ export { DevToolsModule, DevToolsOptions, DevToolsV2Module, DevToolsV2Options }
|
|
|
4
4
|
import { Request, Response, NextFunction } from 'express';
|
|
5
5
|
export * from '@lark-apaas/nestjs-authnpaas';
|
|
6
6
|
export * from '@lark-apaas/nestjs-datapaas';
|
|
7
|
+
export * from '@lark-apaas/nestjs-trigger';
|
|
7
8
|
|
|
8
9
|
declare global {
|
|
9
10
|
namespace Express {
|
|
@@ -24,6 +25,7 @@ declare global {
|
|
|
24
25
|
userName?: string; // 默认中文名
|
|
25
26
|
userNameEn?: string; // 冗余一份英文名
|
|
26
27
|
userNameI18n?: Record<string, string>; // 带多语的用户名
|
|
28
|
+
isSystemAccount?: boolean; // trigger 场景写入值为 true,user 访问场景不写入
|
|
27
29
|
},
|
|
28
30
|
csrfToken?: string;
|
|
29
31
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { DevToolsModule, DevToolsOptions, DevToolsV2Module, DevToolsV2Options }
|
|
|
4
4
|
import { Request, Response, NextFunction } from 'express';
|
|
5
5
|
export * from '@lark-apaas/nestjs-authnpaas';
|
|
6
6
|
export * from '@lark-apaas/nestjs-datapaas';
|
|
7
|
+
export * from '@lark-apaas/nestjs-trigger';
|
|
7
8
|
|
|
8
9
|
declare global {
|
|
9
10
|
namespace Express {
|
|
@@ -24,6 +25,7 @@ declare global {
|
|
|
24
25
|
userName?: string; // 默认中文名
|
|
25
26
|
userNameEn?: string; // 冗余一份英文名
|
|
26
27
|
userNameI18n?: Record<string, string>; // 带多语的用户名
|
|
28
|
+
isSystemAccount?: boolean; // trigger 场景写入值为 true,user 访问场景不写入
|
|
27
29
|
},
|
|
28
30
|
csrfToken?: string;
|
|
29
31
|
}
|
package/dist/index.js
CHANGED
|
@@ -4,10 +4,13 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
4
4
|
// src/modules/platform/module.ts
|
|
5
5
|
import { Global, Module, ValidationPipe } from "@nestjs/common";
|
|
6
6
|
import { APP_PIPE } from "@nestjs/core";
|
|
7
|
+
import { CommonModule } from "@lark-apaas/nestjs-common";
|
|
7
8
|
import { ConfigModule, ConfigService } from "@nestjs/config";
|
|
9
|
+
import { NestjsObservableModule as ObservableModule } from "@lark-apaas/nestjs-observable";
|
|
8
10
|
import { LoggerModule, AppLogger, LoggerContextMiddleware } from "@lark-apaas/nestjs-logger";
|
|
9
11
|
import { DataPaasModule, SqlExecutionContextMiddleware } from "@lark-apaas/nestjs-datapaas";
|
|
10
12
|
import { AuthNPaasModule } from "@lark-apaas/nestjs-authnpaas";
|
|
13
|
+
import { AutomationModule } from "@lark-apaas/nestjs-trigger";
|
|
11
14
|
|
|
12
15
|
// src/middlewares/user-context/index.ts
|
|
13
16
|
import { Injectable } from "@nestjs/common";
|
|
@@ -54,7 +57,8 @@ var UserContextMiddleware = class {
|
|
|
54
57
|
env: webUser?.env ?? "runtime",
|
|
55
58
|
userName: webUser?.user_name?.zh_cn ?? "",
|
|
56
59
|
userNameEn: webUser?.user_name?.en_us ?? "",
|
|
57
|
-
userNameI18n: webUser?.user_name ?? {}
|
|
60
|
+
userNameI18n: webUser?.user_name ?? {},
|
|
61
|
+
isSystemAccount: webUser?.is_system_account ?? false
|
|
58
62
|
};
|
|
59
63
|
next();
|
|
60
64
|
}
|
|
@@ -264,9 +268,7 @@ var app_config_default = registerAs(NAMESPACE, () => {
|
|
|
264
268
|
};
|
|
265
269
|
});
|
|
266
270
|
|
|
267
|
-
// src/
|
|
268
|
-
import { Injectable as Injectable5 } from "@nestjs/common";
|
|
269
|
-
import { HttpAdapterHost } from "@nestjs/core";
|
|
271
|
+
// src/modules/platform/module.ts
|
|
270
272
|
function _ts_decorate5(decorators, target, key, desc) {
|
|
271
273
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
272
274
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -274,73 +276,6 @@ function _ts_decorate5(decorators, target, key, desc) {
|
|
|
274
276
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
275
277
|
}
|
|
276
278
|
__name(_ts_decorate5, "_ts_decorate");
|
|
277
|
-
function _ts_metadata(k, v) {
|
|
278
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
279
|
-
}
|
|
280
|
-
__name(_ts_metadata, "_ts_metadata");
|
|
281
|
-
var processStartTimestamp = Date.now();
|
|
282
|
-
var FrameworkDebugMiddleware = class {
|
|
283
|
-
static {
|
|
284
|
-
__name(this, "FrameworkDebugMiddleware");
|
|
285
|
-
}
|
|
286
|
-
httpAdapterHost;
|
|
287
|
-
constructor(httpAdapterHost) {
|
|
288
|
-
this.httpAdapterHost = httpAdapterHost;
|
|
289
|
-
}
|
|
290
|
-
use(_req, res) {
|
|
291
|
-
res.json(this.getDebugInfo());
|
|
292
|
-
}
|
|
293
|
-
getDebugInfo() {
|
|
294
|
-
const routes = this.getRoutes();
|
|
295
|
-
const uptimeSeconds = Math.floor(process.uptime());
|
|
296
|
-
return {
|
|
297
|
-
["\u8DEF\u7531\u914D\u7F6E"]: routes,
|
|
298
|
-
["\u8FDB\u7A0B\u5B58\u6D3B\u65F6\u95F4\uFF08\u79D2\uFF09"]: uptimeSeconds,
|
|
299
|
-
["\u8FDB\u7A0B\u542F\u52A8\u65F6\u95F4\uFF08\u79D2\uFF09"]: new Date(processStartTimestamp).toISOString(),
|
|
300
|
-
["\u8FD0\u884C\u65F6\u7248\u672C"]: process.versions
|
|
301
|
-
};
|
|
302
|
-
}
|
|
303
|
-
getRoutes() {
|
|
304
|
-
const server = this.httpAdapterHost.httpAdapter;
|
|
305
|
-
const router = server.getInstance()._router;
|
|
306
|
-
if (!router) {
|
|
307
|
-
return {
|
|
308
|
-
error: "Router \u4E0D\u53EF\u7528"
|
|
309
|
-
};
|
|
310
|
-
}
|
|
311
|
-
const routes = [];
|
|
312
|
-
router.stack.forEach((middleware, index) => {
|
|
313
|
-
if (middleware.route) {
|
|
314
|
-
routes.push({
|
|
315
|
-
order: String(index),
|
|
316
|
-
path: middleware.route.path,
|
|
317
|
-
method: middleware.method,
|
|
318
|
-
regexp: middleware.regexp?.toString()
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
|
-
return {
|
|
323
|
-
total: routes.length,
|
|
324
|
-
routes
|
|
325
|
-
};
|
|
326
|
-
}
|
|
327
|
-
};
|
|
328
|
-
FrameworkDebugMiddleware = _ts_decorate5([
|
|
329
|
-
Injectable5(),
|
|
330
|
-
_ts_metadata("design:type", Function),
|
|
331
|
-
_ts_metadata("design:paramtypes", [
|
|
332
|
-
typeof HttpAdapterHost === "undefined" ? Object : HttpAdapterHost
|
|
333
|
-
])
|
|
334
|
-
], FrameworkDebugMiddleware);
|
|
335
|
-
|
|
336
|
-
// src/modules/platform/module.ts
|
|
337
|
-
function _ts_decorate6(decorators, target, key, desc) {
|
|
338
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
339
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
340
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
341
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
342
|
-
}
|
|
343
|
-
__name(_ts_decorate6, "_ts_decorate");
|
|
344
279
|
var PLATFORM_MODULE_OPTIONS = "PLATFORM_MODULE_OPTIONS";
|
|
345
280
|
var PlatformModule = class _PlatformModule {
|
|
346
281
|
static {
|
|
@@ -362,7 +297,9 @@ var PlatformModule = class _PlatformModule {
|
|
|
362
297
|
app_config_default
|
|
363
298
|
]
|
|
364
299
|
}),
|
|
300
|
+
CommonModule,
|
|
365
301
|
LoggerModule,
|
|
302
|
+
ObservableModule.forRoot(),
|
|
366
303
|
DataPaasModule.forRootAsync({
|
|
367
304
|
imports: [
|
|
368
305
|
ConfigModule,
|
|
@@ -377,10 +314,10 @@ var PlatformModule = class _PlatformModule {
|
|
|
377
314
|
const appLogger = args[1];
|
|
378
315
|
const drizzleLogger = {
|
|
379
316
|
logQuery(query, params) {
|
|
380
|
-
appLogger.log?.("SQL Query"
|
|
317
|
+
appLogger.log?.("SQL Query " + JSON.stringify({
|
|
381
318
|
query,
|
|
382
319
|
params
|
|
383
|
-
}, "Database");
|
|
320
|
+
}), "Database");
|
|
384
321
|
}
|
|
385
322
|
};
|
|
386
323
|
return {
|
|
@@ -389,7 +326,8 @@ var PlatformModule = class _PlatformModule {
|
|
|
389
326
|
};
|
|
390
327
|
}, "useFactory")
|
|
391
328
|
}),
|
|
392
|
-
AuthNPaasModule.forRoot()
|
|
329
|
+
AuthNPaasModule.forRoot(),
|
|
330
|
+
AutomationModule.forRoot()
|
|
393
331
|
],
|
|
394
332
|
providers: [
|
|
395
333
|
{
|
|
@@ -418,9 +356,6 @@ var PlatformModule = class _PlatformModule {
|
|
|
418
356
|
configure(consumer) {
|
|
419
357
|
const options = _PlatformModule.moduleOptions;
|
|
420
358
|
consumer.apply(apiResponseInterceptor).forRoutes("/api/*");
|
|
421
|
-
if (process.env.NODE_ENV === "development") {
|
|
422
|
-
consumer.apply(FrameworkDebugMiddleware).forRoutes("/api/__framework__/debug");
|
|
423
|
-
}
|
|
424
359
|
consumer.apply(UserContextMiddleware, LoggerContextMiddleware, SqlExecutionContextMiddleware).forRoutes("/*");
|
|
425
360
|
consumer.apply(CsrfTokenMiddleware, ViewContextMiddleware).exclude("/api/(.*)").forRoutes("*");
|
|
426
361
|
if (options.enableCsrf !== false) {
|
|
@@ -435,7 +370,7 @@ var PlatformModule = class _PlatformModule {
|
|
|
435
370
|
}
|
|
436
371
|
}
|
|
437
372
|
};
|
|
438
|
-
PlatformModule =
|
|
373
|
+
PlatformModule = _ts_decorate5([
|
|
439
374
|
Global(),
|
|
440
375
|
Module({})
|
|
441
376
|
], PlatformModule);
|
|
@@ -470,6 +405,7 @@ __name(configureApp, "configureApp");
|
|
|
470
405
|
import { DevToolsModule, DevToolsV2Module as DevToolsV2Module2 } from "@lark-apaas/nestjs-openapi-devtools";
|
|
471
406
|
export * from "@lark-apaas/nestjs-authnpaas";
|
|
472
407
|
export * from "@lark-apaas/nestjs-datapaas";
|
|
408
|
+
export * from "@lark-apaas/nestjs-trigger";
|
|
473
409
|
export {
|
|
474
410
|
CsrfMiddleware,
|
|
475
411
|
CsrfTokenMiddleware,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lark-apaas/fullstack-nestjs-core",
|
|
3
|
-
"version": "1.1.4-alpha.
|
|
3
|
+
"version": "1.1.4-alpha.6",
|
|
4
4
|
"description": "FullStack Nestjs Core",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -39,10 +39,13 @@
|
|
|
39
39
|
"prepublishOnly": "npm run build"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@lark-apaas/nestjs-authnpaas": "1.0.
|
|
43
|
-
"@lark-apaas/nestjs-
|
|
44
|
-
"@lark-apaas/nestjs-
|
|
42
|
+
"@lark-apaas/nestjs-authnpaas": "^1.0.1",
|
|
43
|
+
"@lark-apaas/nestjs-common": "0.0.1-alpha.1",
|
|
44
|
+
"@lark-apaas/nestjs-datapaas": "1.0.6-alpha.5",
|
|
45
|
+
"@lark-apaas/nestjs-logger": "1.0.2-alpha.14",
|
|
46
|
+
"@lark-apaas/nestjs-observable": "0.0.1-alpha.9",
|
|
45
47
|
"@lark-apaas/nestjs-openapi-devtools": "^1.0.9",
|
|
48
|
+
"@lark-apaas/nestjs-trigger": "0.0.1-alpha.2",
|
|
46
49
|
"cookie-parser": "^1.4.7"
|
|
47
50
|
},
|
|
48
51
|
"devDependencies": {
|
|
@@ -59,7 +62,6 @@
|
|
|
59
62
|
},
|
|
60
63
|
"peerDependencies": {
|
|
61
64
|
"@nestjs/common": "^10.4.20",
|
|
62
|
-
"@nestjs/core": "^10.4.20",
|
|
63
65
|
"@nestjs/platform-express": "^10.4.20",
|
|
64
66
|
"@nestjs/swagger": "^7.4.2",
|
|
65
67
|
"class-transformer": "^0.5.1",
|