@dudousxd/nestjs-durable-dashboard 0.44.0 → 0.45.1
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/server/index.cjs +27 -16
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +8 -23
- package/dist/server/index.d.ts +8 -23
- package/dist/server/index.js +31 -20
- package/dist/server/index.js.map +1 -1
- package/package.json +5 -2
package/dist/server/index.cjs
CHANGED
|
@@ -1224,6 +1224,7 @@ _ts_decorate4([
|
|
|
1224
1224
|
], DurableApiController.prototype, "update", null);
|
|
1225
1225
|
DurableApiController = _ts_decorate4([
|
|
1226
1226
|
(0, import_common4.Controller)(),
|
|
1227
|
+
(0, import_common4.UseInterceptors)(import_nestjs_filter2.ApplyFilterInterceptor),
|
|
1227
1228
|
_ts_metadata4("design:type", Function),
|
|
1228
1229
|
_ts_metadata4("design:paramtypes", [
|
|
1229
1230
|
typeof DashboardService === "undefined" ? Object : DashboardService,
|
|
@@ -2320,25 +2321,38 @@ var DurableApiModule = class _DurableApiModule {
|
|
|
2320
2321
|
return {
|
|
2321
2322
|
module: _DurableApiModule,
|
|
2322
2323
|
imports: [
|
|
2323
|
-
...options.imports ?? []
|
|
2324
|
-
// `validation: 'off'`: the run filter's inputs are validated by its own translation — every
|
|
2325
|
-
// field/operator pair either maps onto a `RunQuery` predicate or is rejected by name — so
|
|
2326
|
-
// there is nothing left for class-validator to check, and requiring it would put a peer
|
|
2327
|
-
// dependency on every consumer of this dashboard for no gain.
|
|
2328
|
-
...options.filterModule === "host" ? [] : [
|
|
2329
|
-
import_nestjs_filter3.FilterModule.forRoot({
|
|
2330
|
-
validation: "off"
|
|
2331
|
-
})
|
|
2332
|
-
]
|
|
2324
|
+
...options.imports ?? []
|
|
2333
2325
|
],
|
|
2334
2326
|
controllers: [
|
|
2335
2327
|
DurableApiController
|
|
2336
2328
|
],
|
|
2337
2329
|
providers: [
|
|
2338
2330
|
DashboardService,
|
|
2339
|
-
//
|
|
2340
|
-
//
|
|
2341
|
-
//
|
|
2331
|
+
// `@dudousxd/nestjs-filter` is wired PRIVATELY here rather than through
|
|
2332
|
+
// `FilterModule.forRoot()`, which is a global registration. A library calling that would
|
|
2333
|
+
// fight the host app over one set of module options and register a second app-wide
|
|
2334
|
+
// interceptor — and it cannot tell at module-definition time whether the host already
|
|
2335
|
+
// called it. Everything below is scoped to this module, so the console composes with an app
|
|
2336
|
+
// that uses the filter library, and with one that has never heard of it, identically.
|
|
2337
|
+
//
|
|
2338
|
+
// `validation: 'off'`: the run filter's inputs are validated by their own translation —
|
|
2339
|
+
// every field/operator pair either maps onto a `RunQuery` predicate or is rejected by
|
|
2340
|
+
// name — so there is nothing left for class-validator to check, and requiring it would put
|
|
2341
|
+
// a peer dependency on every consumer of this dashboard for no gain.
|
|
2342
|
+
//
|
|
2343
|
+
// The `null` adapter is the GLOBAL one, deliberately absent: `RunFilter` names its own via
|
|
2344
|
+
// `@Filterable({ adapter })`, so the console runs on the durable run gateway while the host
|
|
2345
|
+
// app's filters keep running on whatever adapter it registered.
|
|
2346
|
+
{
|
|
2347
|
+
provide: import_nestjs_filter3.FilterRunner,
|
|
2348
|
+
useFactory: /* @__PURE__ */ __name((moduleRef) => new import_nestjs_filter3.FilterRunner(moduleRef, {
|
|
2349
|
+
validation: "off"
|
|
2350
|
+
}, null), "useFactory"),
|
|
2351
|
+
inject: [
|
|
2352
|
+
import_core.ModuleRef
|
|
2353
|
+
]
|
|
2354
|
+
},
|
|
2355
|
+
import_nestjs_filter3.ApplyFilterInterceptor,
|
|
2342
2356
|
RunQueryAdapter,
|
|
2343
2357
|
{
|
|
2344
2358
|
provide: RUN_QUERY_ADAPTER,
|
|
@@ -2396,9 +2410,6 @@ var DurableDashboardModule = class _DurableDashboardModule {
|
|
|
2396
2410
|
...options.guards ? {
|
|
2397
2411
|
guards: options.guards
|
|
2398
2412
|
} : {},
|
|
2399
|
-
...options.filterModule ? {
|
|
2400
|
-
filterModule: options.filterModule
|
|
2401
|
-
} : {},
|
|
2402
2413
|
authProvider,
|
|
2403
2414
|
authMayBeConfigured
|
|
2404
2415
|
}),
|