@axe-core/watcher 0.0.1-next.91ee5036 → 0.0.1-next.9c19014c
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/README.md +5 -0
- package/dist/Controller.d.ts +9 -0
- package/dist/Controller.js +137 -0
- package/dist/Controller.js.map +1 -0
- package/dist/cypress.d.ts +8 -0
- package/dist/cypress.js +60 -0
- package/dist/cypress.js.map +1 -0
- package/dist/cypressCommands.d.ts +15 -0
- package/dist/cypressCommands.js +43 -0
- package/dist/cypressCommands.js.map +1 -0
- package/dist/git.d.ts +19 -0
- package/dist/git.js +104 -0
- package/dist/git.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/playwright.d.ts +2 -1
- package/dist/playwright.js +5 -1
- package/dist/playwright.js.map +1 -1
- package/dist/puppeteer.d.ts +2 -1
- package/dist/puppeteer.js +5 -1
- package/dist/puppeteer.js.map +1 -1
- package/dist/util.d.ts +5 -7
- package/dist/util.js +47 -129
- package/dist/util.js.map +1 -1
- package/dist/wdio.d.ts +2 -1
- package/dist/wdio.js +38 -2
- package/dist/wdio.js.map +1 -1
- package/dist/webdriver.d.ts +2 -1
- package/dist/webdriver.js +5 -1
- package/dist/webdriver.js.map +1 -1
- package/extension/content.js +1 -1
- package/extension/content.js.LICENSE.txt +1 -1
- package/extension/worker.js +1 -1
- package/extension/worker.js.LICENSE.txt +1 -1
- package/package.json +18 -37
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js +0 -134
- package/dist/cli.js.map +0 -1
package/README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# axe™ Watcher
|
|
2
|
+
|
|
3
|
+
Using this module requires an account on the [axe Developer Hub](https://axe.deque.com/axe-watcher/projects). In order to get a trial account, please [contact Deque](https://www.deque.com/company/contact/). For information on how to use this module, please follow the instructions on the [axe Developer Hub](https://axe.deque.com/axe-watcher/projects) projects page.
|
|
4
|
+
|
|
5
|
+
[For support on axe-core, axe Watcher and accessibility. Join the axe Communiity Slack](https://accessibility.deque.com/axe-community)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare abstract class Controller {
|
|
2
|
+
protected abstract executeScript(fn: string | (() => Promise<void>)): Promise<void>;
|
|
3
|
+
start(): Promise<void>;
|
|
4
|
+
stop(): Promise<void>;
|
|
5
|
+
analyze(): Promise<void>;
|
|
6
|
+
/** Flush all axe-core results by sending them to the server. */
|
|
7
|
+
flush(): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export default Controller;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
var fs_1 = __importDefault(require("fs"));
|
|
43
|
+
var util_1 = require("./util");
|
|
44
|
+
var updateAutoAnalyze = function (val) {
|
|
45
|
+
var fileContents = fs_1.default.readFileSync(util_1.PATH_TO_EXTENSION_VARIABLES, 'utf-8');
|
|
46
|
+
var jsonValue = JSON.parse(fileContents);
|
|
47
|
+
jsonValue.auto_analyze = val;
|
|
48
|
+
fs_1.default.writeFileSync(util_1.PATH_TO_EXTENSION_VARIABLES, JSON.stringify(jsonValue));
|
|
49
|
+
};
|
|
50
|
+
var Controller = /** @class */ (function () {
|
|
51
|
+
function Controller() {
|
|
52
|
+
}
|
|
53
|
+
Controller.prototype.start = function () {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
55
|
+
return __generator(this, function (_a) {
|
|
56
|
+
switch (_a.label) {
|
|
57
|
+
case 0:
|
|
58
|
+
updateAutoAnalyze(true);
|
|
59
|
+
return [4 /*yield*/, this.executeScript(function () {
|
|
60
|
+
var event = new CustomEvent('axe:start-auto-mode');
|
|
61
|
+
window.dispatchEvent(event);
|
|
62
|
+
return Promise.resolve();
|
|
63
|
+
})];
|
|
64
|
+
case 1:
|
|
65
|
+
_a.sent();
|
|
66
|
+
return [2 /*return*/];
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
Controller.prototype.stop = function () {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
73
|
+
return __generator(this, function (_a) {
|
|
74
|
+
switch (_a.label) {
|
|
75
|
+
case 0:
|
|
76
|
+
updateAutoAnalyze(false);
|
|
77
|
+
return [4 /*yield*/, this.executeScript(function () {
|
|
78
|
+
var event = new CustomEvent('axe:stop-auto-mode');
|
|
79
|
+
window.dispatchEvent(event);
|
|
80
|
+
return Promise.resolve();
|
|
81
|
+
})];
|
|
82
|
+
case 1:
|
|
83
|
+
_a.sent();
|
|
84
|
+
return [2 /*return*/];
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
Controller.prototype.analyze = function () {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
91
|
+
return __generator(this, function (_a) {
|
|
92
|
+
switch (_a.label) {
|
|
93
|
+
case 0: return [4 /*yield*/, this.executeScript(function () {
|
|
94
|
+
return new Promise(function (resolve) {
|
|
95
|
+
var event = new CustomEvent('axe:manual-mode-analyze');
|
|
96
|
+
var fn = function () {
|
|
97
|
+
window.removeEventListener('axe:manual-mode-analyze-done', fn);
|
|
98
|
+
resolve();
|
|
99
|
+
};
|
|
100
|
+
window.addEventListener('axe:manual-mode-analyze-done', fn);
|
|
101
|
+
window.dispatchEvent(event);
|
|
102
|
+
});
|
|
103
|
+
})];
|
|
104
|
+
case 1:
|
|
105
|
+
_a.sent();
|
|
106
|
+
return [2 /*return*/];
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
/** Flush all axe-core results by sending them to the server. */
|
|
112
|
+
Controller.prototype.flush = function () {
|
|
113
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
114
|
+
return __generator(this, function (_a) {
|
|
115
|
+
switch (_a.label) {
|
|
116
|
+
case 0: return [4 /*yield*/, this.executeScript(function () {
|
|
117
|
+
return new Promise(function (resolve) {
|
|
118
|
+
var fn = function () {
|
|
119
|
+
window.removeEventListener('axe:flush-end', fn);
|
|
120
|
+
resolve();
|
|
121
|
+
};
|
|
122
|
+
window.addEventListener('axe:flush-end', fn);
|
|
123
|
+
var event = new CustomEvent('axe:flush-start');
|
|
124
|
+
window.dispatchEvent(event);
|
|
125
|
+
});
|
|
126
|
+
})];
|
|
127
|
+
case 1:
|
|
128
|
+
_a.sent();
|
|
129
|
+
return [2 /*return*/];
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
return Controller;
|
|
135
|
+
}());
|
|
136
|
+
exports.default = Controller;
|
|
137
|
+
//# sourceMappingURL=Controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Controller.js","sourceRoot":"","sources":["../src/Controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAmB;AACnB,+BAAoD;AAEpD,IAAM,iBAAiB,GAAG,UAAC,GAAY;IACrC,IAAM,YAAY,GAAG,YAAE,CAAC,YAAY,C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M,CAAC,gBAAgB,CAAC,8BAA8B,EAAE,EAAE,CAAC,CAAA;gCAC3D,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;4BAC7B,CAAC,CAAC,CAAA;wBACJ,CAAC,CAAC,EAAA;;wBAVF,SAUE,CAAA;;;;;KACH;IAED,gEAAgE;IACnD,0BAAK,GAAlB;;;;4BACE,qBAAM,IAAI,CAAC,aAAa,CAAC;4BACvB,OAAO,IAAI,OAAO,CAAC,UAAA,OAAO;gCACxB,IAAM,EAAE,GAAG;oCACT,MAAM,CAAC,mBAAmB,CAAC,eAAe,EAAE,EAAE,CAAC,CAAA;oCAC/C,OAAO,EAAE,CAAA;gCACX,CAAC,CAAA;gCACD,MAAM,CAAC,gBAAgB,CAAC,eAAe,EAAE,EAAE,CAAC,CAAA;gCAC5C,IAAM,KAAK,GAAG,IAAI,WAAW,CAAC,iBAAiB,CAAC,CAAA;gCAChD,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;4BAC7B,CAAC,CAAC,CAAA;wBACJ,CAAC,CAAC,EAAA;;wBAVF,SAUE,CAAA;;;;;KACH;IACH,iBAAC;AAAD,CAAC,AAnDD,IAmDC;AAED,kBAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type Cypress from 'cypress';
|
|
2
|
+
import { Configuration } from './util';
|
|
3
|
+
/**
|
|
4
|
+
* Create a Cypress config that uses the axe Watcher extension.
|
|
5
|
+
*
|
|
6
|
+
* @param config Cypress config to extend
|
|
7
|
+
*/
|
|
8
|
+
export declare const cypressConfig: (config: Cypress.ConfigOptions & Configuration) => Cypress.ConfigOptions;
|
package/dist/cypress.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.cypressConfig = void 0;
|
|
26
|
+
var util_1 = require("./util");
|
|
27
|
+
/**
|
|
28
|
+
* Create a Cypress config that uses the axe Watcher extension.
|
|
29
|
+
*
|
|
30
|
+
* @param config Cypress config to extend
|
|
31
|
+
*/
|
|
32
|
+
var cypressConfig = function (config) {
|
|
33
|
+
var axe = config.axe, userConfig = __rest(config, ["axe"]);
|
|
34
|
+
(0, util_1.writeVariables)(axe);
|
|
35
|
+
(0, util_1.writeManifest)({
|
|
36
|
+
all_frames: true,
|
|
37
|
+
exclude_globs: [
|
|
38
|
+
// Top-level Cypress page.
|
|
39
|
+
'*/__/#/specs/runner?file=*',
|
|
40
|
+
// Cypress-specific iframes.
|
|
41
|
+
'*/__cypress/iframes/*'
|
|
42
|
+
]
|
|
43
|
+
});
|
|
44
|
+
return __assign(__assign({}, userConfig), { e2e: __assign(__assign({}, userConfig.e2e), { setupNodeEvents: function (on) {
|
|
45
|
+
on('before:browser:launch', function (browser, launchOptions) {
|
|
46
|
+
var _a;
|
|
47
|
+
// We only support Chrome.
|
|
48
|
+
if (browser.name === 'chrome') {
|
|
49
|
+
if (browser.isHeadless) {
|
|
50
|
+
throw new util_1.HeadlessNotSupportedError();
|
|
51
|
+
}
|
|
52
|
+
// Load the extension.
|
|
53
|
+
(_a = launchOptions.args).push.apply(_a, util_1.extensionArgs);
|
|
54
|
+
}
|
|
55
|
+
return launchOptions;
|
|
56
|
+
});
|
|
57
|
+
} }) });
|
|
58
|
+
};
|
|
59
|
+
exports.cypressConfig = cypressConfig;
|
|
60
|
+
//# sourceMappingURL=cypress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cypress.js","sourceRoot":"","sources":["../src/cypress.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,+BAMe;AAEf;;;;GAIG;AAEI,IAAM,aAAa,GAAG,UAC3B,MAA6C;IAErC,IAAA,GAAG,GAAoB,MAAM,IAA1B,EAAK,UAAU,UAAK,MAAM,EAA/B,OAAsB,CAAF,CAAW;IAErC,IAAA,qBAAc,EAAC,GAAG,CAAC,CAAA;IACnB,IAAA,oBAAa,EAAC;QACZ,UAAU,EAAE,IAAI;QAChB,aAAa,EAAE;YACb,0BAA0B;YAC1B,4BAA4B;YAC5B,4BAA4B;YAC5B,uBAAuB;SACxB;KACF,CAAC,CAAA;IAEF,6BACK,UAAU,KACb,GAAG,wBACE,UAAU,CAAC,GAAG,KACjB,eAAe,YAAC,EAAE;gBAChB,EAAE,CAAC,uBAAuB,EAAE,UAAC,OAAO,EAAE,aAAa;;oBACjD,0BAA0B;oBAC1B,IAAI,OAAO,CAAC,IAAI,KAAK,QAAQ,EAAE;wBAC7B,IAAI,OAAO,CAAC,UAAU,EAAE;4BACtB,MAAM,IAAI,gCAAyB,EAAE,CAAA;yBACtC;wBAED,sBAAsB;wBACtB,CAAA,KAAA,aAAa,CAAC,IAAI,CAAA,CAAC,IAAI,WAAI,oBAAa,EAAC;qBAC1C;oBAED,OAAO,aAAa,CAAA;gBACtB,CAAC,CAAC,CAAA;YACJ,CAAC,OAEJ;AACH,CAAC,CAAA;AArCY,QAAA,aAAa,iBAqCzB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
declare global {
|
|
3
|
+
namespace Cypress {
|
|
4
|
+
interface Chainable {
|
|
5
|
+
/** Flush the axe-core result queue by sending results to the server. */
|
|
6
|
+
axeFlush(): Chainable<void>;
|
|
7
|
+
/** Perform a manual axe-core analysis. */
|
|
8
|
+
axeAnalyze(): Chainable<void>;
|
|
9
|
+
/** Start automatic analysis mode. */
|
|
10
|
+
axeStart(): Chainable<void>;
|
|
11
|
+
/** Stop automatic analysis mode. */
|
|
12
|
+
axeStop(): Chainable<void>;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
Cypress.Commands.add('axeFlush', function () {
|
|
4
|
+
cy.window().then(function (win) {
|
|
5
|
+
return new Promise(function (resolve) {
|
|
6
|
+
var fn = function () {
|
|
7
|
+
win.removeEventListener('axe:flush-end', fn);
|
|
8
|
+
resolve();
|
|
9
|
+
};
|
|
10
|
+
win.addEventListener('axe:flush-end', fn);
|
|
11
|
+
var event = new CustomEvent('axe:flush-start');
|
|
12
|
+
win.dispatchEvent(event);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
Cypress.Commands.add('axeAnalyze', function () {
|
|
17
|
+
cy.window().then(function (win) {
|
|
18
|
+
return new Promise(function (resolve) {
|
|
19
|
+
var event = new CustomEvent('axe:manual-mode-analyze');
|
|
20
|
+
var fn = function () {
|
|
21
|
+
win.removeEventListener('axe:manual-mode-analyze-done', fn);
|
|
22
|
+
resolve();
|
|
23
|
+
};
|
|
24
|
+
win.addEventListener('axe:manual-mode-analyze-done', fn);
|
|
25
|
+
win.dispatchEvent(event);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
Cypress.Commands.add('axeStart', function () {
|
|
30
|
+
cy.window().then(function (win) {
|
|
31
|
+
var event = new CustomEvent('axe:start-auto-mode');
|
|
32
|
+
win.dispatchEvent(event);
|
|
33
|
+
return Promise.resolve();
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
Cypress.Commands.add('axeStop', function () {
|
|
37
|
+
cy.window().then(function (win) {
|
|
38
|
+
var event = new CustomEvent('axe:stop-auto-mode');
|
|
39
|
+
win.dispatchEvent(event);
|
|
40
|
+
return Promise.resolve();
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=cypressCommands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cypressCommands.js","sourceRoot":"","sources":["../src/cypressCommands.ts"],"names":[],"mappings":";;AAmBA,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,EAAE;IAC/B,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,UAAA,GAAG;QAClB,OAAO,IAAI,OAAO,CAAO,UAAA,OAAO;YAC9B,IAAM,EAAE,GAAG;gBACT,GAAG,CAAC,mBAAmB,CAAC,eAAe,EAAE,EAAE,CAAC,CAAA;gBAC5C,OAAO,EAAE,CAAA;YACX,CAAC,CAAA;YACD,GAAG,CAAC,gBAAgB,CAAC,eAAe,EAAE,EAAE,CAAC,CAAA;YACzC,IAAM,KAAK,GAAG,IAAI,WAAW,CAAC,iBAAiB,CAAC,CAAA;YAChD,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;QAC1B,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,YAAY,EAAE;IACjC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,UAAA,GAAG;QAClB,OAAO,IAAI,OAAO,CAAO,UAAA,OAAO;YAC9B,IAAM,KAAK,GAAG,IAAI,WAAW,CAAC,yBAAyB,CAAC,CAAA;YACxD,IAAM,EAAE,GAAG;gBACT,GAAG,CAAC,mBAAmB,CAAC,8BAA8B,EAAE,EAAE,CAAC,CAAA;gBAC3D,OAAO,EAAE,CAAA;YACX,CAAC,CAAA;YACD,GAAG,CAAC,gBAAgB,CAAC,8BAA8B,EAAE,EAAE,CAAC,CAAA;YACxD,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;QAC1B,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,EAAE;IAC/B,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,UAAA,GAAG;QAClB,IAAM,KAAK,GAAG,IAAI,WAAW,CAAC,qBAAqB,CAAC,CAAA;QACpD,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;QACxB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAC1B,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,EAAE;IAC9B,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,UAAA,GAAG;QAClB,IAAM,KAAK,GAAG,IAAI,WAAW,CAAC,oBAAoB,CAAC,CAAA;QACnD,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;QACxB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAC1B,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
package/dist/git.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Check if the given `dir` is contained by a Git repository. */
|
|
2
|
+
export declare const isRepository: (dir?: string) => boolean;
|
|
3
|
+
/** Get the current branch name. */
|
|
4
|
+
export declare const getBranchName: (dir?: string) => string | null;
|
|
5
|
+
/** Get the default branch name. */
|
|
6
|
+
export declare const getDefaultBranchName: (dir?: string) => string | null;
|
|
7
|
+
/** Get the repository's remote URL. */
|
|
8
|
+
export declare const getRemoteURL: (dir?: string) => string | null;
|
|
9
|
+
interface CommitInfo {
|
|
10
|
+
message: string;
|
|
11
|
+
hash: string;
|
|
12
|
+
author: string;
|
|
13
|
+
email: string;
|
|
14
|
+
}
|
|
15
|
+
/** Get info on the most recent commit. */
|
|
16
|
+
export declare const getCommitInfo: (dir?: string) => CommitInfo | null;
|
|
17
|
+
/** Check if the repository contains unstaged changes. */
|
|
18
|
+
export declare const isDirty: (dir?: string) => boolean;
|
|
19
|
+
export {};
|
package/dist/git.js
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isDirty = exports.getCommitInfo = exports.getRemoteURL = exports.getDefaultBranchName = exports.getBranchName = exports.isRepository = void 0;
|
|
4
|
+
var child_process_1 = require("child_process");
|
|
5
|
+
/** Check if the given `dir` is contained by a Git repository. */
|
|
6
|
+
var isRepository = function (dir) {
|
|
7
|
+
if (dir === void 0) { dir = process.cwd(); }
|
|
8
|
+
try {
|
|
9
|
+
(0, child_process_1.execSync)('git rev-parse --is-inside-work-tree', {
|
|
10
|
+
cwd: dir,
|
|
11
|
+
// Prevent printing "fatal: not a git repository".
|
|
12
|
+
stdio: 'ignore'
|
|
13
|
+
});
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
catch (_a) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
exports.isRepository = isRepository;
|
|
21
|
+
/** Get the current branch name. */
|
|
22
|
+
var getBranchName = function (dir) {
|
|
23
|
+
if (dir === void 0) { dir = process.cwd(); }
|
|
24
|
+
try {
|
|
25
|
+
return (0, child_process_1.execSync)('git rev-parse --abbrev-ref HEAD', {
|
|
26
|
+
cwd: dir,
|
|
27
|
+
// Ignore stderr to prevent printing "fatal: not a git repository" in tests.
|
|
28
|
+
stdio: ['ignore', 'pipe', 'ignore']
|
|
29
|
+
})
|
|
30
|
+
.toString()
|
|
31
|
+
.trim();
|
|
32
|
+
}
|
|
33
|
+
catch (_a) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
exports.getBranchName = getBranchName;
|
|
38
|
+
/** Get the default branch name. */
|
|
39
|
+
var getDefaultBranchName = function (dir) {
|
|
40
|
+
if (dir === void 0) { dir = process.cwd(); }
|
|
41
|
+
try {
|
|
42
|
+
return (0, child_process_1.execSync)('git symbolic-ref --short refs/remotes/origin/HEAD', {
|
|
43
|
+
cwd: dir,
|
|
44
|
+
stdio: ['ignore', 'pipe', 'ignore']
|
|
45
|
+
})
|
|
46
|
+
.toString()
|
|
47
|
+
.trim()
|
|
48
|
+
.replace('origin/', '');
|
|
49
|
+
}
|
|
50
|
+
catch (_a) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
exports.getDefaultBranchName = getDefaultBranchName;
|
|
55
|
+
/** Get the repository's remote URL. */
|
|
56
|
+
var getRemoteURL = function (dir) {
|
|
57
|
+
if (dir === void 0) { dir = process.cwd(); }
|
|
58
|
+
try {
|
|
59
|
+
return (0, child_process_1.execSync)('git config --get remote.origin.url', {
|
|
60
|
+
cwd: dir,
|
|
61
|
+
stdio: ['ignore', 'pipe', 'ignore']
|
|
62
|
+
})
|
|
63
|
+
.toString()
|
|
64
|
+
.trim();
|
|
65
|
+
}
|
|
66
|
+
catch (_a) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
exports.getRemoteURL = getRemoteURL;
|
|
71
|
+
/** Get info on the most recent commit. */
|
|
72
|
+
var getCommitInfo = function (dir) {
|
|
73
|
+
if (dir === void 0) { dir = process.cwd(); }
|
|
74
|
+
try {
|
|
75
|
+
// %s=subject (message), %H=hash, %an=author name, %ae=author email, %n=newline
|
|
76
|
+
// See https://git-scm.com/docs/git-show#_pretty_formats
|
|
77
|
+
var stdout = (0, child_process_1.execSync)('git show --no-patch --format="%s%n%H%n%an%n%ae"', {
|
|
78
|
+
cwd: dir,
|
|
79
|
+
stdio: ['ignore', 'pipe', 'ignore']
|
|
80
|
+
});
|
|
81
|
+
var _a = stdout.toString().trim().split('\n'), message = _a[0], hash = _a[1], author = _a[2], email = _a[3];
|
|
82
|
+
return { message: message, hash: hash, author: author, email: email };
|
|
83
|
+
}
|
|
84
|
+
catch (_b) {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
exports.getCommitInfo = getCommitInfo;
|
|
89
|
+
/** Check if the repository contains unstaged changes. */
|
|
90
|
+
var isDirty = function (dir) {
|
|
91
|
+
if (dir === void 0) { dir = process.cwd(); }
|
|
92
|
+
try {
|
|
93
|
+
var stdout = (0, child_process_1.execSync)('git status --short', {
|
|
94
|
+
cwd: dir,
|
|
95
|
+
stdio: ['ignore', 'pipe', 'ignore']
|
|
96
|
+
});
|
|
97
|
+
return stdout.length > 0;
|
|
98
|
+
}
|
|
99
|
+
catch (_a) {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
exports.isDirty = isDirty;
|
|
104
|
+
//# sourceMappingURL=git.js.map
|
package/dist/git.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git.js","sourceRoot":"","sources":["../src/git.ts"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,iEAAiE;AAC1D,IAAM,YAAY,GAAG,UAAC,GAAmB;IAAnB,oBAAA,EAAA,MAAM,OAAO,CAAC,GAAG,EAAE;IAC9C,IAAI;QACF,IAAA,wBAAQ,EAAC,qCAAqC,EAAE;YAC9C,GAAG,EAAE,GAAG;YACR,kDAAkD;YAClD,KAAK,EAAE,QAAQ;SAChB,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;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
|
|
1
|
+
/*! Copyright Deque 2021-2022 All Rights Reserved */
|
|
2
2
|
export { puppeteerConfig, PuppeteerController } from './puppeteer';
|
|
3
3
|
export { wdioConfig, wdioTestRunner, WdioController } from './wdio';
|
|
4
4
|
export { webdriverConfig, WebdriverController } from './webdriver';
|
|
5
5
|
export { playwrightConfig, PlaywrightController } from './playwright';
|
|
6
|
+
export { cypressConfig } from './cypress';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*! Copyright Deque
|
|
2
|
+
/*! Copyright Deque 2021-2022 All Rights Reserved */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.PlaywrightController = exports.playwrightConfig = exports.WebdriverController = exports.webdriverConfig = exports.WdioController = exports.wdioTestRunner = exports.wdioConfig = exports.PuppeteerController = exports.puppeteerConfig = void 0;
|
|
4
|
+
exports.cypressConfig = exports.PlaywrightController = exports.playwrightConfig = exports.WebdriverController = exports.webdriverConfig = exports.WdioController = exports.wdioTestRunner = exports.wdioConfig = exports.PuppeteerController = exports.puppeteerConfig = void 0;
|
|
5
5
|
var puppeteer_1 = require("./puppeteer");
|
|
6
6
|
Object.defineProperty(exports, "puppeteerConfig", { enumerable: true, get: function () { return puppeteer_1.puppeteerConfig; } });
|
|
7
7
|
Object.defineProperty(exports, "PuppeteerController", { enumerable: true, get: function () { return puppeteer_1.PuppeteerController; } });
|
|
@@ -15,4 +15,6 @@ Object.defineProperty(exports, "WebdriverController", { enumerable: true, get: f
|
|
|
15
15
|
var playwright_1 = require("./playwright");
|
|
16
16
|
Object.defineProperty(exports, "playwrightConfig", { enumerable: true, get: function () { return playwright_1.playwrightConfig; } });
|
|
17
17
|
Object.defineProperty(exports, "PlaywrightController", { enumerable: true, get: function () { return playwright_1.PlaywrightController; } });
|
|
18
|
+
var cypress_1 = require("./cypress");
|
|
19
|
+
Object.defineProperty(exports, "cypressConfig", { enumerable: true, get: function () { return cypress_1.cypressConfig; } });
|
|
18
20
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;AAEpD,yCAAkE;AAAzD,4GAAA,eAAe,OAAA;AAAE,gHAAA,mBAAmB,OAAA;AAC7C,+BAAmE;AAA1D,kGAAA,UAAU,OAAA;AAAE,sGAAA,cAAc,OAAA;AAAE,sGAAA,cAAc,OAAA;AACnD,yCAAkE;AAAzD,4GAAA,eAAe,OAAA;AAAE,gHAAA,mBAAmB,OAAA;AAC7C,2CAAqE;AAA5D,8GAAA,gBAAgB,OAAA;AAAE,kHAAA,oBAAoB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;AAEpD,yCAAkE;AAAzD,4GAAA,eAAe,OAAA;AAAE,gHAAA,mBAAmB,OAAA;AAC7C,+BAAmE;AAA1D,kGAAA,UAAU,OAAA;AAAE,sGAAA,cAAc,OAAA;AAAE,sGAAA,cAAc,OAAA;AACnD,yCAAkE;AAAzD,4GAAA,eAAe,OAAA;AAAE,gHAAA,mBAAmB,OAAA;AAC7C,2CAAqE;AAA5D,8GAAA,gBAAgB,OAAA;AAAE,kHAAA,oBAAoB,OAAA;AAC/C,qCAAyC;AAAhC,wGAAA,aAAa,OAAA"}
|
package/dist/playwright.d.ts
CHANGED
package/dist/playwright.js
CHANGED
|
@@ -72,9 +72,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
72
72
|
}
|
|
73
73
|
return t;
|
|
74
74
|
};
|
|
75
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
76
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
77
|
+
};
|
|
75
78
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76
79
|
exports.PlaywrightController = exports.playwrightConfig = void 0;
|
|
77
80
|
var util_1 = require("./util");
|
|
81
|
+
var Controller_1 = __importDefault(require("./Controller"));
|
|
78
82
|
/**
|
|
79
83
|
* Creates a Playwright config that uses axe extension
|
|
80
84
|
*
|
|
@@ -111,6 +115,6 @@ var PlaywrightController = /** @class */ (function (_super) {
|
|
|
111
115
|
});
|
|
112
116
|
};
|
|
113
117
|
return PlaywrightController;
|
|
114
|
-
}(
|
|
118
|
+
}(Controller_1.default));
|
|
115
119
|
exports.PlaywrightController = PlaywrightController;
|
|
116
120
|
//# sourceMappingURL=playwright.js.map
|
package/dist/playwright.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playwright.js","sourceRoot":"","sources":["../src/playwright.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"playwright.js","sourceRoot":"","sources":["../src/playwright.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,+BAKe;AACf,4DAAqC;AAErC;;;;GAIG;AAEH,SAAgB,gBAAgB,CAC9B,IAAmC;IAE3B,IAAA,GAAG,GAAgB,IAAI,IAApB,EAAK,MAAM,UAAK,IAAI,EAAzB,OAAkB,CAAF,CAAS;IACzB,IAAA,KAAc,MAAM,KAAX,EAAT,IAAI,mBAAG,EAAE,KAAA,CAAW;IAC1B,IAAA,qBAAc,EAAC,GAAG,CAAC,CAAA;IAEnB,IAAI,MAAM,CAAC,QAAQ,EAAE;QACnB,MAAM,IAAI,gCAAyB,EAAE,CAAA;KACtC;IAED,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,oBAAa,CAAC,CAAA;IAEjC,6BACK,MAAM,KACT,QAAQ,EAAE,KAAK,EACf,IAAI,MAAA,IACL;AACH,CAAC;AAlBD,4CAkBC;AAED;IAA0C,wCAAU;IAGlD,8BAAY,MAAY;QAAxB,YACE,iBAAO,SAER;QADC,KAAI,CAAC,MAAM,GAAG,MAAM,CAAA;;IACtB,CAAC;IAEe,4CAAa,GAA7B,UACE,EAAkC;;;;4BAElC,qBAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAA;;wBAA9B,SAA8B,CAAA;;;;;KAC/B;IACH,2BAAC;AAAD,CAAC,AAbD,CAA0C,oBAAU,GAanD;AAbY,oDAAoB"}
|
package/dist/puppeteer.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Configuration, Controller } from './util';
|
|
2
1
|
import type { LaunchOptions, BrowserLaunchArgumentOptions, BrowserConnectOptions, Page } from 'puppeteer';
|
|
2
|
+
import { Configuration } from './util';
|
|
3
|
+
import Controller from './Controller';
|
|
3
4
|
declare type Options = LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions;
|
|
4
5
|
/**
|
|
5
6
|
* Creates a Puppeteer config that uses axe extension.
|
package/dist/puppeteer.js
CHANGED
|
@@ -72,9 +72,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
72
72
|
}
|
|
73
73
|
return t;
|
|
74
74
|
};
|
|
75
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
76
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
77
|
+
};
|
|
75
78
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76
79
|
exports.PuppeteerController = exports.puppeteerConfig = void 0;
|
|
77
80
|
var util_1 = require("./util");
|
|
81
|
+
var Controller_1 = __importDefault(require("./Controller"));
|
|
78
82
|
/**
|
|
79
83
|
* Creates a Puppeteer config that uses axe extension.
|
|
80
84
|
*
|
|
@@ -111,6 +115,6 @@ var PuppeteerController = /** @class */ (function (_super) {
|
|
|
111
115
|
});
|
|
112
116
|
};
|
|
113
117
|
return PuppeteerController;
|
|
114
|
-
}(
|
|
118
|
+
}(Controller_1.default));
|
|
115
119
|
exports.PuppeteerController = PuppeteerController;
|
|
116
120
|
//# sourceMappingURL=puppeteer.js.map
|
package/dist/puppeteer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"puppeteer.js","sourceRoot":"","sources":["../src/puppeteer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"puppeteer.js","sourceRoot":"","sources":["../src/puppeteer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,+BAKe;AACf,4DAAqC;AAMrC;;;;GAIG;AAEH,SAAgB,eAAe,CAAC,IAA6B;IACnD,IAAA,GAAG,GAAgB,IAAI,IAApB,EAAK,MAAM,UAAK,IAAI,EAAzB,OAAkB,CAAF,CAAS;IACzB,IAAA,KAAc,MAAM,KAAX,EAAT,IAAI,mBAAG,EAAE,KAAA,CAAW;IAC1B,IAAA,qBAAc,EAAC,GAAG,CAAC,CAAA;IAEnB,IAAI,MAAM,CAAC,QAAQ,EAAE;QACnB,MAAM,IAAI,gCAAyB,EAAE,CAAA;KACtC;IAED,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,oBAAa,CAAC,CAAA;IAEjC,6BACK,MAAM,KACT,QAAQ,EAAE,KAAK,EACf,IAAI,MAAA,IACL;AACH,CAAC;AAhBD,0CAgBC;AAED;IAAyC,uCAAU;IAGjD,6BAAY,MAAY;QAAxB,YACE,iBAAO,SAER;QADC,KAAI,CAAC,MAAM,GAAG,MAAM,CAAA;;IACtB,CAAC;IAEe,2CAAa,GAA7B,UACE,EAAkC;;;;4BAElC,qBAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAA;;wBAA9B,SAA8B,CAAA;;;;;KAC/B;IACH,0BAAC;AAAD,CAAC,AAbD,CAAyC,oBAAU,GAalD;AAbY,kDAAmB"}
|
package/dist/util.d.ts
CHANGED
|
@@ -30,12 +30,10 @@ interface WriteVariablesParams {
|
|
|
30
30
|
}
|
|
31
31
|
/** Write the user's settings to the disk, so the extension can load them. */
|
|
32
32
|
export declare function writeVariables({ apiKey, serverURL, sessionId, autoAnalyze }: WriteVariablesParams): void;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
stop(): Promise<void>;
|
|
37
|
-
analyze(): Promise<void>;
|
|
38
|
-
/** Flush all axe-core results by sending them to the server. */
|
|
39
|
-
flush(): Promise<void>;
|
|
33
|
+
interface WriteManifestParams {
|
|
34
|
+
all_frames: boolean;
|
|
35
|
+
exclude_globs: string[];
|
|
40
36
|
}
|
|
37
|
+
/** Update the extension manifest file. */
|
|
38
|
+
export declare function writeManifest({ all_frames, exclude_globs }: WriteManifestParams): void;
|
|
41
39
|
export {};
|