From 0fc43e878044b73957032fe830bf111c5843beaa Mon Sep 17 00:00:00 2001 From: Nicolas Meienberger Date: Sun, 5 Mar 2023 23:44:22 +0100 Subject: [PATCH] fix(events): correctly assign global.eventdispatcher --- .env.example | 4 +- Dockerfile.dev | 4 +- docker-compose.dev.yml | 6 +- nodemon.json | 5 + package.json | 8 +- pnpm-lock.yaml | 132 ++++++++++++------ .../core/EventDispatcher/EventDispatcher.ts | 4 +- 7 files changed, 110 insertions(+), 53 deletions(-) create mode 100644 nodemon.json diff --git a/.env.example b/.env.example index f61e820d..c01245cd 100644 --- a/.env.example +++ b/.env.example @@ -15,4 +15,6 @@ NGINX_PORT_SSL=443 POSTGRES_PASSWORD=postgres DOMAIN=tipi.localhost STORAGE_PATH=/Users/nicolas/Projects/runtipi -REDIS_HOST=tipi-redis \ No newline at end of file +REDIS_HOST=tipi-redis + +DATABASE_URL=postgres://tipi:postgres@localhost:5432/tipi diff --git a/Dockerfile.dev b/Dockerfile.dev index dd68f3e5..c2b6bbe0 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -12,14 +12,14 @@ RUN npm install node-gyp -g WORKDIR /app COPY ./pnpm-lock.yaml ./ -RUN pnpm fetch +RUN pnpm fetch --ignore-scripts COPY ./package*.json ./ COPY ./prisma/schema.prisma ./prisma/ RUN pnpm install -r --prefer-offline -COPY ./src ./src +COPY ./nodemon.json ./nodemon.json COPY ./esbuild.js ./esbuild.js COPY ./tsconfig.json ./tsconfig.json COPY ./next.config.mjs ./next.config.mjs diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 50e2532a..82599138 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,4 +1,4 @@ -version: "3.7" +version: '3.7' services: reverse-proxy: @@ -32,7 +32,7 @@ services: POSTGRES_USER: tipi POSTGRES_DB: tipi healthcheck: - test: ["CMD-SHELL", "pg_isready -d tipi -U tipi"] + test: ['CMD-SHELL', 'pg_isready -d tipi -U tipi'] interval: 5s timeout: 10s retries: 120 @@ -76,9 +76,9 @@ services: networks: - tipi_main_network volumes: - - ${PWD}/src:/app/src # - /dashboard/node_modules # - /dashboard/.next + - ${PWD}/src:/app/src - ${PWD}/state:/runtipi/state - ${PWD}/repos:/runtipi/repos:ro - ${PWD}/apps:/runtipi/apps diff --git a/nodemon.json b/nodemon.json new file mode 100644 index 00000000..97f146fa --- /dev/null +++ b/nodemon.json @@ -0,0 +1,5 @@ +{ + "watch": ["src/server"], + "exec": "node ./esbuild.js dev", + "ext": "js ts" +} diff --git a/package.json b/package.json index 2f7c3fbe..a76b4cf5 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "test:client": "jest --colors --selectProjects client --", "test:server": "jest --colors --selectProjects server --", "postinstall": "prisma generate", - "dev": "npm run copy:migrations && node ./esbuild.js dev", + "dev": "npm run copy:migrations && nodemon", "start": "NODE_ENV=production node index.js", "lint": "next lint", "lint:fix": "next lint --fix", @@ -30,7 +30,7 @@ }, "dependencies": { "@hookform/resolvers": "^2.9.10", - "@prisma/client": "^4.8.0", + "@prisma/client": "^4.11.0", "@runtipi/postgres-migrations": "^5.3.0", "@tabler/core": "1.0.0-beta16", "@tabler/icons": "^1.109.0", @@ -40,6 +40,7 @@ "@trpc/react-query": "^10.11.1", "@trpc/server": "^10.11.1", "argon2": "^0.29.1", + "chokidar": "^3.5.3", "clsx": "^1.1.1", "express": "^4.17.3", "fs-extra": "^10.1.0", @@ -111,8 +112,9 @@ "jest-environment-jsdom": "^29.3.1", "msw": "^1.0.0", "next-router-mock": "^0.8.0", + "nodemon": "^2.0.21", "prettier": "^2.8.4", - "prisma": "^4.10.1", + "prisma": "^4.11.0", "ts-jest": "^29.0.3", "ts-node": "^10.9.1", "typescript": "4.9.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 318829ab..08f8f28e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,7 +4,7 @@ specifiers: '@babel/core': ^7.0.0 '@faker-js/faker': ^7.6.0 '@hookform/resolvers': ^2.9.10 - '@prisma/client': ^4.8.0 + '@prisma/client': ^4.11.0 '@runtipi/postgres-migrations': ^5.3.0 '@tabler/core': 1.0.0-beta16 '@tabler/icons': ^1.109.0 @@ -34,6 +34,7 @@ specifiers: '@typescript-eslint/eslint-plugin': ^5.47.1 '@typescript-eslint/parser': ^5.47.1 argon2: ^0.29.1 + chokidar: ^3.5.3 clsx: ^1.1.1 dotenv-cli: ^6.0.0 esbuild: ^0.16.17 @@ -61,9 +62,10 @@ specifiers: next-router-mock: ^0.8.0 node-cron: ^3.0.1 node-fetch-commonjs: ^3.2.4 + nodemon: ^2.0.21 pg: ^8.7.3 prettier: ^2.8.4 - prisma: ^4.10.1 + prisma: ^4.11.0 react: 18.2.0 react-dom: 18.2.0 react-hook-form: ^7.38.0 @@ -91,7 +93,7 @@ specifiers: dependencies: '@hookform/resolvers': 2.9.11_react-hook-form@7.43.1 - '@prisma/client': 4.10.1_prisma@4.10.1 + '@prisma/client': 4.11.0_prisma@4.11.0 '@runtipi/postgres-migrations': 5.3.0 '@tabler/core': 1.0.0-beta16_biqbaboplfbrettd7655fr4n2y '@tabler/icons': 1.119.0_biqbaboplfbrettd7655fr4n2y @@ -101,6 +103,7 @@ dependencies: '@trpc/react-query': 10.11.1_2pugaexxlcekgcbbhj75jqmiqi '@trpc/server': 10.11.1 argon2: 0.29.1 + chokidar: 3.5.3 clsx: 1.2.1 express: 4.18.2 fs-extra: 10.1.0 @@ -172,8 +175,9 @@ devDependencies: jest-environment-jsdom: 29.4.3 msw: 1.0.1_typescript@4.9.4 next-router-mock: 0.8.0_next@13.1.6+react@18.2.0 + nodemon: 2.0.21 prettier: 2.8.4 - prisma: 4.10.1 + prisma: 4.11.0 ts-jest: 29.0.5_q5pvvsha5rrowzfbt33h5w23u4 ts-node: 10.9.1_awa2wsr5thmg3i7jqycphctjfq typescript: 4.9.4 @@ -224,7 +228,6 @@ packages: semver: 6.3.0 transitivePeerDependencies: - supports-color - dev: true /@babel/generator/7.20.14: resolution: {integrity: sha512-AEmuXHdcD3A52HHXxaTmYlb8q/xMEhoRP67B3T4Oq7lbmSoqroMZzjnGj3+i1io3pdnF8iBYVu4Ilj+c4hBxYg==} @@ -246,7 +249,6 @@ packages: browserslist: 4.21.5 lru-cache: 5.1.1 semver: 6.3.0 - dev: true /@babel/helper-environment-visitor/7.18.9: resolution: {integrity: sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==} @@ -1135,7 +1137,6 @@ packages: /@jridgewell/resolve-uri/3.1.0: resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} engines: {node: '>=6.0.0'} - dev: true /@jridgewell/set-array/1.1.2: resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} @@ -1214,7 +1215,6 @@ packages: cpu: [arm] os: [android] requiresBuild: true - dev: false optional: true /@next/swc-android-arm64/13.1.6: @@ -1223,7 +1223,6 @@ packages: cpu: [arm64] os: [android] requiresBuild: true - dev: false optional: true /@next/swc-darwin-arm64/13.1.6: @@ -1232,7 +1231,6 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true - dev: false optional: true /@next/swc-darwin-x64/13.1.6: @@ -1241,7 +1239,6 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true - dev: false optional: true /@next/swc-freebsd-x64/13.1.6: @@ -1250,7 +1247,6 @@ packages: cpu: [x64] os: [freebsd] requiresBuild: true - dev: false optional: true /@next/swc-linux-arm-gnueabihf/13.1.6: @@ -1259,7 +1255,6 @@ packages: cpu: [arm] os: [linux] requiresBuild: true - dev: false optional: true /@next/swc-linux-arm64-gnu/13.1.6: @@ -1268,7 +1263,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: false optional: true /@next/swc-linux-arm64-musl/13.1.6: @@ -1277,7 +1271,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: false optional: true /@next/swc-linux-x64-gnu/13.1.6: @@ -1286,7 +1279,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: false optional: true /@next/swc-linux-x64-musl/13.1.6: @@ -1295,7 +1287,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: false optional: true /@next/swc-win32-arm64-msvc/13.1.6: @@ -1304,7 +1295,6 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true - dev: false optional: true /@next/swc-win32-ia32-msvc/13.1.6: @@ -1313,7 +1303,6 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true - dev: false optional: true /@next/swc-win32-x64-msvc/13.1.6: @@ -1322,7 +1311,6 @@ packages: cpu: [x64] os: [win32] requiresBuild: true - dev: false optional: true /@nodelib/fs.scandir/2.1.5: @@ -1371,8 +1359,8 @@ packages: resolution: {integrity: sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==} dev: false - /@prisma/client/4.10.1_prisma@4.10.1: - resolution: {integrity: sha512-VonXLJZybdt8e5XZH5vnIGCRNnIh6OMX1FS3H/yzMGLT3STj5TJ/OkMcednrvELgk8PK89Vo3aSh51MWNO0axA==} + /@prisma/client/4.11.0_prisma@4.11.0: + resolution: {integrity: sha512-0INHYkQIqgAjrt7NzhYpeDQi8x3Nvylc2uDngKyFDDj1tTRQ4uV1HnVmd1sQEraeVAN63SOK0dgCKQHlvjL0KA==} engines: {node: '>=14.17'} requiresBuild: true peerDependencies: @@ -1381,16 +1369,16 @@ packages: prisma: optional: true dependencies: - '@prisma/engines-version': 4.10.1-2.aead147aa326ccb985dcfed5b065b4fdabd44b19 - prisma: 4.10.1 + '@prisma/engines-version': 4.11.0-57.8fde8fef4033376662cad983758335009d522acb + prisma: 4.11.0 dev: false - /@prisma/engines-version/4.10.1-2.aead147aa326ccb985dcfed5b065b4fdabd44b19: - resolution: {integrity: sha512-tsjTho7laDhf9EJ9EnDxAPEf7yrigSMDhniXeU4YoWc7azHAs4GPxRi2P9LTFonmHkJLMOLjR77J1oIP8Ife1w==} + /@prisma/engines-version/4.11.0-57.8fde8fef4033376662cad983758335009d522acb: + resolution: {integrity: sha512-3Vd8Qq06d5xD8Ch5WauWcUUrsVPdMC6Ge8ILji8RFfyhUpqon6qSyGM0apvr1O8n8qH8cKkEFqRPsYjuz5r83g==} dev: false - /@prisma/engines/4.10.1: - resolution: {integrity: sha512-B3tcTxjx196nuAu1GOTKO9cGPUgTFHYRdkPkTS4m5ptb2cejyBlH9X7GOfSt3xlI7p4zAJDshJP4JJivCg9ouA==} + /@prisma/engines/4.11.0: + resolution: {integrity: sha512-0AEBi2HXGV02cf6ASsBPhfsVIbVSDC9nbQed4iiY5eHttW9ZtMxHThuKZE1pnESbr8HRdgmFSa/Kn4OSNYuibg==} requiresBuild: true /@redis/bloom/1.2.0_@redis+client@1.5.5: @@ -2113,7 +2101,6 @@ packages: /abbrev/1.1.1: resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} - dev: false /accepts/1.3.8: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} @@ -2637,7 +2624,6 @@ packages: /client-only/0.0.1: resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==} - dev: false /cliui/8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} @@ -2871,6 +2857,18 @@ packages: ms: 2.1.3 dev: true + /debug/3.2.7_supports-color@5.5.0: + resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.3 + supports-color: 5.5.0 + dev: true + /debug/4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -4053,7 +4051,6 @@ packages: /gensync/1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} - dev: true /get-caller-file/2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} @@ -4130,7 +4127,6 @@ packages: /globals/11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} - dev: true /globals/13.20.0: resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} @@ -4326,6 +4322,10 @@ packages: /ieee754/1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + /ignore-by-default/1.0.1: + resolution: {integrity: sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==} + dev: true + /ignore/5.2.4: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} @@ -5229,7 +5229,6 @@ packages: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} hasBin: true - dev: true /jsonfile/6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} @@ -5953,7 +5952,6 @@ packages: resolution: {integrity: sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - dev: false /napi-build-utils/1.0.2: resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} @@ -6025,7 +6023,6 @@ packages: transitivePeerDependencies: - '@babel/core' - babel-plugin-macros - dev: false /node-abi/3.33.0: resolution: {integrity: sha512-7GGVawqyHF4pfd0YFybhv/eM9JwTtPqx0mAanQ146O3FlSh3pA24zf9IRQTOsfTSqXTNzPSP5iagAJ94jjuVog==} @@ -6076,6 +6073,30 @@ packages: /node-releases/2.0.10: resolution: {integrity: sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==} + /nodemon/2.0.21: + resolution: {integrity: sha512-djN/n2549DUtY33S7o1djRCd7dEm0kBnj9c7S9XVXqRUbuggN1MZH/Nqa+5RFQr63Fbefq37nFXAE9VU86yL1A==} + engines: {node: '>=8.10.0'} + hasBin: true + dependencies: + chokidar: 3.5.3 + debug: 3.2.7_supports-color@5.5.0 + ignore-by-default: 1.0.1 + minimatch: 3.1.2 + pstree.remy: 1.1.8 + semver: 5.7.1 + simple-update-notifier: 1.1.0 + supports-color: 5.5.0 + touch: 3.1.0 + undefsafe: 2.0.5 + dev: true + + /nopt/1.0.10: + resolution: {integrity: sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==} + hasBin: true + dependencies: + abbrev: 1.1.1 + dev: true + /nopt/5.0.0: resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==} engines: {node: '>=6'} @@ -6425,7 +6446,6 @@ packages: nanoid: 3.3.4 picocolors: 1.0.0 source-map-js: 1.0.2 - dev: false /postgres-array/2.0.0: resolution: {integrity: sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==} @@ -6498,13 +6518,13 @@ packages: react-is: 18.2.0 dev: true - /prisma/4.10.1: - resolution: {integrity: sha512-0jDxgg+DruB1kHVNlcspXQB9au62IFfVg9drkhzXudszHNUAQn0lVuu+T8np0uC2z1nKD5S3qPeCyR8u5YFLnA==} + /prisma/4.11.0: + resolution: {integrity: sha512-4zZmBXssPUEiX+GeL0MUq/Yyie4ltiKmGu7jCJFnYMamNrrulTBc+D+QwAQSJ01tyzeGHlD13kOnqPwRipnlNw==} engines: {node: '>=14.17'} hasBin: true requiresBuild: true dependencies: - '@prisma/engines': 4.10.1 + '@prisma/engines': 4.11.0 /prompts/2.4.2: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} @@ -6537,6 +6557,10 @@ packages: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} dev: true + /pstree.remy/1.1.8: + resolution: {integrity: sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==} + dev: true + /pump/3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} dependencies: @@ -6597,7 +6621,6 @@ packages: loose-envify: 1.4.0 react: 18.2.0 scheduler: 0.23.0 - dev: false /react-hook-form/7.43.1_react@18.2.0: resolution: {integrity: sha512-+s3+s8LLytRMriwwuSqeLStVjRXFGxgjjx2jED7Z+wz1J/88vpxieRQGvJVvzrzVxshZ0BRuocFERb779m2kNg==} @@ -6925,10 +6948,20 @@ packages: dependencies: loose-envify: 1.4.0 + /semver/5.7.1: + resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} + hasBin: true + dev: true + /semver/6.3.0: resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} hasBin: true + /semver/7.0.0: + resolution: {integrity: sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==} + hasBin: true + dev: true + /semver/7.3.8: resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==} engines: {node: '>=10'} @@ -7036,6 +7069,13 @@ packages: is-arrayish: 0.3.2 dev: false + /simple-update-notifier/1.1.0: + resolution: {integrity: sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==} + engines: {node: '>=8.10.0'} + dependencies: + semver: 7.0.0 + dev: true + /sisteransi/1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} dev: true @@ -7053,7 +7093,6 @@ packages: /source-map-js/1.0.2: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} - dev: false /source-map-support/0.5.13: resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} @@ -7387,6 +7426,13 @@ packages: engines: {node: '>=0.6'} dev: false + /touch/3.1.0: + resolution: {integrity: sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==} + hasBin: true + dependencies: + nopt: 1.0.10 + dev: true + /tough-cookie/4.1.2: resolution: {integrity: sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==} engines: {node: '>=6'} @@ -7582,6 +7628,10 @@ packages: which-boxed-primitive: 1.0.2 dev: true + /undefsafe/2.0.5: + resolution: {integrity: sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==} + dev: true + /unified/10.1.2: resolution: {integrity: sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==} dependencies: diff --git a/src/server/core/EventDispatcher/EventDispatcher.ts b/src/server/core/EventDispatcher/EventDispatcher.ts index a4ab59ef..37d7068d 100644 --- a/src/server/core/EventDispatcher/EventDispatcher.ts +++ b/src/server/core/EventDispatcher/EventDispatcher.ts @@ -257,6 +257,4 @@ class EventDispatcher { export const EventDispatcherInstance = global.EventDispatcher || EventDispatcher.getInstance(); -if (getConfig().NODE_ENV !== 'production') { - global.EventDispatcher = EventDispatcherInstance; -} +global.EventDispatcher = EventDispatcherInstance;