prostgles-server 4.2.37 → 4.2.38

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prostgles-server",
3
- "version": "4.2.37",
3
+ "version": "4.2.38",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -10,7 +10,7 @@
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
12
  "@types/node": "^20.9.2",
13
- "prostgles-client": "^4.0.94",
13
+ "prostgles-client": "^4.0.95",
14
14
  "prostgles-types": "^4.0.51",
15
15
  "socket.io-client": "^4.7.1"
16
16
  },
@@ -351,9 +351,9 @@
351
351
  }
352
352
  },
353
353
  "node_modules/prostgles-client": {
354
- "version": "4.0.94",
355
- "resolved": "https://registry.npmjs.org/prostgles-client/-/prostgles-client-4.0.94.tgz",
356
- "integrity": "sha512-7d8seeynNU3nBRTEMMvi4wAZqYTT+eGudq/yCbpmLHqDm8BJPItBCA4VeCBPOyJj5aM1A6FtEdL+kQsHnu3Ymw==",
354
+ "version": "4.0.95",
355
+ "resolved": "https://registry.npmjs.org/prostgles-client/-/prostgles-client-4.0.95.tgz",
356
+ "integrity": "sha512-flYinJ21wkJm+u8zY3CuxUdTT3vwgJ/hTg3cZHdy71/TaYFRseDUSDuK8Lkw6rsRmhtKbdeFO5D9JbEqiuYinA==",
357
357
  "dependencies": {
358
358
  "prostgles-types": "^4.0.73"
359
359
  },
@@ -13,7 +13,7 @@
13
13
  "license": "ISC",
14
14
  "dependencies": {
15
15
  "@types/node": "^20.9.2",
16
- "prostgles-client": "^4.0.94",
16
+ "prostgles-client": "^4.0.95",
17
17
  "prostgles-types": "^4.0.51",
18
18
  "socket.io-client": "^4.7.1"
19
19
  },
@@ -559,9 +559,33 @@ export const clientOnlyQueries = async (db: DBHandlerClient, auth: Auth, log: (.
559
559
  await testRealtime();
560
560
  });
561
561
 
562
- // auth.login({ username: "john", password: "secret" });
563
-
564
- // await tout();
562
+ /* Bug:
563
+ doing a
564
+ some_table.sync({}, { handlesOnData: true }, console.log);
565
+ will make all subsequent
566
+ some_table.sync({}, { handlesOnData: false }, console.log);
567
+ return no data items
568
+ */
569
+ await test("sync handlesOnData true -> false no data bug", { skip: isUser }, async () => {
570
+
571
+ let sync1Planes = [];
572
+ let sync2Planes = [];
573
+ const sync1 = await db.planes.sync!({}, { handlesOnData: true }, async (planes1, deltas) => {
574
+ sync1Planes = planes1;
575
+ log("sync handlesOnData true", planes1.length);
576
+ });
577
+ await tout(1000);
578
+ const sync2 = await db.planes.sync!({}, { handlesOnData: false }, (planes2, deltas) => {
579
+ sync2Planes = planes2;
580
+ });
581
+ await tout(1000);
582
+ if(sync1Planes.length !== sync2Planes.length || sync1Planes.length === 0) {
583
+ throw `sync2Planes.length !== 100: ${sync1Planes.length} vs ${sync2Planes.length}`;
584
+ }
585
+ await sync1.$unsync();
586
+ await sync2.$unsync();
587
+ });
588
+
565
589
 
566
590
  // User data
567
591
  await test("Security rules example", { skip: !isUser }, async () => {
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "../..": {
23
23
  "name": "prostgles-server",
24
- "version": "4.2.36",
24
+ "version": "4.2.37",
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
27
  "@types/express": "^4.17.13",