From 740d63e86d94436de2e766cc870d008814ff4a7e Mon Sep 17 00:00:00 2001 From: 1308774130 <39472661+1308774130@users.noreply.github.com> Date: Mon, 23 Oct 2023 20:57:05 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20issues-=E7=94=B5=E5=AD=90=E5=8F=91?= =?UTF-8?q?=E7=A5=A8-=E5=A2=9E=E5=80=BC=E7=A8=8E=E5=8F=91=E7=A5=A8?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA=E7=94=B5=E5=AD=90=E7=AD=BE?= =?UTF-8?q?=E7=AB=A0=20#98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/ofd/ses_signature_parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/ofd/ses_signature_parser.js b/src/utils/ofd/ses_signature_parser.js index 2bbd670..3270553 100644 --- a/src/utils/ofd/ses_signature_parser.js +++ b/src/utils/ofd/ses_signature_parser.js @@ -62,7 +62,7 @@ const decode = function (der, offset) { const SES_Signature = decodeSES_Signature(der,offset); const type = SES_Signature.toSign.eseal.esealInfo.picture.type; const ofdArray = SES_Signature.toSign.eseal.esealInfo.picture.data.byte; - return {ofdArray, 'type': type.toLowerCase(), SES_Signature,'verifyRet':SES_Signature_Verify(SES_Signature)}; + return {ofdArray, 'type': typeof type === 'string'?type.toLowerCase():type.str.toLowerCase(), SES_Signature,'verifyRet':SES_Signature_Verify(SES_Signature)}; } catch (e) { console.log(e) return {}; From 24daa5bd37c370e5d3925926cbca3f070720d5be Mon Sep 17 00:00:00 2001 From: 1308774130 <39472661+1308774130@users.noreply.github.com> Date: Tue, 5 Dec 2023 14:08:09 +0800 Subject: [PATCH 2/3] Create npm-publish.yml --- .github/workflows/npm-publish.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..f008e89 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,28 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages + +name: Publish Package to npmjs + +on: + push: + # branches: [ main ] + # paths: + # - 'src/' + tags: + - '**' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v3 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + - run: npm i + - run: npm run build + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From b6c29aa0c24aefa5ca0b9045bc0b38a66d6f59de Mon Sep 17 00:00:00 2001 From: 1308774130 <39472661+1308774130@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:08:01 +0800 Subject: [PATCH 3/3] Delete .github/workflows directory --- .github/workflows/npm-publish.yml | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml deleted file mode 100644 index f008e89..0000000 --- a/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,28 +0,0 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created -# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages - -name: Publish Package to npmjs - -on: - push: - # branches: [ main ] - # paths: - # - 'src/' - tags: - - '**' - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - # Setup .npmrc file to publish to npm - - uses: actions/setup-node@v3 - with: - node-version: '16.x' - registry-url: 'https://registry.npmjs.org' - - run: npm i - - run: npm run build - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}