Files
sanderling/cmd/internal-tools/bundle-check/main.go
T
pj 0c775c199d feat(examples): add sample-app spec
Introduce examples/sample-app/spec.ts — a minimal property-based spec that
taps the sample app's "Click me" button and asserts click_count is
monotonic. Bundle-check and the trace writer test now reference the new
path.
2026-04-18 10:33:35 +07:00

31 lines
625 B
Go

package main
import (
"fmt"
"os"
"path/filepath"
"github.com/priyanshujain/uatu/internal/bundler"
)
func main() {
repoRoot, err := os.Getwd()
if err != nil {
fmt.Fprintf(os.Stderr, "getwd: %v\n", err)
os.Exit(1)
}
specApiPath := filepath.Join(repoRoot, "pkg/spec-api/src/index.ts")
result, err := bundler.Bundle(bundler.Options{
EntryFile: "examples/sample-app/spec.ts",
Aliases: map[string]string{
"@uatu/spec": specApiPath,
},
})
if err != nil {
fmt.Fprintf(os.Stderr, "bundle: %v\n", err)
os.Exit(1)
}
fmt.Printf("bundled: %d bytes, sha256=%s\n", len(result.JavaScript), result.SHA256)
}