Skip to content

Commit bbe24c5

Browse files
committed
RV [OPT] - added support
1 parent f3a0de4 commit bbe24c5

4 files changed

Lines changed: 40 additions & 45 deletions

File tree

.github/workflows/publish.yml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,27 @@
1-
name: Publish Package to NPM
1+
name: Publish Package
22

33
on:
44
release:
55
types: [created]
66

77
jobs:
8-
build-and-publish:
8+
build:
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: Checkout code
12-
uses: actions/checkout@v4
13-
14-
- name: Setup Node.js
15-
uses: actions/setup-node@v4
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-node@v3
1613
with:
1714
node-version: '20.x'
18-
registry-url: 'https://registry.npmjs.org'
19-
15+
registry-url: 'https://npm.pkg.github.com'
16+
scope: '@th3hero'
17+
2018
- name: Install dependencies
2119
run: npm ci
22-
23-
- name: Type check
24-
run: npm run typecheck
25-
26-
- name: Run tests
27-
run: npm test
28-
20+
2921
- name: Build
3022
run: npm run build
31-
32-
- name: Publish to NPM
23+
24+
- name: Publish to GitHub Packages
3325
run: npm publish
3426
env:
3527
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@th3hero:registry=https://npm.pkg.github.com/
2+
//npm.pkg.github.com/:_authToken=${NPM_TOKEN}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,28 @@
22
"name": "@th3hero/request-validator",
33
"version": "1.1.4",
44
"description": "A powerful and flexible request validation library for Node.js applications, built with TypeScript. This library provides a comprehensive set of validation rules and supports both synchronous and asynchronous validation.",
5+
"keywords": [
6+
"validator",
7+
"request-validator",
8+
"typescript",
9+
"nodejs",
10+
"nextjs",
11+
"express",
12+
"validation",
13+
"input-validation",
14+
"form-validation"
15+
],
16+
"homepage": "https://github.com/th3hero/request-validator#readme",
17+
"bugs": {
18+
"url": "https://github.com/th3hero/request-validator/issues"
19+
},
20+
"repository": {
21+
"type": "git",
22+
"url": "git+https://github.com/th3hero/request-validator.git"
23+
},
24+
"license": "MIT",
25+
"author": "Alok Kumar",
26+
"type": "commonjs",
527
"main": "dist/index.js",
628
"types": "dist/index.d.ts",
729
"files": [
@@ -22,25 +44,9 @@
2244
"format": "prettier --write \"src/**/*.ts\"",
2345
"typecheck": "tsc --noEmit"
2446
},
25-
"keywords": [
26-
"validator",
27-
"request-validator",
28-
"typescript",
29-
"nodejs",
30-
"nextjs",
31-
"express",
32-
"validation",
33-
"input-validation",
34-
"form-validation"
35-
],
36-
"author": "Alok Kumar Singh",
37-
"license": "MIT",
3847
"dependencies": {
3948
"express": "^4.18.2"
4049
},
41-
"optionalDependencies": {
42-
"mysql": "^2.18.1"
43-
},
4450
"devDependencies": {
4551
"@types/express": "^4.17.17",
4652
"@types/jest": "^29.5.0",
@@ -52,18 +58,13 @@
5258
"ts-jest": "^29.1.0",
5359
"typescript": "^5.0.4"
5460
},
61+
"optionalDependencies": {
62+
"mysql": "^2.18.1"
63+
},
5564
"engines": {
5665
"node": ">=14.0.0"
5766
},
58-
"repository": {
59-
"type": "git",
60-
"url": "git+https://github.com/th3hero/request-validator.git"
61-
},
62-
"bugs": {
63-
"url": "https://github.com/th3hero/request-validator/issues"
64-
},
65-
"homepage": "https://github.com/th3hero/request-validator#readme",
6667
"publishConfig": {
6768
"registry": "https://npm.pkg.github.com/"
6869
}
69-
}
70+
}

0 commit comments

Comments
 (0)