@straion/cli 0.0.1 → 0.0.3

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 (174) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +0 -4
  3. package/dist/cli.d.ts.map +1 -1
  4. package/dist/cli.js +2 -4
  5. package/dist/cli.js.map +1 -1
  6. package/dist/commands/default.d.ts.map +1 -1
  7. package/dist/commands/default.js +7 -30
  8. package/dist/commands/default.js.map +1 -1
  9. package/dist/commands/find-requirements.d.ts.map +1 -1
  10. package/dist/commands/find-requirements.integration.test.d.ts +5 -0
  11. package/dist/commands/find-requirements.integration.test.d.ts.map +1 -0
  12. package/dist/commands/find-requirements.integration.test.js +92 -0
  13. package/dist/commands/find-requirements.integration.test.js.map +1 -0
  14. package/dist/commands/find-requirements.js +26 -7
  15. package/dist/commands/find-requirements.js.map +1 -1
  16. package/dist/commands/index.d.ts.map +1 -1
  17. package/dist/commands/index.js +2 -0
  18. package/dist/commands/index.js.map +1 -1
  19. package/dist/commands/login.d.ts.map +1 -1
  20. package/dist/commands/login.integration.test.d.ts +13 -0
  21. package/dist/commands/login.integration.test.d.ts.map +1 -0
  22. package/dist/commands/login.integration.test.js +67 -0
  23. package/dist/commands/login.integration.test.js.map +1 -0
  24. package/dist/commands/login.js +20 -5
  25. package/dist/commands/login.js.map +1 -1
  26. package/dist/commands/logout.d.ts.map +1 -1
  27. package/dist/commands/logout.js +9 -14
  28. package/dist/commands/logout.js.map +1 -1
  29. package/dist/commands/session-start.d.ts.map +1 -1
  30. package/dist/commands/session-start.js +1 -2
  31. package/dist/commands/session-start.js.map +1 -1
  32. package/dist/commands/setup.d.ts +3 -0
  33. package/dist/commands/setup.d.ts.map +1 -0
  34. package/dist/commands/setup.js +23 -0
  35. package/dist/commands/setup.js.map +1 -0
  36. package/dist/components/banner.d.ts +3 -0
  37. package/dist/components/banner.d.ts.map +1 -0
  38. package/dist/components/banner.js +13 -0
  39. package/dist/components/banner.js.map +1 -0
  40. package/dist/components/button.d.ts +2 -2
  41. package/dist/components/button.d.ts.map +1 -1
  42. package/dist/components/button.js +3 -3
  43. package/dist/components/button.js.map +1 -1
  44. package/dist/components/default-flow.d.ts +11 -0
  45. package/dist/components/default-flow.d.ts.map +1 -0
  46. package/dist/components/default-flow.js +64 -0
  47. package/dist/components/default-flow.js.map +1 -0
  48. package/dist/components/hero.d.ts +2 -1
  49. package/dist/components/hero.d.ts.map +1 -1
  50. package/dist/components/hero.js +79 -19
  51. package/dist/components/hero.js.map +1 -1
  52. package/dist/components/link.d.ts +2 -2
  53. package/dist/components/link.d.ts.map +1 -1
  54. package/dist/components/link.js +3 -3
  55. package/dist/components/link.js.map +1 -1
  56. package/dist/components/login/login-error.d.ts +6 -0
  57. package/dist/components/login/login-error.d.ts.map +1 -0
  58. package/dist/components/login/login-error.js +14 -0
  59. package/dist/components/login/login-error.js.map +1 -0
  60. package/dist/components/login/login-flow.d.ts +8 -2
  61. package/dist/components/login/login-flow.d.ts.map +1 -1
  62. package/dist/components/login/login-flow.js +95 -84
  63. package/dist/components/login/login-flow.js.map +1 -1
  64. package/dist/components/login/login-flow.test.js +69 -7
  65. package/dist/components/login/login-flow.test.js.map +1 -1
  66. package/dist/components/login/types.d.ts +2 -0
  67. package/dist/components/login/types.d.ts.map +1 -0
  68. package/dist/components/login/types.js +2 -0
  69. package/dist/components/login/types.js.map +1 -0
  70. package/dist/components/login/user-settings-link.d.ts +3 -0
  71. package/dist/components/login/user-settings-link.d.ts.map +1 -0
  72. package/dist/components/login/user-settings-link.js +8 -0
  73. package/dist/components/login/user-settings-link.js.map +1 -0
  74. package/dist/components/multi-select.d.ts +16 -0
  75. package/dist/components/multi-select.d.ts.map +1 -0
  76. package/dist/components/multi-select.js +105 -0
  77. package/dist/components/multi-select.js.map +1 -0
  78. package/dist/components/org-selector.d.ts +2 -1
  79. package/dist/components/org-selector.d.ts.map +1 -1
  80. package/dist/components/org-selector.js +9 -2
  81. package/dist/components/org-selector.js.map +1 -1
  82. package/dist/components/pat-input.d.ts +2 -1
  83. package/dist/components/pat-input.d.ts.map +1 -1
  84. package/dist/components/pat-input.js +9 -3
  85. package/dist/components/pat-input.js.map +1 -1
  86. package/dist/components/pat-input.test.js +8 -8
  87. package/dist/components/pat-input.test.js.map +1 -1
  88. package/dist/components/setup/agent-setup.d.ts +9 -0
  89. package/dist/components/setup/agent-setup.d.ts.map +1 -0
  90. package/dist/components/setup/agent-setup.js +65 -0
  91. package/dist/components/setup/agent-setup.js.map +1 -0
  92. package/dist/components/setup/agents/agent-registry.d.ts +44 -0
  93. package/dist/components/setup/agents/agent-registry.d.ts.map +1 -0
  94. package/dist/components/setup/agents/agent-registry.js +64 -0
  95. package/dist/components/setup/agents/agent-registry.js.map +1 -0
  96. package/dist/components/setup/agents/command-helpers.d.ts +5 -0
  97. package/dist/components/setup/agents/command-helpers.d.ts.map +1 -0
  98. package/dist/components/setup/agents/command-helpers.js +28 -0
  99. package/dist/components/setup/agents/command-helpers.js.map +1 -0
  100. package/dist/components/setup/checking-agents.d.ts +16 -0
  101. package/dist/components/setup/checking-agents.d.ts.map +1 -0
  102. package/dist/components/setup/checking-agents.js +30 -0
  103. package/dist/components/setup/checking-agents.js.map +1 -0
  104. package/dist/components/setup/download-skills-and-plugins.d.ts +9 -0
  105. package/dist/components/setup/download-skills-and-plugins.d.ts.map +1 -0
  106. package/dist/components/setup/download-skills-and-plugins.js +29 -0
  107. package/dist/components/setup/download-skills-and-plugins.js.map +1 -0
  108. package/dist/components/setup/perform-setup.d.ts +23 -0
  109. package/dist/components/setup/perform-setup.d.ts.map +1 -0
  110. package/dist/components/setup/perform-setup.js +45 -0
  111. package/dist/components/setup/perform-setup.js.map +1 -0
  112. package/dist/components/spinner.d.ts +6 -1
  113. package/dist/components/spinner.d.ts.map +1 -1
  114. package/dist/components/spinner.js +13 -5
  115. package/dist/components/spinner.js.map +1 -1
  116. package/dist/components/tabs.d.ts +3 -3
  117. package/dist/components/tabs.d.ts.map +1 -1
  118. package/dist/components/tabs.js +26 -21
  119. package/dist/components/tabs.js.map +1 -1
  120. package/dist/hooks/use-credentials.d.ts +13 -0
  121. package/dist/hooks/use-credentials.d.ts.map +1 -0
  122. package/dist/hooks/use-credentials.js +33 -0
  123. package/dist/hooks/use-credentials.js.map +1 -0
  124. package/dist/lib/graphql.d.ts +57 -41
  125. package/dist/lib/graphql.d.ts.map +1 -1
  126. package/dist/lib/graphql.js +7 -0
  127. package/dist/lib/graphql.js.map +1 -1
  128. package/dist/lib/ink-render.d.ts +1 -1
  129. package/dist/lib/ink-render.js +1 -1
  130. package/dist/lib/logger.d.ts +13 -8
  131. package/dist/lib/logger.d.ts.map +1 -1
  132. package/dist/lib/logger.js +6 -29
  133. package/dist/lib/logger.js.map +1 -1
  134. package/dist/lib/login.d.ts.map +1 -1
  135. package/dist/lib/middleware.d.ts +2 -1
  136. package/dist/lib/middleware.d.ts.map +1 -1
  137. package/dist/lib/middleware.js +18 -6
  138. package/dist/lib/middleware.js.map +1 -1
  139. package/dist/lib/skills-manager.d.ts +33 -0
  140. package/dist/lib/skills-manager.d.ts.map +1 -0
  141. package/dist/lib/skills-manager.js +233 -0
  142. package/dist/lib/skills-manager.js.map +1 -0
  143. package/dist/lib/skills-manager.test.d.ts +7 -0
  144. package/dist/lib/skills-manager.test.d.ts.map +1 -0
  145. package/dist/lib/skills-manager.test.js +248 -0
  146. package/dist/lib/skills-manager.test.js.map +1 -0
  147. package/dist/state/global-config.d.ts +23 -9
  148. package/dist/state/global-config.d.ts.map +1 -1
  149. package/dist/state/global-config.js +42 -36
  150. package/dist/state/global-config.js.map +1 -1
  151. package/dist/state/session-manager.js +2 -2
  152. package/dist/state/session-manager.js.map +1 -1
  153. package/dist/test/integration-helpers.d.ts +96 -0
  154. package/dist/test/integration-helpers.d.ts.map +1 -0
  155. package/dist/test/integration-helpers.js +171 -0
  156. package/dist/test/integration-helpers.js.map +1 -0
  157. package/package.json +17 -4
  158. package/dist/auth/cookie-jar.d.ts +0 -24
  159. package/dist/auth/cookie-jar.d.ts.map +0 -1
  160. package/dist/auth/cookie-jar.js +0 -45
  161. package/dist/auth/cookie-jar.js.map +0 -1
  162. package/dist/components/login/login.provider.d.ts +0 -2
  163. package/dist/components/login/login.provider.d.ts.map +0 -1
  164. package/dist/components/login/login.provider.js +0 -2
  165. package/dist/components/login/login.provider.js.map +0 -1
  166. package/dist/components/login/login.store.d.ts +0 -2
  167. package/dist/components/login/login.store.d.ts.map +0 -1
  168. package/dist/components/login/login.store.js +0 -2
  169. package/dist/components/login/login.store.js.map +0 -1
  170. package/dist/state/directory-config.d.ts +0 -21
  171. package/dist/state/directory-config.d.ts.map +0 -1
  172. package/dist/state/directory-config.js +0 -59
  173. package/dist/state/directory-config.js.map +0 -1
  174. /package/{LICENSE.txt → LICENSE} +0 -0
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const Banner: () => React.JSX.Element;
3
+ //# sourceMappingURL=banner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../src/components/banner.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,eAAO,MAAM,MAAM,yBAElB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Text } from 'ink';
2
+ import React from 'react';
3
+ const straionAscii = `
4
+ ███████╗████████╗██████╗ █████╗ ██╗ ██████╗ ███╗ ██╗
5
+ ██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔═══██╗████╗ ██║
6
+ ███████╗ ██║ ██████╔╝███████║██║██║ ██║██╔██╗ ██║
7
+ ╚════██║ ██║ ██╔══██╗██╔══██║██║██║ ██║██║╚██╗██║
8
+ ███████║ ██║ ██║ ██║██║ ██║██║╚██████╔╝██║ ╚████║
9
+ ╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═╝ ╚═══╝`;
10
+ export const Banner = () => {
11
+ return React.createElement(Text, null, straionAscii);
12
+ };
13
+ //# sourceMappingURL=banner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"banner.js","sourceRoot":"","sources":["../../src/components/banner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,YAAY,GAAG;;;;;;wDAMmC,CAAC;AAEzD,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,EAAE;IACzB,OAAO,oBAAC,IAAI,QAAE,YAAY,CAAQ,CAAC;AACrC,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
- import { type ReactNode } from 'react';
1
+ import React, { type ReactNode } from 'react';
2
2
  export type ButtonProps = {
3
3
  children: ReactNode;
4
4
  onPress: () => void;
5
5
  };
6
- export declare const Button: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const Button: (props: ButtonProps) => React.JSX.Element;
7
7
  //# sourceMappingURL=button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjD,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,OAAO,WAAW,4CAuBxC,CAAC"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAExD,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,OAAO,WAAW,sBAuBxC,CAAC"}
@@ -1,6 +1,5 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  import { Box, Text, useFocus, useInput } from 'ink';
3
- import { useState } from 'react';
2
+ import React, { useState } from 'react';
4
3
  export const Button = (props) => {
5
4
  const { isFocused } = useFocus();
6
5
  const { children, onPress } = props;
@@ -13,6 +12,7 @@ export const Button = (props) => {
13
12
  onPress();
14
13
  }
15
14
  });
16
- return (_jsx(Box, { backgroundColor: isPressed ? 'magentaBright' : isFocused ? 'magenta' : 'white', flexDirection: 'row', paddingX: 1, children: _jsx(Text, { color: "black", children: children }) }));
15
+ return (React.createElement(Box, { backgroundColor: isPressed ? 'magentaBright' : isFocused ? 'magenta' : 'white', flexDirection: 'row', paddingX: 1 },
16
+ React.createElement(Text, { color: "black" }, children)));
17
17
  };
18
18
  //# sourceMappingURL=button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAOjD,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAAkB,EAAE,EAAE;IAC3C,MAAM,EAAE,SAAS,EAAE,GAAG,QAAQ,EAAE,CAAC;IACjC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACpC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElD,QAAQ,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACtB,IAAI,SAAS,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,KAAK,KAAK,GAAG,CAAC,EAAE,CAAC;YAC/C,sBAAsB;YACtB,YAAY,CAAC,IAAI,CAAC,CAAC;YACnB,UAAU,CAAC,GA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,CAAC;IAEH,OAAO,CACL,oBAAC,GAAG,IACF,eAAe,EAAE,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,EAC9E,aAAa,EAAE,KAAK,EACpB,QAAQ,EAAE,CAAC;QAEX,oBAAC,IAAI,IAAC,KAAK,EAAC,OAAO,IAAE,QAAQ,CAAQ,CACjC,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { Logger } from 'pino';
2
+ import React from 'react';
3
+ import { type StoredCredentials } from '../auth/credentials.js';
4
+ interface DefaultFlowProps {
5
+ logger: Logger;
6
+ credentials: StoredCredentials | null;
7
+ defaultSetupDismissed: boolean;
8
+ }
9
+ export declare function DefaultFlow({ logger, credentials, defaultSetupDismissed }: DefaultFlowProps): React.JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=default-flow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-flow.d.ts","sourceRoot":"","sources":["../../src/components/default-flow.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,EAA2B,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAWzF,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACtC,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAED,wBAAgB,WAAW,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,qBAAqB,EAAE,EAAE,gBAAgB,qBA0F3F"}
@@ -0,0 +1,64 @@
1
+ import { Box, Text, useInput } from 'ink';
2
+ import React, { useCallback, useState } from 'react';
3
+ import { createCredentialManager } from '../auth/credentials.js';
4
+ import { Banner } from '../components/banner.js';
5
+ import { Hero } from '../components/hero.js';
6
+ import { LoginFlow } from '../components/login/login-flow.js';
7
+ import { useHasValidCredentials } from '../hooks/use-credentials.js';
8
+ import { config, saveConfig } from '../state/global-config.js';
9
+ import { AgentSetup } from './setup/agent-setup.js';
10
+ import { Spinner } from './spinner.js';
11
+ export function DefaultFlow({ logger, credentials, defaultSetupDismissed }) {
12
+ const { hasValidCredentials, organizations, isFinished: credentialsCheckFinished, } = useHasValidCredentials({
13
+ credentials,
14
+ logger,
15
+ });
16
+ const [loginPerformed, setLoginPerformed] = useState(false);
17
+ const [setupDismissed, setSetupDismissed] = useState(defaultSetupDismissed);
18
+ const [showSetupFinished, setShowSetupFinished] = useState(false);
19
+ const showLogin = credentialsCheckFinished && !hasValidCredentials;
20
+ const showAgentSetup = (credentialsCheckFinished && hasValidCredentials) || loginPerformed;
21
+ const handleLoginComplete = useCallback(async (user, org, pat) => {
22
+ // Store credentials
23
+ const credentialManager = await createCredentialManager();
24
+ await credentialManager.setCredentials({
25
+ userId: user.id,
26
+ name: user.firstName ?? user.name,
27
+ accessToken: pat,
28
+ });
29
+ logger.debug('Stored user credentials in credential manager');
30
+ // Store global org
31
+ config.globalOrg = org;
32
+ saveConfig();
33
+ setLoginPerformed(true);
34
+ }, [logger]);
35
+ const handleLoginError = useCallback((error) => {
36
+ logger.error({ error: error?.message ?? 'Unknown error' }, 'Login failed');
37
+ }, [logger]);
38
+ const handleSetupComplete = useCallback(() => {
39
+ config.setupDismissed = true;
40
+ saveConfig();
41
+ setShowSetupFinished(true);
42
+ }, []);
43
+ useInput((_, key) => {
44
+ if (key.escape) {
45
+ logger.info('Setup dismissed by user');
46
+ config.setupDismissed = true;
47
+ saveConfig();
48
+ setSetupDismissed(true);
49
+ }
50
+ });
51
+ return (React.createElement(Box, { flexDirection: "column", paddingY: 1, paddingX: 2, gap: 1 },
52
+ React.createElement(Banner, null),
53
+ setupDismissed ? (React.createElement(Hero, { localOrg: config.globalOrg, credentials: credentials, organizations: organizations })) : (React.createElement(React.Fragment, null,
54
+ React.createElement(Box, { width: 80, flexDirection: 'column', gap: 1, borderStyle: 'classic', padding: 1 },
55
+ React.createElement(Text, null, "This is a first time setup to help you get started with Straion."),
56
+ React.createElement(Text, { dimColor: true }, "You can press ESC to skip the setup.")),
57
+ !credentialsCheckFinished ? React.createElement(Spinner, null, "Checking credentials...") : null,
58
+ showLogin ? (React.createElement(LoginFlow, { tokenSource: "input", onComplete: handleLoginComplete, onError: handleLoginError })) : null,
59
+ showAgentSetup ? React.createElement(AgentSetup, { logger: logger, onComplete: handleSetupComplete }) : null,
60
+ showSetupFinished ? (React.createElement(Box, { flexDirection: "column", gap: 1 },
61
+ React.createElement(Text, { color: "green" }, "\u2713 Setup completed!"),
62
+ React.createElement(Text, { dimColor: true }, "You can press ESC to dismiss."))) : null))));
63
+ }
64
+ //# sourceMappingURL=default-flow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-flow.js","sourceRoot":"","sources":["../../src/components/default-flow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE1C,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,uBAAuB,EAA0B,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAQvC,MAAM,UAAU,WAAW,CAAC,EAAE,MAAM,EAAE,WAAW,EA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SAAS,IACR,WAAW,EAAC,OAAO,EACnB,UAAU,EAAE,mBAAmB,EAC/B,OAAO,EAAE,gBAAgB,GACzB,CACH,CAAC,CAAC,CAAC,IAAI;YAEP,cAAc,CAAC,CAAC,CAAC,oBAAC,UAAU,IAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,mBAAmB,GAAI,CAAC,CAAC,CAAC,IAAI;YACvF,iBAAiB,CAAC,CAAC,CAAC,CACnB,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,GAAG,EAAE,CAAC;gBAChC,oBAAC,IAAI,IAAC,KAAK,EAAC,OAAO,8BAA0B;gBAC7C,oBAAC,IAAI,IAAC,QAAQ,0CAAqC,CAC/C,CACP,CAAC,CAAC,CAAC,IAAI,CACP,CACJ,CACG,CACP,CAAC;AACJ,CAAC"}
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { StoredCredentials } from '../auth/credentials.js';
2
3
  import type { OrganizationFragment } from '../lib/graphql.js';
3
4
  interface HeroProps {
@@ -5,6 +6,6 @@ interface HeroProps {
5
6
  localOrg: OrganizationFragment | null;
6
7
  organizations: OrganizationFragment[] | null;
7
8
  }
8
- export declare function Hero({ credentials, localOrg, organizations }: HeroProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function Hero({ credentials, localOrg, organizations }: HeroProps): React.JSX.Element;
9
10
  export {};
10
11
  //# sourceMappingURL=hero.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../src/components/hero.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAmB9D,UAAU,SAAS;IACjB,WAAW,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACtC,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACtC,aAAa,EAAE,oBAAoB,EAAE,GAAG,IAAI,CAAC;CAC9C;AAWD,wBAAgB,IAAI,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,SAAS,2CA2IvE"}
1
+ {"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../src/components/hero.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAiB9D,UAAU,SAAS;IACjB,WAAW,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACtC,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACtC,aAAa,EAAE,oBAAoB,EAAE,GAAG,IAAI,CAAC;CAC9C;AAED,wBAAgB,IAAI,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,SAAS,qBA+JvE"}
@@ -1,8 +1,8 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  import { Box, Text, useApp, useInput } from 'ink';
3
- import { useState } from 'react';
2
+ import React, { useEffect, useState } from 'react';
4
3
  import { create } from 'zustand';
5
- import { globalConfig } from '../state/global-config.js';
4
+ import packageJson from '../../package.json' with { type: 'json' };
5
+ import { config, saveConfig } from '../state/global-config.js';
6
6
  import { Button } from './button.js';
7
7
  import { Link } from './link.js';
8
8
  import { OrgSelector } from './org-selector.js';
@@ -10,30 +10,90 @@ const useHeroStore = create((set) => ({
10
10
  loginViewState: { type: 'idle' },
11
11
  setLoginViewState: (state) => set({ loginViewState: state }),
12
12
  }));
13
- const straionAscii = `
14
- ███████╗████████╗██████╗ █████╗ ██╗ ██████╗ ███╗ ██╗
15
- ██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔═══██╗████╗ ██║
16
- ███████╗ ██║ ██████╔╝███████║██║██║ ██║██╔██╗ ██║
17
- ╚════██║ ██║ ██╔══██╗██╔══██║██║██║ ██║██║╚██╗██║
18
- ███████║ ██║ ██║ ██║██║ ██║██║╚██████╔╝██║ ╚████║
19
- ╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═╝ ╚═══╝
20
- `;
21
13
  export function Hero({ credentials, localOrg, organizations }) {
22
14
  const { exit } = useApp();
15
+ const isInteractive = process.stdout.isTTY === true;
23
16
  const { loginViewState, setLoginViewState } = useHeroStore();
24
17
  const [currentOrg, setCurrentOrg] = useState(localOrg);
25
18
  const hasMultipleOrgs = organizations !== null && organizations.length > 1;
19
+ // In interactive mode, listen for 'q' or ESC to exit
26
20
  useInput((input, key) => {
27
21
  if (input === 'q' || key.escape) {
28
22
  exit();
29
23
  }
30
- });
31
- return (_jsxs(Box, { flexDirection: "column", paddingY: 1, paddingX: 2, children: [_jsx(Text, { children: straionAscii }), _jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: "blue", children: "The Missing Piece for AI-Era Software Engineering at Scale" }) }), credentials && currentOrg ? (_jsxs(Box, { flexDirection: "column", borderStyle: "single", paddingLeft: 1, marginBottom: 1, children: [_jsxs(Text, { children: ["Hello ", _jsx(Text, { bold: true, children: credentials.name }), "!"] }), _jsxs(Text, { children: ["Organization:", ' ', _jsx(Text, { bold: true, color: "magenta", children: currentOrg.name })] }), _jsxs(Box, { paddingTop: 1, children: [loginViewState.type === 'idle' && hasMultipleOrgs ? (_jsxs(Button, { onPress: () => {
32
- setLoginViewState({ type: 'switch-org', orgs: organizations });
33
- }, children: ['>', " Switch Organization"] })) : null, loginViewState.type === 'switch-org' && hasMultipleOrgs && currentOrg ? (_jsx(OrgSelector, { organizations: loginViewState.orgs, defaultOrganization: currentOrg, onSelect: (org) => {
34
- setCurrentOrg(org);
35
- globalConfig.setGlobalOrg(org);
36
- setLoginViewState({ type: 'idle' });
37
- } })) : null] })] })) : (_jsxs(Box, { flexDirection: "column", borderStyle: "single", paddingLeft: 1, marginBottom: 1, children: [_jsx(Text, { color: "yellow", children: "\u26A0 Not logged in" }), _jsxs(Text, { dimColor: true, children: ["Run ", _jsx(Text, { color: "green", children: "straion login" }), " to authenticate."] })] })), _jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "gray", children: "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" }) }), _jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: "white", children: "Quick Start:" }) }), _jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [_jsxs(Box, { marginBottom: 1, children: [_jsx(Text, { color: "cyan", bold: true, children: "\u2192" }), _jsx(Text, { children: " " }), _jsx(Text, { color: "green", children: "straion login" }), _jsx(Text, { dimColor: true, children: " ............ Login to your account" })] }), _jsxs(Box, { marginBottom: 1, children: [_jsx(Text, { color: "cyan", bold: true, children: "\u2192" }), _jsx(Text, { children: " " }), _jsx(Text, { color: "green", children: "straion logout" }), _jsx(Text, { dimColor: true, children: " ........... Logout from your account" })] }), _jsxs(Box, { marginBottom: 1, children: [_jsx(Text, { color: "cyan", bold: true, children: "\u2192" }), _jsx(Text, { children: " " }), _jsx(Text, { color: "green", children: "straion --help" }), _jsx(Text, { dimColor: true, children: " ........... Show all commands" })] })] })] }), _jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "gray", children: "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" }) }), _jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { marginBottom: 1, children: _jsxs(Text, { dimColor: true, children: ["Learn more:", ' ', _jsx(Text, { color: "blue", children: _jsx(Link, { url: "https://straion.com", children: "https://straion.com" }) })] }) }), _jsxs(Box, { justifyContent: "space-between", width: 71, children: [_jsx(Text, { dimColor: true, children: "Version 0.0.1" }), _jsx(Text, { dimColor: true, children: "Press 'q' or ESC to exit" })] })] })] }));
24
+ }, { isActive: isInteractive });
25
+ // In non-interactive mode, auto-exit after rendering
26
+ useEffect(() => {
27
+ if (!isInteractive) {
28
+ exit();
29
+ }
30
+ }, [isInteractive, exit]);
31
+ return (React.createElement(Box, { flexDirection: "column", paddingY: 1 },
32
+ React.createElement(Box, { marginBottom: 1 },
33
+ React.createElement(Text, { bold: true, color: "blue" }, "The Missing Piece for AI-Era Software Engineering at Scale")),
34
+ credentials && currentOrg ? (React.createElement(Box, { flexDirection: "column", borderStyle: "classic", paddingLeft: 1, marginBottom: 1 },
35
+ React.createElement(Text, null,
36
+ "Hello ",
37
+ React.createElement(Text, { bold: true }, credentials.name),
38
+ "!"),
39
+ React.createElement(Text, null,
40
+ "Organization:",
41
+ ' ',
42
+ React.createElement(Text, { bold: true, color: "magenta" }, currentOrg.name)),
43
+ isInteractive && (React.createElement(Box, { paddingTop: 1 },
44
+ loginViewState.type === 'idle' && hasMultipleOrgs ? (React.createElement(Button, { onPress: () => {
45
+ setLoginViewState({ type: 'switch-org', orgs: organizations });
46
+ } },
47
+ '>',
48
+ " Switch Organization")) : null,
49
+ loginViewState.type === 'switch-org' && hasMultipleOrgs && currentOrg ? (React.createElement(OrgSelector, { organizations: loginViewState.orgs, defaultOrganization: currentOrg, onSelect: (org) => {
50
+ setCurrentOrg(org);
51
+ config.globalOrg = org;
52
+ saveConfig();
53
+ setLoginViewState({ type: 'idle' });
54
+ } })) : null)))) : (React.createElement(Box, { flexDirection: "column", borderStyle: "classic", paddingLeft: 1, marginBottom: 1 },
55
+ React.createElement(Text, { color: "yellow" }, "\u26A0 Not logged in"),
56
+ React.createElement(Text, null,
57
+ "Run ",
58
+ React.createElement(Text, { color: "green" }, "straion login"),
59
+ " to authenticate."))),
60
+ React.createElement(Box, { marginBottom: 1 },
61
+ React.createElement(Text, { color: "gray" }, "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")),
62
+ React.createElement(Box, { flexDirection: "column", marginBottom: 1 },
63
+ React.createElement(Box, { marginBottom: 1 },
64
+ React.createElement(Text, { bold: true, color: "white" }, "Quick Start:")),
65
+ React.createElement(Box, { flexDirection: "column", marginLeft: 2 },
66
+ React.createElement(Box, { marginBottom: 1 },
67
+ React.createElement(Text, { color: "cyan", bold: true }, "\u2192"),
68
+ React.createElement(Text, null, " "),
69
+ React.createElement(Text, { color: "green" }, "straion login"),
70
+ React.createElement(Text, { dimColor: true }, " ............ Login to your account")),
71
+ React.createElement(Box, { marginBottom: 1 },
72
+ React.createElement(Text, { color: "cyan", bold: true }, "\u2192"),
73
+ React.createElement(Text, null, " "),
74
+ React.createElement(Text, { color: "green" }, "straion logout"),
75
+ React.createElement(Text, { dimColor: true }, " ........... Logout from your account")),
76
+ React.createElement(Box, { marginBottom: 1 },
77
+ React.createElement(Text, { color: "cyan", bold: true }, "\u2192"),
78
+ React.createElement(Text, null, " "),
79
+ React.createElement(Text, { color: "green" }, "straion setup"),
80
+ React.createElement(Text, { dimColor: true }, " ............ Setup your coding agents")),
81
+ React.createElement(Box, { marginBottom: 1 },
82
+ React.createElement(Text, { color: "cyan", bold: true }, "\u2192"),
83
+ React.createElement(Text, null, " "),
84
+ React.createElement(Text, { color: "green" }, "straion --help"),
85
+ React.createElement(Text, { dimColor: true }, " ........... Show all commands")))),
86
+ React.createElement(Box, { marginBottom: 1 },
87
+ React.createElement(Text, { color: "gray" }, "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")),
88
+ React.createElement(Box, { flexDirection: "column" },
89
+ React.createElement(Box, { marginBottom: 1, gap: 1 },
90
+ React.createElement(Text, null, "Learn more:"),
91
+ React.createElement(Link, { url: "https://straion.com", fallback: false },
92
+ React.createElement(Text, { color: "blue" }, "https://straion.com"))),
93
+ React.createElement(Box, { justifyContent: "space-between", width: 71 },
94
+ React.createElement(Text, { dimColor: true },
95
+ "Version ",
96
+ packageJson.version),
97
+ isInteractive && React.createElement(Text, { dimColor: true }, "Press ESC to exit")))));
38
98
  }
39
99
  //# sourceMappingURL=hero.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hero.js","sourceRoot":"","sources":["../../src/components/hero.tsx"],"names":[],"mappings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AC,KAAK,EAAC,OAAO,oBAAqB;oBACxC,oBAAC,IAAI,IAAC,QAAQ,mDAA8C,CACxD;gBAEN,oBAAC,GAAG,IAAC,YAAY,EAAE,CAAC;oBAClB,oBAAC,IAAI,IAAC,KAAK,EAAC,MAAM,EAAC,IAAI,mBAEhB;oBACP,oBAAC,IAAI,YAAS;oBACd,oBAAC,IAAI,IAAC,KAAK,EAAC,OAAO,qBAAsB;oBACzC,oBAAC,IAAI,IAAC,QAAQ,2CAAsC,CAChD,CACF,CACF;QAGN,oBAAC,GAAG,IAAC,YAAY,EAAE,CAAC;YAClB,oBAAC,IAAI,IAAC,KAAK,EAAC,MAAM,ibAEX,CACH;QAGN,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ;YACzB,oBAAC,GAAG,IAAC,YAAY,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC;gBAC1B,oBAAC,IAAI,sBAAmB;gBACxB,oBAAC,IAAI,IAAC,GAAG,EAAC,qBAAqB,EAAC,QAAQ,EAAE,KAAK;oBAC7C,oBAAC,IAAI,IAAC,KAAK,EAAC,MAAM,0BAA2B,CACxC,CACH;YACN,oBAAC,GAAG,IAAC,cAAc,EAAC,eAAe,EAAC,KAAK,EAAE,EAAE;gBAC3C,oBAAC,IAAI,IAAC,QAAQ;;oBAAU,WAAW,CAAC,OAAO,CAAQ;gBAClD,aAAa,IAAI,oBAAC,IAAI,IAAC,QAAQ,8BAAyB,CACrD,CACF,CACF,CACP,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import React, { type ReactNode } from 'react';
2
2
  type LinkProps = {
3
3
  readonly children: ReactNode;
4
4
  /**
@@ -38,6 +38,6 @@ type LinkProps = {
38
38
  */
39
39
  readonly fallback?: boolean | ((text: string, url: string) => string);
40
40
  };
41
- export declare const Link: ({ children, url, fallback }: LinkProps) => import("react/jsx-runtime").JSX.Element;
41
+ export declare const Link: ({ children, url, fallback }: LinkProps) => React.JSX.Element;
42
42
  export {};
43
43
  //# sourceMappingURL=link.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/components/link.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,KAAK,SAAS,GAAG;IACf,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAE7B;;;;;;;;;;;;QAYC;IACD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB;;;;;;;;;;;;;;;;;;;;QAoBC;IACD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;CACvE,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,6BAAoC,SAAS,4CAIjE,CAAC"}
1
+ {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/components/link.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG9C,KAAK,SAAS,GAAG;IACf,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAE7B;;;;;;;;;;;;QAYC;IACD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB;;;;;;;;;;;;;;;;;;;;QAoBC;IACD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;CACvE,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,6BAAoC,SAAS,sBAIjE,CAAC"}
@@ -1,6 +1,6 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  import { Text, Transform } from 'ink';
3
- import {} from 'react';
2
+ import React, {} from 'react';
4
3
  import terminalLink from 'terminal-link';
5
- export const Link = ({ children, url, fallback = true }) => (_jsx(Transform, { transform: (children) => terminalLink(children, url, { fallback }), children: _jsx(Text, { children: children }) }));
4
+ export const Link = ({ children, url, fallback = true }) => (React.createElement(Transform, { transform: (children) => terminalLink(children, url, { fallback }) },
5
+ React.createElement(Text, null, children)));
6
6
  //# sourceMappingURL=link.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"link.js","sourceRoot":"","sources":["../../src/components/link.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACtC,OAAO,EAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,YAAY,MAAM,eAAe,CAAC;AA4CzC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,GAAG,IAAI,EAAa,EAAE,EAAE,CAAC,CACrE,KAAC,SAAS,IAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,CAAC,YAC3E,KAAC,IAAI,cAAE,QAAQ,GAAQ,GACb,CACb,CAAC"}
1
+ {"version":3,"file":"link.js","sourceRoot":"","sources":["../../src/components/link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACtC,OAAO,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;AAC9C,OAAO,YAAY,MAAM,eAAe,CAAC;AA4CzC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,GAAG,IAAI,EAAa,EAAE,EAAE,CAAC,CACrE,oBAAC,SAAS,IAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,CAAC;IAC3E,oBAAC,IAAI,QAAE,QAAQ,CAAQ,CACb,CACb,CAAC"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { TokenSource } from './types.js';
3
+ export declare const LoginError: (props: {
4
+ tokenSource: TokenSource;
5
+ }) => React.JSX.Element;
6
+ //# sourceMappingURL=login-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login-error.d.ts","sourceRoot":"","sources":["../../../src/components/login/login-error.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG9C,eAAO,MAAM,UAAU,GAAI,OAAO;IAAE,WAAW,EAAE,WAAW,CAAA;CAAE,sBAiB7D,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { Box, Text } from 'ink';
2
+ import React from 'react';
3
+ import { UserSettingsLink } from './user-settings-link.js';
4
+ export const LoginError = (props) => {
5
+ const { tokenSource } = props;
6
+ return (React.createElement(Box, { flexDirection: "column", borderStyle: "single", paddingLeft: 1 },
7
+ React.createElement(Text, { color: "red" }, "\u2717 Login failed."),
8
+ tokenSource === 'env' && (React.createElement(Text, { dimColor: true }, "Token provided via STRAION_API_KEY environment variable.")),
9
+ React.createElement(Text, { dimColor: true }, "Try checking your Personal Access Token and internet connection, then try again."),
10
+ React.createElement(Box, null,
11
+ React.createElement(Text, { dimColor: true }, "You can find your Personal Access Token in your "),
12
+ React.createElement(UserSettingsLink, null))));
13
+ };
14
+ //# sourceMappingURL=login-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login-error.js","sourceRoot":"","sources":["../../../src/components/login/login-error.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAmC,EAAE,EAAE;IAChE,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAC9B,OAAO,CACL,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,WAAW,EAAC,QAAQ,EAAC,WAAW,EAAE,CAAC;QAC7D,oBAAC,IAAI,IAAC,KAAK,EAAC,KAAK,2BAAuB;QACvC,WAAW,KAAK,KAAK,IAAI,CACxB,oBAAC,IAAI,IAAC,QAAQ,qEAAgE,CAC/E;QACD,oBAAC,IAAI,IAAC,QAAQ,6FAEP;QACP,oBAAC,GAAG;YACF,oBAAC,IAAI,IAAC,QAAQ,6DAAwD;YACtE,oBAAC,gBAAgB,OAAG,CAChB,CACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,9 +1,15 @@
1
+ import React from 'react';
1
2
  import type { LoggedInUserFragment, OrganizationFragment } from '../../lib/graphql.js';
3
+ import type { TokenSource } from './types.js';
2
4
  interface LoginFlowProps {
3
5
  defaultPat?: string;
6
+ tokenSource: TokenSource;
7
+ skipOrgSelection?: boolean;
8
+ /** If true, the component will not call exit() after completion. Parent controls app lifecycle. */
9
+ noExit?: boolean;
4
10
  onComplete: (user: LoggedInUserFragment, org: OrganizationFragment, pat: string) => void;
5
- onError: () => void;
11
+ onError: (error?: Error) => void;
6
12
  }
7
- export declare function LoginFlow({ defaultPat, onComplete, onError }: LoginFlowProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function LoginFlow({ defaultPat, tokenSource, skipOrgSelection, onComplete, onError, }: LoginFlowProps): React.JSX.Element | null;
8
14
  export {};
9
15
  //# sourceMappingURL=login-flow.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"login-flow.d.ts","sourceRoot":"","sources":["../../../src/components/login/login-flow.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AA8EvF,UAAU,cAAc;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,oBAAoB,EAAE,GAAG,EAAE,oBAAoB,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACzF,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,SAAS,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,cAAc,2CAM5E"}
1
+ {"version":3,"file":"login-flow.d.ts","sourceRoot":"","sources":["../../../src/components/login/login-flow.tsx"],"names":[],"mappings":"AACA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAQvF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAe9C,UAAU,cAAc;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,mGAAmG;IACnG,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,CAAC,IAAI,EAAE,oBAAoB,EAAE,GAAG,EAAE,oBAAoB,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACzF,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED,wBAAgB,SAAS,CAAC,EACxB,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,OAAO,GACR,EAAE,cAAc,4BAqIhB"}