@wildix/xbees-connect 1.3.4 → 1.3.5
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-cjs/index.js +27 -0
- package/dist-cjs/package.json +48 -0
- package/dist-cjs/src/Client.js +492 -0
- package/dist-cjs/src/enums/index.js +74 -0
- package/dist-cjs/src/helpers/ClientParams.js +37 -0
- package/dist-cjs/src/helpers/LocalStorageManager.js +74 -0
- package/dist-cjs/src/helpers/MessageListener.js +85 -0
- package/dist-cjs/src/helpers/PostMessageController.js +48 -0
- package/dist-cjs/src/helpers/PostMessageControllerNative.js +47 -0
- package/dist-cjs/src/helpers/PostMessageControllerWeb.js +36 -0
- package/dist-cjs/src/helpers/TechnicalSupport.js +30 -0
- package/dist-cjs/src/utils/url/getUrlSearchParamsMap.js +6 -0
- package/dist-cjs/types/AvailableContactData.js +2 -0
- package/dist-cjs/types/Callback.js +2 -0
- package/dist-cjs/types/Client.js +2 -0
- package/dist-cjs/types/Contact.js +2 -0
- package/dist-cjs/types/Conversation.js +2 -0
- package/dist-cjs/types/Event.js +3 -0
- package/dist-cjs/types/Json.js +2 -0
- package/dist-cjs/types/Listener.js +2 -0
- package/dist-cjs/types/Message.js +2 -0
- package/dist-cjs/types/MessageSender.js +2 -0
- package/dist-cjs/types/Payload.js +2 -0
- package/dist-cjs/types/Platform.js +9 -0
- package/dist-cjs/types/Resolver.js +2 -0
- package/dist-cjs/types/Storage.js +2 -0
- package/dist-cjs/types/Toast.js +2 -0
- package/dist-cjs/types/WorkVariant.js +2 -0
- package/dist-cjs/types/XBeesUser.js +2 -0
- package/dist-cjs/types/index.js +5 -0
- package/dist-es/index.js +6 -0
- package/dist-es/package.json +48 -0
- package/dist-es/src/Client.js +485 -0
- package/dist-es/src/enums/index.js +71 -0
- package/dist-es/src/helpers/ClientParams.js +34 -0
- package/dist-es/src/helpers/LocalStorageManager.js +72 -0
- package/dist-es/src/helpers/MessageListener.js +81 -0
- package/dist-es/src/helpers/PostMessageController.js +42 -0
- package/dist-es/src/helpers/PostMessageControllerNative.js +44 -0
- package/dist-es/src/helpers/PostMessageControllerWeb.js +33 -0
- package/dist-es/src/helpers/TechnicalSupport.js +25 -0
- package/dist-es/src/utils/url/getUrlSearchParamsMap.js +3 -0
- package/dist-es/types/AvailableContactData.js +1 -0
- package/dist-es/types/Callback.js +1 -0
- package/dist-es/types/Client.js +1 -0
- package/dist-es/types/Contact.js +1 -0
- package/dist-es/types/Conversation.js +1 -0
- package/dist-es/types/Event.js +1 -0
- package/dist-es/types/Json.js +1 -0
- package/dist-es/types/Listener.js +1 -0
- package/dist-es/types/Message.js +1 -0
- package/dist-es/types/MessageSender.js +1 -0
- package/dist-es/types/Payload.js +1 -0
- package/dist-es/types/Platform.js +6 -0
- package/dist-es/types/Resolver.js +1 -0
- package/dist-es/types/Storage.js +1 -0
- package/dist-es/types/Toast.js +1 -0
- package/dist-es/types/WorkVariant.js +1 -0
- package/dist-es/types/XBeesUser.js +1 -0
- package/dist-es/types/index.js +1 -0
- package/dist-types/index.d.ts +6 -0
- package/dist-types/src/Client.d.ts +117 -0
- package/dist-types/src/enums/index.d.ts +67 -0
- package/dist-types/src/helpers/ClientParams.d.ts +16 -0
- package/dist-types/src/helpers/LocalStorageManager.d.ts +20 -0
- package/dist-types/src/helpers/MessageListener.d.ts +14 -0
- package/dist-types/src/helpers/PostMessageController.d.ts +13 -0
- package/dist-types/src/helpers/PostMessageControllerNative.d.ts +8 -0
- package/dist-types/src/helpers/PostMessageControllerWeb.d.ts +8 -0
- package/dist-types/src/helpers/TechnicalSupport.d.ts +9 -0
- package/dist-types/src/utils/url/getUrlSearchParamsMap.d.ts +1 -0
- package/dist-types/types/AvailableContactData.d.ts +4 -0
- package/dist-types/types/Callback.d.ts +4 -0
- package/dist-types/types/Client.d.ts +226 -0
- package/dist-types/types/Contact.d.ts +24 -0
- package/dist-types/types/Conversation.d.ts +4 -0
- package/dist-types/types/Event.d.ts +42 -0
- package/dist-types/types/Json.d.ts +6 -0
- package/dist-types/types/Listener.d.ts +7 -0
- package/dist-types/types/Message.d.ts +14 -0
- package/dist-types/types/MessageSender.d.ts +4 -0
- package/dist-types/types/Payload.d.ts +98 -0
- package/dist-types/types/Platform.d.ts +5 -0
- package/dist-types/types/Resolver.d.ts +5 -0
- package/dist-types/types/Storage.d.ts +1 -0
- package/dist-types/types/Toast.d.ts +1 -0
- package/dist-types/types/WorkVariant.d.ts +3 -0
- package/dist-types/types/XBeesUser.d.ts +7 -0
- package/dist-types/types/index.d.ts +16 -0
- package/package.json +2 -3
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class LocalStorageManager {
|
|
4
|
+
static instance = null;
|
|
5
|
+
static getInstance() {
|
|
6
|
+
if (!this.instance) {
|
|
7
|
+
this.instance = new LocalStorageManager();
|
|
8
|
+
}
|
|
9
|
+
return this.instance;
|
|
10
|
+
}
|
|
11
|
+
listeners = new Set();
|
|
12
|
+
integrationKey = '';
|
|
13
|
+
setIntegrationKey(integrationKey) {
|
|
14
|
+
this.integrationKey = integrationKey;
|
|
15
|
+
}
|
|
16
|
+
getStorageKey(key) {
|
|
17
|
+
return !this.integrationKey ? key : `${this.integrationKey}_${key}`;
|
|
18
|
+
}
|
|
19
|
+
getKey(key) {
|
|
20
|
+
return !this.integrationKey ? key : key.slice(`${this.integrationKey}_`.length);
|
|
21
|
+
}
|
|
22
|
+
constructor() {
|
|
23
|
+
if (this.shouldUseIntegrationKey()) {
|
|
24
|
+
this.integrationKey = this.calculateIntegrationKey();
|
|
25
|
+
}
|
|
26
|
+
window.addEventListener('storage', (event) => {
|
|
27
|
+
if (!event.key)
|
|
28
|
+
return;
|
|
29
|
+
const key = this.getKey(event.key);
|
|
30
|
+
this.listeners.forEach((listener) => listener({ ...event, key }));
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
calculateIntegrationKey() {
|
|
34
|
+
const pattern = /^\/(\S+)?\/index\.html$/;
|
|
35
|
+
const match = window.location.pathname.match(pattern);
|
|
36
|
+
if (match && match[1]) {
|
|
37
|
+
const [, key] = match;
|
|
38
|
+
return key;
|
|
39
|
+
}
|
|
40
|
+
return '';
|
|
41
|
+
}
|
|
42
|
+
shouldUseIntegrationKey() {
|
|
43
|
+
return window.location.host.endsWith('integrations.x-bees.com');
|
|
44
|
+
}
|
|
45
|
+
save(key, value) {
|
|
46
|
+
// Save data to localStorage
|
|
47
|
+
localStorage.setItem(this.getStorageKey(key), typeof value === 'string' ? value : JSON.stringify(value));
|
|
48
|
+
}
|
|
49
|
+
delete(key) {
|
|
50
|
+
// Save data to localStorage
|
|
51
|
+
localStorage.removeItem(this.getStorageKey(key));
|
|
52
|
+
}
|
|
53
|
+
retrieve(key) {
|
|
54
|
+
// Retrieve data from localStorage
|
|
55
|
+
const data = localStorage.getItem(this.getStorageKey(key));
|
|
56
|
+
try {
|
|
57
|
+
return !data ? data : JSON.parse(data);
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
return data;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
get(key) {
|
|
64
|
+
return localStorage.getItem(this.getStorageKey(key));
|
|
65
|
+
}
|
|
66
|
+
onStorage(listener) {
|
|
67
|
+
this.listeners.add(listener);
|
|
68
|
+
return () => this.removeOnStorage(listener);
|
|
69
|
+
}
|
|
70
|
+
removeOnStorage(listener) {
|
|
71
|
+
this.listeners.delete(listener);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.default = LocalStorageManager;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MessageListener = void 0;
|
|
4
|
+
const enums_1 = require("../enums");
|
|
5
|
+
class MessageListener {
|
|
6
|
+
static instance = null;
|
|
7
|
+
static getInstance() {
|
|
8
|
+
if (!this.instance) {
|
|
9
|
+
this.instance = new MessageListener();
|
|
10
|
+
}
|
|
11
|
+
return this.instance;
|
|
12
|
+
}
|
|
13
|
+
listeners = [];
|
|
14
|
+
useSubscription = false;
|
|
15
|
+
// eslint-disable-next-line
|
|
16
|
+
constructor() { }
|
|
17
|
+
parseMessage(message) {
|
|
18
|
+
try {
|
|
19
|
+
const data = typeof message.data === 'string' ? MessageListener.parseJSON(message.data) : message.data;
|
|
20
|
+
if (!data?.type) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
return data;
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
console.error('parse message error', error);
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
static parseJSON(messageData) {
|
|
31
|
+
const trimmedData = messageData.trim();
|
|
32
|
+
if (!trimmedData || !trimmedData.startsWith('{') || !trimmedData.endsWith('}')) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
return JSON.parse(trimmedData);
|
|
36
|
+
}
|
|
37
|
+
onMessage = (message) => {
|
|
38
|
+
if (window.location.host === message.origin || window === message.source) {
|
|
39
|
+
console.debug(`onMessage skipped ${window.location.host} - ${message.origin} - ${window === message.source} - ${message}`);
|
|
40
|
+
// skip events started from integration itself if any
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const data = this.parseMessage(message);
|
|
44
|
+
if (!data) {
|
|
45
|
+
console.debug('onMessage skipped', message);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const { type, payload } = data;
|
|
49
|
+
console.debug(`onMessage call - ${type} - ${payload}`);
|
|
50
|
+
this.listeners.forEach(({ eventName, callback }) => {
|
|
51
|
+
if (eventName === type) {
|
|
52
|
+
if (type === enums_1.EventType.ADD_CALL) {
|
|
53
|
+
const callbackFn = callback;
|
|
54
|
+
callbackFn(payload);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
// @ts-expect-error TODO: check the type for Callback<?>
|
|
58
|
+
const callbackFn = callback;
|
|
59
|
+
callbackFn(payload);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
listen(eventName, callback) {
|
|
65
|
+
if (!this.useSubscription) {
|
|
66
|
+
this.useSubscription = true;
|
|
67
|
+
window.addEventListener('message', this.onMessage);
|
|
68
|
+
}
|
|
69
|
+
const foundThisEvent = this.listeners.find(({ eventName: _eventName, callback: _callback }) => eventName === _eventName && Object.is(callback, _callback));
|
|
70
|
+
if (!foundThisEvent) {
|
|
71
|
+
this.listeners.push({ eventName, callback });
|
|
72
|
+
}
|
|
73
|
+
return () => {
|
|
74
|
+
this.off(eventName, callback);
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
off(eventName, callback) {
|
|
78
|
+
this.listeners = this.listeners.filter(({ eventName: _eventName, callback: _callback }) => !(Object.is(callback, _callback) && (!eventName ? true : eventName === _eventName)));
|
|
79
|
+
if (this.useSubscription && !this.listeners.length) {
|
|
80
|
+
this.useSubscription = false;
|
|
81
|
+
window.removeEventListener('message', this.onMessage);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
exports.MessageListener = MessageListener;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const ClientParams_1 = __importDefault(require("./ClientParams"));
|
|
7
|
+
const PostMessageControllerNative_1 = __importDefault(require("./PostMessageControllerNative"));
|
|
8
|
+
const PostMessageControllerWeb_1 = __importDefault(require("./PostMessageControllerWeb"));
|
|
9
|
+
class PostMessageController {
|
|
10
|
+
static instance = null;
|
|
11
|
+
static getInstance() {
|
|
12
|
+
if (!this.instance) {
|
|
13
|
+
this.instance = new PostMessageController();
|
|
14
|
+
}
|
|
15
|
+
return this.instance;
|
|
16
|
+
}
|
|
17
|
+
worker;
|
|
18
|
+
isParentReactNativeWebView;
|
|
19
|
+
constructor() {
|
|
20
|
+
// @ts-expect-error window.ReactNativeWebView will be provided by ReactNative WebView
|
|
21
|
+
this.isParentReactNativeWebView = !!window.ReactNativeWebView;
|
|
22
|
+
this.worker = this.isParentReactNativeWebView ? new PostMessageControllerNative_1.default() : new PostMessageControllerWeb_1.default();
|
|
23
|
+
}
|
|
24
|
+
sendAsync(data) {
|
|
25
|
+
return this.worker.sendAsync({
|
|
26
|
+
...data,
|
|
27
|
+
iframeId: ClientParams_1.default.getInstance().iframeId,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
async sendAsyncErrorSafe(data) {
|
|
31
|
+
try {
|
|
32
|
+
return await this.sendAsync(data);
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
console.debug('send error - type:', error);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
isPlatformNative() {
|
|
39
|
+
return this.isParentReactNativeWebView;
|
|
40
|
+
}
|
|
41
|
+
isPlatformWeb() {
|
|
42
|
+
return !this.isParentReactNativeWebView;
|
|
43
|
+
}
|
|
44
|
+
isOpenedFromXBees() {
|
|
45
|
+
return this.isParentReactNativeWebView || (!!parent && parent !== window);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.default = PostMessageController;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class PostMessageControllerNative {
|
|
4
|
+
target;
|
|
5
|
+
timeout = 10000;
|
|
6
|
+
constructor() {
|
|
7
|
+
// @ts-expect-error window.ReactNativeWebView will be provided by ReactNative WebView
|
|
8
|
+
this.target = window.ReactNativeWebView;
|
|
9
|
+
}
|
|
10
|
+
sendAsync(data) {
|
|
11
|
+
if (!this.target) {
|
|
12
|
+
return Promise.reject('your application should be wrapped within iframe to xbees-connect perform the connection');
|
|
13
|
+
}
|
|
14
|
+
return this.send(this.target, data);
|
|
15
|
+
}
|
|
16
|
+
send(target, message) {
|
|
17
|
+
return new Promise((resolve, reject) => {
|
|
18
|
+
const channel = new MessageChannel();
|
|
19
|
+
const listener = (event) => {
|
|
20
|
+
try {
|
|
21
|
+
const parsedData = JSON.parse(event.data);
|
|
22
|
+
if (parsedData?.type === message.type) {
|
|
23
|
+
clearTimeout(timeout);
|
|
24
|
+
window.removeEventListener('message', listener);
|
|
25
|
+
if (!parsedData.errorMessage) {
|
|
26
|
+
resolve(parsedData);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
reject(parsedData);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
console.error('on receive response Error', error);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
window.addEventListener('message', listener);
|
|
38
|
+
const timeout = setTimeout(() => {
|
|
39
|
+
channel.port1.close();
|
|
40
|
+
window.removeEventListener('message', listener);
|
|
41
|
+
reject({ errorMessage: 'timeout', type: message.type });
|
|
42
|
+
}, this.timeout);
|
|
43
|
+
target.postMessage(JSON.stringify(message));
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.default = PostMessageControllerNative;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class PostMessageControllerWeb {
|
|
4
|
+
target;
|
|
5
|
+
timeout = 10000;
|
|
6
|
+
constructor() {
|
|
7
|
+
this.target = parent;
|
|
8
|
+
}
|
|
9
|
+
sendAsync(data) {
|
|
10
|
+
if (!this.target || this.target === window) {
|
|
11
|
+
return Promise.reject('your application should be wrapped within iframe to xbees-connect perform the connection');
|
|
12
|
+
}
|
|
13
|
+
return this.send(this.target, data);
|
|
14
|
+
}
|
|
15
|
+
send(target, payload) {
|
|
16
|
+
return new Promise((resolve, reject) => {
|
|
17
|
+
const channel = new MessageChannel();
|
|
18
|
+
const timeout = setTimeout(() => {
|
|
19
|
+
channel.port1.close();
|
|
20
|
+
reject({ errorMessage: 'timeout', type: payload.type });
|
|
21
|
+
}, this.timeout);
|
|
22
|
+
channel.port1.onmessage = ({ data }) => {
|
|
23
|
+
clearTimeout(timeout);
|
|
24
|
+
channel.port1.close();
|
|
25
|
+
if (!data.errorMessage) {
|
|
26
|
+
resolve(data);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
reject(data);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
target.postMessage(payload, '*', [channel.port2]);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.default = PostMessageControllerWeb;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const enums_1 = require("../enums");
|
|
7
|
+
const ClientParams_1 = __importDefault(require("./ClientParams"));
|
|
8
|
+
const PostMessageController_1 = __importDefault(require("./PostMessageController"));
|
|
9
|
+
class TechnicalSupport {
|
|
10
|
+
static instance = null;
|
|
11
|
+
static getInstance() {
|
|
12
|
+
if (!this.instance) {
|
|
13
|
+
this.instance = new TechnicalSupport();
|
|
14
|
+
}
|
|
15
|
+
return this.instance;
|
|
16
|
+
}
|
|
17
|
+
// eslint-disable-next-line
|
|
18
|
+
constructor() { }
|
|
19
|
+
sendTechnicalInformation(message, data) {
|
|
20
|
+
return PostMessageController_1.default.getInstance().sendAsyncErrorSafe({
|
|
21
|
+
type: enums_1.ClientEventType.SEND_TECHNICAL_SUPPORT_INFORMATION,
|
|
22
|
+
payload: {
|
|
23
|
+
'x-iframe-params': ClientParams_1.default.getInstance(),
|
|
24
|
+
message,
|
|
25
|
+
data,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.default = TechnicalSupport;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SupportedPlatformVariant = void 0;
|
|
4
|
+
var SupportedPlatformVariant;
|
|
5
|
+
(function (SupportedPlatformVariant) {
|
|
6
|
+
SupportedPlatformVariant["ALL"] = "all";
|
|
7
|
+
SupportedPlatformVariant["MOBILE"] = "mobile";
|
|
8
|
+
SupportedPlatformVariant["WEB"] = "web";
|
|
9
|
+
})(SupportedPlatformVariant || (exports.SupportedPlatformVariant = SupportedPlatformVariant = {}));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SupportedPlatformVariant = void 0;
|
|
4
|
+
var Platform_1 = require("./Platform");
|
|
5
|
+
Object.defineProperty(exports, "SupportedPlatformVariant", { enumerable: true, get: function () { return Platform_1.SupportedPlatformVariant; } });
|
package/dist-es/index.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wildix/xbees-connect",
|
|
3
|
+
"version": "1.3.5",
|
|
4
|
+
"description": "This library provides easy communication between x-bees and integrated web applications",
|
|
5
|
+
"author": "dimitri.chernykh <dimitri.chernykh@wildix.com>",
|
|
6
|
+
"homepage": "",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"main": "./dist-cjs/index.js",
|
|
10
|
+
"types": "./dist-types/index.d.ts",
|
|
11
|
+
"module": "./dist-es/index.js",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "bun run clean && bun run build:es && bun run build:cjs && bun run build:types",
|
|
14
|
+
"build:es": "tsc -p tsconfig.es.json",
|
|
15
|
+
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
16
|
+
"build:types": "tsc -p tsconfig.types.json",
|
|
17
|
+
"build:docs": "typedoc",
|
|
18
|
+
"lint": "eslint . && tsc --noEmit",
|
|
19
|
+
"lint:fix": "eslint . --fix",
|
|
20
|
+
"clean": "rimraf --glob './dist-*' '*.tsbuildinfo'",
|
|
21
|
+
"build:api-extractor": "api-extractor run --local"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist-*/**"
|
|
25
|
+
],
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git@git.wildix.com:xbs/sdk-ui.git"
|
|
29
|
+
},
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@microsoft/api-extractor": "^7.47.9",
|
|
35
|
+
"@wildix/eslint-config-style-guide": "^1.2.2",
|
|
36
|
+
"eslint": "^8.55.0",
|
|
37
|
+
"rimraf": "^5.0.5",
|
|
38
|
+
"typescript": "^5.3.3"
|
|
39
|
+
},
|
|
40
|
+
"parserOptions": {
|
|
41
|
+
"project": [
|
|
42
|
+
"./tsconfig.json"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=16"
|
|
47
|
+
}
|
|
48
|
+
}
|