diff --git a/Makefile b/Makefile index 50071413a..b41dcaa86 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ +include ./apps/authz/Makefile include ./apps/orchestration/Makefile -include ./apps/authz-node/Makefile # For more terminal color codes, head over to https://opensource.com/article/19/9/linux-terminal-colors TERM_NO_COLOR := \033[0m @@ -14,8 +14,8 @@ install/ci: setup: make install make docker/up - make orchestration/setup make authz/setup + make orchestration/setup @echo "" @echo "${TERM_GREEN}Orchestration & AuthZ applications are ready 🐋${TERM_NO_COLOR}" @echo "${TERM_GREEN}Run 'make orchestration/start/dev' or/and 'make authz/start/dev' to get them running.${TERM_NO_COLOR}" diff --git a/apps/authz-node/.env.default b/apps/authz/.env.default similarity index 100% rename from apps/authz-node/.env.default rename to apps/authz/.env.default diff --git a/apps/authz-node/.env.test.default b/apps/authz/.env.test.default similarity index 100% rename from apps/authz-node/.env.test.default rename to apps/authz/.env.test.default diff --git a/apps/authz-node/.eslintrc.json b/apps/authz/.eslintrc.json similarity index 100% rename from apps/authz-node/.eslintrc.json rename to apps/authz/.eslintrc.json diff --git a/apps/authz-node/Makefile b/apps/authz/Makefile similarity index 86% rename from apps/authz-node/Makefile rename to apps/authz/Makefile index f36f9fe7d..a5ea5f2e3 100644 --- a/apps/authz-node/Makefile +++ b/apps/authz/Makefile @@ -1,5 +1,5 @@ -AUTHZ_PROJECT_NAME := apps/authz-node -AUTHZ_PROJECT_DIR := ./apps/authz-node +AUTHZ_PROJECT_NAME := authz +AUTHZ_PROJECT_DIR := ./apps/authz authz/setup: make authz/copy-default-env diff --git a/apps/authz-node/README.md b/apps/authz/README.md similarity index 94% rename from apps/authz-node/README.md rename to apps/authz/README.md index 9435839c2..f7cf789c6 100644 --- a/apps/authz-node/README.md +++ b/apps/authz/README.md @@ -6,7 +6,7 @@ TBD ```bash # Boot PostgreSQL and Redis -make docker/up +make docker/up make authz/copy-default-env ``` diff --git a/apps/authz-node/jest.config.ts b/apps/authz/jest.config.ts similarity index 80% rename from apps/authz-node/jest.config.ts rename to apps/authz/jest.config.ts index 14ce049ad..57698d60e 100644 --- a/apps/authz-node/jest.config.ts +++ b/apps/authz/jest.config.ts @@ -1,14 +1,14 @@ import type { Config } from 'jest' const config: Config = { - displayName: 'apps/authz-node', + displayName: 'authz', preset: '../../jest.preset.js', testEnvironment: 'node', transform: { '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }] }, moduleFileExtensions: ['ts', 'js', 'html'], - coverageDirectory: '../../coverage/apps/authz-node', + coverageDirectory: '../../coverage/apps/authz', moduleNameMapper: { '^@app/authz/(.*)$': '/src/$1' } diff --git a/apps/authz-node/jest.e2e.ts b/apps/authz/jest.e2e.ts similarity index 100% rename from apps/authz-node/jest.e2e.ts rename to apps/authz/jest.e2e.ts diff --git a/apps/authz-node/jest.integration.ts b/apps/authz/jest.integration.ts similarity index 100% rename from apps/authz-node/jest.integration.ts rename to apps/authz/jest.integration.ts diff --git a/apps/authz-node/jest.setup.ts b/apps/authz/jest.setup.ts similarity index 100% rename from apps/authz-node/jest.setup.ts rename to apps/authz/jest.setup.ts diff --git a/apps/authz-node/jest.unit.ts b/apps/authz/jest.unit.ts similarity index 100% rename from apps/authz-node/jest.unit.ts rename to apps/authz/jest.unit.ts diff --git a/apps/authz-node/project.json b/apps/authz/project.json similarity index 70% rename from apps/authz-node/project.json rename to apps/authz/project.json index eece331e5..4d3682945 100644 --- a/apps/authz-node/project.json +++ b/apps/authz/project.json @@ -1,7 +1,7 @@ { - "name": "apps/authz-node", + "name": "authz", "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "apps/authz-node/src", + "sourceRoot": "apps/authz/src", "projectType": "application", "targets": { "build": { @@ -11,11 +11,11 @@ "options": { "target": "node", "compiler": "tsc", - "outputPath": "dist/apps/authz-node", - "main": "apps/authz-node/src/main.ts", - "tsConfig": "apps/authz-node/tsconfig.app.json", + "outputPath": "dist/apps/authz", + "main": "apps/authz/src/main.ts", + "tsConfig": "apps/authz/tsconfig.app.json", "isolatedConfig": true, - "webpackConfig": "apps/authz-node/webpack.config.js" + "webpackConfig": "apps/authz/webpack.config.js" }, "configurations": { "development": {}, @@ -26,14 +26,14 @@ "executor": "@nx/js:node", "defaultConfiguration": "development", "options": { - "buildTarget": "apps/authz-node:build" + "buildTarget": "authz:build" }, "configurations": { "development": { - "buildTarget": "apps/authz-node:build:development" + "buildTarget": "authz:build:development" }, "production": { - "buildTarget": "apps/authz-node:build:production" + "buildTarget": "authz:build:production" } } }, @@ -41,10 +41,9 @@ "executor": "@nx/eslint:lint", "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": ["apps/authz-node/**/*.ts"] + "lintFilePatterns": ["apps/authz/**/*.ts"] } }, - "test:type": { "executor": "nx:run-commands", "options": { @@ -55,7 +54,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "apps/authz-node/jest.unit.ts", + "jestConfig": "apps/authz/jest.unit.ts", "verbose": true } }, @@ -63,7 +62,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "apps/authz-node/jest.integration.ts", + "jestConfig": "apps/authz/jest.integration.ts", "verbose": true, "runInBand": true } @@ -72,7 +71,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "apps/authz-node/jest.e2e.ts", + "jestConfig": "apps/authz/jest.e2e.ts", "verbose": true, "runInBand": true } diff --git a/apps/authz-node/src/app/__test__/integration/example.spec.ts b/apps/authz/src/app/__test__/integration/example.spec.ts similarity index 100% rename from apps/authz-node/src/app/__test__/integration/example.spec.ts rename to apps/authz/src/app/__test__/integration/example.spec.ts diff --git a/apps/authz-node/src/app/__test__/unit/example.spec.ts b/apps/authz/src/app/__test__/unit/example.spec.ts similarity index 100% rename from apps/authz-node/src/app/__test__/unit/example.spec.ts rename to apps/authz/src/app/__test__/unit/example.spec.ts diff --git a/apps/authz-node/src/app/app.config.ts b/apps/authz/src/app/app.config.ts similarity index 100% rename from apps/authz-node/src/app/app.config.ts rename to apps/authz/src/app/app.config.ts diff --git a/apps/authz-node/src/app/app.controller.ts b/apps/authz/src/app/app.controller.ts similarity index 100% rename from apps/authz-node/src/app/app.controller.ts rename to apps/authz/src/app/app.controller.ts diff --git a/apps/authz-node/src/app/app.module.ts b/apps/authz/src/app/app.module.ts similarity index 100% rename from apps/authz-node/src/app/app.module.ts rename to apps/authz/src/app/app.module.ts diff --git a/apps/authz-node/src/app/app.service.ts b/apps/authz/src/app/app.service.ts similarity index 100% rename from apps/authz-node/src/app/app.service.ts rename to apps/authz/src/app/app.service.ts diff --git a/apps/authz-node/src/main.ts b/apps/authz/src/main.ts similarity index 100% rename from apps/authz-node/src/main.ts rename to apps/authz/src/main.ts diff --git a/apps/authz-node/tsconfig.app.json b/apps/authz/tsconfig.app.json similarity index 100% rename from apps/authz-node/tsconfig.app.json rename to apps/authz/tsconfig.app.json diff --git a/apps/authz-node/tsconfig.json b/apps/authz/tsconfig.json similarity index 100% rename from apps/authz-node/tsconfig.json rename to apps/authz/tsconfig.json diff --git a/apps/authz-node/tsconfig.spec.json b/apps/authz/tsconfig.spec.json similarity index 58% rename from apps/authz-node/tsconfig.spec.json rename to apps/authz/tsconfig.spec.json index 9b2a121d1..f6d8ffcc9 100644 --- a/apps/authz-node/tsconfig.spec.json +++ b/apps/authz/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] + "include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"] } diff --git a/apps/authz-node/webpack.config.js b/apps/authz/webpack.config.js similarity index 69% rename from apps/authz-node/webpack.config.js rename to apps/authz/webpack.config.js index 81db92b95..bb8d268d2 100644 --- a/apps/authz-node/webpack.config.js +++ b/apps/authz/webpack.config.js @@ -1,8 +1,8 @@ -const { composePlugins, withNx } = require('@nx/webpack'); +const { composePlugins, withNx } = require('@nx/webpack') // Nx plugins for webpack. module.exports = composePlugins(withNx(), (config) => { // Update the webpack config as needed here. // e.g. `config.plugins.push(new MyPlugin())` - return config; -}); + return config +}) diff --git a/apps/orchestration/Makefile b/apps/orchestration/Makefile index 4ace449fe..ecd8afc94 100644 --- a/apps/orchestration/Makefile +++ b/apps/orchestration/Makefile @@ -1,4 +1,4 @@ -ORCHESTRATION_PROJECT_NAME := apps/orchestration +ORCHESTRATION_PROJECT_NAME := orchestration ORCHESTRATION_PROJECT_DIR := ./apps/orchestration ORCHESTRATION_DATABASE_SCHEMA := ${ORCHESTRATION_PROJECT_DIR}/src/persistence/schema/schema.prisma diff --git a/apps/orchestration/project.json b/apps/orchestration/project.json index 65904ac00..e9f0361bc 100644 --- a/apps/orchestration/project.json +++ b/apps/orchestration/project.json @@ -1,5 +1,5 @@ { - "name": "apps/orchestration", + "name": "orchestration", "$schema": "../../node_modules/nx/schemas/project-schema.json", "sourceRoot": "apps/orchestration/src", "projectType": "application", @@ -26,14 +26,14 @@ "executor": "@nx/js:node", "defaultConfiguration": "development", "options": { - "buildTarget": "apps/orchestration:build" + "buildTarget": "orchestration:build" }, "configurations": { "development": { - "buildTarget": "apps/orchestration:build:development" + "buildTarget": "orchestration:build:development" }, "production": { - "buildTarget": "apps/orchestration:build:production" + "buildTarget": "orchestration:build:production" } } },