@sverka/sarif-viewer-web 0.1.14 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { generateSarifHtml } from "./html-generator.mjs";
3
- import { n as resolveFindings } from "./viewer-CohogBDA.mjs";
3
+ import { t as resolveFindings } from "./input-nokXRQsa.mjs";
4
4
  import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
5
5
  import { dirname } from "node:path";
6
6
  import process from "node:process";
package/dist/index.mjs CHANGED
@@ -1,4 +1,22 @@
1
1
  import { generateSarifHtml } from "./html-generator.mjs";
2
- import { n as resolveFindings, t as renderSarifWeb } from "./viewer-CohogBDA.mjs";
2
+ import { t as resolveFindings } from "./input-nokXRQsa.mjs";
3
+ import { mkdirSync, writeFileSync } from "node:fs";
4
+ import { dirname } from "node:path";
3
5
  import { DEFAULT_NORMALIZE_CONTEXT } from "@sverka/verification";
6
+ //#region src/viewer.ts
7
+ /**
8
+ * Resolve `options` into findings, generate HTML, and write to
9
+ * `options.outputPath`. Creates parent directories if needed.
10
+ *
11
+ * @throws {Error} when the file cannot be written.
12
+ */
13
+ function renderSarifWeb(options) {
14
+ const findings = resolveFindings(options);
15
+ const html = generateSarifHtml(findings);
16
+ mkdirSync(dirname(options.outputPath), { recursive: true });
17
+ writeFileSync(options.outputPath, html, "utf-8");
18
+ }
19
+ //#endregion
4
20
  export { DEFAULT_NORMALIZE_CONTEXT, generateSarifHtml, renderSarifWeb, resolveFindings };
21
+
22
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/viewer.ts"],"sourcesContent":["// @sverka/sarif-viewer-web — file I/O wrapper. Spec 47.\n\nimport { writeFileSync, mkdirSync } from \"node:fs\";\nimport { dirname } from \"node:path\";\nimport { generateSarifHtml } from \"./html-generator.js\";\nimport { resolveFindings } from \"./input.js\";\nimport type { SarifWebOptions } from \"./types.js\";\n\n// Re-export the pure HTML generator for backward compatibility.\nexport { generateSarifHtml } from \"./html-generator.js\";\n\n/**\n * Resolve `options` into findings, generate HTML, and write to\n * `options.outputPath`. Creates parent directories if needed.\n *\n * @throws {Error} when the file cannot be written.\n */\nexport function renderSarifWeb(options: SarifWebOptions): void {\n const findings = resolveFindings(options);\n const html = generateSarifHtml(findings);\n mkdirSync(dirname(options.outputPath), { recursive: true });\n writeFileSync(options.outputPath, html, \"utf-8\");\n}\n"],"mappings":";;;;;;;;;;;;AAiBA,SAAgB,eAAe,SAAgC;CAC7D,MAAM,WAAW,gBAAgB,OAAO;CACxC,MAAM,OAAO,kBAAkB,QAAQ;CACvC,UAAU,QAAQ,QAAQ,UAAU,GAAG,EAAE,WAAW,KAAK,CAAC;CAC1D,cAAc,QAAQ,YAAY,MAAM,OAAO;AACjD"}
@@ -0,0 +1,20 @@
1
+ import { resolveSarifInput } from "@sverka/verification";
2
+ //#region src/input.ts
3
+ /**
4
+ * Resolve `SarifWebOptions` (minus `outputPath`) into a `Finding[]`. Exactly
5
+ * one of `sarif`, `sarifPath`, `findings` must be provided.
6
+ *
7
+ * Delegates to `@sverka/verification`'s `resolveSarifInput` for the shared
8
+ * resolution logic (file reading, JSON parsing, normalization).
9
+ *
10
+ * @throws {Error} when zero or more than one input is provided.
11
+ * @throws {NormalizationError} when SARIF is invalid (propagated).
12
+ * @throws {Error} when the file cannot be read or parsed.
13
+ */
14
+ function resolveFindings(options) {
15
+ return resolveSarifInput(options);
16
+ }
17
+ //#endregion
18
+ export { resolveFindings as t };
19
+
20
+ //# sourceMappingURL=input-nokXRQsa.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-nokXRQsa.mjs","names":[],"sources":["../src/input.ts"],"sourcesContent":["// @sverka/sarif-viewer-web — input resolution. Spec 47.\n\nimport { resolveSarifInput, type Finding } from \"@sverka/verification\";\nimport type { SarifWebOptions } from \"./types.js\";\n\n/**\n * Resolve `SarifWebOptions` (minus `outputPath`) into a `Finding[]`. Exactly\n * one of `sarif`, `sarifPath`, `findings` must be provided.\n *\n * Delegates to `@sverka/verification`'s `resolveSarifInput` for the shared\n * resolution logic (file reading, JSON parsing, normalization).\n *\n * @throws {Error} when zero or more than one input is provided.\n * @throws {NormalizationError} when SARIF is invalid (propagated).\n * @throws {Error} when the file cannot be read or parsed.\n */\nexport function resolveFindings(\n options: Omit<SarifWebOptions, \"outputPath\">,\n): Finding[] {\n return resolveSarifInput(options);\n}\n"],"mappings":";;;;;;;;;;;;;AAgBA,SAAgB,gBACd,SACW;CACX,OAAO,kBAAkB,OAAO;AAClC"}
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@sverka/sarif-viewer-web",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "Sverka SARIF viewer Web — standalone HTML report generator for SARIF files",
5
5
  "license": "MIT",
6
+ "sideEffects": false,
6
7
  "repository": {
7
8
  "type": "git",
8
9
  "url": "git+https://github.com/sverka-dev/sverka.git",
@@ -40,7 +41,7 @@
40
41
  "typecheck": "tsc --noEmit"
41
42
  },
42
43
  "dependencies": {
43
- "@sverka/verification": "^0.1.14"
44
+ "@sverka/verification": "^0.1.15"
44
45
  },
45
46
  "devDependencies": {
46
47
  "tsdown": "^0.23.0",
@@ -1,37 +0,0 @@
1
- import { generateSarifHtml } from "./html-generator.mjs";
2
- import { mkdirSync, writeFileSync } from "node:fs";
3
- import { dirname } from "node:path";
4
- import { resolveSarifInput } from "@sverka/verification";
5
- //#region src/input.ts
6
- /**
7
- * Resolve `SarifWebOptions` (minus `outputPath`) into a `Finding[]`. Exactly
8
- * one of `sarif`, `sarifPath`, `findings` must be provided.
9
- *
10
- * Delegates to `@sverka/verification`'s `resolveSarifInput` for the shared
11
- * resolution logic (file reading, JSON parsing, normalization).
12
- *
13
- * @throws {Error} when zero or more than one input is provided.
14
- * @throws {NormalizationError} when SARIF is invalid (propagated).
15
- * @throws {Error} when the file cannot be read or parsed.
16
- */
17
- function resolveFindings(options) {
18
- return resolveSarifInput(options);
19
- }
20
- //#endregion
21
- //#region src/viewer.ts
22
- /**
23
- * Resolve `options` into findings, generate HTML, and write to
24
- * `options.outputPath`. Creates parent directories if needed.
25
- *
26
- * @throws {Error} when the file cannot be written.
27
- */
28
- function renderSarifWeb(options) {
29
- const findings = resolveFindings(options);
30
- const html = generateSarifHtml(findings);
31
- mkdirSync(dirname(options.outputPath), { recursive: true });
32
- writeFileSync(options.outputPath, html, "utf-8");
33
- }
34
- //#endregion
35
- export { resolveFindings as n, renderSarifWeb as t };
36
-
37
- //# sourceMappingURL=viewer-CohogBDA.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"viewer-CohogBDA.mjs","names":[],"sources":["../src/input.ts","../src/viewer.ts"],"sourcesContent":["// @sverka/sarif-viewer-web — input resolution. Spec 47.\n\nimport { resolveSarifInput, type Finding } from \"@sverka/verification\";\nimport type { SarifWebOptions } from \"./types.js\";\n\n/**\n * Resolve `SarifWebOptions` (minus `outputPath`) into a `Finding[]`. Exactly\n * one of `sarif`, `sarifPath`, `findings` must be provided.\n *\n * Delegates to `@sverka/verification`'s `resolveSarifInput` for the shared\n * resolution logic (file reading, JSON parsing, normalization).\n *\n * @throws {Error} when zero or more than one input is provided.\n * @throws {NormalizationError} when SARIF is invalid (propagated).\n * @throws {Error} when the file cannot be read or parsed.\n */\nexport function resolveFindings(\n options: Omit<SarifWebOptions, \"outputPath\">,\n): Finding[] {\n return resolveSarifInput(options);\n}\n","// @sverka/sarif-viewer-web — file I/O wrapper. Spec 47.\n\nimport { writeFileSync, mkdirSync } from \"node:fs\";\nimport { dirname } from \"node:path\";\nimport { generateSarifHtml } from \"./html-generator.js\";\nimport { resolveFindings } from \"./input.js\";\nimport type { SarifWebOptions } from \"./types.js\";\n\n// Re-export the pure HTML generator for backward compatibility.\nexport { generateSarifHtml } from \"./html-generator.js\";\n\n/**\n * Resolve `options` into findings, generate HTML, and write to\n * `options.outputPath`. Creates parent directories if needed.\n *\n * @throws {Error} when the file cannot be written.\n */\nexport function renderSarifWeb(options: SarifWebOptions): void {\n const findings = resolveFindings(options);\n const html = generateSarifHtml(findings);\n mkdirSync(dirname(options.outputPath), { recursive: true });\n writeFileSync(options.outputPath, html, \"utf-8\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA,SAAgB,gBACd,SACW;CACX,OAAO,kBAAkB,OAAO;AAClC;;;;;;;;;ACHA,SAAgB,eAAe,SAAgC;CAC7D,MAAM,WAAW,gBAAgB,OAAO;CACxC,MAAM,OAAO,kBAAkB,QAAQ;CACvC,UAAU,QAAQ,QAAQ,UAAU,GAAG,EAAE,WAAW,KAAK,CAAC;CAC1D,cAAc,QAAQ,YAAY,MAAM,OAAO;AACjD"}