commit cd8a7616304e5cb75053d3ee219ce9af24b80fc4 Author: bniwredyc Date: Wed Mar 29 17:17:43 2023 +0200 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d05a7a0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +node_modules/ +npm-debug.log* +.vscode +.DS_Store +.idea/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..990b41c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM node:18 +EXPOSE 4242 +RUN npm ci diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..572b477 --- /dev/null +++ b/Procfile @@ -0,0 +1,2 @@ +web: npm start + diff --git a/index.js b/index.js new file mode 100644 index 0000000..00e9ffb --- /dev/null +++ b/index.js @@ -0,0 +1,7 @@ +import { Hocuspocus } from "@hocuspocus/server"; + +const server = new Hocuspocus({ + port: 4242, +}); + +server.listen(); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..3b784b4 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,166 @@ +{ + "name": "discours-hocuspocus", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "discours-hocuspocus", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "@hocuspocus/server": "^2.0.0" + } + }, + "node_modules/@hocuspocus/common": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@hocuspocus/common/-/common-2.0.0.tgz", + "integrity": "sha512-o+juw4gly9lp1vTTDHutndgbkXtlWlfzkVVW/+6ZgjLxHeYNZVZK+8uVN9zLwGhFSB4k9dRk1SUUbvi9hioJgQ==", + "dependencies": { + "lib0": "^0.2.47" + } + }, + "node_modules/@hocuspocus/server": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@hocuspocus/server/-/server-2.0.0.tgz", + "integrity": "sha512-WLbudFqvD/URLGVBSSUx/NIc7wgPsGkRywcIv68NmcJyqOl5WWhUdhVMLV4OVhK0CyfzCRZRK3E1eZ/uJlB22Q==", + "dependencies": { + "@hocuspocus/common": "^2.0.0", + "@types/async-lock": "^1.1.3", + "@types/uuid": "^9.0.0", + "@types/ws": "^8.5.3", + "async-lock": "^1.3.1", + "kleur": "^4.1.4", + "lib0": "^0.2.47", + "uuid": "^9.0.0", + "ws": "^8.5.0" + }, + "peerDependencies": { + "y-protocols": "^1.0.5", + "yjs": "^13.5.29" + } + }, + "node_modules/@types/async-lock": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@types/async-lock/-/async-lock-1.4.0.tgz", + "integrity": "sha512-2+rYSaWrpdbQG3SA0LmMT6YxWLrI81AqpMlSkw3QtFc2HGDufkweQSn30Eiev7x9LL0oyFrBqk1PXOnB9IEgKg==" + }, + "node_modules/@types/node": { + "version": "18.15.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz", + "integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==" + }, + "node_modules/@types/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-rFT3ak0/2trgvp4yYZo5iKFEPsET7vKydKF+VRCxlQ9bpheehyAJH89dAkaLEq/j/RZXJIqcgsmPJKUP1Z28HA==" + }, + "node_modules/@types/ws": { + "version": "8.5.4", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", + "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/async-lock": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.4.0.tgz", + "integrity": "sha512-coglx5yIWuetakm3/1dsX9hxCNox22h7+V80RQOu2XUUMidtArxKoZoOtHUPuR84SycKTXzgGzAUR5hJxujyJQ==" + }, + "node_modules/isomorphic.js": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/isomorphic.js/-/isomorphic.js-0.2.5.tgz", + "integrity": "sha512-PIeMbHqMt4DnUP3MA/Flc0HElYjMXArsw1qwJZcm9sqR8mq3l8NYizFMty0pWwE/tzIGH3EKK5+jes5mAr85yw==", + "funding": { + "type": "GitHub Sponsors ❤", + "url": "https://github.com/sponsors/dmonad" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/lib0": { + "version": "0.2.73", + "resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.73.tgz", + "integrity": "sha512-aJJIElCLWnHMcYZPtsM07QoSfHwpxCy4VUzBYGXFYEmh/h2QS5uZNbCCfL0CqnkOE30b7Tp9DVfjXag+3qzZjQ==", + "dependencies": { + "isomorphic.js": "^0.2.4" + }, + "bin": { + "0gentesthtml": "bin/gentesthtml.js", + "0serve": "bin/0serve.js" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "type": "GitHub Sponsors ❤", + "url": "https://github.com/sponsors/dmonad" + } + }, + "node_modules/uuid": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/ws": { + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", + "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y-protocols": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/y-protocols/-/y-protocols-1.0.5.tgz", + "integrity": "sha512-Wil92b7cGk712lRHDqS4T90IczF6RkcvCwAD0A2OPg+adKmOe+nOiT/N2hvpQIWS3zfjmtL4CPaH5sIW1Hkm/A==", + "peer": true, + "dependencies": { + "lib0": "^0.2.42" + }, + "funding": { + "type": "GitHub Sponsors ❤", + "url": "https://github.com/sponsors/dmonad" + } + }, + "node_modules/yjs": { + "version": "13.5.51", + "resolved": "https://registry.npmjs.org/yjs/-/yjs-13.5.51.tgz", + "integrity": "sha512-F1Nb3z3TdandD80IAeQqgqy/2n9AhDLcXoBhZvCUX1dNVe0ef7fIwi6MjSYaGAYF2Ev8VcLcsGnmuGGOl7AWbw==", + "peer": true, + "dependencies": { + "lib0": "^0.2.72" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=8.0.0" + }, + "funding": { + "type": "GitHub Sponsors ❤", + "url": "https://github.com/sponsors/dmonad" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..70098d2 --- /dev/null +++ b/package.json @@ -0,0 +1,23 @@ +{ + "name": "discours-hocuspocus", + "version": "1.0.0", + "description": "", + "main": "index.js", + "type": "module", + "scripts": { + "start": "node index.js" + }, + "repository": { + "type": "git", + "url": "git+https://gitlab.com/discoursio/hocuspocus.git" + }, + "author": "", + "license": "MIT", + "bugs": { + "url": "https://gitlab.com/discoursio/hocuspocus/issues" + }, + "homepage": "https://gitlab.com/discoursio/hocuspocus#readme", + "dependencies": { + "@hocuspocus/server": "^2.0.0" + } +}