pkgwise 0.1.0-alpha.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 (128) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +21 -0
  3. package/README.md +17 -0
  4. package/dist/bin/pkgwise.d.ts +3 -0
  5. package/dist/bin/pkgwise.d.ts.map +1 -0
  6. package/dist/bin/pkgwise.js +16 -0
  7. package/dist/bin/pkgwise.js.map +1 -0
  8. package/dist/commands/CommandContext.d.ts +9 -0
  9. package/dist/commands/CommandContext.d.ts.map +1 -0
  10. package/dist/commands/CommandContext.js +2 -0
  11. package/dist/commands/CommandContext.js.map +1 -0
  12. package/dist/commands/createCacheCommand.d.ts +4 -0
  13. package/dist/commands/createCacheCommand.d.ts.map +1 -0
  14. package/dist/commands/createCacheCommand.js +58 -0
  15. package/dist/commands/createCacheCommand.js.map +1 -0
  16. package/dist/commands/createCompareCommand.d.ts +4 -0
  17. package/dist/commands/createCompareCommand.d.ts.map +1 -0
  18. package/dist/commands/createCompareCommand.js +38 -0
  19. package/dist/commands/createCompareCommand.js.map +1 -0
  20. package/dist/commands/createDoctorCommand.d.ts +4 -0
  21. package/dist/commands/createDoctorCommand.d.ts.map +1 -0
  22. package/dist/commands/createDoctorCommand.js +26 -0
  23. package/dist/commands/createDoctorCommand.js.map +1 -0
  24. package/dist/commands/createExplainCommand.d.ts +4 -0
  25. package/dist/commands/createExplainCommand.d.ts.map +1 -0
  26. package/dist/commands/createExplainCommand.js +27 -0
  27. package/dist/commands/createExplainCommand.js.map +1 -0
  28. package/dist/commands/createInspectCommand.d.ts +4 -0
  29. package/dist/commands/createInspectCommand.d.ts.map +1 -0
  30. package/dist/commands/createInspectCommand.js +39 -0
  31. package/dist/commands/createInspectCommand.js.map +1 -0
  32. package/dist/commands/createScanCommand.d.ts +4 -0
  33. package/dist/commands/createScanCommand.d.ts.map +1 -0
  34. package/dist/commands/createScanCommand.js +65 -0
  35. package/dist/commands/createScanCommand.js.map +1 -0
  36. package/dist/createCli.d.ts +12 -0
  37. package/dist/createCli.d.ts.map +1 -0
  38. package/dist/createCli.js +41 -0
  39. package/dist/createCli.js.map +1 -0
  40. package/dist/exit/mapErrorToExitCode.d.ts +2 -0
  41. package/dist/exit/mapErrorToExitCode.d.ts.map +1 -0
  42. package/dist/exit/mapErrorToExitCode.js +31 -0
  43. package/dist/exit/mapErrorToExitCode.js.map +1 -0
  44. package/dist/exit/mapPolicyToExitCode.d.ts +3 -0
  45. package/dist/exit/mapPolicyToExitCode.d.ts.map +1 -0
  46. package/dist/exit/mapPolicyToExitCode.js +4 -0
  47. package/dist/exit/mapPolicyToExitCode.js.map +1 -0
  48. package/dist/index.d.ts +3 -0
  49. package/dist/index.d.ts.map +1 -0
  50. package/dist/index.js +3 -0
  51. package/dist/index.js.map +1 -0
  52. package/dist/io/CliIo.d.ts +10 -0
  53. package/dist/io/CliIo.d.ts.map +1 -0
  54. package/dist/io/CliIo.js +5 -0
  55. package/dist/io/CliIo.js.map +1 -0
  56. package/dist/options/GlobalOptions.d.ts +19 -0
  57. package/dist/options/GlobalOptions.d.ts.map +1 -0
  58. package/dist/options/GlobalOptions.js +2 -0
  59. package/dist/options/GlobalOptions.js.map +1 -0
  60. package/dist/options/createGlobalOptions.d.ts +3 -0
  61. package/dist/options/createGlobalOptions.d.ts.map +1 -0
  62. package/dist/options/createGlobalOptions.js +23 -0
  63. package/dist/options/createGlobalOptions.js.map +1 -0
  64. package/dist/options/parseConcurrency.d.ts +2 -0
  65. package/dist/options/parseConcurrency.d.ts.map +1 -0
  66. package/dist/options/parseConcurrency.js +12 -0
  67. package/dist/options/parseConcurrency.js.map +1 -0
  68. package/dist/options/parseDuration.d.ts +2 -0
  69. package/dist/options/parseDuration.d.ts.map +1 -0
  70. package/dist/options/parseDuration.js +17 -0
  71. package/dist/options/parseDuration.js.map +1 -0
  72. package/dist/options/parseFindingFilters.d.ts +5 -0
  73. package/dist/options/parseFindingFilters.d.ts.map +1 -0
  74. package/dist/options/parseFindingFilters.js +29 -0
  75. package/dist/options/parseFindingFilters.js.map +1 -0
  76. package/dist/options/parseOutputFormat.d.ts +3 -0
  77. package/dist/options/parseOutputFormat.d.ts.map +1 -0
  78. package/dist/options/parseOutputFormat.js +9 -0
  79. package/dist/options/parseOutputFormat.js.map +1 -0
  80. package/dist/options/readGlobalOptions.d.ts +4 -0
  81. package/dist/options/readGlobalOptions.d.ts.map +1 -0
  82. package/dist/options/readGlobalOptions.js +9 -0
  83. package/dist/options/readGlobalOptions.js.map +1 -0
  84. package/dist/output/renderAnalysisReport.d.ts +8 -0
  85. package/dist/output/renderAnalysisReport.d.ts.map +1 -0
  86. package/dist/output/renderAnalysisReport.js +47 -0
  87. package/dist/output/renderAnalysisReport.js.map +1 -0
  88. package/dist/output/renderCliError.d.ts +12 -0
  89. package/dist/output/renderCliError.d.ts.map +1 -0
  90. package/dist/output/renderCliError.js +22 -0
  91. package/dist/output/renderCliError.js.map +1 -0
  92. package/dist/output/renderDoctorReport.d.ts +3 -0
  93. package/dist/output/renderDoctorReport.d.ts.map +1 -0
  94. package/dist/output/renderDoctorReport.js +13 -0
  95. package/dist/output/renderDoctorReport.js.map +1 -0
  96. package/dist/output/renderFindingExplanation.d.ts +3 -0
  97. package/dist/output/renderFindingExplanation.d.ts.map +1 -0
  98. package/dist/output/renderFindingExplanation.js +39 -0
  99. package/dist/output/renderFindingExplanation.js.map +1 -0
  100. package/dist/output/renderMarkdownReport.d.ts +4 -0
  101. package/dist/output/renderMarkdownReport.d.ts.map +1 -0
  102. package/dist/output/renderMarkdownReport.js +113 -0
  103. package/dist/output/renderMarkdownReport.js.map +1 -0
  104. package/dist/output/renderPackageComparison.d.ts +3 -0
  105. package/dist/output/renderPackageComparison.d.ts.map +1 -0
  106. package/dist/output/renderPackageComparison.js +41 -0
  107. package/dist/output/renderPackageComparison.js.map +1 -0
  108. package/dist/output/renderPackageInspection.d.ts +3 -0
  109. package/dist/output/renderPackageInspection.d.ts.map +1 -0
  110. package/dist/output/renderPackageInspection.js +58 -0
  111. package/dist/output/renderPackageInspection.js.map +1 -0
  112. package/dist/output/renderSarifReport.d.ts +3 -0
  113. package/dist/output/renderSarifReport.d.ts.map +1 -0
  114. package/dist/output/renderSarifReport.js +145 -0
  115. package/dist/output/renderSarifReport.js.map +1 -0
  116. package/dist/output/renderStructuredResult.d.ts +3 -0
  117. package/dist/output/renderStructuredResult.d.ts.map +1 -0
  118. package/dist/output/renderStructuredResult.js +20 -0
  119. package/dist/output/renderStructuredResult.js.map +1 -0
  120. package/dist/output/writeTextOutput.d.ts +3 -0
  121. package/dist/output/writeTextOutput.d.ts.map +1 -0
  122. package/dist/output/writeTextOutput.js +22 -0
  123. package/dist/output/writeTextOutput.js.map +1 -0
  124. package/dist/runCli.d.ts +11 -0
  125. package/dist/runCli.d.ts.map +1 -0
  126. package/dist/runCli.js +60 -0
  127. package/dist/runCli.js.map +1 -0
  128. package/package.json +57 -0
@@ -0,0 +1,10 @@
1
+ export interface CliIo {
2
+ readonly stdout: {
3
+ write(chunk: string): unknown;
4
+ };
5
+ readonly stderr: {
6
+ write(chunk: string): unknown;
7
+ };
8
+ }
9
+ export declare const processCliIo: CliIo;
10
+ //# sourceMappingURL=CliIo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CliIo.d.ts","sourceRoot":"","sources":["../../src/io/CliIo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,MAAM,EAAE;QAAE,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IACnD,QAAQ,CAAC,MAAM,EAAE;QAAE,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CACpD;AAED,eAAO,MAAM,YAAY,EAAE,KAG1B,CAAC"}
@@ -0,0 +1,5 @@
1
+ export const processCliIo = {
2
+ stdout: process.stdout,
3
+ stderr: process.stderr,
4
+ };
5
+ //# sourceMappingURL=CliIo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CliIo.js","sourceRoot":"","sources":["../../src/io/CliIo.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,YAAY,GAAU;IACjC,MAAM,EAAE,OAAO,CAAC,MAAM;IACtB,MAAM,EAAE,OAAO,CAAC,MAAM;CACvB,CAAC"}
@@ -0,0 +1,19 @@
1
+ export type OutputFormat = 'terminal' | 'json' | 'sarif' | 'markdown';
2
+ export interface GlobalOptions {
3
+ readonly config?: string;
4
+ readonly format: OutputFormat;
5
+ readonly output?: string;
6
+ readonly root?: string;
7
+ readonly offline: boolean;
8
+ readonly refresh: boolean;
9
+ readonly cache: boolean;
10
+ readonly cacheDir?: string;
11
+ readonly timeout: number;
12
+ readonly concurrency: number;
13
+ readonly ci: boolean;
14
+ readonly quiet: boolean;
15
+ readonly verbose: boolean;
16
+ readonly debug: boolean;
17
+ readonly color: boolean;
18
+ }
19
+ //# sourceMappingURL=GlobalOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GlobalOptions.d.ts","sourceRoot":"","sources":["../../src/options/GlobalOptions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;AAEtE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=GlobalOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GlobalOptions.js","sourceRoot":"","sources":["../../src/options/GlobalOptions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import type { Command } from 'commander';
2
+ export declare function createGlobalOptions(program: Command): Command;
3
+ //# sourceMappingURL=createGlobalOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createGlobalOptions.d.ts","sourceRoot":"","sources":["../../src/options/createGlobalOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAkB7D"}
@@ -0,0 +1,23 @@
1
+ import { parseConcurrency } from './parseConcurrency.js';
2
+ import { parseDuration } from './parseDuration.js';
3
+ import { parseOutputFormat } from './parseOutputFormat.js';
4
+ export function createGlobalOptions(program) {
5
+ return program
6
+ .option('--config <path>', 'use an explicit JSON configuration file')
7
+ .option('--format <format>', 'output format', parseOutputFormat, 'terminal')
8
+ .option('--output <path>', 'write the report atomically to a file')
9
+ .option('--root <path>', 'use an explicit project root')
10
+ .option('--offline', 'disable all network access', false)
11
+ .option('--refresh', 'revalidate cached provider data', false)
12
+ .option('--no-cache', 'disable cache reads and writes')
13
+ .option('--cache-dir <path>', 'use an explicit cache directory')
14
+ .option('--timeout <duration>', 'set the request timeout', parseDuration, 10_000)
15
+ .option('--concurrency <count>', 'set network concurrency (1-32)', parseConcurrency, 12)
16
+ .option('--ci', 'enable deterministic non-interactive behavior', false)
17
+ .option('--quiet', 'suppress nonessential human output', false)
18
+ .option('--verbose', 'enable verbose diagnostics', false)
19
+ .option('--debug', 'enable debug diagnostics and stack traces', false)
20
+ .option('--color', 'force colored terminal output')
21
+ .option('--no-color', 'disable colored terminal output');
22
+ }
23
+ //# sourceMappingURL=createGlobalOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createGlobalOptions.js","sourceRoot":"","sources":["../../src/options/createGlobalOptions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,UAAU,mBAAmB,CAAC,OAAgB;IAClD,OAAO,OAAO;SACX,MAAM,CAAC,iBAAiB,EAAE,yCAAyC,CAAC;SACpE,MAAM,CAAC,mBAAmB,EAAE,eAAe,EAAE,iBAAiB,EAAE,UAAU,CAAC;SAC3E,MAAM,CAAC,iBAAiB,EAAE,uCAAuC,CAAC;SAClE,MAAM,CAAC,eAAe,EAAE,8BAA8B,CAAC;SACvD,MAAM,CAAC,WAAW,EAAE,4BAA4B,EAAE,KAAK,CAAC;SACxD,MAAM,CAAC,WAAW,EAAE,iCAAiC,EAAE,KAAK,CAAC;SAC7D,MAAM,CAAC,YAAY,EAAE,gCAAgC,CAAC;SACtD,MAAM,CAAC,oBAAoB,EAAE,iCAAiC,CAAC;SAC/D,MAAM,CAAC,sBAAsB,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,CAAC;SAChF,MAAM,CAAC,uBAAuB,EAAE,gCAAgC,EAAE,gBAAgB,EAAE,EAAE,CAAC;SACvF,MAAM,CAAC,MAAM,EAAE,+CAA+C,EAAE,KAAK,CAAC;SACtE,MAAM,CAAC,SAAS,EAAE,oCAAoC,EAAE,KAAK,CAAC;SAC9D,MAAM,CAAC,WAAW,EAAE,4BAA4B,EAAE,KAAK,CAAC;SACxD,MAAM,CAAC,SAAS,EAAE,2CAA2C,EAAE,KAAK,CAAC;SACrE,MAAM,CAAC,SAAS,EAAE,+BAA+B,CAAC;SAClD,MAAM,CAAC,YAAY,EAAE,iCAAiC,CAAC,CAAC;AAC7D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function parseConcurrency(value: string): number;
2
+ //# sourceMappingURL=parseConcurrency.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseConcurrency.d.ts","sourceRoot":"","sources":["../../src/options/parseConcurrency.ts"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAWtD"}
@@ -0,0 +1,12 @@
1
+ import { InvalidArgumentError } from 'commander';
2
+ export function parseConcurrency(value) {
3
+ if (!/^\d+$/.test(value)) {
4
+ throw new InvalidArgumentError('Concurrency must be an integer from 1 to 32.');
5
+ }
6
+ const concurrency = Number(value);
7
+ if (concurrency < 1 || concurrency > 32) {
8
+ throw new InvalidArgumentError('Concurrency must be an integer from 1 to 32.');
9
+ }
10
+ return concurrency;
11
+ }
12
+ //# sourceMappingURL=parseConcurrency.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseConcurrency.js","sourceRoot":"","sources":["../../src/options/parseConcurrency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEjD,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,oBAAoB,CAAC,8CAA8C,CAAC,CAAC;IACjF,CAAC;IAED,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAClC,IAAI,WAAW,GAAG,CAAC,IAAI,WAAW,GAAG,EAAE,EAAE,CAAC;QACxC,MAAM,IAAI,oBAAoB,CAAC,8CAA8C,CAAC,CAAC;IACjF,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function parseDuration(value: string): number;
2
+ //# sourceMappingURL=parseDuration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseDuration.d.ts","sourceRoot":"","sources":["../../src/options/parseDuration.ts"],"names":[],"mappings":"AAIA,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAgBnD"}
@@ -0,0 +1,17 @@
1
+ import { InvalidArgumentError } from 'commander';
2
+ const durationPattern = /^(\d+(?:\.\d+)?)(ms|s|m)$/;
3
+ export function parseDuration(value) {
4
+ const match = durationPattern.exec(value);
5
+ if (match === null) {
6
+ throw new InvalidArgumentError('Duration must use ms, s, or m, for example 500ms, 10s, or 2m.');
7
+ }
8
+ const amount = Number(match[1]);
9
+ const unit = match[2];
10
+ const multiplier = unit === 'ms' ? 1 : unit === 's' ? 1_000 : 60_000;
11
+ const milliseconds = amount * multiplier;
12
+ if (!Number.isFinite(milliseconds) || milliseconds < 100 || milliseconds > 600_000) {
13
+ throw new InvalidArgumentError('Duration must be between 100ms and 10m.');
14
+ }
15
+ return Math.round(milliseconds);
16
+ }
17
+ //# sourceMappingURL=parseDuration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseDuration.js","sourceRoot":"","sources":["../../src/options/parseDuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEjD,MAAM,eAAe,GAAG,2BAA2B,CAAC;AAEpD,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1C,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,MAAM,IAAI,oBAAoB,CAAC,+DAA+D,CAAC,CAAC;IAClG,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAChC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACtB,MAAM,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;IACrE,MAAM,YAAY,GAAG,MAAM,GAAG,UAAU,CAAC;IAEzC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,YAAY,GAAG,GAAG,IAAI,YAAY,GAAG,OAAO,EAAE,CAAC;QACnF,MAAM,IAAI,oBAAoB,CAAC,yCAAyC,CAAC,CAAC;IAC5E,CAAC;IAED,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AAClC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { FindingPriority, FindingSeverity } from '@lovlydev/pkgwise-core';
2
+ export declare function parseFindingSeverity(value: string): FindingSeverity;
3
+ export declare function parseFindingPriority(value: string): FindingPriority;
4
+ export declare function parseMaximumFindings(value: string): number;
5
+ //# sourceMappingURL=parseFindingFilters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseFindingFilters.d.ts","sourceRoot":"","sources":["../../src/options/parseFindingFilters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAW/E,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,CAGnE;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,CAGnE;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAS1D"}
@@ -0,0 +1,29 @@
1
+ import { InvalidArgumentError } from 'commander';
2
+ const severities = ['critical', 'high', 'medium', 'low', 'info'];
3
+ const priorities = [
4
+ 'action-required',
5
+ 'review',
6
+ 'worth-knowing',
7
+ 'informational',
8
+ ];
9
+ export function parseFindingSeverity(value) {
10
+ if (severities.includes(value))
11
+ return value;
12
+ throw new InvalidArgumentError(`Severity must be one of: ${severities.join(', ')}.`);
13
+ }
14
+ export function parseFindingPriority(value) {
15
+ if (priorities.includes(value))
16
+ return value;
17
+ throw new InvalidArgumentError(`Finding group must be one of: ${priorities.join(', ')}.`);
18
+ }
19
+ export function parseMaximumFindings(value) {
20
+ if (!/^\d+$/.test(value)) {
21
+ throw new InvalidArgumentError('Maximum findings must be an integer from 1 to 10000.');
22
+ }
23
+ const parsed = Number(value);
24
+ if (!Number.isSafeInteger(parsed) || parsed < 1 || parsed > 10_000) {
25
+ throw new InvalidArgumentError('Maximum findings must be an integer from 1 to 10000.');
26
+ }
27
+ return parsed;
28
+ }
29
+ //# sourceMappingURL=parseFindingFilters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseFindingFilters.js","sourceRoot":"","sources":["../../src/options/parseFindingFilters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEjD,MAAM,UAAU,GAA+B,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAC7F,MAAM,UAAU,GAA+B;IAC7C,iBAAiB;IACjB,QAAQ;IACR,eAAe;IACf,eAAe;CAChB,CAAC;AAEF,MAAM,UAAU,oBAAoB,CAAC,KAAa;IAChD,IAAK,UAAgC,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,KAAwB,CAAC;IACvF,MAAM,IAAI,oBAAoB,CAAC,4BAA4B,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACvF,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,KAAa;IAChD,IAAK,UAAgC,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,KAAwB,CAAC;IACvF,MAAM,IAAI,oBAAoB,CAAC,iCAAiC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC5F,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,KAAa;IAChD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,oBAAoB,CAAC,sDAAsD,CAAC,CAAC;IACzF,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC7B,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC,IAAI,MAAM,GAAG,MAAM,EAAE,CAAC;QACnE,MAAM,IAAI,oBAAoB,CAAC,sDAAsD,CAAC,CAAC;IACzF,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { OutputFormat } from './GlobalOptions.js';
2
+ export declare function parseOutputFormat(value: string): OutputFormat;
3
+ //# sourceMappingURL=parseOutputFormat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseOutputFormat.d.ts","sourceRoot":"","sources":["../../src/options/parseOutputFormat.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIvD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,CAM7D"}
@@ -0,0 +1,9 @@
1
+ import { InvalidArgumentError } from 'commander';
2
+ const formats = new Set(['terminal', 'json', 'sarif', 'markdown']);
3
+ export function parseOutputFormat(value) {
4
+ if (!formats.has(value)) {
5
+ throw new InvalidArgumentError('Format must be terminal, json, sarif, or markdown.');
6
+ }
7
+ return value;
8
+ }
9
+ //# sourceMappingURL=parseOutputFormat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseOutputFormat.js","sourceRoot":"","sources":["../../src/options/parseOutputFormat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAGjD,MAAM,OAAO,GAAG,IAAI,GAAG,CAAe,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjF,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAqB,CAAC,EAAE,CAAC;QACxC,MAAM,IAAI,oBAAoB,CAAC,oDAAoD,CAAC,CAAC;IACvF,CAAC;IAED,OAAO,KAAqB,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Command } from 'commander';
2
+ import type { GlobalOptions } from './GlobalOptions.js';
3
+ export declare function readGlobalOptions(command: Command): GlobalOptions;
4
+ //# sourceMappingURL=readGlobalOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readGlobalOptions.d.ts","sourceRoot":"","sources":["../../src/options/readGlobalOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,aAAa,CAQjE"}
@@ -0,0 +1,9 @@
1
+ export function readGlobalOptions(command) {
2
+ const options = command.optsWithGlobals();
3
+ const colorFromEnvironment = process.env.NO_COLOR === undefined;
4
+ return {
5
+ ...options,
6
+ color: options.color ?? colorFromEnvironment,
7
+ };
8
+ }
9
+ //# sourceMappingURL=readGlobalOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readGlobalOptions.js","sourceRoot":"","sources":["../../src/options/readGlobalOptions.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,iBAAiB,CAAC,OAAgB;IAChD,MAAM,OAAO,GAAG,OAAO,CAAC,eAAe,EAAiB,CAAC;IACzD,MAAM,oBAAoB,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC;IAEhE,OAAO;QACL,GAAG,OAAO;QACV,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,oBAAoB;KAC7C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { AnalysisReport, FindingPriority, FindingSeverity } from '@lovlydev/pkgwise-core';
2
+ export interface RenderAnalysisReportOptions {
3
+ readonly minimumSeverity?: FindingSeverity;
4
+ readonly includePriorities?: readonly FindingPriority[];
5
+ readonly maximumFindings?: number;
6
+ }
7
+ export declare function renderAnalysisReport(report: AnalysisReport, options?: RenderAnalysisReportOptions): string;
8
+ //# sourceMappingURL=renderAnalysisReport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderAnalysisReport.d.ts","sourceRoot":"","sources":["../../src/output/renderAnalysisReport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EAEd,eAAe,EACf,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC;IAC3C,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IACxD,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,cAAc,EACtB,OAAO,GAAE,2BAAgC,GACxC,MAAM,CAkDR"}
@@ -0,0 +1,47 @@
1
+ export function renderAnalysisReport(report, options = {}) {
2
+ const lockfile = report.project.lockfile === undefined ? 'no lockfile' : report.project.lockfile;
3
+ const lines = [
4
+ `PkgWise ${report.tool.version} · ${report.project.manager} · ${lockfile}`,
5
+ '',
6
+ `${report.project.name ?? report.project.rootName}${report.project.version === undefined ? '' : `@${report.project.version}`}`,
7
+ `Direct dependencies: ${report.graph.directDependencyCount}`,
8
+ `Resolved packages: ${report.graph.packageCount} (${report.graph.transitiveDependencyCount} transitive)`,
9
+ `Graph: ${report.graph.edgeCount} edges · depth ${report.graph.maximumDepth} · unresolved ${report.graph.unresolvedDependencyCount}`,
10
+ `Topology: ${report.graph.duplicateVersionGroupCount} duplicate-version groups · ${report.graph.cycleCount} cycles`,
11
+ ` runtime ${report.graph.dependencyCounts.runtime} · development ${report.graph.dependencyCounts.development} · peer ${report.graph.dependencyCounts.peer} · optional ${report.graph.dependencyCounts.optional}`,
12
+ '',
13
+ `Analysis status: ${report.status} · scores unavailable · coverage ${Math.round(report.coverage.overall * 100)}%`,
14
+ `Security: OSV ${report.enrichment.osv.status} · ${report.enrichment.osv.evaluatedCoordinateCount}/${report.enrichment.osv.eligibleCoordinateCount} coordinates · ${report.advisories.length} advisories${report.coverage.security === undefined ? '' : ` · ${Math.round(report.coverage.security * 100)}% coverage`}`,
15
+ `Configuration: ${report.configuration.source}${report.configuration.relativePath === undefined ? '' : ` (${report.configuration.relativePath})`} · ${report.configuration.enabledRules.length} rules`,
16
+ `Policy: ${report.policy.status}${report.policy.configured ? ` · ${report.policy.violations.length} violations` : ' · not configured'}`,
17
+ ];
18
+ for (const violation of report.policy.violations) {
19
+ lines.push(` POLICY VIOLATION: ${violation.message}`);
20
+ }
21
+ const filteredFindings = filterFindings(report.findings, options);
22
+ const displayedFindings = filteredFindings.slice(0, options.maximumFindings);
23
+ lines.push('', `Findings: ${report.findings.length} total · ${displayedFindings.length} displayed`);
24
+ for (const finding of displayedFindings) {
25
+ lines.push('', `${finding.severity.toUpperCase()} [${finding.ruleId}] ${finding.title}`, ` ${finding.summary}`, ` Recommendation: ${finding.recommendation.summary}`, ` Fingerprint: ${finding.fingerprint}`);
26
+ }
27
+ if (displayedFindings.length < filteredFindings.length) {
28
+ lines.push(`... ${filteredFindings.length - displayedFindings.length} additional matching findings omitted.`);
29
+ }
30
+ for (const diagnostic of report.diagnostics) {
31
+ lines.push(`${diagnostic.level.toUpperCase()}: ${diagnostic.message}`);
32
+ }
33
+ return `${lines.join('\n')}\n`;
34
+ }
35
+ function filterFindings(findings, options) {
36
+ const severityOrder = ['critical', 'high', 'medium', 'low', 'info'];
37
+ const maximumSeverityIndex = severityOrder.indexOf(options.minimumSeverity ?? 'low');
38
+ const includedPriorities = new Set([
39
+ 'action-required',
40
+ 'review',
41
+ 'worth-knowing',
42
+ ...(options.includePriorities ?? []),
43
+ ]);
44
+ return findings.filter((finding) => severityOrder.indexOf(finding.severity) <= maximumSeverityIndex &&
45
+ includedPriorities.has(finding.priority));
46
+ }
47
+ //# sourceMappingURL=renderAnalysisReport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderAnalysisReport.js","sourceRoot":"","sources":["../../src/output/renderAnalysisReport.ts"],"names":[],"mappings":"AAaA,MAAM,UAAU,oBAAoB,CAClC,MAAsB,EACtB,UAAuC,EAAE;IAEzC,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;IACjG,MAAM,KAAK,GAAG;QACZ,WAAW,MAAM,CAAC,IAAI,CAAC,OAAO,MAAM,MAAM,CAAC,OAAO,CAAC,OAAO,MAAM,QAAQ,EAAE;QAC1E,EAAE;QACF,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,GAC/C,MAAM,CAAC,OAAO,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,EACxE,EAAE;QACF,wBAAwB,MAAM,CAAC,KAAK,CAAC,qBAAqB,EAAE;QAC5D,sBAAsB,MAAM,CAAC,KAAK,CAAC,YAAY,KAAK,MAAM,CAAC,KAAK,CAAC,yBAAyB,cAAc;QACxG,UAAU,MAAM,CAAC,KAAK,C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CAAC,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AACjC,CAAC;AAED,SAAS,cAAc,CACrB,QAA4B,EAC5B,OAAoC;IAEpC,MAAM,aAAa,GAA+B,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAChG,MAAM,oBAAoB,GAAG,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe,IAAI,KAAK,CAAC,CAAC;IACrF,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAkB;QAClD,iBAAiB;QACjB,QAAQ;QACR,eAAe;QACf,GAAG,CAAC,OAAO,CAAC,iBAAiB,IAAI,EAAE,CAAC;KACrC,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC,MAAM,CACpB,CAAC,OAAO,EAAE,EAAE,CACV,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,oBAAoB;QAC/D,kBAAkB,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAC3C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ export interface CliErrorEnvelope {
2
+ readonly schemaVersion: '1';
3
+ readonly status: 'error';
4
+ readonly error: {
5
+ readonly code: string;
6
+ readonly message: string;
7
+ readonly recoverable: boolean;
8
+ readonly details?: Readonly<Record<string, unknown>>;
9
+ };
10
+ }
11
+ export declare function renderCliError(error: unknown, debug: boolean): CliErrorEnvelope;
12
+ //# sourceMappingURL=renderCliError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderCliError.d.ts","sourceRoot":"","sources":["../../src/output/renderCliError.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,aAAa,EAAE,GAAG,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;QAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;KACtD,CAAC;CACH;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAqB/E"}
@@ -0,0 +1,22 @@
1
+ import { PkgWiseError } from '@lovlydev/pkgwise-core';
2
+ export function renderCliError(error, debug) {
3
+ if (error instanceof PkgWiseError) {
4
+ const errorValue = {
5
+ code: error.code,
6
+ message: error.userMessage,
7
+ recoverable: error.recoverable,
8
+ ...(error.details === undefined ? {} : { details: error.details }),
9
+ };
10
+ return { schemaVersion: '1', status: 'error', error: errorValue };
11
+ }
12
+ return {
13
+ schemaVersion: '1',
14
+ status: 'error',
15
+ error: {
16
+ code: 'PW_INTERNAL_ERROR',
17
+ message: debug && error instanceof Error ? error.message : 'An unexpected internal error occurred.',
18
+ recoverable: false,
19
+ },
20
+ };
21
+ }
22
+ //# sourceMappingURL=renderCliError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderCliError.js","sourceRoot":"","sources":["../../src/output/renderCliError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAatD,MAAM,UAAU,cAAc,CAAC,KAAc,EAAE,KAAc;IAC3D,IAAI,KAAK,YAAY,YAAY,EAAE,CAAC;QAClC,MAAM,UAAU,GAA8B;YAC5C,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,OAAO,EAAE,KAAK,CAAC,WAAW;YAC1B,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,GAAG,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;SACnE,CAAC;QACF,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;IACpE,CAAC;IAED,OAAO;QACL,aAAa,EAAE,GAAG;QAClB,MAAM,EAAE,OAAO;QACf,KAAK,EAAE;YACL,IAAI,EAAE,mBAAmB;YACzB,OAAO,EACL,KAAK,IAAI,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,wCAAwC;YAC5F,WAAW,EAAE,KAAK;SACnB;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { DoctorReport } from '@lovlydev/pkgwise-core';
2
+ export declare function renderDoctorReport(report: DoctorReport): string;
3
+ //# sourceMappingURL=renderDoctorReport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderDoctorReport.d.ts","sourceRoot":"","sources":["../../src/output/renderDoctorReport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAQ3D,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAM/D"}
@@ -0,0 +1,13 @@
1
+ const symbols = {
2
+ pass: 'PASS',
3
+ warning: 'WARN',
4
+ fail: 'FAIL',
5
+ };
6
+ export function renderDoctorReport(report) {
7
+ const lines = [`PkgWise doctor · ${report.status}`, ''];
8
+ for (const check of report.checks) {
9
+ lines.push(`${symbols[check.status].padEnd(4)} ${check.id.padEnd(18)} ${check.message}`);
10
+ }
11
+ return `${lines.join('\n')}\n`;
12
+ }
13
+ //# sourceMappingURL=renderDoctorReport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderDoctorReport.js","sourceRoot":"","sources":["../../src/output/renderDoctorReport.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,GAAG;IACd,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,MAAM;IACf,IAAI,EAAE,MAAM;CACJ,CAAC;AAEX,MAAM,UAAU,kBAAkB,CAAC,MAAoB;IACrD,MAAM,KAAK,GAAG,CAAC,oBAAoB,MAAM,CAAC,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;IACxD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QAClC,KAAK,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAC5F,CAAC;IACD,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AACjC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FindingExplanation } from '@lovlydev/pkgwise-core';
2
+ export declare function renderFindingExplanation(explanation: FindingExplanation): string;
3
+ //# sourceMappingURL=renderFindingExplanation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderFindingExplanation.d.ts","sourceRoot":"","sources":["../../src/output/renderFindingExplanation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,kBAAkB,GAAG,MAAM,CAoChF"}
@@ -0,0 +1,39 @@
1
+ export function renderFindingExplanation(explanation) {
2
+ const finding = explanation.finding;
3
+ const lines = [
4
+ `PkgWise explanation · ${finding.fingerprint}`,
5
+ '',
6
+ `${finding.severity.toUpperCase()} [${finding.ruleId}@${finding.ruleVersion}]`,
7
+ finding.title,
8
+ '',
9
+ finding.summary,
10
+ `Evidence class: ${finding.evidence[0]?.kind ?? 'unknown'} · confidence ${formatConfidence(finding.confidence)}`,
11
+ ];
12
+ for (const evidence of finding.evidence) {
13
+ lines.push(` Evidence: ${evidence.summary}`);
14
+ }
15
+ lines.push('', 'Dependency paths:');
16
+ if (finding.dependencyPaths.length === 0) {
17
+ lines.push(' No resolved path is available.');
18
+ }
19
+ else {
20
+ for (const path of finding.dependencyPaths) {
21
+ const packages = path.packages.map((item) => `${item.name}${item.version === undefined ? '' : `@${item.version}`}`);
22
+ lines.push(` project${packages.length === 0 ? '' : ` -> ${packages.join(' -> ')}`}`);
23
+ }
24
+ if (finding.pathsTruncated)
25
+ lines.push(' Additional paths were truncated.');
26
+ }
27
+ lines.push('', `Recommendation: ${finding.recommendation.summary}`);
28
+ for (const action of finding.recommendation.actions)
29
+ lines.push(` - ${action}`);
30
+ lines.push('', `Analysis status: ${explanation.report.status}`);
31
+ for (const diagnostic of explanation.report.diagnostics) {
32
+ lines.push(`${diagnostic.level.toUpperCase()}: ${diagnostic.message}`);
33
+ }
34
+ return `${lines.join('\n')}\n`;
35
+ }
36
+ function formatConfidence(value) {
37
+ return `${Math.round(value * 100)}%`;
38
+ }
39
+ //# sourceMappingURL=renderFindingExplanation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderFindingExplanation.js","sourceRoot":"","sources":["../../src/output/renderFindingExplanation.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,wBAAwB,CAAC,WAA+B;IACtE,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC;IACpC,MAAM,KAAK,GAAG;QACZ,yBAAyB,OAAO,CAAC,WAAW,EAAE;QAC9C,EAAE;QACF,GAAG,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,WAAW,GAAG;QAC9E,OAAO,CAAC,KAAK;QACb,EAAE;QACF,OAAO,CAAC,OAAO;QACf,mBAAmB,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,IAAI,SAAS,iBAAiB,gBAAgB,CAAC,OAAO,CAAC,UAA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W,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;IAChE,KAAK,MAAM,UAAU,IAAI,WAAW,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;QACxD,KAAK,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AACjC,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa;IACrC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC;AACvC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AnalysisReport } from '@lovlydev/pkgwise-core';
2
+ export declare function renderMarkdownReport(report: AnalysisReport): string;
3
+ export declare function renderGenericMarkdown(value: unknown, title?: string): string;
4
+ //# sourceMappingURL=renderMarkdownReport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderMarkdownReport.d.ts","sourceRoot":"","sources":["../../src/output/renderMarkdownReport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAW,MAAM,wBAAwB,CAAC;AAEtE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAgFnE;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,SAAmB,GAAG,MAAM,CAMtF"}
@@ -0,0 +1,113 @@
1
+ export function renderMarkdownReport(report) {
2
+ const projectName = report.project.name ?? report.project.rootName;
3
+ const lines = [
4
+ '# PkgWise dependency report',
5
+ '',
6
+ `Generated: ${escapeMarkdown(report.generatedAt)}`,
7
+ '',
8
+ '## Project',
9
+ '',
10
+ '| Field | Value |',
11
+ '| --- | --- |',
12
+ `| Name | ${escapeMarkdown(projectName)} |`,
13
+ `| Version | ${escapeMarkdown(report.project.version ?? 'unknown')} |`,
14
+ `| Package manager | ${escapeMarkdown(report.project.manager)} |`,
15
+ `| Lockfile | ${escapeMarkdown(report.project.lockfile ?? 'none')} |`,
16
+ `| Analysis status | ${escapeMarkdown(report.status)} |`,
17
+ `| Configuration | ${escapeMarkdown(report.configuration.source)} |`,
18
+ `| Policy | ${escapeMarkdown(report.policy.status)} |`,
19
+ '',
20
+ '## Dependency graph',
21
+ '',
22
+ '| Metric | Value |',
23
+ '| --- | ---: |',
24
+ `| Resolved packages | ${report.graph.packageCount} |`,
25
+ `| Direct dependencies | ${report.graph.directDependencyCount} |`,
26
+ `| Transitive dependencies | ${report.graph.transitiveDependencyCount} |`,
27
+ `| Edges | ${report.graph.edgeCount} |`,
28
+ `| Maximum depth | ${report.graph.maximumDepth} |`,
29
+ `| Unresolved relations | ${report.graph.unresolvedDependencyCount} |`,
30
+ `| Duplicate-version groups | ${report.graph.duplicateVersionGroupCount} |`,
31
+ `| Cycles | ${report.graph.cycleCount} |`,
32
+ `| Analysis coverage | ${Math.round(report.coverage.overall * 100)}% |`,
33
+ '',
34
+ '## Security enrichment',
35
+ '',
36
+ '| Metric | Value |',
37
+ '| --- | ---: |',
38
+ `| OSV status | ${escapeMarkdown(report.enrichment.osv.status)} |`,
39
+ `| Exact coordinates eligible | ${report.enrichment.osv.eligibleCoordinateCount} |`,
40
+ `| Exact coordinates evaluated | ${report.enrichment.osv.evaluatedCoordinateCount} |`,
41
+ `| Unavailable coordinates | ${report.enrichment.osv.unavailableCoordinateCount} |`,
42
+ `| Security coverage | ${report.coverage.security === undefined ? 'not requested' : `${Math.round(report.coverage.security * 100)}%`} |`,
43
+ `| Advisory records | ${report.advisories.length} |`,
44
+ '',
45
+ `## Policy (${report.policy.violations.length} violations)`,
46
+ '',
47
+ report.policy.configured
48
+ ? `Policy evaluation: **${escapeMarkdown(report.policy.status)}**.`
49
+ : 'No policy is configured; the default policy passes.',
50
+ ];
51
+ if (report.policy.violations.length > 0) {
52
+ lines.push('', '| Violation | Findings |', '| --- | ---: |');
53
+ for (const violation of report.policy.violations) {
54
+ lines.push(`| ${escapeMarkdown(violation.message)} | ${violation.findingFingerprints.length} |`);
55
+ }
56
+ }
57
+ lines.push('', `## Findings (${report.findings.length})`);
58
+ if (report.findings.length === 0) {
59
+ lines.push('', 'No findings were produced by the enabled rules.');
60
+ }
61
+ else {
62
+ for (const finding of report.findings)
63
+ appendFinding(lines, finding);
64
+ }
65
+ lines.push('', `## Diagnostics (${report.diagnostics.length})`);
66
+ if (report.diagnostics.length === 0) {
67
+ lines.push('', 'No analysis diagnostics.');
68
+ }
69
+ else {
70
+ lines.push('', '| Level | Code | Message |', '| --- | --- | --- |');
71
+ for (const diagnostic of report.diagnostics) {
72
+ lines.push(`| ${escapeMarkdown(diagnostic.level)} | ${escapeMarkdown(diagnostic.code)} | ${escapeMarkdown(diagnostic.message)} |`);
73
+ }
74
+ }
75
+ return `${lines.join('\n')}\n`;
76
+ }
77
+ export function renderGenericMarkdown(value, title = 'PkgWise result') {
78
+ const json = JSON.stringify(value, null, 2) ?? 'null';
79
+ return `# ${escapeMarkdown(title)}\n\n${json
80
+ .split('\n')
81
+ .map((line) => ` ${line}`)
82
+ .join('\n')}\n`;
83
+ }
84
+ function appendFinding(lines, finding) {
85
+ lines.push('', `### ${escapeMarkdown(finding.severity.toUpperCase())}: ${escapeMarkdown(finding.title)}`, '', `- Rule: ${escapeMarkdown(`${finding.ruleId}@${finding.ruleVersion}`)}`, `- Priority: ${escapeMarkdown(finding.priority)}`, `- Confidence: ${Math.round(finding.confidence * 100)}%`, `- Evidence class: ${escapeMarkdown(finding.evidence[0]?.kind ?? 'unknown')}`, `- Fingerprint: ${escapeMarkdown(finding.fingerprint)}`, '', escapeMarkdown(finding.summary), '', '**Evidence**', '');
86
+ for (const evidence of finding.evidence)
87
+ lines.push(`- ${escapeMarkdown(evidence.summary)}`);
88
+ lines.push('', '**Dependency paths**', '');
89
+ if (finding.dependencyPaths.length === 0) {
90
+ lines.push('- No resolved path is available.');
91
+ }
92
+ else {
93
+ for (const path of finding.dependencyPaths) {
94
+ const packages = path.packages.map((item) => `${item.name}${item.version === undefined ? '' : `@${item.version}`}`);
95
+ lines.push(`- ${escapeMarkdown(`project${packages.length === 0 ? '' : ` -> ${packages.join(' -> ')}`}`)}`);
96
+ }
97
+ if (finding.pathsTruncated)
98
+ lines.push('- Additional paths were truncated.');
99
+ }
100
+ lines.push('', `**Recommendation:** ${escapeMarkdown(finding.recommendation.summary)}`, '');
101
+ for (const action of finding.recommendation.actions)
102
+ lines.push(`- ${escapeMarkdown(action)}`);
103
+ }
104
+ function escapeMarkdown(value) {
105
+ return value
106
+ .replaceAll('&', '&amp;')
107
+ .replaceAll('<', '&lt;')
108
+ .replaceAll('>', '&gt;')
109
+ .replaceAll('\\', '\\\\')
110
+ .replaceAll('|', '\\|')
111
+ .replaceAll('`', '&#96;');
112
+ }
113
+ //# sourceMappingURL=renderMarkdownReport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderMarkdownReport.js","sourceRoot":"","sources":["../../src/output/renderMarkdownReport.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,oBAAoB,CAAC,MAAsB;IACzD,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;IACnE,MAAM,KAAK,GAAG;QACZ,6BAA6B;QAC7B,EAAE;QACF,cAAc,cAAc,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE;QAClD,EAAE;QACF,YAAY;QACZ,EAAE;QACF,mBAAmB;QACnB,eAAe;QACf,YAAY,cAAc,CAAC,WAAW,CAAC,IAAI;QAC3C,eAAe,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,IAAI,SAAS,CAAC,IAAI;QACtE,uBAAuB,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI;QACjE,gBAAgB,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,IAAI,MAA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AC;QACJ,CAAC;QACD,IAAI,OAAO,CAAC,cAAc;YAAE,KAAK,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC;IAC/E,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,uBAAuB,cAAc,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAC5F,KAAK,MAAM,MAAM,IAAI,OAAO,CAAC,cAAc,CAAC,OAAO;QAAE,KAAK,CAAC,IAAI,CAAC,KAAK,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AACjG,CAAC;AAED,SAAS,cAAc,CAAC,KAAa;IACnC,OAAO,KAAK;SACT,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC;SACxB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC;SACvB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC;SACvB,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC;SACxB,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC;SACtB,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { PackageComparison } from '@lovlydev/pkgwise-core';
2
+ export declare function renderPackageComparison(comparison: PackageComparison): string;
3
+ //# sourceMappingURL=renderPackageComparison.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderPackageComparison.d.ts","sourceRoot":"","sources":["../../src/output/renderPackageComparison.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,iBAAiB,GAAG,MAAM,CAwC7E"}