@sprucelabs/spruce-cli 19.0.0 → 19.1.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 (1014) hide show
  1. package/.DS_Store +0 -0
  2. package/.env +25 -0
  3. package/.eslintcache +1 -0
  4. package/CHANGELOG.md +6 -0
  5. package/build/.spruce/errors/spruceCli/actionCancelled.schema.js.map +1 -1
  6. package/build/.spruce/errors/spruceCli/bootError.schema.js.map +1 -1
  7. package/build/.spruce/errors/spruceCli/buildFailed.schema.js.map +1 -1
  8. package/build/.spruce/errors/spruceCli/cacheNotEnabled.schema.js.map +1 -1
  9. package/build/.spruce/errors/spruceCli/commandAborted.schema.js.map +1 -1
  10. package/build/.spruce/errors/spruceCli/commandBlocked.schema.js.map +1 -1
  11. package/build/.spruce/errors/spruceCli/commandNotImplemented.schema.js.map +1 -1
  12. package/build/.spruce/errors/spruceCli/createAutoloaderFailed.schema.js.map +1 -1
  13. package/build/.spruce/errors/spruceCli/dependencyExists.schema.js.map +1 -1
  14. package/build/.spruce/errors/spruceCli/deployFailed.schema.js.map +1 -1
  15. package/build/.spruce/errors/spruceCli/directoryEmpty.schema.js.map +1 -1
  16. package/build/.spruce/errors/spruceCli/directoryNotSkill.schema.js.map +1 -1
  17. package/build/.spruce/errors/spruceCli/dockerNotStarted.schema.js.map +1 -1
  18. package/build/.spruce/errors/spruceCli/executingCommandFailed.schema.js.map +1 -1
  19. package/build/.spruce/errors/spruceCli/failedToImport.schema.js.map +1 -1
  20. package/build/.spruce/errors/spruceCli/featureNotInstalled.schema.js.map +1 -1
  21. package/build/.spruce/errors/spruceCli/fileExists.schema.js.map +1 -1
  22. package/build/.spruce/errors/spruceCli/generic.schema.js.map +1 -1
  23. package/build/.spruce/errors/spruceCli/invalidCommand.schema.js.map +1 -1
  24. package/build/.spruce/errors/spruceCli/invalidEventContract.schema.js.map +1 -1
  25. package/build/.spruce/errors/spruceCli/invalidFeatureCode.schema.js.map +1 -1
  26. package/build/.spruce/errors/spruceCli/invalidTestDirectory.schema.js.map +1 -1
  27. package/build/.spruce/errors/spruceCli/lintFailed.schema.js.map +1 -1
  28. package/build/.spruce/errors/spruceCli/mercuryResponseError.schema.js.map +1 -1
  29. package/build/.spruce/errors/spruceCli/missingDependencies.schema.js.map +1 -1
  30. package/build/.spruce/errors/spruceCli/missingDependenciesDependency.schema.js.map +1 -1
  31. package/build/.spruce/errors/spruceCli/noOrganizationsFound.schema.js.map +1 -1
  32. package/build/.spruce/errors/spruceCli/noSkillsRegistered.schema.js.map +1 -1
  33. package/build/.spruce/errors/spruceCli/notImplemented.schema.js.map +1 -1
  34. package/build/.spruce/errors/spruceCli/notLoggedIn.schema.js.map +1 -1
  35. package/build/.spruce/errors/spruceCli/schemaExists.schema.js.map +1 -1
  36. package/build/.spruce/errors/spruceCli/schemaFailedToImport.schema.js.map +1 -1
  37. package/build/.spruce/errors/spruceCli/schemaTemplateItemBuildingFailed.schema.js.map +1 -1
  38. package/build/.spruce/errors/spruceCli/skillNotFound.schema.js.map +1 -1
  39. package/build/.spruce/errors/spruceCli/skillNotRegistered.schema.js.map +1 -1
  40. package/build/.spruce/errors/spruceCli/skillViewExists.schema.js.map +1 -1
  41. package/build/.spruce/errors/spruceCli/storeExists.schema.js.map +1 -1
  42. package/build/.spruce/errors/spruceCli/testFailed.schema.js.map +1 -1
  43. package/build/.spruce/errors/spruceCli/themeExists.schema.js.map +1 -1
  44. package/build/.spruce/errors/spruceCli/transportAlreadyExists.schema.js.map +1 -1
  45. package/build/.spruce/errors/spruceCli/vscodeNotInstalled.schema.js.map +1 -1
  46. package/build/.spruce/events/events.contract.js.map +1 -1
  47. package/build/.spruce/events/heartwood/didRegisterSkillViews.v2021_02_11.contract.js.map +1 -1
  48. package/build/.spruce/events/heartwood/generateUrl.v2021_02_11.contract.js.map +1 -1
  49. package/build/.spruce/events/heartwood/getActiveTheme.v2021_02_11.contract.js.map +1 -1
  50. package/build/.spruce/events/heartwood/getSkillViews.v2021_02_11.contract.js.map +1 -1
  51. package/build/.spruce/events/heartwood/listViews.v2021_02_11.contract.js.map +1 -1
  52. package/build/.spruce/events/heartwood/registerDashboardCards.v2021_02_11.contract.js.map +1 -1
  53. package/build/.spruce/events/heartwood/registerSkillViews.v2021_02_11.contract.js.map +1 -1
  54. package/build/.spruce/events/heartwood/upsertTheme.v2021_02_11.contract.js.map +1 -1
  55. package/build/.spruce/events/spruceCli/registerSkillViews.v2021_04_11.contract.js.map +1 -1
  56. package/build/.spruce/schemas/fields/fieldClassMap.js.map +1 -1
  57. package/build/.spruce/schemas/fields/fields.types.js.map +1 -1
  58. package/build/.spruce/schemas/heartwood/v2021_02_11/didRegisterSkillViewsEmitPayload.schema.js.map +1 -1
  59. package/build/.spruce/schemas/heartwood/v2021_02_11/didRegisterSkillViewsEmitTarget.schema.js.map +1 -1
  60. package/build/.spruce/schemas/heartwood/v2021_02_11/didRegisterSkillViewsEmitTargetAndPayload.schema.js.map +1 -1
  61. package/build/.spruce/schemas/heartwood/v2021_02_11/generateUrlEmitPayload.schema.js.map +1 -1
  62. package/build/.spruce/schemas/heartwood/v2021_02_11/generateUrlEmitTarget.schema.js.map +1 -1
  63. package/build/.spruce/schemas/heartwood/v2021_02_11/generateUrlEmitTargetAndPayload.schema.js.map +1 -1
  64. package/build/.spruce/schemas/heartwood/v2021_02_11/generateUrlResponsePayload.schema.js.map +1 -1
  65. package/build/.spruce/schemas/heartwood/v2021_02_11/getActiveThemeEmitTarget.schema.js.map +1 -1
  66. package/build/.spruce/schemas/heartwood/v2021_02_11/getActiveThemeEmitTargetAndPayload.schema.js.map +1 -1
  67. package/build/.spruce/schemas/heartwood/v2021_02_11/getActiveThemeResponsePayload.schema.js.map +1 -1
  68. package/build/.spruce/schemas/heartwood/v2021_02_11/getSkillViewsEmitTargetAndPayload.schema.js.map +1 -1
  69. package/build/.spruce/schemas/heartwood/v2021_02_11/getSkillViewsResponsePayload.schema.js.map +1 -1
  70. package/build/.spruce/schemas/heartwood/v2021_02_11/getViewControllersEmitTarget.schema.js.map +1 -1
  71. package/build/.spruce/schemas/heartwood/v2021_02_11/listViewsResponsePayload.schema.js.map +1 -1
  72. package/build/.spruce/schemas/heartwood/v2021_02_11/listViewsResult.schema.js.map +1 -1
  73. package/build/.spruce/schemas/heartwood/v2021_02_11/registerDashboardCardsResponsePayload.schema.js.map +1 -1
  74. package/build/.spruce/schemas/heartwood/v2021_02_11/registerSkillViewsEmitPayload.schema.js.map +1 -1
  75. package/build/.spruce/schemas/heartwood/v2021_02_11/registerSkillViewsEmitTargetAndPayload.schema.js.map +1 -1
  76. package/build/.spruce/schemas/heartwood/v2021_02_11/registerSkillViewsResponsePayload.schema.js.map +1 -1
  77. package/build/.spruce/schemas/heartwood/v2021_02_11/theme.schema.js.map +1 -1
  78. package/build/.spruce/schemas/heartwood/v2021_02_11/upsertThemeEmitPayload.schema.js.map +1 -1
  79. package/build/.spruce/schemas/heartwood/v2021_02_11/upsertThemeEmitTarget.schema.js.map +1 -1
  80. package/build/.spruce/schemas/heartwood/v2021_02_11/upsertThemeEmitTargetAndPayload.schema.js.map +1 -1
  81. package/build/.spruce/schemas/heartwood/v2021_02_11/upsertThemeResponsePayload.schema.js.map +1 -1
  82. package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/theme.schema.js.map +1 -1
  83. package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/themeProps.schema.js.map +1 -1
  84. package/build/.spruce/schemas/schemas.types.js.map +1 -1
  85. package/build/.spruce/schemas/spruce/v2020_07_22/choice.schema.js.map +1 -1
  86. package/build/.spruce/schemas/spruce/v2020_07_22/link.schema.js.map +1 -1
  87. package/build/.spruce/schemas/spruce/v2020_07_22/location.schema.js.map +1 -1
  88. package/build/.spruce/schemas/spruce/v2020_07_22/message.schema.js.map +1 -1
  89. package/build/.spruce/schemas/spruce/v2020_07_22/messageSource.schema.js.map +1 -1
  90. package/build/.spruce/schemas/spruce/v2020_07_22/messageTarget.schema.js.map +1 -1
  91. package/build/.spruce/schemas/spruce/v2020_07_22/organization.schema.js.map +1 -1
  92. package/build/.spruce/schemas/spruce/v2020_07_22/person.schema.js.map +1 -1
  93. package/build/.spruce/schemas/spruce/v2020_07_22/personLocation.schema.js.map +1 -1
  94. package/build/.spruce/schemas/spruce/v2020_07_22/personOrganization.schema.js.map +1 -1
  95. package/build/.spruce/schemas/spruce/v2020_07_22/role.schema.js.map +1 -1
  96. package/build/.spruce/schemas/spruce/v2020_07_22/sendMessage.schema.js.map +1 -1
  97. package/build/.spruce/schemas/spruce/v2020_07_22/skill.schema.js.map +1 -1
  98. package/build/.spruce/schemas/spruce/v2020_07_22/skillCreator.schema.js.map +1 -1
  99. package/build/.spruce/schemas/spruceCli/v2020_07_22/actionResponse.schema.js.map +1 -1
  100. package/build/.spruce/schemas/spruceCli/v2020_07_22/bootSkillOptions.schema.js.map +1 -1
  101. package/build/.spruce/schemas/spruceCli/v2020_07_22/createConversationTopicOptions.schema.js.map +1 -1
  102. package/build/.spruce/schemas/spruceCli/v2020_07_22/createErrorOptions.schema.js.map +1 -1
  103. package/build/.spruce/schemas/spruceCli/v2020_07_22/createOrganizationOptions.schema.js.map +1 -1
  104. package/build/.spruce/schemas/spruceCli/v2020_07_22/createSchemaOptions.schema.js.map +1 -1
  105. package/build/.spruce/schemas/spruceCli/v2020_07_22/createTestOptions.schema.js.map +1 -1
  106. package/build/.spruce/schemas/spruceCli/v2020_07_22/generatedDir.schema.js.map +1 -1
  107. package/build/.spruce/schemas/spruceCli/v2020_07_22/generatedFile.schema.js.map +1 -1
  108. package/build/.spruce/schemas/spruceCli/v2020_07_22/installSkillAtOrganizationOptions.schema.js.map +1 -1
  109. package/build/.spruce/schemas/spruceCli/v2020_07_22/listenEventOptions.schema.js.map +1 -1
  110. package/build/.spruce/schemas/spruceCli/v2020_07_22/namedTemplateItem.schema.js.map +1 -1
  111. package/build/.spruce/schemas/spruceCli/v2020_07_22/nodeFeatureOptions.schema.js.map +1 -1
  112. package/build/.spruce/schemas/spruceCli/v2020_07_22/npmPackage.schema.js.map +1 -1
  113. package/build/.spruce/schemas/spruceCli/v2020_07_22/onboardOptions.schema.js.map +1 -1
  114. package/build/.spruce/schemas/spruceCli/v2020_07_22/onboarding.schema.js.map +1 -1
  115. package/build/.spruce/schemas/spruceCli/v2020_07_22/personWithToken.schema.js.map +1 -1
  116. package/build/.spruce/schemas/spruceCli/v2020_07_22/registerDashboardWidgetsEmitPayloadSchema.schema.js.map +1 -1
  117. package/build/.spruce/schemas/spruceCli/v2020_07_22/setupTestsOptions.schema.js.map +1 -1
  118. package/build/.spruce/schemas/spruceCli/v2020_07_22/setupVscodeOptions.schema.js.map +1 -1
  119. package/build/.spruce/schemas/spruceCli/v2020_07_22/skillFeature.schema.js.map +1 -1
  120. package/build/.spruce/schemas/spruceCli/v2020_07_22/syncErrorOptions.schema.js.map +1 -1
  121. package/build/.spruce/schemas/spruceCli/v2020_07_22/syncEventOptions.schema.js.map +1 -1
  122. package/build/.spruce/schemas/spruceCli/v2020_07_22/syncSchemaFieldsOptions.schema.js.map +1 -1
  123. package/build/.spruce/schemas/spruceCli/v2020_07_22/syncSchemasOptions.schema.js.map +1 -1
  124. package/build/.spruce/schemas/spruceCli/v2020_07_22/testOptions.schema.js.map +1 -1
  125. package/build/.spruce/schemas/spruceCli/v2020_07_22/upgradeSkillOptions.schema.js.map +1 -1
  126. package/build/.spruce/schemas/spruceCli/v2020_07_22/watcherDidDetectChangesEmitPayload.schema.js.map +1 -1
  127. package/build/.spruce/schemas/spruceEventUtils/v2021_09_13/eventSource.schema.js.map +1 -1
  128. package/build/.spruce/skill.types.js.map +1 -1
  129. package/build/GlobalEmitter.js.map +1 -1
  130. package/build/InFlightEntertainment.js.map +1 -1
  131. package/build/__tests__/behavioral/AddingADependency.test.js +130 -144
  132. package/build/__tests__/behavioral/AddingADependency.test.js.map +1 -1
  133. package/build/__tests__/behavioral/BlockingCommands.test.js +59 -63
  134. package/build/__tests__/behavioral/BlockingCommands.test.js.map +1 -1
  135. package/build/__tests__/behavioral/BootingTheCli.test.d.ts +2 -1
  136. package/build/__tests__/behavioral/BootingTheCli.test.js +60 -22
  137. package/build/__tests__/behavioral/BootingTheCli.test.js.map +1 -1
  138. package/build/__tests__/behavioral/BootingWithBadFiles.test.js +46 -52
  139. package/build/__tests__/behavioral/BootingWithBadFiles.test.js.map +1 -1
  140. package/build/__tests__/behavioral/CreatingAConversationTopic.test.js +50 -56
  141. package/build/__tests__/behavioral/CreatingAConversationTopic.test.js.map +1 -1
  142. package/build/__tests__/behavioral/DeployingASkill.test.js +512 -548
  143. package/build/__tests__/behavioral/DeployingASkill.test.js.map +1 -1
  144. package/build/__tests__/behavioral/DeployingToSandbox.test.js +321 -351
  145. package/build/__tests__/behavioral/DeployingToSandbox.test.js.map +1 -1
  146. package/build/__tests__/behavioral/EnablingAndDisablingCache.test.js +137 -153
  147. package/build/__tests__/behavioral/EnablingAndDisablingCache.test.js.map +1 -1
  148. package/build/__tests__/behavioral/GettingCliVersion.test.js +31 -37
  149. package/build/__tests__/behavioral/GettingCliVersion.test.js.map +1 -1
  150. package/build/__tests__/behavioral/ManagingDependencies.test.js +112 -122
  151. package/build/__tests__/behavioral/ManagingDependencies.test.js.map +1 -1
  152. package/build/__tests__/behavioral/OverridingCommandsInPackageJson.test.js +41 -45
  153. package/build/__tests__/behavioral/OverridingCommandsInPackageJson.test.js.map +1 -1
  154. package/build/__tests__/behavioral/RegisteringConversationsOnBoot.test.js +55 -59
  155. package/build/__tests__/behavioral/RegisteringConversationsOnBoot.test.js.map +1 -1
  156. package/build/__tests__/behavioral/RememberingUpgradeSelections.test.js +56 -64
  157. package/build/__tests__/behavioral/RememberingUpgradeSelections.test.js.map +1 -1
  158. package/build/__tests__/behavioral/SettingLogTransportsInASkill.test.js +90 -104
  159. package/build/__tests__/behavioral/SettingLogTransportsInASkill.test.js.map +1 -1
  160. package/build/__tests__/behavioral/SettingRemote.test.js +64 -74
  161. package/build/__tests__/behavioral/SettingRemote.test.js.map +1 -1
  162. package/build/__tests__/behavioral/SettingUpVscode.test.js +52 -56
  163. package/build/__tests__/behavioral/SettingUpVscode.test.js.map +1 -1
  164. package/build/__tests__/behavioral/TestingAConversation.test.js +143 -157
  165. package/build/__tests__/behavioral/TestingAConversation.test.js.map +1 -1
  166. package/build/__tests__/behavioral/errors/CreatingANewErrorBuilder.test.js +90 -100
  167. package/build/__tests__/behavioral/errors/CreatingANewErrorBuilder.test.js.map +1 -1
  168. package/build/__tests__/behavioral/errors/KeepingErrorClassInSync.test.js +74 -78
  169. package/build/__tests__/behavioral/errors/KeepingErrorClassInSync.test.js.map +1 -1
  170. package/build/__tests__/behavioral/errors/KeepingErrorsInSync.test.js +180 -190
  171. package/build/__tests__/behavioral/errors/KeepingErrorsInSync.test.js.map +1 -1
  172. package/build/__tests__/behavioral/errors/SettingUpErrors.test.js +34 -38
  173. package/build/__tests__/behavioral/errors/SettingUpErrors.test.js.map +1 -1
  174. package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js +179 -201
  175. package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js.map +1 -1
  176. package/build/__tests__/behavioral/events/CreatingAListener.test.js +423 -459
  177. package/build/__tests__/behavioral/events/CreatingAListener.test.js.map +1 -1
  178. package/build/__tests__/behavioral/events/CreatingAnEvent.test.js +287 -315
  179. package/build/__tests__/behavioral/events/CreatingAnEvent.test.js.map +1 -1
  180. package/build/__tests__/behavioral/events/EventWriter.test.js +64 -66
  181. package/build/__tests__/behavioral/events/EventWriter.test.js.map +1 -1
  182. package/build/__tests__/behavioral/events/KeepingEventsInSync.test.js +286 -316
  183. package/build/__tests__/behavioral/events/KeepingEventsInSync.test.js.map +1 -1
  184. package/build/__tests__/behavioral/events/KeepingEventsInSync2.test.js +398 -420
  185. package/build/__tests__/behavioral/events/KeepingEventsInSync2.test.js.map +1 -1
  186. package/build/__tests__/behavioral/events/KeepingListenersInSync.test.js +43 -49
  187. package/build/__tests__/behavioral/events/KeepingListenersInSync.test.js.map +1 -1
  188. package/build/__tests__/behavioral/events/ListeningToAnEventYouCreate.test.js +55 -59
  189. package/build/__tests__/behavioral/events/ListeningToAnEventYouCreate.test.js.map +1 -1
  190. package/build/__tests__/behavioral/events/ListeningToCoreEvents.test.js +31 -35
  191. package/build/__tests__/behavioral/events/ListeningToCoreEvents.test.js.map +1 -1
  192. package/build/__tests__/behavioral/events/RegisteringEventsOnBoot.test.js +98 -104
  193. package/build/__tests__/behavioral/events/RegisteringEventsOnBoot.test.js.map +1 -1
  194. package/build/__tests__/behavioral/events/RegisteringGlobalEvents.test.js +123 -135
  195. package/build/__tests__/behavioral/events/RegisteringGlobalEvents.test.js.map +1 -1
  196. package/build/__tests__/behavioral/events/SettingUpEvents.test.js +15 -17
  197. package/build/__tests__/behavioral/events/SettingUpEvents.test.js.map +1 -1
  198. package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.js +66 -72
  199. package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.js.map +1 -1
  200. package/build/__tests__/behavioral/events/SyncingEventsOnlyFromDependencies.test.js +76 -82
  201. package/build/__tests__/behavioral/events/SyncingEventsOnlyFromDependencies.test.js.map +1 -1
  202. package/build/__tests__/behavioral/node/CreatingANodeModule.test.js +49 -55
  203. package/build/__tests__/behavioral/node/CreatingANodeModule.test.js.map +1 -1
  204. package/build/__tests__/behavioral/onboard/StartingOnboarding.test.js +79 -85
  205. package/build/__tests__/behavioral/onboard/StartingOnboarding.test.js.map +1 -1
  206. package/build/__tests__/behavioral/organization/CreatingAnOrg.test.js +45 -49
  207. package/build/__tests__/behavioral/organization/CreatingAnOrg.test.js.map +1 -1
  208. package/build/__tests__/behavioral/permissions/CreatingPermissions.test.js +40 -46
  209. package/build/__tests__/behavioral/permissions/CreatingPermissions.test.js.map +1 -1
  210. package/build/__tests__/behavioral/permissions/PermissionPlugin.test.js +15 -19
  211. package/build/__tests__/behavioral/permissions/PermissionPlugin.test.js.map +1 -1
  212. package/build/__tests__/behavioral/permissions/PermissionStore.test.js +174 -198
  213. package/build/__tests__/behavioral/permissions/PermissionStore.test.js.map +1 -1
  214. package/build/__tests__/behavioral/permissions/PermissionWriter.test.js +23 -27
  215. package/build/__tests__/behavioral/permissions/PermissionWriter.test.js.map +1 -1
  216. package/build/__tests__/behavioral/permissions/SyncingPermissions.test.d.ts +1 -0
  217. package/build/__tests__/behavioral/permissions/SyncingPermissions.test.js +209 -208
  218. package/build/__tests__/behavioral/permissions/SyncingPermissions.test.js.map +1 -1
  219. package/build/__tests__/behavioral/permissions/support/AbstractPermissionsTest.js +34 -40
  220. package/build/__tests__/behavioral/permissions/support/AbstractPermissionsTest.js.map +1 -1
  221. package/build/__tests__/behavioral/permissions/support/generateShortAlphaId.js.map +1 -1
  222. package/build/__tests__/behavioral/permissions/support/renderPermissionTestFile.js.map +1 -1
  223. package/build/__tests__/behavioral/permissions/support/sortPermissionContracts.js.map +1 -1
  224. package/build/__tests__/behavioral/person/LoggingInAsPerson.test.js +153 -171
  225. package/build/__tests__/behavioral/person/LoggingInAsPerson.test.js.map +1 -1
  226. package/build/__tests__/behavioral/person/SeeWhoIsLoggedIn.test.js +40 -46
  227. package/build/__tests__/behavioral/person/SeeWhoIsLoggedIn.test.js.map +1 -1
  228. package/build/__tests__/behavioral/polish/SettingUpPolish.test.js +102 -116
  229. package/build/__tests__/behavioral/polish/SettingUpPolish.test.js.map +1 -1
  230. package/build/__tests__/behavioral/schemas/CreatingANewSchemaBuilder.test.js +227 -247
  231. package/build/__tests__/behavioral/schemas/CreatingANewSchemaBuilder.test.js.map +1 -1
  232. package/build/__tests__/behavioral/schemas/CreatingSchemasWithGenerics.test.js +27 -29
  233. package/build/__tests__/behavioral/schemas/CreatingSchemasWithGenerics.test.js.map +1 -1
  234. package/build/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.js +38 -42
  235. package/build/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.js.map +1 -1
  236. package/build/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.js +65 -73
  237. package/build/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.js.map +1 -1
  238. package/build/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.js +100 -110
  239. package/build/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.js.map +1 -1
  240. package/build/__tests__/behavioral/schemas/ImportingSchemaImports.test.js +25 -27
  241. package/build/__tests__/behavioral/schemas/ImportingSchemaImports.test.js.map +1 -1
  242. package/build/__tests__/behavioral/schemas/KeepingSchemasInSync.test.js +425 -465
  243. package/build/__tests__/behavioral/schemas/KeepingSchemasInSync.test.js.map +1 -1
  244. package/build/__tests__/behavioral/schemas/SettingUpSchemas.test.js +49 -55
  245. package/build/__tests__/behavioral/schemas/SettingUpSchemas.test.js.map +1 -1
  246. package/build/__tests__/behavioral/schemas/SettingUpSchemasForModuleDistribution.test.js +435 -467
  247. package/build/__tests__/behavioral/schemas/SettingUpSchemasForModuleDistribution.test.js.map +1 -1
  248. package/build/__tests__/behavioral/schemas/SyncingBadSchemasProvidesHelpfulErrorMessages.test.js +19 -21
  249. package/build/__tests__/behavioral/schemas/SyncingBadSchemasProvidesHelpfulErrorMessages.test.js.map +1 -1
  250. package/build/__tests__/behavioral/schemas/UsingSchemasInCli.test.js +9 -11
  251. package/build/__tests__/behavioral/schemas/UsingSchemasInCli.test.js.map +1 -1
  252. package/build/__tests__/behavioral/skill/BootingASkill.test.js +61 -67
  253. package/build/__tests__/behavioral/skill/BootingASkill.test.js.map +1 -1
  254. package/build/__tests__/behavioral/skill/CreatingASkill.test.js +37 -41
  255. package/build/__tests__/behavioral/skill/CreatingASkill.test.js.map +1 -1
  256. package/build/__tests__/behavioral/skill/InstallingASkillAtAnOrg.test.js +183 -199
  257. package/build/__tests__/behavioral/skill/InstallingASkillAtAnOrg.test.js.map +1 -1
  258. package/build/__tests__/behavioral/skill/LoggingInAsASkill.test.js +153 -171
  259. package/build/__tests__/behavioral/skill/LoggingInAsASkill.test.js.map +1 -1
  260. package/build/__tests__/behavioral/skill/RebuildingASkill.test.js +37 -43
  261. package/build/__tests__/behavioral/skill/RebuildingASkill.test.js.map +1 -1
  262. package/build/__tests__/behavioral/skill/RegisteringASkill.test.js +96 -104
  263. package/build/__tests__/behavioral/skill/RegisteringASkill.test.js.map +1 -1
  264. package/build/__tests__/behavioral/skill/SettingUpASkill.test.js +168 -184
  265. package/build/__tests__/behavioral/skill/SettingUpASkill.test.js.map +1 -1
  266. package/build/__tests__/behavioral/stores/CreatingADataStore.test.js +169 -191
  267. package/build/__tests__/behavioral/stores/CreatingADataStore.test.js.map +1 -1
  268. package/build/__tests__/behavioral/stores/KeepingDataStoresInSync.test.js +105 -125
  269. package/build/__tests__/behavioral/stores/KeepingDataStoresInSync.test.js.map +1 -1
  270. package/build/__tests__/behavioral/tests/CreatingATest.test.js +208 -232
  271. package/build/__tests__/behavioral/tests/CreatingATest.test.js.map +1 -1
  272. package/build/__tests__/behavioral/tests/RunningTests.test.js +75 -79
  273. package/build/__tests__/behavioral/tests/RunningTests.test.js.map +1 -1
  274. package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js +293 -355
  275. package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js.map +1 -1
  276. package/build/__tests__/behavioral/tests/SettingUpASkillForTesting.test.js +65 -75
  277. package/build/__tests__/behavioral/tests/SettingUpASkillForTesting.test.js.map +1 -1
  278. package/build/__tests__/behavioral/tests/SettingUpTests.test.js +29 -33
  279. package/build/__tests__/behavioral/tests/SettingUpTests.test.js.map +1 -1
  280. package/build/__tests__/behavioral/tests/TestReporterSettingsRemembered.test.js +50 -54
  281. package/build/__tests__/behavioral/tests/TestReporterSettingsRemembered.test.js.map +1 -1
  282. package/build/__tests__/behavioral/tests/TestingDataStores.test.js +87 -95
  283. package/build/__tests__/behavioral/tests/TestingDataStores.test.js.map +1 -1
  284. package/build/__tests__/behavioral/upgrading/UpdatingDependencies.test.js +57 -65
  285. package/build/__tests__/behavioral/upgrading/UpdatingDependencies.test.js.map +1 -1
  286. package/build/__tests__/behavioral/upgrading/UpdatingDependencies2.test.js +146 -156
  287. package/build/__tests__/behavioral/upgrading/UpdatingDependencies2.test.js.map +1 -1
  288. package/build/__tests__/behavioral/upgrading/UpgradingANodeModule.test.js +79 -87
  289. package/build/__tests__/behavioral/upgrading/UpgradingANodeModule.test.js.map +1 -1
  290. package/build/__tests__/behavioral/upgrading/UpgradingASkill.test.js +282 -302
  291. package/build/__tests__/behavioral/upgrading/UpgradingASkill.test.js.map +1 -1
  292. package/build/__tests__/behavioral/upgrading/UpgradingASkill2.test.js +183 -197
  293. package/build/__tests__/behavioral/upgrading/UpgradingASkill2.test.js.map +1 -1
  294. package/build/__tests__/behavioral/upgrading/UpgradingASkill3.test.js +214 -238
  295. package/build/__tests__/behavioral/upgrading/UpgradingASkill3.test.js.map +1 -1
  296. package/build/__tests__/behavioral/upgrading/UpgradingASkill4.test.js +118 -126
  297. package/build/__tests__/behavioral/upgrading/UpgradingASkill4.test.js.map +1 -1
  298. package/build/__tests__/behavioral/upgrading/UpgradingASkill5.test.js +138 -152
  299. package/build/__tests__/behavioral/upgrading/UpgradingASkill5.test.js.map +1 -1
  300. package/build/__tests__/behavioral/upgrading/UpgradingWithListeners.test.js +61 -69
  301. package/build/__tests__/behavioral/upgrading/UpgradingWithListeners.test.js.map +1 -1
  302. package/build/__tests__/behavioral/upgrading/UpgradingWithSandboxFeatureInstalled.test.js +90 -104
  303. package/build/__tests__/behavioral/upgrading/UpgradingWithSandboxFeatureInstalled.test.js.map +1 -1
  304. package/build/__tests__/behavioral/views/CreatingASkillView.test.js +194 -220
  305. package/build/__tests__/behavioral/views/CreatingASkillView.test.js.map +1 -1
  306. package/build/__tests__/behavioral/views/CreatingATheme.test.js +83 -97
  307. package/build/__tests__/behavioral/views/CreatingATheme.test.js.map +1 -1
  308. package/build/__tests__/behavioral/views/KeepingViewsInSync.test.js +64 -76
  309. package/build/__tests__/behavioral/views/KeepingViewsInSync.test.js.map +1 -1
  310. package/build/__tests__/behavioral/views/RegisteringSkillViewOnBoot.test.js +102 -114
  311. package/build/__tests__/behavioral/views/RegisteringSkillViewOnBoot.test.js.map +1 -1
  312. package/build/__tests__/behavioral/views/SettingUpViews.test.js +33 -37
  313. package/build/__tests__/behavioral/views/SettingUpViews.test.js.map +1 -1
  314. package/build/__tests__/behavioral/views/TestingViewControllers.test.js +94 -106
  315. package/build/__tests__/behavioral/views/TestingViewControllers.test.js.map +1 -1
  316. package/build/__tests__/behavioral/views/WatchingSkillViews.test.js +32 -38
  317. package/build/__tests__/behavioral/views/WatchingSkillViews.test.js.map +1 -1
  318. package/build/__tests__/behavioral/watchers/WatchingForChanges.test.js +302 -336
  319. package/build/__tests__/behavioral/watchers/WatchingForChanges.test.js.map +1 -1
  320. package/build/__tests__/implementation/ActionExecuter.test.js +132 -136
  321. package/build/__tests__/implementation/ActionExecuter.test.js.map +1 -1
  322. package/build/__tests__/implementation/ActionExecuter2.test.js +270 -286
  323. package/build/__tests__/implementation/ActionExecuter2.test.js.map +1 -1
  324. package/build/__tests__/implementation/ActionExecuter3.test.js +64 -72
  325. package/build/__tests__/implementation/ActionExecuter3.test.js.map +1 -1
  326. package/build/__tests__/implementation/ActionExecuter4.test.js +41 -47
  327. package/build/__tests__/implementation/ActionExecuter4.test.js.map +1 -1
  328. package/build/__tests__/implementation/ArgParser.test.js +13 -17
  329. package/build/__tests__/implementation/ArgParser.test.js.map +1 -1
  330. package/build/__tests__/implementation/BuildService.test.js +25 -29
  331. package/build/__tests__/implementation/BuildService.test.js.map +1 -1
  332. package/build/__tests__/implementation/BulkImporting.test.js +116 -136
  333. package/build/__tests__/implementation/BulkImporting.test.js.map +1 -1
  334. package/build/__tests__/implementation/CachingImports.test.js +89 -99
  335. package/build/__tests__/implementation/CachingImports.test.js.map +1 -1
  336. package/build/__tests__/implementation/CommandOptionBuilder.test.js.map +1 -1
  337. package/build/__tests__/implementation/CommanderCommandResultMapper.test.js +72 -90
  338. package/build/__tests__/implementation/CommanderCommandResultMapper.test.js.map +1 -1
  339. package/build/__tests__/implementation/DataStoreStore.test.js +127 -147
  340. package/build/__tests__/implementation/DataStoreStore.test.js.map +1 -1
  341. package/build/__tests__/implementation/DeletingOrphanedSchemaDefinitions.test.js +46 -52
  342. package/build/__tests__/implementation/DeletingOrphanedSchemaDefinitions.test.js.map +1 -1
  343. package/build/__tests__/implementation/EventContractCleanerUtil.test.js +27 -35
  344. package/build/__tests__/implementation/EventContractCleanerUtil.test.js.map +1 -1
  345. package/build/__tests__/implementation/EventStore.test.js +371 -399
  346. package/build/__tests__/implementation/EventStore.test.js.map +1 -1
  347. package/build/__tests__/implementation/EventTemplateItemBuilder.test.js +21 -27
  348. package/build/__tests__/implementation/EventTemplateItemBuilder.test.js.map +1 -1
  349. package/build/__tests__/implementation/FeatureCommandAttacher.test.js +155 -173
  350. package/build/__tests__/implementation/FeatureCommandAttacher.test.js.map +1 -1
  351. package/build/__tests__/implementation/FeatureFixture.test.js +54 -62
  352. package/build/__tests__/implementation/FeatureFixture.test.js.map +1 -1
  353. package/build/__tests__/implementation/FeatureInstaller.test.js +69 -77
  354. package/build/__tests__/implementation/FeatureInstaller.test.js.map +1 -1
  355. package/build/__tests__/implementation/FeaturesUtil.test.js +7 -9
  356. package/build/__tests__/implementation/FeaturesUtil.test.js.map +1 -1
  357. package/build/__tests__/implementation/FieldTemplateItemBuilder.test.js +6 -8
  358. package/build/__tests__/implementation/FieldTemplateItemBuilder.test.js.map +1 -1
  359. package/build/__tests__/implementation/GlobalEmitter.test.js +29 -33
  360. package/build/__tests__/implementation/GlobalEmitter.test.js.map +1 -1
  361. package/build/__tests__/implementation/Introspection.test.js.map +1 -1
  362. package/build/__tests__/implementation/JestJsonParser.test.js +9 -11
  363. package/build/__tests__/implementation/JestJsonParser.test.js.map +1 -1
  364. package/build/__tests__/implementation/LintService.test.js +32 -36
  365. package/build/__tests__/implementation/LintService.test.js.map +1 -1
  366. package/build/__tests__/implementation/ListenerStore.test.js.map +1 -1
  367. package/build/__tests__/implementation/OnboardingScriptLoader.test.js +72 -80
  368. package/build/__tests__/implementation/OnboardingScriptLoader.test.js.map +1 -1
  369. package/build/__tests__/implementation/OnboardingScriptPlayer.test.js +217 -243
  370. package/build/__tests__/implementation/OnboardingScriptPlayer.test.js.map +1 -1
  371. package/build/__tests__/implementation/OnboardingStore.test.js +19 -23
  372. package/build/__tests__/implementation/OnboardingStore.test.js.map +1 -1
  373. package/build/__tests__/implementation/OrganizationStore.test.js +114 -124
  374. package/build/__tests__/implementation/OrganizationStore.test.js.map +1 -1
  375. package/build/__tests__/implementation/ParentTestFinder.test.js +38 -44
  376. package/build/__tests__/implementation/ParentTestFinder.test.js.map +1 -1
  377. package/build/__tests__/implementation/PkgService.test.js +63 -75
  378. package/build/__tests__/implementation/PkgService.test.js.map +1 -1
  379. package/build/__tests__/implementation/SchemaStore.test.js +314 -346
  380. package/build/__tests__/implementation/SchemaStore.test.js.map +1 -1
  381. package/build/__tests__/implementation/SchemaTemplateItemBuilder.test.js +9 -11
  382. package/build/__tests__/implementation/SchemaTemplateItemBuilder.test.js.map +1 -1
  383. package/build/__tests__/implementation/SchemaValueTypeWriter.test.js +128 -142
  384. package/build/__tests__/implementation/SchemaValueTypeWriter.test.js.map +1 -1
  385. package/build/__tests__/implementation/ServiceFactory.test.js +8 -10
  386. package/build/__tests__/implementation/ServiceFactory.test.js.map +1 -1
  387. package/build/__tests__/implementation/SettingUpANodeModule.test.js +59 -65
  388. package/build/__tests__/implementation/SettingUpANodeModule.test.js.map +1 -1
  389. package/build/__tests__/implementation/SkillStore.test.js +153 -169
  390. package/build/__tests__/implementation/SkillStore.test.js.map +1 -1
  391. package/build/__tests__/implementation/StoreFeature.test.js +49 -53
  392. package/build/__tests__/implementation/StoreFeature.test.js.map +1 -1
  393. package/build/__tests__/implementation/TestReporter.test.js +31 -39
  394. package/build/__tests__/implementation/TestReporter.test.js.map +1 -1
  395. package/build/__tests__/implementation/TestRunner.test.js +215 -233
  396. package/build/__tests__/implementation/TestRunner.test.js.map +1 -1
  397. package/build/__tests__/implementation/ValueTypeMapping.test.js +24 -28
  398. package/build/__tests__/implementation/ValueTypeMapping.test.js.map +1 -1
  399. package/build/__tests__/implementation/Widgets.test.js +34 -42
  400. package/build/__tests__/implementation/Widgets.test.js.map +1 -1
  401. package/build/__tests__/support/EventFaker.js +12 -14
  402. package/build/__tests__/support/EventFaker.js.map +1 -1
  403. package/build/__tests__/support/onTestFileResult.js.map +1 -1
  404. package/build/__tests__/support/scripts/first.script.js +7 -9
  405. package/build/__tests__/support/scripts/first.script.js.map +1 -1
  406. package/build/__tests__/support/scripts/second.script.js.map +1 -1
  407. package/build/__tests__/support/scripts/third.test.script.js.map +1 -1
  408. package/build/addons/filePrompt.addon.js.map +1 -1
  409. package/build/boot.d.ts +2 -0
  410. package/build/boot.js +162 -0
  411. package/build/boot.js.map +1 -0
  412. package/build/{cli.d.ts → cli/Cli.d.ts} +9 -33
  413. package/build/cli/Cli.js +528 -0
  414. package/build/cli/Cli.js.map +1 -0
  415. package/build/components/AbstractComponent.js.map +1 -1
  416. package/build/components/FormComponent.js +156 -160
  417. package/build/components/FormComponent.js.map +1 -1
  418. package/build/components/QuizComponent.js +124 -128
  419. package/build/components/QuizComponent.js.map +1 -1
  420. package/build/constants.js.map +1 -1
  421. package/build/errors/SpruceError.js +1 -1
  422. package/build/errors/SpruceError.js.map +1 -1
  423. package/build/errors/actionCancelled.builder.js.map +1 -1
  424. package/build/errors/bootError.builder.js.map +1 -1
  425. package/build/errors/buildFailed.builder.js.map +1 -1
  426. package/build/errors/cacheNotEnabled.builder.js.map +1 -1
  427. package/build/errors/commandAborted.builder.js.map +1 -1
  428. package/build/errors/commandBlocked.builder.js.map +1 -1
  429. package/build/errors/commandNotImplemented.builder.js.map +1 -1
  430. package/build/errors/createAutoloaderFailed.builder.js.map +1 -1
  431. package/build/errors/dependencyExists.builder.js.map +1 -1
  432. package/build/errors/deployFailed.builder.js.map +1 -1
  433. package/build/errors/directoryEmpty.builder.js.map +1 -1
  434. package/build/errors/directoryNotSkill.builder.js.map +1 -1
  435. package/build/errors/dockerNotStarted.builder.js.map +1 -1
  436. package/build/errors/executingCommandFailed.builder.js.map +1 -1
  437. package/build/errors/failedToImport.builder.js.map +1 -1
  438. package/build/errors/featureNotInstalled.builder.js.map +1 -1
  439. package/build/errors/fileExists.builder.js.map +1 -1
  440. package/build/errors/generic.builder.js.map +1 -1
  441. package/build/errors/invalidCommand.builder.js.map +1 -1
  442. package/build/errors/invalidEventContract.builder.js.map +1 -1
  443. package/build/errors/invalidFeatureCode.builder.js.map +1 -1
  444. package/build/errors/invalidTestDirectory.builder.js.map +1 -1
  445. package/build/errors/lintFailed.builder.js.map +1 -1
  446. package/build/errors/mercuryResponseError.builder.js.map +1 -1
  447. package/build/errors/missingDependencies.builder.js.map +1 -1
  448. package/build/errors/noOrganizationsFound.builder.js.map +1 -1
  449. package/build/errors/noSkillsRegistered.builder.js.map +1 -1
  450. package/build/errors/notImplemented.builder.js.map +1 -1
  451. package/build/errors/notLoggedIn.builder.js.map +1 -1
  452. package/build/errors/schemaExists.builder.js.map +1 -1
  453. package/build/errors/schemaFailedToImport.builder.js.map +1 -1
  454. package/build/errors/schemaTemplateItemBuildingFailed.builder.js.map +1 -1
  455. package/build/errors/skillNotFound.builder.js.map +1 -1
  456. package/build/errors/skillNotRegistered.builder.js.map +1 -1
  457. package/build/errors/skillViewExists.builder.js.map +1 -1
  458. package/build/errors/storeExists.builder.js.map +1 -1
  459. package/build/errors/testFailed.builder.js.map +1 -1
  460. package/build/errors/themeExists.builder.js.map +1 -1
  461. package/build/errors/transportAlreadyExists.builder.js.map +1 -1
  462. package/build/errors/vscodeNotInstalled.builder.js.map +1 -1
  463. package/build/features/AbstractAction.js +65 -71
  464. package/build/features/AbstractAction.js.map +1 -1
  465. package/build/features/AbstractFeature.js +54 -62
  466. package/build/features/AbstractFeature.js.map +1 -1
  467. package/build/features/ActionExecuter.js +206 -210
  468. package/build/features/ActionExecuter.js.map +1 -1
  469. package/build/features/ActionFactory.js.map +1 -1
  470. package/build/features/ActionQuestionAsker.js +304 -320
  471. package/build/features/ActionQuestionAsker.js.map +1 -1
  472. package/build/features/FeatureCommandAttacher.js +45 -49
  473. package/build/features/FeatureCommandAttacher.js.map +1 -1
  474. package/build/features/FeatureInstaller.js +353 -375
  475. package/build/features/FeatureInstaller.js.map +1 -1
  476. package/build/features/FeatureInstallerFactory.js.map +1 -1
  477. package/build/features/OverrideActionDecorator.js +13 -15
  478. package/build/features/OverrideActionDecorator.js.map +1 -1
  479. package/build/features/cache/CacheFeature.js +6 -8
  480. package/build/features/cache/CacheFeature.js.map +1 -1
  481. package/build/features/cache/actions/DisableAction.js +42 -44
  482. package/build/features/cache/actions/DisableAction.js.map +1 -1
  483. package/build/features/cache/actions/EnableAction.js +37 -39
  484. package/build/features/cache/actions/EnableAction.js.map +1 -1
  485. package/build/features/cache/constants.js.map +1 -1
  486. package/build/features/conversation/ConversationFeature.js +40 -46
  487. package/build/features/conversation/ConversationFeature.js.map +1 -1
  488. package/build/features/conversation/actions/CreateAction.js +16 -18
  489. package/build/features/conversation/actions/CreateAction.js.map +1 -1
  490. package/build/features/conversation/actions/TestAction.js +96 -102
  491. package/build/features/conversation/actions/TestAction.js.map +1 -1
  492. package/build/features/conversation/stores/ConversationStore.js +19 -21
  493. package/build/features/conversation/stores/ConversationStore.js.map +1 -1
  494. package/build/features/conversation/writers/ConversationWriter.js +22 -24
  495. package/build/features/conversation/writers/ConversationWriter.js.map +1 -1
  496. package/build/features/dependencies/DependencyFeature.js +6 -8
  497. package/build/features/dependencies/DependencyFeature.js.map +1 -1
  498. package/build/features/dependencies/actions/AddAction.js +64 -66
  499. package/build/features/dependencies/actions/AddAction.js.map +1 -1
  500. package/build/features/dependencies/actions/ManageAction.js +63 -65
  501. package/build/features/dependencies/actions/ManageAction.js.map +1 -1
  502. package/build/features/deploy/DeployFeature.js +12 -14
  503. package/build/features/deploy/DeployFeature.js.map +1 -1
  504. package/build/features/deploy/actions/HerokuAction.js +389 -409
  505. package/build/features/deploy/actions/HerokuAction.js.map +1 -1
  506. package/build/features/deploy/writers/DeployWriter.js.map +1 -1
  507. package/build/features/error/ErrorFeature.js +84 -92
  508. package/build/features/error/ErrorFeature.js.map +1 -1
  509. package/build/features/error/ParentTestFinder.js +22 -24
  510. package/build/features/error/ParentTestFinder.js.map +1 -1
  511. package/build/features/error/actions/CreateAction.js +24 -26
  512. package/build/features/error/actions/CreateAction.js.map +1 -1
  513. package/build/features/error/actions/SyncAction.js +85 -91
  514. package/build/features/error/actions/SyncAction.js.map +1 -1
  515. package/build/features/error/writers/ErrorWriter.js +130 -140
  516. package/build/features/error/writers/ErrorWriter.js.map +1 -1
  517. package/build/features/event/EventFeature.js +153 -167
  518. package/build/features/event/EventFeature.js.map +1 -1
  519. package/build/features/event/actions/CreateAction.js +59 -61
  520. package/build/features/event/actions/CreateAction.js.map +1 -1
  521. package/build/features/event/actions/ListenAction.js +205 -219
  522. package/build/features/event/actions/ListenAction.js.map +1 -1
  523. package/build/features/event/actions/SetRemoteAction.js +11 -13
  524. package/build/features/event/actions/SetRemoteAction.js.map +1 -1
  525. package/build/features/event/actions/SyncAction.js +25 -27
  526. package/build/features/event/actions/SyncAction.js.map +1 -1
  527. package/build/features/event/actions/SyncListenersAction.js +23 -25
  528. package/build/features/event/actions/SyncListenersAction.js.map +1 -1
  529. package/build/features/event/builders/EventContractBuilder.js +136 -144
  530. package/build/features/event/builders/EventContractBuilder.js.map +1 -1
  531. package/build/features/event/builders/ListenerTemplateItemBuilder.js +1 -1
  532. package/build/features/event/builders/ListenerTemplateItemBuilder.js.map +1 -1
  533. package/build/features/event/services/EventSettingsService.js.map +1 -1
  534. package/build/features/event/services/RemoteService.js.map +1 -1
  535. package/build/features/event/stores/EventStore.js +246 -258
  536. package/build/features/event/stores/EventStore.js.map +1 -1
  537. package/build/features/event/stores/ListenerStore.js +26 -28
  538. package/build/features/event/stores/ListenerStore.js.map +1 -1
  539. package/build/features/event/writers/EventWriter.js +171 -183
  540. package/build/features/event/writers/EventWriter.js.map +1 -1
  541. package/build/features/eventContract/EventContractFeature.js +6 -8
  542. package/build/features/eventContract/EventContractFeature.js.map +1 -1
  543. package/build/features/eventContract/actions/PullAction.js +58 -62
  544. package/build/features/eventContract/actions/PullAction.js.map +1 -1
  545. package/build/features/feature.utilities.js.map +1 -1
  546. package/build/features/log/LogFeature.js.map +1 -1
  547. package/build/features/log/actions/CreateTransportAction.js +16 -18
  548. package/build/features/log/actions/CreateTransportAction.js.map +1 -1
  549. package/build/features/log/writers/LogWriter.js +23 -25
  550. package/build/features/log/writers/LogWriter.js.map +1 -1
  551. package/build/features/node/NodeFeature.js +110 -122
  552. package/build/features/node/NodeFeature.js.map +1 -1
  553. package/build/features/node/actions/CreateAction.js +9 -11
  554. package/build/features/node/actions/CreateAction.js.map +1 -1
  555. package/build/features/node/actions/UpdateDependenciesAction.js +140 -113
  556. package/build/features/node/actions/UpdateDependenciesAction.js.map +1 -1
  557. package/build/features/node/actions/UpgradeAction.js +70 -76
  558. package/build/features/node/actions/UpgradeAction.js.map +1 -1
  559. package/build/features/node/writers/NodeWriter.js +29 -31
  560. package/build/features/node/writers/NodeWriter.js.map +1 -1
  561. package/build/features/onboard/OnboardFeature.js +77 -87
  562. package/build/features/onboard/OnboardFeature.js.map +1 -1
  563. package/build/features/onboard/ScriptLoader.js +31 -33
  564. package/build/features/onboard/ScriptLoader.js.map +1 -1
  565. package/build/features/onboard/ScriptPlayer.js +80 -86
  566. package/build/features/onboard/ScriptPlayer.js.map +1 -1
  567. package/build/features/onboard/actions/OnboardAction.js +36 -38
  568. package/build/features/onboard/actions/OnboardAction.js.map +1 -1
  569. package/build/features/onboard/scripts/onboarding.first.script.js +68 -80
  570. package/build/features/onboard/scripts/onboarding.first.script.js.map +1 -1
  571. package/build/features/onboard/scripts/onboarding.immersive.script.js +24 -28
  572. package/build/features/onboard/scripts/onboarding.immersive.script.js.map +1 -1
  573. package/build/features/onboard/scripts/onboarding.returning.script.js +42 -44
  574. package/build/features/onboard/scripts/onboarding.returning.script.js.map +1 -1
  575. package/build/features/onboard/scripts/onboarding.short.script.js +38 -48
  576. package/build/features/onboard/scripts/onboarding.short.script.js.map +1 -1
  577. package/build/features/onboard/scripts/todo/todo.create.skill.script.js +9 -11
  578. package/build/features/onboard/scripts/todo/todo.create.skill.script.js.map +1 -1
  579. package/build/features/onboard/scripts/todo/todo.test.script.js +7 -9
  580. package/build/features/onboard/scripts/todo/todo.test.script.js.map +1 -1
  581. package/build/features/onboard/scripts/wrongCommand.script.js +40 -42
  582. package/build/features/onboard/scripts/wrongCommand.script.js.map +1 -1
  583. package/build/features/onboard/stores/OnboardingStore.js.map +1 -1
  584. package/build/features/organization/OrganizationFeature.js.map +1 -1
  585. package/build/features/organization/actions/CreateAction.js +18 -20
  586. package/build/features/organization/actions/CreateAction.js.map +1 -1
  587. package/build/features/organization/actions/InstallAction.js +81 -83
  588. package/build/features/organization/actions/InstallAction.js.map +1 -1
  589. package/build/features/organization/stores/OrganizationStore.js +101 -111
  590. package/build/features/organization/stores/OrganizationStore.js.map +1 -1
  591. package/build/features/permission/PermissionFeature.js +73 -79
  592. package/build/features/permission/PermissionFeature.js.map +1 -1
  593. package/build/features/permission/actions/CreateAction.js +23 -25
  594. package/build/features/permission/actions/CreateAction.js.map +1 -1
  595. package/build/features/permission/actions/SyncAction.js +50 -54
  596. package/build/features/permission/actions/SyncAction.js.map +1 -1
  597. package/build/features/permission/stores/PermissionStore.js +100 -104
  598. package/build/features/permission/stores/PermissionStore.js.map +1 -1
  599. package/build/features/permission/writers/PermissionWriter.js +57 -63
  600. package/build/features/permission/writers/PermissionWriter.js.map +1 -1
  601. package/build/features/person/PersonFeature.js.map +1 -1
  602. package/build/features/person/actions/LoginAction.js +69 -71
  603. package/build/features/person/actions/LoginAction.js.map +1 -1
  604. package/build/features/person/actions/LogoutAction.js +21 -23
  605. package/build/features/person/actions/LogoutAction.js.map +1 -1
  606. package/build/features/person/actions/WhoamiAction.js +24 -26
  607. package/build/features/person/actions/WhoamiAction.js.map +1 -1
  608. package/build/features/polish/PolishFeature.js.map +1 -1
  609. package/build/features/polish/actions/SetupAction.js +23 -25
  610. package/build/features/polish/actions/SetupAction.js.map +1 -1
  611. package/build/features/polish/writers/PolishWriter.js +16 -18
  612. package/build/features/polish/writers/PolishWriter.js.map +1 -1
  613. package/build/features/sandbox/SandboxFeature.js +20 -22
  614. package/build/features/sandbox/SandboxFeature.js.map +1 -1
  615. package/build/features/sandbox/actions/SetupAction.js +42 -44
  616. package/build/features/sandbox/actions/SetupAction.js.map +1 -1
  617. package/build/features/sandbox/writers/SandboxWriter.js +9 -11
  618. package/build/features/sandbox/writers/SandboxWriter.js.map +1 -1
  619. package/build/features/schema/SchemaFeature.js +82 -90
  620. package/build/features/schema/SchemaFeature.js.map +1 -1
  621. package/build/features/schema/ValueTypeBuilder.js +26 -28
  622. package/build/features/schema/ValueTypeBuilder.js.map +1 -1
  623. package/build/features/schema/actions/CreateAction.js +48 -50
  624. package/build/features/schema/actions/CreateAction.js.map +1 -1
  625. package/build/features/schema/actions/SyncAction.js +260 -270
  626. package/build/features/schema/actions/SyncAction.js.map +1 -1
  627. package/build/features/schema/actions/SyncFieldsAction.js +42 -44
  628. package/build/features/schema/actions/SyncFieldsAction.js.map +1 -1
  629. package/build/features/schema/services/SchemaService.js +24 -26
  630. package/build/features/schema/services/SchemaService.js.map +1 -1
  631. package/build/features/schema/stores/SchemaStore.js +205 -219
  632. package/build/features/schema/stores/SchemaStore.js.map +1 -1
  633. package/build/features/schema/utilities/schema.utility.js.map +1 -1
  634. package/build/features/schema/utilities/schemaDisk.utility.js +15 -17
  635. package/build/features/schema/utilities/schemaDisk.utility.js.map +1 -1
  636. package/build/features/schema/utilities/schemaGenerator.utility.js +40 -42
  637. package/build/features/schema/utilities/schemaGenerator.utility.js.map +1 -1
  638. package/build/features/schema/writers/SchemaWriter.js +173 -185
  639. package/build/features/schema/writers/SchemaWriter.js.map +1 -1
  640. package/build/features/skill/SkillFeature.js +99 -112
  641. package/build/features/skill/SkillFeature.js.map +1 -1
  642. package/build/features/skill/actions/BootAction.js +92 -96
  643. package/build/features/skill/actions/BootAction.js.map +1 -1
  644. package/build/features/skill/actions/CreateAction.js +9 -11
  645. package/build/features/skill/actions/CreateAction.js.map +1 -1
  646. package/build/features/skill/actions/DashboardAction.js +8 -10
  647. package/build/features/skill/actions/DashboardAction.js.map +1 -1
  648. package/build/features/skill/actions/LoginAction.js +122 -124
  649. package/build/features/skill/actions/LoginAction.js.map +1 -1
  650. package/build/features/skill/actions/RebuildAction.js +33 -35
  651. package/build/features/skill/actions/RebuildAction.js.map +1 -1
  652. package/build/features/skill/actions/RegisterAction.js +38 -40
  653. package/build/features/skill/actions/RegisterAction.js.map +1 -1
  654. package/build/features/skill/stores/SkillStore.d.ts +2 -2
  655. package/build/features/skill/stores/SkillStore.js +198 -216
  656. package/build/features/skill/stores/SkillStore.js.map +1 -1
  657. package/build/features/skill/updaters/Updater.js +38 -40
  658. package/build/features/skill/updaters/Updater.js.map +1 -1
  659. package/build/features/skill/writers/SkillWriter.js +15 -17
  660. package/build/features/skill/writers/SkillWriter.js.map +1 -1
  661. package/build/features/store/StoreFeature.js +50 -56
  662. package/build/features/store/StoreFeature.js.map +1 -1
  663. package/build/features/store/actions/CreateAction.js +29 -31
  664. package/build/features/store/actions/CreateAction.js.map +1 -1
  665. package/build/features/store/actions/SyncAction.js +35 -37
  666. package/build/features/store/actions/SyncAction.js.map +1 -1
  667. package/build/features/store/stores/StoreStore.js +39 -41
  668. package/build/features/store/stores/StoreStore.js.map +1 -1
  669. package/build/features/store/templateItemBuilders/StoreTemplateItemBuilder.js +1 -1
  670. package/build/features/store/templateItemBuilders/StoreTemplateItemBuilder.js.map +1 -1
  671. package/build/features/store/writers/StoreWriter.js +65 -73
  672. package/build/features/store/writers/StoreWriter.js.map +1 -1
  673. package/build/features/test/TestFeature.js +98 -102
  674. package/build/features/test/TestFeature.js.map +1 -1
  675. package/build/features/test/TestLogItemGenerator.js.map +1 -1
  676. package/build/features/test/TestReporter.d.ts +19 -19
  677. package/build/features/test/TestReporter.js +74 -82
  678. package/build/features/test/TestReporter.js.map +1 -1
  679. package/build/features/test/TestRunner.js +82 -88
  680. package/build/features/test/TestRunner.js.map +1 -1
  681. package/build/features/test/actions/CreateAction.js +145 -153
  682. package/build/features/test/actions/CreateAction.js.map +1 -1
  683. package/build/features/test/actions/SetupAction.js +37 -39
  684. package/build/features/test/actions/SetupAction.js.map +1 -1
  685. package/build/features/test/actions/TestAction.js +203 -213
  686. package/build/features/test/actions/TestAction.js.map +1 -1
  687. package/build/features/test/test.types.d.ts +1 -1
  688. package/build/features/test/test.types.js.map +1 -1
  689. package/build/features/test/writers/TestWriter.js +17 -19
  690. package/build/features/test/writers/TestWriter.js.map +1 -1
  691. package/build/features/universalDevDependencies.js.map +1 -1
  692. package/build/features/universalFileDescriptions.js.map +1 -1
  693. package/build/features/universalScripts.js.map +1 -1
  694. package/build/features/validateAndNormalize.utility.js.map +1 -1
  695. package/build/features/view/ViewFeature.js +52 -58
  696. package/build/features/view/ViewFeature.js.map +1 -1
  697. package/build/features/view/actions/CreateAction.js +64 -66
  698. package/build/features/view/actions/CreateAction.js.map +1 -1
  699. package/build/features/view/actions/CreateThemeAction.js +35 -37
  700. package/build/features/view/actions/CreateThemeAction.js.map +1 -1
  701. package/build/features/view/actions/SyncAction.js +61 -63
  702. package/build/features/view/actions/SyncAction.js.map +1 -1
  703. package/build/features/view/actions/WatchAction.d.ts +1 -0
  704. package/build/features/view/actions/WatchAction.js +26 -27
  705. package/build/features/view/actions/WatchAction.js.map +1 -1
  706. package/build/features/view/stores/ViewStore.js +35 -37
  707. package/build/features/view/stores/ViewStore.js.map +1 -1
  708. package/build/features/view/writers/ViewWriter.js +47 -51
  709. package/build/features/view/writers/ViewWriter.js.map +1 -1
  710. package/build/features/vscode/VsCodeFeature.js +18 -20
  711. package/build/features/vscode/VsCodeFeature.js.map +1 -1
  712. package/build/features/vscode/actions/SetupAction.js +173 -183
  713. package/build/features/vscode/actions/SetupAction.js.map +1 -1
  714. package/build/features/vscode/services/VsCodeService.js +63 -69
  715. package/build/features/vscode/services/VsCodeService.js.map +1 -1
  716. package/build/features/vscode/writers/VsCodeWriter.js +12 -14
  717. package/build/features/vscode/writers/VsCodeWriter.js.map +1 -1
  718. package/build/features/watch/WatchFeature.js +77 -88
  719. package/build/features/watch/WatchFeature.js.map +1 -1
  720. package/build/index.js +2 -2
  721. package/build/index.js.map +1 -1
  722. package/build/interfaces/SpyInterface.d.ts +1 -0
  723. package/build/interfaces/SpyInterface.js +139 -148
  724. package/build/interfaces/SpyInterface.js.map +1 -1
  725. package/build/interfaces/TerminalInterface.d.ts +1 -0
  726. package/build/interfaces/TerminalInterface.js +196 -207
  727. package/build/interfaces/TerminalInterface.js.map +1 -1
  728. package/build/schemas/v2020_07_22/actionResponse.builder.js.map +1 -1
  729. package/build/schemas/v2020_07_22/bootSkillOptions.builder.js.map +1 -1
  730. package/build/schemas/v2020_07_22/createConversationTopicOptions.builder.js.map +1 -1
  731. package/build/schemas/v2020_07_22/createErrorOptions.builder.js.map +1 -1
  732. package/build/schemas/v2020_07_22/createOrganizationOptions.builder.js.map +1 -1
  733. package/build/schemas/v2020_07_22/createSchemaOptions.builder.js.map +1 -1
  734. package/build/schemas/v2020_07_22/createTestOptions.builder.js.map +1 -1
  735. package/build/schemas/v2020_07_22/generatedFile.builder.js.map +1 -1
  736. package/build/schemas/v2020_07_22/installSkillAtOrganizationOptions.builder.js.map +1 -1
  737. package/build/schemas/v2020_07_22/listenEventOptions.builder.js.map +1 -1
  738. package/build/schemas/v2020_07_22/namedTemplateItem.builder.js.map +1 -1
  739. package/build/schemas/v2020_07_22/nodeFeatureOptions.builder.js.map +1 -1
  740. package/build/schemas/v2020_07_22/onboardOptions.builder.js.map +1 -1
  741. package/build/schemas/v2020_07_22/onboarding.builder.js.map +1 -1
  742. package/build/schemas/v2020_07_22/personWithToken.builder.js.map +1 -1
  743. package/build/schemas/v2020_07_22/registerDashboardWidgetsEmitPayloadSchema.builder.js.map +1 -1
  744. package/build/schemas/v2020_07_22/setupTestsOptions.builder.js.map +1 -1
  745. package/build/schemas/v2020_07_22/setupVscodeOptions.builder.js.map +1 -1
  746. package/build/schemas/v2020_07_22/skillFeature.builder.js.map +1 -1
  747. package/build/schemas/v2020_07_22/syncErrorOptions.builder.js.map +1 -1
  748. package/build/schemas/v2020_07_22/syncEventOptions.builder.js.map +1 -1
  749. package/build/schemas/v2020_07_22/syncSchemaFieldsOptions.builder.js.map +1 -1
  750. package/build/schemas/v2020_07_22/syncSchemasOptions.builder.js.map +1 -1
  751. package/build/schemas/v2020_07_22/testOptions.builder.js.map +1 -1
  752. package/build/schemas/v2020_07_22/upgradeSkillOptions.builder.js.map +1 -1
  753. package/build/schemas/v2020_07_22/watcherDidDetectChangesEmitPayload.builder.js.map +1 -1
  754. package/build/services/BuildService.js +16 -18
  755. package/build/services/BuildService.js.map +1 -1
  756. package/build/services/CommandService.js +107 -109
  757. package/build/services/CommandService.js.map +1 -1
  758. package/build/services/DependencyService.js.map +1 -1
  759. package/build/services/GameService.js +49 -51
  760. package/build/services/GameService.js.map +1 -1
  761. package/build/services/ImportService.js +186 -194
  762. package/build/services/ImportService.js.map +1 -1
  763. package/build/services/LintService.js +81 -83
  764. package/build/services/LintService.js.map +1 -1
  765. package/build/services/PkgService.js +85 -89
  766. package/build/services/PkgService.js.map +1 -1
  767. package/build/services/ServiceFactory.js.map +1 -1
  768. package/build/services/TypeCheckerService.js +7 -9
  769. package/build/services/TypeCheckerService.js.map +1 -1
  770. package/build/stores/AbstractLocalStore.js.map +1 -1
  771. package/build/stores/AbstractStore.js +6 -8
  772. package/build/stores/AbstractStore.js.map +1 -1
  773. package/build/stores/StoreFactory.js.map +1 -1
  774. package/build/templateItemBuilders/EventTemplateItemBuilder.js +1 -1
  775. package/build/templateItemBuilders/EventTemplateItemBuilder.js.map +1 -1
  776. package/build/templateItemBuilders/FieldTemplateItemBuilder.js +1 -1
  777. package/build/templateItemBuilders/FieldTemplateItemBuilder.js.map +1 -1
  778. package/build/templateItemBuilders/SchemaTemplateItemBuilder.js +1 -1
  779. package/build/templateItemBuilders/SchemaTemplateItemBuilder.js.map +1 -1
  780. package/build/tests/AbstractCliTest.d.ts +2 -3
  781. package/build/tests/AbstractCliTest.js +236 -266
  782. package/build/tests/AbstractCliTest.js.map +1 -1
  783. package/build/tests/AbstractErrorTest.d.ts +1 -1
  784. package/build/tests/AbstractErrorTest.js +19 -21
  785. package/build/tests/AbstractErrorTest.js.map +1 -1
  786. package/build/tests/AbstractEventTest.d.ts +3 -3
  787. package/build/tests/AbstractEventTest.js +89 -97
  788. package/build/tests/AbstractEventTest.js.map +1 -1
  789. package/build/tests/AbstractSchemaTest.d.ts +3 -3
  790. package/build/tests/AbstractSchemaTest.js +92 -98
  791. package/build/tests/AbstractSchemaTest.js.map +1 -1
  792. package/build/tests/AbstractSkillTest.d.ts +1 -1
  793. package/build/tests/AbstractSkillTest.js +40 -46
  794. package/build/tests/AbstractSkillTest.js.map +1 -1
  795. package/build/tests/AbstractTestTest.d.ts +1 -1
  796. package/build/tests/AbstractTestTest.js +14 -16
  797. package/build/tests/AbstractTestTest.js.map +1 -1
  798. package/build/tests/CommandFaker.js.map +1 -1
  799. package/build/tests/JestJsonParser.js +5 -2
  800. package/build/tests/JestJsonParser.js.map +1 -1
  801. package/build/tests/MockProgramFactory.js +11 -15
  802. package/build/tests/MockProgramFactory.js.map +1 -1
  803. package/build/tests/buildTestCache.js +223 -243
  804. package/build/tests/buildTestCache.js.map +1 -1
  805. package/build/tests/cleanTestCache.js.map +1 -1
  806. package/build/tests/cleanTestData.js +70 -72
  807. package/build/tests/cleanTestData.js.map +1 -1
  808. package/build/tests/constants.js.map +1 -1
  809. package/build/tests/fixtures/FeatureFixture.d.ts +15 -16
  810. package/build/tests/fixtures/FeatureFixture.js +142 -154
  811. package/build/tests/fixtures/FeatureFixture.js.map +1 -1
  812. package/build/tests/fixtures/MercuryFixture.js +9 -11
  813. package/build/tests/fixtures/MercuryFixture.js.map +1 -1
  814. package/build/tests/fixtures/OrganizationFixture.js +62 -68
  815. package/build/tests/fixtures/OrganizationFixture.js.map +1 -1
  816. package/build/tests/fixtures/PersonFixture.js +69 -73
  817. package/build/tests/fixtures/PersonFixture.js.map +1 -1
  818. package/build/tests/fixtures/SkillFixture.js +123 -137
  819. package/build/tests/fixtures/SkillFixture.js.map +1 -1
  820. package/build/tests/fixtures/ViewFixture.js +13 -15
  821. package/build/tests/fixtures/ViewFixture.js.map +1 -1
  822. package/build/tests/utilities/test.utility.js.map +1 -1
  823. package/build/tests/utilities/uiAssert.utility.js +31 -35
  824. package/build/tests/utilities/uiAssert.utility.js.map +1 -1
  825. package/build/types/cli.types.d.ts +26 -0
  826. package/build/types/cli.types.js.map +1 -1
  827. package/build/types/graphicsInterface.types.js.map +1 -1
  828. package/build/updaters/ScriptUpdater.js +78 -80
  829. package/build/updaters/ScriptUpdater.js.map +1 -1
  830. package/build/utilities/action.utility.js.map +1 -1
  831. package/build/utilities/apiClient.utility.js.map +1 -1
  832. package/build/utilities/argParser.utility.js +1 -1
  833. package/build/utilities/argParser.utility.js.map +1 -1
  834. package/build/utilities/commander.utility.js.map +1 -1
  835. package/build/utilities/duration.utility.js.map +1 -1
  836. package/build/utilities/eventContractCleaner.utility.js +1 -1
  837. package/build/utilities/eventContractCleaner.utility.js.map +1 -1
  838. package/build/utilities/form.utility.js.map +1 -1
  839. package/build/utilities/introspection.utility.js +3 -3
  840. package/build/utilities/introspection.utility.js.map +1 -1
  841. package/build/utilities/isCi.js.map +1 -1
  842. package/build/utilities/tsConfig.utility.js.map +1 -1
  843. package/build/utilities/ui.utility.js.map +1 -1
  844. package/build/widgets/Theme.js.map +1 -1
  845. package/build/widgets/WidgetFactory.js.map +1 -1
  846. package/build/widgets/keySelectChoices.js.map +1 -1
  847. package/build/widgets/terminalKit/TKButtonWidget.js.map +1 -1
  848. package/build/widgets/terminalKit/TkBaseWidget.js +8 -10
  849. package/build/widgets/terminalKit/TkBaseWidget.js.map +1 -1
  850. package/build/widgets/terminalKit/TkInputWidget.js +16 -20
  851. package/build/widgets/terminalKit/TkInputWidget.js.map +1 -1
  852. package/build/widgets/terminalKit/TkLayoutCellWidget.js.map +1 -1
  853. package/build/widgets/terminalKit/TkLayoutWidget.js +6 -8
  854. package/build/widgets/terminalKit/TkLayoutWidget.js.map +1 -1
  855. package/build/widgets/terminalKit/TkMenuBarWidget.js +1 -1
  856. package/build/widgets/terminalKit/TkMenuBarWidget.js.map +1 -1
  857. package/build/widgets/terminalKit/TkPopupWidget.js.map +1 -1
  858. package/build/widgets/terminalKit/TkProgressBarWidget.js.map +1 -1
  859. package/build/widgets/terminalKit/TkTextWidget.js +13 -15
  860. package/build/widgets/terminalKit/TkTextWidget.js.map +1 -1
  861. package/build/widgets/terminalKit/TkWindowWidget.js +39 -45
  862. package/build/widgets/terminalKit/TkWindowWidget.js.map +1 -1
  863. package/build/widgets/terminalKit/termKit.utility.js +1 -1
  864. package/build/widgets/terminalKit/termKit.utility.js.map +1 -1
  865. package/build/widgets/types/button.types.js.map +1 -1
  866. package/build/widgets/types/factory.types.js.map +1 -1
  867. package/build/widgets/types/input.types.js.map +1 -1
  868. package/build/widgets/types/menuBar.types.js.map +1 -1
  869. package/build/widgets/types/popup.types.js.map +1 -1
  870. package/build/widgets/types/text.types.js.map +1 -1
  871. package/build/widgets/types/window.types.js.map +1 -1
  872. package/build/widgets/widget.utilities.js.map +1 -1
  873. package/build/writers/AbstractWriter.js +160 -166
  874. package/build/writers/AbstractWriter.js.map +1 -1
  875. package/build/writers/WriterFactory.js.map +1 -1
  876. package/junit.xml +7 -0
  877. package/node_modules/@typescript-eslint/parser/package.json +5 -5
  878. package/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js +1 -1
  879. package/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js.map +1 -1
  880. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js +1 -1
  881. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js.map +1 -1
  882. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts.map +1 -1
  883. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js +1 -3
  884. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js.map +1 -1
  885. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js +2 -2
  886. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js.map +1 -1
  887. package/node_modules/@typescript-eslint/scope-manager/package.json +5 -5
  888. package/node_modules/@typescript-eslint/types/_ts3.4/dist/generated/ast-spec.d.ts +62 -7
  889. package/node_modules/@typescript-eslint/types/_ts3.4/dist/parser-options.d.ts +6 -2
  890. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +62 -7
  891. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map +1 -1
  892. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js.map +1 -1
  893. package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts +6 -2
  894. package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts.map +1 -1
  895. package/node_modules/@typescript-eslint/types/package.json +4 -4
  896. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/clear-caches.d.ts +10 -0
  897. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/describeFilePath.d.ts +2 -0
  898. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/shared.d.ts +7 -1
  899. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/index.d.ts +2 -2
  900. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/ExpiringCache.d.ts +17 -0
  901. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/createParseSettings.d.ts +1 -0
  902. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/getProjectConfigFiles.d.ts +12 -0
  903. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/index.d.ts +6 -1
  904. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/resolveProjectList.d.ts +19 -0
  905. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser-options.d.ts +22 -3
  906. package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts +10 -0
  907. package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts.map +1 -0
  908. package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js +24 -0
  909. package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js.map +1 -0
  910. package/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js +1 -1
  911. package/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js.map +1 -1
  912. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts.map +1 -1
  913. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js +38 -12
  914. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map +1 -1
  915. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts.map +1 -1
  916. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js +5 -10
  917. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js.map +1 -1
  918. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts +2 -0
  919. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts.map +1 -0
  920. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js +32 -0
  921. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js.map +1 -0
  922. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.d.ts.map +1 -1
  923. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js +2 -15
  924. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js.map +1 -1
  925. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts +7 -1
  926. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts.map +1 -1
  927. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js +15 -1
  928. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js.map +1 -1
  929. package/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js +1 -1
  930. package/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js.map +1 -1
  931. package/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts +2 -2
  932. package/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts.map +1 -1
  933. package/node_modules/@typescript-eslint/typescript-estree/dist/index.js +2 -4
  934. package/node_modules/@typescript-eslint/typescript-estree/dist/index.js.map +1 -1
  935. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts +17 -0
  936. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts.map +1 -0
  937. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js +62 -0
  938. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js.map +1 -0
  939. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts +1 -0
  940. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts.map +1 -1
  941. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js +22 -48
  942. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js.map +1 -1
  943. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts +12 -0
  944. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts.map +1 -0
  945. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js +70 -0
  946. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js.map +1 -0
  947. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts +6 -1
  948. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts.map +1 -1
  949. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts +19 -0
  950. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts.map +1 -0
  951. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js +103 -0
  952. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js.map +1 -0
  953. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js +1 -1
  954. package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts +22 -3
  955. package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts.map +1 -1
  956. package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js +1 -1
  957. package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js.map +1 -1
  958. package/node_modules/@typescript-eslint/typescript-estree/package.json +4 -5
  959. package/node_modules/@typescript-eslint/visitor-keys/package.json +3 -3
  960. package/package.json +592 -597
  961. package/src/.DS_Store +0 -0
  962. package/src/__tests__/behavioral/BootingTheCli.test.ts +32 -2
  963. package/src/__tests__/behavioral/CreatingAConversationTopic.test.ts +1 -1
  964. package/src/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.ts +1 -1
  965. package/src/__tests__/behavioral/events/CreatingAnEvent.test.ts +1 -2
  966. package/src/__tests__/behavioral/permissions/SyncingPermissions.test.ts +11 -0
  967. package/src/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.ts +1 -1
  968. package/src/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.ts +1 -1
  969. package/src/__tests__/behavioral/upgrading/UpgradingASkill.test.ts +1 -2
  970. package/src/__tests__/implementation/TestRunner.test.ts +1 -1
  971. package/src/boot.ts +92 -0
  972. package/src/{cli.ts → cli/Cli.ts} +48 -150
  973. package/src/features/AbstractFeature.ts +1 -1
  974. package/src/features/FeatureInstaller.ts +3 -3
  975. package/src/features/error/ParentTestFinder.ts +1 -1
  976. package/src/features/event/builders/EventContractBuilder.ts +1 -1
  977. package/src/features/event/stores/EventStore.ts +4 -2
  978. package/src/features/event/stores/ListenerStore.ts +1 -1
  979. package/src/features/onboard/ScriptLoader.ts +1 -1
  980. package/src/features/permission/PermissionFeature.ts +3 -1
  981. package/src/features/permission/stores/PermissionStore.ts +1 -1
  982. package/src/features/schema/stores/SchemaStore.ts +1 -1
  983. package/src/features/schema/utilities/schemaGenerator.utility.ts +1 -1
  984. package/src/features/skill/SkillFeature.ts +1 -1
  985. package/src/features/store/stores/StoreStore.ts +1 -1
  986. package/src/features/test/TestReporter.ts +25 -25
  987. package/src/features/test/test.types.ts +8 -1
  988. package/src/features/view/actions/SyncAction.ts +1 -1
  989. package/src/features/view/actions/WatchAction.ts +8 -3
  990. package/src/index.ts +1 -1
  991. package/src/interfaces/SpyInterface.ts +2 -0
  992. package/src/interfaces/TerminalInterface.ts +5 -1
  993. package/src/tests/AbstractCliTest.ts +2 -3
  994. package/src/tests/AbstractSchemaTest.ts +1 -1
  995. package/src/tests/AbstractSkillTest.ts +1 -1
  996. package/src/tests/JestJsonParser.ts +4 -1
  997. package/src/tests/fixtures/FeatureFixture.ts +24 -20
  998. package/src/tests/fixtures/MercuryFixture.ts +1 -1
  999. package/src/types/cli.types.ts +30 -0
  1000. package/yarn-error.log +12174 -0
  1001. package/LICENSE +0 -21
  1002. package/build/__tests__/behavioral/events/EverythingInstalledInstaller.d.ts +0 -17
  1003. package/build/__tests__/behavioral/events/EverythingInstalledInstaller.js +0 -137
  1004. package/build/__tests__/behavioral/events/EverythingInstalledInstaller.js.map +0 -1
  1005. package/build/cli.js +0 -690
  1006. package/build/cli.js.map +0 -1
  1007. package/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/gitignore.js +0 -120
  1008. package/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/index.d.ts +0 -186
  1009. package/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/index.js +0 -181
  1010. package/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/license +0 -9
  1011. package/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/package.json +0 -82
  1012. package/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/readme.md +0 -170
  1013. package/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/stream-utils.js +0 -46
  1014. package/src/__tests__/behavioral/events/EverythingInstalledInstaller.ts +0 -46
@@ -1 +1 @@
1
- {"version":3,"file":"TestReporter.js","names":["TestReporter","options","totalTestFiles","customErrors","cwd","filterPattern","handleRestart","handleStartStop","handleQuit","handleRerunTestFile","handleOpenTestFile","handleFilterChange","handleFilterPatternChange","status","handleToggleDebug","handletoggleStandardWatch","isDebugging","watchMode","handleToggleSmartWatch","errorLogItemGenerator","TestLogItemGenerator","widgetFactory","WidgetFactory","pattern","filterInput","setValue","clearFilterPatternButton","setText","buildPatternButtonText","menu","setTextForItem","durationSec","clearInterval","countDownTimeInterval","undefined","remaining","renderCountdownTime","time","setWatchLabel","setInterval","stopCountdownTimer","setWatchMode","label","isWatching","started","window","Widget","hideCursor","getFrame","width","minWidth","Error","on","handleGlobalKeypress","bind","destroy","handleWindowResize","dropInTopLayout","dropInProgressBar","dropInMenu","dropInBottomLayout","dropInStatusBar","dropInTestLog","dropInFilterControls","updateOrientation","setIsDebugging","setStatus","updateInterval","handleUpdateInterval","frame","height","orientation","parent","left","top","shouldLockWidthWithParent","items","value","handleMenuSelect","updateMenuLabels","closeSelectTestPopup","bottomLayout","updateLayout","setStatusLabel","refreshResults","restartLabel","payload","lastResults","updateLogs","getFocusedWidget","key","process","exit","getChildById","testLog","isScrollEnabled","shouldLockHeightWithParent","handleClickTestLog","testFile","getFileForLine","row","column","dropInSelectTestPopup","selectTestPopup","Math","max","text","open","rerun","cancel","openTestFile","line","getScrollY","testFiles","file","path","c","tests","length","topLayout","bar","progress","buttonWidth","shouldLockRightWithParent","rows","columns","id","statusBar","shouldLockBottomWithParent","backgroundColor","foregroundColor","results","updateProgressBar","percentPassing","generatePercentPassing","percentComplete","generatePercentComplete","setTitle","resultsToLogContents","logContent","errorContent","errorLog","destroyErrorLog","dropInErrorLog","cleanedLog","replace","RegExp","forEach","generateLogItemForFile","generateErrorLogItemForFile","map","err","chalk","red","join","orientationWhenErrorLogWasShown","getRows","addRow","setRowHeight","addColumn","setColumnWidth","rowIdx","columnIdx","cell","shouldAutoScrollWhenAppendingContent","padding","removeColumn","removeRow","totalTestFilesComplete","testsRemaining","generateProgressStats","percent","totalTests","totalPassedTests","totalTime","setLabel","durationUtil","msToFriendly","setProgress","test","duration","floor","isNaN","round","totalPassed","getTotalTestFilesRun","totalSkipped","totalTodo","table","computeCells","draw","resetStartTimes","message","push"],"sources":["../../../src/features/test/TestReporter.ts"],"sourcesContent":["import chalk from 'chalk'\nimport durationUtil from '../../utilities/duration.utility'\nimport { ButtonWidget } from '../../widgets/types/button.types'\nimport { InputWidget } from '../../widgets/types/input.types'\nimport { LayoutWidget } from '../../widgets/types/layout.types'\nimport { MenuBarWidget } from '../../widgets/types/menuBar.types'\nimport { PopupWidget } from '../../widgets/types/popup.types'\nimport { ProgressBarWidget } from '../../widgets/types/progressBar.types'\nimport { TextWidget } from '../../widgets/types/text.types'\nimport { WindowWidget } from '../../widgets/types/window.types'\nimport WidgetFactory from '../../widgets/WidgetFactory'\nimport { SpruceTestResults, TestRunnerStatus } from './test.types'\nimport TestLogItemGenerator from './TestLogItemGenerator'\n\ninterface TestReporterOptions {\n\thandleStartStop?: () => void\n\thandleRestart?: () => void\n\thandleQuit?: () => void\n\tonRequestOpenTestFile?: () => void\n\thandleRerunTestFile?: (fileName: string) => void\n\thandleOpenTestFile?: (fileName: string) => void\n\thandleFilterPatternChange?: (pattern?: string) => void\n\thandleToggleDebug?: () => void\n\thandletoggleStandardWatch?: () => void\n\thandleToggleSmartWatch?: () => void\n\tfilterPattern?: string\n\tisDebugging?: boolean\n\twatchMode?: WatchMode\n\tstatus?: TestRunnerStatus\n\tcwd?: string\n}\n\ntype TestReporterResults = SpruceTestResults & {\n\tcustomErrors: string[]\n}\n\nexport type TestReporterOrientation = 'landscape' | 'portrait'\nexport type WatchMode = 'off' | 'standard' | 'smart'\n\nexport default class TestReporter {\n\tprivate started = false\n\tprivate table?: any\n\tprivate bar!: ProgressBarWidget\n\tprivate bottomLayout!: LayoutWidget\n\tprivate testLog!: TextWidget\n\tprivate errorLog?: TextWidget\n\tprivate errorLogItemGenerator: TestLogItemGenerator\n\tprivate lastResults: TestReporterResults = {\n\t\ttotalTestFiles: 0,\n\t\tcustomErrors: [],\n\t}\n\tprivate updateInterval?: any\n\tprivate menu!: MenuBarWidget\n\tprivate statusBar!: TextWidget\n\tprivate window!: WindowWidget\n\tprivate widgetFactory: WidgetFactory\n\tprivate selectTestPopup?: PopupWidget\n\tprivate topLayout!: LayoutWidget\n\tprivate filterInput!: InputWidget\n\tprivate filterPattern?: string\n\tprivate clearFilterPatternButton!: ButtonWidget\n\tprivate isDebugging = false\n\tprivate watchMode: WatchMode = 'off'\n\tprivate status: TestRunnerStatus = 'ready'\n\tprivate countDownTimeInterval?: any\n\tprivate cwd: string | undefined\n\tprivate orientation: TestReporterOrientation = 'landscape'\n\n\tprivate handleStartStop?: () => void\n\tprivate handleRestart?: () => void\n\tprivate handleQuit?: () => void\n\tprivate handleRerunTestFile?: (fileName: string) => void\n\tprivate handleFilterChange?: (pattern?: string) => void\n\tprivate handleOpenTestFile?: (testFile: string) => void\n\tprivate handleToggleDebug?: () => void\n\tprivate handletoggleStandardWatch?: () => void\n\tprivate handleToggleSmartWatch?: () => any\n\tprivate minWidth = 50\n\tprivate orientationWhenErrorLogWasShown: TestReporterOrientation = 'landscape'\n\n\tpublic constructor(options?: TestReporterOptions) {\n\t\tthis.cwd = options?.cwd\n\t\tthis.filterPattern = options?.filterPattern\n\t\tthis.handleRestart = options?.handleRestart\n\t\tthis.handleStartStop = options?.handleStartStop\n\t\tthis.handleQuit = options?.handleQuit\n\t\tthis.handleRerunTestFile = options?.handleRerunTestFile\n\t\tthis.handleOpenTestFile = options?.handleOpenTestFile\n\t\tthis.handleFilterChange = options?.handleFilterPatternChange\n\t\tthis.status = options?.status ?? 'ready'\n\t\tthis.handleToggleDebug = options?.handleToggleDebug\n\t\tthis.handletoggleStandardWatch = options?.handletoggleStandardWatch\n\t\tthis.isDebugging = options?.isDebugging ?? false\n\t\tthis.watchMode = options?.watchMode ?? 'off'\n\t\tthis.handleToggleSmartWatch = options?.handleToggleSmartWatch\n\n\t\tthis.errorLogItemGenerator = new TestLogItemGenerator()\n\t\tthis.widgetFactory = new WidgetFactory()\n\t}\n\n\tpublic setFilterPattern(pattern: string | undefined) {\n\t\tthis.filterPattern = pattern\n\t\tthis.filterInput.setValue(pattern ?? '')\n\t\tthis.clearFilterPatternButton.setText(buildPatternButtonText(pattern))\n\t}\n\n\tpublic setIsDebugging(isDebugging: boolean) {\n\t\tthis.menu.setTextForItem(\n\t\t\t'toggleDebug',\n\t\t\t`Debug ^${isDebugging ? 'k' : 'w'}^#^${isDebugging ? 'g' : 'r'}${\n\t\t\t\tisDebugging ? ' • ' : ' • '\n\t\t\t}^`\n\t\t)\n\t\tthis.isDebugging = isDebugging\n\t}\n\n\tpublic startCountdownTimer(durationSec: number) {\n\t\tclearInterval(this.countDownTimeInterval)\n\t\tthis.countDownTimeInterval = undefined\n\n\t\tlet remaining = durationSec\n\n\t\tfunction renderCountdownTime(time: number) {\n\t\t\treturn `Starting ${time} `\n\t\t}\n\n\t\tthis.setWatchLabel(renderCountdownTime(remaining))\n\n\t\tthis.countDownTimeInterval = setInterval(() => {\n\t\t\tremaining--\n\n\t\t\tif (remaining < 0) {\n\t\t\t\tthis.stopCountdownTimer()\n\t\t\t} else {\n\t\t\t\tthis.setWatchLabel(renderCountdownTime(remaining))\n\t\t\t}\n\t\t}, 1000) as any\n\t}\n\n\tpublic stopCountdownTimer() {\n\t\tclearInterval(this.countDownTimeInterval)\n\t\tthis.countDownTimeInterval = undefined\n\t\tthis.setWatchMode(this.watchMode)\n\t}\n\n\tpublic setWatchMode(watchMode: WatchMode) {\n\t\tthis.watchMode = watchMode\n\t\tif (!this.countDownTimeInterval) {\n\t\t\tlet label = watchMode === 'smart' ? 'Smart Watch' : 'Standard Watch'\n\t\t\tif (watchMode === 'off') {\n\t\t\t\tlabel = 'Not Watching'\n\t\t\t}\n\t\t\tthis.setWatchLabel(label)\n\t\t}\n\t}\n\n\tprivate setWatchLabel(label: string) {\n\t\tconst isWatching = this.watchMode !== 'off'\n\n\t\tthis.menu.setTextForItem(\n\t\t\t'watchDropdown',\n\t\t\t`${label} ^${isWatching ? 'k' : 'w'}^#^${isWatching ? 'g' : 'r'}${\n\t\t\t\tisWatching ? ' • ' : ' • '\n\t\t\t}^`\n\t\t)\n\n\t\tthis.menu.setTextForItem(\n\t\t\t'toggleStandardWatch',\n\t\t\tthis.watchMode === 'standard' ? '√ Standard' : 'Standard'\n\t\t)\n\n\t\tthis.menu.setTextForItem(\n\t\t\t'toggleSmartWatch',\n\t\t\tthis.watchMode === 'smart' ? '√ Smart' : 'Smart'\n\t\t)\n\t}\n\n\tpublic async start() {\n\t\tthis.started = true\n\n\t\tthis.window = this.widgetFactory.Widget('window', {})\n\t\tthis.window.hideCursor()\n\n\t\tconst { width } = this.window.getFrame()\n\t\tif (width < this.minWidth) {\n\t\t\tthrow new Error(\n\t\t\t\t`Your screen must be at least ${this.minWidth} characters wide.`\n\t\t\t)\n\t\t}\n\n\t\tvoid this.window.on('key', this.handleGlobalKeypress.bind(this))\n\t\tvoid this.window.on('kill', this.destroy.bind(this))\n\t\tvoid this.window.on('resize', this.handleWindowResize.bind(this))\n\n\t\tthis.dropInTopLayout()\n\t\tthis.dropInProgressBar()\n\t\tthis.dropInMenu()\n\t\tthis.dropInBottomLayout()\n\t\tthis.dropInStatusBar()\n\t\tthis.dropInTestLog()\n\t\tthis.dropInFilterControls()\n\n\t\tthis.updateOrientation()\n\n\t\tthis.setIsDebugging(this.isDebugging)\n\t\tthis.setWatchMode(this.watchMode)\n\t\tthis.setStatus(this.status)\n\n\t\tthis.updateInterval = setInterval(\n\t\t\tthis.handleUpdateInterval.bind(this),\n\t\t\t1000\n\t\t)\n\t}\n\n\tprivate handleWindowResize() {\n\t\tthis.updateOrientation()\n\t}\n\n\tprivate updateOrientation() {\n\t\tconst frame = this.window.getFrame()\n\n\t\tif (frame.width * 0.5 > frame.height) {\n\t\t\tthis.orientation = 'landscape'\n\t\t} else {\n\t\t\tthis.orientation = 'portrait'\n\t\t}\n\t}\n\n\tprivate dropInMenu() {\n\t\tthis.menu = this.widgetFactory.Widget('menuBar', {\n\t\t\tparent: this.window,\n\t\t\tleft: 0,\n\t\t\ttop: 0,\n\t\t\tshouldLockWidthWithParent: true,\n\t\t\titems: [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Restart ',\n\t\t\t\t\tvalue: 'restart',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Debug ',\n\t\t\t\t\tvalue: 'toggleDebug',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Not Watching ',\n\t\t\t\t\tvalue: 'watchDropdown',\n\t\t\t\t\titems: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: 'Watch all',\n\t\t\t\t\t\t\tvalue: 'toggleStandardWatch',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: 'Smart watch',\n\t\t\t\t\t\t\tvalue: 'toggleSmartWatch',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Quit',\n\t\t\t\t\tvalue: 'quit',\n\t\t\t\t},\n\t\t\t],\n\t\t})\n\n\t\tvoid this.menu.on('select', this.handleMenuSelect.bind(this))\n\t}\n\n\tpublic setStatus(status: TestRunnerStatus) {\n\t\tthis.status = status\n\n\t\tthis.updateMenuLabels()\n\t\tthis.closeSelectTestPopup()\n\t\tthis.bottomLayout.updateLayout()\n\n\t\tif (status === 'ready') {\n\t\t\tthis.setStatusLabel('Starting...')\n\t\t} else if (this.status === 'stopped') {\n\t\t\tthis.refreshResults()\n\t\t\tthis.setStatusLabel('')\n\t\t} else if (this.status === 'running') {\n\t\t\tthis.setStatusLabel('Running tests...')\n\t\t}\n\t}\n\n\tprivate updateMenuLabels() {\n\t\tlet restartLabel = 'Start ^#^r › ^'\n\t\tswitch (this.status) {\n\t\t\tcase 'running':\n\t\t\t\trestartLabel = 'Stop ^k^#^g › ^'\n\t\t\t\tbreak\n\t\t\tcase 'stopped':\n\t\t\t\trestartLabel = `Start ^w^#^r › ^`\n\t\t\t\tbreak\n\t\t\tcase 'ready':\n\t\t\t\trestartLabel = 'Booting ^#^K › ^'\n\t\t\t\tbreak\n\t\t}\n\n\t\tthis.menu.setTextForItem('restart', restartLabel)\n\t}\n\n\tprivate handleMenuSelect(payload: { value: string }) {\n\t\tswitch (payload.value) {\n\t\t\tcase 'quit':\n\t\t\t\tthis.handleQuit?.()\n\t\t\t\tbreak\n\t\t\tcase 'restart':\n\t\t\t\tthis.handleStartStop?.()\n\t\t\t\tbreak\n\t\t\tcase 'toggleDebug':\n\t\t\t\tthis.handleToggleDebug?.()\n\t\t\t\tbreak\n\t\t\tcase 'toggleStandardWatch':\n\t\t\t\tthis.handletoggleStandardWatch?.()\n\t\t\t\tbreak\n\t\t\tcase 'toggleSmartWatch':\n\t\t\t\tthis.handleToggleSmartWatch?.()\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\tprivate handleUpdateInterval() {\n\t\tif (this.status !== 'stopped') {\n\t\t\tthis.refreshResults()\n\t\t}\n\t}\n\n\tprivate refreshResults() {\n\t\tif (this.lastResults) {\n\t\t\tthis.updateLogs()\n\t\t}\n\t}\n\n\tprivate async handleGlobalKeypress(payload: { key: string }) {\n\t\tif (this.window.getFocusedWidget() === this.filterInput) {\n\t\t\treturn\n\t\t}\n\n\t\tswitch (payload.key) {\n\t\t\tcase 'ENTER':\n\t\t\t\tthis.handleRestart?.()\n\t\t\t\tbreak\n\t\t\tcase 'CTRL_C':\n\t\t\t\tthis.handleQuit?.()\n\t\t\t\tprocess.exit()\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\tprivate dropInTestLog() {\n\t\tconst parent = this.bottomLayout.getChildById('results')\n\n\t\tif (parent) {\n\t\t\tthis.testLog = this.widgetFactory.Widget('text', {\n\t\t\t\tparent,\n\t\t\t\tisScrollEnabled: true,\n\t\t\t\tleft: 0,\n\t\t\t\ttop: 0,\n\t\t\t\theight: '100%',\n\t\t\t\twidth: '100%',\n\t\t\t\tshouldLockHeightWithParent: true,\n\t\t\t\tshouldLockWidthWithParent: true,\n\t\t\t})\n\n\t\t\tvoid this.testLog.on('click', this.handleClickTestLog.bind(this))\n\t\t}\n\t}\n\n\tprivate async handleClickTestLog(payload: { row: number; column: number }) {\n\t\tconst testFile = this.getFileForLine(payload.row)\n\t\tconst { row, column } = payload\n\n\t\tthis.closeSelectTestPopup()\n\n\t\tif (testFile) {\n\t\t\tthis.dropInSelectTestPopup({ testFile, column, row })\n\t\t}\n\t}\n\n\tprivate closeSelectTestPopup() {\n\t\tif (this.selectTestPopup) {\n\t\t\tvoid this.selectTestPopup.destroy()\n\t\t\tthis.selectTestPopup = undefined\n\t\t}\n\t}\n\n\tprivate dropInSelectTestPopup(options: {\n\t\ttestFile: string\n\t\tcolumn: number\n\t\trow: number\n\t}) {\n\t\tconst { testFile, row, column } = options\n\n\t\tthis.selectTestPopup = this.widgetFactory.Widget('popup', {\n\t\t\tparent: this.window,\n\t\t\tleft: Math.max(1, column - 25),\n\t\t\ttop: Math.max(4, row - 2),\n\t\t\twidth: 50,\n\t\t\theight: 10,\n\t\t})\n\n\t\tthis.widgetFactory.Widget('text', {\n\t\t\tparent: this.selectTestPopup,\n\t\t\tleft: 1,\n\t\t\ttop: 1,\n\t\t\theight: 4,\n\t\t\twidth: this.selectTestPopup.getFrame().width - 2,\n\t\t\ttext: `What do you wanna do with:\\n\\n${testFile}`,\n\t\t})\n\n\t\tconst open = this.widgetFactory.Widget('button', {\n\t\t\tparent: this.selectTestPopup,\n\t\t\tleft: 1,\n\t\t\ttop: 6,\n\t\t\ttext: 'Open',\n\t\t})\n\n\t\tconst rerun = this.widgetFactory.Widget('button', {\n\t\t\tparent: this.selectTestPopup,\n\t\t\tleft: 20,\n\t\t\ttop: 6,\n\t\t\ttext: 'Test',\n\t\t})\n\n\t\tconst cancel = this.widgetFactory.Widget('button', {\n\t\t\tparent: this.selectTestPopup,\n\t\t\tleft: 37,\n\t\t\ttop: 6,\n\t\t\ttext: 'Nevermind',\n\t\t})\n\n\t\tvoid rerun.on('click', () => {\n\t\t\tthis.handleRerunTestFile?.(testFile)\n\t\t\tthis.closeSelectTestPopup()\n\t\t})\n\t\tvoid cancel.on('click', this.closeSelectTestPopup.bind(this))\n\t\tvoid open.on('click', () => {\n\t\t\tthis.openTestFile(testFile)\n\t\t})\n\t}\n\n\tprivate openTestFile(testFile: string) {\n\t\tthis.handleOpenTestFile?.(testFile)\n\t\tthis.closeSelectTestPopup()\n\t}\n\n\tpublic getFileForLine(row: number): string | undefined {\n\t\tlet line = this.testLog.getScrollY()\n\n\t\tfor (let file of this.lastResults.testFiles ?? []) {\n\t\t\tif (line === row) {\n\t\t\t\treturn file.path\n\t\t\t}\n\n\t\t\tline++\n\n\t\t\tfor (let c = 0; c < (file.tests ?? []).length; c++) {\n\t\t\t\tif (line === row) {\n\t\t\t\t\treturn file.path\n\t\t\t\t}\n\n\t\t\t\tline++\n\t\t\t}\n\t\t}\n\n\t\treturn undefined\n\t}\n\n\tprivate dropInProgressBar() {\n\t\tconst parent = this.topLayout.getChildById('progress') ?? this.window\n\t\tthis.bar = this.widgetFactory.Widget('progressBar', {\n\t\t\tparent,\n\t\t\tleft: 0,\n\t\t\ttop: 0,\n\t\t\twidth: parent.getFrame().width,\n\t\t\tshouldLockWidthWithParent: true,\n\t\t\tlabel: 'Ready and waiting...',\n\t\t\tprogress: 0,\n\t\t})\n\t}\n\n\tprivate dropInFilterControls() {\n\t\tconst parent = this.topLayout.getChildById('filter') ?? this.window\n\n\t\tconst buttonWidth = 3\n\t\tthis.filterInput = this.widgetFactory.Widget('input', {\n\t\t\tparent,\n\t\t\tleft: 0,\n\t\t\tlabel: 'Pattern',\n\t\t\twidth: parent.getFrame().width - buttonWidth,\n\t\t\theight: 1,\n\t\t\tshouldLockWidthWithParent: true,\n\t\t\tvalue: this.filterPattern,\n\t\t})\n\n\t\tvoid this.filterInput.on('cancel', () => {\n\t\t\tthis.filterInput.setValue(this.filterPattern ?? '')\n\t\t})\n\n\t\tvoid this.filterInput.on('submit', (payload) => {\n\t\t\tthis.handleFilterChange?.(payload.value ?? undefined)\n\t\t})\n\n\t\tthis.clearFilterPatternButton = this.widgetFactory.Widget('button', {\n\t\t\tparent,\n\t\t\tleft: this.filterInput.getFrame().width,\n\t\t\twidth: buttonWidth,\n\t\t\ttop: 0,\n\t\t\ttext: buildPatternButtonText(this.filterPattern),\n\t\t\tshouldLockRightWithParent: true,\n\t\t})\n\n\t\tvoid this.clearFilterPatternButton.on('click', () => {\n\t\t\tif (this.filterPattern || this.filterPattern?.length === 0) {\n\t\t\t\tthis.handleFilterChange?.(undefined)\n\t\t\t} else {\n\t\t\t\tthis.filterInput.setValue('')\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate dropInBottomLayout() {\n\t\tthis.bottomLayout = this.widgetFactory.Widget('layout', {\n\t\t\tparent: this.window,\n\t\t\twidth: '100%',\n\t\t\ttop: 4,\n\t\t\theight: this.window.getFrame().height - 5,\n\t\t\tshouldLockWidthWithParent: true,\n\t\t\tshouldLockHeightWithParent: true,\n\t\t\trows: [\n\t\t\t\t{\n\t\t\t\t\theight: '100%',\n\t\t\t\t\tcolumns: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'results',\n\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t],\n\t\t})\n\t}\n\n\tprivate dropInStatusBar() {\n\t\tthis.statusBar = this.widgetFactory.Widget('text', {\n\t\t\tparent: this.window,\n\t\t\ttop: this.window.getFrame().height - 1,\n\t\t\twidth: '100%',\n\t\t\tshouldLockWidthWithParent: true,\n\t\t\tshouldLockBottomWithParent: true,\n\t\t\tbackgroundColor: 'yellow',\n\t\t\tforegroundColor: 'black',\n\t\t\ttext: '...',\n\t\t})\n\t}\n\n\tprivate dropInTopLayout() {\n\t\tthis.topLayout = this.widgetFactory.Widget('layout', {\n\t\t\tparent: this.window,\n\t\t\twidth: '100%',\n\t\t\ttop: 1,\n\t\t\theight: 3,\n\t\t\tshouldLockWidthWithParent: true,\n\t\t\tshouldLockHeightWithParent: false,\n\t\t\trows: [\n\t\t\t\t{\n\t\t\t\t\theight: '100%',\n\t\t\t\t\tcolumns: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'progress',\n\t\t\t\t\t\t\twidth: 50,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'filter',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t],\n\t\t})\n\t}\n\n\tpublic updateResults(results: SpruceTestResults) {\n\t\tif (!this.started) {\n\t\t\tthrow new Error('You must call start() before anything else.')\n\t\t}\n\n\t\tthis.lastResults = {\n\t\t\t...this.lastResults,\n\t\t\t...results,\n\t\t}\n\n\t\tthis.updateProgressBar(results)\n\n\t\tconst percentPassing = this.generatePercentPassing(results)\n\t\tconst percentComplete = this.generatePercentComplete(results)\n\n\t\tthis.window.setTitle(\n\t\t\t`Testing: ${percentComplete}% complete.${\n\t\t\t\tpercentComplete > 0 ? ` ${percentPassing}% passing.` : ''\n\t\t\t}`\n\t\t)\n\n\t\tthis.updateLogs()\n\t}\n\n\tprivate updateLogs() {\n\t\tif (this.selectTestPopup) {\n\t\t\treturn\n\t\t}\n\n\t\tlet { logContent, errorContent } = this.resultsToLogContents(\n\t\t\tthis.lastResults\n\t\t)\n\n\t\tthis.testLog.setText(logContent)\n\n\t\tif (!errorContent) {\n\t\t\tthis.errorLog && this.destroyErrorLog()\n\t\t} else {\n\t\t\t!this.errorLog && this.dropInErrorLog()\n\t\t\tconst cleanedLog = this.cwd\n\t\t\t\t? errorContent.replace(new RegExp(this.cwd + '/', 'gim'), '')\n\t\t\t\t: errorContent\n\n\t\t\tthis.errorLog?.setText(cleanedLog)\n\t\t}\n\t}\n\n\tprivate resultsToLogContents(results: SpruceTestResults) {\n\t\tlet logContent = ''\n\t\tlet errorContent = ''\n\n\t\tresults.testFiles?.forEach((file) => {\n\t\t\tlogContent += this.errorLogItemGenerator.generateLogItemForFile(\n\t\t\t\tfile,\n\t\t\t\tthis.status\n\t\t\t)\n\t\t\terrorContent +=\n\t\t\t\tthis.errorLogItemGenerator.generateErrorLogItemForFile(file)\n\t\t})\n\n\t\tif (this.lastResults.customErrors.length > 0) {\n\t\t\terrorContent =\n\t\t\t\tthis.lastResults.customErrors.map((err) => chalk.red(err)).join(`\\n`) +\n\t\t\t\t`\\n${errorContent}`\n\t\t}\n\n\t\treturn { logContent, errorContent }\n\t}\n\n\tprivate dropInErrorLog() {\n\t\tthis.orientationWhenErrorLogWasShown = this.orientation\n\n\t\tif (this.bottomLayout.getRows().length === 1) {\n\t\t\tif (this.orientation === 'portrait') {\n\t\t\t\tthis.bottomLayout.addRow({\n\t\t\t\t\tid: 'row_2',\n\t\t\t\t\tcolumns: [{ id: 'errors', width: '100%' }],\n\t\t\t\t})\n\n\t\t\t\tthis.bottomLayout.setRowHeight(0, '50%')\n\t\t\t\tthis.bottomLayout.setRowHeight(1, '50%')\n\t\t\t} else {\n\t\t\t\tthis.bottomLayout.addColumn(0, { id: 'errors', width: '50%' })\n\t\t\t\tthis.bottomLayout.setColumnWidth({\n\t\t\t\t\trowIdx: 0,\n\t\t\t\t\tcolumnIdx: 0,\n\t\t\t\t\twidth: '50%',\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tthis.bottomLayout.updateLayout()\n\n\t\t\tconst cell = this.bottomLayout.getChildById('errors')\n\n\t\t\tif (!cell) {\n\t\t\t\tthrow new Error('Pulling child error')\n\t\t\t}\n\n\t\t\tthis.errorLog = this.widgetFactory.Widget('text', {\n\t\t\t\tparent: cell,\n\t\t\t\twidth: '100%',\n\t\t\t\theight: '100%',\n\t\t\t\tisScrollEnabled: true,\n\t\t\t\tshouldAutoScrollWhenAppendingContent: false,\n\t\t\t\tshouldLockHeightWithParent: true,\n\t\t\t\tshouldLockWidthWithParent: true,\n\t\t\t\tpadding: { left: 1 },\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate destroyErrorLog() {\n\t\tif (this.errorLog) {\n\t\t\tvoid this.errorLog?.destroy()\n\t\t\tthis.errorLog = undefined\n\n\t\t\tif (this.orientationWhenErrorLogWasShown === 'landscape') {\n\t\t\t\tthis.bottomLayout.removeColumn(0, 1)\n\t\t\t\tthis.bottomLayout.setColumnWidth({\n\t\t\t\t\trowIdx: 0,\n\t\t\t\t\tcolumnIdx: 0,\n\t\t\t\t\twidth: '100%',\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tthis.bottomLayout.removeRow(1)\n\t\t\t\tthis.bottomLayout.setRowHeight(0, '100%')\n\t\t\t}\n\t\t\tthis.bottomLayout.updateLayout()\n\t\t}\n\t}\n\n\tprivate updateProgressBar(results: SpruceTestResults) {\n\t\tif (results.totalTestFilesComplete ?? 0 > 0) {\n\t\t\tconst testsRemaining =\n\t\t\t\tresults.totalTestFiles - (results.totalTestFilesComplete ?? 0)\n\n\t\t\tif (testsRemaining === 0) {\n\t\t\t\tconst { percent, totalTests, totalPassedTests, totalTime } =\n\t\t\t\t\tthis.generateProgressStats(results)\n\n\t\t\t\tthis.bar.setLabel(\n\t\t\t\t\t`Finished! ${totalPassedTests} of ${totalTests} (${percent}%) passed in ${durationUtil.msToFriendly(\n\t\t\t\t\t\ttotalTime\n\t\t\t\t\t)}.${percent < 100 ? ` Don't give up! 💪` : ''}`\n\t\t\t\t)\n\t\t\t} else {\n\t\t\t\tthis.bar.setLabel(\n\t\t\t\t\t`${results.totalTestFilesComplete} of ${\n\t\t\t\t\t\tresults.totalTestFiles\n\t\t\t\t\t} (${this.generatePercentComplete(\n\t\t\t\t\t\tresults\n\t\t\t\t\t)}%) complete. ${testsRemaining} remaining...`\n\t\t\t\t)\n\t\t\t}\n\t\t} else {\n\t\t\tthis.bar.setLabel('0%')\n\t\t}\n\n\t\tthis.bar.setProgress(this.generatePercentComplete(results) / 100)\n\t}\n\n\tprivate generateProgressStats(results: SpruceTestResults): {\n\t\tpercent: number\n\t\ttotalTests: number\n\t\ttotalPassedTests: number\n\t\ttotalTime: number\n\t} {\n\t\tlet totalTests = 0\n\t\tlet totalPassedTests = 0\n\t\tlet totalTime = 0\n\n\t\tresults.testFiles?.forEach((file) => {\n\t\t\tfile.tests?.forEach((test) => {\n\t\t\t\ttotalTime += test.duration\n\t\t\t\tif (test.status === 'passed') {\n\t\t\t\t\ttotalPassedTests++\n\t\t\t\t}\n\n\t\t\t\tif (test.status === 'passed' || test.status === 'failed') {\n\t\t\t\t\ttotalTests++\n\t\t\t\t}\n\t\t\t})\n\t\t})\n\n\t\tconst percent = Math.floor((totalPassedTests / totalTests) * 100)\n\t\treturn {\n\t\t\tpercent: percent > 0 ? percent : 0,\n\t\t\ttotalTests,\n\t\t\ttotalPassedTests,\n\t\t\ttotalTime,\n\t\t}\n\t}\n\n\tprivate generatePercentComplete(results: SpruceTestResults): number {\n\t\tconst percent =\n\t\t\t(results.totalTestFilesComplete ?? 0) / results.totalTestFiles\n\t\tif (isNaN(percent)) {\n\t\t\treturn 0\n\t\t}\n\t\treturn Math.round(percent * 100)\n\t}\n\n\tprivate generatePercentPassing(results: SpruceTestResults): number {\n\t\tconst percent =\n\t\t\t(results.totalPassed ?? 0) / this.getTotalTestFilesRun(results)\n\n\t\tif (isNaN(percent)) {\n\t\t\treturn 0\n\t\t}\n\n\t\treturn Math.floor(percent * 100)\n\t}\n\n\tprivate getTotalTestFilesRun(results: SpruceTestResults) {\n\t\treturn (\n\t\t\t(results.totalTests ?? 0) -\n\t\t\t(results.totalSkipped ?? 0) -\n\t\t\t(results.totalTodo ?? 0)\n\t\t)\n\t}\n\n\tpublic render() {\n\t\tthis.table?.computeCells()\n\t\tthis.table?.draw()\n\t}\n\n\tpublic async destroy() {\n\t\tclearInterval(this.updateInterval)\n\t\tawait this.window.destroy()\n\t}\n\n\tpublic reset() {\n\t\tthis.testLog.setText('')\n\t\tthis.lastResults = {\n\t\t\ttotalTestFiles: 0,\n\t\t\tcustomErrors: [],\n\t\t}\n\t\tthis.destroyErrorLog()\n\t\tthis.errorLogItemGenerator.resetStartTimes()\n\t}\n\n\tpublic setStatusLabel(text: string) {\n\t\tthis.statusBar.setText(text)\n\t}\n\n\tpublic appendError(message: string) {\n\t\tthis.lastResults.customErrors.push(message)\n\t}\n}\nfunction buildPatternButtonText(pattern: string | undefined): string {\n\treturn pattern ? ' x ' : ' - '\n}\n"],"mappings":";;;;;;;;;;;;AAAA;AACA;AASA;AAEA;AAAyD;AAAA;AAAA;AAAA;AAAA;AAAA,IA2BpCA,YAAY;EAyChC,sBAAmBC,OAA6B,EAAE;IAAA;IAAA;IAAA,kDAxChC,KAAK;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA,sDAOoB;MAC1CC,cAAc,EAAE,CAAC;MACjBC,YAAY,EAAE;IACf,CAAC;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IA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AU,qEAAI,CAAC,8BACvBzC,OAAO,CAACuD,YAAY,yEAAI,CAAC,CAAC,0BAC1BvD,OAAO,CAACwD,SAAS,mEAAI,CAAC,CAAC;IAE1B;EAAC;IAAA;IAAA,OAED,kBAAgB;MAAA;MACf,mBAAI,CAACC,KAAK,gDAAV,YAAYC,YAAY,EAAE;MAC1B,oBAAI,CAACD,KAAK,iDAAV,aAAYE,IAAI,EAAE;IACnB;EAAC;IAAA;IAAA;MAAA,6FAED;QAAA;UAAA;YAAA;cAAA;gBACC9J,aAAa,CAAC,IAAI,CAACmC,cAAc,CAAC;gBAAA;gBAAA,OAC5B,IAAI,CAACtB,MAAM,CAACU,OAAO,EAAE;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,CAC3B;MAAA;QAAA;MAAA;MAAA;IAAA;EAAA;IAAA;IAAA,OAED,iBAAe;MACd,IAAI,CAACuC,OAAO,CAACnE,OAAO,CAAC,EAAE,CAAC;MACxB,IAAI,CAAC4D,WAAW,GAAG;QAClBrF,cAAc,EAAE,CAAC;QACjBC,YAAY,EAAE;MACf,CAAC;MACD,IAAI,CAAC2I,eAAe,EAAE;MACtB,IAAI,CAAC3H,qBAAqB,CAAC4K,eAAe,EAAE;IAC7C;EAAC;IAAA;IAAA,OAED,wBAAsBrF,IAAY,EAAE;MACnC,IAAI,CAACqB,SAAS,CAACpG,OAAO,CAAC+E,IAAI,CAAC;IAC7B;EAAC;IAAA;IAAA,OAED,qBAAmBsF,OAAe,EAAE;MACnC,IAAI,CAACzG,WAAW,CAACpF,YAAY,CAAC8L,IAAI,CAACD,OAAO,CAAC;IAC5C;EAAC;EAAA;AAAA;AAAA;AAEF,SAASpK,sBAAsB,CAACL,OAA2B,EAAU;EACpE,OAAOA,OAAO,GAAG,KAAK,GAAG,KAAK;AAC/B"}
1
+ {"version":3,"file":"TestReporter.js","names":["_chalk","_interopRequireDefault","require","_duration","_WidgetFactory","_TestLogItemGenerator","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","F","s","n","done","value","e","_e","f","TypeError","normalCompletion","didErr","err","call","step","next","_e2","minLen","_arrayLikeToArray","prototype","toString","slice","constructor","name","from","test","arr","len","arr2","TestReporter","options","_options$status","_options$isDebugging","_options$watchMode","_classCallCheck2","totalTestFiles","customErrors","cwd","filterPattern","handleRestart","handleStartStop","handleQuit","handleRerunTestFile","handleOpenTestFile","handleFilterChange","handleFilterPatternChange","status","handleToggleDebug","handletoggleStandardWatch","isDebugging","watchMode","handleToggleSmartWatch","errorLogItemGenerator","TestLogItemGenerator","widgetFactory","WidgetFactory","_createClass2","setFilterPattern","pattern","filterInput","setValue","clearFilterPatternButton","setText","buildPatternButtonText","setIsDebugging","menu","setTextForItem","concat","startCountdownTimer","durationSec","_this","clearInterval","countDownTimeInterval","undefined","remaining","renderCountdownTime","time","setWatchLabel","setInterval","stopCountdownTimer","setWatchMode","label","isWatching","_start","_asyncToGenerator2","_regenerator","mark","_callee","_this$window$getFrame","width","wrap","_callee$","_context","prev","started","window","Widget","hideCursor","getFrame","minWidth","Error","on","handleGlobalKeypress","bind","destroy","handleWindowResize","dropInTopLayout","dropInProgressBar","dropInMenu","dropInBottomLayout","dropInStatusBar","dropInTestLog","dropInFilterControls","updateOrientation","setStatus","updateInterval","handleUpdateInterval","stop","start","frame","height","orientation","parent","left","top","shouldLockWidthWithParent","items","handleMenuSelect","updateMenuLabels","closeSelectTestPopup","bottomLayout","updateLayout","setStatusLabel","refreshResults","restartLabel","payload","_this$handleQuit","_this$handleStartStop","_this$handleToggleDeb","_this$handletoggleSta","_this$handleToggleSma","lastResults","updateLogs","_handleGlobalKeypress","_callee2","_this$handleRestart","_this$handleQuit2","_callee2$","_context2","getFocusedWidget","abrupt","t0","process","exit","_x","getChildById","testLog","isScrollEnabled","shouldLockHeightWithParent","handleClickTestLog","_handleClickTestLog","_callee3","testFile","row","column","_callee3$","_context3","getFileForLine","dropInSelectTestPopup","_x2","selectTestPopup","_this2","Math","max","text","open","rerun","cancel","_this2$handleRerunTes","openTestFile","_this$handleOpenTestF","_this$lastResults$tes","line","getScrollY","_iterator","testFiles","_step","file","path","c","_file$tests","tests","_this$topLayout$getCh","topLayout","bar","progress","_this$topLayout$getCh2","_this3","buttonWidth","_this3$filterPattern","_this3$handleFilterCh","_payload$value","shouldLockRightWithParent","_this3$filterPattern2","_this3$handleFilterCh2","rows","columns","id","statusBar","shouldLockBottomWithParent","backgroundColor","foregroundColor","updateResults","results","updateProgressBar","percentPassing","generatePercentPassing","percentComplete","generatePercentComplete","setTitle","_this$resultsToLogCon","resultsToLogContents","logContent","errorContent","errorLog","destroyErrorLog","_this$errorLog","dropInErrorLog","cleanedLog","replace","RegExp","_results$testFiles","_this4","generateLogItemForFile","generateErrorLogItemForFile","map","chalk","red","join","orientationWhenErrorLogWasShown","getRows","addRow","setRowHeight","addColumn","setColumnWidth","rowIdx","columnIdx","cell","shouldAutoScrollWhenAppendingContent","padding","_this$errorLog2","removeColumn","removeRow","_results$totalTestFil","totalTestFilesComplete","_results$totalTestFil2","testsRemaining","_this$generateProgres","generateProgressStats","percent","totalTests","totalPassedTests","totalTime","setLabel","durationUtil","msToFriendly","setProgress","_results$testFiles2","_file$tests2","duration","floor","_results$totalTestFil3","isNaN","round","_results$totalPassed","totalPassed","getTotalTestFilesRun","_results$totalTests","_results$totalSkipped","_results$totalTodo","totalSkipped","totalTodo","render","_this$table","_this$table2","table","computeCells","draw","_destroy","_callee4","_callee4$","_context4","reset","resetStartTimes","appendError","message","exports"],"sources":["../../../src/features/test/TestReporter.ts"],"sourcesContent":["import chalk from 'chalk'\nimport durationUtil from '../../utilities/duration.utility'\nimport { ButtonWidget } from '../../widgets/types/button.types'\nimport { InputWidget } from '../../widgets/types/input.types'\nimport { LayoutWidget } from '../../widgets/types/layout.types'\nimport { MenuBarWidget } from '../../widgets/types/menuBar.types'\nimport { PopupWidget } from '../../widgets/types/popup.types'\nimport { ProgressBarWidget } from '../../widgets/types/progressBar.types'\nimport { TextWidget } from '../../widgets/types/text.types'\nimport { WindowWidget } from '../../widgets/types/window.types'\nimport WidgetFactory from '../../widgets/WidgetFactory'\nimport { SpruceTestResults, TestRunnerStatus } from './test.types'\nimport TestLogItemGenerator from './TestLogItemGenerator'\n\nexport default class TestReporter {\n\tprivate started = false\n\tprivate table?: any\n\tprivate bar!: ProgressBarWidget\n\tprivate bottomLayout!: LayoutWidget\n\tprivate testLog!: TextWidget\n\tprivate errorLog?: TextWidget\n\tprivate errorLogItemGenerator: TestLogItemGenerator\n\tprivate lastResults: TestReporterResults = {\n\t\ttotalTestFiles: 0,\n\t\tcustomErrors: [],\n\t}\n\tprivate updateInterval?: any\n\tprivate menu!: MenuBarWidget\n\tprivate statusBar!: TextWidget\n\tprivate window!: WindowWidget\n\tprivate widgetFactory: WidgetFactory\n\tprivate selectTestPopup?: PopupWidget\n\tprivate topLayout!: LayoutWidget\n\tprivate filterInput!: InputWidget\n\tprivate filterPattern?: string\n\tprivate clearFilterPatternButton!: ButtonWidget\n\tprivate isDebugging = false\n\tprivate watchMode: WatchMode = 'off'\n\tprivate status: TestRunnerStatus = 'ready'\n\tprivate countDownTimeInterval?: any\n\tprivate cwd: string | undefined\n\tprivate orientation: TestReporterOrientation = 'landscape'\n\n\tprivate handleStartStop?: () => void\n\tprivate handleRestart?: () => void\n\tprivate handleQuit?: () => void\n\tprivate handleRerunTestFile?: (fileName: string) => void\n\tprivate handleFilterChange?: (pattern?: string) => void\n\tprivate handleOpenTestFile?: (testFile: string) => void\n\tprivate handleToggleDebug?: () => void\n\tprivate handletoggleStandardWatch?: () => void\n\tprivate handleToggleSmartWatch?: () => any\n\tprivate minWidth = 50\n\tprivate orientationWhenErrorLogWasShown: TestReporterOrientation = 'landscape'\n\n\tpublic constructor(options?: TestReporterOptions) {\n\t\tthis.cwd = options?.cwd\n\t\tthis.filterPattern = options?.filterPattern\n\t\tthis.handleRestart = options?.handleRestart\n\t\tthis.handleStartStop = options?.handleStartStop\n\t\tthis.handleQuit = options?.handleQuit\n\t\tthis.handleRerunTestFile = options?.handleRerunTestFile\n\t\tthis.handleOpenTestFile = options?.handleOpenTestFile\n\t\tthis.handleFilterChange = options?.handleFilterPatternChange\n\t\tthis.status = options?.status ?? 'ready'\n\t\tthis.handleToggleDebug = options?.handleToggleDebug\n\t\tthis.handletoggleStandardWatch = options?.handletoggleStandardWatch\n\t\tthis.isDebugging = options?.isDebugging ?? false\n\t\tthis.watchMode = options?.watchMode ?? 'off'\n\t\tthis.handleToggleSmartWatch = options?.handleToggleSmartWatch\n\n\t\tthis.errorLogItemGenerator = new TestLogItemGenerator()\n\t\tthis.widgetFactory = new WidgetFactory()\n\t}\n\n\tpublic setFilterPattern(pattern: string | undefined) {\n\t\tthis.filterPattern = pattern\n\t\tthis.filterInput.setValue(pattern ?? '')\n\t\tthis.clearFilterPatternButton.setText(buildPatternButtonText(pattern))\n\t}\n\n\tpublic setIsDebugging(isDebugging: boolean) {\n\t\tthis.menu.setTextForItem(\n\t\t\t'toggleDebug',\n\t\t\t`Debug ^${isDebugging ? 'k' : 'w'}^#^${isDebugging ? 'g' : 'r'}${\n\t\t\t\tisDebugging ? ' • ' : ' • '\n\t\t\t}^`\n\t\t)\n\t\tthis.isDebugging = isDebugging\n\t}\n\n\tpublic startCountdownTimer(durationSec: number) {\n\t\tclearInterval(this.countDownTimeInterval)\n\t\tthis.countDownTimeInterval = undefined\n\n\t\tlet remaining = durationSec\n\n\t\tfunction renderCountdownTime(time: number) {\n\t\t\treturn `Starting ${time} `\n\t\t}\n\n\t\tthis.setWatchLabel(renderCountdownTime(remaining))\n\n\t\tthis.countDownTimeInterval = setInterval(() => {\n\t\t\tremaining--\n\n\t\t\tif (remaining < 0) {\n\t\t\t\tthis.stopCountdownTimer()\n\t\t\t} else {\n\t\t\t\tthis.setWatchLabel(renderCountdownTime(remaining))\n\t\t\t}\n\t\t}, 1000) as any\n\t}\n\n\tpublic stopCountdownTimer() {\n\t\tclearInterval(this.countDownTimeInterval)\n\t\tthis.countDownTimeInterval = undefined\n\t\tthis.setWatchMode(this.watchMode)\n\t}\n\n\tpublic setWatchMode(watchMode: WatchMode) {\n\t\tthis.watchMode = watchMode\n\t\tif (!this.countDownTimeInterval) {\n\t\t\tlet label = watchMode === 'smart' ? 'Smart Watch' : 'Standard Watch'\n\t\t\tif (watchMode === 'off') {\n\t\t\t\tlabel = 'Not Watching'\n\t\t\t}\n\t\t\tthis.setWatchLabel(label)\n\t\t}\n\t}\n\n\tprivate setWatchLabel(label: string) {\n\t\tconst isWatching = this.watchMode !== 'off'\n\n\t\tthis.menu.setTextForItem(\n\t\t\t'watchDropdown',\n\t\t\t`${label} ^${isWatching ? 'k' : 'w'}^#^${isWatching ? 'g' : 'r'}${\n\t\t\t\tisWatching ? ' • ' : ' • '\n\t\t\t}^`\n\t\t)\n\n\t\tthis.menu.setTextForItem(\n\t\t\t'toggleStandardWatch',\n\t\t\tthis.watchMode === 'standard' ? '√ Standard' : 'Standard'\n\t\t)\n\n\t\tthis.menu.setTextForItem(\n\t\t\t'toggleSmartWatch',\n\t\t\tthis.watchMode === 'smart' ? '√ Smart' : 'Smart'\n\t\t)\n\t}\n\n\tpublic async start() {\n\t\tthis.started = true\n\n\t\tthis.window = this.widgetFactory.Widget('window', {})\n\t\tthis.window.hideCursor()\n\n\t\tconst { width } = this.window.getFrame()\n\t\tif (width < this.minWidth) {\n\t\t\tthrow new Error(\n\t\t\t\t`Your screen must be at least ${this.minWidth} characters wide.`\n\t\t\t)\n\t\t}\n\n\t\tvoid this.window.on('key', this.handleGlobalKeypress.bind(this))\n\t\tvoid this.window.on('kill', this.destroy.bind(this))\n\t\tvoid this.window.on('resize', this.handleWindowResize.bind(this))\n\n\t\tthis.dropInTopLayout()\n\t\tthis.dropInProgressBar()\n\t\tthis.dropInMenu()\n\t\tthis.dropInBottomLayout()\n\t\tthis.dropInStatusBar()\n\t\tthis.dropInTestLog()\n\t\tthis.dropInFilterControls()\n\n\t\tthis.updateOrientation()\n\n\t\tthis.setIsDebugging(this.isDebugging)\n\t\tthis.setWatchMode(this.watchMode)\n\t\tthis.setStatus(this.status)\n\n\t\tthis.updateInterval = setInterval(\n\t\t\tthis.handleUpdateInterval.bind(this),\n\t\t\t1000\n\t\t)\n\t}\n\n\tprivate handleWindowResize() {\n\t\tthis.updateOrientation()\n\t}\n\n\tprivate updateOrientation() {\n\t\tconst frame = this.window.getFrame()\n\n\t\tif (frame.width * 0.5 > frame.height) {\n\t\t\tthis.orientation = 'landscape'\n\t\t} else {\n\t\t\tthis.orientation = 'portrait'\n\t\t}\n\t}\n\n\tprivate dropInMenu() {\n\t\tthis.menu = this.widgetFactory.Widget('menuBar', {\n\t\t\tparent: this.window,\n\t\t\tleft: 0,\n\t\t\ttop: 0,\n\t\t\tshouldLockWidthWithParent: true,\n\t\t\titems: [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Restart ',\n\t\t\t\t\tvalue: 'restart',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Debug ',\n\t\t\t\t\tvalue: 'toggleDebug',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Not Watching ',\n\t\t\t\t\tvalue: 'watchDropdown',\n\t\t\t\t\titems: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: 'Watch all',\n\t\t\t\t\t\t\tvalue: 'toggleStandardWatch',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: 'Smart watch',\n\t\t\t\t\t\t\tvalue: 'toggleSmartWatch',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Quit',\n\t\t\t\t\tvalue: 'quit',\n\t\t\t\t},\n\t\t\t],\n\t\t})\n\n\t\tvoid this.menu.on('select', this.handleMenuSelect.bind(this))\n\t}\n\n\tpublic setStatus(status: TestRunnerStatus) {\n\t\tthis.status = status\n\n\t\tthis.updateMenuLabels()\n\t\tthis.closeSelectTestPopup()\n\t\tthis.bottomLayout.updateLayout()\n\n\t\tif (status === 'ready') {\n\t\t\tthis.setStatusLabel('Starting...')\n\t\t} else if (this.status === 'stopped') {\n\t\t\tthis.refreshResults()\n\t\t\tthis.setStatusLabel('')\n\t\t} else if (this.status === 'running') {\n\t\t\tthis.setStatusLabel('Running tests...')\n\t\t}\n\t}\n\n\tprivate updateMenuLabels() {\n\t\tlet restartLabel = 'Start ^#^r › ^'\n\t\tswitch (this.status) {\n\t\t\tcase 'running':\n\t\t\t\trestartLabel = 'Stop ^k^#^g › ^'\n\t\t\t\tbreak\n\t\t\tcase 'stopped':\n\t\t\t\trestartLabel = `Start ^w^#^r › ^`\n\t\t\t\tbreak\n\t\t\tcase 'ready':\n\t\t\t\trestartLabel = 'Booting ^#^K › ^'\n\t\t\t\tbreak\n\t\t}\n\n\t\tthis.menu.setTextForItem('restart', restartLabel)\n\t}\n\n\tprivate handleMenuSelect(payload: { value: string }) {\n\t\tswitch (payload.value) {\n\t\t\tcase 'quit':\n\t\t\t\tthis.handleQuit?.()\n\t\t\t\tbreak\n\t\t\tcase 'restart':\n\t\t\t\tthis.handleStartStop?.()\n\t\t\t\tbreak\n\t\t\tcase 'toggleDebug':\n\t\t\t\tthis.handleToggleDebug?.()\n\t\t\t\tbreak\n\t\t\tcase 'toggleStandardWatch':\n\t\t\t\tthis.handletoggleStandardWatch?.()\n\t\t\t\tbreak\n\t\t\tcase 'toggleSmartWatch':\n\t\t\t\tthis.handleToggleSmartWatch?.()\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\tprivate handleUpdateInterval() {\n\t\tif (this.status !== 'stopped') {\n\t\t\tthis.refreshResults()\n\t\t}\n\t}\n\n\tprivate refreshResults() {\n\t\tif (this.lastResults) {\n\t\t\tthis.updateLogs()\n\t\t}\n\t}\n\n\tprivate async handleGlobalKeypress(payload: { key: string }) {\n\t\tif (this.window.getFocusedWidget() === this.filterInput) {\n\t\t\treturn\n\t\t}\n\n\t\tswitch (payload.key) {\n\t\t\tcase 'ENTER':\n\t\t\t\tthis.handleRestart?.()\n\t\t\t\tbreak\n\t\t\tcase 'CTRL_C':\n\t\t\t\tthis.handleQuit?.()\n\t\t\t\tprocess.exit()\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\tprivate dropInTestLog() {\n\t\tconst parent = this.bottomLayout.getChildById('results')\n\n\t\tif (parent) {\n\t\t\tthis.testLog = this.widgetFactory.Widget('text', {\n\t\t\t\tparent,\n\t\t\t\tisScrollEnabled: true,\n\t\t\t\tleft: 0,\n\t\t\t\ttop: 0,\n\t\t\t\theight: '100%',\n\t\t\t\twidth: '100%',\n\t\t\t\tshouldLockHeightWithParent: true,\n\t\t\t\tshouldLockWidthWithParent: true,\n\t\t\t})\n\n\t\t\tvoid this.testLog.on('click', this.handleClickTestLog.bind(this))\n\t\t}\n\t}\n\n\tprivate async handleClickTestLog(payload: { row: number; column: number }) {\n\t\tconst testFile = this.getFileForLine(payload.row)\n\t\tconst { row, column } = payload\n\n\t\tthis.closeSelectTestPopup()\n\n\t\tif (testFile) {\n\t\t\tthis.dropInSelectTestPopup({ testFile, column, row })\n\t\t}\n\t}\n\n\tprivate closeSelectTestPopup() {\n\t\tif (this.selectTestPopup) {\n\t\t\tvoid this.selectTestPopup.destroy()\n\t\t\tthis.selectTestPopup = undefined\n\t\t}\n\t}\n\n\tprivate dropInSelectTestPopup(options: {\n\t\ttestFile: string\n\t\tcolumn: number\n\t\trow: number\n\t}) {\n\t\tconst { testFile, row, column } = options\n\n\t\tthis.selectTestPopup = this.widgetFactory.Widget('popup', {\n\t\t\tparent: this.window,\n\t\t\tleft: Math.max(1, column - 25),\n\t\t\ttop: Math.max(4, row - 2),\n\t\t\twidth: 50,\n\t\t\theight: 10,\n\t\t})\n\n\t\tthis.widgetFactory.Widget('text', {\n\t\t\tparent: this.selectTestPopup,\n\t\t\tleft: 1,\n\t\t\ttop: 1,\n\t\t\theight: 4,\n\t\t\twidth: this.selectTestPopup.getFrame().width - 2,\n\t\t\ttext: `What do you wanna do with:\\n\\n${testFile}`,\n\t\t})\n\n\t\tconst open = this.widgetFactory.Widget('button', {\n\t\t\tparent: this.selectTestPopup,\n\t\t\tleft: 1,\n\t\t\ttop: 6,\n\t\t\ttext: 'Open',\n\t\t})\n\n\t\tconst rerun = this.widgetFactory.Widget('button', {\n\t\t\tparent: this.selectTestPopup,\n\t\t\tleft: 20,\n\t\t\ttop: 6,\n\t\t\ttext: 'Test',\n\t\t})\n\n\t\tconst cancel = this.widgetFactory.Widget('button', {\n\t\t\tparent: this.selectTestPopup,\n\t\t\tleft: 37,\n\t\t\ttop: 6,\n\t\t\ttext: 'Nevermind',\n\t\t})\n\n\t\tvoid rerun.on('click', () => {\n\t\t\tthis.handleRerunTestFile?.(testFile)\n\t\t\tthis.closeSelectTestPopup()\n\t\t})\n\t\tvoid cancel.on('click', this.closeSelectTestPopup.bind(this))\n\t\tvoid open.on('click', () => {\n\t\t\tthis.openTestFile(testFile)\n\t\t})\n\t}\n\n\tprivate openTestFile(testFile: string) {\n\t\tthis.handleOpenTestFile?.(testFile)\n\t\tthis.closeSelectTestPopup()\n\t}\n\n\tpublic getFileForLine(row: number): string | undefined {\n\t\tlet line = this.testLog.getScrollY()\n\n\t\tfor (let file of this.lastResults.testFiles ?? []) {\n\t\t\tif (line === row) {\n\t\t\t\treturn file.path\n\t\t\t}\n\n\t\t\tline++\n\n\t\t\tfor (let c = 0; c < (file.tests ?? []).length; c++) {\n\t\t\t\tif (line === row) {\n\t\t\t\t\treturn file.path\n\t\t\t\t}\n\n\t\t\t\tline++\n\t\t\t}\n\t\t}\n\n\t\treturn undefined\n\t}\n\n\tprivate dropInProgressBar() {\n\t\tconst parent = this.topLayout.getChildById('progress') ?? this.window\n\t\tthis.bar = this.widgetFactory.Widget('progressBar', {\n\t\t\tparent,\n\t\t\tleft: 0,\n\t\t\ttop: 0,\n\t\t\twidth: parent.getFrame().width,\n\t\t\tshouldLockWidthWithParent: true,\n\t\t\tlabel: 'Ready and waiting...',\n\t\t\tprogress: 0,\n\t\t})\n\t}\n\n\tprivate dropInFilterControls() {\n\t\tconst parent = this.topLayout.getChildById('filter') ?? this.window\n\n\t\tconst buttonWidth = 3\n\t\tthis.filterInput = this.widgetFactory.Widget('input', {\n\t\t\tparent,\n\t\t\tleft: 0,\n\t\t\tlabel: 'Pattern',\n\t\t\twidth: parent.getFrame().width - buttonWidth,\n\t\t\theight: 1,\n\t\t\tshouldLockWidthWithParent: true,\n\t\t\tvalue: this.filterPattern,\n\t\t})\n\n\t\tvoid this.filterInput.on('cancel', () => {\n\t\t\tthis.filterInput.setValue(this.filterPattern ?? '')\n\t\t})\n\n\t\tvoid this.filterInput.on('submit', (payload) => {\n\t\t\tthis.handleFilterChange?.(payload.value ?? undefined)\n\t\t})\n\n\t\tthis.clearFilterPatternButton = this.widgetFactory.Widget('button', {\n\t\t\tparent,\n\t\t\tleft: this.filterInput.getFrame().width,\n\t\t\twidth: buttonWidth,\n\t\t\ttop: 0,\n\t\t\ttext: buildPatternButtonText(this.filterPattern),\n\t\t\tshouldLockRightWithParent: true,\n\t\t})\n\n\t\tvoid this.clearFilterPatternButton.on('click', () => {\n\t\t\tif (this.filterPattern || this.filterPattern?.length === 0) {\n\t\t\t\tthis.handleFilterChange?.(undefined)\n\t\t\t} else {\n\t\t\t\tthis.filterInput.setValue('')\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate dropInBottomLayout() {\n\t\tthis.bottomLayout = this.widgetFactory.Widget('layout', {\n\t\t\tparent: this.window,\n\t\t\twidth: '100%',\n\t\t\ttop: 4,\n\t\t\theight: this.window.getFrame().height - 5,\n\t\t\tshouldLockWidthWithParent: true,\n\t\t\tshouldLockHeightWithParent: true,\n\t\t\trows: [\n\t\t\t\t{\n\t\t\t\t\theight: '100%',\n\t\t\t\t\tcolumns: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'results',\n\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t],\n\t\t})\n\t}\n\n\tprivate dropInStatusBar() {\n\t\tthis.statusBar = this.widgetFactory.Widget('text', {\n\t\t\tparent: this.window,\n\t\t\ttop: this.window.getFrame().height - 1,\n\t\t\twidth: '100%',\n\t\t\tshouldLockWidthWithParent: true,\n\t\t\tshouldLockBottomWithParent: true,\n\t\t\tbackgroundColor: 'yellow',\n\t\t\tforegroundColor: 'black',\n\t\t\ttext: '...',\n\t\t})\n\t}\n\n\tprivate dropInTopLayout() {\n\t\tthis.topLayout = this.widgetFactory.Widget('layout', {\n\t\t\tparent: this.window,\n\t\t\twidth: '100%',\n\t\t\ttop: 1,\n\t\t\theight: 3,\n\t\t\tshouldLockWidthWithParent: true,\n\t\t\tshouldLockHeightWithParent: false,\n\t\t\trows: [\n\t\t\t\t{\n\t\t\t\t\theight: '100%',\n\t\t\t\t\tcolumns: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'progress',\n\t\t\t\t\t\t\twidth: 50,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'filter',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t],\n\t\t})\n\t}\n\n\tpublic updateResults(results: SpruceTestResults) {\n\t\tif (!this.started) {\n\t\t\tthrow new Error('You must call start() before anything else.')\n\t\t}\n\n\t\tthis.lastResults = {\n\t\t\t...this.lastResults,\n\t\t\t...results,\n\t\t}\n\n\t\tthis.updateProgressBar(results)\n\n\t\tconst percentPassing = this.generatePercentPassing(results)\n\t\tconst percentComplete = this.generatePercentComplete(results)\n\n\t\tthis.window.setTitle(\n\t\t\t`Testing: ${percentComplete}% complete.${\n\t\t\t\tpercentComplete > 0 ? ` ${percentPassing}% passing.` : ''\n\t\t\t}`\n\t\t)\n\n\t\tthis.updateLogs()\n\t}\n\n\tprivate updateLogs() {\n\t\tif (this.selectTestPopup) {\n\t\t\treturn\n\t\t}\n\n\t\tlet { logContent, errorContent } = this.resultsToLogContents(\n\t\t\tthis.lastResults\n\t\t)\n\n\t\tthis.testLog.setText(logContent)\n\n\t\tif (!errorContent) {\n\t\t\tthis.errorLog && this.destroyErrorLog()\n\t\t} else {\n\t\t\t!this.errorLog && this.dropInErrorLog()\n\t\t\tconst cleanedLog = this.cwd\n\t\t\t\t? errorContent.replace(new RegExp(this.cwd + '/', 'gim'), '')\n\t\t\t\t: errorContent\n\n\t\t\tthis.errorLog?.setText(cleanedLog)\n\t\t}\n\t}\n\n\tprivate resultsToLogContents(results: SpruceTestResults) {\n\t\tlet logContent = ''\n\t\tlet errorContent = ''\n\n\t\tresults.testFiles?.forEach((file) => {\n\t\t\tlogContent += this.errorLogItemGenerator.generateLogItemForFile(\n\t\t\t\tfile,\n\t\t\t\tthis.status\n\t\t\t)\n\t\t\terrorContent +=\n\t\t\t\tthis.errorLogItemGenerator.generateErrorLogItemForFile(file)\n\t\t})\n\n\t\tif (this.lastResults.customErrors.length > 0) {\n\t\t\terrorContent =\n\t\t\t\tthis.lastResults.customErrors.map((err) => chalk.red(err)).join(`\\n`) +\n\t\t\t\t`\\n${errorContent}`\n\t\t}\n\n\t\treturn { logContent, errorContent }\n\t}\n\n\tprivate dropInErrorLog() {\n\t\tthis.orientationWhenErrorLogWasShown = this.orientation\n\n\t\tif (this.bottomLayout.getRows().length === 1) {\n\t\t\tif (this.orientation === 'portrait') {\n\t\t\t\tthis.bottomLayout.addRow({\n\t\t\t\t\tid: 'row_2',\n\t\t\t\t\tcolumns: [{ id: 'errors', width: '100%' }],\n\t\t\t\t})\n\n\t\t\t\tthis.bottomLayout.setRowHeight(0, '50%')\n\t\t\t\tthis.bottomLayout.setRowHeight(1, '50%')\n\t\t\t} else {\n\t\t\t\tthis.bottomLayout.addColumn(0, { id: 'errors', width: '50%' })\n\t\t\t\tthis.bottomLayout.setColumnWidth({\n\t\t\t\t\trowIdx: 0,\n\t\t\t\t\tcolumnIdx: 0,\n\t\t\t\t\twidth: '50%',\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tthis.bottomLayout.updateLayout()\n\n\t\t\tconst cell = this.bottomLayout.getChildById('errors')\n\n\t\t\tif (!cell) {\n\t\t\t\tthrow new Error('Pulling child error')\n\t\t\t}\n\n\t\t\tthis.errorLog = this.widgetFactory.Widget('text', {\n\t\t\t\tparent: cell,\n\t\t\t\twidth: '100%',\n\t\t\t\theight: '100%',\n\t\t\t\tisScrollEnabled: true,\n\t\t\t\tshouldAutoScrollWhenAppendingContent: false,\n\t\t\t\tshouldLockHeightWithParent: true,\n\t\t\t\tshouldLockWidthWithParent: true,\n\t\t\t\tpadding: { left: 1 },\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate destroyErrorLog() {\n\t\tif (this.errorLog) {\n\t\t\tvoid this.errorLog?.destroy()\n\t\t\tthis.errorLog = undefined\n\n\t\t\tif (this.orientationWhenErrorLogWasShown === 'landscape') {\n\t\t\t\tthis.bottomLayout.removeColumn(0, 1)\n\t\t\t\tthis.bottomLayout.setColumnWidth({\n\t\t\t\t\trowIdx: 0,\n\t\t\t\t\tcolumnIdx: 0,\n\t\t\t\t\twidth: '100%',\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tthis.bottomLayout.removeRow(1)\n\t\t\t\tthis.bottomLayout.setRowHeight(0, '100%')\n\t\t\t}\n\t\t\tthis.bottomLayout.updateLayout()\n\t\t}\n\t}\n\n\tprivate updateProgressBar(results: SpruceTestResults) {\n\t\tif (results.totalTestFilesComplete ?? 0 > 0) {\n\t\t\tconst testsRemaining =\n\t\t\t\tresults.totalTestFiles - (results.totalTestFilesComplete ?? 0)\n\n\t\t\tif (testsRemaining === 0) {\n\t\t\t\tconst { percent, totalTests, totalPassedTests, totalTime } =\n\t\t\t\t\tthis.generateProgressStats(results)\n\n\t\t\t\tthis.bar.setLabel(\n\t\t\t\t\t`Finished! ${totalPassedTests} of ${totalTests} (${percent}%) passed in ${durationUtil.msToFriendly(\n\t\t\t\t\t\ttotalTime\n\t\t\t\t\t)}.${percent < 100 ? ` Don't give up! 💪` : ''}`\n\t\t\t\t)\n\t\t\t} else {\n\t\t\t\tthis.bar.setLabel(\n\t\t\t\t\t`${results.totalTestFilesComplete} of ${\n\t\t\t\t\t\tresults.totalTestFiles\n\t\t\t\t\t} (${this.generatePercentComplete(\n\t\t\t\t\t\tresults\n\t\t\t\t\t)}%) complete. ${testsRemaining} remaining...`\n\t\t\t\t)\n\t\t\t}\n\t\t} else {\n\t\t\tthis.bar.setLabel('0%')\n\t\t}\n\n\t\tthis.bar.setProgress(this.generatePercentComplete(results) / 100)\n\t}\n\n\tprivate generateProgressStats(results: SpruceTestResults): {\n\t\tpercent: number\n\t\ttotalTests: number\n\t\ttotalPassedTests: number\n\t\ttotalTime: number\n\t} {\n\t\tlet totalTests = 0\n\t\tlet totalPassedTests = 0\n\t\tlet totalTime = 0\n\n\t\tresults.testFiles?.forEach((file) => {\n\t\t\tfile.tests?.forEach((test) => {\n\t\t\t\ttotalTime += test.duration\n\t\t\t\tif (test.status === 'passed') {\n\t\t\t\t\ttotalPassedTests++\n\t\t\t\t}\n\n\t\t\t\tif (test.status === 'passed' || test.status === 'failed') {\n\t\t\t\t\ttotalTests++\n\t\t\t\t}\n\t\t\t})\n\t\t})\n\n\t\tconst percent = Math.floor((totalPassedTests / totalTests) * 100)\n\t\treturn {\n\t\t\tpercent: percent > 0 ? percent : 0,\n\t\t\ttotalTests,\n\t\t\ttotalPassedTests,\n\t\t\ttotalTime,\n\t\t}\n\t}\n\n\tprivate generatePercentComplete(results: SpruceTestResults): number {\n\t\tconst percent =\n\t\t\t(results.totalTestFilesComplete ?? 0) / results.totalTestFiles\n\t\tif (isNaN(percent)) {\n\t\t\treturn 0\n\t\t}\n\t\treturn Math.round(percent * 100)\n\t}\n\n\tprivate generatePercentPassing(results: SpruceTestResults): number {\n\t\tconst percent =\n\t\t\t(results.totalPassed ?? 0) / this.getTotalTestFilesRun(results)\n\n\t\tif (isNaN(percent)) {\n\t\t\treturn 0\n\t\t}\n\n\t\treturn Math.floor(percent * 100)\n\t}\n\n\tprivate getTotalTestFilesRun(results: SpruceTestResults) {\n\t\treturn (\n\t\t\t(results.totalTests ?? 0) -\n\t\t\t(results.totalSkipped ?? 0) -\n\t\t\t(results.totalTodo ?? 0)\n\t\t)\n\t}\n\n\tpublic render() {\n\t\tthis.table?.computeCells()\n\t\tthis.table?.draw()\n\t}\n\n\tpublic async destroy() {\n\t\tclearInterval(this.updateInterval)\n\t\tawait this.window.destroy()\n\t}\n\n\tpublic reset() {\n\t\tthis.testLog.setText('')\n\t\tthis.lastResults = {\n\t\t\ttotalTestFiles: 0,\n\t\t\tcustomErrors: [],\n\t\t}\n\t\tthis.destroyErrorLog()\n\t\tthis.errorLogItemGenerator.resetStartTimes()\n\t}\n\n\tpublic setStatusLabel(text: string) {\n\t\tthis.statusBar.setText(text)\n\t}\n\n\tpublic appendError(message: string) {\n\t\tthis.lastResults.customErrors.push(message)\n\t}\n}\nfunction buildPatternButtonText(pattern: string | undefined): string {\n\treturn pattern ? ' x ' : ' - '\n}\n\ninterface TestReporterOptions {\n\thandleStartStop?: () => void\n\thandleRestart?: () => void\n\thandleQuit?: () => void\n\tonRequestOpenTestFile?: () => void\n\thandleRerunTestFile?: (fileName: string) => void\n\thandleOpenTestFile?: (fileName: string) => void\n\thandleFilterPatternChange?: (pattern?: string) => void\n\thandleToggleDebug?: () => void\n\thandletoggleStandardWatch?: () => void\n\thandleToggleSmartWatch?: () => void\n\tfilterPattern?: string\n\tisDebugging?: boolean\n\twatchMode?: WatchMode\n\tstatus?: TestRunnerStatus\n\tcwd?: string\n}\n\ntype TestReporterResults = SpruceTestResults & {\n\tcustomErrors: string[]\n}\n\nexport type TestReporterOrientation = 'landsc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AAC;MACxB,IAAI,CAAC+E,WAAW,GAAG;QAClB1G,cAAc,EAAE,CAAC;QACjBC,YAAY,EAAE;MACf,CAAC;MACD,IAAI,CAAC6L,eAAe,EAAE;MACtB,IAAI,CAAC7K,qBAAqB,CAACiP,eAAe,EAAE;IAC7C;EAAC;IAAAlT,GAAA;IAAAkB,KAAA,EAED,SAAA+H,eAAsB0C,IAAY,EAAE;MACnC,IAAI,CAACkC,SAAS,CAAClJ,OAAO,CAACgH,IAAI,CAAC;IAC7B;EAAC;IAAA3L,GAAA;IAAAkB,KAAA,EAED,SAAAiS,YAAmBC,OAAe,EAAE;MACnC,IAAI,CAAC1J,WAAW,CAACzG,YAAY,CAAC1D,IAAI,CAAC6T,OAAO,CAAC;IAC5C;EAAC;EAAA,OAAA1Q,YAAA;AAAA;AAAA2Q,OAAA,cAAA3Q,YAAA;AAEF,SAASkC,sBAAsBA,CAACL,OAA2B,EAAU;EACpE,OAAOA,OAAO,GAAG,KAAK,GAAG,KAAK;AAC/B"}
@@ -81,97 +81,91 @@ var TestRunner = /*#__PURE__*/function (_AbstractEventEmitter) {
81
81
  _this2 = this;
82
82
  var jestPath, debugArgs, pattern, escapeShell, command, parser;
83
83
  return _regenerator["default"].wrap(function _callee3$(_context3) {
84
- while (1) {
85
- switch (_context3.prev = _context3.next) {
86
- case 0:
87
- this.wasKilled = false;
88
- jestPath = this.resolvePathToJest();
89
- debugArgs = ((_options$debugPort = options === null || options === void 0 ? void 0 : options.debugPort) !== null && _options$debugPort !== void 0 ? _options$debugPort : 0) > 0 ? "--inspect=".concat(options === null || options === void 0 ? void 0 : options.debugPort) : "";
90
- pattern = (_options$pattern = options === null || options === void 0 ? void 0 : options.pattern) !== null && _options$pattern !== void 0 ? _options$pattern : '';
91
- escapeShell = function escapeShell(cmd) {
92
- return '--testPathPattern="' + cmd.replace(/(["\s'$`\\])/g, '\\$1') + '"';
93
- };
94
- command = "node --unhandled-rejections=strict ".concat(debugArgs, " ").concat(jestPath, " --reporters=\"@sprucelabs/jest-json-reporter\" --testRunner=\"jest-circus/runner\" --passWithNoTests ").concat(pattern ? escapeShell(pattern) : '');
95
- parser = new _JestJsonParser["default"]();
96
- this.testResults = {
97
- totalTestFiles: 0
98
- };
99
- _context3.prev = 8;
100
- _context3.next = 11;
101
- return this.commandService.execute(command, {
102
- forceColor: true,
103
- onError: function () {
104
- var _onError = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(data) {
105
- var isDebugMessaging;
106
- return _regenerator["default"].wrap(function _callee$(_context) {
107
- while (1) {
108
- switch (_context.prev = _context.next) {
109
- case 0:
110
- isDebugMessaging = _this2.isDebugMessage(data);
111
- if (isDebugMessaging) {
112
- _context.next = 4;
113
- break;
114
- }
115
- _context.next = 4;
116
- return _this2.emit('did-error', {
117
- message: data
118
- });
119
- case 4:
120
- case "end":
121
- return _context.stop();
84
+ while (1) switch (_context3.prev = _context3.next) {
85
+ case 0:
86
+ this.wasKilled = false;
87
+ jestPath = this.resolvePathToJest();
88
+ debugArgs = ((_options$debugPort = options === null || options === void 0 ? void 0 : options.debugPort) !== null && _options$debugPort !== void 0 ? _options$debugPort : 0) > 0 ? "--inspect=".concat(options === null || options === void 0 ? void 0 : options.debugPort) : "";
89
+ pattern = (_options$pattern = options === null || options === void 0 ? void 0 : options.pattern) !== null && _options$pattern !== void 0 ? _options$pattern : '';
90
+ escapeShell = function escapeShell(cmd) {
91
+ return '--testPathPattern="' + cmd.replace(/(["\s'$`\\])/g, '\\$1') + '"';
92
+ };
93
+ command = "node --unhandled-rejections=strict ".concat(debugArgs, " ").concat(jestPath, " --reporters=\"@sprucelabs/jest-json-reporter\" --testRunner=\"jest-circus/runner\" --passWithNoTests ").concat(pattern ? escapeShell(pattern) : '');
94
+ parser = new _JestJsonParser["default"]();
95
+ this.testResults = {
96
+ totalTestFiles: 0
97
+ };
98
+ _context3.prev = 8;
99
+ _context3.next = 11;
100
+ return this.commandService.execute(command, {
101
+ forceColor: true,
102
+ onError: function () {
103
+ var _onError = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(data) {
104
+ var isDebugMessaging;
105
+ return _regenerator["default"].wrap(function _callee$(_context) {
106
+ while (1) switch (_context.prev = _context.next) {
107
+ case 0:
108
+ isDebugMessaging = _this2.isDebugMessage(data);
109
+ if (isDebugMessaging) {
110
+ _context.next = 4;
111
+ break;
122
112
  }
123
- }
124
- }, _callee);
125
- }));
126
- function onError(_x2) {
127
- return _onError.apply(this, arguments);
128
- }
129
- return onError;
130
- }(),
131
- onData: function () {
132
- var _onData = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(data) {
133
- return _regenerator["default"].wrap(function _callee2$(_context2) {
134
- while (1) {
135
- switch (_context2.prev = _context2.next) {
136
- case 0:
137
- parser.write(data);
138
- _this2.testResults = parser.getResults();
139
- _context2.next = 4;
140
- return _this2.emit('did-update', {
141
- results: _this2.testResults
142
- });
143
- case 4:
144
- case "end":
145
- return _context2.stop();
146
- }
147
- }
148
- }, _callee2);
149
- }));
150
- function onData(_x3) {
151
- return _onData.apply(this, arguments);
152
- }
153
- return onData;
154
- }()
155
- });
156
- case 11:
113
+ _context.next = 4;
114
+ return _this2.emit('did-error', {
115
+ message: data
116
+ });
117
+ case 4:
118
+ case "end":
119
+ return _context.stop();
120
+ }
121
+ }, _callee);
122
+ }));
123
+ function onError(_x2) {
124
+ return _onError.apply(this, arguments);
125
+ }
126
+ return onError;
127
+ }(),
128
+ onData: function () {
129
+ var _onData = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(data) {
130
+ return _regenerator["default"].wrap(function _callee2$(_context2) {
131
+ while (1) switch (_context2.prev = _context2.next) {
132
+ case 0:
133
+ parser.write(data);
134
+ _this2.testResults = parser.getResults();
135
+ _context2.next = 4;
136
+ return _this2.emit('did-update', {
137
+ results: _this2.testResults
138
+ });
139
+ case 4:
140
+ case "end":
141
+ return _context2.stop();
142
+ }
143
+ }, _callee2);
144
+ }));
145
+ function onData(_x3) {
146
+ return _onData.apply(this, arguments);
147
+ }
148
+ return onData;
149
+ }()
150
+ });
151
+ case 11:
152
+ _context3.next = 17;
153
+ break;
154
+ case 13:
155
+ _context3.prev = 13;
156
+ _context3.t0 = _context3["catch"](8);
157
+ if (this.testResults.totalTestFiles) {
157
158
  _context3.next = 17;
158
159
  break;
159
- case 13:
160
- _context3.prev = 13;
161
- _context3.t0 = _context3["catch"](8);
162
- if (this.testResults.totalTestFiles) {
163
- _context3.next = 17;
164
- break;
165
- }
166
- throw _context3.t0;
167
- case 17:
168
- return _context3.abrupt("return", _objectSpread(_objectSpread({}, this.testResults), {}, {
169
- wasKilled: this.wasKilled
170
- }));
171
- case 18:
172
- case "end":
173
- return _context3.stop();
174
- }
160
+ }
161
+ throw _context3.t0;
162
+ case 17:
163
+ return _context3.abrupt("return", _objectSpread(_objectSpread({}, this.testResults), {}, {
164
+ wasKilled: this.wasKilled
165
+ }));
166
+ case 18:
167
+ case "end":
168
+ return _context3.stop();
175
169
  }
176
170
  }, _callee3, this, [[8, 13]]);
177
171
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"TestRunner.js","names":["testRunnerContract","buildEventContract","eventSignatures","emitPayloadSchema","buildSchema","id","fields","message","type","isRequired","results","options","valueType","TestRunner","totalTestFiles","cwd","commandService","wasKilled","jestPath","resolvePathToJest","debugArgs","debugPort","pattern","escapeShell","cmd","replace","command","parser","JestJsonParser","testResults","execute","forceColor","onError","data","isDebugMessaging","isDebugMessage","emit","onData","write","getResults","search","totalFailed","totalSkipped","kill","fullPath","diskUtil","resolvePath","pathParts","split","pathUtil","sep","length","path","join","doesFileExist","pop","SpruceError","code","dir","AbstractEventEmitter"],"sources":["../../../src/features/test/TestRunner.ts"],"sourcesContent":["import pathUtil from 'path'\nimport { AbstractEventEmitter } from '@sprucelabs/mercury-event-emitter'\nimport {\n\tbuildEventContract,\n\tMercuryEventEmitter,\n} from '@sprucelabs/mercury-types'\nimport { buildSchema } from '@sprucelabs/schema'\nimport { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport SpruceError from '../../errors/SpruceError'\nimport CommandService from '../../services/CommandService'\nimport JestJsonParser from '../../tests/JestJsonParser'\nimport { SpruceTestResults } from './test.types'\n\nconst testRunnerContract = buildEventContract({\n\teventSignatures: {\n\t\t'did-error': {\n\t\t\temitPayloadSchema: buildSchema({\n\t\t\t\tid: 'testRunnerDidErrorEmitPayload',\n\t\t\t\tfields: {\n\t\t\t\t\tmessage: {\n\t\t\t\t\t\ttype: 'text',\n\t\t\t\t\t\tisRequired: true,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}),\n\t\t},\n\t\t'did-update': {\n\t\t\temitPayloadSchema: buildSchema({\n\t\t\t\tid: 'testRunnerDidUpdateEmitPayload',\n\t\t\t\tfields: {\n\t\t\t\t\tresults: {\n\t\t\t\t\t\ttype: 'raw',\n\t\t\t\t\t\tisRequired: true,\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tvalueType: 'SpruceTestResults',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}),\n\t\t},\n\t},\n})\ntype TestRunnerContract = typeof testRunnerContract\n\nexport default class TestRunner extends AbstractEventEmitter<TestRunnerContract> {\n\tprivate cwd: string\n\tprivate commandService: CommandService\n\tprivate wasKilled = false\n\tprivate testResults: SpruceTestResults = { totalTestFiles: 0 }\n\n\tpublic constructor(options: { cwd: string; commandService: CommandService }) {\n\t\tsuper(testRunnerContract)\n\t\tthis.cwd = options.cwd\n\t\tthis.commandService = options.commandService\n\t}\n\n\tpublic async run(options?: {\n\t\tpattern?: string | null\n\t\tdebugPort?: number | null\n\t}): Promise<SpruceTestResults & { wasKilled: boolean }> {\n\t\tthis.wasKilled = false\n\n\t\tconst jestPath = this.resolvePathToJest()\n\t\tconst debugArgs =\n\t\t\t(options?.debugPort ?? 0) > 0 ? `--inspect=${options?.debugPort}` : ``\n\t\tconst pattern = options?.pattern ?? ''\n\t\tlet escapeShell = function (cmd: string) {\n\t\t\treturn '--testPathPattern=\"' + cmd.replace(/([\"\\s'$`\\\\])/g, '\\\\$1') + '\"'\n\t\t}\n\t\tconst command = `node --unhandled-rejections=strict ${debugArgs} ${jestPath} --reporters=\"@sprucelabs/jest-json-reporter\" --testRunner=\"jest-circus/runner\" --passWithNoTests ${\n\t\t\tpattern ? escapeShell(pattern) : ''\n\t\t}`\n\n\t\tconst parser = new JestJsonParser()\n\n\t\tthis.testResults = {\n\t\t\ttotalTestFiles: 0,\n\t\t}\n\n\t\ttry {\n\t\t\tawait this.commandService.execute(command, {\n\t\t\t\tforceColor: true,\n\t\t\t\tonError: async (data) => {\n\t\t\t\t\tconst isDebugMessaging = this.isDebugMessage(data)\n\n\t\t\t\t\tif (!isDebugMessaging) {\n\t\t\t\t\t\tawait (this as MercuryEventEmitter<TestRunnerContract>).emit(\n\t\t\t\t\t\t\t'did-error',\n\t\t\t\t\t\t\t{ message: data }\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tonData: async (data) => {\n\t\t\t\t\tparser.write(data)\n\t\t\t\t\tthis.testResults = parser.getResults()\n\t\t\t\t\tawait (this as MercuryEventEmitter<TestRunnerContract>).emit(\n\t\t\t\t\t\t'did-update',\n\t\t\t\t\t\t{ results: this.testResults }\n\t\t\t\t\t)\n\t\t\t\t},\n\t\t\t})\n\t\t} catch (err) {\n\t\t\tif (!this.testResults.totalTestFiles) {\n\t\t\t\tthrow err\n\t\t\t}\n\t\t}\n\n\t\treturn { ...this.testResults, wasKilled: this.wasKilled }\n\t}\n\n\tprivate isDebugMessage(data: string) {\n\t\treturn (\n\t\t\tdata.search(/^ attached/i) === 0 ||\n\t\t\tdata.search(/^ listening/i) === 0 ||\n\t\t\tdata.search(/^waiting for the /i) === 0\n\t\t)\n\t}\n\n\tpublic hasFailedTests() {\n\t\treturn (this.testResults.totalFailed ?? 0) > 0\n\t}\n\n\tpublic hasSkippedTests() {\n\t\treturn (this.testResults.totalSkipped ?? 0) > 0\n\t}\n\n\tpublic kill() {\n\t\tthis.wasKilled = true\n\t\tthis.commandService.kill()\n\t}\n\n\tprivate resolvePathToJest() {\n\t\tconst jestPath = 'node_modules/.bin/jest'\n\t\tconst fullPath = diskUtil.resolvePath(this.cwd)\n\t\tconst pathParts = fullPath.split(pathUtil.sep)\n\n\t\twhile (pathParts.length > 0) {\n\t\t\tconst path =\n\t\t\t\tpathUtil.sep + pathUtil.join(...pathParts) + pathUtil.sep + jestPath\n\n\t\t\tif (diskUtil.doesFileExist(path)) {\n\t\t\t\treturn path\n\t\t\t}\n\n\t\t\tpathParts.pop()\n\t\t}\n\n\t\tthrow new SpruceError({ code: 'INVALID_TEST_DIRECTORY', dir: this.cwd })\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AAIA;AACA;AACA;AAEA;AAAuD;AAAA;AAAA;AAAA;AAGvD,IAAMA,kBAAkB,GAAG,IAAAC,gCAAkB,EAAC;EAC7CC,eAAe,EAAE;IAChB,WAAW,EAAE;MACZC,iBAAiB,EAAE,IAAAC,mBAAW,EAAC;QAC9BC,EAAE,EAAE,+BAA+B;QACnCC,MAAM,EAAE;UACPC,OAAO,EAAE;YACRC,IAAI,EAAE,MAAM;YACZC,UAAU,EAAE;UACb;QACD;MACD,CAAC;IACF,CAAC;IACD,YAAY,EAAE;MACbN,iBAAiB,EAAE,IAAAC,mBAAW,EAAC;QAC9BC,EAAE,EAAE,gCAAgC;QACpCC,MAAM,EAAE;UACPI,OAAO,EAAE;YACRF,IAAI,EAAE,KAAK;YACXC,UAAU,EAAE,IAAI;YAChBE,OAAO,EAAE;cACRC,SAAS,EAAE;YACZ;UACD;QACD;MACD,CAAC;IACF;EACD;AACD,CAAC,CAAC;AAAA,IAGmBC,UAAU;EAAA;EAAA;EAM9B,oBAAmBF,OAAwD,EAAE;IAAA;IAAA;IAC5E,0BAAMX,kBAAkB;IAA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C/C;EAAC;IAAA;IAAA,OAED,2BAAyB;MAAA;MACxB,OAAO,2BAAC,IAAI,CAACZ,WAAW,CAACa,YAAY,2EAAI,CAAC,IAAI,CAAC;IAChD;EAAC;IAAA;IAAA,OAED,gBAAc;MACb,IAAI,CAACzB,SAAS,GAAG,IAAI;MACrB,IAAI,CAACD,cAAc,CAAC2B,IAAI,EAAE;IAC3B;EAAC;IAAA;IAAA,OAED,6BAA4B;MAC3B,IAAMzB,QAAQ,GAAG,wBAAwB;MACzC,IAAM0B,QAAQ,GAAGC,0BAAQ,CAACC,WAAW,CAAC,IAAI,CAAC/B,GAAG,CAAC;MAC/C,IAAMgC,SAAS,GAAGH,QAAQ,CAACI,KAAK,CAACC,gBAAQ,CAACC,GAAG,CAAC;MAE9C,OAAOH,SAAS,CAACI,MAAM,GAAG,CAAC,EAAE;QAC5B,IAAMC,IAAI,GACTH,gBAAQ,CAACC,GAAG,GAAGD,gBAAQ,CAACI,IAAI,OAAbJ,gBAAQ,sCAASF,SAAS,EAAC,GAAGE,gBAAQ,CAACC,GAAG,GAAGhC,QAAQ;QAErE,IAAI2B,0BAAQ,CAACS,aAAa,CAACF,IAAI,CAAC,EAAE;UACjC,OAAOA,IAAI;QACZ;QAEAL,SAAS,CAACQ,GAAG,EAAE;MAChB;MAEA,MAAM,IAAIC,uBAAW,CAAC;QAAEC,IAAI,EAAE,wBAAwB;QAAEC,GAAG,EAAE,IAAI,CAAC3C;MAAI,CAAC,CAAC;IACzE;EAAC;EAAA;AAAA,EAxGsC4C,yCAAoB;AAAA"}
1
+ {"version":3,"file":"TestRunner.js","names":["_path","_interopRequireDefault","require","_mercuryEventEmitter","_mercuryTypes","_schema","_spruceSkillUtils","_SpruceError","_JestJsonParser","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","testRunnerContract","buildEventContract","eventSignatures","emitPayloadSchema","buildSchema","id","fields","message","type","isRequired","results","options","valueType","TestRunner","_AbstractEventEmitter","_inherits2","_super","_this","_classCallCheck2","_assertThisInitialized2","totalTestFiles","cwd","commandService","_createClass2","value","_run","_asyncToGenerator2","_regenerator","mark","_callee3","_options$debugPort","_options$pattern","_this2","jestPath","debugArgs","pattern","escapeShell","command","parser","wrap","_callee3$","_context3","prev","next","wasKilled","resolvePathToJest","debugPort","concat","cmd","replace","JestJsonParser","testResults","execute","forceColor","onError","_onError","_callee","data","isDebugMessaging","_callee$","_context","isDebugMessage","emit","stop","_x2","onData","_onData","_callee2","_callee2$","_context2","write","getResults","_x3","t0","abrupt","run","_x","search","hasFailedTests","_this$testResults$tot","totalFailed","hasSkippedTests","_this$testResults$tot2","totalSkipped","kill","fullPath","diskUtil","resolvePath","pathParts","split","pathUtil","sep","path","join","_toConsumableArray2","doesFileExist","pop","SpruceError","code","dir","AbstractEventEmitter","exports"],"sources":["../../../src/features/test/TestRunner.ts"],"sourcesContent":["import pathUtil from 'path'\nimport { AbstractEventEmitter } from '@sprucelabs/mercury-event-emitter'\nimport {\n\tbuildEventContract,\n\tMercuryEventEmitter,\n} from '@sprucelabs/mercury-types'\nimport { buildSchema } from '@sprucelabs/schema'\nimport { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport SpruceError from '../../errors/SpruceError'\nimport CommandService from '../../services/CommandService'\nimport JestJsonParser from '../../tests/JestJsonParser'\nimport { SpruceTestResults } from './test.types'\n\nconst testRunnerContract = buildEventContract({\n\teventSignatures: {\n\t\t'did-error': {\n\t\t\temitPayloadSchema: buildSchema({\n\t\t\t\tid: 'testRunnerDidErrorEmitPayload',\n\t\t\t\tfields: {\n\t\t\t\t\tmessage: {\n\t\t\t\t\t\ttype: 'text',\n\t\t\t\t\t\tisRequired: true,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}),\n\t\t},\n\t\t'did-update': {\n\t\t\temitPayloadSchema: buildSchema({\n\t\t\t\tid: 'testRunnerDidUpdateEmitPayload',\n\t\t\t\tfields: {\n\t\t\t\t\tresults: {\n\t\t\t\t\t\ttype: 'raw',\n\t\t\t\t\t\tisRequired: true,\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tvalueType: 'SpruceTestResults',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}),\n\t\t},\n\t},\n})\ntype TestRunnerContract = typeof testRunnerContract\n\nexport default class TestRunner extends AbstractEventEmitter<TestRunnerContract> {\n\tprivate cwd: string\n\tprivate commandService: CommandService\n\tprivate wasKilled = false\n\tprivate testResults: SpruceTestResults = { totalTestFiles: 0 }\n\n\tpublic constructor(options: { cwd: string; commandService: CommandService }) {\n\t\tsuper(testRunnerContract)\n\t\tthis.cwd = options.cwd\n\t\tthis.commandService = options.commandService\n\t}\n\n\tpublic async run(options?: {\n\t\tpattern?: string | null\n\t\tdebugPort?: number | null\n\t}): Promise<SpruceTestResults & { wasKilled: boolean }> {\n\t\tthis.wasKilled = false\n\n\t\tconst jestPath = this.resolvePathToJest()\n\t\tconst debugArgs =\n\t\t\t(options?.debugPort ?? 0) > 0 ? `--inspect=${options?.debugPort}` : ``\n\t\tconst pattern = options?.pattern ?? ''\n\t\tlet escapeShell = function (cmd: string) {\n\t\t\treturn '--testPathPattern=\"' + cmd.replace(/([\"\\s'$`\\\\])/g, '\\\\$1') + '\"'\n\t\t}\n\t\tconst command = `node --unhandled-rejections=strict ${debugArgs} ${jestPath} --reporters=\"@sprucelabs/jest-json-reporter\" --testRunner=\"jest-circus/runner\" --passWithNoTests ${\n\t\t\tpattern ? escapeShell(pattern) : ''\n\t\t}`\n\n\t\tconst parser = new JestJsonParser()\n\n\t\tthis.testResults = {\n\t\t\ttotalTestFiles: 0,\n\t\t}\n\n\t\ttry {\n\t\t\tawait this.commandService.execute(command, {\n\t\t\t\tforceColor: true,\n\t\t\t\tonError: async (data) => {\n\t\t\t\t\tconst isDebugMessaging = this.isDebugMessage(data)\n\n\t\t\t\t\tif (!isDebugMessaging) {\n\t\t\t\t\t\tawait (this as MercuryEventEmitter<TestRunnerContract>).emit(\n\t\t\t\t\t\t\t'did-error',\n\t\t\t\t\t\t\t{ message: data }\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tonData: async (data) => {\n\t\t\t\t\tparser.write(data)\n\t\t\t\t\tthis.testResults = parser.getResults()\n\t\t\t\t\tawait (this as MercuryEventEmitter<TestRunnerContract>).emit(\n\t\t\t\t\t\t'did-update',\n\t\t\t\t\t\t{ results: this.testResults }\n\t\t\t\t\t)\n\t\t\t\t},\n\t\t\t})\n\t\t} catch (err) {\n\t\t\tif (!this.testResults.totalTestFiles) {\n\t\t\t\tthrow err\n\t\t\t}\n\t\t}\n\n\t\treturn { ...this.testResults, wasKilled: this.wasKilled }\n\t}\n\n\tprivate isDebugMessage(data: string) {\n\t\treturn (\n\t\t\tdata.search(/^ attached/i) === 0 ||\n\t\t\tdata.search(/^ listening/i) === 0 ||\n\t\t\tdata.search(/^waiting for the /i) === 0\n\t\t)\n\t}\n\n\tpublic hasFailedTests() {\n\t\treturn (this.testResults.totalFailed ?? 0) > 0\n\t}\n\n\tpublic hasSkippedTests() {\n\t\treturn (this.testResults.totalSkipped ?? 0) > 0\n\t}\n\n\tpublic kill() {\n\t\tthis.wasKilled = true\n\t\tthis.commandService.kill()\n\t}\n\n\tprivate resolvePathToJest() {\n\t\tconst jestPath = 'node_modules/.bin/jest'\n\t\tconst fullPath = diskUtil.resolvePath(this.cwd)\n\t\tconst pathParts = fullPath.split(pathUtil.sep)\n\n\t\twhile (pathParts.length > 0) {\n\t\t\tconst path =\n\t\t\t\tpathUtil.sep + pathUtil.join(...pathParts) + pathU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