Skip to content

Commit

Permalink
Merge branch 'main' into feature/user-password-history
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMaz committed Jul 3, 2024
2 parents 5680b32 + ebe52aa commit 84e9824
Show file tree
Hide file tree
Showing 186 changed files with 1,076 additions and 3,650 deletions.
22 changes: 3 additions & 19 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ module.exports = {
},
plugins: [
'import',
// 'jsdoc',
'tsdoc',
],
extends: [
'@concepta/eslint-config/nest',
// 'plugin:jsdoc/recommended',
],
ignorePatterns: [
'packages/*/dist/**',
Expand All @@ -31,23 +30,7 @@ module.exports = {
rules: {
'import/no-extraneous-dependencies': 'error',
'@darraghor/nestjs-typed/param-decorator-name-matches-route-param': 'off',
// 'jsdoc/require-jsdoc': [
// 'warn',
// {
// contexts: ['any', 'PropertyDefinition'],
// require: {
// ClassDeclaration: true,
// ClassExpression: true,
// MethodDefinition: true,
// FunctionDeclaration: true,
// FunctionExpression: true,
// },
// },
// ],
// 'jsdoc/require-description': ['warn', { contexts: ['any'] }],
// 'jsdoc/require-property-description': ['warn', { contexts: ['any'] }],
// 'jsdoc/require-param-type': 'off',
// 'jsdoc/require-returns': 'off',
'tsdoc/syntax': 'warn',
},
overrides: [
{
Expand All @@ -62,6 +45,7 @@ module.exports = {
rules: {
'@darraghor/nestjs-typed/controllers-should-supply-api-tags': 'off',
'@darraghor/nestjs-typed/api-method-should-specify-api-response': 'off',
'tsdoc/syntax': 'off',
},
},
],
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,6 @@ dist
.idea
.DS_Store
website/.yarn

# generated docs
/docs
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<p align="center">
<img width="150" src="https://raw.githubusercontent.com/conceptadev/rockets/main/assets/rockets-icon.svg">
</p>
![Rockets Logo](https://raw.githubusercontent.com/conceptadev/rockets/main/assets/rockets-icon.svg)

# Rockets

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
],
"useWorkspaces": true,
"npmClient": "yarn",
"version": "4.0.0-alpha.47"
"version": "4.0.0-alpha.48"
}
17 changes: 7 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"devDependencies": {
"@commitlint/cli": "^16.1.0",
"@commitlint/config-conventional": "^16.0.0",
"@compodoc/compodoc": "^1.1.25",
"@concepta/eslint-config": "^1.1.4",
"@concepta/prettier-config": "^1.1.4",
"@darraghor/eslint-plugin-nestjs-typed": "^3.20.5",
Expand All @@ -30,9 +29,9 @@
"eslint": "^8.6.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jsdoc": "^48.2.7",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-tsdoc": "^0.3.0",
"husky": "^7.0.4",
"jest": "27.4.7",
"jest-junit": "^13.0.0",
Expand All @@ -49,11 +48,13 @@
"ts-loader": "^9.2.3",
"ts-node": "^10.0.0",
"tsconfig-paths": "^3.10.1",
"typedoc": "^0.25.0",
"typedoc-plugin-coverage": "^3.2.0",
"typeorm": "^0.3.0",
"typescript": "^4.3.5"
},
"scripts": {
"clean": "./node_modules/.bin/rimraf packages/*/dist packages/*/tsconfig.tsbuildinfo",
"clean": "./node_modules/.bin/rimraf packages/*/dist packages/*/tsconfig.tsbuildinfo docs",
"build": "./node_modules/.bin/tsc --build",
"watch": "yarn build && ./node_modules/.bin/tsc --build --watch",
"lint": "eslint \"packages/*/src/**/*.{ts,js,json}\"",
Expand All @@ -66,15 +67,11 @@
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./jest.config-e2e.json --testTimeout 30000",
"test:all": "yarn test && yarn test:e2e",
"doc": "rimraf ./documentation && compodoc -p ./tsconfig.doc.json --disablePrivate --disableProtected",
"doc:serve": "yarn doc -s",
"doc:watch": "yarn doc:serve -w",
"doc:cov": "yarn doc --coverageMinimumPerFile 90 --coverageTestThresholdFail false",
"doc:cov:ut": "yarn doc:cov --unitTestCoverage ./coverage/coverage-summary.json",
"doc:ci": "yarn doc:cov:ut --coverageTestThresholdFail true",
"doc": "rimraf ./docs && typedoc",
"doc:cov": "yarn doc --coverageOutputType all",
"changelog": "standard-version",
"changelog:minor": "standard-version --release-as minor",
"changelog:patch": "standard-version --release-as patch",
"changelog:major": "standard-version --release-as major"
}
}
}
4 changes: 2 additions & 2 deletions packages/nestjs-access-control/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@concepta/nestjs-access-control",
"version": "4.0.0-alpha.47",
"version": "4.0.0-alpha.48",
"description": "Rockets NestJS Access Control",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -12,7 +12,7 @@
"dist/**/!(*.spec|*.e2e-spec|*.fixture).{js,d.ts}"
],
"dependencies": {
"@concepta/nestjs-common": "^4.0.0-alpha.47",
"@concepta/nestjs-common": "^4.0.0-alpha.48",
"@nestjs/common": "^9.0.0",
"@nestjs/config": "^2.2.0",
"@nestjs/core": "^9.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AccessControlCreateOne } from './access-control-create-one.decorator';
/**
* Create many resource grant shortcut.
*
* @param string resource The grant resource.
* @param string - resource The grant resource.
*/
export const AccessControlCreateMany = (resource: string) =>
AccessControlCreateOne(resource);
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { applyDecorators } from '@nestjs/common';
/**
* Create one resource grant shortcut.
*
* @param string resource The grant resource.
* @returns {ReturnType<typeof applyDecorators>} Decorator function
* @param string - resource The grant resource.
* @returns Decorator function
*/
export const AccessControlCreateOne = (
resource: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { ActionEnum } from '../enums/action.enum';
/**
* Delete one resource grant shortcut
*
* @param string resource The grant resource.
* @returns {ReturnType<typeof applyDecorators>} Decorator function
* @param string - resource The grant resource.
* @returns Decorator function
*/
export const AccessControlDeleteOne = (
resource: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { ACCESS_CONTROL_MODULE_GRANT_METADATA } from '../constants';
/**
* Define access control grants required for this route.
*
* @param {AccessControlGrantOptionInterface[]} acGrants Array of access control grants.
* @returns {ReturnType<typeof SetMetadata>} Decorator function.
* @param acGrants - Array of access control grants.
* @returns Decorator function.
*/
export const AccessControlGrant = (
...acGrants: AccessControlGrantOptionInterface[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { ACCESS_CONTROL_MODULE_QUERY_METADATA } from '../constants';
/**
* Define access query options for this route.
*
* @param {AccessControlQueryOptionInterface[]} queryOptions Array of access control query options.
* @returns {ReturnType<typeof SetMetadata>} Decorator function.
* @param queryOptions - Array of access control query options.
* @returns Decorator function.
*/
export const AccessControlQuery = (
...queryOptions: AccessControlQueryOptionInterface[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { AccessControlGrant } from './access-control-grant.decorator';
/**
* Read many resource grant shortcut.
*
* @param string resource The grant resource.
* @returns {ReturnType<typeof applyDecorators>} Decorator function
* @param string - resource The grant resource.
* @returns Decorator function
*/
export const AccessControlReadMany = (
resource: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { AccessControlGrant } from './access-control-grant.decorator';
/**
* Read one resource grant shortcut
*
* @param string resource The grant resource.
* @returns {ReturnType<typeof applyDecorators>} Decorator function
* @param string - resource The grant resource.
* @returns Decorator function
*/
export const AccessControlReadOne = (
resource: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AccessControlCreateOne } from './access-control-create-one.decorator';
/**
* Recover one resource grant shortcut.
*
* @param string resource The grant resource.
* @param string - resource The grant resource.
*/
export const AccessControlRecoverOne = (resource: string) =>
AccessControlCreateOne(resource);
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AccessControlUpdateOne } from './access-control-update-one.decorator';
/**
* Update one resource grant shortcut
*
* @param string resource The grant resource.
* @param string - resource The grant resource.
*/
export const AccessControlReplaceOne = (resource: string) =>
AccessControlUpdateOne(resource);
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { AccessControlGrant } from './access-control-grant.decorator';
/**
* Update one resource grant shortcut
*
* @param string resource The grant resource.
* @returns {ReturnType<typeof applyDecorators>} Decorator function
* @param string - resource The grant resource.
* @returns Decorator function
*/
export const AccessControlUpdateOne = (
resource: string,
Expand Down
3 changes: 3 additions & 0 deletions packages/nestjs-access-control/typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"entryPoints": ["src/index.ts"]
}
26 changes: 13 additions & 13 deletions packages/nestjs-auth-github/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@concepta/nestjs-auth-github",
"version": "4.0.0-alpha.47",
"version": "4.0.0-alpha.48",
"description": "Rockets NestJS GitHub Authentication",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -12,12 +12,12 @@
"dist/**/!(*.spec|*.e2e-spec|*.fixture).{js,d.ts}"
],
"dependencies": {
"@concepta/nestjs-authentication": "^4.0.0-alpha.47",
"@concepta/nestjs-common": "^4.0.0-alpha.47",
"@concepta/nestjs-core": "^4.0.0-alpha.47",
"@concepta/nestjs-federated": "^4.0.0-alpha.47",
"@concepta/ts-common": "^4.0.0-alpha.47",
"@concepta/ts-core": "^4.0.0-alpha.47",
"@concepta/nestjs-authentication": "^4.0.0-alpha.48",
"@concepta/nestjs-common": "^4.0.0-alpha.48",
"@concepta/nestjs-core": "^4.0.0-alpha.48",
"@concepta/nestjs-federated": "^4.0.0-alpha.48",
"@concepta/ts-common": "^4.0.0-alpha.48",
"@concepta/ts-core": "^4.0.0-alpha.48",
"@nestjs/common": "^9.0.0",
"@nestjs/config": "^2.2.0",
"@nestjs/core": "^9.0.0",
Expand All @@ -26,12 +26,12 @@
"passport-github": "^1.1.0"
},
"devDependencies": {
"@concepta/nestjs-auth-jwt": "^4.0.0-alpha.47",
"@concepta/nestjs-crud": "^4.0.0-alpha.47",
"@concepta/nestjs-jwt": "^4.0.0-alpha.47",
"@concepta/nestjs-password": "^4.0.0-alpha.47",
"@concepta/nestjs-typeorm-ext": "^4.0.0-alpha.47",
"@concepta/nestjs-user": "^4.0.0-alpha.47",
"@concepta/nestjs-auth-jwt": "^4.0.0-alpha.48",
"@concepta/nestjs-crud": "^4.0.0-alpha.48",
"@concepta/nestjs-jwt": "^4.0.0-alpha.48",
"@concepta/nestjs-password": "^4.0.0-alpha.48",
"@concepta/nestjs-typeorm-ext": "^4.0.0-alpha.48",
"@concepta/nestjs-user": "^4.0.0-alpha.48",
"@nestjs/testing": "^9.0.0",
"@types/passport-github": "^1.1.7",
"jest-mock-extended": "^2.0.4"
Expand Down
3 changes: 3 additions & 0 deletions packages/nestjs-auth-github/typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"entryPoints": ["src/index.ts"]
}
14 changes: 7 additions & 7 deletions packages/nestjs-auth-jwt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@concepta/nestjs-auth-jwt",
"version": "4.0.0-alpha.47",
"version": "4.0.0-alpha.48",
"description": "Rockets NestJS JWT Authorization",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -12,12 +12,12 @@
"dist/**/!(*.spec|*.e2e-spec|*.fixture).{js,d.ts}"
],
"dependencies": {
"@concepta/nestjs-authentication": "^4.0.0-alpha.47",
"@concepta/nestjs-common": "^4.0.0-alpha.47",
"@concepta/nestjs-jwt": "^4.0.0-alpha.47",
"@concepta/ts-common": "^4.0.0-alpha.47",
"@concepta/ts-core": "^4.0.0-alpha.47",
"@concepta/typeorm-common": "^4.0.0-alpha.47",
"@concepta/nestjs-authentication": "^4.0.0-alpha.48",
"@concepta/nestjs-common": "^4.0.0-alpha.48",
"@concepta/nestjs-jwt": "^4.0.0-alpha.48",
"@concepta/ts-common": "^4.0.0-alpha.48",
"@concepta/ts-core": "^4.0.0-alpha.48",
"@concepta/typeorm-common": "^4.0.0-alpha.48",
"@nestjs/common": "^9.0.0",
"@nestjs/config": "^2.2.0",
"@nestjs/core": "^9.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/nestjs-auth-jwt/src/auth-jwt.strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class AuthJwtStrategy extends PassportStrategyFactory<JwtStrategy>(
/**
* Validate the user based on payload sub
*
* @param payload The payload to validate
* @param payload - The payload to validate
*/
async validate(
payload: AuthorizationPayloadInterface,
Expand Down
3 changes: 3 additions & 0 deletions packages/nestjs-auth-jwt/typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"entryPoints": ["src/index.ts"]
}
18 changes: 9 additions & 9 deletions packages/nestjs-auth-local/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@concepta/nestjs-auth-local",
"version": "4.0.0-alpha.47",
"version": "4.0.0-alpha.48",
"description": "Rockets NestJS Local Authentication",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -12,21 +12,21 @@
"dist/**/!(*.spec|*.e2e-spec|*.fixture).{js,d.ts}"
],
"dependencies": {
"@concepta/nestjs-authentication": "^4.0.0-alpha.47",
"@concepta/nestjs-common": "^4.0.0-alpha.47",
"@concepta/nestjs-password": "^4.0.0-alpha.47",
"@concepta/ts-common": "^4.0.0-alpha.47",
"@concepta/ts-core": "^4.0.0-alpha.47",
"@concepta/typeorm-common": "^4.0.0-alpha.47",
"@concepta/nestjs-authentication": "^4.0.0-alpha.48",
"@concepta/nestjs-common": "^4.0.0-alpha.48",
"@concepta/nestjs-password": "^4.0.0-alpha.48",
"@concepta/ts-common": "^4.0.0-alpha.48",
"@concepta/ts-core": "^4.0.0-alpha.48",
"@concepta/typeorm-common": "^4.0.0-alpha.48",
"@nestjs/common": "^9.0.0",
"@nestjs/config": "^2.2.0",
"@nestjs/core": "^9.0.0",
"@nestjs/swagger": "^6.0.0",
"passport-local": "^1.0.0"
},
"devDependencies": {
"@concepta/nestjs-auth-jwt": "^4.0.0-alpha.47",
"@concepta/nestjs-jwt": "^4.0.0-alpha.47",
"@concepta/nestjs-auth-jwt": "^4.0.0-alpha.48",
"@concepta/nestjs-jwt": "^4.0.0-alpha.48",
"@nestjs/jwt": "^9.0.0",
"@nestjs/testing": "^9.0.0",
"@types/passport-local": "^1.0.34",
Expand Down
Loading

0 comments on commit 84e9824

Please sign in to comment.