From 7951696b934f3e521b573f942a72c6b8b3fea8a3 Mon Sep 17 00:00:00 2001 From: Himanshu Gupta Date: Sat, 18 May 2024 20:46:24 +0530 Subject: [PATCH 01/15] fix(bugfix for last release): phoneBook, Scanner, TextToSpeech, Vibrate component fixed --- __app/component/PhoneBook/PhoneBook.js | 2 +- __app/component/Scanner/Scanner.js | 22 +++++++++---------- __app/component/TextToSpeech/TextToSpeech.js | 9 +++++--- __app/component/Vibrate/Vibrate.js | 2 +- __app/component/services/handlerService.js | 23 ++++++++++++-------- 5 files changed, 33 insertions(+), 25 deletions(-) diff --git a/__app/component/PhoneBook/PhoneBook.js b/__app/component/PhoneBook/PhoneBook.js index a9d8f58..062a4cb 100644 --- a/__app/component/PhoneBook/PhoneBook.js +++ b/__app/component/PhoneBook/PhoneBook.js @@ -9,7 +9,7 @@ const failureMsgDefault = { error: 'Unable to fetch details from PhoneBook', }; -const isBrowserSupport = () => globalThis.navigator?.contacts && globalThis.ContactsManage; +const isBrowserSupport = () => globalThis.navigator?.contacts; const phoneBook = ({ successCb = () => {}, diff --git a/__app/component/Scanner/Scanner.js b/__app/component/Scanner/Scanner.js index 96a7082..862d7c0 100644 --- a/__app/component/Scanner/Scanner.js +++ b/__app/component/Scanner/Scanner.js @@ -11,9 +11,7 @@ const failureMsgDefault = { unSupported: 'QR-Code/Bar-Code/UPI Scanner is not supporting in your device', streamingFailed: 'Camera streaming failed', barCodeDetectionFailed: 'Bar code detection failed', - invalidImage: 'Invalid Images', flashUnsupported: 'Flash is not supporting in your device', - unableToScan: 'Unable to scan', }; const isBrowserSupport = () => globalThis.navigator?.mediaDevices && globalThis.BarcodeDetector; @@ -123,19 +121,13 @@ function Scanner({ detectCodes(); }; - const allClear = () => { - cancelAnimationFrame(videoUnmount); - stopStreaming(); - clearTimeout(unmoutRenderLoop); - }; - - const toggleFlash = async () => { + const toggleFlash = async (close) => { const track = mediaStream.getVideoTracks()[0]; try { await track.applyConstraints({ - advanced: [{ torch: !flash }], + advanced: [{ torch: close === false ? false : !flash }], }); - setFlash((s) => !s); + setFlash((s) => (close === false ? false : !s)); } catch (error) { return handleError({ msgType: 'FLASH_UPSUPPORTED', msg: failureMsg.flashUnsupported, failureCb }); } @@ -151,6 +143,14 @@ function Scanner({ startVideo(); }; + const allClear = () => { + cancelAnimationFrame(videoUnmount); + stopStreaming(); + clearTimeout(unmoutRenderLoop); + toggleFlash(false); + facingMode = 'back'; + }; + const handleBrowserSupport = () => { if (isBrowserSupport()) { handleLoading({ loadingCb }); diff --git a/__app/component/TextToSpeech/TextToSpeech.js b/__app/component/TextToSpeech/TextToSpeech.js index 1bde080..e52633b 100644 --- a/__app/component/TextToSpeech/TextToSpeech.js +++ b/__app/component/TextToSpeech/TextToSpeech.js @@ -8,6 +8,8 @@ import TextToSpeechStart from './TextToSpeechStart'; const failureMsgDefault = { unSupported: 'Text To Speech feature is not supporting in your device', badRequest: 'Missing props/params', + techError: 'Technical error', + interrupted: 'Interrupted', error: 'Unable to convert text to voice', }; @@ -28,8 +30,6 @@ const textToSpeechStart = ({ const init = async () => { if (isBrowserSupport()) { - handleLoading({ loadingCb }); - // Your Code will start from here if (text) { handleLoading({ loadingCb }); @@ -42,10 +42,13 @@ const textToSpeechStart = ({ }; utteranceCbk.onerror = (e) => { setIsAudioOn(false); + if (e.error === 'interrupted') { + return handleError({ msgType: 'INTERRUPTED', msg: failureMsg.interrupted || e.error, failureCb }); + } return handleError({ msgType: 'ERROR', msg: failureMsg.error || e.error, failureCb }); }; } catch (error) { - return handleError({ msgType: 'ERROR', msg: failureMsg.error, failureCb }); + return handleError({ msgType: 'TECH_ERROR', msg: failureMsg.techError, failureCb }); } } else { return handleError({ msgType: 'MISSING_PARAMS', msg: failureMsg.badRequest, failureCb }); diff --git a/__app/component/Vibrate/Vibrate.js b/__app/component/Vibrate/Vibrate.js index 87f5e80..b715471 100644 --- a/__app/component/Vibrate/Vibrate.js +++ b/__app/component/Vibrate/Vibrate.js @@ -16,7 +16,7 @@ const vibrate = ({ loadingCb = () => {}, successMsg = 'Vibrated Successfully!!', failureMsg: failureMsgProps = { ...failureMsgDefault }, - vibrationSeq, + vibrationSeq = [100, 30, 100, 30, 100, 30, 200, 30, 200, 30], } = {}) => { const failureMsg = { ...failureMsgDefault, ...failureMsgProps }; diff --git a/__app/component/services/handlerService.js b/__app/component/services/handlerService.js index f1b8253..1bc5807 100644 --- a/__app/component/services/handlerService.js +++ b/__app/component/services/handlerService.js @@ -1,28 +1,33 @@ export const handleSuccess = ({ msg, msgType, successCb, data }) => { - console.log(`%c${msgType} : %s`, 'color: green; font-size: 20px', '', data); - successCb({ + const rtn = { msgType, msg, data, - status: 'SUCCESS', - }); + status: 'SUCCESS SUCCESS SUCCESS SUCCESS SUCCESS SUCCESS SUCCESS', + }; + console.table('%c SUCCESS::%s', 'color: green; font-size: 20px', '', rtn); + successCb(rtn); }; export const handleError = ({ msg, msgType, failureCb }) => { - console.log(`%c${msgType} : %s`, 'color: green; font-size: 20px', '', msg); - failureCb({ + const rtn = { msgType, msg, status: 'FAILURE', - }); + }; + console.table('%c FAILURE::%s', 'color: red; font-size: 20px', '', rtn); + failureCb(rtn); return false; }; export const handleLoading = ({ loadingCb }) => { - loadingCb({ + const rtn = { msgType: 'LOADING', msg: 'Loading...', status: 'LOADING', - }); + }; + + console.table('%c Loading::%s', 'color: green; font-size: 20px', '', rtn); + loadingCb(rtn); }; From 4a4386c1332518197994e11c474fd6bca32c61c4 Mon Sep 17 00:00:00 2001 From: Himanshu Gupta Date: Sat, 18 May 2024 22:02:04 +0530 Subject: [PATCH 02/15] fix(publish.yml): added main branch for auto release --- .github/workflows/publish.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 277f5cc..221d412 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,7 +5,7 @@ name: Node.js CI on: push: - branches: [ "master" ] + branches: [ "master", main ] pull_request: branches: '*' @@ -17,17 +17,17 @@ jobs: matrix: node-version: [21.6.1] os: [ubuntu-latest] - + steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - + - run: npm ci - run: npm run prod - run: npm run semantic-release - env: + env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 501274b61cd30451714d9099f55c8d942c4483d6 Mon Sep 17 00:00:00 2001 From: Himanshu Gupta Date: Sat, 18 May 2024 22:03:41 +0530 Subject: [PATCH 03/15] fix(publish.yml): added main branch for auto release --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index d75c92c..f43654d 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ "release": { "branches": [ "master", + "main", "next" ], "plugins": [ From c3b25a41ec75d178906947d6bad56bc2fb750b0c Mon Sep 17 00:00:00 2001 From: Himanshu Gupta Date: Sat, 18 May 2024 22:04:59 +0530 Subject: [PATCH 04/15] fix(publish.yml): (34) added main branch for auto release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f43654d..ff8670a 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "commit": "npm run lint:check && git-cz", "lint:check": "lint-staged", "lint:fix": "eslint . --fix", - "semantic-release": "semantic-release --branches master", + "semantic-release": "semantic-release --branches main", "prod:unminified": "NODE_ENV=production babel __app/component -d __build" }, "author": "Himanshu Gupta ", From 12e2e37a320bc6e0f4f572776cd8a2a8869de420 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 18 May 2024 16:35:34 +0000 Subject: [PATCH 05/15] chore(release): 1.2.2 [skip ci] ## [1.2.2](https://github.com/opensrc0/fe-pilot/compare/v1.2.1...v1.2.2) (2024-5-18) ### Bug Fixes * **added support of multi export and services:** added support of multi export and services ([1981372](https://github.com/opensrc0/fe-pilot/commit/1981372a4c2d2dee30884f5fec18d8c0cff9a7ff)) * **bugfix for last release:** phoneBook, Scanner, TextToSpeech, Vibrate component fixed ([9fc641c](https://github.com/opensrc0/fe-pilot/commit/9fc641c1911888f2512561f3acdabb95d9e1abb0)) * **bugfix for last release:** phoneBook, Scanner, TextToSpeech, Vibrate component fixed ([7951696](https://github.com/opensrc0/fe-pilot/commit/7951696b934f3e521b573f942a72c6b8b3fea8a3)) * **publish.yml:** (34) added main branch for auto release ([c3b25a4](https://github.com/opensrc0/fe-pilot/commit/c3b25a41ec75d178906947d6bad56bc2fb750b0c)) * **publish.yml:** added main branch for auto release ([501274b](https://github.com/opensrc0/fe-pilot/commit/501274b61cd30451714d9099f55c8d942c4483d6)) * **publish.yml:** added main branch for auto release ([4a4386c](https://github.com/opensrc0/fe-pilot/commit/4a4386c1332518197994e11c474fd6bca32c61c4)) --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d4435c..a9df13c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,18 @@ ## [1.2.2](https://github.com/opensrc0/fe-pilot/compare/v1.2.1...v1.2.2) (2024-5-18) +### Bug Fixes + +* **added support of multi export and services:** added support of multi export and services ([1981372](https://github.com/opensrc0/fe-pilot/commit/1981372a4c2d2dee30884f5fec18d8c0cff9a7ff)) +* **bugfix for last release:** phoneBook, Scanner, TextToSpeech, Vibrate component fixed ([9fc641c](https://github.com/opensrc0/fe-pilot/commit/9fc641c1911888f2512561f3acdabb95d9e1abb0)) +* **bugfix for last release:** phoneBook, Scanner, TextToSpeech, Vibrate component fixed ([7951696](https://github.com/opensrc0/fe-pilot/commit/7951696b934f3e521b573f942a72c6b8b3fea8a3)) +* **publish.yml:** (34) added main branch for auto release ([c3b25a4](https://github.com/opensrc0/fe-pilot/commit/c3b25a41ec75d178906947d6bad56bc2fb750b0c)) +* **publish.yml:** added main branch for auto release ([501274b](https://github.com/opensrc0/fe-pilot/commit/501274b61cd30451714d9099f55c8d942c4483d6)) +* **publish.yml:** added main branch for auto release ([4a4386c](https://github.com/opensrc0/fe-pilot/commit/4a4386c1332518197994e11c474fd6bca32c61c4)) + +## [1.2.2](https://github.com/opensrc0/fe-pilot/compare/v1.2.1...v1.2.2) (2024-5-18) + + ### Bug Fixes * **added support of multi export and services:** added support of multi export and services ([1981372](https://github.com/opensrc0/fe-pilot/commit/1981372a4c2d2dee30884f5fec18d8c0cff9a7ff)) From 788afb6efa03630c37842291d9f1b9874bb9f258 Mon Sep 17 00:00:00 2001 From: Himanshu Gupta Date: Sun, 19 May 2024 00:50:39 +0530 Subject: [PATCH 06/15] fixed: conflicts --- CHANGELOG.md | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9df13c..5ed9c0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,40 @@ +## [1.2.5](https://github.com/opensrc0/fe-pilot/compare/v1.2.4...v1.2.5) (2024-5-18) + + +### Bug Fixes + +* **version update:** update version ([2596ca0](https://github.com/opensrc0/fe-pilot/commit/2596ca01b47ab249ce598a16fd98edd51324cbf7)) + +## [1.2.2](https://github.com/opensrc0/fe-pilot/compare/v1.2.1...v1.2.2) (2024-5-18) + + +### Bug Fixes + +* **added support of multi export and services:** added support of multi export and services ([1981372](https://github.com/opensrc0/fe-pilot/commit/1981372a4c2d2dee30884f5fec18d8c0cff9a7ff)) +* **bugfix for last release:** phoneBook, Scanner, TextToSpeech, Vibrate component fixed ([9fc641c](https://github.com/opensrc0/fe-pilot/commit/9fc641c1911888f2512561f3acdabb95d9e1abb0)) +* **chanin log:** added chain log ([d116292](https://github.com/opensrc0/fe-pilot/commit/d1162922ce2544424db0d5f00caa0647a50cb2ae)) +* **version in package.json:** version in package.json ([fd208ce](https://github.com/opensrc0/fe-pilot/commit/fd208cebae844c60b1504182e799693390a5bcef)) +* **versioning:** maintain version ([10f3c21](https://github.com/opensrc0/fe-pilot/commit/10f3c21898764fe74436e454b941ec3d3191274e)) + +## [1.2.2](https://github.com/opensrc0/fe-pilot/compare/v1.2.1...v1.2.2) (2024-5-18) + + +### Bug Fixes + +* **added support of multi export and services:** added support of multi export and services ([1981372](https://github.com/opensrc0/fe-pilot/commit/1981372a4c2d2dee30884f5fec18d8c0cff9a7ff)) +* **bugfix for last release:** phoneBook, Scanner, TextToSpeech, Vibrate component fixed ([9fc641c](https://github.com/opensrc0/fe-pilot/commit/9fc641c1911888f2512561f3acdabb95d9e1abb0)) +* **chanin log:** added chain log ([d116292](https://github.com/opensrc0/fe-pilot/commit/d1162922ce2544424db0d5f00caa0647a50cb2ae)) +* **versioning:** maintain version ([10f3c21](https://github.com/opensrc0/fe-pilot/commit/10f3c21898764fe74436e454b941ec3d3191274e)) + +## [1.2.3](https://github.com/opensrc0/fe-pilot/compare/v1.2.1...v1.2.2) (2024-5-18) + + +### Bug Fixes + +* **added support of multi export and services:** added support of multi export and services ([1981372](https://github.com/opensrc0/fe-pilot/commit/1981372a4c2d2dee30884f5fec18d8c0cff9a7ff)) +* **bugfix for last release:** phoneBook, Scanner, TextToSpeech, Vibrate component fixed ([9fc641c](https://github.com/opensrc0/fe-pilot/commit/9fc641c1911888f2512561f3acdabb95d9e1abb0)) +* **versioning:** maintain version ([10f3c21](https://github.com/opensrc0/fe-pilot/commit/10f3c21898764fe74436e454b941ec3d3191274e)) + ## [1.2.2](https://github.com/opensrc0/fe-pilot/compare/v1.2.1...v1.2.2) (2024-5-18) @@ -5,10 +42,6 @@ * **added support of multi export and services:** added support of multi export and services ([1981372](https://github.com/opensrc0/fe-pilot/commit/1981372a4c2d2dee30884f5fec18d8c0cff9a7ff)) * **bugfix for last release:** phoneBook, Scanner, TextToSpeech, Vibrate component fixed ([9fc641c](https://github.com/opensrc0/fe-pilot/commit/9fc641c1911888f2512561f3acdabb95d9e1abb0)) -* **bugfix for last release:** phoneBook, Scanner, TextToSpeech, Vibrate component fixed ([7951696](https://github.com/opensrc0/fe-pilot/commit/7951696b934f3e521b573f942a72c6b8b3fea8a3)) -* **publish.yml:** (34) added main branch for auto release ([c3b25a4](https://github.com/opensrc0/fe-pilot/commit/c3b25a41ec75d178906947d6bad56bc2fb750b0c)) -* **publish.yml:** added main branch for auto release ([501274b](https://github.com/opensrc0/fe-pilot/commit/501274b61cd30451714d9099f55c8d942c4483d6)) -* **publish.yml:** added main branch for auto release ([4a4386c](https://github.com/opensrc0/fe-pilot/commit/4a4386c1332518197994e11c474fd6bca32c61c4)) ## [1.2.2](https://github.com/opensrc0/fe-pilot/compare/v1.2.1...v1.2.2) (2024-5-18) From e9bed42d4f99c4e4d7c1ce2747fb0baad274b87b Mon Sep 17 00:00:00 2001 From: Himanshu Gupta Date: Sat, 18 May 2024 23:28:31 +0530 Subject: [PATCH 07/15] fix(versioning): maintain version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ff8670a..37c0fd6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fe-pilot", - "version": "1.2.2", + "version": "1.2.3", "description": "Advance JS features, Plug & Play", "main": "index.js", "scripts": { From 8dacc1eb05ecfc68e7605d8fce9a90f5bd6e825f Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 18 May 2024 17:59:06 +0000 Subject: [PATCH 08/15] chore(release): 1.2.2 [skip ci] ## [1.2.2](https://github.com/opensrc0/fe-pilot/compare/v1.2.1...v1.2.2) (2024-5-18) ### Bug Fixes * **added support of multi export and services:** added support of multi export and services ([1981372](https://github.com/opensrc0/fe-pilot/commit/1981372a4c2d2dee30884f5fec18d8c0cff9a7ff)) * **bugfix for last release:** phoneBook, Scanner, TextToSpeech, Vibrate component fixed ([9fc641c](https://github.com/opensrc0/fe-pilot/commit/9fc641c1911888f2512561f3acdabb95d9e1abb0)) * **versioning:** maintain version ([10f3c21](https://github.com/opensrc0/fe-pilot/commit/10f3c21898764fe74436e454b941ec3d3191274e)) --- CHANGELOG.md | 9 +++++++++ package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ed9c0f..cc92bee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,15 @@ ## [1.2.2](https://github.com/opensrc0/fe-pilot/compare/v1.2.1...v1.2.2) (2024-5-18) +### Bug Fixes + +* **added support of multi export and services:** added support of multi export and services ([1981372](https://github.com/opensrc0/fe-pilot/commit/1981372a4c2d2dee30884f5fec18d8c0cff9a7ff)) +* **bugfix for last release:** phoneBook, Scanner, TextToSpeech, Vibrate component fixed ([9fc641c](https://github.com/opensrc0/fe-pilot/commit/9fc641c1911888f2512561f3acdabb95d9e1abb0)) +* **versioning:** maintain version ([10f3c21](https://github.com/opensrc0/fe-pilot/commit/10f3c21898764fe74436e454b941ec3d3191274e)) + +## [1.2.2](https://github.com/opensrc0/fe-pilot/compare/v1.2.1...v1.2.2) (2024-5-18) + + ### Bug Fixes * **added support of multi export and services:** added support of multi export and services ([1981372](https://github.com/opensrc0/fe-pilot/commit/1981372a4c2d2dee30884f5fec18d8c0cff9a7ff)) diff --git a/package.json b/package.json index 37c0fd6..ff8670a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fe-pilot", - "version": "1.2.3", + "version": "1.2.2", "description": "Advance JS features, Plug & Play", "main": "index.js", "scripts": { From 4eb21865d87ffe6834dccaf0f264d4ae1eaa8980 Mon Sep 17 00:00:00 2001 From: Himanshu Gupta Date: Sun, 19 May 2024 00:51:18 +0530 Subject: [PATCH 09/15] fixed: conflicts --- CHANGELOG.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc92bee..5ed9c0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,15 +38,6 @@ ## [1.2.2](https://github.com/opensrc0/fe-pilot/compare/v1.2.1...v1.2.2) (2024-5-18) -### Bug Fixes - -* **added support of multi export and services:** added support of multi export and services ([1981372](https://github.com/opensrc0/fe-pilot/commit/1981372a4c2d2dee30884f5fec18d8c0cff9a7ff)) -* **bugfix for last release:** phoneBook, Scanner, TextToSpeech, Vibrate component fixed ([9fc641c](https://github.com/opensrc0/fe-pilot/commit/9fc641c1911888f2512561f3acdabb95d9e1abb0)) -* **versioning:** maintain version ([10f3c21](https://github.com/opensrc0/fe-pilot/commit/10f3c21898764fe74436e454b941ec3d3191274e)) - -## [1.2.2](https://github.com/opensrc0/fe-pilot/compare/v1.2.1...v1.2.2) (2024-5-18) - - ### Bug Fixes * **added support of multi export and services:** added support of multi export and services ([1981372](https://github.com/opensrc0/fe-pilot/commit/1981372a4c2d2dee30884f5fec18d8c0cff9a7ff)) From eb75579897d948cb7f3ff7ef1148cb62ab867188 Mon Sep 17 00:00:00 2001 From: Himanshu Gupta Date: Sat, 18 May 2024 23:42:18 +0530 Subject: [PATCH 10/15] fix(version in package.json): version in package.json --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 173d934..5087e3d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "fe-pilot", - "version": "1.2.2", + "version": "1.2.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "fe-pilot", - "version": "1.2.2", + "version": "1.2.3", "license": "MIT", "devDependencies": { "@babel/cli": "^7.23.9", diff --git a/package.json b/package.json index ff8670a..37c0fd6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fe-pilot", - "version": "1.2.2", + "version": "1.2.3", "description": "Advance JS features, Plug & Play", "main": "index.js", "scripts": { From 9730c0e035806126eef3de996e910607706c51ab Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 18 May 2024 18:13:07 +0000 Subject: [PATCH 11/15] chore(release): 1.2.2 [skip ci] ## [1.2.2](https://github.com/opensrc0/fe-pilot/compare/v1.2.1...v1.2.2) (2024-5-18) ### Bug Fixes * **added support of multi export and services:** added support of multi export and services ([1981372](https://github.com/opensrc0/fe-pilot/commit/1981372a4c2d2dee30884f5fec18d8c0cff9a7ff)) * **bugfix for last release:** phoneBook, Scanner, TextToSpeech, Vibrate component fixed ([9fc641c](https://github.com/opensrc0/fe-pilot/commit/9fc641c1911888f2512561f3acdabb95d9e1abb0)) * **chanin log:** added chain log ([d116292](https://github.com/opensrc0/fe-pilot/commit/d1162922ce2544424db0d5f00caa0647a50cb2ae)) * **version in package.json:** version in package.json ([fd208ce](https://github.com/opensrc0/fe-pilot/commit/fd208cebae844c60b1504182e799693390a5bcef)) * **versioning:** maintain version ([10f3c21](https://github.com/opensrc0/fe-pilot/commit/10f3c21898764fe74436e454b941ec3d3191274e)) --- CHANGELOG.md | 11 +++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ed9c0f..3da5bcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,17 @@ ## [1.2.2](https://github.com/opensrc0/fe-pilot/compare/v1.2.1...v1.2.2) (2024-5-18) +### Bug Fixes + +* **added support of multi export and services:** added support of multi export and services ([1981372](https://github.com/opensrc0/fe-pilot/commit/1981372a4c2d2dee30884f5fec18d8c0cff9a7ff)) +* **bugfix for last release:** phoneBook, Scanner, TextToSpeech, Vibrate component fixed ([9fc641c](https://github.com/opensrc0/fe-pilot/commit/9fc641c1911888f2512561f3acdabb95d9e1abb0)) +* **chanin log:** added chain log ([d116292](https://github.com/opensrc0/fe-pilot/commit/d1162922ce2544424db0d5f00caa0647a50cb2ae)) +* **version in package.json:** version in package.json ([fd208ce](https://github.com/opensrc0/fe-pilot/commit/fd208cebae844c60b1504182e799693390a5bcef)) +* **versioning:** maintain version ([10f3c21](https://github.com/opensrc0/fe-pilot/commit/10f3c21898764fe74436e454b941ec3d3191274e)) + +## [1.2.2](https://github.com/opensrc0/fe-pilot/compare/v1.2.1...v1.2.2) (2024-5-18) + + ### Bug Fixes * **added support of multi export and services:** added support of multi export and services ([1981372](https://github.com/opensrc0/fe-pilot/commit/1981372a4c2d2dee30884f5fec18d8c0cff9a7ff)) diff --git a/package-lock.json b/package-lock.json index 5087e3d..173d934 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "fe-pilot", - "version": "1.2.3", + "version": "1.2.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "fe-pilot", - "version": "1.2.3", + "version": "1.2.2", "license": "MIT", "devDependencies": { "@babel/cli": "^7.23.9", diff --git a/package.json b/package.json index 37c0fd6..ff8670a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fe-pilot", - "version": "1.2.3", + "version": "1.2.2", "description": "Advance JS features, Plug & Play", "main": "index.js", "scripts": { From 66825a37c572fa94da8db464de1a5b0d1bb33c33 Mon Sep 17 00:00:00 2001 From: Himanshu Gupta Date: Sun, 19 May 2024 00:00:33 +0530 Subject: [PATCH 12/15] fix(version update): update version --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 173d934..3862020 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "fe-pilot", - "version": "1.2.2", + "version": "1.2.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "fe-pilot", - "version": "1.2.2", + "version": "1.2.4", "license": "MIT", "devDependencies": { "@babel/cli": "^7.23.9", diff --git a/package.json b/package.json index ff8670a..a915cf1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fe-pilot", - "version": "1.2.2", + "version": "1.2.4", "description": "Advance JS features, Plug & Play", "main": "index.js", "scripts": { From 1894f439abad3ebd548efb78c2be7c520303e020 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 18 May 2024 18:31:08 +0000 Subject: [PATCH 13/15] chore(release): 1.2.5 [skip ci] * **version update:** update version ([2596ca0](https://github.com/opensrc0/fe-pilot/commit/2596ca01b47ab249ce598a16fd98edd51324cbf7)) --- CHANGELOG.md | 11 ----------- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3da5bcf..5ed9c0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,17 +19,6 @@ ## [1.2.2](https://github.com/opensrc0/fe-pilot/compare/v1.2.1...v1.2.2) (2024-5-18) -### Bug Fixes - -* **added support of multi export and services:** added support of multi export and services ([1981372](https://github.com/opensrc0/fe-pilot/commit/1981372a4c2d2dee30884f5fec18d8c0cff9a7ff)) -* **bugfix for last release:** phoneBook, Scanner, TextToSpeech, Vibrate component fixed ([9fc641c](https://github.com/opensrc0/fe-pilot/commit/9fc641c1911888f2512561f3acdabb95d9e1abb0)) -* **chanin log:** added chain log ([d116292](https://github.com/opensrc0/fe-pilot/commit/d1162922ce2544424db0d5f00caa0647a50cb2ae)) -* **version in package.json:** version in package.json ([fd208ce](https://github.com/opensrc0/fe-pilot/commit/fd208cebae844c60b1504182e799693390a5bcef)) -* **versioning:** maintain version ([10f3c21](https://github.com/opensrc0/fe-pilot/commit/10f3c21898764fe74436e454b941ec3d3191274e)) - -## [1.2.2](https://github.com/opensrc0/fe-pilot/compare/v1.2.1...v1.2.2) (2024-5-18) - - ### Bug Fixes * **added support of multi export and services:** added support of multi export and services ([1981372](https://github.com/opensrc0/fe-pilot/commit/1981372a4c2d2dee30884f5fec18d8c0cff9a7ff)) diff --git a/package-lock.json b/package-lock.json index 3862020..a13e478 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "fe-pilot", - "version": "1.2.4", + "version": "1.2.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "fe-pilot", - "version": "1.2.4", + "version": "1.2.5", "license": "MIT", "devDependencies": { "@babel/cli": "^7.23.9", diff --git a/package.json b/package.json index a915cf1..491861f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fe-pilot", - "version": "1.2.4", + "version": "1.2.5", "description": "Advance JS features, Plug & Play", "main": "index.js", "scripts": { From c8075978deb335cce5b597a12c267a376a632022 Mon Sep 17 00:00:00 2001 From: Himanshu Gupta Date: Sun, 19 May 2024 00:48:36 +0530 Subject: [PATCH 14/15] revert changes --- .github/workflows/publish.yml | 2 +- package.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 221d412..4b58fe9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,7 +5,7 @@ name: Node.js CI on: push: - branches: [ "master", main ] + branches: [ "master" ] pull_request: branches: '*' diff --git a/package.json b/package.json index 491861f..746944c 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "commit": "npm run lint:check && git-cz", "lint:check": "lint-staged", "lint:fix": "eslint . --fix", - "semantic-release": "semantic-release --branches main", + "semantic-release": "semantic-release --branches master", "prod:unminified": "NODE_ENV=production babel __app/component -d __build" }, "author": "Himanshu Gupta ", @@ -74,7 +74,6 @@ "release": { "branches": [ "master", - "main", "next" ], "plugins": [ From eaa12dbd9428323603d65fc9db31d1197ded69e3 Mon Sep 17 00:00:00 2001 From: Himanshu Gupta Date: Sun, 19 May 2024 01:20:02 +0530 Subject: [PATCH 15/15] fix(scanner): fixed: Scanner component --- __app/component/Scanner/Scanner.js | 22 +++++++++++++--------- __app/component/services/handlerService.js | 2 +- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/__app/component/Scanner/Scanner.js b/__app/component/Scanner/Scanner.js index 862d7c0..73ca9e0 100644 --- a/__app/component/Scanner/Scanner.js +++ b/__app/component/Scanner/Scanner.js @@ -122,15 +122,19 @@ function Scanner({ }; const toggleFlash = async (close) => { - const track = mediaStream.getVideoTracks()[0]; - try { - await track.applyConstraints({ - advanced: [{ torch: close === false ? false : !flash }], - }); - setFlash((s) => (close === false ? false : !s)); - } catch (error) { - return handleError({ msgType: 'FLASH_UPSUPPORTED', msg: failureMsg.flashUnsupported, failureCb }); + if (mediaStream) { + const track = mediaStream.getVideoTracks()[0]; + try { + await track.applyConstraints({ + advanced: [{ torch: !flash }], + }); + setFlash((s) => (close === false ? false : !s)); + } catch (error) { + return handleError({ msgType: 'FLASH_UPSUPPORTED', msg: failureMsg.flashUnsupported, failureCb }); + } + return true; } + return true; }; @@ -147,7 +151,7 @@ function Scanner({ cancelAnimationFrame(videoUnmount); stopStreaming(); clearTimeout(unmoutRenderLoop); - toggleFlash(false); + if (flash) toggleFlash(false); facingMode = 'back'; }; diff --git a/__app/component/services/handlerService.js b/__app/component/services/handlerService.js index 1bc5807..e5c9e6b 100644 --- a/__app/component/services/handlerService.js +++ b/__app/component/services/handlerService.js @@ -3,7 +3,7 @@ export const handleSuccess = ({ msg, msgType, successCb, data }) => { msgType, msg, data, - status: 'SUCCESS SUCCESS SUCCESS SUCCESS SUCCESS SUCCESS SUCCESS', + status: 'SUCCESS', }; console.table('%c SUCCESS::%s', 'color: green; font-size: 20px', '', rtn); successCb(rtn);