@bluecopa/core 0.1.62 → 0.1.64

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.es.js CHANGED
@@ -12465,9 +12465,7 @@ class DocRefImpl {
12465
12465
  return doc ? doc.toJSON() : null;
12466
12466
  }
12467
12467
  async update(data) {
12468
- console.log("doxxxxx 12344");
12469
12468
  const doc = await this.collection.findOne(this.id).exec();
12470
- console.log("doxxxxx", doc);
12471
12469
  if (!doc) {
12472
12470
  throw new InputTableError(`Document "${this.id}" not found`, 404);
12473
12471
  }
@@ -12475,7 +12473,6 @@ class DocRefImpl {
12475
12473
  delete patch[this.primaryKeyField];
12476
12474
  delete patch[CHECKPOINT_FIELD];
12477
12475
  await doc.patch(patch);
12478
- await doc.upsert(patch);
12479
12476
  }
12480
12477
  async delete() {
12481
12478
  await apiClient.request({
@@ -12908,11 +12905,9 @@ function createReplication(collection, solutionId, tableName, primaryKeyField) {
12908
12905
  async handler(changeRows) {
12909
12906
  var _a, _b, _c, _d, _e, _f, _g;
12910
12907
  const conflicts = [];
12911
- console.log(changeRows, "chnageRows");
12912
12908
  for (const row of changeRows) {
12913
12909
  const doc = row.newDocumentState;
12914
12910
  try {
12915
- debugger;
12916
12911
  let serverResponse;
12917
12912
  if (row.assumedMasterState == null) {
12918
12913
  const insertData = { ...doc };
@@ -13066,10 +13061,7 @@ async function createCollectionInternal(key, solutionId, tableDef, workspaceId,
13066
13061
  const collectionConfig = {
13067
13062
  schema,
13068
13063
  conflictHandler: {
13069
- isEqual: (a, b) => {
13070
- console.log("kywfvyiubwe", { CHECKPOINT_FIELD, a, b });
13071
- return a[CHECKPOINT_FIELD] === b[CHECKPOINT_FIELD];
13072
- },
13064
+ isEqual: (a, b) => a[CHECKPOINT_FIELD] === b[CHECKPOINT_FIELD],
13073
13065
  resolve: (i) => i.realMasterState
13074
13066
  // server wins
13075
13067
  }