@localazy/strapi-plugin 0.2.6 → 0.2.9
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
CHANGED
|
@@ -8,7 +8,23 @@ export default class AlertsService {
|
|
|
8
8
|
_streamIdentifier;
|
|
9
9
|
|
|
10
10
|
constructor() {
|
|
11
|
-
|
|
11
|
+
const uri = process.env.STRAPI_ADMIN_BACKEND_URL;
|
|
12
|
+
let path = '/socket.io'; // SocketIoClient defaults to this path too if it is not defined
|
|
13
|
+
|
|
14
|
+
// If uri is not undefined nor empty, use the correct path to Strapi's socket
|
|
15
|
+
if (uri !== undefined && uri.length > 0) {
|
|
16
|
+
try {
|
|
17
|
+
const { pathname } = new URL(
|
|
18
|
+
uri,
|
|
19
|
+
window.location.href // Mandatory in case uri is not a complete URL (e.g. /cms)
|
|
20
|
+
);
|
|
21
|
+
path = `${pathname}${pathname.endsWith('/') ? '' : '/'}socket.io`;
|
|
22
|
+
} catch (e) {
|
|
23
|
+
console.error(e);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
this._client = SocketIoClient.connect(uri, { path });
|
|
12
28
|
}
|
|
13
29
|
|
|
14
30
|
setStreamIdentifier(streamIdentifier) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@localazy/strapi-plugin",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "The official Strapi Plugin by Localazy.",
|
|
5
5
|
"strapi": {
|
|
6
6
|
"name": "localazy",
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"@babel/plugin-transform-modules-commonjs": "^7.20.11",
|
|
63
63
|
"@localazy/conventional-changelog-preset": "^1.2.8",
|
|
64
64
|
"@strapi-community/eslint-config": "^0.4.3",
|
|
65
|
-
"conventional-changelog": "^
|
|
66
|
-
"conventional-changelog-cli": "^
|
|
65
|
+
"conventional-changelog": "^5.1.0",
|
|
66
|
+
"conventional-changelog-cli": "^4.1.0",
|
|
67
67
|
"conventional-changelog-writer": "github:localazy/conventional-changelog-writer",
|
|
68
68
|
"conventional-recommended-bump": "^9.0.0",
|
|
69
69
|
"eslint": "^8.32.0",
|