From da23b80647ee2dae83ad2e8e9d32a035bfbab081 Mon Sep 17 00:00:00 2001 From: romanjaros Date: Tue, 24 Oct 2023 20:43:21 +0200 Subject: [PATCH] Rename source folders --- create.js | 6 +++--- source/{__ => common}/.editorconfig | 0 source/{__ => common}/.tsconfig.json | 0 source/{__ => common}/Jenkinsfile | 0 source/{__ => common}/gitignore | 0 source/{__ => common}/npmrc | 0 source/{__ => common}/package.json | 0 source/{__ => common}/pnpm-workspace.yaml | 0 source/{__ => common}/prettierrc | 0 source/{__ => common}/sonar-project.properties | 0 source/{api => rest}/.tsconfig.json | 0 source/{api => rest}/jest.config.js | 0 source/{api => rest}/nest-cli.json | 0 source/{api => rest}/package.json | 2 +- source/{api => rest}/src/app.module.ts | 0 .../src/common/health/health.controller.spec.ts | 0 source/{api => rest}/src/common/health/health.controller.ts | 0 source/{api => rest}/src/common/health/health.module.ts | 0 source/{api => rest}/src/config.ts | 0 source/{api => rest}/src/main.ts | 0 source/{api => rest}/test/app.e2e-spec.ts | 0 source/{api => rest}/test/jest.config-e2e.js | 0 source/{api => rest}/tsconfig.build.json | 0 23 files changed, 4 insertions(+), 4 deletions(-) rename source/{__ => common}/.editorconfig (100%) rename source/{__ => common}/.tsconfig.json (100%) rename source/{__ => common}/Jenkinsfile (100%) rename source/{__ => common}/gitignore (100%) rename source/{__ => common}/npmrc (100%) rename source/{__ => common}/package.json (100%) rename source/{__ => common}/pnpm-workspace.yaml (100%) rename source/{__ => common}/prettierrc (100%) rename source/{__ => common}/sonar-project.properties (100%) rename source/{api => rest}/.tsconfig.json (100%) rename source/{api => rest}/jest.config.js (100%) rename source/{api => rest}/nest-cli.json (100%) rename source/{api => rest}/package.json (98%) rename source/{api => rest}/src/app.module.ts (100%) rename source/{api => rest}/src/common/health/health.controller.spec.ts (100%) rename source/{api => rest}/src/common/health/health.controller.ts (100%) rename source/{api => rest}/src/common/health/health.module.ts (100%) rename source/{api => rest}/src/config.ts (100%) rename source/{api => rest}/src/main.ts (100%) rename source/{api => rest}/test/app.e2e-spec.ts (100%) rename source/{api => rest}/test/jest.config-e2e.js (100%) rename source/{api => rest}/tsconfig.build.json (100%) diff --git a/create.js b/create.js index 3f2615c..5c0e8ef 100644 --- a/create.js +++ b/create.js @@ -14,7 +14,7 @@ const contextDir = `${argv._[0]}/` ?? defaultContextDir; // create app folder const appsDir = `${contextDir}/apps`; const uiDir = `${contextDir}/apps/${appName}-ui`; -const apiDir = `${contextDir}/apps/${appName}-api`; +const apiDir = `${contextDir}/apps/${appName}-rest`; // prepare structure folders if (!fs.existsSync(uiDir)) { @@ -30,7 +30,7 @@ if (!fs.existsSync(uiDir)) { // copy folder content try { - fs.cpSync(`${rootDir}/source/__/`, contextDir, { + fs.cpSync(`${rootDir}/source/common/`, contextDir, { force: true, recursive: true, }); @@ -38,7 +38,7 @@ try { force: true, recursive: true, }); - fs.cpSync(`${rootDir}/source/api/`, apiDir, { + fs.cpSync(`${rootDir}/source/rest/`, apiDir, { force: true, recursive: true, }); diff --git a/source/__/.editorconfig b/source/common/.editorconfig similarity index 100% rename from source/__/.editorconfig rename to source/common/.editorconfig diff --git a/source/__/.tsconfig.json b/source/common/.tsconfig.json similarity index 100% rename from source/__/.tsconfig.json rename to source/common/.tsconfig.json diff --git a/source/__/Jenkinsfile b/source/common/Jenkinsfile similarity index 100% rename from source/__/Jenkinsfile rename to source/common/Jenkinsfile diff --git a/source/__/gitignore b/source/common/gitignore similarity index 100% rename from source/__/gitignore rename to source/common/gitignore diff --git a/source/__/npmrc b/source/common/npmrc similarity index 100% rename from source/__/npmrc rename to source/common/npmrc diff --git a/source/__/package.json b/source/common/package.json similarity index 100% rename from source/__/package.json rename to source/common/package.json diff --git a/source/__/pnpm-workspace.yaml b/source/common/pnpm-workspace.yaml similarity index 100% rename from source/__/pnpm-workspace.yaml rename to source/common/pnpm-workspace.yaml diff --git a/source/__/prettierrc b/source/common/prettierrc similarity index 100% rename from source/__/prettierrc rename to source/common/prettierrc diff --git a/source/__/sonar-project.properties b/source/common/sonar-project.properties similarity index 100% rename from source/__/sonar-project.properties rename to source/common/sonar-project.properties diff --git a/source/api/.tsconfig.json b/source/rest/.tsconfig.json similarity index 100% rename from source/api/.tsconfig.json rename to source/rest/.tsconfig.json diff --git a/source/api/jest.config.js b/source/rest/jest.config.js similarity index 100% rename from source/api/jest.config.js rename to source/rest/jest.config.js diff --git a/source/api/nest-cli.json b/source/rest/nest-cli.json similarity index 100% rename from source/api/nest-cli.json rename to source/rest/nest-cli.json diff --git a/source/api/package.json b/source/rest/package.json similarity index 98% rename from source/api/package.json rename to source/rest/package.json index b0e6f9b..6f1d663 100644 --- a/source/api/package.json +++ b/source/rest/package.json @@ -1,5 +1,5 @@ { - "name": "$(appName)-api", + "name": "$(appName)-rest", "version": "0.1.0", "description": "", "author": "Roman Jaroš ", diff --git a/source/api/src/app.module.ts b/source/rest/src/app.module.ts similarity index 100% rename from source/api/src/app.module.ts rename to source/rest/src/app.module.ts diff --git a/source/api/src/common/health/health.controller.spec.ts b/source/rest/src/common/health/health.controller.spec.ts similarity index 100% rename from source/api/src/common/health/health.controller.spec.ts rename to source/rest/src/common/health/health.controller.spec.ts diff --git a/source/api/src/common/health/health.controller.ts b/source/rest/src/common/health/health.controller.ts similarity index 100% rename from source/api/src/common/health/health.controller.ts rename to source/rest/src/common/health/health.controller.ts diff --git a/source/api/src/common/health/health.module.ts b/source/rest/src/common/health/health.module.ts similarity index 100% rename from source/api/src/common/health/health.module.ts rename to source/rest/src/common/health/health.module.ts diff --git a/source/api/src/config.ts b/source/rest/src/config.ts similarity index 100% rename from source/api/src/config.ts rename to source/rest/src/config.ts diff --git a/source/api/src/main.ts b/source/rest/src/main.ts similarity index 100% rename from source/api/src/main.ts rename to source/rest/src/main.ts diff --git a/source/api/test/app.e2e-spec.ts b/source/rest/test/app.e2e-spec.ts similarity index 100% rename from source/api/test/app.e2e-spec.ts rename to source/rest/test/app.e2e-spec.ts diff --git a/source/api/test/jest.config-e2e.js b/source/rest/test/jest.config-e2e.js similarity index 100% rename from source/api/test/jest.config-e2e.js rename to source/rest/test/jest.config-e2e.js diff --git a/source/api/tsconfig.build.json b/source/rest/tsconfig.build.json similarity index 100% rename from source/api/tsconfig.build.json rename to source/rest/tsconfig.build.json