aria-ease 6.14.0 → 7.0.1

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 (94) hide show
  1. package/README.md +1 -1
  2. package/dist/AccordionComponentStrategy-2SWMNUR6.js +1 -0
  3. package/dist/ComboboxComponentStrategy-YSYLR2U5.js +5 -0
  4. package/dist/MenuComponentStrategy-C22BZEBH.js +5 -0
  5. package/dist/RelativeTargetResolver-T4P25J2M.js +1 -0
  6. package/dist/TabsComponentStrategy-ADEEFJXM.js +1 -0
  7. package/dist/audit-WBKVW7H6.js +9 -0
  8. package/dist/badgeHelper-IB5RTMAG.js +11 -0
  9. package/dist/badgeHelper-JSROP5ML.js +1 -0
  10. package/dist/buildContracts-T4XQZBDU.js +13 -0
  11. package/dist/chunk-52I3INNG.js +11 -0
  12. package/dist/chunk-APUMBDOT.js +1 -0
  13. package/dist/chunk-BHNO4ZI3.js +1 -0
  14. package/dist/chunk-CNU4N4AY.js +1 -0
  15. package/dist/chunk-SM6ZKEDR.js +1 -0
  16. package/dist/chunk-ZNQ5BXVJ.js +1 -0
  17. package/dist/cli.cjs +132 -3560
  18. package/dist/cli.js +19 -161
  19. package/dist/configLoader-ZEJVXLX7.js +1 -0
  20. package/dist/configLoader-ZXTSCIP6.js +1 -0
  21. package/dist/contractTestRunnerPlaywright-FOCQTM4L.js +46 -0
  22. package/dist/contractTestRunnerPlaywright-QPU6HZXG.js +46 -0
  23. package/dist/formatters-H3CPDLG5.js +87 -0
  24. package/dist/index.cjs +64 -5103
  25. package/dist/index.d.cts +4 -6
  26. package/dist/index.d.ts +4 -6
  27. package/dist/index.js +17 -2703
  28. package/dist/src/accordion/index.cjs +1 -183
  29. package/dist/src/accordion/index.js +1 -181
  30. package/dist/src/block/index.cjs +1 -124
  31. package/dist/src/block/index.js +1 -122
  32. package/dist/src/checkbox/index.cjs +1 -109
  33. package/dist/src/checkbox/index.js +1 -107
  34. package/dist/src/combobox/index.cjs +1 -265
  35. package/dist/src/combobox/index.js +1 -263
  36. package/dist/src/menu/index.cjs +1 -339
  37. package/dist/src/menu/index.js +1 -337
  38. package/dist/src/radio/index.cjs +1 -117
  39. package/dist/src/radio/index.js +1 -115
  40. package/dist/src/tabs/index.cjs +1 -265
  41. package/dist/src/tabs/index.js +1 -263
  42. package/dist/src/toggle/index.cjs +1 -119
  43. package/dist/src/toggle/index.js +1 -117
  44. package/dist/src/utils/test/AccordionComponentStrategy-X2GSQ5KT.js +1 -0
  45. package/dist/src/utils/test/ComboboxComponentStrategy-SICWLI27.js +5 -0
  46. package/dist/src/utils/test/MenuComponentStrategy-R4VPAHDE.js +5 -0
  47. package/dist/src/utils/test/RelativeTargetResolver-UQQMZHI6.js +1 -0
  48. package/dist/src/utils/test/TabsComponentStrategy-L2PYNEW6.js +1 -0
  49. package/dist/src/utils/test/badgeHelper-ER5ZOHWF.js +11 -0
  50. package/dist/src/utils/test/chunk-APUMBDOT.js +1 -0
  51. package/dist/src/utils/test/chunk-BHNO4ZI3.js +1 -0
  52. package/dist/src/utils/test/configLoader-NCYRL2O6.js +1 -0
  53. package/dist/src/utils/test/contractTestRunnerPlaywright-YZCMF64Q.js +46 -0
  54. package/dist/src/utils/test/dsl/index.cjs +1 -838
  55. package/dist/src/utils/test/dsl/index.d.cts +2 -4
  56. package/dist/src/utils/test/dsl/index.d.ts +2 -4
  57. package/dist/src/utils/test/dsl/index.js +1 -836
  58. package/dist/src/utils/test/index.cjs +64 -2672
  59. package/dist/src/utils/test/index.d.cts +2 -2
  60. package/dist/src/utils/test/index.d.ts +2 -2
  61. package/dist/src/utils/test/index.js +16 -340
  62. package/dist/test-VXSCSKV5.js +19 -0
  63. package/package.json +8 -10
  64. package/dist/AccordionComponentStrategy-4ZEIQ2V6.js +0 -42
  65. package/dist/ComboboxComponentStrategy-DU342VMB.js +0 -64
  66. package/dist/MenuComponentStrategy-VYCC2XOM.js +0 -81
  67. package/dist/RelativeTargetResolver-DJAITO6D.js +0 -7
  68. package/dist/TabsComponentStrategy-3SQURPMX.js +0 -29
  69. package/dist/audit-JYEPKLHR.js +0 -63
  70. package/dist/badgeHelper-JOWO6RQG.js +0 -15
  71. package/dist/badgeHelper-RDOMCC6E.js +0 -108
  72. package/dist/buildContracts-VIV6GM56.js +0 -437
  73. package/dist/chunk-4DU5Z5BR.js +0 -340
  74. package/dist/chunk-GJGUY643.js +0 -182
  75. package/dist/chunk-GLT43UVH.js +0 -43
  76. package/dist/chunk-I2KLQ2HA.js +0 -22
  77. package/dist/chunk-JJEPLK7L.js +0 -107
  78. package/dist/chunk-PK5L2SAF.js +0 -17
  79. package/dist/configLoader-Q7N5XV4P.js +0 -183
  80. package/dist/configLoader-REHK3S3Q.js +0 -7
  81. package/dist/contractTestRunnerPlaywright-B2HLZKKK.js +0 -1394
  82. package/dist/contractTestRunnerPlaywright-RWK52C7S.js +0 -1394
  83. package/dist/formatters-32KQIIYS.js +0 -183
  84. package/dist/src/utils/test/AccordionComponentStrategy-WRHZOEN6.js +0 -38
  85. package/dist/src/utils/test/ComboboxComponentStrategy-XKQ72RFD.js +0 -60
  86. package/dist/src/utils/test/MenuComponentStrategy-6XWU5KLW.js +0 -77
  87. package/dist/src/utils/test/RelativeTargetResolver-G2XDN2VV.js +0 -1
  88. package/dist/src/utils/test/TabsComponentStrategy-BKG53SEV.js +0 -26
  89. package/dist/src/utils/test/badgeHelper-HZKGOPB4.js +0 -102
  90. package/dist/src/utils/test/chunk-4DU5Z5BR.js +0 -332
  91. package/dist/src/utils/test/chunk-GLT43UVH.js +0 -41
  92. package/dist/src/utils/test/configLoader-NA7IBCS3.js +0 -181
  93. package/dist/src/utils/test/contractTestRunnerPlaywright-5FIGA5G4.js +0 -1372
  94. package/dist/test-WDBS5JWO.js +0 -358
@@ -1,17 +0,0 @@
1
- import {
2
- __export,
3
- __reExport
4
- } from "./chunk-I2KLQ2HA.js";
5
-
6
- // node_modules/@playwright/test/index.mjs
7
- var test_exports = {};
8
- __export(test_exports, {
9
- default: () => default2
10
- });
11
- __reExport(test_exports, test_star);
12
- import * as test_star from "playwright/test";
13
- import { default as default2 } from "playwright/test";
14
-
15
- export {
16
- test_exports
17
- };
@@ -1,183 +0,0 @@
1
- import "./chunk-I2KLQ2HA.js";
2
-
3
- // src/utils/cli/configLoader.ts
4
- import path from "path";
5
- import fs from "fs-extra";
6
- function validateConfig(config) {
7
- const errors = [];
8
- if (!config || typeof config !== "object") {
9
- errors.push("Config must be an object");
10
- return { valid: false, errors };
11
- }
12
- const cfg = config;
13
- if (cfg.audit !== void 0) {
14
- if (typeof cfg.audit !== "object" || cfg.audit === null) {
15
- errors.push("audit must be an object");
16
- } else {
17
- if (cfg.audit.urls !== void 0) {
18
- if (!Array.isArray(cfg.audit.urls)) {
19
- errors.push("audit.urls must be an array");
20
- } else if (cfg.audit.urls.some((url) => typeof url !== "string")) {
21
- errors.push("audit.urls must contain only strings");
22
- }
23
- }
24
- if (cfg.audit.output !== void 0) {
25
- if (typeof cfg.audit.output !== "object") {
26
- errors.push("audit.output must be an object");
27
- } else {
28
- const output = cfg.audit.output;
29
- if (output.format !== void 0) {
30
- if (!["json", "csv", "html", "all"].includes(output.format)) {
31
- errors.push("audit.output.format must be one of: json, csv, html, all");
32
- }
33
- }
34
- if (output.out !== void 0 && typeof output.out !== "string") {
35
- errors.push("audit.output.out must be a string");
36
- }
37
- }
38
- }
39
- }
40
- }
41
- if (cfg.test !== void 0) {
42
- if (typeof cfg.test !== "object" || cfg.test === null) {
43
- errors.push("test must be an object");
44
- } else {
45
- if (cfg.test.disableTimeouts !== void 0 && typeof cfg.test.disableTimeouts !== "boolean") {
46
- errors.push("test.disableTimeouts must be a boolean when provided");
47
- }
48
- const testTimeoutFields = [
49
- "actionTimeoutMs",
50
- "assertionTimeoutMs",
51
- "navigationTimeoutMs",
52
- "componentReadyTimeoutMs"
53
- ];
54
- for (const field of testTimeoutFields) {
55
- const value = cfg.test[field];
56
- if (value !== void 0) {
57
- if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
58
- errors.push(`test.${field} must be a non-negative number when provided`);
59
- }
60
- }
61
- }
62
- if (cfg.test.components !== void 0) {
63
- if (!Array.isArray(cfg.test.components)) {
64
- errors.push("test.components must be an array");
65
- } else {
66
- cfg.test.components.forEach((comp, idx) => {
67
- if (typeof comp !== "object" || comp === null) {
68
- errors.push(`test.components[${idx}] must be an object`);
69
- } else {
70
- if (typeof comp.name !== "string") {
71
- errors.push(`test.components[${idx}].name must be a string`);
72
- }
73
- if (comp.contractPath !== void 0 && typeof comp.contractPath !== "string") {
74
- errors.push(`test.components[${idx}].contractPath must be a string when provided`);
75
- }
76
- if (comp.strategyPath !== void 0 && typeof comp.strategyPath !== "string") {
77
- errors.push(`test.components[${idx}].strategyPath must be a string when provided`);
78
- }
79
- if (comp.strictness !== void 0 && !["minimal", "balanced", "strict", "paranoid"].includes(comp.strictness)) {
80
- errors.push(`test.components[${idx}].strictness must be one of: minimal, balanced, strict, paranoid`);
81
- }
82
- if (comp.disableTimeouts !== void 0 && typeof comp.disableTimeouts !== "boolean") {
83
- errors.push(`test.components[${idx}].disableTimeouts must be a boolean when provided`);
84
- }
85
- const componentTimeoutFields = [
86
- "actionTimeoutMs",
87
- "assertionTimeoutMs",
88
- "navigationTimeoutMs",
89
- "componentReadyTimeoutMs"
90
- ];
91
- for (const field of componentTimeoutFields) {
92
- const value = comp[field];
93
- if (value !== void 0) {
94
- if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
95
- errors.push(`test.components[${idx}].${field} must be a non-negative number when provided`);
96
- }
97
- }
98
- }
99
- }
100
- });
101
- }
102
- }
103
- if (cfg.test.strictness !== void 0) {
104
- if (!["minimal", "balanced", "strict", "paranoid"].includes(cfg.test.strictness)) {
105
- errors.push("test.strictness must be one of: minimal, balanced, strict, paranoid");
106
- }
107
- }
108
- }
109
- }
110
- if (cfg.contracts !== void 0) {
111
- if (!Array.isArray(cfg.contracts)) {
112
- errors.push("contracts must be an array");
113
- } else {
114
- cfg.contracts.forEach((contract, idx) => {
115
- if (typeof contract !== "object" || contract === null) {
116
- errors.push(`contracts[${idx}] must be an object`);
117
- } else {
118
- if (typeof contract.src !== "string") {
119
- errors.push(`contracts[${idx}].src is required and must be a string`);
120
- }
121
- if (contract.out !== void 0 && typeof contract.out !== "string") {
122
- errors.push(`contracts[${idx}].out must be a string`);
123
- }
124
- }
125
- });
126
- }
127
- }
128
- return { valid: errors.length === 0, errors };
129
- }
130
- async function loadConfigFile(filePath) {
131
- try {
132
- const ext = path.extname(filePath);
133
- if (ext === ".json") {
134
- const content = await fs.readFile(filePath, "utf-8");
135
- return JSON.parse(content);
136
- } else if ([".js", ".mjs", ".cjs", ".ts"].includes(ext)) {
137
- const imported = await import(filePath);
138
- return imported.default || imported;
139
- }
140
- return null;
141
- } catch {
142
- return null;
143
- }
144
- }
145
- async function loadConfig(cwd = process.cwd()) {
146
- const configNames = [
147
- "ariaease.config.js",
148
- "ariaease.config.mjs",
149
- "ariaease.config.cjs",
150
- "ariaease.config.json",
151
- "ariaease.config.ts"
152
- ];
153
- let loadedConfig = null;
154
- let foundPath = null;
155
- const errors = [];
156
- for (const name of configNames) {
157
- const configPath = path.resolve(cwd, name);
158
- if (await fs.pathExists(configPath)) {
159
- foundPath = configPath;
160
- loadedConfig = await loadConfigFile(configPath);
161
- if (loadedConfig === null) {
162
- errors.push(`Found config at ${name} but failed to load it. Check for syntax errors.`);
163
- continue;
164
- }
165
- const validation = validateConfig(loadedConfig);
166
- if (!validation.valid) {
167
- errors.push(`Config validation failed in ${name}:`);
168
- errors.push(...validation.errors.map((err) => ` - ${err}`));
169
- loadedConfig = null;
170
- continue;
171
- }
172
- break;
173
- }
174
- }
175
- return {
176
- config: loadedConfig || {},
177
- configPath: loadedConfig ? foundPath : null,
178
- errors
179
- };
180
- }
181
- export {
182
- loadConfig
183
- };
@@ -1,7 +0,0 @@
1
- import {
2
- loadConfig
3
- } from "./chunk-GJGUY643.js";
4
- import "./chunk-I2KLQ2HA.js";
5
- export {
6
- loadConfig
7
- };