Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 6 additions & 2 deletions packages/fxa-admin-server/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"999999",
"--colors",
"-r",
"esbuild-register",
"ts-node/register",
"-r",
"tsconfig-paths/register",
"${workspaceFolder}/src/test/**/*.spec.ts",
"${workspaceFolder}/src/test/**/**/*.spec.ts",
"${workspaceFolder}/src/test/**/**/**/*.spec.ts"
Expand All @@ -33,7 +35,9 @@
"999999",
"--colors",
"-r",
"esbuild-register",
"ts-node/register",
"-r",
"tsconfig-paths/register",
"${workspaceFolder}/${relativeFile}"
],
"console": "integratedTerminal",
Expand Down
9 changes: 4 additions & 5 deletions packages/fxa-admin-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
"restart": "pm2 restart pm2.config.js",
"delete": "pm2 delete pm2.config.js",
"test": "yarn gen-keys && yarn test-default && yarn test-e2e ",
"gen-keys": "node -r esbuild-register ./src/scripts/gen_keys.ts;",
"gen-keys": "node -r ts-node/register/transpile-only -r tsconfig-paths/register ./src/scripts/gen_keys.ts;",
"test-unit": "JEST_JUNIT_OUTPUT_FILE=../../artifacts/tests/$npm_package_name/fxa-admin-server-jest-unit-results.xml jest --runInBand --coverage --detectOpenHandles --forceExit --logHeapUsage -t '^(?!.*?#integration).*' --ci --reporters=default --reporters=jest-junit",
"test-integration": "JEST_JUNIT_OUTPUT_FILE=../../artifacts/tests/$npm_package_name/fxa-admin-server-jest-integration-results.xml jest --runInBand --coverage --forceExit --logHeapUsage -t '#integration' --ci --reporters=default --reporters=jest-junit",
"test-default": "jest --runInBand --detectOpenHandles --forceExit -t=\"scripts/audit-tokens\"",
"test-watch": "jest --watch",
"test-cov": "jest --coverage",
"test-debug": "node --inspect-brk -r tsconfig-paths/register -r esbuild-register node_modules/.bin/jest --runInBand",
"test-debug": "node --inspect-brk -r tsconfig-paths/register node_modules/.bin/jest --runInBand",
"test-e2e": "jest --runInBand --config ./jest-e2e.config.js --forceExit",
"email-bounce": "node -r esbuild-register ./src/scripts/email-bounce.ts"
"email-bounce": "node -r ts-node/register/transpile-only -r tsconfig-paths/register ./src/scripts/email-bounce.ts"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -66,8 +66,6 @@
"audit-filter": "^0.5.0",
"chance": "^1.1.8",
"copyfiles": "^2.4.1",
"esbuild": "^0.17.15",
"esbuild-register": "^3.5.0",
"eslint": "^8.18.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-prettier": "^5.2.3",
Expand All @@ -76,6 +74,7 @@
"supertest": "^7.0.0",
"tailwindcss": "3.4.3",
"ts-jest": "^29.2.5",
"tsconfig-paths": "^4.2.0",
"typescript": "5.5.3",
"yargs": "^17.0.1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ describe('#integration - scripts/audit-tokens', () => {
async function testScript(args: string) {
// Note that logger output, directs to standard err.
const { stderr, stdout } = await exec(
`NODE_ENV=development node -r esbuild-register scripts/audit-tokens.ts ${args}`,
`NODE_ENV=development node -r ts-node/register/transpile-only -r tsconfig-paths/register scripts/audit-tokens.ts ${args}`,
{
cwd,
shell: '/bin/bash',
Expand Down
1 change: 1 addition & 0 deletions packages/fxa-admin-server/src/scripts/db-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export async function scaffoldDb(

export async function clearDb() {
await Email.knexQuery().del();
await Account.knex().raw('DELETE FROM passkeys');
await Account.knexQuery().del();
await Device.knexQuery().del();
await SessionToken.knexQuery().del();
Expand Down
2 changes: 1 addition & 1 deletion packages/fxa-admin-server/src/scripts/gen_keys.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node -r esbuild-register
#!/usr/bin/env node -r ts-node/register/transpile-only -r tsconfig-paths/register

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down
3 changes: 1 addition & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -31749,8 +31749,6 @@ __metadata:
convict-format-with-moment: "npm:^6.2.0"
convict-format-with-validator: "npm:^6.2.0"
copyfiles: "npm:^2.4.1"
esbuild: "npm:^0.17.15"
esbuild-register: "npm:^3.5.0"
eslint: "npm:^8.18.0"
eslint-config-react-app: "npm:^7.0.1"
eslint-plugin-prettier: "npm:^5.2.3"
Expand All @@ -31768,6 +31766,7 @@ __metadata:
tailwindcss: "npm:3.4.3"
ts-jest: "npm:^29.2.5"
ts-morph: "npm:^24.0.0"
tsconfig-paths: "npm:^4.2.0"
tslib: "npm:^2.8.1"
typescript: "npm:5.5.3"
yargs: "npm:^17.0.1"
Expand Down
Loading