-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathpackage.json
More file actions
162 lines (162 loc) · 8.87 KB
/
Copy pathpackage.json
File metadata and controls
162 lines (162 loc) · 8.87 KB
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
{
"name": "full-stack-template",
"repository": {
"type": "git",
"url": "git+https://github.com/TaitoUnited/full-stack-template.git"
},
"type": "module",
"scripts": {
"prepare": "if [ \"$taito_mode\" != 'ci' ]; then husky install; fi",
"install-clean": "echo '# Nothing to cleanup'",
"install-ci": "npm-run-all install-all:shared",
"install-dev": "echo '# Installing all libraries on host for code editor support. TODO how to minimize as --only=dev affects devDepencies also?' && npm-run-all install-all",
"install-all": "npm-run-all -c install-all:client install-all:shared install-all:server install-all:worker taito-host-playwright-install",
"install-all:client": "echo client libs... && cd client && mkdir -p node_modules && npm install --no-save || echo WARNING: Some libs failed to install",
"install-all:server": "echo server libs... && cd server && mkdir -p node_modules && npm install --no-save || echo WARNING: Some libs failed to install",
"install-all:shared": "echo shared libs... && cd shared && mkdir -p node_modules && npm install --no-save || echo WARNING: Some libs failed to install",
"install-all:worker": "echo worker libs... && cd worker && mkdir -p node_modules && npm install --no-save || echo WARNING: Some libs failed to install",
"import-db-data": "if [ -f ./database/data/${taito_env}.sql ]; then taito ${taito_options} db import:${taito_env} ./database/data/${taito_env}.sql; fi",
"clean:storage": "if [ ${taito_env} = 'local' ] && [ -d storage ]; then echo Cleaning storage; rm -rf ./storage/bucket/*; rm -rf ./storage/.minio.sys/buckets/bucket/*/; fi",
"taito-host-uikit": "cd client && npm run uikit:preview",
"code-generate": "npm run code-generate:server",
"code-generate:server": "cd server && ./generate-code.sh",
"generate": "npm-run-all generate:server generate:client ",
"generate:client": "if [ ${taito_env} = 'local' ] && [ -f ./client/generate.sh ]; then (cd client && ./generate.sh); else echo Nothing to generate; fi",
"generate:server": "if [ ${taito_env} = 'local' ] && [ -f ./server/generate.sh ]; then (cd server && ./generate.sh); else echo Nothing to generate; fi",
"verify": "npm-run-all -p verify:client verify:server verify:playwright verify:worker",
"verify:client": "npm --prefix client run verify",
"verify:server": "npm --prefix server run verify",
"verify:playwright": "npm --prefix playwright run verify",
"verify:worker": "npm --prefix worker run verify",
"verify:guidance": "node ./scripts/validate-agent-guidance.mjs",
"info:local": "yes | printf '\nUsers:\nadmin@test.com / password\nuser@test.com / password\n'",
"info": "yes | taito ${taito_options} secret show:${taito_env} basic-auth && npm run info:local",
"taito-host-init": "taito -z ${taito_options} init:${taito_env} && taito db deploy && npm-run-all import-db-data generate",
"taito-host-init:clean": "taito -z ${taito_options} init:${taito_env} --clean && taito db deploy && npm-run-all import-db-data clean:storage generate ",
"taito-host-lint": "echo Running lint locally && npm-run-all -p -c taito-host-lint:client taito-host-lint:server taito-host-lint:worker",
"taito-host-lint:client": "cd client && npm-run-all lint typecheck",
"taito-host-lint:server": "cd server && npm-run-all lint typecheck",
"taito-host-lint:worker": "cd worker && npm-run-all lint typecheck",
"taito-host-test-unit": "echo Running unit tests locally && npm-run-all -p -c taito-host-test-unit:client taito-host-test-unit:server taito-host-test-unit:worker",
"taito-host-test-unit:client": "cd client && npm-run-all 'test:unit {@}' --",
"taito-host-test-unit:server": "cd server && npm-run-all 'test:unit {@}' --",
"taito-host-test-unit:worker": "cd worker && npm-run-all 'test:unit {@}' --",
"taito-host-db-deploy": "if [ ${taito_env} = 'local' ]; then docker exec ${taito_project}-server sh -c 'npm run db:migrate && npm run db:seed'; else docker compose -f docker-compose-cicd.yaml run --rm ${taito_project}-server-cicd sh -c 'echo Sleeping... && sleep 30 && echo Done sleeping && npm run db:migrate:ci && npm run db:seed:ci'; fi",
"test": "npm-run-all test:server test:playwright",
"test:server": "taito ${taito_options} util test:server:${taito_target_env}",
"test:playwright": "if [ \"$taito_mode\" != 'ci' ]; then npm run taito-host-playwright; else taito ${taito_options} util test:playwright:${taito_target_env}; fi",
"taito-host-playwright-install": "echo playwright libs... && cd playwright && mkdir -p node_modules && npm install --no-save && npx playwright install || echo WARNING: Some libs failed to install",
"taito-host-playwright": "npm-run-all taito-host-playwright:client",
"taito-host-playwright:client": "cd playwright && TEST_USER_PASSWORD=$test_all_TEST_USER_PASSWORD npm-run-all playwright:test",
"taito-host-playwright-debug": "npm-run-all taito-host-playwright-debug:client",
"taito-host-playwright-debug:client": "cd playwright && TEST_USER_PASSWORD=$test_all_TEST_USER_PASSWORD npm-run-all playwright:debug",
"taito-host-playwright-ui": "cd playwright && TEST_USER_PASSWORD=$test_all_TEST_USER_PASSWORD npm-run-all playwright:ui",
"code-check": "docker run --interactive --tty --rm --env CODECLIMATE_CODE=\"$PWD\" --volume \"$PWD\":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate engines:install && docker run --interactive --tty --rm --env CODECLIMATE_CODE=\"$PWD\" --volume \"$PWD\":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze",
"taito-host-code-check": "npm-run-all code-check",
"_dep-check_comment": "TODO how to pass -u argument from dep-check to dep-check:TARGET?",
"dep-check": "npm run \"dep-check:root {@}\" \"dep-check:client {@}\" \"dep-check:server {@}\" \"dep-check:worker {@}\" -- ",
"dep-check:root": "npm run _dep-check-script -- . ",
"dep-check:client": "npm run _dep-check-script -- client ",
"dep-check:server": "npm run _dep-check-script -- server ",
"dep-check:worker": "npm run _dep-check-script -- worker ",
"_dep-check-script": "sh -c 'echo --- ${0} --- && cd ${0} && (npm-check ${@} || :) && echo && echo \"NOTE: Many of the devDependencies and ~ references are actually in use even if reported unused. But all unused dependencies can usually be removed from package.json.\" && echo' ",
"size-check": "npm run \"size-check:client {@}\" -- ",
"size-check:client": "cd client && echo --- client --- && npm run analyze -- ",
"project-show": "cat PROJECT.md | sed -n -e '/^## Contacts.*$/,/^#.*$/{ /^## Contacts.*$/d; /^#.*$/d; p; }'",
"precommit:branch": "if git-branch-is -q test || git-branch-is -q uat || git-branch-is -q qa || git-branch-is -q stag || git-branch-is -q canary || git-branch-is -q cana || git-branch-is -q prod || git-branch-is -q master; then echo 'ERROR: You cannot commit changes directly to this environment branch. Only fast-forward merge is allowed.' && echo && exit 1; fi",
"husky:commit-msg": "commitlint --edit",
"husky:pre-commit": "if [ \"$taito_mode\" != 'ci' ]; then npm-run-all precommit:branch; fi",
"release-pre:prod": "semantic-release --dry-run",
"release-post:prod": "semantic-release --no-ci"
},
"devDependencies": {
"@commitlint/cli": "17.6.6",
"@commitlint/config-conventional": "17.6.6",
"git-branch-is": "4.0.0",
"husky": "8.0.3",
"npm-run-all": "4.1.5",
"oxlint-tsgolint": "7.0.2001",
"semantic-release": "21.0.6"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
],
"rules": {
"type-enum": [
2,
"always",
[
"wip",
"feat",
"fix",
"docs",
"style",
"refactor",
"perf",
"test",
"revert",
"build",
"ci",
"chore"
]
]
}
},
"release": {
"npmPublish": false,
"analyzeCommits": {
"preset": "angular",
"releaseRules": [
{
"type": "feat",
"release": "minor"
},
{
"type": "fix",
"release": "patch"
},
{
"type": "docs",
"release": "patch"
},
{
"type": "style",
"release": "patch"
},
{
"type": "refactor",
"release": "patch"
},
{
"type": "perf",
"release": "patch"
},
{
"type": "test",
"release": "patch"
},
{
"type": "revert",
"release": "patch"
},
{
"type": "build",
"release": "patch"
},
{
"type": "ci",
"release": "patch"
},
{
"type": "chore",
"release": "patch"
}
]
}
},
"engines": {
"node": ">=24",
"npm": ">=10"
}
}