Skip to content

Commit

Permalink
Prepare for release 1.0.3 (#918)
Browse files Browse the repository at this point in the history
* Bump version to 1.0.3 for upcoming release
* Bump package dependencies, resolve vulnerabilities
  • Loading branch information
chriswilty authored Jul 16, 2024
1 parent e8600c4 commit 58f0252
Show file tree
Hide file tree
Showing 12 changed files with 1,724 additions and 1,613 deletions.
638 changes: 315 additions & 323 deletions backend/package-lock.json

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prompt-injection-api",
"version": "1.0.0",
"version": "1.0.3",
"type": "module",
"scripts": {
"build": "tsc --noEmit",
Expand Down Expand Up @@ -28,20 +28,20 @@
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/express-session": "^1.18.0",
"@types/node": "^20.12.7",
"@types/node": "^20.14.10",
"@types/supertest": "^6.0.2",
"@typescript-eslint/eslint-plugin": "^7.6.0",
"@typescript-eslint/parser": "^7.6.0",
"@typescript-eslint/eslint-plugin": "^7.16.0",
"@typescript-eslint/parser": "^7.16.0",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^28.2.0",
"prettier": "^3.2.5",
"eslint-plugin-jest": "^28.6.0",
"prettier": "^3.3.3",
"supertest": "^7.0.0",
"ts-jest": "^29.1.2",
"tsx": "^4.7.2",
"typescript": "^5.4.5"
"ts-jest": "^29.2.2",
"tsx": "^4.16.2",
"typescript": "^5.5.3"
}
}
12 changes: 7 additions & 5 deletions backend/src/controller/defenceController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,16 @@ function handleResetDefenceConfigItem(
currentDefences
);

const updatedDefences = req.session.levelState[level].defences;
if (updatedDefences === undefined) {
const updatedDefence = req.session.levelState[level].defences.find(
(defence) => defence.id === defenceId
);
if (!updatedDefence) {
sendErrorResponse(res, 500, 'Something went whacky');
return;
}
const updatedDefenceConfig = updatedDefences
.find((defence) => defence.id === defenceId)
?.config.find((config) => config.id === configItemId);
const updatedDefenceConfig = updatedDefence.config.find(
(config) => config.id === configItemId
);

res.send(updatedDefenceConfig);
}
Expand Down
Loading

0 comments on commit 58f0252

Please sign in to comment.