fjall 0.96.0 → 0.99.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 (228) hide show
  1. package/bin/.bundled +3 -3
  2. package/bin/.metafile.json +4742 -3402
  3. package/bin/assets/generators/application/generator.js +1 -1
  4. package/bin/assets/generators/compute/generator.js +1 -1
  5. package/bin/assets/generators/compute/service/generator.js +1 -1
  6. package/bin/assets/generators/database/generator.js +1 -1
  7. package/bin/assets/generators/domain/generator.js +2 -2
  8. package/bin/assets/generators/organisation/files/organisation/infrastructure.ts +8 -2
  9. package/bin/assets/generators/shared/files/cdk.json +1 -1
  10. package/bin/assets/generators/shared/files/package.json +8 -7
  11. package/bin/assets/generators/shared/files/tsconfig.json +5 -4
  12. package/bin/assets/generators/utils/integrationTestUtils.d.ts +9 -0
  13. package/bin/assets/generators/utils/integrationTestUtils.js +4 -2
  14. package/bin/assets/generators/utils/planning/generatorHelpers.js +2 -2
  15. package/bin/assets/src/util/__tests__/fjallApiClientTestHelpers.d.ts +9 -0
  16. package/bin/assets/src/util/__tests__/fjallApiClientTestHelpers.js +1 -0
  17. package/bin/assets/src/util/__tests__/outputTestHelpers.d.ts +9 -0
  18. package/bin/assets/src/util/__tests__/outputTestHelpers.js +1 -0
  19. package/bin/assets/src/util/agent/__tests__/toonTestHelpers.d.ts +91 -0
  20. package/bin/assets/src/util/agent/__tests__/toonTestHelpers.js +1 -0
  21. package/bin/assets/src/util/agent/actionRequired.d.ts +60 -0
  22. package/bin/assets/src/util/agent/actionRequired.js +1 -0
  23. package/bin/assets/src/util/agent/agentCallbacks.d.ts +21 -0
  24. package/bin/assets/src/util/agent/agentCallbacks.js +1 -0
  25. package/bin/assets/src/util/agent/agentInit.d.ts +17 -0
  26. package/bin/assets/src/util/agent/agentInit.js +288 -0
  27. package/bin/assets/src/util/agent/agentOutput.d.ts +61 -0
  28. package/bin/assets/src/util/agent/agentOutput.js +8 -0
  29. package/bin/assets/src/util/agent/budget.d.ts +19 -0
  30. package/bin/assets/src/util/agent/budget.js +4 -0
  31. package/bin/assets/src/util/agent/detectAgent.d.ts +51 -0
  32. package/bin/assets/src/util/agent/detectAgent.js +1 -0
  33. package/bin/assets/src/util/agent/errorCodeMap.d.ts +16 -0
  34. package/bin/assets/src/util/agent/errorCodeMap.js +1 -0
  35. package/bin/assets/src/util/agent/errorCodes.d.ts +48 -0
  36. package/bin/assets/src/util/agent/errorCodes.js +1 -0
  37. package/bin/assets/src/util/agent/fieldSelection.d.ts +22 -0
  38. package/bin/assets/src/util/agent/fieldSelection.js +1 -0
  39. package/bin/assets/src/util/agent/getSurface.d.ts +27 -0
  40. package/bin/assets/src/util/agent/getSurface.js +1 -0
  41. package/bin/assets/src/util/agent/index.d.ts +27 -0
  42. package/bin/assets/src/util/agent/index.js +1 -0
  43. package/bin/assets/src/util/agent/mcpProtocolEmit.d.ts +31 -0
  44. package/bin/assets/src/util/agent/mcpProtocolEmit.js +2 -0
  45. package/bin/assets/src/util/agent/schemas/appsSchemas.d.ts +18 -0
  46. package/bin/assets/src/util/agent/schemas/appsSchemas.js +1 -0
  47. package/bin/assets/src/util/agent/schemas/assetSchemas.d.ts +13 -0
  48. package/bin/assets/src/util/agent/schemas/assetSchemas.js +1 -0
  49. package/bin/assets/src/util/agent/schemas/awsSchemas.d.ts +5 -0
  50. package/bin/assets/src/util/agent/schemas/awsSchemas.js +1 -0
  51. package/bin/assets/src/util/agent/schemas/deploySchemas.d.ts +8 -0
  52. package/bin/assets/src/util/agent/schemas/deploySchemas.js +1 -0
  53. package/bin/assets/src/util/agent/schemas/index.d.ts +10 -0
  54. package/bin/assets/src/util/agent/schemas/index.js +1 -0
  55. package/bin/assets/src/util/agent/schemas/infraSchemas.d.ts +45 -0
  56. package/bin/assets/src/util/agent/schemas/infraSchemas.js +1 -0
  57. package/bin/assets/src/util/agent/schemas/secretsSchemas.d.ts +13 -0
  58. package/bin/assets/src/util/agent/schemas/secretsSchemas.js +1 -0
  59. package/bin/assets/src/util/agent/schemas/types.d.ts +98 -0
  60. package/bin/assets/src/util/agent/schemas/types.js +0 -0
  61. package/bin/assets/src/util/agent/schemas/userSchemas.d.ts +21 -0
  62. package/bin/assets/src/util/agent/schemas/userSchemas.js +1 -0
  63. package/bin/assets/src/util/agent/sessionHooks.d.ts +47 -0
  64. package/bin/assets/src/util/agent/sessionHooks.js +6 -0
  65. package/bin/assets/src/util/agent/streaming.d.ts +51 -0
  66. package/bin/assets/src/util/agent/streaming.js +1 -0
  67. package/bin/assets/src/util/agent/suggestionEntries/coreEntries.d.ts +2 -0
  68. package/bin/assets/src/util/agent/suggestionEntries/coreEntries.js +1 -0
  69. package/bin/assets/src/util/agent/suggestionEntries/identityEntries.d.ts +2 -0
  70. package/bin/assets/src/util/agent/suggestionEntries/identityEntries.js +1 -0
  71. package/bin/assets/src/util/agent/suggestionEntries/index.d.ts +3 -0
  72. package/bin/assets/src/util/agent/suggestionEntries/index.js +1 -0
  73. package/bin/assets/src/util/agent/suggestionEntries/infraEntries.d.ts +2 -0
  74. package/bin/assets/src/util/agent/suggestionEntries/infraEntries.js +1 -0
  75. package/bin/assets/src/util/agent/suggestionEntries/observabilityEntries.d.ts +2 -0
  76. package/bin/assets/src/util/agent/suggestionEntries/observabilityEntries.js +1 -0
  77. package/bin/assets/src/util/agent/suggestionEntries/secretsEntries.d.ts +2 -0
  78. package/bin/assets/src/util/agent/suggestionEntries/secretsEntries.js +1 -0
  79. package/bin/assets/src/util/agent/suggestionEntries/types.d.ts +17 -0
  80. package/bin/assets/src/util/agent/suggestionEntries/types.js +1 -0
  81. package/bin/assets/src/util/agent/suggestions.d.ts +30 -0
  82. package/bin/assets/src/util/agent/suggestions.js +1 -0
  83. package/bin/assets/src/util/agent/tokenScopes.d.ts +24 -0
  84. package/bin/assets/src/util/agent/tokenScopes.js +1 -0
  85. package/bin/assets/src/util/agent/toonFormatter.d.ts +55 -0
  86. package/bin/assets/src/util/agent/toonFormatter.js +14 -0
  87. package/bin/assets/src/util/api/Credentials.d.ts +13 -0
  88. package/bin/assets/src/util/api/Credentials.js +1 -0
  89. package/bin/assets/src/util/api/FjallApiClient.d.ts +33 -0
  90. package/bin/assets/src/util/api/FjallApiClient.js +1 -0
  91. package/bin/assets/src/util/api/FjallApiClient.types.d.ts +375 -0
  92. package/bin/assets/src/util/api/FjallApiClient.types.js +1 -0
  93. package/bin/assets/src/util/api/FjallApiClientBase.d.ts +13 -0
  94. package/bin/assets/src/util/api/FjallApiClientBase.js +1 -0
  95. package/bin/assets/src/util/api/FjallApiClientDeviceCode.d.ts +13 -0
  96. package/bin/assets/src/util/api/FjallApiClientDeviceCode.js +1 -0
  97. package/bin/assets/src/util/api/FjallApiClientErrors.d.ts +5 -0
  98. package/bin/assets/src/util/api/FjallApiClientErrors.js +1 -0
  99. package/bin/assets/src/util/api/FjallApiClientResources.d.ts +45 -0
  100. package/bin/assets/src/util/api/FjallApiClientResources.js +1 -0
  101. package/bin/assets/src/util/api/index.d.ts +7 -0
  102. package/bin/assets/src/util/api/index.js +1 -0
  103. package/bin/assets/src/util/api/resolveApiKey.d.ts +1 -0
  104. package/bin/assets/src/util/api/resolveApiKey.js +1 -0
  105. package/bin/assets/src/util/api/scaffoldNotification.d.ts +2 -0
  106. package/bin/assets/src/util/api/scaffoldNotification.js +1 -0
  107. package/bin/assets/src/util/awsCleanup.d.ts +9 -0
  108. package/bin/assets/src/util/awsCleanup.js +1 -0
  109. package/bin/assets/src/util/awsTags.d.ts +19 -0
  110. package/bin/assets/src/util/awsTags.js +1 -0
  111. package/bin/assets/src/util/buildxEventAdapter.d.ts +20 -0
  112. package/bin/assets/src/util/buildxEventAdapter.js +1 -0
  113. package/bin/assets/src/util/caseConversion.d.ts +1 -0
  114. package/bin/assets/src/util/caseConversion.js +1 -0
  115. package/bin/assets/src/util/codemod/emitCliTelemetry.d.ts +32 -0
  116. package/bin/assets/src/util/codemod/emitCliTelemetry.js +1 -0
  117. package/bin/assets/src/util/codemod/exitCodes.d.ts +11 -0
  118. package/bin/assets/src/util/codemod/exitCodes.js +1 -0
  119. package/bin/assets/src/util/codemod/index.d.ts +3 -0
  120. package/bin/assets/src/util/codemod/index.js +1 -0
  121. package/bin/assets/src/util/codemod/renderCodemod.d.ts +5 -0
  122. package/bin/assets/src/util/codemod/renderCodemod.js +1 -0
  123. package/bin/assets/src/util/codemod/stepLabels.d.ts +11 -0
  124. package/bin/assets/src/util/codemod/stepLabels.js +1 -0
  125. package/bin/assets/src/util/colourUtils.d.ts +21 -0
  126. package/bin/assets/src/util/colourUtils.js +1 -0
  127. package/bin/assets/src/util/commandErrorHandler.d.ts +16 -0
  128. package/bin/assets/src/util/commandErrorHandler.js +1 -0
  129. package/bin/assets/src/util/commandResult.d.ts +63 -0
  130. package/bin/assets/src/util/commandResult.js +1 -0
  131. package/bin/assets/src/util/concurrency.d.ts +35 -0
  132. package/bin/assets/src/util/concurrency.js +1 -0
  133. package/bin/assets/src/util/deploymentEvents.d.ts +155 -0
  134. package/bin/assets/src/util/deploymentEvents.js +1 -0
  135. package/bin/assets/src/util/errorDisplay.d.ts +4 -0
  136. package/bin/assets/src/util/errorDisplay.js +2 -0
  137. package/bin/assets/src/util/errorUtils.d.ts +1 -0
  138. package/bin/assets/src/util/errorUtils.js +1 -0
  139. package/bin/assets/src/util/executionMode.d.ts +18 -0
  140. package/bin/assets/src/util/executionMode.js +1 -0
  141. package/bin/assets/src/util/formatDeltaValue.d.ts +1 -0
  142. package/bin/assets/src/util/formatDeltaValue.js +1 -0
  143. package/bin/assets/src/util/formatDuration.d.ts +1 -0
  144. package/bin/assets/src/util/formatDuration.js +1 -0
  145. package/bin/assets/src/util/formatRelativeTime.d.ts +1 -0
  146. package/bin/assets/src/util/formatRelativeTime.js +1 -0
  147. package/bin/assets/src/util/fuzzyMatch.d.ts +38 -0
  148. package/bin/assets/src/util/fuzzyMatch.js +1 -0
  149. package/bin/assets/src/util/gitDetection.d.ts +8 -0
  150. package/bin/assets/src/util/gitDetection.js +1 -0
  151. package/bin/assets/src/util/index.d.ts +50 -0
  152. package/bin/assets/src/util/index.js +1 -0
  153. package/bin/assets/src/util/log.d.ts +29 -0
  154. package/bin/assets/src/util/log.js +4 -0
  155. package/bin/assets/src/util/logger/CorrelatedLogger.d.ts +15 -0
  156. package/bin/assets/src/util/logger/CorrelatedLogger.js +1 -0
  157. package/bin/assets/src/util/logger/DeploymentLogger.d.ts +33 -0
  158. package/bin/assets/src/util/logger/DeploymentLogger.js +2 -0
  159. package/bin/assets/src/util/logger/FileRotator.d.ts +17 -0
  160. package/bin/assets/src/util/logger/FileRotator.js +1 -0
  161. package/bin/assets/src/util/logger/LogFileWriter.d.ts +54 -0
  162. package/bin/assets/src/util/logger/LogFileWriter.js +4 -0
  163. package/bin/assets/src/util/logger/Logger.d.ts +43 -0
  164. package/bin/assets/src/util/logger/Logger.js +1 -0
  165. package/bin/assets/src/util/logger/index.d.ts +15 -0
  166. package/bin/assets/src/util/logger/index.js +2 -0
  167. package/bin/assets/src/util/logger/logDir.d.ts +5 -0
  168. package/bin/assets/src/util/logger/logDir.js +1 -0
  169. package/bin/assets/src/util/logger/types.d.ts +48 -0
  170. package/bin/assets/src/util/logger/types.js +1 -0
  171. package/bin/assets/src/util/nonInteractive/index.d.ts +3 -0
  172. package/bin/assets/src/util/nonInteractive/index.js +1 -0
  173. package/bin/assets/src/util/nonInteractive/nonInteractiveCallbacks.d.ts +18 -0
  174. package/bin/assets/src/util/nonInteractive/nonInteractiveCallbacks.js +1 -0
  175. package/bin/assets/src/util/nonInteractive/nonInteractiveCascadeOutput.d.ts +51 -0
  176. package/bin/assets/src/util/nonInteractive/nonInteractiveCascadeOutput.js +1 -0
  177. package/bin/assets/src/util/nonInteractive/nonInteractiveLabels.d.ts +23 -0
  178. package/bin/assets/src/util/nonInteractive/nonInteractiveLabels.js +1 -0
  179. package/bin/assets/src/util/nonInteractive/nonInteractiveOutput.d.ts +128 -0
  180. package/bin/assets/src/util/nonInteractive/nonInteractiveOutput.js +4 -0
  181. package/bin/assets/src/util/nonInteractive/nonInteractiveSummaryOutput.d.ts +29 -0
  182. package/bin/assets/src/util/nonInteractive/nonInteractiveSummaryOutput.js +3 -0
  183. package/bin/assets/src/util/organisationStructure.d.ts +9 -0
  184. package/bin/assets/src/util/organisationStructure.js +1 -0
  185. package/bin/assets/src/util/parseTakeOption.d.ts +1 -0
  186. package/bin/assets/src/util/parseTakeOption.js +1 -0
  187. package/bin/assets/src/util/passwordValidation.d.ts +22 -0
  188. package/bin/assets/src/util/passwordValidation.js +1 -0
  189. package/bin/assets/src/util/pathHelpers.d.ts +19 -0
  190. package/bin/assets/src/util/pathHelpers.js +1 -0
  191. package/bin/assets/src/util/patternDetection.d.ts +7 -0
  192. package/bin/assets/src/util/patternDetection.js +1 -0
  193. package/bin/assets/src/util/promptYesNo.d.ts +5 -0
  194. package/bin/assets/src/util/promptYesNo.js +1 -0
  195. package/bin/assets/src/util/readStdin.d.ts +9 -0
  196. package/bin/assets/src/util/readStdin.js +1 -0
  197. package/bin/assets/src/util/secretsUtils.d.ts +155 -0
  198. package/bin/assets/src/util/secretsUtils.js +3 -0
  199. package/bin/assets/src/util/signalCleanup.d.ts +13 -0
  200. package/bin/assets/src/util/signalCleanup.js +4 -0
  201. package/bin/assets/src/util/stripAnsi.d.ts +2 -0
  202. package/bin/assets/src/util/stripAnsi.js +1 -0
  203. package/bin/assets/src/util/synchronizedOutput.d.ts +26 -0
  204. package/bin/assets/src/util/synchronizedOutput.js +1 -0
  205. package/bin/assets/src/util/targetDetection.d.ts +27 -0
  206. package/bin/assets/src/util/targetDetection.js +1 -0
  207. package/bin/assets/src/util/targetHelpers.d.ts +20 -0
  208. package/bin/assets/src/util/targetHelpers.js +1 -0
  209. package/bin/assets/src/util/terminalCapabilities.d.ts +21 -0
  210. package/bin/assets/src/util/terminalCapabilities.js +1 -0
  211. package/bin/assets/src/util/terminalEscapes.d.ts +29 -0
  212. package/bin/assets/src/util/terminalEscapes.js +1 -0
  213. package/bin/assets/src/util/terminalFocus.d.ts +33 -0
  214. package/bin/assets/src/util/terminalFocus.js +1 -0
  215. package/bin/assets/src/util/theme.d.ts +80 -0
  216. package/bin/assets/src/util/theme.js +1 -0
  217. package/bin/assets/src/util/truncateMiddle.d.ts +9 -0
  218. package/bin/assets/src/util/truncateMiddle.js +1 -0
  219. package/bin/assets/src/util/typeGuards.d.ts +5 -0
  220. package/bin/assets/src/util/typeGuards.js +1 -0
  221. package/bin/assets/src/util/uiRouter.d.ts +13 -0
  222. package/bin/assets/src/util/uiRouter.js +1 -0
  223. package/bin/assets/src/util/urlHelpers.d.ts +4 -0
  224. package/bin/assets/src/util/urlHelpers.js +1 -0
  225. package/bin/assets/src/util/versionDisplay.d.ts +5 -0
  226. package/bin/assets/src/util/versionDisplay.js +1 -0
  227. package/bin/fjall.bundle.js +736 -564
  228. package/package.json +38 -35
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Shared terminal escape sequence constants.
3
+ *
4
+ * Used by cli.tsx (process.stdout.write) and ProcessManager.ts (fs.writeSync
5
+ * for signal-safe teardown). Keeping them in one place prevents drift.
6
+ */
7
+ export declare const CURSOR_HOME = "\u001B[H";
8
+ export declare const SHOW_CURSOR = "\u001B[?25h";
9
+ export declare const HIDE_CURSOR = "\u001B[?25l";
10
+ export declare const CLEAR_SCREEN = "\u001B[2J";
11
+ export declare const CLEAR_SCROLLBACK = "\u001B[3J";
12
+ export declare const ENTER_ALT_BUFFER = "\u001B[?1049h";
13
+ export declare const EXIT_ALT_BUFFER = "\u001B[?1049l";
14
+ export declare const DISABLE_MOUSE_TRACKING = "\u001B[?1000l\u001B[?1003l";
15
+ export declare const DISABLE_FOCUS_REPORTING = "\u001B[?1004l";
16
+ export declare const DISABLE_BRACKETED_PASTE = "\u001B[?2004l";
17
+ /**
18
+ * Write text to the system clipboard using the OSC 52 escape sequence.
19
+ *
20
+ * Supported by iTerm2, kitty, WezTerm, foot, and most modern terminals.
21
+ * Silently ignored by terminals that don't support it — safe to call
22
+ * unconditionally. The text is base64-encoded as required by the spec.
23
+ *
24
+ * @param text - The string to copy to the clipboard.
25
+ * @param stream - The writable stream to emit the escape on. Defaults to process.stdout.
26
+ */
27
+ export declare function writeToClipboard(text: string, stream?: {
28
+ write: (data: string) => boolean;
29
+ }): void;
@@ -0,0 +1 @@
1
+ const E="\x1B[H",e="\x1B[?25h",r="\x1B[?25l",R="\x1B[2J",b="\x1B[3J",c="\x1B[?1049h",n="\x1B[?1049l",s="\x1B[?1000l\x1B[?1003l",_="\x1B[?1004l",p="\x1B[?2004l";function S(o,t=process.stdout){const x=Buffer.from(o,"utf-8").toString("base64");t.write(`\x1B]52;c;${x}\x1B\\`)}export{R as CLEAR_SCREEN,b as CLEAR_SCROLLBACK,E as CURSOR_HOME,p as DISABLE_BRACKETED_PASTE,_ as DISABLE_FOCUS_REPORTING,s as DISABLE_MOUSE_TRACKING,c as ENTER_ALT_BUFFER,n as EXIT_ALT_BUFFER,r as HIDE_CURSOR,e as SHOW_CURSOR,S as writeToClipboard};
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Terminal focus detection.
3
+ *
4
+ * Detects whether the CLI process is foregrounded or backgrounded using
5
+ * POSIX signals (SIGTSTP/SIGCONT) instead of DEC private mode 1004 focus
6
+ * reporting. DECSET 1004 injects escape sequences (\x1b[I / \x1b[O) into
7
+ * stdin which leak into Ink's input parser as visible `[O[I` characters —
8
+ * signals avoid this entirely.
9
+ *
10
+ * Used to throttle animations when the process is suspended, reducing CPU
11
+ * usage during long-running operations like deployments.
12
+ */
13
+ type FocusChangeHandler = (focused: boolean) => void;
14
+ /**
15
+ * Enable process focus detection via POSIX signals.
16
+ * Call once at UI startup; pair with disableFocusReporting() on cleanup.
17
+ */
18
+ export declare function enableFocusReporting(): void;
19
+ /**
20
+ * Disable focus detection.
21
+ * Safe to call even if not enabled.
22
+ */
23
+ export declare function disableFocusReporting(): void;
24
+ /**
25
+ * Subscribe to focus change events.
26
+ * @returns Unsubscribe function.
27
+ */
28
+ export declare function onFocusChange(handler: FocusChangeHandler): () => void;
29
+ /** Whether the terminal currently has focus */
30
+ export declare function isTerminalFocused(): boolean;
31
+ /** Reset state for test isolation */
32
+ export declare function _resetFocusReporting(): void;
33
+ export {};
@@ -0,0 +1 @@
1
+ import{logger as u}from"./logger/index.js";let s=!1,e=!0,o=[],t,n;function l(){s||(s=!0,e=!0,t=()=>{if(!e){e=!0;for(const r of o)r(!0)}},n=()=>{if(e){e=!1;for(const r of o)r(!1)}process.once("SIGTSTP",()=>{process.kill(process.pid,"SIGTSTP")})},process.on("SIGTSTP",n),process.on("SIGCONT",t),u.debug("Terminal","Focus detection enabled (POSIX signals)"))}function c(){s&&(s=!1,e=!0,t&&(process.removeListener("SIGCONT",t),t=void 0),n&&(process.removeListener("SIGTSTP",n),n=void 0),o=[])}function p(r){return o.push(r),()=>{o=o.filter(i=>i!==r)}}function a(){return e}function d(){c(),e=!0}export{d as _resetFocusReporting,c as disableFocusReporting,l as enableFocusReporting,a as isTerminalFocused,p as onFocusChange};
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Fjall CLI Theme Configuration
3
+ * Minimal, professional design
4
+ *
5
+ * Shared by commands and UI layers. Placed in util/ to avoid
6
+ * commands → ui layer dependency.
7
+ *
8
+ * Supports standard and daltonised colour palettes for accessibility.
9
+ * Active palette is selected via FJALL_PALETTE env var or --daltonised flag.
10
+ */
11
+ /** Hex colour string — compile-time validated format */
12
+ type HexColour = `#${string}`;
13
+ /** RGB colour string */
14
+ type RGBColour = `rgb(${number},${number},${number})`;
15
+ /** ANSI 256-colour reference */
16
+ type Ansi256Colour = `ansi256(${number})`;
17
+ /** Named ANSI colour */
18
+ type AnsiColour = "black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "blackBright" | "redBright" | "greenBright" | "yellowBright" | "blueBright" | "magentaBright" | "cyanBright" | "whiteBright";
19
+ /** Union of all supported colour formats */
20
+ export type Colour = HexColour | RGBColour | Ansi256Colour | AnsiColour;
21
+ /** Palette name type */
22
+ export type PaletteName = "standard" | "daltonised";
23
+ interface ColourPalette {
24
+ primary: Colour;
25
+ fjallPink: Colour;
26
+ iconBrown: Colour;
27
+ summitBlush: Colour;
28
+ secondary: Colour;
29
+ completed: Colour;
30
+ success: Colour;
31
+ warning: Colour;
32
+ error: Colour;
33
+ info: Colour;
34
+ muted: Colour;
35
+ white: Colour;
36
+ black: Colour;
37
+ dim: Colour;
38
+ border: Colour;
39
+ deployYellow: Colour;
40
+ deployGreen: Colour;
41
+ deployText: Colour;
42
+ }
43
+ /** Get the currently active palette name */
44
+ export declare function getActivePalette(): PaletteName;
45
+ /**
46
+ * Set the active colour palette at runtime.
47
+ * Called when --daltonised flag is provided.
48
+ */
49
+ export declare function setActivePalette(palette: PaletteName): void;
50
+ /**
51
+ * The theme object.
52
+ *
53
+ * `colours` is a Proxy that resolves to the active palette at access time,
54
+ * so all 50+ files that read `theme.colours.error` automatically get the
55
+ * correct colour for the active palette without any code changes.
56
+ */
57
+ export declare const theme: Readonly<{
58
+ readonly colours: Readonly<ColourPalette>;
59
+ readonly text: {
60
+ readonly prompt: (text: string) => string;
61
+ readonly hint: (text: string) => string;
62
+ readonly error: (text: string) => string;
63
+ readonly success: (text: string) => string;
64
+ readonly warning: (text: string) => string;
65
+ };
66
+ readonly icons: {
67
+ readonly selected: "→";
68
+ readonly unselected: " ";
69
+ readonly spinner: readonly ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
70
+ };
71
+ readonly spacing: {
72
+ readonly small: 1;
73
+ readonly medium: 2;
74
+ readonly large: 3;
75
+ };
76
+ }>;
77
+ export type Theme = typeof theme;
78
+ /** Reset palette to standard for test isolation */
79
+ export declare function _resetPalette(): void;
80
+ export {};
@@ -0,0 +1 @@
1
+ const n={primary:"#0A9396",fjallPink:"#FF7BFF",iconBrown:"#78290F",summitBlush:"#FFECD1",secondary:"#47817E",completed:"#90a955",success:"#A4C2A5",warning:"#FFA500",error:"#AE2012",info:"#0A9396",muted:"#808080",white:"#E8E8EA",black:"#000000",dim:"#666666",border:"#FF7D00",deployYellow:"#F2CC8F",deployGreen:"#81B29A",deployText:"#F4F1DE"},o={primary:"#0A9396",fjallPink:"#CC79A7",iconBrown:"#78290F",summitBlush:"#FFECD1",secondary:"#47817E",completed:"#0072B2",success:"#56B4E9",warning:"#E69F00",error:"#D55E00",info:"#0A9396",muted:"#808080",white:"#E8E8EA",black:"#000000",dim:"#666666",border:"#E69F00",deployYellow:"#E69F00",deployGreen:"#56B4E9",deployText:"#F4F1DE"},a={standard:n,daltonised:o};let t="standard";function l(){return process.env.FJALL_PALETTE==="daltonised"?"daltonised":"standard"}t=l();function d(){return t}function c(e){t=e}const i=Object.freeze({colours:new Proxy(n,{get(e,r){return a[t][r]}}),text:{prompt:e=>e,hint:e=>e,error:e=>`Error: ${e}`,success:e=>e,warning:e=>`Warning: ${e}`},icons:{selected:"\u2192",unselected:" ",spinner:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},spacing:{small:1,medium:2,large:3}});function F(){t="standard"}export{F as _resetPalette,d as getActivePalette,c as setActivePalette,i as theme};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Truncate text in the middle, preserving the prefix and suffix with an
3
+ * ellipsis in between. Useful for long resource names like
4
+ * `my-app-prod-DatabaseInstance-ABCD1234EFGH` → `my-app-prod...D1234EFGH`.
5
+ *
6
+ * ANSI escape codes are stripped before measuring width but the raw input
7
+ * is sliced, so colours are preserved in the non-truncated portions.
8
+ */
9
+ export declare function truncateMiddle(text: string, maxWidth: number, ellipsis?: string): string;
@@ -0,0 +1 @@
1
+ import{stripAnsi as i}from"./stripAnsi.js";function u(n,r,e="\u2026"){const c=i(n);if(c.length<=r)return n;if(r<=e.length)return e.slice(0,r);const t=r-e.length,o=Math.ceil(t/2),f=Math.floor(t/2);return c.length!==n.length?c.slice(0,o)+e+c.slice(-f||void 0):n.slice(0,o)+e+n.slice(-f||void 0)}export{u as truncateMiddle};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Shared type guard utilities.
3
+ */
4
+ /** Check if value is a plain object with string values */
5
+ export declare function isStringRecord(value: unknown): value is Record<string, string>;
@@ -0,0 +1 @@
1
+ function e(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)&&Object.values(r).every(t=>typeof t=="string")}export{e as isStringRecord};
@@ -0,0 +1,13 @@
1
+ import { type NonInteractiveOptions } from "./executionMode.js";
2
+ import type { Screen } from "../ui/App.js";
3
+ export interface UIRouteResult {
4
+ handled: boolean;
5
+ }
6
+ /**
7
+ * Routes to interactive UI if conditions allow, otherwise returns control to CLI handler.
8
+ */
9
+ export declare function routeToUIIfInteractive(options: NonInteractiveOptions, screenName: Screen, screenOptions: Record<string, unknown>): Promise<UIRouteResult>;
10
+ /**
11
+ * Simplified version that checks extended non-interactive conditions.
12
+ */
13
+ export declare function routeToUIIfInteractiveExtended(options: NonInteractiveOptions, additionalConditions: boolean[], screenName: Screen, screenOptions: Record<string, unknown>): Promise<UIRouteResult>;
@@ -0,0 +1 @@
1
+ import{isNonInteractiveMode as i}from"./executionMode.js";import{getErrorMessage as f}from"./errorUtils.js";import{handleUIResult as m,handleCommandError as a,SilentExitError as u}from"./commandResult.js";import{logger as d}from"./logger/index.js";import{maskSensitiveOutput as l}from"@fjall/util";async function s(e,t){const{startUI:o}=await import("../ui/cli.js");try{const r=await o({screen:e,options:t});return m(r),{handled:!0}}catch(r){r instanceof u&&a(r);const n=l(f(r));n&&n!=="User force closed the prompt"&&d.error("UI",n),a(r)}}async function g(e,t,o){return i(e)?{handled:!1}:s(t,o)}async function E(e,t,o,r){return i(e)||t.some(c=>c)?{handled:!1}:s(o,r)}export{g as routeToUIIfInteractive,E as routeToUIIfInteractiveExtended};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Strips the protocol (http:// or https://) from a URL, returning just the host and path.
3
+ */
4
+ export declare function removeProtocol(url: string): string;
@@ -0,0 +1 @@
1
+ function o(e){return e.replace(/^https?:\/\//,"")}export{o as removeProtocol};
@@ -0,0 +1,5 @@
1
+ import type { InstallSource } from "../services/deployment/ReportVersionService.js";
2
+ /**
3
+ * Returns the appropriate upgrade command hint based on how the CLI was installed.
4
+ */
5
+ export declare function upgradeHint(installSource?: InstallSource): string;
@@ -0,0 +1 @@
1
+ function t(e){return e==="homebrew"?"Run `brew upgrade fjall` to update":"Run `npm update -g @fjall/cli` to update"}export{t as upgradeHint};