-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
134 lines (112 loc) · 4.76 KB
/
Copy pathTaskfile.yml
File metadata and controls
134 lines (112 loc) · 4.76 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
# https://taskfile.dev — CloakCode task runner.
#
# One home for the build / package / run flows so the dev container, your WSL
# host, and CI never drift. `task` (or `task --list`) shows everything; pass args
# to a wrapped script after `--` (e.g. `task gateway:run -- --tunnel`).
#
# Docker is NOT in the dev container, so `task docker:gateway` is meant to run
# from your WSL/host (it needs only the repo + Docker). Everything else runs in
# the dev container.
version: "3"
vars:
GATEWAY_DIST: "{{.TASKFILE_DIR}}/dist/gateway"
EXT_DIST: "{{.TASKFILE_DIR}}/dist/extension"
tasks:
default:
desc: List every task.
cmds:
- task --list
silent: true
# ── deps & quality gates ────────────────────────────────────────────────
install:
desc: Install workspace deps (pnpm, frozen lockfile).
cmds:
- pnpm install --frozen-lockfile
build:
desc: "① Build all packages (topological)."
cmds:
- pnpm -r build
test:
desc: Run all tests (Vitest).
cmds:
- pnpm -r test
test:coverage:
desc: Run all tests with the coverage gate (85% stmts/lines/funcs, 75% branches).
cmds:
- pnpm -r test:coverage
lint:
desc: Lint all packages (ESLint).
cmds:
- pnpm -r lint
typecheck:
desc: Type-check all packages (tsc --noEmit).
cmds:
- pnpm -r typecheck
check:
desc: Full TS gate — typecheck + lint + test (the Definition of Done).
cmds:
- pnpm -r typecheck
- pnpm -r lint
- pnpm -r test
check:py:
desc: Python gate for research/ — ruff + mypy (needs Poetry).
cmds:
- poetry run ruff check .
- poetry run mypy research
# ── package ─────────────────────────────────────────────────────────────
package:
desc: "② Build AND package everything — extension .vsix + assembled gateway."
cmds:
- task: package:extension
- task: package:gateway
package:extension:
desc: "③ Build + package the extension → dist/extension/ (cloakcode-<v>.vsix + install.sh / uninstall.sh)."
cmds:
- pnpm --filter @cloakcode/extension package
package:gateway:
desc: "④ Build + package the gateway → dist/gateway/ (main.mjs + web/ + run.sh), copy-ready."
cmds:
- pnpm --filter @cloakcode/gateway assemble
docker:gateway:
desc: "⑤ Build (+ smoke-test) the gateway Docker image. Needs Docker — run from WSL/host, NOT the dev container. Args after -- (e.g. build, --no-cache)."
cmds:
- bash scripts/docker-gateway.sh {{.CLI_ARGS}}
# ── run ─────────────────────────────────────────────────────────────────
gateway:dev:
desc: "⑥ Build + run the dev gateway. Options after --: --devtunnel, --mfa, --bind <address>, --port <number>, --tls-host <address>, --tls-port <number>, --insecure-provider, --log-level <level>, --instance-id <id>, --help."
cmds:
- bash scripts/gateway-dev.sh {{.CLI_ARGS}}
gateway:run:
desc: "⑦ Run the assembled gateway (from ④) via its run.sh. Flags after -- (e.g. task gateway:run -- --tunnel)."
deps:
- package:gateway
cmds:
- bash "{{.GATEWAY_DIST}}/run.sh" {{.CLI_ARGS}}
extension:install:
desc: "⑧ Package (③) then install the .vsix into VS Code (runs dist/extension/install.sh). CODE_BIN overrides the editor CLI."
deps:
- package:extension
cmds:
- bash "{{.EXT_DIST}}/install.sh"
extension:uninstall:
desc: "⑨ Uninstall the extension + its Copilot hook (runs dist/extension/uninstall.sh from ③). Pass --keep-hook after --."
cmds:
- bash "{{.EXT_DIST}}/uninstall.sh" {{.CLI_ARGS}}
playground:
desc: "⑩ Run the UI playground (Vite) — the real PWA against an in-browser fake bridge."
cmds:
- pnpm --filter @cloakcode/web-playground dev
# ── extra dev flows ─────────────────────────────────────────────────────
web:dev:
desc: Run the PWA dev server (Vite).
cmds:
- pnpm --filter @cloakcode/web dev
extension:dev:
desc: Run the bridge dev harness (dev-server.ts — the bridge with no extension host).
cmds:
- pnpm --filter @cloakcode/extension dev
clean:
desc: Remove build artifacts (dist/, package dist/, stray .vsix + install scripts).
cmds:
- rm -rf dist packages/*/dist
- rm -f packages/extension/*.vsix packages/extension/install.sh packages/extension/uninstall.sh