@mengine/sync 1.0.1-alpha.1 → 1.0.1

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -2
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -568,12 +568,13 @@ var ClientServerSynchronizer = class {
568
568
  }
569
569
  async pushUpdatesToRemote(docState, updates, signal) {
570
570
  return runWithCheckpoint(signal, async () => {
571
- await Promise.allSettled(updates.filter(hasUpdateData).map((update) => {
571
+ const failure = (await Promise.allSettled(updates.filter(hasUpdateData).map((update) => {
572
572
  return this.server.pushDocUpdate({
573
573
  docId: docState.docId,
574
574
  data: update
575
575
  }, this.id);
576
- }));
576
+ }))).find((result) => result.status === "rejected");
577
+ if (failure != null) throw failure.reason;
577
578
  });
578
579
  }
579
580
  async pullUpdatesFromRemote(docState, signal) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mengine/sync",
3
- "version": "1.0.1-alpha.1",
3
+ "version": "1.0.1",
4
4
  "license": "UNLICENSED",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,8 +22,8 @@
22
22
  "dependencies": {
23
23
  "lodash-es": "^4.18.1",
24
24
  "nanoid": "^5.1.11",
25
- "@mengine/storage": "1.0.1-alpha.1",
26
- "@mengine/utils": "1.0.1-alpha.1"
25
+ "@mengine/storage": "1.0.1",
26
+ "@mengine/utils": "1.0.1"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/lodash-es": "^4.17.12",