@cbnventures/nova 0.30.1 → 0.31.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.
Files changed (289) hide show
  1. package/build/package.json +1 -1
  2. package/build/src/cli/generate/docker-image/index.d.ts.map +1 -1
  3. package/build/src/cli/generate/docker-image/index.js +6 -5
  4. package/build/src/cli/generate/docker-image/index.js.map +1 -1
  5. package/build/src/cli/generate/must-haves/dotenv.d.ts +0 -4
  6. package/build/src/cli/generate/must-haves/dotenv.d.ts.map +1 -1
  7. package/build/src/cli/generate/must-haves/dotenv.js +7 -171
  8. package/build/src/cli/generate/must-haves/dotenv.js.map +1 -1
  9. package/build/src/cli/index.js +30 -1
  10. package/build/src/cli/index.js.map +1 -1
  11. package/build/src/cli/scaffold/app/android.d.ts +4 -1
  12. package/build/src/cli/scaffold/app/android.d.ts.map +1 -1
  13. package/build/src/cli/scaffold/app/android.js +91 -39
  14. package/build/src/cli/scaffold/app/android.js.map +1 -1
  15. package/build/src/cli/scaffold/app/apple.d.ts.map +1 -1
  16. package/build/src/cli/scaffold/app/apple.js +1 -0
  17. package/build/src/cli/scaffold/app/apple.js.map +1 -1
  18. package/build/src/cli/scaffold/app/astro.d.ts.map +1 -1
  19. package/build/src/cli/scaffold/app/astro.js +11 -3
  20. package/build/src/cli/scaffold/app/astro.js.map +1 -1
  21. package/build/src/cli/scaffold/app/cloudflare-workers.d.ts.map +1 -1
  22. package/build/src/cli/scaffold/app/cloudflare-workers.js +1 -0
  23. package/build/src/cli/scaffold/app/cloudflare-workers.js.map +1 -1
  24. package/build/src/cli/scaffold/app/discord-bot.d.ts.map +1 -1
  25. package/build/src/cli/scaffold/app/discord-bot.js +38 -0
  26. package/build/src/cli/scaffold/app/discord-bot.js.map +1 -1
  27. package/build/src/cli/scaffold/app/docker-image.d.ts.map +1 -1
  28. package/build/src/cli/scaffold/app/docker-image.js +2 -0
  29. package/build/src/cli/scaffold/app/docker-image.js.map +1 -1
  30. package/build/src/cli/scaffold/app/expressjs.d.ts.map +1 -1
  31. package/build/src/cli/scaffold/app/expressjs.js +21 -0
  32. package/build/src/cli/scaffold/app/expressjs.js.map +1 -1
  33. package/build/src/cli/scaffold/app/nextjs.d.ts.map +1 -1
  34. package/build/src/cli/scaffold/app/nextjs.js +3 -0
  35. package/build/src/cli/scaffold/app/nextjs.js.map +1 -1
  36. package/build/src/cli/scaffold/app/vite.d.ts.map +1 -1
  37. package/build/src/cli/scaffold/app/vite.js +7 -0
  38. package/build/src/cli/scaffold/app/vite.js.map +1 -1
  39. package/build/src/cli/scaffold/docs/docusaurus.d.ts.map +1 -1
  40. package/build/src/cli/scaffold/docs/docusaurus.js +3 -24
  41. package/build/src/cli/scaffold/docs/docusaurus.js.map +1 -1
  42. package/build/src/cli/scaffold/package/github-action.d.ts.map +1 -1
  43. package/build/src/cli/scaffold/package/github-action.js +7 -0
  44. package/build/src/cli/scaffold/package/github-action.js.map +1 -1
  45. package/build/src/cli/scaffold/package/homebridge.d.ts.map +1 -1
  46. package/build/src/cli/scaffold/package/homebridge.js +5 -1
  47. package/build/src/cli/scaffold/package/homebridge.js.map +1 -1
  48. package/build/src/cli/scaffold/package/node-cli.d.ts.map +1 -1
  49. package/build/src/cli/scaffold/package/node-cli.js +1 -0
  50. package/build/src/cli/scaffold/package/node-cli.js.map +1 -1
  51. package/build/src/cli/scaffold/package/pfsense.d.ts.map +1 -1
  52. package/build/src/cli/scaffold/package/pfsense.js +7 -0
  53. package/build/src/cli/scaffold/package/pfsense.js.map +1 -1
  54. package/build/src/cli/scaffold/starter/base.d.ts.map +1 -1
  55. package/build/src/cli/scaffold/starter/base.js +85 -70
  56. package/build/src/cli/scaffold/starter/base.js.map +1 -1
  57. package/build/src/lib/dotenv.d.ts +2 -1
  58. package/build/src/lib/dotenv.d.ts.map +1 -1
  59. package/build/src/lib/dotenv.js +171 -1
  60. package/build/src/lib/dotenv.js.map +1 -1
  61. package/build/src/lib/regex.d.ts +4 -1
  62. package/build/src/lib/regex.d.ts.map +1 -1
  63. package/build/src/lib/regex.js +4 -1
  64. package/build/src/lib/regex.js.map +1 -1
  65. package/build/src/lib/run-scripts.d.ts.map +1 -1
  66. package/build/src/lib/run-scripts.js +102 -19
  67. package/build/src/lib/run-scripts.js.map +1 -1
  68. package/build/src/lib/scaffold-presentation.d.ts +8 -0
  69. package/build/src/lib/scaffold-presentation.d.ts.map +1 -0
  70. package/build/src/lib/scaffold-presentation.js +272 -0
  71. package/build/src/lib/scaffold-presentation.js.map +1 -0
  72. package/build/src/lib/scaffold.d.ts +5 -3
  73. package/build/src/lib/scaffold.d.ts.map +1 -1
  74. package/build/src/lib/scaffold.js +380 -261
  75. package/build/src/lib/scaffold.js.map +1 -1
  76. package/build/src/lib/utility.d.ts +2 -2
  77. package/build/src/lib/utility.d.ts.map +1 -1
  78. package/build/src/lib/utility.js +13 -9
  79. package/build/src/lib/utility.js.map +1 -1
  80. package/build/src/types/cli/generate/docker-image/index.d.ts +3 -0
  81. package/build/src/types/cli/generate/must-haves/dotenv.d.ts +0 -146
  82. package/build/src/types/cli/scaffold/app/android.d.ts +39 -14
  83. package/build/src/types/cli/scaffold/app/apple.d.ts +3 -0
  84. package/build/src/types/cli/scaffold/app/astro.d.ts +3 -0
  85. package/build/src/types/cli/scaffold/app/cloudflare-workers.d.ts +3 -0
  86. package/build/src/types/cli/scaffold/app/discord-bot.d.ts +12 -0
  87. package/build/src/types/cli/scaffold/app/docker-image.d.ts +3 -0
  88. package/build/src/types/cli/scaffold/app/expressjs.d.ts +3 -0
  89. package/build/src/types/cli/scaffold/app/nextjs.d.ts +3 -0
  90. package/build/src/types/cli/scaffold/app/vite.d.ts +3 -0
  91. package/build/src/types/cli/scaffold/docs/docusaurus.d.ts +3 -3
  92. package/build/src/types/cli/scaffold/package/github-action.d.ts +3 -0
  93. package/build/src/types/cli/scaffold/package/homebridge.d.ts +3 -0
  94. package/build/src/types/cli/scaffold/package/node-cli.d.ts +3 -0
  95. package/build/src/types/cli/scaffold/package/pfsense.d.ts +3 -0
  96. package/build/src/types/cli/scaffold/starter/base.d.ts +41 -15
  97. package/build/src/types/lib/dotenv.d.ts +158 -0
  98. package/build/src/types/lib/regex.d.ts +15 -0
  99. package/build/src/types/lib/run-scripts.d.ts +36 -5
  100. package/build/src/types/lib/scaffold-presentation.d.ts +295 -0
  101. package/build/src/types/lib/scaffold.d.ts +323 -105
  102. package/build/src/types/lib/utility.d.ts +2 -0
  103. package/build/src/types/tests/cli/index.test.d.ts +8 -1
  104. package/build/src/types/tests/cli/scaffold/app/android.test.d.ts +36 -0
  105. package/build/src/types/tests/cli/scaffold/app/expressjs.test.d.ts +51 -0
  106. package/build/src/types/tests/cli/scaffold/app/nextjs.test.d.ts +15 -0
  107. package/build/src/types/tests/cli/scaffold/docs/docusaurus.test.d.ts +2 -2
  108. package/build/src/types/tests/cli/scaffold/starter/base.test.d.ts +73 -0
  109. package/build/src/types/tests/cli/utility/run-scripts.test.d.ts +36 -1
  110. package/build/src/types/tests/homebridge-custom-ui.test.d.ts +19 -0
  111. package/build/src/types/tests/lib/scaffold-presentation.test.d.ts +135 -0
  112. package/build/src/types/tests/lib/scaffold.test.d.ts +16 -2
  113. package/build/src/types/tests/scaffold-output-contract.test.d.ts +38 -1
  114. package/build/src/types/tests/scaffold-template-source.test.d.ts +15 -0
  115. package/build/templates/generators/docker-image/astro-node/Dockerfile +4 -4
  116. package/build/templates/generators/docker-image/nextjs-standalone/Dockerfile +4 -4
  117. package/build/templates/generators/docker-image/node/Dockerfile +5 -6
  118. package/build/templates/generators/docker-image/static-site/Dockerfile +4 -4
  119. package/build/templates/generators/github/workflows/publish/targets/docker-hub.yml +2 -2
  120. package/build/templates/generators/github/workflows/publish/targets/ghcr.yml +2 -2
  121. package/build/templates/generators/must-haves/agent-conventions/conventions/documentation.md +2 -2
  122. package/build/templates/scaffold/app/android/package.json +5 -5
  123. package/build/templates/scaffold/app/android/scripts/android-environment.mjs +74 -0
  124. package/build/templates/scaffold/app/android/scripts/run-android.mjs +82 -0
  125. package/build/templates/scaffold/app/android/scripts/run-gradle.mjs +5 -9
  126. package/build/templates/scaffold/app/apple/Sources/App.swift +9 -0
  127. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/AppIcon.appiconset/AppIcon-ios-1024.png +0 -0
  128. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/AppIcon.appiconset/AppIcon-mac-128.png +0 -0
  129. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/AppIcon.appiconset/AppIcon-mac-128@2x.png +0 -0
  130. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/AppIcon.appiconset/AppIcon-mac-16.png +0 -0
  131. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/AppIcon.appiconset/AppIcon-mac-16@2x.png +0 -0
  132. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/AppIcon.appiconset/AppIcon-mac-256.png +0 -0
  133. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/AppIcon.appiconset/AppIcon-mac-256@2x.png +0 -0
  134. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/AppIcon.appiconset/AppIcon-mac-32.png +0 -0
  135. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/AppIcon.appiconset/AppIcon-mac-32@2x.png +0 -0
  136. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/AppIcon.appiconset/AppIcon-mac-512.png +0 -0
  137. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/AppIcon.appiconset/AppIcon-mac-512@2x.png +0 -0
  138. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/AppIcon.appiconset/Contents.json +74 -0
  139. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/Contents.json +6 -0
  140. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/NovaLogo.imageset/Contents.json +16 -0
  141. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/NovaLogo.imageset/nova.svg +5 -0
  142. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/SocialFacebook.imageset/Contents.json +17 -0
  143. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/SocialFacebook.imageset/facebook.svg +1 -0
  144. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/SocialGitHub.imageset/Contents.json +17 -0
  145. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/SocialGitHub.imageset/github.svg +1 -0
  146. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/SocialGooglePlay.imageset/Contents.json +17 -0
  147. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/SocialGooglePlay.imageset/google-play.svg +1 -0
  148. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/SocialInstagram.imageset/Contents.json +17 -0
  149. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/SocialInstagram.imageset/instagram.svg +1 -0
  150. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/SocialLinkedIn.imageset/Contents.json +17 -0
  151. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/SocialLinkedIn.imageset/linkedin.svg +1 -0
  152. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/SocialX.imageset/Contents.json +17 -0
  153. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/SocialX.imageset/x.svg +1 -0
  154. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/SocialYouTube.imageset/Contents.json +17 -0
  155. package/build/templates/scaffold/app/apple/Sources/Assets.xcassets/SocialYouTube.imageset/youtube.svg +1 -0
  156. package/build/templates/scaffold/app/apple/Sources/ContentView.swift +415 -9
  157. package/build/templates/scaffold/app/apple/package.json +4 -4
  158. package/build/templates/scaffold/app/apple/project.yml +1 -0
  159. package/build/templates/scaffold/app/astro/package.json +5 -5
  160. package/build/templates/scaffold/app/astro/src/pages/index.astro +88 -5
  161. package/build/templates/scaffold/app/cloudflare-workers/package.json +7 -4
  162. package/build/templates/scaffold/app/cloudflare-workers/wrangler.toml +1 -1
  163. package/build/templates/scaffold/app/discord-bot/package.json +7 -7
  164. package/build/templates/scaffold/app/discord-bot/src/bot.test.ts +48 -0
  165. package/build/templates/scaffold/app/discord-bot/src/bot.ts +128 -0
  166. package/build/templates/scaffold/app/discord-bot/src/index.ts +12 -27
  167. package/build/templates/scaffold/app/discord-bot/src/types/bot.d.ts +34 -0
  168. package/build/templates/scaffold/app/discord-bot/src/types/bot.test.d.ts +8 -0
  169. package/build/templates/scaffold/app/discord-bot/src/types/index.d.ts +6 -0
  170. package/build/templates/scaffold/app/docker-image/package.json +5 -5
  171. package/build/templates/scaffold/app/express/package.json +7 -4
  172. package/build/templates/scaffold/app/express/src/app.test.ts +44 -0
  173. package/build/templates/scaffold/app/express/src/app.ts +72 -0
  174. package/build/templates/scaffold/app/express/src/index.ts +51 -13
  175. package/build/templates/scaffold/app/express/src/types/app.d.ts +32 -0
  176. package/build/templates/scaffold/app/express/src/types/app.test.d.ts +8 -0
  177. package/build/templates/scaffold/app/express/src/types/index.d.ts +20 -0
  178. package/build/templates/scaffold/app/nextjs/package.json +5 -2
  179. package/build/templates/scaffold/app/nextjs/src/app/globals.css +1 -9
  180. package/build/templates/scaffold/app/nextjs/src/app/layout.tsx +6 -2
  181. package/build/templates/scaffold/app/nextjs/src/app/page.tsx +87 -3
  182. package/build/templates/scaffold/app/vite/eslint.config.mts +2 -1
  183. package/build/templates/scaffold/app/vite/index.html +2 -1
  184. package/build/templates/scaffold/app/vite/package.json +5 -2
  185. package/build/templates/scaffold/docs/docusaurus/docs/customize.mdx +38 -0
  186. package/build/templates/scaffold/docs/docusaurus/docs/intro.mdx +22 -1
  187. package/build/templates/scaffold/docs/docusaurus/docusaurus.config.ts +120 -2
  188. package/build/templates/scaffold/docs/docusaurus/package.json +5 -2
  189. package/build/templates/scaffold/docs/docusaurus/sidebars.ts +4 -1
  190. package/build/templates/scaffold/docs/docusaurus/src/pages/index.tsx +109 -0
  191. package/build/templates/scaffold/docs/docusaurus/src/types/pages/index.d.ts +15 -0
  192. package/build/templates/scaffold/docs/docusaurus/static/images/nova.svg +5 -0
  193. package/build/templates/scaffold/package/github-action/package.json +6 -6
  194. package/build/templates/scaffold/package/github-action/src/index.ts +4 -4
  195. package/build/templates/scaffold/package/github-action/src/run.test.ts +56 -2
  196. package/build/templates/scaffold/package/github-action/src/run.ts +46 -2
  197. package/build/templates/scaffold/package/github-action/src/types/run.d.ts +2 -1
  198. package/build/templates/scaffold/package/homebridge/eslint.config.mts +3 -6
  199. package/build/templates/scaffold/package/homebridge/package.json +13 -13
  200. package/build/templates/scaffold/package/node-cli/bin/cli.mjs +33 -0
  201. package/build/templates/scaffold/package/node-cli/package.json +13 -10
  202. package/build/templates/scaffold/package/node-cli/src/index.ts +2 -2
  203. package/build/templates/scaffold/package/node-cli/src/program.ts +354 -19
  204. package/build/templates/scaffold/package/node-cli/src/status.test.ts +18 -0
  205. package/build/templates/scaffold/package/node-cli/src/status.ts +39 -0
  206. package/build/templates/scaffold/package/node-cli/src/types/program.d.ts +125 -0
  207. package/build/templates/scaffold/package/node-cli/src/types/status.d.ts +15 -0
  208. package/build/templates/scaffold/package/pfsense/package.json +10 -10
  209. package/build/templates/scaffold/package/pfsense/port/files/usr/local/pkg/[__WORKSPACE_NAME__].inc +14 -7
  210. package/build/templates/scaffold/package/pfsense/port/files/usr/local/pkg/[__WORKSPACE_NAME__].xml +23 -12
  211. package/build/templates/scaffold/package/pfsense/port/files/usr/local/sbin/[__WORKSPACE_NAME__] +3 -3
  212. package/build/templates/scaffold/package/pfsense/port/files/usr/local/share/pfSense-pkg-[__WORKSPACE_IDENTIFIER__]/info.xml +2 -1
  213. package/build/templates/scaffold/package/pfsense/port/pkg-descr +4 -3
  214. package/build/templates/scaffold/package/pfsense/tests/project.test.ts +32 -0
  215. package/build/templates/scaffold/package/pfsense/tests/types/project.test.d.ts +6 -0
  216. package/build/templates/scaffold-options/app/android-launchpad/app/src/main/java/[__ANDROID_PACKAGE_PATH__]/Navigation.kt +39 -0
  217. package/build/templates/scaffold-options/app/android-launchpad/app/src/main/java/[__ANDROID_PACKAGE_PATH__]/ui/main/MainScreen.kt +558 -0
  218. package/build/templates/scaffold-options/app/android-native/app/build.gradle.kts +77 -0
  219. package/build/templates/scaffold-options/app/android-native/app/proguard-rules.pro +1 -0
  220. package/build/templates/scaffold-options/app/android-native/app/src/main/AndroidManifest.xml +22 -0
  221. package/build/templates/scaffold-options/app/android-native/app/src/main/java/[__ANDROID_PACKAGE_PATH__]/MainActivity.kt +29 -0
  222. package/build/templates/scaffold-options/app/android-native/app/src/main/java/[__ANDROID_PACKAGE_PATH__]/NavigationKeys.kt +6 -0
  223. package/build/templates/scaffold-options/app/android-native/app/src/main/java/[__ANDROID_PACKAGE_PATH__]/data/DataRepository.kt +12 -0
  224. package/build/templates/scaffold-options/app/android-native/app/src/main/java/[__ANDROID_PACKAGE_PATH__]/theme/Color.kt +11 -0
  225. package/build/templates/scaffold-options/app/android-native/app/src/main/java/[__ANDROID_PACKAGE_PATH__]/theme/Theme.kt +50 -0
  226. package/build/templates/scaffold-options/app/android-native/app/src/main/java/[__ANDROID_PACKAGE_PATH__]/theme/Type.kt +36 -0
  227. package/build/templates/scaffold-options/app/android-native/app/src/main/java/[__ANDROID_PACKAGE_PATH__]/ui/main/MainScreenViewModel.kt +27 -0
  228. package/build/templates/scaffold-options/app/android-native/app/src/main/res/drawable/arrow_up_right.xml +9 -0
  229. package/build/templates/scaffold-options/app/android-native/app/src/main/res/drawable/ic_launcher_background.xml +9 -0
  230. package/build/templates/scaffold-options/app/android-native/app/src/main/res/drawable/ic_launcher_foreground.xml +3 -0
  231. package/build/templates/scaffold-options/app/android-native/app/src/main/res/drawable/nova_logo.xml +9 -0
  232. package/build/templates/scaffold-options/app/android-native/app/src/main/res/drawable/social_facebook.xml +3 -0
  233. package/build/templates/scaffold-options/app/android-native/app/src/main/res/drawable/social_github.xml +3 -0
  234. package/build/templates/scaffold-options/app/android-native/app/src/main/res/drawable/social_google_play.xml +3 -0
  235. package/build/templates/scaffold-options/app/android-native/app/src/main/res/drawable/social_instagram.xml +3 -0
  236. package/build/templates/scaffold-options/app/android-native/app/src/main/res/drawable/social_linkedin.xml +3 -0
  237. package/build/templates/scaffold-options/app/android-native/app/src/main/res/drawable/social_x.xml +3 -0
  238. package/build/templates/scaffold-options/app/android-native/app/src/main/res/drawable/social_youtube.xml +3 -0
  239. package/build/templates/scaffold-options/app/android-native/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +6 -0
  240. package/build/templates/scaffold-options/app/android-native/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +6 -0
  241. package/build/templates/scaffold-options/app/android-native/app/src/main/res/mipmap-hdpi/ic_launcher.webp +0 -0
  242. package/build/templates/scaffold-options/app/android-native/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp +0 -0
  243. package/build/templates/scaffold-options/app/android-native/app/src/main/res/mipmap-mdpi/ic_launcher.webp +0 -0
  244. package/build/templates/scaffold-options/app/android-native/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp +0 -0
  245. package/build/templates/scaffold-options/app/android-native/app/src/main/res/mipmap-xhdpi/ic_launcher.webp +0 -0
  246. package/build/templates/scaffold-options/app/android-native/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp +0 -0
  247. package/build/templates/scaffold-options/app/android-native/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp +0 -0
  248. package/build/templates/scaffold-options/app/android-native/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp +0 -0
  249. package/build/templates/scaffold-options/app/android-native/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp +0 -0
  250. package/build/templates/scaffold-options/app/android-native/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp +0 -0
  251. package/build/templates/scaffold-options/app/android-native/app/src/main/res/values/strings.xml +3 -0
  252. package/build/templates/scaffold-options/app/android-native/app/src/main/res/values/themes.xml +5 -0
  253. package/build/templates/scaffold-options/app/android-native/app/src/main/res/xml/backup_rules.xml +13 -0
  254. package/build/templates/scaffold-options/app/android-native/app/src/main/res/xml/data_extraction_rules.xml +19 -0
  255. package/build/templates/scaffold-options/app/android-native/app/src/test/java/[__ANDROID_PACKAGE_PATH__]/ui/main/MainScreenViewModelTest.kt +27 -0
  256. package/build/templates/scaffold-options/app/android-native/build.gradle.kts +6 -0
  257. package/build/templates/scaffold-options/app/android-native/gradle/libs.versions.toml +33 -0
  258. package/build/templates/scaffold-options/app/android-native/gradle/wrapper/gradle-wrapper.jar +0 -0
  259. package/build/templates/scaffold-options/app/android-native/gradle/wrapper/gradle-wrapper.properties +8 -0
  260. package/build/templates/scaffold-options/app/android-native/gradle.properties +29 -0
  261. package/build/templates/scaffold-options/app/android-native/gradlew +172 -0
  262. package/build/templates/scaffold-options/app/android-native/gradlew.bat +84 -0
  263. package/build/templates/scaffold-options/app/android-native/settings.gradle.kts +34 -0
  264. package/build/templates/scaffold-options/app/vite/framework/react/config/framework-ignore-files.ts +1 -0
  265. package/build/templates/scaffold-options/app/vite/framework/react/src/app.tsx +90 -1
  266. package/build/templates/scaffold-options/app/vite/framework/react/src/main.ts +1 -0
  267. package/build/templates/scaffold-options/app/vite/framework/react/tsconfig.json +1 -0
  268. package/build/templates/scaffold-options/app/vite/framework/svelte/config/framework-ignore-files.ts +1 -0
  269. package/build/templates/scaffold-options/app/vite/framework/svelte/src/app.svelte +72 -5
  270. package/build/templates/scaffold-options/app/vite/framework/svelte/src/main.ts +1 -0
  271. package/build/templates/scaffold-options/app/vite/framework/svelte/tsconfig.json +1 -0
  272. package/build/templates/scaffold-options/app/vite/framework/vanilla/config/framework-ignore-files.ts +1 -0
  273. package/build/templates/scaffold-options/app/vite/framework/vanilla/src/main.ts +45 -1
  274. package/build/templates/scaffold-options/app/vite/framework/vanilla/tsconfig.json +1 -0
  275. package/build/templates/scaffold-options/app/vite/framework/vue/config/framework-ignore-files.ts +1 -0
  276. package/build/templates/scaffold-options/app/vite/framework/vue/src/app.vue +186 -5
  277. package/build/templates/scaffold-options/app/vite/framework/vue/src/main.ts +1 -0
  278. package/build/templates/scaffold-options/app/vite/framework/vue/tsconfig.json +1 -0
  279. package/build/templates/scaffold-options/app/web-launchpad/public/favicon.svg +5 -0
  280. package/build/templates/scaffold-options/app/web-launchpad/public/nova-socials.svg +28 -0
  281. package/build/templates/scaffold-options/app/web-launchpad/src/styles/nova-launchpad.css +397 -0
  282. package/build/templates/scaffold-options/package/homebridge/custom-ui/config/eslint-custom-ui.ts +19 -0
  283. package/build/templates/scaffold-options/package/homebridge/custom-ui/homebridge-ui/public/index.html +206 -16
  284. package/build/templates/scaffold-options/package/homebridge/custom-ui/homebridge-ui/public/index.js +252 -2
  285. package/build/templates/scaffold-options/package/homebridge/schema-ui/config/eslint-custom-ui.ts +1 -0
  286. package/package.json +1 -1
  287. package/build/templates/scaffold/docs/docusaurus/src/pages/index.mdx +0 -8
  288. package/build/templates/scaffold/package/node-cli/src/index.test.ts +0 -15
  289. package/build/templates/scaffold-options/package/homebridge/custom-ui/homebridge-ui/public/styles.css +0 -12
@@ -1,11 +1,16 @@
1
1
  import {
2
+ endGroup,
2
3
  getInput,
4
+ info,
3
5
  setOutput,
6
+ startGroup,
7
+ summary,
4
8
  } from '@actions/core';
5
9
 
6
10
  import type {
7
11
  Run_CreateMessage_Name,
8
12
  Run_CreateMessage_Returns,
13
+ Run_Run_Message,
9
14
  Run_Run_Name,
10
15
  Run_Run_Returns,
11
16
  } from './types/run.d.ts';
@@ -36,10 +41,49 @@ export function createMessage(name: Run_CreateMessage_Name): Run_CreateMessage_R
36
41
  *
37
42
  * @since 0.0.0
38
43
  */
39
- export function run(): Run_Run_Returns {
44
+ export async function run(): Run_Run_Returns {
45
+ startGroup('Configuration');
46
+
40
47
  const name: Run_Run_Name = getInput('name', { required: true });
41
48
 
42
- setOutput('message', createMessage(name));
49
+ info('Validated the required "name" input.');
50
+ endGroup();
51
+
52
+ startGroup('Result');
53
+
54
+ const message: Run_Run_Message = createMessage(name);
55
+
56
+ setOutput('message', message);
57
+ info('Published the "message" output.');
58
+ endGroup();
59
+
60
+ if (process.env['GITHUB_STEP_SUMMARY'] === undefined) {
61
+ info('Step summaries are unavailable in this local runtime.');
62
+ } else {
63
+ await summary
64
+ .addHeading('[__WORKSPACE_TITLE__]')
65
+ .addTable([
66
+ [
67
+ {
68
+ data: 'Item',
69
+ header: true,
70
+ },
71
+ {
72
+ data: 'Result',
73
+ header: true,
74
+ },
75
+ ],
76
+ [
77
+ 'Status',
78
+ 'Completed',
79
+ ],
80
+ [
81
+ 'Output',
82
+ 'message',
83
+ ],
84
+ ])
85
+ .write();
86
+ }
43
87
 
44
88
  return;
45
89
  }
@@ -12,6 +12,7 @@ export type Run_CreateMessage_Returns = string;
12
12
  *
13
13
  * @since 0.0.0
14
14
  */
15
+ export type Run_Run_Message = string;
15
16
  export type Run_Run_Name = string;
16
17
 
17
- export type Run_Run_Returns = void;
18
+ export type Run_Run_Returns = Promise<void>;
@@ -3,11 +3,12 @@ import {
3
3
  dxIgnore,
4
4
  langJavascript,
5
5
  langTypescript,
6
- runtimeBrowser,
7
6
  runtimeNode,
8
7
  } from '@cbnventures/nova/presets/eslint';
9
8
  import { novaRules } from '@cbnventures/nova/rules/eslint';
10
9
 
10
+ import customUiPreset from './config/eslint-custom-ui.js';
11
+
11
12
  /**
12
13
  * ESLint Configuration.
13
14
  *
@@ -21,11 +22,6 @@ export default [
21
22
  ...langJavascript,
22
23
  ...langTypescript,
23
24
  ...runtimeNode,
24
- ...runtimeBrowser.map((config) => ({
25
- ...config,
26
- files: ['homebridge-ui/public/**/*.js'],
27
- name: 'custom-ui-browser',
28
- })),
29
25
  {
30
26
  name: 'custom-tsconfig',
31
27
  files: [
@@ -45,4 +41,5 @@ export default [
45
41
  },
46
42
  },
47
43
  ...novaRules,
44
+ ...customUiPreset,
48
45
  ];
@@ -1,8 +1,14 @@
1
1
  {
2
2
  "name": "[__WORKSPACE_PACKAGE_NAME__]",
3
3
  "version": "0.0.0",
4
- "type": "module",
4
+ "keywords": [
5
+ "homebridge",
6
+ "homebridge-plugin",
7
+ "homekit",
8
+ "supports-hap"
9
+ ],
5
10
  "main": "./build/index.js",
11
+ "type": "module",
6
12
  "files": [
7
13
  "build",
8
14
  "config.schema.json"
@@ -23,8 +29,12 @@
23
29
  "clean:build": "shx rm -rf ./build",
24
30
  "start": "homebridge --debug --keep-orphans --plugin-path $(pwd)"
25
31
  },
32
+ "engines": {
33
+ "homebridge": "^1.11.0 || ^2.0.0",
34
+ "node": "^22 || ^24"
35
+ },
26
36
  "dependencies": {
27
- "@cbnventures/nova": "0.30.1"
37
+ "@cbnventures/nova": "0.31.1"
28
38
  },
29
39
  "devDependencies": {
30
40
  "@types/node": "24.9.1",
@@ -33,15 +43,5 @@
33
43
  "shx": "0.4.0",
34
44
  "typescript": "6.0.3",
35
45
  "vitest": "4.1.11"
36
- },
37
- "engines": {
38
- "homebridge": "^1.11.0 || ^2.0.0",
39
- "node": "^22 || ^24"
40
- },
41
- "keywords": [
42
- "homebridge",
43
- "homebridge-plugin",
44
- "homekit",
45
- "supports-hap"
46
- ]
46
+ }
47
47
  }
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { existsSync } from 'node:fs';
4
+ import { dirname, resolve } from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+
7
+ /**
8
+ * CLI - Root.
9
+ *
10
+ * Resolves the generated package root from this stable launcher file.
11
+ * Installed and workspace-linked packages therefore share one path strategy.
12
+ *
13
+ * @since 0.0.0
14
+ */
15
+ const root = resolve(dirname(fileURLToPath(import.meta.url)), '..');
16
+
17
+ /**
18
+ * CLI - CLI.
19
+ *
20
+ * Resolves the compiled command-line entry point loaded by this launcher.
21
+ * The stable launcher remains available before the build output exists.
22
+ *
23
+ * @since 0.0.0
24
+ */
25
+ const cli = resolve(root, 'build', 'index.js');
26
+
27
+ if (existsSync(cli) === false) {
28
+ process.stderr.write('[__WORKSPACE_NAME__] has not been built yet. Run "npm run build" first.\n');
29
+
30
+ throw new Error('CLI build output not found');
31
+ }
32
+
33
+ await import(cli);
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "[__WORKSPACE_PACKAGE_NAME__]",
3
3
  "version": "0.0.0",
4
- "type": "module",
5
- "bin": {
6
- "[__WORKSPACE_NAME__]": "./build/index.js"
7
- },
4
+ "description": "[__WORKSPACE_TITLE__] command-line interface",
8
5
  "main": "./build/index.js",
9
- "types": "./build/index.d.ts",
6
+ "type": "module",
10
7
  "files": [
8
+ "bin",
11
9
  "build"
12
10
  ],
11
+ "bin": {
12
+ "[__WORKSPACE_NAME__]": "./bin/cli.mjs"
13
+ },
13
14
  "scripts": {
14
15
  "dev": "nova utility run-scripts --parallel --node-env development 'dev:*'",
15
16
  "dev:start": "tsx src/index.ts",
@@ -22,12 +23,16 @@
22
23
  "build": "nova utility run-scripts --sequential --node-env production 'build:*'",
23
24
  "build:reset": "shx rm -rf ./build",
24
25
  "build:transpile": "nova utility transpile --project tsconfig.source.json",
25
- "build:permissions": "shx chmod +x ./build/index.js",
26
+ "build:permissions": "shx chmod +x ./bin/cli.mjs ./build/index.js",
26
27
  "clean": "nova utility run-scripts --parallel 'clean:*'",
27
28
  "clean:build": "shx rm -rf ./build"
28
29
  },
30
+ "engines": {
31
+ "node": "^22 || ^24"
32
+ },
29
33
  "dependencies": {
30
- "@cbnventures/nova": "0.30.1",
34
+ "@cbnventures/nova": "0.31.1",
35
+ "chalk": "5.6.2",
31
36
  "commander": "15.0.0"
32
37
  },
33
38
  "devDependencies": {
@@ -38,7 +43,5 @@
38
43
  "typescript": "6.0.3",
39
44
  "vitest": "4.1.11"
40
45
  },
41
- "engines": {
42
- "node": "^22 || ^24"
43
- }
46
+ "types": "./build/index.d.ts"
44
47
  }
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { createProgram } from './program.js';
3
+ import { CLI } from './program.js';
4
4
 
5
- await createProgram().parseAsync();
5
+ await new CLI().run();
@@ -1,30 +1,365 @@
1
- import { CLIHeader } from '@cbnventures/nova/toolkit';
1
+ import {
2
+ CLIHeader,
3
+ Logger,
4
+ } from '@cbnventures/nova/toolkit';
5
+ import chalk from 'chalk';
2
6
  import { Command } from 'commander';
3
7
 
8
+ import packageJson from '../package.json' with { type: 'json' };
9
+ import { runStatus } from './status.js';
10
+
11
+ import type {
12
+ Program_CLI_ExecuteCommand_CommandLabel,
13
+ Program_CLI_ExecuteCommand_Returns,
14
+ Program_CLI_ExecuteCommand_Target,
15
+ Program_CLI_GetCommandUsage_AliasCommand,
16
+ Program_CLI_GetCommandUsage_AliasLine,
17
+ Program_CLI_GetCommandUsage_Command,
18
+ Program_CLI_GetCommandUsage_CommandAliases,
19
+ Program_CLI_GetCommandUsage_CommandName,
20
+ Program_CLI_GetCommandUsage_CommandUsage,
21
+ Program_CLI_GetCommandUsage_FullCommand,
22
+ Program_CLI_GetCommandUsage_FullLine,
23
+ Program_CLI_GetCommandUsage_ParentCommand,
24
+ Program_CLI_GetCommandUsage_ParentCommandAliases,
25
+ Program_CLI_GetCommandUsage_ParentCommandName,
26
+ Program_CLI_GetCommandUsage_Returns,
27
+ Program_CLI_GetCommandUsage_UsagePipeSeparator,
28
+ Program_CLI_GetHeader_Returns,
29
+ Program_CLI_GetSubcommandTerm_Category,
30
+ Program_CLI_GetSubcommandTerm_CategoryPipeSeparator,
31
+ Program_CLI_GetSubcommandTerm_Command,
32
+ Program_CLI_GetSubcommandTerm_Names,
33
+ Program_CLI_GetSubcommandTerm_Returns,
34
+ Program_CLI_GetSubcommandTerm_Usage,
35
+ Program_CLI_HandleCliError_ProcessedText,
36
+ Program_CLI_HandleCliError_Returns,
37
+ Program_CLI_HandleCliError_Text,
38
+ Program_CLI_Program,
39
+ Program_CLI_RegisterCommands_Returns,
40
+ Program_CLI_RegisterCommands_Status,
41
+ Program_CLI_Run_CommandArguments,
42
+ Program_CLI_Run_Returns,
43
+ Program_CLI_StyleText_CategoryFunctions,
44
+ Program_CLI_StyleText_CategoryStyles,
45
+ Program_CLI_StyleText_ColoredText,
46
+ Program_CLI_StyleText_Returns,
47
+ Program_CLI_StyleText_Text,
48
+ Program_CLI_StyleText_TitleFunctions,
49
+ Program_CLI_StyleText_TitleStyles,
50
+ Program_CLI_StyleText_Type,
51
+ } from './types/program.d.ts';
52
+
4
53
  /**
5
- * Program - Create Program.
6
- *
7
- * Creates the generated command-line program and its starter action.
8
- * Consumers can add commands and options to the returned Commander instance.
54
+ * Program.
9
55
  *
10
- * @returns {Command}
56
+ * Owns the generated command-line interface, its help presentation, and the
57
+ * command lifecycle shared by every registered command.
11
58
  *
12
59
  * @since 0.0.0
13
60
  */
14
- export function createProgram(): Command {
15
- return new Command()
16
- .name('[__WORKSPACE_NAME__]')
17
- .description('[__WORKSPACE_TITLE__] command-line interface')
18
- .version('0.0.0')
19
- .action(() => {
20
- process.stdout.write(`${CLIHeader.render([
21
- '[__WORKSPACE_TITLE__]',
22
- 'Ready',
23
- ], {
24
- marginBottom: 1,
25
- width: 64,
26
- })}\n`);
61
+ export class CLI {
62
+ /**
63
+ * Program - Program.
64
+ *
65
+ * Holds the Commander instance that owns registered commands and help output.
66
+ * The instance remains private so one class controls command presentation.
67
+ *
68
+ * @private
69
+ *
70
+ * @since 0.0.0
71
+ */
72
+ readonly #program: Program_CLI_Program = new Command();
73
+
74
+ /**
75
+ * Program - Constructor.
76
+ *
77
+ * Configures Nova-style help, error handling, and the starter command.
78
+ * Command registration happens after the shared presentation is ready.
79
+ *
80
+ * @since 0.0.0
81
+ */
82
+ public constructor() {
83
+ this.#program
84
+ .name(packageJson['name'])
85
+ .usage('<command> [options]')
86
+ .description(packageJson['description'])
87
+ .version(packageJson['version'])
88
+ .commandsGroup('Commands:')
89
+ .configureOutput({
90
+ writeErr: (text) => process.stdout.write(text),
91
+ outputError: (text) => this.handleCliError(text),
92
+ })
93
+ .configureHelp({
94
+ commandDescription: () => '',
95
+ commandUsage: (command) => this.getCommandUsage(command),
96
+ styleDescriptionText: (text) => this.styleText('description', text),
97
+ styleTitle: (text) => this.styleText('title', text),
98
+ subcommandTerm: (command) => this.getSubcommandTerm(command),
99
+ })
100
+ .addHelpText('beforeAll', this.getHeader())
101
+ .helpCommand(false)
102
+ .helpOption('-h, --help', 'Display the help menu')
103
+ .allowExcessArguments(false)
104
+ .showHelpAfterError();
105
+
106
+ this.registerCommands();
107
+
108
+ return;
109
+ }
110
+
111
+ /**
112
+ * Program - Run.
113
+ *
114
+ * Parses command-line arguments and dispatches the selected command.
115
+ * Consumers call this method only from the executable entry point.
116
+ *
117
+ * @param {Program_CLI_Run_CommandArguments} commandArguments - Command arguments.
118
+ *
119
+ * @returns {Program_CLI_Run_Returns}
120
+ *
121
+ * @since 0.0.0
122
+ */
123
+ public async run(commandArguments: Program_CLI_Run_CommandArguments = process.argv): Program_CLI_Run_Returns {
124
+ await this.#program.parseAsync(commandArguments);
125
+
126
+ return;
127
+ }
128
+
129
+ /**
130
+ * Program - Register Commands.
131
+ *
132
+ * Registers the starter command. Add new commands here and dispatch them
133
+ * through executeCommand so every command uses the same presentation.
134
+ *
135
+ * @private
136
+ *
137
+ * @returns {Program_CLI_RegisterCommands_Returns}
138
+ *
139
+ * @since 0.0.0
140
+ */
141
+ private registerCommands(): Program_CLI_RegisterCommands_Returns {
142
+ const status: Program_CLI_RegisterCommands_Status = this.#program
143
+ .command('status')
144
+ .usage('[options]')
145
+ .description('Confirm that the generated command is ready')
146
+ .helpCommand(false);
147
+
148
+ status.action(async () => {
149
+ await this.executeCommand(runStatus);
27
150
 
28
151
  return;
29
152
  });
153
+
154
+ return;
155
+ }
156
+
157
+ /**
158
+ * Program - Execute Command.
159
+ *
160
+ * Prints the shared header and current-command label before invoking a target.
161
+ * Every registered command passes through this lifecycle for consistent output.
162
+ *
163
+ * @param {Program_CLI_ExecuteCommand_Target} target - Target.
164
+ *
165
+ * @private
166
+ *
167
+ * @returns {Program_CLI_ExecuteCommand_Returns}
168
+ *
169
+ * @since 0.0.0
170
+ */
171
+ private async executeCommand(target: Program_CLI_ExecuteCommand_Target): Program_CLI_ExecuteCommand_Returns {
172
+ const commandLabel: Program_CLI_ExecuteCommand_CommandLabel = [
173
+ this.#program.name(),
174
+ ...process.argv.slice(2),
175
+ ].join(' ');
176
+
177
+ process.stdout.write(`${this.getHeader()}\n`);
178
+ process.stdout.write(`${chalk.bold.bgBlue('CURRENTLY RUNNING:')} ${commandLabel}\n\n`);
179
+
180
+ await target();
181
+
182
+ return;
183
+ }
184
+
185
+ /**
186
+ * Program - Get Header.
187
+ *
188
+ * Renders package metadata in the fixed-width Nova CLI header.
189
+ * Help output and command execution share the exact same banner.
190
+ *
191
+ * @private
192
+ *
193
+ * @returns {Program_CLI_GetHeader_Returns}
194
+ *
195
+ * @since 0.0.0
196
+ */
197
+ private getHeader(): Program_CLI_GetHeader_Returns {
198
+ return CLIHeader.render(
199
+ [
200
+ chalk.yellowBright.bold(`${packageJson['name']} v${packageJson['version']}`),
201
+ chalk.redBright.italic(packageJson['description']),
202
+ ],
203
+ {
204
+ align: 'center',
205
+ marginBottom: 1,
206
+ marginTop: 0,
207
+ paddingX: 1,
208
+ paddingY: 0,
209
+ style: 'round',
210
+ width: 50,
211
+ },
212
+ );
213
+ }
214
+
215
+ /**
216
+ * Program - Get Command Usage.
217
+ *
218
+ * Builds a full usage path for root and nested commands.
219
+ * Aliases receive a second path only when they differ from command names.
220
+ *
221
+ * @param {Program_CLI_GetCommandUsage_Command} command - Command.
222
+ *
223
+ * @private
224
+ *
225
+ * @returns {Program_CLI_GetCommandUsage_Returns}
226
+ *
227
+ * @since 0.0.0
228
+ */
229
+ private getCommandUsage(command: Program_CLI_GetCommandUsage_Command): Program_CLI_GetCommandUsage_Returns {
230
+ const commandName: Program_CLI_GetCommandUsage_CommandName = command.name();
231
+ const commandAliases: Program_CLI_GetCommandUsage_CommandAliases = command.aliases();
232
+ const commandUsage: Program_CLI_GetCommandUsage_CommandUsage = command.usage();
233
+ const fullCommand: Program_CLI_GetCommandUsage_FullCommand = [
234
+ this.styleText('usage', commandUsage),
235
+ commandName,
236
+ ];
237
+ const usagePipeSeparator: Program_CLI_GetCommandUsage_UsagePipeSeparator = this.styleText('usage', '|');
238
+ const aliasCommand: Program_CLI_GetCommandUsage_AliasCommand = [
239
+ this.styleText('usage', commandUsage),
240
+ ...(commandAliases.length > 0) ? [commandAliases.join(usagePipeSeparator)] : [commandName],
241
+ ];
242
+
243
+ let parentCommand: Program_CLI_GetCommandUsage_ParentCommand = command.parent;
244
+
245
+ while (parentCommand !== null) {
246
+ const parentCommandName: Program_CLI_GetCommandUsage_ParentCommandName = parentCommand.name();
247
+ const parentCommandAliases: Program_CLI_GetCommandUsage_ParentCommandAliases = parentCommand.aliases();
248
+
249
+ fullCommand.push(parentCommandName);
250
+
251
+ aliasCommand.push((parentCommandAliases.length > 0) ? parentCommandAliases.join(usagePipeSeparator) : parentCommandName);
252
+
253
+ parentCommand = parentCommand.parent;
254
+ }
255
+
256
+ const fullLine: Program_CLI_GetCommandUsage_FullLine = fullCommand.reverse().join(' ');
257
+ const aliasLine: Program_CLI_GetCommandUsage_AliasLine = aliasCommand.reverse().join(' ');
258
+
259
+ if (fullLine === aliasLine) {
260
+ return fullLine;
261
+ }
262
+
263
+ return [
264
+ fullLine,
265
+ aliasLine,
266
+ ].join('\n ');
267
+ }
268
+
269
+ /**
270
+ * Program - Get Subcommand Term.
271
+ *
272
+ * Formats one command and its aliases for the help listing.
273
+ * Top-level and nested commands receive their matching category style.
274
+ *
275
+ * @param {Program_CLI_GetSubcommandTerm_Command} command - Command.
276
+ *
277
+ * @private
278
+ *
279
+ * @returns {Program_CLI_GetSubcommandTerm_Returns}
280
+ *
281
+ * @since 0.0.0
282
+ */
283
+ private getSubcommandTerm(command: Program_CLI_GetSubcommandTerm_Command): Program_CLI_GetSubcommandTerm_Returns {
284
+ const category: Program_CLI_GetSubcommandTerm_Category = (command.parent !== null && command.parent.parent === null) ? 'commands' : 'subcommands';
285
+ const categoryPipeSeparator: Program_CLI_GetSubcommandTerm_CategoryPipeSeparator = this.styleText(category, '|');
286
+ const names: Program_CLI_GetSubcommandTerm_Names = [
287
+ command.name(),
288
+ ...command.aliases(),
289
+ ].join(categoryPipeSeparator);
290
+ const usage: Program_CLI_GetSubcommandTerm_Usage = command.usage();
291
+
292
+ return (usage !== '') ? `${names} ${this.styleText(category, usage)}` : names;
293
+ }
294
+
295
+ /**
296
+ * Program - Style Text.
297
+ *
298
+ * Applies Nova's help colors to categories and section titles.
299
+ * Chalk automatically falls back to plain text for non-interactive output.
300
+ *
301
+ * @param {Program_CLI_StyleText_Type} type - Type.
302
+ * @param {Program_CLI_StyleText_Text} text - Text.
303
+ *
304
+ * @private
305
+ *
306
+ * @returns {Program_CLI_StyleText_Returns}
307
+ *
308
+ * @since 0.0.0
309
+ */
310
+ private styleText(type: Program_CLI_StyleText_Type, text: Program_CLI_StyleText_Text): Program_CLI_StyleText_Returns {
311
+ const categoryStyles: Program_CLI_StyleText_CategoryStyles = {
312
+ commands: [chalk.blue],
313
+ description: [chalk.dim],
314
+ subcommands: [chalk.magenta],
315
+ title: [chalk.bold],
316
+ usage: [chalk.green],
317
+ };
318
+ const titleStyles: Program_CLI_StyleText_TitleStyles = {
319
+ 'Commands:': [chalk.blue],
320
+ 'Options:': [chalk.cyan],
321
+ 'Subcommands:': [chalk.magenta],
322
+ 'Usage:': [chalk.green],
323
+ };
324
+ const categoryFunctions: Program_CLI_StyleText_CategoryFunctions = Reflect.get(categoryStyles, type) ?? [];
325
+ const titleFunctions: Program_CLI_StyleText_TitleFunctions = Reflect.get(titleStyles, text) ?? [];
326
+
327
+ let coloredText: Program_CLI_StyleText_ColoredText = text;
328
+
329
+ for (const categoryFunction of categoryFunctions) {
330
+ coloredText = categoryFunction(coloredText);
331
+ }
332
+
333
+ if (type === 'title') {
334
+ for (const titleFunction of titleFunctions) {
335
+ coloredText = titleFunction(coloredText);
336
+ }
337
+ }
338
+
339
+ return coloredText;
340
+ }
341
+
342
+ /**
343
+ * Program - Handle CLI Error.
344
+ *
345
+ * Removes Commander's prefix and reports the cleaned message through Nova's
346
+ * logger. The first letter is capitalized to match other Nova diagnostics.
347
+ *
348
+ * @param {Program_CLI_HandleCliError_Text} text - Text.
349
+ *
350
+ * @private
351
+ *
352
+ * @returns {Program_CLI_HandleCliError_Returns}
353
+ *
354
+ * @since 0.0.0
355
+ */
356
+ private handleCliError(text: Program_CLI_HandleCliError_Text): Program_CLI_HandleCliError_Returns {
357
+ let processedText: Program_CLI_HandleCliError_ProcessedText = text.replace('error: ', '').trim();
358
+
359
+ processedText = `${processedText.charAt(0).toUpperCase()}${processedText.slice(1)}`;
360
+
361
+ Logger.error(processedText);
362
+
363
+ return;
364
+ }
30
365
  }
@@ -0,0 +1,18 @@
1
+ import { strictEqual } from 'node:assert/strict';
2
+
3
+ import {
4
+ describe,
5
+ it,
6
+ } from 'vitest';
7
+
8
+ import { createStatusMessage } from './status.js';
9
+
10
+ describe('createStatusMessage', () => {
11
+ it('returns the starter command result', () => {
12
+ strictEqual(createStatusMessage(), 'Your command is ready.');
13
+
14
+ return;
15
+ });
16
+
17
+ return;
18
+ });
@@ -0,0 +1,39 @@
1
+ import { Logger } from '@cbnventures/nova/toolkit';
2
+
3
+ import type {
4
+ Status_CreateStatusMessage_Returns,
5
+ Status_RunStatus_Message,
6
+ Status_RunStatus_Returns,
7
+ } from './types/status.d.ts';
8
+
9
+ /**
10
+ * Status - Create Status Message.
11
+ *
12
+ * Creates the starter command result independently from terminal output.
13
+ * Replace this function with the first real behavior of the generated CLI.
14
+ *
15
+ * @returns {Status_CreateStatusMessage_Returns}
16
+ *
17
+ * @since 0.0.0
18
+ */
19
+ export function createStatusMessage(): Status_CreateStatusMessage_Returns {
20
+ return 'Your command is ready.';
21
+ }
22
+
23
+ /**
24
+ * Status - Run Status.
25
+ *
26
+ * Writes the starter command result through Nova's shared logger.
27
+ * Future commands can preserve this boundary while replacing the message.
28
+ *
29
+ * @returns {Status_RunStatus_Returns}
30
+ *
31
+ * @since 0.0.0
32
+ */
33
+ export function runStatus(): Status_RunStatus_Returns {
34
+ const message: Status_RunStatus_Message = createStatusMessage();
35
+
36
+ Logger.info(message);
37
+
38
+ return;
39
+ }