diff --git a/.drone.yml b/.drone.yml index 0dd9be3..250069f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -70,189 +70,189 @@ kind: secret name: FOURCHE_AWS_SECRET_ACCESS_KEY data: rEE5ttbao6dla92YOw1vh1VE1sBWAjen+jfP/ZdUSDnFlkZKY56ms+V0jOReGulhwbVRxQijp1fTS43TW/vJbq3XSeTVUwDGTHLZFQ+yGObvr+4DKOVIRqp/rJE= ---- -kind: pipeline -type: docker -name: prod +# --- +# kind: pipeline +# type: docker +# name: prod -steps: -- name: install npm - image: node:20.12.2-alpine - volumes: - - name: node_modules - path: /drone/src/node_modules - commands: - - npm i --include dev - - npm run fetchData - - npm run lint - - npm run build - environment: - NODE_ENV: 'production' +# steps: +# - name: install npm +# image: node:20.12.2-alpine +# volumes: +# - name: node_modules +# path: /drone/src/node_modules +# commands: +# - npm i --include dev +# - npm run fetchData +# #- npm run lint +# - npm run build +# environment: +# NODE_ENV: 'production' -- name: deploy on s3 - image: minio/mc - environment: - AWS_ACCESS_KEY_ID: - from_secret: PRODUCTION_AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY: - from_secret: PRODUCTION_AWS_SECRET_ACCESS_KEY - commands: - - mc alias set garage https://s3.garage.resilien.cloud $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY --api S3v4 - - mc mirror --overwrite /drone/src/dist garage/scores.ceiba-conseil.com +# - name: deploy on s3 +# image: minio/mc +# environment: +# AWS_ACCESS_KEY_ID: +# from_secret: PRODUCTION_AWS_ACCESS_KEY_ID +# AWS_SECRET_ACCESS_KEY: +# from_secret: PRODUCTION_AWS_SECRET_ACCESS_KEY +# commands: +# - mc alias set garage https://s3.garage.resilien.cloud $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY --api S3v4 +# - mc mirror --overwrite /drone/src/dist garage/scores.ceiba-conseil.com -- name: notify - image: plugins/matrix@sha256:f1affb31b0c86963c97c6f976fa0dcb3cc84272057fd8558d609d28b3064bd7f - settings: - homeserver: https://converser.eu - roomid: "QwOITmkKxRJJyCSDOZ:converser.eu" - userid: "resilien:converser.eu" - accesstoken: - from_secret: MATRIX_ACCESSTOKEN - when: - status: [ failure ] +# - name: notify +# image: plugins/matrix@sha256:f1affb31b0c86963c97c6f976fa0dcb3cc84272057fd8558d609d28b3064bd7f +# settings: +# homeserver: https://converser.eu +# roomid: "QwOITmkKxRJJyCSDOZ:converser.eu" +# userid: "resilien:converser.eu" +# accesstoken: +# from_secret: MATRIX_ACCESSTOKEN +# when: +# status: [ failure ] -volumes: -- name: node_modules - host: - path: /tmp/drone/cache/weko/scores.ceiba-conseil.com/node_modules +# volumes: +# - name: node_modules +# host: +# path: /tmp/drone/cache/weko/scores.ceiba-conseil.com/node_modules ---- -kind: pipeline -type: docker -name: staging +# --- +# kind: pipeline +# type: docker +# name: staging -steps: -- name: install npm - image: node:20.12.2-alpine - volumes: - - name: node_modules - path: /drone/src/node_modules - commands: - - npm i - - npm run fetchData - - npm run lint - - npm run build - environment: - NODE_ENV: 'staging' +# steps: +# - name: install npm +# image: node:20.12.2-alpine +# volumes: +# - name: node_modules +# path: /drone/src/node_modules +# commands: +# - npm i +# - npm run fetchData +# #- npm run lint +# - npm run build +# environment: +# NODE_ENV: 'staging' -- name: deploy on s3 - image: minio/mc - environment: - AWS_ACCESS_KEY_ID: - from_secret: STAGING_AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY: - from_secret: STAGING_AWS_SECRET_ACCESS_KEY - commands: - - mc alias set garage https://s3.garage.resilien.cloud $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY --api S3v4 - - mc mirror --overwrite /drone/src/dist garage/staging.scores.ceiba-conseil.com +# - name: deploy on s3 +# image: minio/mc +# environment: +# AWS_ACCESS_KEY_ID: +# from_secret: STAGING_AWS_ACCESS_KEY_ID +# AWS_SECRET_ACCESS_KEY: +# from_secret: STAGING_AWS_SECRET_ACCESS_KEY +# commands: +# - mc alias set garage https://s3.garage.resilien.cloud $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY --api S3v4 +# - mc mirror --overwrite /drone/src/dist garage/staging.scores.ceiba-conseil.com -- name: notify - image: plugins/matrix@sha256:f1affb31b0c86963c97c6f976fa0dcb3cc84272057fd8558d609d28b3064bd7f - settings: - homeserver: https://converser.eu - roomid: "QwOITmkKxRJJyCSDOZ:converser.eu" - userid: "resilien:converser.eu" - accesstoken: - from_secret: MATRIX_ACCESSTOKEN - when: - status: [ failure ] +# - name: notify +# image: plugins/matrix@sha256:f1affb31b0c86963c97c6f976fa0dcb3cc84272057fd8558d609d28b3064bd7f +# settings: +# homeserver: https://converser.eu +# roomid: "QwOITmkKxRJJyCSDOZ:converser.eu" +# userid: "resilien:converser.eu" +# accesstoken: +# from_secret: MATRIX_ACCESSTOKEN +# when: +# status: [ failure ] -volumes: -- name: node_modules - host: - path: /tmp/drone/cache/weko/staging.scores.ceiba-conseil.com/node_modules +# volumes: +# - name: node_modules +# host: +# path: /tmp/drone/cache/weko/staging.scores.ceiba-conseil.com/node_modules ---- -kind: pipeline -type: docker -name: test +# --- +# kind: pipeline +# type: docker +# name: test -steps: -- name: install npm - image: node:20.12.2-alpine - volumes: - - name: node_modules - path: /drone/src/node_modules - commands: - - npm i - - npm run fetchData - - npm run lint - - npm run build - environment: - NODE_ENV: 'test' +# steps: +# - name: install npm +# image: node:20.12.2-alpine +# volumes: +# - name: node_modules +# path: /drone/src/node_modules +# commands: +# - npm i +# - npm run fetchData +# #- npm run lint +# - npm run build +# environment: +# NODE_ENV: 'test' -- name: deploy on s3 - image: minio/mc - environment: - AWS_ACCESS_KEY_ID: - from_secret: TEST_AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY: - from_secret: TEST_AWS_SECRET_ACCESS_KEY - commands: - - mc alias set garage https://s3.garage.resilien.cloud $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY --api S3v4 - - mc mirror --overwrite /drone/src/dist garage/test.scores.ceiba-conseil.com +# - name: deploy on s3 +# image: minio/mc +# environment: +# AWS_ACCESS_KEY_ID: +# from_secret: TEST_AWS_ACCESS_KEY_ID +# AWS_SECRET_ACCESS_KEY: +# from_secret: TEST_AWS_SECRET_ACCESS_KEY +# commands: +# - mc alias set garage https://s3.garage.resilien.cloud $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY --api S3v4 +# - mc mirror --overwrite /drone/src/dist garage/test.scores.ceiba-conseil.com -- name: notify - image: plugins/matrix@sha256:f1affb31b0c86963c97c6f976fa0dcb3cc84272057fd8558d609d28b3064bd7f - settings: - homeserver: https://converser.eu - roomid: "QwOITmkKxRJJyCSDOZ:converser.eu" - userid: "resilien:converser.eu" - accesstoken: - from_secret: MATRIX_ACCESSTOKEN - when: - status: [ failure ] +# - name: notify +# image: plugins/matrix@sha256:f1affb31b0c86963c97c6f976fa0dcb3cc84272057fd8558d609d28b3064bd7f +# settings: +# homeserver: https://converser.eu +# roomid: "QwOITmkKxRJJyCSDOZ:converser.eu" +# userid: "resilien:converser.eu" +# accesstoken: +# from_secret: MATRIX_ACCESSTOKEN +# when: +# status: [ failure ] -volumes: -- name: node_modules - host: - path: /tmp/drone/cache/weko/test.scores.ceiba-conseil.com/node_modules +# volumes: +# - name: node_modules +# host: +# path: /tmp/drone/cache/weko/test.scores.ceiba-conseil.com/node_modules ---- -kind: pipeline -type: docker -name: DMH +# --- +# kind: pipeline +# type: docker +# name: DMH -steps: -- name: install npm - image: node:20.12.2-alpine - volumes: - - name: node_modules - path: /drone/src/node_modules - commands: - - npm i - - npm run fetchData - - npm run lint - - apk add --no-cache jq - - echo $(cat src/data.json | jq -c '[.[4]]') > src/data.json - - npm run build +# steps: +# - name: install npm +# image: node:20.12.2-alpine +# volumes: +# - name: node_modules +# path: /drone/src/node_modules +# commands: +# - npm i +# - npm run fetchData +# #- npm run lint +# - apk add --no-cache jq +# - echo $(cat src/data.json | jq -c '[.[4]]') > src/data.json +# - npm run build -- name: deploy on s3 - image: minio/mc - environment: - AWS_ACCESS_KEY_ID: - from_secret: DMH_AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY: - from_secret: DMH_AWS_SECRET_ACCESS_KEY - commands: - - mc alias set garage https://s3.garage.resilien.cloud $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY --api S3v4 - - mc mirror --overwrite /drone/src/dist garage/dmh.ceiba-conseil.com +# - name: deploy on s3 +# image: minio/mc +# environment: +# AWS_ACCESS_KEY_ID: +# from_secret: DMH_AWS_ACCESS_KEY_ID +# AWS_SECRET_ACCESS_KEY: +# from_secret: DMH_AWS_SECRET_ACCESS_KEY +# commands: +# - mc alias set garage https://s3.garage.resilien.cloud $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY --api S3v4 +# - mc mirror --overwrite /drone/src/dist garage/dmh.ceiba-conseil.com -- name: notify - image: plugins/matrix@sha256:f1affb31b0c86963c97c6f976fa0dcb3cc84272057fd8558d609d28b3064bd7f - settings: - homeserver: https://converser.eu - roomid: "QwOITmkKxRJJyCSDOZ:converser.eu" - userid: "resilien:converser.eu" - accesstoken: - from_secret: MATRIX_ACCESSTOKEN - when: - status: [ failure ] +# - name: notify +# image: plugins/matrix@sha256:f1affb31b0c86963c97c6f976fa0dcb3cc84272057fd8558d609d28b3064bd7f +# settings: +# homeserver: https://converser.eu +# roomid: "QwOITmkKxRJJyCSDOZ:converser.eu" +# userid: "resilien:converser.eu" +# accesstoken: +# from_secret: MATRIX_ACCESSTOKEN +# when: +# status: [ failure ] -volumes: -- name: node_modules - host: - path: /tmp/drone/cache/weko/dmh.ceiba-conseil.com/node_modules +# volumes: +# - name: node_modules +# host: +# path: /tmp/drone/cache/weko/dmh.ceiba-conseil.com/node_modules --- kind: pipeline @@ -268,7 +268,7 @@ steps: commands: - npm i - npm run fetchData - - npm run lint + #- npm run lint - apk add --no-cache jq - echo $(cat src/data.json | jq -c '[.[3]]') > src/data.json - npm run build diff --git a/package-lock.json b/package-lock.json index 879d1b8..b4fefb1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,8 +23,8 @@ "@rushstack/eslint-patch": "^1.10.2", "@vitejs/plugin-vue": "^5.0.4", "@vue/eslint-config-prettier": "^9.0.0", - "eslint": "^9.1.1", - "eslint-plugin-vue": "^9.25.0", + "eslint": "^8.5.0", + "eslint-plugin-vue": "^8.2.0", "prettier": "^3.2.5", "vite": "^5.2.10" } @@ -2116,15 +2116,15 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.0.2.tgz", - "integrity": "sha512-wV19ZEGEMAC1eHgrS7UQPqsdEiCIbTKTasEfcXAigzoXICcqZSjBZEHlZwNVvKg6UBCjSlos84XiLqsRJnIcIg==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", + "espree": "^9.6.0", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -2132,28 +2132,28 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/@eslint/js": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.1.1.tgz", - "integrity": "sha512-5WoDz3Y19Bg2BnErkZTp0en+c/i9PvgFS7MBe1+m60HjFr0hrphlAGp4yzI7pxpt4xShln4ZyYp4neJm8hmOkQ==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", + "@humanwhocodes/object-schema": "^2.0.2", "debug": "^4.3.1", "minimatch": "^3.0.5" }, @@ -2180,19 +2180,6 @@ "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "dev": true }, - "node_modules/@humanwhocodes/retry": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.2.3.tgz", - "integrity": "sha512-X38nUbachlb01YMlvPFojKoiXq+LzZvuSce70KPMPdeM1Rj03k4dR7lDslhbqXn3Ang4EU3+EAmwEAsbrjHW3g==", - "dev": true, - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, "node_modules/@img/sharp-darwin-arm64": { "version": "0.33.3", "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.3.tgz", @@ -3070,6 +3057,12 @@ "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==" }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "node_modules/@vitejs/plugin-vue": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.4.tgz", @@ -3994,6 +3987,18 @@ "node": ">=8" } }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/ejs": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", @@ -4221,37 +4226,41 @@ } }, "node_modules/eslint": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.1.1.tgz", - "integrity": "sha512-b4cRQ0BeZcSEzPpY2PjFY70VbO32K7BStTGtBsnIGdTSEEQzBi8hPBcGQmTG2zUvFr9uLe0TK42bw8YszuHEqg==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^3.0.2", - "@eslint/js": "9.1.1", - "@humanwhocodes/config-array": "^0.13.0", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.2.3", "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", + "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.0.1", - "eslint-visitor-keys": "^4.0.0", - "espree": "^10.0.1", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", + "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", @@ -4265,7 +4274,7 @@ "eslint": "bin/eslint.js" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -4314,58 +4323,68 @@ } }, "node_modules/eslint-plugin-vue": { - "version": "9.25.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.25.0.tgz", - "integrity": "sha512-tDWlx14bVe6Bs+Nnh3IGrD+hb11kf2nukfm6jLsmJIhmiRQ1SUaksvwY9U5MvPB0pcrg0QK0xapQkfITs3RKOA==", + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.7.1.tgz", + "integrity": "sha512-28sbtm4l4cOzoO1LtzQPxfxhQABararUb1JtqusQqObJpWX2e/gmVyeYVfepizPFne0Q5cILkYGiBoV36L12Wg==", "dev": true, "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "globals": "^13.24.0", + "eslint-utils": "^3.0.0", "natural-compare": "^1.4.0", - "nth-check": "^2.1.1", - "postcss-selector-parser": "^6.0.15", - "semver": "^7.6.0", - "vue-eslint-parser": "^9.4.2", - "xml-name-validator": "^4.0.0" + "nth-check": "^2.0.1", + "postcss-selector-parser": "^6.0.9", + "semver": "^7.3.5", + "vue-eslint-parser": "^8.0.1" }, "engines": { - "node": "^14.17.0 || >=16.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "peerDependencies": { - "eslint": "^6.2.0 || ^7.0.0 || ^8.0.0 || ^9.0.0" - } - }, - "node_modules/eslint-plugin-vue/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "eslint": "^6.2.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/eslint-scope": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.1.tgz", - "integrity": "sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og==", + "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": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", @@ -4378,42 +4397,18 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", - "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/espree": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.0.1.tgz", - "integrity": "sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "dependencies": { - "acorn": "^8.11.3", + "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.0.0" + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", - "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -4532,15 +4527,15 @@ } }, "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "dependencies": { - "flat-cache": "^4.0.0" + "flat-cache": "^3.0.4" }, "engines": { - "node": ">=16.0.0" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/filelist": { @@ -4598,16 +4593,17 @@ } }, "node_modules/flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.4" + "keyv": "^4.5.3", + "rimraf": "^3.0.2" }, "engines": { - "node": ">=16" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/flatted": { @@ -4775,12 +4771,15 @@ "peer": true }, "node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, "engines": { - "node": ">=18" + "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -4816,6 +4815,12 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "node_modules/has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", @@ -6127,6 +6132,21 @@ "node": ">=0.10.0" } }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/rollup": { "version": "4.17.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.17.1.tgz", @@ -7098,21 +7118,21 @@ } }, "node_modules/vue-eslint-parser": { - "version": "9.4.2", - "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.4.2.tgz", - "integrity": "sha512-Ry9oiGmCAK91HrKMtCrKFWmSFWvYkpGglCeFAIqDdr9zdXmMMpJOmUJS7WWsW7fX81h6mwHmUZCQQ1E0PkSwYQ==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz", + "integrity": "sha512-dzHGG3+sYwSf6zFBa0Gi9ZDshD7+ad14DGOdTLjruRVgZXe2J+DcZ9iUhyR48z5g1PqRa20yt3Njna/veLJL/g==", "dev": true, "dependencies": { - "debug": "^4.3.4", - "eslint-scope": "^7.1.1", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.1", + "debug": "^4.3.2", + "eslint-scope": "^7.0.0", + "eslint-visitor-keys": "^3.1.0", + "espree": "^9.0.0", "esquery": "^1.4.0", "lodash": "^4.17.21", - "semver": "^7.3.6" + "semver": "^7.3.5" }, "engines": { - "node": "^14.17.0 || >=16.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/mysticatea" @@ -7121,39 +7141,6 @@ "eslint": ">=6.0.0" } }, - "node_modules/vue-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/vue-eslint-parser/node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/vue-router": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.3.2.tgz", @@ -7656,15 +7643,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, - "node_modules/xml-name-validator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", - "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", diff --git a/package.json b/package.json index 82f0274..a9269d1 100644 --- a/package.json +++ b/package.json @@ -25,8 +25,8 @@ "@rushstack/eslint-patch": "^1.10.2", "@vitejs/plugin-vue": "^5.0.4", "@vue/eslint-config-prettier": "^9.0.0", - "eslint": "^9.1.1", - "eslint-plugin-vue": "^9.25.0", + "eslint": "^8.5.0", + "eslint-plugin-vue": "^8.2.0", "prettier": "^3.2.5", "vite": "^5.2.10" } diff --git a/public/images/pwa-icon-256.png b/public/images/pwa-icon-256.png new file mode 100644 index 0000000..5ae8ad7 Binary files /dev/null and b/public/images/pwa-icon-256.png differ diff --git a/public/images/pwa-icon-512.png b/public/images/pwa-icon-512.png new file mode 100644 index 0000000..0c7d489 Binary files /dev/null and b/public/images/pwa-icon-512.png differ diff --git a/scripts/fetchData.js b/scripts/fetchData.js index 8167f9e..b4f3cef 100644 --- a/scripts/fetchData.js +++ b/scripts/fetchData.js @@ -69,7 +69,7 @@ async function fetchScoresData() { await streamPipeline( response.body, thumbnail, - createWriteStream(`${folder}/${uuid_score}.webp`) + createWriteStream(`${folder}/${uuid_score}.webp`), ); } catch (err) { console.log(err); diff --git a/src/components/Question.vue b/src/components/Question.vue index a7690d3..57c7d5b 100644 --- a/src/components/Question.vue +++ b/src/components/Question.vue @@ -17,7 +17,7 @@ const answerWeight = ref(props.question.weight); function selectAnswer(answer) { const answerIndex = props.question.answers.findIndex( - (a) => a.id === answer.id + (a) => a.id === answer.id, ); slides.value.splide.go(answerIndex); } @@ -48,8 +48,10 @@ function validatePopup() { } }); const answer = document.querySelector( - "input[id=" + `question_${props.question.id}_answer_${answerIndex.id}` + "]" - ) + "input[id=" + + `question_${props.question.id}_answer_${answerIndex.id}` + + "]", + ); answer.checked = true; answer.dispatchEvent(new Event("change")); showHidePopup(); diff --git a/src/components/Score.vue b/src/components/Score.vue index c552bef..4ea3473 100644 --- a/src/components/Score.vue +++ b/src/components/Score.vue @@ -29,7 +29,7 @@ function formatAnswers(answers) { .map((answer) => answer.answers_id) .map((answer) => { const translation = answer.translations.filter( - (item) => item.languages_code == language + (item) => item.languages_code == language, ); return { id: answer.id, @@ -45,7 +45,7 @@ function formatScore(score) { .map((question) => question.questions_id) .map((question) => { const translation = question.translations.filter( - (item) => item.languages_code == language + (item) => item.languages_code == language, ); const answers = formatAnswers(question.answers); return { @@ -72,14 +72,14 @@ const scoreSum = computed(() => { .reduce((value, currentValue) => value + currentValue, 0); }); const displayScoreResult = computed( - () => !questions.value.filter((q) => q.weight == null).length + () => !questions.value.filter((q) => q.weight == null).length, ); function getResultsFromScore(score) { return score.results .map((result) => result.results_id) .map((result) => { const translation = result.translations.filter( - (item) => item.languages_code == language + (item) => item.languages_code == language, ); return { id: result.id, @@ -100,12 +100,12 @@ const result = computed(() => ? results.value .filter((r) => !r.min || r.min <= scoreSum.value) .filter((r) => !r.max || r.max >= scoreSum.value)[0] - : null + : null, ); function goQuestionSlide(question) { console.log(slides.value); slides.value.go( - questions.value.findIndex((element) => element.id === question.id) + questions.value.findIndex((element) => element.id === question.id), ); } function answerSelected(question, answerWeight) { @@ -134,7 +134,7 @@ const saveAs = (blob, fileName) => { view: window, bubbles: true, cancelable: true, - }) + }), ); } URL.revokeObjectURL(elem.href); @@ -147,7 +147,7 @@ async function share() { const filter = (node) => { const exclusionClasses = ["btn"]; return !exclusionClasses.some((classname) => - node.classList?.contains(classname) + node.classList?.contains(classname), ); }; const body = document.querySelector("body"); @@ -210,7 +210,7 @@ async function share() { {{ question.title }} : {{ question.answers.find( - (answer) => answer.weight === question.weight + (answer) => answer.weight === question.weight, ).title }} diff --git a/src/components/ScoreHeader.vue b/src/components/ScoreHeader.vue index 188f36d..19002dd 100644 --- a/src/components/ScoreHeader.vue +++ b/src/components/ScoreHeader.vue @@ -13,22 +13,80 @@ defineProps({ - - - - - - - - + + + + + + + + {{ title }} - - - - + + + + diff --git a/src/components/ScoresList.vue b/src/components/ScoresList.vue index 9ef1f94..6d9fe46 100644 --- a/src/components/ScoresList.vue +++ b/src/components/ScoresList.vue @@ -8,7 +8,7 @@ const translationKey = "languages_id"; const scores = data.filter((score) => { return ( !!score.translations.find( - (translation) => translation[translationKey] == store.language + (translation) => translation[translationKey] == store.language, ) && score.results.length && score.questions.length @@ -27,14 +27,82 @@ function getTranslation(translations, key) { @click="store.switchTheme" title="Thème de votre système" > - - - - - - - + + + + + + + - - - + + - - - - - - - - - - + + + + + + + + + + @@ -128,13 +248,13 @@ function getTranslation(translations, key) { + + Scores & Appli par Ceiba + + + Scores & App by Ceiba + +
+ Scores & Appli par Ceiba +
+ Scores & App by Ceiba +