@rvoh/psychic-websockets 0.2.2 → 0.2.3
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.
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const psychic_1 = require("@rvoh/psychic");
|
|
4
4
|
const redis_adapter_1 = require("@socket.io/redis-adapter");
|
|
5
|
-
const yoctocolors_1 = require("yoctocolors");
|
|
6
5
|
const socketio = require("socket.io");
|
|
6
|
+
const yoctocolors_1 = require("yoctocolors");
|
|
7
7
|
const MissingWsRedisConnection_js_1 = require("../error/ws/MissingWsRedisConnection.js");
|
|
8
8
|
const EnvInternal_js_1 = require("../helpers/EnvInternal.js");
|
|
9
9
|
const index_js_1 = require("../psychic-application-websockets/index.js");
|
package/dist/cjs/src/cable/ws.js
CHANGED
|
@@ -3,10 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.InvalidWsPathError = void 0;
|
|
4
4
|
const dream_1 = require("@rvoh/dream");
|
|
5
5
|
const redis_emitter_1 = require("@socket.io/redis-emitter");
|
|
6
|
-
const luxon_1 = require("luxon");
|
|
7
6
|
const EnvInternal_js_1 = require("../helpers/EnvInternal.js");
|
|
8
|
-
const redisWsKey_js_1 = require("./redisWsKey.js");
|
|
9
7
|
const index_js_1 = require("../psychic-application-websockets/index.js");
|
|
8
|
+
const redisWsKey_js_1 = require("./redisWsKey.js");
|
|
10
9
|
class Ws {
|
|
11
10
|
allowedPaths;
|
|
12
11
|
io;
|
|
@@ -26,7 +25,7 @@ class Ws {
|
|
|
26
25
|
.rpush(key, ...socketIdsToKeep, socket.id)
|
|
27
26
|
.expireat(key,
|
|
28
27
|
// TODO: make this configurable in non-test environments
|
|
29
|
-
|
|
28
|
+
dream_1.DateTime.now()
|
|
30
29
|
.plus(EnvInternal_js_1.default.isTest ? { seconds: 15 } : { day: 1 })
|
|
31
30
|
.toSeconds())
|
|
32
31
|
.exec();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PsychicServer } from '@rvoh/psychic';
|
|
2
2
|
import { createAdapter } from '@socket.io/redis-adapter';
|
|
3
|
-
import colors from 'yoctocolors';
|
|
4
3
|
import * as socketio from 'socket.io';
|
|
4
|
+
import colors from 'yoctocolors';
|
|
5
5
|
import MissingWsRedisConnection from '../error/ws/MissingWsRedisConnection.js';
|
|
6
6
|
import EnvInternal from '../helpers/EnvInternal.js';
|
|
7
7
|
import PsychicApplicationWebsockets from '../psychic-application-websockets/index.js';
|
package/dist/esm/src/cable/ws.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { uniq } from '@rvoh/dream';
|
|
1
|
+
import { DateTime, uniq } from '@rvoh/dream';
|
|
2
2
|
import { Emitter } from '@socket.io/redis-emitter';
|
|
3
|
-
import { DateTime } from 'luxon';
|
|
4
3
|
import EnvInternal from '../helpers/EnvInternal.js';
|
|
5
|
-
import redisWsKey from './redisWsKey.js';
|
|
6
4
|
import PsychicApplicationWebsockets from '../psychic-application-websockets/index.js';
|
|
5
|
+
import redisWsKey from './redisWsKey.js';
|
|
7
6
|
export default class Ws {
|
|
8
7
|
allowedPaths;
|
|
9
8
|
io;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@rvoh/psychic-websockets",
|
|
4
4
|
"description": "Websocket system for Psychic applications",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.3",
|
|
6
6
|
"author": "RVOHealth",
|
|
7
7
|
"repository": "https://github.com/rvohealth/psychic-websockets.git",
|
|
8
8
|
"license": "MIT",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"scripts": {
|
|
23
23
|
"client": "yarn --cwd=./client start",
|
|
24
|
-
"psy": "yarn psyts",
|
|
24
|
+
"psy": "NODE_ENV=${NODE_ENV:-test} yarn psyts",
|
|
25
25
|
"psyjs": "node ./dist/test-app/src/cli/index.js",
|
|
26
26
|
"psyts": "node --experimental-specifier-resolution=node --import ./bin/esm.js ./test-app/src/cli/index.ts",
|
|
27
27
|
"build": "echo \"building cjs...\" && rm -rf dist && npx tsc -p ./tsconfig.cjs.build.json && echo \"building esm...\" && npx tsc -p ./tsconfig.esm.build.json",
|
|
@@ -50,7 +50,6 @@
|
|
|
50
50
|
"@socket.io/redis-adapter": "^8.3.0",
|
|
51
51
|
"@socket.io/redis-emitter": "^5.1.0",
|
|
52
52
|
"@types/express": "^4",
|
|
53
|
-
"@types/luxon": "^3.4.2",
|
|
54
53
|
"@types/node": "^22.5.1",
|
|
55
54
|
"@types/pg": "^8",
|
|
56
55
|
"@types/supertest": "^6.0.2",
|
|
@@ -60,7 +59,6 @@
|
|
|
60
59
|
"ioredis": "^5.4.1",
|
|
61
60
|
"kysely": "^0.27.5",
|
|
62
61
|
"kysely-codegen": "^0.17.0",
|
|
63
|
-
"luxon": "^3.5.0",
|
|
64
62
|
"luxon-jest-matchers": "^0.1.14",
|
|
65
63
|
"pg": "^8.13.1",
|
|
66
64
|
"prettier": "^3.3.3",
|
|
@@ -72,11 +70,11 @@
|
|
|
72
70
|
"ts-node": "^10.9.2",
|
|
73
71
|
"tslib": "^2.7.0",
|
|
74
72
|
"typedoc": "^0.26.6",
|
|
75
|
-
"typescript": "^5.
|
|
73
|
+
"typescript": "^5.8.2",
|
|
76
74
|
"typescript-eslint": "=7.18.0",
|
|
77
75
|
"vitest": "^3.0.8"
|
|
78
76
|
},
|
|
79
|
-
"packageManager": "yarn@4.
|
|
77
|
+
"packageManager": "yarn@4.7.0",
|
|
80
78
|
"dependencies": {
|
|
81
79
|
"yoctocolors": "^2.1.1"
|
|
82
80
|
}
|