@tempo-ai/visual-review 0.0.1
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.
- package/README.md +35 -0
- package/dist/bin.js +31 -0
- package/dist/bin.js.map +1 -0
- package/dist/chunk-4QAZFBC3.js +13586 -0
- package/dist/chunk-4QAZFBC3.js.map +1 -0
- package/dist/chunk-DJGBIRN5.js +146 -0
- package/dist/chunk-DJGBIRN5.js.map +1 -0
- package/dist/chunk-EYRAT56C.js +42 -0
- package/dist/chunk-EYRAT56C.js.map +1 -0
- package/dist/chunk-HMPQK5ZG.js +288 -0
- package/dist/chunk-HMPQK5ZG.js.map +1 -0
- package/dist/chunk-QLAJNWA2.js +9 -0
- package/dist/chunk-QLAJNWA2.js.map +1 -0
- package/dist/chunk-W7PBID4V.js +38 -0
- package/dist/chunk-W7PBID4V.js.map +1 -0
- package/dist/claim-WI2ZVIDS.js +14 -0
- package/dist/claim-WI2ZVIDS.js.map +1 -0
- package/dist/cli-3HH2BY7Y.js +16 -0
- package/dist/cli-3HH2BY7Y.js.map +1 -0
- package/dist/index.d.ts +245 -0
- package/dist/index.js +69 -0
- package/dist/index.js.map +1 -0
- package/dist/install-browsers-5RCJN3AK.js +8 -0
- package/dist/install-browsers-5RCJN3AK.js.map +1 -0
- package/dist/report-RCKB2CVS.js +9 -0
- package/dist/report-RCKB2CVS.js.map +1 -0
- package/package.json +52 -0
- package/templates/visual-review.yml +169 -0
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Tempo Visual Review
|
|
2
|
+
|
|
3
|
+
`@tempo-ai/visual-review` captures VRT-tracked Tempo storyboards in GitHub
|
|
4
|
+
Actions and sends the results to Tempo for review.
|
|
5
|
+
|
|
6
|
+
The CLI is installed on demand by the generated
|
|
7
|
+
`.github/workflows/visual-review.yml` (`templates/visual-review.yml` in this
|
|
8
|
+
package):
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npx --yes @tempo-ai/visual-review@latest capture --parallel 2
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Commands: `claim` (announce a capture before dependency setup),
|
|
15
|
+
`install-browsers` (the Chromium build matching the pinned playwright),
|
|
16
|
+
`capture`, and `report` (commit status + sticky PR comment). `capture` reads
|
|
17
|
+
the normal GitHub Actions event context, so the workflow never interpolates a
|
|
18
|
+
pull request number, SHA, branch, merge-base, or repository.
|
|
19
|
+
|
|
20
|
+
Tempo's own repository runs the identical commands (`.github/workflows/visual-review.yml`
|
|
21
|
+
in tempo-monorepo, pinned to this template by `src/workflow.test.ts`), so
|
|
22
|
+
every release is exercised there before customers resolve it.
|
|
23
|
+
|
|
24
|
+
The current production ingest origin is the default. Set
|
|
25
|
+
`VISUAL_REVIEW_INGEST_URL` only when using a Tempo preview deployment.
|
|
26
|
+
|
|
27
|
+
## Releases and rollback
|
|
28
|
+
|
|
29
|
+
Every production release publishes this package at the app version under
|
|
30
|
+
`latest`; staging releases publish under `next`. Workflows resolve `latest`,
|
|
31
|
+
so a bad publish is undone in seconds, without a release:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm dist-tag add @tempo-ai/visual-review@<previous version> latest
|
|
35
|
+
```
|
package/dist/bin.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __tempoCreateRequire } from 'node:module'; const require = __tempoCreateRequire(import.meta.url);
|
|
3
|
+
|
|
4
|
+
// src/bin.ts
|
|
5
|
+
async function main(argv = process.argv.slice(2)) {
|
|
6
|
+
const [command, ...commandArgs] = argv;
|
|
7
|
+
switch (command) {
|
|
8
|
+
case "capture":
|
|
9
|
+
return await (await import("./cli-3HH2BY7Y.js")).main(commandArgs);
|
|
10
|
+
case "claim":
|
|
11
|
+
return await (await import("./claim-WI2ZVIDS.js")).main(commandArgs);
|
|
12
|
+
case "report":
|
|
13
|
+
return await (await import("./report-RCKB2CVS.js")).main(commandArgs);
|
|
14
|
+
case "install-browsers":
|
|
15
|
+
return await (await import("./install-browsers-5RCJN3AK.js")).main(commandArgs);
|
|
16
|
+
default:
|
|
17
|
+
throw new Error(
|
|
18
|
+
"usage: tempo-visual-review <capture|claim|report|install-browsers> [options]"
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
main().then((code) => process.exit(code)).catch((error) => {
|
|
23
|
+
console.error(
|
|
24
|
+
`[visual-review] ${error instanceof Error ? error.message : error}`
|
|
25
|
+
);
|
|
26
|
+
process.exit(1);
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
main
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=bin.js.map
|
package/dist/bin.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/bin.ts"],"sourcesContent":["#!/usr/bin/env node\n\n/**\n * `tempo-visual-review` — the published dispatcher. Subcommands load lazily:\n * `claim` and `report` run before a project's dependencies exist and need\n * only node builtins, `fetch` and `gh`, so they must never pull the capture\n * engine (and its native modules) into memory.\n */\nexport async function main(argv = process.argv.slice(2)): Promise<number> {\n const [command, ...commandArgs] = argv;\n switch (command) {\n case \"capture\":\n return await (await import(\"./cli\")).main(commandArgs);\n case \"claim\":\n return await (await import(\"./claim\")).main(commandArgs);\n case \"report\":\n return await (await import(\"./report\")).main(commandArgs);\n case \"install-browsers\":\n return await (await import(\"./install-browsers\")).main(commandArgs);\n default:\n throw new Error(\n \"usage: tempo-visual-review <capture|claim|report|install-browsers> [options]\",\n );\n }\n}\n\n// Hard-exit rather than letting the event loop drain: the devserver\n// supervisor leaves live handles behind (child process plumbing, file\n// watchers) that would keep the process alive until the CI job timeout.\n// Everything durable (manifest, uploads, GITHUB_OUTPUT) is awaited inside\n// each command's main() before this runs.\nmain()\n .then((code) => process.exit(code))\n .catch((error) => {\n console.error(\n `[visual-review] ${error instanceof Error ? error.message : error}`,\n );\n process.exit(1);\n });\n"],"mappings":";;;;AAQA,eAAsB,KAAK,OAAO,QAAQ,KAAK,MAAM,CAAC,GAAoB;AACxE,QAAM,CAAC,SAAS,GAAG,WAAW,IAAI;AAClC,UAAQ,SAAS;AAAA,IACf,KAAK;AACH,aAAO,OAAO,MAAM,OAAO,mBAAO,GAAG,KAAK,WAAW;AAAA,IACvD,KAAK;AACH,aAAO,OAAO,MAAM,OAAO,qBAAS,GAAG,KAAK,WAAW;AAAA,IACzD,KAAK;AACH,aAAO,OAAO,MAAM,OAAO,sBAAU,GAAG,KAAK,WAAW;AAAA,IAC1D,KAAK;AACH,aAAO,OAAO,MAAM,OAAO,gCAAoB,GAAG,KAAK,WAAW;AAAA,IACpE;AACE,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,EACJ;AACF;AAOA,KAAK,EACF,KAAK,CAAC,SAAS,QAAQ,KAAK,IAAI,CAAC,EACjC,MAAM,CAAC,UAAU;AAChB,UAAQ;AAAA,IACN,mBAAmB,iBAAiB,QAAQ,MAAM,UAAU,KAAK;AAAA,EACnE;AACA,UAAQ,KAAK,CAAC;AAChB,CAAC;","names":[]}
|