@appland/appmap 3.76.0 → 3.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/built/cli.js +4 -179
  3. package/built/cli.js.map +1 -1
  4. package/built/cmds/openapi.js +4 -23
  5. package/built/cmds/openapi.js.map +1 -1
  6. package/built/cmds/prune/prune.js +8 -7
  7. package/built/cmds/prune/prune.js.map +1 -1
  8. package/built/cmds/prune/pruneAppMap.js +13 -48
  9. package/built/cmds/prune/pruneAppMap.js.map +1 -1
  10. package/built/depends.js +1 -1
  11. package/built/depends.js.map +1 -1
  12. package/built/fingerprint/canonicalize.js +0 -3
  13. package/built/fingerprint/canonicalize.js.map +1 -1
  14. package/built/fingerprint/fingerprintDirectoryCommand.js +2 -1
  15. package/built/fingerprint/fingerprintDirectoryCommand.js.map +1 -1
  16. package/built/fingerprint/fingerprintQueue.js +2 -2
  17. package/built/fingerprint/fingerprintQueue.js.map +1 -1
  18. package/built/fingerprint/fingerprinter.js +18 -29
  19. package/built/fingerprint/fingerprinter.js.map +1 -1
  20. package/built/html/appmap.js +83 -80
  21. package/built/html/appmap.js.map +4 -4
  22. package/built/html/sequenceDiagram.js +83 -80
  23. package/built/html/sequenceDiagram.js.map +4 -4
  24. package/built/lib/fileSizeFilter.js +26 -0
  25. package/built/lib/fileSizeFilter.js.map +1 -0
  26. package/built/lib/filterAppMap.js +2 -5
  27. package/built/lib/filterAppMap.js.map +1 -1
  28. package/built/lib/flattenMetadata.js +1 -1
  29. package/built/lib/sqlErrorLog.js +24 -0
  30. package/built/lib/sqlErrorLog.js.map +1 -0
  31. package/package.json +1 -1
  32. package/built/fingerprint/canonicalize/info.js +0 -48
  33. package/built/fingerprint/canonicalize/info.js.map +0 -1
  34. package/built/fingerprint/canonicalize/trace.js +0 -51
  35. package/built/fingerprint/canonicalize/trace.js.map +0 -1
  36. package/built/fingerprint/canonicalize/update.js +0 -67
  37. package/built/fingerprint/canonicalize/update.js.map +0 -1
  38. package/built/lib/deserializeFilter.js +0 -16
  39. package/built/lib/deserializeFilter.js.map +0 -1
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fileSizeFilter = exports.DefaultMaxAppMapSizeInMB = void 0;
4
+ const promises_1 = require("fs/promises");
5
+ exports.DefaultMaxAppMapSizeInMB = 50;
6
+ // Skip files that are larger than a specified max size.
7
+ function fileSizeFilter(maxFileSize) {
8
+ return async (file) => {
9
+ let fileStat;
10
+ try {
11
+ fileStat = await (0, promises_1.stat)(file);
12
+ }
13
+ catch (_a) {
14
+ return { enable: false, message: `File ${file} not found` };
15
+ }
16
+ if (fileStat.size <= maxFileSize)
17
+ return { enable: true };
18
+ else
19
+ return {
20
+ enable: false,
21
+ message: `Skipping ${file} as its file size of ${fileStat.size} bytes is larger than the maximum configured file size of ${maxFileSize} bytes`,
22
+ };
23
+ };
24
+ }
25
+ exports.fileSizeFilter = fileSizeFilter;
26
+ //# sourceMappingURL=fileSizeFilter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileSizeFilter.js","sourceRoot":"","sources":["../../src/lib/fileSizeFilter.ts"],"names":[],"mappings":";;;AACA,0CAAmC;AAGtB,QAAA,wBAAwB,GAAG,EAAE,CAAC;AAE3C,wDAAwD;AACxD,SAAgB,cAAc,CAAC,WAAmB;IAChD,OAAO,KAAK,EAAE,IAAY,EAAkD,EAAE;QAC5E,IAAI,QAAe,CAAC;QACpB,IAAI;YACF,QAAQ,GAAG,MAAM,IAAA,eAAI,EAAC,IAAI,CAAC,CAAC;SAC7B;QAAC,WAAM;YACN,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,CAAC;SAC7D;QAED,IAAI,QAAQ,CAAC,IAAI,IAAI,WAAW;YAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;YAExD,OAAO;gBACL,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE,YAAY,IAAI,wBAAwB,QAAQ,CAAC,IAAI,6DAA6D,WAAW,QAAQ;aAC/I,CAAC;IACN,CAAC,CAAC;AACJ,CAAC;AAhBD,wCAgBC"}
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const deserializeFilter_1 = __importDefault(require("./deserializeFilter"));
3
+ const models_1 = require("@appland/models");
7
4
  function filterAppMap(appMap, serializedFilter) {
8
- const { appmapFilter } = (0, deserializeFilter_1.default)(serializedFilter);
5
+ const appmapFilter = (0, models_1.deserializeFilter)((0, models_1.filterStringToFilterState)(serializedFilter));
9
6
  return appmapFilter.filter(appMap, []);
10
7
  }
11
8
  exports.default = filterAppMap;
@@ -1 +1 @@
1
- {"version":3,"file":"filterAppMap.js","sourceRoot":"","sources":["../../src/lib/filterAppMap.ts"],"names":[],"mappings":";;;;;AACA,4EAAoD;AAEpD,SAAwB,YAAY,CAAC,MAAc,EAAE,gBAAwB;IAC3E,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,2BAAiB,EAAC,gBAAgB,CAAC,CAAC;IAC7D,OAAO,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACzC,CAAC;AAHD,+BAGC"}
1
+ {"version":3,"file":"filterAppMap.js","sourceRoot":"","sources":["../../src/lib/filterAppMap.ts"],"names":[],"mappings":";;AAAA,4CAAuF;AAEvF,SAAwB,YAAY,CAAC,MAAc,EAAE,gBAAwB;IAC3E,MAAM,YAAY,GAAG,IAAA,0BAAiB,EAAC,IAAA,kCAAyB,EAAC,gBAAgB,CAAC,CAAC,CAAC;IACpF,OAAO,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACzC,CAAC;AAHD,+BAGC"}
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const repositoryInfo_1 = __importDefault(require("./repositoryInfo"));
7
7
  /** Flattens metadata into a string-string map suitable for use in telemetry.
8
- * Ignores git, exception and fingerprints.
8
+ * Ignores git and exception.
9
9
  */
10
10
  function flattenMetadata(metadata) {
11
11
  var _a;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const promises_1 = require("fs/promises");
4
+ const SqlErrors = new Set();
5
+ const SqlParseErrorFileName = 'sql_warning.txt';
6
+ let SqlParseErrorFile;
7
+ async function writeErrorToFile(error) {
8
+ if (!SqlParseErrorFile)
9
+ SqlParseErrorFile = await (0, promises_1.open)(SqlParseErrorFileName, 'w');
10
+ SqlParseErrorFile.write([error.toString(), ''].join('\n'));
11
+ }
12
+ process.on('exit', () => {
13
+ if (SqlParseErrorFile)
14
+ SqlParseErrorFile.close();
15
+ SqlParseErrorFile = undefined;
16
+ });
17
+ function sqlErrorLog(parseError) {
18
+ if (!SqlErrors.has(parseError.sql)) {
19
+ writeErrorToFile(parseError);
20
+ SqlErrors.add(parseError.sql);
21
+ }
22
+ }
23
+ exports.default = sqlErrorLog;
24
+ //# sourceMappingURL=sqlErrorLog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqlErrorLog.js","sourceRoot":"","sources":["../../src/lib/sqlErrorLog.ts"],"names":[],"mappings":";;AACA,0CAA+C;AAE/C,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;AAC5B,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AAChD,IAAI,iBAAyC,CAAC;AAE9C,KAAK,UAAU,gBAAgB,CAAC,KAAiB;IAC/C,IAAI,CAAC,iBAAiB;QAAE,iBAAiB,GAAG,MAAM,IAAA,eAAI,EAAC,qBAAqB,EAAE,GAAG,CAAC,CAAC;IAEnF,iBAAiB,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC7D,CAAC;AAED,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;IACtB,IAAI,iBAAiB;QAAE,iBAAiB,CAAC,KAAK,EAAE,CAAC;IAEjD,iBAAiB,GAAG,SAAS,CAAC;AAChC,CAAC,CAAC,CAAC;AAEH,SAAwB,WAAW,CAAC,UAAsB;IACxD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;QAClC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QAC7B,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;KAC/B;AACH,CAAC;AALD,8BAKC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appland/appmap",
3
- "version": "3.76.0",
3
+ "version": "3.77.0",
4
4
  "description": "",
5
5
  "bin": "built/cli.js",
6
6
  "publishConfig": {
@@ -1,48 +0,0 @@
1
- "use strict";
2
- /* eslint-disable class-methods-use-this */
3
- const { analyzeSQL } = require('@appland/models');
4
- const EventTree = require('./eventTree');
5
- /**
6
- * At INFO level, the order of labeled function calls matters. SQL query strings
7
- * are collected, sorted and made unique.
8
- */
9
- class Canonicalize extends EventTree {
10
- sql(event) {
11
- return {
12
- kind: 'sql',
13
- sql: {
14
- analyzed_query: analyzeSQL(event.sqlQuery),
15
- },
16
- };
17
- }
18
- httpClientRequest(event) {
19
- return {
20
- kind: 'http_client_request',
21
- route: event.route,
22
- parameter_names: event.message ? event.message.map((m) => m.name) : null,
23
- status_code: event.httpClientResponse ? event.httpClientResponse.status_code : null,
24
- };
25
- }
26
- httpServerRequest(event) {
27
- return {
28
- kind: 'http_server_request',
29
- route: event.route,
30
- parameter_names: event.message ? event.message.map((m) => m.name) : null,
31
- status_code: event.httpServerResponse
32
- ? event.httpServerResponse.status || event.httpServerResponse.status_code
33
- : null,
34
- };
35
- }
36
- functionCall(event) {
37
- const labels = this.whitelistedLabels(event.codeObject.labels);
38
- if (labels.length === 0) {
39
- return null;
40
- }
41
- return {
42
- kind: 'function',
43
- labels,
44
- };
45
- }
46
- }
47
- module.exports = (appmap) => new Canonicalize(appmap).execute();
48
- //# sourceMappingURL=info.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"info.js","sourceRoot":"","sources":["../../../src/fingerprint/canonicalize/info.js"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAEzC;;;GAGG;AACH,MAAM,YAAa,SAAQ,SAAS;IAClC,GAAG,CAAC,KAAK;QACP,OAAO;YACL,IAAI,EAAE,KAAK;YACX,GAAG,EAAE;gBACH,cAAc,EAAE,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC;aAC3C;SACF,CAAC;IACJ,CAAC;IAED,iBAAiB,CAAC,KAAK;QACrB,OAAO;YACL,IAAI,EAAE,qBAAqB;YAC3B,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;YACxE,WAAW,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI;SACpF,CAAC;IACJ,CAAC;IAED,iBAAiB,CAAC,KAAK;QACrB,OAAO;YACL,IAAI,EAAE,qBAAqB;YAC3B,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;YACxE,WAAW,EAAE,KAAK,CAAC,kBAAkB;gBACnC,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,WAAW;gBACzE,CAAC,CAAC,IAAI;SACT,CAAC;IACJ,CAAC;IAED,YAAY,CAAC,KAAK;QAChB,MAAM,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC/D,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;YACvB,OAAO,IAAI,CAAC;SACb;QAED,OAAO;YACL,IAAI,EAAE,UAAU;YAChB,MAAM;SACP,CAAC;IACJ,CAAC;CACF;AAED,MAAM,CAAC,OAAO,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC"}
@@ -1,51 +0,0 @@
1
- "use strict";
2
- /* eslint-disable class-methods-use-this */
3
- const { normalizeSQL, analyzeSQL } = require('@appland/models');
4
- const EventTree = require('./eventTree');
5
- /**
6
- * At TRACE level, the order of labeled function calls matters, and all function class
7
- * and method names are retained. SQL queries are also retained in order. HTTP
8
- * server and client request parameters are retained.
9
- */
10
- class Canonicalize extends EventTree {
11
- sql(event) {
12
- const analyzedQuery = analyzeSQL(event.sqlQuery);
13
- const result = {
14
- kind: 'sql',
15
- sql: {
16
- normalized_query: normalizeSQL(event.sqlQuery, event.sql.database_type),
17
- },
18
- };
19
- if (analyzedQuery && typeof analyzedQuery === 'object') {
20
- result.analyzed_query = analyzedQuery;
21
- }
22
- return result;
23
- }
24
- httpClientRequest(event) {
25
- return {
26
- kind: 'http_client_request',
27
- route: event.route,
28
- parameter_names: event.message ? event.message.map((m) => m.name) : null,
29
- status_code: event.httpClientResponse ? event.httpClientResponse.status_code : null,
30
- };
31
- }
32
- httpServerRequest(event) {
33
- return {
34
- kind: 'http_server_request',
35
- route: event.route,
36
- parameter_names: event.message ? event.message.map((m) => m.name) : null,
37
- status_code: event.httpServerResponse
38
- ? event.httpServerResponse.status || event.httpServerResponse.status_code
39
- : null,
40
- };
41
- }
42
- functionCall(event) {
43
- return {
44
- kind: 'function',
45
- function: event.codeObject.id,
46
- labels: [...event.codeObject.labels],
47
- };
48
- }
49
- }
50
- module.exports = (appmap) => new Canonicalize(appmap).execute();
51
- //# sourceMappingURL=trace.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"trace.js","sourceRoot":"","sources":["../../../src/fingerprint/canonicalize/trace.js"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAChE,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAEzC;;;;GAIG;AACH,MAAM,YAAa,SAAQ,SAAS;IAClC,GAAG,CAAC,KAAK;QACP,MAAM,aAAa,GAAG,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACjD,MAAM,MAAM,GAAG;YACb,IAAI,EAAE,KAAK;YACX,GAAG,EAAE;gBACH,gBAAgB,EAAE,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC;aACxE;SACF,CAAC;QACF,IAAI,aAAa,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;YACtD,MAAM,CAAC,cAAc,GAAG,aAAa,CAAC;SACvC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,iBAAiB,CAAC,KAAK;QACrB,OAAO;YACL,IAAI,EAAE,qBAAqB;YAC3B,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;YACxE,WAAW,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI;SACpF,CAAC;IACJ,CAAC;IAED,iBAAiB,CAAC,KAAK;QACrB,OAAO;YACL,IAAI,EAAE,qBAAqB;YAC3B,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;YACxE,WAAW,EAAE,KAAK,CAAC,kBAAkB;gBACnC,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,WAAW;gBACzE,CAAC,CAAC,IAAI;SACT,CAAC;IACJ,CAAC;IAED,YAAY,CAAC,KAAK;QAChB,OAAO;YACL,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,EAAE;YAC7B,MAAM,EAAE,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC;SACrC,CAAC;IACJ,CAAC;CACF;AAED,MAAM,CAAC,OAAO,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC"}
@@ -1,67 +0,0 @@
1
- "use strict";
2
- /* eslint-disable class-methods-use-this */
3
- const { analyzeSQL, normalizeSQL } = require('@appland/models');
4
- const EventTree = require('./eventTree');
5
- /**
6
- * At UPDATE level, the order of events is not important, and the amount of data
7
- * retained about events is minimal. Function labels are retained. HTTP server
8
- * and client request method, route, and status code are retained; but not parameter
9
- * names.
10
- */
11
- class Canonicalize extends EventTree {
12
- /**
13
- *
14
- * @param {Event} event
15
- */
16
- sql(event) {
17
- const analyzedQuery = analyzeSQL(event.sqlQuery);
18
- if (typeof analyzedQuery === 'string') {
19
- const sqlLower = event.sqlQuery.toLowerCase();
20
- if (sqlLower.indexOf('insert') !== -1 || sqlLower.indexOf('update') !== -1) {
21
- return {
22
- kind: 'sql',
23
- sql: {
24
- normalized_query: normalizeSQL(event.sqlQuery, event.sql.database_type),
25
- },
26
- };
27
- }
28
- }
29
- else if (analyzedQuery && analyzedQuery.actions) {
30
- if (['insert', 'update', 'delete'].find((x) => analyzedQuery.actions.includes(x))) {
31
- return {
32
- kind: 'sql',
33
- sql: {
34
- analyzed_query: analyzedQuery,
35
- },
36
- };
37
- }
38
- }
39
- return null;
40
- }
41
- httpClientRequest(event) {
42
- return {
43
- kind: 'http_client_request',
44
- route: event.route,
45
- status_code: event.httpClientResponse ? event.httpClientResponse.status_code : null,
46
- };
47
- }
48
- httpServerRequest(event) {
49
- return {
50
- kind: 'http_server_request',
51
- route: event.route,
52
- status_code: event.httpServerResponse ? event.httpServerResponse.status_code : null,
53
- };
54
- }
55
- functionCall(event) {
56
- const labels = this.whitelistedLabels(event.codeObject.labels);
57
- if (labels.length === 0) {
58
- return null;
59
- }
60
- return {
61
- kind: 'function',
62
- labels,
63
- };
64
- }
65
- }
66
- module.exports = (appmap) => new Canonicalize(appmap).execute();
67
- //# sourceMappingURL=update.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/fingerprint/canonicalize/update.js"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAChE,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,YAAa,SAAQ,SAAS;IAClC;;;OAGG;IACH,GAAG,CAAC,KAAK;QACP,MAAM,aAAa,GAAG,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACjD,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;YACrC,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;YAC9C,IAAI,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE;gBAC1E,OAAO;oBACL,IAAI,EAAE,KAAK;oBACX,GAAG,EAAE;wBACH,gBAAgB,EAAE,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC;qBACxE;iBACF,CAAC;aACH;SACF;aAAM,IAAI,aAAa,IAAI,aAAa,CAAC,OAAO,EAAE;YACjD,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;gBACjF,OAAO;oBACL,IAAI,EAAE,KAAK;oBACX,GAAG,EAAE;wBACH,cAAc,EAAE,aAAa;qBAC9B;iBACF,CAAC;aACH;SACF;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,iBAAiB,CAAC,KAAK;QACrB,OAAO;YACL,IAAI,EAAE,qBAAqB;YAC3B,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,WAAW,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI;SACpF,CAAC;IACJ,CAAC;IAED,iBAAiB,CAAC,KAAK;QACrB,OAAO;YACL,IAAI,EAAE,qBAAqB;YAC3B,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,WAAW,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI;SACpF,CAAC;IACJ,CAAC;IAED,YAAY,CAAC,KAAK;QAChB,MAAM,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC/D,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;YACvB,OAAO,IAAI,CAAC;SACb;QAED,OAAO;YACL,IAAI,EAAE,UAAU;YAChB,MAAM;SACP,CAAC;IACJ,CAAC;CACF;AAED,MAAM,CAAC,OAAO,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const models_1 = require("@appland/models");
4
- function deserializeFilter(serializedFilter, limitRootEvents, hideMediaRequests) {
5
- const filterOrState = (0, models_1.deserializeAppmapState)(serializedFilter);
6
- const filter = 'filters' in filterOrState ? filterOrState.filters : filterOrState;
7
- const appmapFilter = new models_1.AppMapFilter();
8
- if (limitRootEvents !== undefined)
9
- appmapFilter.declutter.limitRootEvents.on = limitRootEvents;
10
- if (hideMediaRequests !== undefined)
11
- appmapFilter.declutter.hideMediaRequests.on = hideMediaRequests;
12
- appmapFilter.apply(filter);
13
- return { filter, appmapFilter };
14
- }
15
- exports.default = deserializeFilter;
16
- //# sourceMappingURL=deserializeFilter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deserializeFilter.js","sourceRoot":"","sources":["../../src/lib/deserializeFilter.ts"],"names":[],"mappings":";;AAAA,4CAAuE;AAGvE,SAAwB,iBAAiB,CACvC,gBAAwB,EACxB,eAAyB,EACzB,iBAA2B;IAK3B,MAAM,aAAa,GAAG,IAAA,+BAAsB,EAAC,gBAAgB,CAAC,CAAC;IAC/D,MAAM,MAAM,GAAG,SAAS,IAAI,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC;IAElF,MAAM,YAAY,GAAG,IAAI,qBAAY,EAAE,CAAC;IACxC,IAAI,eAAe,KAAK,SAAS;QAAE,YAAY,CAAC,SAAS,CAAC,eAAe,CAAC,EAAE,GAAG,eAAe,CAAC;IAC/F,IAAI,iBAAiB,KAAK,SAAS;QACjC,YAAY,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,GAAG,iBAAiB,CAAC;IAClE,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAE3B,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;AAClC,CAAC;AAlBD,oCAkBC"}