mempool/frontend/package.json

120 lines
5.1 KiB
JSON
Raw Normal View History

2019-07-21 16:59:47 +02:00
{
"name": "mempool-frontend",
2021-07-03 23:49:59 +02:00
"version": "2.2.1-dev",
"description": "Bitcoin mempool visualizer and blockchain explorer backend",
2021-03-18 08:29:11 +01:00
"license": "GNU Affero General Public License v3.0",
"homepage": "https://mempool.space",
"repository": {
"type": "git",
"url": "git+https://github.com/mempool/mempool"
},
"bugs": {
"url": "https://github.com/mempool/mempool/issues"
},
"keywords": [
"bitcoin",
"mempool",
"blockchain",
"explorer",
"liquid"
],
"main": "index.ts",
2019-07-21 16:59:47 +02:00
"scripts": {
"ng": "./node_modules/@angular/cli/bin/ng",
"tsc": "./node_modules/typescript/bin/tsc",
Implement i18n support in frontend using Angular + Transifex + NGINX This PR adds basic i18n support into the mempool frontend, together with a smooth workflow for developers and translators to collaborate: * Using the existing @angular/localize module, developers add i18n metadata to any frontend strings their new features or changes modify * Using the new npm script `i18n-extract-from-source`, developers extract the i18n data from source code into `src/locale/messages.xlf` * After pushing the updated `src/locale/messages.xlf` to GitHub, the Transifex service will update its database from the new source data * Using the Transifex website UI, translators can work together to translate all the mempool frontend strings into their native languages * Using the new npm script `i18n-pull-from-transifex`, developers can pull in completed translations from Transifex, and commit them into git. This flow requires an API key from Transifex, which can be obtained at https://www.transifex.com/user/settings/api/ to be used with the python script installed by `pip install transifex-client` - after preparing these, run the npm script which will ask you for the API key the first time. When downloading is complete, you can test building the frontend, and if successful, commit the new strings files into git. This PR implements a new locale selector in the footer of the homepage dashboard, and includes WIP translations for the following languages: * Czech (cs) * German (de) * Japanese (ja) * Norwegian (nn) * Spanish (es) * Swedish (sv) * Ukrainian (uk) * Persian (fa) * Portugese (pt) * Turkish (tr) * Dutch (nl) * French (fr) * Chinese (zh) * Slovenian (sl) * Korean (ko) * Polish (pl) The user-agent's `Accept-Language` header is used to automatically detect their preferred language, which can be manually overriden by the pull-down selector, which saves their preference to a cookie, which is used by nginx to serve the correct HTML bundle to the user. Remaining tasks include adding i18n metadata for strings in the Bisq and Liquid frontend code, mouseover hover tooltip strings, hard-coded og metadata inside HTML templates, and many other places. This will be done in a separate PR. When upgrading to add i18n support, mempool instance operators must take care to install the new nginx.conf and nginx-mempool.conf files, and tweak for their specific site configuration. Fixes #81
2020-12-01 20:19:33 +01:00
"i18n-extract-from-source": "./node_modules/@angular/cli/bin/ng xi18n --ivy --out-file ./src/locale/messages.xlf",
"i18n-pull-from-transifex": "tx pull -a --parallel --minimum-perc 1 --force",
"serve": "npm run generate-config && ng serve -c local",
"serve:stg": "npm run generate-config && ng serve -c staging",
"serve:local-prod": "npm run generate-config && ng serve -c local-prod",
"start": "npm run generate-config && npm run sync-assets-dev && ng serve -c local",
"start:stg": "npm run generate-config && npm run sync-assets-dev && ng serve -c staging",
"start:local-prod": "npm run generate-config && npm run sync-assets-dev && ng serve -c local-prod",
"build": "npm run generate-config && ng build --prod --localize && npm run sync-assets && npm run build-mempool.js",
"sync-assets": "node sync-assets.js && rsync -av ./dist/mempool/browser/en-US/resources ./dist/mempool/browser/resources",
"sync-assets-dev": "node sync-assets.js dev",
"generate-config": "node generate-config.js",
"build-mempool.js": "tsc | browserify -p tinyify ./node_modules/@mempool/mempool.js/lib/index.js --standalone mempoolJS > ./dist/mempool/browser/en-US/mempool.js",
2019-07-21 16:59:47 +02:00
"test": "ng test",
"lint": "ng lint",
2020-11-06 22:30:52 +01:00
"e2e": "ng e2e",
Updates to the e2e suite (#659) * initial version of the update config script * fix duplicated content * update cypress ci settings * add workflow to run e2e tests when pushing * record cypress results to the dashboard * pull the cypress record key and project id from the secrets * add start-server-and-test to replace concurrently * replace concurrently with start-server-and-test * remove concurrently * add new cypress target to record * update cypress to 7.7.0 * add tests for signet * add tests for testnet * run tests on chrome and firefox * update test matrix: add edge and run firefox on container * fix copypasta * update docker image for firefox * fix task name again * fix edge tests task name * improve bisq tests * update workflow config * enable cypress debug logs * add a manual trigger for the e2e tests * add config:defaults target * use more of the GHA options * fix config command * add cypress-fail-on-console-error * upgrade cypress to v8.0.0 * add helper to wait for the loader skeleton to be gone * use skeleton waiter on the tests * remove manual test trigger * fix tv test when only one mempool block is available * add waiter for pagination * add extra steps to debug firefox launch issue * remove whoami step * Revert "upgrade cypress to v8.0.0" This reverts commit cb3ff7d906c2a2219d7e2b2c16a92c311e3f6817. * remove userinfo debug step * enable test retries in run mode * update proxy config to reduce ECONNRESET errors * add mock-socket dev dependency * add helpers to mock websockets and detect page idleness * stabilize mainnet tests * fix tv mode test on Liquid * add basic tests for the mainnet status page * cleanup mainnet tests * update bisq tests * update signet tests * update testnet tests * add initial support for parameterized websocket mocks * move testing dependencies to optionalDependencies * comment out mempool size check until the live updates are fixed * comment out tx regex test * update fixture for the new difficulty adjustment component * fix the assertions on the status page
2021-07-25 20:03:47 +02:00
"e2e:ci": "npm run cypress:run:ci",
"config:defaults": "node update-config.js TESTNET_ENABLED=true SIGNET_ENABLED=true LIQUID_ENABLED=true BISQ_ENABLED=true ITEMS_PER_PAGE=25 && npm run generate-config",
"dev:ssr": "npm run generate-config && ng run mempool:serve-ssr",
"serve:ssr": "node server.run.js",
"build:ssr": "npm run build && ng run mempool:server:production && ./node_modules/typescript/bin/tsc server.run.ts",
"prerender": "ng run mempool:prerender",
Updates to the e2e suite (#659) * initial version of the update config script * fix duplicated content * update cypress ci settings * add workflow to run e2e tests when pushing * record cypress results to the dashboard * pull the cypress record key and project id from the secrets * add start-server-and-test to replace concurrently * replace concurrently with start-server-and-test * remove concurrently * add new cypress target to record * update cypress to 7.7.0 * add tests for signet * add tests for testnet * run tests on chrome and firefox * update test matrix: add edge and run firefox on container * fix copypasta * update docker image for firefox * fix task name again * fix edge tests task name * improve bisq tests * update workflow config * enable cypress debug logs * add a manual trigger for the e2e tests * add config:defaults target * use more of the GHA options * fix config command * add cypress-fail-on-console-error * upgrade cypress to v8.0.0 * add helper to wait for the loader skeleton to be gone * use skeleton waiter on the tests * remove manual test trigger * fix tv test when only one mempool block is available * add waiter for pagination * add extra steps to debug firefox launch issue * remove whoami step * Revert "upgrade cypress to v8.0.0" This reverts commit cb3ff7d906c2a2219d7e2b2c16a92c311e3f6817. * remove userinfo debug step * enable test retries in run mode * update proxy config to reduce ECONNRESET errors * add mock-socket dev dependency * add helpers to mock websockets and detect page idleness * stabilize mainnet tests * fix tv mode test on Liquid * add basic tests for the mainnet status page * cleanup mainnet tests * update bisq tests * update signet tests * update testnet tests * add initial support for parameterized websocket mocks * move testing dependencies to optionalDependencies * comment out mempool size check until the live updates are fixed * comment out tx regex test * update fixture for the new difficulty adjustment component * fix the assertions on the status page
2021-07-25 20:03:47 +02:00
"cypress:open": "cypress open",
"cypress:run": "cypress run",
"cypress:run:record": "cypress run --record",
"cypress:open:ci": "node update-config.js TESTNET_ENABLED=true SIGNET_ENABLED=true LIQUID_ENABLED=true BISQ_ENABLED=true ITEMS_PER_PAGE=25 && npm run generate-config && start-server-and-test serve:local-prod 4200 cypress:open",
"cypress:run:ci": "node update-config.js TESTNET_ENABLED=true SIGNET_ENABLED=true LIQUID_ENABLED=true BISQ_ENABLED=true ITEMS_PER_PAGE=25 && npm run generate-config && start-server-and-test serve:local-prod 4200 cypress:run:record"
2019-07-21 16:59:47 +02:00
},
"dependencies": {
"@angular/animations": "~11.2.8",
"@angular/common": "~11.2.8",
"@angular/compiler": "~11.2.8",
"@angular/core": "~11.2.8",
"@angular/forms": "~11.2.8",
"@angular/localize": "^11.2.8",
"@angular/platform-browser": "~11.2.8",
"@angular/platform-browser-dynamic": "~11.2.8",
"@angular/platform-server": "~11.2.8",
"@angular/router": "~11.2.8",
"@fortawesome/angular-fontawesome": "^0.8.2",
"@fortawesome/fontawesome-common-types": "^0.2.35",
"@fortawesome/fontawesome-svg-core": "^1.2.35",
"@fortawesome/free-solid-svg-icons": "^5.15.3",
"@mempool/chartist": "^0.11.4",
2021-07-25 01:31:46 +02:00
"@mempool/mempool.js": "^2.2.3",
"@ng-bootstrap/ng-bootstrap": "^7.0.0",
"@nguniversal/express-engine": "11.2.1",
"@types/qrcode": "^1.3.4",
"bootstrap": "4.5.0",
2021-04-08 23:22:24 +02:00
"browserify": "^17.0.0",
"clipboard": "^2.0.4",
2020-11-06 22:30:52 +01:00
"domino": "^2.1.6",
"express": "^4.17.1",
2021-04-13 09:30:53 +02:00
"lightweight-charts": "^3.3.0",
"ngx-bootrap-multiselect": "^2.0.0",
"ngx-infinite-scroll": "^10.0.1",
"qrcode": "^1.4.4",
"rxjs": "^6.6.7",
2021-04-08 23:22:24 +02:00
"tinyify": "^3.0.0",
"tlite": "^0.1.9",
"tslib": "^2.2.0",
"zone.js": "~0.11.4"
2019-07-21 16:59:47 +02:00
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.1102.7",
"@angular/cli": "~11.2.7",
"@angular/compiler-cli": "~11.2.8",
"@angular/language-service": "~11.2.8",
"@nguniversal/builders": "^11.2.1",
2020-11-06 22:30:52 +01:00
"@types/express": "^4.17.0",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.1",
2020-11-06 22:30:52 +01:00
"http-proxy-middleware": "^1.0.5",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.1.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~4.1.5"
},
"optionalDependencies": {
Updates to the e2e suite (#659) * initial version of the update config script * fix duplicated content * update cypress ci settings * add workflow to run e2e tests when pushing * record cypress results to the dashboard * pull the cypress record key and project id from the secrets * add start-server-and-test to replace concurrently * replace concurrently with start-server-and-test * remove concurrently * add new cypress target to record * update cypress to 7.7.0 * add tests for signet * add tests for testnet * run tests on chrome and firefox * update test matrix: add edge and run firefox on container * fix copypasta * update docker image for firefox * fix task name again * fix edge tests task name * improve bisq tests * update workflow config * enable cypress debug logs * add a manual trigger for the e2e tests * add config:defaults target * use more of the GHA options * fix config command * add cypress-fail-on-console-error * upgrade cypress to v8.0.0 * add helper to wait for the loader skeleton to be gone * use skeleton waiter on the tests * remove manual test trigger * fix tv test when only one mempool block is available * add waiter for pagination * add extra steps to debug firefox launch issue * remove whoami step * Revert "upgrade cypress to v8.0.0" This reverts commit cb3ff7d906c2a2219d7e2b2c16a92c311e3f6817. * remove userinfo debug step * enable test retries in run mode * update proxy config to reduce ECONNRESET errors * add mock-socket dev dependency * add helpers to mock websockets and detect page idleness * stabilize mainnet tests * fix tv mode test on Liquid * add basic tests for the mainnet status page * cleanup mainnet tests * update bisq tests * update signet tests * update testnet tests * add initial support for parameterized websocket mocks * move testing dependencies to optionalDependencies * comment out mempool size check until the live updates are fixed * comment out tx regex test * update fixture for the new difficulty adjustment component * fix the assertions on the status page
2021-07-25 20:03:47 +02:00
"cypress": "^7.7.0",
"@cypress/schematic": "^1.3.0",
"cypress-fail-on-console-error": "^2.1.0",
"cypress-wait-until": "^1.7.1",
"start-server-and-test": "^1.12.6",
"mock-socket": "^9.0.3"
2019-07-21 16:59:47 +02:00
}
2020-07-28 09:27:38 +02:00
}