Files
notifications-admin/package.json

71 lines
2.3 KiB
JSON
Raw Normal View History

{
"name": "notifications-admin",
"version": "0.0.1",
2022-11-29 08:55:22 -05:00
"description": "Admin front end for Notify",
"engines": {
"node": "^24.10.0"
},
"scripts": {
"lint": "jshint app/assets/javascripts",
2022-10-27 11:10:13 -04:00
"test": "jest --config tests/javascripts/jest.config.js tests/javascripts",
"test-watch": "jest --watch --config tests/javascripts/jest.config.js tests/javascripts",
"build": "NODE_ENV=production npx webpack --config webpack.config.js",
"build:dev": "npx webpack --config webpack.config.js",
"watch": "npx webpack --watch --config webpack.config.js",
"backstop:test": "npx backstop test --configPath=backstop.config.js",
"backstop:reference": "npx backstop reference --configPath=backstop.config.js",
"backstop:approve": "npx backstop approve --configPath=backstop.config.js",
"backstop:open": "npx backstop openReport --configPath=backstop.config.js",
"audit": "better-npm-audit audit --production --level low",
"pa11y-ci": "pa11y-ci"
},
"repository": {
"type": "git",
2022-11-29 08:55:22 -05:00
"url": "git+https://github.com/GSA/notifications-admin.git"
},
2022-11-29 08:55:22 -05:00
"author": "General Services Administration",
"license": "CC0",
"homepage": "https://github.com/GSA/notifications-admin#readme",
2024-06-17 14:27:59 -07:00
"overrides": {
2025-11-24 16:30:30 -05:00
"graceful-fs": "^4.2.11",
"glob@^10": "10.5.0"
2024-06-17 14:27:59 -07:00
},
"dependencies": {
"@rollup/plugin-commonjs": "^29.0.0",
"@rollup/plugin-node-resolve": "^16.0.3",
2024-08-08 14:32:33 -06:00
"@rollup/stream": "^3.0.1",
"@uswds/uswds": "^3.13.0",
Support registering a new authenticator This adds Yubico's FIDO2 library and two APIs for working with the "navigator.credentials.create()" function in JavaScript. The GET API uses the library to generate options for the "create()" function, and the POST API decodes and verifies the resulting credential. While the options and response are dict-like, CBOR is necessary to encode some of the byte-level values, which can't be represented in JSON. Much of the code here is based on the Yubico library example [1][2]. Implementation notes: - There are definitely better ways to alert the user about failure, but window.alert() will do for the time being. Using location.reload() is also a bit jarring if the page scrolls, but not a major issue. - Ideally we would use window.fetch() to do AJAX calls, but we don't have a polyfill for this, and we use $.ajax() elsewhere [3]. We need to do a few weird tricks [6] to stop jQuery trashing the data. - The FIDO2 server doesn't serve web requests; it's just a "server" in the sense of WebAuthn terminology. It lives in its own module, since it needs to be initialised with the app / config. - $.ajax returns a promise-like object. Although we've used ".fail()" elsewhere [3], I couldn't find a stub object that supports it, so I've gone for ".catch()", and used a Promise stub object in tests. - WebAuthn only works over HTTPS, but there's an exception for "localhost" [4]. However, the library is a bit too strict [5], so we have to disable origin verification to avoid needing HTTPS for dev work. [1]: https://github.com/Yubico/python-fido2/blob/c42d9628a4f33d20c4401096fa8d3fc466d5b77f/examples/server/server.py [2]: https://github.com/Yubico/python-fido2/blob/c42d9628a4f33d20c4401096fa8d3fc466d5b77f/examples/server/static/register.html [3]: https://github.com/alphagov/notifications-admin/blob/91453d36395b7a0cf2998dfb8a5f52cc9e96640f/app/assets/javascripts/updateContent.js#L33 [4]: https://stackoverflow.com/questions/55971593/navigator-credentials-is-null-on-local-server [5]: https://github.com/Yubico/python-fido2/blob/c42d9628a4f33d20c4401096fa8d3fc466d5b77f/fido2/rpid.py#L69 [6]: https://stackoverflow.com/questions/12394622/does-jquery-ajax-or-load-allow-for-responsetype-arraybuffer
2021-05-07 18:10:07 +01:00
"cbor-js": "0.1.0",
2025-11-06 14:23:30 -05:00
"ci-info": "^4.3.1",
2024-08-09 10:48:39 -06:00
"d3": "^7.9.0",
"playwright": "^1.58.0",
2023-04-24 14:57:35 -04:00
"python": "^0.0.4",
"query-command-supported": "1.0.0",
"sass-embedded": "^1.97.3",
"textarea-caret": "3.1.0"
},
"devDependencies": {
"@babel/core": "^7.28.6",
"@babel/preset-env": "^7.28.6",
"autoprefixer": "^10.4.23",
"babel-loader": "^10.0.0",
2024-09-18 13:59:16 -04:00
"backstopjs": "^6.3.25",
"better-npm-audit": "^3.11.0",
"copy-webpack-plugin": "^13.0.1",
"css-loader": "^7.1.2",
"jest": "^30.2.0",
"jest-each": "^30.1.0",
"jest-environment-jsdom": "^30.2.0",
2024-06-18 07:49:20 -07:00
"jshint": "2.13.6",
"jshint-stylish": "2.2.1",
Removed all govuk css (#2814) * Removed all govuk css * Updated reference files * Removing govuk js * Fixed casing for modules, removed unused page * Got more reference images * Updated template page * Removed govuk padding util * Updated hint to uswds hint * More govuk cleanup * Commiting backstopjs ref files * Fixed all unit tests that broke due to brittleness around govuk styling * Added new ref images * Final removal of govuk * Officially removed all govuk references * Updated reference file * Updated link to button * UI modernization * Cleanup * removed govuk escaping tests since they are no longer needed * Fix CodeQL security issue in escapeElementName function - Escape backslashes first before other special characters - Prevents potential double-escaping vulnerability - Addresses CodeQL alert about improper string escaping * Found more govuk removal. Fixed unit tests * Add missing pipeline check to pre-commit * updated test * Updated e2e test * More update to e2e test * Fixed another e2e test * Simple PR comments addressed * More updates * Updated backstop ref files * Refactored folder selection for non-admins * Updated redundant line * Updated tests to include correct mocks * Added more ref files * Addressing carlos comments * Addressing Carlo comments, cleanup of window initing * More cleanup and addressing carlo comments * Fixing a11 scan * Fixed a few issues with javascript * Fixed for pr * Fixing e2e tests * Tweaking e2e test * Added more ref files and cleaned up urls.js * Fixed bug with creating new template * Removed brittle test - addressed code ql comment * e2e race condition fix * More e2e test fixes * Updated e2e tests to not wait for text sent * Updated test to not wait for button click response * Made tear down more resilent if staging is down * reverted e2e test to what was working before main merge * Updated backstopRef images * Updated gulp to include job-polling differently
2025-10-06 09:38:54 -04:00
"merge-stream": "^2.0.0",
"mini-css-extract-plugin": "^2.10.0",
"postcss-loader": "^8.2.0",
"sass": "^1.97.2",
"sass-loader": "^16.0.6",
"terser-webpack-plugin": "^5.3.16",
"webpack": "^5.104.1",
"webpack-cli": "^6.0.1"
}
}