@appland/scanner 1.76.8 → 1.77.0

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,10 @@
1
+ # [@appland/scanner-v1.77.0](https://github.com/getappmap/appmap-js/compare/@appland/scanner-v1.76.8...@appland/scanner-v1.77.0) (2023-04-28)
2
+
3
+
4
+ ### Features
5
+
6
+ * Provide a global handler for SQL parse errors ([9f3a920](https://github.com/getappmap/appmap-js/commit/9f3a920347f7b29f07bfc2cdae33119edd62f5aa))
7
+
1
8
  # [@appland/scanner-v1.76.8](https://github.com/getappmap/appmap-js/compare/@appland/scanner-v1.76.7...@appland/scanner-v1.76.8) (2023-03-10)
2
9
 
3
10
 
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const models_1 = require("@appland/models");
7
7
  const lru_cache_1 = __importDefault(require("lru-cache"));
8
- const sqlWarning_1 = __importDefault(require("./sqlWarning"));
9
8
  const NormalizedSQLBySQLString = new lru_cache_1.default({ max: 10000 });
10
9
  const ASTBySQLString = new lru_cache_1.default({ max: 1000 });
11
10
  class AppMapIndex {
@@ -18,7 +17,7 @@ class AppMapIndex {
18
17
  const sql = this.sqlNormalized(event);
19
18
  let ast = ASTBySQLString.get(sql);
20
19
  if (!ast) {
21
- ast = (0, models_1.parseSQL)(sql, sqlWarning_1.default);
20
+ ast = (0, models_1.parseSQL)(sql);
22
21
  ast ? ASTBySQLString.set(sql, ast) : ASTBySQLString.set(sql, null);
23
22
  }
24
23
  return ast;
package/built/cli.js CHANGED
@@ -13,6 +13,8 @@ const util_1 = require("./rules/lib/util");
13
13
  const errors_1 = require("./errors");
14
14
  const exitCode_1 = require("./cli/exitCode");
15
15
  const telemetry_1 = __importDefault(require("./telemetry"));
16
+ const models_1 = require("@appland/models");
17
+ const sqlWarning_1 = __importDefault(require("./sqlWarning"));
16
18
  function errorInfo(err) {
17
19
  if (err instanceof errors_1.ValidationError)
18
20
  return { label: 'validation-error', code: exitCode_1.ExitCode.ValidationError };
@@ -32,6 +34,7 @@ function handleError(err) {
32
34
  telemetry.properties.errorStack = err.stack;
33
35
  telemetry_1.default.sendEvent(telemetry);
34
36
  }
37
+ (0, models_1.setSQLErrorHandler)(sqlWarning_1.default);
35
38
  (0, yargs_1.default)(process.argv.slice(2))
36
39
  .option('verbose', {
37
40
  describe: 'Show verbose output',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appland/scanner",
3
- "version": "1.76.8",
3
+ "version": "1.77.0",
4
4
  "description": "Analyze AppMaps for code flaws",
5
5
  "bin": "built/cli.js",
6
6
  "files": [
@@ -32,7 +32,7 @@
32
32
  "@types/crypto-js": "^4.1.1",
33
33
  "@types/fs-extra": "^9.0.13",
34
34
  "@types/glob": "^7.2.0",
35
- "@types/jest": "^27.4.1",
35
+ "@types/jest": "^29.4.1",
36
36
  "@types/js-yaml": "^4.0.3",
37
37
  "@types/lru-cache": "^5.1.1",
38
38
  "@types/node": "^16.7.10",
@@ -46,7 +46,7 @@
46
46
  "eslint-plugin-node": "^11.1.0",
47
47
  "eslint-plugin-prettier": "^3.4.1",
48
48
  "fs-extra": "^10.1.0",
49
- "jest": "^27.4.7",
49
+ "jest": "^29.5.0",
50
50
  "nock": "^13.2.2",
51
51
  "openapi-types": "^9.3.0",
52
52
  "pkg": "^5.5.2",
@@ -54,7 +54,7 @@
54
54
  "semantic-release": "^19.0.2",
55
55
  "sinon": "^13.0.1",
56
56
  "tmp-promise": "^3.0.3",
57
- "ts-jest": "^27.1.4",
57
+ "ts-jest": "^29.0.5",
58
58
  "ts-json-schema-generator": "^0.97.0",
59
59
  "ts-node": "^10.2.1",
60
60
  "typescript": "^4.4.2"