@overkill-dev/output-renderer-github-actions 0.0.16 → 0.0.17

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.
@@ -1 +1 @@
1
- {"version":3,"file":"github-actions-output-renderer.d.ts","sourceRoot":"","sources":["../../../../source/output-renderers/github-actions-output-renderer.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,KAAK,qBAAqB,EAE7B,MAAM,sBAA8B,CAAC;AA2DtC,wBAAgB,iCAAiC,IAAI,qBAAqB,CAMzE"}
1
+ {"version":3,"file":"github-actions-output-renderer.d.ts","sourceRoot":"","sources":["../../../../source/output-renderers/github-actions-output-renderer.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,KAAK,qBAAqB,EAE7B,MAAM,sBAA8B,CAAC;AA4DtC,wBAAgB,iCAAiC,IAAI,qBAAqB,CAQzE"}
@@ -15,7 +15,7 @@ function renderProperty(name, value) {
15
15
  }
16
16
  function renderableLocation(annotation) {
17
17
  const location = annotation?.location ?? null;
18
- if (location === null || location.file.length === 0 || location.line === null) {
18
+ if (location === null || location.kind === 'unknown' || location.line === null) {
19
19
  return null;
20
20
  }
21
21
  return {
@@ -23,7 +23,7 @@ function renderableLocation(annotation) {
23
23
  line: location.line
24
24
  };
25
25
  }
26
- function renderGitHubAnnotation(intent) {
26
+ function renderGitHubAnnotation(intent, context) {
27
27
  const { annotation } = intent;
28
28
  const location = renderableLocation(annotation);
29
29
  if (annotation === null || location === null) {
@@ -31,7 +31,7 @@ function renderGitHubAnnotation(intent) {
31
31
  }
32
32
  const column = location.column === null ? null : String(location.column);
33
33
  const properties = [
34
- `file=${escapeCommandProperty(location.file)}`,
34
+ `file=${escapeCommandProperty(context.relativizeLocationPath(location))}`,
35
35
  `line=${location.line}`,
36
36
  renderProperty('col', column),
37
37
  renderProperty('title', annotation.title)
@@ -43,10 +43,12 @@ function renderGitHubAnnotation(intent) {
43
43
  return `::${annotation.severity} ${properties}::${escapeCommandValue(intent.text)}`;
44
44
  }
45
45
  export function createGithubActionsOutputRenderer() {
46
- return defineOutputRenderer({
47
- render(intent) {
48
- return renderGitHubAnnotation(intent) ?? intent.text;
49
- }
46
+ return defineOutputRenderer(function createGithubActionsRuntimeOutputRenderer(context) {
47
+ return {
48
+ render(intent) {
49
+ return renderGitHubAnnotation(intent, context) ?? intent.text;
50
+ }
51
+ };
50
52
  });
51
53
  }
52
54
  //# sourceMappingURL=github-actions-output-renderer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"github-actions-output-renderer.js","sourceRoot":"","sources":["../../../../source/output-renderers/github-actions-output-renderer.ts"],"names":[],"mappings":"AACA,OAAO,EACH,oBAAoB,EAGvB,MAAM,sBAA8B,CAAC;AAMtC,SAAS,kBAAkB,CAAC,KAAa;IACrC,OAAO,KAAK;SACP,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC;SACtB,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC;SACvB,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAa;IACxC,OAAO,kBAAkB,CAAC,KAAK,CAAC;SAC3B,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC;SACtB,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,cAAc,CAAC,IAAY,EAAE,KAAoB;IACtD,OAAO,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC;AAC7E,CAAC;AAED,SAAS,kBAAkB,CAAC,UAA0C;IAClE,MAAM,QAAQ,GAAG,UAAU,EAAE,QAAQ,IAAI,IAAI,CAAC;IAE9C,IAAI,QAAQ,KAAK,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;QAC5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AC;IAED,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACzE,MAAM,UAAU,GAAG;QACf,QAAQ,qBAAqB,CAAC,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,CAAC,EAAE;QACzE,QAAQ,QAAQ,CAAC,IAAI,EAAE;QACvB,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC;QAC7B,cAAc,CAAC,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC;KAC5C;SACI,MAAM,CAAC,SAAS,UAAU,CAAC,QAAQ;QAChC,OAAO,QAAQ,KAAK,IAAI,CAAC;IAC7B,CAAC,CAAC;SACD,IAAI,CAAC,GAAG,CAAC,CAAC;IAEf,OAAO,KAAK,UAAU,CAAC,QAAQ,IAAI,UAAU,KAAK,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;AACxF,CAAC;AAED,MAAM,UAAU,iCAAiC;IAC7C,OAAO,oBAAoB,CAAC,SAAS,wCAAwC,CAAC,OAAO;QACjF,OAAO;YACH,MAAM,CAAC,MAAM;gBACT,OAAO,sBAAsB,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC;YAClE,CAAC;SACJ,CAAC;IACN,CAAC,CAAC,CAAC;AACP,CAAC"}
package/package.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "license": "MIT",
23
23
  "name": "@overkill-dev/output-renderer-github-actions",
24
24
  "peerDependencies": {
25
- "@overkill-dev/engine": "0.0.26"
25
+ "@overkill-dev/engine": "0.0.27"
26
26
  },
27
27
  "repository": {
28
28
  "type": "git",
@@ -30,5 +30,5 @@
30
30
  },
31
31
  "sideEffects": false,
32
32
  "type": "module",
33
- "version": "0.0.16"
33
+ "version": "0.0.17"
34
34
  }
package/sbom.cdx.json CHANGED
@@ -16,34 +16,34 @@
16
16
  "component": {
17
17
  "type": "library",
18
18
  "name": "@overkill-dev/output-renderer-github-actions",
19
- "version": "0.0.16",
20
- "bom-ref": "pkg:npm/@overkill-dev/output-renderer-github-actions@0.0.16",
21
- "purl": "pkg:npm/@overkill-dev/output-renderer-github-actions@0.0.16"
19
+ "version": "0.0.17",
20
+ "bom-ref": "pkg:npm/@overkill-dev/output-renderer-github-actions@0.0.17",
21
+ "purl": "pkg:npm/@overkill-dev/output-renderer-github-actions@0.0.17"
22
22
  }
23
23
  },
24
24
  "components": [
25
25
  {
26
26
  "type": "library",
27
27
  "name": "@overkill-dev/engine",
28
- "version": "0.0.26",
29
- "bom-ref": "pkg:npm/@overkill-dev/engine@0.0.26",
28
+ "version": "0.0.27",
29
+ "bom-ref": "pkg:npm/@overkill-dev/engine@0.0.27",
30
30
  "scope": "optional",
31
31
  "licenses": [
32
32
  {
33
33
  "expression": "MIT"
34
34
  }
35
35
  ],
36
- "purl": "pkg:npm/@overkill-dev/engine@0.0.26"
36
+ "purl": "pkg:npm/@overkill-dev/engine@0.0.27"
37
37
  }
38
38
  ],
39
39
  "dependencies": [
40
40
  {
41
- "ref": "pkg:npm/@overkill-dev/engine@0.0.26"
41
+ "ref": "pkg:npm/@overkill-dev/engine@0.0.27"
42
42
  },
43
43
  {
44
- "ref": "pkg:npm/@overkill-dev/output-renderer-github-actions@0.0.16",
44
+ "ref": "pkg:npm/@overkill-dev/output-renderer-github-actions@0.0.17",
45
45
  "dependsOn": [
46
- "pkg:npm/@overkill-dev/engine@0.0.26"
46
+ "pkg:npm/@overkill-dev/engine@0.0.27"
47
47
  ]
48
48
  }
49
49
  ]