@vertaaux/cli 0.2.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 (198) hide show
  1. package/README.md +345 -0
  2. package/dist/auth/ci-token.d.ts +49 -0
  3. package/dist/auth/ci-token.d.ts.map +1 -0
  4. package/dist/auth/ci-token.js +83 -0
  5. package/dist/auth/device-flow.d.ts +66 -0
  6. package/dist/auth/device-flow.d.ts.map +1 -0
  7. package/dist/auth/device-flow.js +156 -0
  8. package/dist/auth/token-store.d.ts +53 -0
  9. package/dist/auth/token-store.d.ts.map +1 -0
  10. package/dist/auth/token-store.js +78 -0
  11. package/dist/baseline/diff.d.ts +57 -0
  12. package/dist/baseline/diff.d.ts.map +1 -0
  13. package/dist/baseline/diff.js +152 -0
  14. package/dist/baseline/hash.d.ts +54 -0
  15. package/dist/baseline/hash.d.ts.map +1 -0
  16. package/dist/baseline/hash.js +66 -0
  17. package/dist/baseline/manager.d.ts +89 -0
  18. package/dist/baseline/manager.d.ts.map +1 -0
  19. package/dist/baseline/manager.js +157 -0
  20. package/dist/cache/index.d.ts +8 -0
  21. package/dist/cache/index.d.ts.map +1 -0
  22. package/dist/cache/index.js +7 -0
  23. package/dist/cache/route-cache.d.ts +119 -0
  24. package/dist/cache/route-cache.d.ts.map +1 -0
  25. package/dist/cache/route-cache.js +213 -0
  26. package/dist/ci/changed-routes.d.ts +95 -0
  27. package/dist/ci/changed-routes.d.ts.map +1 -0
  28. package/dist/ci/changed-routes.js +304 -0
  29. package/dist/ci/github-api.d.ts +68 -0
  30. package/dist/ci/github-api.d.ts.map +1 -0
  31. package/dist/ci/github-api.js +138 -0
  32. package/dist/ci/gitlab-api.d.ts +75 -0
  33. package/dist/ci/gitlab-api.d.ts.map +1 -0
  34. package/dist/ci/gitlab-api.js +180 -0
  35. package/dist/ci/index.d.ts +6 -0
  36. package/dist/ci/index.d.ts.map +1 -0
  37. package/dist/ci/index.js +4 -0
  38. package/dist/commands/audit.d.ts +58 -0
  39. package/dist/commands/audit.d.ts.map +1 -0
  40. package/dist/commands/audit.js +862 -0
  41. package/dist/commands/baseline.d.ts +22 -0
  42. package/dist/commands/baseline.d.ts.map +1 -0
  43. package/dist/commands/baseline.js +210 -0
  44. package/dist/commands/comment.d.ts +14 -0
  45. package/dist/commands/comment.d.ts.map +1 -0
  46. package/dist/commands/comment.js +363 -0
  47. package/dist/commands/diff.d.ts +24 -0
  48. package/dist/commands/diff.d.ts.map +1 -0
  49. package/dist/commands/diff.js +196 -0
  50. package/dist/commands/doctor.d.ts +58 -0
  51. package/dist/commands/doctor.d.ts.map +1 -0
  52. package/dist/commands/doctor.js +338 -0
  53. package/dist/commands/download.d.ts +12 -0
  54. package/dist/commands/download.d.ts.map +1 -0
  55. package/dist/commands/download.js +183 -0
  56. package/dist/commands/explain.d.ts +62 -0
  57. package/dist/commands/explain.d.ts.map +1 -0
  58. package/dist/commands/explain.js +302 -0
  59. package/dist/commands/init.d.ts +12 -0
  60. package/dist/commands/init.d.ts.map +1 -0
  61. package/dist/commands/init.js +212 -0
  62. package/dist/commands/login.d.ts +14 -0
  63. package/dist/commands/login.d.ts.map +1 -0
  64. package/dist/commands/login.js +222 -0
  65. package/dist/commands/policy.d.ts +13 -0
  66. package/dist/commands/policy.d.ts.map +1 -0
  67. package/dist/commands/policy.js +347 -0
  68. package/dist/commands/upload.d.ts +12 -0
  69. package/dist/commands/upload.d.ts.map +1 -0
  70. package/dist/commands/upload.js +158 -0
  71. package/dist/config/defaults.d.ts +21 -0
  72. package/dist/config/defaults.d.ts.map +1 -0
  73. package/dist/config/defaults.js +49 -0
  74. package/dist/config/loader.d.ts +66 -0
  75. package/dist/config/loader.d.ts.map +1 -0
  76. package/dist/config/loader.js +167 -0
  77. package/dist/config/schema.d.ts +55 -0
  78. package/dist/config/schema.d.ts.map +1 -0
  79. package/dist/config/schema.js +6 -0
  80. package/dist/index.d.ts +9 -0
  81. package/dist/index.d.ts.map +1 -0
  82. package/dist/index.js +1090 -0
  83. package/dist/interactive/fix-wizard.d.ts +44 -0
  84. package/dist/interactive/fix-wizard.d.ts.map +1 -0
  85. package/dist/interactive/fix-wizard.js +286 -0
  86. package/dist/interactive/init-wizard.d.ts +32 -0
  87. package/dist/interactive/init-wizard.d.ts.map +1 -0
  88. package/dist/interactive/init-wizard.js +193 -0
  89. package/dist/interactive/prompts.d.ts +62 -0
  90. package/dist/interactive/prompts.d.ts.map +1 -0
  91. package/dist/interactive/prompts.js +78 -0
  92. package/dist/monorepo/detector.d.ts +70 -0
  93. package/dist/monorepo/detector.d.ts.map +1 -0
  94. package/dist/monorepo/detector.js +278 -0
  95. package/dist/monorepo/index.d.ts +9 -0
  96. package/dist/monorepo/index.d.ts.map +1 -0
  97. package/dist/monorepo/index.js +8 -0
  98. package/dist/monorepo/workspace.d.ts +142 -0
  99. package/dist/monorepo/workspace.d.ts.map +1 -0
  100. package/dist/monorepo/workspace.js +171 -0
  101. package/dist/output/envelope.d.ts +21 -0
  102. package/dist/output/envelope.d.ts.map +1 -0
  103. package/dist/output/envelope.js +27 -0
  104. package/dist/output/factory.d.ts +73 -0
  105. package/dist/output/factory.d.ts.map +1 -0
  106. package/dist/output/factory.js +60 -0
  107. package/dist/output/formats.d.ts +11 -0
  108. package/dist/output/formats.d.ts.map +1 -0
  109. package/dist/output/formats.js +41 -0
  110. package/dist/output/html.d.ts +45 -0
  111. package/dist/output/html.d.ts.map +1 -0
  112. package/dist/output/html.js +607 -0
  113. package/dist/output/human.d.ts +41 -0
  114. package/dist/output/human.d.ts.map +1 -0
  115. package/dist/output/human.js +274 -0
  116. package/dist/output/json.d.ts +42 -0
  117. package/dist/output/json.d.ts.map +1 -0
  118. package/dist/output/json.js +37 -0
  119. package/dist/output/junit.d.ts +56 -0
  120. package/dist/output/junit.d.ts.map +1 -0
  121. package/dist/output/junit.js +135 -0
  122. package/dist/output/markdown.d.ts +77 -0
  123. package/dist/output/markdown.d.ts.map +1 -0
  124. package/dist/output/markdown.js +411 -0
  125. package/dist/output/sarif.d.ts +160 -0
  126. package/dist/output/sarif.d.ts.map +1 -0
  127. package/dist/output/sarif.js +207 -0
  128. package/dist/policy/evaluator.d.ts +111 -0
  129. package/dist/policy/evaluator.d.ts.map +1 -0
  130. package/dist/policy/evaluator.js +362 -0
  131. package/dist/policy/index.d.ts +15 -0
  132. package/dist/policy/index.d.ts.map +1 -0
  133. package/dist/policy/index.js +11 -0
  134. package/dist/policy/loader.d.ts +97 -0
  135. package/dist/policy/loader.d.ts.map +1 -0
  136. package/dist/policy/loader.js +281 -0
  137. package/dist/policy/schema.d.ts +297 -0
  138. package/dist/policy/schema.d.ts.map +1 -0
  139. package/dist/policy/schema.js +230 -0
  140. package/dist/quality-gate/evaluator.d.ts +58 -0
  141. package/dist/quality-gate/evaluator.d.ts.map +1 -0
  142. package/dist/quality-gate/evaluator.js +274 -0
  143. package/dist/quality-gate/index.d.ts +10 -0
  144. package/dist/quality-gate/index.d.ts.map +1 -0
  145. package/dist/quality-gate/index.js +7 -0
  146. package/dist/quality-gate/types.d.ts +103 -0
  147. package/dist/quality-gate/types.d.ts.map +1 -0
  148. package/dist/quality-gate/types.js +23 -0
  149. package/dist/templates/azure-devops.d.ts +25 -0
  150. package/dist/templates/azure-devops.d.ts.map +1 -0
  151. package/dist/templates/azure-devops.js +109 -0
  152. package/dist/templates/circleci.d.ts +28 -0
  153. package/dist/templates/circleci.d.ts.map +1 -0
  154. package/dist/templates/circleci.js +86 -0
  155. package/dist/templates/github-actions.d.ts +81 -0
  156. package/dist/templates/github-actions.d.ts.map +1 -0
  157. package/dist/templates/github-actions.js +393 -0
  158. package/dist/templates/gitlab-ci.d.ts +26 -0
  159. package/dist/templates/gitlab-ci.d.ts.map +1 -0
  160. package/dist/templates/gitlab-ci.js +70 -0
  161. package/dist/templates/index.d.ts +72 -0
  162. package/dist/templates/index.d.ts.map +1 -0
  163. package/dist/templates/index.js +112 -0
  164. package/dist/templates/jenkins.d.ts +26 -0
  165. package/dist/templates/jenkins.d.ts.map +1 -0
  166. package/dist/templates/jenkins.js +110 -0
  167. package/dist/ui/banner.d.ts +31 -0
  168. package/dist/ui/banner.d.ts.map +1 -0
  169. package/dist/ui/banner.js +84 -0
  170. package/dist/ui/diagnostics.d.ts +39 -0
  171. package/dist/ui/diagnostics.d.ts.map +1 -0
  172. package/dist/ui/diagnostics.js +153 -0
  173. package/dist/ui/spinner.d.ts +61 -0
  174. package/dist/ui/spinner.d.ts.map +1 -0
  175. package/dist/ui/spinner.js +101 -0
  176. package/dist/ui/table.d.ts +63 -0
  177. package/dist/ui/table.d.ts.map +1 -0
  178. package/dist/ui/table.js +236 -0
  179. package/dist/utils/client.d.ts +82 -0
  180. package/dist/utils/client.d.ts.map +1 -0
  181. package/dist/utils/client.js +128 -0
  182. package/dist/utils/detect-env.d.ts +59 -0
  183. package/dist/utils/detect-env.d.ts.map +1 -0
  184. package/dist/utils/detect-env.js +115 -0
  185. package/dist/utils/exit-codes.d.ts +47 -0
  186. package/dist/utils/exit-codes.d.ts.map +1 -0
  187. package/dist/utils/exit-codes.js +61 -0
  188. package/dist/utils/logger.d.ts +87 -0
  189. package/dist/utils/logger.d.ts.map +1 -0
  190. package/dist/utils/logger.js +185 -0
  191. package/dist/utils/sanitize.d.ts +36 -0
  192. package/dist/utils/sanitize.d.ts.map +1 -0
  193. package/dist/utils/sanitize.js +64 -0
  194. package/dist/utils/validators.d.ts +41 -0
  195. package/dist/utils/validators.d.ts.map +1 -0
  196. package/dist/utils/validators.js +123 -0
  197. package/package.json +63 -0
  198. package/schemas/vertaaux.config.schema.json +103 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/quality-gate/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,gFAAgF;IAChF,MAAM,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;IAE9C,wEAAwE;IACxE,UAAU,EAAE,eAAe,CAAC;IAE5B,6CAA6C;IAC7C,MAAM,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IAEF,uEAAuE;IACvE,cAAc,EAAE,OAAO,CAAC;IAExB,kDAAkD;IAClD,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iCAAiC;IACjC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,wBAAwB;IACxB,IAAI,EAAE,WAAW,GAAG,WAAW,GAAG,cAAc,CAAC;IACjD,sCAAsC;IACtC,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACvC,6BAA6B;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,OAAO,CAAC,EAAE;QACR,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,yDAAyD;IACzD,MAAM,EAAE,OAAO,CAAC;IAEhB,0CAA0C;IAC1C,QAAQ,EAAE,YAAY,CAAC;IAEvB,2CAA2C;IAC3C,UAAU,EAAE,aAAa,EAAE,CAAC;IAE5B,mCAAmC;IACnC,OAAO,EAAE;QACP,SAAS,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC;QAC5D,WAAW,EAAE,MAAM,CAAC;QACpB,cAAc,EAAE,MAAM,CAAC;QACvB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAChC,CAAC;IAEF,0CAA0C;IAC1C,QAAQ,EAAE,OAAO,CAAC;IAClB,qCAAqC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,EAAE,iBAMzC,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Quality gate type definitions.
3
+ *
4
+ * Quality gates control when CI builds should fail based on audit results.
5
+ * Key principle: Fail only on NEW issues (not existing technical debt).
6
+ *
7
+ * Implements CICD-06: Fail on new issues only, not existing technical debt.
8
+ */
9
+ /**
10
+ * Default quality gate configuration.
11
+ *
12
+ * Defaults are designed to be adoption-friendly:
13
+ * - Only fail on errors (not warnings/info)
14
+ * - Only fail on NEW errors (existing debt allowed)
15
+ * - No score thresholds by default (opt-in)
16
+ */
17
+ export const DEFAULT_QUALITY_GATE_CONFIG = {
18
+ failOn: "error",
19
+ thresholds: {},
20
+ maxNew: { error: 0, warning: Infinity, info: Infinity },
21
+ failOnExisting: false,
22
+ bypassLabels: [],
23
+ };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Azure DevOps pipeline template generator for VertaaUX.
3
+ *
4
+ * Generates azure-pipelines.yml configuration with native Azure integrations:
5
+ * - SARIF output published to CodeAnalysisLogs for Advanced Security
6
+ * - JUnit output for test results integration
7
+ *
8
+ * @see https://learn.microsoft.com/en-us/azure/devops/repos/security/github-advanced-security-code-scanning-third-party
9
+ */
10
+ export interface AzureDevOpsOptions {
11
+ /** URL to audit (optional, can be set in config) */
12
+ auditUrl?: string;
13
+ /** Severity threshold for CI failure */
14
+ failOn?: "error" | "warning" | "info" | "none";
15
+ /** Minimum score threshold (0 = disabled) */
16
+ threshold?: number;
17
+ }
18
+ /**
19
+ * Generate Azure DevOps pipeline template for VertaaUX integration.
20
+ *
21
+ * @param options - Configuration options
22
+ * @returns YAML template content
23
+ */
24
+ export declare function generateAzureDevOpsTemplate(options?: AzureDevOpsOptions): string;
25
+ //# sourceMappingURL=azure-devops.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"azure-devops.d.ts","sourceRoot":"","sources":["../../src/templates/azure-devops.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,kBAAkB;IACjC,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;IAC/C,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,GAAE,kBAAuB,GAAG,MAAM,CAgGpF"}
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Azure DevOps pipeline template generator for VertaaUX.
3
+ *
4
+ * Generates azure-pipelines.yml configuration with native Azure integrations:
5
+ * - SARIF output published to CodeAnalysisLogs for Advanced Security
6
+ * - JUnit output for test results integration
7
+ *
8
+ * @see https://learn.microsoft.com/en-us/azure/devops/repos/security/github-advanced-security-code-scanning-third-party
9
+ */
10
+ /**
11
+ * Generate Azure DevOps pipeline template for VertaaUX integration.
12
+ *
13
+ * @param options - Configuration options
14
+ * @returns YAML template content
15
+ */
16
+ export function generateAzureDevOpsTemplate(options = {}) {
17
+ const { auditUrl, failOn = "error", threshold } = options;
18
+ // Build audit command with options
19
+ const auditArgs = [];
20
+ if (auditUrl) {
21
+ auditArgs.push(`--url "${auditUrl}"`);
22
+ }
23
+ if (failOn !== "none") {
24
+ auditArgs.push(`--fail-on ${failOn}`);
25
+ }
26
+ if (threshold && threshold > 0) {
27
+ auditArgs.push(`--threshold ${threshold}`);
28
+ }
29
+ const auditSuffix = auditArgs.length > 0 ? ` ${auditArgs.join(" ")}` : "";
30
+ return `# VertaaUX Accessibility & UX Audit
31
+ # https://vertaaux.ai
32
+ #
33
+ # Azure DevOps Pipeline template with Advanced Security integration.
34
+ # Requires VERTAAUX_API_KEY variable in pipeline settings or variable group.
35
+
36
+ trigger:
37
+ - main
38
+ - master
39
+
40
+ pr:
41
+ - main
42
+ - master
43
+
44
+ pool:
45
+ vmImage: 'ubuntu-latest'
46
+
47
+ steps:
48
+ - task: NodeTool@0
49
+ displayName: 'Install Node.js 20'
50
+ inputs:
51
+ versionSpec: '20.x'
52
+
53
+ - script: npm install -g @vertaaux/cli
54
+ displayName: 'Install VertaaUX CLI'
55
+
56
+ - script: |
57
+ vertaa audit \\
58
+ --format sarif \\
59
+ --output $(Build.ArtifactStagingDirectory)/results.sarif${auditSuffix}
60
+ displayName: 'Run VertaaUX Audit (SARIF)'
61
+ env:
62
+ VERTAAUX_API_KEY: $(VERTAAUX_API_KEY)
63
+ continueOnError: true
64
+
65
+ - script: |
66
+ vertaa audit \\
67
+ --format junit \\
68
+ --output $(Build.ArtifactStagingDirectory)/vertaaux-junit.xml${auditSuffix}
69
+ displayName: 'Run VertaaUX Audit (JUnit)'
70
+ env:
71
+ VERTAAUX_API_KEY: $(VERTAAUX_API_KEY)
72
+ continueOnError: true
73
+
74
+ # Publish SARIF for Azure DevOps Advanced Security
75
+ # The artifact name 'CodeAnalysisLogs' is required for Advanced Security integration
76
+ - task: PublishBuildArtifacts@1
77
+ displayName: 'Publish SARIF for Advanced Security'
78
+ inputs:
79
+ pathToPublish: $(Build.ArtifactStagingDirectory)/results.sarif
80
+ artifactName: CodeAnalysisLogs
81
+ condition: always()
82
+
83
+ # Publish JUnit test results
84
+ - task: PublishTestResults@2
85
+ displayName: 'Publish Test Results'
86
+ inputs:
87
+ testResultsFormat: 'JUnit'
88
+ testResultsFiles: '$(Build.ArtifactStagingDirectory)/vertaaux-junit.xml'
89
+ testRunTitle: 'VertaaUX Audit Results'
90
+ condition: always()
91
+
92
+ # Generate and publish HTML report
93
+ - script: |
94
+ vertaa audit \\
95
+ --format html \\
96
+ --output $(Build.ArtifactStagingDirectory)/vertaaux-report.html${auditSuffix}
97
+ displayName: 'Generate HTML Report'
98
+ env:
99
+ VERTAAUX_API_KEY: $(VERTAAUX_API_KEY)
100
+ condition: always()
101
+
102
+ - task: PublishBuildArtifacts@1
103
+ displayName: 'Publish HTML Report'
104
+ inputs:
105
+ pathToPublish: $(Build.ArtifactStagingDirectory)/vertaaux-report.html
106
+ artifactName: VertaaUX-Report
107
+ condition: always()
108
+ `;
109
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * CircleCI template generator for VertaaUX.
3
+ *
4
+ * Generates .circleci/config.yml job configuration with native CircleCI integrations:
5
+ * - store_test_results for JUnit integration
6
+ * - store_artifacts for HTML report
7
+ *
8
+ * Note: CircleCI doesn't have native PR comment support.
9
+ * Use GitHub API or `gh pr comment` for PR comments.
10
+ *
11
+ * @see https://circleci.com/docs/collect-test-data/
12
+ */
13
+ export interface CircleCIOptions {
14
+ /** URL to audit (optional, can be set in config) */
15
+ auditUrl?: string;
16
+ /** Severity threshold for CI failure */
17
+ failOn?: "error" | "warning" | "info" | "none";
18
+ /** Minimum score threshold (0 = disabled) */
19
+ threshold?: number;
20
+ }
21
+ /**
22
+ * Generate CircleCI template for VertaaUX integration.
23
+ *
24
+ * @param options - Configuration options
25
+ * @returns YAML template content
26
+ */
27
+ export declare function generateCircleCITemplate(options?: CircleCIOptions): string;
28
+ //# sourceMappingURL=circleci.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circleci.d.ts","sourceRoot":"","sources":["../../src/templates/circleci.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,eAAe;IAC9B,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;IAC/C,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,GAAE,eAAoB,GAAG,MAAM,CAsE9E"}
@@ -0,0 +1,86 @@
1
+ /**
2
+ * CircleCI template generator for VertaaUX.
3
+ *
4
+ * Generates .circleci/config.yml job configuration with native CircleCI integrations:
5
+ * - store_test_results for JUnit integration
6
+ * - store_artifacts for HTML report
7
+ *
8
+ * Note: CircleCI doesn't have native PR comment support.
9
+ * Use GitHub API or `gh pr comment` for PR comments.
10
+ *
11
+ * @see https://circleci.com/docs/collect-test-data/
12
+ */
13
+ /**
14
+ * Generate CircleCI template for VertaaUX integration.
15
+ *
16
+ * @param options - Configuration options
17
+ * @returns YAML template content
18
+ */
19
+ export function generateCircleCITemplate(options = {}) {
20
+ const { auditUrl, failOn = "error", threshold } = options;
21
+ // Build audit command with options
22
+ const auditArgs = [];
23
+ if (auditUrl) {
24
+ auditArgs.push(`--url "${auditUrl}"`);
25
+ }
26
+ if (failOn !== "none") {
27
+ auditArgs.push(`--fail-on ${failOn}`);
28
+ }
29
+ if (threshold && threshold > 0) {
30
+ auditArgs.push(`--threshold ${threshold}`);
31
+ }
32
+ const auditSuffix = auditArgs.length > 0 ? ` \\\n ${auditArgs.join(" \\\n ")}` : "";
33
+ return `# VertaaUX Accessibility & UX Audit
34
+ # https://vertaaux.ai
35
+ #
36
+ # Add this job to your .circleci/config.yml
37
+ # Requires VERTAAUX_API_KEY environment variable in project settings.
38
+ #
39
+ # Note: CircleCI doesn't have native PR comment support.
40
+ # To add PR comments, use GitHub API or add a step with:
41
+ # gh pr comment --body "$(cat comment.md)"
42
+
43
+ version: 2.1
44
+
45
+ jobs:
46
+ vertaaux-audit:
47
+ docker:
48
+ - image: cimg/node:20.0
49
+ steps:
50
+ - checkout
51
+
52
+ - run:
53
+ name: Install VertaaUX CLI
54
+ command: npm install -g @vertaaux/cli
55
+
56
+ - run:
57
+ name: Run VertaaUX Audit
58
+ command: |
59
+ mkdir -p test-results artifacts
60
+ vertaa audit \\
61
+ --format junit \\
62
+ --output test-results/vertaaux.xml${auditSuffix}
63
+
64
+ - run:
65
+ name: Generate HTML Report
66
+ command: |
67
+ vertaa audit \\
68
+ --format html \\
69
+ --output artifacts/vertaaux-report.html${auditSuffix}
70
+ when: always
71
+
72
+ # Store test results for CircleCI Test Insights
73
+ - store_test_results:
74
+ path: test-results
75
+
76
+ # Store HTML report as artifact
77
+ - store_artifacts:
78
+ path: artifacts
79
+ destination: vertaaux-reports
80
+
81
+ workflows:
82
+ pr-checks:
83
+ jobs:
84
+ - vertaaux-audit
85
+ `;
86
+ }
@@ -0,0 +1,81 @@
1
+ /**
2
+ * GitHub Actions workflow template generator.
3
+ *
4
+ * Generates production-ready GitHub Actions workflows for VertaaUX integration
5
+ * with SARIF upload for Code Scanning, artifact storage, and PR comments.
6
+ *
7
+ * @see https://docs.github.com/en/actions
8
+ * @see https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning
9
+ */
10
+ /**
11
+ * Options for workflow generation.
12
+ */
13
+ export interface WorkflowOptions {
14
+ /** Target URL to audit (optional, can be set in config) */
15
+ auditUrl?: string;
16
+ /** Severity level that causes workflow to fail */
17
+ failOn?: "error" | "warning" | "info" | "none";
18
+ /** Minimum score threshold (0-100) */
19
+ threshold?: number;
20
+ /** Upload SARIF results to GitHub Code Scanning */
21
+ uploadSarif?: boolean;
22
+ /** Upload HTML report and artifacts */
23
+ uploadArtifacts?: boolean;
24
+ /** Post PR comment with results summary */
25
+ postComment?: boolean;
26
+ /** Node.js version to use */
27
+ nodeVersion?: string;
28
+ /** Enable caching for node_modules, browsers, and route results */
29
+ enableCaching?: boolean;
30
+ /** Generate monorepo matrix workflow */
31
+ monorepo?: boolean;
32
+ }
33
+ /**
34
+ * Generate a production-ready GitHub Actions workflow for VertaaUX.
35
+ *
36
+ * Features:
37
+ * - Triggers on pull_request and push to main/master
38
+ * - SARIF upload for inline Code Scanning annotations
39
+ * - HTML report and artifact upload
40
+ * - PR comment with results summary using sticky comments
41
+ * - Proper exit code handling for CI gating
42
+ *
43
+ * @param options - Workflow generation options
44
+ * @returns YAML workflow content
45
+ *
46
+ * @example
47
+ * ```typescript
48
+ * const workflow = generateGitHubActionsWorkflow({
49
+ * auditUrl: 'https://example.com',
50
+ * failOn: 'warning',
51
+ * uploadSarif: true,
52
+ * postComment: true,
53
+ * });
54
+ * ```
55
+ */
56
+ export declare function generateGitHubActionsWorkflow(options?: WorkflowOptions): string;
57
+ /**
58
+ * Generate a minimal GitHub Actions workflow (basic SARIF upload only).
59
+ *
60
+ * @returns YAML workflow content
61
+ */
62
+ export declare function generateMinimalWorkflow(): string;
63
+ /**
64
+ * Generate a monorepo-aware GitHub Actions workflow.
65
+ *
66
+ * This workflow first detects all auditable apps in the monorepo,
67
+ * then runs audits in parallel using a matrix strategy.
68
+ *
69
+ * @param options - Workflow generation options
70
+ * @returns YAML workflow content
71
+ *
72
+ * @example
73
+ * ```typescript
74
+ * const workflow = generateMonorepoWorkflow({
75
+ * failOn: 'warning',
76
+ * uploadSarif: true,
77
+ * });
78
+ * ```
79
+ */
80
+ export declare function generateMonorepoWorkflow(options?: Omit<WorkflowOptions, "monorepo">): string;
81
+ //# sourceMappingURL=github-actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github-actions.d.ts","sourceRoot":"","sources":["../../src/templates/github-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;IAC/C,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uCAAuC;IACvC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,2CAA2C;IAC3C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,6BAA6B;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mEAAmE;IACnE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAiBD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,GAAE,eAAoB,GAC5B,MAAM,CAiKR;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAMhD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,GAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAM,GAC9C,MAAM,CA8KR"}