From 34d0057b3e81c960d0a2e824cb5ed359020e8c47 Mon Sep 17 00:00:00 2001 From: Nassim Tabchiche Date: Mon, 12 Feb 2024 12:28:56 +0100 Subject: [PATCH 1/4] Update gitignore --- .gitignore | 13 +------------ backend/.gitignore | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 backend/.gitignore diff --git a/.gitignore b/.gitignore index 4a32c0e90d..4f26d58d4c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,8 @@ -!__init__.py -*.pyc -__pycache__ *.DS_Store *~$* -staticfiles/* -*.mo .env -dump.json -node_modules/ +**/node_modules/ .vscode *.sqlite3 -backend/staticfiles/ -backend/venv/ temp/ -backend/db/attachments/ -backend/db/django_secret_key -backend/db/pg_password.txt ./db/ diff --git a/backend/.gitignore b/backend/.gitignore new file mode 100644 index 0000000000..ba9f5fc728 --- /dev/null +++ b/backend/.gitignore @@ -0,0 +1,18 @@ +!__init__.py +*.pyc +__pycache__ +*.DS_Store +*~$* +staticfiles/* +*.mo +.env +.vscode +*.sqlite3 +staticfiles/ +venv/ +temp/ +db/attachments/ +db/django_secret_key +db/pg_password.txt +./db/ +.coverage From 0653d1926451b24e304b0196b68a7d00aec66e7c Mon Sep 17 00:00:00 2001 From: Nassim Tabchiche Date: Mon, 12 Feb 2024 12:31:55 +0100 Subject: [PATCH 2/4] Update VERSION --- backend/ciso_assistant/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/ciso_assistant/VERSION b/backend/ciso_assistant/VERSION index 85b7c695b8..c81aa44afb 100644 --- a/backend/ciso_assistant/VERSION +++ b/backend/ciso_assistant/VERSION @@ -1 +1 @@ -0.9.6 +0.9.7 From 0e9012a4b3f81d3891abdf39771e05595eb025c7 Mon Sep 17 00:00:00 2001 From: Nassim Tabchiche Date: Mon, 12 Feb 2024 15:49:53 +0100 Subject: [PATCH 3/4] Update ESLint config --- frontend/.eslintrc.cjs | 28 ++++-- frontend/package-lock.json | 199 +++++++++++++++++++++++++++++++++++++ frontend/package.json | 1 + 3 files changed, 219 insertions(+), 9 deletions(-) diff --git a/frontend/.eslintrc.cjs b/frontend/.eslintrc.cjs index 3ccf435f02..ebc19589fa 100644 --- a/frontend/.eslintrc.cjs +++ b/frontend/.eslintrc.cjs @@ -1,20 +1,30 @@ module.exports = { root: true, + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:svelte/recommended', + 'prettier' + ], parser: '@typescript-eslint/parser', - extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], - plugins: ['svelte3', '@typescript-eslint'], - ignorePatterns: ['*.cjs'], - overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }], - settings: { - 'svelte3/typescript': () => require('typescript') - }, + plugins: ['@typescript-eslint'], parserOptions: { sourceType: 'module', - ecmaVersion: 2020 + ecmaVersion: 2020, + extraFileExtensions: ['.svelte'] }, env: { browser: true, es2017: true, node: true - } + }, + overrides: [ + { + files: ['*.svelte'], + parser: 'svelte-eslint-parser', + parserOptions: { + parser: '@typescript-eslint/parser' + } + } + ] }; diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 9fd3a83659..b642d51da7 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -34,6 +34,7 @@ "autoprefixer": "^10.4.14", "eslint": "^8.53.0", "eslint-config-prettier": "^8.5.0", + "eslint-plugin-svelte": "^2.35.1", "jsdom": "^22.1.0", "postcss": "^8.4.23", "prettier": "^2.8.0", @@ -3051,6 +3052,18 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint-compat-utils": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.1.2.tgz", + "integrity": "sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "eslint": ">=6.0.0" + } + }, "node_modules/eslint-config-prettier": { "version": "8.10.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", @@ -3063,6 +3076,92 @@ "eslint": ">=7.0.0" } }, + "node_modules/eslint-plugin-svelte": { + "version": "2.35.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-2.35.1.tgz", + "integrity": "sha512-IF8TpLnROSGy98Z3NrsKXWDSCbNY2ReHDcrYTuXZMbfX7VmESISR78TWgO9zdg4Dht1X8coub5jKwHzP0ExRug==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@jridgewell/sourcemap-codec": "^1.4.14", + "debug": "^4.3.1", + "eslint-compat-utils": "^0.1.2", + "esutils": "^2.0.3", + "known-css-properties": "^0.29.0", + "postcss": "^8.4.5", + "postcss-load-config": "^3.1.4", + "postcss-safe-parser": "^6.0.0", + "postcss-selector-parser": "^6.0.11", + "semver": "^7.5.3", + "svelte-eslint-parser": ">=0.33.0 <1.0.0" + }, + "engines": { + "node": "^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ota-meshi" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0-0", + "svelte": "^3.37.0 || ^4.0.0" + }, + "peerDependenciesMeta": { + "svelte": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-svelte/node_modules/postcss-load-config": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", + "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==", + "dev": true, + "dependencies": { + "lilconfig": "^2.0.5", + "yaml": "^1.10.2" + }, + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-svelte/node_modules/postcss-selector-parser": { + "version": "6.0.15", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz", + "integrity": "sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-svelte/node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -4365,6 +4464,12 @@ "node": ">= 8" } }, + "node_modules/known-css-properties": { + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.29.0.tgz", + "integrity": "sha512-Ne7wqW7/9Cz54PDt4I3tcV+hAyat8ypyOGzYRJQfdxnnjeWsTxt1cy8pjvvKeI5kfXuyvULyeeAvwvvtAX3ayQ==", + "dev": true + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -5270,6 +5375,48 @@ "node": ">=4" } }, + "node_modules/postcss-safe-parser": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz", + "integrity": "sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==", + "dev": true, + "engines": { + "node": ">=12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.3.3" + } + }, + "node_modules/postcss-scss": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.9.tgz", + "integrity": "sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss-scss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "engines": { + "node": ">=12.0" + }, + "peerDependencies": { + "postcss": "^8.4.29" + } + }, "node_modules/postcss-selector-parser": { "version": "6.0.10", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", @@ -6153,6 +6300,58 @@ "svelte": "^3.55.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0" } }, + "node_modules/svelte-eslint-parser": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-0.33.1.tgz", + "integrity": "sha512-vo7xPGTlKBGdLH8T5L64FipvTrqv3OQRx9d2z5X05KKZDlF4rQk8KViZO4flKERY+5BiVdOh7zZ7JGJWo5P0uA==", + "dev": true, + "dependencies": { + "eslint-scope": "^7.0.0", + "eslint-visitor-keys": "^3.0.0", + "espree": "^9.0.0", + "postcss": "^8.4.29", + "postcss-scss": "^4.0.8" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ota-meshi" + }, + "peerDependencies": { + "svelte": "^3.37.0 || ^4.0.0" + }, + "peerDependenciesMeta": { + "svelte": { + "optional": true + } + } + }, + "node_modules/svelte-eslint-parser/node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/svelte-eslint-parser/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, "node_modules/svelte-hmr": { "version": "0.15.3", "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.15.3.tgz", diff --git a/frontend/package.json b/frontend/package.json index 4384fdbda9..cf94e2fb5d 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -37,6 +37,7 @@ "autoprefixer": "^10.4.14", "eslint": "^8.53.0", "eslint-config-prettier": "^8.5.0", + "eslint-plugin-svelte": "^2.35.1", "jsdom": "^22.1.0", "postcss": "^8.4.23", "prettier": "^2.8.0", From 10a1e6189cc172dd955d9b3aeb1dcc5c27e47634 Mon Sep 17 00:00:00 2001 From: Mohamed-Hacene Date: Mon, 12 Feb 2024 16:09:38 +0100 Subject: [PATCH 4/4] fix: functional test --- .github/workflows/functional-tests.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/functional-tests.yml b/.github/workflows/functional-tests.yml index 451cd7f236..ec4bf691e4 100644 --- a/.github/workflows/functional-tests.yml +++ b/.github/workflows/functional-tests.yml @@ -56,17 +56,6 @@ jobs: working-directory: ${{ env.working-directory }} run: | touch .env - echo DEFAULT_FROM_EMAIL='core.assistant@intuitem.com' >> .env - echo EMAIL_HOST='localhost' >> .env - echo EMAIL_PORT=1025 >> .env - echo EMAIL_HOST_USER='user' >> .env - echo EMAIL_HOST_PASSWORD='pass' >> .env - echo EMAIL_USE_TLS=True >> .env - echo EMAIL_HOST_RESCUE='localhost' >> .env - echo EMAIL_PORT_RESCUE=1025 >> .env - echo EMAIL_HOST_USER_RESCUE='' >> .env - echo EMAIL_HOST_PASSWORD_RESCUE='' >> .env - echo EMAIL_USE_TLS_RESCUE=False >> .env echo PUBLIC_BACKEND_API_URL=http://127.0.0.1:8000/api >> .env - name: Create backend environment variables file @@ -80,11 +69,6 @@ jobs: echo POSTGRES_USER=postgres >> .env echo POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} >> .env echo DB_HOST=localhost >> .env - echo EMAIL_HOST=localhost >> .env - echo EMAIL_PORT=1025 >> .env - echo EMAIL_HOST_USER='' >> .env - echo EMAIL_HOST_PASSWORD='' >> .env - echo DEFAULT_FROM_EMAIL='ciso-assistant@alsigo.net' >> .env echo CISO_ASSISTANT_SUPERUSER_EMAIL='' >> .env echo CISO_ASSISTANT_URL=http://127.0.0.1:4173 >> .env - name: Run migrations