bug(content): Fix bad paths to l10n files

Because:
- Content server would not return the l10n version
- Story books in auth server weren't building

This Commit:
- Makes sure l10n:prime is run prior to running tests.
- Makes sure l10n:prime is run prior to building storybooks.
This commit is contained in:
dschom 2023-03-22 09:28:54 -07:00
Родитель a2b6cfba27
Коммит ee51f23aa1
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: F26AEE99174EE68B
4 изменённых файлов: 8 добавлений и 5 удалений

1
.gitignore поставляемый
Просмотреть файл

@ -119,6 +119,7 @@ packages/fxa-content-server/locale/*/*/*.po
packages/fxa-content-server/rerun.txt
packages/fxa-content-server/.tmp
packages/fxa-content-server/.tscompiled
packages/fxa-content-server/public/locales
# fxa-customs-server
packages/fxa-customs-server/test/mocks/temp.netset

Просмотреть файл

@ -39,8 +39,8 @@
"audit-orphaned-stripe-accounts": "CONFIG_FILES='config/secrets.json' node -r esbuild-register ./scripts/audit-orphaned-customers.ts",
"remove-unverified-accounts": "CONFIG_FILES='config/secrets.json' node -r esbuild-register ./scripts/remove-unverified-accounts.ts",
"emails-scss": "node -r esbuild-register ./lib/senders/emails/sass-compile-files.ts",
"storybook": "npm run install-ejs && yarn emails-scss && NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 6010 --no-version-updates -s ./",
"build-storybook": "npm run install-ejs && yarn emails-scss && NODE_OPTIONS=--openssl-legacy-provider build-storybook && yarn build-storybook:copy-locales && yarn build-storybook:copy-templates",
"storybook": "yarn l10n-prime && npm run install-ejs && yarn emails-scss && NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 6010 --no-version-updates -s ./",
"build-storybook": "yarn l10n-prime && npm run install-ejs && yarn emails-scss && NODE_OPTIONS=--openssl-legacy-provider build-storybook && yarn build-storybook:copy-locales && yarn build-storybook:copy-templates",
"build-storybook:copy-locales": "mkdir -p ./storybook-static/public/locales && cp -R ./public/locales ./storybook-static/public",
"build-storybook:copy-templates": "mkdir -p ./storybook-static/lib/senders/emails/templates && cp -R ./lib/senders/emails ./storybook-static/lib/senders",
"install-ejs": "./scripts/install-ejs.sh",

Просмотреть файл

@ -3,14 +3,15 @@
"version": "1.253.4",
"description": "Firefox Accounts Content Server",
"scripts": {
"build": "tsc --build ../fxa-react && npm run build-css && NODE_ENV=production NODE_OPTIONS=--openssl-legacy-provider grunt build",
"build": "tsc --build ../fxa-react && yarn l10n-prime && npm run build-css && NODE_ENV=production NODE_OPTIONS=--openssl-legacy-provider grunt build",
"build-css": "tailwindcss --postcss -i ./app/styles/tailwind.css -o ./app/styles/tailwind.out.css",
"compile": "tsc --noEmit",
"clean": "git clean -fXd",
"postinstall": "cp server/config/local.json-dist server/config/local.json",
"audit": "npm audit --json | audit-filter --nsp-config=.nsprc --audit=-",
"l10n-prime": "yarn l10n:prime fxa-content-server",
"lint": "eslint app server tests --cache",
"start": "node scripts/check-local-config && NODE_OPTIONS=--openssl-legacy-provider grunt l10n-create-json l10n-generate-tos-pp:app && pm2 start pm2.config.js && ../../_scripts/check-url.sh localhost:3030/bundle/app.bundle.js && npm run build-css",
"start": "node scripts/check-local-config && yarn l10n-prime && NODE_OPTIONS=--openssl-legacy-provider grunt l10n-create-json l10n-generate-tos-pp:app && pm2 start pm2.config.js && ../../_scripts/check-url.sh localhost:3030/bundle/app.bundle.js && npm run build-css",
"stop": "pm2 stop pm2.config.js",
"restart": "pm2 restart pm2.config.js && npm run build-css",
"delete": "pm2 delete pm2.config.js",

Просмотреть файл

@ -78,7 +78,8 @@ function getL10nVersion() {
__dirname,
'..',
'..',
'fxa-content-server-l10n',
'public',
'locales',
'git-head.txt'
);
return fs.readFileSync(gitShaPath, 'utf8').trim();