@axe-core/watcher 4.3.0-next.bc204fdc → 4.3.0-next.c55c8965

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 (40) hide show
  1. package/EXTENSION-LICENSES-3RD-PARTY.md +3 -425
  2. package/dist/Controller.js +50 -3
  3. package/dist/Controller.js.map +1 -1
  4. package/dist/utils/sync-fetch-worker.mjs +65 -1
  5. package/dist/utils/sync-fetch.d.ts +32 -0
  6. package/dist/utils/sync-fetch.js +29 -11
  7. package/dist/utils/sync-fetch.js.map +1 -1
  8. package/dist/utils/writeVariables.d.ts +4 -1
  9. package/dist/utils/writeVariables.js +2 -1
  10. package/dist/utils/writeVariables.js.map +1 -1
  11. package/extension/axe-versions/axe-core@4.12.0/axe.min.js +12 -0
  12. package/extension/axe-versions/axe-core@4.12.0/gather-internals.js +219 -0
  13. package/extension/axe-versions/axe-core@4.12.0/locales/README.md +9 -0
  14. package/extension/axe-versions/axe-core@4.12.0/locales/_template.json +1147 -0
  15. package/extension/axe-versions/axe-core@4.12.0/locales/da.json +799 -0
  16. package/extension/axe-versions/axe-core@4.12.0/locales/de.json +1127 -0
  17. package/extension/axe-versions/axe-core@4.12.0/locales/el.json +1069 -0
  18. package/extension/axe-versions/axe-core@4.12.0/locales/es.json +790 -0
  19. package/extension/axe-versions/axe-core@4.12.0/locales/eu.json +789 -0
  20. package/extension/axe-versions/axe-core@4.12.0/locales/fr.json +994 -0
  21. package/extension/axe-versions/axe-core@4.12.0/locales/he.json +1017 -0
  22. package/extension/axe-versions/axe-core@4.12.0/locales/it.json +1108 -0
  23. package/extension/axe-versions/axe-core@4.12.0/locales/ja.json +1128 -0
  24. package/extension/axe-versions/axe-core@4.12.0/locales/ko.json +1003 -0
  25. package/extension/axe-versions/axe-core@4.12.0/locales/nb.json +799 -0
  26. package/extension/axe-versions/axe-core@4.12.0/locales/nl.json +48 -0
  27. package/extension/axe-versions/axe-core@4.12.0/locales/pl.json +1109 -0
  28. package/extension/axe-versions/axe-core@4.12.0/locales/pt_BR.json +970 -0
  29. package/extension/axe-versions/axe-core@4.12.0/locales/pt_PT.json +1123 -0
  30. package/extension/axe-versions/axe-core@4.12.0/locales/ru.json +1127 -0
  31. package/extension/axe-versions/axe-core@4.12.0/locales/zh_CN.json +1116 -0
  32. package/extension/axe-versions/axe-core@4.12.0/locales/zh_TW.json +1108 -0
  33. package/extension/axe-versions-mapper.js +2 -0
  34. package/extension/axe.js +1 -1
  35. package/extension/background.js +1 -0
  36. package/extension/background.js.LICENSE.txt +1 -0
  37. package/extension/content.js +1 -1
  38. package/extension/gather-internals.js +1 -0
  39. package/extension/manifest.json +5 -1
  40. package/package.json +77 -19
@@ -0,0 +1 @@
1
+ (()=>{var e,t,n=(e=(e,t)=>{b(),t.exports=g},()=>(t||e(t={exports:{}},t),t.exports)),o=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],r=/^(?:[A-Za-z][^\0\t\n\f\r\u0020/>]*|[:_\u0080-\u{10FFFF}][A-Za-z0-9-.:_\u0080-\u{10FFFF}]*)$/u,i=/[a-z]/,s=/[A-Z]/;function a(e){return!o.includes(e)&&r.test(e)&&i.test(e[0])&&!s.test(e)&&e.includes("-")}var c=["_internals","internals","internals_"],l=["internals","privateInternals"];function f(e){if(!a(e.nodeName.toLowerCase()))return;const t=globalThis._elementInternals?.get(e);if(t)return t;if(!("ElementInternals"in window))return;for(const t of c)if(!Object.getOwnPropertyDescriptor(e,t)?.get&&e[t]instanceof window.ElementInternals)return e[t];const n=Object.getOwnPropertySymbols(e);if(n.length)for(const t of l){const o=n.find(e=>e.description===t);if(o){if(Object.getOwnPropertyDescriptor(e,o)?.get)continue;if(e[o]instanceof window.ElementInternals)return e[o]}}}var d=function(e){const t=String(e),n=t.length;let o,r=-1,i="";const s=t.charCodeAt(0);for(;++r<n;)o=t.charCodeAt(r),i+=0!=o?o>=1&&o<=31||127==o||0==r&&o>=48&&o<=57||1==r&&o>=48&&o<=57&&45==s?"\\"+o.toString(16)+" ":0==r&&1==n&&45==o||!(o>=128||45==o||95==o||o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122)?"\\"+t.charAt(r):t.charAt(r):"�";return i};function u(e){const t=d(e.nodeName.toLowerCase()),n=e.parentElement,o=e.parentNode;let r="";return"head"!==t&&"body"!==t&&o?.children.length>1&&(r=`:nth-child(${Array.prototype.indexOf.call(o.children,e)+1})`),n?u(n)+" > "+t+r:t+r}function h(e,t){return function(e,t,n={}){if(!t)return"";let o=t.getRootNode&&t.getRootNode()||document;if(11!==o.nodeType)return e(t,n,o);const r=[];for(;11===o.nodeType;){if(!o.host)return"";r.unshift({elm:t,doc:o}),o=(t=o.host).getRootNode()}return r.unshift({elm:t,doc:o}),r.map(t=>e(t.elm,n,t.doc))}(u,e,t)}var m=["article","aside","blockquote","body","div","footer","h1","h2","h3","h4","h5","h6","header","main","nav","p","section","span"],p=function(e){if(e.shadowRoot){const t=e.nodeName.toLowerCase();if(m.includes(t)||a(t))return!0}return!1},g=[],y=/^aria[A-Z]/,w=["role","labels","form"];function b(e=document.body){const t=document.createTreeWalker(e,globalThis.NodeFilter.SHOW_ELEMENT,null,!1);let n=t.currentNode;for(;n;){const e=f(n);if(e){const t=h(n),o={};for(const t in e)if(y.test(t)||w.includes(t))try{const n=e[t];if(null===n)continue;if(n instanceof globalThis.HTMLElement)o[t]=n.isConnected?{type:"HTMLElement",value:h(n)}:void 0;else if(Array.isArray(n)||n instanceof globalThis.NodeList){const e=Array.from(n).filter(e=>e.isConnected);o[t]=e.length?{type:"NodeList",value:e.map(e=>h(e))}:void 0}else"string"==typeof n&&(o[t]=n)}catch{}g.push({ancestry:t,internals:o})}p(n)&&b(n.shadowRoot),n=t.nextNode()}}n()})();
@@ -4,7 +4,11 @@
4
4
  "description": "Codeless accessibility testing",
5
5
  "manifest_version": 3,
6
6
  "homepage_url": "https://deque.com",
7
- "permissions": ["storage", "unlimitedStorage"],
7
+ "permissions": ["storage", "unlimitedStorage", "scripting"],
8
+ "host_permissions": ["<all_urls>"],
9
+ "background": {
10
+ "service_worker": "background.js"
11
+ },
8
12
  "content_scripts": [
9
13
  {
10
14
  "matches": ["<all_urls>"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axe-core/watcher",
3
- "version": "4.3.0-next.bc204fdc",
3
+ "version": "4.3.0-next.c55c8965",
4
4
  "description": "",
5
5
  "license": "UNLICENSED",
6
6
  "exports": {
@@ -53,17 +53,68 @@
53
53
  "engines": {
54
54
  "node": "^20.18.1 || ^22.11.0 || ^24.11.0"
55
55
  },
56
- "scripts": {
57
- "build": "tsc --removeComments && tsc --declaration --emitDeclarationOnly && cp src/utils/sync-fetch-worker.mjs dist/utils/",
58
- "test": "mocha 'src/**/*.test.ts' --exit",
59
- "pretest:e2e": "pnpm run copy-extension",
60
- "test:e2e": "mocha 'e2e/*.test.ts'",
61
- "test:proxy": "mocha proxy-tests/proxy.test.ts --timeout 30000 --exit",
62
- "serve:e2e": "ts-node e2e/Server.ts",
63
- "coverage": "nyc pnpm test",
64
- "copy-extension-license-file": "cp ../../extension/EXTENSION-LICENSES-3RD-PARTY.md .",
65
- "copy-extension": "rimraf extension; cp -r ../../extension/dist extension; pnpm run copy-extension-license-file",
66
- "dev": "tsc -w"
56
+ "wireit": {
57
+ "build": {
58
+ "command": "tsc --removeComments && tsc --declaration --emitDeclarationOnly && cp src/utils/sync-fetch-worker.mjs dist/utils/",
59
+ "files": [
60
+ "src/**",
61
+ "tsconfig.json",
62
+ "../../tsconfig.json",
63
+ "package.json"
64
+ ],
65
+ "output": [
66
+ "dist/**"
67
+ ]
68
+ },
69
+ "test": {
70
+ "command": "mocha 'src/**/*.test.ts' --exit",
71
+ "output": []
72
+ },
73
+ "test:e2e": {
74
+ "command": "mocha 'e2e/*.test.ts'",
75
+ "dependencies": [
76
+ "copy-extension"
77
+ ],
78
+ "output": []
79
+ },
80
+ "test:proxy": {
81
+ "command": "mocha proxy-tests/proxy.test.ts --timeout 30000 --exit",
82
+ "output": []
83
+ },
84
+ "serve:e2e": {
85
+ "command": "ts-node e2e/Server.ts",
86
+ "service": true
87
+ },
88
+ "coverage": {
89
+ "command": "nyc pnpm test",
90
+ "output": [
91
+ "coverage/**",
92
+ ".nyc_output/**"
93
+ ],
94
+ "clean": true
95
+ },
96
+ "copy-extension-license-file": {
97
+ "command": "cp ../../extension/EXTENSION-LICENSES-3RD-PARTY.md .",
98
+ "dependencies": [
99
+ "../../extension:build"
100
+ ],
101
+ "files": [],
102
+ "output": [
103
+ "EXTENSION-LICENSES-3RD-PARTY.md"
104
+ ]
105
+ },
106
+ "copy-extension": {
107
+ "command": "mkdir -p extension && cp -R ../../extension/dist/. extension",
108
+ "dependencies": [
109
+ "../../extension:build",
110
+ "copy-extension-license-file"
111
+ ],
112
+ "files": [],
113
+ "output": [
114
+ "extension/**"
115
+ ],
116
+ "clean": true
117
+ }
67
118
  },
68
119
  "dependencies": {
69
120
  "debug": "^4.3.5",
@@ -76,24 +127,21 @@
76
127
  "@deque/advanced-rule-recorder": "1.31.0-next.eeeb3b7f",
77
128
  "@playwright/test": "^1.45.0",
78
129
  "@types/body-parser": "^1.19.2",
79
- "@types/chai": "^4.3.3",
80
130
  "@types/cors": "^2.8.12",
81
131
  "@types/debug": "^4.1.12",
82
132
  "@types/express": "^5.0.6",
83
133
  "@types/mocha": "^10.0.0",
84
134
  "@types/morgan": "^1.9.3",
85
- "@types/node": "22.19.18",
86
- "@types/proxyquire": "^1.3.28",
135
+ "@types/node": "22.19.19",
87
136
  "@types/react": "19",
88
137
  "@types/react-dom": "19",
89
138
  "@types/selenium-webdriver": "^4.1.15",
90
139
  "@types/semver": "^7.5.8",
91
140
  "@types/sinon": "^21.0.0",
92
141
  "@wdio/types": "^9.0.4",
93
- "axe-core": "^4.11.4",
142
+ "axe-core": "^4.11.4-canary.7d9d696",
94
143
  "axe-test-fixtures": "github:dequelabs/axe-test-fixtures#v1",
95
144
  "body-parser": "^2.2.0",
96
- "chai": "^4.3.6",
97
145
  "cors": "^2.8.5",
98
146
  "cypress": "^15.8.1",
99
147
  "execa": "5",
@@ -103,17 +151,16 @@
103
151
  "morgan": "^1.10.0",
104
152
  "nyc": "^18.0.0",
105
153
  "playwright-core": "^1.45.0",
106
- "proxyquire": "^2.1.3",
107
154
  "puppeteer": "^24.2.0",
108
155
  "react": "^19.1.0",
109
156
  "react-dom": "^19.1.0",
110
- "rimraf": "^6.1.2",
111
157
  "selenium-webdriver": "^4.11.1",
112
158
  "sinon": "^22.0.0",
113
159
  "ts-loader": "^9.5.2",
114
160
  "ts-node": "^10.9.2",
115
161
  "typescript": "^5.1.6",
116
162
  "webdriverio": "^9.0.5",
163
+ "wireit": "^0.14.12",
117
164
  "yaml": "^2.8.1"
118
165
  },
119
166
  "peerDependencies": {
@@ -143,5 +190,16 @@
143
190
  "webdriverio": {
144
191
  "optional": true
145
192
  }
193
+ },
194
+ "scripts": {
195
+ "build": "wireit",
196
+ "test": "wireit",
197
+ "test:e2e": "wireit",
198
+ "test:proxy": "wireit",
199
+ "serve:e2e": "wireit",
200
+ "coverage": "wireit",
201
+ "copy-extension-license-file": "wireit",
202
+ "copy-extension": "wireit",
203
+ "dev": "pnpm run build --watch"
146
204
  }
147
205
  }