@bytevion/cli 0.4.1 → 0.5.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 (42) hide show
  1. package/dist/commands/connect.d.ts +12 -0
  2. package/dist/commands/connect.js +64 -0
  3. package/dist/commands/dash.d.ts +9 -0
  4. package/dist/commands/dash.js +120 -0
  5. package/dist/commands/integrate.d.ts +3 -0
  6. package/dist/commands/integrate.js +58 -6
  7. package/dist/commands/keys/rotate.d.ts +3 -0
  8. package/dist/commands/keys/rotate.js +9 -1
  9. package/dist/commands/mcp/add.d.ts +13 -0
  10. package/dist/commands/mcp/add.js +31 -0
  11. package/dist/commands/mcp/list.d.ts +5 -0
  12. package/dist/commands/mcp/list.js +22 -0
  13. package/dist/commands/mcp/remove.d.ts +11 -0
  14. package/dist/commands/mcp/remove.js +19 -0
  15. package/dist/commands/mcp/test.d.ts +11 -0
  16. package/dist/commands/mcp/test.js +20 -0
  17. package/dist/commands/providers/compare.d.ts +13 -0
  18. package/dist/commands/providers/compare.js +52 -0
  19. package/dist/commands/sync.d.ts +10 -0
  20. package/dist/commands/sync.js +39 -0
  21. package/dist/lib/api.d.ts +7 -0
  22. package/dist/lib/api.js +24 -0
  23. package/dist/lib/config-formats.d.ts +3 -0
  24. package/dist/lib/config-formats.js +88 -0
  25. package/dist/lib/detect.d.ts +9 -0
  26. package/dist/lib/detect.js +83 -0
  27. package/dist/lib/friendly.js +10 -0
  28. package/dist/lib/integrations.d.ts +1 -0
  29. package/dist/lib/integrations.js +33 -4
  30. package/dist/lib/paths.d.ts +2 -0
  31. package/dist/lib/paths.js +13 -0
  32. package/dist/lib/tui.d.ts +42 -0
  33. package/dist/lib/tui.js +10 -0
  34. package/dist/lib/wiring.d.ts +10 -0
  35. package/dist/lib/wiring.js +53 -0
  36. package/dist/tui/components/Dash.d.ts +16 -0
  37. package/dist/tui/components/Dash.js +53 -0
  38. package/dist/tui/contract.d.ts +42 -0
  39. package/dist/tui/index.d.ts +2 -1
  40. package/dist/tui/index.js +34 -0
  41. package/oclif.manifest.json +585 -96
  42. package/package.json +4 -1
package/dist/tui/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { render } from 'ink';
2
2
  import React from 'react';
3
3
  import { App } from './components/App.js';
4
+ import { Dash } from './components/Dash.js';
4
5
  import { Home } from './components/Home.js';
5
6
  // ESM island entry. The CJS bridge (src/lib/tui.ts) dynamic-imports this and calls renderHome /
6
7
  // renderWizard. Each mounts an Ink root, resolves the result Promise when the component reports
@@ -76,3 +77,36 @@ export async function renderWizard(props) {
76
77
  }
77
78
  }
78
79
  }
80
+ export async function renderDash(props) {
81
+ let settled = false;
82
+ let resolve;
83
+ const done = new Promise((res) => {
84
+ resolve = (r) => {
85
+ if (!settled) {
86
+ settled = true;
87
+ res(r);
88
+ }
89
+ };
90
+ });
91
+ const instance = render(React.createElement(Dash, {
92
+ data: props.data,
93
+ ports: props.ports,
94
+ ascii: props.ascii,
95
+ plainColor: props.plainColor,
96
+ version: props.version,
97
+ onDone: resolve,
98
+ }), { exitOnCtrlC: false });
99
+ try {
100
+ instance.waitUntilExit().then(() => resolve({ status: 'exit' }), () => resolve({ status: 'fallback' }));
101
+ return await done;
102
+ }
103
+ finally {
104
+ instance.unmount();
105
+ try {
106
+ process.stdout.write(SHOW_CURSOR);
107
+ }
108
+ catch {
109
+ /* stream may be closed */
110
+ }
111
+ }
112
+ }