From cf0493a95c6fd78a75e4f4e1ed43d6563a39345a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Jim=C3=A9nez=20Rivera?= Date: Wed, 9 Jul 2025 16:56:17 +0200 Subject: [PATCH 1/5] Publish on npm --- .github/workflows/publish-npm.yml | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index a9732a0..e358cd4 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -1,7 +1,7 @@ name: Publish Package to npmjs on: - release: - types: [published] + pull_request: + types: [opened, synchronize, reopened] jobs: build: runs-on: ubuntu-latest @@ -19,7 +19,7 @@ jobs: echo "@internxt:registry=https://npm.pkg.github.com/" > .npmrc echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc - - run: yarn + - run: npm publish --scope=@internxt --access public # Change the registry to npmjs (to publish) - run: | diff --git a/package.json b/package.json index d58c3ff..d22c5d1 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@internxt/scan", - "version": "1.0.3", + "version": "1.0.5", "author": "Kyle Farris (https://infotechinc.com)", "description": "Use Node JS to scan files on your server with ClamAV's clamscan/clamdscan binary or via TCP to a remote server or local UNIX Domain socket. This is especially useful for scanning uploaded files provided by un-trusted sources.", "main": "index.js", From f7bf179399e31493b75bac964828ce183da5b37e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Jim=C3=A9nez=20Rivera?= Date: Wed, 9 Jul 2025 16:58:57 +0200 Subject: [PATCH 2/5] Update package.json --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index d22c5d1..bf3f3e2 100755 --- a/package.json +++ b/package.json @@ -17,9 +17,9 @@ ], "scripts": { "docs": "jsdoc2md index.js lib/* > API.md", - "format": "node_modules/.bin/prettier '**/*.{js,json}' --write", - "lint": "node_modules/.bin/eslint '**/*.js'", - "lint:fix": "node_modules/.bin/eslint --fix '**/*.js'", + "format": "prettier '**/*.{js,json}' --write", + "lint": "eslint '**/*.js'", + "lint:fix": "eslint --fix '**/*.js'", "test": "make test" }, "keywords": [ From 90ee4950f4bba9ad5834c4678d1a44210ba88255 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Jim=C3=A9nez=20Rivera?= Date: Wed, 9 Jul 2025 17:01:22 +0200 Subject: [PATCH 3/5] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bf3f3e2..ea76bed 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@internxt/scan", - "version": "1.0.5", + "version": "1.0.6", "author": "Kyle Farris (https://infotechinc.com)", "description": "Use Node JS to scan files on your server with ClamAV's clamscan/clamdscan binary or via TCP to a remote server or local UNIX Domain socket. This is especially useful for scanning uploaded files provided by un-trusted sources.", "main": "index.js", From 22a78ae591eba67ac43cab17c6c204e20db40172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Jim=C3=A9nez=20Rivera?= Date: Wed, 9 Jul 2025 17:22:10 +0200 Subject: [PATCH 4/5] Update publish on npm --- .github/workflows/publish-npm.yml | 42 +++++++++++++++++++------------ .github/workflows/publish.yml | 28 --------------------- 2 files changed, 26 insertions(+), 44 deletions(-) delete mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index e358cd4..6f5c1f7 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -1,29 +1,39 @@ -name: Publish Package to npmjs +name: Publish package to npmjs + on: - pull_request: - types: [opened, synchronize, reopened] + pull_request: + types: [opened, synchronize, reopened] + jobs: - build: + publish_npm: runs-on: ubuntu-latest + permissions: contents: read id-token: write packages: write - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: '20.x' - - run: | - echo "@internxt:registry=https://npm.pkg.github.com/" > .npmrc - echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc + steps: + - name: Checkout code + uses: actions/checkout@v4 - - run: npm publish --scope=@internxt --access public + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 - # Change the registry to npmjs (to publish) - - run: | + - name: Create .npmrc file + run: | echo "registry=https://registry.npmjs.org/" > .npmrc echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc - - run: npm publish --scope=@internxt --access public + - name: Publish package to npm + run: npm publish --scope=@internxt --access public + + - name: Create .npmrc file + run: | + echo "@internxt:registry=https://npm.pkg.github.com/" > .npmrc + echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc + + - name: Publish package to github + run: npm publish --scope=@internxt --access public diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 5df91f7..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Publish Scan package in github package registry -on: - release: - types: [created] - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [22.12.0] - permissions: - contents: read - packages: write - steps: - - uses: actions/checkout@v2 - # Setup .npmrc file to publish to GitHub Packages - - uses: actions/setup-node@v2 - with: - node-version: ${{matrix.node-version}} - registry-url: 'https://npm.pkg.github.com' - - run: yarn - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - run: yarn publish - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 46f70187a516626305ba3610858b5862beec0a94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Jim=C3=A9nez=20Rivera?= Date: Wed, 9 Jul 2025 17:24:56 +0200 Subject: [PATCH 5/5] Publish npm --- .github/workflows/publish-npm.yml | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 6f5c1f7..a99cba5 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -1,8 +1,8 @@ name: Publish package to npmjs on: - pull_request: - types: [opened, synchronize, reopened] + release: + types: [published] jobs: publish_npm: diff --git a/package.json b/package.json index ea76bed..f5357be 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@internxt/scan", - "version": "1.0.6", + "version": "1.0.7", "author": "Kyle Farris (https://infotechinc.com)", "description": "Use Node JS to scan files on your server with ClamAV's clamscan/clamdscan binary or via TCP to a remote server or local UNIX Domain socket. This is especially useful for scanning uploaded files provided by un-trusted sources.", "main": "index.js",