balena-cli 19.1.1 → 19.1.2

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 (354) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/build/app.js +1 -1
  3. package/build/app.js.map +1 -1
  4. package/build/commands/api-key/generate.d.ts +1 -1
  5. package/build/commands/api-key/generate.js +1 -2
  6. package/build/commands/api-key/generate.js.map +1 -1
  7. package/build/commands/api-key/revoke.d.ts +1 -1
  8. package/build/commands/api-key/revoke.js +1 -2
  9. package/build/commands/api-key/revoke.js.map +1 -1
  10. package/build/commands/api-keys/index.d.ts +1 -1
  11. package/build/commands/api-keys/index.js +1 -2
  12. package/build/commands/api-keys/index.js.map +1 -1
  13. package/build/commands/app/create.d.ts +1 -1
  14. package/build/commands/app/create.js +1 -2
  15. package/build/commands/app/create.js.map +1 -1
  16. package/build/commands/block/create.d.ts +1 -1
  17. package/build/commands/block/create.js +1 -2
  18. package/build/commands/block/create.js.map +1 -1
  19. package/build/commands/build/index.d.ts +1 -1
  20. package/build/commands/build/index.js +5 -4
  21. package/build/commands/build/index.js.map +1 -1
  22. package/build/commands/config/generate.d.ts +1 -1
  23. package/build/commands/config/generate.js +1 -2
  24. package/build/commands/config/generate.js.map +1 -1
  25. package/build/commands/config/inject.d.ts +1 -1
  26. package/build/commands/config/inject.js +1 -2
  27. package/build/commands/config/inject.js.map +1 -1
  28. package/build/commands/config/read.d.ts +1 -1
  29. package/build/commands/config/read.js +2 -2
  30. package/build/commands/config/read.js.map +1 -1
  31. package/build/commands/config/reconfigure.d.ts +1 -1
  32. package/build/commands/config/reconfigure.js +1 -2
  33. package/build/commands/config/reconfigure.js.map +1 -1
  34. package/build/commands/config/write.d.ts +1 -1
  35. package/build/commands/config/write.js +1 -2
  36. package/build/commands/config/write.js.map +1 -1
  37. package/build/commands/deploy/index.d.ts +1 -1
  38. package/build/commands/deploy/index.js +3 -3
  39. package/build/commands/deploy/index.js.map +1 -1
  40. package/build/commands/device/deactivate.d.ts +1 -1
  41. package/build/commands/device/deactivate.js +1 -2
  42. package/build/commands/device/deactivate.js.map +1 -1
  43. package/build/commands/device/identify.d.ts +1 -1
  44. package/build/commands/device/identify.js +1 -2
  45. package/build/commands/device/identify.js.map +1 -1
  46. package/build/commands/device/index.d.ts +1 -1
  47. package/build/commands/device/index.js +1 -2
  48. package/build/commands/device/index.js.map +1 -1
  49. package/build/commands/device/init.d.ts +1 -1
  50. package/build/commands/device/init.js +3 -3
  51. package/build/commands/device/init.js.map +1 -1
  52. package/build/commands/device/list.d.ts +1 -1
  53. package/build/commands/device/list.js +2 -2
  54. package/build/commands/device/list.js.map +1 -1
  55. package/build/commands/device/local-mode.d.ts +1 -1
  56. package/build/commands/device/local-mode.js +1 -2
  57. package/build/commands/device/local-mode.js.map +1 -1
  58. package/build/commands/device/move.d.ts +1 -1
  59. package/build/commands/device/move.js +1 -2
  60. package/build/commands/device/move.js.map +1 -1
  61. package/build/commands/device/os-update.d.ts +1 -1
  62. package/build/commands/device/os-update.js +1 -2
  63. package/build/commands/device/os-update.js.map +1 -1
  64. package/build/commands/device/pin.d.ts +1 -1
  65. package/build/commands/device/pin.js +1 -2
  66. package/build/commands/device/pin.js.map +1 -1
  67. package/build/commands/device/public-url.d.ts +1 -1
  68. package/build/commands/device/public-url.js +1 -2
  69. package/build/commands/device/public-url.js.map +1 -1
  70. package/build/commands/device/purge.d.ts +1 -1
  71. package/build/commands/device/purge.js +1 -2
  72. package/build/commands/device/purge.js.map +1 -1
  73. package/build/commands/device/reboot.d.ts +1 -1
  74. package/build/commands/device/reboot.js +1 -2
  75. package/build/commands/device/reboot.js.map +1 -1
  76. package/build/commands/device/register.d.ts +1 -1
  77. package/build/commands/device/register.js +1 -2
  78. package/build/commands/device/register.js.map +1 -1
  79. package/build/commands/device/rename.d.ts +1 -1
  80. package/build/commands/device/rename.js +1 -2
  81. package/build/commands/device/rename.js.map +1 -1
  82. package/build/commands/device/restart.d.ts +1 -1
  83. package/build/commands/device/restart.js +1 -2
  84. package/build/commands/device/restart.js.map +1 -1
  85. package/build/commands/device/rm.d.ts +1 -1
  86. package/build/commands/device/rm.js +1 -2
  87. package/build/commands/device/rm.js.map +1 -1
  88. package/build/commands/device/shutdown.d.ts +1 -1
  89. package/build/commands/device/shutdown.js +1 -2
  90. package/build/commands/device/shutdown.js.map +1 -1
  91. package/build/commands/device/start-service.d.ts +1 -1
  92. package/build/commands/device/start-service.js +1 -2
  93. package/build/commands/device/start-service.js.map +1 -1
  94. package/build/commands/device/stop-service.d.ts +1 -1
  95. package/build/commands/device/stop-service.js +1 -2
  96. package/build/commands/device/stop-service.js.map +1 -1
  97. package/build/commands/device/track-fleet.d.ts +1 -1
  98. package/build/commands/device/track-fleet.js +1 -2
  99. package/build/commands/device/track-fleet.js.map +1 -1
  100. package/build/commands/devices/supported.d.ts +1 -1
  101. package/build/commands/devices/supported.js +1 -2
  102. package/build/commands/devices/supported.js.map +1 -1
  103. package/build/commands/env/add.d.ts +1 -1
  104. package/build/commands/env/add.js +3 -3
  105. package/build/commands/env/add.js.map +1 -1
  106. package/build/commands/env/rename.d.ts +1 -1
  107. package/build/commands/env/rename.js +3 -3
  108. package/build/commands/env/rename.js.map +1 -1
  109. package/build/commands/env/rm.d.ts +1 -1
  110. package/build/commands/env/rm.js +3 -3
  111. package/build/commands/env/rm.js.map +1 -1
  112. package/build/commands/envs/index.d.ts +1 -1
  113. package/build/commands/envs/index.js +3 -3
  114. package/build/commands/envs/index.js.map +1 -1
  115. package/build/commands/fleet/create.d.ts +1 -1
  116. package/build/commands/fleet/create.js +1 -2
  117. package/build/commands/fleet/create.js.map +1 -1
  118. package/build/commands/fleet/index.d.ts +1 -1
  119. package/build/commands/fleet/index.js +1 -2
  120. package/build/commands/fleet/index.js.map +1 -1
  121. package/build/commands/fleet/pin.d.ts +1 -1
  122. package/build/commands/fleet/pin.js +1 -2
  123. package/build/commands/fleet/pin.js.map +1 -1
  124. package/build/commands/fleet/purge.d.ts +1 -1
  125. package/build/commands/fleet/purge.js +2 -2
  126. package/build/commands/fleet/purge.js.map +1 -1
  127. package/build/commands/fleet/rename.d.ts +1 -1
  128. package/build/commands/fleet/rename.js +1 -2
  129. package/build/commands/fleet/rename.js.map +1 -1
  130. package/build/commands/fleet/restart.d.ts +1 -1
  131. package/build/commands/fleet/restart.js +2 -2
  132. package/build/commands/fleet/restart.js.map +1 -1
  133. package/build/commands/fleet/rm.d.ts +1 -1
  134. package/build/commands/fleet/rm.js +2 -2
  135. package/build/commands/fleet/rm.js.map +1 -1
  136. package/build/commands/fleet/track-latest.d.ts +1 -1
  137. package/build/commands/fleet/track-latest.js +1 -2
  138. package/build/commands/fleet/track-latest.js.map +1 -1
  139. package/build/commands/fleets/index.d.ts +1 -1
  140. package/build/commands/fleets/index.js +2 -2
  141. package/build/commands/fleets/index.js.map +1 -1
  142. package/build/commands/internal/osinit.d.ts +1 -1
  143. package/build/commands/internal/osinit.js +1 -2
  144. package/build/commands/internal/osinit.js.map +1 -1
  145. package/build/commands/join/index.d.ts +1 -1
  146. package/build/commands/join/index.js +3 -3
  147. package/build/commands/join/index.js.map +1 -1
  148. package/build/commands/key/add.d.ts +1 -2
  149. package/build/commands/key/add.js +1 -6
  150. package/build/commands/key/add.js.map +1 -1
  151. package/build/commands/key/index.d.ts +1 -1
  152. package/build/commands/key/index.js +1 -2
  153. package/build/commands/key/index.js.map +1 -1
  154. package/build/commands/key/rm.d.ts +1 -1
  155. package/build/commands/key/rm.js +1 -2
  156. package/build/commands/key/rm.js.map +1 -1
  157. package/build/commands/keys/index.d.ts +1 -1
  158. package/build/commands/keys/index.js +2 -2
  159. package/build/commands/keys/index.js.map +1 -1
  160. package/build/commands/leave/index.d.ts +1 -1
  161. package/build/commands/leave/index.js +3 -3
  162. package/build/commands/leave/index.js.map +1 -1
  163. package/build/commands/local/configure.d.ts +1 -1
  164. package/build/commands/local/configure.js +1 -2
  165. package/build/commands/local/configure.js.map +1 -1
  166. package/build/commands/local/flash.d.ts +1 -1
  167. package/build/commands/local/flash.js +1 -2
  168. package/build/commands/local/flash.js.map +1 -1
  169. package/build/commands/login/index.d.ts +1 -1
  170. package/build/commands/login/index.js +1 -2
  171. package/build/commands/login/index.js.map +1 -1
  172. package/build/commands/logout/index.d.ts +1 -1
  173. package/build/commands/logout/index.js +2 -2
  174. package/build/commands/logout/index.js.map +1 -1
  175. package/build/commands/logs/index.d.ts +1 -1
  176. package/build/commands/logs/index.js +3 -3
  177. package/build/commands/logs/index.js.map +1 -1
  178. package/build/commands/notes/index.d.ts +1 -2
  179. package/build/commands/notes/index.js +4 -6
  180. package/build/commands/notes/index.js.map +1 -1
  181. package/build/commands/orgs/index.d.ts +1 -1
  182. package/build/commands/orgs/index.js +2 -2
  183. package/build/commands/orgs/index.js.map +1 -1
  184. package/build/commands/os/build-config.d.ts +1 -1
  185. package/build/commands/os/build-config.js +1 -2
  186. package/build/commands/os/build-config.js.map +1 -1
  187. package/build/commands/os/configure.d.ts +1 -1
  188. package/build/commands/os/configure.js +3 -3
  189. package/build/commands/os/configure.js.map +1 -1
  190. package/build/commands/os/download.d.ts +1 -1
  191. package/build/commands/os/download.js +3 -3
  192. package/build/commands/os/download.js.map +1 -1
  193. package/build/commands/os/initialize.d.ts +1 -1
  194. package/build/commands/os/initialize.js +1 -2
  195. package/build/commands/os/initialize.js.map +1 -1
  196. package/build/commands/os/versions.d.ts +1 -1
  197. package/build/commands/os/versions.js +1 -2
  198. package/build/commands/os/versions.js.map +1 -1
  199. package/build/commands/preload/index.d.ts +1 -1
  200. package/build/commands/preload/index.js +1 -2
  201. package/build/commands/preload/index.js.map +1 -1
  202. package/build/commands/push/index.d.ts +1 -1
  203. package/build/commands/push/index.js +5 -4
  204. package/build/commands/push/index.js.map +1 -1
  205. package/build/commands/release/finalize.d.ts +1 -1
  206. package/build/commands/release/finalize.js +2 -2
  207. package/build/commands/release/finalize.js.map +1 -1
  208. package/build/commands/release/index.d.ts +1 -2
  209. package/build/commands/release/index.js +1 -2
  210. package/build/commands/release/index.js.map +1 -1
  211. package/build/commands/release/invalidate.d.ts +1 -1
  212. package/build/commands/release/invalidate.js +2 -2
  213. package/build/commands/release/invalidate.js.map +1 -1
  214. package/build/commands/release/validate.d.ts +1 -1
  215. package/build/commands/release/validate.js +2 -2
  216. package/build/commands/release/validate.js.map +1 -1
  217. package/build/commands/releases/index.d.ts +1 -1
  218. package/build/commands/releases/index.js +1 -2
  219. package/build/commands/releases/index.js.map +1 -1
  220. package/build/commands/scan/index.d.ts +1 -1
  221. package/build/commands/scan/index.js +1 -2
  222. package/build/commands/scan/index.js.map +1 -1
  223. package/build/commands/settings/index.d.ts +1 -1
  224. package/build/commands/settings/index.js +2 -2
  225. package/build/commands/settings/index.js.map +1 -1
  226. package/build/commands/ssh/index.d.ts +1 -1
  227. package/build/commands/ssh/index.js +4 -5
  228. package/build/commands/ssh/index.js.map +1 -1
  229. package/build/commands/support/index.d.ts +1 -1
  230. package/build/commands/support/index.js +1 -2
  231. package/build/commands/support/index.js.map +1 -1
  232. package/build/commands/tag/rm.d.ts +1 -1
  233. package/build/commands/tag/rm.js +1 -2
  234. package/build/commands/tag/rm.js.map +1 -1
  235. package/build/commands/tag/set.d.ts +1 -1
  236. package/build/commands/tag/set.js +1 -2
  237. package/build/commands/tag/set.js.map +1 -1
  238. package/build/commands/tags/index.d.ts +1 -1
  239. package/build/commands/tags/index.js +2 -2
  240. package/build/commands/tags/index.js.map +1 -1
  241. package/build/commands/tunnel/index.d.ts +1 -1
  242. package/build/commands/tunnel/index.js +3 -3
  243. package/build/commands/tunnel/index.js.map +1 -1
  244. package/build/commands/util/available-drives.d.ts +1 -1
  245. package/build/commands/util/available-drives.js +2 -2
  246. package/build/commands/util/available-drives.js.map +1 -1
  247. package/build/commands/version/index.d.ts +1 -1
  248. package/build/commands/version/index.js +1 -2
  249. package/build/commands/version/index.js.map +1 -1
  250. package/build/commands/whoami/index.d.ts +1 -1
  251. package/build/commands/whoami/index.js +2 -2
  252. package/build/commands/whoami/index.js.map +1 -1
  253. package/build/hooks/{prerun/track.d.ts → prerun.d.ts} +1 -1
  254. package/build/hooks/prerun.js +42 -0
  255. package/build/hooks/prerun.js.map +1 -0
  256. package/build/utils/patterns.d.ts +2 -0
  257. package/build/utils/patterns.js +16 -0
  258. package/build/utils/patterns.js.map +1 -1
  259. package/npm-shrinkwrap.json +2 -14
  260. package/oclif.manifest.json +9 -332
  261. package/package.json +3 -4
  262. package/src/app.ts +1 -1
  263. package/src/commands/api-key/generate.ts +1 -2
  264. package/src/commands/api-key/revoke.ts +1 -2
  265. package/src/commands/api-keys/index.ts +1 -2
  266. package/src/commands/app/create.ts +1 -3
  267. package/src/commands/block/create.ts +1 -3
  268. package/src/commands/build/index.ts +6 -4
  269. package/src/commands/config/generate.ts +1 -2
  270. package/src/commands/config/inject.ts +1 -2
  271. package/src/commands/config/read.ts +1 -1
  272. package/src/commands/config/reconfigure.ts +1 -2
  273. package/src/commands/config/write.ts +1 -2
  274. package/src/commands/deploy/index.ts +4 -4
  275. package/src/commands/device/deactivate.ts +1 -2
  276. package/src/commands/device/identify.ts +1 -2
  277. package/src/commands/device/index.ts +1 -2
  278. package/src/commands/device/init.ts +3 -3
  279. package/src/commands/device/list.ts +1 -1
  280. package/src/commands/device/local-mode.ts +1 -2
  281. package/src/commands/device/move.ts +1 -2
  282. package/src/commands/device/os-update.ts +1 -2
  283. package/src/commands/device/pin.ts +1 -2
  284. package/src/commands/device/public-url.ts +1 -2
  285. package/src/commands/device/purge.ts +1 -2
  286. package/src/commands/device/reboot.ts +1 -2
  287. package/src/commands/device/register.ts +1 -2
  288. package/src/commands/device/rename.ts +1 -2
  289. package/src/commands/device/restart.ts +1 -2
  290. package/src/commands/device/rm.ts +1 -2
  291. package/src/commands/device/shutdown.ts +1 -2
  292. package/src/commands/device/start-service.ts +1 -2
  293. package/src/commands/device/stop-service.ts +1 -2
  294. package/src/commands/device/track-fleet.ts +1 -2
  295. package/src/commands/devices/supported.ts +1 -3
  296. package/src/commands/env/add.ts +4 -3
  297. package/src/commands/env/rename.ts +4 -4
  298. package/src/commands/env/rm.ts +4 -4
  299. package/src/commands/envs/index.ts +4 -3
  300. package/src/commands/fleet/create.ts +1 -3
  301. package/src/commands/fleet/index.ts +1 -3
  302. package/src/commands/fleet/pin.ts +1 -2
  303. package/src/commands/fleet/purge.ts +1 -1
  304. package/src/commands/fleet/rename.ts +1 -3
  305. package/src/commands/fleet/restart.ts +1 -1
  306. package/src/commands/fleet/rm.ts +1 -1
  307. package/src/commands/fleet/track-latest.ts +1 -2
  308. package/src/commands/fleets/index.ts +1 -2
  309. package/src/commands/internal/osinit.ts +1 -2
  310. package/src/commands/join/index.ts +3 -3
  311. package/src/commands/key/add.ts +1 -6
  312. package/src/commands/key/index.ts +1 -2
  313. package/src/commands/key/rm.ts +1 -2
  314. package/src/commands/keys/index.ts +1 -1
  315. package/src/commands/leave/index.ts +3 -3
  316. package/src/commands/local/configure.ts +1 -2
  317. package/src/commands/local/flash.ts +1 -2
  318. package/src/commands/login/index.ts +1 -2
  319. package/src/commands/logout/index.ts +1 -1
  320. package/src/commands/logs/index.ts +3 -3
  321. package/src/commands/notes/index.ts +3 -8
  322. package/src/commands/orgs/index.ts +1 -1
  323. package/src/commands/os/build-config.ts +1 -2
  324. package/src/commands/os/configure.ts +4 -3
  325. package/src/commands/os/download.ts +3 -3
  326. package/src/commands/os/initialize.ts +1 -2
  327. package/src/commands/os/versions.ts +1 -2
  328. package/src/commands/preload/index.ts +1 -3
  329. package/src/commands/push/index.ts +7 -4
  330. package/src/commands/release/finalize.ts +1 -1
  331. package/src/commands/release/index.ts +1 -2
  332. package/src/commands/release/invalidate.ts +1 -1
  333. package/src/commands/release/validate.ts +1 -1
  334. package/src/commands/releases/index.ts +1 -2
  335. package/src/commands/scan/index.ts +1 -2
  336. package/src/commands/settings/index.ts +1 -1
  337. package/src/commands/ssh/index.ts +8 -5
  338. package/src/commands/support/index.ts +1 -2
  339. package/src/commands/tag/rm.ts +1 -2
  340. package/src/commands/tag/set.ts +1 -2
  341. package/src/commands/tags/index.ts +1 -1
  342. package/src/commands/tunnel/index.ts +4 -3
  343. package/src/commands/util/available-drives.ts +1 -1
  344. package/src/commands/version/index.ts +1 -2
  345. package/src/commands/whoami/index.ts +1 -1
  346. package/src/hooks/prerun.ts +119 -0
  347. package/src/utils/patterns.ts +41 -1
  348. package/build/command.d.ts +0 -16
  349. package/build/command.js +0 -57
  350. package/build/command.js.map +0 -1
  351. package/build/hooks/prerun/track.js +0 -14
  352. package/build/hooks/prerun/track.js.map +0 -1
  353. package/src/command.ts +0 -170
  354. package/src/hooks/prerun/track.ts +0 -44
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "balena-cli",
3
- "version": "19.1.1",
3
+ "version": "19.1.2",
4
4
  "description": "The official balena Command Line Interface",
5
5
  "main": "./build/app.js",
6
6
  "homepage": "https://github.com/balena-io/balena-cli",
@@ -99,7 +99,7 @@
99
99
  "helpClass": "./build/help",
100
100
  "topicSeparator": " ",
101
101
  "hooks": {
102
- "prerun": "./build/hooks/prerun/track",
102
+ "prerun": "./build/hooks/prerun",
103
103
  "command_not_found": "./build/hooks/command-not-found/suggest"
104
104
  },
105
105
  "additionalHelpFlags": [
@@ -221,7 +221,6 @@
221
221
  "fast-boot2": "^1.1.0",
222
222
  "fast-levenshtein": "^3.0.0",
223
223
  "filenamify": "^4.3.0",
224
- "get-stdin": "^8.0.0",
225
224
  "glob": "^7.2.0",
226
225
  "global-agent": "^2.2.0",
227
226
  "global-tunnel-ng": "^2.1.1",
@@ -274,6 +273,6 @@
274
273
  }
275
274
  },
276
275
  "versionist": {
277
- "publishedAt": "2024-10-14T12:36:47.578Z"
276
+ "publishedAt": "2024-10-14T19:58:11.134Z"
278
277
  }
279
278
  }
package/src/app.ts CHANGED
@@ -153,7 +153,7 @@ async function oclifRun(command: string[], options: AppOptions) {
153
153
  }
154
154
  })(!options.noFlush);
155
155
 
156
- const { trackPromise } = await import('./hooks/prerun/track');
156
+ const { trackPromise } = await import('./hooks/prerun');
157
157
 
158
158
  await Promise.all([trackPromise, deprecationPromise, runPromise]);
159
159
  }
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Args } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Args, Command } from '@oclif/core';
20
19
  import { ExpectedError } from '../../errors';
21
20
  import * as cf from '../../utils/common-flags';
22
21
  import { getBalenaSdk, stripIndent } from '../../utils/lazy';
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Args } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Args, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { getBalenaSdk, stripIndent } from '../../utils/lazy';
22
21
 
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Flags } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Flags, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
22
21
 
@@ -15,9 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Flags, Args } from '@oclif/core';
19
-
20
- import Command from '../../command';
18
+ import { Flags, Args, Command } from '@oclif/core';
21
19
  import * as cf from '../../utils/common-flags';
22
20
  import { stripIndent } from '../../utils/lazy';
23
21
 
@@ -15,9 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Flags, Args } from '@oclif/core';
19
-
20
- import Command from '../../command';
18
+ import { Flags, Args, Command } from '@oclif/core';
21
19
  import * as cf from '../../utils/common-flags';
22
20
  import { stripIndent } from '../../utils/lazy';
23
21
 
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Args, Flags } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Args, Flags, Command } from '@oclif/core';
20
19
  import { getBalenaSdk } from '../../utils/lazy';
21
20
  import * as cf from '../../utils/common-flags';
22
21
  import * as compose from '../../utils/compose';
@@ -106,13 +105,16 @@ ${dockerignoreHelp}
106
105
  public async run() {
107
106
  const { args: params, flags: options } = await this.parse(BuildCmd);
108
107
 
109
- await Command.checkLoggedInIf(!!options.fleet);
108
+ const Logger = await import('../../utils/logger');
109
+ const { checkLoggedInIf } = await import('../../utils/patterns');
110
+
111
+ await checkLoggedInIf(!!options.fleet);
110
112
 
111
113
  (await import('events')).defaultMaxListeners = 1000;
112
114
 
113
115
  const sdk = getBalenaSdk();
114
116
 
115
- const logger = await Command.getLogger();
117
+ const logger = Logger.getLogger();
116
118
  logger.logDebug('Parsing input...');
117
119
 
118
120
  // `build` accepts `source` as a parameter, but compose expects it as an option
@@ -15,9 +15,8 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Flags } from '@oclif/core';
18
+ import { Flags, Command } from '@oclif/core';
19
19
  import type { Interfaces } from '@oclif/core';
20
- import Command from '../../command';
21
20
  import * as cf from '../../utils/common-flags';
22
21
  import { getBalenaSdk, getCliForm, stripIndent } from '../../utils/lazy';
23
22
  import {
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Args } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Args, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { getVisuals, stripIndent } from '../../utils/lazy';
22
21
 
@@ -15,7 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import Command from '../../command';
18
+ import { Command } from '@oclif/core';
19
19
  import * as cf from '../../utils/common-flags';
20
20
  import { getVisuals, stripIndent } from '../../utils/lazy';
21
21
 
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Flags } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Flags, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { getVisuals, stripIndent } from '../../utils/lazy';
22
21
 
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Args } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Args, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { getVisuals, stripIndent } from '../../utils/lazy';
22
21
 
@@ -15,10 +15,8 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Args, Flags } from '@oclif/core';
18
+ import { Args, Flags, Command } from '@oclif/core';
19
19
  import type { ImageDescriptor } from '@balena/compose/dist/parse';
20
-
21
- import Command from '../../command';
22
20
  import { ExpectedError } from '../../errors';
23
21
  import { getBalenaSdk, getChalk, stripIndent } from '../../utils/lazy';
24
22
  import {
@@ -155,7 +153,9 @@ ${dockerignoreHelp}
155
153
 
156
154
  (await import('events')).defaultMaxListeners = 1000;
157
155
 
158
- const logger = await Command.getLogger();
156
+ const Logger = await import('../../utils/logger');
157
+
158
+ const logger = Logger.getLogger();
159
159
  logger.logDebug('Parsing input...');
160
160
 
161
161
  const { fleet, image } = params;
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Args } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Args, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { getBalenaSdk, stripIndent } from '../../utils/lazy';
22
21
 
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Args } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Args, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { getBalenaSdk, stripIndent } from '../../utils/lazy';
22
21
  import { ExpectedError } from '../../errors';
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Flags, Args } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Flags, Args, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { expandForAppName } from '../../utils/helpers';
22
21
  import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Flags } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Flags, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { getBalenaSdk, stripIndent } from '../../utils/lazy';
22
21
  import { applicationIdInfo } from '../../utils/messages';
@@ -117,8 +116,9 @@ export default class DeviceInitCmd extends Command {
117
116
  tmp.setGracefulCleanup();
118
117
  const { downloadOSImage } = await import('../../utils/cloud');
119
118
  const { getApplication } = await import('../../utils/sdk');
119
+ const Logger = await import('../../utils/logger');
120
120
 
121
- const logger = await Command.getLogger();
121
+ const logger = Logger.getLogger();
122
122
  const balena = getBalenaSdk();
123
123
 
124
124
  // Get application and
@@ -15,7 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import Command from '../../command';
18
+ import { Command } from '@oclif/core';
19
19
  import * as cf from '../../utils/common-flags';
20
20
  import { expandForAppName } from '../../utils/helpers';
21
21
  import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Flags, Args } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Flags, Args, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { getBalenaSdk, stripIndent } from '../../utils/lazy';
22
21
 
@@ -15,14 +15,13 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Args } from '@oclif/core';
18
+ import { Args, Command } from '@oclif/core';
19
19
  import type {
20
20
  BalenaSDK,
21
21
  Device,
22
22
  PineOptions,
23
23
  PineTypedResult,
24
24
  } from 'balena-sdk';
25
- import Command from '../../command';
26
25
  import * as cf from '../../utils/common-flags';
27
26
  import { ExpectedError } from '../../errors';
28
27
  import { getBalenaSdk, stripIndent } from '../../utils/lazy';
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Flags, Args } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Flags, Args, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { getBalenaSdk, stripIndent, getCliForm } from '../../utils/lazy';
22
21
  import type { Device } from 'balena-sdk';
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Args } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Args, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { getBalenaSdk, stripIndent } from '../../utils/lazy';
22
21
  import { getExpandedProp } from '../../utils/pine';
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Flags, Args } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Flags, Args, Command } from '@oclif/core';
20
19
  import { ExpectedError } from '../../errors';
21
20
  import * as cf from '../../utils/common-flags';
22
21
  import { getBalenaSdk, stripIndent } from '../../utils/lazy';
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Args } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Args, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { getBalenaSdk, getCliUx, stripIndent } from '../../utils/lazy';
22
21
 
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Args } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Args, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { getBalenaSdk, stripIndent } from '../../utils/lazy';
22
21
 
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Flags } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Flags, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import * as ca from '../../utils/common-args';
22
21
  import { getBalenaSdk, stripIndent } from '../../utils/lazy';
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Args } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Args, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { getBalenaSdk, stripIndent, getCliForm } from '../../utils/lazy';
22
21
 
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Flags, Args } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Flags, Args, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { getBalenaSdk, getCliUx, stripIndent } from '../../utils/lazy';
22
21
  import type {
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Args } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Args, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { getBalenaSdk, stripIndent } from '../../utils/lazy';
22
21
 
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Args } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Args, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { getBalenaSdk, stripIndent } from '../../utils/lazy';
22
21
  import { ExpectedError } from '../../errors';
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Args } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Args, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { getBalenaSdk, getCliUx, stripIndent } from '../../utils/lazy';
22
21
  import type { BalenaSDK } from 'balena-sdk';
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Args } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Args, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { getBalenaSdk, getCliUx, stripIndent } from '../../utils/lazy';
22
21
  import type { BalenaSDK } from 'balena-sdk';
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Args } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Args, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { getBalenaSdk, stripIndent } from '../../utils/lazy';
22
21
 
@@ -14,11 +14,9 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { Flags } from '@oclif/core';
17
+ import { Flags, Command } from '@oclif/core';
18
18
  import type * as BalenaSdk from 'balena-sdk';
19
19
  import * as _ from 'lodash';
20
- import Command from '../../command';
21
-
22
20
  import * as cf from '../../utils/common-flags';
23
21
  import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
24
22
 
@@ -15,9 +15,8 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Args } from '@oclif/core';
18
+ import { Args, Command } from '@oclif/core';
19
19
  import type * as BalenaSdk from 'balena-sdk';
20
- import Command from '../../command';
21
20
  import { ExpectedError } from '../../errors';
22
21
  import * as cf from '../../utils/common-flags';
23
22
  import { getBalenaSdk, stripIndent } from '../../utils/lazy';
@@ -111,7 +110,9 @@ export default class EnvAddCmd extends Command {
111
110
  );
112
111
  }
113
112
 
114
- await Command.checkLoggedIn();
113
+ const { checkLoggedIn } = await import('../../utils/patterns');
114
+
115
+ await checkLoggedIn();
115
116
 
116
117
  if (params.value == null) {
117
118
  params.value = process.env[params.name];
@@ -14,9 +14,7 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { Args } from '@oclif/core';
18
- import Command from '../../command';
19
-
17
+ import { Args, Command } from '@oclif/core';
20
18
  import * as cf from '../../utils/common-flags';
21
19
  import * as ec from '../../utils/env-common';
22
20
  import { getBalenaSdk, stripIndent } from '../../utils/lazy';
@@ -63,7 +61,9 @@ export default class EnvRenameCmd extends Command {
63
61
  public async run() {
64
62
  const { args: params, flags: opt } = await this.parse(EnvRenameCmd);
65
63
 
66
- await Command.checkLoggedIn();
64
+ const { checkLoggedIn } = await import('../../utils/patterns');
65
+
66
+ await checkLoggedIn();
67
67
 
68
68
  await getBalenaSdk().pine.patch({
69
69
  resource: ec.getVarResourceName(opt.config, opt.device, opt.service),
@@ -15,9 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Flags, Args } from '@oclif/core';
19
- import Command from '../../command';
20
-
18
+ import { Flags, Args, Command } from '@oclif/core';
21
19
  import * as ec from '../../utils/env-common';
22
20
  import { getBalenaSdk, stripIndent } from '../../utils/lazy';
23
21
  import { parseAsInteger } from '../../utils/validation';
@@ -67,7 +65,9 @@ export default class EnvRmCmd extends Command {
67
65
  public async run() {
68
66
  const { args: params, flags: opt } = await this.parse(EnvRmCmd);
69
67
 
70
- await Command.checkLoggedIn();
68
+ const { checkLoggedIn } = await import('../../utils/patterns');
69
+
70
+ await checkLoggedIn();
71
71
 
72
72
  const { confirm } = await import('../../utils/patterns');
73
73
  await confirm(
@@ -14,11 +14,10 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { Flags } from '@oclif/core';
17
+ import { Flags, Command } from '@oclif/core';
18
18
  import type { Interfaces } from '@oclif/core';
19
19
  import type * as SDK from 'balena-sdk';
20
20
  import * as _ from 'lodash';
21
- import Command from '../../command';
22
21
  import { ExpectedError } from '../../errors';
23
22
  import * as cf from '../../utils/common-flags';
24
23
  import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
@@ -113,7 +112,9 @@ export default class EnvsCmd extends Command {
113
112
 
114
113
  const variables: EnvironmentVariableInfo[] = [];
115
114
 
116
- await Command.checkLoggedIn();
115
+ const { checkLoggedIn } = await import('../../utils/patterns');
116
+
117
+ await checkLoggedIn();
117
118
 
118
119
  if (!options.fleet && !options.device) {
119
120
  throw new ExpectedError('Missing --fleet or --device option');
@@ -15,9 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Flags, Args } from '@oclif/core';
19
-
20
- import Command from '../../command';
18
+ import { Flags, Args, Command } from '@oclif/core';
21
19
  import * as cf from '../../utils/common-flags';
22
20
  import { stripIndent } from '../../utils/lazy';
23
21
 
@@ -15,9 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Flags } from '@oclif/core';
19
-
20
- import Command from '../../command';
18
+ import { Flags, Command } from '@oclif/core';
21
19
  import * as cf from '../../utils/common-flags';
22
20
  import * as ca from '../../utils/common-args';
23
21
  import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
@@ -15,8 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Args } from '@oclif/core';
19
- import Command from '../../command';
18
+ import { Args, Command } from '@oclif/core';
20
19
  import * as cf from '../../utils/common-flags';
21
20
  import { getBalenaSdk, stripIndent } from '../../utils/lazy';
22
21
  import { getExpandedProp } from '../../utils/pine';
@@ -15,7 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import Command from '../../command';
18
+ import { Command } from '@oclif/core';
19
19
  import * as cf from '../../utils/common-flags';
20
20
  import * as ca from '../../utils/common-args';
21
21
  import { getBalenaSdk, stripIndent } from '../../utils/lazy';
@@ -15,9 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import { Args } from '@oclif/core';
19
-
20
- import Command from '../../command';
18
+ import { Args, Command } from '@oclif/core';
21
19
  import * as cf from '../../utils/common-flags';
22
20
  import * as ca from '../../utils/common-args';
23
21
  import { getBalenaSdk, stripIndent, getCliForm } from '../../utils/lazy';
@@ -15,7 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import Command from '../../command';
18
+ import { Command } from '@oclif/core';
19
19
  import * as cf from '../../utils/common-flags';
20
20
  import * as ca from '../../utils/common-args';
21
21
  import { getBalenaSdk, stripIndent } from '../../utils/lazy';
@@ -15,11 +15,11 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- import Command from '../../command';
19
18
  import * as cf from '../../utils/common-flags';
20
19
  import * as ca from '../../utils/common-args';
21
20
  import { getBalenaSdk, stripIndent } from '../../utils/lazy';
22
21
  import { applicationIdInfo } from '../../utils/messages';
22
+ import { Command } from '@oclif/core';
23
23
 
24
24
  export default class FleetRmCmd extends Command {
25
25
  public static description = stripIndent`