@appland/scanner 1.74.1 → 1.74.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [@appland/scanner-v1.74.3](https://github.com/getappmap/appmap-js/compare/@appland/scanner-v1.74.2...@appland/scanner-v1.74.3) (2022-12-21)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Examine errors based on error code instead of error message ([f2c15e8](https://github.com/getappmap/appmap-js/commit/f2c15e8e0b2dfce270fc3d92c2bd64fa775947d7))
7
+
8
+ # [@appland/scanner-v1.74.2](https://github.com/getappmap/appmap-js/compare/@appland/scanner-v1.74.1...@appland/scanner-v1.74.2) (2022-12-16)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * Don't let scanner crash on EACCES error ([e542d9b](https://github.com/getappmap/appmap-js/commit/e542d9b3270011ab1788ef95d8c8bc059c2d9d3b))
14
+
1
15
  # [@appland/scanner-v1.74.1](https://github.com/getappmap/appmap-js/compare/@appland/scanner-v1.74.0...@appland/scanner-v1.74.1) (2022-12-16)
2
16
 
3
17
 
@@ -111,6 +111,7 @@ class Watcher {
111
111
  this.appmapWatcher = chokidar.watch(watchDir, {
112
112
  ignoreInitial: true,
113
113
  ignored,
114
+ ignorePermissionErrors: true,
114
115
  });
115
116
  this.appmapPoller = chokidar.watch(watchDir, {
116
117
  ignoreInitial: false,
@@ -127,11 +128,14 @@ class Watcher {
127
128
  .on('error', this.watcherErrorFunction.bind(this));
128
129
  });
129
130
  }
131
+ isError(error, code) {
132
+ const err = error;
133
+ return err.code === code;
134
+ }
130
135
  watcherErrorFunction(error) {
131
136
  var _a;
132
137
  return __awaiter(this, void 0, void 0, function* () {
133
- if (this.appmapWatcher &&
134
- error.message.includes('ENOSPC: System limit for number of file watchers reached')) {
138
+ if (this.appmapWatcher && this.isError(error, 'ENOSPC')) {
135
139
  console.warn(error.stack);
136
140
  console.warn('Will disable file watching. File polling will stay enabled.');
137
141
  yield ((_a = this.appmapWatcher) === null || _a === void 0 ? void 0 : _a.close());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appland/scanner",
3
- "version": "1.74.1",
3
+ "version": "1.74.3",
4
4
  "description": "Analyze AppMaps for code flaws",
5
5
  "bin": "built/cli.js",
6
6
  "files": [