@overkill-dev/output-renderer-github-actions 0.0.1 → 0.0.3

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Overkill contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,3 @@
1
+ import type { OutputRenderer } from '@overkill-dev/engine';
2
+ export declare function createGithubActionsOutputRenderer(): OutputRenderer;
3
+ //# sourceMappingURL=github-actions-output-renderer.d.ts.map
@@ -0,0 +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,KAAK,EAAoB,cAAc,EAAE,MAAM,sBAA8B,CAAC;AA2DrF,wBAAgB,iCAAiC,IAAI,cAAc,CAMlE"}
@@ -0,0 +1,51 @@
1
+ function escapeCommandValue(value) {
2
+ return value
3
+ .replaceAll('%', '%25')
4
+ .replaceAll('\r', '%0D')
5
+ .replaceAll('\n', '%0A');
6
+ }
7
+ function escapeCommandProperty(value) {
8
+ return escapeCommandValue(value)
9
+ .replaceAll(':', '%3A')
10
+ .replaceAll(',', '%2C');
11
+ }
12
+ function renderProperty(name, value) {
13
+ return value === null ? null : `${name}=${escapeCommandProperty(value)}`;
14
+ }
15
+ function renderableLocation(annotation) {
16
+ const location = annotation?.location ?? null;
17
+ if (location === null || location.file.length === 0 || location.line === null) {
18
+ return null;
19
+ }
20
+ return {
21
+ ...location,
22
+ line: location.line
23
+ };
24
+ }
25
+ function renderGitHubAnnotation(intent) {
26
+ const { annotation } = intent;
27
+ const location = renderableLocation(annotation);
28
+ if (annotation === null || location === null) {
29
+ return null;
30
+ }
31
+ const column = location.column === null ? null : String(location.column);
32
+ const properties = [
33
+ `file=${escapeCommandProperty(location.file)}`,
34
+ `line=${location.line}`,
35
+ renderProperty('col', column),
36
+ renderProperty('title', annotation.title)
37
+ ]
38
+ .filter(function isProperty(property) {
39
+ return property !== null;
40
+ })
41
+ .join(',');
42
+ return `::${annotation.severity} ${properties}::${escapeCommandValue(intent.text)}`;
43
+ }
44
+ export function createGithubActionsOutputRenderer() {
45
+ return {
46
+ render(intent) {
47
+ return renderGitHubAnnotation(intent) ?? intent.text;
48
+ }
49
+ };
50
+ }
51
+ //# sourceMappingURL=github-actions-output-renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github-actions-output-renderer.js","sourceRoot":"","sources":["../../../../source/output-renderers/github-actions-output-renderer.ts"],"names":[],"mappings":"AAOA,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,qBAAq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M,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;QACH,MAAM,CAAC,MAAM;YACT,OAAO,sBAAsB,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC;QACzD,CAAC;KACJ,CAAC;AACN,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,34 @@
1
1
  {
2
- "name": "@overkill-dev/output-renderer-github-actions",
3
- "version": "0.0.1",
4
- "description": "Placeholder claiming the npm package name \"@overkill-dev/output-renderer-github-actions\" so a trusted publisher can be configured. See https://github.com/npm/cli/issues/8544.",
5
- "license": "MIT",
6
- "deprecated": "Placeholder published as a workaround so a Trusted Publisher could be configured. See https://github.com/npm/cli/issues/8544."
7
- }
2
+ "author": "Christian Rackerseder <git@echooff.de>",
3
+ "bugs": {
4
+ "url": "https://github.com/enormora/overkill/issues"
5
+ },
6
+ "description": "GitHub Actions renderer for Overkill managed output.",
7
+ "engines": {
8
+ "node": "^26"
9
+ },
10
+ "exports": {
11
+ ".": {
12
+ "import": "./packages/output-renderer-github-actions/output-renderer-github-actions.entry-point.js",
13
+ "types": "./packages/output-renderer-github-actions/output-renderer-github-actions.entry-point.d.ts"
14
+ }
15
+ },
16
+ "homepage": "https://github.com/enormora/overkill#readme",
17
+ "keywords": [
18
+ "tdd",
19
+ "test",
20
+ "tests"
21
+ ],
22
+ "license": "MIT",
23
+ "name": "@overkill-dev/output-renderer-github-actions",
24
+ "peerDependencies": {
25
+ "@overkill-dev/engine": "0.0.13"
26
+ },
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/enormora/overkill.git"
30
+ },
31
+ "sideEffects": false,
32
+ "type": "module",
33
+ "version": "0.0.3"
34
+ }
@@ -0,0 +1,2 @@
1
+ export { createGithubActionsOutputRenderer } from '../../output-renderers/github-actions-output-renderer.ts';
2
+ //# sourceMappingURL=output-renderer-github-actions.entry-point.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output-renderer-github-actions.entry-point.d.ts","sourceRoot":"","sources":["../../../../../source/packages/output-renderer-github-actions/output-renderer-github-actions.entry-point.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,0DAA0D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { createGithubActionsOutputRenderer } from "../../output-renderers/github-actions-output-renderer.js";
2
+ //# sourceMappingURL=output-renderer-github-actions.entry-point.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output-renderer-github-actions.entry-point.js","sourceRoot":"","sources":["../../../../../source/packages/output-renderer-github-actions/output-renderer-github-actions.entry-point.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,0DAA0D,CAAC"}
package/readme.md CHANGED
@@ -1,7 +1,18 @@
1
- # @overkill-dev/output-renderer-github-actions
1
+ # `@overkill-dev/output-renderer-github-actions`
2
2
 
3
- This version is a placeholder published only to claim the npm name `@overkill-dev/output-renderer-github-actions` so a Trusted Publisher
4
- can subsequently be configured for it. It contains no real package content and is published already
5
- deprecated.
3
+ GitHub Actions renderer for Overkill managed output intents.
6
4
 
7
- Workaround context: https://github.com/npm/cli/issues/8544
5
+ ```ts
6
+ import { defineConfig } from '@overkill-dev/run/command-line';
7
+ import { createBriefReporter } from '@overkill-dev/reporter-brief';
8
+ import { createGithubActionsOutputRenderer } from '@overkill-dev/output-renderer-github-actions';
9
+
10
+ export default defineConfig({
11
+ outputRenderer: createGithubActionsOutputRenderer(),
12
+ reporters: [ createBriefReporter() ]
13
+ });
14
+ ```
15
+
16
+ Located diagnostics render as GitHub workflow commands. Other managed output
17
+ renders as plain text. The renderer does not use the Checks API and is not
18
+ enabled automatically.
package/sbom.cdx.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json",
3
+ "bomFormat": "CycloneDX",
4
+ "specVersion": "1.6",
5
+ "version": 1,
6
+ "metadata": {
7
+ "tools": {
8
+ "components": [
9
+ {
10
+ "type": "application",
11
+ "name": "packtory",
12
+ "version": "0.0.92"
13
+ }
14
+ ]
15
+ },
16
+ "component": {
17
+ "type": "library",
18
+ "name": "@overkill-dev/output-renderer-github-actions",
19
+ "version": "0.0.3",
20
+ "bom-ref": "pkg:npm/@overkill-dev/output-renderer-github-actions@0.0.3",
21
+ "purl": "pkg:npm/@overkill-dev/output-renderer-github-actions@0.0.3"
22
+ }
23
+ },
24
+ "components": [
25
+ {
26
+ "type": "library",
27
+ "name": "@overkill-dev/engine",
28
+ "version": "0.0.13",
29
+ "bom-ref": "pkg:npm/@overkill-dev/engine@0.0.13",
30
+ "scope": "optional",
31
+ "licenses": [
32
+ {
33
+ "expression": "MIT"
34
+ }
35
+ ],
36
+ "purl": "pkg:npm/@overkill-dev/engine@0.0.13"
37
+ }
38
+ ],
39
+ "dependencies": [
40
+ {
41
+ "ref": "pkg:npm/@overkill-dev/engine@0.0.13"
42
+ },
43
+ {
44
+ "ref": "pkg:npm/@overkill-dev/output-renderer-github-actions@0.0.3",
45
+ "dependsOn": [
46
+ "pkg:npm/@overkill-dev/engine@0.0.13"
47
+ ]
48
+ }
49
+ ]
50
+ }