Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
195 commits
Select commit Hold shift + click to select a range
3d70cbc
Fresh Yarn install (rm -rf node_modules && yarn) which basically cons…
danielweck May 5, 2019
4057d97
Yarn update
danielweck Jun 13, 2019
74b7a3b
Min NodeJS runtime from 6 to 8, see https://github.com/daisy/ace/issu…
danielweck Jun 21, 2019
44a65d2
NodeJS runtime at TravisCI from 6 to 8
danielweck Jun 21, 2019
5fe2e4d
Yarn lock refreshed, yarn cache clean && rm -rf packages/*/lib && rm …
danielweck Jun 21, 2019
207a86b
Merge branch 'master' into fresh-yarn-install
danielweck Jun 21, 2019
8e77aff
first stab at Electron runner
danielweck Jun 21, 2019
ae44265
Merge branch 'master' into feature/axe-runner-electron
danielweck Jun 21, 2019
a1193a8
working Electron Axe runner for Ace (in addition to Puppetteer-based …
danielweck Jun 21, 2019
d7b6945
Axe Electron runner now same performance as Puppeteer
danielweck Jun 21, 2019
e9bec87
Merge branch 'master' into feature/axe-runner-electron
danielweck Jul 8, 2019
a9b4078
correct NPM versions
danielweck Jul 8, 2019
4d62aca
Yarn NPM package upgrade / update
danielweck Jul 8, 2019
75e694d
Unit tests pass once again, fixed CLI perf output (yarn run test --u…
danielweck Jul 8, 2019
a333d76
Merge branch 'master' into feature/axe-runner-electron
danielweck Jul 8, 2019
7982134
updated Jest to latest version, unit test runner now for the Axe Elec…
danielweck Jul 8, 2019
cce9d7b
NPM package updates
danielweck Jul 8, 2019
09f32f3
Electron MAIN vs. RENDERER process Axe runner lifecyle fixes
danielweck Jul 9, 2019
52a4ccc
fixed Electron ipcMain/Renderer eventing
danielweck Jul 9, 2019
3984d82
Merge branch 'master' into feature/axe-runner-electron
danielweck Jul 15, 2019
e58a570
Yarn update
danielweck Jul 15, 2019
0b38b6b
NPM updates (including major semver) to align with Ace GUI / avoid bu…
danielweck Jul 15, 2019
636525d
Yarn update
danielweck Jul 15, 2019
708bb7c
reinstanted subdir CLI param
danielweck Jul 18, 2019
056ee93
minor update (package deps versions)
danielweck Jul 18, 2019
0f520ff
Electron is a dev NPM dep
danielweck Jul 18, 2019
f38f87d
Merge branch 'master' into feature/axe-runner-electron
danielweck Jul 22, 2019
f611228
Yarn refresh
danielweck Jul 22, 2019
1f30fd3
fixes unit tests in Windows
danielweck Jul 23, 2019
a9cbd7f
Yarn NPM update
danielweck Jul 23, 2019
536b56b
Merge branch 'master' into feature/axe-runner-electron
danielweck Jul 29, 2019
532d7ca
NPM updates
danielweck Jul 29, 2019
4c98284
NPM updates (Yarn lock refresh with correct requested versions)
danielweck Jul 29, 2019
8cc3afa
Merge branch 'master' into feature/axe-runner-electron
danielweck Jul 30, 2019
66e1839
Merge branch 'master' into feature/axe-runner-electron
danielweck Jul 31, 2019
d5ae404
Merge branch 'master' into feature/axe-runner-electron
danielweck Aug 1, 2019
4a9d96a
Merge branch 'master' into feature/axe-runner-electron
danielweck Aug 1, 2019
64e34b9
fix: Electron Axe Runner had an aggressive timeout fallback, resultin…
danielweck Aug 1, 2019
1292e80
Merge branch 'master' into feature/axe-runner-electron
danielweck Aug 5, 2019
0599f08
Merge branch 'master' into feature/axe-runner-electron
danielweck Aug 5, 2019
6d12394
NPM package update
danielweck Aug 7, 2019
368f8c3
fix: proper correct fix for the timeout mechanism to detect stalled E…
danielweck Aug 8, 2019
b0ca208
NPM package updates, notably Electron v6
danielweck Aug 8, 2019
765790a
fix: Electron Axe runner does not need to rename non- XHTML/HTML file…
danielweck Aug 8, 2019
dc71e4c
fix: Electron Axe runner was timing-out in random edge-case for some …
danielweck Aug 8, 2019
446d3e5
fix: Electron CLI unit test passes the .xml vs. html/xhtml test (unli…
danielweck Aug 8, 2019
b015fbe
feat: minor NPM updates
danielweck Aug 8, 2019
a441ca5
NPM dependency management made simpler: ncu script to scan each monor…
danielweck Aug 9, 2019
d9f04cc
Merge branch 'master' into feature/axe-runner-electron
danielweck Aug 9, 2019
134e011
feat(internal): Winston logger can be initialized with different file…
danielweck Aug 10, 2019
ffc4088
making use of the recently-introduced default override for Winston lo…
danielweck Aug 10, 2019
449df93
NPM updates
danielweck Aug 15, 2019
08140d0
NPM package updates (minor)
danielweck Aug 21, 2019
822212d
Yarn / NPM package dependency updates (excluding uuidv4 and conf whic…
danielweck Sep 12, 2019
da36c87
Merge branch 'master' into feature/axe-runner-electron
danielweck Sep 12, 2019
72047a2
Travis now uses latest Yarn version
danielweck Sep 12, 2019
77c0e16
NPM package updates
danielweck Oct 9, 2019
30c0627
TravisCI script now fetches the latest Yarn version
danielweck Oct 9, 2019
bbfc03a
each Ace NodeJS process instance (CLI or HTTP or programmatic like th…
danielweck Oct 9, 2019
7ab88cc
fixed typo
danielweck Oct 9, 2019
5e2f8b7
Winston logger close + finish event (flush of pending file stream wri…
danielweck Oct 9, 2019
7171f8e
Winston default callback seems to work just fine (Windows)
danielweck Oct 10, 2019
60b530e
further logging improvement following testing in Windows
danielweck Oct 10, 2019
b8e0341
version bumps
danielweck Oct 10, 2019
4cd99df
added missing UUID package, version bump
danielweck Oct 10, 2019
7a37525
NPM package updates, Electron v7
danielweck Oct 24, 2019
097a97a
version bumps
danielweck Oct 24, 2019
c061bb7
to be on the safe side: Electron session clear for localStorage can b…
danielweck Oct 24, 2019
b94fcd3
added code comments to explain why we're not migrating from i18next v…
danielweck Oct 24, 2019
1699a24
semver major NPM package upgrade Puppeteer 2.0.0 (drop support for No…
danielweck Oct 24, 2019
b39d6c4
publish shell script skips Ace core legacy package
danielweck Oct 24, 2019
4d5e25f
version bump beta4 (mainly Puppeteer upgrade, Chromium 79)
danielweck Oct 24, 2019
ee1a35d
added shell script to pack EPUBs from test/data folders
danielweck Oct 26, 2019
0d143bb
added unit test for URL percent-encoding and path resolution (See htt…
danielweck Oct 26, 2019
86c1d18
added shell script to execute Puppeteer and Electron Axe runners in v…
danielweck Oct 26, 2019
009142f
fixed percent-encoding issue in URLs vs. filepaths, see https://githu…
danielweck Oct 26, 2019
5d272be
version bump 1.2.0-beta.5
danielweck Oct 26, 2019
12acadb
Fixed Unicode issues in filename (MacOS zip script)
danielweck Oct 29, 2019
33658c5
renamed test files in order to eliminate the possibility of Unicode c…
danielweck Oct 29, 2019
674351f
Ah, MacOS yet again has generated incorrect Unicode chars in filenames!
danielweck Oct 29, 2019
4583624
NPM package updates (Yarn lockfile)
danielweck Nov 2, 2019
20cd2dc
Merge branch 'master' into feature/axe-runner-electron
danielweck Nov 15, 2019
d93283f
NPM package updates
danielweck Nov 15, 2019
9e6722e
NPM package updates (minor semver)
danielweck Nov 23, 2019
093ab64
Yarn lockfile refresh
danielweck Nov 25, 2019
ba5b379
fix: KB mappings now cross-checked with Axe v3.4.0 rules (PR #299 Fix…
danielweck Nov 25, 2019
274f35d
docs: updated Hugo HTML (Markdown)
danielweck Nov 25, 2019
0d04a32
NPM Electron package update
danielweck Dec 4, 2019
a3387d6
version bump 1.2.0-beta.6
danielweck Dec 4, 2019
f030251
added ability to unzip EPUB into a particular folder, rather than TMP…
danielweck Feb 10, 2020
af2b662
version bump (beta), updated NPM packages, improved Jest test configu…
danielweck Feb 27, 2020
e4cadb7
TravisCI Yarn "classic" version 1.22 (latest)
danielweck Feb 27, 2020
4af13c5
TravisCI NodeJS matrix LTS(12) + latest(13) + v10 (v8 not compatible …
danielweck Feb 27, 2020
872ebef
fixed incorrect UUID import (require) statement
danielweck Feb 27, 2020
247eba3
TravisCI Yarn version syntax fix
danielweck Feb 27, 2020
ff665fd
TravisCI: disabled Electron tests which hang in Linux due to X11 issu…
danielweck Feb 27, 2020
0d7379a
fixes: metadata link was parsing rel attribute, not property attribut…
danielweck Feb 27, 2020
325f75b
avoid using XPath expressions starting with // (XML grammar is strict…
danielweck Feb 27, 2020
121e9a5
a11y:certifierCredential can be a metadata link
danielweck Feb 27, 2020
35cb269
added missing Schema.org allowed values for a11y metadata (to be veri…
danielweck Feb 28, 2020
95407e1
increase the Electron timeout for large publications
danielweck Feb 28, 2020
3e735a6
npm package updates
danielweck Mar 30, 2020
6ecfac2
NPM package update: i18next (language set promise/async)
danielweck Mar 30, 2020
16dd7c0
Electron allowRendererProcessReuse https://github.com/electron/electr…
danielweck Mar 30, 2020
84e90bc
Electron app.allowRendererProcessReuse console message removal (depre…
danielweck Mar 30, 2020
f6e204b
updated XMLDOM NPM package
danielweck Mar 30, 2020
e8ff5a2
Travis now with latest Yarn version
danielweck Mar 30, 2020
b962f18
Babel with correct Node version (same as Ace App config)
danielweck Mar 30, 2020
98490fe
Removed obsolete Snyk file
danielweck Mar 30, 2020
ac07e48
script to check package dependencies versions (discrepancies between …
danielweck Mar 30, 2020
7346620
added local node_modules scan
danielweck Mar 31, 2020
700de03
minor yarn run short syntax
danielweck Mar 31, 2020
e9dcfc9
Merge branch 'master' into ace-next
danielweck Mar 31, 2020
72c8ded
i18n scan (added a couple of missing labels in new Danish translation)
danielweck Mar 31, 2020
fa910e7
node_modules dump of direct deps
danielweck Mar 31, 2020
1af01c9
minor inversion of Electron import
danielweck Mar 31, 2020
fc85eb1
fixed weird typo in package.json (see https://github.com/daisy/ace/co…
danielweck Mar 31, 2020
00b2622
Yarn update
danielweck Mar 31, 2020
3e1c695
migrated Ace App script from the ace-next-app-gui branch
danielweck Mar 31, 2020
afc7e11
JSON typo (extraneous trailing comma)
danielweck Mar 31, 2020
33d9189
added missing Danish l10n string (see https://github.com/daisy/ace/pu…
danielweck Mar 31, 2020
c5c2954
build script updates
danielweck Mar 31, 2020
99aae8d
NPM package updates, added Axe rules HTML dump, moved utility package…
danielweck Apr 6, 2020
41b122b
fixed NPM utility script path
danielweck Apr 6, 2020
0e4cfb6
NPM package updates (Electron minor semver)
danielweck Apr 7, 2020
3750ab6
when Ace processing fails somewhere in the chain of promises, the err…
danielweck Apr 7, 2020
a4570f4
fixed unit test snapshot (CLI console output)
danielweck Apr 7, 2020
40d0a40
Axe timeout now even more generous: 8 minutes (this is for the Electr…
danielweck Apr 7, 2020
bc295f6
Merge branch 'master' into ace-next
danielweck Apr 7, 2020
158d59b
fixed checker for accessibility metadata, especially accessModeSuffic…
danielweck Apr 8, 2020
912caa2
only accessModeSufficient is allowed to have multiple values (added u…
danielweck Apr 8, 2020
c04fa5e
moved utility scripts
danielweck Apr 8, 2020
b1789b5
NPM package updates (Jest)
danielweck Apr 8, 2020
d985b46
incorrect value field name for JSON property
danielweck Apr 8, 2020
caccfa7
expose A11y metadata for use externally (e.g. Ace App)
danielweck Apr 8, 2020
6c0bb02
Yarn package update (i18next)
danielweck Apr 10, 2020
26ca3e0
Merge branch 'master' into ace-next
danielweck Apr 13, 2020
7ac64f7
NPM package update (conf)
danielweck Apr 13, 2020
7ffe98d
added unit test for accessibilityFeature MathML vs mathML case sensit…
danielweck Apr 13, 2020
46db320
fixes metadata value formatting (multiple values separated by pipe ch…
danielweck Apr 13, 2020
f7bd65f
displayTransformability and highContrastAudio accessibility metadata …
danielweck Apr 13, 2020
9551530
NPM packages version bump (still beta)
danielweck Apr 13, 2020
6d4871b
NPM package updates (Electron)
danielweck Apr 15, 2020
1484266
version bump 1.2.0-beta.9
danielweck Apr 15, 2020
1d0e34b
chore(NPM): Yarn package updates, Jest Electron Jasmine runner tempor…
danielweck Apr 22, 2020
ea1dd50
fixed package.json script duplicate
danielweck Apr 22, 2020
e147bb8
Puppeteer NPM package update
danielweck Apr 22, 2020
eccacd1
version bump 1.2.0-beta.10
danielweck Apr 22, 2020
d720c2e
Windows double quote in CLI
danielweck Apr 22, 2020
e6ec006
Merge branch 'master' into ace-next
danielweck Apr 30, 2020
4400e2e
schema:accessibilityHazard is required, fixes https://github.com/dais…
danielweck Apr 30, 2020
464c1a5
NPM package updates
danielweck Apr 30, 2020
b26a52d
version bump 1.2.0 beta 11
danielweck Apr 30, 2020
2ed3004
fix: DAISY Knowledge Base URL has changed
danielweck Apr 30, 2020
2f6bad2
chore: version bump 1.2.0 beta 12
danielweck Apr 30, 2020
b872de0
Merge branch 'master' into ace-next
danielweck Apr 30, 2020
1c214bd
Package OPF link property vs. rel attributes, DAISY Knowledge Base ne…
danielweck May 8, 2020
fe1fdea
NPM package updates
danielweck May 8, 2020
5cf1296
Yarn NPM package updates, Jest, simplified Mock setup
danielweck May 8, 2020
b81cb0c
version bump 1.2.0-beta.13
danielweck May 8, 2020
ba7ee87
debugging TravisCI https://github.com/daisy/ace/issues/322
danielweck May 8, 2020
a076b6d
fixed typo (Travis test)
danielweck May 8, 2020
78d7288
another Travis attempt
danielweck May 8, 2020
34306a0
TravisCI checks
danielweck May 8, 2020
abb853b
Travis patch experiment
danielweck May 8, 2020
e6d39b6
TravisCI now runs unit tests. Cleaned-up the script.
danielweck May 8, 2020
5178504
fixed Travis typo (incorrect script name)
danielweck May 8, 2020
a6fbed4
chore(doc): Ace App version bump, and added info about Ace beta
danielweck May 8, 2020
cf89618
Axe core update, adjusted patchers, need to fix unit tests (in progress)
danielweck Nov 1, 2020
4db8715
NPM package updates, Axe Core 4.1.1 (updated rules) + in-progress DAI…
danielweck Jan 19, 2021
b089999
NPM package updates (refreshed Yarn lockfile)
danielweck Jan 27, 2021
396f83d
launch Electron before Puppeteer in the compare/benchmark script
danielweck Feb 9, 2021
c1cb9db
Electron runner now leverages code ERR_BLOCKED_BY_CLIENT -20 via brow…
danielweck Feb 9, 2021
64439a0
Puppeteer runner now reject external webpages, such as iframes that a…
danielweck Feb 9, 2021
c89708e
added Ace CLI for Electron (default is Puppeteer)
danielweck Feb 9, 2021
9283b9b
NPM package updates
danielweck Feb 9, 2021
9e71930
version bump 1.2.0-beta.14
danielweck Feb 9, 2021
2eb8d7a
NPM package updates
danielweck Mar 10, 2021
e462ebc
Axe rules and checks ported (in progress)
danielweck Mar 11, 2021
5be72b8
console log from Puppeteer
danielweck Apr 6, 2021
e1a10d8
removed obsolete localisation
danielweck Apr 6, 2021
152a2dc
minor: console redirect placeholder
danielweck Apr 6, 2021
ae06fa5
console redirect from Puppeteer
danielweck Apr 6, 2021
fe9c924
NPM package updates
danielweck Apr 6, 2021
05ad3db
fixed EPUB type tests (now aligned with DAISY Axe fork)
danielweck Apr 6, 2021
d20ef64
added doc-endnote and doc-biblioentry (deprecated in DPUB ARIA 1.1)
danielweck Apr 7, 2021
33ba4f7
DAISY-Axe NPM dependency
danielweck Apr 7, 2021
5bf855c
correct DAISY-Axe require
danielweck Apr 7, 2021
9cbff51
PR https://github.com/daisy/ace/pull/323/
danielweck Apr 7, 2021
11c5d2c
Unit test updates (Nav Doc)
danielweck Apr 7, 2021
5b58118
navdoc checks were missing when not in spine
danielweck Apr 7, 2021
a06d729
Axe update
danielweck Apr 7, 2021
358a668
DAISY-Axe landmark unique
danielweck Apr 7, 2021
e6b5fa7
French localisation: violations -> erreurs
danielweck Apr 8, 2021
64cc6ae
version bump and added engines
danielweck Apr 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"targets": {
"node": [
"8"
"10"
]
}
}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ website/site
.DS_Store
._*
Thumbs.db

.history
15 changes: 0 additions & 15 deletions .snyk

This file was deleted.

10 changes: 8 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@ language: node_js
node_js:
- node
- lts/*
- 8
- 10
#services: xvfb
addons:
apt:
packages:
- xvfb
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.2.1
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.22.4
- export PATH="$HOME/.yarn/bin:$PATH"
before_script:
- yarn patchJestForTravis
script:
# - yarn snyk test
- xvfb-run yarn test --runInBand
- xvfb-run yarn test-cli --runInBand
# - xvfb-run yarn test-electron --runInBand
# - xvfb-run yarn test-electron-cli --runInBand
branches:
only:
- master
Expand Down
7 changes: 7 additions & 0 deletions jest.config-cli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const common = require('./jest.config-common');
module.exports = {
...common,
testMatch: [
'<rootDir>/tests/__tests__/cli.test.js',
],
};
18 changes: 18 additions & 0 deletions jest.config-common.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
verbose: true,
testEnvironment: 'node',
setupFilesAfterEnv: ['<rootDir>/tests/jest-setup.js'],
testPathIgnorePatterns: [
'<rootDir>/node_modules/',
'<rootDir>/.history/',
'<rootDir>/website/',
'<rootDir>/scripts/',
'<rootDir>/resources/',
'<rootDir>/CompareAxeRunners/',
'<rootDir>/tests/data/',
],
testMatch: [
"<rootDir>/tests/__tests__/**/*.js",
"<rootDir>/packages/**/src/**/(*.)+test.js",
],
};
8 changes: 8 additions & 0 deletions jest.config-electron.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const common = require('./jest.config-common');
module.exports = {
...common,
runner: '@jest-runner/electron/main',
testPathIgnorePatterns: common.testPathIgnorePatterns.concat([
'<rootDir>/tests/__tests__/cli',
]),
};
7 changes: 7 additions & 0 deletions jest.config-puppeteer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const common = require('./jest.config-common');
module.exports = {
...common,
testPathIgnorePatterns: common.testPathIgnorePatterns.concat([
'<rootDir>/tests/__tests__/cli',
]),
};
4 changes: 2 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lerna": "2.5.1",
"version": "1.1.1",
"lerna": "4.0.0",
"version": "1.2.0-beta.15",
"npmClient": "yarn",
"useWorkspaces": true
}
77 changes: 44 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,54 +4,65 @@
"workspaces": [
"packages/*"
],
"version": "1.2.0-beta.15",
"engines": {
"node": ">=10.0.0",
"yarn": "^1.22.5",
"npm": ">=6.14.12"
},
"devDependencies": {
"@daisy/jest-env-puppeteer": "^1.0.0",
"@daisy/jest-puppeteer": "^1.0.0",
"babel-core": "^6.0.0",
"babel-jest": "^21.2.0",
"babel-preset-env": "^1.6.0",
"@daisy/jest-env-puppeteer": "^1.2.0-beta.15",
"@daisy/jest-puppeteer": "^1.2.0-beta.15",
"@jest-runner/electron": "^3.0.1",
"babel-core": "^6.26.3",
"babel-jest": "^26.6.3",
"babel-preset-env": "^1.7.0",
"babel-register": "^6.26.0",
"chalk": "^2.3.0",
"cross-env": "^5.2.0",
"cross-spawn": "^5.1.0",
"eslint": "^3.19.0",
"eslint-config-airbnb-base": "^11.2.0",
"eslint-plugin-import": "^2.3.0",
"glob": "^7.1.2",
"chalk": "^4.1.0",
"cpy-cli": "^3.1.1",
"cross-env": "^7.0.3",
"cross-spawn": "^7.0.3",
"glob": "^7.1.6",
"i18next-json-sync": "^2.3.1",
"jest": "21.3.0-beta.10",
"lerna": "2.8",
"micromatch": "^3.1.4",
"mkdirp": "^0.5.1",
"rimraf": "^2.6.1",
"snyk": "^1.56.0",
"standard-version": "^4.2.0",
"strip-ansi": "^4.0.0",
"uglify-js": "^3.0.8",
"watch": "^1.0.2"
"jest": "^26.6.3",
"lerna": "^4.0.0",
"micromatch": "^4.0.2",
"mkdirp": "^1.0.4",
"rimraf": "^3.0.2",
"strip-ansi": "^6.0.0"
},
"scripts": {
"axe-dev": "cpy \"../axe-core_DAISY/axe.js\" \"node_modules/@daisy/axe-core-for-ace/\" && cpy \"../axe-core_DAISY/axe.min.js\" \"node_modules/@daisy/axe-core-for-ace/\" && cpy \"../axe-core_DAISY/axe.d.ts\" \"node_modules/@daisy/axe-core-for-ace/\" && cpy \"../axe-core_DAISY/locales/*.*\" \"node_modules/@daisy/axe-core-for-ace/locales/\" && cpy \"../axe-core_DAISY/package.json\" \"node_modules/@daisy/axe-core-for-ace/\"",
"ace": "node ./packages/ace-cli/bin/ace.js",
"clean": "yarn run clean-libs",
"ace-electron": "electron ./packages/ace-axe-runner-electron/lib/cli.js",
"clean": "yarn clean-libs",
"clean-libs": "rimraf packages/*/lib",
"clean-node-modules": "rimraf packages/*/node_modules && rimraf node_modules",
"clean-all": "yarn run clean-libs && yarn run clean-node-modules",
"prebuild": "yarn run clean-libs",
"clean-all": "yarn clean-libs && yarn clean-node-modules",
"prebuild": "yarn clean-libs",
"build": "cross-env VERBOSE=1 node ./scripts/build.js",
"docs": "echo docs script not implemented",
"lint": "echo lint script not implemented",
"postinstall": "yarn run build",
"test": "jest",
"watch": "yarn run build && node ./scripts/watch.js",
"postinstall": "yarn npmVersionsCheck && yarn build && yarn patchElectronJestRunner",
"patchJestForTravis": "yarn patchJestForTravis1 && yarn patchJestForTravis2",
"patchJestForTravis1": "node scripts/replace-in-file.js node_modules/jest-environment-node/build/index.js \"function _fakeTimers\\(\\) {\" \"function _fakeTimersLegacyFakeTimers() { const data = require('@jest/fake-timers/build/legacyFakeTimers'); _fakeTimersLegacyFakeTimers = function () { return data; }; return data; } function _fakeTimersModernFakeTimers() { const data = require('@jest/fake-timers/build/modernFakeTimers'); _fakeTimersModernFakeTimers = function () { return data; }; return data; } function _fakeTimers() {\"",
"patchJestForTravis2": "node scripts/replace-in-file.js node_modules/jest-environment-node/build/index.js \"_fakeTimers\\(\\).LegacyFakeTimers\" \"_fakeTimersLegacyFakeTimers().default || _fakeTimersLegacyFakeTimers()\" && node scripts/replace-in-file.js node_modules/jest-environment-node/build/index.js \"_fakeTimers\\(\\).ModernFakeTimers\" \"_fakeTimersModernFakeTimers().default || _fakeTimersModernFakeTimers()\"",
"npmVersionsCheck": "node ./scripts/npm-versions-check.js",
"patchElectronJestRunner": "yarn patchElectronJestRunner1",
"patchElectronJestRunner1": "echo \";_electron.app.allowRendererProcessReuse = true;\" >> \"./node_modules/@jest-runner/electron/build/electron_process_injected_code.js\"",
"patchElectronJestRunner2": "node scripts/replace-in-file.js \"./node_modules/jest-runner/node_modules/jest-runtime/build/index.js\" \"_defineProperty\\(this, '_hasWarnedAboutRequireCacheModification', false\\);\" \"_defineProperty(this, '_hasWarnedAboutRequireCacheModification', true);\"",
"test": "cross-env JEST_TESTS=1 jest --config=jest.config-puppeteer.js --runInBand --bail=1 --no-cache",
"test-cli": "cross-env JEST_TESTS=1 jest --config=jest.config-cli.js --runInBand --bail=1 --no-cache",
"test-electron": "cross-env JEST_TESTS=1 AXE_ELECTRON_RUNNER=true jest --config=jest.config-electron.js --runInBand --bail=1 --no-cache",
"test-electron-cli": "cross-env JEST_TESTS=1 AXE_ELECTRON_RUNNER=true jest --config=jest.config-cli.js --runInBand --bail=1 --no-cache",
"test-all": "yarn test && yarn test-cli && yarn test-electron && yarn test-electron-cli",
"watch": "yarn build && node ./scripts/watch.js",
"i18n-sort": "node ./scripts/locales-sort.js",
"i18n-scan-ace-report": "node ./scripts/translate-scan.js \"packages/ace-report/src\" \"packages/ace-report/src/l10n/locales/temp.json\" && sync-i18n --files 'packages/ace-report/src/l10n/locales/*.json' --primary temp --languages en fr pt_BR es da --space 4 --finalnewline --newkeysempty && rimraf \"packages/ace-report/src/l10n/locales/temp.json\"",
"i18n-scan-ace-report-axe": "node ./scripts/translate-scan.js \"packages/ace-report-axe/src\" \"packages/ace-report-axe/src/l10n/locales/temp.json\" && sync-i18n --files 'packages/ace-report-axe/src/l10n/locales/*.json' --primary temp --languages en fr pt_BR es da --space 4 --finalnewline --newkeysempty && rimraf \"packages/ace-report-axe/src/l10n/locales/temp.json\"",
"i18n-scan-ace-core": "node ./scripts/translate-scan.js \"packages/ace-core/src\" \"packages/ace-core/src/l10n/locales/temp.json\" && sync-i18n --files 'packages/ace-core/src/l10n/locales/*.json' --primary temp --languages en fr pt_BR es da --space 4 --finalnewline --newkeysempty && rimraf \"packages/ace-core/src/l10n/locales/temp.json\"",
"i18n-scan": "npm run i18n-scan-ace-report && npm run i18n-scan-ace-report-axe && npm run i18n-scan-ace-core",
"i18n-check": "sync-i18n --files 'packages/**/src/l10n/locales/*.json' --primary en --languages fr pt_BR es da --space 4 --finalnewline --newkeysempty"
},
"jest": {
"setupTestFrameworkScriptFile": "<rootDir>/tests/jest-setup.js",
"testEnvironment": "node"
"i18n-check": "sync-i18n --files 'packages/**/src/l10n/locales/*.json' --primary en --languages fr pt_BR es da --space 4 --finalnewline --newkeysempty",
"ace-app-prepare": "rm -f yarn.lock && rm -rf packages/*/lib && rm -rf packages/*/node_modules && rm -rf node_modules && yarn install && rm -rf packages/*/node_modules/@daisy && rm -rf node_modules/@daisy && yarn build && yarn upgrade && yarn patchElectronJestRunner && yarn npmVersionsCheck && git status && git --no-pager diff"
}
}
33 changes: 33 additions & 0 deletions packages/ace-axe-runner-electron/bin/ace.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env node

var electron = require('electron')

var proc = require('child_process')

var path = require('path')

// console.log(process.argv);
// console.log(process.cwd());
// console.log(__dirname);
var args = [].concat(path.resolve(__dirname, "../lib/cli.js"), process.argv.slice(2))
// console.log(args);

var child = proc.spawn(electron, args, { stdio: 'inherit', windowsHide: false })
child.on('close', function (code, signal) {
if (code === null) {
console.error(electron, 'exited with signal', signal)
process.exit(1)
}
process.exit(code)
})

const handleTerminationSignal = function (signal) {
process.on(signal, function signalHandler () {
if (!child.killed) {
child.kill(signal)
}
})
}

handleTerminationSignal('SIGINT')
handleTerminationSignal('SIGTERM')
40 changes: 40 additions & 0 deletions packages/ace-axe-runner-electron/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "@daisy/ace-axe-runner-electron",
"version": "1.2.0-beta.15",
"engines": {
"node": ">=10.0.0",
"yarn": "^1.22.5",
"npm": ">=6.14.12"
},
"description": "Electron-based Axe runner for Ace",
"author": {
"name": "DAISY developers",
"organization": "DAISY Consortium",
"url": "http://www.daisy.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/daisy/ace",
"directory": "packages/ace-axe-runner-electron"
},
"bugs": {
"url": "https://github.com/daisy/ace/issues"
},
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"@daisy/ace-cli-shared": "^1.2.0-beta.15",
"express": "^4.17.1",
"portfinder": "^1.0.28",
"selfsigned": "^1.10.8",
"uuid": "^8.3.2"
},
"devDependencies": {
"electron": "^12.0.2",
"json": "^10.0.0",
"json-diff": "^0.5.4"
},
"publishConfig": {
"access": "public"
}
}
83 changes: 83 additions & 0 deletions packages/ace-axe-runner-electron/src/cli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
'use strict';

const electron = require('electron');
const app = electron.app;
// const ipcMain = electron.ipcMain;
// const ipcRenderer = electron.ipcRenderer;

// Removes the deprecation warning message in the console
// https://github.com/electron/electron/issues/18397
app.allowRendererProcessReuse = true;

const EventEmitter = require('events');
class ElectronMockMainRendererEmitter extends EventEmitter {}
const eventEmmitter = new ElectronMockMainRendererEmitter();
eventEmmitter.send = eventEmmitter.emit;
eventEmmitter.ace_notElectronIpcMainRenderer = true;

const CONCURRENT_INSTANCES = 4; // same as the Puppeteer Axe runner

const axeRunnerElectronFactory = require('@daisy/ace-axe-runner-electron');
const axeRunner = axeRunnerElectronFactory.createAxeRunner(eventEmmitter, CONCURRENT_INSTANCES);

const prepareLaunch = require('./init').prepareLaunch;
prepareLaunch(eventEmmitter, CONCURRENT_INSTANCES);

const cli = require('@daisy/ace-cli-shared');

const LOG_DEBUG = false;
const ACE_LOG_PREFIX = "[ACE-AXE]";

if (LOG_DEBUG) console.log(`${ACE_LOG_PREFIX} axeRunner CLI launch...`);

// let win;
// app.whenReady().then(() => {
app.on('ready', async () => {
if (LOG_DEBUG) console.log(`${ACE_LOG_PREFIX} axeRunner CLI app ready.`);

// win = new BrowserWindow(
// {
// show: false,
// webPreferences: {
// allowRunningInsecureContent: false,
// contextIsolation: false,
// nodeIntegration: true,
// nodeIntegrationInWorker: false,
// sandbox: false,
// webSecurity: true,
// webviewTag: false,
// }
// }
// );
// // win.maximize();
// // let sz = win.getSize();
// // const sz0 = sz[0];
// // const sz1 = sz[1];
// // win.unmaximize();
// // // open a window that's not quite full screen ... makes sense on mac, anyway
// // win.setSize(Math.min(Math.round(sz0 * .75),1200), Math.min(Math.round(sz1 * .85), 800));
// // // win.setPosition(Math.round(sz[0] * .10), Math.round(sz[1] * .10));
// // win.setPosition(Math.round(sz0*0.5-win.getSize()[0]*0.5), Math.round(sz1*0.5-win.getSize()[1]*0.5));
// // win.show();

// win.loadURL(`file://${__dirname}/index.html`);
// win.on('closed', function () {
// if (LOG_DEBUG) console.log(`${ACE_LOG_PREFIX} axeRunner win closed.`);
// });

if (LOG_DEBUG) console.log(`${ACE_LOG_PREFIX} axeRunner run...`);
await cli.run(axeRunner, app.exit, (typeof process.env.JEST_TESTS !== "undefined" ? "ace-tests-cli-electron.log" : "ace-cli-electron.log")); // const exitCode = app.quit();
});

app.on('activate', function () {
if (LOG_DEBUG) console.log(`${ACE_LOG_PREFIX} axeRunner app activate.`);
});
app.on('window-all-closed', function () {
if (LOG_DEBUG) console.log(`${ACE_LOG_PREFIX} axeRunner app window-all-closed.`);
});
app.on('before-quit', function() {
if (LOG_DEBUG) console.log(`${ACE_LOG_PREFIX} axeRunner app before-quit.`);
});
app.on('quit', () => {
if (LOG_DEBUG) console.log(`${ACE_LOG_PREFIX} axeRunner app quit.`);
});
Loading