@sprucelabs/spruce-cli 19.1.41 → 19.2.0

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 (602) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/build/.spruce/errors/errors.types.d.ts +19 -0
  3. package/build/.spruce/errors/errors.types.js.map +1 -1
  4. package/build/.spruce/errors/options.types.d.ts +4 -1
  5. package/build/.spruce/errors/options.types.js.map +1 -1
  6. package/build/.spruce/errors/spruceCli/actionCancelled.schema.js.map +1 -1
  7. package/build/.spruce/errors/spruceCli/bootError.schema.js.map +1 -1
  8. package/build/.spruce/errors/spruceCli/buildFailed.schema.js.map +1 -1
  9. package/build/.spruce/errors/spruceCli/cacheNotEnabled.schema.js.map +1 -1
  10. package/build/.spruce/errors/spruceCli/commandAborted.schema.js.map +1 -1
  11. package/build/.spruce/errors/spruceCli/commandBlocked.schema.js.map +1 -1
  12. package/build/.spruce/errors/spruceCli/commandNotImplemented.schema.js.map +1 -1
  13. package/build/.spruce/errors/spruceCli/createAutoloaderFailed.schema.js.map +1 -1
  14. package/build/.spruce/errors/spruceCli/dependencyExists.schema.js.map +1 -1
  15. package/build/.spruce/errors/spruceCli/deployFailed.schema.js.map +1 -1
  16. package/build/.spruce/errors/spruceCli/directoryEmpty.schema.js.map +1 -1
  17. package/build/.spruce/errors/spruceCli/directoryNotSkill.schema.js.map +1 -1
  18. package/build/.spruce/errors/spruceCli/dockerNotStarted.schema.js.map +1 -1
  19. package/build/.spruce/errors/spruceCli/executingCommandFailed.schema.js.map +1 -1
  20. package/build/.spruce/errors/spruceCli/failedToImport.schema.js.map +1 -1
  21. package/build/.spruce/errors/spruceCli/featureNotInstalled.schema.js.map +1 -1
  22. package/build/.spruce/errors/spruceCli/fileExists.schema.js.map +1 -1
  23. package/build/.spruce/errors/spruceCli/generic.schema.js.map +1 -1
  24. package/build/.spruce/errors/spruceCli/invalidCommand.schema.js.map +1 -1
  25. package/build/.spruce/errors/spruceCli/invalidEventContract.schema.js.map +1 -1
  26. package/build/.spruce/errors/spruceCli/invalidFeatureCode.schema.js.map +1 -1
  27. package/build/.spruce/errors/spruceCli/invalidTestDirectory.schema.js.map +1 -1
  28. package/build/.spruce/errors/spruceCli/lintFailed.schema.js.map +1 -1
  29. package/build/.spruce/errors/spruceCli/mercuryResponseError.schema.js.map +1 -1
  30. package/build/.spruce/errors/spruceCli/missingDependencies.schema.js.map +1 -1
  31. package/build/.spruce/errors/spruceCli/missingDependenciesDependency.schema.js.map +1 -1
  32. package/build/.spruce/errors/spruceCli/noOrganizationsFound.schema.js.map +1 -1
  33. package/build/.spruce/errors/spruceCli/noSkillsRegistered.schema.js.map +1 -1
  34. package/build/.spruce/errors/spruceCli/notImplemented.schema.js.map +1 -1
  35. package/build/.spruce/errors/spruceCli/notLoggedIn.schema.js.map +1 -1
  36. package/build/.spruce/errors/spruceCli/schemaExists.schema.js.map +1 -1
  37. package/build/.spruce/errors/spruceCli/schemaFailedToImport.schema.js.map +1 -1
  38. package/build/.spruce/errors/spruceCli/schemaTemplateItemBuildingFailed.schema.js.map +1 -1
  39. package/build/.spruce/errors/spruceCli/skillNotFound.schema.js.map +1 -1
  40. package/build/.spruce/errors/spruceCli/skillNotRegistered.schema.js.map +1 -1
  41. package/build/.spruce/errors/spruceCli/skillViewExists.schema.js.map +1 -1
  42. package/build/.spruce/errors/spruceCli/storeExists.schema.js.map +1 -1
  43. package/build/.spruce/errors/spruceCli/testFailed.schema.js.map +1 -1
  44. package/build/.spruce/errors/spruceCli/themeExists.schema.js.map +1 -1
  45. package/build/.spruce/errors/spruceCli/transportAlreadyExists.schema.js.map +1 -1
  46. package/build/.spruce/errors/spruceCli/viewPluginAlreadyExists.schema.d.ts +3 -0
  47. package/build/.spruce/errors/spruceCli/viewPluginAlreadyExists.schema.js +23 -0
  48. package/build/.spruce/errors/spruceCli/viewPluginAlreadyExists.schema.js.map +1 -0
  49. package/build/.spruce/errors/spruceCli/vscodeNotInstalled.schema.js.map +1 -1
  50. package/build/.spruce/events/events.contract.js.map +1 -1
  51. package/build/.spruce/events/heartwood/didRegisterSkillViews.v2021_02_11.contract.js.map +1 -1
  52. package/build/.spruce/events/heartwood/generateUrl.v2021_02_11.contract.js.map +1 -1
  53. package/build/.spruce/events/heartwood/getActiveTheme.v2021_02_11.contract.js.map +1 -1
  54. package/build/.spruce/events/heartwood/getSkillViews.v2021_02_11.contract.js.map +1 -1
  55. package/build/.spruce/events/heartwood/listViews.v2021_02_11.contract.js.map +1 -1
  56. package/build/.spruce/events/heartwood/registerDashboardCards.v2021_02_11.contract.js.map +1 -1
  57. package/build/.spruce/events/heartwood/registerSkillViews.v2021_02_11.contract.js.map +1 -1
  58. package/build/.spruce/events/heartwood/upsertTheme.v2021_02_11.contract.js.map +1 -1
  59. package/build/.spruce/events/spruceCli/registerSkillViews.v2021_04_11.contract.js.map +1 -1
  60. package/build/.spruce/schemas/fields/fieldClassMap.js.map +1 -1
  61. package/build/.spruce/schemas/fields/fields.types.js.map +1 -1
  62. package/build/.spruce/schemas/heartwood/v2021_02_11/didRegisterSkillViewsEmitPayload.schema.js.map +1 -1
  63. package/build/.spruce/schemas/heartwood/v2021_02_11/didRegisterSkillViewsEmitTarget.schema.js.map +1 -1
  64. package/build/.spruce/schemas/heartwood/v2021_02_11/didRegisterSkillViewsEmitTargetAndPayload.schema.js.map +1 -1
  65. package/build/.spruce/schemas/heartwood/v2021_02_11/generateUrlEmitPayload.schema.js.map +1 -1
  66. package/build/.spruce/schemas/heartwood/v2021_02_11/generateUrlEmitTarget.schema.js.map +1 -1
  67. package/build/.spruce/schemas/heartwood/v2021_02_11/generateUrlEmitTargetAndPayload.schema.js.map +1 -1
  68. package/build/.spruce/schemas/heartwood/v2021_02_11/generateUrlResponsePayload.schema.js.map +1 -1
  69. package/build/.spruce/schemas/heartwood/v2021_02_11/getActiveThemeEmitTarget.schema.js.map +1 -1
  70. package/build/.spruce/schemas/heartwood/v2021_02_11/getActiveThemeEmitTargetAndPayload.schema.js.map +1 -1
  71. package/build/.spruce/schemas/heartwood/v2021_02_11/getActiveThemeResponsePayload.schema.js.map +1 -1
  72. package/build/.spruce/schemas/heartwood/v2021_02_11/getSkillViewsEmitTargetAndPayload.schema.js.map +1 -1
  73. package/build/.spruce/schemas/heartwood/v2021_02_11/getSkillViewsResponsePayload.schema.js.map +1 -1
  74. package/build/.spruce/schemas/heartwood/v2021_02_11/getViewControllersEmitTarget.schema.js.map +1 -1
  75. package/build/.spruce/schemas/heartwood/v2021_02_11/listViewsResponsePayload.schema.js.map +1 -1
  76. package/build/.spruce/schemas/heartwood/v2021_02_11/listViewsResult.schema.js.map +1 -1
  77. package/build/.spruce/schemas/heartwood/v2021_02_11/registerDashboardCardsResponsePayload.schema.js.map +1 -1
  78. package/build/.spruce/schemas/heartwood/v2021_02_11/registerSkillViewsEmitPayload.schema.js.map +1 -1
  79. package/build/.spruce/schemas/heartwood/v2021_02_11/registerSkillViewsEmitTargetAndPayload.schema.js.map +1 -1
  80. package/build/.spruce/schemas/heartwood/v2021_02_11/registerSkillViewsResponsePayload.schema.js.map +1 -1
  81. package/build/.spruce/schemas/heartwood/v2021_02_11/theme.schema.js.map +1 -1
  82. package/build/.spruce/schemas/heartwood/v2021_02_11/upsertThemeEmitPayload.schema.js.map +1 -1
  83. package/build/.spruce/schemas/heartwood/v2021_02_11/upsertThemeEmitTarget.schema.js.map +1 -1
  84. package/build/.spruce/schemas/heartwood/v2021_02_11/upsertThemeEmitTargetAndPayload.schema.js.map +1 -1
  85. package/build/.spruce/schemas/heartwood/v2021_02_11/upsertThemeResponsePayload.schema.js.map +1 -1
  86. package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/theme.schema.js.map +1 -1
  87. package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/themeProps.schema.js.map +1 -1
  88. package/build/.spruce/schemas/schemas.types.js.map +1 -1
  89. package/build/.spruce/schemas/spruce/v2020_07_22/choice.schema.js.map +1 -1
  90. package/build/.spruce/schemas/spruce/v2020_07_22/link.schema.js.map +1 -1
  91. package/build/.spruce/schemas/spruce/v2020_07_22/location.schema.js.map +1 -1
  92. package/build/.spruce/schemas/spruce/v2020_07_22/message.schema.js.map +1 -1
  93. package/build/.spruce/schemas/spruce/v2020_07_22/messageSource.schema.js.map +1 -1
  94. package/build/.spruce/schemas/spruce/v2020_07_22/messageTarget.schema.js.map +1 -1
  95. package/build/.spruce/schemas/spruce/v2020_07_22/organization.schema.js.map +1 -1
  96. package/build/.spruce/schemas/spruce/v2020_07_22/person.schema.js.map +1 -1
  97. package/build/.spruce/schemas/spruce/v2020_07_22/personLocation.schema.js.map +1 -1
  98. package/build/.spruce/schemas/spruce/v2020_07_22/personOrganization.schema.js.map +1 -1
  99. package/build/.spruce/schemas/spruce/v2020_07_22/role.schema.js.map +1 -1
  100. package/build/.spruce/schemas/spruce/v2020_07_22/sendMessage.schema.js.map +1 -1
  101. package/build/.spruce/schemas/spruce/v2020_07_22/skill.schema.js.map +1 -1
  102. package/build/.spruce/schemas/spruce/v2020_07_22/skillCreator.schema.js.map +1 -1
  103. package/build/.spruce/schemas/spruceCli/v2020_07_22/actionResponse.schema.js.map +1 -1
  104. package/build/.spruce/schemas/spruceCli/v2020_07_22/bootSkillOptions.schema.js.map +1 -1
  105. package/build/.spruce/schemas/spruceCli/v2020_07_22/createConversationTopicOptions.schema.js.map +1 -1
  106. package/build/.spruce/schemas/spruceCli/v2020_07_22/createErrorOptions.schema.js.map +1 -1
  107. package/build/.spruce/schemas/spruceCli/v2020_07_22/createOrganizationOptions.schema.js.map +1 -1
  108. package/build/.spruce/schemas/spruceCli/v2020_07_22/createSchemaOptions.schema.js.map +1 -1
  109. package/build/.spruce/schemas/spruceCli/v2020_07_22/createTestOptions.schema.js.map +1 -1
  110. package/build/.spruce/schemas/spruceCli/v2020_07_22/generatedDir.schema.js.map +1 -1
  111. package/build/.spruce/schemas/spruceCli/v2020_07_22/generatedFile.schema.js.map +1 -1
  112. package/build/.spruce/schemas/spruceCli/v2020_07_22/installSkillAtOrganizationOptions.schema.js.map +1 -1
  113. package/build/.spruce/schemas/spruceCli/v2020_07_22/listenEventOptions.schema.js.map +1 -1
  114. package/build/.spruce/schemas/spruceCli/v2020_07_22/namedTemplateItem.schema.js.map +1 -1
  115. package/build/.spruce/schemas/spruceCli/v2020_07_22/nodeFeatureOptions.schema.js.map +1 -1
  116. package/build/.spruce/schemas/spruceCli/v2020_07_22/npmPackage.schema.js.map +1 -1
  117. package/build/.spruce/schemas/spruceCli/v2020_07_22/onboardOptions.schema.js.map +1 -1
  118. package/build/.spruce/schemas/spruceCli/v2020_07_22/onboarding.schema.js.map +1 -1
  119. package/build/.spruce/schemas/spruceCli/v2020_07_22/personWithToken.schema.js.map +1 -1
  120. package/build/.spruce/schemas/spruceCli/v2020_07_22/registerDashboardWidgetsEmitPayloadSchema.schema.js.map +1 -1
  121. package/build/.spruce/schemas/spruceCli/v2020_07_22/setupTestsOptions.schema.js.map +1 -1
  122. package/build/.spruce/schemas/spruceCli/v2020_07_22/setupVscodeOptions.schema.js.map +1 -1
  123. package/build/.spruce/schemas/spruceCli/v2020_07_22/skillFeature.schema.js.map +1 -1
  124. package/build/.spruce/schemas/spruceCli/v2020_07_22/syncErrorOptions.schema.js.map +1 -1
  125. package/build/.spruce/schemas/spruceCli/v2020_07_22/syncEventOptions.schema.js.map +1 -1
  126. package/build/.spruce/schemas/spruceCli/v2020_07_22/syncSchemaFieldsOptions.schema.js.map +1 -1
  127. package/build/.spruce/schemas/spruceCli/v2020_07_22/syncSchemasOptions.schema.js.map +1 -1
  128. package/build/.spruce/schemas/spruceCli/v2020_07_22/testOptions.schema.js.map +1 -1
  129. package/build/.spruce/schemas/spruceCli/v2020_07_22/upgradeSkillOptions.schema.js.map +1 -1
  130. package/build/.spruce/schemas/spruceCli/v2020_07_22/watcherDidDetectChangesEmitPayload.schema.js.map +1 -1
  131. package/build/.spruce/schemas/spruceEventUtils/v2021_09_13/eventSource.schema.js.map +1 -1
  132. package/build/.spruce/skill.types.js.map +1 -1
  133. package/build/GlobalEmitter.js.map +1 -1
  134. package/build/InFlightEntertainment.js.map +1 -1
  135. package/build/__tests__/behavioral/AddingADependency.test.js.map +1 -1
  136. package/build/__tests__/behavioral/BlockingCommands.test.js.map +1 -1
  137. package/build/__tests__/behavioral/BootingTheCli.test.js.map +1 -1
  138. package/build/__tests__/behavioral/BootingWithBadFiles.test.js.map +1 -1
  139. package/build/__tests__/behavioral/CreatingAConversationTopic.test.js.map +1 -1
  140. package/build/__tests__/behavioral/DeployingASkill.test.js.map +1 -1
  141. package/build/__tests__/behavioral/DeployingToSandbox.test.js.map +1 -1
  142. package/build/__tests__/behavioral/EnablingAndDisablingCache.test.js.map +1 -1
  143. package/build/__tests__/behavioral/GettingCliVersion.test.js.map +1 -1
  144. package/build/__tests__/behavioral/ManagingDependencies.test.js.map +1 -1
  145. package/build/__tests__/behavioral/OverridingCommandsInPackageJson.test.js.map +1 -1
  146. package/build/__tests__/behavioral/RegisteringConversationsOnBoot.test.js.map +1 -1
  147. package/build/__tests__/behavioral/RememberingUpgradeSelections.test.js.map +1 -1
  148. package/build/__tests__/behavioral/SettingLogTransportsInASkill.test.js.map +1 -1
  149. package/build/__tests__/behavioral/SettingRemote.test.js.map +1 -1
  150. package/build/__tests__/behavioral/SettingUpVscode.test.js.map +1 -1
  151. package/build/__tests__/behavioral/TestingAConversation.test.js.map +1 -1
  152. package/build/__tests__/behavioral/errors/CreatingANewErrorBuilder.test.js.map +1 -1
  153. package/build/__tests__/behavioral/errors/KeepingErrorClassInSync.test.js.map +1 -1
  154. package/build/__tests__/behavioral/errors/KeepingErrorsInSync.test.js.map +1 -1
  155. package/build/__tests__/behavioral/errors/SettingUpErrors.test.js.map +1 -1
  156. package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js.map +1 -1
  157. package/build/__tests__/behavioral/events/CreatingAListener.test.js.map +1 -1
  158. package/build/__tests__/behavioral/events/CreatingAnEvent.test.js.map +1 -1
  159. package/build/__tests__/behavioral/events/EventWriter.test.js.map +1 -1
  160. package/build/__tests__/behavioral/events/KeepingEventsInSync.test.js.map +1 -1
  161. package/build/__tests__/behavioral/events/KeepingEventsInSync2.test.js.map +1 -1
  162. package/build/__tests__/behavioral/events/KeepingListenersInSync.test.js.map +1 -1
  163. package/build/__tests__/behavioral/events/ListeningToAnEventYouCreate.test.js.map +1 -1
  164. package/build/__tests__/behavioral/events/ListeningToCoreEvents.test.js.map +1 -1
  165. package/build/__tests__/behavioral/events/RegisteringEventsOnBoot.test.js.map +1 -1
  166. package/build/__tests__/behavioral/events/RegisteringGlobalEvents.test.js.map +1 -1
  167. package/build/__tests__/behavioral/events/SettingUpEvents.test.js.map +1 -1
  168. package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.js.map +1 -1
  169. package/build/__tests__/behavioral/events/SyncingEventsOnlyFromDependencies.test.js.map +1 -1
  170. package/build/__tests__/behavioral/node/CreatingANodeModule.test.js.map +1 -1
  171. package/build/__tests__/behavioral/onboard/StartingOnboarding.test.js.map +1 -1
  172. package/build/__tests__/behavioral/organization/CreatingAnOrg.test.js.map +1 -1
  173. package/build/__tests__/behavioral/permissions/CreatingPermissions.test.js.map +1 -1
  174. package/build/__tests__/behavioral/permissions/PermissionPlugin.test.js.map +1 -1
  175. package/build/__tests__/behavioral/permissions/PermissionStore.test.js.map +1 -1
  176. package/build/__tests__/behavioral/permissions/PermissionWriter.test.js.map +1 -1
  177. package/build/__tests__/behavioral/permissions/SyncingPermissions.test.js.map +1 -1
  178. package/build/__tests__/behavioral/permissions/support/AbstractPermissionsTest.js.map +1 -1
  179. package/build/__tests__/behavioral/permissions/support/generateShortAlphaId.js.map +1 -1
  180. package/build/__tests__/behavioral/permissions/support/renderPermissionTestFile.js.map +1 -1
  181. package/build/__tests__/behavioral/permissions/support/sortPermissionContracts.js.map +1 -1
  182. package/build/__tests__/behavioral/person/LoggingInAsPerson.test.js.map +1 -1
  183. package/build/__tests__/behavioral/person/SeeWhoIsLoggedIn.test.js.map +1 -1
  184. package/build/__tests__/behavioral/polish/SettingUpPolish.test.js.map +1 -1
  185. package/build/__tests__/behavioral/schemas/CreatingANewSchemaBuilder.test.js.map +1 -1
  186. package/build/__tests__/behavioral/schemas/CreatingSchemasWithGenerics.test.js.map +1 -1
  187. package/build/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.js.map +1 -1
  188. package/build/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.js.map +1 -1
  189. package/build/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.js.map +1 -1
  190. package/build/__tests__/behavioral/schemas/ImportingSchemaImports.test.js.map +1 -1
  191. package/build/__tests__/behavioral/schemas/KeepingSchemasInSync.test.js.map +1 -1
  192. package/build/__tests__/behavioral/schemas/SettingUpSchemas.test.js.map +1 -1
  193. package/build/__tests__/behavioral/schemas/SettingUpSchemasForModuleDistribution.test.js.map +1 -1
  194. package/build/__tests__/behavioral/schemas/SyncingBadSchemasProvidesHelpfulErrorMessages.test.js.map +1 -1
  195. package/build/__tests__/behavioral/schemas/UsingSchemasInCli.test.js.map +1 -1
  196. package/build/__tests__/behavioral/skill/BootingASkill.test.js.map +1 -1
  197. package/build/__tests__/behavioral/skill/CreatingASkill.test.js.map +1 -1
  198. package/build/__tests__/behavioral/skill/InstallingASkillAtAnOrg.test.js.map +1 -1
  199. package/build/__tests__/behavioral/skill/LoggingInAsASkill.test.js.map +1 -1
  200. package/build/__tests__/behavioral/skill/RebuildingASkill.test.js.map +1 -1
  201. package/build/__tests__/behavioral/skill/RegisteringASkill.test.js.map +1 -1
  202. package/build/__tests__/behavioral/skill/SettingUpASkill.test.js.map +1 -1
  203. package/build/__tests__/behavioral/stores/CreatingADataStore.test.js.map +1 -1
  204. package/build/__tests__/behavioral/stores/KeepingDataStoresInSync.test.js.map +1 -1
  205. package/build/__tests__/behavioral/tests/CreatingATest.test.js.map +1 -1
  206. package/build/__tests__/behavioral/tests/RunningTests.test.js.map +1 -1
  207. package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js.map +1 -1
  208. package/build/__tests__/behavioral/tests/SettingUpASkillForTesting.test.js.map +1 -1
  209. package/build/__tests__/behavioral/tests/SettingUpTests.test.js.map +1 -1
  210. package/build/__tests__/behavioral/tests/TestReporterSettingsRemembered.test.js.map +1 -1
  211. package/build/__tests__/behavioral/tests/TestingDataStores.test.js.map +1 -1
  212. package/build/__tests__/behavioral/upgrading/UpdatingDependencies.test.js.map +1 -1
  213. package/build/__tests__/behavioral/upgrading/UpdatingDependencies2.test.js.map +1 -1
  214. package/build/__tests__/behavioral/upgrading/UpgradingANodeModule.test.js.map +1 -1
  215. package/build/__tests__/behavioral/upgrading/UpgradingASkill.test.js.map +1 -1
  216. package/build/__tests__/behavioral/upgrading/UpgradingASkill2.test.js.map +1 -1
  217. package/build/__tests__/behavioral/upgrading/UpgradingASkill3.test.js.map +1 -1
  218. package/build/__tests__/behavioral/upgrading/UpgradingASkill4.test.js.map +1 -1
  219. package/build/__tests__/behavioral/upgrading/UpgradingASkill5.test.js.map +1 -1
  220. package/build/__tests__/behavioral/upgrading/UpgradingWithListeners.test.js.map +1 -1
  221. package/build/__tests__/behavioral/upgrading/UpgradingWithSandboxFeatureInstalled.test.js.map +1 -1
  222. package/build/__tests__/behavioral/views/CreatingASkillView.test.d.ts +1 -1
  223. package/build/__tests__/behavioral/views/CreatingASkillView.test.js +6 -6
  224. package/build/__tests__/behavioral/views/CreatingASkillView.test.js.map +1 -1
  225. package/build/__tests__/behavioral/views/CreatingATheme.test.js.map +1 -1
  226. package/build/__tests__/behavioral/views/KeepingViewsInSync.test.d.ts +1 -1
  227. package/build/__tests__/behavioral/views/KeepingViewsInSync.test.js +6 -6
  228. package/build/__tests__/behavioral/views/KeepingViewsInSync.test.js.map +1 -1
  229. package/build/__tests__/behavioral/views/RegisteringSkillViewOnBoot.test.js.map +1 -1
  230. package/build/__tests__/behavioral/views/SettingUpViews.test.js.map +1 -1
  231. package/build/__tests__/behavioral/views/TestingViewControllers.test.js.map +1 -1
  232. package/build/__tests__/behavioral/views/WatchingSkillViews.test.js.map +1 -1
  233. package/build/__tests__/behavioral/views/plugins/CreatingAViewPlugin.test.d.ts +23 -0
  234. package/build/__tests__/behavioral/views/plugins/CreatingAViewPlugin.test.js +355 -0
  235. package/build/__tests__/behavioral/views/plugins/CreatingAViewPlugin.test.js.map +1 -0
  236. package/build/__tests__/behavioral/watchers/WatchingForChanges.test.js.map +1 -1
  237. package/build/__tests__/implementation/ActionExecuter.test.js.map +1 -1
  238. package/build/__tests__/implementation/ActionExecuter2.test.js.map +1 -1
  239. package/build/__tests__/implementation/ActionExecuter3.test.js.map +1 -1
  240. package/build/__tests__/implementation/ActionExecuter4.test.js.map +1 -1
  241. package/build/__tests__/implementation/ArgParser.test.js.map +1 -1
  242. package/build/__tests__/implementation/BuildService.test.js.map +1 -1
  243. package/build/__tests__/implementation/BulkImporting.test.js.map +1 -1
  244. package/build/__tests__/implementation/CachingImports.test.js.map +1 -1
  245. package/build/__tests__/implementation/CommandOptionBuilder.test.js.map +1 -1
  246. package/build/__tests__/implementation/CommanderCommandResultMapper.test.js.map +1 -1
  247. package/build/__tests__/implementation/DataStoreStore.test.js.map +1 -1
  248. package/build/__tests__/implementation/DeletingOrphanedSchemaDefinitions.test.js.map +1 -1
  249. package/build/__tests__/implementation/EventContractCleanerUtil.test.js.map +1 -1
  250. package/build/__tests__/implementation/EventStore.test.js.map +1 -1
  251. package/build/__tests__/implementation/EventTemplateItemBuilder.test.js.map +1 -1
  252. package/build/__tests__/implementation/FeatureCommandAttacher.test.js.map +1 -1
  253. package/build/__tests__/implementation/FeatureFixture.test.js.map +1 -1
  254. package/build/__tests__/implementation/FeatureInstaller.test.js.map +1 -1
  255. package/build/__tests__/implementation/FeaturesUtil.test.js.map +1 -1
  256. package/build/__tests__/implementation/FieldTemplateItemBuilder.test.js.map +1 -1
  257. package/build/__tests__/implementation/GlobalEmitter.test.js.map +1 -1
  258. package/build/__tests__/implementation/Introspection.test.js.map +1 -1
  259. package/build/__tests__/implementation/JestJsonParser.test.js.map +1 -1
  260. package/build/__tests__/implementation/LintService.test.js.map +1 -1
  261. package/build/__tests__/implementation/ListenerStore.test.js.map +1 -1
  262. package/build/__tests__/implementation/OnboardingScriptLoader.test.js.map +1 -1
  263. package/build/__tests__/implementation/OnboardingScriptPlayer.test.js.map +1 -1
  264. package/build/__tests__/implementation/OnboardingStore.test.js.map +1 -1
  265. package/build/__tests__/implementation/OrganizationStore.test.js.map +1 -1
  266. package/build/__tests__/implementation/ParentTestFinder.test.js.map +1 -1
  267. package/build/__tests__/implementation/PkgService.test.js.map +1 -1
  268. package/build/__tests__/implementation/SchemaStore.test.js.map +1 -1
  269. package/build/__tests__/implementation/SchemaTemplateItemBuilder.test.js.map +1 -1
  270. package/build/__tests__/implementation/SchemaValueTypeWriter.test.js.map +1 -1
  271. package/build/__tests__/implementation/ServiceFactory.test.js.map +1 -1
  272. package/build/__tests__/implementation/SettingUpANodeModule.test.js.map +1 -1
  273. package/build/__tests__/implementation/SkillStore.test.js.map +1 -1
  274. package/build/__tests__/implementation/StoreFeature.test.js.map +1 -1
  275. package/build/__tests__/implementation/TestReporter.test.js.map +1 -1
  276. package/build/__tests__/implementation/TestRunner.test.js.map +1 -1
  277. package/build/__tests__/implementation/ValueTypeMapping.test.js.map +1 -1
  278. package/build/__tests__/implementation/Widgets.test.js.map +1 -1
  279. package/build/__tests__/support/EventFaker.js.map +1 -1
  280. package/build/__tests__/support/onTestFileResult.js.map +1 -1
  281. package/build/__tests__/support/scripts/first.script.js.map +1 -1
  282. package/build/__tests__/support/scripts/second.script.js.map +1 -1
  283. package/build/__tests__/support/scripts/third.test.script.js.map +1 -1
  284. package/build/addons/filePrompt.addon.js.map +1 -1
  285. package/build/boot.js.map +1 -1
  286. package/build/cli/Cli.js.map +1 -1
  287. package/build/components/AbstractComponent.js.map +1 -1
  288. package/build/components/FormComponent.js.map +1 -1
  289. package/build/components/QuizComponent.js.map +1 -1
  290. package/build/constants.js.map +1 -1
  291. package/build/errors/SpruceError.js +3 -0
  292. package/build/errors/SpruceError.js.map +1 -1
  293. package/build/errors/actionCancelled.builder.js.map +1 -1
  294. package/build/errors/bootError.builder.js.map +1 -1
  295. package/build/errors/buildFailed.builder.js.map +1 -1
  296. package/build/errors/cacheNotEnabled.builder.js.map +1 -1
  297. package/build/errors/commandAborted.builder.js.map +1 -1
  298. package/build/errors/commandBlocked.builder.js.map +1 -1
  299. package/build/errors/commandNotImplemented.builder.js.map +1 -1
  300. package/build/errors/createAutoloaderFailed.builder.js.map +1 -1
  301. package/build/errors/dependencyExists.builder.js.map +1 -1
  302. package/build/errors/deployFailed.builder.js.map +1 -1
  303. package/build/errors/directoryEmpty.builder.js.map +1 -1
  304. package/build/errors/directoryNotSkill.builder.js.map +1 -1
  305. package/build/errors/dockerNotStarted.builder.js.map +1 -1
  306. package/build/errors/executingCommandFailed.builder.js.map +1 -1
  307. package/build/errors/failedToImport.builder.js.map +1 -1
  308. package/build/errors/featureNotInstalled.builder.js.map +1 -1
  309. package/build/errors/fileExists.builder.js.map +1 -1
  310. package/build/errors/generic.builder.js.map +1 -1
  311. package/build/errors/invalidCommand.builder.js.map +1 -1
  312. package/build/errors/invalidEventContract.builder.js.map +1 -1
  313. package/build/errors/invalidFeatureCode.builder.js.map +1 -1
  314. package/build/errors/invalidTestDirectory.builder.js.map +1 -1
  315. package/build/errors/lintFailed.builder.js.map +1 -1
  316. package/build/errors/mercuryResponseError.builder.js.map +1 -1
  317. package/build/errors/missingDependencies.builder.js.map +1 -1
  318. package/build/errors/noOrganizationsFound.builder.js.map +1 -1
  319. package/build/errors/noSkillsRegistered.builder.js.map +1 -1
  320. package/build/errors/notImplemented.builder.js.map +1 -1
  321. package/build/errors/notLoggedIn.builder.js.map +1 -1
  322. package/build/errors/schemaExists.builder.js.map +1 -1
  323. package/build/errors/schemaFailedToImport.builder.js.map +1 -1
  324. package/build/errors/schemaTemplateItemBuildingFailed.builder.js.map +1 -1
  325. package/build/errors/skillNotFound.builder.js.map +1 -1
  326. package/build/errors/skillNotRegistered.builder.js.map +1 -1
  327. package/build/errors/skillViewExists.builder.js.map +1 -1
  328. package/build/errors/storeExists.builder.js.map +1 -1
  329. package/build/errors/testFailed.builder.js.map +1 -1
  330. package/build/errors/themeExists.builder.js.map +1 -1
  331. package/build/errors/transportAlreadyExists.builder.js.map +1 -1
  332. package/build/errors/viewPluginAlreadyExists.builder.d.ts +11 -0
  333. package/build/errors/viewPluginAlreadyExists.builder.js +18 -0
  334. package/build/errors/viewPluginAlreadyExists.builder.js.map +1 -0
  335. package/build/errors/vscodeNotInstalled.builder.js.map +1 -1
  336. package/build/features/AbstractAction.js.map +1 -1
  337. package/build/features/AbstractFeature.js.map +1 -1
  338. package/build/features/ActionExecuter.js.map +1 -1
  339. package/build/features/ActionFactory.js.map +1 -1
  340. package/build/features/ActionQuestionAsker.js.map +1 -1
  341. package/build/features/FeatureCommandAttacher.js.map +1 -1
  342. package/build/features/FeatureInstaller.js.map +1 -1
  343. package/build/features/FeatureInstallerFactory.js.map +1 -1
  344. package/build/features/OverrideActionDecorator.js.map +1 -1
  345. package/build/features/cache/CacheFeature.js.map +1 -1
  346. package/build/features/cache/actions/DisableAction.js.map +1 -1
  347. package/build/features/cache/actions/EnableAction.js.map +1 -1
  348. package/build/features/cache/constants.js.map +1 -1
  349. package/build/features/conversation/ConversationFeature.js.map +1 -1
  350. package/build/features/conversation/actions/CreateAction.js.map +1 -1
  351. package/build/features/conversation/actions/TestAction.js.map +1 -1
  352. package/build/features/conversation/stores/ConversationStore.js.map +1 -1
  353. package/build/features/conversation/writers/ConversationWriter.js.map +1 -1
  354. package/build/features/dependencies/DependencyFeature.js.map +1 -1
  355. package/build/features/dependencies/actions/AddAction.js.map +1 -1
  356. package/build/features/dependencies/actions/ManageAction.js.map +1 -1
  357. package/build/features/deploy/DeployFeature.js.map +1 -1
  358. package/build/features/deploy/actions/HerokuAction.js.map +1 -1
  359. package/build/features/deploy/writers/DeployWriter.js.map +1 -1
  360. package/build/features/error/ErrorFeature.js.map +1 -1
  361. package/build/features/error/ParentTestFinder.js.map +1 -1
  362. package/build/features/error/actions/CreateAction.js.map +1 -1
  363. package/build/features/error/actions/SyncAction.js.map +1 -1
  364. package/build/features/error/writers/ErrorWriter.js.map +1 -1
  365. package/build/features/event/EventFeature.js.map +1 -1
  366. package/build/features/event/actions/CreateAction.js.map +1 -1
  367. package/build/features/event/actions/ListenAction.js.map +1 -1
  368. package/build/features/event/actions/SetRemoteAction.js.map +1 -1
  369. package/build/features/event/actions/SyncAction.js.map +1 -1
  370. package/build/features/event/actions/SyncListenersAction.js.map +1 -1
  371. package/build/features/event/builders/EventContractBuilder.js.map +1 -1
  372. package/build/features/event/builders/ListenerTemplateItemBuilder.js.map +1 -1
  373. package/build/features/event/services/EventSettingsService.js.map +1 -1
  374. package/build/features/event/services/RemoteService.js.map +1 -1
  375. package/build/features/event/stores/EventStore.js.map +1 -1
  376. package/build/features/event/stores/ListenerStore.js.map +1 -1
  377. package/build/features/event/writers/EventWriter.js.map +1 -1
  378. package/build/features/eventContract/EventContractFeature.js.map +1 -1
  379. package/build/features/eventContract/actions/PullAction.js.map +1 -1
  380. package/build/features/feature.utilities.js.map +1 -1
  381. package/build/features/features.types.js.map +1 -1
  382. package/build/features/log/LogFeature.js.map +1 -1
  383. package/build/features/log/actions/CreateTransportAction.js.map +1 -1
  384. package/build/features/log/writers/LogWriter.js.map +1 -1
  385. package/build/features/node/NodeFeature.js.map +1 -1
  386. package/build/features/node/actions/CreateAction.js.map +1 -1
  387. package/build/features/node/actions/UpdateDependenciesAction.js.map +1 -1
  388. package/build/features/node/actions/UpgradeAction.js.map +1 -1
  389. package/build/features/node/writers/NodeWriter.js.map +1 -1
  390. package/build/features/onboard/OnboardFeature.js.map +1 -1
  391. package/build/features/onboard/ScriptLoader.js.map +1 -1
  392. package/build/features/onboard/ScriptPlayer.js.map +1 -1
  393. package/build/features/onboard/actions/OnboardAction.js.map +1 -1
  394. package/build/features/onboard/scripts/onboarding.first.script.js.map +1 -1
  395. package/build/features/onboard/scripts/onboarding.immersive.script.js.map +1 -1
  396. package/build/features/onboard/scripts/onboarding.returning.script.js.map +1 -1
  397. package/build/features/onboard/scripts/onboarding.short.script.js.map +1 -1
  398. package/build/features/onboard/scripts/todo/todo.create.skill.script.js.map +1 -1
  399. package/build/features/onboard/scripts/todo/todo.test.script.js.map +1 -1
  400. package/build/features/onboard/scripts/wrongCommand.script.js.map +1 -1
  401. package/build/features/onboard/stores/OnboardingStore.js.map +1 -1
  402. package/build/features/organization/OrganizationFeature.js.map +1 -1
  403. package/build/features/organization/actions/CreateAction.js.map +1 -1
  404. package/build/features/organization/actions/InstallAction.js.map +1 -1
  405. package/build/features/organization/stores/OrganizationStore.js.map +1 -1
  406. package/build/features/permission/PermissionFeature.js.map +1 -1
  407. package/build/features/permission/actions/CreateAction.js.map +1 -1
  408. package/build/features/permission/actions/SyncAction.js.map +1 -1
  409. package/build/features/permission/stores/PermissionStore.js.map +1 -1
  410. package/build/features/permission/writers/PermissionWriter.js.map +1 -1
  411. package/build/features/person/PersonFeature.js.map +1 -1
  412. package/build/features/person/actions/LoginAction.js.map +1 -1
  413. package/build/features/person/actions/LogoutAction.js.map +1 -1
  414. package/build/features/person/actions/WhoamiAction.js.map +1 -1
  415. package/build/features/polish/PolishFeature.js.map +1 -1
  416. package/build/features/polish/actions/SetupAction.js.map +1 -1
  417. package/build/features/polish/writers/PolishWriter.js.map +1 -1
  418. package/build/features/sandbox/SandboxFeature.js.map +1 -1
  419. package/build/features/sandbox/actions/SetupAction.js.map +1 -1
  420. package/build/features/sandbox/writers/SandboxWriter.js.map +1 -1
  421. package/build/features/schema/SchemaFeature.js.map +1 -1
  422. package/build/features/schema/ValueTypeBuilder.js.map +1 -1
  423. package/build/features/schema/actions/CreateAction.js.map +1 -1
  424. package/build/features/schema/actions/SyncAction.js.map +1 -1
  425. package/build/features/schema/actions/SyncFieldsAction.js.map +1 -1
  426. package/build/features/schema/services/SchemaService.js.map +1 -1
  427. package/build/features/schema/stores/SchemaStore.js.map +1 -1
  428. package/build/features/schema/utilities/schema.utility.js.map +1 -1
  429. package/build/features/schema/utilities/schemaDisk.utility.js.map +1 -1
  430. package/build/features/schema/utilities/schemaGenerator.utility.js.map +1 -1
  431. package/build/features/schema/writers/SchemaWriter.js.map +1 -1
  432. package/build/features/skill/SkillFeature.js.map +1 -1
  433. package/build/features/skill/actions/BootAction.js.map +1 -1
  434. package/build/features/skill/actions/CreateAction.js.map +1 -1
  435. package/build/features/skill/actions/DashboardAction.js.map +1 -1
  436. package/build/features/skill/actions/LoginAction.js.map +1 -1
  437. package/build/features/skill/actions/RebuildAction.js.map +1 -1
  438. package/build/features/skill/actions/RegisterAction.js.map +1 -1
  439. package/build/features/skill/stores/SkillStore.js.map +1 -1
  440. package/build/features/skill/updaters/Updater.js.map +1 -1
  441. package/build/features/skill/writers/SkillWriter.js.map +1 -1
  442. package/build/features/store/StoreFeature.js.map +1 -1
  443. package/build/features/store/actions/CreateAction.js.map +1 -1
  444. package/build/features/store/actions/SyncAction.js.map +1 -1
  445. package/build/features/store/stores/StoreStore.js.map +1 -1
  446. package/build/features/store/templateItemBuilders/StoreTemplateItemBuilder.js.map +1 -1
  447. package/build/features/store/writers/StoreWriter.js.map +1 -1
  448. package/build/features/test/TestFeature.js.map +1 -1
  449. package/build/features/test/TestLogItemGenerator.js.map +1 -1
  450. package/build/features/test/TestReporter.js.map +1 -1
  451. package/build/features/test/TestRunner.js.map +1 -1
  452. package/build/features/test/actions/CreateAction.js.map +1 -1
  453. package/build/features/test/actions/SetupAction.js.map +1 -1
  454. package/build/features/test/actions/TestAction.js.map +1 -1
  455. package/build/features/test/test.types.js.map +1 -1
  456. package/build/features/test/writers/TestWriter.js.map +1 -1
  457. package/build/features/universalDevDependencies.js.map +1 -1
  458. package/build/features/universalFileDescriptions.js.map +1 -1
  459. package/build/features/universalScripts.js.map +1 -1
  460. package/build/features/validateAndNormalize.utility.js.map +1 -1
  461. package/build/features/view/ViewFeature.js.map +1 -1
  462. package/build/features/view/actions/CreateAction.d.ts +6 -6
  463. package/build/features/view/actions/CreateAction.js +59 -59
  464. package/build/features/view/actions/CreateAction.js.map +1 -1
  465. package/build/features/view/actions/CreatePluginAction.d.ts +56 -0
  466. package/build/features/view/actions/CreatePluginAction.js +95 -0
  467. package/build/features/view/actions/CreatePluginAction.js.map +1 -0
  468. package/build/features/view/actions/CreateThemeAction.js.map +1 -1
  469. package/build/features/view/actions/SyncAction.d.ts +6 -6
  470. package/build/features/view/actions/SyncAction.js +29 -15
  471. package/build/features/view/actions/SyncAction.js.map +1 -1
  472. package/build/features/view/actions/WatchAction.js.map +1 -1
  473. package/build/features/view/stores/ViewStore.js.map +1 -1
  474. package/build/features/view/writers/ViewWriter.d.ts +5 -0
  475. package/build/features/view/writers/ViewWriter.js +44 -7
  476. package/build/features/view/writers/ViewWriter.js.map +1 -1
  477. package/build/features/vscode/VsCodeFeature.js.map +1 -1
  478. package/build/features/vscode/actions/SetupAction.js.map +1 -1
  479. package/build/features/vscode/services/VsCodeService.js.map +1 -1
  480. package/build/features/vscode/writers/VsCodeWriter.js.map +1 -1
  481. package/build/features/watch/WatchFeature.js.map +1 -1
  482. package/build/index.js.map +1 -1
  483. package/build/interfaces/SpyInterface.js.map +1 -1
  484. package/build/interfaces/TerminalInterface.js.map +1 -1
  485. package/build/schemas/v2020_07_22/actionResponse.builder.js.map +1 -1
  486. package/build/schemas/v2020_07_22/bootSkillOptions.builder.js.map +1 -1
  487. package/build/schemas/v2020_07_22/createConversationTopicOptions.builder.js.map +1 -1
  488. package/build/schemas/v2020_07_22/createErrorOptions.builder.js.map +1 -1
  489. package/build/schemas/v2020_07_22/createOrganizationOptions.builder.js.map +1 -1
  490. package/build/schemas/v2020_07_22/createSchemaOptions.builder.js.map +1 -1
  491. package/build/schemas/v2020_07_22/createTestOptions.builder.js.map +1 -1
  492. package/build/schemas/v2020_07_22/generatedFile.builder.js.map +1 -1
  493. package/build/schemas/v2020_07_22/installSkillAtOrganizationOptions.builder.js.map +1 -1
  494. package/build/schemas/v2020_07_22/listenEventOptions.builder.js.map +1 -1
  495. package/build/schemas/v2020_07_22/namedTemplateItem.builder.js.map +1 -1
  496. package/build/schemas/v2020_07_22/nodeFeatureOptions.builder.js.map +1 -1
  497. package/build/schemas/v2020_07_22/onboardOptions.builder.js.map +1 -1
  498. package/build/schemas/v2020_07_22/onboarding.builder.js.map +1 -1
  499. package/build/schemas/v2020_07_22/personWithToken.builder.js.map +1 -1
  500. package/build/schemas/v2020_07_22/registerDashboardWidgetsEmitPayloadSchema.builder.js.map +1 -1
  501. package/build/schemas/v2020_07_22/setupTestsOptions.builder.js.map +1 -1
  502. package/build/schemas/v2020_07_22/setupVscodeOptions.builder.js.map +1 -1
  503. package/build/schemas/v2020_07_22/skillFeature.builder.js.map +1 -1
  504. package/build/schemas/v2020_07_22/syncErrorOptions.builder.js.map +1 -1
  505. package/build/schemas/v2020_07_22/syncEventOptions.builder.js.map +1 -1
  506. package/build/schemas/v2020_07_22/syncSchemaFieldsOptions.builder.js.map +1 -1
  507. package/build/schemas/v2020_07_22/syncSchemasOptions.builder.js.map +1 -1
  508. package/build/schemas/v2020_07_22/testOptions.builder.js.map +1 -1
  509. package/build/schemas/v2020_07_22/upgradeSkillOptions.builder.js.map +1 -1
  510. package/build/schemas/v2020_07_22/watcherDidDetectChangesEmitPayload.builder.js.map +1 -1
  511. package/build/services/BuildService.js.map +1 -1
  512. package/build/services/CommandService.js.map +1 -1
  513. package/build/services/DependencyService.js.map +1 -1
  514. package/build/services/GameService.js.map +1 -1
  515. package/build/services/ImportService.js.map +1 -1
  516. package/build/services/LintService.js.map +1 -1
  517. package/build/services/PkgService.js.map +1 -1
  518. package/build/services/ServiceFactory.js.map +1 -1
  519. package/build/services/TypeCheckerService.js.map +1 -1
  520. package/build/stores/AbstractLocalStore.js.map +1 -1
  521. package/build/stores/AbstractStore.js.map +1 -1
  522. package/build/stores/StoreFactory.js.map +1 -1
  523. package/build/templateItemBuilders/EventTemplateItemBuilder.js.map +1 -1
  524. package/build/templateItemBuilders/FieldTemplateItemBuilder.js.map +1 -1
  525. package/build/templateItemBuilders/SchemaTemplateItemBuilder.js.map +1 -1
  526. package/build/tests/AbstractCliTest.js.map +1 -1
  527. package/build/tests/AbstractErrorTest.js.map +1 -1
  528. package/build/tests/AbstractEventTest.js.map +1 -1
  529. package/build/tests/AbstractSchemaTest.js.map +1 -1
  530. package/build/tests/AbstractSkillTest.js.map +1 -1
  531. package/build/tests/AbstractTestTest.js.map +1 -1
  532. package/build/tests/CommandFaker.js.map +1 -1
  533. package/build/tests/JestJsonParser.js.map +1 -1
  534. package/build/tests/MockProgramFactory.js.map +1 -1
  535. package/build/tests/buildTestCache.js.map +1 -1
  536. package/build/tests/cleanTestCache.js.map +1 -1
  537. package/build/tests/cleanTestData.js.map +1 -1
  538. package/build/tests/constants.js.map +1 -1
  539. package/build/tests/fixtures/FeatureFixture.js.map +1 -1
  540. package/build/tests/fixtures/MercuryFixture.js.map +1 -1
  541. package/build/tests/fixtures/OrganizationFixture.js.map +1 -1
  542. package/build/tests/fixtures/PersonFixture.js.map +1 -1
  543. package/build/tests/fixtures/SkillFixture.js.map +1 -1
  544. package/build/tests/fixtures/ViewFixture.js.map +1 -1
  545. package/build/tests/utilities/test.utility.js.map +1 -1
  546. package/build/tests/utilities/uiAssert.utility.js.map +1 -1
  547. package/build/types/apiClient.types.js.map +1 -1
  548. package/build/types/cli.types.js.map +1 -1
  549. package/build/types/graphicsInterface.types.js.map +1 -1
  550. package/build/updaters/ScriptUpdater.js.map +1 -1
  551. package/build/utilities/action.utility.js.map +1 -1
  552. package/build/utilities/apiClient.utility.js.map +1 -1
  553. package/build/utilities/argParser.utility.js.map +1 -1
  554. package/build/utilities/commander.utility.js.map +1 -1
  555. package/build/utilities/duration.utility.js.map +1 -1
  556. package/build/utilities/eventContractCleaner.utility.js.map +1 -1
  557. package/build/utilities/form.utility.js.map +1 -1
  558. package/build/utilities/introspection.utility.js.map +1 -1
  559. package/build/utilities/isCi.js.map +1 -1
  560. package/build/utilities/tsConfig.utility.js.map +1 -1
  561. package/build/utilities/ui.utility.js.map +1 -1
  562. package/build/widgets/Theme.js.map +1 -1
  563. package/build/widgets/WidgetFactory.js.map +1 -1
  564. package/build/widgets/keySelectChoices.js.map +1 -1
  565. package/build/widgets/terminalKit/TKButtonWidget.js.map +1 -1
  566. package/build/widgets/terminalKit/TkBaseWidget.js.map +1 -1
  567. package/build/widgets/terminalKit/TkInputWidget.js.map +1 -1
  568. package/build/widgets/terminalKit/TkLayoutCellWidget.js.map +1 -1
  569. package/build/widgets/terminalKit/TkLayoutWidget.js.map +1 -1
  570. package/build/widgets/terminalKit/TkMenuBarWidget.js.map +1 -1
  571. package/build/widgets/terminalKit/TkPopupWidget.js.map +1 -1
  572. package/build/widgets/terminalKit/TkProgressBarWidget.js.map +1 -1
  573. package/build/widgets/terminalKit/TkTextWidget.js.map +1 -1
  574. package/build/widgets/terminalKit/TkWindowWidget.js.map +1 -1
  575. package/build/widgets/terminalKit/termKit.utility.js.map +1 -1
  576. package/build/widgets/types/button.types.js.map +1 -1
  577. package/build/widgets/types/factory.types.js.map +1 -1
  578. package/build/widgets/types/input.types.js.map +1 -1
  579. package/build/widgets/types/layout.types.js.map +1 -1
  580. package/build/widgets/types/menuBar.types.js.map +1 -1
  581. package/build/widgets/types/popup.types.js.map +1 -1
  582. package/build/widgets/types/progressBar.types.js.map +1 -1
  583. package/build/widgets/types/table.types.js.map +1 -1
  584. package/build/widgets/types/text.types.js.map +1 -1
  585. package/build/widgets/types/widgets.types.js.map +1 -1
  586. package/build/widgets/types/window.types.js.map +1 -1
  587. package/build/widgets/widget.utilities.js.map +1 -1
  588. package/build/writers/AbstractWriter.js.map +1 -1
  589. package/build/writers/WriterFactory.js.map +1 -1
  590. package/package.json +33 -33
  591. package/src/.spruce/errors/errors.types.ts +29 -0
  592. package/src/.spruce/errors/options.types.ts +4 -1
  593. package/src/.spruce/errors/spruceCli/viewPluginAlreadyExists.schema.ts +22 -0
  594. package/src/__tests__/behavioral/views/CreatingASkillView.test.ts +1 -1
  595. package/src/__tests__/behavioral/views/KeepingViewsInSync.test.ts +1 -1
  596. package/src/__tests__/behavioral/views/plugins/CreatingAViewPlugin.test.ts +161 -0
  597. package/src/errors/SpruceError.ts +4 -0
  598. package/src/errors/viewPluginAlreadyExists.builder.ts +12 -0
  599. package/src/features/view/actions/CreateAction.ts +72 -72
  600. package/src/features/view/actions/CreatePluginAction.ts +54 -0
  601. package/src/features/view/actions/SyncAction.ts +30 -14
  602. package/src/features/view/writers/ViewWriter.ts +45 -5
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractWriter.js","names":["_fs","_interopRequireDefault","require","_path","_spruceSkillUtils","_constants","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","_createForOfIteratorHelper","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","i","F","s","n","done","value","_e","f","TypeError","normalCompletion","didErr","err","call","step","next","_e2","minLen","_arrayLikeToArray","prototype","toString","slice","constructor","name","from","test","arr","len","arr2","AbstractWriter","exports","options","_classCallCheck2","templates","ui","term","upgradeMode","fileDescriptions","linter","settings","_createClass2","key","_lint","_asyncToGenerator2","_regenerator","mark","_callee","file","_this$linter","wrap","_callee$","_context","prev","startLoading","concat","pathUtil","basename","fix","stop","lint","_x","_writeDirectoryTemplate","_callee2","context","destinationDir","filesToWrite","filesToSkip","_options$shouldConfir","shouldConfirmBeforeWriting","firstFileWriteMessage","files","results","_iterator","_step","generated","shouldWrite","shouldSkip","_callee2$","_context2","hasShownFirstWriteMessage","directoryTemplate","kind","code","sent","indexOf","filename","writeFileIfChangedMixinResults","join","relativePath","contents","t0","finish","abrupt","writeDirectoryTemplate","_x2","_writeFileIfChangedMixinResults","_callee3","destination","description","cwd","myResults","desc","action","fileDescription","write","cleanedName","isAlwaysSkipped","_write","answer","_args3","_callee3$","_context3","undefined","diskUtil","isDir","Error","getFileDescription","doesFileExist","confirmPromptOnFirstWrite","stopLoading","confirm","writeFile","isFileDifferent","shouldOverwriteIfChanged","cleanFilename","skipped","get","shouldAskForOverwrite","renderLine","prompt","type","label","choices","FILE_ACTION_OVERWRITE","FILE_ACTION_SKIP","FILE_ACTION_ALWAYS_SKIP","set","replace","path","_x3","_x4","_x5","_x6","relativeFile","sep","substr","_description$shouldOv","shouldOverwriteWhenChanged","_this$fileDescription","lower","toLowerCase","_iterator2","_step2","d","search","resolveFilenameWithFallback","dirOrFile","fallbackFileName","doesDirExist","fs","lstatSync","isDirectory","extname","resolvePath"],"sources":["../../src/writers/AbstractWriter.ts"],"sourcesContent":["import fs from 'fs'\nimport pathUtil from 'path'\nimport { diskUtil, SettingsService } from '@sprucelabs/spruce-skill-utils'\nimport { DirectoryTemplateCode, Templates } from '@sprucelabs/spruce-templates'\nimport {\n\tFILE_ACTION_ALWAYS_SKIP,\n\tFILE_ACTION_OVERWRITE,\n\tFILE_ACTION_SKIP,\n} from '../constants'\nimport LintService from '../services/LintService'\nimport { FileDescription, GeneratedFile, UpgradeMode } from '../types/cli.types'\nimport { GraphicsInterface } from '../types/cli.types'\n\nexport type WriteResults = GeneratedFile[]\n\nexport interface WriterOptions {\n\ttemplates: Templates\n\tterm: GraphicsInterface\n\tupgradeMode?: UpgradeMode\n\tfileDescriptions: FileDescription[]\n\tlinter?: LintService\n\tsettings: SettingsService\n}\n\nexport interface WriteDirectoryTemplateOptions {\n\tdestinationDir: string\n\tcode: DirectoryTemplateCode\n\tfilesToWrite?: string[]\n\tfilesToSkip?: string[]\n\tcontext: any\n\tshouldConfirmBeforeWriting?: boolean\n\tfirstFileWriteMessage?: string\n}\n\nexport default abstract class AbstractWriter {\n\tprotected templates: Templates\n\tprotected ui: GraphicsInterface\n\tprivate linter?: LintService\n\tprivate upgradeMode: UpgradeMode\n\tprivate fileDescriptions: FileDescription[] = []\n\tprivate shouldConfirmBeforeWriting = true\n\tprivate firstFileWriteMessage?: string\n\tprivate hasShownFirstWriteMessage = false\n\tprivate settings: SettingsService<string>\n\n\tpublic constructor(options: WriterOptions) {\n\t\tthis.templates = options.templates\n\t\tthis.ui = options.term\n\t\tthis.upgradeMode = options.upgradeMode\n\t\tthis.fileDescriptions = options.fileDescriptions\n\t\tthis.linter = options.linter\n\t\tthis.settings = options.settings\n\t}\n\n\tprotected async lint(file: string) {\n\t\tthis.ui.startLoading(`Linting ${pathUtil.basename(file)}...`)\n\t\tawait this.linter?.fix(file).catch(() => {})\n\t}\n\n\tprotected async writeDirectoryTemplate(\n\t\toptions: WriteDirectoryTemplateOptions\n\t) {\n\t\tconst {\n\t\t\tcontext,\n\t\t\tdestinationDir,\n\t\t\tfilesToWrite,\n\t\t\tfilesToSkip,\n\t\t\tshouldConfirmBeforeWriting = true,\n\t\t\tfirstFileWriteMessage,\n\t\t} = options\n\n\t\tthis.shouldConfirmBeforeWriting = shouldConfirmBeforeWriting\n\t\tthis.firstFileWriteMessage = firstFileWriteMessage\n\t\tthis.hasShownFirstWriteMessage = false\n\n\t\tconst files = await this.templates.directoryTemplate({\n\t\t\tkind: options.code,\n\t\t\tcontext: context ?? {},\n\t\t})\n\n\t\tlet results: WriteResults = []\n\n\t\tfor (const generated of files) {\n\t\t\tconst shouldWrite =\n\t\t\t\t!filesToWrite || filesToWrite.indexOf(generated.filename) > -1\n\t\t\tconst shouldSkip =\n\t\t\t\tfilesToSkip && filesToSkip.indexOf(generated.filename) > -1\n\n\t\t\tif (shouldWrite && !shouldSkip) {\n\t\t\t\tresults = await this.writeFileIfChangedMixinResults(\n\t\t\t\t\tpathUtil.join(destinationDir, generated.relativePath),\n\t\t\t\t\tgenerated.contents,\n\t\t\t\t\t'',\n\t\t\t\t\tresults,\n\t\t\t\t\tdestinationDir\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\treturn results\n\t}\n\n\tprotected async writeFileIfChangedMixinResults(\n\t\tdestination: string,\n\t\tcontents: string,\n\t\tdescription: string,\n\t\tresults?: WriteResults,\n\t\tcwd = ''\n\t): Promise<WriteResults> {\n\t\tconst myResults: WriteResults = results ?? []\n\t\tlet desc: string | undefined = description\n\n\t\tconst name = pathUtil.basename(destination)\n\t\tlet action: GeneratedFile['action'] = 'skipped'\n\n\t\tif (diskUtil.isDir(destination)) {\n\t\t\tthrow new Error(`Can't write to a directory ${destination}.`)\n\t\t}\n\n\t\tconst fileDescription = this.getFileDescription(destination)\n\n\t\tif (!diskUtil.doesFileExist(destination)) {\n\t\t\tlet write = true\n\n\t\t\tif (\n\t\t\t\tthis.shouldConfirmBeforeWriting &&\n\t\t\t\tfileDescription?.confirmPromptOnFirstWrite\n\t\t\t) {\n\t\t\t\tthis.ui.stopLoading()\n\t\t\t\twrite = await this.ui.confirm(fileDescription.confirmPromptOnFirstWrite)\n\t\t\t}\n\n\t\t\tif (write) {\n\t\t\t\tdiskUtil.writeFile(destination, contents)\n\t\t\t\taction = 'generated'\n\t\t\t}\n\t\t} else if (\n\t\t\tthis.isFileDifferent(destination, contents) &&\n\t\t\tthis.shouldOverwriteIfChanged(destination)\n\t\t) {\n\t\t\tconst cleanedName = this.cleanFilename(destination, cwd)\n\t\t\tconst settings = { skipped: [], ...this.settings.get('writer') }\n\t\t\tconst isAlwaysSkipped = settings.skipped.indexOf(cleanedName) > -1\n\t\t\tlet write = !isAlwaysSkipped\n\n\t\t\tif (!isAlwaysSkipped && this.shouldAskForOverwrite()) {\n\t\t\t\tif (!this.hasShownFirstWriteMessage && this.firstFileWriteMessage) {\n\t\t\t\t\tthis.hasShownFirstWriteMessage = true\n\t\t\t\t\tthis.ui.renderLine(this.firstFileWriteMessage)\n\t\t\t\t\tthis.ui.renderLine('')\n\t\t\t\t}\n\n\t\t\t\tconst answer = await this.ui.prompt({\n\t\t\t\t\ttype: 'select',\n\t\t\t\t\tlabel: `${cleanedName}`,\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tchoices: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: FILE_ACTION_OVERWRITE,\n\t\t\t\t\t\t\t\tlabel: 'Overwrite',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: FILE_ACTION_SKIP,\n\t\t\t\t\t\t\t\tlabel: 'Skip',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: FILE_ACTION_ALWAYS_SKIP,\n\t\t\t\t\t\t\t\tlabel: 'Always skip',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t})\n\n\t\t\t\tif (answer === FILE_ACTION_ALWAYS_SKIP) {\n\t\t\t\t\tsettings.skipped.push(cleanedName)\n\t\t\t\t\tthis.settings.set('writer', settings)\n\t\t\t\t}\n\n\t\t\t\twrite = answer === FILE_ACTION_OVERWRITE\n\t\t\t}\n\n\t\t\tif (write) {\n\t\t\t\tdiskUtil.writeFile(destination, contents)\n\t\t\t\taction = 'updated'\n\t\t\t}\n\t\t}\n\n\t\tif (!desc) {\n\t\t\tdesc = fileDescription?.description\n\t\t}\n\n\t\tif (!desc) {\n\t\t\tthrow new Error(\n\t\t\t\t`No FileDescription provided for ${destination.replace(\n\t\t\t\t\tcwd,\n\t\t\t\t\t''\n\t\t\t\t)}. Check your feature's fileDescriptions property.`\n\t\t\t)\n\t\t}\n\n\t\tmyResults.push({ name, description: desc, path: destination, action })\n\n\t\treturn myResults\n\t}\n\n\tprivate isFileDifferent(destination: string, contents: string) {\n\t\treturn diskUtil.isFileDifferent(destination, contents)\n\t}\n\n\tprivate cleanFilename(destination: string, cwd: string) {\n\t\tlet relativeFile = destination.replace(cwd, '')\n\t\tif (relativeFile[0] === pathUtil.sep) {\n\t\t\trelativeFile = relativeFile.substr(1)\n\t\t}\n\t\treturn relativeFile\n\t}\n\n\tprivate shouldOverwriteIfChanged(destination: string): boolean {\n\t\tif (!this.upgradeMode) {\n\t\t\treturn true\n\t\t}\n\n\t\tif (this.upgradeMode === 'forceEverything') {\n\t\t\treturn true\n\t\t}\n\n\t\tlet description: FileDescription | undefined =\n\t\t\tthis.getFileDescription(destination)\n\n\t\treturn description?.shouldOverwriteWhenChanged ?? false\n\t}\n\n\tprivate getFileDescription(destination: string): FileDescription | undefined {\n\t\tconst lower = destination.toLowerCase()\n\t\tfor (const d of this.fileDescriptions ?? []) {\n\t\t\tif (lower.search(d.path.toLowerCase()) > -1) {\n\t\t\t\treturn d\n\t\t\t}\n\t\t}\n\n\t\treturn undefined\n\t}\n\n\tprivate shouldAskForOverwrite() {\n\t\tif (\n\t\t\tthis.shouldConfirmBeforeWriting &&\n\t\t\tthis.upgradeMode === 'askForChanged'\n\t\t) {\n\t\t\treturn true\n\t\t}\n\n\t\treturn false\n\t}\n\n\tprotected resolveFilenameWithFallback(\n\t\tdirOrFile: string,\n\t\tfallbackFileName: string\n\t) {\n\t\tconst isDir =\n\t\t\tdiskUtil.doesDirExist(dirOrFile) &&\n\t\t\tfs.lstatSync(dirOrFile).isDirectory() &&\n\t\t\tpathUtil.extname(dirOrFile).length === 0\n\t\treturn isDir ? diskUtil.resolvePath(dirOrFile, fallbackFileName) : dirOrFile\n\t}\n}\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,GAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AAIqB,SAAAI,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,C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AI,CAAChC,WAAW,KAAK,eAAe,EACnC;QACD,OAAO,IAAI;MACZ;MAEA,OAAO,KAAK;IACb;EAAC;IAAAK,GAAA;IAAAnC,KAAA,EAED,SAAAqJ,4BACCC,SAAiB,EACjBC,gBAAwB,EACvB;MACD,IAAM3C,KAAK,GACVD,0BAAQ,CAAC6C,YAAY,CAACF,SAAS,CAAC,IAChCG,cAAE,CAACC,SAAS,CAACJ,SAAS,CAAC,CAACK,WAAW,CAAC,CAAC,IACrC1G,gBAAQ,CAAC2G,OAAO,CAACN,SAAS,CAAC,CAACzK,MAAM,KAAK,CAAC;MACzC,OAAO+H,KAAK,GAAGD,0BAAQ,CAACkD,WAAW,CAACP,SAAS,EAAEC,gBAAgB,CAAC,GAAGD,SAAS;IAC7E;EAAC;EAAA,OAAA/H,cAAA;AAAA"}
1
+ {"version":3,"file":"AbstractWriter.js","names":["_fs","_interopRequireDefault","require","_path","_spruceSkillUtils","_constants","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","_createForOfIteratorHelper","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","i","F","s","n","done","value","_e","f","TypeError","normalCompletion","didErr","err","call","step","next","_e2","minLen","_arrayLikeToArray","prototype","toString","slice","constructor","name","from","test","arr","len","arr2","AbstractWriter","exports","options","_classCallCheck2","templates","ui","term","upgradeMode","fileDescriptions","linter","settings","_createClass2","key","_lint","_asyncToGenerator2","_regenerator","mark","_callee","file","_this$linter","wrap","_callee$","_context","prev","startLoading","concat","pathUtil","basename","fix","stop","lint","_x","_writeDirectoryTemplate","_callee2","context","destinationDir","filesToWrite","filesToSkip","_options$shouldConfir","shouldConfirmBeforeWriting","firstFileWriteMessage","files","results","_iterator","_step","generated","shouldWrite","shouldSkip","_callee2$","_context2","hasShownFirstWriteMessage","directoryTemplate","kind","code","sent","indexOf","filename","writeFileIfChangedMixinResults","join","relativePath","contents","t0","finish","abrupt","writeDirectoryTemplate","_x2","_writeFileIfChangedMixinResults","_callee3","destination","description","cwd","myResults","desc","action","fileDescription","write","cleanedName","isAlwaysSkipped","_write","answer","_args3","_callee3$","_context3","undefined","diskUtil","isDir","Error","getFileDescription","doesFileExist","confirmPromptOnFirstWrite","stopLoading","confirm","writeFile","isFileDifferent","shouldOverwriteIfChanged","cleanFilename","skipped","get","shouldAskForOverwrite","renderLine","prompt","type","label","choices","FILE_ACTION_OVERWRITE","FILE_ACTION_SKIP","FILE_ACTION_ALWAYS_SKIP","set","replace","path","_x3","_x4","_x5","_x6","relativeFile","sep","substr","_description$shouldOv","shouldOverwriteWhenChanged","_this$fileDescription","lower","toLowerCase","_iterator2","_step2","d","search","resolveFilenameWithFallback","dirOrFile","fallbackFileName","doesDirExist","fs","lstatSync","isDirectory","extname","resolvePath"],"sources":["../../src/writers/AbstractWriter.ts"],"sourcesContent":["import fs from 'fs'\nimport pathUtil from 'path'\nimport { diskUtil, SettingsService } from '@sprucelabs/spruce-skill-utils'\nimport { DirectoryTemplateCode, Templates } from '@sprucelabs/spruce-templates'\nimport {\n\tFILE_ACTION_ALWAYS_SKIP,\n\tFILE_ACTION_OVERWRITE,\n\tFILE_ACTION_SKIP,\n} from '../constants'\nimport LintService from '../services/LintService'\nimport { FileDescription, GeneratedFile, UpgradeMode } from '../types/cli.types'\nimport { GraphicsInterface } from '../types/cli.types'\n\nexport type WriteResults = GeneratedFile[]\n\nexport interface WriterOptions {\n\ttemplates: Templates\n\tterm: GraphicsInterface\n\tupgradeMode?: UpgradeMode\n\tfileDescriptions: FileDescription[]\n\tlinter?: LintService\n\tsettings: SettingsService\n}\n\nexport interface WriteDirectoryTemplateOptions {\n\tdestinationDir: string\n\tcode: DirectoryTemplateCode\n\tfilesToWrite?: string[]\n\tfilesToSkip?: string[]\n\tcontext: any\n\tshouldConfirmBeforeWriting?: boolean\n\tfirstFileWriteMessage?: string\n}\n\nexport default abstract class AbstractWriter {\n\tprotected templates: Templates\n\tprotected ui: GraphicsInterface\n\tprivate linter?: LintService\n\tprivate upgradeMode: UpgradeMode\n\tprivate fileDescriptions: FileDescription[] = []\n\tprivate shouldConfirmBeforeWriting = true\n\tprivate firstFileWriteMessage?: string\n\tprivate hasShownFirstWriteMessage = false\n\tprivate settings: SettingsService<string>\n\n\tpublic constructor(options: WriterOptions) {\n\t\tthis.templates = options.templates\n\t\tthis.ui = options.term\n\t\tthis.upgradeMode = options.upgradeMode\n\t\tthis.fileDescriptions = options.fileDescriptions\n\t\tthis.linter = options.linter\n\t\tthis.settings = options.settings\n\t}\n\n\tprotected async lint(file: string) {\n\t\tthis.ui.startLoading(`Linting ${pathUtil.basename(file)}...`)\n\t\tawait this.linter?.fix(file).catch(() => {})\n\t}\n\n\tprotected async writeDirectoryTemplate(\n\t\toptions: WriteDirectoryTemplateOptions\n\t) {\n\t\tconst {\n\t\t\tcontext,\n\t\t\tdestinationDir,\n\t\t\tfilesToWrite,\n\t\t\tfilesToSkip,\n\t\t\tshouldConfirmBeforeWriting = true,\n\t\t\tfirstFileWriteMessage,\n\t\t} = options\n\n\t\tthis.shouldConfirmBeforeWriting = shouldConfirmBeforeWriting\n\t\tthis.firstFileWriteMessage = firstFileWriteMessage\n\t\tthis.hasShownFirstWriteMessage = false\n\n\t\tconst files = await this.templates.directoryTemplate({\n\t\t\tkind: options.code,\n\t\t\tcontext: context ?? {},\n\t\t})\n\n\t\tlet results: WriteResults = []\n\n\t\tfor (const generated of files) {\n\t\t\tconst shouldWrite =\n\t\t\t\t!filesToWrite || filesToWrite.indexOf(generated.filename) > -1\n\t\t\tconst shouldSkip =\n\t\t\t\tfilesToSkip && filesToSkip.indexOf(generated.filename) > -1\n\n\t\t\tif (shouldWrite && !shouldSkip) {\n\t\t\t\tresults = await this.writeFileIfChangedMixinResults(\n\t\t\t\t\tpathUtil.join(destinationDir, generated.relativePath),\n\t\t\t\t\tgenerated.contents,\n\t\t\t\t\t'',\n\t\t\t\t\tresults,\n\t\t\t\t\tdestinationDir\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\treturn results\n\t}\n\n\tprotected async writeFileIfChangedMixinResults(\n\t\tdestination: string,\n\t\tcontents: string,\n\t\tdescription: string,\n\t\tresults?: WriteResults,\n\t\tcwd = ''\n\t): Promise<WriteResults> {\n\t\tconst myResults: WriteResults = results ?? []\n\t\tlet desc: string | undefined = description\n\n\t\tconst name = pathUtil.basename(destination)\n\t\tlet action: GeneratedFile['action'] = 'skipped'\n\n\t\tif (diskUtil.isDir(destination)) {\n\t\t\tthrow new Error(`Can't write to a directory ${destination}.`)\n\t\t}\n\n\t\tconst fileDescription = this.getFileDescription(destination)\n\n\t\tif (!diskUtil.doesFileExist(destination)) {\n\t\t\tlet write = true\n\n\t\t\tif (\n\t\t\t\tthis.shouldConfirmBeforeWriting &&\n\t\t\t\tfileDescription?.confirmPromptOnFirstWrite\n\t\t\t) {\n\t\t\t\tthis.ui.stopLoading()\n\t\t\t\twrite = await this.ui.confirm(fileDescription.confirmPromptOnFirstWrite)\n\t\t\t}\n\n\t\t\tif (write) {\n\t\t\t\tdiskUtil.writeFile(destination, contents)\n\t\t\t\taction = 'generated'\n\t\t\t}\n\t\t} else if (\n\t\t\tthis.isFileDifferent(destination, contents) &&\n\t\t\tthis.shouldOverwriteIfChanged(destination)\n\t\t) {\n\t\t\tconst cleanedName = this.cleanFilename(destination, cwd)\n\t\t\tconst settings = { skipped: [], ...this.settings.get('writer') }\n\t\t\tconst isAlwaysSkipped = settings.skipped.indexOf(cleanedName) > -1\n\t\t\tlet write = !isAlwaysSkipped\n\n\t\t\tif (!isAlwaysSkipped && this.shouldAskForOverwrite()) {\n\t\t\t\tif (!this.hasShownFirstWriteMessage && this.firstFileWriteMessage) {\n\t\t\t\t\tthis.hasShownFirstWriteMessage = true\n\t\t\t\t\tthis.ui.renderLine(this.firstFileWriteMessage)\n\t\t\t\t\tthis.ui.renderLine('')\n\t\t\t\t}\n\n\t\t\t\tconst answer = await this.ui.prompt({\n\t\t\t\t\ttype: 'select',\n\t\t\t\t\tlabel: `${cleanedName}`,\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tchoices: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: FILE_ACTION_OVERWRITE,\n\t\t\t\t\t\t\t\tlabel: 'Overwrite',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: FILE_ACTION_SKIP,\n\t\t\t\t\t\t\t\tlabel: 'Skip',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: FILE_ACTION_ALWAYS_SKIP,\n\t\t\t\t\t\t\t\tlabel: 'Always skip',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t})\n\n\t\t\t\tif (answer === FILE_ACTION_ALWAYS_SKIP) {\n\t\t\t\t\tsettings.skipped.push(cleanedName)\n\t\t\t\t\tthis.settings.set('writer', settings)\n\t\t\t\t}\n\n\t\t\t\twrite = answer === FILE_ACTION_OVERWRITE\n\t\t\t}\n\n\t\t\tif (write) {\n\t\t\t\tdiskUtil.writeFile(destination, contents)\n\t\t\t\taction = 'updated'\n\t\t\t}\n\t\t}\n\n\t\tif (!desc) {\n\t\t\tdesc = fileDescription?.description\n\t\t}\n\n\t\tif (!desc) {\n\t\t\tthrow new Error(\n\t\t\t\t`No FileDescription provided for ${destination.replace(\n\t\t\t\t\tcwd,\n\t\t\t\t\t''\n\t\t\t\t)}. Check your feature's fileDescriptions property.`\n\t\t\t)\n\t\t}\n\n\t\tmyResults.push({ name, description: desc, path: destination, action })\n\n\t\treturn myResults\n\t}\n\n\tprivate isFileDifferent(destination: string, contents: string) {\n\t\treturn diskUtil.isFileDifferent(destination, contents)\n\t}\n\n\tprivate cleanFilename(destination: string, cwd: string) {\n\t\tlet relativeFile = destination.replace(cwd, '')\n\t\tif (relativeFile[0] === pathUtil.sep) {\n\t\t\trelativeFile = relativeFile.substr(1)\n\t\t}\n\t\treturn relativeFile\n\t}\n\n\tprivate shouldOverwriteIfChanged(destination: string): boolean {\n\t\tif (!this.upgradeMode) {\n\t\t\treturn true\n\t\t}\n\n\t\tif (this.upgradeMode === 'forceEverything') {\n\t\t\treturn true\n\t\t}\n\n\t\tlet description: FileDescription | undefined =\n\t\t\tthis.getFileDescription(destination)\n\n\t\treturn description?.shouldOverwriteWhenChanged ?? false\n\t}\n\n\tprivate getFileDescription(destination: string): FileDescription | undefined {\n\t\tconst lower = destination.toLowerCase()\n\t\tfor (const d of this.fileDescriptions ?? []) {\n\t\t\tif (lower.search(d.path.toLowerCase()) > -1) {\n\t\t\t\treturn d\n\t\t\t}\n\t\t}\n\n\t\treturn undefined\n\t}\n\n\tprivate shouldAskForOverwrite() {\n\t\tif (\n\t\t\tthis.shouldConfirmBeforeWriting &&\n\t\t\tthis.upgradeMode === 'askForChanged'\n\t\t) {\n\t\t\treturn true\n\t\t}\n\n\t\treturn false\n\t}\n\n\tprotected resolveFilenameWithFallback(\n\t\tdirOrFile: string,\n\t\tfallbackFileName: string\n\t) {\n\t\tconst isDir =\n\t\t\tdiskUtil.doesDirExist(dirOrFile) &&\n\t\t\tfs.lstatSync(dirOrFile).isDirectory() &&\n\t\t\tpathUtil.extname(dirOrFile).length === 0\n\t\treturn isDir ? diskUtil.resolvePath(dirOrFile, fallbackFileName) : dirOrFile\n\t}\n}\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,GAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AAIqB,SAAAI,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,C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C,KAAA,EAED,SAAAyH,sBAAA,EAAgC;MAC/B,IACC,IAAI,CAAC3D,0BAA0B,IAC/B,IAAI,CAAChC,WAAW,KAAK,eAAe,EACnC;QACD,OAAO,IAAI;MACZ;MAEA,OAAO,KAAK;IACb;EAAC;IAAAK,GAAA;IAAAnC,KAAA,EAED,SAAAqJ,4BACCC,SAAiB,EACjBC,gBAAwB,EACvB;MACD,IAAM3C,KAAK,GACVD,0BAAQ,CAAC6C,YAAY,CAACF,SAAS,CAAC,IAChCG,cAAE,CAACC,SAAS,CAACJ,SAAS,CAAC,CAACK,WAAW,CAAC,CAAC,IACrC1G,gBAAQ,CAAC2G,OAAO,CAACN,SAAS,CAAC,CAACzK,MAAM,KAAK,CAAC;MACzC,OAAO+H,KAAK,GAAGD,0BAAQ,CAACkD,WAAW,CAACP,SAAS,EAAEC,gBAAgB,CAAC,GAAGD,SAAS;IAC7E;EAAC;EAAA,OAAA/H,cAAA;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"WriterFactory.js","names":["_ConversationWriter","_interopRequireDefault","require","_DeployWriter","_ErrorWriter","_EventWriter","_LogWriter","_NodeWriter","_PermissionWriter","_PolishWriter","_SandboxWriter","_SchemaWriter","_SkillWriter","_StoreWriter","_TestWriter","_ViewWriter","_VsCodeWriter","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","classMap","error","ErrorWriter","event","EventWriter","schema","SchemaWriter","skill","SkillGenerator","test","TestGenerator","node","NodeWriter","vscode","VsCodeWriter","conversation","ConversationWriter","deploy","DeployWriter","sandbox","SandboxWriter","store","StoreWriter","view","ViewWriter","log","LogWriter","polish","PolishWriter","permission","PermissionWriter","WriterFactory","exports","options","_classCallCheck2","templates","ui","linter","settings","_createClass2","key","value","Writer","code","Class","term"],"sources":["../../src/writers/WriterFactory.ts"],"sourcesContent":["import { SettingsService } from '@sprucelabs/spruce-skill-utils'\nimport { Templates } from '@sprucelabs/spruce-templates'\nimport ConversationWriter from '../features/conversation/writers/ConversationWriter'\nimport DeployWriter from '../features/deploy/writers/DeployWriter'\nimport ErrorWriter from '../features/error/writers/ErrorWriter'\nimport EventWriter from '../features/event/writers/EventWriter'\nimport LogWriter from '../features/log/writers/LogWriter'\nimport NodeWriter from '../features/node/writers/NodeWriter'\nimport PermissionWriter from '../features/permission/writers/PermissionWriter'\nimport PolishWriter from '../features/polish/writers/PolishWriter'\nimport SandboxWriter from '../features/sandbox/writers/SandboxWriter'\nimport SchemaWriter from '../features/schema/writers/SchemaWriter'\nimport SkillGenerator from '../features/skill/writers/SkillWriter'\nimport StoreWriter from '../features/store/writers/StoreWriter'\nimport TestGenerator from '../features/test/writers/TestWriter'\nimport ViewWriter from '../features/view/writers/ViewWriter'\nimport VsCodeWriter from '../features/vscode/writers/VsCodeWriter'\nimport LintService from '../services/LintService'\nimport { FileDescription } from '../types/cli.types'\nimport { GraphicsInterface } from '../types/cli.types'\nimport { WriterOptions } from './AbstractWriter'\n\nconst classMap = {\n\terror: ErrorWriter,\n\tevent: EventWriter,\n\tschema: SchemaWriter,\n\tskill: SkillGenerator,\n\ttest: TestGenerator,\n\tnode: NodeWriter,\n\tvscode: VsCodeWriter,\n\tconversation: ConversationWriter,\n\tdeploy: DeployWriter,\n\tsandbox: SandboxWriter,\n\tstore: StoreWriter,\n\tview: ViewWriter,\n\tlog: LogWriter,\n\tpolish: PolishWriter,\n\tpermission: PermissionWriter,\n}\n\nexport interface WriterMap {\n\terror: ErrorWriter\n\tevent: EventWriter\n\tschema: SchemaWriter\n\tskill: SkillGenerator\n\ttest: TestGenerator\n\tnode: NodeWriter\n\tvscode: VsCodeWriter\n\tconversation: ConversationWriter\n\tdeploy: DeployWriter\n\tsandbox: SandboxWriter\n\tstore: StoreWriter\n\tview: ViewWriter\n\tlog: LogWriter\n\tpolish: PolishWriter\n\tpermission: PermissionWriter\n}\n\nexport type WriterCode = keyof WriterMap\n\nexport default class WriterFactory {\n\tprivate templates: Templates\n\tprivate ui: GraphicsInterface\n\tprivate linter?: LintService\n\tprivate settings: SettingsService<string>\n\n\tpublic constructor(options: {\n\t\ttemplates: Templates\n\t\tui: GraphicsInterface\n\t\tlinter?: LintService\n\t\tsettings: SettingsService\n\t}) {\n\t\tconst { templates, ui, linter, settings } = options\n\n\t\tthis.templates = templates\n\t\tthis.ui = ui\n\t\tthis.linter = linter\n\t\tthis.settings = settings\n\t}\n\n\tpublic Writer<C extends WriterCode>(\n\t\tcode: C,\n\t\toptions: Partial<WriterOptions> & { fileDescriptions: FileDescription[] }\n\t): WriterMap[C] {\n\t\tconst Class = classMap[code]\n\t\treturn new Class({\n\t\t\ttemplates: this.templates,\n\t\t\tterm: this.ui,\n\t\t\tlinter: this.linter,\n\t\t\tsettings: this.settings,\n\t\t\t...(options || {}),\n\t\t}) as WriterMap[C]\n\t}\n}\n"],"mappings":";;;;;;;;;;AAEA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,YAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,UAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,WAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,iBAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,aAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,cAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,aAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,YAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,YAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,WAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa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OAAAF,aAAA;AAAA"}
1
+ {"version":3,"file":"WriterFactory.js","names":["_ConversationWriter","_interopRequireDefault","require","_DeployWriter","_ErrorWriter","_EventWriter","_LogWriter","_NodeWriter","_PermissionWriter","_PolishWriter","_SandboxWriter","_SchemaWriter","_SkillWriter","_StoreWriter","_TestWriter","_ViewWriter","_VsCodeWriter","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","classMap","error","ErrorWriter","event","EventWriter","schema","SchemaWriter","skill","SkillGenerator","test","TestGenerator","node","NodeWriter","vscode","VsCodeWriter","conversation","ConversationWriter","deploy","DeployWriter","sandbox","SandboxWriter","store","StoreWriter","view","ViewWriter","log","LogWriter","polish","PolishWriter","permission","PermissionWriter","WriterFactory","exports","options","_classCallCheck2","templates","ui","linter","settings","_createClass2","key","value","Writer","code","Class","term"],"sources":["../../src/writers/WriterFactory.ts"],"sourcesContent":["import { SettingsService } from '@sprucelabs/spruce-skill-utils'\nimport { Templates } from '@sprucelabs/spruce-templates'\nimport ConversationWriter from '../features/conversation/writers/ConversationWriter'\nimport DeployWriter from '../features/deploy/writers/DeployWriter'\nimport ErrorWriter from '../features/error/writers/ErrorWriter'\nimport EventWriter from '../features/event/writers/EventWriter'\nimport LogWriter from '../features/log/writers/LogWriter'\nimport NodeWriter from '../features/node/writers/NodeWriter'\nimport PermissionWriter from '../features/permission/writers/PermissionWriter'\nimport PolishWriter from '../features/polish/writers/PolishWriter'\nimport SandboxWriter from '../features/sandbox/writers/SandboxWriter'\nimport SchemaWriter from '../features/schema/writers/SchemaWriter'\nimport SkillGenerator from '../features/skill/writers/SkillWriter'\nimport StoreWriter from '../features/store/writers/StoreWriter'\nimport TestGenerator from '../features/test/writers/TestWriter'\nimport ViewWriter from '../features/view/writers/ViewWriter'\nimport VsCodeWriter from '../features/vscode/writers/VsCodeWriter'\nimport LintService from '../services/LintService'\nimport { FileDescription } from '../types/cli.types'\nimport { GraphicsInterface } from '../types/cli.types'\nimport { WriterOptions } from './AbstractWriter'\n\nconst classMap = {\n\terror: ErrorWriter,\n\tevent: EventWriter,\n\tschema: SchemaWriter,\n\tskill: SkillGenerator,\n\ttest: TestGenerator,\n\tnode: NodeWriter,\n\tvscode: VsCodeWriter,\n\tconversation: ConversationWriter,\n\tdeploy: DeployWriter,\n\tsandbox: SandboxWriter,\n\tstore: StoreWriter,\n\tview: ViewWriter,\n\tlog: LogWriter,\n\tpolish: PolishWriter,\n\tpermission: PermissionWriter,\n}\n\nexport interface WriterMap {\n\terror: ErrorWriter\n\tevent: EventWriter\n\tschema: SchemaWriter\n\tskill: SkillGenerator\n\ttest: TestGenerator\n\tnode: NodeWriter\n\tvscode: VsCodeWriter\n\tconversation: ConversationWriter\n\tdeploy: DeployWriter\n\tsandbox: SandboxWriter\n\tstore: StoreWriter\n\tview: ViewWriter\n\tlog: LogWriter\n\tpolish: PolishWriter\n\tpermission: PermissionWriter\n}\n\nexport type WriterCode = keyof WriterMap\n\nexport default class WriterFactory {\n\tprivate templates: Templates\n\tprivate ui: GraphicsInterface\n\tprivate linter?: LintService\n\tprivate settings: SettingsService<string>\n\n\tpublic constructor(options: {\n\t\ttemplates: Templates\n\t\tui: GraphicsInterface\n\t\tlinter?: LintService\n\t\tsettings: SettingsService\n\t}) {\n\t\tconst { templates, ui, linter, settings } = options\n\n\t\tthis.templates = templates\n\t\tthis.ui = ui\n\t\tthis.linter = linter\n\t\tthis.settings = settings\n\t}\n\n\tpublic Writer<C extends WriterCode>(\n\t\tcode: C,\n\t\toptions: Partial<WriterOptions> & { fileDescriptions: FileDescription[] }\n\t): WriterMap[C] {\n\t\tconst Class = classMap[code]\n\t\treturn new Class({\n\t\t\ttemplates: this.templates,\n\t\t\tterm: this.ui,\n\t\t\tlinter: this.linter,\n\t\t\tsettings: this.settings,\n\t\t\t...(options || {}),\n\t\t}) as WriterMap[C]\n\t}\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AAeJ,OAAO,CAA5BI,MAAM;MAAEC,QAAQ,GAAKL,OAAO,CAApBK,QAAQ;IAEvC,IAAI,CAACH,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACC,EAAE,GAAGA,EAAE;IACZ,IAAI,CAACC,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACC,QAAQ,GAAGA,QAAQ;EACzB;EAAC,IAAAC,aAAA,aAAAR,aAAA;IAAAS,GAAA;IAAAC,KAAA,EAED,SAAAC,OACCC,IAAO,EACPV,OAAyE,EAC1D;MACf,IAAMW,KAAK,GAAG5C,QAAQ,CAAC2C,IAAI,CAAC;MAC5B,OAAO,IAAIC,KAAK,CAAApD,aAAA;QACf2C,SAAS,EAAE,IAAI,CAACA,SAAS;QACzBU,IAAI,EAAE,IAAI,CAACT,EAAE;QACbC,MAAM,EAAE,IAAI,CAACA,MAAM;QACnBC,QAAQ,EAAE,IAAI,CAACA;MAAQ,GACnBL,OAAO,IAAI,CAAC,CAAC,CACjB,CAAC;IACH;EAAC;EAAA,OAAAF,aAAA;AAAA","ignoreList":[]}
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  ]
18
18
  },
19
19
  "license": "MIT",
20
- "version": "19.1.41",
20
+ "version": "19.2.0",
21
21
  "bin": {
22
22
  "spruce": "./build/index.js"
23
23
  },
@@ -72,21 +72,21 @@
72
72
  },
73
73
  "dependencies": {
74
74
  "@babel/cli": "^7.23.9",
75
- "@babel/plugin-proposal-decorators": "^7.23.9",
76
- "@babel/runtime": "^7.23.9",
75
+ "@babel/plugin-proposal-decorators": "^7.24.0",
76
+ "@babel/runtime": "^7.24.0",
77
77
  "@jest/reporters": "^29.7.0",
78
- "@sprucelabs/error": "^5.1.63",
79
- "@sprucelabs/globby": "^1.0.6",
80
- "@sprucelabs/heartwood-view-controllers": "^108.40.75",
81
- "@sprucelabs/jest-json-reporter": "^7.0.164",
82
- "@sprucelabs/mercury-client": "^41.0.269",
83
- "@sprucelabs/mercury-event-emitter": "^41.0.269",
84
- "@sprucelabs/mercury-types": "^46.0.213",
85
- "@sprucelabs/schema": "^29.3.11",
86
- "@sprucelabs/spruce-core-schemas": "^39.0.218",
87
- "@sprucelabs/spruce-event-utils": "^38.0.252",
88
- "@sprucelabs/spruce-skill-utils": "^30.1.93",
89
- "@sprucelabs/spruce-templates": "^19.1.41",
78
+ "@sprucelabs/error": "^5.1.66",
79
+ "@sprucelabs/globby": "^1.0.16",
80
+ "@sprucelabs/heartwood-view-controllers": "^108.41.1",
81
+ "@sprucelabs/jest-json-reporter": "^7.0.175",
82
+ "@sprucelabs/mercury-client": "^41.0.321",
83
+ "@sprucelabs/mercury-event-emitter": "^41.0.321",
84
+ "@sprucelabs/mercury-types": "^46.0.246",
85
+ "@sprucelabs/schema": "^29.4.12",
86
+ "@sprucelabs/spruce-core-schemas": "^39.0.244",
87
+ "@sprucelabs/spruce-event-utils": "^38.0.289",
88
+ "@sprucelabs/spruce-skill-utils": "^30.3.3",
89
+ "@sprucelabs/spruce-templates": "^19.2.0",
90
90
  "@typescript-eslint/eslint-plugin": "^5.27.1",
91
91
  "@typescript-eslint/parser": "^5.27.1",
92
92
  "cfonts": "^3.2.0",
@@ -109,40 +109,40 @@
109
109
  "terminal-kit": "sprucelabsai/terminal-kit",
110
110
  "tree-kill": "^1.2.2",
111
111
  "tsutils": "^3.21.0",
112
- "typescript": "^5.3.3",
112
+ "typescript": "^5.4.2",
113
113
  "uuid": "^9.0.1"
114
114
  },
115
115
  "devDependencies": {
116
- "@sprucelabs/data-stores": "^26.4.13",
116
+ "@sprucelabs/data-stores": "^26.4.38",
117
117
  "@sprucelabs/jest-sheets-reporter": "^3.0.26",
118
- "@sprucelabs/mercury-core-events": "^22.1.73",
119
- "@sprucelabs/resolve-path-aliases": "^1.1.281",
120
- "@sprucelabs/spruce-conversation-plugin": "^60.1.226",
121
- "@sprucelabs/spruce-deploy-plugin": "^60.1.226",
122
- "@sprucelabs/spruce-store-plugin": "^60.1.226",
123
- "@sprucelabs/spruce-test-fixtures": "^60.1.226",
124
- "@sprucelabs/test": "^8.0.40",
125
- "@sprucelabs/test-utils": "^4.0.98",
118
+ "@sprucelabs/mercury-core-events": "^22.2.25",
119
+ "@sprucelabs/resolve-path-aliases": "^1.1.284",
120
+ "@sprucelabs/spruce-conversation-plugin": "^60.1.275",
121
+ "@sprucelabs/spruce-deploy-plugin": "^60.1.275",
122
+ "@sprucelabs/spruce-store-plugin": "^60.1.275",
123
+ "@sprucelabs/spruce-test-fixtures": "^60.1.275",
124
+ "@sprucelabs/test": "^8.0.42",
125
+ "@sprucelabs/test-utils": "^4.0.110",
126
126
  "@types/blessed": "^0.1.25",
127
- "@types/eslint": "^8.56.2",
127
+ "@types/eslint": "^8.56.5",
128
128
  "@types/fs-extra": "^11.0.4",
129
129
  "@types/inquirer": "^8.2.1",
130
130
  "@types/lodash": "^4.14.202",
131
131
  "@types/md5": "^2.3.5",
132
- "@types/node": "^20.11.17",
132
+ "@types/node": "^20.11.25",
133
133
  "@types/promise.allsettled": "^1.0.6",
134
134
  "@types/ps-node": "^0.1.3",
135
- "@types/semver": "^7.5.7",
135
+ "@types/semver": "^7.5.8",
136
136
  "@types/sha1": "^1.1.5",
137
- "@types/slug": "^5.0.7",
138
- "@types/superagent": "^8.1.3",
137
+ "@types/slug": "^5.0.8",
138
+ "@types/superagent": "^8.1.4",
139
139
  "@types/terminal-kit": "^2.5.6",
140
140
  "@types/uuid": "^9.0.8",
141
141
  "chokidar-cli": "^3.0.0",
142
142
  "concurrently": "^8.2.2",
143
143
  "conventional-changelog-sprucelabs": "^1.1.2",
144
- "dotenv": "^16.4.2",
145
- "eslint": "^8.56.0",
144
+ "dotenv": "^16.4.5",
145
+ "eslint": "^8.57.0",
146
146
  "eslint-config-spruce": "^10.13.6",
147
147
  "find-process": "^1.4.7",
148
148
  "jest": "^29.7.0",
@@ -590,5 +590,5 @@
590
590
  "terminal-kit"
591
591
  ]
592
592
  },
593
- "gitHead": "dcb02ceb1d080025175c3680cbde3b6f3ee68d71"
593
+ "gitHead": "3b2eae17e9d551a1e0ebbc05f02bc7ccb2ed6d20"
594
594
  }
@@ -29,6 +29,35 @@ export declare namespace SpruceErrors.SpruceCli {
29
29
 
30
30
 
31
31
 
32
+ export declare namespace SpruceErrors.SpruceCli {
33
+
34
+
35
+ export interface ViewPluginAlreadyExists {
36
+
37
+
38
+ 'name': string
39
+ }
40
+
41
+ export interface ViewPluginAlreadyExistsSchema extends SpruceSchema.Schema {
42
+ id: 'viewPluginAlreadyExists',
43
+ namespace: 'SpruceCli',
44
+ name: 'View plugin already exists',
45
+ fields: {
46
+ /** . */
47
+ 'name': {
48
+ type: 'text',
49
+ isRequired: true,
50
+ options: undefined
51
+ },
52
+ }
53
+ }
54
+
55
+ export type ViewPluginAlreadyExistsEntity = SchemaEntity<SpruceErrors.SpruceCli.ViewPluginAlreadyExistsSchema>
56
+
57
+ }
58
+
59
+
60
+
32
61
  export declare namespace SpruceErrors.SpruceCli {
33
62
 
34
63
 
@@ -4,6 +4,9 @@ import { ErrorOptions as ISpruceErrorOptions} from "@sprucelabs/error"
4
4
  export interface VscodeNotInstalledErrorOptions extends SpruceErrors.SpruceCli.VscodeNotInstalled, ISpruceErrorOptions {
5
5
  code: 'VSCODE_NOT_INSTALLED'
6
6
  }
7
+ export interface ViewPluginAlreadyExistsErrorOptions extends SpruceErrors.SpruceCli.ViewPluginAlreadyExists, ISpruceErrorOptions {
8
+ code: 'VIEW_PLUGIN_ALREADY_EXISTS'
9
+ }
7
10
  export interface TransportAlreadyExistsErrorOptions extends SpruceErrors.SpruceCli.TransportAlreadyExists, ISpruceErrorOptions {
8
11
  code: 'TRANSPORT_ALREADY_EXISTS'
9
12
  }
@@ -122,6 +125,6 @@ export interface ActionCancelledErrorOptions extends SpruceErrors.SpruceCli.Acti
122
125
  code: 'ACTION_CANCELLED'
123
126
  }
124
127
 
125
- type ErrorOptions = | VscodeNotInstalledErrorOptions | TransportAlreadyExistsErrorOptions | ThemeExistsErrorOptions | TestFailedErrorOptions | StoreExistsErrorOptions | SkillViewExistsErrorOptions | SkillNotRegisteredErrorOptions | SkillNotFoundErrorOptions | SchemaTemplateItemBuildingFailedErrorOptions | SchemaFailedToImportErrorOptions | SchemaExistsErrorOptions | NotLoggedInErrorOptions | NotImplementedErrorOptions | NoSkillsRegisteredErrorOptions | NoOrganizationsFoundErrorOptions | MissingDependenciesErrorOptions | MercuryResponseErrorErrorOptions | LintFailedErrorOptions | InvalidTestDirectoryErrorOptions | InvalidFeatureCodeErrorOptions | InvalidEventContractErrorOptions | InvalidCommandErrorOptions | GenericErrorOptions | FileExistsErrorOptions | FeatureNotInstalledErrorOptions | FailedToImportErrorOptions | ExecutingCommandFailedErrorOptions | DockerNotStartedErrorOptions | DirectoryNotSkillErrorOptions | DirectoryEmptyErrorOptions | DeployFailedErrorOptions | DependencyExistsErrorOptions | CreateAutoloaderFailedErrorOptions | CommandNotImplementedErrorOptions | CommandBlockedErrorOptions | CommandAbortedErrorOptions | CacheNotEnabledErrorOptions | BuildFailedErrorOptions | BootErrorErrorOptions | ActionCancelledErrorOptions
128
+ type ErrorOptions = | VscodeNotInstalledErrorOptions | ViewPluginAlreadyExistsErrorOptions | TransportAlreadyExistsErrorOptions | ThemeExistsErrorOptions | TestFailedErrorOptions | StoreExistsErrorOptions | SkillViewExistsErrorOptions | SkillNotRegisteredErrorOptions | SkillNotFoundErrorOptions | SchemaTemplateItemBuildingFailedErrorOptions | SchemaFailedToImportErrorOptions | SchemaExistsErrorOptions | NotLoggedInErrorOptions | NotImplementedErrorOptions | NoSkillsRegisteredErrorOptions | NoOrganizationsFoundErrorOptions | MissingDependenciesErrorOptions | MercuryResponseErrorErrorOptions | LintFailedErrorOptions | InvalidTestDirectoryErrorOptions | InvalidFeatureCodeErrorOptions | InvalidEventContractErrorOptions | InvalidCommandErrorOptions | GenericErrorOptions | FileExistsErrorOptions | FeatureNotInstalledErrorOptions | FailedToImportErrorOptions | ExecutingCommandFailedErrorOptions | DockerNotStartedErrorOptions | DirectoryNotSkillErrorOptions | DirectoryEmptyErrorOptions | DeployFailedErrorOptions | DependencyExistsErrorOptions | CreateAutoloaderFailedErrorOptions | CommandNotImplementedErrorOptions | CommandBlockedErrorOptions | CommandAbortedErrorOptions | CacheNotEnabledErrorOptions | BuildFailedErrorOptions | BootErrorErrorOptions | ActionCancelledErrorOptions
126
129
 
127
130
  export default ErrorOptions
@@ -0,0 +1,22 @@
1
+ import { SchemaRegistry } from '@sprucelabs/schema'
2
+ import { SpruceErrors } from '../errors.types'
3
+
4
+
5
+
6
+ const viewPluginAlreadyExistsSchema: SpruceErrors.SpruceCli.ViewPluginAlreadyExistsSchema = {
7
+ id: 'viewPluginAlreadyExists',
8
+ namespace: 'SpruceCli',
9
+ name: 'View plugin already exists',
10
+ fields: {
11
+ /** . */
12
+ 'name': {
13
+ type: 'text',
14
+ isRequired: true,
15
+ options: undefined
16
+ },
17
+ }
18
+ }
19
+
20
+ SchemaRegistry.getInstance().trackSchema(viewPluginAlreadyExistsSchema)
21
+
22
+ export default viewPluginAlreadyExistsSchema
@@ -23,7 +23,7 @@ export default class CreatingASkillViewTest extends AbstractSkillTest {
23
23
  }
24
24
 
25
25
  @test()
26
- protected static async viewFieatureHasExpectedDependencies() {
26
+ protected static async viewFeatureHasExpectedDependencies() {
27
27
  const features = await this.featureInstaller
28
28
  const view = features.getFeature('view')
29
29
  assert.isEqualDeep(view.dependencies, [
@@ -36,7 +36,7 @@ export default class KeepingViewsInSyncTest extends AbstractSkillTest {
36
36
  }
37
37
 
38
38
  @test()
39
- protected static async generatesValidTypesFileWithNoSkillViewsC() {
39
+ protected static async generatesValidTypesFileWithNoSkillViews() {
40
40
  const results = await this.Action('view', 'create').execute({
41
41
  viewType: 'view',
42
42
  nameReadable: 'test',
@@ -0,0 +1,161 @@
1
+ import { diskUtil } from '@sprucelabs/spruce-skill-utils'
2
+ import { test, assert, errorAssert } from '@sprucelabs/test-utils'
3
+ import { FeatureActionResponse } from '../../../../features/features.types'
4
+ import CreatePluginAction from '../../../../features/view/actions/CreatePluginAction'
5
+ import AbstractSkillTest from '../../../../tests/AbstractSkillTest'
6
+
7
+ export default class CreatingAViewPluginTest extends AbstractSkillTest {
8
+ protected static skillCacheKey = 'views'
9
+ private static action: CreatePluginAction
10
+
11
+ protected static async beforeEach(): Promise<void> {
12
+ await super.beforeEach()
13
+ this.action = this.Action('view', 'createPlugin')
14
+ }
15
+
16
+ @test()
17
+ protected static async hasAction() {
18
+ assert.isFunction(this.action.execute)
19
+ }
20
+
21
+ @test('creates expected plugin file 1', 'test', 'test', 'updated')
22
+ @test('creates expected plugin file 2', 'another', 'another', 'updated')
23
+ @test('creates expected plugin file 3', 'a third', 'aThird', 'generated')
24
+ protected static async createsExpectedFile(
25
+ readable: string,
26
+ expected: string,
27
+ combinedViewAction: string
28
+ ) {
29
+ const results = await this.execute({ nameReadable: readable })
30
+ this.assertExpectedFileCreated(results, expected, combinedViewAction)
31
+ assert.isFalsy(
32
+ results.errors,
33
+ 'Errors were returned and none were expected!'
34
+ )
35
+ }
36
+
37
+ @test()
38
+ protected static async usesCamelNameIfProvided() {
39
+ const results = await this.execute({
40
+ nameReadable: 'test',
41
+ nameCamel: 'testCamel',
42
+ })
43
+
44
+ this.assertExpectedFileCreated(results, 'testCamel', 'updated')
45
+ }
46
+
47
+ @test()
48
+ protected static async actuallyCreatesFile() {
49
+ this.assertViewPluginWritten('test')
50
+ this.assertViewPluginWritten('another')
51
+ this.assertViewPluginWritten('aThird')
52
+ }
53
+
54
+ @test()
55
+ protected static async throwsIfPluginAlreadyExists() {
56
+ await this.assertThrowsAlreadyExists('test')
57
+ await this.assertThrowsAlreadyExists('another')
58
+ }
59
+
60
+ @test()
61
+ protected static async contentsAreEqualToExpected() {
62
+ this.assertPluginContentsEqualExpected('test', 'Test')
63
+ this.assertPluginContentsEqualExpected('another', 'Another')
64
+ this.assertPluginContentsEqualExpected('aThird', 'AThird')
65
+ }
66
+
67
+ @test()
68
+ protected static async combineViewsFileIsValid() {
69
+ const combined = this.getPathToCombinedViewsFile()
70
+ await this.Service('typeChecker').check(combined)
71
+ }
72
+
73
+ @test()
74
+ protected static async updatesViewCombinedFileWithTypesAsExpected() {
75
+ const expected = ` interface ViewControllerPlugins {
76
+ aThird: AThirdViewPlugin
77
+ another: AnotherViewPlugin
78
+ test: TestViewPlugin
79
+ testCamel: TestCamelViewPlugin
80
+ }`
81
+ this.assertCombinedFileIncludes(expected)
82
+ }
83
+
84
+ @test()
85
+ protected static async updatesViewCombinedWithPluginsAsExpected() {
86
+ const expected = `export const pluginClasses = {
87
+ aThird: AThirdViewPlugin,
88
+ another: AnotherViewPlugin,
89
+ test: TestViewPlugin,
90
+ testCamel: TestCamelViewPlugin,
91
+ }
92
+ `
93
+
94
+ this.assertCombinedFileIncludes(expected)
95
+ this.assertCombinedFileIncludes('heartwood(vcs, pluginClasses)')
96
+ }
97
+
98
+ private static assertCombinedFileIncludes(expected: string) {
99
+ const combined = this.getPathToCombinedViewsFile()
100
+ const contents = diskUtil.readFile(combined)
101
+ assert.doesInclude(contents, expected)
102
+ }
103
+
104
+ private static assertPluginContentsEqualExpected(
105
+ nameCamel: string,
106
+ namePascal: string
107
+ ) {
108
+ const contents = diskUtil.readFile(this.buildPathToViewPlugin(nameCamel))
109
+ const expected = `export default class ${namePascal}ViewPlugin {}`
110
+
111
+ assert.isEqual(contents.trim(), expected.trim())
112
+ }
113
+
114
+ private static async assertThrowsAlreadyExists(name: string) {
115
+ const results = await this.execute({ nameReadable: name })
116
+ assert.isTruthy(results.errors)
117
+ errorAssert.assertError(results.errors[0], 'VIEW_PLUGIN_ALREADY_EXISTS', {
118
+ name,
119
+ })
120
+ }
121
+
122
+ private static assertViewPluginWritten(name: string) {
123
+ const path = this.buildPathToViewPlugin(name)
124
+ assert.isTrue(diskUtil.doesFileExist(path), `File ${path} was not written!`)
125
+ }
126
+
127
+ private static buildPathToViewPlugin(name: string) {
128
+ return this.resolvePath('src', 'viewPlugins', `${name}.view.plugin.ts`)
129
+ }
130
+
131
+ private static async execute(options: {
132
+ nameReadable: string
133
+ nameCamel?: string
134
+ }) {
135
+ return await this.action.execute(options)
136
+ }
137
+
138
+ private static assertExpectedFileCreated(
139
+ results: FeatureActionResponse,
140
+ expected: string,
141
+ combinedViewAction: string
142
+ ) {
143
+ const expectedName = `${expected}.view.plugin.ts`
144
+
145
+ assert.doesInclude(results.files?.[0], {
146
+ action: 'generated',
147
+ name: expectedName,
148
+ path: this.resolvePath('src', 'viewPlugins', expectedName),
149
+ })
150
+
151
+ assert.doesInclude(results.files?.[1], {
152
+ action: combinedViewAction,
153
+ name: 'views.ts',
154
+ path: this.getPathToCombinedViewsFile(),
155
+ })
156
+ }
157
+
158
+ private static getPathToCombinedViewsFile() {
159
+ return this.resolveHashSprucePath('views', 'views.ts')
160
+ }
161
+ }
@@ -260,6 +260,10 @@ export default class SpruceError extends AbstractSpruceError<ErrorOptions> {
260
260
  message = `You already have ${options.namespace} as a dependency!`
261
261
  break
262
262
 
263
+ case 'VIEW_PLUGIN_ALREADY_EXISTS':
264
+ message = `A view plugin by the name ${options.name} already exists!`
265
+ break
266
+
263
267
  default:
264
268
  message = super.friendlyMessage()
265
269
  }
@@ -0,0 +1,12 @@
1
+ import { buildErrorSchema } from '@sprucelabs/schema'
2
+
3
+ export default buildErrorSchema({
4
+ id: 'viewPluginAlreadyExists',
5
+ name: 'View plugin already exists',
6
+ fields: {
7
+ name: {
8
+ type: 'text',
9
+ isRequired: true,
10
+ },
11
+ },
12
+ })