fixed lint validation, chores, lint, safe lib updates

This commit is contained in:
bniwredyc 2023-05-10 01:15:26 +02:00
parent 5160e00bda
commit 9a1862b575
25 changed files with 208 additions and 319 deletions

21
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,21 @@
---
stages:
- deploy
deploy:
image:
name: alpine/git
entrypoint: [""]
stage: deploy
environment:
name: production
url: https://new.discours.io
only:
- main
script:
- mkdir ~/.ssh
- echo "${HOST_KEY}" > ~/.ssh/known_hosts
- echo "${SSH_PRIVATE_KEY}" > ~/.ssh/id_rsa
- chmod 0400 ~/.ssh/id_rsa
- git remote add github git@github.com:Discours/discoursio-webapp.git
- git push github HEAD:main

206
package-lock.json generated
View File

@ -66,10 +66,10 @@
"@tiptap/extension-underline": "2.0.3", "@tiptap/extension-underline": "2.0.3",
"@tiptap/extension-youtube": "2.0.3", "@tiptap/extension-youtube": "2.0.3",
"@types/express": "4.17.17", "@types/express": "4.17.17",
"@types/node": "20.1.0", "@types/node": "20.1.1",
"@types/uuid": "9.0.1", "@types/uuid": "9.0.1",
"@typescript-eslint/eslint-plugin": "5.59.2", "@typescript-eslint/eslint-plugin": "5.59.5",
"@typescript-eslint/parser": "5.59.2", "@typescript-eslint/parser": "5.59.5",
"@urql/core": "3.2.2", "@urql/core": "3.2.2",
"@urql/devtools": "2.0.3", "@urql/devtools": "2.0.3",
"@urql/exchange-graphcache": "5.2.0", "@urql/exchange-graphcache": "5.2.0",
@ -126,7 +126,7 @@
"prosemirror-schema-list": "1.2.2", "prosemirror-schema-list": "1.2.2",
"prosemirror-state": "1.4.2", "prosemirror-state": "1.4.2",
"prosemirror-view": "1.30.2", "prosemirror-view": "1.30.2",
"rollup": "3.21.5", "rollup": "3.21.6",
"rollup-plugin-visualizer": "5.9.0", "rollup-plugin-visualizer": "5.9.0",
"sass": "1.62.1", "sass": "1.62.1",
"solid-js": "1.7.5", "solid-js": "1.7.5",
@ -145,7 +145,7 @@
"unique-names-generator": "4.7.1", "unique-names-generator": "4.7.1",
"uuid": "9.0.0", "uuid": "9.0.0",
"vite": "4.3.5", "vite": "4.3.5",
"vite-plugin-sass-dts": "1.3.4", "vite-plugin-sass-dts": "1.3.5",
"vite-plugin-solid": "2.7.0", "vite-plugin-solid": "2.7.0",
"vite-plugin-ssr": "0.4.123", "vite-plugin-ssr": "0.4.123",
"wonka": "6.3.1", "wonka": "6.3.1",
@ -6406,9 +6406,9 @@
"dev": true "dev": true
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.1.0", "version": "20.1.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.0.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.1.tgz",
"integrity": "sha512-O+z53uwx64xY7D6roOi4+jApDGFg0qn6WHcxe5QeqjMaTezBO/mxdfFXIVAVVyNWKx84OmPB3L8kbVYOTeN34A==", "integrity": "sha512-uKBEevTNb+l6/aCQaKVnUModfEMjAl98lw2Si9P5y4hLu9tm6AlX2ZIoXZX6Wh9lJueYPrGPKk5WMCNHg/u6/A==",
"dev": true "dev": true
}, },
"node_modules/@types/normalize-package-data": { "node_modules/@types/normalize-package-data": {
@ -6521,15 +6521,15 @@
"dev": true "dev": true
}, },
"node_modules/@typescript-eslint/eslint-plugin": { "node_modules/@typescript-eslint/eslint-plugin": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.5.tgz",
"integrity": "sha512-yVrXupeHjRxLDcPKL10sGQ/QlVrA8J5IYOEWVqk0lJaSZP7X5DfnP7Ns3cc74/blmbipQ1htFNVGsHX6wsYm0A==", "integrity": "sha512-feA9xbVRWJZor+AnLNAr7A8JRWeZqHUf4T9tlP+TN04b05pFVhO5eN7/O93Y/1OUlLMHKbnJisgDURs/qvtqdg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/regexpp": "^4.4.0", "@eslint-community/regexpp": "^4.4.0",
"@typescript-eslint/scope-manager": "5.59.2", "@typescript-eslint/scope-manager": "5.59.5",
"@typescript-eslint/type-utils": "5.59.2", "@typescript-eslint/type-utils": "5.59.5",
"@typescript-eslint/utils": "5.59.2", "@typescript-eslint/utils": "5.59.5",
"debug": "^4.3.4", "debug": "^4.3.4",
"grapheme-splitter": "^1.0.4", "grapheme-splitter": "^1.0.4",
"ignore": "^5.2.0", "ignore": "^5.2.0",
@ -6588,14 +6588,14 @@
"dev": true "dev": true
}, },
"node_modules/@typescript-eslint/parser": { "node_modules/@typescript-eslint/parser": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.5.tgz",
"integrity": "sha512-uq0sKyw6ao1iFOZZGk9F8Nro/8+gfB5ezl1cA06SrqbgJAt0SRoFhb9pXaHvkrxUpZaoLxt8KlovHNk8Gp6/HQ==", "integrity": "sha512-NJXQC4MRnF9N9yWqQE2/KLRSOLvrrlZb48NGVfBa+RuPMN6B7ZcK5jZOvhuygv4D64fRKnZI4L4p8+M+rfeQuw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/scope-manager": "5.59.2", "@typescript-eslint/scope-manager": "5.59.5",
"@typescript-eslint/types": "5.59.2", "@typescript-eslint/types": "5.59.5",
"@typescript-eslint/typescript-estree": "5.59.2", "@typescript-eslint/typescript-estree": "5.59.5",
"debug": "^4.3.4" "debug": "^4.3.4"
}, },
"engines": { "engines": {
@ -6615,13 +6615,13 @@
} }
}, },
"node_modules/@typescript-eslint/scope-manager": { "node_modules/@typescript-eslint/scope-manager": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.5.tgz",
"integrity": "sha512-dB1v7ROySwQWKqQ8rEWcdbTsFjh2G0vn8KUyvTXdPoyzSL6lLGkiXEV5CvpJsEe9xIdKV+8Zqb7wif2issoOFA==", "integrity": "sha512-jVecWwnkX6ZgutF+DovbBJirZcAxgxC0EOHYt/niMROf8p4PwxxG32Qdhj/iIQQIuOflLjNkxoXyArkcIP7C3A==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "5.59.2", "@typescript-eslint/types": "5.59.5",
"@typescript-eslint/visitor-keys": "5.59.2" "@typescript-eslint/visitor-keys": "5.59.5"
}, },
"engines": { "engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0" "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@ -6632,13 +6632,13 @@
} }
}, },
"node_modules/@typescript-eslint/type-utils": { "node_modules/@typescript-eslint/type-utils": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.5.tgz",
"integrity": "sha512-b1LS2phBOsEy/T381bxkkywfQXkV1dWda/z0PhnIy3bC5+rQWQDS7fk9CSpcXBccPY27Z6vBEuaPBCKCgYezyQ==", "integrity": "sha512-4eyhS7oGym67/pSxA2mmNq7X164oqDYNnZCUayBwJZIRVvKpBCMBzFnFxjeoDeShjtO6RQBHBuwybuX3POnDqg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/typescript-estree": "5.59.2", "@typescript-eslint/typescript-estree": "5.59.5",
"@typescript-eslint/utils": "5.59.2", "@typescript-eslint/utils": "5.59.5",
"debug": "^4.3.4", "debug": "^4.3.4",
"tsutils": "^3.21.0" "tsutils": "^3.21.0"
}, },
@ -6659,9 +6659,9 @@
} }
}, },
"node_modules/@typescript-eslint/types": { "node_modules/@typescript-eslint/types": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.5.tgz",
"integrity": "sha512-LbJ/HqoVs2XTGq5shkiKaNTuVv5tTejdHgfdjqRUGdYhjW1crm/M7og2jhVskMt8/4wS3T1+PfFvL1K3wqYj4w==", "integrity": "sha512-xkfRPHbqSH4Ggx4eHRIO/eGL8XL4Ysb4woL8c87YuAo8Md7AUjyWKa9YMwTL519SyDPrfEgKdewjkxNCVeJW7w==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0" "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@ -6672,13 +6672,13 @@
} }
}, },
"node_modules/@typescript-eslint/typescript-estree": { "node_modules/@typescript-eslint/typescript-estree": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.5.tgz",
"integrity": "sha512-+j4SmbwVmZsQ9jEyBMgpuBD0rKwi9RxRpjX71Brr73RsYnEr3Lt5QZ624Bxphp8HUkSKfqGnPJp1kA5nl0Sh7Q==", "integrity": "sha512-+XXdLN2CZLZcD/mO7mQtJMvCkzRfmODbeSKuMY/yXbGkzvA9rJyDY5qDYNoiz2kP/dmyAxXquL2BvLQLJFPQIg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "5.59.2", "@typescript-eslint/types": "5.59.5",
"@typescript-eslint/visitor-keys": "5.59.2", "@typescript-eslint/visitor-keys": "5.59.5",
"debug": "^4.3.4", "debug": "^4.3.4",
"globby": "^11.1.0", "globby": "^11.1.0",
"is-glob": "^4.0.3", "is-glob": "^4.0.3",
@ -6732,17 +6732,17 @@
"dev": true "dev": true
}, },
"node_modules/@typescript-eslint/utils": { "node_modules/@typescript-eslint/utils": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.5.tgz",
"integrity": "sha512-kSuF6/77TZzyGPhGO4uVp+f0SBoYxCDf+lW3GKhtKru/L8k/Hd7NFQxyWUeY7Z/KGB2C6Fe3yf2vVi4V9TsCSQ==", "integrity": "sha512-sCEHOiw+RbyTii9c3/qN74hYDPNORb8yWCoPLmB7BIflhplJ65u2PBpdRla12e3SSTJ2erRkPjz7ngLHhUegxA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/eslint-utils": "^4.2.0",
"@types/json-schema": "^7.0.9", "@types/json-schema": "^7.0.9",
"@types/semver": "^7.3.12", "@types/semver": "^7.3.12",
"@typescript-eslint/scope-manager": "5.59.2", "@typescript-eslint/scope-manager": "5.59.5",
"@typescript-eslint/types": "5.59.2", "@typescript-eslint/types": "5.59.5",
"@typescript-eslint/typescript-estree": "5.59.2", "@typescript-eslint/typescript-estree": "5.59.5",
"eslint-scope": "^5.1.1", "eslint-scope": "^5.1.1",
"semver": "^7.3.7" "semver": "^7.3.7"
}, },
@ -6791,12 +6791,12 @@
"dev": true "dev": true
}, },
"node_modules/@typescript-eslint/visitor-keys": { "node_modules/@typescript-eslint/visitor-keys": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.5.tgz",
"integrity": "sha512-EEpsO8m3RASrKAHI9jpavNv9NlEUebV4qmF1OWxSTtKSFBpC1NCmWazDQHFivRf0O1DV11BA645yrLEVQ0/Lig==", "integrity": "sha512-qL+Oz+dbeBRTeyJTIy0eniD3uvqU7x+y1QceBismZ41hd4aBSRh8UAw4pZP0+XzLuPZmx4raNMq/I+59W2lXKA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "5.59.2", "@typescript-eslint/types": "5.59.5",
"eslint-visitor-keys": "^3.3.0" "eslint-visitor-keys": "^3.3.0"
}, },
"engines": { "engines": {
@ -17894,9 +17894,9 @@
} }
}, },
"node_modules/rollup": { "node_modules/rollup": {
"version": "3.21.5", "version": "3.21.6",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.21.5.tgz", "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.21.6.tgz",
"integrity": "sha512-a4NTKS4u9PusbUJcfF4IMxuqjFzjm6ifj76P54a7cKnvVzJaG12BLVR+hgU2YDGHzyMMQNxLAZWuALsn8q2oQg==", "integrity": "sha512-SXIICxvxQxR3D4dp/3LDHZIJPC8a4anKMHd4E3Jiz2/JnY+2bEjqrOokAauc5ShGVNFHlEFjBXAXlaxkJqIqSg==",
"dev": true, "dev": true,
"bin": { "bin": {
"rollup": "dist/bin/rollup" "rollup": "dist/bin/rollup"
@ -19907,9 +19907,9 @@
} }
}, },
"node_modules/vite-plugin-sass-dts": { "node_modules/vite-plugin-sass-dts": {
"version": "1.3.4", "version": "1.3.5",
"resolved": "https://registry.npmjs.org/vite-plugin-sass-dts/-/vite-plugin-sass-dts-1.3.4.tgz", "resolved": "https://registry.npmjs.org/vite-plugin-sass-dts/-/vite-plugin-sass-dts-1.3.5.tgz",
"integrity": "sha512-wwyI6mRahYEX71CXOOo3f1dRcb70qUmcppvrhJ3elSypxHcmU4qbN9RTZIwCrA6155Pz4Beh/t1yuPt6M0yr/g==", "integrity": "sha512-yGm5uRTDq1qc17ZMJV0bQRgxNfw2a/Ejqc/T2NOILXmcR1z9zHpqqo1FwoDddyTV87GDQZYldqKZOE4O5bGBOw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"postcss-js": "^4.0.1" "postcss-js": "^4.0.1"
@ -25287,9 +25287,9 @@
"dev": true "dev": true
}, },
"@types/node": { "@types/node": {
"version": "20.1.0", "version": "20.1.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.0.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.1.tgz",
"integrity": "sha512-O+z53uwx64xY7D6roOi4+jApDGFg0qn6WHcxe5QeqjMaTezBO/mxdfFXIVAVVyNWKx84OmPB3L8kbVYOTeN34A==", "integrity": "sha512-uKBEevTNb+l6/aCQaKVnUModfEMjAl98lw2Si9P5y4hLu9tm6AlX2ZIoXZX6Wh9lJueYPrGPKk5WMCNHg/u6/A==",
"dev": true "dev": true
}, },
"@types/normalize-package-data": { "@types/normalize-package-data": {
@ -25402,15 +25402,15 @@
"dev": true "dev": true
}, },
"@typescript-eslint/eslint-plugin": { "@typescript-eslint/eslint-plugin": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.5.tgz",
"integrity": "sha512-yVrXupeHjRxLDcPKL10sGQ/QlVrA8J5IYOEWVqk0lJaSZP7X5DfnP7Ns3cc74/blmbipQ1htFNVGsHX6wsYm0A==", "integrity": "sha512-feA9xbVRWJZor+AnLNAr7A8JRWeZqHUf4T9tlP+TN04b05pFVhO5eN7/O93Y/1OUlLMHKbnJisgDURs/qvtqdg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@eslint-community/regexpp": "^4.4.0", "@eslint-community/regexpp": "^4.4.0",
"@typescript-eslint/scope-manager": "5.59.2", "@typescript-eslint/scope-manager": "5.59.5",
"@typescript-eslint/type-utils": "5.59.2", "@typescript-eslint/type-utils": "5.59.5",
"@typescript-eslint/utils": "5.59.2", "@typescript-eslint/utils": "5.59.5",
"debug": "^4.3.4", "debug": "^4.3.4",
"grapheme-splitter": "^1.0.4", "grapheme-splitter": "^1.0.4",
"ignore": "^5.2.0", "ignore": "^5.2.0",
@ -25446,53 +25446,53 @@
} }
}, },
"@typescript-eslint/parser": { "@typescript-eslint/parser": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.5.tgz",
"integrity": "sha512-uq0sKyw6ao1iFOZZGk9F8Nro/8+gfB5ezl1cA06SrqbgJAt0SRoFhb9pXaHvkrxUpZaoLxt8KlovHNk8Gp6/HQ==", "integrity": "sha512-NJXQC4MRnF9N9yWqQE2/KLRSOLvrrlZb48NGVfBa+RuPMN6B7ZcK5jZOvhuygv4D64fRKnZI4L4p8+M+rfeQuw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/scope-manager": "5.59.2", "@typescript-eslint/scope-manager": "5.59.5",
"@typescript-eslint/types": "5.59.2", "@typescript-eslint/types": "5.59.5",
"@typescript-eslint/typescript-estree": "5.59.2", "@typescript-eslint/typescript-estree": "5.59.5",
"debug": "^4.3.4" "debug": "^4.3.4"
} }
}, },
"@typescript-eslint/scope-manager": { "@typescript-eslint/scope-manager": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.5.tgz",
"integrity": "sha512-dB1v7ROySwQWKqQ8rEWcdbTsFjh2G0vn8KUyvTXdPoyzSL6lLGkiXEV5CvpJsEe9xIdKV+8Zqb7wif2issoOFA==", "integrity": "sha512-jVecWwnkX6ZgutF+DovbBJirZcAxgxC0EOHYt/niMROf8p4PwxxG32Qdhj/iIQQIuOflLjNkxoXyArkcIP7C3A==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/types": "5.59.2", "@typescript-eslint/types": "5.59.5",
"@typescript-eslint/visitor-keys": "5.59.2" "@typescript-eslint/visitor-keys": "5.59.5"
} }
}, },
"@typescript-eslint/type-utils": { "@typescript-eslint/type-utils": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.5.tgz",
"integrity": "sha512-b1LS2phBOsEy/T381bxkkywfQXkV1dWda/z0PhnIy3bC5+rQWQDS7fk9CSpcXBccPY27Z6vBEuaPBCKCgYezyQ==", "integrity": "sha512-4eyhS7oGym67/pSxA2mmNq7X164oqDYNnZCUayBwJZIRVvKpBCMBzFnFxjeoDeShjtO6RQBHBuwybuX3POnDqg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/typescript-estree": "5.59.2", "@typescript-eslint/typescript-estree": "5.59.5",
"@typescript-eslint/utils": "5.59.2", "@typescript-eslint/utils": "5.59.5",
"debug": "^4.3.4", "debug": "^4.3.4",
"tsutils": "^3.21.0" "tsutils": "^3.21.0"
} }
}, },
"@typescript-eslint/types": { "@typescript-eslint/types": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.5.tgz",
"integrity": "sha512-LbJ/HqoVs2XTGq5shkiKaNTuVv5tTejdHgfdjqRUGdYhjW1crm/M7og2jhVskMt8/4wS3T1+PfFvL1K3wqYj4w==", "integrity": "sha512-xkfRPHbqSH4Ggx4eHRIO/eGL8XL4Ysb4woL8c87YuAo8Md7AUjyWKa9YMwTL519SyDPrfEgKdewjkxNCVeJW7w==",
"dev": true "dev": true
}, },
"@typescript-eslint/typescript-estree": { "@typescript-eslint/typescript-estree": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.5.tgz",
"integrity": "sha512-+j4SmbwVmZsQ9jEyBMgpuBD0rKwi9RxRpjX71Brr73RsYnEr3Lt5QZ624Bxphp8HUkSKfqGnPJp1kA5nl0Sh7Q==", "integrity": "sha512-+XXdLN2CZLZcD/mO7mQtJMvCkzRfmODbeSKuMY/yXbGkzvA9rJyDY5qDYNoiz2kP/dmyAxXquL2BvLQLJFPQIg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/types": "5.59.2", "@typescript-eslint/types": "5.59.5",
"@typescript-eslint/visitor-keys": "5.59.2", "@typescript-eslint/visitor-keys": "5.59.5",
"debug": "^4.3.4", "debug": "^4.3.4",
"globby": "^11.1.0", "globby": "^11.1.0",
"is-glob": "^4.0.3", "is-glob": "^4.0.3",
@ -25527,17 +25527,17 @@
} }
}, },
"@typescript-eslint/utils": { "@typescript-eslint/utils": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.5.tgz",
"integrity": "sha512-kSuF6/77TZzyGPhGO4uVp+f0SBoYxCDf+lW3GKhtKru/L8k/Hd7NFQxyWUeY7Z/KGB2C6Fe3yf2vVi4V9TsCSQ==", "integrity": "sha512-sCEHOiw+RbyTii9c3/qN74hYDPNORb8yWCoPLmB7BIflhplJ65u2PBpdRla12e3SSTJ2erRkPjz7ngLHhUegxA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/eslint-utils": "^4.2.0",
"@types/json-schema": "^7.0.9", "@types/json-schema": "^7.0.9",
"@types/semver": "^7.3.12", "@types/semver": "^7.3.12",
"@typescript-eslint/scope-manager": "5.59.2", "@typescript-eslint/scope-manager": "5.59.5",
"@typescript-eslint/types": "5.59.2", "@typescript-eslint/types": "5.59.5",
"@typescript-eslint/typescript-estree": "5.59.2", "@typescript-eslint/typescript-estree": "5.59.5",
"eslint-scope": "^5.1.1", "eslint-scope": "^5.1.1",
"semver": "^7.3.7" "semver": "^7.3.7"
}, },
@ -25569,12 +25569,12 @@
} }
}, },
"@typescript-eslint/visitor-keys": { "@typescript-eslint/visitor-keys": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.5.tgz",
"integrity": "sha512-EEpsO8m3RASrKAHI9jpavNv9NlEUebV4qmF1OWxSTtKSFBpC1NCmWazDQHFivRf0O1DV11BA645yrLEVQ0/Lig==", "integrity": "sha512-qL+Oz+dbeBRTeyJTIy0eniD3uvqU7x+y1QceBismZ41hd4aBSRh8UAw4pZP0+XzLuPZmx4raNMq/I+59W2lXKA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/types": "5.59.2", "@typescript-eslint/types": "5.59.5",
"eslint-visitor-keys": "^3.3.0" "eslint-visitor-keys": "^3.3.0"
} }
}, },
@ -33810,9 +33810,9 @@
} }
}, },
"rollup": { "rollup": {
"version": "3.21.5", "version": "3.21.6",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.21.5.tgz", "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.21.6.tgz",
"integrity": "sha512-a4NTKS4u9PusbUJcfF4IMxuqjFzjm6ifj76P54a7cKnvVzJaG12BLVR+hgU2YDGHzyMMQNxLAZWuALsn8q2oQg==", "integrity": "sha512-SXIICxvxQxR3D4dp/3LDHZIJPC8a4anKMHd4E3Jiz2/JnY+2bEjqrOokAauc5ShGVNFHlEFjBXAXlaxkJqIqSg==",
"dev": true, "dev": true,
"requires": { "requires": {
"fsevents": "~2.3.2" "fsevents": "~2.3.2"
@ -35292,9 +35292,9 @@
} }
}, },
"vite-plugin-sass-dts": { "vite-plugin-sass-dts": {
"version": "1.3.4", "version": "1.3.5",
"resolved": "https://registry.npmjs.org/vite-plugin-sass-dts/-/vite-plugin-sass-dts-1.3.4.tgz", "resolved": "https://registry.npmjs.org/vite-plugin-sass-dts/-/vite-plugin-sass-dts-1.3.5.tgz",
"integrity": "sha512-wwyI6mRahYEX71CXOOo3f1dRcb70qUmcppvrhJ3elSypxHcmU4qbN9RTZIwCrA6155Pz4Beh/t1yuPt6M0yr/g==", "integrity": "sha512-yGm5uRTDq1qc17ZMJV0bQRgxNfw2a/Ejqc/T2NOILXmcR1z9zHpqqo1FwoDddyTV87GDQZYldqKZOE4O5bGBOw==",
"dev": true, "dev": true,
"requires": { "requires": {
"postcss-js": "^4.0.1" "postcss-js": "^4.0.1"

View File

@ -86,10 +86,10 @@
"@tiptap/extension-underline": "2.0.3", "@tiptap/extension-underline": "2.0.3",
"@tiptap/extension-youtube": "2.0.3", "@tiptap/extension-youtube": "2.0.3",
"@types/express": "4.17.17", "@types/express": "4.17.17",
"@types/node": "20.1.0", "@types/node": "20.1.1",
"@types/uuid": "9.0.1", "@types/uuid": "9.0.1",
"@typescript-eslint/eslint-plugin": "5.59.2", "@typescript-eslint/eslint-plugin": "5.59.5",
"@typescript-eslint/parser": "5.59.2", "@typescript-eslint/parser": "5.59.5",
"@urql/core": "3.2.2", "@urql/core": "3.2.2",
"@urql/devtools": "2.0.3", "@urql/devtools": "2.0.3",
"@urql/exchange-graphcache": "5.2.0", "@urql/exchange-graphcache": "5.2.0",
@ -146,7 +146,7 @@
"prosemirror-schema-list": "1.2.2", "prosemirror-schema-list": "1.2.2",
"prosemirror-state": "1.4.2", "prosemirror-state": "1.4.2",
"prosemirror-view": "1.30.2", "prosemirror-view": "1.30.2",
"rollup": "3.21.5", "rollup": "3.21.6",
"rollup-plugin-visualizer": "5.9.0", "rollup-plugin-visualizer": "5.9.0",
"sass": "1.62.1", "sass": "1.62.1",
"solid-js": "1.7.5", "solid-js": "1.7.5",
@ -165,7 +165,7 @@
"unique-names-generator": "4.7.1", "unique-names-generator": "4.7.1",
"uuid": "9.0.0", "uuid": "9.0.0",
"vite": "4.3.5", "vite": "4.3.5",
"vite-plugin-sass-dts": "1.3.4", "vite-plugin-sass-dts": "1.3.5",
"vite-plugin-solid": "2.7.0", "vite-plugin-solid": "2.7.0",
"vite-plugin-ssr": "0.4.123", "vite-plugin-ssr": "0.4.123",
"wonka": "6.3.1", "wonka": "6.3.1",

View File

@ -102,7 +102,7 @@
"Independant magazine with an open horizontal cooperation about culture, science and society": "Independant magazine with an open horizontal cooperation about culture, science and society", "Independant magazine with an open horizontal cooperation about culture, science and society": "Independant magazine with an open horizontal cooperation about culture, science and society",
"Introduce": "Introduction", "Introduce": "Introduction",
"Invalid email": "Check if your email is correct", "Invalid email": "Check if your email is correct",
"Invalid image link": "Invalid image link", "Invalid image URL": "Invalid image URL",
"Invalid url format": "Invalid url format", "Invalid url format": "Invalid url format",
"Invite co-authors": "Invite co-authors", "Invite co-authors": "Invite co-authors",
"Invite to collab": "Invite to Collab", "Invite to collab": "Invite to Collab",

View File

@ -107,7 +107,7 @@
"Independant magazine with an open horizontal cooperation about culture, science and society": "Независимый журнал с открытой горизонтальной редакцией о культуре, науке и обществе", "Independant magazine with an open horizontal cooperation about culture, science and society": "Независимый журнал с открытой горизонтальной редакцией о культуре, науке и обществе",
"Introduce": "Представление", "Introduce": "Представление",
"Invalid email": "Проверьте правильность ввода почты", "Invalid email": "Проверьте правильность ввода почты",
"Invalid image link": "Некорректная ссылка на изображение", "Invalid image URL": "Некорректная ссылка на изображение",
"Invalid url format": "Неверный формат ссылки", "Invalid url format": "Неверный формат ссылки",
"Invite co-authors": "Пригласить соавторов", "Invite co-authors": "Пригласить соавторов",
"Invite experts": "Пригласить экспертов", "Invite experts": "Пригласить экспертов",

View File

@ -5,9 +5,8 @@ import { Icon } from '../_shared/Icon'
import { formatDate } from '../../utils' import { formatDate } from '../../utils'
import formatDateTime from '../../utils/formatDateTime' import formatDateTime from '../../utils/formatDateTime'
import { useLocalize } from '../../context/localize' import { useLocalize } from '../../context/localize'
import { getPagePath, openPage } from '@nanostores/router' import { getPagePath } from '@nanostores/router'
import { router } from '../../stores/router' import { router } from '../../stores/router'
import { useEditorContext } from '../../context/editor'
type Props = { type Props = {
class?: string class?: string

View File

@ -25,13 +25,6 @@ const embedData = async (data) => {
} }
} }
const validateEmbed = async (value) => {
const iframeData = (await HTMLParser(value, false)) as JSONContent
if (iframeData.type !== 'iframe') {
return
}
}
export const EditorFloatingMenu = (props: FloatingMenuProps) => { export const EditorFloatingMenu = (props: FloatingMenuProps) => {
const { t } = useLocalize() const { t } = useLocalize()
const [selectedMenuItem, setSelectedMenuItem] = createSignal<MenuItem | undefined>() const [selectedMenuItem, setSelectedMenuItem] = createSignal<MenuItem | undefined>()
@ -43,6 +36,13 @@ export const EditorFloatingMenu = (props: FloatingMenuProps) => {
props.editor.chain().focus().setIframe(emb).run() props.editor.chain().focus().setIframe(emb).run()
} }
const validateEmbed = async (value) => {
const iframeData = (await HTMLParser(value, false)) as JSONContent
if (iframeData.type !== 'iframe') {
return t('Error')
}
}
createEffect(() => { createEffect(() => {
switch (selectedMenuItem()) { switch (selectedMenuItem()) {
case 'image': { case 'image': {
@ -102,7 +102,6 @@ export const EditorFloatingMenu = (props: FloatingMenuProps) => {
onClear={() => setSelectedMenuItem()} onClear={() => setSelectedMenuItem()}
validate={validateEmbed} validate={validateEmbed}
onSubmit={handleEmbedFormSubmit} onSubmit={handleEmbedFormSubmit}
errorMessage={t('Error')}
/> />
</Show> </Show>
</div> </div>

View File

@ -1,6 +1,7 @@
.Menu { .Menu {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
.icon { .icon {
opacity: 0.5; opacity: 0.5;
display: block; display: block;

View File

@ -4,8 +4,7 @@
.form { .form {
display: flex; display: flex;
flex-direction: row; flex-flow: row nowrap;
flex-wrap: nowrap;
padding: 6px 11px; padding: 6px 11px;
width: 100%; width: 100%;

View File

@ -7,11 +7,10 @@ type Props = {
onClose: () => void onClose: () => void
onClear?: () => void onClear?: () => void
onSubmit: (value: string) => void onSubmit: (value: string) => void
validate?: (value: string) => string | Promise<string> | Promise<void> | Promise<boolean> validate?: (value: string) => string | Promise<string>
initialValue?: string initialValue?: string
showInput?: boolean showInput?: boolean
placeholder: string placeholder: string
errorMessage: string
autoFocus?: boolean autoFocus?: boolean
} }
@ -26,17 +25,15 @@ export const InlineForm = (props: Props) => {
const handleSaveButtonClick = async () => { const handleSaveButtonClick = async () => {
if (props.validate) { if (props.validate) {
const checkValid = await props.validate(formValue()) const errorMessage = await props.validate(formValue())
if (checkValid) { if (errorMessage) {
props.onSubmit(formValue()) setFormValueError(errorMessage)
props.onClose() return
} else {
setFormValueError(props.errorMessage)
} }
} else {
props.onSubmit(formValue())
props.onClose()
} }
props.onSubmit(formValue())
props.onClose()
} }
const handleKeyPress = async (event) => { const handleKeyPress = async (event) => {

View File

@ -1,46 +0,0 @@
.LinkForm {
position: relative;
.form {
display: flex;
flex-flow: row nowrap;
padding: 6px 11px;
input {
margin: 0 12px 0 0;
padding: 0;
flex: 1;
border: none;
min-width: 200px;
display: block;
&::placeholder {
color: rgba(#000, 0.3);
}
&:focus {
outline: none;
}
}
}
.linkError {
padding: 6px 11px;
color: red;
font-size: 0.7em;
position: absolute;
bottom: -3rem;
left: 0;
right: 0;
height: 0;
background: #fff;
box-shadow: 0 4px 10px rgba(#000, 0.25);
opacity: 0;
transition: height 0.3s ease-in-out, opacity 0.3s ease-in-out;
&.visible {
height: 32px;
opacity: 1;
}
}
}

View File

@ -1,85 +0,0 @@
import styles from './LinkForm.module.scss'
import { Icon } from '../../../_shared/Icon'
import { createEditorTransaction } from 'solid-tiptap'
import validateUrl from '../../../../utils/validateUrl'
import type { Editor } from '@tiptap/core'
import { createSignal } from 'solid-js'
import { useLocalize } from '../../../../context/localize'
import { clsx } from 'clsx'
type Props = {
editor: Editor
onClose: () => void
}
export const LinkForm = (props: Props) => {
const { t } = useLocalize()
const [url, setUrl] = createSignal('')
const [linkError, setLinkError] = createSignal('')
const currentUrl = createEditorTransaction(
() => props.editor,
(editor) => {
return (editor && editor.getAttributes('link').href) || ''
}
)
const clearLinkForm = () => {
if (currentUrl()) {
props.editor.chain().focus().unsetLink().run()
}
setUrl('')
props.onClose()
}
const handleUrlInput = (value) => {
setUrl(value)
}
const handleSaveButtonClick = () => {
if (!validateUrl(url())) {
setLinkError(t('Invalid url format'))
return
}
props.editor.chain().focus().setLink({ href: url() }).run()
props.onClose()
}
const handleKeyPress = (event) => {
event.preventDefault()
setLinkError('')
const key = event.key
if (key === 'Enter') {
handleSaveButtonClick()
}
if (key === 'Esc') {
clearLinkForm()
}
}
return (
<div class={styles.LinkForm}>
<div class={styles.form}>
<input
type="text"
placeholder={t('Enter URL address')}
autofocus
value={currentUrl()}
onKeyPress={(e) => handleKeyPress(e)}
onInput={(e) => handleUrlInput(e.currentTarget.value)}
/>
<button type="button" onClick={handleSaveButtonClick} disabled={linkError() !== ''}>
<Icon name="status-done" />
</button>
<button type="button" onClick={() => clearLinkForm()}>
{currentUrl() ? 'Ж' : <Icon name="status-cancel" />}
</button>
</div>
<div class={clsx(styles.linkError, { [styles.visible]: Boolean(linkError()) })}>{linkError()}</div>
</div>
)
}

View File

@ -1 +0,0 @@
export { LinkForm } from './LinkForm'

View File

@ -6,7 +6,7 @@ import { clsx } from 'clsx'
import { createEditorTransaction } from 'solid-tiptap' import { createEditorTransaction } from 'solid-tiptap'
import { useLocalize } from '../../../context/localize' import { useLocalize } from '../../../context/localize'
import { InlineForm } from '../InlineForm' import { InlineForm } from '../InlineForm'
import validateImage from '../../../utils/validateUrl' import { validateUrl } from '../../../utils/validateUrl'
type BubbleMenuProps = { type BubbleMenuProps = {
editor: Editor editor: Editor
@ -83,10 +83,9 @@ export const TextBubbleMenu = (props: BubbleMenuProps) => {
placeholder={t('Enter URL address')} placeholder={t('Enter URL address')}
initialValue={currentUrl() ?? ''} initialValue={currentUrl() ?? ''}
onClear={handleClearLinkForm} onClear={handleClearLinkForm}
validate={(value) => (validateImage(value) ? '' : t('Invalid url format'))} validate={(value) => (validateUrl(value) ? '' : t('Invalid url format'))}
onSubmit={handleLinkFormSubmit} onSubmit={handleLinkFormSubmit}
onClose={() => setLinkEditorOpen(false)} onClose={() => setLinkEditorOpen(false)}
errorMessage={t('Error')}
/> />
</Match> </Match>
<Match when={!linkEditorOpen()}> <Match when={!linkEditorOpen()}>

View File

@ -40,8 +40,8 @@
to right, to right,
rgba(#fff, 0) 0%, rgba(#fff, 0) 0%,
rgba(#fff, 0.8) 50%, rgba(#fff, 0.8) 50%,
rgba(128, 186, 232, 0) 99%, rgb(128 186 232 / 0%) 99%,
rgba(125, 185, 232, 0) 100% rgb(125 185 232 / 0%) 100%
); );
} }
} }
@ -89,6 +89,7 @@
0% { 0% {
transform: translateX(-100%); transform: translateX(-100%);
} }
100% { 100% {
transform: translateX(100%); transform: translateX(100%);
} }

View File

@ -113,9 +113,8 @@ export const UploadModalContent = (props: Props) => {
hideModal() hideModal()
props.onClose() props.onClose()
}} }}
validate={(value) => verifyImg(value)} validate={async (value) => ((await verifyImg(value)) ? '' : t('Invalid image URL'))}
onSubmit={handleImageFormSubmit} onSubmit={handleImageFormSubmit}
errorMessage={t('Invalid image link')}
/> />
</div> </div>
</> </>

View File

@ -118,26 +118,32 @@ export const Figure = Node.create<FigureOptions>({
const tracker = new Tracker(tr) const tracker = new Tracker(tr)
return commands.forEach(images, ({ node, pos }) => { return commands.forEach(
const mapResult = tracker.map(pos) // eslint-disable-next-line unicorn/no-array-callback-reference
images,
// eslint-disable-next-line unicorn/no-array-method-this-argument
({ node, pos }) => {
// eslint-disable-next-line unicorn/no-array-callback-reference
const mapResult = tracker.map(pos)
if (mapResult.deleted) { if (mapResult.deleted) {
return false return false
}
const range = {
from: mapResult.position,
to: mapResult.position + node.nodeSize
}
return commands.insertContentAt(range, {
type: this.name,
attrs: {
src: node.attrs.src
},
content: [{ type: 'text', text: node.attrs.src }]
})
} }
)
const range = {
from: mapResult.position,
to: mapResult.position + node.nodeSize
}
return commands.insertContentAt(range, {
type: this.name,
attrs: {
src: node.attrs.src
},
content: [{ type: 'text', text: node.attrs.src }]
})
})
}, },
figureToImage: figureToImage:
() => () =>
@ -153,25 +159,31 @@ export const Figure = Node.create<FigureOptions>({
const tracker = new Tracker(tr) const tracker = new Tracker(tr)
return commands.forEach(figures, ({ node, pos }) => { return commands.forEach(
const mapResult = tracker.map(pos) // eslint-disable-next-line unicorn/no-array-callback-reference
figures,
// eslint-disable-next-line unicorn/no-array-method-this-argument
({ node, pos }) => {
// eslint-disable-next-line unicorn/no-array-callback-reference
const mapResult = tracker.map(pos)
if (mapResult.deleted) { if (mapResult.deleted) {
return false return false
}
const range = {
from: mapResult.position,
to: mapResult.position + node.nodeSize
}
return commands.insertContentAt(range, {
type: 'image',
attrs: {
src: node.attrs.src
} }
})
}) const range = {
from: mapResult.position,
to: mapResult.position + node.nodeSize
}
return commands.insertContentAt(range, {
type: 'image',
attrs: {
src: node.attrs.src
}
})
}
)
} }
} }
}, },

View File

@ -1,7 +1,6 @@
import { Extension } from '@tiptap/core' import { Extension } from '@tiptap/core'
import { Plugin, PluginKey } from '@tiptap/pm/state' import { Plugin, PluginKey } from '@tiptap/pm/state'
// @ts-ignore
function nodeEqualsType({ types, node }) { function nodeEqualsType({ types, node }) {
return (Array.isArray(types) && types.includes(node.type)) || node.type === types return (Array.isArray(types) && types.includes(node.type)) || node.type === types
} }

View File

@ -11,7 +11,7 @@ import { showModal, useWarningsStore } from '../../stores/ui'
import { ShowOnlyOnClient } from '../_shared/ShowOnlyOnClient' import { ShowOnlyOnClient } from '../_shared/ShowOnlyOnClient'
import { useSession } from '../../context/session' import { useSession } from '../../context/session'
import { useLocalize } from '../../context/localize' import { useLocalize } from '../../context/localize'
import { getPagePath, openPage } from '@nanostores/router' import { getPagePath } from '@nanostores/router'
import { Button } from '../_shared/Button' import { Button } from '../_shared/Button'
import { useEditorContext } from '../../context/editor' import { useEditorContext } from '../../context/editor'

View File

@ -10,7 +10,7 @@ import { openPage } from '@nanostores/router'
import { router } from '../../../stores/router' import { router } from '../../../stores/router'
export const DraftsView = () => { export const DraftsView = () => {
const { isAuthenticated, isSessionLoaded, user } = useSession() const { isAuthenticated, isSessionLoaded } = useSession()
const [drafts, setDrafts] = createSignal<Shout[]>([]) const [drafts, setDrafts] = createSignal<Shout[]>([])

View File

@ -14,6 +14,7 @@
.shoutCardCoverContainer { .shoutCardCoverContainer {
position: relative; position: relative;
width: 100%; width: 100%;
.shoutCardCover { .shoutCardCover {
height: 0; height: 0;
overflow: hidden; overflow: hidden;

View File

@ -38,7 +38,6 @@ export const EditView = (props: EditViewProps) => {
formErrors, formErrors,
actions: { setForm, setFormErrors } actions: { setForm, setFormErrors }
} = useEditorContext() } = useEditorContext()
const [isSlugChanged, setIsSlugChanged] = createSignal(false)
setForm({ setForm({
shoutId: props.shout.id, shoutId: props.shout.id,
@ -78,10 +77,6 @@ export const EditView = (props: EditViewProps) => {
const handleSlugInputChange = (e) => { const handleSlugInputChange = (e) => {
const slug = e.currentTarget.value const slug = e.currentTarget.value
if (slug !== form.slug) {
setIsSlugChanged(true)
}
setForm('slug', slug) setForm('slug', slug)
} }

View File

@ -5,7 +5,7 @@ import { For, createSignal, Show, onMount } from 'solid-js'
import { clsx } from 'clsx' import { clsx } from 'clsx'
import styles from './Settings.module.scss' import styles from './Settings.module.scss'
import { useProfileForm } from '../../context/profile' import { useProfileForm } from '../../context/profile'
import validateUrl from '../../utils/validateUrl' import { validateUrl } from '../../utils/validateUrl'
import { createFileUploader } from '@solid-primitives/upload' import { createFileUploader } from '@solid-primitives/upload'
import { Loading } from '../../components/_shared/Loading' import { Loading } from '../../components/_shared/Loading'
import { useSession } from '../../context/session' import { useSession } from '../../context/session'

View File

@ -853,6 +853,7 @@ details {
.description { .description {
@include font-size(1.4rem); @include font-size(1.4rem);
color: rgba(0 0 0 / 40%); color: rgba(0 0 0 / 40%);
} }

View File

@ -1,5 +1,3 @@
const validateUrl = (value: string) => { export const validateUrl = (value: string) => {
return /^(http|https):\/\/[^ "]+$/.test(value) return /^(http|https):\/\/[^ "]+$/.test(value)
} }
export default validateUrl