Luigit
repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by admin

extensions/chrome-cdp/mise.toml

Raw
[tasks.fmt]
description = "Format chrome-cdp extension"
depends = ["//:install"]
run = [
  "biome check --write --config-path ../.. .",
  "rumdl fmt --config ../../.rumdl.toml .",
  "taplo format --config ../../.taplo.toml mise.toml",
]

[tasks.lint]
description = "Lint chrome-cdp extension"
depends = ["//:install"]
run = [
  "biome ci --config-path ../.. .",
  "rumdl check --config ../../.rumdl.toml .",
  "taplo format --check --config ../../.taplo.toml mise.toml",
]

[tasks.test]
description = "Test chrome-cdp extension"
depends = ["//:install"]
run = [
  { task = "//:test", args = ["extensions/chrome-cdp"] },
]

[tasks.check]
description = "Check chrome-cdp extension"
depends = ["//:install"]
run = [
  { task = "//:build", args = ["chrome-cdp"] },
  { task = "//:build-ext", args = ["chrome-cdp"] },
]

[tasks.e2e]
description = "Run real-Chrome acceptance tests (writes browser profiles and captures)"
depends = ["//:install"]
run = "npm exec -- vitest run --config vitest.e2e.config.ts"

[tasks.bench]
description = "Benchmark large CDP response spooling without a browser"
depends = ["//:install"]
usage = '''
arg "[samples]" default="30"
arg "[mode]" default="batch"
'''
run = "node --no-warnings --experimental-strip-types __bench__/spool.bench.ts {{ usage.samples }} {{ usage.mode }}"

[tasks.profile]
description = "Profile large CDP response spooling with Node CPU profiler"
depends = ["//:install"]
run = "node --cpu-prof --cpu-prof-dir ../../.pi/tmp/chrome-cdp-bench/profiles --no-warnings --experimental-strip-types __bench__/spool.bench.ts 80"

[tasks.verify-package]
description = "Build chrome-cdp and load the generated package relocated outside the checkout"
depends = ["//:install"]
run = [
  { task = "//:build-ext", args = ["chrome-cdp"] },
  { task = "//:verify-packages", args = ["chrome-cdp"] },
]