Skip to content

Commit

Permalink
moved to cupertino
Browse files Browse the repository at this point in the history
  • Loading branch information
Trit0 committed Feb 19, 2023
1 parent 16d752d commit c877353
Show file tree
Hide file tree
Showing 44 changed files with 660 additions and 508 deletions.
2 changes: 1 addition & 1 deletion api/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ bower_components
build/Release

# Dependency directories
test-backend/api/node_modules/
foodapp/api/node_modules/
jspm_packages/

# TypeScript v1 declaration files
Expand Down
1 change: 1 addition & 0 deletions api/assets/foodapp.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<mxfile host="app.diagrams.net" modified="2023-01-07T17:34:00.799Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36" version="20.8.3" etag="nz50-3MnAN_yFvYIQIbB" type="device"><diagram id="oxd2xfgMhcf7ee-ZLSGD" name="Page-1">7VzZcuI4FP0aHkl5NzySbZYkVZlO1fT0EyVsAZoYi8hygP76ucL70uAEgsyY6qqOfSRZV/fI9x7JNj39ZrH+jaHl/Im62Otpirvu6bc9TdMUTYU/AtlEiK0bETBjxI0gNQNeyE8cg0qMhsTFQaEip9TjZFkEHer72OEFDDFGV8VqU+oVe12iGa4ALw7yquh34vJ5hA40O8N/x2Q2T3pWrWFUskBJ5XgkwRy5dJWD9LuefsMo5dHRYn2DPeG8xC9Ru/tflKaGMezzJg3+XvVHf177d1aA1NG3b+OnKR30VT26zDvywnjEPc16C4VR14+I8OwsHgXfJK7heC3wOV94AKhwGHBGX/EN9SgDxKc+1LyeEs8rQcgjMx9OHTAdA379jhkn4PRRXLAgriu6uV7NCccvS+SIPlcwxQBjNPRdLEalpGaJC+D1Lz2jpv6GiYrpAnO2gSpJg4SieI6mlK0yxq0YmufI1mMMxXNsll45owEOYiY+woqxgxXtUdxOGP7ztvwoUGbCn7/C3o3eGw0n1O8Cabq5n7TBSUkzDyVN2R6DfYpxNYQwYoi4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9IeFsTQFmmPhJ22aw9NLtd2c66lkGNLJUc/c2HY2M9yhKFRknq2WfpMoVS/Pzis/kmkZOLz1knJZDfcI8FlK7xtgjIP6sdUmdVKwHzr9Gj9hnutSvUpL7yN2wmRWo6UZs3L26d+yGtJUS6J4Owr1Se2qpICslSn0VTYSH2HybClqs685PzIK2tWie7zYduQynb7P7QIxpePLtotUA57ha2OXVlao2pd19REXy0/tB9U5UT66d5p3qI22/oRh5DFl0AkJRDt6ZmufMzG8UsVsqIJkMVwkE6Q3Drl8hQf1i0132if+Cn+QKrULW6wJkV7N9OjVqnU7e3WuUeUtGbjjzAGMiVtMs1awerJts0bk3Pwdu5ht1xbv5DZpvLx5S28c1tcVFP8iXYtGy4Rco6D6eUuiP9xc/5nid+0ZSd+q/aXP1oQhaId+Uv4aeOSokU/KJHFntIHB12JKaZeWkt8XUSB0+zH9qIHwdlPFup3/wE=</diagram></mxfile>
82 changes: 54 additions & 28 deletions api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 17 additions & 15 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
"author": "",
"license": "MIT",
"scripts": {
"prebuild": "test-backend/api/node_modules/.bin/rimraf dist",
"build": "test-backend/api/node_modules/.bin/nest build",
"build:data-migrations": "test-backend/api/node_modules/.bin/rimraf data-migrations-dist && tsc --build tsconfig.migrations.json",
"format": "test-backend/api/node_modules/.bin/prettier --write \\\"src/**/*.ts\\\" \\\"test/**/*.ts\\\"",
"start": "test-backend/api/node_modules/.bin/nest start",
"start:dev": "test-backend/api/node_modules/.bin/nest start --watch",
"start:debug": "test-backend/api/node_modules/.bin/nest start --debug --watch",
"prebuild": "rimraf dist",
"build": "nest build",
"build:data-migrations": "rimraf data-migrations-dist && tsc --build tsconfig.migrations.json",
"format": "prettier --write \\\"src/**/*.ts\\\" \\\"test/**/*.ts\\\"",
"start": "nest start",
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"lint": "test-backend/api/node_modules/.bin/eslint . --fix --ext .ts",
"test": "test-backend/api/node_modules/.bin/jest",
"test:watch": "test-backend/api/node_modules/.bin/jest --watch",
"test:cov": "test-backend/api/node_modules/.bin/jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register test-backend/api/node_modules/.bin/jest --runInBand",
"test:e2e": "test-backend/api/node_modules/.bin/jest --config ./test/jest-e2e.json",
"install": "(ls test-backend/pre-commit-setup.sh >> /dev/null 2>&1 && echo 'pre-commit setup' && chmod +x ../pre-commit-setup.sh && bash -c ../pre-commit-setup.sh) || echo 'pre-commit setup skipped'",
"lint": "eslint . --fix --ext .ts",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json",
"install": "(ls foodapp/pre-commit-setup.sh >> /dev/null 2>&1 && echo 'pre-commit setup' && chmod +x ../pre-commit-setup.sh && bash -c ../pre-commit-setup.sh) || echo 'pre-commit setup skipped'",
"data-migrations": "node data-migrations-dist/data-migrations/index.js"
},
"dependencies": {
Expand All @@ -34,8 +34,10 @@
"@recursyve/nestjs-config": "^8.0.1",
"@recursyve/nestjs-data-filter": "^8.4.4",
"@recursyve/nestjs-sequelize-utils": "^8.0.4",
"@recursyve/nestjs-rosetta-core": "^9.0.0-beta.19",
"@recursyve/nestjs-rosetta-sequelize": "^9.0.0-beta.19",
"class-transformer": "^0.5.1",
"class-validator": "^0.13.2",
"class-validator": "^0.14.0",
"compression": "^1.7.4",
"dotenv": "^16.0.1",
"helmet": "^5.1.0",
Expand Down
16 changes: 15 additions & 1 deletion api/src/modules/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,22 @@ import { GlobalConfigModule } from "./config/config.module";
import { RootModule } from "./root/root.module";
import { DatabaseModule } from "./database/database.module";
import { HealthModule } from "./health/health.module";
import { NestjsRosettaModule } from "@recursyve/nestjs-rosetta-core";
import { NestjsRosettaSequelizeModule, SequelizeTranslationObjectProcessor } from "@recursyve/nestjs-rosetta-sequelize";
import { languagesValues, Languages } from "./translations/languages.enum";

@Module({
imports: [GlobalConfigModule, RootModule, DatabaseModule, HealthModule]
imports: [
GlobalConfigModule,
RootModule,
DatabaseModule,
HealthModule,
NestjsRosettaModule.forRoot({
processors: [new SequelizeTranslationObjectProcessor()],
supportedLanguages: languagesValues,
fallbackLanguage: Languages.EN
}),
NestjsRosettaSequelizeModule
]
})
export class ApplicationModule {}
7 changes: 5 additions & 2 deletions api/src/modules/database/accounts/models/home.model.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { DatabaseEntities } from "../../common/models/database-entities.model";
import { AllowNull, BelongsTo, Column, ForeignKey, Table } from "sequelize-typescript";
import { Accounts } from "./accounts.model";
import { Translation } from "../../../translations/models/translation.model";
import { DataTypes } from "sequelize";
import { TranslationObject } from "@recursyve/nestjs-rosetta-core";
import { TranslationColumn } from "@recursyve/nestjs-rosetta-sequelize";

@Table
export class Homes extends DatabaseEntities {
Expand All @@ -12,7 +13,9 @@ export class Homes extends DatabaseEntities {

@AllowNull(false)
@Column(DataTypes.JSON)
public name: Translation;
@TranslationColumn()
// TODO should be a string
public name: TranslationObject;

@BelongsTo(() => Accounts)
public ownerAccount: Accounts;
Expand Down
Loading

0 comments on commit c877353

Please sign in to comment.