-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpackage.json
130 lines (130 loc) · 10.1 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
{
"name": "@tech-matters/hrm-base",
"version": "1.0.0",
"description": "",
"author": "",
"license": "AGPL",
"workspaces": [
"packages/*",
"lambdas/packages/*",
"lambdas/*",
"hrm-domain/lambdas/*",
"hrm-domain/packages/*",
"hrm-domain/*",
"hrm-domain/scheduled-tasks/*",
"hrm-domain/integration-tests/*",
"resources-domain/lambdas/*",
"resources-domain/packages/*",
"resources-domain/*"
],
"dependencies": {
"aws-cdk-lib": "^2.176.0",
"@maildrop/api": "^1.0.27",
"aws-sdk-client-mock": "^3.0.0",
"dotenv": "^16.3.1",
"node-fetch": "^2.7.0"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.3",
"@tsconfig/node18": "^18.2.1",
"@types/aws-lambda": "^8.10.119",
"@types/jest": "^26.0.24",
"@types/node": "^16.18.0",
"@types/node-fetch": "^2.5.10",
"@types/redis": "^4.0.10",
"@types/ws": "8.5.4",
"@typescript-eslint/eslint-plugin": "^5.13.0",
"@typescript-eslint/parser": "^5.13.0",
"aws-cdk": "^2.87.0",
"aws-cdk-local": "^2.18.0",
"cross-env": "^7.0.3",
"esbuild": "^0.18.11",
"eslint": "^8.44.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.2",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^28.1.3",
"jest-config": "^28.1.3",
"jest-mock": "^29.6.2",
"npm-run-all": "^4.1.5",
"prettier": "^3.0.0",
"ts-jest": "^28.0.8",
"ts-node": "^10.9.1",
"typescript": "^4.8.4",
"wait-on": "^7.2.0",
"undici": "5.28.4"
},
"scripts": {
"admin-cli": "npx tsx hrm-domain/hrm-service/scripts/admin-cli.ts",
"build": "tsc -b --verbose",
"clean": "tsc -b --clean",
"build-and-start": "run-s build start",
"build-and-start:service": "run-s build start:service",
"start": "run-s start:db start:localstack start:es start:service",
"start:light": "run-s start:db start:localstack start:service",
"migrate": "npm run migrate --workspaces --if-present",
"seed": "npm run seed --workspaces --if-present",
"start:db": "run-s docker:compose:db-persistent:up waiton:db migrate seed",
"start:es": "run-s docker:compose:es:up waiton:es es:create-index",
"start:localstack": "cross-env AWS_REGION=us-east-1 run-s localstack:init",
"start:service": "cross-env AWS_REGION=us-east-1 run-p start:service:*",
"start:service:api": "cross-env AWS_REGION=us-east-1 SSM_ENDPOINT=http://localhost:4566 SQS_ENDPOINT=http://localhost:4566 PORT=8080 INTERNAL_SERVICES_PORT=8081 npm run start -w hrm-domain/hrm-service",
"start:service:job-processor": "cross-env AWS_REGION=us-east-1 SSM_ENDPOINT=http://localhost:4566 SQS_ENDPOINT=http://localhost:4566 npm run start:job-processor -w hrm-domain/hrm-service",
"docker:build": "npm run docker:build --workspaces --if-present",
"docker:compose:down": "docker compose -p hrm down",
"docker:compose:logs": "docker compose -p hrm logs -f",
"docker:compose:up": "run-s docker:compose:*:up",
"docker:compose:up:integration-test": "run-s docker:compose:localstack:up docker:compose:db:up docker:compose:service:up",
"docker:compose:db:up": "docker compose -p hrm -f hrm-domain/hrm-service/docker-database/docker-compose.yml up -d",
"docker:compose:db-persistent:up": "docker compose -p hrm -f hrm-domain/hrm-service/docker-database/docker-compose-persistent.yml up -d",
"docker:compose:es:up": "docker compose -p hrm -f docker-compose.es.yml up -d",
"docker:compose:es:down": "docker compose -p hrm -f docker-compose.es.yml down",
"docker:compose:lambdas:up": "cross-env completed_sqs_queue_url==$(npx ts-node test-support/getContactCompleteQueueUrl.ts) docker compose -p hrm -f lambdas/docker-compose.yml up -d",
"docker:compose:localstack:up": "docker compose -p hrm up -d",
"docker:compose:service:up": "docker compose -p hrm -f hrm-domain/hrm-service/docker-compose.yml up -d",
"es:create-index": "npm run es:create-index:local --workspaces --if-present",
"lint": "cross-env eslint .",
"lint:fix": "npm run lint -- --fix",
"localstack:bootstrap": "wait-on http://localhost:4566 && cross-env AWS_REGION=us-east-1 cdklocal bootstrap",
"localstack:deploy": "cross-env AWS_REGION=us-east-1 cdklocal deploy --all --outputs-file ./cdk/outputs.json --debug",
"localstack:destroy": "cross-env AWS_REGION=us-east-1 cdklocal destroy --all",
"localstack:diff": "cross-env AWS_REGION=us-east-1 cdklocal diff",
"localstack:setup": "run-s localstack:bootstrap localstack:deploy localstack:cp-s3-assets",
"localstack:init": "run-s docker:compose:localstack:up build localstack:setup",
"localstack:synth": "cross-env AWS_REGION=us-east-1 cdklocal synth --all",
"localstack:down": "run-s docker:compose:localstack:down",
"localstack:cp-s3-assets": "run-p localstack:cp-s3-assets:*",
"localstack:cp-s3-assets:docs-bucket": "aws --endpoint-url=http://localhost:4566 s3 cp ./cdk/assets s3://docs-bucket --recursive",
"localstack:cp-s3-assets:mock-bucket": "aws --endpoint-url=http://localhost:4566 s3 cp ./cdk/assets s3://mock-bucket --recursive",
"test": "run-s build test:run",
"test:run": "run-p test:unit test:service test:integration",
"test:coverage": "npm run test:coverage --workspaces --if-present",
"test:integration": "run-s start:localstack start:db test:integration:run",
"test:integration:run": "cross-env AWS_REGION=us-east-1 npm run test:integration --workspaces --if-present",
"test:migrate": "npm run test:migrate --workspaces --if-present",
"test:service": "run-s docker:compose:es:up waiton:es test:service:run",
"test:service:run": "npm run test:service --workspaces --if-present",
"test:service:ci": "npm run test:service:ci --workspaces --if-present",
"test:unit": "npm run test:unit --workspaces --if-present",
"test:docker:lambdas": "run-s test:docker:jobs:*",
"test:docker:jobs:contact-complete": "curl -XPOST \"http://localhost:9000/2015-03-31/functions/function/invocations\" -d \"$(cat hrm-domain/contact-complete/tests/testPayload.json)\"",
"test:docker:jobs:contact-retrieve-recording-url": "curl -XPOST \"http://localhost:9001/2015-03-31/functions/function/invocations\" -d \"$(cat hrm-domain/contact-retrieve-recording-url/tests/testPayload.json)\"",
"test:docker:jobs:contact-retrieve-transcript": "curl -XPOST \"http://localhost:9002/2015-03-31/functions/function/invocations\" -d \"$(cat hrm-domain/contact-retrieve-transcript/tests/testPayload.json)\"",
"ssm:local": "run-p ssm:local:*",
"ssm:local:base": "run-p ssm:local:base:*",
"ssm:local:base:cdk": "docker run --rm -v ~/.aws:/home/aws/.aws -e AWS_DEFAULT_REGION -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY interrobangc/awscli2 ssm get-parameter --name \"/local/hrm/cdk/.env\" --with-decryption --query \"Parameter.Value\" --output text > ./cdk/.env",
"ssm:local:workspaces": "npm run ssm:local --workspaces --if-present",
"license:add": "docker run --rm -v ${PWD}:/src ghcr.io/google/addlicense -c \"Technology Matters\" -y \"2021-2023\" -ignore \".idea/**\" -ignore \"**/node_modules/**\" -ignore \"**/dist/**\" -ignore \"**/coverage/**\" -ignore \"cdk.out/**\" -ignore \"resources-domain/resources-service/scripts\" -ignore \"resources-domain/resources-service/reference-data/**\" -ignore \"resources-domain/resources-service/resource-json/**\" -ignore \"**/scripts-dist/**\" -f license-header.tpl .",
"license:check": "docker run --rm -v ${PWD}:/src ghcr.io/google/addlicense -check -c \"Technology Matters\" -y \"2021-2023\" -ignore \".idea/**\" -ignore \"**/node_modules/**\" -ignore \"**/dist/**\" -ignore \"**/coverage/**\" -ignore \"cdk.out/**\" -ignore \"resources-domain/resources-service/scripts/**\" -ignore \"resources-domain/resources-service/reference-data/**\" -ignore \"resources-domain/resources-service/resource-json/**\" -ignore \"**/scripts-dist/**\" -f license-header.tpl .",
"license:add:windows": "docker run --rm -v %cd%:/src ghcr.io/google/addlicense -c \"Technology Matters\" -y \"2021-2023\" -ignore \".idea/**\" -ignore \"**/node_modules/**\" -ignore \"**/dist/**\" -ignore \"**/coverage/**\" -ignore \"cdk.out/**\" -ignore \"resources-domain/resources-service/scripts/**\" -ignore \"resources-domain/resources-service/reference-data/**\" -ignore \"resources-domain/resources-service/resource-json/**\" -ignore \"**/scripts-dist/**\" -f license-header.tpl .",
"license:check:windows": "docker run --rm -v %cd%:/src ghcr.io/google/addlicense -check -c \"Technology Matters\" -y \"2021-2023\" -ignore \".idea/**\" -ignore \"**/node_modules/**\" -ignore \"**/dist/**\" -ignore \"**/coverage/**\" -ignore \"cdk.out/**\" -ignore \"resources-domain\\\\resources-service\\\\scripts\\\\**\" -ignore \"resources-domain\\\\resources-service\\\\reference-data\\\\**\" -ignore \"resources-domain\\\\resources-service\\\\resource-json\\\\**\" -ignore \"**\\\\scripts-dist\\\\**\" -f license-header.tpl .",
"license:add:windows:local": "addlicense -c \"Technology Matters\" -y \"2021-2023\" -ignore .idea\\\\** -ignore node_modules\\\\** -ignore \"**\\\\node_modules\\\\**\" -ignore \"**\\\\dist\\\\**\" -ignore \"**\\\\coverage\\\\**\" -ignore cdk.out\\\\** -ignore \"resources-domain\\\\resources-service\\\\scripts\\\\**\" -ignore \"resources-domain\\\\resources-service\\\\reference-data\\\\**\" -ignore \"resources-domain\\\\resources-service\\\\resource-json\\\\**\" -ignore \"**\\\\scripts-dist\\\\**\" -f license-header.tpl .",
"license:check:windows:local": "addlicense -check -c \"Technology Matters\" -y \"2021-2023\" -ignore .idea\\\\** -ignore node_modules\\\\** -ignore \"**\\\\node_modules\\\\**\" -ignore \"**\\\\dist\\\\**\" -ignore \"**\\\\coverage\\\\**\" -ignore cdk.out\\\\** -ignore \"resources-domain\\\\resources-service\\\\scripts\\\\**\" -ignore \"resources-domain\\\\resources-service\\\\reference-data\\\\**\" -ignore \"resources-domain\\\\resources-service\\\\resource-json\\\\**\" -ignore \"**\\\\scripts-dist\\\\**\" -f license-header.tpl .",
"waiton:db": "wait-on tcp:5432",
"waiton:es": "wait-on http-get://localhost:9200"
}
}