@fctc/interface-logic 4.3.3 → 4.3.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/hooks.js CHANGED
@@ -5668,8 +5668,12 @@ var ModelRepository = class {
5668
5668
  const snapshot = await loadSnapshot({
5669
5669
  modelName
5670
5670
  });
5671
+ console.log("modelName", modelName);
5672
+ console.log("snapshot", snapshot);
5671
5673
  const existingIds = getExistingIds(snapshot);
5674
+ console.log("existingIds", existingIds);
5672
5675
  const newId = generateNextId(existingIds, snapshot.data.length);
5676
+ console.log("newId", newId);
5673
5677
  snapshot.data.push({
5674
5678
  ...newRecord,
5675
5679
  id: newId
@@ -5683,6 +5687,7 @@ var ModelRepository = class {
5683
5687
  return [];
5684
5688
  }
5685
5689
  console.log(`\u2705 ${snapshot.data.length} records saved`);
5690
+ console.log(snapshot.data);
5686
5691
  return snapshot.data;
5687
5692
  } catch (error) {
5688
5693
  console.error("failed to add new record:", error);
@@ -5908,7 +5913,7 @@ var createEntityService = (env) => {
5908
5913
  }) => {
5909
5914
  if (isLocalMode) {
5910
5915
  return repo.addRecord({
5911
- newRecord: args,
5916
+ newRecord: args[0],
5912
5917
  modelName: model
5913
5918
  });
5914
5919
  }
package/dist/hooks.mjs CHANGED
@@ -5520,8 +5520,12 @@ var ModelRepository = class {
5520
5520
  const snapshot = await loadSnapshot({
5521
5521
  modelName
5522
5522
  });
5523
+ console.log("modelName", modelName);
5524
+ console.log("snapshot", snapshot);
5523
5525
  const existingIds = getExistingIds(snapshot);
5526
+ console.log("existingIds", existingIds);
5524
5527
  const newId = generateNextId(existingIds, snapshot.data.length);
5528
+ console.log("newId", newId);
5525
5529
  snapshot.data.push({
5526
5530
  ...newRecord,
5527
5531
  id: newId
@@ -5535,6 +5539,7 @@ var ModelRepository = class {
5535
5539
  return [];
5536
5540
  }
5537
5541
  console.log(`\u2705 ${snapshot.data.length} records saved`);
5542
+ console.log(snapshot.data);
5538
5543
  return snapshot.data;
5539
5544
  } catch (error) {
5540
5545
  console.error("failed to add new record:", error);
@@ -5760,7 +5765,7 @@ var createEntityService = (env) => {
5760
5765
  }) => {
5761
5766
  if (isLocalMode) {
5762
5767
  return repo.addRecord({
5763
- newRecord: args,
5768
+ newRecord: args[0],
5764
5769
  modelName: model
5765
5770
  });
5766
5771
  }
package/dist/provider.js CHANGED
@@ -5650,8 +5650,12 @@ var ModelRepository = class {
5650
5650
  const snapshot = await loadSnapshot({
5651
5651
  modelName
5652
5652
  });
5653
+ console.log("modelName", modelName);
5654
+ console.log("snapshot", snapshot);
5653
5655
  const existingIds = getExistingIds(snapshot);
5656
+ console.log("existingIds", existingIds);
5654
5657
  const newId = generateNextId(existingIds, snapshot.data.length);
5658
+ console.log("newId", newId);
5655
5659
  snapshot.data.push({
5656
5660
  ...newRecord,
5657
5661
  id: newId
@@ -5665,6 +5669,7 @@ var ModelRepository = class {
5665
5669
  return [];
5666
5670
  }
5667
5671
  console.log(`\u2705 ${snapshot.data.length} records saved`);
5672
+ console.log(snapshot.data);
5668
5673
  return snapshot.data;
5669
5674
  } catch (error) {
5670
5675
  console.error("failed to add new record:", error);
@@ -5890,7 +5895,7 @@ var createEntityService = (env) => {
5890
5895
  }) => {
5891
5896
  if (isLocalMode) {
5892
5897
  return repo.addRecord({
5893
- newRecord: args,
5898
+ newRecord: args[0],
5894
5899
  modelName: model
5895
5900
  });
5896
5901
  }
package/dist/provider.mjs CHANGED
@@ -5607,8 +5607,12 @@ var ModelRepository = class {
5607
5607
  const snapshot = await loadSnapshot({
5608
5608
  modelName
5609
5609
  });
5610
+ console.log("modelName", modelName);
5611
+ console.log("snapshot", snapshot);
5610
5612
  const existingIds = getExistingIds(snapshot);
5613
+ console.log("existingIds", existingIds);
5611
5614
  const newId = generateNextId(existingIds, snapshot.data.length);
5615
+ console.log("newId", newId);
5612
5616
  snapshot.data.push({
5613
5617
  ...newRecord,
5614
5618
  id: newId
@@ -5622,6 +5626,7 @@ var ModelRepository = class {
5622
5626
  return [];
5623
5627
  }
5624
5628
  console.log(`\u2705 ${snapshot.data.length} records saved`);
5629
+ console.log(snapshot.data);
5625
5630
  return snapshot.data;
5626
5631
  } catch (error) {
5627
5632
  console.error("failed to add new record:", error);
@@ -5847,7 +5852,7 @@ var createEntityService = (env) => {
5847
5852
  }) => {
5848
5853
  if (isLocalMode) {
5849
5854
  return repo.addRecord({
5850
- newRecord: args,
5855
+ newRecord: args[0],
5851
5856
  modelName: model
5852
5857
  });
5853
5858
  }
package/dist/services.js CHANGED
@@ -3630,8 +3630,12 @@ var ModelRepository = class {
3630
3630
  const snapshot = await loadSnapshot({
3631
3631
  modelName
3632
3632
  });
3633
+ console.log("modelName", modelName);
3634
+ console.log("snapshot", snapshot);
3633
3635
  const existingIds = getExistingIds(snapshot);
3636
+ console.log("existingIds", existingIds);
3634
3637
  const newId = generateNextId(existingIds, snapshot.data.length);
3638
+ console.log("newId", newId);
3635
3639
  snapshot.data.push({
3636
3640
  ...newRecord,
3637
3641
  id: newId
@@ -3645,6 +3649,7 @@ var ModelRepository = class {
3645
3649
  return [];
3646
3650
  }
3647
3651
  console.log(`\u2705 ${snapshot.data.length} records saved`);
3652
+ console.log(snapshot.data);
3648
3653
  return snapshot.data;
3649
3654
  } catch (error) {
3650
3655
  console.error("failed to add new record:", error);
@@ -3870,7 +3875,7 @@ var createEntityService = (env) => {
3870
3875
  }) => {
3871
3876
  if (isLocalMode) {
3872
3877
  return repo.addRecord({
3873
- newRecord: args,
3878
+ newRecord: args[0],
3874
3879
  modelName: model
3875
3880
  });
3876
3881
  }
package/dist/services.mjs CHANGED
@@ -3583,8 +3583,12 @@ var ModelRepository = class {
3583
3583
  const snapshot = await loadSnapshot({
3584
3584
  modelName
3585
3585
  });
3586
+ console.log("modelName", modelName);
3587
+ console.log("snapshot", snapshot);
3586
3588
  const existingIds = getExistingIds(snapshot);
3589
+ console.log("existingIds", existingIds);
3587
3590
  const newId = generateNextId(existingIds, snapshot.data.length);
3591
+ console.log("newId", newId);
3588
3592
  snapshot.data.push({
3589
3593
  ...newRecord,
3590
3594
  id: newId
@@ -3598,6 +3602,7 @@ var ModelRepository = class {
3598
3602
  return [];
3599
3603
  }
3600
3604
  console.log(`\u2705 ${snapshot.data.length} records saved`);
3605
+ console.log(snapshot.data);
3601
3606
  return snapshot.data;
3602
3607
  } catch (error) {
3603
3608
  console.error("failed to add new record:", error);
@@ -3823,7 +3828,7 @@ var createEntityService = (env) => {
3823
3828
  }) => {
3824
3829
  if (isLocalMode) {
3825
3830
  return repo.addRecord({
3826
- newRecord: args,
3831
+ newRecord: args[0],
3827
3832
  modelName: model
3828
3833
  });
3829
3834
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/interface-logic",
3
- "version": "4.3.3",
3
+ "version": "4.3.5",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",