-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.json
110 lines (110 loc) · 6.78 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
{
"name": "mamboleofc-api",
"version": "2.1.1",
"description": "Example application for running a Node Express app on AWS Lambda using Amazon API Gateway.",
"main": "lambda.js",
"config": {
"s3BucketNameStage": "mamboleofc-api-stage",
"s3BucketNameProduction": "mamboleofc-api-production",
"region": "us-east-1",
"cloudFormationStackNameStage": "mamboleofcAPIStageStack",
"cloudFormationStackNameProduction": "mamboleofcAPIProdStack",
"domainStage": "api-stage.mamboleofc.ca",
"domainProduction": "api.mamboleofc.ca",
"certificate": "mamboleofc.ca",
"bucketNameImages": "images.mamboleofc.ca",
"stageStage": "stage",
"stageProduction": "prod"
},
"scripts": {
"build": "tsc --project .",
"postbuild": "cp -R src/views dist/ && cp package*json dist/ ",
"create-bucket": "cross-var aws s3 mb s3://$npm_package_config_s3BucketName --region $npm_package_config_region",
"delete-bucket": "cross-var aws s3 rb s3://$npm_package_config_s3BucketName --region $npm_package_config_region",
"create-bucketStage": "cross-var aws s3 mb s3://$npm_package_config_s3BucketNameStage --region $npm_package_config_region",
"create-bucketProduction": "cross-var aws s3 mb s3://$npm_package_config_s3BucketNameProduction --region $npm_package_config_region",
"delete-stack": "cross-var aws cloudformation delete-stack --stack-name $npm_package_config_cloudFormationStackName --region $npm_package_config_region",
"develop": "nodemon --config nodemon.json",
"invoke-lambda": "cross-var aws lambda invoke --function-name $npm_package_config_functionName --region $npm_package_config_region --cli-binary-format raw-in-base64-out --payload file://api-gateway-event.json lambda-invoke-response.json && cat lambda-invoke-response.json",
"local": "ts-node scripts/local",
"sam:build": "sam build --template sam-template.yaml",
"sam:deploy:stage": "cross-var sam deploy --stack-name $npm_package_config_cloudFormationStackNameStage --capabilities CAPABILITY_IAM --s3-bucket $npm_package_config_s3BucketNameStage --s3-prefix $npm_package_name --parameter-overrides DomainName=$npm_package_config_domainStage Certificate=$npm_package_config_certificate BucketNameImages=$npm_package_config_bucketNameImages Stage=$npm_package_config_stageStage MongDbHost=$MONGO_DB_HOST MongoDbUserName=$MONGO_DB_USERNAME MongoDbPassword=$MONGO_DB_PASSWORD MongoDbNameStage=$MONGO_DB_NAME_STAGE MongoDbNameProduction=$MONGO_DB_NAME_PRODUCTION TokenSecret=$TOKEN_SECRET --region $npm_package_config_region --no-fail-on-empty-changeset",
"sam:deploy:production": "cross-var sam deploy --stack-name $npm_package_config_cloudFormationStackNameProduction --capabilities CAPABILITY_IAM --s3-bucket $npm_package_config_s3BucketNameProduction --s3-prefix $npm_package_name --parameter-overrides DomainName=$npm_package_config_domainProduction Certificate=$npm_package_config_certificate BucketNameImages=$npm_package_config_bucketNameImages Stage=$npm_package_config_stageProduction MongDbHost=$MONGO_DB_HOST MongoDbUserName=$MONGO_DB_USERNAME MongoDbPassword=$MONGO_DB_PASSWORD MongoDbNameStage=$MONGO_DB_NAME_STAGE MongoDbNameProduction=$MONGO_DB_NAME_PRODUCTION TokenSecret=$TOKEN_SECRET --region $npm_package_config_region --no-fail-on-empty-changeset",
"package-deploy-stage": "npm run sam:build && npm run sam:deploy:stage",
"package-deploy-production": "npm run sam:build && npm run sam:deploy:production",
"setup-stage": "npm install && (cross-var aws s3api get-bucket-location --bucket $npm_package_config_s3BucketNameStage --region $npm_package_config_region || npm run create-bucketStage) && npm run package-deploy-stage",
"setup-production": "npm install && (cross-var aws s3api get-bucket-location --bucket $npm_package_config_s3BucketNameProduction --region $npm_package_config_region || npm run create-bucketProduction) && npm run package-deploy-production",
"setup": "npm install && (cross-var aws s3api get-bucket-location --bucket $npm_package_config_s3BucketName --region $npm_package_config_region || npm run create-bucket) && npm run package-deploy",
"deploy-stage": "npm run environment && npm run build && npm run package-deploy-stage",
"deploy-production": "npm run environment && npm run build && npm run package-deploy-production",
"environment": "cross-env NODE_ENV=$NODE_ENV HOST=$HOST USERNAME=$USERNAME PASSWORD=$PASSWORD DATABASE=$DATABASE TOKEN_SECRET=$TOKEN_SECRET DISTRIBUTION_ID=$DISTRIBUTION_ID",
"start": "cross-env DEBUG=http ts-node src/app.local",
"test": "find ./dist/test -name '*.js' | xargs nyc --nyc-path ./.nycrc mocha -R spec",
"test:watch": "npm test -- -- -w"
},
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/client-cloudfront": "^3.382.0",
"@aws-sdk/client-s3": "^3.435.0",
"@aws-sdk/client-ses": "^3.435.0",
"@vendia/serverless-express": "^4.10.1",
"body-parser": "^1.17.1",
"check-image-type": "^0.1.4",
"child_process": "^1.0.2",
"commander": "^9.3.0",
"compression": "^1.6.2",
"cors": "^2.8.3",
"crypto": "^1.0.1",
"crypto-js": "^4.2.0",
"dotenv": "^16.0.3",
"ejs": "^3.1.8",
"express": "^4.17.1",
"express-fileupload": "^1.4.0",
"fs": "^0.0.1-security",
"fs-extra": "^10.1.0",
"image-size": "^1.0.2",
"image-type": "^5.1.0",
"js": "^0.1.0",
"lodash-es": "^4.17.21",
"mime": "^3.0.0",
"moment": "^2.29.3",
"mongoose": "^7.6.3",
"multer": "^1.4.5-lts.1",
"mysql": "^2.18.1",
"mysql2": "^2.3.3",
"njwt": "^1.2.0",
"read-chunk": "^4.0.3",
"request": "^2.88.2",
"sequelize": "^6.30.0",
"source-map-support": "^0.5.21",
"ts-node": "^10.8.1",
"tslib": "^2.3.1",
"uuid": "^8.3.2"
},
"devDependencies": {
"@types/aws-lambda": "^8.10.100",
"@types/chai": "^4.2.21",
"@types/compression": "^1.7.1",
"@types/cors": "^2.8.12",
"@types/crypto-js": "^4.1.1",
"@types/ejs": "^3.1.0",
"@types/express": "^4.17.13",
"@types/helmet": "^4.0.0",
"@types/jasmine": "^4.0.3",
"@types/lodash": "^4.14.182",
"@types/lodash-es": "^4.17.6",
"@types/mocha": "^9.0.0",
"@types/node": "^17.0.39",
"@types/supertest": "^2.0.11",
"chai": "^4.3.4",
"chai-spies": "^1.0.0",
"cross-env": "^7.0.3",
"cross-var-no-babel": "^1.2.0",
"mocha": "^9.1.1",
"nodemon": "^2.0.22",
"nyc": "^15.1.0",
"rewire": "^6.0.0",
"supertest": "^6.1.6",
"typescript": "^4.7.3"
}
}