@start9labs/start-sdk 0.4.0-beta.4 → 0.4.0-beta.41

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 (324) hide show
  1. package/base/lib/Effects.d.ts +6 -34
  2. package/base/lib/actions/index.d.ts +13 -14
  3. package/base/lib/actions/index.js +4 -4
  4. package/base/lib/actions/index.js.map +1 -1
  5. package/base/lib/actions/input/builder/inputSpec.d.ts +16 -26
  6. package/base/lib/actions/input/builder/inputSpec.js +9 -24
  7. package/base/lib/actions/input/builder/inputSpec.js.map +1 -1
  8. package/base/lib/actions/input/builder/list.d.ts +13 -24
  9. package/base/lib/actions/input/builder/list.js +19 -30
  10. package/base/lib/actions/input/builder/list.js.map +1 -1
  11. package/base/lib/actions/input/builder/value.d.ts +394 -64
  12. package/base/lib/actions/input/builder/value.js +542 -213
  13. package/base/lib/actions/input/builder/value.js.map +1 -1
  14. package/base/lib/actions/input/builder/variants.d.ts +27 -24
  15. package/base/lib/actions/input/builder/variants.js +25 -24
  16. package/base/lib/actions/input/builder/variants.js.map +1 -1
  17. package/base/lib/actions/input/inputSpecConstants.d.ts +25 -17
  18. package/base/lib/actions/input/inputSpecConstants.js +16 -12
  19. package/base/lib/actions/input/inputSpecConstants.js.map +1 -1
  20. package/base/lib/actions/input/inputSpecTypes.d.ts +0 -3
  21. package/base/lib/actions/input/inputSpecTypes.js.map +1 -1
  22. package/base/lib/actions/setupActions.d.ts +21 -15
  23. package/base/lib/actions/setupActions.js +42 -7
  24. package/base/lib/actions/setupActions.js.map +1 -1
  25. package/base/lib/dependencies/dependencies.d.ts +7 -3
  26. package/base/lib/dependencies/dependencies.js +34 -25
  27. package/base/lib/dependencies/dependencies.js.map +1 -1
  28. package/base/lib/dependencies/setupDependencies.d.ts +2 -4
  29. package/base/lib/dependencies/setupDependencies.js +3 -10
  30. package/base/lib/dependencies/setupDependencies.js.map +1 -1
  31. package/base/lib/exver/index.js +1 -1
  32. package/base/lib/exver/index.js.map +1 -1
  33. package/base/lib/index.d.ts +1 -0
  34. package/base/lib/index.js +2 -1
  35. package/base/lib/index.js.map +1 -1
  36. package/base/lib/inits/index.d.ts +2 -0
  37. package/base/lib/inits/index.js +19 -0
  38. package/base/lib/inits/index.js.map +1 -0
  39. package/base/lib/inits/setupInit.d.ts +9 -0
  40. package/base/lib/inits/setupInit.js +40 -0
  41. package/base/lib/inits/setupInit.js.map +1 -0
  42. package/base/lib/inits/setupUninit.d.ts +25 -0
  43. package/base/lib/inits/setupUninit.js +24 -0
  44. package/base/lib/inits/setupUninit.js.map +1 -0
  45. package/base/lib/interfaces/Host.js +18 -6
  46. package/base/lib/interfaces/Host.js.map +1 -1
  47. package/base/lib/interfaces/Origin.d.ts +2 -2
  48. package/base/lib/interfaces/Origin.js +3 -3
  49. package/base/lib/interfaces/Origin.js.map +1 -1
  50. package/base/lib/interfaces/ServiceInterfaceBuilder.d.ts +2 -2
  51. package/base/lib/interfaces/setupInterfaces.d.ts +2 -4
  52. package/base/lib/interfaces/setupInterfaces.js +8 -17
  53. package/base/lib/interfaces/setupInterfaces.js.map +1 -1
  54. package/base/lib/osBindings/ActionInput.d.ts +2 -0
  55. package/base/lib/osBindings/ActionInput.js +0 -1
  56. package/base/lib/osBindings/ActionInput.js.map +1 -1
  57. package/base/lib/osBindings/AddCategoryParams.d.ts +0 -2
  58. package/base/lib/osBindings/AddPackageToCategoryParams.d.ts +5 -0
  59. package/base/lib/osBindings/AddPackageToCategoryParams.js +3 -0
  60. package/base/lib/osBindings/AddPackageToCategoryParams.js.map +1 -0
  61. package/base/lib/osBindings/AddProxyParams.d.ts +5 -0
  62. package/base/lib/osBindings/AddProxyParams.js +4 -0
  63. package/base/lib/osBindings/AddProxyParams.js.map +1 -0
  64. package/base/lib/osBindings/AddTunnelParams.d.ts +5 -0
  65. package/base/lib/osBindings/AddTunnelParams.js +4 -0
  66. package/base/lib/osBindings/AddTunnelParams.js.map +1 -0
  67. package/base/lib/osBindings/AttachParams.d.ts +1 -0
  68. package/base/lib/osBindings/BindingGatewaySetEnabledParams.d.ts +6 -0
  69. package/base/lib/osBindings/BindingGatewaySetEnabledParams.js +3 -0
  70. package/base/lib/osBindings/BindingGatewaySetEnabledParams.js.map +1 -0
  71. package/base/lib/osBindings/Category.d.ts +0 -2
  72. package/base/lib/osBindings/Category.js +1 -0
  73. package/base/lib/osBindings/Category.js.map +1 -1
  74. package/base/lib/osBindings/CheckDependenciesResult.d.ts +3 -3
  75. package/base/lib/osBindings/ClearTasksParams.d.ts +5 -0
  76. package/base/lib/osBindings/ClearTasksParams.js +4 -0
  77. package/base/lib/osBindings/ClearTasksParams.js.map +1 -0
  78. package/base/lib/osBindings/CreateTaskParams.d.ts +15 -0
  79. package/base/lib/osBindings/CreateTaskParams.js +3 -0
  80. package/base/lib/osBindings/CreateTaskParams.js.map +1 -0
  81. package/base/lib/osBindings/DepInfo.d.ts +2 -3
  82. package/base/lib/osBindings/DnsSettings.d.ts +4 -0
  83. package/base/lib/osBindings/DnsSettings.js +4 -0
  84. package/base/lib/osBindings/DnsSettings.js.map +1 -0
  85. package/base/lib/osBindings/DomainConfig.d.ts +1 -0
  86. package/base/lib/osBindings/DomainSettings.d.ts +4 -0
  87. package/base/lib/osBindings/DomainSettings.js +3 -0
  88. package/base/lib/osBindings/DomainSettings.js.map +1 -0
  89. package/base/lib/osBindings/Domains.d.ts +7 -0
  90. package/base/lib/osBindings/Domains.js +3 -0
  91. package/base/lib/osBindings/Domains.js.map +1 -0
  92. package/base/lib/osBindings/EventId.d.ts +4 -0
  93. package/base/lib/osBindings/EventId.js +3 -0
  94. package/base/lib/osBindings/EventId.js.map +1 -0
  95. package/base/lib/osBindings/FileType.d.ts +1 -0
  96. package/base/lib/osBindings/FileType.js +4 -0
  97. package/base/lib/osBindings/FileType.js.map +1 -0
  98. package/base/lib/osBindings/ForgetGatewayParams.d.ts +4 -0
  99. package/base/lib/osBindings/ForgetGatewayParams.js +3 -0
  100. package/base/lib/osBindings/ForgetGatewayParams.js.map +1 -0
  101. package/base/lib/osBindings/ForgetInterfaceParams.d.ts +2 -1
  102. package/base/lib/osBindings/ForgetInterfaceParams.js +0 -1
  103. package/base/lib/osBindings/ForgetInterfaceParams.js.map +1 -1
  104. package/base/lib/osBindings/GatewayId.d.ts +1 -0
  105. package/base/lib/osBindings/GatewayId.js +4 -0
  106. package/base/lib/osBindings/GatewayId.js.map +1 -0
  107. package/base/lib/osBindings/GatewayInfo.d.ts +6 -0
  108. package/base/lib/osBindings/GatewayInfo.js +3 -0
  109. package/base/lib/osBindings/GatewayInfo.js.map +1 -0
  110. package/base/lib/osBindings/GetOsVersionParams.d.ts +3 -3
  111. package/base/lib/osBindings/GetPackageParams.d.ts +1 -1
  112. package/base/lib/osBindings/Host.d.ts +4 -3
  113. package/base/lib/osBindings/HostnameInfo.d.ts +2 -1
  114. package/base/lib/osBindings/IpHostname.d.ts +1 -2
  115. package/base/lib/osBindings/IpInfo.d.ts +2 -0
  116. package/base/lib/osBindings/LoginParams.d.ts +1 -2
  117. package/base/lib/osBindings/LoginParams.js +1 -0
  118. package/base/lib/osBindings/LoginParams.js.map +1 -1
  119. package/base/lib/osBindings/MainStatus.d.ts +0 -2
  120. package/base/lib/osBindings/Manifest.d.ts +3 -1
  121. package/base/lib/osBindings/Metadata.d.ts +5 -0
  122. package/base/lib/osBindings/Metadata.js +3 -0
  123. package/base/lib/osBindings/Metadata.js.map +1 -0
  124. package/base/lib/osBindings/MetadataSrc.d.ts +7 -0
  125. package/base/lib/osBindings/MetadataSrc.js +3 -0
  126. package/base/lib/osBindings/MetadataSrc.js.map +1 -0
  127. package/base/lib/osBindings/MountTarget.d.ts +2 -0
  128. package/base/lib/osBindings/NetInfo.d.ts +3 -1
  129. package/base/lib/osBindings/NetInfo.js +0 -1
  130. package/base/lib/osBindings/NetInfo.js.map +1 -1
  131. package/base/lib/osBindings/NetworkInfo.d.ts +5 -2
  132. package/base/lib/osBindings/NetworkInterfaceInfo.d.ts +3 -2
  133. package/base/lib/osBindings/NetworkInterfaceSetPublicParams.d.ts +2 -1
  134. package/base/lib/osBindings/NetworkInterfaceSetPublicParams.js +0 -1
  135. package/base/lib/osBindings/NetworkInterfaceSetPublicParams.js.map +1 -1
  136. package/base/lib/osBindings/PackageDataEntry.d.ts +5 -5
  137. package/base/lib/osBindings/PackageVersionInfo.d.ts +2 -0
  138. package/base/lib/osBindings/Progress.d.ts +2 -0
  139. package/base/lib/osBindings/Progress.js +0 -1
  140. package/base/lib/osBindings/Progress.js.map +1 -1
  141. package/base/lib/osBindings/ProgressUnits.d.ts +1 -0
  142. package/base/lib/osBindings/ProgressUnits.js +4 -0
  143. package/base/lib/osBindings/ProgressUnits.js.map +1 -0
  144. package/base/lib/osBindings/Proxies.d.ts +4 -0
  145. package/base/lib/osBindings/Proxies.js +3 -0
  146. package/base/lib/osBindings/Proxies.js.map +1 -0
  147. package/base/lib/osBindings/ProxyInfo.d.ts +4 -0
  148. package/base/lib/osBindings/ProxyInfo.js +4 -0
  149. package/base/lib/osBindings/ProxyInfo.js.map +1 -0
  150. package/base/lib/osBindings/PublicDomainConfig.d.ts +6 -0
  151. package/base/lib/osBindings/PublicDomainConfig.js +3 -0
  152. package/base/lib/osBindings/PublicDomainConfig.js.map +1 -0
  153. package/base/lib/osBindings/RemoveAdminParams.d.ts +4 -0
  154. package/base/lib/osBindings/RemoveAdminParams.js +3 -0
  155. package/base/lib/osBindings/RemoveAdminParams.js.map +1 -0
  156. package/base/lib/osBindings/RemoveAssetParams.d.ts +4 -0
  157. package/base/lib/osBindings/RemoveAssetParams.js +4 -0
  158. package/base/lib/osBindings/RemoveAssetParams.js.map +1 -0
  159. package/base/lib/osBindings/RemovePackageFromCategoryParams.d.ts +5 -0
  160. package/base/lib/osBindings/RemovePackageFromCategoryParams.js +3 -0
  161. package/base/lib/osBindings/RemovePackageFromCategoryParams.js.map +1 -0
  162. package/base/lib/osBindings/RemovePackageParams.d.ts +6 -0
  163. package/base/lib/osBindings/RemovePackageParams.js +3 -0
  164. package/base/lib/osBindings/RemovePackageParams.js.map +1 -0
  165. package/base/lib/osBindings/RemoveProxyParams.d.ts +3 -0
  166. package/base/lib/osBindings/RemoveProxyParams.js +4 -0
  167. package/base/lib/osBindings/RemoveProxyParams.js.map +1 -0
  168. package/base/lib/osBindings/RemoveTunnelParams.d.ts +4 -0
  169. package/base/lib/osBindings/RemoveTunnelParams.js +3 -0
  170. package/base/lib/osBindings/RemoveTunnelParams.js.map +1 -0
  171. package/base/lib/osBindings/RenameGatewayParams.d.ts +5 -0
  172. package/base/lib/osBindings/RenameGatewayParams.js +3 -0
  173. package/base/lib/osBindings/RenameGatewayParams.js.map +1 -0
  174. package/base/lib/osBindings/RenameInterfaceParams.d.ts +5 -0
  175. package/base/lib/osBindings/RenameInterfaceParams.js +3 -0
  176. package/base/lib/osBindings/RenameInterfaceParams.js.map +1 -0
  177. package/base/lib/osBindings/ServerInfo.d.ts +2 -1
  178. package/base/lib/osBindings/Sessions.d.ts +2 -5
  179. package/base/lib/osBindings/Sessions.js +0 -1
  180. package/base/lib/osBindings/Sessions.js.map +1 -1
  181. package/base/lib/osBindings/SetupExecuteParams.d.ts +1 -0
  182. package/base/lib/osBindings/Task.d.ts +13 -0
  183. package/base/lib/osBindings/Task.js +3 -0
  184. package/base/lib/osBindings/Task.js.map +1 -0
  185. package/base/lib/osBindings/TaskCondition.d.ts +1 -0
  186. package/base/lib/osBindings/TaskCondition.js +4 -0
  187. package/base/lib/osBindings/TaskCondition.js.map +1 -0
  188. package/base/lib/osBindings/TaskEntry.d.ts +5 -0
  189. package/base/lib/osBindings/TaskEntry.js +3 -0
  190. package/base/lib/osBindings/TaskEntry.js.map +1 -0
  191. package/base/lib/osBindings/TaskInput.d.ts +4 -0
  192. package/base/lib/osBindings/TaskInput.js +4 -0
  193. package/base/lib/osBindings/TaskInput.js.map +1 -0
  194. package/base/lib/osBindings/TaskSeverity.d.ts +1 -0
  195. package/base/lib/osBindings/TaskSeverity.js +4 -0
  196. package/base/lib/osBindings/TaskSeverity.js.map +1 -0
  197. package/base/lib/osBindings/TaskTrigger.d.ts +5 -0
  198. package/base/lib/osBindings/TaskTrigger.js +3 -0
  199. package/base/lib/osBindings/TaskTrigger.js.map +1 -0
  200. package/base/lib/osBindings/UnsetInboundParams.d.ts +2 -1
  201. package/base/lib/osBindings/UnsetInboundParams.js +0 -1
  202. package/base/lib/osBindings/UnsetInboundParams.js.map +1 -1
  203. package/base/lib/osBindings/UnsetPublicParams.d.ts +2 -1
  204. package/base/lib/osBindings/UnsetPublicParams.js +0 -1
  205. package/base/lib/osBindings/UnsetPublicParams.js.map +1 -1
  206. package/base/lib/osBindings/UpdatingState.d.ts +1 -0
  207. package/base/lib/osBindings/index.d.ts +30 -18
  208. package/base/lib/s9pk/index.d.ts +2 -3
  209. package/base/lib/s9pk/index.js +9 -15
  210. package/base/lib/s9pk/index.js.map +1 -1
  211. package/base/lib/types/ManifestTypes.d.ts +4 -0
  212. package/base/lib/types.d.ts +23 -34
  213. package/base/lib/types.js +13 -0
  214. package/base/lib/types.js.map +1 -1
  215. package/base/lib/util/Drop.d.ts +47 -0
  216. package/base/lib/util/Drop.js +130 -0
  217. package/base/lib/util/Drop.js.map +1 -0
  218. package/base/lib/util/GetSystemSmtp.d.ts +11 -2
  219. package/base/lib/util/GetSystemSmtp.js +33 -7
  220. package/base/lib/util/GetSystemSmtp.js.map +1 -1
  221. package/base/lib/util/deepMerge.js +6 -1
  222. package/base/lib/util/deepMerge.js.map +1 -1
  223. package/base/lib/util/getServiceInterface.d.ts +53 -5
  224. package/base/lib/util/getServiceInterface.js +54 -19
  225. package/base/lib/util/getServiceInterface.js.map +1 -1
  226. package/base/lib/util/getServiceInterfaces.d.ts +11 -2
  227. package/base/lib/util/getServiceInterfaces.js +33 -7
  228. package/base/lib/util/getServiceInterfaces.js.map +1 -1
  229. package/base/lib/util/graph.d.ts +1 -0
  230. package/base/lib/util/graph.js +12 -0
  231. package/base/lib/util/graph.js.map +1 -1
  232. package/base/lib/util/index.d.ts +1 -2
  233. package/base/lib/util/index.js +5 -8
  234. package/base/lib/util/index.js.map +1 -1
  235. package/base/lib/util/ip.d.ts +19 -0
  236. package/base/lib/util/ip.js +92 -0
  237. package/base/lib/util/ip.js.map +1 -0
  238. package/package/lib/StartSdk.d.ts +116 -572
  239. package/package/lib/StartSdk.js +111 -435
  240. package/package/lib/StartSdk.js.map +1 -1
  241. package/package/lib/backup/Backups.d.ts +9 -3
  242. package/package/lib/backup/Backups.js +38 -28
  243. package/package/lib/backup/Backups.js.map +1 -1
  244. package/package/lib/backup/setupBackups.d.ts +5 -2
  245. package/package/lib/backup/setupBackups.js +7 -5
  246. package/package/lib/backup/setupBackups.js.map +1 -1
  247. package/package/lib/health/HealthCheck.d.ts +0 -1
  248. package/package/lib/health/HealthCheck.js +1 -7
  249. package/package/lib/health/HealthCheck.js.map +1 -1
  250. package/package/lib/health/checkFns/runHealthScript.js +1 -1
  251. package/package/lib/health/checkFns/runHealthScript.js.map +1 -1
  252. package/package/lib/index.d.ts +0 -3
  253. package/package/lib/index.js +1 -8
  254. package/package/lib/index.js.map +1 -1
  255. package/package/lib/inits/index.d.ts +2 -3
  256. package/package/lib/inits/index.js +16 -3
  257. package/package/lib/inits/index.js.map +1 -1
  258. package/package/lib/inits/setupInit.d.ts +7 -13
  259. package/package/lib/inits/setupInit.js +22 -48
  260. package/package/lib/inits/setupInit.js.map +1 -1
  261. package/package/lib/inits/setupInstall.d.ts +10 -10
  262. package/package/lib/inits/setupInstall.js.map +1 -1
  263. package/package/lib/inits/setupUninit.d.ts +7 -0
  264. package/package/lib/inits/setupUninit.js +14 -0
  265. package/package/lib/inits/setupUninit.js.map +1 -0
  266. package/package/lib/inits/setupUninstall.d.ts +5 -5
  267. package/package/lib/inits/setupUninstall.js.map +1 -1
  268. package/package/lib/mainFn/CommandController.d.ts +6 -22
  269. package/package/lib/mainFn/CommandController.js +68 -41
  270. package/package/lib/mainFn/CommandController.js.map +1 -1
  271. package/package/lib/mainFn/Daemon.d.ts +15 -20
  272. package/package/lib/mainFn/Daemon.js +71 -17
  273. package/package/lib/mainFn/Daemon.js.map +1 -1
  274. package/package/lib/mainFn/Daemons.d.ts +76 -45
  275. package/package/lib/mainFn/Daemons.js +104 -30
  276. package/package/lib/mainFn/Daemons.js.map +1 -1
  277. package/package/lib/mainFn/HealthDaemon.d.ts +6 -5
  278. package/package/lib/mainFn/HealthDaemon.js +79 -38
  279. package/package/lib/mainFn/HealthDaemon.js.map +1 -1
  280. package/package/lib/mainFn/Mounts.d.ts +32 -45
  281. package/package/lib/mainFn/Mounts.js +13 -55
  282. package/package/lib/mainFn/Mounts.js.map +1 -1
  283. package/package/lib/mainFn/Oneshot.d.ts +12 -0
  284. package/package/lib/mainFn/Oneshot.js +23 -0
  285. package/package/lib/mainFn/Oneshot.js.map +1 -0
  286. package/package/lib/mainFn/index.d.ts +1 -1
  287. package/package/lib/manifest/setupManifest.js +3 -0
  288. package/package/lib/manifest/setupManifest.js.map +1 -1
  289. package/package/lib/test/host.test.js +1 -1
  290. package/package/lib/test/host.test.js.map +1 -1
  291. package/package/lib/test/inputSpecBuilder.test.js +153 -158
  292. package/package/lib/test/inputSpecBuilder.test.js.map +1 -1
  293. package/package/lib/test/output.d.ts +8 -37
  294. package/package/lib/test/output.js +41 -40
  295. package/package/lib/test/output.js.map +1 -1
  296. package/package/lib/test/output.sdk.d.ts +154 -949
  297. package/package/lib/test/output.sdk.js +1 -4
  298. package/package/lib/test/output.sdk.js.map +1 -1
  299. package/package/lib/test/output.test.js +12 -8
  300. package/package/lib/test/output.test.js.map +1 -1
  301. package/package/lib/util/Drop.d.ts +4 -2
  302. package/package/lib/util/Drop.js +29 -7
  303. package/package/lib/util/Drop.js.map +1 -1
  304. package/package/lib/util/GetSslCertificate.d.ts +11 -2
  305. package/package/lib/util/GetSslCertificate.js +33 -7
  306. package/package/lib/util/GetSslCertificate.js.map +1 -1
  307. package/package/lib/util/SubContainer.d.ts +131 -37
  308. package/package/lib/util/SubContainer.js +155 -42
  309. package/package/lib/util/SubContainer.js.map +1 -1
  310. package/package/lib/util/fileHelper.d.ts +50 -17
  311. package/package/lib/util/fileHelper.js +166 -52
  312. package/package/lib/util/fileHelper.js.map +1 -1
  313. package/package/lib/util/index.d.ts +1 -2
  314. package/package/lib/util/index.js +2 -4
  315. package/package/lib/util/index.js.map +1 -1
  316. package/package/lib/version/VersionGraph.d.ts +27 -5
  317. package/package/lib/version/VersionGraph.js +110 -24
  318. package/package/lib/version/VersionGraph.js.map +1 -1
  319. package/package/lib/version/VersionInfo.d.ts +8 -3
  320. package/package/lib/version/VersionInfo.js.map +1 -1
  321. package/package/package.json +63 -0
  322. package/package/scripts/oldSpecToBuilder.js +5 -4
  323. package/package/scripts/oldSpecToBuilder.js.map +1 -1
  324. package/package.json +7 -8
@@ -43,13 +43,10 @@ const patterns = __importStar(require("../../base/lib/util/patterns"));
43
43
  const Backups_1 = require("./backup/Backups");
44
44
  const inputSpecConstants_1 = require("../../base/lib/actions/input/inputSpecConstants");
45
45
  const Daemons_1 = require("./mainFn/Daemons");
46
- const HealthCheck_1 = require("./health/HealthCheck");
47
46
  const checkPortListening_1 = require("./health/checkFns/checkPortListening");
48
47
  const checkFns_1 = require("./health/checkFns");
49
48
  const list_1 = require("../../base/lib/actions/input/builder/list");
50
- const setupInstall_1 = require("./inits/setupInstall");
51
49
  const setupBackups_1 = require("./backup/setupBackups");
52
- const setupUninstall_1 = require("./inits/setupUninstall");
53
50
  const mainFn_1 = require("./mainFn");
54
51
  const defaultTrigger_1 = require("./trigger/defaultTrigger");
55
52
  const trigger_1 = require("./trigger");
@@ -60,20 +57,20 @@ const ServiceInterfaceBuilder_1 = require("../../base/lib/interfaces/ServiceInte
60
57
  const util_1 = require("./util");
61
58
  const util_2 = require("./util");
62
59
  const util_3 = require("./util");
63
- const getStore_1 = require("./store/getStore");
64
60
  const SubContainer_1 = require("./util/SubContainer");
65
61
  const util_4 = require("./util");
66
62
  const Mounts_1 = require("./mainFn/Mounts");
67
63
  const setupDependencies_1 = require("../../base/lib/dependencies/setupDependencies");
68
64
  const T = __importStar(require("../../base/lib/types"));
69
65
  const exver_1 = require("../../base/lib/exver");
70
- const PathBuilder_1 = require("../../base/lib/util/PathBuilder");
71
66
  const dependencies_1 = require("../../base/lib/dependencies/dependencies");
72
67
  const util_5 = require("./util");
68
+ const version_1 = require("./version");
73
69
  const actions = __importStar(require("../../base/lib/actions"));
74
- const setupInit_1 = require("./inits/setupInit");
75
70
  const fs = __importStar(require("node:fs/promises"));
76
- exports.OSVersion = (0, exver_1.testTypeVersion)("0.4.0-alpha.0");
71
+ const inits_1 = require("../../base/lib/inits");
72
+ const Drop_1 = require("../../base/lib/util/Drop");
73
+ exports.OSVersion = (0, exver_1.testTypeVersion)("0.4.0-alpha.10");
77
74
  class StartSdk {
78
75
  constructor(manifest) {
79
76
  this.manifest = manifest;
@@ -84,9 +81,6 @@ class StartSdk {
84
81
  withManifest(manifest) {
85
82
  return new StartSdk(manifest);
86
83
  }
87
- withStore() {
88
- return new StartSdk(this.manifest);
89
- }
90
84
  build(isReady) {
91
85
  const startSdkEffectWrapper = {
92
86
  restart: (effects, ...args) => effects.restart(...args),
@@ -94,37 +88,37 @@ class StartSdk {
94
88
  checkDependencies: (effects, ...args) => effects.checkDependencies(...args),
95
89
  mount: (effects, ...args) => effects.mount(...args),
96
90
  getInstalledPackages: (effects, ...args) => effects.getInstalledPackages(...args),
97
- exposeForDependents: (effects, ...args) => effects.exposeForDependents(...args),
98
91
  getServicePortForward: (effects, ...args) => effects.getServicePortForward(...args),
99
92
  clearBindings: (effects, ...args) => effects.clearBindings(...args),
100
93
  getOsIp: (effects, ...args) => effects.getOsIp(...args),
101
94
  getSslKey: (effects, ...args) => effects.getSslKey(...args),
102
- setDataVersion: (effects, ...args) => effects.setDataVersion(...args),
103
- getDataVersion: (effects, ...args) => effects.getDataVersion(...args),
104
95
  shutdown: (effects, ...args) => effects.shutdown(...args),
105
96
  getDependencies: (effects, ...args) => effects.getDependencies(...args),
106
97
  getStatus: (effects, ...args) => effects.getStatus(...args),
98
+ setHealth: (effects, ...args) => effects.setHealth(...args),
107
99
  };
108
100
  return {
109
101
  manifest: this.manifest,
110
102
  ...startSdkEffectWrapper,
103
+ setDataVersion: version_1.setDataVersion,
104
+ getDataVersion: version_1.getDataVersion,
111
105
  action: {
112
106
  run: actions.runAction,
113
- request: (effects, packageId, action, severity, options) => actions.requestAction({
107
+ createTask: (effects, packageId, action, severity, options) => actions.createTask({
114
108
  effects,
115
109
  packageId,
116
110
  action,
117
111
  severity,
118
112
  options: options,
119
113
  }),
120
- requestOwn: (effects, action, severity, options) => actions.requestAction({
114
+ createOwnTask: (effects, action, severity, options) => actions.createTask({
121
115
  effects,
122
116
  packageId: this.manifest.id,
123
117
  action,
124
118
  severity,
125
119
  options: options,
126
120
  }),
127
- clearRequest: (effects, ...replayIds) => effects.action.clearRequests({ only: replayIds }),
121
+ clearTask: (effects, ...replayIds) => effects.action.clearTasks({ only: replayIds }),
128
122
  },
129
123
  checkDependencies: dependencies_1.checkDependencies,
130
124
  serviceInterface: {
@@ -136,12 +130,13 @@ class StartSdk {
136
130
  getAll: (effects, opts) => (0, util_3.getServiceInterfaces)(effects, opts),
137
131
  },
138
132
  getContainerIp: (effects, options = {}) => {
139
- async function* watch() {
133
+ async function* watch(abort) {
140
134
  const resolveCell = { resolve: () => { } };
141
135
  effects.onLeaveContext(() => {
142
136
  resolveCell.resolve();
143
137
  });
144
- while (effects.isInContext) {
138
+ abort?.addEventListener("abort", () => resolveCell.resolve());
139
+ while (effects.isInContext && !abort?.aborted) {
145
140
  let callback = () => { };
146
141
  const waitForNext = new Promise((resolve) => {
147
142
  callback = resolve;
@@ -158,13 +153,22 @@ class StartSdk {
158
153
  (() => effects.constRetry && effects.constRetry()),
159
154
  }),
160
155
  once: () => effects.getContainerIp(options),
161
- watch,
156
+ watch: (abort) => {
157
+ const ctrl = new AbortController();
158
+ abort?.addEventListener("abort", () => ctrl.abort());
159
+ return Drop_1.DropGenerator.of(watch(ctrl.signal), () => ctrl.abort());
160
+ },
162
161
  onChange: (callback) => {
163
162
  ;
164
163
  (async () => {
165
- for await (const value of watch()) {
164
+ const ctrl = new AbortController();
165
+ for await (const value of watch(ctrl.signal)) {
166
166
  try {
167
- await callback(value);
167
+ const res = await callback(value);
168
+ if (res.cancel) {
169
+ ctrl.abort();
170
+ break;
171
+ }
168
172
  }
169
173
  catch (e) {
170
174
  console.error("callback function threw an error @ getContainerIp.onChange", e);
@@ -174,30 +178,33 @@ class StartSdk {
174
178
  .catch((e) => callback(null, e))
175
179
  .catch((e) => console.error("callback function threw an error @ getContainerIp.onChange", e));
176
180
  },
181
+ waitFor: async (pred) => {
182
+ const resolveCell = { resolve: () => { } };
183
+ effects.onLeaveContext(() => {
184
+ resolveCell.resolve();
185
+ });
186
+ while (effects.isInContext) {
187
+ let callback = () => { };
188
+ const waitForNext = new Promise((resolve) => {
189
+ callback = resolve;
190
+ resolveCell.resolve = resolve;
191
+ });
192
+ const res = await effects.getContainerIp({ ...options, callback });
193
+ if (pred(res)) {
194
+ resolveCell.resolve();
195
+ return res;
196
+ }
197
+ await waitForNext;
198
+ }
199
+ return null;
200
+ },
177
201
  };
178
202
  },
179
- store: {
180
- get: (effects, packageId, path) => (0, getStore_1.getStore)(effects, path, {
181
- packageId,
182
- }),
183
- getOwn: (effects, path) => (0, getStore_1.getStore)(effects, path),
184
- setOwn: (effects, path, value) => effects.store.set({
185
- value,
186
- path: (0, PathBuilder_1.extractJsonPath)(path),
187
- }),
188
- },
189
203
  MultiHost: {
190
204
  of: (effects, id) => new Host_1.MultiHost({ id, effects }),
191
205
  },
192
206
  nullIfEmpty: util_2.nullIfEmpty,
193
207
  useEntrypoint: (overrideCmd) => new T.UseEntrypoint(overrideCmd),
194
- runCommand: async (effects, image, command, options,
195
- /**
196
- * A name to use to refer to the ephemeral subcontainer for debugging purposes
197
- */
198
- name) => {
199
- return runCommand(effects, image, command, options, name);
200
- },
201
208
  /**
202
209
  * @description Use this class to create an Action. By convention, each Action should receive its own file.
203
210
  *
@@ -260,7 +267,7 @@ class StartSdk {
260
267
  )
261
268
  * ```
262
269
  */
263
- withInput: (id, metadata, inputSpec, getInput, run) => setupActions_1.Action.withInput(id, metadata, inputSpec, getInput, run),
270
+ withInput: setupActions_1.Action.withInput,
264
271
  /**
265
272
  * @description Use this function to create an action that does not accept form input
266
273
  * @param id - a unique ID for this action
@@ -270,6 +277,7 @@ class StartSdk {
270
277
  * In this example, we create an action that returns a secret phrase for the user to see.
271
278
  *
272
279
  * ```
280
+ import { store } from '../file-models/store.json'
273
281
  import { sdk } from '../sdk'
274
282
 
275
283
  export const showSecretPhrase = sdk.Action.withoutInput(
@@ -294,9 +302,7 @@ class StartSdk {
294
302
  'Below is your secret phrase. Use it to gain access to extraordinary places',
295
303
  result: {
296
304
  type: 'single',
297
- value: await sdk.store
298
- .getOwn(effects, sdk.StorePath.secretPhrase)
299
- .const(),
305
+ value: (await store.read.once())?.secretPhrase,
300
306
  copyable: true,
301
307
  qr: true,
302
308
  masked: true,
@@ -325,14 +331,13 @@ class StartSdk {
325
331
  schemeOverride: null,
326
332
  username: null,
327
333
  path: '',
328
- search: {},
334
+ query: {},
329
335
  })
330
336
  * ```
331
337
  */
332
338
  createInterface: (effects, options) => new ServiceInterfaceBuilder_1.ServiceInterfaceBuilder({ ...options, effects }),
333
339
  getSystemSmtp: (effects) => new util_1.GetSystemSmtp(effects),
334
340
  getSslCerificate: (effects, hostnames, algorithm) => new util_5.GetSslCertificate(effects, hostnames, algorithm),
335
- HealthCheck: HealthCheck_1.HealthCheck,
336
341
  healthCheck: {
337
342
  checkPortListening: checkPortListening_1.checkPortListening,
338
343
  checkWebUrl: checkFns_1.checkWebUrl,
@@ -383,11 +388,11 @@ class StartSdk {
383
388
  /**
384
389
  * @description Use this function to set dependency information.
385
390
  * @example
386
- * In this example, we create a perpetual dependency on Hello World >=1.0.0:0, where Hello World must be running and passing its "primary" health check.
391
+ * In this example, we create a dependency on Hello World >=1.0.0:0, where Hello World must be running and passing its "primary" health check.
387
392
  *
388
393
  * ```
389
394
  export const setDependencies = sdk.setupDependencies(
390
- async ({ effects, input }) => {
395
+ async ({ effects }) => {
391
396
  return {
392
397
  'hello-world': {
393
398
  kind: 'running',
@@ -398,66 +403,57 @@ class StartSdk {
398
403
  },
399
404
  )
400
405
  * ```
401
- * @example
402
- * In this example, we create a conditional dependency on Hello World based on a hypothetical "needsWorld" boolean in our Store.
403
- * Using .const() ensures that if the "needsWorld" boolean changes, setupDependencies will re-run.
404
- *
405
- * ```
406
- export const setDependencies = sdk.setupDependencies(
407
- async ({ effects }) => {
408
- if (sdk.store.getOwn(sdk.StorePath.needsWorld).const()) {
409
- return {
410
- 'hello-world': {
411
- kind: 'running',
412
- versionRange: '>=1.0.0',
413
- healthChecks: ['primary'],
414
- },
415
- }
416
- }
417
- return {}
418
- },
419
- )
420
- * ```
421
406
  */
422
407
  setupDependencies: (setupDependencies_1.setupDependencies),
423
- setupInit: (setupInit_1.setupInit),
424
408
  /**
425
- * @description Use this function to execute arbitrary logic *once*, on initial install *before* interfaces, actions, and dependencies are updated.
409
+ * @description Use this function to create an InitScript that runs every time the service initializes (install, update, restore, rebuild, and server bootup)
410
+ */
411
+ setupOnInit: inits_1.setupOnInit,
412
+ /**
413
+ * @description Use this function to create an UninitScript that runs every time the service uninitializes (update, uninstall, and server shutdown)
414
+ */
415
+ setupOnUninit: inits_1.setupOnUninit,
416
+ /**
417
+ * @description Use this function to setup what happens when the service initializes.
418
+ *
419
+ * This happens when the server boots, or a service is installed, updated, or restored
420
+ *
421
+ * Not every init script does something on every initialization. For example, versions only does something on install or update
422
+ *
423
+ * These scripts are run in the order they are supplied
426
424
  * @example
427
- * In the this example, we initialize a config file
428
425
  *
429
426
  * ```
430
- const preInstall = sdk.setupPreInstall(async ({ effects }) => {
431
- await configFile.write(effects, { name: 'World' })
432
- })
427
+ export const init = sdk.setupInit(
428
+ restoreInit,
429
+ versions,
430
+ setDependencies,
431
+ setInterfaces,
432
+ actions,
433
+ postInstall,
434
+ )
433
435
  * ```
434
436
  */
435
- setupPreInstall: (fn) => setupInstall_1.PreInstall.of(fn),
437
+ setupInit: inits_1.setupInit,
436
438
  /**
437
- * @description Use this function to execute arbitrary logic *once*, on initial install *after* interfaces, actions, and dependencies are updated.
439
+ * @description Use this function to setup what happens when the service uninitializes.
440
+ *
441
+ * This happens when the server shuts down, or a service is uninstalled or updated
442
+ *
443
+ * Not every uninit script does something on every uninitialization. For example, versions only does something on uninstall or update
444
+ *
445
+ * These scripts are run in the order they are supplied
438
446
  * @example
439
- * In the this example, we bootstrap our Store with a random, 16-char admin password.
440
447
  *
441
448
  * ```
442
- const postInstall = sdk.setupPostInstall(async ({ effects }) => {
443
- await sdk.store.setOwn(
444
- effects,
445
- sdk.StorePath.adminPassword,
446
- utils.getDefaultString({
447
- charset: 'a-z,A-Z,1-9,!,@,$,%,&,',
448
- len: 16,
449
- }),
450
- )
451
- })
449
+ export const uninit = sdk.setupUninit(
450
+ versions,
451
+ )
452
452
  * ```
453
453
  */
454
- setupPostInstall: (fn) => setupInstall_1.PostInstall.of(fn),
454
+ setupUninit: inits_1.setupUninit,
455
455
  /**
456
456
  * @description Use this function to determine how this service will be hosted and served. The function executes on service install, service update, and inputSpec save.
457
- *
458
- * "input" will be of type `Input` for inputSpec save. It will be `null` for install and update.
459
- *
460
- * To learn about creating multi-hosts and interfaces, check out the {@link https://docs.start9.com/packaging-guide/learn/interfaces documentation}.
461
457
  * @param inputSpec - The inputSpec spec of this service as exported from /inputSpec/spec.
462
458
  * @param fn - an async function that returns an array of interface receipts. The function always has access to `effects`; it has access to `input` only after inputSpec save, otherwise `input` will be null.
463
459
  * @example
@@ -465,8 +461,7 @@ class StartSdk {
465
461
  *
466
462
  * ```
467
463
  export const setInterfaces = sdk.setupInterfaces(
468
- inputSpecSpec,
469
- async ({ effects, input }) => {
464
+ async ({ effects }) => {
470
465
  // ** UI multi-host **
471
466
  const uiMulti = sdk.MultiHost.of(effects, 'ui-multi')
472
467
  const uiMultiOrigin = await uiMulti.bindPort(80, {
@@ -482,7 +477,7 @@ class StartSdk {
482
477
  schemeOverride: null,
483
478
  username: null,
484
479
  path: '',
485
- search: {},
480
+ query: {},
486
481
  })
487
482
  // Admin UI
488
483
  const adminUi = sdk.createInterface(effects, {
@@ -494,7 +489,7 @@ class StartSdk {
494
489
  schemeOverride: null,
495
490
  username: null,
496
491
  path: '/admin',
497
- search: {},
492
+ query: {},
498
493
  })
499
494
  // UI receipt
500
495
  const uiReceipt = await uiMultiOrigin.export([primaryUi, adminUi])
@@ -514,7 +509,7 @@ class StartSdk {
514
509
  schemeOverride: null,
515
510
  username: null,
516
511
  path: '',
517
- search: {},
512
+ query: {},
518
513
  })
519
514
  // API receipt
520
515
  const apiReceipt = await apiMultiOrigin.export([api])
@@ -527,10 +522,6 @@ class StartSdk {
527
522
  */
528
523
  setupInterfaces: setupInterfaces_1.setupServiceInterfaces,
529
524
  setupMain: (fn) => (0, mainFn_1.setupMain)(fn),
530
- /**
531
- * Use this function to execute arbitrary logic *once*, on uninstall only. Most services will not use this.
532
- */
533
- setupUninstall: (fn) => (0, setupUninstall_1.setupUninstall)(fn),
534
525
  trigger: {
535
526
  defaultTrigger: defaultTrigger_1.defaultTrigger,
536
527
  cooldownTrigger: trigger_1.cooldownTrigger,
@@ -538,14 +529,12 @@ class StartSdk {
538
529
  successFailure: successFailure_1.successFailure,
539
530
  },
540
531
  Mounts: {
541
- of() {
542
- return Mounts_1.Mounts.of();
543
- },
532
+ of: (Mounts_1.Mounts.of),
544
533
  },
545
534
  Backups: {
546
- volumes: (...volumeNames) => Backups_1.Backups.withVolumes(...volumeNames),
547
- addSets: (...options) => Backups_1.Backups.withSyncs(...options),
548
- withOptions: (options) => Backups_1.Backups.withOptions(options),
535
+ ofVolumes: (Backups_1.Backups.ofVolumes),
536
+ ofSyncs: (Backups_1.Backups.ofSyncs),
537
+ withOptions: (Backups_1.Backups.withOptions),
549
538
  },
550
539
  InputSpec: {
551
540
  /**
@@ -577,9 +566,14 @@ class StartSdk {
577
566
  */
578
567
  of: (spec) => inputSpec_1.InputSpec.of(spec),
579
568
  },
569
+ Daemon: {
570
+ get of() {
571
+ return Daemons_1.Daemon.of();
572
+ },
573
+ },
580
574
  Daemons: {
581
- of(effects, started, healthChecks) {
582
- return Daemons_1.Daemons.of({ effects, started, healthChecks });
575
+ of(effects, started) {
576
+ return Daemons_1.Daemons.of({ effects, started });
583
577
  },
584
578
  },
585
579
  SubContainer: {
@@ -591,347 +585,29 @@ class StartSdk {
591
585
  * @param name - a name to use to refer to the subcontainer for debugging purposes
592
586
  */
593
587
  of(effects, image, mounts, name) {
594
- return SubContainer_1.SubContainer.of(effects, image, mounts, name);
588
+ return SubContainer_1.SubContainerOwned.of(effects, image, mounts, name).then((subc) => subc.rc());
595
589
  },
596
590
  /**
597
- * @description Create a new SubContainer
591
+ * @description Run a function with a temporary SubContainer
598
592
  * @param effects
599
593
  * @param image - what container image to use
600
594
  * @param mounts - what to mount to the subcontainer
601
595
  * @param name - a name to use to refer to the ephemeral subcontainer for debugging purposes
602
596
  */
603
- with(effects, image, mounts, name, fn) {
604
- return SubContainer_1.SubContainer.with(effects, image, mounts, name, fn);
597
+ withTemp(effects, image, mounts, name, fn) {
598
+ return SubContainer_1.SubContainerOwned.withTemp(effects, image, mounts, name, fn);
605
599
  },
606
600
  },
607
- List: {
608
- /**
609
- * @description Create a list of text inputs.
610
- * @param a - attributes of the list itself.
611
- * @param aSpec - attributes describing each member of the list.
612
- */
613
- text: list_1.List.text,
614
- /**
615
- * @description Create a list of objects.
616
- * @param a - attributes of the list itself.
617
- * @param aSpec - attributes describing each member of the list.
618
- */
619
- obj: (a, aSpec) => list_1.List.obj(a, aSpec),
620
- /**
621
- * @description Create a list of dynamic text inputs.
622
- * @param a - attributes of the list itself.
623
- * @param aSpec - attributes describing each member of the list.
624
- */
625
- dynamicText: (list_1.List.dynamicText),
626
- },
627
- StorePath: (0, PathBuilder_1.pathBuilder)(),
628
- Value: {
629
- /**
630
- * @description Displays a boolean toggle to enable/disable
631
- * @example
632
- * ```
633
- toggleExample: Value.toggle({
634
- // required
635
- name: 'Toggle Example',
636
- default: true,
637
-
638
- // optional
639
- description: null,
640
- warning: null,
641
- immutable: false,
642
- }),
643
- * ```
644
- */
645
- toggle: value_1.Value.toggle,
646
- /**
647
- * @description Displays a text input field
648
- * @example
649
- * ```
650
- textExample: Value.text({
651
- // required
652
- name: 'Text Example',
653
- required: false,
654
- default: null,
655
-
656
- // optional
657
- description: null,
658
- placeholder: null,
659
- warning: null,
660
- generate: null,
661
- inputmode: 'text',
662
- masked: false,
663
- minLength: null,
664
- maxLength: null,
665
- patterns: [],
666
- immutable: false,
667
- }),
668
- * ```
669
- */
670
- text: value_1.Value.text,
671
- /**
672
- * @description Displays a large textarea field for long form entry.
673
- * @example
674
- * ```
675
- textareaExample: Value.textarea({
676
- // required
677
- name: 'Textarea Example',
678
- required: false,
679
- default: null,
680
-
681
- // optional
682
- description: null,
683
- placeholder: null,
684
- warning: null,
685
- minLength: null,
686
- maxLength: null,
687
- immutable: false,
688
- }),
689
- * ```
690
- */
691
- textarea: value_1.Value.textarea,
692
- /**
693
- * @description Displays a number input field
694
- * @example
695
- * ```
696
- numberExample: Value.number({
697
- // required
698
- name: 'Number Example',
699
- required: false,
700
- default: null,
701
- integer: true,
702
-
703
- // optional
704
- description: null,
705
- placeholder: null,
706
- warning: null,
707
- min: null,
708
- max: null,
709
- immutable: false,
710
- step: null,
711
- units: null,
712
- }),
713
- * ```
714
- */
715
- number: value_1.Value.number,
716
- /**
717
- * @description Displays a browser-native color selector.
718
- * @example
719
- * ```
720
- colorExample: Value.color({
721
- // required
722
- name: 'Color Example',
723
- required: false,
724
- default: null,
725
-
726
- // optional
727
- description: null,
728
- warning: null,
729
- immutable: false,
730
- }),
731
- * ```
732
- */
733
- color: value_1.Value.color,
734
- /**
735
- * @description Displays a browser-native date/time selector.
736
- * @example
737
- * ```
738
- datetimeExample: Value.datetime({
739
- // required
740
- name: 'Datetime Example',
741
- required: false,
742
- default: null,
743
-
744
- // optional
745
- description: null,
746
- warning: null,
747
- immutable: false,
748
- inputmode: 'datetime-local',
749
- min: null,
750
- max: null,
751
- }),
752
- * ```
753
- */
754
- datetime: value_1.Value.datetime,
755
- /**
756
- * @description Displays a select modal with radio buttons, allowing for a single selection.
757
- * @example
758
- * ```
759
- selectExample: Value.select({
760
- // required
761
- name: 'Select Example',
762
- default: 'radio1',
763
- values: {
764
- radio1: 'Radio 1',
765
- radio2: 'Radio 2',
766
- },
767
-
768
- // optional
769
- description: null,
770
- warning: null,
771
- immutable: false,
772
- disabled: false,
773
- }),
774
- * ```
775
- */
776
- select: value_1.Value.select,
777
- /**
778
- * @description Displays a select modal with checkboxes, allowing for multiple selections.
779
- * @example
780
- * ```
781
- multiselectExample: Value.multiselect({
782
- // required
783
- name: 'Multiselect Example',
784
- values: {
785
- option1: 'Option 1',
786
- option2: 'Option 2',
787
- },
788
- default: [],
789
-
790
- // optional
791
- description: null,
792
- warning: null,
793
- immutable: false,
794
- disabled: false,
795
- minlength: null,
796
- maxLength: null,
797
- }),
798
- * ```
799
- */
800
- multiselect: value_1.Value.multiselect,
801
- /**
802
- * @description Display a collapsable grouping of additional fields, a "sub form". The second value is the inputSpec spec for the sub form.
803
- * @example
804
- * ```
805
- objectExample: Value.object(
806
- {
807
- // required
808
- name: 'Object Example',
809
-
810
- // optional
811
- description: null,
812
- warning: null,
813
- },
814
- InputSpec.of({}),
815
- ),
816
- * ```
817
- */
818
- object: value_1.Value.object,
819
- /**
820
- * @description Displays a dropdown, allowing for a single selection. Depending on the selection, a different object ("sub form") is presented.
821
- * @example
822
- * ```
823
- unionExample: Value.union(
824
- {
825
- // required
826
- name: 'Union Example',
827
- default: 'option1',
828
-
829
- // optional
830
- description: null,
831
- warning: null,
832
- disabled: false,
833
- immutable: false,
834
- },
835
- Variants.of({
836
- option1: {
837
- name: 'Option 1',
838
- spec: InputSpec.of({}),
839
- },
840
- option2: {
841
- name: 'Option 2',
842
- spec: InputSpec.of({}),
843
- },
844
- }),
845
- ),
846
- * ```
847
- */
848
- union: value_1.Value.union,
849
- /**
850
- * @description Presents an interface to add/remove/edit items in a list.
851
- * @example
852
- * In this example, we create a list of text inputs.
853
- *
854
- * ```
855
- listExampleText: Value.list(
856
- List.text(
857
- {
858
- // required
859
- name: 'Text List',
860
-
861
- // optional
862
- description: null,
863
- warning: null,
864
- default: [],
865
- minLength: null,
866
- maxLength: null,
867
- },
868
- {
869
- // required
870
- patterns: [],
871
-
872
- // optional
873
- placeholder: null,
874
- generate: null,
875
- inputmode: 'url',
876
- masked: false,
877
- minLength: null,
878
- maxLength: null,
879
- },
880
- ),
881
- ),
882
- * ```
883
- * @example
884
- * In this example, we create a list of objects.
885
- *
886
- * ```
887
- listExampleObject: Value.list(
888
- List.obj(
889
- {
890
- // required
891
- name: 'Object List',
892
-
893
- // optional
894
- description: null,
895
- warning: null,
896
- default: [],
897
- minLength: null,
898
- maxLength: null,
899
- },
900
- {
901
- // required
902
- spec: InputSpec.of({}),
903
-
904
- // optional
905
- displayAs: null,
906
- uniqueBy: null,
907
- },
908
- ),
909
- ),
910
- * ```
911
- */
912
- list: value_1.Value.list,
913
- hidden: value_1.Value.hidden,
914
- dynamicToggle: (value_1.Value.dynamicToggle),
915
- dynamicText: (value_1.Value.dynamicText),
916
- dynamicTextarea: (value_1.Value.dynamicTextarea),
917
- dynamicNumber: (value_1.Value.dynamicNumber),
918
- dynamicColor: (value_1.Value.dynamicColor),
919
- dynamicDatetime: (value_1.Value.dynamicDatetime),
920
- dynamicSelect: (value_1.Value.dynamicSelect),
921
- dynamicMultiselect: (value_1.Value.dynamicMultiselect),
922
- filteredUnion: (getDisabledFn, a, aVariants) => value_1.Value.filteredUnion(getDisabledFn, a, aVariants),
923
- dynamicUnion: (getA, aVariants) => value_1.Value.dynamicUnion(getA, aVariants),
924
- },
925
- Variants: {
926
- of: (a) => variants_1.Variants.of(a),
927
- },
601
+ List: list_1.List,
602
+ Value: value_1.Value,
603
+ Variants: variants_1.Variants,
928
604
  };
929
605
  }
930
606
  }
931
607
  exports.StartSdk = StartSdk;
932
608
  async function runCommand(effects, image, command, options, name) {
933
609
  let commands;
934
- if (command instanceof T.UseEntrypoint) {
610
+ if (T.isUseEntrypoint(command)) {
935
611
  const imageMeta = await fs
936
612
  .readFile(`/media/startos/images/${image.imageId}.json`, {
937
613
  encoding: "utf8",
@@ -939,11 +615,11 @@ async function runCommand(effects, image, command, options, name) {
939
615
  .catch(() => "{}")
940
616
  .then(JSON.parse);
941
617
  commands = imageMeta.entrypoint ?? [];
942
- commands.concat(...(command.overridCmd ?? imageMeta.cmd ?? []));
618
+ commands = commands.concat(...(command.overridCmd ?? imageMeta.cmd ?? []));
943
619
  }
944
620
  else
945
621
  commands = (0, util_4.splitCommand)(command);
946
- return SubContainer_1.SubContainer.with(effects, image, options.mounts, name ||
622
+ return SubContainer_1.SubContainerOwned.withTemp(effects, image, options.mounts, name ||
947
623
  commands
948
624
  .map((c) => {
949
625
  if (c.includes(" ")) {