-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: created apps and libs folder * init: new project.json file for each project * refactor: changed the lib folder to src in each package * refgactor: added new files to gitignore * fix: updated github action to support the folder rename * fix: test fix to support the new src folder * feat: NX * feat: build and only then install * test: added general jest config file * test: build test files in commons * feat: nx will build the test-commons package * test: updated jest for test-commons * added nx files to config package * added NX files to the security package * added NX files to the core package * updated the workapace files * fix: right import from db-commons * megartion to postgres package * updated some jest config files in core package * NX migration to the mysql package * updated the mysql test script * NX migration to the mssql package * NX migration to the spanner package * NX migration to the mongo package * NX migration to the firestore package * NX migration to the firestore package * NX migration to the airtable package * NX migration to the bigquery package * NX migration to the google-sheets package * fixed the jest config of the security package * NX migration to the external-db app * refactor: rearranging files in the test-commons package * feat: new tool that will publish the packages * nx files * nop * refactor: db-commons files rearrangement * nop * skip-nx-cache in tests * updated github test yml * disable google-sheets tests for now * test: fixed the test for firestore * spec files will not be compiled * refactor: new build stage in the main dockerfile * Merge branch 'master' into nx-migration * fix: added new isObject function to the item_trasformer * feat: updated the package name in the publish script
- Loading branch information
Showing
528 changed files
with
2,664 additions
and
993 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,25 @@ | ||
packages/**/node_modules | ||
# FOLDERS | ||
|
||
node_modules | ||
.vscode | ||
.github | ||
.husky | ||
scripts | ||
tmp | ||
dist | ||
tools | ||
|
||
|
||
# FILES | ||
|
||
npm-debug.log | ||
Dockerfile* | ||
docker-compose* | ||
.dockerignore | ||
.git | ||
.gitignore | ||
README.md | ||
LICENSE | ||
.eslintcache | ||
.eslintrc.json | ||
.nvmrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,27 @@ | ||
FROM node:lts-slim as full_version | ||
# Compile stage | ||
FROM node:lts-slim | ||
WORKDIR /usr/lib/app | ||
|
||
COPY package.json . | ||
# Copy the project dir | ||
COPY . . | ||
|
||
RUN npm install -g lerna | ||
# Install NX and project dependencies | ||
RUN npm install -g nx | ||
RUN npm install | ||
|
||
COPY packages ./packages/ | ||
COPY lerna.json . | ||
# Build the JS files | ||
RUN nx run-many --target=build --all | ||
|
||
RUN lerna bootstrap -- --production | ||
|
||
CMD [ "npm", "--prefix", "packages/velo-external-db", "start" ] | ||
FROM node:lts-alpine | ||
|
||
FROM node:lts-slim | ||
ARG TYPE | ||
WORKDIR /usr/lib/app | ||
|
||
COPY --from=full_version /usr/lib/app/packages/external-db-config/ ./packages/external-db-config/ | ||
COPY --from=full_version /usr/lib/app/packages/velo-external-db/ ./packages/velo-external-db/ | ||
COPY --from=full_version /usr/lib/app/packages/velo-external-db-core/ ./packages/velo-external-db-core/ | ||
COPY --from=full_version /usr/lib/app/packages/external-db-security/ ./packages/external-db-security/ | ||
COPY --from=full_version /usr/lib/app/packages/velo-external-db-commons/ ./packages/velo-external-db-commons/ | ||
# Copy the compiled JS files from the compile stage | ||
COPY --from=0 /usr/lib/app/dist/apps/velo-external-db . | ||
|
||
COPY --from=full_version /usr/lib/app/packages/external-db-${TYPE}/ ./packages/external-db-${TYPE}/ | ||
# Install dependencies | ||
RUN npm install --production | ||
|
||
ENV TYPE=${TYPE} | ||
|
||
CMD [ "npm", "--prefix", "packages/velo-external-db", "start" ] | ||
# Run the app | ||
CMD node ./main.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"extends": ["../../.eslintrc.json"], | ||
"ignorePatterns": ["!**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"rules": {} | ||
} | ||
] | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM node:lts-alpine | ||
WORKDIR /app | ||
COPY ./dist/apps/velo-external-db . | ||
# ENV PORT=8080 | ||
# EXPOSE ${PORT} | ||
RUN npm install --production | ||
# dependencies that nestjs needs | ||
# RUN npm install reflect-metadata tslib rxjs @nestjs/platform-express | ||
CMD node ./main.js |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module.exports = { | ||
displayName: 'velo-external-db', | ||
preset: '../../jest.preset.js', | ||
clearMocks: true, | ||
verbose: true, | ||
roots: ['<rootDir>/src', '<rootDir>/test'], | ||
globals: { | ||
'ts-jest': { | ||
tsconfig: '<rootDir>/tsconfig.spec.json', | ||
}, | ||
}, | ||
// testRegex: '(.*\\.spec\\.)js$', | ||
testEnvironment: 'node', | ||
transform: { | ||
'^.+\\.[tj]s$': 'ts-jest', | ||
}, | ||
globalSetup: './test/env/env.db.setup.js', | ||
globalTeardown: './test/env/env.db.teardown.js', | ||
testTimeout: 20000, | ||
moduleFileExtensions: ['ts', 'js', 'html'], | ||
setupFilesAfterEnv: ['jest-extended/all'], | ||
coverageDirectory: '../../coverage/apps/ex-db-template', | ||
maxWorkers: 1, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{ | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"sourceRoot": "apps/velo-external-db/src", | ||
"projectType": "application", | ||
"targets": { | ||
"build": { | ||
"executor": "@nrwl/node:webpack", | ||
"outputs": [ "{options.outputPath}" ], | ||
"options": { | ||
"outputPath": "dist/apps/velo-external-db", | ||
"main": "apps/velo-external-db/src/app.js", | ||
"tsConfig": "apps/velo-external-db/tsconfig.app.json", | ||
"generatePackageJson": true, | ||
"progress": true, | ||
"buildLibsFromSource": true, | ||
"assets": [ | ||
{ "glob": "**/*", "input": "libs/velo-external-db-core/src/views", "output": "./views" }, | ||
{ "glob": "**/*", "input": "libs/velo-external-db-core/src/assets", "output": "./assets" } | ||
], | ||
"fileReplacements": [ | ||
{ "replace": "apps/velo-external-db/src/environments/environment.js", "with": "apps/velo-external-db/src/environments/environment.prod.js" }, | ||
{ "replace": "libs/velo-external-db-core/src/utils/router_utils.js", "with": "libs/velo-external-db-core/src/utils/router_utils.build.js" } | ||
] | ||
}, | ||
"configurations": { | ||
"production": { | ||
"optimization": true, | ||
"inspect": false | ||
|
||
} | ||
} | ||
}, | ||
"serve": { | ||
"executor": "@nrwl/node:node", | ||
"options": { | ||
"buildTarget": "velo-external-db:build" | ||
} | ||
}, | ||
"lint": { | ||
"executor": "@nrwl/linter:eslint", | ||
"outputs": [ | ||
"{options.outputFile}" | ||
], | ||
"options": { | ||
"lintFilePatterns": [ | ||
"apps/velo-external-db/**/*.js" | ||
] | ||
} | ||
}, | ||
"test": { | ||
"executor": "@nrwl/jest:jest", | ||
"outputs": [ | ||
"coverage/apps/velo-external-db" | ||
], | ||
"options": { | ||
"jestConfig": "apps/velo-external-db/jest.config.js", | ||
"passWithNoTests": true | ||
} | ||
}, | ||
|
||
"build-image": { | ||
"builder": "@nrwl/workspace:run-commands", | ||
"options": { | ||
"commands": [ | ||
"nx run velo-external-db:build", | ||
"docker build -f ./apps/velo-external-db/Dockerfile . -t velo-external-db" | ||
], | ||
"parallel": false | ||
} | ||
} | ||
}, | ||
"tags": [] | ||
} |
File renamed without changes.
Oops, something went wrong.