Skip to content

Commit

Permalink
Merge branch 'develop' into fix/jest-e2e-test
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul-rocket committed Oct 18, 2024
2 parents 3ae84c0 + 22a2254 commit 320fb89
Show file tree
Hide file tree
Showing 13 changed files with 1,532 additions and 917 deletions.
31 changes: 19 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
version: 2.1

orbs:
node: circleci/node@5.0.0
node: circleci/node@5.2.0

defaults: &defaults
# put here anything which is common between all jobs
# we define default work dir, however almost every job redefine it
working_directory: ~/workspace

jobs:
check_lint:
working_directory: ~/workspace
check_lint:
<<: *defaults
docker:
- image: 'cimg/base:stable'
steps:
- checkout
- node/install:
install-yarn: true
node-version: '16.20.2'
node-version: '20.11.1'
- run: node --version
- restore_cache:
keys:
Expand All @@ -33,8 +38,8 @@ jobs:
name: Run Lint checks
command: bin/check_lint.sh

test_unit:
working_directory: ~/workspace
test_unit:
<<: *defaults
docker:
- image: 'cimg/base:stable'
- image: mysql:5.7
Expand All @@ -45,7 +50,7 @@ jobs:
- checkout
- node/install:
install-yarn: true
node-version: '16.20.2'
node-version: '20.11.1'
- run: node --version
- restore_cache:
keys:
Expand All @@ -69,8 +74,8 @@ jobs:
name: Run tests and checks
command: bin/test_unit.sh

test_e2e:
working_directory: ~/workspace
test_e2e:
<<: *defaults
docker:
- image: 'cimg/base:stable'
- image: mysql:5.7
Expand All @@ -81,7 +86,7 @@ jobs:
- checkout
- node/install:
install-yarn: true
node-version: '16.20.2'
node-version: '20.11.1'
- run: node --version
- restore_cache:
keys:
Expand All @@ -106,27 +111,29 @@ jobs:
command: bin/test_e2e.sh

build:
<<: *defaults
docker:
- image: 'cimg/base:stable'
steps:
- checkout
- node/install:
install-yarn: true
node-version: '16.20.2'
node-version: '20.11.1'
- run: node --version
- setup_remote_docker
- run:
name: Build
command: RELEASE=$CIRCLE_TAG bin/build-docker.sh

build_old:
<<: *defaults
docker:
- image: 'cimg/base:stable'
steps:
- checkout
- node/install:
install-yarn: true
node-version: '16.20.2'
node-version: '20.11.1'
- run: node --version
- setup_remote_docker
- run:
Expand Down
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
dist
.git
.circleci
Dockerfile
Dockerfile
.cache
29 changes: 24 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,35 @@
dist/
node_modules
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc

# dependencies
node_modules/

lib/core/metadata.js
lib/core/MetadataBlog.js

#
translated_docs
build/
i18n/*

.DS_STORE
# System Files
.DS_Store
Thumbs.db

# IDE - VSCode
.vscode/

# Cache File
/.cache
# misc
/**/.angular/cache
npm-debug.log
yarn-error.log

# Cache Files
.cache/
/**/.cache

.vscode/
36 changes: 31 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
# Ever Traduora Platform

ARG NODE_OPTIONS
ARG NODE_ENV

# Build stage
FROM node:16-alpine3.11 as builder
FROM node:20.11.1-alpine3.19 as builder

LABEL maintainer="ever@ever.co"
LABEL org.opencontainers.image.source https://github.com/ever-co/ever-traduora

ENV IS_DOCKER=true

RUN apk --update add bash && \
apk add --no-cache --virtual build-dependencies libgcc libstdc++ linux-headers dos2unix gcc g++ git make python2 py2-setuptools vips-dev
# Set Python interpreter for `node-gyp` to use
ENV PYTHON /usr/bin/python

RUN apk --update add bash && npm i -g npm \
&& apk add --no-cache --virtual build-dependencies bind-tools curl tar xz jq python3 python3-dev py3-configobj py3-pip py3-setuptools build-base \
snappy libheif dos2unix gcc g++ snappy-dev git libgcc libstdc++ linux-headers autoconf automake make nasm vips-dev vips

# Verify the Node.js version
RUN node --version
RUN npm --version

# Output Python3 version
RUN python3 --version

RUN npm install --quiet node-gyp -g
RUN npm install --quiet node-gyp@9.3.1 -g
RUN npm install yarn -g --force

COPY wait docker-entrypoint.compose.sh docker-entrypoint.sh /

Expand All @@ -25,14 +43,22 @@ RUN dos2unix bin/* && chmod +x bin/*.sh
RUN bin/build.sh

# Runtime stage
FROM node:16-alpine3.11
FROM node:20.11.1-alpine3.19

ENV NODE_OPTIONS=${NODE_OPTIONS:-"--max-old-space-size=12288"}
ENV NODE_ENV=${NODE_ENV:-production}

ENV IS_DOCKER=true

WORKDIR /opt/traduora

COPY --from=builder /wait /docker-entrypoint.sh /docker-entrypoint.compose.sh ./

COPY --from=builder /opt/traduora/dist/ /opt/traduora/

# Clean up
RUN yarn cache clean

EXPOSE 8080

ENTRYPOINT [ "./docker-entrypoint.sh" ]
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,15 @@ Traduora can be run just about anywhere, check out our [Quickstart](https://docs

Also, check out Traduora's [Docker Hub page](https://hub.docker.com/r/everco/ever-traduora) for pre-built images.

### Configuration and Deployment
### Configuration

Please check out the [configuration](https://docs.traduora.co/docs/configuration) and [deployment](https://docs.traduora.co/docs/deployment) documents for more information on deploying Traduora.
Please check out the [configuration](https://docs.traduora.co/docs/configuration).

### Deployments

Please check [deployment](https://docs.traduora.co/docs/deployment) documents for more information on deploying Traduora.

[![Deploy on Elestio](https://elest.io/images/logos/deploy-to-elestio-btn.png)](https://elest.io/open-source/traduora)

## 🔗 Frequently Asked Questions

Expand All @@ -79,11 +85,11 @@ See more details in the [LICENSE](https://github.com/ever-co/ever-traduora/blob/

In a production setup, all client-side to server-side (backend, APIs) communications should be encrypted using HTTPS/SSL (REST APIs).

If you discover any issue regarding security, please disclose the information responsibly by sending an email to <mailto:security@ever.co> or on [![huntr](https://cdn.huntr.dev/huntr_security_badge_mono.svg)](https://huntr.dev) and not by creating a GitHub issue.
If you discover any issue regarding security, please disclose the information responsibly by sending an email to <mailto:security@ever.co> and not by creating a GitHub issue.

## Internationalization

Of course, we'd like Traduora to be available in as many languages as possible. We're setting up a Traduora server for translating Traduora itself, check back soon for more details on how to contribute.
Of course, we'd like Traduora to be available in as many languages as possible, so feel free to contribute!

## Changelog

Expand All @@ -100,7 +106,7 @@ Traduora was created by https://github.com/anthonynsimon (https://anthonynsimon.
## ™️ Trademarks

**Ever**® is a registered trademark of [Ever Co. LTD](https://ever.co).
**Ever® Demand™**, **Ever® Gauzy™** and **Ever® OpenSaaS™** are all trademarks of [Ever Co. LTD](https://ever.co).
**Ever® Traduora™**, **Ever® Demand™**, **Ever® Gauzy**, **Ever® Teams** and **Ever® OpenSaaS™** are all trademarks of [Ever Co. LTD](https://ever.co).
The trademarks may only be used with the written permission of Ever Co. LTD. and may not be used to promote or otherwise market competitive products or services.

All other brand and product names are trademarks, registered trademarks, or service marks of their respective holders.
Expand Down Expand Up @@ -135,12 +141,9 @@ You can also view a full list of our [contributors tracked by Github](https://gi
---

![visitors](https://visitor-badge.laobi.icu/badge?page_id=ever-co.traduora-platform)
[![huntr](https://cdn.huntr.dev/huntr_security_badge_mono.svg)](https://huntr.dev)
[![Circle CI](https://circleci.com/gh/ever-co/ever-traduora.svg?style=svg)](https://circleci.com/gh/ever-co/ever-traduora)
[![codecov](https://codecov.io/gh/ever-co/ever-traduora/branch/master/graph/badge.svg)](https://codecov.io/gh/ever-co/ever-traduora)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/0d5e1c68dc1e44c79249241b4abb15b8)](https://www.codacy.com/gh/ever-co/ever-traduora/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=ever-co/ever-traduora&amp;utm_campaign=Badge_Grade)
[![DeepScan grade](https://deepscan.io/api/teams/3293/projects/16761/branches/365112/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=3293&pid=16761&bid=365112)
[![Known Vulnerabilities](https://snyk.io/test/github/ever-co/ever-traduora/badge.svg)](https://snyk.io/test/github/ever-co/ever-traduora)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/ever-co/ever-traduora.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/ever-co/ever-traduora/alerts/)
[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/ever-co/ever-traduora.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/ever-co/ever-traduora/context:javascript)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fever-co%2Fever-traduora.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fever-co%2Fever-traduora?ref=badge_shield)
79 changes: 40 additions & 39 deletions api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ever-traduora-api",
"version": "0.19.4",
"version": "0.19.5",
"license": "AGPL-3.0-only",
"homepage": "https://traduora.co",
"repository": {
Expand Down Expand Up @@ -30,78 +30,79 @@
},
"dependencies": {
"@nestjs/axios": "^3.0.2",
"@nestjs/common": "^10.3.8",
"@nestjs/core": "^10.3.8",
"@nestjs/common": "^10.3.9",
"@nestjs/core": "^10.3.9",
"@nestjs/jwt": "^10.2.0",
"@nestjs/passport": "^10.0.3",
"@nestjs/platform-express": "^10.3.8",
"@nestjs/platform-express": "^10.3.9",
"@nestjs/swagger": "^7.3.1",
"@nestjs/typeorm": "^10.0.2",
"axios": "^1.6.5",
"bcrypt": "^5.0.1",
"class-transformer": "^0.4.0",
"class-validator": "^0.13.1",
"axios": "^1.7.2",
"bcrypt": "^5.1.1",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"crypto": "^1.0.1",
"csv": "^5.5.3",
"csv-stringify": "^6.0.5",
"ejs": "^3.1.10",
"generate-password": "^1.6.1",
"gettext-parser": "^4.0.4",
"handlebars": "^4.7.7",
"handlebars": "^4.7.8",
"iconv-lite": "^0.6.3",
"js-yaml": "^4.1.0",
"lodash": "^4.17.21",
"moment": "^2.29.4",
"moment": "^2.30.1",
"morgan": "^1.10.0",
"mysql2": "^3.9.6",
"mysql2": "^3.10.1",
"node-native2ascii": "^0.2.0",
"nodemailer": "^6.6.3",
"passport": "^0.4.1",
"passport-jwt": "^4.0.0",
"pg": "^8.11.2",
"nodemailer": "^6.9.14",
"passport": "^0.7.0",
"passport-jwt": "^4.0.1",
"pg": "^8.12.0",
"php-array-parser": "^1.0.1",
"preview-email": "^3.0.5",
"properties": "^1.2.1",
"query-string": "^7.0.0",
"querystring": "^0.2.1",
"reflect-metadata": "^0.1.13",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.3.0",
"strings-file": "^0.0.5",
"swagger-ui-express": "^4.2.0",
"typeorm": "^0.3.0",
"typeorm": "^0.3.20",
"xliff": "^5.6.2",
"xml-js": "^1.6.11"
},
"devDependencies": {
"@nestjs/testing": "^10.3.8",
"@types/bcrypt": "^5.0.0",
"@nestjs/testing": "^10.3.9",
"@types/bcrypt": "^5.0.2",
"@types/csv-stringify": "^3.1.0",
"@types/express": "^4.17.13",
"@types/express": "^4.17.21",
"@types/handlebars": "^4.1.0",
"@types/iconv-lite": "^0.0.1",
"@types/jest": "^29.5.12",
"@types/js-yaml": "^4.0.1",
"@types/js-yaml": "^4.0.9",
"@types/moment": "^2.13.0",
"@types/morgan": "^1.9.2",
"@types/node": "^15.0.2",
"@types/nodemailer": "^6.4.4",
"@types/supertest": "^2.0.11",
"@types/morgan": "^1.9.9",
"@types/node": "^20.14.8",
"@types/nodemailer": "^6.4.15",
"@types/supertest": "^6.0.2",
"copyfiles": "^2.4.1",
"cross-env": "^7.0.3",
"jest": "^29.7.0",
"nodemon": "^2.0.7",
"prettier": "^3.2.5",
"rimraf": "^3.0.2",
"semver-regex": "^4.0.3",
"supertest": "^6.2.2",
"ts-jest": "^29.1.2",
"ts-loader": "^9.2.5",
"ts-node": "^10.2.1",
"tsconfig-paths": "^3.11.0",
"nodemon": "^3.1.4",
"prettier": "^3.3.3",
"rimraf": "^5.0.7",
"semver-regex": "^4.0.5",
"supertest": "^7.0.0",
"ts-jest": "^29.1.5",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"tslint": "^6.1.3",
"typescript": "4.2.3",
"webpack": "^5.37.0",
"webpack-cli": "^4.7.0",
"webpack-node-externals": "^1.7.2"
"typescript": "^5.5.2",
"webpack": "^5.93.0",
"webpack-cli": "^5.1.4",
"webpack-node-externals": "^3.0.0"
},
"jest": {
"moduleFileExtensions": [
Expand All @@ -119,7 +120,7 @@
"testEnvironment": "node"
},
"engines": {
"node": ">=14.0.0",
"node": ">=18.0.0",
"yarn": ">=1.13.0"
},
"snyk": true
Expand Down
Loading

0 comments on commit 320fb89

Please sign in to comment.