tempest.games 0.2.95 → 0.2.97
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/CHANGELOG.md +13 -0
- package/app/assets/{index-BcXfHqjT.js → index-I1lJb6h3.js} +22 -22
- package/app/index.html +1 -1
- package/bin/backend.bun.js +151 -138
- package/bin/backend.worker.game.bun.js +10 -10
- package/bin/backend.worker.tribunal.bun.js +1614 -961
- package/bin/frontend.bun.js +68 -56
- package/bin/setup-db.bun.js +46 -43
- package/drizzle/0021_perpetual_mikhail_rasputin.sql +11 -0
- package/drizzle/0022_glossy_night_nurse.sql +2 -0
- package/drizzle/meta/0021_snapshot.json +533 -0
- package/drizzle/meta/0022_snapshot.json +549 -0
- package/drizzle/meta/_journal.json +14 -0
- package/package.json +8 -8
|
@@ -3063,7 +3063,7 @@ var ParentSocket = class extends CustomSocket {
|
|
|
3063
3063
|
incompleteData = ``;
|
|
3064
3064
|
unprocessedEvents = [];
|
|
3065
3065
|
relays;
|
|
3066
|
-
|
|
3066
|
+
initRelay;
|
|
3067
3067
|
proc;
|
|
3068
3068
|
id = `#####`;
|
|
3069
3069
|
log(...args) {
|
|
@@ -3089,7 +3089,9 @@ var ParentSocket = class extends CustomSocket {
|
|
|
3089
3089
|
this.proc = proc;
|
|
3090
3090
|
this.proc.stdin.resume();
|
|
3091
3091
|
this.relays = /* @__PURE__ */ new Map;
|
|
3092
|
-
this.
|
|
3092
|
+
this.initRelay = () => {
|
|
3093
|
+
this.logger.info(`\uD83D\uDD17`, `nothing to relay`);
|
|
3094
|
+
};
|
|
3093
3095
|
this.proc.stdin.on(`data`, (buffer) => {
|
|
3094
3096
|
const pieces = buffer.toString().split(`\x03`);
|
|
3095
3097
|
const initialMaybeWellFormed = pieces[0];
|
|
@@ -3144,15 +3146,13 @@ var ParentSocket = class extends CustomSocket {
|
|
|
3144
3146
|
if (this.proc.pid)
|
|
3145
3147
|
this.id = this.proc.pid?.toString();
|
|
3146
3148
|
this.on(`user-joins`, (userKey) => {
|
|
3147
|
-
this.logger.info(`\uD83D\uDC64`,
|
|
3149
|
+
this.logger.info(`\uD83D\uDC64`, userKey, `joined`);
|
|
3148
3150
|
const relay = new SubjectSocket(userKey);
|
|
3149
3151
|
this.relays.set(userKey, relay);
|
|
3150
|
-
this.logger.info(`\uD83D\uDD17`, `attaching services
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
relay.disposalFunctions.push(cleanupRelay);
|
|
3155
|
-
}
|
|
3152
|
+
this.logger.info(`\uD83D\uDD17`, `attaching services for user`, userKey);
|
|
3153
|
+
const cleanupRelay = this.initRelay(relay, userKey);
|
|
3154
|
+
if (cleanupRelay)
|
|
3155
|
+
relay.disposalFunctions.push(cleanupRelay);
|
|
3156
3156
|
this.on(userKey, (...data) => {
|
|
3157
3157
|
relay.in.next(data);
|
|
3158
3158
|
});
|
|
@@ -3172,7 +3172,7 @@ var ParentSocket = class extends CustomSocket {
|
|
|
3172
3172
|
}
|
|
3173
3173
|
receiveRelay(attachServices) {
|
|
3174
3174
|
this.logger.info(`\uD83D\uDD17`, `running relay method`);
|
|
3175
|
-
this.
|
|
3175
|
+
this.initRelay = attachServices;
|
|
3176
3176
|
}
|
|
3177
3177
|
};
|
|
3178
3178
|
var ChildSocket = class extends CustomSocket {
|