-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmise.dev.toml
More file actions
111 lines (100 loc) · 4.32 KB
/
Copy pathmise.dev.toml
File metadata and controls
111 lines (100 loc) · 4.32 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
# Developer-specific mise configuration (e2e tools, tasks)
# Load with: MISE_ENV=dev mise install
# Or set permanently: export MISE_ENV=dev in your shell rc file
#
# For human-only tools (Claude, gh, cloudflared), also add: MISE_ENV=dev,human
#
# Note: Node.js is now in base mise.toml since it's needed for e2e tests in all environments
#
# Task Configuration:
# - Each task can have a 'description' (short summary)
# - Tasks with arguments use 'usage' field with KDL syntax for arg/flag definitions
# - Arguments become available as $usage_<name> env vars (e.g., $usage_url)
# - For complex tasks, consider using file-tasks in .mise/tasks/ for better editing
# Docs: https://mise.jdx.dev/tasks/task-arguments.html
# https://mise.jdx.dev/tasks/file-tasks.html
[tools]
watchexec = "2.5.1"
buf = "1.70.0"
# --- Protobuf / OpenAPI (API contract is proto-first; see proto/README.md) ---
# buf and api-linter live here for local dev. CI runs the equivalent checks in
# the `proto` job (buf-action + api-linter via go install), so these versions
# are pinned to match CI. Move both to base mise.toml if the toolchain is ever
# needed by base (non-dev) tasks.
"github:googleapis/api-linter" = "2.3.1"
[tasks."proto:lint"]
description = "Lint the protobuf API contract (buf STANDARD ruleset)"
dir = "proto"
run = "buf lint"
[tasks."proto:format"]
description = "Format protobuf files in place"
dir = "proto"
run = "buf format -w"
[tasks."proto:dep-update"]
description = "Refresh buf.lock from BSR dependencies (googleapis)"
dir = "proto"
run = "buf dep update"
[tasks."proto:generate"]
description = "Generate OpenAPI spec from the proto contract via BSR remote plugin"
dir = "proto"
run = "buf generate"
[tasks."proto:clients"]
description = "Generate Worker TS types and Flutter Dart client from OpenAPI spec"
depends = ["proto:clients:types", "proto:clients:dart"]
[tasks."proto:clients:types"]
description = "Generate TypeScript types for the Cloudflare Worker from OpenAPI"
run = """
npx --prefix cloudflare-worker openapi-typescript \
docs/code/api/openapi/openapi.yaml \
-o cloudflare-worker/src/api-types.ts
"""
[tasks."proto:clients:dart"]
description = "Generate Dart/Dio client for Flutter from OpenAPI (requires Java)"
env = { OPENAPI_GENERATOR_JAR = "${HOME}/.cache/openapi-generator/openapi-generator-cli-7.13.0.jar" }
run = """
mkdir -p "${HOME}/.cache/openapi-generator"
if [ ! -f "${OPENAPI_GENERATOR_JAR}" ]; then
echo "Downloading openapi-generator-cli 7.13.0..."
curl -sSfL \
"https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.13.0/openapi-generator-cli-7.13.0.jar" \
-o "${OPENAPI_GENERATOR_JAR}"
fi
java -jar "${OPENAPI_GENERATOR_JAR}" generate \
--input-spec docs/code/api/openapi/openapi.yaml \
--generator-name dart-dio \
--output packages/myfestival_client \
--additional-properties=pubName=myfestival_client,pubAuthor=Cambridge Beer Festival,browserClient=false,nullSafe=true,dateLibrary=core
cd packages/myfestival_client
dart pub get
dart run build_runner build
"""
[tasks."proto:api-lint"]
description = "Lint proto files against Google AIP design guidelines (googleapis/api-linter)"
dir = "proto"
run = """
buf build -o /tmp/cambeerfestival.pb
api-linter \
--config .api-linter.yaml \
--descriptor-set-in=/tmp/cambeerfestival.pb \
--set-exit-status \
cambeerfestival/festival/v1alpha/festival.proto \
cambeerfestival/festival/v1alpha/producer.proto \
cambeerfestival/festival/v1alpha/drink.proto \
cambeerfestival/festival/v1alpha/catalog_service.proto \
cambeerfestival/festival/v1alpha/drink_entry.proto \
cambeerfestival/festival/v1alpha/drink_summary.proto \
cambeerfestival/festival/v1alpha/my_festival_service.proto
"""
# All tasks moved to mise-tasks/ for better maintainability and shellcheck/shfmt support:
# - dev -> mise-tasks/dev.sh
# - test:e2e -> mise-tasks/test/e2e.sh
# - test:e2e:ui -> mise-tasks/test/e2e/ui.sh
# - test:e2e:headed -> mise-tasks/test/e2e/headed.sh
# - build:web -> mise-tasks/build/web.sh
# - serve:release -> mise-tasks/serve/release.sh
# - test:check-page -> mise-tasks/test/check-page.sh
# - screenshots:batch -> mise-tasks/screenshots/batch.sh
# - setup:tunnel -> mise-tasks/setup/tunnel.sh
# - setup:playwright -> mise-tasks/setup/playwright.sh
# - dev:tunnel -> mise-tasks/dev/tunnel.sh
# - build:web:prod -> mise-tasks/build/web/prod.sh