-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmise.toml
More file actions
177 lines (152 loc) · 4.23 KB
/
Copy pathmise.toml
File metadata and controls
177 lines (152 loc) · 4.23 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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
min_version = "2026.6.10"
[tools]
"aqua:dahlia/hongdown" = "0.4.3"
"github:nushell/nushell" = "0.114.1"
node = "26"
"npm:oxlint" = "1.75.0"
"npm:oxlint-tsgolint" = "7.0.2001"
"npm:pglite-cli" = "0.0.1"
oxfmt = "0.55.0"
pnpm = "11"
[deps.pnpm]
auto = true
[hooks]
postinstall = ["mise deps", "mise generate git-pre-commit --task check --write"]
[tasks.build]
description = "Build the project"
depends = ["build:web"]
silent = "stdout"
[tasks."build:server"]
description = "Build the project except web"
run = "pnpm --parallel -F @drfed/graphql -F @drfed/models -F @drfed/drfed build"
silent = "stdout"
[tasks."build:web"]
description = "Build SolidStart frontend server"
depends = [
{ task = "generate:graphql-schema", args = [
"--output-file",
"packages/web/schema.graphql",
] },
]
dir = "./packages/web"
run = "pnpm exec relay-compiler --noWatchman && pnpm run build"
[tasks.check]
description = "Check all"
depends = ["check:*"]
[tasks."check:types"]
description = "Check TypeScript types"
run = "pnpm --recursive exec tsc --noEmit"
[tasks."check:lint"]
description = "Check linting"
run = "oxlint"
[tasks."check:fmt"]
description = "Check formatting"
run = "oxfmt --check"
[tasks."check:fmt:docs"]
description = "Check Markdown formatting"
run = "hongdown --check"
[tasks."check:fmt:mise"]
description = "Check mise.toml formatting"
run = "mise fmt --check"
[tasks."check:license"]
description = "Check the license comments of files in the whole codebase."
run = """
#!/usr/bin/env nu
node scripts/add-license/main.mts --check
"""
[tasks."check:versions"]
description = "Check that all package versions are in sync"
run = "node scripts/check-versions.mts"
[tasks.fmt]
description = "Format files"
depends = ["fmt:*"]
run = "oxfmt --write"
[tasks."fmt:docs"]
description = "Format Markdown documents"
run = "hongdown --write"
[tasks."fmt:mise"]
description = "Format mise.toml"
run = "mise fmt"
[tasks."fmt:license"]
description = "Add license comments to the files that don't have them."
run = """
#!/usr/bin/env nu
node scripts/add-license/main.mts
"""
[tasks.test]
description = "Run tests"
depends = ["build"]
usage = '''
flag "-d --debug" help="Run tests in debug mode"
'''
run = '''
#!/usr/bin/env nu
if "usage_debug" in $env {
$env.LOGTAPE_TEST_MODE = "always"
$env.LOGTAPE_TEST_LOWEST_LEVEL = "trace"
} else {
$env.LOGTAPE_TEST_MODE = "on-failure"
$env.LOGTAPE_TEST_LOWEST_LEVEL = "debug"
}
pnpm run --parallel --recursive test
'''
[tasks.bump]
description = "Bump all package versions"
usage = """
arg "<version>" help="New version number"
"""
run = """
#!/usr/bin/env nu
node scripts/bump-versions.mts $env.usage_version
"""
[tasks."generate:migrate"]
description = "Generate database migration files"
usage = """
flag "--name <name>" help="Migration file name"
flag "--custom" help="Prepare empty migration file for custom SQL"
"""
dir = "packages/models"
run = """
#!/usr/bin/env nu
let name = (if "usage_name" in $env { ["--name" $env.usage_name] } else { [] })
let custom = (if "usage_custom" in $env { ["--custom"] } else { [] })
pnpm exec drizzle-kit generate ...$name ...$custom
"""
depends_post = ["fmt"]
[tasks."generate:graphql-schema"]
description = "Generate GraphQL schema"
usage = """
flag "-o --output-file <file>" help="The output file for the generated GraphQL schema. - for stdout. Defaults to -"
"""
depends = ["build:server"]
run = """
#!/usr/bin/env nu
let output_file = (if "usage_output_file" in $env { $env.usage_output_file } else { "-" })
node packages/drfed/bin/drfed-server.mjs --generate-graphql-schema --output-file $output_file
"""
[tasks.dev]
description = "Run the development server"
usage = '''
flag "-L --log-level <level>" {
choices "trace" "debug" "info" "warn" "error" "fatal"
default "debug"
help "Set log level"
}
flag "--log-output <path>" help="Write logs to a file"
flag "-S --no-seed" help="Skip database seeding"
'''
run = "node scripts/dev.mts"
[tasks."dev:web"]
raw_args = true
description = "Run SolidStart frontend server"
dir = "./packages/web"
run = """
#!/usr/bin/env nu
mise run generate:graphql-schema --output-file ./packages/web/schema.graphql
pnpm run dev
"""
[tasks."drfed-server"]
description = "Invoke drfed-server command"
depends = ["build"]
raw_args = true
run = "node packages/drfed/bin/drfed-server.mjs"