-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
54 lines (54 loc) · 3.89 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
"name": "BookStor.",
"version": "2.2.3",
"private": true,
"scripts": {
"start": "node ./bin/www",
"books-post": "docker cp app_api/models/test-data-books.json bookstor-fri-mongodb:/test-data-books.json; docker exec -it bookstor-fri-mongodb mongoimport --db BookStor --collection Books --mode upsert --upsertFields title --jsonArray --file test-data-books.json; docker exec -it bookstor-fri-mongodb rm -rf test-data-books.json",
"users-post": "docker cp app_api/models/test-data-users.json bookstor-fri-mongodb:/test-data-users.json; docker exec -it bookstor-fri-mongodb mongoimport --db BookStor --collection Users --mode upsert --upsertFields name --jsonArray --file test-data-users.json; docker exec -it bookstor-fri-mongodb rm -rf test-data-users.json; docker exec -it bookstor-fri-mongodb bash -c \\\\\\\"mongosh BookStor --eval 'db.Users.find().forEach(function(dokument) { for (var i = 0; i < dokument.alreadyRanked.length; i++) { dokument.alreadyRanked[i]._id = ObjectId() } db.Users.replaceOne({ \\\\\\\"_id\\\\\\\" : dokument._id }, dokument) })'\\\\\\\"; docker exec -it bookstor-fri-mongodb bash -c \\\\\\\\\\\\\\\"mongosh BookStor --eval 'db.Users.find().forEach(function(dokument) { for (var i = 0; i < dokument.comments.length; i++) { dokument.comments[i]._id = ObjectId() } db.Users.replaceOne({ \\\\\\\\\\\\\\\"_id\\\\\\\\\\\\\\\" : dokument._id }, dokument) })'\\\\\\\\\\\\\\\"; docker exec -it bookstor-fri-mongodb bash -c \\\\\\\\\\\\\\\"mongosh BookStor --eval 'db.Users.find().forEach(function(dokument) { for (var i = 0; i < dokument.myBooks.length; i++) { dokument.myBooks[i]._id = ObjectId() } db.Users.replaceOne({ \\\\\\\\\\\\\\\"_id\\\\\\\\\\\\\\\" : dokument._id }, dokument) })'\\\\\\\\\\\\\\\"",
"books-delete": "docker exec -it bookstor-fri-mongodb bash -c \"mongosh BookStor --eval 'db.Books.deleteMany({})'\"",
"users-delete": "docker exec -it bookstor-fri-mongodb bash -c \"mongosh BookStor --eval 'db.Users.deleteMany({})'\"",
"books-export-production": "docker exec -it bookstor-fri-mongodb bash -c \"mongodump -h localhost -d BookStor -o ./\"; docker exec -it bookstor-fri-mongodb bash -c \"mongorestore --drop --uri mongodb+srv://app:[email protected] ./BookStor/Books.bson\"; docker exec -it bookstor-fri-mongodb bash -c \"rm -rf ./BookStor\"",
"users-export-production": "docker exec -it bookstor-fri-mongodb bash -c \"mongodump -h localhost -d BookStor -o ./\"; docker exec -it bookstor-fri-mongodb bash -c \"mongorestore --drop --uri mongodb+srv://app:[email protected] ./BookStor/Users.bson\"; docker exec -it bookstor-fri-mongodb bash -c \"rm -rf ./BookStor\"",
"test": "mocha test --bail --reporter mochawesome --reporter-options autoOpen=true,reportDir=test/porocilo,reportFilename=porocilo,json=false"
},
"engines": {
"node": ">=14.15.5",
"npm": ">=6.14.11"
},
"dependencies": {
"@openzeppelin/contracts": "^4.4.1",
"@truffle/contract": "^4.4.2",
"@truffle/hdwallet-provider": "^2.0.0",
"axios": "*",
"bootstrap-star-rating": "*",
"chart.js": "^3.7.0",
"cookie-parser": "*",
"debug": "*",
"dotenv": "^10.0.0",
"express": "*",
"express-jwt": "^6.1.0",
"firebase": "*",
"fs": "*",
"hbs": "*",
"heroku": "^7.59.2",
"http-errors": "*",
"jsonwebtoken": "^8.5.1",
"mongoose": "^6.10.0",
"morgan": "*",
"ng": "0.0.0",
"ng2-charts": "^3.0.6",
"passport": "^0.5.2",
"passport-local": "^1.0.0",
"swagger-jsdoc": "^6.1.0",
"swagger-ui-express": "^4.3.0"
},
"main": "./bin/www",
"devDependencies": {
"chai": "^4.3.4",
"chromedriver": "^96.0.0",
"mocha": "^9.1.3",
"mochawesome": "^7.0.1",
"selenium-webdriver": "^4.1.0"
}
}