@@ -196,31 +196,35 @@ export class NodeDto {
196
196
197
197
const result = input . map ( ( row ) => this . #validate( row ) ) ;
198
198
const withErrors = [ ] ;
199
- const withSuccess = [ ]
200
-
199
+ const withSuccess = [ ] ;
201
200
202
201
for ( const row of result ) {
203
202
const keys = Object . keys ( row ) ;
204
- withErrors . push ( { } )
205
- withSuccess . push ( { } )
203
+ withErrors . push ( { } ) ;
204
+ withSuccess . push ( { } ) ;
206
205
for ( const key of keys ) {
207
206
if ( ! row [ key ] . success ) {
208
- withErrors [ withErrors . length - 1 ] = { ...withErrors [ withErrors . length - 1 ] , [ key ] : row [ key ] . value [ 0 ] } ;
209
- continue
207
+ withErrors [ withErrors . length - 1 ] = {
208
+ ...withErrors [ withErrors . length - 1 ] ,
209
+ [ key ] : row [ key ] . value [ 0 ] ,
210
+ } ;
211
+ continue ;
210
212
}
211
- withSuccess [ withSuccess . length - 1 ] = { ...withSuccess [ withSuccess . length - 1 ] , [ key ] : row [ key ] . value } ;
213
+ withSuccess [ withSuccess . length - 1 ] = {
214
+ ...withSuccess [ withSuccess . length - 1 ] ,
215
+ [ key ] : row [ key ] . value ,
216
+ } ;
212
217
}
213
218
}
214
219
215
-
216
- if ( withErrors . filter ( f => Object . keys ( f ) . length ) . length ) {
220
+ if ( withErrors . filter ( ( f ) => Object . keys ( f ) . length ) . length ) {
217
221
return { success : false , errors : withErrors } ;
218
222
}
219
223
220
224
return {
221
225
success : true ,
222
- value : isArray ? withSuccess : withSuccess [ 0 ]
223
- }
226
+ value : isArray ? withSuccess : withSuccess [ 0 ] ,
227
+ } ;
224
228
}
225
229
226
230
entries ( ) {
@@ -265,9 +269,10 @@ export class NodeDto {
265
269
266
270
for ( const dt of this . #schema) {
267
271
sql . push (
268
- `${ entity
269
- ? `${ entity } .${ dt . serialize } as ${ dt . name } `
270
- : `${ dt . serialize } as ${ dt . name } `
272
+ `${
273
+ entity
274
+ ? `${ entity } .${ dt . serialize } as ${ dt . name } `
275
+ : `${ dt . serialize } as ${ dt . name } `
271
276
} `,
272
277
) ;
273
278
}
0 commit comments