Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
dario-rodriguez committed Mar 4, 2024
1 parent fdbb6b1 commit 8eec010
Show file tree
Hide file tree
Showing 143 changed files with 5,439 additions and 2,299 deletions.
5 changes: 5 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"ignorePatterns": ["**/*"],
"overrides": [
{
"files": "*.json",
"parser": "jsonc-eslint-parser",
"rules": {}
},
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
Expand Down
8 changes: 7 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
/dist
/coverage
/.nx/cache
/packages/mailer/src/test/templates
**/.handlebars
**/.template
**/*.handlebars
**/*.template
*.handlebars
*.template
/templates
pnpm-lock.yaml
36 changes: 30 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,37 @@
{
"name": "logform",
"rootPath": "packages/logform",
"jestCommandLine": "npx jest --config jest.config.ts"
"jestCommandLine": "nx run logform:test"
},
{
"name": "schematics",
"rootPath": "packages/schematics",
"jestCommandLine": "npx jest --config jest.config.ts"
"name": "nx-nest",
"rootPath": "packages/nx-nest",
"jestCommandLine": "nx run nx-nest:test"
},
{ "name": "mailer", "rootPath": "packages/mailer", "jestCommandLine": "npx jest --config jest.config.ts" }
]
{
"name": "mailer",
"rootPath": "packages/mailer",
"jestCommandLine": "nx run mailer:test"
}
],
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#2f7c47",
"activityBar.background": "#2f7c47",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#422c74",
"activityBarBadge.foreground": "#e7e7e7",
"commandCenter.border": "#e7e7e799",
"sash.hoverBorder": "#2f7c47",
"statusBar.background": "#215732",
"statusBar.foreground": "#e7e7e7",
"statusBarItem.hoverBackground": "#2f7c47",
"statusBarItem.remoteBackground": "#215732",
"statusBarItem.remoteForeground": "#e7e7e7",
"titleBar.activeBackground": "#215732",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveBackground": "#21573299",
"titleBar.inactiveForeground": "#e7e7e799"
},
"peacock.remoteColor": "#215732"
}
49 changes: 27 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,48 +28,53 @@
"@nestjs/core": "^10.3.3",
"fs-extra": "^11.2.0",
"handlebars": "^4.7.8",
"nodemailer": "^6.9.9",
"nodemailer": "^6.9.11",
"reflect-metadata": "^0.2.1",
"rxjs": "^7.8.1",
"tslib": "^2.3.0"
"tslib": "^2.6.2"
},
"devDependencies": {
"@commitlint/cli": "^18.6.1",
"@commitlint/config-conventional": "^18.6.2",
"@nestjs/testing": "^10.3.3",
"@nx/devkit": "^18.0.4",
"@nx/eslint": "18.0.4",
"@nx/eslint-plugin": "18.0.4",
"@nx/jest": "18.0.4",
"@nx/js": "18.0.4",
"@nx/webpack": "^18.0.4",
"@nx/workspace": "18.0.4",
"@nx/devkit": "18.0.6",
"@nx/eslint": "18.0.6",
"@nx/eslint-plugin": "18.0.6",
"@nx/jest": "18.0.6",
"@nx/js": "18.0.6",
"@nx/plugin": "18.0.6",
"@nx/webpack": "18.0.6",
"@nx/workspace": "18.0.6",
"@swc-node/register": "~1.8.0",
"@swc/cli": "~0.1.62",
"@swc/core": "~1.3.85",
"@swc/helpers": "~0.5.2",
"@swc/cli": "~0.1.65",
"@swc/core": "~1.3.107",
"@swc/helpers": "~0.5.6",
"@swc/jest": "0.2.20",
"@types/fs-extra": "^11.0.4",
"@types/jest": "^29.4.0",
"@types/jest": "^29.5.12",
"@types/node": "18.16.9",
"@types/nodemailer": "^6.4.14",
"@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.13.2",
"@types/pluralize": "^0.0.33",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"enhanced-resolve": "^5.15.1",
"eslint": "~8.48.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^9.0.11",
"jest": "^29.4.1",
"jest-environment-node": "^29.4.1",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-environment-node": "^29.7.0",
"lint-staged": "^15.2.2",
"nx": "18.0.4",
"nx": "18.0.6",
"prettier": "^2.8.8",
"ts-jest": "^29.1.0",
"ts-jest": "^29.1.2",
"ts-node": "10.9.1",
"typescript": "~5.3.2",
"typescript": "~5.3.3",
"zx": "^7.2.3"
},
"nx": {
"includedScripts": []
}
}

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
src/lib/**/files/**/*
**/src/lib/**/files/**/*
src/generators/**/files/**/*
**/src/generators/**/files/**/*
*.d.ts
**/*.d.ts
node_modules
src/lib/**/files/**/*
**/src/lib/**/files/**/*
src/generators/**/files/**/*
**/src/generators/**/files/**/*
*.d.ts
**/*.d.ts
node_modules
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/schematics/.swcrc → packages/nx-nest/.swcrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"module": {
"type": "commonjs"
},
"sourceMaps": false,
"sourceMaps": true,
"exclude": [
"jest.config.ts",
".*\\.spec.tsx?$",
Expand Down
12 changes: 6 additions & 6 deletions packages/schematics/README.md → packages/nx-nest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

devon4ts is the NodeJS stack of devonfw. It allows you to build business applications (backends) using NodeJS technology in standardized way based on established best-practices.

![License](https://img.shields.io/npm/l/@devon4ts/schematics)
![License](https://img.shields.io/npm/v/@devon4ts/schematics)
![License](https://img.shields.io/librariesio/release/npm/@devon4ts/schematics)
![License](https://img.shields.io/npm/dt/@devon4ts/schematics)
![License](https://img.shields.io/npm/l/@devon4ts/nx-nest)
![License](https://img.shields.io/npm/v/@devon4ts/nx-nest)
![License](https://img.shields.io/librariesio/release/npm/@devon4ts/nx-nest)
![License](https://img.shields.io/npm/dt/@devon4ts/nx-nest)

## devon4ts Schematics
## devon4ts nx-nest

This package contains the devon4ts schematics. Those schematics are responsible for generating code for devon4ts.
This package contains the devon4ts nx plugin for NestJS. Those plugin contains the generators, executors and tools to work with devon4ts in nx.

## Documentation

Expand Down
Original file line number Diff line number Diff line change
@@ -1,47 +1,54 @@
{
"$schema": "http://json-schema.org/schema",
"name": "@devon4ts/schematics",
"name": "@devon4ts/nx-nest",
"version": "6.0.0",
"generators": {
"typeorm": {
"description": "Initialice typeorm into your current project in a correct way.",
"factory": "./src/generators/init-typeorm/generator",
"schema": "./src/generators/init-typeorm/schema.json"
"application": {
"description": "Generates a basic NestJS application using Devonfw Architecture",
"factory": "./src/generators/application/application",
"schema": "./src/generators/application/schema.json"
},
"entity": {
"description": "Add a TypeOrm entity to your project",
"factory": "./src/generators/entity/generator",
"factory": "./src/generators/entity/entity",
"schema": "./src/generators/entity/schema.json"
},
"orm": {
"description": "Initialice typeorm into your current project in a correct way.",
"factory": "./src/generators/orm/orm",
"schema": "./src/generators/orm/schema.json"
},
"convict": {
"description": "Initialize convict to manage the configuration into the project.",
"factory": "./src/generators/convict/generator",
"factory": "./src/generators/convict/convict",
"schema": "./src/generators/convict/schema.json"
},
"mailer": {
"description": "Add mailer module to project.",
"factory": "./src/generators/mailer/generator",
"factory": "./src/generators/mailer/mailer",
"schema": "./src/generators/mailer/schema.json"
},
"security": {
"description": "Add cors and helmet to your project.",
"factory": "./src/generators/security/security",
"schema": "./src/generators/security/schema.json"
},
"swagger": {
"description": "Add swagger module to project.",
"factory": "./src/generators/swagger/generator",
"factory": "./src/generators/swagger/swagger",
"schema": "./src/generators/swagger/schema.json"
},
"auth-jwt": {
"description": "Add the auth JWT module to the project.",
"factory": "./src/generators/auth-jwt/generator",
"factory": "./src/generators/auth-jwt/auth",
"schema": "./src/generators/auth-jwt/schema.json"
},
"security": {
"description": "Add cors and helmet to your project.",
"factory": "./src/generators/security/generator",
"schema": "./src/generators/security/schema.json"
},
"application": {
"description": "Generates a basic NestJS application using Devonfw Architecture",
"factory": "./src/generators/application/generator",
"schema": "./src/generators/application/schema.json"
"preset": {
"factory": "./src/generators/preset/preset",
"schema": "./src/generators/preset/schema.json",
"description": "devon4ts nestjs workspace preset",
"x-use-standalone-layout": true,
"hidden": true
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ if (swcJestConfig.swcrc === undefined) {
// swcJestConfig.module.noInterop = false;

export default {
displayName: 'schematics',
displayName: 'nx-nest',
preset: '../../jest.preset.js',
transform: {
'^.+\\.[tj]s$': ['@swc/jest', swcJestConfig],
},
moduleFileExtensions: ['ts', 'js', 'html'],
testEnvironment: 'node',
coverageDirectory: '../../coverage/packages/schematics',
coverageDirectory: '../../coverage/packages/nx-nest',
};
51 changes: 51 additions & 0 deletions packages/nx-nest/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"name": "@devon4ts/nx-nest",
"version": "5.0.5",
"description": "NX plugin for NestJS using devon4ts",
"scripts": {
"build": "nx build",
"format": "nx format:write",
"lint": "nx lint",
"test": "nx test"
},
"keywords": [
"nx plugin",
"nestjs",
"devon4ts"
],
"author": {
"name": "Capgemini",
"url": "https://www.capgemini.com/"
},
"contributors": [
{
"name": "Dario Rodriguez Gonzalez",
"url": "https://github.com/dario-rodriguez"
}
],
"repository": {
"type": "git",
"url": "git+https://github.com/devonfw/devon4ts.git"
},
"bugs": {
"url": "https://github.com/devonfw/devon4ts/issues"
},
"homepage": "https://devonfw.com/docs/typescript/current/",
"license": "Apache-2.0",
"generators": "./generators.json",
"dependencies": {
"@nx/devkit": "18.0.5",
"@nx/eslint": "18.0.5",
"@nx/nest": "18.0.5",
"@swc/helpers": "~0.5.2",
"js-yaml": "^4.1.0",
"lodash": "^4.17.21",
"pluralize": "^8.0.0",
"ts-morph": "^21.0.1"
},
"gitHead": "1f351bcc0fbad70f9c25fa73a398a538ca0c8e55",
"devDependencies": {
"@types/js-yaml": "^4.0.9",
"@types/lodash": "^4.14.202"
}
}
26 changes: 13 additions & 13 deletions packages/schematics/project.json → packages/nx-nest/project.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
{
"name": "schematics",
"name": "nx-nest",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/schematics/src",
"sourceRoot": "packages/nx-nest/src",
"projectType": "library",
"targets": {
"build": {
"executor": "@nx/js:swc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/schematics",
"main": "packages/schematics/src/index.ts",
"tsConfig": "packages/schematics/tsconfig.lib.json",
"outputPath": "dist/packages/nx-nest",
"main": "packages/nx-nest/src/index.ts",
"tsConfig": "packages/nx-nest/tsconfig.lib.json",
"assets": [
"packages/schematics/*.md",
"packages/nx-nest/*.md",
{
"input": "./packages/schematics/src",
"glob": "**/!(*.ts)",
"input": "./packages/nx-nest/src",
"glob": "**/*.json",
"output": "./src"
},
{
"input": "./packages/schematics/src",
"glob": "**/files/**",
"input": "./packages/nx-nest/src",
"glob": "**/files*/**",
"output": "./src"
},
{
"input": "./packages/schematics/src",
"input": "./packages/nx-nest/src",
"glob": "**/*.d.ts",
"output": "./src"
},
{
"input": "./packages/schematics",
"input": "./packages/nx-nest",
"glob": "generators.json",
"output": "."
},
{
"input": "./packages/schematics",
"input": "./packages/nx-nest",
"glob": "executors.json",
"output": "."
}
Expand Down
Loading

0 comments on commit 8eec010

Please sign in to comment.