From c00ca0a3a03c6b14b1282129dade0073ddc79eac Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Wed, 13 Apr 2022 22:46:07 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=80=20Tweaking=20chokidar=20configurat?= =?UTF-8?q?ion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 34 ++++++++-------------------------- services/api.service.ts | 5 +++-- 2 files changed, 11 insertions(+), 28 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5e092a1..a0b0576 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,6 @@ "@elastic/elasticsearch": "^7.16.0", "@jorgeferrero/stream-to-buffer": "^2.0.6", "@root/walk": "^1.1.0", - "@types/axios": "^0.14.0", "@types/jest": "^25.1.4", "@types/mkdirp": "^1.0.0", "@types/node": "^13.9.8", @@ -33,9 +32,9 @@ "mkdirp": "^0.5.5", "moleculer": "^0.14.19", "moleculer-bull": "github:rishighan/moleculer-bull", - "moleculer-db": "^0.8.13", + "moleculer-db": "^0.8.17", "moleculer-db-adapter-mongo": "^0.4.7", - "moleculer-db-adapter-mongoose": "^0.8.9", + "moleculer-db-adapter-mongoose": "^0.8.12", "moleculer-web": "^0.10.4", "mongoosastic-ts": "^5.0.7", "mongoose": "^5.12.7", @@ -1733,9 +1732,9 @@ "integrity": "sha512-+pYGvPFAk7wUR+ONMOlc6A+LUN4kOCFwyPLjyaeS7wVibADPHWYJNYsNtyIAwjF1AXQkuaXElnIc4XjKt55QZA==" }, "node_modules/@seald-io/nedb": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@seald-io/nedb/-/nedb-2.2.0.tgz", - "integrity": "sha512-whkcx3hpcowNhoSEbIsrfe8TXxDwyj8SJJut2EqF7DSX2GGqQlL7Ix/vzwwOo4FJolzDhZD2DaUTVKmTQS3Rog==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@seald-io/nedb/-/nedb-2.2.2.tgz", + "integrity": "sha512-z91J3pem4ENzHuu9BilOSdlGL2S14OQYePPdvBcPHgHr+s51VIUwQARcOjx21KvtkA27vEpgPqzrVKh7nSlIfw==", "dependencies": { "@seald-io/binary-search-tree": "^1.0.2", "async": "0.2.10", @@ -1801,15 +1800,6 @@ "optional": true, "peer": true }, - "node_modules/@types/axios": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@types/axios/-/axios-0.14.0.tgz", - "integrity": "sha1-7CMA++fX3d1+udOr+HmZlkyvzkY=", - "deprecated": "This is a stub types definition for axios (https://github.com/mzabriskie/axios). axios provides its own type definitions, so you don't need @types/axios installed!", - "dependencies": { - "axios": "*" - } - }, "node_modules/@types/babel__core": { "version": "7.1.18", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.18.tgz", @@ -16641,9 +16631,9 @@ "integrity": "sha512-+pYGvPFAk7wUR+ONMOlc6A+LUN4kOCFwyPLjyaeS7wVibADPHWYJNYsNtyIAwjF1AXQkuaXElnIc4XjKt55QZA==" }, "@seald-io/nedb": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@seald-io/nedb/-/nedb-2.2.0.tgz", - "integrity": "sha512-whkcx3hpcowNhoSEbIsrfe8TXxDwyj8SJJut2EqF7DSX2GGqQlL7Ix/vzwwOo4FJolzDhZD2DaUTVKmTQS3Rog==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@seald-io/nedb/-/nedb-2.2.2.tgz", + "integrity": "sha512-z91J3pem4ENzHuu9BilOSdlGL2S14OQYePPdvBcPHgHr+s51VIUwQARcOjx21KvtkA27vEpgPqzrVKh7nSlIfw==", "requires": { "@seald-io/binary-search-tree": "^1.0.2", "async": "0.2.10", @@ -16706,14 +16696,6 @@ "optional": true, "peer": true }, - "@types/axios": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@types/axios/-/axios-0.14.0.tgz", - "integrity": "sha1-7CMA++fX3d1+udOr+HmZlkyvzkY=", - "requires": { - "axios": "*" - } - }, "@types/babel__core": { "version": "7.1.18", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.18.tgz", diff --git a/services/api.service.ts b/services/api.service.ts index 014f1ad..7cee25c 100644 --- a/services/api.service.ts +++ b/services/api.service.ts @@ -128,9 +128,10 @@ export default class ApiService extends Service { ignored: /(^|[\/\\])\../, // ignore dotfiles persistent: true, usePolling: true, + interval: 500, ignoreInitial: true, + followSymlinks: true, atomic: true, - depth: 10, awaitWriteFinish: { stabilityThreshold: 2000, pollInterval: 100, @@ -183,7 +184,7 @@ export default class ApiService extends Service { ); console.log("File copy started..."); - fs.stat(path, function (err, stat) { + fs.stat(path, (err, stat) => { if (err) { console.log( "Error watching file for copy completion. ERR: " +