@akiojin/gwt 9.0.4 → 9.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.ja.md +106 -146
  2. package/README.md +103 -143
  3. package/bin/gwt.cjs +1 -1
  4. package/package.json +5 -5
  5. package/rustfmt.toml +0 -2
  6. package/scripts/check-release-flow.sh +2 -8
  7. package/scripts/postinstall.js +17 -7
  8. package/scripts/run-local-backend-tests-on-commit.sh +6 -12
  9. package/scripts/test-all.sh +1 -5
  10. package/scripts/check-e2e-coverage-threshold.mjs +0 -238
  11. package/scripts/run-local-e2e-coverage-on-commit.sh +0 -69
  12. package/scripts/run-local-e2e-on-commit.sh +0 -60
  13. package/scripts/verify-ci-node-toolchain.sh +0 -76
  14. package/scripts/voice-eval.sh +0 -48
  15. package/vendor/ratatui-core/src/backend/test.rs +0 -1077
  16. package/vendor/ratatui-core/src/backend.rs +0 -405
  17. package/vendor/ratatui-core/src/buffer/assert.rs +0 -71
  18. package/vendor/ratatui-core/src/buffer/buffer.rs +0 -1388
  19. package/vendor/ratatui-core/src/buffer/cell.rs +0 -377
  20. package/vendor/ratatui-core/src/buffer.rs +0 -9
  21. package/vendor/ratatui-core/src/layout/alignment.rs +0 -89
  22. package/vendor/ratatui-core/src/layout/constraint.rs +0 -526
  23. package/vendor/ratatui-core/src/layout/direction.rs +0 -63
  24. package/vendor/ratatui-core/src/layout/flex.rs +0 -212
  25. package/vendor/ratatui-core/src/layout/layout.rs +0 -2838
  26. package/vendor/ratatui-core/src/layout/margin.rs +0 -79
  27. package/vendor/ratatui-core/src/layout/offset.rs +0 -66
  28. package/vendor/ratatui-core/src/layout/position.rs +0 -253
  29. package/vendor/ratatui-core/src/layout/rect/iter.rs +0 -356
  30. package/vendor/ratatui-core/src/layout/rect/ops.rs +0 -136
  31. package/vendor/ratatui-core/src/layout/rect.rs +0 -1114
  32. package/vendor/ratatui-core/src/layout/size.rs +0 -147
  33. package/vendor/ratatui-core/src/layout.rs +0 -333
  34. package/vendor/ratatui-core/src/lib.rs +0 -82
  35. package/vendor/ratatui-core/src/style/anstyle.rs +0 -348
  36. package/vendor/ratatui-core/src/style/color.rs +0 -788
  37. package/vendor/ratatui-core/src/style/palette/material.rs +0 -608
  38. package/vendor/ratatui-core/src/style/palette/tailwind.rs +0 -653
  39. package/vendor/ratatui-core/src/style/palette.rs +0 -6
  40. package/vendor/ratatui-core/src/style/palette_conversion.rs +0 -82
  41. package/vendor/ratatui-core/src/style/stylize.rs +0 -668
  42. package/vendor/ratatui-core/src/style.rs +0 -1069
  43. package/vendor/ratatui-core/src/symbols/bar.rs +0 -51
  44. package/vendor/ratatui-core/src/symbols/block.rs +0 -51
  45. package/vendor/ratatui-core/src/symbols/border.rs +0 -709
  46. package/vendor/ratatui-core/src/symbols/braille.rs +0 -21
  47. package/vendor/ratatui-core/src/symbols/half_block.rs +0 -3
  48. package/vendor/ratatui-core/src/symbols/line.rs +0 -259
  49. package/vendor/ratatui-core/src/symbols/marker.rs +0 -82
  50. package/vendor/ratatui-core/src/symbols/merge.rs +0 -748
  51. package/vendor/ratatui-core/src/symbols/pixel.rs +0 -30
  52. package/vendor/ratatui-core/src/symbols/scrollbar.rs +0 -46
  53. package/vendor/ratatui-core/src/symbols/shade.rs +0 -5
  54. package/vendor/ratatui-core/src/symbols.rs +0 -15
  55. package/vendor/ratatui-core/src/terminal/frame.rs +0 -192
  56. package/vendor/ratatui-core/src/terminal/terminal.rs +0 -926
  57. package/vendor/ratatui-core/src/terminal/viewport.rs +0 -58
  58. package/vendor/ratatui-core/src/terminal.rs +0 -40
  59. package/vendor/ratatui-core/src/text/grapheme.rs +0 -84
  60. package/vendor/ratatui-core/src/text/line.rs +0 -1678
  61. package/vendor/ratatui-core/src/text/masked.rs +0 -149
  62. package/vendor/ratatui-core/src/text/span.rs +0 -904
  63. package/vendor/ratatui-core/src/text/text.rs +0 -1434
  64. package/vendor/ratatui-core/src/text.rs +0 -64
  65. package/vendor/ratatui-core/src/widgets/stateful_widget.rs +0 -193
  66. package/vendor/ratatui-core/src/widgets/widget.rs +0 -174
  67. package/vendor/ratatui-core/src/widgets.rs +0 -9
@@ -2,19 +2,13 @@
2
2
  set -euo pipefail
3
3
 
4
4
  ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5
- PREPARE="$ROOT/.github/workflows/prepare-release.yml"
6
5
  RELEASE="$ROOT/.github/workflows/release.yml"
7
6
  README_EN="$ROOT/README.md"
8
7
  README_JA="$ROOT/README.ja.md"
9
8
 
10
9
  fail=0
11
10
 
12
- if ! rg -q "Sync main into develop" "$PREPARE"; then
13
- echo "[FAIL] prepare-release.yml missing 'Sync main into develop' step"
14
- fail=1
15
- fi
16
-
17
- if rg -q "sync-develop" "$RELEASE"; then
11
+ if grep -q "sync-develop" "$RELEASE"; then
18
12
  echo "[FAIL] release.yml still contains sync-develop job"
19
13
  fail=1
20
14
  fi
@@ -24,7 +18,7 @@ if [ -f "$ROOT/docs/release-guide.md" ] || [ -f "$ROOT/docs/release-guide.ja.md"
24
18
  fail=1
25
19
  fi
26
20
 
27
- if rg -q "release-guide" "$README_EN" "$README_JA"; then
21
+ if grep -q "release-guide" "$README_EN" "$README_JA"; then
28
22
  echo "[FAIL] README still references release-guide"
29
23
  fail=1
30
24
  fi
@@ -8,7 +8,7 @@ const https = require("https");
8
8
 
9
9
  const REPO = "akiojin/gwt";
10
10
  const BIN_DIR = path.join(__dirname, "..", "bin");
11
- const BINARY_NAME = os.platform() === "win32" ? "gwt-tui.exe" : "gwt-tui";
11
+ const BINARY_NAME = os.platform() === "win32" ? "gwt.exe" : "gwt";
12
12
 
13
13
  /**
14
14
  * Detect the GitHub Release asset name for the current platform/arch.
@@ -18,11 +18,21 @@ function releaseAssetName() {
18
18
  const platform = os.platform();
19
19
  const arch = os.arch();
20
20
 
21
- if (platform === "darwin" && arch === "arm64") return "gwt-macos-aarch64";
22
- if (platform === "darwin" && arch === "x64") return "gwt-macos-x86_64";
23
- if (platform === "linux" && arch === "x64") return "gwt-linux-x86_64";
24
- if (platform === "linux" && arch === "arm64") return "gwt-linux-aarch64";
25
- if (platform === "win32" && arch === "x64") return "gwt-windows-x86_64.exe";
21
+ if (platform === "darwin" && arch === "arm64") {
22
+ return "gwt-macos-aarch64";
23
+ }
24
+ if (platform === "darwin" && arch === "x64") {
25
+ return "gwt-macos-x86_64";
26
+ }
27
+ if (platform === "linux" && arch === "x64") {
28
+ return "gwt-linux-x86_64";
29
+ }
30
+ if (platform === "linux" && arch === "arm64") {
31
+ return "gwt-linux-aarch64";
32
+ }
33
+ if (platform === "win32" && arch === "x64") {
34
+ return "gwt-windows-x86_64.exe";
35
+ }
26
36
 
27
37
  throw new Error(`Unsupported platform: ${platform}-${arch}`);
28
38
  }
@@ -97,7 +107,7 @@ async function main() {
97
107
  console.log(`gwt binary installed successfully!`);
98
108
  } catch (err) {
99
109
  console.error(`gwt: failed to download binary - ${err.message}`);
100
- console.error("gwt: you can build from source with: cargo build --release -p gwt-tui");
110
+ console.error("gwt: you can build from source with: cargo build --release -p gwt");
101
111
  process.exitCode = 0; // non-fatal so npm install does not fail
102
112
  }
103
113
  }
@@ -1,15 +1,9 @@
1
1
  #!/usr/bin/env bash
2
-
3
2
  set -euo pipefail
4
3
 
5
- ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
6
-
7
- echo "Running commit-time backend tests..."
8
-
9
- (
10
- cd "$ROOT_DIR"
11
- cargo test -p gwt-tui commands::branches::tests:: -- --nocapture
12
- cargo test -p gwt-tui commands::project::tests:: -- --nocapture
13
- )
14
-
15
- echo "Commit-time backend tests passed."
4
+ # Pre-commit: fast, non-IO-bound tests only.
5
+ # Coordination/board/persistence tests share state with running gwt and may
6
+ # fail when the app is active. Full suite runs in pre-push / CI.
7
+ cargo test -p gwt-core -- \
8
+ --skip coordination \
9
+ --skip repo_hash::tests::detect_repo_hash
@@ -1,13 +1,9 @@
1
1
  #!/usr/bin/env bash
2
2
  set -euo pipefail
3
3
 
4
- cargo test -p gwt-core -p gwt-tauri --all-features &
4
+ cargo test -p gwt-core -p gwt --all-features &
5
5
  pid_rust=$!
6
6
 
7
- (cd gwt-gui && pnpm test) &
8
- pid_vitest=$!
9
-
10
7
  fail=0
11
8
  wait $pid_rust || fail=1
12
- wait $pid_vitest || fail=1
13
9
  exit $fail
@@ -1,238 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import fs from "node:fs";
4
- import path from "node:path";
5
- import { fileURLToPath } from "node:url";
6
-
7
- const scriptDir = path.dirname(fileURLToPath(import.meta.url));
8
- const repoRoot = path.resolve(scriptDir, "..");
9
- const guiDir = path.join(repoRoot, "gwt-gui");
10
- const nycrcPath = path.join(guiDir, ".nycrc.e2e.json");
11
- const nycTempDir = path.join(guiDir, ".nyc_output");
12
-
13
- function loadJson(filePath) {
14
- return JSON.parse(fs.readFileSync(filePath, "utf8"));
15
- }
16
-
17
- function clone(value) {
18
- return JSON.parse(JSON.stringify(value));
19
- }
20
-
21
- function mergeCounts(existing, incoming) {
22
- for (const [id, count] of Object.entries(incoming)) {
23
- existing[id] = (existing[id] ?? 0) + Number(count ?? 0);
24
- }
25
- }
26
-
27
- function mergeBranchCounts(existing, incoming) {
28
- for (const [id, counts] of Object.entries(incoming)) {
29
- const nextCounts = Array.isArray(counts) ? counts : [];
30
- const mergedCounts = Array.isArray(existing[id]) ? existing[id] : [];
31
- existing[id] = nextCounts.map(
32
- (count, index) => Number(count ?? 0) + Number(mergedCounts[index] ?? 0),
33
- );
34
- }
35
- }
36
-
37
- function mergeCoverageMaps(jsonFiles) {
38
- const merged = new Map();
39
-
40
- for (const jsonFile of jsonFiles) {
41
- const coverageMap = loadJson(path.join(nycTempDir, jsonFile));
42
- for (const [sourcePath, fileCoverage] of Object.entries(coverageMap)) {
43
- if (!merged.has(sourcePath)) {
44
- merged.set(sourcePath, clone(fileCoverage));
45
- continue;
46
- }
47
-
48
- const target = merged.get(sourcePath);
49
- mergeCounts(target.s, fileCoverage.s ?? {});
50
- mergeCounts(target.f, fileCoverage.f ?? {});
51
- mergeBranchCounts(target.b, fileCoverage.b ?? {});
52
- }
53
- }
54
-
55
- return merged;
56
- }
57
-
58
- function countCovered(counter) {
59
- return Object.values(counter).filter((value) => Number(value) > 0).length;
60
- }
61
-
62
- function getSourceLineCount(filePath) {
63
- try {
64
- return fs.readFileSync(filePath, "utf8").split("\n").length;
65
- } catch {
66
- return Number.POSITIVE_INFINITY;
67
- }
68
- }
69
-
70
- function isThinWrapperFile(filePath) {
71
- return getSourceLineCount(filePath) <= 10;
72
- }
73
-
74
- function summarizeLines(statementMap, statementCounts) {
75
- const lineHits = new Map();
76
- for (const [id, location] of Object.entries(statementMap ?? {})) {
77
- const count = Number(statementCounts?.[id] ?? 0);
78
- const startLine = Number(location?.start?.line ?? 0);
79
- const endLine = Number(location?.end?.line ?? startLine);
80
- for (let line = startLine; line <= endLine; line += 1) {
81
- if (!lineHits.has(line)) {
82
- lineHits.set(line, false);
83
- }
84
- if (count > 0) {
85
- lineHits.set(line, true);
86
- }
87
- }
88
- }
89
-
90
- return {
91
- covered: [...lineHits.values()].filter(Boolean).length,
92
- total: lineHits.size,
93
- };
94
- }
95
-
96
- function summarizeFile(fileCoverage, filePath) {
97
- const statements = {
98
- covered: countCovered(fileCoverage.s ?? {}),
99
- total: Object.keys(fileCoverage.s ?? {}).length,
100
- };
101
-
102
- const thinWrapper = isThinWrapperFile(filePath);
103
-
104
- let functionIds = Object.keys(fileCoverage.f ?? {});
105
- if (thinWrapper) {
106
- functionIds = functionIds.filter((id) => {
107
- const name = fileCoverage.fnMap?.[id]?.name ?? "";
108
- return !String(name).startsWith("(anonymous_");
109
- });
110
- }
111
- const functions = {
112
- covered: functionIds.filter(
113
- (id) => Number(fileCoverage.f?.[id] ?? 0) > 0,
114
- ).length,
115
- total: functionIds.length,
116
- };
117
-
118
- const branchCounts = thinWrapper ? [] : Object.values(fileCoverage.b ?? {});
119
- const branches = {
120
- covered: branchCounts.flat().filter((value) => Number(value) > 0).length,
121
- total: branchCounts.reduce(
122
- (sum, counts) => sum + (Array.isArray(counts) ? counts.length : 0),
123
- 0,
124
- ),
125
- };
126
-
127
- const lines = summarizeLines(fileCoverage.statementMap, fileCoverage.s);
128
-
129
- return { statements, functions, branches, lines };
130
- }
131
-
132
- function addMetric(target, source) {
133
- target.covered += source.covered;
134
- target.total += source.total;
135
- }
136
-
137
- function formatPercent(metric) {
138
- if (metric.total === 0) return "100.00";
139
- return ((metric.covered / metric.total) * 100).toFixed(2);
140
- }
141
-
142
- function fail(message) {
143
- console.error(message);
144
- process.exit(1);
145
- }
146
-
147
- if (!fs.existsSync(nycrcPath)) {
148
- fail(`Missing E2E nyc config: ${nycrcPath}`);
149
- }
150
-
151
- if (!fs.existsSync(nycTempDir)) {
152
- fail(`Missing E2E coverage temp dir: ${nycTempDir}`);
153
- }
154
-
155
- const nycrc = loadJson(nycrcPath);
156
- const jsonFiles = fs
157
- .readdirSync(nycTempDir)
158
- .filter((file) => file.endsWith(".json"))
159
- .sort();
160
-
161
- if (jsonFiles.length === 0) {
162
- fail(`No E2E coverage JSON files found in ${nycTempDir}`);
163
- }
164
-
165
- const mergedCoverage = mergeCoverageMaps(jsonFiles);
166
- const targetFiles = (nycrc.targetFiles ?? nycrc.include ?? []).map((relativePath) =>
167
- path.resolve(guiDir, relativePath),
168
- );
169
-
170
- const aggregate = {
171
- statements: { covered: 0, total: 0 },
172
- functions: { covered: 0, total: 0 },
173
- branches: { covered: 0, total: 0 },
174
- lines: { covered: 0, total: 0 },
175
- };
176
-
177
- console.log("E2E coverage targets:");
178
- for (const filePath of targetFiles) {
179
- const fileCoverage = mergedCoverage.get(filePath);
180
- const summary = fileCoverage
181
- ? summarizeFile(fileCoverage, filePath)
182
- : {
183
- statements: { covered: 0, total: 0 },
184
- functions: { covered: 0, total: 0 },
185
- branches: { covered: 0, total: 0 },
186
- lines: { covered: 0, total: 0 },
187
- };
188
-
189
- addMetric(aggregate.statements, summary.statements);
190
- addMetric(aggregate.functions, summary.functions);
191
- addMetric(aggregate.branches, summary.branches);
192
- addMetric(aggregate.lines, summary.lines);
193
-
194
- console.log(`- ${path.relative(guiDir, filePath)}`);
195
- console.log(
196
- ` statements ${formatPercent(summary.statements)}% (${summary.statements.covered}/${summary.statements.total})`,
197
- );
198
- console.log(
199
- ` functions ${formatPercent(summary.functions)}% (${summary.functions.covered}/${summary.functions.total})`,
200
- );
201
- console.log(
202
- ` branches ${formatPercent(summary.branches)}% (${summary.branches.covered}/${summary.branches.total})`,
203
- );
204
- console.log(
205
- ` lines ${formatPercent(summary.lines)}% (${summary.lines.covered}/${summary.lines.total})`,
206
- );
207
- }
208
-
209
- console.log("\nAggregate E2E coverage over target shell files:");
210
- for (const metricName of ["statements", "functions", "branches", "lines"]) {
211
- const metric = aggregate[metricName];
212
- console.log(
213
- `- ${metricName}: ${formatPercent(metric)}% (${metric.covered}/${metric.total})`,
214
- );
215
- }
216
-
217
- const thresholds = {
218
- statements: Number(nycrc.statements ?? 0),
219
- functions: Number(nycrc.functions ?? 0),
220
- branches: Number(nycrc.branches ?? 0),
221
- lines: Number(nycrc.lines ?? 0),
222
- };
223
-
224
- const failures = [];
225
- for (const [metricName, threshold] of Object.entries(thresholds)) {
226
- const metric = aggregate[metricName];
227
- const percent =
228
- metric.total === 0 ? 100 : (metric.covered / metric.total) * 100;
229
- if (percent < threshold) {
230
- failures.push(
231
- `${metricName} ${percent.toFixed(2)}% < required ${threshold.toFixed(2)}%`,
232
- );
233
- }
234
- }
235
-
236
- if (failures.length > 0) {
237
- fail(`E2E coverage threshold failed:\n- ${failures.join("\n- ")}`);
238
- }
@@ -1,69 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -euo pipefail
4
-
5
- ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
6
- GUI_DIR="$ROOT_DIR/gwt-gui"
7
-
8
- SUITES=(
9
- "e2e/agent-canvas-browser.spec.ts"
10
- "e2e/agent-terminal.spec.ts"
11
- "e2e/branch-worktree.spec.ts"
12
- "e2e/cleanup-migration.spec.ts"
13
- "e2e/dialogs-common.spec.ts"
14
- "e2e/issue-cache-sync.spec.ts"
15
- "e2e/open-project-smoke.spec.ts"
16
- "e2e/pr-management.spec.ts"
17
- "e2e/project-management.spec.ts"
18
- "e2e/responsive-performance.spec.ts"
19
- "e2e/settings-config.spec.ts"
20
- "e2e/status-bar.spec.ts"
21
- "e2e/top-level-tools.spec.ts"
22
- "e2e/voice-input-settings.spec.ts"
23
- "e2e/web-preview-fallback.spec.ts"
24
- "e2e/windows-shell-selection.spec.ts"
25
- )
26
-
27
- run_playwright_coverage() {
28
- local mode="$1"
29
-
30
- echo "Running commit-time E2E coverage in ${mode} mode..."
31
- (
32
- cd "$GUI_DIR"
33
- rm -rf .nyc_output e2e/.nyc_output coverage-e2e
34
- mkdir -p .nyc_output
35
- if [ "$mode" = "headed" ]; then
36
- E2E_COVERAGE=1 pnpm exec playwright test "${SUITES[@]}" --project=chromium --headed --workers=1
37
- else
38
- E2E_COVERAGE=1 pnpm exec playwright test "${SUITES[@]}" --project=chromium
39
- fi
40
- if ! python3 - <<'EOF'
41
- from pathlib import Path
42
- raise SystemExit(0 if any(Path(".nyc_output").glob("*.json")) else 1)
43
- EOF
44
- then
45
- echo "E2E coverage run did not produce any .nyc_output JSON files." >&2
46
- exit 1
47
- fi
48
- pnpm exec nyc report --nycrc-path .nycrc.e2e.json
49
- node ../scripts/check-e2e-coverage-threshold.mjs
50
- )
51
- }
52
-
53
- headed_possible=1
54
-
55
- if [ -n "${CI:-}" ]; then
56
- headed_possible=0
57
- fi
58
-
59
- if [ "$(uname -s)" = "Linux" ] && [ -z "${DISPLAY:-}" ] && [ -z "${WAYLAND_DISPLAY:-}" ]; then
60
- headed_possible=0
61
- fi
62
-
63
- if [ "$headed_possible" -eq 1 ]; then
64
- run_playwright_coverage headed
65
- exit 0
66
- fi
67
-
68
- echo "Headed Playwright coverage unavailable in this environment; using headless mode."
69
- run_playwright_coverage headless
@@ -1,60 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -euo pipefail
4
-
5
- ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
6
- GUI_DIR="$ROOT_DIR/gwt-gui"
7
-
8
- # Keep commit-time E2E focused on the current shell/UX-critical flows.
9
- SUITES=(
10
- "e2e/agent-canvas-browser.spec.ts"
11
- "e2e/agent-terminal.spec.ts"
12
- "e2e/branch-worktree.spec.ts"
13
- "e2e/cleanup-migration.spec.ts"
14
- "e2e/dialogs-common.spec.ts"
15
- "e2e/issue-cache-sync.spec.ts"
16
- "e2e/open-project-smoke.spec.ts"
17
- "e2e/pr-management.spec.ts"
18
- "e2e/project-management.spec.ts"
19
- "e2e/responsive-performance.spec.ts"
20
- "e2e/settings-config.spec.ts"
21
- "e2e/status-bar.spec.ts"
22
- "e2e/top-level-tools.spec.ts"
23
- "e2e/voice-input-settings.spec.ts"
24
- "e2e/web-preview-fallback.spec.ts"
25
- "e2e/windows-shell-selection.spec.ts"
26
- )
27
-
28
- run_playwright() {
29
- local mode="$1"
30
- shift
31
-
32
- echo "Running commit-time E2E in ${mode} mode..."
33
- (
34
- cd "$GUI_DIR"
35
- if [ "$mode" = "headed" ]; then
36
- pnpm exec playwright test "${SUITES[@]}" --project=chromium --headed --workers=1
37
- else
38
- pnpm exec playwright test "${SUITES[@]}" --project=chromium
39
- fi
40
- )
41
- }
42
-
43
- headed_possible=1
44
-
45
- if [ -n "${CI:-}" ]; then
46
- headed_possible=0
47
- fi
48
-
49
- # Linux/X11/Wayland environments without a display cannot run headed.
50
- if [ "$(uname -s)" = "Linux" ] && [ -z "${DISPLAY:-}" ] && [ -z "${WAYLAND_DISPLAY:-}" ]; then
51
- headed_possible=0
52
- fi
53
-
54
- if [ "$headed_possible" -eq 1 ]; then
55
- run_playwright headed
56
- exit 0
57
- fi
58
-
59
- echo "Headed Playwright unavailable in this environment; using headless mode."
60
- run_playwright headless
@@ -1,76 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -euo pipefail
4
-
5
- ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
6
-
7
- fail() {
8
- echo "CI node toolchain verification failed: $1" >&2
9
- exit 1
10
- }
11
-
12
- require_file() {
13
- if [ ! -f "$1" ]; then
14
- fail "Missing file: $1"
15
- fi
16
- }
17
-
18
- require_not_file() {
19
- if [ -f "$1" ]; then
20
- fail "Unexpected file exists: $1"
21
- fi
22
- }
23
-
24
- require_contains() {
25
- local file="$1"
26
- local pattern="$2"
27
- if ! grep -Fq "$pattern" "$file"; then
28
- fail "Expected pattern not found in $file: $pattern"
29
- fi
30
- }
31
-
32
- require_not_contains() {
33
- local file="$1"
34
- local pattern="$2"
35
- if grep -Fq "$pattern" "$file"; then
36
- fail "Unexpected pattern found in $file: $pattern"
37
- fi
38
- }
39
-
40
- require_file "$ROOT_DIR/pnpm-lock.yaml"
41
- require_not_file "$ROOT_DIR/package-lock.json"
42
- require_file "$ROOT_DIR/package.json"
43
-
44
- require_contains "$ROOT_DIR/package.json" "\"packageManager\": \"pnpm@10.29.2\""
45
-
46
- require_file "$ROOT_DIR/gwt-gui/package.json"
47
- require_contains "$ROOT_DIR/gwt-gui/package.json" "\"packageManager\": \"pnpm@10.29.2\""
48
- require_file "$ROOT_DIR/gwt-gui/pnpm-lock.yaml"
49
- require_not_file "$ROOT_DIR/gwt-gui/package-lock.json"
50
- require_contains "$ROOT_DIR/.gitignore" "gwt-gui/package-lock.json"
51
-
52
- WORKFLOW="$ROOT_DIR/.github/workflows/lint.yml"
53
- require_file "$WORKFLOW"
54
-
55
- require_not_contains "$WORKFLOW" "npm install -g"
56
- require_contains "$WORKFLOW" "corepack prepare pnpm@10.29.2 --activate"
57
- require_contains "$WORKFLOW" "pnpm lint:skills"
58
- require_contains "$WORKFLOW" "pnpm dlx @commitlint/cli@20.4.1"
59
-
60
- TEST_WORKFLOW="$ROOT_DIR/.github/workflows/test.yml"
61
- require_file "$TEST_WORKFLOW"
62
-
63
- require_not_contains "$TEST_WORKFLOW" "cd gwt-gui && npm ci"
64
- require_not_contains "$TEST_WORKFLOW" "cd gwt-gui && npm run check"
65
- require_not_contains "$TEST_WORKFLOW" "cd gwt-gui && npm run build"
66
- require_contains "$TEST_WORKFLOW" "cd gwt-gui && pnpm install --frozen-lockfile"
67
- require_contains "$TEST_WORKFLOW" "cd gwt-gui && pnpm run check"
68
- require_contains "$TEST_WORKFLOW" "cd gwt-gui && pnpm run build"
69
-
70
- RELEASE_WORKFLOW="$ROOT_DIR/.github/workflows/release.yml"
71
- require_file "$RELEASE_WORKFLOW"
72
-
73
- require_not_contains "$RELEASE_WORKFLOW" "cd gwt-gui && npm ci"
74
- require_contains "$RELEASE_WORKFLOW" "cd gwt-gui && pnpm install --frozen-lockfile"
75
-
76
- echo "CI node toolchain verification passed."
@@ -1,48 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
-
4
- ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5
- MANIFEST_PATH="${GWT_VOICE_EVAL_MANIFEST:-$ROOT_DIR/tests/voice_eval/manifest.json}"
6
- OUTPUT_PATH="${GWT_VOICE_EVAL_OUTPUT:-$ROOT_DIR/tests/voice_eval/latest-report.json}"
7
- BASELINE_PATH="${GWT_VOICE_EVAL_BASELINE:-$ROOT_DIR/tests/voice_eval/baseline.json}"
8
- QUALITIES="${GWT_VOICE_EVAL_QUALITIES:-fast,balanced,accurate}"
9
- MODELS="${GWT_VOICE_EVAL_MODELS:-}"
10
-
11
- if [[ ! -f "$MANIFEST_PATH" ]]; then
12
- echo "voice-eval: manifest not found: $MANIFEST_PATH" >&2
13
- echo "Create one from: $ROOT_DIR/tests/voice_eval/manifest.template.json" >&2
14
- exit 1
15
- fi
16
-
17
- EXTRA_ARGS=()
18
- if [[ -f "$BASELINE_PATH" ]]; then
19
- EXTRA_ARGS+=(--baseline "$BASELINE_PATH")
20
- fi
21
-
22
- echo "[voice-eval] manifest: $MANIFEST_PATH"
23
- echo "[voice-eval] output: $OUTPUT_PATH"
24
- echo "[voice-eval] qualities: $QUALITIES"
25
- if [[ -n "$MODELS" ]]; then
26
- echo "[voice-eval] models: $MODELS"
27
- fi
28
-
29
- CMD=(
30
- cargo run -p gwt-tauri --bin voice_eval --
31
- --manifest "$MANIFEST_PATH"
32
- --output "$OUTPUT_PATH"
33
- )
34
-
35
- if [[ -n "$QUALITIES" ]]; then
36
- CMD+=(--qualities "$QUALITIES")
37
- fi
38
- if [[ -n "$MODELS" ]]; then
39
- CMD+=(--models "$MODELS")
40
- fi
41
- if [[ ${#EXTRA_ARGS[@]} -gt 0 ]]; then
42
- CMD+=("${EXTRA_ARGS[@]}")
43
- fi
44
- if [[ $# -gt 0 ]]; then
45
- CMD+=("$@")
46
- fi
47
-
48
- "${CMD[@]}"