@alevnyacow/nzmt 0.1.6 → 0.1.7
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/bin/cli.js +2 -1
- package/dist/index.cjs +5 -2
- package/dist/index.js +5 -2
- package/dist/store/store.ram.utils.d.ts +1 -1
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -79,7 +79,8 @@ function createDefaultConfig() {
|
|
|
79
79
|
providers: './src/backend/providers',
|
|
80
80
|
controllers: './src/backend/controllers',
|
|
81
81
|
entities: './src/shared/entities',
|
|
82
|
-
queries: './src/client/shared/queries'
|
|
82
|
+
queries: './src/client/shared/queries',
|
|
83
|
+
di: './src/backend/dependency-injection'
|
|
83
84
|
},
|
|
84
85
|
dependencyInjection: {
|
|
85
86
|
inversifyjs: {
|
package/dist/index.cjs
CHANGED
|
@@ -449,10 +449,13 @@ const InRAM = (schemas, options)=>{
|
|
|
449
449
|
...payload,
|
|
450
450
|
id: Math.random().toString()
|
|
451
451
|
});
|
|
452
|
-
___mapUpdatePayloadToDetail = (prevValue,
|
|
452
|
+
___mapUpdatePayloadToDetail = (prevValue, rawUpdate)=>{
|
|
453
|
+
const update = Object.fromEntries(Object.entries(rawUpdate).filter(([, value])=>void 0 !== value));
|
|
454
|
+
return {
|
|
453
455
|
...prevValue,
|
|
454
456
|
...update
|
|
455
|
-
}
|
|
457
|
+
};
|
|
458
|
+
};
|
|
456
459
|
constructor(){
|
|
457
460
|
if (!options) return;
|
|
458
461
|
if (options.searchLogic) {
|
package/dist/index.js
CHANGED
|
@@ -410,10 +410,13 @@ const InRAM = (schemas, options)=>{
|
|
|
410
410
|
...payload,
|
|
411
411
|
id: Math.random().toString()
|
|
412
412
|
});
|
|
413
|
-
___mapUpdatePayloadToDetail = (prevValue,
|
|
413
|
+
___mapUpdatePayloadToDetail = (prevValue, rawUpdate)=>{
|
|
414
|
+
const update = Object.fromEntries(Object.entries(rawUpdate).filter(([, value])=>void 0 !== value));
|
|
415
|
+
return {
|
|
414
416
|
...prevValue,
|
|
415
417
|
...update
|
|
416
|
-
}
|
|
418
|
+
};
|
|
419
|
+
};
|
|
417
420
|
constructor(){
|
|
418
421
|
if (!options) return;
|
|
419
422
|
if (options.searchLogic) {
|
|
@@ -709,7 +709,7 @@ export declare const InRAM: <T extends Metadata>(schemas: T, options?: {
|
|
|
709
709
|
___specificSearchLogic: (entity: Types<Contract<T>>["details"], pattern: Types<Contract<T>>["findOnePayload"]) => boolean;
|
|
710
710
|
___mapDetailToList: (entity: Types<Contract<T>>["details"]) => Types<Contract<T>>["listModel"];
|
|
711
711
|
___mapCreatePayloadToDetail: (payload: Types<Contract<T>>["createPayload"]) => Types<Contract<T>>["details"];
|
|
712
|
-
___mapUpdatePayloadToDetail: (prevValue: Types<Contract<T>>["details"],
|
|
712
|
+
___mapUpdatePayloadToDetail: (prevValue: Types<Contract<T>>["details"], rawUpdate: Types<Contract<T>>["updatePayload"]) => Types<Contract<T>>["details"];
|
|
713
713
|
list: (data: {
|
|
714
714
|
filter: (Contract<T> extends infer T_1 ? T_1 extends Contract<T> ? T_1 extends {
|
|
715
715
|
list: (data: {
|