@cadenza.io/service 1.9.4 → 1.9.5

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.js CHANGED
@@ -2444,6 +2444,41 @@ var DatabaseController = class _DatabaseController {
2444
2444
  this.splitTables.bind(this),
2445
2445
  "Generates DDL for database schema"
2446
2446
  ).then(
2447
+ CadenzaService.createMetaTask(
2448
+ "Generate tasks",
2449
+ (ctx) => {
2450
+ const { table, tableName, options } = ctx;
2451
+ this.createDatabaseTask(
2452
+ "query",
2453
+ tableName,
2454
+ table,
2455
+ this.queryFunction.bind(this),
2456
+ options
2457
+ );
2458
+ this.createDatabaseTask(
2459
+ "insert",
2460
+ tableName,
2461
+ table,
2462
+ this.insertFunction.bind(this),
2463
+ options
2464
+ );
2465
+ this.createDatabaseTask(
2466
+ "update",
2467
+ tableName,
2468
+ table,
2469
+ this.updateFunction.bind(this),
2470
+ options
2471
+ );
2472
+ this.createDatabaseTask(
2473
+ "delete",
2474
+ tableName,
2475
+ table,
2476
+ this.deleteFunction.bind(this),
2477
+ options
2478
+ );
2479
+ },
2480
+ "Generates auto-tasks for database schema"
2481
+ ),
2447
2482
  CadenzaService.createMetaTask("Generate DDL from table", (ctx) => {
2448
2483
  var _a2;
2449
2484
  const { ddl, table, tableName, schema, options } = ctx;
@@ -2629,43 +2664,7 @@ var DatabaseController = class _DatabaseController {
2629
2664
  return ctx;
2630
2665
  }),
2631
2666
  "Applies generated DDL to the database"
2632
- ).then(
2633
- CadenzaService.createMetaTask(
2634
- "Generate tasks",
2635
- (ctx) => {
2636
- const { table, tableName, options } = ctx;
2637
- this.createDatabaseTask(
2638
- "query",
2639
- tableName,
2640
- table,
2641
- this.queryFunction.bind(this),
2642
- options
2643
- );
2644
- this.createDatabaseTask(
2645
- "insert",
2646
- tableName,
2647
- table,
2648
- this.insertFunction.bind(this),
2649
- options
2650
- );
2651
- this.createDatabaseTask(
2652
- "update",
2653
- tableName,
2654
- table,
2655
- this.updateFunction.bind(this),
2656
- options
2657
- );
2658
- this.createDatabaseTask(
2659
- "delete",
2660
- tableName,
2661
- table,
2662
- this.deleteFunction.bind(this),
2663
- options
2664
- );
2665
- },
2666
- "Generates auto-tasks for database schema"
2667
- ).emits("meta.database.setup_done")
2668
- )
2667
+ ).emits("meta.database.setup_done")
2669
2668
  )
2670
2669
  )
2671
2670
  )