@webex/cc-store 1.0.1-0

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/.babelrc.js ADDED
@@ -0,0 +1,3 @@
1
+ const baseConfig = require('../../../.babelrc');
2
+
3
+ module.exports = baseConfig;
package/CHANGELOG.md ADDED
@@ -0,0 +1,37 @@
1
+ # [1.28.0-alpha.4](https://github.com/webex/widgets/compare/v1.28.0-alpha.3...v1.28.0-alpha.4) (2024-11-14)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **store:** add-documentation ([#252](https://github.com/webex/widgets/issues/252)) ([f754731](https://github.com/webex/widgets/commit/f7547314196af9ceb1185ab23da6a2df030f3d2c))
7
+
8
+ # [1.28.0-alpha.3](https://github.com/webex/widgets/compare/v1.28.0-alpha.2...v1.28.0-alpha.3) (2024-11-14)
9
+
10
+
11
+ ### Features
12
+
13
+ * **release:** add-publishconfig ([#250](https://github.com/webex/widgets/issues/250)) ([2ee17f6](https://github.com/webex/widgets/commit/2ee17f64f13d51340347dfeb492fd37a2dc40501))
14
+
15
+ # [1.28.0-alpha.2](https://github.com/webex/widgets/compare/v1.28.0-alpha.1...v1.28.0-alpha.2) (2024-11-14)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **station-login:** test-commit ([#249](https://github.com/webex/widgets/issues/249)) ([706d3d4](https://github.com/webex/widgets/commit/706d3d412574987a9f84079a24697879dc6dba33))
21
+
22
+ # [1.28.0-alpha.1](https://github.com/webex/widgets/compare/v1.27.5...v1.28.0-alpha.1) (2024-11-14)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * **release:** add-mono-repo-support-for-scemantic-release ([#246](https://github.com/webex/widgets/issues/246)) ([4d2a572](https://github.com/webex/widgets/commit/4d2a57280eed3ef3caf5efb8a58c6cea433e1f53))
28
+ * convert npm to yarn ([#234](https://github.com/webex/widgets/issues/234)) ([432ed3c](https://github.com/webex/widgets/commit/432ed3cc1b2521f69cd9383cd0dbefad8f0a2eee))
29
+ * **circleci:** fix-caching-path-in-ci ([#243](https://github.com/webex/widgets/issues/243)) ([77f40f0](https://github.com/webex/widgets/commit/77f40f098a2f51620bc7af294ec429feeaf8caf1))
30
+ * **circleci:** fix-test-branch-name ([#242](https://github.com/webex/widgets/issues/242)) ([d60859a](https://github.com/webex/widgets/commit/d60859ad562a93d2f1fecd1cfe207729c475edd2))
31
+ * **release:** remove-semantic-release-npm ([#248](https://github.com/webex/widgets/issues/248)) ([c4e7bb1](https://github.com/webex/widgets/commit/c4e7bb18133fd1500f53ce686076868e00e15ec0))
32
+
33
+
34
+ ### Features
35
+
36
+ * **release:** add-release-script-and-config ([#241](https://github.com/webex/widgets/issues/241)) ([376e348](https://github.com/webex/widgets/commit/376e34835a11ccf55d43b207a3777aeeb442aaba))
37
+ * **pipeline:** run-npm-publish-for-cc-store ([#245](https://github.com/webex/widgets/issues/245)) ([d9ef7ae](https://github.com/webex/widgets/commit/d9ef7ae064f334478391637b9b70359edf0b40de))
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
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 store_1 = __importDefault(require("./store"));
7
+ exports.default = store_1.default;
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,oDAA4B;AAC5B,kBAAe,eAAK,CAAC"}
package/dist/sdk.js ADDED
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const sdk = {
13
+ accessToken: '',
14
+ callbacks: {},
15
+ init: function (_a) {
16
+ return __awaiter(this, arguments, void 0, function* ({ accessToken }) {
17
+ this.accessToken = accessToken;
18
+ });
19
+ },
20
+ logout: function () {
21
+ this.accessToken = '';
22
+ this.callControls.unmute();
23
+ this.presence.set('busy');
24
+ },
25
+ presence: {
26
+ currentState: 'busy',
27
+ set: function (state) {
28
+ this.currentState = state;
29
+ console.log(`%cWxCCSDK\t\t\t%cpresence.set:%c Received`, 'background: red; color: white;', 'background: lightgreen; color: black;', 'background: transparent; color: grey;');
30
+ setTimeout(() => {
31
+ sdk.emit('presence:state', this.currentState);
32
+ }, 1500);
33
+ },
34
+ },
35
+ callControls: {
36
+ currentState: 'unmuted',
37
+ mute: function () {
38
+ this.currentState = 'muted';
39
+ console.log(`%cWxCCSDK\t\t\t%ccallControls.mute:%c Received`, 'background: red; color: white;', 'background: lightgreen; color: black;', 'background: transparent; color: grey;');
40
+ setTimeout(() => {
41
+ sdk.emit('callControls:muteState', this.currentState);
42
+ }, 1500);
43
+ },
44
+ unmute: function () {
45
+ this.currentState = 'unmuted';
46
+ console.log(`%cWxCCSDK\t\t\t%ccallControls.unmute:%c Received`, 'background: red; color: white;', 'background: lightgreen; color: black;', 'background: transparent; color: grey;');
47
+ setTimeout(() => {
48
+ sdk.emit('callControls:muteState', this.currentState);
49
+ }, 3000);
50
+ },
51
+ },
52
+ on: function (eventName, callback) {
53
+ if (this.callbacks[eventName] === undefined) {
54
+ this.callbacks[eventName] = [];
55
+ }
56
+ this.callbacks[eventName].push(callback);
57
+ return {
58
+ eventName,
59
+ callback,
60
+ };
61
+ },
62
+ off: function (eventName, callback) {
63
+ this.callbacks[eventName] = this.callbacks[eventName].filter((cb) => cb !== callback);
64
+ },
65
+ emit: function (eventName, payload) {
66
+ console.log(`%cWxCCSDK\t\t\t%cEmitEvent:%c ${eventName}\t\t%cPayload:%c ${payload}`, 'background: red; color: white;', 'background: lightgreen; color: black;', 'background: transparent; color: grey;', 'background: lightgreen; color: black;', 'background: transparent; color: grey;');
67
+ this.callbacks[eventName].forEach((cb) => cb(payload));
68
+ },
69
+ };
70
+ exports.default = sdk;
71
+ //# sourceMappingURL=sdk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,MAAM,GAAG,GAAG;IACV,WAAW,EAAE,EAAE;IACf,SAAS,EAAE,EAAE;IACb,IAAI,EAAE;6DAAe,EAAC,WAAW,EAAC;YAChC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QACjC,CAAC;KAAA;IACD,MAAM,EAAE;QACN,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;QAC3B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;IACD,QAAQ,EAAE;QACR,YAAY,EAAE,MAAM;QACpB,GAAG,EAAE,UAAS,KAAK;YACjB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;YAC1B,OAAO,CAAC,GAAG,CACT,2CAA2C,EAC3C,gCAAgC,EAChC,uCAAuC,EACvC,uCAAuC,CACxC,CAAC;YACF,UAAU,CAAC,GAAG,EAAE;gBACd,GAAG,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;YAChD,CAAC,EAAE,IAAI,CAAC,CAAC;QACX,CAAC;KACF;IACD,YAAY,EAAE;QACZ,YAAY,EAAE,SAAS;QACvB,IAAI,EAAE;YACJ,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC;YAC5B,OAAO,CAAC,GAAG,CACT,gDAAgD,EAChD,gCAAgC,EAChC,uCAAuC,EACvC,uCAAuC,CACxC,CAAC;YACF,UAAU,CAAC,GAAG,EAAE;gBACd,GAAG,CAAC,IAAI,CAAC,wBAAwB,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;YACxD,CAAC,EAAE,IAAI,CAAC,CAAC;QACX,CAAC;QACD,MAAM,EAAE;YACN,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;YAC9B,OAAO,CAAC,GAAG,CACT,kDAAkD,EAClD,gCAAgC,EAChC,uCAAuC,EACvC,uCAAuC,CACxC,CAAC;YACF,UAAU,CAAC,GAAG,EAAE;gBACd,GAAG,CAAC,IAAI,CAAC,wBAAwB,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;YACxD,CAAC,EAAE,IAAI,CAAC,CAAC;QACX,CAAC;KACF;IACD,EAAE,EAAE,UAAS,SAAS,EAAE,QAAQ;QAC9B,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,SAAS,EAAE,CAAC;YAC5C,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;QACjC,CAAC;QACD,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACzC,OAAO;YACL,SAAS;YACT,QAAQ;SACT,CAAC;IACJ,CAAC;IACD,GAAG,EAAE,UAAS,SAAS,EAAE,QAAQ;QAC/B,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC;IACxF,CAAC;IACD,IAAI,EAAE,UAAS,SAAS,EAAE,OAAO;QAC/B,OAAO,CAAC,GAAG,CACT,iCAAiC,SAAS,oBAAoB,OAAO,EAAE,EACvE,gCAAgC,EAChC,uCAAuC,EACvC,uCAAuC,EACvC,uCAAuC,EACvC,uCAAuC,CACxC,CAAC;QACF,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IACzD,CAAC;CACF,CAAC;AAEF,kBAAe,GAAG,CAAC"}
package/dist/store.js ADDED
@@ -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 mobx_1 = require("mobx");
7
+ const sdk_1 = __importDefault(require("./sdk"));
8
+ /*
9
+ * Store class
10
+ */
11
+ class Store {
12
+ constructor() {
13
+ this.loginState = '';
14
+ this.isAvailable = false;
15
+ this.ccSdk = sdk_1.default;
16
+ this.setLoginState = (state) => {
17
+ this.loginState = state;
18
+ };
19
+ this.setIsAvailable = (state) => {
20
+ this.isAvailable = state;
21
+ };
22
+ (0, mobx_1.makeAutoObservable)(this, { ccSdk: mobx_1.observable.ref });
23
+ this.ccSdk.on('presence:state', (payload) => {
24
+ this.setIsAvailable(payload === 'available');
25
+ });
26
+ }
27
+ }
28
+ const store = new Store();
29
+ exports.default = store;
30
+ //# sourceMappingURL=store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.js","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":";;;;;AAAA,+BAAoD;AAEpD,gDAAwB;AACxB;;GAEG;AACH,MAAM,KAAK;IAKT;QAJA,eAAU,GAAG,EAAE,CAAC;QAChB,gBAAW,GAAG,KAAK,CAAC;QACpB,UAAK,GAAG,aAAG,CAAC;QAUZ,kBAAa,GAAG,CAAC,KAAK,EAAE,EAAE;YACxB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QAC1B,CAAC,CAAC;QAEF,mBAAc,GAAG,CAAC,KAAK,EAAE,EAAE;YACzB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAC3B,CAAC,CAAC;QAbA,IAAA,yBAAkB,EAAC,IAAI,EAAE,EAAC,KAAK,EAAE,iBAAU,CAAC,GAAG,EAAC,CAAC,CAAC;QAElD,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,gBAAgB,EAAE,CAAC,OAAO,EAAE,EAAE;YAC1C,IAAI,CAAC,cAAc,CAAC,OAAO,KAAK,WAAW,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;IACL,CAAC;CASF;AAED,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;AAC1B,kBAAe,KAAK,CAAC"}
@@ -0,0 +1,2 @@
1
+ import store from './store';
2
+ export default store;
@@ -0,0 +1,24 @@
1
+ declare const sdk: {
2
+ accessToken: string;
3
+ callbacks: {};
4
+ init: ({ accessToken }: {
5
+ accessToken: any;
6
+ }) => Promise<void>;
7
+ logout: () => void;
8
+ presence: {
9
+ currentState: string;
10
+ set: (state: any) => void;
11
+ };
12
+ callControls: {
13
+ currentState: string;
14
+ mute: () => void;
15
+ unmute: () => void;
16
+ };
17
+ on: (eventName: any, callback: any) => {
18
+ eventName: any;
19
+ callback: any;
20
+ };
21
+ off: (eventName: any, callback: any) => void;
22
+ emit: (eventName: any, payload: any) => void;
23
+ };
24
+ export default sdk;
@@ -0,0 +1,32 @@
1
+ declare class Store {
2
+ loginState: string;
3
+ isAvailable: boolean;
4
+ ccSdk: {
5
+ accessToken: string;
6
+ callbacks: {};
7
+ init: ({ accessToken }: {
8
+ accessToken: any;
9
+ }) => Promise<void>;
10
+ logout: () => void;
11
+ presence: {
12
+ currentState: string;
13
+ set: (state: any) => void;
14
+ };
15
+ callControls: {
16
+ currentState: string;
17
+ mute: () => void;
18
+ unmute: () => void;
19
+ };
20
+ on: (eventName: any, callback: any) => {
21
+ eventName: any;
22
+ callback: any;
23
+ };
24
+ off: (eventName: any, callback: any) => void;
25
+ emit: (eventName: any, payload: any) => void;
26
+ };
27
+ constructor();
28
+ setLoginState: (state: any) => void;
29
+ setIsAvailable: (state: any) => void;
30
+ }
31
+ declare const store: Store;
32
+ export default store;
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@webex/cc-store",
3
+ "description": "Webex Contact Center Widgets: Widgets Store",
4
+ "version": "1.0.1-0",
5
+ "main": "dist/index.js",
6
+ "license": "MIT",
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
10
+ "scripts": {
11
+ "build": "yarn run -T tsc",
12
+ "build:src": "webpack && yarn run build",
13
+ "build:watch": "webpack --watch",
14
+ "test:unit": "jest",
15
+ "release": "semantic-release"
16
+ },
17
+ "dependencies": {
18
+ "mobx": "6.13.5",
19
+ "react": "18.3.1",
20
+ "react-dom": "18.3.1",
21
+ "typescript": "5.6.3"
22
+ },
23
+ "devDependencies": {
24
+ "@babel/core": "7.25.2",
25
+ "@babel/preset-env": "7.25.4",
26
+ "@babel/preset-react": "7.24.7",
27
+ "@babel/preset-typescript": "7.25.9",
28
+ "@semantic-release/changelog": "^6.0.3",
29
+ "@semantic-release/git": "^10.0.1",
30
+ "@testing-library/dom": "10.4.0",
31
+ "@testing-library/jest-dom": "6.6.2",
32
+ "@testing-library/react": "16.0.1",
33
+ "@types/jest": "29.5.14",
34
+ "@types/react-test-renderer": "18",
35
+ "babel-jest": "29.7.0",
36
+ "babel-loader": "9.2.1",
37
+ "file-loader": "6.2.0",
38
+ "jest": "29.7.0",
39
+ "jest-environment-jsdom": "29.7.0",
40
+ "semantic-release": "^24.2.0",
41
+ "semantic-release-yarn": "^3.0.2",
42
+ "ts-loader": "9.5.1",
43
+ "webpack": "5.94.0",
44
+ "webpack-cli": "5.1.4",
45
+ "webpack-merge": "6.0.1"
46
+ },
47
+ "jest": {
48
+ "testEnvironment": "jsdom"
49
+ },
50
+ "stableVersion": "1.0.0"
51
+ }
@@ -0,0 +1,34 @@
1
+ module.exports = {
2
+ branches: [
3
+ 'master', // or 'main', depending on your main branch name
4
+ {
5
+ name: 'eft-pipeline',
6
+ prerelease: 'alpha', // This will trigger versions like 1.0.0-alpha.X
7
+ },
8
+ ],
9
+ plugins: [
10
+ '@semantic-release/commit-analyzer',
11
+ [
12
+ '@semantic-release/release-notes-generator',
13
+ {
14
+ writerOpts: {
15
+ commitsSort: ['subject', 'scope'],
16
+ },
17
+ },
18
+ ],
19
+ '@semantic-release/changelog',
20
+ [
21
+ 'semantic-release-yarn',
22
+ {
23
+ yarnPublish: false, // Prevents publishing via Yarn (useful for Yarn workspaces)
24
+ },
25
+ ],
26
+ [
27
+ '@semantic-release/git',
28
+ {
29
+ assets: ['CHANGELOG.md', 'package.json'],
30
+ },
31
+ ],
32
+ '@semantic-release/github',
33
+ ],
34
+ };
package/src/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ import store from './store';
2
+ export default store;
package/src/sdk.ts ADDED
@@ -0,0 +1,80 @@
1
+ const sdk = {
2
+ accessToken: '',
3
+ callbacks: {},
4
+ init: async function({accessToken}) {
5
+ this.accessToken = accessToken;
6
+ },
7
+ logout: function() {
8
+ this.accessToken = '';
9
+ this.callControls.unmute();
10
+ this.presence.set('busy');
11
+ },
12
+ presence: {
13
+ currentState: 'busy',
14
+ set: function(state) {
15
+ this.currentState = state;
16
+ console.log(
17
+ `%cWxCCSDK\t\t\t%cpresence.set:%c Received`,
18
+ 'background: red; color: white;',
19
+ 'background: lightgreen; color: black;',
20
+ 'background: transparent; color: grey;'
21
+ );
22
+ setTimeout(() => {
23
+ sdk.emit('presence:state', this.currentState);
24
+ }, 1500);
25
+ },
26
+ },
27
+ callControls: {
28
+ currentState: 'unmuted',
29
+ mute: function() {
30
+ this.currentState = 'muted';
31
+ console.log(
32
+ `%cWxCCSDK\t\t\t%ccallControls.mute:%c Received`,
33
+ 'background: red; color: white;',
34
+ 'background: lightgreen; color: black;',
35
+ 'background: transparent; color: grey;'
36
+ );
37
+ setTimeout(() => {
38
+ sdk.emit('callControls:muteState', this.currentState);
39
+ }, 1500);
40
+ },
41
+ unmute: function() {
42
+ this.currentState = 'unmuted';
43
+ console.log(
44
+ `%cWxCCSDK\t\t\t%ccallControls.unmute:%c Received`,
45
+ 'background: red; color: white;',
46
+ 'background: lightgreen; color: black;',
47
+ 'background: transparent; color: grey;'
48
+ );
49
+ setTimeout(() => {
50
+ sdk.emit('callControls:muteState', this.currentState);
51
+ }, 3000);
52
+ },
53
+ },
54
+ on: function(eventName, callback) {
55
+ if (this.callbacks[eventName] === undefined) {
56
+ this.callbacks[eventName] = [];
57
+ }
58
+ this.callbacks[eventName].push(callback);
59
+ return {
60
+ eventName,
61
+ callback,
62
+ };
63
+ },
64
+ off: function(eventName, callback) {
65
+ this.callbacks[eventName] = this.callbacks[eventName].filter((cb) => cb !== callback);
66
+ },
67
+ emit: function(eventName, payload) {
68
+ console.log(
69
+ `%cWxCCSDK\t\t\t%cEmitEvent:%c ${eventName}\t\t%cPayload:%c ${payload}`,
70
+ 'background: red; color: white;',
71
+ 'background: lightgreen; color: black;',
72
+ 'background: transparent; color: grey;',
73
+ 'background: lightgreen; color: black;',
74
+ 'background: transparent; color: grey;'
75
+ );
76
+ this.callbacks[eventName].forEach((cb) => cb(payload));
77
+ },
78
+ };
79
+
80
+ export default sdk;
package/src/store.ts ADDED
@@ -0,0 +1,30 @@
1
+ import {makeAutoObservable, observable} from 'mobx';
2
+
3
+ import sdk from './sdk';
4
+ /*
5
+ * Store class
6
+ */
7
+ class Store {
8
+ loginState = '';
9
+ isAvailable = false;
10
+ ccSdk = sdk;
11
+
12
+ constructor() {
13
+ makeAutoObservable(this, {ccSdk: observable.ref});
14
+
15
+ this.ccSdk.on('presence:state', (payload) => {
16
+ this.setIsAvailable(payload === 'available');
17
+ });
18
+ }
19
+
20
+ setLoginState = (state) => {
21
+ this.loginState = state;
22
+ };
23
+
24
+ setIsAvailable = (state) => {
25
+ this.isAvailable = state;
26
+ };
27
+ }
28
+
29
+ const store = new Store();
30
+ export default store;
package/tsconfig.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": "../../../tsconfig.json",
3
+ "include": [
4
+ "./src"
5
+ ],
6
+ "compilerOptions": {
7
+ "outDir": "./dist",
8
+ "declaration": true,
9
+ "declarationDir": "./dist/types"
10
+ },
11
+ }
@@ -0,0 +1,12 @@
1
+ const {merge} = require('webpack-merge');
2
+ const path = require('path');
3
+
4
+ const baseConfig = require('../../../webpack.config');
5
+
6
+ module.exports = merge(baseConfig, {
7
+ output: {
8
+ path: path.resolve(__dirname, 'dist'),
9
+ filename: 'index.js', // Set the output filename to index.js
10
+ libraryTarget: 'commonjs2',
11
+ },
12
+ });