@venizia/ignis 0.1.1-2 → 0.1.1-4
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/base/applications/abstract.d.ts +6 -0
- package/dist/base/applications/abstract.d.ts.map +1 -1
- package/dist/base/applications/abstract.js +19 -0
- package/dist/base/applications/abstract.js.map +1 -1
- package/dist/base/applications/base.d.ts +18 -1
- package/dist/base/applications/base.d.ts.map +1 -1
- package/dist/base/applications/base.js +121 -2
- package/dist/base/applications/base.js.map +1 -1
- package/dist/base/controllers/factory/definition.d.ts +81 -27
- package/dist/base/controllers/factory/definition.d.ts.map +1 -1
- package/dist/base/middlewares/app-error/app-error.middleware.d.ts +17 -4
- package/dist/base/middlewares/app-error/app-error.middleware.d.ts.map +1 -1
- package/dist/base/middlewares/app-error/app-error.middleware.js +109 -59
- package/dist/base/middlewares/app-error/app-error.middleware.js.map +1 -1
- package/dist/base/middlewares/app-error/definition.d.ts +7 -0
- package/dist/base/middlewares/app-error/definition.d.ts.map +1 -1
- package/dist/base/middlewares/app-error/definition.js +9 -1
- package/dist/base/middlewares/app-error/definition.js.map +1 -1
- package/dist/base/middlewares/app-error/types.d.ts +12 -0
- package/dist/base/middlewares/app-error/types.d.ts.map +1 -1
- package/dist/base/middlewares/app-error/zod.handler.d.ts +6 -6
- package/dist/base/middlewares/app-error/zod.handler.d.ts.map +1 -1
- package/dist/base/middlewares/app-error/zod.handler.js +7 -10
- package/dist/base/middlewares/app-error/zod.handler.js.map +1 -1
- package/dist/base/models/common/types.d.ts +9 -3
- package/dist/base/models/common/types.d.ts.map +1 -1
- package/dist/components/auth/authenticate/controllers/jwks/definitions.d.ts +9 -3
- package/dist/components/auth/authenticate/controllers/jwks/definitions.d.ts.map +1 -1
- package/dist/components/static-asset/controller/base.definition.d.ts +90 -30
- package/dist/components/static-asset/controller/base.definition.d.ts.map +1 -1
- package/dist/connectors/postgres/datasources/abstract.d.ts +23 -1
- package/dist/connectors/postgres/datasources/abstract.d.ts.map +1 -1
- package/dist/connectors/postgres/datasources/abstract.js +86 -6
- package/dist/connectors/postgres/datasources/abstract.js.map +1 -1
- package/dist/connectors/search/controllers/definition.d.ts +18 -6
- package/dist/connectors/search/controllers/definition.d.ts.map +1 -1
- package/dist/connectors/search/internal/search-connector-internal.js +1 -1
- package/dist/connectors/search/internal/search-connector-internal.js.map +1 -1
- package/dist/utilities/jsx.utility.d.ts +9 -3
- package/dist/utilities/jsx.utility.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -33,11 +33,17 @@ export declare const StaticAssetDefinitions: {
|
|
|
33
33
|
content: {
|
|
34
34
|
'application/json': {
|
|
35
35
|
schema: z.ZodObject<{
|
|
36
|
-
name: z.ZodOptional<z.ZodString>;
|
|
37
36
|
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
38
|
-
messageCode: z.ZodOptional<z.ZodString>;
|
|
39
37
|
message: z.ZodString;
|
|
40
|
-
|
|
38
|
+
normalized: z.ZodOptional<z.ZodObject<{
|
|
39
|
+
text: z.ZodString;
|
|
40
|
+
code: z.ZodString;
|
|
41
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
42
|
+
}, z.core.$strip>>;
|
|
43
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
44
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
45
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
46
|
+
}, z.core.$strip>;
|
|
41
47
|
};
|
|
42
48
|
};
|
|
43
49
|
required: boolean | undefined;
|
|
@@ -82,11 +88,17 @@ export declare const StaticAssetDefinitions: {
|
|
|
82
88
|
content: {
|
|
83
89
|
'application/json': {
|
|
84
90
|
schema: z.ZodObject<{
|
|
85
|
-
name: z.ZodOptional<z.ZodString>;
|
|
86
91
|
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
87
|
-
messageCode: z.ZodOptional<z.ZodString>;
|
|
88
92
|
message: z.ZodString;
|
|
89
|
-
|
|
93
|
+
normalized: z.ZodOptional<z.ZodObject<{
|
|
94
|
+
text: z.ZodString;
|
|
95
|
+
code: z.ZodString;
|
|
96
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
97
|
+
}, z.core.$strip>>;
|
|
98
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
99
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
100
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
101
|
+
}, z.core.$strip>;
|
|
90
102
|
};
|
|
91
103
|
};
|
|
92
104
|
required: boolean | undefined;
|
|
@@ -131,11 +143,17 @@ export declare const StaticAssetDefinitions: {
|
|
|
131
143
|
content: {
|
|
132
144
|
'application/json': {
|
|
133
145
|
schema: z.ZodObject<{
|
|
134
|
-
name: z.ZodOptional<z.ZodString>;
|
|
135
146
|
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
136
|
-
messageCode: z.ZodOptional<z.ZodString>;
|
|
137
147
|
message: z.ZodString;
|
|
138
|
-
|
|
148
|
+
normalized: z.ZodOptional<z.ZodObject<{
|
|
149
|
+
text: z.ZodString;
|
|
150
|
+
code: z.ZodString;
|
|
151
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
152
|
+
}, z.core.$strip>>;
|
|
153
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
154
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
155
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
156
|
+
}, z.core.$strip>;
|
|
139
157
|
};
|
|
140
158
|
};
|
|
141
159
|
required: boolean | undefined;
|
|
@@ -168,11 +186,17 @@ export declare const StaticAssetDefinitions: {
|
|
|
168
186
|
content: {
|
|
169
187
|
'application/json': {
|
|
170
188
|
schema: z.ZodObject<{
|
|
171
|
-
name: z.ZodOptional<z.ZodString>;
|
|
172
189
|
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
173
|
-
messageCode: z.ZodOptional<z.ZodString>;
|
|
174
190
|
message: z.ZodString;
|
|
175
|
-
|
|
191
|
+
normalized: z.ZodOptional<z.ZodObject<{
|
|
192
|
+
text: z.ZodString;
|
|
193
|
+
code: z.ZodString;
|
|
194
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
195
|
+
}, z.core.$strip>>;
|
|
196
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
197
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
198
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
199
|
+
}, z.core.$strip>;
|
|
176
200
|
};
|
|
177
201
|
};
|
|
178
202
|
required: boolean | undefined;
|
|
@@ -205,11 +229,17 @@ export declare const StaticAssetDefinitions: {
|
|
|
205
229
|
content: {
|
|
206
230
|
'application/json': {
|
|
207
231
|
schema: z.ZodObject<{
|
|
208
|
-
name: z.ZodOptional<z.ZodString>;
|
|
209
232
|
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
210
|
-
messageCode: z.ZodOptional<z.ZodString>;
|
|
211
233
|
message: z.ZodString;
|
|
212
|
-
|
|
234
|
+
normalized: z.ZodOptional<z.ZodObject<{
|
|
235
|
+
text: z.ZodString;
|
|
236
|
+
code: z.ZodString;
|
|
237
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
238
|
+
}, z.core.$strip>>;
|
|
239
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
240
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
241
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
242
|
+
}, z.core.$strip>;
|
|
213
243
|
};
|
|
214
244
|
};
|
|
215
245
|
required: boolean | undefined;
|
|
@@ -275,11 +305,17 @@ export declare const StaticAssetDefinitions: {
|
|
|
275
305
|
content: {
|
|
276
306
|
'application/json': {
|
|
277
307
|
schema: z.ZodObject<{
|
|
278
|
-
name: z.ZodOptional<z.ZodString>;
|
|
279
308
|
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
280
|
-
messageCode: z.ZodOptional<z.ZodString>;
|
|
281
309
|
message: z.ZodString;
|
|
282
|
-
|
|
310
|
+
normalized: z.ZodOptional<z.ZodObject<{
|
|
311
|
+
text: z.ZodString;
|
|
312
|
+
code: z.ZodString;
|
|
313
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
314
|
+
}, z.core.$strip>>;
|
|
315
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
316
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
317
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
318
|
+
}, z.core.$strip>;
|
|
283
319
|
};
|
|
284
320
|
};
|
|
285
321
|
required: boolean | undefined;
|
|
@@ -322,11 +358,17 @@ export declare const StaticAssetDefinitions: {
|
|
|
322
358
|
content: {
|
|
323
359
|
'application/json': {
|
|
324
360
|
schema: z.ZodObject<{
|
|
325
|
-
name: z.ZodOptional<z.ZodString>;
|
|
326
361
|
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
327
|
-
messageCode: z.ZodOptional<z.ZodString>;
|
|
328
362
|
message: z.ZodString;
|
|
329
|
-
|
|
363
|
+
normalized: z.ZodOptional<z.ZodObject<{
|
|
364
|
+
text: z.ZodString;
|
|
365
|
+
code: z.ZodString;
|
|
366
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
367
|
+
}, z.core.$strip>>;
|
|
368
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
369
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
370
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
371
|
+
}, z.core.$strip>;
|
|
330
372
|
};
|
|
331
373
|
};
|
|
332
374
|
required: boolean | undefined;
|
|
@@ -370,11 +412,17 @@ export declare const StaticAssetDefinitions: {
|
|
|
370
412
|
content: {
|
|
371
413
|
'application/json': {
|
|
372
414
|
schema: z.ZodObject<{
|
|
373
|
-
name: z.ZodOptional<z.ZodString>;
|
|
374
415
|
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
375
|
-
messageCode: z.ZodOptional<z.ZodString>;
|
|
376
416
|
message: z.ZodString;
|
|
377
|
-
|
|
417
|
+
normalized: z.ZodOptional<z.ZodObject<{
|
|
418
|
+
text: z.ZodString;
|
|
419
|
+
code: z.ZodString;
|
|
420
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
421
|
+
}, z.core.$strip>>;
|
|
422
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
423
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
424
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
425
|
+
}, z.core.$strip>;
|
|
378
426
|
};
|
|
379
427
|
};
|
|
380
428
|
required: boolean | undefined;
|
|
@@ -430,11 +478,17 @@ export declare const StaticAssetDefinitions: {
|
|
|
430
478
|
content: {
|
|
431
479
|
'application/json': {
|
|
432
480
|
schema: z.ZodObject<{
|
|
433
|
-
name: z.ZodOptional<z.ZodString>;
|
|
434
481
|
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
435
|
-
messageCode: z.ZodOptional<z.ZodString>;
|
|
436
482
|
message: z.ZodString;
|
|
437
|
-
|
|
483
|
+
normalized: z.ZodOptional<z.ZodObject<{
|
|
484
|
+
text: z.ZodString;
|
|
485
|
+
code: z.ZodString;
|
|
486
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
487
|
+
}, z.core.$strip>>;
|
|
488
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
489
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
490
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
491
|
+
}, z.core.$strip>;
|
|
438
492
|
};
|
|
439
493
|
};
|
|
440
494
|
required: boolean | undefined;
|
|
@@ -480,11 +534,17 @@ export declare const StaticAssetDefinitions: {
|
|
|
480
534
|
content: {
|
|
481
535
|
'application/json': {
|
|
482
536
|
schema: z.ZodObject<{
|
|
483
|
-
name: z.ZodOptional<z.ZodString>;
|
|
484
537
|
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
485
|
-
messageCode: z.ZodOptional<z.ZodString>;
|
|
486
538
|
message: z.ZodString;
|
|
487
|
-
|
|
539
|
+
normalized: z.ZodOptional<z.ZodObject<{
|
|
540
|
+
text: z.ZodString;
|
|
541
|
+
code: z.ZodString;
|
|
542
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
543
|
+
}, z.core.$strip>>;
|
|
544
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
545
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
546
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
547
|
+
}, z.core.$strip>;
|
|
488
548
|
};
|
|
489
549
|
};
|
|
490
550
|
required: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.definition.d.ts","sourceRoot":"","sources":["../../../../src/components/static-asset/controller/base.definition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAatC,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"base.definition.d.ts","sourceRoot":"","sources":["../../../../src/components/static-asset/controller/base.definition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAatC,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuUlC,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { TAnyDataSourceSchema } from '../../../base/datasources';
|
|
|
2
2
|
import { AbstractDataSource } from '../../../base/datasources';
|
|
3
3
|
import type { IRelationalDriver } from '../../../connectors/postgres/drivers';
|
|
4
4
|
import type { IRelationalQueryDialect } from '../../../connectors/postgres/repositories/common';
|
|
5
|
-
import type { ValueOrPromise } from '@venizia/ignis-helpers';
|
|
5
|
+
import type { AnyObject, TClass, ValueOrPromise } from '@venizia/ignis-helpers';
|
|
6
6
|
import type { Pool } from 'pg';
|
|
7
7
|
import type { IDatabaseTransaction, IDatabaseTransactionOptions, IPostgresDataSource, TRelationalConnector } from './common';
|
|
8
8
|
/** SQL branch root: connector, pool, transactions. */
|
|
@@ -16,6 +16,12 @@ export declare abstract class AbstractRelationalDataSource<Settings extends obje
|
|
|
16
16
|
* assigned, then wires the connector from it. Idempotent and lazy.
|
|
17
17
|
*/
|
|
18
18
|
protected wireDriverFromMetadata(): void;
|
|
19
|
+
/**
|
|
20
|
+
* Reads the driver CLASS named by `@datasource({ driver })`. Absent for an imperatively-registered
|
|
21
|
+
* datasource; the type forbids a driver-name string, so this catches an untyped JavaScript caller -
|
|
22
|
+
* and a string is exactly the mistake to catch, because it carries no module into the bundle.
|
|
23
|
+
*/
|
|
24
|
+
protected resolveDriverClass(): TClass<IRelationalDriver<Schema>>;
|
|
19
25
|
protected resolveDriver(): IRelationalDriver<Schema>;
|
|
20
26
|
/**
|
|
21
27
|
* Wires a driver in one step: assigns `this.driver` AND builds `this.connector` from it. The
|
|
@@ -38,5 +44,21 @@ export declare abstract class AbstractRelationalDataSource<Settings extends obje
|
|
|
38
44
|
*/
|
|
39
45
|
getClient(): Client;
|
|
40
46
|
getQueryDialect(): IRelationalQueryDialect;
|
|
47
|
+
/**
|
|
48
|
+
* Soft-evicts the connection pool after a secret rotation. Builds a fresh pool + driver + connector
|
|
49
|
+
* against the rotated credentials WITHOUT disturbing the live fields, then swaps them in atomically
|
|
50
|
+
* and drains the old pool - so in-flight work finishes on the old pool while new work uses the new
|
|
51
|
+
* one. If the rebuild throws (bad rotated creds, transient failure) the live state is left exactly
|
|
52
|
+
* as it was, any half-built pool is drained rather than leaked, and the error is rethrown so the
|
|
53
|
+
* dispatcher can surface it - the datasource keeps serving on the old pool throughout.
|
|
54
|
+
*/
|
|
55
|
+
onSecretRotated(opts: {
|
|
56
|
+
key: string;
|
|
57
|
+
secret: Record<string, string>;
|
|
58
|
+
}): Promise<void>;
|
|
59
|
+
/** Vault's database engine returns `{ username, password }`; pg expects `{ user, password }`. */
|
|
60
|
+
protected mapSecretToSettings(opts: {
|
|
61
|
+
secret: Record<string, string>;
|
|
62
|
+
}): AnyObject;
|
|
41
63
|
}
|
|
42
64
|
//# sourceMappingURL=abstract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract.d.ts","sourceRoot":"","sources":["../../../../src/connectors/postgres/datasources/abstract.ts"],"names":[],"mappings":"AAAA,OAAO,KA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S,CAAC,MAAM,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAE7C,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAA0B;IAEtD;;;OAGG;IACH,SAAS,CAAC,sBAAsB,IAAI,IAAI;IAoBxC;;;;OAIG;IACH,SAAS,CAAC,kBAAkB,IAAI,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAejE,SAAS,CAAC,aAAa,IAAI,iBAAiB,CAAC,MAAM,CAAC;IAKpD;;;;;OAKG;IACH,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAKvF,QAAQ,CAAC,mBAAmB,IAAI,cAAc,CAAC,MAAM,CAAC;aACpC,gBAAgB,CAChC,IAAI,CAAC,EAAE,2BAA2B,GACjC,OAAO,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAExC,kGAAkG;IAClG,YAAY,IAAI,oBAAoB,CAAC,MAAM,CAAC;IAK5C;;;;OAIG;IACH,SAAS,IAAI,MAAM;IAcnB,eAAe,IAAI,uBAAuB;IAM1C;;;;;;;OAOG;IACG,eAAe,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA4D3F,iGAAiG;IACjG,SAAS,CAAC,mBAAmB,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,SAAS;CAWnF"}
|
|
@@ -24,20 +24,25 @@ class AbstractRelationalDataSource extends datasources_1.AbstractDataSource {
|
|
|
24
24
|
message: `[${this.constructor.name}][wireDriverFromMetadata] No driver and no client | Assign this.client in configure(), or wire a custom driver with useDriver()`,
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
const DriverClass = this.resolveDriverClass();
|
|
28
|
+
this.useDriver({ driver: new DriverClass({ client: this.client }) });
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Reads the driver CLASS named by `@datasource({ driver })`. Absent for an imperatively-registered
|
|
32
|
+
* datasource; the type forbids a driver-name string, so this catches an untyped JavaScript caller -
|
|
33
|
+
* and a string is exactly the mistake to catch, because it carries no module into the bundle.
|
|
34
|
+
*/
|
|
35
|
+
resolveDriverClass() {
|
|
28
36
|
const metadata = inversion_1.MetadataRegistry.getInstance().getDataSourceMetadata({
|
|
29
37
|
target: this.constructor,
|
|
30
38
|
});
|
|
31
39
|
const driver = metadata?.driver;
|
|
32
|
-
// The type forbids a driver-name string, so this catches an untyped JavaScript caller - and a
|
|
33
|
-
// string is exactly the mistake to catch, because it carries no module into the bundle.
|
|
34
40
|
if (typeof driver !== 'function') {
|
|
35
41
|
throw (0, ignis_helpers_1.getError)({
|
|
36
|
-
message: `[${this.constructor.name}][
|
|
42
|
+
message: `[${this.constructor.name}][resolveDriverClass] @datasource({ driver }) must name a driver CLASS | Got: ${String(driver)} | Use \`@datasource({ driver: NodePostgresDriver })\` with \`import { NodePostgresDriver } from '@venizia/ignis/postgres/node-postgres'\`, or wire a custom driver with useDriver()`,
|
|
37
43
|
});
|
|
38
44
|
}
|
|
39
|
-
|
|
40
|
-
this.useDriver({ driver: new DriverClass({ client: this.client }) });
|
|
45
|
+
return driver;
|
|
41
46
|
}
|
|
42
47
|
resolveDriver() {
|
|
43
48
|
this.wireDriverFromMetadata();
|
|
@@ -78,6 +83,81 @@ class AbstractRelationalDataSource extends datasources_1.AbstractDataSource {
|
|
|
78
83
|
AbstractRelationalDataSource.queryDialect ??= new filter_1.FilterBuilder();
|
|
79
84
|
return AbstractRelationalDataSource.queryDialect;
|
|
80
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Soft-evicts the connection pool after a secret rotation. Builds a fresh pool + driver + connector
|
|
88
|
+
* against the rotated credentials WITHOUT disturbing the live fields, then swaps them in atomically
|
|
89
|
+
* and drains the old pool - so in-flight work finishes on the old pool while new work uses the new
|
|
90
|
+
* one. If the rebuild throws (bad rotated creds, transient failure) the live state is left exactly
|
|
91
|
+
* as it was, any half-built pool is drained rather than leaked, and the error is rethrown so the
|
|
92
|
+
* dispatcher can surface it - the datasource keeps serving on the old pool throughout.
|
|
93
|
+
*/
|
|
94
|
+
async onSecretRotated(opts) {
|
|
95
|
+
const logger = this.logger.for(this.onSecretRotated.name);
|
|
96
|
+
const oldClient = this.getClient();
|
|
97
|
+
// Snapshot so a failed rebuild restores the datasource verbatim. `settings` is copied because
|
|
98
|
+
// rotation mutates it in place; the live client stays untouched, keeping the old pool serving.
|
|
99
|
+
const savedClient = this.client;
|
|
100
|
+
const savedSettings = { ...this.settings };
|
|
101
|
+
// Rotation takes effect only through this.settings + configure(); a configure() that builds its
|
|
102
|
+
// pool from a hard-coded connection string or reads Envs directly rebuilds with stale credentials.
|
|
103
|
+
Object.assign(this.settings, this.mapSecretToSettings({ secret: opts.secret }));
|
|
104
|
+
// configure() overwrites this.client with the freshly-built pool; capture it into a local and
|
|
105
|
+
// immediately restore the old client so the live driver/connector stay on the old pool until the
|
|
106
|
+
// swap. The old client keeps serving throughout - the live fields are never nulled.
|
|
107
|
+
let newClient;
|
|
108
|
+
try {
|
|
109
|
+
await this.configure();
|
|
110
|
+
newClient = this.client;
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
const halfBuilt = this.client;
|
|
114
|
+
this.client = savedClient;
|
|
115
|
+
Object.assign(this.settings, savedSettings);
|
|
116
|
+
if (halfBuilt && halfBuilt !== savedClient && typeof halfBuilt.end === 'function') {
|
|
117
|
+
await halfBuilt.end();
|
|
118
|
+
}
|
|
119
|
+
logger.error('Secret rotation failed in configure(); kept old pool | key: %s', opts.key);
|
|
120
|
+
throw error;
|
|
121
|
+
}
|
|
122
|
+
this.client = savedClient;
|
|
123
|
+
// Wire a driver + connector over the new pool into locals, still without touching live state.
|
|
124
|
+
let newDriver;
|
|
125
|
+
let newConnector;
|
|
126
|
+
try {
|
|
127
|
+
const DriverClass = this.resolveDriverClass();
|
|
128
|
+
newDriver = new DriverClass({ client: newClient });
|
|
129
|
+
newConnector = newDriver.createConnector({ schema: this.getSchema() });
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
Object.assign(this.settings, savedSettings);
|
|
133
|
+
if (newClient && typeof newClient.end === 'function') {
|
|
134
|
+
await newClient.end();
|
|
135
|
+
}
|
|
136
|
+
logger.error('Secret rotation failed while wiring driver; kept old pool | key: %s', opts.key);
|
|
137
|
+
throw error;
|
|
138
|
+
}
|
|
139
|
+
// New pool fully built: commit the live fields to it in one synchronous step (no null window),
|
|
140
|
+
// then soft-evict the old pool so its in-flight transactions can finish.
|
|
141
|
+
this.client = newClient;
|
|
142
|
+
this.driver = newDriver;
|
|
143
|
+
this.connector = newConnector;
|
|
144
|
+
if (oldClient && typeof oldClient.end === 'function') {
|
|
145
|
+
await oldClient.end();
|
|
146
|
+
logger.info('Old pool drained after secret rotation | key: %s', opts.key);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
/** Vault's database engine returns `{ username, password }`; pg expects `{ user, password }`. */
|
|
150
|
+
mapSecretToSettings(opts) {
|
|
151
|
+
const { username, password } = opts.secret;
|
|
152
|
+
const mapped = {};
|
|
153
|
+
if (username !== undefined) {
|
|
154
|
+
mapped.user = username;
|
|
155
|
+
}
|
|
156
|
+
if (password !== undefined) {
|
|
157
|
+
mapped.password = password;
|
|
158
|
+
}
|
|
159
|
+
return mapped;
|
|
160
|
+
}
|
|
81
161
|
}
|
|
82
162
|
exports.AbstractRelationalDataSource = AbstractRelationalDataSource;
|
|
83
163
|
//# sourceMappingURL=abstract.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract.js","sourceRoot":"","sources":["../../../../src/connectors/postgres/datasources/abstract.ts"],"names":[],"mappings":";;;AACA,oDAAwD;AAGxD,8EAAkF;AAClF,mDAAuD;AAEvD,0DAAkD;AASlD,sDAAsD;AACtD,MAAsB,4BAMpB,SAAQ,gCAAyD;IAUjE;;;OAGG;IACO,sBAAsB;QAC9B,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,OAAO;QACT,CAAC;QAED,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;YAC3E,OAAO;QACT,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,MAAM,IAAA,wBAAQ,EAAC;gBACb,OAAO,EAAE,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,iIAAiI;aACpK,CAAC,CAAC;QACL,CAAC;QAED,
|
|
1
|
+
{"version":3,"file":"abstract.js","sourceRoot":"","sources":["../../../../src/connectors/postgres/datasources/abstract.ts"],"names":[],"mappings":";;;AACA,oDAAwD;AAGxD,8EAAkF;AAClF,mDAAuD;AAEvD,0DAAkD;AASlD,sDAAsD;AACtD,MAAsB,4BAMpB,SAAQ,gCAAyD;IAUjE;;;OAGG;IACO,sBAAsB;QAC9B,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,OAAO;QACT,CAAC;QAED,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;YAC3E,OAAO;QACT,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,MAAM,IAAA,wBAAQ,EAAC;gBACb,OAAO,EAAE,IAAI,IAAI,CAAC,WAAW,CAAC,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I,SAAS,IAAI,OAAO,SAAS,CAAC,GAAG,KAAK,UAAU,EAAE,CAAC;YACrD,MAAM,SAAS,CAAC,GAAG,EAAE,CAAC;YACtB,MAAM,CAAC,IAAI,CAAC,kDAAkD,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QAC5E,CAAC;IACH,CAAC;IAED,iGAAiG;IACvF,mBAAmB,CAAC,IAAwC;QACpE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3C,MAAM,MAAM,GAAc,EAAE,CAAC;QAC7B,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;QACzB,CAAC;QACD,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC7B,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAhMD,oEAgMC"}
|
|
@@ -153,11 +153,17 @@ export declare const defineSearchRouteConfigs: (opts: {
|
|
|
153
153
|
content: {
|
|
154
154
|
'application/json': {
|
|
155
155
|
schema: z.ZodObject<{
|
|
156
|
-
name: z.ZodOptional<z.ZodString>;
|
|
157
156
|
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
158
|
-
messageCode: z.ZodOptional<z.ZodString>;
|
|
159
157
|
message: z.ZodString;
|
|
160
|
-
|
|
158
|
+
normalized: z.ZodOptional<z.ZodObject<{
|
|
159
|
+
text: z.ZodString;
|
|
160
|
+
code: z.ZodString;
|
|
161
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
162
|
+
}, z.core.$strip>>;
|
|
163
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
164
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
165
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
166
|
+
}, z.core.$strip>;
|
|
161
167
|
};
|
|
162
168
|
};
|
|
163
169
|
required: boolean | undefined;
|
|
@@ -236,11 +242,17 @@ export declare const defineSearchRouteConfigs: (opts: {
|
|
|
236
242
|
content: {
|
|
237
243
|
'application/json': {
|
|
238
244
|
schema: z.ZodObject<{
|
|
239
|
-
name: z.ZodOptional<z.ZodString>;
|
|
240
245
|
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
241
|
-
messageCode: z.ZodOptional<z.ZodString>;
|
|
242
246
|
message: z.ZodString;
|
|
243
|
-
|
|
247
|
+
normalized: z.ZodOptional<z.ZodObject<{
|
|
248
|
+
text: z.ZodString;
|
|
249
|
+
code: z.ZodString;
|
|
250
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
251
|
+
}, z.core.$strip>>;
|
|
252
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
253
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
254
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
255
|
+
}, z.core.$strip>;
|
|
244
256
|
};
|
|
245
257
|
};
|
|
246
258
|
required: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../../src/connectors/search/controllers/definition.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAChG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAItC,eAAO,MAAM,wBAAwB,GAAI,MAAM;IAC7C,YAAY,EAAE,CAAC,CAAC,UAAU,CAAC;IAC3B,YAAY,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,aAAa,EAAE,CAAC;QAAC,IAAI,CAAC,EAAE,SAAS,CAAA;KAAE,CAAC;IAClE,SAAS,CAAC,EAAE,kBAAkB,GAAG,kBAAkB,EAAE,CAAC;CACvD;;;;;;yBAF+B,aAAa,EAAE;mBAAS,SAAS
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../../src/connectors/search/controllers/definition.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAChG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAItC,eAAO,MAAM,wBAAwB,GAAI,MAAM;IAC7C,YAAY,EAAE,CAAC,CAAC,UAAU,CAAC;IAC3B,YAAY,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,aAAa,EAAE,CAAC;QAAC,IAAI,CAAC,EAAE,SAAS,CAAA;KAAE,CAAC;IAClE,SAAS,CAAC,EAAE,kBAAkB,GAAG,kBAAkB,EAAE,CAAC;CACvD;;;;;;yBAF+B,aAAa,EAAE;mBAAS,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAAjC,aAAa,EAAE;mBAAS,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsDhE,CAAC"}
|
|
@@ -21,7 +21,7 @@ class SearchConnectorInternal {
|
|
|
21
21
|
statusCode: ignis_helpers_1.HTTP.ResultCodes.RS_5.ServiceUnavailable,
|
|
22
22
|
messageCode: common_1.SearchErrorCodes.DEPENDENCY_UNAVAILABLE,
|
|
23
23
|
message: `[${method}] Search engine is temporarily unavailable.`,
|
|
24
|
-
...(details ? { details } : {}),
|
|
24
|
+
...(details ? { extra: { details } } : {}),
|
|
25
25
|
});
|
|
26
26
|
// The original engine error carries the code the CALLER may need to classify on - Meilisearch
|
|
27
27
|
// reports `index_already_exists` as a failed TASK, and a connector that tolerates it (an
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-connector-internal.js","sourceRoot":"","sources":["../../../../src/connectors/search/internal/search-connector-internal.ts"],"names":[],"mappings":";;;AAAA,qCAA4C;AAE5C,0DAAwD;AAExD,6KAA6K;AAC7K,MAAa,uBAAuB;IAClC,2GAA2G;IAC3G,MAAM,CAAC,aAAa,CAAC,IAAwB;QAC3C,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;QACvB,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACzE,CAAC;IAED,qFAAqF;IACrF,gGAAgG;IAChG,MAAM,CAAC,mBAAmB,CAAC,IAK1B;QACC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QAEhD,MAAM;aACH,GAAG,CAAC,MAAM,CAAC;aACX,KAAK,CACJ,6CAA6C,EAC7C,uBAAuB,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,CAAC,CACjD,CAAC;QAEJ,MAAM,OAAO,GAAG,IAAA,wBAAQ,EAAC;YACvB,UAAU,EAAE,oBAAI,CAAC,WAAW,CAAC,IAAI,CAAC,kBAAkB;YACpD,WAAW,EAAE,yBAAgB,CAAC,sBAAsB;YACpD,OAAO,EAAE,IAAI,MAAM,6CAA6C;YAChE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"search-connector-internal.js","sourceRoot":"","sources":["../../../../src/connectors/search/internal/search-connector-internal.ts"],"names":[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jC,MAAM,IAAA,wBAAQ,EAAC;YACb,UAAU,EAAE,oBAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ;YAC1C,WAAW,EAAE,yBAAgB,CAAC,SAAS;YACvC,OAAO,EAAE,IAAI,MAAM,KAAK,OAAO,aAAa;SAC7C,CAAC,CAAC;IACL,CAAC;CACF;AApDD,0DAoDC"}
|
|
@@ -31,11 +31,17 @@ export declare const htmlResponse: (opts: {
|
|
|
31
31
|
content: {
|
|
32
32
|
'application/json': {
|
|
33
33
|
schema: z.ZodObject<{
|
|
34
|
-
name: z.ZodOptional<z.ZodString>;
|
|
35
34
|
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
36
|
-
messageCode: z.ZodOptional<z.ZodString>;
|
|
37
35
|
message: z.ZodString;
|
|
38
|
-
|
|
36
|
+
normalized: z.ZodOptional<z.ZodObject<{
|
|
37
|
+
text: z.ZodString;
|
|
38
|
+
code: z.ZodString;
|
|
39
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
42
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
43
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
44
|
+
}, z.core.$strip>;
|
|
39
45
|
};
|
|
40
46
|
};
|
|
41
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsx.utility.d.ts","sourceRoot":"","sources":["../../src/utilities/jsx.utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAGtC,oEAAoE;AACpE,eAAO,MAAM,WAAW,GAAI,MAAM;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE;;;;;;;;CAe5E,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,YAAY,GAAI,MAAM;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE
|
|
1
|
+
{"version":3,"file":"jsx.utility.d.ts","sourceRoot":"","sources":["../../src/utilities/jsx.utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAGtC,oEAAoE;AACpE,eAAO,MAAM,WAAW,GAAI,MAAM;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE;;;;;;;;CAe5E,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,YAAY,GAAI,MAAM;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAe7E,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venizia/ignis",
|
|
3
|
-
"version": "0.1.1-
|
|
3
|
+
"version": "0.1.1-4",
|
|
4
4
|
"description": "High-performance TypeScript server infrastructure combining LoopBack 4 enterprise architecture (decorator-based DI, repository pattern, component system) with Hono speed (~140k req/s). Features auto-generated OpenAPI docs, Drizzle ORM type-safe SQL, JWT/Basic authentication, Casbin authorization, convention-based bootstrapping, and pluggable components for health checks, Swagger UI, mail, Socket.IO, and static assets. Built for Bun and Node.js.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"access-control",
|
|
@@ -182,9 +182,9 @@
|
|
|
182
182
|
"prepublishOnly": "bun run rebuild"
|
|
183
183
|
},
|
|
184
184
|
"dependencies": {
|
|
185
|
-
"@venizia/ignis-boot": "^0.1.1-
|
|
186
|
-
"@venizia/ignis-helpers": "^0.1.1-
|
|
187
|
-
"@venizia/ignis-inversion": "^0.1.
|
|
185
|
+
"@venizia/ignis-boot": "^0.1.1-2",
|
|
186
|
+
"@venizia/ignis-helpers": "^0.1.1-2",
|
|
187
|
+
"@venizia/ignis-inversion": "^0.1.1-1",
|
|
188
188
|
"lodash": "^4.18.1",
|
|
189
189
|
"reflect-metadata": "^0.2.2"
|
|
190
190
|
},
|