@h-rig/cli 0.0.6-alpha.11 → 0.0.6-alpha.111

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 (48) hide show
  1. package/README.md +6 -28
  2. package/bin/rig.js +16 -0
  3. package/package.json +14 -27
  4. package/dist/bin/build-rig-binaries.js +0 -107
  5. package/dist/bin/rig.js +0 -9591
  6. package/dist/src/commands/_authority-runs.js +0 -111
  7. package/dist/src/commands/_connection-state.js +0 -123
  8. package/dist/src/commands/_doctor-checks.js +0 -519
  9. package/dist/src/commands/_operator-view.js +0 -340
  10. package/dist/src/commands/_parsers.js +0 -107
  11. package/dist/src/commands/_paths.js +0 -50
  12. package/dist/src/commands/_pi-install.js +0 -184
  13. package/dist/src/commands/_policy.js +0 -79
  14. package/dist/src/commands/_preflight.js +0 -478
  15. package/dist/src/commands/_probes.js +0 -13
  16. package/dist/src/commands/_run-driver-helpers.js +0 -289
  17. package/dist/src/commands/_server-client.js +0 -402
  18. package/dist/src/commands/_snapshot-upload.js +0 -331
  19. package/dist/src/commands/_task-picker.js +0 -48
  20. package/dist/src/commands/agent.js +0 -498
  21. package/dist/src/commands/browser.js +0 -890
  22. package/dist/src/commands/connect.js +0 -180
  23. package/dist/src/commands/dist.js +0 -402
  24. package/dist/src/commands/doctor.js +0 -529
  25. package/dist/src/commands/github.js +0 -294
  26. package/dist/src/commands/inbox.js +0 -160
  27. package/dist/src/commands/init.js +0 -1372
  28. package/dist/src/commands/inspect.js +0 -174
  29. package/dist/src/commands/inspector.js +0 -256
  30. package/dist/src/commands/plugin.js +0 -167
  31. package/dist/src/commands/profile-and-review.js +0 -178
  32. package/dist/src/commands/queue.js +0 -197
  33. package/dist/src/commands/remote.js +0 -507
  34. package/dist/src/commands/repo-git-harness.js +0 -221
  35. package/dist/src/commands/run.js +0 -797
  36. package/dist/src/commands/server.js +0 -386
  37. package/dist/src/commands/setup.js +0 -699
  38. package/dist/src/commands/task-report-bug.js +0 -1083
  39. package/dist/src/commands/task-run-driver.js +0 -2048
  40. package/dist/src/commands/task.js +0 -1343
  41. package/dist/src/commands/test.js +0 -39
  42. package/dist/src/commands/workspace.js +0 -123
  43. package/dist/src/commands.js +0 -9270
  44. package/dist/src/index.js +0 -9609
  45. package/dist/src/launcher.js +0 -133
  46. package/dist/src/report-bug.js +0 -260
  47. package/dist/src/runner.js +0 -273
  48. package/dist/src/withMutedConsole.js +0 -42
@@ -1,42 +0,0 @@
1
- // @bun
2
- // packages/cli/src/withMutedConsole.ts
3
- function isPromise(value) {
4
- if (typeof value !== "object" && typeof value !== "function") {
5
- return false;
6
- }
7
- return value !== null && typeof value.then === "function";
8
- }
9
- function withMutedConsole(mute, fn) {
10
- if (!mute) {
11
- return fn();
12
- }
13
- const originalLog = console.log;
14
- const originalWarn = console.warn;
15
- const originalInfo = console.info;
16
- const restore = () => {
17
- console.log = originalLog;
18
- console.warn = originalWarn;
19
- console.info = originalInfo;
20
- };
21
- console.log = () => {};
22
- console.warn = () => {};
23
- console.info = () => {};
24
- try {
25
- const result = fn();
26
- if (isPromise(result)) {
27
- return result.finally(restore);
28
- }
29
- restore();
30
- return result;
31
- } catch (error) {
32
- restore();
33
- throw error;
34
- } finally {
35
- if (console.log === originalLog) {
36
- restore();
37
- }
38
- }
39
- }
40
- export {
41
- withMutedConsole
42
- };