forked from participedia/api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
167 lines (167 loc) · 8.26 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
{
"name": "participedia",
"version": "4.0.0",
"private": true,
"description": "API for Participedia v4",
"keywords": [],
"author": "Participedia Team",
"license": "MIT",
"main": "app.js",
"engines": {
"node": "12.20.1"
},
"dependencies": {
"@google-cloud/translate": "^5.2.0",
"@google/maps": "0.5.5",
"@sentry/node": "5.5.0",
"apicache": "^1.1.1",
"async": "^2.3.0",
"auth0": "^2.14.0",
"autocompleter": "^4.0.2",
"aws-sdk": "^2.70.0",
"bluebird": "^3.4.7",
"body-parser": "^1.16.0",
"compression": "^1.6.2",
"connect-pg-simple": "6.0.1",
"cookie-parser": "^1.4.3",
"cors": "^2.8.5",
"countup.js": "^2.0.7",
"dotenv": "^4.0.0",
"errorhandler": "^1.5.0",
"express": "^4.16.0",
"express-handlebars": "^3.0.0",
"express-jwt": "^6.0.0",
"express-session": "1.15.6",
"express-unless": "^0.3.0",
"faucet": "^0.0.1",
"fontfaceobserver": "^2.1.0",
"i18n": "0.8.3",
"js-md5": "0.7.3",
"json-pretty": "^0.0.1",
"json2csv": "4.5.1",
"jsonwebtoken": "^7.3.0",
"jwks-rsa": "^1.1.1",
"keypair": "^1.0.1",
"lazysizes": "5.2.0",
"lodash": "^4.17.4",
"method-override": "^2.3.7",
"mock-req-res": "^1.0.5",
"moment": "^2.23.0",
"morgan": "^1.7.0",
"nock": "^9.0.13",
"nodemon": "^1.11.0",
"npm": "^6.14.6",
"passport": "0.4.0",
"passport-auth0": "1.1.0",
"pem-jwk": "^1.5.1",
"pg-connection-string": "0.1.3",
"pg-promise": "8.5.5",
"quill": "^1.3.6",
"react-dropzone-s3-uploader": "^1.0.0-rc.3",
"rss-to-json": "^1.1.1",
"sinon": "^7.3.1",
"slim-select": "1.23.0",
"sortablejs": "1.9.0",
"tape": "^4.6.3",
"tippy.js": "^6.2.7",
"uuid": "3.3.2"
},
"devDependencies": {
"auth0-js": "^9.13.2",
"browserify": "^16.2.3",
"chai": "^4.2.0",
"chai-http": "^4.2.1",
"csv": "^5.1.0",
"csv-parser": "^2.3.3",
"csv-writer": "^1.6.0",
"cypress": "^3.1.5",
"eslint": "^5.12.1",
"eslint-config-google": "^0.9.1",
"eslint-config-prettier": "^4.0.0",
"eslint-plugin-prettier": "^2.0.1",
"csvtojson": "^2.0.10",
"html-to-text": "^7.0.0",
"esmify": "^2.0.0",
"husky": "^4.2.1",
"istanbul": "^0.4.5",
"jslint": "0.12.1",
"lint-staged": "^10.0.2",
"mocha": "^5.2.0",
"npm-run-all": "^4.1.5",
"pre-commit": "1.2.2",
"prettier": "^1.15.3",
"watchify": "^3.11.0"
},
"pre-commit": [
"precommit-msg",
"lintJSON"
],
"scripts": {
"cy:open": "cypress open",
"cy:run": "cypress run --browser chrome",
"cy:verify": "cypress verify",
"heroku-postbuild": "npm run build",
"start": "nodemon server.js",
"watch": "npm-run-all --parallel watch:*",
"build": "npm-run-all --parallel build:*",
"build:app_bundle": "browserify public/js/app.js -p esmify -o public/build/js/app.bundle.js -v",
"build:edit_view_bundle": "browserify public/js/edit-view.js -p esmify -o public/build/js/edit-view.bundle.js -v",
"build:reader_view_bundle": "browserify public/js/reader-view.js -p esmify -o public/build/js/reader-view.bundle.js -v",
"build:user_view_bundle": "browserify public/js/user-view.js -p esmify -o public/build/js/user-view.bundle.js -v",
"build:search_view_bundle": "browserify public/js/search-view.js -p esmify -o public/build/js/search-view.bundle.js -v",
"build:home_view_bundle": "browserify public/js/home-view.js -p esmify -o public/build/js/home-view.bundle.js -v",
"build:collection_view_bundle": "browserify public/js/collection-view.js -p esmify -o public/build/js/collection-view.bundle.js -v",
"build:research_view_bundle": "browserify public/js/research-view.js -p esmify -o public/build/js/research-view.bundle.js -v",
"build:about_view_bundle": "browserify public/js/about-view.js -p esmify -o public/build/js/about-view.bundle.js -v",
"watch:app_bundle": "watchify public/js/app.js -p esmify -o public/build/js/app.bundle.js -v",
"watch:edit_view_bundle": "watchify public/js/edit-view.js -p esmify -o public/build/js/edit-view.bundle.js -v",
"watch:reader_view_bundle": "watchify public/js/reader-view.js -p esmify -o public/build/js/reader-view.bundle.js -v",
"watch:user_view_bundle": "watchify public/js/user-view.js -p esmify -o public/build/js/user-view.bundle.js -v",
"watch:search_view_bundle": "watchify public/js/search-view.js -p esmify -o public/build/js/search-view.bundle.js -v",
"watch:home_view_bundle": "watchify public/js/home-view.js -p esmify -o public/build/js/home-view.bundle.js -v",
"watch:collection_view_bundle": "watchify public/js/collection-view.js -p esmify -o public/build/js/collection-view.bundle.js -v",
"watch:research_view_bundle": "watchify public/js/research-view.js -p esmify -o public/build/js/research-view.bundle.js -v",
"watch:about_view_bundle": "watchify public/js/about-view.js -p esmify -o public/build/js/about-view.bundle.js -v",
"lint": "eslint \"**.js\"",
"lintJSON": "echo 'linting locales json...' && jslint locales/*.js",
"precommit-msg": "echo 'Pre-commit checks...' && exit 0",
"deployprod": "heroku git:remote -a participedia-api && git push heroku master",
"deploystage": "heroku git:remote -a ppedia-stage && git push heroku master",
"deploy-homepage-2020": "git checkout homepage-2020 && heroku git:remote -a participedia-homepage-2020 && git push heroku homepage-2020:master",
"coverage": "NODE_ENV=test DATABASE_URL=${DATABASE_TEST_URL} istanbul cover _mocha -- -R spec && open coverage/lcov-report/index.html",
"test": "NODE_ENV=test DATABASE_URL=${DATABASE_TEST_URL} mocha",
"backuplocal": "pg_dump -O --clean participedia > ppedia_local.sql",
"backupprod": "pg_dump -O --clean -d \"${DATABASE_PROD_URL}\" > ppedia_prod.sql",
"backupstage": "pg_dump -O --clean -d \"${DATABASE_STAGE_URL}\" > ppedia_stage.sql",
"restorelocal": "dropdb \"participedia\"; createdb -E UTF8 \"participedia\"; psql \"participedia\" < ppedia_local.sql",
"restorestage": "psql -d \"${DATABASE_STAGE_URL}\" -f ppedia_stage.sql",
"resetstagedb": "psql -d \"${DATABASE_STAGE_URL}\" -f setup.sql; MIGRATIONS=true DATABASE_URL=$DATABASE_STAGE_URL node migrations/import_json.js; psql -d \"${DATABASE_STAGE_URL}\" -f migrations/all_migrations.sql",
"resettestdb": "dropdb \"participedia-test\"; createdb \"participedia-test\"; psql -d \"participedia-test\" -f setup.sql; MIGRATIONS=true DATABASE_URL=postgres://${USER}@localhost:5432/participedia-test node migrations/import_json.js; psql -d \"participedia-test\" -f migrations/all_migrations.sql",
"resetlocaldb": "dropdb \"participedia\"; createdb \"participedia\"; psql -d \"participedia\" -f setup.sql; MIGRATIONS=true DATABASE_URL=postgres://${USER}@localhost:5432/participedia node migrations/import_json.js; psql -d \"participedia\" -f migrations/all_migrations.sql",
"migrateuplocal": "psql -d \"participedia\" -f migrations/update_migrations.sql",
"migrateupstage": "psql -d \"${DATABASE_STAGE_URL}\" -f migrations/update_migrations.sql",
"migrateupprod": "psql -d \"${DATABASE_PROD_URL}\" -f migrations/update_migrations.sql",
"migrateup-i18n-staging": "psql -d \"${DATABASE_I18N_STAGING_URL}\" -f migrations/update_migrations.sql",
"resettestfunctions": "psql -d participedia-test -f migrations/functions.sql",
"resetlocalfunctions": "psql -d participedia -f migrations/functions.sql",
"resetstagefunctions": "psql -d \"${DATABASE_STAGE_URL}\" -f migrations/functions.sql",
"resetprodfunctions": "psql -d \"${DATABASE_PROD_URL}\" -f migrations/functions.sql",
"reset-i18n-staging-functions": "psql -d \"${DATABASE_I18N_STAGING_URL}\" -f migrations/functions.sql",
"textdump": "pg_dump --format=p --file=one_schema.sql --clean --create --no-owner --if-exists --dbname=participedia",
"migratelatest": "f(){ psql -d \"${DATABASE_URL}\" -f \"migrations/migration_051.sql\"; };f",
"migratetest": "f(){ psql -d \"${DATABASE_TEST_URL}\" -f \"migrations/migration_${item}.sql\"; };f",
"migrate-i18n-staging": "f(){ psql -d \"${DATABASE_I18N_STAGING_URL}\" -f \"migrations/migration_${item}.sql\"; };f",
"aws:comprehend": "node scripts/language-detector.js"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*/*.js": [
"prettier --write",
"git add"
]
}
}