@appland/scanner 1.87.1 → 1.88.1

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 (43) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/LICENSE.txt +1 -1
  3. package/built/cli/scan/breakpoint.d.ts +0 -2
  4. package/built/cli/scan/command.js +2 -16
  5. package/built/cli/scan/scanner.d.ts +1 -3
  6. package/built/cli/scan/scanner.js +2 -23
  7. package/built/cli/scan/singleScan.d.ts +0 -2
  8. package/built/cli/scan/singleScan.js +4 -16
  9. package/built/cli/scan/watchScan.js +1 -1
  10. package/built/cli.js +0 -6
  11. package/package.json +2 -2
  12. package/built/cli/ci/command.d.ts +0 -8
  13. package/built/cli/ci/command.js +0 -104
  14. package/built/cli/ci/options.d.ts +0 -10
  15. package/built/cli/ci/options.js +0 -2
  16. package/built/cli/merge/command.d.ts +0 -8
  17. package/built/cli/merge/command.js +0 -60
  18. package/built/cli/merge/options.d.ts +0 -7
  19. package/built/cli/merge/options.js +0 -2
  20. package/built/cli/resolveAppId.d.ts +0 -1
  21. package/built/cli/resolveAppId.js +0 -54
  22. package/built/cli/upload/command.d.ts +0 -8
  23. package/built/cli/upload/command.js +0 -72
  24. package/built/cli/upload/options.d.ts +0 -11
  25. package/built/cli/upload/options.js +0 -2
  26. package/built/cli/upload/pruneAppMap.d.ts +0 -4
  27. package/built/cli/upload/pruneAppMap.js +0 -20
  28. package/built/cli/upload.d.ts +0 -5
  29. package/built/cli/upload.js +0 -100
  30. package/built/findings.d.ts +0 -3
  31. package/built/findings.js +0 -14
  32. package/built/integration/appland/location.d.ts +0 -5
  33. package/built/integration/appland/location.js +0 -2
  34. package/built/integration/appland/retry.d.ts +0 -5
  35. package/built/integration/appland/retry.js +0 -25
  36. package/built/integration/appland/retryOptions.d.ts +0 -4
  37. package/built/integration/appland/retryOptions.js +0 -2
  38. package/built/integration/appland/scannerJob/create.d.ts +0 -11
  39. package/built/integration/appland/scannerJob/create.js +0 -56
  40. package/built/integration/appland/scannerJob/merge.d.ts +0 -5
  41. package/built/integration/appland/scannerJob/merge.js +0 -46
  42. package/built/integration/appland/scannerJob.d.ts +0 -11
  43. package/built/integration/appland/scannerJob.js +0 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [@appland/scanner-v1.88.1](https://github.com/getappmap/appmap-js/compare/@appland/scanner-v1.88.0...@appland/scanner-v1.88.1) (2025-05-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Update pkg dependency to use patched version ([173c58a](https://github.com/getappmap/appmap-js/commit/173c58a027ef1ab9b3fa81bfc9986af3dfc662a2))
7
+
8
+ # [@appland/scanner-v1.88.0](https://github.com/getappmap/appmap-js/compare/@appland/scanner-v1.87.1...@appland/scanner-v1.88.0) (2024-08-16)
9
+
10
+
11
+ ### Features
12
+
13
+ * Remove unused @appland/client commands ([a54f352](https://github.com/getappmap/appmap-js/commit/a54f3521dd6eea9336dc4265123bd726869491e8))
14
+
1
15
  # [@appland/scanner-v1.87.1](https://github.com/getappmap/appmap-js/compare/@appland/scanner-v1.87.0...@appland/scanner-v1.87.1) (2024-07-25)
2
16
 
3
17
 
package/LICENSE.txt CHANGED
@@ -12,7 +12,7 @@ Software: @appland/scanner
12
12
 
13
13
  License: MIT License
14
14
 
15
- Copyright 2024, AppLand Inc
15
+ Copyright 2025, AppLand Inc
16
16
 
17
17
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
18
18
  to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
@@ -1,4 +1,3 @@
1
- import { AppMap } from '@appland/client';
2
1
  import { Event } from '@appland/models';
3
2
  import Check from '../../check';
4
3
  import { MatchResult } from '../../types';
@@ -6,7 +5,6 @@ export declare type ExecutionContext = {
6
5
  counter: number;
7
6
  depth: number;
8
7
  eventName: string;
9
- appMap?: AppMap;
10
8
  appMapFileName?: string;
11
9
  check?: Check;
12
10
  event?: Event;
@@ -17,7 +17,6 @@ const util_1 = require("../../rules/lib/util");
17
17
  const appmapDirFromConfig_1 = require("../appmapDirFromConfig");
18
18
  const validateFile_1 = __importDefault(require("../validateFile"));
19
19
  const scanArgs_1 = __importDefault(require("../scanArgs"));
20
- const resolveAppId_1 = __importDefault(require("../resolveAppId"));
21
20
  const singleScan_1 = __importDefault(require("./singleScan"));
22
21
  const watchScan_1 = __importDefault(require("./watchScan"));
23
22
  const configurationProvider_1 = require("../../configuration/configurationProvider");
@@ -40,11 +39,6 @@ exports.default = {
40
39
  describe: 'choose your IDE protocol to open AppMaps directly in your IDE.',
41
40
  options: ['vscode', 'x-mine', 'idea', 'pycharm'],
42
41
  });
43
- args.option('all', {
44
- describe: 'report all findings, including duplicates of known findings',
45
- default: false,
46
- type: 'boolean',
47
- });
48
42
  args.option('watch', {
49
43
  describe: 'scan code changes and report findings on changed files',
50
44
  default: false,
@@ -55,7 +49,7 @@ exports.default = {
55
49
  handler(options) {
56
50
  return __awaiter(this, void 0, void 0, function* () {
57
51
  let { appmapDir } = options;
58
- const { appmapFile, directory, interactive, config: configFile, verbose: isVerbose, all: reportAllFindings, watch, app: appIdArg, apiKey, ide, reportFile, } = options;
52
+ const { appmapFile, directory, interactive, config: configFile, verbose: isVerbose, watch, apiKey, ide, reportFile, } = options;
59
53
  if (isVerbose) {
60
54
  (0, util_1.verbose)(true);
61
55
  }
@@ -66,20 +60,14 @@ exports.default = {
66
60
  if (appmapFile && watch) {
67
61
  throw new errors_1.ValidationError('Use --appmap-file or --watch, but not both');
68
62
  }
69
- if (reportAllFindings && watch) {
70
- throw new errors_1.ValidationError(`Don't use --all with --watch, because in watch mode all findings are reported`);
71
- }
72
63
  if (appmapDir)
73
64
  yield (0, validateFile_1.default)('directory', appmapDir);
74
65
  if (!appmapFile && !appmapDir) {
75
66
  appmapDir = (yield (0, appmapDirFromConfig_1.appmapDirFromConfig)()) || '.';
76
67
  }
77
- let appId = appIdArg;
78
- if (!watch && !reportAllFindings)
79
- appId = yield (0, resolveAppId_1.default)(appIdArg, appmapDir);
80
68
  if (watch) {
81
69
  const watchAppMapDir = appmapDir;
82
- return (0, watchScan_1.default)({ appId, appmapDir: watchAppMapDir, configFile });
70
+ return (0, watchScan_1.default)({ appmapDir: watchAppMapDir, configFile });
83
71
  }
84
72
  else {
85
73
  const configuration = yield (0, configurationProvider_1.parseConfigFile)(configFile);
@@ -95,8 +83,6 @@ exports.default = {
95
83
  appmapFile,
96
84
  appmapDir,
97
85
  configuration,
98
- reportAllFindings,
99
- appId,
100
86
  ide,
101
87
  reportFile,
102
88
  });
@@ -1,9 +1,7 @@
1
- import { FindingStatusListItem } from '@appland/client/dist/src';
2
1
  import Configuration from '../../configuration/types/configuration';
3
2
  import { ScanResults } from '../../report/scanResults';
4
3
  export interface Scanner {
5
4
  scan(): Promise<ScanResults>;
6
5
  scan(skipErrors: boolean): Promise<ScanResults>;
7
- fetchFindingStatus(appId?: string, appMapDir?: string): Promise<FindingStatusListItem[]>;
8
6
  }
9
- export default function scanner(reportAllFindings: boolean, configuration: Configuration, files: string[]): Promise<Scanner>;
7
+ export default function scanner(configuration: Configuration, files: string[]): Promise<Scanner>;
@@ -12,20 +12,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- const src_1 = require("@appland/client/dist/src");
16
15
  const configurationProvider_1 = require("../../configuration/configurationProvider");
17
- const resolveAppId_1 = __importDefault(require("../resolveAppId"));
18
16
  const scan_1 = __importDefault(require("../scan"));
19
17
  const scanResults_1 = require("../../report/scanResults");
20
- function scanner(reportAllFindings, configuration, files) {
18
+ function scanner(configuration, files) {
21
19
  return __awaiter(this, void 0, void 0, function* () {
22
- if (reportAllFindings) {
23
- return new StandaloneScanner(configuration, files);
24
- }
25
- else {
26
- yield (0, src_1.loadConfiguration)();
27
- return new ServerIntegratedScanner(configuration, files);
28
- }
20
+ return new StandaloneScanner(configuration, files);
29
21
  });
30
22
  }
31
23
  exports.default = scanner;
@@ -42,23 +34,10 @@ class ScannerBase {
42
34
  });
43
35
  }
44
36
  }
45
- class ServerIntegratedScanner extends ScannerBase {
46
- fetchFindingStatus(appIdArg, appMapDir) {
47
- return __awaiter(this, void 0, void 0, function* () {
48
- const appId = yield (0, resolveAppId_1.default)(appIdArg, appMapDir);
49
- return yield new src_1.App(appId).listFindingStatus();
50
- });
51
- }
52
- }
53
37
  class StandaloneScanner extends ScannerBase {
54
38
  verifyServerConfiguration() {
55
39
  return __awaiter(this, void 0, void 0, function* () {
56
40
  return true;
57
41
  });
58
42
  }
59
- fetchFindingStatus() {
60
- return __awaiter(this, void 0, void 0, function* () {
61
- return [];
62
- });
63
- }
64
43
  }
@@ -3,9 +3,7 @@ declare type SingleScanOptions = {
3
3
  appmapFile?: string | string[];
4
4
  appmapDir?: string;
5
5
  configuration: Configuration;
6
- reportAllFindings: boolean;
7
6
  reportFile: string;
8
- appId?: string;
9
7
  ide?: string;
10
8
  };
11
9
  export default function singleScan(options: SingleScanOptions): Promise<void>;
@@ -15,7 +15,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const promises_1 = require("fs/promises");
16
16
  const scanner_1 = __importDefault(require("./scanner"));
17
17
  const errors_1 = require("../../errors");
18
- const findings_1 = require("../../findings");
19
18
  const findingsReport_1 = __importDefault(require("../../report/findingsReport"));
20
19
  const summaryReport_1 = __importDefault(require("../../report/summaryReport"));
21
20
  const formatReport_1 = require("./formatReport");
@@ -23,27 +22,16 @@ const util_1 = require("../../rules/lib/util");
23
22
  const validateFile_1 = __importDefault(require("../validateFile"));
24
23
  function singleScan(options) {
25
24
  return __awaiter(this, void 0, void 0, function* () {
26
- const { appmapFile, appmapDir, configuration, reportAllFindings, appId, ide, reportFile } = options;
25
+ const { appmapFile, appmapDir, configuration, ide, reportFile } = options;
27
26
  const skipErrors = appmapDir !== undefined;
28
27
  const files = yield (0, util_1.collectAppMapFiles)(appmapFile, appmapDir);
29
28
  yield Promise.all(files.map((file) => __awaiter(this, void 0, void 0, function* () { return (0, validateFile_1.default)('file', file); })));
30
- const scanner = yield (0, scanner_1.default)(reportAllFindings, configuration, files).catch((error) => {
29
+ const scanner = yield (0, scanner_1.default)(configuration, files).catch((error) => {
31
30
  throw new errors_1.ValidationError(error.message + '\nUse --all to perform an offline scan.');
32
31
  });
33
32
  const startTime = Date.now();
34
- const [rawScanResults, findingStatuses] = yield Promise.all([
35
- scanner.scan(skipErrors),
36
- scanner.fetchFindingStatus(appId, appmapDir),
37
- ]);
38
- // Always report the raw data
39
- yield (0, promises_1.writeFile)(reportFile, (0, formatReport_1.formatReport)(rawScanResults));
40
- let scanResults;
41
- if (reportAllFindings) {
42
- scanResults = rawScanResults;
43
- }
44
- else {
45
- scanResults = rawScanResults.withFindings((0, findings_1.newFindings)(rawScanResults.findings, findingStatuses));
46
- }
33
+ const scanResults = yield scanner.scan(skipErrors);
34
+ yield (0, promises_1.writeFile)(reportFile, (0, formatReport_1.formatReport)(scanResults));
47
35
  (0, findingsReport_1.default)(scanResults.findings, scanResults.appMapMetadata, ide);
48
36
  console.log();
49
37
  (0, summaryReport_1.default)(scanResults, true);
@@ -190,7 +190,7 @@ class Watcher {
190
190
  return;
191
191
  }
192
192
  const startTime = Date.now();
193
- const scanner = yield (0, scanner_1.default)(true, this.config, [appmapFile]);
193
+ const scanner = yield (0, scanner_1.default)(this.config, [appmapFile]);
194
194
  const rawScanResults = yield scanner.scan();
195
195
  const elapsed = Date.now() - startTime;
196
196
  this.scanEventEmitter.emit('scan', { scanResults: rawScanResults, elapsed });
package/built/cli.js CHANGED
@@ -6,9 +6,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  const yargs_1 = __importDefault(require("yargs"));
8
8
  const command_1 = __importDefault(require("./cli/scan/command"));
9
- const command_2 = __importDefault(require("./cli/upload/command"));
10
- const command_3 = __importDefault(require("./cli/ci/command"));
11
- const command_4 = __importDefault(require("./cli/merge/command"));
12
9
  const util_1 = require("./rules/lib/util");
13
10
  const errors_1 = require("./errors");
14
11
  const exitCode_1 = require("./cli/exitCode");
@@ -41,9 +38,6 @@ function handleError(err) {
41
38
  alias: 'v',
42
39
  })
43
40
  .command(command_1.default)
44
- .command(command_2.default)
45
- .command(command_3.default)
46
- .command(command_4.default)
47
41
  .fail((msg, err, yargs) => {
48
42
  if (msg) {
49
43
  console.warn(yargs.help());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appland/scanner",
3
- "version": "1.87.1",
3
+ "version": "1.88.1",
4
4
  "description": "Analyze AppMaps for code flaws",
5
5
  "bin": "built/cli.js",
6
6
  "main": "built/index.js",
@@ -51,7 +51,7 @@
51
51
  "jest": "^29.5.0",
52
52
  "nock": "^13.2.2",
53
53
  "openapi-types": "^9.3.0",
54
- "pkg": "^5.8.0",
54
+ "pkg": "5.8.1-patched",
55
55
  "prettier": "^2.7.1",
56
56
  "semantic-release": "^19.0.2",
57
57
  "sinon": "^13.0.1",
@@ -1,8 +0,0 @@
1
- import { Arguments, Argv } from 'yargs';
2
- declare const _default: {
3
- command: string;
4
- describe: string;
5
- builder(args: Argv): Argv;
6
- handler(options: Arguments): Promise<void>;
7
- };
8
- export default _default;
@@ -1,104 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- const glob_1 = require("glob");
16
- const promises_1 = require("fs/promises");
17
- const util_1 = require("util");
18
- const configurationProvider_1 = require("../../configuration/configurationProvider");
19
- const errors_1 = require("../../errors");
20
- const util_2 = require("../../rules/lib/util");
21
- const appmapDirFromConfig_1 = require("../appmapDirFromConfig");
22
- const findings_1 = require("../../findings");
23
- const findingsReport_1 = __importDefault(require("../../report/findingsReport"));
24
- const summaryReport_1 = __importDefault(require("../../report/summaryReport"));
25
- const resolveAppId_1 = __importDefault(require("../resolveAppId"));
26
- const validateFile_1 = __importDefault(require("../validateFile"));
27
- const upload_1 = __importDefault(require("../upload"));
28
- const scanner_1 = __importDefault(require("../scan/scanner"));
29
- const scanArgs_1 = __importDefault(require("../scanArgs"));
30
- const updateCommitStatus_1 = __importDefault(require("../updateCommitStatus"));
31
- const reportUploadURL_1 = __importDefault(require("../reportUploadURL"));
32
- const fail_1 = __importDefault(require("../fail"));
33
- const codeVersionArgs_1 = __importDefault(require("../codeVersionArgs"));
34
- const handleWorkingDirectory_1 = require("../handleWorkingDirectory");
35
- exports.default = {
36
- command: 'ci',
37
- describe: 'Scan AppMaps, report findings to AppMap Server, and update SCM status',
38
- builder(args) {
39
- (0, scanArgs_1.default)(args);
40
- (0, codeVersionArgs_1.default)(args);
41
- args.option('fail', {
42
- describe: 'exit with non-zero status if there are any new findings',
43
- default: false,
44
- type: 'boolean',
45
- });
46
- args.option('update-commit-status', {
47
- describe: 'update commit status in SCM system',
48
- default: false,
49
- type: 'boolean',
50
- });
51
- args.option('upload', {
52
- describe: 'upload findings to AppMap server',
53
- default: true,
54
- type: 'boolean',
55
- });
56
- args.option('merge-key', {
57
- describe: 'build job identifier. This is used to merge findings from parallelized scans',
58
- });
59
- return args.strict();
60
- },
61
- handler(options) {
62
- return __awaiter(this, void 0, void 0, function* () {
63
- let { appmapDir } = options;
64
- const { config, verbose: isVerbose, fail: failOption, app: appIdArg, directory, reportFile, upload: doUpload, updateCommitStatus: updateCommitStatusOption, mergeKey, commit, branch, environment, } = options;
65
- if (isVerbose) {
66
- (0, util_2.verbose)(true);
67
- }
68
- (0, handleWorkingDirectory_1.handleWorkingDirectory)(directory);
69
- if (!appmapDir) {
70
- appmapDir = yield (0, appmapDirFromConfig_1.appmapDirFromConfig)();
71
- }
72
- if (!appmapDir)
73
- throw new errors_1.ValidationError('appmapDir must be provided as a command option, or available in appmap.yml');
74
- yield (0, validateFile_1.default)('directory', appmapDir);
75
- const appId = yield (0, resolveAppId_1.default)(appIdArg, appmapDir);
76
- const glob = (0, util_1.promisify)(glob_1.glob);
77
- const files = yield glob(`${appmapDir}/**/*.appmap.json`);
78
- const configData = yield (0, configurationProvider_1.parseConfigFile)(config);
79
- const scanner = yield (0, scanner_1.default)(false, configData, files);
80
- const [rawScanResults, findingStatuses] = yield Promise.all([scanner.scan(), scanner.fetchFindingStatus(appIdArg, appmapDir)]);
81
- // Always report the raw data
82
- yield (0, promises_1.writeFile)(reportFile, JSON.stringify(rawScanResults, null, 2));
83
- const scanResults = rawScanResults.withFindings((0, findings_1.newFindings)(rawScanResults.findings, findingStatuses));
84
- (0, findingsReport_1.default)(scanResults.findings, scanResults.appMapMetadata);
85
- (0, summaryReport_1.default)(scanResults, true);
86
- if (doUpload) {
87
- const uploadResponse = yield (0, upload_1.default)(rawScanResults, appId, appmapDir, mergeKey, {
88
- branch,
89
- commit,
90
- environment,
91
- }, {
92
- maxRetries: 3,
93
- });
94
- (0, reportUploadURL_1.default)(uploadResponse.summary.numFindings, uploadResponse.url);
95
- }
96
- if (updateCommitStatusOption) {
97
- yield (0, updateCommitStatus_1.default)(scanResults.findings.length, scanResults.summary.numChecks);
98
- }
99
- if (failOption) {
100
- (0, fail_1.default)(scanResults.findings.length);
101
- }
102
- });
103
- },
104
- };
@@ -1,10 +0,0 @@
1
- import ScanOptions from '../scanOptions';
2
- export default interface CommandOptions extends ScanOptions {
3
- fail?: boolean;
4
- upload: boolean;
5
- updateCommitStatus: boolean;
6
- mergeKey?: string;
7
- branch?: string;
8
- commit?: string;
9
- environment?: string;
10
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +0,0 @@
1
- import { Arguments, Argv } from 'yargs';
2
- declare const _default: {
3
- command: string;
4
- describe: string;
5
- builder(args: Argv): Argv;
6
- handler(options: Arguments): Promise<void>;
7
- };
8
- export default _default;
@@ -1,60 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- const util_1 = require("../../rules/lib/util");
16
- const merge_1 = require("../../integration/appland/scannerJob/merge");
17
- const resolveAppId_1 = __importDefault(require("../resolveAppId"));
18
- const updateCommitStatus_1 = __importDefault(require("../updateCommitStatus"));
19
- const fail_1 = __importDefault(require("../fail"));
20
- exports.default = {
21
- command: 'merge <merge-key>',
22
- describe: 'Merge scan results from parallel scans',
23
- builder(args) {
24
- args.option('app', {
25
- describe: 'name of the app to publish the findings for. By default, this is determined by looking in appmap.yml',
26
- });
27
- args.option('fail', {
28
- describe: 'exit with non-zero status if there are any new findings',
29
- default: false,
30
- type: 'boolean',
31
- });
32
- args.option('update-commit-status', {
33
- describe: 'update commit status in SCM system',
34
- default: false,
35
- type: 'boolean',
36
- });
37
- args.positional('merge-key', {
38
- describe: 'build job identifier. This is used to merge findings from parallelized scans',
39
- type: 'string',
40
- });
41
- return args.strict();
42
- },
43
- handler(options) {
44
- return __awaiter(this, void 0, void 0, function* () {
45
- const { verbose: isVerbose, app: appIdArg, fail: failOption, updateCommitStatus: updateCommitStatusOption, mergeKey, } = options;
46
- if (isVerbose) {
47
- (0, util_1.verbose)(true);
48
- }
49
- const appId = yield (0, resolveAppId_1.default)(appIdArg, '.');
50
- const mergeResults = yield (0, merge_1.merge)(appId, mergeKey);
51
- console.warn(`Merged results to ${mergeResults.url}`);
52
- if (updateCommitStatusOption) {
53
- yield (0, updateCommitStatus_1.default)(mergeResults.summary.numFindings, mergeResults.summary.numChecks);
54
- }
55
- if (failOption) {
56
- (0, fail_1.default)(mergeResults.summary.numFindings);
57
- }
58
- });
59
- },
60
- };
@@ -1,7 +0,0 @@
1
- export default interface CommandOptions {
2
- verbose?: boolean;
3
- mergeKey: string;
4
- app?: string;
5
- fail?: boolean;
6
- updateCommitStatus: boolean;
7
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export default function (appIdArg: string | undefined, appMapDir: string | undefined): Promise<string>;
@@ -1,54 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const src_1 = require("@appland/client/dist/src");
13
- const fs_1 = require("fs");
14
- const promises_1 = require("fs/promises");
15
- const js_yaml_1 = require("js-yaml");
16
- const path_1 = require("path");
17
- const errors_1 = require("../errors");
18
- function resolveAppId(appIdArg, appMapDir) {
19
- return __awaiter(this, void 0, void 0, function* () {
20
- if (appIdArg) {
21
- return appIdArg;
22
- }
23
- if (appMapDir) {
24
- let searchPath = (0, path_1.resolve)(appMapDir);
25
- while (searchPath !== '/' && searchPath !== '.') {
26
- const configPath = (0, path_1.join)(searchPath, 'appmap.yml');
27
- try {
28
- yield (0, promises_1.access)(configPath, fs_1.constants.R_OK);
29
- }
30
- catch (_a) {
31
- searchPath = (0, path_1.dirname)(searchPath);
32
- continue;
33
- }
34
- const configContent = yield (0, promises_1.readFile)(configPath, 'utf-8');
35
- const config = (0, js_yaml_1.load)(configContent);
36
- if (config.name)
37
- return config.name;
38
- }
39
- }
40
- });
41
- }
42
- function default_1(appIdArg, appMapDir) {
43
- return __awaiter(this, void 0, void 0, function* () {
44
- const appId = yield resolveAppId(appIdArg, appMapDir);
45
- if (!appId)
46
- throw new errors_1.ValidationError('App was not provided and could not be resolved');
47
- const appExists = yield new src_1.App(appId).exists();
48
- if (!appExists) {
49
- throw new errors_1.ValidationError(`App "${appId}" is not valid or does not exist.\nPlease fix the app name in the appmap.yml file, or override it with the --app option.`);
50
- }
51
- return appId;
52
- });
53
- }
54
- exports.default = default_1;
@@ -1,8 +0,0 @@
1
- import { Arguments, Argv } from 'yargs';
2
- declare const _default: {
3
- command: string;
4
- describe: string;
5
- builder(args: Argv): Argv;
6
- handler(options: Arguments): Promise<void>;
7
- };
8
- export default _default;
@@ -1,72 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- const promises_1 = require("fs/promises");
16
- const util_1 = require("../../rules/lib/util");
17
- const appmapDirFromConfig_1 = require("../appmapDirFromConfig");
18
- const validateFile_1 = __importDefault(require("../validateFile"));
19
- const resolveAppId_1 = __importDefault(require("../resolveAppId"));
20
- const reportUploadURL_1 = __importDefault(require("../reportUploadURL"));
21
- const upload_1 = __importDefault(require("../upload"));
22
- const codeVersionArgs_1 = __importDefault(require("../codeVersionArgs"));
23
- const errors_1 = require("../../errors");
24
- const handleWorkingDirectory_1 = require("../handleWorkingDirectory");
25
- exports.default = {
26
- command: 'upload',
27
- describe: 'Upload Findings to the AppMap Server',
28
- builder(args) {
29
- (0, codeVersionArgs_1.default)(args);
30
- args.option('directory', {
31
- describe: 'program working directory',
32
- type: 'string',
33
- alias: 'd',
34
- });
35
- args.option('appmap-dir', {
36
- describe: 'base directory of AppMaps',
37
- });
38
- args.option('report-file', {
39
- describe: 'file containing the findings report',
40
- default: 'appmap-findings.json',
41
- });
42
- args.option('app', {
43
- describe: 'name of the app to publish the findings for. By default, this is determined by looking in appmap.yml',
44
- });
45
- args.option('merge-key', {
46
- describe: 'build job identifier. This is used to merge findings from parallelized scans',
47
- });
48
- return args.strict();
49
- },
50
- handler(options) {
51
- return __awaiter(this, void 0, void 0, function* () {
52
- let { appmapDir } = options;
53
- const { verbose: isVerbose, directory, reportFile, app: appIdArg, mergeKey, branch, commit, environment, } = options;
54
- if (isVerbose) {
55
- (0, util_1.verbose)(true);
56
- }
57
- (0, handleWorkingDirectory_1.handleWorkingDirectory)(directory);
58
- if (!appmapDir) {
59
- appmapDir = yield (0, appmapDirFromConfig_1.appmapDirFromConfig)();
60
- }
61
- if (!appmapDir)
62
- throw new errors_1.ValidationError('appmapDir must be provided as a command option, or available in appmap.yml');
63
- yield (0, validateFile_1.default)('directory', appmapDir);
64
- const appId = yield (0, resolveAppId_1.default)(appIdArg, appmapDir);
65
- const scanResults = JSON.parse((yield (0, promises_1.readFile)(reportFile)).toString());
66
- const uploadResponse = yield (0, upload_1.default)(scanResults, appId, appmapDir, mergeKey, { branch, commit, environment }, {
67
- maxRetries: 3,
68
- });
69
- (0, reportUploadURL_1.default)(uploadResponse.summary.numFindings, uploadResponse.url);
70
- });
71
- },
72
- };
@@ -1,11 +0,0 @@
1
- export default interface CommandOptions {
2
- verbose?: boolean;
3
- reportFile: string;
4
- directory?: string;
5
- appmapDir?: string;
6
- app?: string;
7
- mergeKey?: string;
8
- branch?: string;
9
- commit?: string;
10
- environment?: string;
11
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- import { AppMapBuilder } from '@appland/models';
2
- export declare function maxAppMapSize(): number;
3
- export declare function pruneAppMap(builder: AppMapBuilder, maxSize: number): AppMapBuilder;
4
- export declare function buildAppMap(appMapJson: Record<string, unknown>): AppMapBuilder;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buildAppMap = exports.pruneAppMap = exports.maxAppMapSize = void 0;
4
- const models_1 = require("@appland/models");
5
- const APPMAP_UPLOAD_MAX_SIZE = parseInt(process.env.APPMAP_UPLOAD_MAX_SIZE || '40960') * 1024;
6
- if (!APPMAP_UPLOAD_MAX_SIZE) {
7
- throw Error(`Failed parsing APPMAP_UPLOAD_MAX_SIZE: "${process.env.APPMAP_UPLOAD_MAX_SIZE}"`);
8
- }
9
- function maxAppMapSize() {
10
- return APPMAP_UPLOAD_MAX_SIZE;
11
- }
12
- exports.maxAppMapSize = maxAppMapSize;
13
- function pruneAppMap(builder, maxSize) {
14
- return builder.prune(maxSize);
15
- }
16
- exports.pruneAppMap = pruneAppMap;
17
- function buildAppMap(appMapJson) {
18
- return (0, models_1.buildAppMap)().source(appMapJson);
19
- }
20
- exports.buildAppMap = buildAppMap;
@@ -1,5 +0,0 @@
1
- import { CreateMapsetOptions } from '@appland/client/dist/src';
2
- import { ScanResults } from '../report/scanResults';
3
- import { UploadResponse } from '../integration/appland/scannerJob/create';
4
- import { RetryOptions } from '../integration/appland/retryOptions';
5
- export default function create(scanResults: ScanResults, appId: string, appMapDir: string, mergeKey?: string, mapsetOptions?: CreateMapsetOptions, retryOptions?: RetryOptions): Promise<UploadResponse>;
@@ -1,100 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const async_1 = require("async");
13
- const promises_1 = require("fs/promises");
14
- const src_1 = require("@appland/client/dist/src");
15
- const util_1 = require("../rules/lib/util");
16
- const create_1 = require("../integration/appland/scannerJob/create");
17
- const vars_1 = require("../integration/vars");
18
- const path_1 = require("path");
19
- const pruneAppMap_1 = require("./upload/pruneAppMap");
20
- function create(scanResults, appId, appMapDir, mergeKey, mapsetOptions = {}, retryOptions = {}) {
21
- return __awaiter(this, void 0, void 0, function* () {
22
- if ((0, util_1.verbose)())
23
- console.log(`Uploading AppMaps and findings to application '${appId}'`);
24
- const { findings } = scanResults;
25
- const relevantFilePaths = [
26
- ...new Set(findings.filter((f) => f.appMapFile).map((f) => f.appMapFile)),
27
- ];
28
- const appMapUUIDByFileName = {};
29
- const branchCount = {};
30
- const commitCount = {};
31
- const createAppMapOptions = {
32
- app: appId,
33
- };
34
- const q = (0, async_1.queue)((filePath, callback) => __awaiter(this, void 0, void 0, function* () {
35
- if ((0, util_1.verbose)())
36
- console.log(`Uploading AppMap ${filePath}`);
37
- const filePaths = [filePath, (0, path_1.join)(appMapDir, filePath)];
38
- const filePathsExist = yield Promise.all(filePaths.map(util_1.fileExists));
39
- const fullPath = filePaths.find((_, fileIndex) => filePathsExist[fileIndex]);
40
- if (!fullPath)
41
- throw new Error(`File ${filePath} not found`);
42
- (0, promises_1.readFile)(fullPath)
43
- .then((buffer) => {
44
- const maxSize = (0, pruneAppMap_1.maxAppMapSize)();
45
- const appMapJson = JSON.parse(buffer.toString());
46
- const builder = (0, pruneAppMap_1.buildAppMap)(appMapJson);
47
- let metadata = appMapJson.metadata;
48
- if (buffer.byteLength > maxSize) {
49
- console.warn(`${fullPath} is larger than ${maxSize / 1024}K, pruning it`);
50
- (0, pruneAppMap_1.pruneAppMap)(builder, maxSize);
51
- }
52
- const prunedAppMap = builder.normalize().build();
53
- metadata = prunedAppMap.metadata;
54
- buffer = Buffer.from(JSON.stringify(prunedAppMap));
55
- return { metadata, buffer };
56
- })
57
- .then(({ metadata, buffer }) => {
58
- var _a, _b;
59
- const branch = (_a = metadata.git) === null || _a === void 0 ? void 0 : _a.branch;
60
- const commit = (_b = metadata.git) === null || _b === void 0 ? void 0 : _b.commit;
61
- if (branch) {
62
- branchCount[branch] || (branchCount[branch] = 1);
63
- branchCount[branch] += 1;
64
- }
65
- if (commit) {
66
- commitCount[commit] || (commitCount[commit] = 1);
67
- commitCount[commit] += 1;
68
- }
69
- return src_1.AppMap.create(buffer, Object.assign(retryOptions, Object.assign(Object.assign({}, createAppMapOptions), { metadata })));
70
- })
71
- .then((appMap) => {
72
- if (appMap) {
73
- appMapUUIDByFileName[filePath] = appMap.uuid;
74
- }
75
- })
76
- .then(() => callback(null))
77
- .catch(callback);
78
- }), 3);
79
- q.error((err, filePath) => {
80
- console.error(`An error occurred uploading ${filePath}: ${err}`);
81
- });
82
- if ((0, util_1.verbose)())
83
- console.log(`Uploading ${relevantFilePaths.length} AppMaps`);
84
- q.push(relevantFilePaths);
85
- if (!q.idle())
86
- yield q.drain();
87
- const mostFrequent = (counts) => {
88
- if (Object.keys(counts).length === 0)
89
- return;
90
- const maxCount = Object.values(counts).reduce((max, count) => Math.max(max, count), 0);
91
- return Object.entries(counts).find((e) => e[1] === maxCount)[0];
92
- };
93
- mapsetOptions.branch || (mapsetOptions.branch = (0, vars_1.branch)() || mostFrequent(branchCount));
94
- mapsetOptions.commit || (mapsetOptions.commit = (0, vars_1.sha)() || mostFrequent(commitCount));
95
- const mapset = yield src_1.Mapset.create(appId, Object.values(appMapUUIDByFileName), mapsetOptions, retryOptions);
96
- console.warn('Uploading findings');
97
- return (0, create_1.create)(scanResults, mapset.id, appMapUUIDByFileName, { mergeKey }, retryOptions);
98
- });
99
- }
100
- exports.default = create;
@@ -1,3 +0,0 @@
1
- import { FindingStatusListItem } from '@appland/client/dist/src';
2
- import { Finding } from './index';
3
- export declare function newFindings(findings: Finding[], findingStatuses: FindingStatusListItem[]): Finding[];
package/built/findings.js DELETED
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newFindings = void 0;
4
- function newFindings(findings, findingStatuses) {
5
- const statusByFindingDigest = findingStatuses.reduce((memo, findingStatus) => {
6
- memo.set(findingStatus.identity_hash, findingStatus.status);
7
- return memo;
8
- }, new Map());
9
- return findings.filter((finding) => {
10
- const status = statusByFindingDigest.get(finding.hash);
11
- return !status || status === 'new';
12
- });
13
- }
14
- exports.newFindings = newFindings;
@@ -1,5 +0,0 @@
1
- /// <reference types="node" />
2
- import { URL } from 'url';
3
- export default interface Location {
4
- url: URL;
5
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +0,0 @@
1
- /// <reference types="node" />
2
- import { IncomingMessage } from 'http';
3
- import { RetryOptions } from './retryOptions';
4
- import { RetryHandler } from '@appland/client/dist/src/retryHandler';
5
- export default function retry(description: string, retryOptions: RetryOptions, retryFn: () => Promise<IncomingMessage>): RetryHandler;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const util_1 = require("../../rules/lib/util");
4
- const RetryDelay = 500;
5
- const MaxRetries = 3;
6
- function retry(description, retryOptions, retryFn) {
7
- var _a, _b;
8
- const maxRetries = (_a = retryOptions.maxRetries) !== null && _a !== void 0 ? _a : MaxRetries;
9
- const retryDelay = (_b = retryOptions.retryDelay) !== null && _b !== void 0 ? _b : RetryDelay;
10
- let retryCount = 0;
11
- function computeDelay() {
12
- return retryDelay * Math.pow(2, retryCount - 1);
13
- }
14
- return (resolve, reject) => {
15
- retryCount += 1;
16
- if (retryCount > maxRetries) {
17
- reject(new Error(`${description} failed: Max retries exceeded.`));
18
- }
19
- if ((0, util_1.verbose)()) {
20
- console.log(`Retrying ${description} in ${computeDelay()}ms`);
21
- }
22
- setTimeout(() => retryFn().then(resolve).catch(reject), computeDelay());
23
- };
24
- }
25
- exports.default = retry;
@@ -1,4 +0,0 @@
1
- export declare type RetryOptions = {
2
- maxRetries?: number;
3
- retryDelay?: number;
4
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,11 +0,0 @@
1
- import { ScanResults } from '../../../report/scanResults';
2
- import Location from '../location';
3
- import ScannerJob from '../scannerJob';
4
- import { RetryOptions } from '../retryOptions';
5
- declare type CreateOptions = {
6
- mergeKey?: string;
7
- };
8
- export interface UploadResponse extends ScannerJob, Location {
9
- }
10
- export declare function create(scanResults: ScanResults, mapsetId: number, appMapUUIDByFileName: Record<string, string>, createOptions?: CreateOptions, retryOptions?: RetryOptions): Promise<UploadResponse>;
11
- export {};
@@ -1,56 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.create = void 0;
16
- const url_1 = require("url");
17
- const src_1 = require("@appland/client/dist/src");
18
- const util_1 = require("../../../rules/lib/util");
19
- const retry_1 = __importDefault(require("../retry"));
20
- function create(scanResults, mapsetId, appMapUUIDByFileName, createOptions = {}, retryOptions = {}) {
21
- return __awaiter(this, void 0, void 0, function* () {
22
- if ((0, util_1.verbose)())
23
- console.warn('Uploading findings');
24
- let uploadURL;
25
- let request;
26
- const retrier = (0, retry_1.default)(`Create scanner job`, retryOptions, makeRequest);
27
- function makeRequest() {
28
- return __awaiter(this, void 0, void 0, function* () {
29
- const payload = JSON.stringify(Object.assign({ scan_results: scanResults, mapset: mapsetId, appmap_uuid_by_file_name: appMapUUIDByFileName }, { merge_key: createOptions.mergeKey }));
30
- request = yield (0, src_1.buildRequest)('api/scanner_jobs');
31
- return new Promise((resolve, reject) => {
32
- const req = request.requestFunction(request.url, {
33
- method: 'POST',
34
- headers: Object.assign({ 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(payload) }, request.headers),
35
- }, resolve);
36
- req.on('error', (0, src_1.retryOnError)(retrier, resolve, reject));
37
- req.write(payload);
38
- req.end();
39
- }).then((0, src_1.retryOn503)(retrier));
40
- });
41
- }
42
- return makeRequest()
43
- .then(src_1.handleError)
44
- .then((response) => {
45
- if (response.headers.location) {
46
- uploadURL = new url_1.URL(response.headers.location, request.url.href);
47
- }
48
- return (0, src_1.reportJSON)(response);
49
- })
50
- .then((uploadResponse) => {
51
- uploadResponse.url = uploadURL;
52
- return uploadResponse;
53
- });
54
- });
55
- }
56
- exports.create = create;
@@ -1,5 +0,0 @@
1
- import Location from '../location';
2
- import ScannerJob from '../scannerJob';
3
- export interface MergeResponse extends ScannerJob, Location {
4
- }
5
- export declare function merge(appId: string, mergeKey: string): Promise<MergeResponse>;
@@ -1,46 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.merge = void 0;
13
- const src_1 = require("@appland/client/dist/src");
14
- const url_1 = require("url");
15
- function merge(appId, mergeKey) {
16
- return __awaiter(this, void 0, void 0, function* () {
17
- console.log(`Merging scan results in app ${appId} with merge key ${mergeKey}`);
18
- const payload = JSON.stringify({
19
- app: appId,
20
- merge_key: mergeKey,
21
- });
22
- const request = yield (0, src_1.buildRequest)('api/scanner_jobs/merge');
23
- let uploadURL;
24
- return new Promise((resolve, reject) => {
25
- const req = request.requestFunction(request.url, {
26
- method: 'POST',
27
- headers: Object.assign({ 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(payload) }, request.headers),
28
- }, resolve);
29
- req.on('error', reject);
30
- req.write(payload);
31
- req.end();
32
- })
33
- .then(src_1.handleError)
34
- .then((response) => {
35
- if (response.headers.location) {
36
- uploadURL = new url_1.URL(response.headers.location, request.url.href);
37
- }
38
- return (0, src_1.reportJSON)(response);
39
- })
40
- .then((uploadResponse) => {
41
- uploadResponse.url = uploadURL;
42
- return uploadResponse;
43
- });
44
- });
45
- }
46
- exports.merge = merge;
@@ -1,11 +0,0 @@
1
- import { Configuration } from '@appland/client';
2
- import { ScanSummary } from '../../report/scanSummary';
3
- export default interface ScannerJob {
4
- id: number;
5
- created_at: string;
6
- updated_at: string;
7
- mapset_id: number;
8
- merge_key?: string;
9
- summary: ScanSummary;
10
- configuration: Configuration;
11
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });