@swan-admin/swan-ai-measurements 1.1.42 → 1.1.43
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/auth.js +2 -2
- package/dist/esm/auth.js +1 -1
- package/dist/esm/measurement.js +1 -2
- package/dist/esm/tryOn.js +1 -3
- package/dist/measurement.js +2 -3
- package/dist/tryOn.js +2 -4
- package/package.json +1 -1
- package/src/auth.ts +2 -2
- package/src/measurement.ts +1 -2
- package/src/tryOn.ts +1 -3
- package/tsconfig.json +1 -1
package/dist/auth.js
CHANGED
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const axios_1 = __importDefault(require("axios"));
|
|
7
7
|
const constants_js_1 = require("./constants.js");
|
|
8
8
|
const utils_js_1 = require("./utils.js");
|
|
9
|
+
const ws_1 = __importDefault(require("ws"));
|
|
9
10
|
// Conditionally import ws for Node.js
|
|
10
11
|
let WebSocketClient;
|
|
11
12
|
if (typeof window !== "undefined" && window.WebSocket) {
|
|
12
13
|
WebSocketClient = window.WebSocket;
|
|
13
14
|
}
|
|
14
15
|
else {
|
|
15
|
-
|
|
16
|
-
WebSocketClient = WS;
|
|
16
|
+
WebSocketClient = ws_1.default;
|
|
17
17
|
}
|
|
18
18
|
class Auth {
|
|
19
19
|
#socketRef;
|
package/dist/esm/auth.js
CHANGED
|
@@ -13,13 +13,13 @@ var _Auth_socketRef, _Auth_accessKey, _Auth_stagingUrl;
|
|
|
13
13
|
import axios from "axios";
|
|
14
14
|
import { API_ENDPOINTS, APP_AUTH_BASE_URL, APP_BASE_WEBSOCKET_URL, REQUIRED_MESSAGE } from "./constants.js";
|
|
15
15
|
import { checkParameters, getUrl } from "./utils.js";
|
|
16
|
+
import WS from "ws";
|
|
16
17
|
// Conditionally import ws for Node.js
|
|
17
18
|
let WebSocketClient;
|
|
18
19
|
if (typeof window !== "undefined" && window.WebSocket) {
|
|
19
20
|
WebSocketClient = window.WebSocket;
|
|
20
21
|
}
|
|
21
22
|
else {
|
|
22
|
-
const WS = require("ws");
|
|
23
23
|
WebSocketClient = WS;
|
|
24
24
|
}
|
|
25
25
|
class Auth {
|
package/dist/esm/measurement.js
CHANGED
|
@@ -22,13 +22,12 @@ var _Measurement_instances, _Measurement_tryOnSocketRef, _Measurement_measuremen
|
|
|
22
22
|
import axios from "axios";
|
|
23
23
|
import { API_ENDPOINTS, APP_AUTH_BASE_URL, APP_BASE_WEBSOCKET_URL, REQUIRED_MESSAGE } from "./constants.js";
|
|
24
24
|
import { checkParameters, getUrl } from "./utils.js";
|
|
25
|
+
import WS from "ws";
|
|
25
26
|
let WebSocketClient;
|
|
26
27
|
if (typeof window !== 'undefined' && window.WebSocket) {
|
|
27
28
|
WebSocketClient = window.WebSocket;
|
|
28
29
|
}
|
|
29
30
|
else {
|
|
30
|
-
const WS = require('ws');
|
|
31
|
-
console.log(WS);
|
|
32
31
|
WebSocketClient = WS;
|
|
33
32
|
}
|
|
34
33
|
class Measurement {
|
package/dist/esm/tryOn.js
CHANGED
|
@@ -22,14 +22,12 @@ var _TryOn_instances, _TryOn_tryOnSocketRef, _TryOn_timerWaitingRef, _TryOn_acce
|
|
|
22
22
|
import axios from "axios";
|
|
23
23
|
import { API_ENDPOINTS, APP_AUTH_BASE_URL, APP_BASE_WEBSOCKET_URL, REQUIRED_ERROR_MESSAGE_INVALID_EMAIL, REQUIRED_MESSAGE } from "./constants.js";
|
|
24
24
|
import { checkParameters, getUrl, isValidEmail } from "./utils.js";
|
|
25
|
-
|
|
25
|
+
import WS from "ws";
|
|
26
26
|
let WebSocketClient;
|
|
27
27
|
if (typeof window !== 'undefined' && window.WebSocket) {
|
|
28
28
|
WebSocketClient = window.WebSocket;
|
|
29
29
|
}
|
|
30
30
|
else {
|
|
31
|
-
const WS = require('ws');
|
|
32
|
-
console.log(WS);
|
|
33
31
|
WebSocketClient = WS;
|
|
34
32
|
}
|
|
35
33
|
class TryOn {
|
package/dist/measurement.js
CHANGED
|
@@ -6,14 +6,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const axios_1 = __importDefault(require("axios"));
|
|
7
7
|
const constants_js_1 = require("./constants.js");
|
|
8
8
|
const utils_js_1 = require("./utils.js");
|
|
9
|
+
const ws_1 = __importDefault(require("ws"));
|
|
9
10
|
let WebSocketClient;
|
|
10
11
|
if (typeof window !== 'undefined' && window.WebSocket) {
|
|
11
12
|
WebSocketClient = window.WebSocket;
|
|
12
13
|
}
|
|
13
14
|
else {
|
|
14
|
-
|
|
15
|
-
console.log(WS);
|
|
16
|
-
WebSocketClient = WS;
|
|
15
|
+
WebSocketClient = ws_1.default;
|
|
17
16
|
}
|
|
18
17
|
class Measurement {
|
|
19
18
|
#tryOnSocketRef = null;
|
package/dist/tryOn.js
CHANGED
|
@@ -6,15 +6,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const axios_1 = __importDefault(require("axios"));
|
|
7
7
|
const constants_js_1 = require("./constants.js");
|
|
8
8
|
const utils_js_1 = require("./utils.js");
|
|
9
|
-
|
|
9
|
+
const ws_1 = __importDefault(require("ws"));
|
|
10
10
|
let WebSocketClient;
|
|
11
11
|
if (typeof window !== 'undefined' && window.WebSocket) {
|
|
12
12
|
WebSocketClient = window.WebSocket;
|
|
13
13
|
}
|
|
14
14
|
else {
|
|
15
|
-
|
|
16
|
-
console.log(WS);
|
|
17
|
-
WebSocketClient = WS;
|
|
15
|
+
WebSocketClient = ws_1.default;
|
|
18
16
|
}
|
|
19
17
|
class TryOn {
|
|
20
18
|
#tryOnSocketRef = null;
|
package/package.json
CHANGED
package/src/auth.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import axios, { AxiosResponse } from "axios";
|
|
2
2
|
import { API_ENDPOINTS, APP_AUTH_BASE_URL, APP_BASE_WEBSOCKET_URL, REQUIRED_MESSAGE } from "./constants.js";
|
|
3
3
|
import { checkParameters, getUrl } from "./utils.js";
|
|
4
|
-
|
|
4
|
+
import WS from "ws";
|
|
5
5
|
// Conditionally import ws for Node.js
|
|
6
6
|
let WebSocketClient: any;
|
|
7
7
|
if (typeof window !== "undefined" && window.WebSocket) {
|
|
8
8
|
WebSocketClient = window.WebSocket;
|
|
9
9
|
} else {
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
WebSocketClient = WS;
|
|
12
12
|
}
|
|
13
13
|
|
package/src/measurement.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import axios, { AxiosResponse } from "axios";
|
|
2
2
|
import { API_ENDPOINTS, APP_AUTH_BASE_URL, APP_BASE_WEBSOCKET_URL, REQUIRED_MESSAGE } from "./constants.js";
|
|
3
3
|
import { checkParameters, getUrl } from "./utils.js";
|
|
4
|
+
import WS from "ws";
|
|
4
5
|
|
|
5
6
|
let WebSocketClient: any;
|
|
6
7
|
if (typeof window !== 'undefined' && window.WebSocket) {
|
|
7
8
|
WebSocketClient = window.WebSocket;
|
|
8
9
|
} else {
|
|
9
|
-
const WS = require('ws');
|
|
10
|
-
console.log(WS);
|
|
11
10
|
WebSocketClient = WS;
|
|
12
11
|
}
|
|
13
12
|
interface TryOnSocketOptions {
|
package/src/tryOn.ts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import axios, { AxiosResponse } from "axios";
|
|
2
2
|
import { API_ENDPOINTS, APP_AUTH_BASE_URL, APP_BASE_WEBSOCKET_URL, REQUIRED_ERROR_MESSAGE_INVALID_EMAIL, REQUIRED_MESSAGE } from "./constants.js";
|
|
3
3
|
import { checkParameters, getUrl, isValidEmail } from "./utils.js";
|
|
4
|
+
import WS from "ws";
|
|
4
5
|
|
|
5
|
-
// Conditionally import ws for Node.js
|
|
6
6
|
let WebSocketClient: any;
|
|
7
7
|
if (typeof window !== 'undefined' && window.WebSocket) {
|
|
8
8
|
WebSocketClient = window.WebSocket;
|
|
9
9
|
} else {
|
|
10
|
-
const WS = require('ws');
|
|
11
|
-
console.log(WS);
|
|
12
10
|
WebSocketClient = WS;
|
|
13
11
|
}
|
|
14
12
|
|