tempest.games 0.2.99 → 0.2.101

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.
@@ -11726,32 +11726,34 @@ var ParentSocket = class extends CustomSocket {
11726
11726
  this.id = this.proc.pid?.toString();
11727
11727
  this.on(`user-joins`, (userKey) => {
11728
11728
  this.logger.info(`\uD83D\uDC64`, userKey, `joined`);
11729
+ if (this.relays.get(userKey))
11730
+ return;
11729
11731
  const relay = new SubjectSocket(userKey);
11730
11732
  this.relays.set(userKey, relay);
11731
- this.logger.info(`\uD83D\uDD17`, `attaching services for user`, userKey);
11733
+ this.logger.info(`\uD83D\uDD17`, `attaching relay services for`, userKey);
11732
11734
  const cleanupRelay = this.initRelay(relay, userKey);
11733
11735
  if (cleanupRelay)
11734
11736
  relay.disposalFunctions.push(cleanupRelay);
11735
11737
  this.on(userKey, (...data) => {
11736
11738
  relay.in.next(data);
11737
11739
  });
11738
- relay.out.subscribe(`socket`, (data) => {
11739
- this.emit(...data);
11740
- });
11740
+ relay.disposalFunctions.push(relay.out.subscribe(`socket`, (data) => {
11741
+ this.emit(userKey, ...data);
11742
+ }));
11741
11743
  });
11742
- this.on(`user-leaves`, (username) => {
11743
- const relay = this.relays.get(username);
11744
- this.off(`relay:${username}`);
11744
+ this.on(`user-leaves`, (userKey) => {
11745
+ const relay = this.relays.get(userKey);
11746
+ this.off(userKey);
11745
11747
  if (relay) {
11746
11748
  relay.dispose();
11747
- this.relays.delete(username);
11749
+ this.relays.delete(userKey);
11748
11750
  }
11749
11751
  });
11750
11752
  this.proc.stdout.write(PROOF_OF_LIFE_SIGNAL);
11751
11753
  }
11752
11754
  receiveRelay(attachServices) {
11753
- this.logger.info(`\uD83D\uDD17`, `running relay method`);
11754
11755
  this.initRelay = attachServices;
11756
+ this.logger.info(`\uD83D\uDD17`, `ready to relay`);
11755
11757
  }
11756
11758
  };
11757
11759
  var ChildSocket = class extends CustomSocket {
@@ -11815,12 +11817,13 @@ var ChildSocket = class extends CustomSocket {
11815
11817
  continue;
11816
11818
  try {
11817
11819
  const jsonPiece = parseJson2(piece);
11820
+ this.logger.info(`\uD83D\uDCB8`, `emitted`, jsonPiece);
11818
11821
  this.handleEvent(...jsonPiece);
11819
11822
  this.incompleteData = ``;
11820
11823
  } catch (thrown0) {
11821
11824
  if (thrown0 instanceof Error)
11822
11825
  console.error([
11823
- `\u274C Malformed data received from child process`,
11826
+ `\u274C Malformed data received from child process:`,
11824
11827
  ``,
11825
11828
  ...piece.split(`
11826
11829
  `),
@@ -11833,6 +11836,7 @@ var ChildSocket = class extends CustomSocket {
11833
11836
  if (idx === 0) {
11834
11837
  this.incompleteData = piece;
11835
11838
  const maybeActualJsonPiece = parseJson2(initialMaybeWellFormed);
11839
+ this.logger.info(`\uD83D\uDCB8`, `emitted`, maybeActualJsonPiece);
11836
11840
  this.handleEvent(...maybeActualJsonPiece);
11837
11841
  this.incompleteData = ``;
11838
11842
  } else
@@ -11840,7 +11844,7 @@ var ChildSocket = class extends CustomSocket {
11840
11844
  } catch (thrown1) {
11841
11845
  if (thrown1 instanceof Error)
11842
11846
  console.error([
11843
- `\u274C Malformed data received from child process`,
11847
+ `\u274C Malformed data received from child process:`,
11844
11848
  ``,
11845
11849
  ...initialMaybeWellFormed.split(`
11846
11850
  `),
@@ -11873,7 +11877,7 @@ var ChildSocket = class extends CustomSocket {
11873
11877
  } catch (thrown0) {
11874
11878
  if (thrown0 instanceof Error)
11875
11879
  this.logger.error([
11876
- `\u274C Malformed log received from child process`,
11880
+ `\u274C Malformed log received from child process:`,
11877
11881
  ``,
11878
11882
  ...piece.split(`
11879
11883
  `),
@@ -11893,7 +11897,7 @@ var ChildSocket = class extends CustomSocket {
11893
11897
  } catch (thrown1) {
11894
11898
  if (thrown1 instanceof Error)
11895
11899
  this.logger.error([
11896
- `\u274C Malformed log received from child process...`,
11900
+ `\u274C Malformed log received from child process:`,
11897
11901
  ``,
11898
11902
  ...initialMaybeWellFormed.split(`
11899
11903
  `),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tempest.games",
3
- "version": "0.2.99",
3
+ "version": "0.2.101",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -29,14 +29,14 @@
29
29
  "@js-temporal/polyfill": "0.5.1",
30
30
  "@react-email/components": "1.0.2",
31
31
  "@t3-oss/env-core": "0.13.10",
32
- "@trpc/client": "11.8.0",
33
- "@trpc/server": "11.8.0",
32
+ "@trpc/client": "11.8.1",
33
+ "@trpc/server": "11.8.1",
34
34
  "arktype": "2.1.29",
35
35
  "cron": "4.4.0",
36
36
  "drizzle-orm": "0.45.1",
37
37
  "motion": "12.23.26",
38
38
  "nanoid": "5.1.6",
39
- "openai": "6.14.0",
39
+ "openai": "6.15.0",
40
40
  "postgres": "3.4.7",
41
41
  "react": "19.2.3",
42
42
  "react-dom": "19.2.3",
@@ -45,7 +45,7 @@
45
45
  "safegen": "0.8.3",
46
46
  "socket.io": "4.8.1",
47
47
  "socket.io-client": "4.8.1",
48
- "atom.io": "0.46.7",
48
+ "atom.io": "0.46.9",
49
49
  "safedeposit": "0.1.2",
50
50
  "treetrunks": "0.1.5"
51
51
  },
@@ -66,10 +66,10 @@
66
66
  "eslint": "9.39.2",
67
67
  "globals": "16.5.0",
68
68
  "rimraf": "6.1.2",
69
- "sass-embedded": "1.97.0",
69
+ "sass-embedded": "1.97.1",
70
70
  "vite": "7.3.0",
71
71
  "vitest": "4.0.16",
72
- "flightdeck": "0.3.27",
72
+ "flightdeck": "0.3.29",
73
73
  "varmint": "0.5.11"
74
74
  },
75
75
  "scripts": {