@appland/scanner 1.71.5 → 1.71.7

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.71.7](https://github.com/getappmap/appmap-js/compare/@appland/scanner-v1.71.6...@appland/scanner-v1.71.7) (2022-10-21)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * scanner works on windows ([a2bf89f](https://github.com/getappmap/appmap-js/commit/a2bf89f7921d65bf16aee2a341c4902e4d84b6d8))
7
+
8
+ # [@appland/scanner-v1.71.6](https://github.com/getappmap/appmap-js/compare/@appland/scanner-v1.71.5...@appland/scanner-v1.71.6) (2022-10-17)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * fix scanner tests in windows ([e565f30](https://github.com/getappmap/appmap-js/commit/e565f30b7c4f7b43e7eb5652fc9afc58b511da2d))
14
+
1
15
  # [@appland/scanner-v1.71.5](https://github.com/getappmap/appmap-js/compare/@appland/scanner-v1.71.4...@appland/scanner-v1.71.5) (2022-10-17)
2
16
 
3
17
 
@@ -128,7 +128,7 @@ class Watcher {
128
128
  return;
129
129
  this.queue.push(mtimePath);
130
130
  }
131
- scan(mtimePath) {
131
+ scan(mtimePath, callback) {
132
132
  return __awaiter(this, void 0, void 0, function* () {
133
133
  (0, assert_1.default)(this.config, `config should always be loaded before appmapWatcher triggers a scan`);
134
134
  const appmapFile = [path_1.default.dirname(mtimePath), 'appmap.json'].join('.');
@@ -144,6 +144,10 @@ class Watcher {
144
144
  const rawScanResults = yield scanner.scan();
145
145
  // Always report the raw data
146
146
  yield (0, promises_1.writeFile)(reportFile, (0, formatReport_1.formatReport)(rawScanResults));
147
+ // tell the queue that the current task is complete
148
+ if (callback) {
149
+ yield callback();
150
+ }
147
151
  });
148
152
  }
149
153
  reloadConfig() {
@@ -10,7 +10,8 @@ function parseRuleDescription(id) {
10
10
  const docPath = (0, path_1.join)(__dirname, `../../../doc/rules/${(0, util_1.dasherize)(id)}.md`);
11
11
  if (!fs_1.default.existsSync(docPath))
12
12
  return `No doc exists for rule ${id}`;
13
- const content = fs_1.default.readFileSync(docPath, 'utf-8');
13
+ // replace any carriage return with a newline
14
+ const content = fs_1.default.readFileSync(docPath, 'utf-8').replace(/\r\n/g, '\n');
14
15
  const propertiesContent = content.match(/---\n((?:.*\n)+)---\n((?:.*\n)+?)##?#?/);
15
16
  if (!propertiesContent) {
16
17
  // This is probably a new doc that doesn't have front matter yet.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appland/scanner",
3
- "version": "1.71.5",
3
+ "version": "1.71.7",
4
4
  "description": "",
5
5
  "bin": "built/cli.js",
6
6
  "files": [
@@ -10,7 +10,7 @@
10
10
  ],
11
11
  "types": "src/types.d.ts",
12
12
  "scripts": {
13
- "build": "mkdir -p built && cp -r src/sampleConfig built && tsc -p tsconfig.build.json && yarn schema && yarn doc",
13
+ "build": "node bin/preBuild.js && tsc -p tsconfig.build.json && yarn schema && yarn doc",
14
14
  "build-native": "yarn build && ./bin/build-native",
15
15
  "start": "ts-node src/cli.ts",
16
16
  "doc": "ts-node ./bin/verify-rules-doc.ts && ts-node ./bin/verify-labels-doc.ts && ts-node ./bin/front-matter.ts",
@@ -19,7 +19,7 @@
19
19
  "doc-up-to-date": "git diff --exit-code doc/",
20
20
  "lint": "eslint src --ext .ts",
21
21
  "ci": "yarn lint && yarn build && yarn schema-up-to-date && yarn doc-up-to-date && yarn test",
22
- "test": "jest",
22
+ "test": "jest --filter=./test/testFilter.js",
23
23
  "semantic-release": "semantic-release"
24
24
  },
25
25
  "author": "AppLand, Inc.",
@@ -61,7 +61,7 @@
61
61
  "dependencies": {
62
62
  "@appland/client": "^1.3.0",
63
63
  "@appland/models": "^1.18.1",
64
- "@appland/openapi": "1.0.2",
64
+ "@appland/openapi": "1.0.3",
65
65
  "@appland/sql-parser": "^1.5.0",
66
66
  "@types/cli-progress": "^3.9.2",
67
67
  "ajv": "^8.8.2",