From 5d14e64000dfef839ddbd065cb51f01b4f2689bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Pardou-Piquemal?= Date: Tue, 2 Nov 2021 09:04:11 +0100 Subject: [PATCH] Fix pivoql incompatibility (#44) --- .github/workflows/node.js.yml | 2 +- Readme.md | 5 +- package-lock.json | 169 ++++++++++++++++++++++++++++++++-- package.json | 8 +- 4 files changed, 169 insertions(+), 15 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index f2eb852..504517f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -23,5 +23,5 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - run: npm ci && npm install --no-save mongodb@3 @seald-io/nedb + - run: npm ci - run: npm run ci diff --git a/Readme.md b/Readme.md index 5e482cf..c9b9b99 100644 --- a/Readme.md +++ b/Readme.md @@ -66,7 +66,7 @@ ricochet By default, data are *stored in memory* so if you restart the server, all data are lost. The default configuration is for *development purpose only*. See [server configuration](#server-configuration) for more customization and how -to use persistent stores. +to use persistent storages. Now the server is running so you can create a new ricochet *site*. To do it, you can use the Rest API with curl: @@ -94,7 +94,8 @@ This is the **ONLY** chance to get it so keep it for later and **keep it secret* In the meantime you should have received a mail with a link you must visit to confirm the site creation. This is a security measure to prevent abuse. Click -the link to validate the *site* creation. +the link to validate the *site* creation. If you've not yet configured any mail +provider, check out the server logs to read the confirmation link. Now, your server is ready and a site exists. You can follow the next steps to create a new site project. diff --git a/package-lock.json b/package-lock.json index 9b9eb49..03098f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2207,6 +2207,23 @@ } } }, + "@seald-io/binary-search-tree": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@seald-io/binary-search-tree/-/binary-search-tree-1.0.2.tgz", + "integrity": "sha512-+pYGvPFAk7wUR+ONMOlc6A+LUN4kOCFwyPLjyaeS7wVibADPHWYJNYsNtyIAwjF1AXQkuaXElnIc4XjKt55QZA==", + "dev": true + }, + "@seald-io/nedb": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@seald-io/nedb/-/nedb-2.2.0.tgz", + "integrity": "sha512-whkcx3hpcowNhoSEbIsrfe8TXxDwyj8SJJut2EqF7DSX2GGqQlL7Ix/vzwwOo4FJolzDhZD2DaUTVKmTQS3Rog==", + "dev": true, + "requires": { + "@seald-io/binary-search-tree": "^1.0.2", + "async": "0.2.10", + "localforage": "^1.9.0" + } + }, "@sindresorhus/is": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", @@ -2709,6 +2726,12 @@ "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", "dev": true }, + "async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=", + "dev": true + }, "async-each": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", @@ -3007,6 +3030,42 @@ "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", "dev": true }, + "bl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", + "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", + "dev": true, + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, "blessed": { "version": "0.1.81", "resolved": "https://registry.npmjs.org/blessed/-/blessed-0.1.81.tgz", @@ -3150,6 +3209,12 @@ "node-int64": "^0.4.0" } }, + "bson": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.6.tgz", + "integrity": "sha512-EvVNVeGo4tHxwi8L6bPj3y3itEvStdwvvlojVxxbyYfoaxJ6keLgrTuKdyfEAszFK+H3olzBuafE0yoh0D1gdg==", + "dev": true + }, "buffer": { "version": "4.9.2", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", @@ -3949,6 +4014,12 @@ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, + "denque": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.1.tgz", + "integrity": "sha512-XwE+iZ4D6ZUB7mfYRMb5wByE8L74HCn30FBN7sWnXksWc1LO1bPDl67pBR9o/kC4z/xSNAwkMYcGgqDV3BE3Hw==", + "dev": true + }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -5586,6 +5657,12 @@ "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", "dev": true }, + "immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", + "dev": true + }, "import-fresh": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.2.tgz", @@ -7793,12 +7870,30 @@ "type-check": "~0.3.2" } }, + "lie": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", + "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=", + "dev": true, + "requires": { + "immediate": "~3.0.5" + } + }, "lines-and-columns": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", "dev": true }, + "localforage": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz", + "integrity": "sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==", + "dev": true, + "requires": { + "lie": "3.1.1" + } + }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", @@ -7890,6 +7985,13 @@ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, + "memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "dev": true, + "optional": true + }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -8016,6 +8118,20 @@ "moment": ">= 2.9.0" } }, + "mongodb": { + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.7.3.tgz", + "integrity": "sha512-Psm+g3/wHXhjBEktkxXsFMZvd3nemI0r3IPsE0bU+4//PnvNWKkzhZcEsbPcYiWqe8XqXJJEg4Tgtr7Raw67Yw==", + "dev": true, + "requires": { + "bl": "^2.2.1", + "bson": "^1.1.4", + "denque": "^1.4.1", + "optional-require": "^1.1.8", + "safe-buffer": "^5.1.2", + "saslprep": "^1.0.0" + } + }, "mri": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.4.tgz", @@ -8527,6 +8643,15 @@ "mimic-fn": "^2.1.0" } }, + "optional-require": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/optional-require/-/optional-require-1.1.8.tgz", + "integrity": "sha512-jq83qaUb0wNg9Krv1c5OQ+58EK+vHde6aBPzLvPPqJm89UQWsvSuFy9X/OSNJnFeSOKo7btE0n8Nl2+nE+z5nA==", + "dev": true, + "requires": { + "require-at": "^1.0.6" + } + }, "optionator": { "version": "0.8.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", @@ -9010,19 +9135,19 @@ } }, "pivotql-compiler-javascript": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/pivotql-compiler-javascript/-/pivotql-compiler-javascript-0.0.1.tgz", - "integrity": "sha512-RkJmrU9AIixIva6NIQADvkBS1s3Yk1FvicvI7Xu/qq0Hl6V6gV1q1fNPSbH0tyLychbBVpn5q4xnAkHH9nFqkw==" + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/pivotql-compiler-javascript/-/pivotql-compiler-javascript-0.1.0.tgz", + "integrity": "sha512-fP/bxE3MuP437jKKt8lhGkULU0gkGyR3SVKfO2FeSxixqIAXV4PdNIzzX3fOhRXXLvbdU1jaL6gM/HcYk/kJ/A==" }, "pivotql-compiler-mongodb": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/pivotql-compiler-mongodb/-/pivotql-compiler-mongodb-0.2.0.tgz", - "integrity": "sha512-U7wwmfbtfzVs+k4FvxbbhK2/w3KtWUTBdpWSQ66qxJwFUYaGK8tmAB3qPJSG+VsV9eKTDfiGcTrEdl9dhrwveA==" + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/pivotql-compiler-mongodb/-/pivotql-compiler-mongodb-0.3.0.tgz", + "integrity": "sha512-oWRAMxRvBLyzACq4Fk+fN9Ma/5BsYumteL3WesnWvXeuKeZOepA4fXnzc/CtMcJAAhAOpkwf62gr3Q/LS/HYtQ==" }, "pivotql-parser-expression": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/pivotql-parser-expression/-/pivotql-parser-expression-0.2.0.tgz", - "integrity": "sha512-yfTQXtGfrTFObdD+h7h8t9LMYgElOXBUP6DL46LZ4TEWHrE8ZupQrewt1mp4irmXMqXMkz70S2N67tlst3ymOg==" + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/pivotql-parser-expression/-/pivotql-parser-expression-0.3.0.tgz", + "integrity": "sha512-k4i9iEKUUyKF9F7h25sGmUzsO83ATVlHBplyZ3N6ahXhOdGJ2asB/2nzX+G++coIh6MKvzmi8B97GVci6/oXfw==" }, "pkg-dir": { "version": "3.0.0", @@ -9842,6 +9967,12 @@ } } }, + "require-at": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/require-at/-/require-at-1.0.6.tgz", + "integrity": "sha512-7i1auJbMUrXEAZCOQ0VNJgmcT2VOKPRl2YGJwgpHpC9CE91Mv4/4UYIUm4chGJaI381ZDq1JUicFii64Hapd8g==", + "dev": true + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -10119,6 +10250,16 @@ } } }, + "saslprep": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", + "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", + "dev": true, + "optional": true, + "requires": { + "sparse-bitfield": "^3.0.3" + } + }, "sax": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", @@ -10562,6 +10703,16 @@ "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", "dev": true }, + "sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", + "dev": true, + "optional": true, + "requires": { + "memory-pager": "^1.0.2" + } + }, "spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", diff --git a/package.json b/package.json index 5682d84..9bb29e9 100644 --- a/package.json +++ b/package.json @@ -56,9 +56,9 @@ "nodemailer": "^6.4.16", "pino": "^6.7.0", "pino-http": "^5.3.0", - "pivotql-compiler-javascript": "0.0.1", - "pivotql-compiler-mongodb": "^0.2.0", - "pivotql-parser-expression": "^0.2.0", + "pivotql-compiler-javascript": "^0.1.0", + "pivotql-compiler-mongodb": "^0.3.0", + "pivotql-parser-expression": "^0.3.0", "socket.io": "^4.1.2", "vm2": "^3.9.3", "yargs": "^16.2.0" @@ -73,11 +73,13 @@ "@babel/core": "^7.12.9", "@babel/node": "^7.12.6", "@babel/preset-env": "^7.12.7", + "@seald-io/nedb": "^2.2.0", "babel-jest": "^26.6.3", "eslint": "^7.15.0", "eslint-config-prettier": "^6.15.0", "eslint-plugin-prettier": "^3.1.4", "jest": "^26.6.3", + "mongodb": "^3.7.3", "nodemon": "^2.0.6", "pino-pretty": "^4.3.0", "pino-tiny": "^1.0.0",