@nomalism-com/api 0.47.18 → 0.47.20
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/dist/index.cjs +6505 -0
- package/dist/index.js +4 -0
- package/package.json +15 -9
package/dist/index.js
CHANGED
|
@@ -5772,6 +5772,9 @@ var CLOSE_AUTH_UNAVAILABLE = 4503;
|
|
|
5772
5772
|
var PING_INTERVAL_MS = 25e3;
|
|
5773
5773
|
var MAX_BACKOFF_MS = 3e4;
|
|
5774
5774
|
var BASE_BACKOFF_MS = 1e3;
|
|
5775
|
+
function isEvent(data) {
|
|
5776
|
+
return typeof data === "object" && data !== null && "type" in data;
|
|
5777
|
+
}
|
|
5775
5778
|
var Service = class {
|
|
5776
5779
|
route;
|
|
5777
5780
|
constructor({ route }) {
|
|
@@ -5851,6 +5854,7 @@ var Service = class {
|
|
|
5851
5854
|
console.warn("WebSocket received non-JSON frame", msg.data);
|
|
5852
5855
|
return;
|
|
5853
5856
|
}
|
|
5857
|
+
if (!isEvent(payload)) return;
|
|
5854
5858
|
if (payload.type === "ping" || payload.type === "pong") return;
|
|
5855
5859
|
try {
|
|
5856
5860
|
onEvent(payload);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nomalism-com/api",
|
|
3
3
|
"description": "A nomalism API package for performing HTTP requests on API endpoints",
|
|
4
|
-
"version": "0.47.
|
|
4
|
+
"version": "0.47.20",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -9,8 +9,14 @@
|
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
-
"import":
|
|
13
|
-
|
|
12
|
+
"import": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"default": "./dist/index.js"
|
|
15
|
+
},
|
|
16
|
+
"require": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"default": "./dist/index.cjs"
|
|
19
|
+
}
|
|
14
20
|
}
|
|
15
21
|
},
|
|
16
22
|
"files": [
|
|
@@ -24,21 +30,21 @@
|
|
|
24
30
|
"prepare": "husky"
|
|
25
31
|
},
|
|
26
32
|
"dependencies": {
|
|
27
|
-
"@nomalism-com/types": "^0.47.
|
|
33
|
+
"@nomalism-com/types": "^0.47.28",
|
|
28
34
|
"axios": "^1.20.0"
|
|
29
35
|
},
|
|
30
36
|
"devDependencies": {
|
|
31
37
|
"@eslint/js": "^10.0.1",
|
|
32
|
-
"@swc/core": "^1.16.
|
|
38
|
+
"@swc/core": "^1.16.2",
|
|
33
39
|
"@types/node": "^26.4.1",
|
|
34
40
|
"@typescript-eslint/eslint-plugin": "^8.62.0",
|
|
35
41
|
"@typescript-eslint/parser": "^8.62.0",
|
|
36
|
-
"eslint": "^10.
|
|
42
|
+
"eslint": "^10.10.0",
|
|
37
43
|
"eslint-config-prettier": "^10.1.8",
|
|
38
44
|
"eslint-plugin-simple-import-sort": "^14.0.0",
|
|
39
45
|
"globals": "^17.12.0",
|
|
40
46
|
"husky": "^9.1.7",
|
|
41
|
-
"lint-staged": "^17.
|
|
47
|
+
"lint-staged": "^17.5.0",
|
|
42
48
|
"prettier": "^3.9.6",
|
|
43
49
|
"tsup": "^8.5.1",
|
|
44
50
|
"typescript-eslint": "^8.69.0"
|
|
@@ -62,7 +68,7 @@
|
|
|
62
68
|
]
|
|
63
69
|
},
|
|
64
70
|
"allowScripts": {
|
|
65
|
-
"@
|
|
66
|
-
"
|
|
71
|
+
"esbuild@0.27.7": true,
|
|
72
|
+
"@swc/core@1.16.2": true
|
|
67
73
|
}
|
|
68
74
|
}
|