diff --git a/ecosystem.config.js b/ecosystem.config.js index 040fa4dc8..5fc07d933 100644 --- a/ecosystem.config.js +++ b/ecosystem.config.js @@ -1,9 +1,12 @@ +const { parsed } = require('dotenv').config({ path: 'stylo.env'}) + module.exports = { apps: [ { name: "front", script: "vite", - cwd: "./front/gatsby" + cwd: "./front/gatsby", + env: parsed }, { name: "export", diff --git a/front/gatsby/index.html b/front/gatsby/index.html index 4e606922b..b7594d6ab 100644 --- a/front/gatsby/index.html +++ b/front/gatsby/index.html @@ -20,6 +20,7 @@ + {{#if SNOWPACK_MATOMO}} + {{/if}}
diff --git a/front/gatsby/package-lock.json b/front/gatsby/package-lock.json index a3d3f1d7a..0d5803816 100644 --- a/front/gatsby/package-lock.json +++ b/front/gatsby/package-lock.json @@ -41,7 +41,8 @@ "node-fetch": "^2.6.1", "prettier": "^2.3.0", "sass": "^1.43.4", - "vite": "^2.6.14" + "vite": "^2.6.14", + "vite-plugin-handlebars": "^1.6.0" }, "engines": { "node": ">=16", @@ -5641,6 +5642,36 @@ "dev": true, "optional": true }, + "node_modules/handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/handlebars/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -8433,6 +8464,12 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, "node_modules/nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -11143,6 +11180,19 @@ "node": ">=4.2.0" } }, + "node_modules/uglify-js": { + "version": "3.14.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.3.tgz", + "integrity": "sha512-mic3aOdiq01DuSVx0TseaEzMIVqebMZ0Z3vaeDhFEh9bsc24hV1TFvN74reA2vs08D0ZWfNjAcJ3UbVLaBss+g==", + "dev": true, + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/unbox-primitive": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", @@ -11441,6 +11491,16 @@ } } }, + "node_modules/vite-plugin-handlebars": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/vite-plugin-handlebars/-/vite-plugin-handlebars-1.6.0.tgz", + "integrity": "sha512-/TZ2FadScvJW6fmQ+3m3stm6ns+tDZ3VAgzEkSQYQurAnaQ/3MJfidhmTXzD1Hu1iwgkI3lNuEqybzjjKemCTg==", + "dev": true, + "dependencies": { + "handlebars": "^4.7.6", + "vite": "^2.0.0" + } + }, "node_modules/vite/node_modules/esbuild": { "version": "0.13.14", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.13.14.tgz", @@ -11616,6 +11676,12 @@ "node": ">=0.10.0" } }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, "node_modules/wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -16005,6 +16071,27 @@ "dev": true, "optional": true }, + "handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dev": true, + "requires": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -18102,6 +18189,12 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -20219,6 +20312,13 @@ "dev": true, "peer": true }, + "uglify-js": { + "version": "3.14.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.3.tgz", + "integrity": "sha512-mic3aOdiq01DuSVx0TseaEzMIVqebMZ0Z3vaeDhFEh9bsc24hV1TFvN74reA2vs08D0ZWfNjAcJ3UbVLaBss+g==", + "dev": true, + "optional": true + }, "unbox-primitive": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", @@ -20484,6 +20584,16 @@ } } }, + "vite-plugin-handlebars": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/vite-plugin-handlebars/-/vite-plugin-handlebars-1.6.0.tgz", + "integrity": "sha512-/TZ2FadScvJW6fmQ+3m3stm6ns+tDZ3VAgzEkSQYQurAnaQ/3MJfidhmTXzD1Hu1iwgkI3lNuEqybzjjKemCTg==", + "dev": true, + "requires": { + "handlebars": "^4.7.6", + "vite": "^2.0.0" + } + }, "w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", @@ -20593,6 +20703,12 @@ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, "wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", diff --git a/front/gatsby/package.json b/front/gatsby/package.json index 0f8ec0dbf..a6dd37562 100644 --- a/front/gatsby/package.json +++ b/front/gatsby/package.json @@ -63,6 +63,7 @@ "node-fetch": "^2.6.1", "prettier": "^2.3.0", "sass": "^1.43.4", - "vite": "^2.6.14" + "vite": "^2.6.14", + "vite-plugin-handlebars": "^1.6.0" } } diff --git a/front/gatsby/vite.config.js b/front/gatsby/vite.config.js index 55962b0d1..874d96eca 100644 --- a/front/gatsby/vite.config.js +++ b/front/gatsby/vite.config.js @@ -1,6 +1,9 @@ import { defineConfig } from 'vite' import { env } from 'process' import react from '@vitejs/plugin-react' +import handlebars from 'vite-plugin-handlebars' + +const { NODE_ENV, SNOWPACK_MATOMO_URL, SNOWPACK_MATOMO_SITE_ID } = env // https://vitejs.dev/config/ export default defineConfig({ @@ -18,6 +21,14 @@ export default defineConfig({ }, plugins: [ react(), + handlebars({ + context: { + NODE_ENV, + SNOWPACK_MATOMO: Boolean(SNOWPACK_MATOMO_URL) && Boolean(SNOWPACK_MATOMO_SITE_ID), + SNOWPACK_MATOMO_URL, + SNOWPACK_MATOMO_SITE_ID, + } + }) ], define: { 'process.env': { diff --git a/package-lock.json b/package-lock.json index 3f3aec403..47bd272bb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,9 @@ "dependencies": { "pm2": "^5.1.2" }, + "devDependencies": { + "dotenv": "^10.0.0" + }, "engines": { "node": ">=16", "npm": ">=8" @@ -55,8 +58,7 @@ "downshift": "^6.1.3", "http-link-header": "^1.0.2", "js-yaml": "^4.1.0", - "lodash.debounce": "^4.0.8", - "lodash.throttle": "^4.1.1", + "lodash": "^4.17.21", "object-path-immutable": "^4.1.0", "react": "^16.13.1", "react-codemirror2": "^7.2.1", @@ -72,7 +74,6 @@ "@babel/preset-env": "^7.14.4", "@babel/preset-react": "^7.13.13", "@vitejs/plugin-react": "^1.0.9", - "@welldone-software/why-did-you-render": "^6.2.3", "eslint": "^8.2.0", "eslint-plugin-jest": "^25.2.4", "eslint-plugin-react": "^7.27.0", @@ -80,7 +81,8 @@ "node-fetch": "^2.6.1", "prettier": "^2.3.0", "sass": "^1.43.4", - "vite": "^2.6.14" + "vite": "^2.6.14", + "vite-plugin-handlebars": "^1.6.0" }, "engines": { "node": ">=16", @@ -112,7 +114,6 @@ "uid-generator": "^2.0.0" }, "devDependencies": { - "eslint": "^8.2.0", "nodemon": "^2.0.6" }, "engines": { @@ -3323,18 +3324,6 @@ "node": ">=0.10.0" } }, - "node_modules/@welldone-software/why-did-you-render": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/@welldone-software/why-did-you-render/-/why-did-you-render-6.2.3.tgz", - "integrity": "sha512-FQgi90jvC9uw2aALlonJfqaWOvU5UUBBVvdAnS2iryXwCc4YJkKsPJY5Y/LzaND3OIyk8XGUn1vTRn6hcem28Q==", - "dev": true, - "dependencies": { - "lodash": "^4" - }, - "peerDependencies": { - "react": "^16 || ^17" - } - }, "node_modules/abab": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", @@ -5520,6 +5509,15 @@ "node": ">=8" } }, + "node_modules/dotenv": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", + "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/downshift": { "version": "6.1.3", "resolved": "https://registry.npmjs.org/downshift/-/downshift-6.1.3.tgz", @@ -7523,6 +7521,36 @@ "dev": true, "optional": true }, + "node_modules/handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/handlebars/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -10531,7 +10559,8 @@ "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=" + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true }, "node_modules/lodash.defaults": { "version": "4.2.0", @@ -10589,11 +10618,6 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" }, - "node_modules/lodash.throttle": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", - "integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=" - }, "node_modules/lodash.union": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", @@ -11075,6 +11099,12 @@ "node": ">= 0.6" } }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, "node_modules/netmask": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", @@ -14890,6 +14920,19 @@ "node": ">=4.2.0" } }, + "node_modules/uglify-js": { + "version": "3.14.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.3.tgz", + "integrity": "sha512-mic3aOdiq01DuSVx0TseaEzMIVqebMZ0Z3vaeDhFEh9bsc24hV1TFvN74reA2vs08D0ZWfNjAcJ3UbVLaBss+g==", + "dev": true, + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/uid-generator": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/uid-generator/-/uid-generator-2.0.0.tgz", @@ -15380,6 +15423,16 @@ } } }, + "node_modules/vite-plugin-handlebars": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/vite-plugin-handlebars/-/vite-plugin-handlebars-1.6.0.tgz", + "integrity": "sha512-/TZ2FadScvJW6fmQ+3m3stm6ns+tDZ3VAgzEkSQYQurAnaQ/3MJfidhmTXzD1Hu1iwgkI3lNuEqybzjjKemCTg==", + "dev": true, + "dependencies": { + "handlebars": "^4.7.6", + "vite": "^2.0.0" + } + }, "node_modules/vite/node_modules/esbuild": { "version": "0.13.15", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.13.15.tgz", @@ -15625,6 +15678,12 @@ "node": ">=0.10.0" } }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, "node_modules/wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -17159,7 +17218,6 @@ "@babel/preset-react": "^7.13.13", "@rjsf/core": "^2.5.1", "@vitejs/plugin-react": "^1.0.9", - "@welldone-software/why-did-you-render": "^6.2.3", "biblatex-csl-converter": "^1.11.0", "codemirror": "^5.59.4", "diff-match-patch": "^1.0.5", @@ -17170,8 +17228,7 @@ "http-link-header": "^1.0.2", "jest": "^26.4.2", "js-yaml": "^4.1.0", - "lodash.debounce": "^4.0.8", - "lodash.throttle": "^4.1.1", + "lodash": "^4.17.21", "node-fetch": "^2.6.1", "object-path-immutable": "^4.1.0", "prettier": "^2.3.0", @@ -17184,7 +17241,8 @@ "react-router-dom": "^5.2.0", "redux": "^4.1.0", "sass": "^1.43.4", - "vite": "^2.6.14" + "vite": "^2.6.14", + "vite-plugin-handlebars": "^1.6.0" } }, "@eslint/eslintrc": { @@ -18351,15 +18409,6 @@ } } }, - "@welldone-software/why-did-you-render": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/@welldone-software/why-did-you-render/-/why-did-you-render-6.2.3.tgz", - "integrity": "sha512-FQgi90jvC9uw2aALlonJfqaWOvU5UUBBVvdAnS2iryXwCc4YJkKsPJY5Y/LzaND3OIyk8XGUn1vTRn6hcem28Q==", - "dev": true, - "requires": { - "lodash": "^4" - } - }, "abab": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", @@ -20072,6 +20121,12 @@ "is-obj": "^2.0.0" } }, + "dotenv": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", + "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==", + "dev": true + }, "downshift": { "version": "6.1.3", "resolved": "https://registry.npmjs.org/downshift/-/downshift-6.1.3.tgz", @@ -21571,7 +21626,6 @@ "connect-mongo": "^3.2.0", "cookie-parser": "^1.4.3", "cors": "^2.8.5", - "eslint": "^8.2.0", "express": "^4.16.4", "express-graphql": "^0.11.0", "express-session": "^1.17.1", @@ -21594,6 +21648,27 @@ "dev": true, "optional": true }, + "handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dev": true, + "requires": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -23860,7 +23935,8 @@ "lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=" + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true }, "lodash.defaults": { "version": "4.2.0", @@ -23918,11 +23994,6 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" }, - "lodash.throttle": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", - "integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=" - }, "lodash.union": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", @@ -24267,6 +24338,12 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, "netmask": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", @@ -27223,6 +27300,13 @@ "dev": true, "peer": true }, + "uglify-js": { + "version": "3.14.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.3.tgz", + "integrity": "sha512-mic3aOdiq01DuSVx0TseaEzMIVqebMZ0Z3vaeDhFEh9bsc24hV1TFvN74reA2vs08D0ZWfNjAcJ3UbVLaBss+g==", + "dev": true, + "optional": true + }, "uid-generator": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/uid-generator/-/uid-generator-2.0.0.tgz", @@ -27640,6 +27724,16 @@ } } }, + "vite-plugin-handlebars": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/vite-plugin-handlebars/-/vite-plugin-handlebars-1.6.0.tgz", + "integrity": "sha512-/TZ2FadScvJW6fmQ+3m3stm6ns+tDZ3VAgzEkSQYQurAnaQ/3MJfidhmTXzD1Hu1iwgkI3lNuEqybzjjKemCTg==", + "dev": true, + "requires": { + "handlebars": "^4.7.6", + "vite": "^2.0.0" + } + }, "vizion": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/vizion/-/vizion-2.2.1.tgz", @@ -27806,6 +27900,12 @@ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, "wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", diff --git a/package.json b/package.json index 68175c87b..be8f29d85 100644 --- a/package.json +++ b/package.json @@ -38,5 +38,8 @@ "homepage": "https://github.com/EcrituresNumeriques/stylo#readme", "dependencies": { "pm2": "^5.1.2" + }, + "devDependencies": { + "dotenv": "^10.0.0" } } diff --git a/stylo-example.env b/stylo-example.env index ba21052a0..a1a5fc8c6 100644 --- a/stylo-example.env +++ b/stylo-example.env @@ -18,4 +18,6 @@ SNOWPACK_PUBLIC_GRAPHQL_ENDPOINT=http://localhost:3030 SNOWPACK_PUBLIC_EXPORT_ENDPOINT=http://localhost:3060 SNOWPACK_PUBLIC_PROCESS_ENDPOINT=https://stylo-export.ecrituresnumeriques.ca SNOWPACK_PUBLIC_HUMAN_ID_REGISTER_ENDPOINT=https://humanid.huma-num.fr/register?service=http://localhost:3030/authorization-code/callback +SNOWPACK_MATOMO_URL=https://example.matomo.cloud/ +SNOWPACK_MATOMO_SITE_ID=0 EXPORT_CANONICAL_BASE_URL=http://localhost:3060