Skip to content

Commit

Permalink
Fix axe version (#87)
Browse files Browse the repository at this point in the history
* fix axe version

Fix

draft

draft

draft

* Clean up

Clean up
  • Loading branch information
katydecorah authored Jan 22, 2025
1 parent 76bf363 commit 1a31597
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 48 deletions.
27 changes: 4 additions & 23 deletions dist/axe-info.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import Axe from "axe-core";
import { injectable } from "inversify";
let AxeInfo = class AxeInfo {
axe;
constructor(axe = Axe) {
this.axe = axe;
}
import axe from "axe-core";
export class AxeInfo {
get version() {
return this.axe.version;
return axe.version;
}
};
AxeInfo = __decorate([
injectable(),
__metadata("design:paramtypes", [Object])
], AxeInfo);
export { AxeInfo };
}
18 changes: 7 additions & 11 deletions dist/scan.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,21 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
import { inject, injectable } from "inversify";
import pkg from "accessibility-insights-scan";
const { CrawlerParametersBuilder, AICombinedReportDataConverter, AICrawler, BaselineFileUpdater, BaselineOptionsBuilder, } = pkg;
import { AxeInfo } from "./axe-info.js";
import axe from "axe-core";
import { ConsolidatedReportGenerator } from "./report.js";
import { setFailed, getInput, info, summary, getBooleanInput, setOutput, } from "@actions/core";
import { markdownSummary } from "./summary/index.js";
let Scanner = class Scanner {
crawler;
crawlerParametersBuilder;
axeInfo;
combinedReportDataConverter;
reportGenerator;
baselineOptionsBuilder;
baselineFileUpdater;
scanSucceeded = true;
constructor(crawler, crawlerParametersBuilder, axeInfo, combinedReportDataConverter, reportGenerator, baselineOptionsBuilder, baselineFileUpdater) {
constructor(crawler, crawlerParametersBuilder, combinedReportDataConverter, reportGenerator, baselineOptionsBuilder, baselineFileUpdater) {
this.crawler = crawler;
this.crawlerParametersBuilder = crawlerParametersBuilder;
this.axeInfo = axeInfo;
this.combinedReportDataConverter = combinedReportDataConverter;
this.reportGenerator = reportGenerator;
this.baselineOptionsBuilder = baselineOptionsBuilder;
Expand Down Expand Up @@ -101,7 +99,7 @@ let Scanner = class Scanner {
baseUrl: combinedScanResult.scanMetadata.baseUrl ?? "n/a",
basePageTitle: combinedScanResult.scanMetadata.basePageTitle,
scanEngineName: "accessibility-scan-action",
axeCoreVersion: this.axeInfo.version,
axeCoreVersion: axe.version,
browserUserAgent: combinedScanResult.scanMetadata.userAgent,
urlCount: combinedScanResult.urlCount,
scanStarted,
Expand All @@ -118,14 +116,12 @@ Scanner = __decorate([
injectable(),
__param(0, inject(AICrawler)),
__param(1, inject(CrawlerParametersBuilder)),
__param(2, inject(AxeInfo)),
__param(3, inject(AICombinedReportDataConverter)),
__param(4, inject(ConsolidatedReportGenerator)),
__param(5, inject(BaselineOptionsBuilder)),
__param(6, inject(BaselineFileUpdater)),
__param(2, inject(AICombinedReportDataConverter)),
__param(3, inject(ConsolidatedReportGenerator)),
__param(4, inject(BaselineOptionsBuilder)),
__param(5, inject(BaselineFileUpdater)),
__metadata("design:paramtypes", [AICrawler,
CrawlerParametersBuilder,
AxeInfo,
AICombinedReportDataConverter,
ConsolidatedReportGenerator,
BaselineOptionsBuilder,
Expand Down
11 changes: 0 additions & 11 deletions src/axe-info.ts

This file was deleted.

5 changes: 2 additions & 3 deletions src/scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const {
BaselineOptionsBuilder,
} = pkg;
import { CombinedReportParameters } from "accessibility-insights-report";
import { AxeInfo } from "./axe-info.js";
import axe from "axe-core";
import { ConsolidatedReportGenerator } from "./report.js";
import {
setFailed,
Expand All @@ -32,7 +32,6 @@ export class Scanner {
@inject(AICrawler) private readonly crawler: AICrawler,
@inject(CrawlerParametersBuilder)
private readonly crawlerParametersBuilder: CrawlerParametersBuilder,
@inject(AxeInfo) private readonly axeInfo: AxeInfo,
@inject(AICombinedReportDataConverter)
private readonly combinedReportDataConverter: AICombinedReportDataConverter,
@inject(ConsolidatedReportGenerator)
Expand Down Expand Up @@ -144,7 +143,7 @@ export class Scanner {
baseUrl: combinedScanResult.scanMetadata.baseUrl ?? "n/a",
basePageTitle: combinedScanResult.scanMetadata.basePageTitle,
scanEngineName: "accessibility-scan-action",
axeCoreVersion: this.axeInfo.version,
axeCoreVersion: axe.version,
browserUserAgent: combinedScanResult.scanMetadata.userAgent,
urlCount: combinedScanResult.urlCount,
scanStarted,
Expand Down

0 comments on commit 1a31597

Please sign in to comment.