Skip to content

Commit e93a1ee

Browse files
authored
chore: config updates (#489)
1 parent 4856400 commit e93a1ee

10 files changed

Lines changed: 56 additions & 70 deletions

File tree

‎.github/workflows/codeql.yml‎

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,12 @@
1212
name: "CodeQL"
1313

1414
on:
15-
push:
16-
branches: [ "main" ]
17-
paths:
18-
- 'src/**'
1915
pull_request:
2016
branches: [ "main" ]
2117
paths:
22-
- 'src/**'
18+
- 'development/**'
2319
schedule:
24-
- cron: '39 10 * * 1'
20+
- cron: '39 10 * * 1'
2521

2622
jobs:
2723
analyze:
@@ -35,7 +31,7 @@ jobs:
3531
strategy:
3632
fail-fast: false
3733
matrix:
38-
language: [ 'javascript' ]
34+
language: [ 'typescript' ]
3935
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
4036
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
4137

@@ -47,16 +43,15 @@ jobs:
4743
- name: Initialize CodeQL
4844
uses: github/codeql-action/init@v4
4945
with:
50-
source-root: src
46+
source-root: development
5147
languages: ${{ matrix.language }}
5248
# If you wish to specify custom queries, you can do so here or in a config file.
5349
# By default, queries listed here will override any specified in a config file.
5450
# Prefix the list here with "+" to use these queries and those in the config file.
55-
51+
5652
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
5753
queries: security-extended,security-and-quality
5854

59-
6055
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6156
# If this step fails, then you should remove it and run the build manually (see below)
6257
# - name: Autobuild

‎.github/workflows/nodejsci.yml‎

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Node.js CI
22

33
on:
4-
push:
5-
branches: [ main ]
64
pull_request:
75
branches: [ main ]
86

@@ -13,26 +11,26 @@ jobs:
1311

1412
strategy:
1513
matrix:
16-
node-version: [lts/*]
14+
node-version: [ lts/* ]
1715

1816
steps:
19-
- uses: actions/checkout@v6
20-
21-
- name: Use Node.js ${{ matrix.node-version }}
22-
uses: actions/setup-node@v6
23-
with:
24-
node-version: ${{ matrix.node-version }}
25-
cache: npm
26-
cache-dependency-path: '**/package-lock.json'
27-
28-
- name: Install dependencies
29-
run: npm ci
30-
31-
- name: Compile
32-
run: npm run compile
33-
34-
- name: Test
35-
run: npm run test
36-
37-
- name: Lint
38-
run: npm run lint
17+
- uses: actions/checkout@v6
18+
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v6
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
cache: npm
24+
cache-dependency-path: '**/package-lock.json'
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Compile
30+
run: npm run build
31+
32+
- name: Test
33+
run: npm run test
34+
35+
- name: Lint
36+
run: npm run lint

‎.gitignore‎

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,12 @@
1-
# Logs
21
logs
32
*.log
43
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
pnpm-debug.log*
8-
lerna-debug.log*
94

105
artifacts
116
coverage
127
node_modules
8+
development.env
139

14-
# Editor directories and files
1510
!.vscode/extensions.json
16-
.idea
1711
.DS_Store
18-
*.suo
19-
*.ntvs*
20-
*.njsproj
21-
*.sln
22-
*.sw?
23-
*.tgz
24-
25-
development.env
12+
*.tgz

‎.vscode/settings.json‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
"json.format.enable": false,
66
"css.format.braceStyle": "expand",
77
"css.format.spaceAroundSelectorSeparator": true,
8-
"typescript.format.placeOpenBraceOnNewLineForControlBlocks": true,
9-
"typescript.format.placeOpenBraceOnNewLineForFunctions": true,
10-
"typescript.preferences.importModuleSpecifierEnding": "minimal",
11-
"typescript.preferences.quoteStyle": "single",
12-
"typescript.format.semicolons": "insert",
8+
"js/ts.format.placeOpenBraceOnNewLineForControlBlocks": true,
9+
"js/ts.format.placeOpenBraceOnNewLineForFunctions": true,
10+
"js/ts.preferences.importModuleSpecifierEnding": "minimal",
11+
"js/ts.preferences.quoteStyle": "single",
12+
"js/ts.format.semicolons": "insert",
1313
"editor.codeActionsOnSave": {
1414
"source.organizeImports": "explicit"
1515
}

‎README.md‎

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,26 @@ We're working hard to get the MVP done. To document the project we started writi
1616

1717
## How to run
1818

19-
The project requires [Node.js](https://nodejs.org/) version 20+ to run the application and [Docker](https://www.docker.com/) for the additional services.
19+
The project requires [Node.js](https://nodejs.org/) version 22+ to run the application and [Docker](https://www.docker.com/) for the additional services.
2020

2121
You need to set up the configuration first by copying the `example.env` file to a `development.env` file. Copying the file is enough for the first run. Then you can run the following command to start Docker:
2222

2323
```bash
24-
npm run docker-compose up
24+
npm run docker-up
2525
```
2626

27-
This will start a [Keycloack](https://www.keycloak.org/) instance for account management, a [MongoDB](https://www.mongodb.com/) instance for data storage and a [MinIO](https://min.io/) instance for storing the comic images.
27+
This will start a [Keycloak](https://www.keycloak.org/) instance for account management, a [MongoDB](https://www.mongodb.com/) instance for data storage and a [SeaweedFS](https://seaweedfs.github.io/) instance for storing the comic images.
2828

29-
Next you can start the application with the following commands:
29+
Next you can build and start the application with the following commands:
3030

3131
```bash
3232
npm install
3333
npm run build
34-
npm run standalone
34+
npm run dist
35+
npm run demo
3536
```
3637

37-
This will start the Jitar runtime at port 3000. To start the application you need to run the following command in a new terminal:
38-
39-
```bash
40-
npm run dev
41-
```
42-
43-
Now a [Vite](https://vitest.dev/) dev server is running on port 5173. You can then navigate to http://localhost:5173 to see the application.
38+
This will start the social application at port 3000.
4439

4540
## How to use
4641

@@ -50,4 +45,4 @@ Once you're in it should be pretty straightforward. You should be able to comic!
5045

5146
## Contributing
5247

53-
This project is not open for code contributions. However, if you have any questions or suggestions, feel free to contact us at [comify\@masking.tech](mailto:comify@masking.tech?subject=Comify%20question), or post a message in the discussion section of this repository.
48+
This project is not open for code contributions. However, if you have any questions or suggestions, we would love to hear from you at [comify\@masking.tech](mailto:comify@masking.tech?subject=Comify%20question), or post a message in the discussion section of this repository.

‎development/common/integrations/authentication/authenticationMiddleware.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const authProcedures = {
99
logout: 'social/domain/authentication/logout'
1010
};
1111

12-
const redirectPath = process.env.AUTHENTICATION_CLIENT_PATH || '';
12+
const redirectPath = process.env.AUTHENTICATION_CLIENT_PATH ?? '';
1313

1414
const whiteList: string[] = [
1515
'common/domain/tenant/getByOriginConverted'
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11

22
import { OriginMiddleware } from '@jitar-plugins/http';
33

4-
export default new OriginMiddleware();
4+
const options = {
5+
sameSite: process.env.ORIGIN_COOKIE_SAME_SITE ?? 'Strict',
6+
secure: process.env.ORIGIN_COOKIE_SECURE === 'true'
7+
};
8+
9+
export default new OriginMiddleware(options);

‎example.env‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ NOTIFICATION_DRIVER="memory"
4747
# WEBPUSH_VAPID_PUBLIC_KEY=""
4848
# WEBPUSH_VAPID_PRIVATE_KEY=""
4949

50+
# ORIGIN MIDDLEWARE
51+
ORIGIN_COOKIE_SAME_SITE='Strict'
52+
ORIGIN_COOKIE_SECURE=false #localhost is not a secure context in Safari
53+
5054
# ########################################################################
5155
# DOCKER
5256
# ########################################################################

‎package.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"type": "module",
66
"scripts":
77
{
8-
"build": "npm run build --workspaces",
8+
"build": "npm run build-domain && npm run build-app",
9+
"build-domain": "npm run build-domain --workspaces",
10+
"build-app": "npm run build-app --workspaces --if-present",
911
"lint": "npm run lint --workspaces",
1012
"review": "npm run review --workspaces",
1113
"clean": "npm run clean --workspaces",

‎vitest.config.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ export default defineConfig({
77
plugins: [
88
tsconfigPaths()
99
]
10-
});
10+
});

0 commit comments

Comments
 (0)