@sprucelabs/spruce-cli 18.2.0 → 18.3.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 (294) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/.spruce/events/events.contract.d.ts +159 -0
  3. package/build/.spruce/events/events.contract.js +5 -1
  4. package/build/.spruce/events/events.contract.js.map +1 -1
  5. package/build/.spruce/events/heartwood/getActiveTheme.v2021_02_11.contract.d.ts +46 -0
  6. package/build/.spruce/events/heartwood/getActiveTheme.v2021_02_11.contract.js +57 -0
  7. package/build/.spruce/events/heartwood/getActiveTheme.v2021_02_11.contract.js.map +1 -0
  8. package/build/.spruce/events/heartwood/registerDashboardCards.v2021_02_11.contract.d.ts +68 -0
  9. package/build/.spruce/events/heartwood/registerDashboardCards.v2021_02_11.contract.js +78 -0
  10. package/build/.spruce/events/heartwood/registerDashboardCards.v2021_02_11.contract.js.map +1 -0
  11. package/build/.spruce/events/heartwood/upsertTheme.v2021_02_11.contract.d.ts +40 -0
  12. package/build/.spruce/events/heartwood/upsertTheme.v2021_02_11.contract.js +51 -0
  13. package/build/.spruce/events/heartwood/upsertTheme.v2021_02_11.contract.js.map +1 -0
  14. package/build/.spruce/events/spruceCli/registerSkillViews.v2021_04_11.contract.d.ts +9 -0
  15. package/build/.spruce/events/spruceCli/registerSkillViews.v2021_04_11.contract.js +17 -0
  16. package/build/.spruce/events/spruceCli/registerSkillViews.v2021_04_11.contract.js.map +1 -0
  17. package/build/.spruce/schemas/schemas.types.d.ts +158 -55
  18. package/build/.spruce/schemas/schemas.types.js.map +1 -1
  19. package/build/.spruce/schemas/spruceCli/v2020_07_22/actionResponse.schema.d.ts +3 -0
  20. package/build/.spruce/schemas/spruceCli/v2020_07_22/actionResponse.schema.js +70 -0
  21. package/build/.spruce/schemas/spruceCli/v2020_07_22/actionResponse.schema.js.map +1 -0
  22. package/build/.spruce/schemas/spruceCli/v2020_07_22/npmPackage.schema.d.ts +3 -0
  23. package/build/.spruce/schemas/spruceCli/v2020_07_22/npmPackage.schema.js +35 -0
  24. package/build/.spruce/schemas/spruceCli/v2020_07_22/npmPackage.schema.js.map +1 -0
  25. package/build/.spruce/settings.json +2 -1
  26. package/build/GlobalEmitter.d.ts +13 -38
  27. package/build/GlobalEmitter.js +3 -6
  28. package/build/GlobalEmitter.js.map +1 -1
  29. package/build/__tests__/behavioral/TestingAConversation.test.d.ts +2 -1
  30. package/build/__tests__/behavioral/TestingAConversation.test.js +74 -84
  31. package/build/__tests__/behavioral/TestingAConversation.test.js.map +1 -1
  32. package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js +38 -13
  33. package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js.map +1 -1
  34. package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.d.ts +1 -0
  35. package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.js +16 -9
  36. package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.js.map +1 -1
  37. package/build/__tests__/behavioral/permissions/CreatingPermissions.test.d.ts +2 -2
  38. package/build/__tests__/behavioral/permissions/CreatingPermissions.test.js +7 -7
  39. package/build/__tests__/behavioral/permissions/CreatingPermissions.test.js.map +1 -1
  40. package/build/__tests__/behavioral/permissions/PermissionPlugin.test.d.ts +6 -0
  41. package/build/__tests__/behavioral/permissions/PermissionPlugin.test.js +85 -0
  42. package/build/__tests__/behavioral/permissions/PermissionPlugin.test.js.map +1 -0
  43. package/build/__tests__/behavioral/permissions/PermissionStore.test.d.ts +5 -4
  44. package/build/__tests__/behavioral/permissions/PermissionStore.test.js +96 -63
  45. package/build/__tests__/behavioral/permissions/PermissionStore.test.js.map +1 -1
  46. package/build/__tests__/behavioral/permissions/PermissionWriter.test.d.ts +5 -0
  47. package/build/__tests__/behavioral/permissions/PermissionWriter.test.js +88 -0
  48. package/build/__tests__/behavioral/permissions/PermissionWriter.test.js.map +1 -0
  49. package/build/__tests__/behavioral/permissions/SyncingPermissions.test.d.ts +15 -4
  50. package/build/__tests__/behavioral/permissions/SyncingPermissions.test.js +325 -28
  51. package/build/__tests__/behavioral/permissions/SyncingPermissions.test.js.map +1 -1
  52. package/build/__tests__/behavioral/permissions/support/AbstractPermissionsTest.d.ts +11 -0
  53. package/build/__tests__/behavioral/permissions/{AbstractPermissionsTest.js → support/AbstractPermissionsTest.js} +34 -2
  54. package/build/__tests__/behavioral/permissions/support/AbstractPermissionsTest.js.map +1 -0
  55. package/build/__tests__/behavioral/permissions/support/generateShortAlphaId.d.ts +1 -0
  56. package/build/__tests__/behavioral/permissions/support/generateShortAlphaId.js +11 -0
  57. package/build/__tests__/behavioral/permissions/support/generateShortAlphaId.js.map +1 -0
  58. package/build/__tests__/behavioral/permissions/support/renderPermissionTestFile.d.ts +1 -0
  59. package/build/__tests__/behavioral/permissions/support/renderPermissionTestFile.js +17 -0
  60. package/build/__tests__/behavioral/permissions/support/renderPermissionTestFile.js.map +1 -0
  61. package/build/__tests__/behavioral/permissions/support/sortPermissionContracts.d.ts +5 -0
  62. package/build/__tests__/behavioral/permissions/support/sortPermissionContracts.js +10 -0
  63. package/build/__tests__/behavioral/permissions/support/sortPermissionContracts.js.map +1 -0
  64. package/build/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.d.ts +1 -1
  65. package/build/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.js +46 -46
  66. package/build/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.js.map +1 -1
  67. package/build/__tests__/behavioral/tests/CreatingATest.test.js +2 -2
  68. package/build/__tests__/behavioral/tests/CreatingATest.test.js.map +1 -1
  69. package/build/__tests__/behavioral/upgrading/UpgradingANodeModule.test.js +7 -3
  70. package/build/__tests__/behavioral/upgrading/UpgradingANodeModule.test.js.map +1 -1
  71. package/build/__tests__/behavioral/upgrading/UpgradingASkill3.test.js +2 -2
  72. package/build/__tests__/behavioral/upgrading/UpgradingASkill3.test.js.map +1 -1
  73. package/build/__tests__/behavioral/upgrading/UpgradingASkill4.test.js +1 -1
  74. package/build/__tests__/behavioral/upgrading/UpgradingASkill4.test.js.map +1 -1
  75. package/build/__tests__/implementation/ActionExecuter2.test.d.ts +1 -1
  76. package/build/__tests__/implementation/ActionExecuter2.test.js +23 -11
  77. package/build/__tests__/implementation/ActionExecuter2.test.js.map +1 -1
  78. package/build/__tests__/implementation/GlobalEmitter.test.d.ts +1 -0
  79. package/build/__tests__/implementation/GlobalEmitter.test.js +40 -3
  80. package/build/__tests__/implementation/GlobalEmitter.test.js.map +1 -1
  81. package/build/__tests__/implementation/SkillStore.test.js +3 -4
  82. package/build/__tests__/implementation/SkillStore.test.js.map +1 -1
  83. package/build/features/AbstractAction.d.ts +1 -1
  84. package/build/features/AbstractAction.js.map +1 -1
  85. package/build/features/AbstractFeature.d.ts +3 -3
  86. package/build/features/AbstractFeature.js +8 -8
  87. package/build/features/AbstractFeature.js.map +1 -1
  88. package/build/features/ActionExecuter.d.ts +1 -1
  89. package/build/features/ActionExecuter.js +3 -4
  90. package/build/features/ActionExecuter.js.map +1 -1
  91. package/build/features/ActionFactory.d.ts +12 -5
  92. package/build/features/ActionFactory.js +27 -6
  93. package/build/features/ActionFactory.js.map +1 -1
  94. package/build/features/ActionQuestionAsker.d.ts +1 -1
  95. package/build/features/ActionQuestionAsker.js +6 -6
  96. package/build/features/ActionQuestionAsker.js.map +1 -1
  97. package/build/features/conversation/ConversationFeature.js +1 -1
  98. package/build/features/conversation/ConversationFeature.js.map +1 -1
  99. package/build/features/dependencies/DependencyFeature.js +1 -1
  100. package/build/features/dependencies/DependencyFeature.js.map +1 -1
  101. package/build/features/deploy/actions/HerokuAction.js +31 -33
  102. package/build/features/deploy/actions/HerokuAction.js.map +1 -1
  103. package/build/features/error/ErrorFeature.js +4 -4
  104. package/build/features/error/ErrorFeature.js.map +1 -1
  105. package/build/features/event/EventFeature.d.ts +8 -8
  106. package/build/features/event/EventFeature.js +7 -4
  107. package/build/features/event/EventFeature.js.map +1 -1
  108. package/build/features/event/actions/CreateAction.js.map +1 -1
  109. package/build/features/event/actions/ListenAction.js.map +1 -1
  110. package/build/features/event/stores/EventStore.d.ts +9 -9
  111. package/build/features/event/stores/EventStore.js +26 -26
  112. package/build/features/event/stores/EventStore.js.map +1 -1
  113. package/build/features/eventContract/EventContractFeature.js +4 -1
  114. package/build/features/eventContract/EventContractFeature.js.map +1 -1
  115. package/build/features/eventContract/actions/PullAction.js +10 -5
  116. package/build/features/eventContract/actions/PullAction.js.map +1 -1
  117. package/build/features/features.types.d.ts +2 -37
  118. package/build/features/features.types.js +0 -41
  119. package/build/features/features.types.js.map +1 -1
  120. package/build/features/log/LogFeature.js +1 -1
  121. package/build/features/log/LogFeature.js.map +1 -1
  122. package/build/features/node/NodeFeature.js.map +1 -1
  123. package/build/features/organization/actions/InstallAction.js.map +1 -1
  124. package/build/features/permission/PermissionFeature.d.ts +12 -2
  125. package/build/features/permission/PermissionFeature.js +140 -15
  126. package/build/features/permission/PermissionFeature.js.map +1 -1
  127. package/build/features/permission/actions/CreateAction.js +4 -1
  128. package/build/features/permission/actions/CreateAction.js.map +1 -1
  129. package/build/features/permission/actions/SyncAction.d.ts +5 -1
  130. package/build/features/permission/actions/SyncAction.js +28 -10
  131. package/build/features/permission/actions/SyncAction.js.map +1 -1
  132. package/build/features/permission/stores/PermissionStore.d.ts +6 -1
  133. package/build/features/permission/stores/PermissionStore.js +43 -31
  134. package/build/features/permission/stores/PermissionStore.js.map +1 -1
  135. package/build/features/permission/writers/PermissionWriter.d.ts +7 -1
  136. package/build/features/permission/writers/PermissionWriter.js +66 -17
  137. package/build/features/permission/writers/PermissionWriter.js.map +1 -1
  138. package/build/features/person/PersonFeature.js +1 -1
  139. package/build/features/person/PersonFeature.js.map +1 -1
  140. package/build/features/sandbox/SandboxFeature.js +1 -1
  141. package/build/features/sandbox/SandboxFeature.js.map +1 -1
  142. package/build/features/schema/SchemaFeature.d.ts +8 -8
  143. package/build/features/schema/SchemaFeature.js +4 -4
  144. package/build/features/schema/SchemaFeature.js.map +1 -1
  145. package/build/features/schema/writers/SchemaWriter.d.ts +12 -12
  146. package/build/features/schema/writers/SchemaWriter.js.map +1 -1
  147. package/build/features/skill/SkillFeature.d.ts +11 -11
  148. package/build/features/skill/SkillFeature.js +2 -2
  149. package/build/features/skill/SkillFeature.js.map +1 -1
  150. package/build/features/skill/actions/RebuildAction.js.map +1 -1
  151. package/build/features/skill/actions/RegisterAction.js.map +1 -1
  152. package/build/features/skill/stores/SkillStore.js +1 -2
  153. package/build/features/skill/stores/SkillStore.js.map +1 -1
  154. package/build/features/store/StoreFeature.js +1 -1
  155. package/build/features/store/StoreFeature.js.map +1 -1
  156. package/build/features/store/actions/SyncAction.d.ts +1 -1
  157. package/build/features/store/actions/SyncAction.js.map +1 -1
  158. package/build/features/test/TestFeature.js +1 -1
  159. package/build/features/test/TestFeature.js.map +1 -1
  160. package/build/features/view/ViewFeature.js +1 -1
  161. package/build/features/view/ViewFeature.js.map +1 -1
  162. package/build/schemas/v2020_07_22/actionResponse.builder.d.ts +85 -0
  163. package/build/schemas/v2020_07_22/actionResponse.builder.js +70 -0
  164. package/build/schemas/v2020_07_22/actionResponse.builder.js.map +1 -0
  165. package/build/schemas/v2020_07_22/generatedFile.builder.d.ts +27 -0
  166. package/build/schemas/v2020_07_22/generatedFile.builder.js +45 -0
  167. package/build/schemas/v2020_07_22/generatedFile.builder.js.map +1 -0
  168. package/build/schemas/v2020_07_22/watcherDidDetectChangesEmitPayload.builder.js +4 -40
  169. package/build/schemas/v2020_07_22/watcherDidDetectChangesEmitPayload.builder.js.map +1 -1
  170. package/build/services/CommandService.d.ts +2 -2
  171. package/build/services/CommandService.js +6 -6
  172. package/build/services/CommandService.js.map +1 -1
  173. package/build/services/PkgService.d.ts +1 -0
  174. package/build/services/PkgService.js +5 -0
  175. package/build/services/PkgService.js.map +1 -1
  176. package/build/tests/AbstractCliTest.d.ts +7 -3
  177. package/build/tests/AbstractCliTest.js +81 -45
  178. package/build/tests/AbstractCliTest.js.map +1 -1
  179. package/build/tests/buildTestCache.js +7 -0
  180. package/build/tests/buildTestCache.js.map +1 -1
  181. package/build/tests/fixtures/FeatureFixture.js +1 -0
  182. package/build/tests/fixtures/FeatureFixture.js.map +1 -1
  183. package/build/tests/utilities/test.utility.d.ts +2 -0
  184. package/build/tests/utilities/test.utility.js +6 -0
  185. package/build/tests/utilities/test.utility.js.map +1 -1
  186. package/node_modules/@typescript-eslint/parser/package.json +5 -5
  187. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts +4 -2
  188. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts.map +1 -1
  189. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js +13 -5
  190. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js.map +1 -1
  191. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts +2 -1
  192. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts.map +1 -1
  193. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js +3 -0
  194. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js.map +1 -1
  195. package/node_modules/@typescript-eslint/scope-manager/package.json +5 -5
  196. package/node_modules/@typescript-eslint/types/_ts3.4/dist/generated/ast-spec.d.ts +20 -2
  197. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +20 -2
  198. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map +1 -1
  199. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js +2 -0
  200. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js.map +1 -1
  201. package/node_modules/@typescript-eslint/types/package.json +2 -2
  202. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/estree-to-ts-node-types.d.ts +2 -0
  203. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/ts-nodes.d.ts +2 -0
  204. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts.map +1 -1
  205. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js +15 -3
  206. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map +1 -1
  207. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts +2 -0
  208. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts.map +1 -1
  209. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts +2 -0
  210. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts.map +1 -1
  211. package/node_modules/@typescript-eslint/typescript-estree/package.json +5 -5
  212. package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.d.ts.map +1 -1
  213. package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js +63 -49
  214. package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js.map +1 -1
  215. package/node_modules/@typescript-eslint/visitor-keys/package.json +3 -3
  216. package/package.json +65 -33
  217. package/src/.spruce/events/events.contract.ts +24 -0
  218. package/src/.spruce/events/heartwood/getActiveTheme.v2021_02_11.contract.ts +54 -0
  219. package/src/.spruce/events/heartwood/registerDashboardCards.v2021_02_11.contract.ts +79 -0
  220. package/src/.spruce/events/heartwood/upsertTheme.v2021_02_11.contract.ts +48 -0
  221. package/src/.spruce/events/spruceCli/registerSkillViews.v2021_04_11.contract.ts +13 -0
  222. package/src/.spruce/schemas/schemas.types.ts +171 -52
  223. package/src/.spruce/schemas/spruceCli/v2020_07_22/actionResponse.schema.ts +58 -0
  224. package/src/.spruce/schemas/spruceCli/v2020_07_22/npmPackage.schema.ts +33 -0
  225. package/src/.spruce/settings.json +2 -1
  226. package/src/GlobalEmitter.ts +2 -7
  227. package/src/__tests__/behavioral/TestingAConversation.test.ts +20 -37
  228. package/src/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.ts +14 -2
  229. package/src/__tests__/behavioral/events/SkillEmitsBootEvents.test.ts +6 -0
  230. package/src/__tests__/behavioral/permissions/CreatingPermissions.test.ts +2 -2
  231. package/src/__tests__/behavioral/permissions/PermissionPlugin.test.ts +24 -0
  232. package/src/__tests__/behavioral/permissions/PermissionStore.test.ts +95 -38
  233. package/src/__tests__/behavioral/permissions/PermissionWriter.test.ts +23 -0
  234. package/src/__tests__/behavioral/permissions/SyncingPermissions.test.ts +125 -8
  235. package/src/__tests__/behavioral/permissions/support/AbstractPermissionsTest.ts +38 -0
  236. package/src/__tests__/behavioral/permissions/support/generateShortAlphaId.ts +5 -0
  237. package/src/__tests__/behavioral/permissions/support/renderPermissionTestFile.ts +27 -0
  238. package/src/__tests__/behavioral/permissions/support/sortPermissionContracts.ts +3 -0
  239. package/src/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.ts +12 -12
  240. package/src/__tests__/behavioral/tests/CreatingATest.test.ts +2 -2
  241. package/src/__tests__/behavioral/upgrading/UpgradingANodeModule.test.ts +3 -0
  242. package/src/__tests__/behavioral/upgrading/UpgradingASkill3.test.ts +3 -2
  243. package/src/__tests__/behavioral/upgrading/UpgradingASkill4.test.ts +1 -1
  244. package/src/__tests__/implementation/ActionExecuter2.test.ts +13 -6
  245. package/src/__tests__/implementation/GlobalEmitter.test.ts +22 -1
  246. package/src/__tests__/implementation/SkillStore.test.ts +1 -2
  247. package/src/features/AbstractAction.ts +2 -2
  248. package/src/features/AbstractFeature.ts +8 -8
  249. package/src/features/ActionExecuter.ts +4 -5
  250. package/src/features/ActionFactory.ts +44 -20
  251. package/src/features/ActionQuestionAsker.ts +17 -17
  252. package/src/features/conversation/ConversationFeature.ts +1 -1
  253. package/src/features/dependencies/DependencyFeature.ts +1 -1
  254. package/src/features/deploy/actions/HerokuAction.ts +2 -2
  255. package/src/features/error/ErrorFeature.ts +4 -4
  256. package/src/features/event/EventFeature.ts +15 -14
  257. package/src/features/event/actions/CreateAction.ts +1 -1
  258. package/src/features/event/actions/ListenAction.ts +1 -1
  259. package/src/features/event/stores/EventStore.ts +37 -37
  260. package/src/features/eventContract/EventContractFeature.ts +6 -1
  261. package/src/features/eventContract/actions/PullAction.ts +7 -3
  262. package/src/features/features.types.ts +4 -41
  263. package/src/features/log/LogFeature.ts +1 -1
  264. package/src/features/node/NodeFeature.ts +1 -1
  265. package/src/features/organization/actions/InstallAction.ts +1 -1
  266. package/src/features/permission/PermissionFeature.ts +66 -11
  267. package/src/features/permission/actions/CreateAction.ts +2 -0
  268. package/src/features/permission/actions/SyncAction.ts +22 -3
  269. package/src/features/permission/stores/PermissionStore.ts +27 -8
  270. package/src/features/permission/writers/PermissionWriter.ts +64 -3
  271. package/src/features/person/PersonFeature.ts +1 -1
  272. package/src/features/sandbox/SandboxFeature.ts +1 -3
  273. package/src/features/schema/SchemaFeature.ts +14 -14
  274. package/src/features/schema/writers/SchemaWriter.ts +14 -15
  275. package/src/features/skill/SkillFeature.ts +18 -18
  276. package/src/features/skill/actions/RebuildAction.ts +1 -1
  277. package/src/features/skill/actions/RegisterAction.ts +1 -1
  278. package/src/features/skill/stores/SkillStore.ts +1 -2
  279. package/src/features/store/StoreFeature.ts +1 -1
  280. package/src/features/store/actions/SyncAction.ts +1 -1
  281. package/src/features/test/TestFeature.ts +1 -1
  282. package/src/features/view/ViewFeature.ts +1 -1
  283. package/src/schemas/v2020_07_22/actionResponse.builder.ts +62 -0
  284. package/src/schemas/v2020_07_22/generatedFile.builder.ts +44 -0
  285. package/src/schemas/v2020_07_22/watcherDidDetectChangesEmitPayload.builder.ts +3 -46
  286. package/src/services/CommandService.ts +5 -5
  287. package/src/services/PkgService.ts +4 -0
  288. package/src/tests/AbstractCliTest.ts +31 -13
  289. package/src/tests/buildTestCache.ts +7 -0
  290. package/src/tests/fixtures/FeatureFixture.ts +2 -0
  291. package/src/tests/utilities/test.utility.ts +13 -0
  292. package/build/__tests__/behavioral/permissions/AbstractPermissionsTest.d.ts +0 -8
  293. package/build/__tests__/behavioral/permissions/AbstractPermissionsTest.js.map +0 -1
  294. package/src/__tests__/behavioral/permissions/AbstractPermissionsTest.ts +0 -20
@@ -47,15 +47,15 @@ export default abstract class AbstractFeature<
47
47
  public cwd: string
48
48
  public scripts: Record<string, any> = {}
49
49
  public actionsDir: string | undefined
50
- protected actionFactory?: ActionFactory
50
+ protected actions?: ActionFactory
51
51
  protected templates: Templates
52
52
  protected emitter: GlobalEmitter
53
- protected featureInstaller: FeatureInstaller
53
+ protected features: FeatureInstaller
54
54
  protected ui: GraphicsInterface
55
55
 
56
56
  private serviceFactory: ServiceFactory
57
57
  private storeFactory: StoreFactory
58
- private writerFactory: WriterFactory
58
+ private writers: WriterFactory
59
59
  private apiClientFactory: ApiClientFactory
60
60
  private actionExecuter: ActionExecuter
61
61
  private actionCodes?: string[]
@@ -64,16 +64,16 @@ export default abstract class AbstractFeature<
64
64
  this.cwd = options.cwd
65
65
  this.serviceFactory = options.serviceFactory
66
66
  this.templates = options.templates
67
- this.actionFactory = options.actionFactory
67
+ this.actions = options.actionFactory
68
68
  this.storeFactory = options.storeFactory
69
- this.writerFactory = new WriterFactory({
69
+ this.writers = new WriterFactory({
70
70
  templates: this.templates,
71
71
  ui: options.ui,
72
72
  settings: this.Service('settings'),
73
73
  linter: this.Service('lint'),
74
74
  })
75
75
  this.emitter = options.emitter
76
- this.featureInstaller = options.featureInstaller
76
+ this.features = options.featureInstaller
77
77
  this.ui = options.ui
78
78
  this.apiClientFactory = options.apiClientFactory
79
79
  this.actionExecuter = options.actionExecuter
@@ -103,7 +103,7 @@ export default abstract class AbstractFeature<
103
103
  code: C,
104
104
  options?: Partial<WriterOptions>
105
105
  ): WriterMap[C] {
106
- return this.writerFactory.Writer(code, {
106
+ return this.writers.Writer(code, {
107
107
  fileDescriptions: this.fileDescriptions,
108
108
  linter: this.Service('lint'),
109
109
  ...options,
@@ -111,7 +111,7 @@ export default abstract class AbstractFeature<
111
111
  }
112
112
 
113
113
  public getFeature<Code extends FeatureCode>(code: Code) {
114
- return this.featureInstaller.getFeature(code)
114
+ return this.features.getFeature(code)
115
115
  }
116
116
 
117
117
  public async getAvailableActionCodes(): Promise<string[]> {
@@ -17,7 +17,7 @@ import {
17
17
  export default class ActionExecuter {
18
18
  private emitter: GlobalEmitter
19
19
  private ui: GraphicsInterface
20
- private actionFactory: ActionFactory
20
+ private actions: ActionFactory
21
21
  private featureInstallerFactory: () => FeatureInstaller
22
22
  private shouldAutoHandleDependencies: boolean
23
23
  private shouldThrowOnListenerError: boolean
@@ -26,7 +26,7 @@ export default class ActionExecuter {
26
26
  this.featureInstallerFactory = options.featureInstallerFactory
27
27
  this.emitter = options.emitter
28
28
  this.ui = options.ui
29
- this.actionFactory = options.actionFactory
29
+ this.actions = options.actionFactory
30
30
  this.shouldAutoHandleDependencies =
31
31
  options.shouldAutoHandleDependencies ?? true
32
32
 
@@ -122,7 +122,7 @@ export default class ActionExecuter {
122
122
  executeResults = await originalExecute({
123
123
  ...answers,
124
124
  })
125
- } catch (err) {
125
+ } catch (err: any) {
126
126
  executeResults.errors = [err]
127
127
  }
128
128
 
@@ -169,8 +169,7 @@ export default class ActionExecuter {
169
169
  ): FeatureAction {
170
170
  const featureInstaller = this.getFeatureInstaller()
171
171
 
172
- const actionFactory = this.actionFactory
173
- const action = actionFactory.Action({
172
+ const action = this.actions.Action({
174
173
  featureCode,
175
174
  actionCode,
176
175
  actionExecuter: this,
@@ -14,20 +14,11 @@ import ActionExecuter from './ActionExecuter'
14
14
  import FeatureInstaller from './FeatureInstaller'
15
15
  import OverrideActionDecorator from './OverrideActionDecorator'
16
16
 
17
- export interface FeatureActionFactoryOptions
18
- extends Omit<
19
- ActionOptions,
20
- 'parent' | 'actionExecuter' | 'featureInstaller'
21
- > {
22
- emitter: GlobalEmitter
23
- blockedCommands?: BlockedCommands
24
- optionOverrides?: OptionOverrides
25
- }
26
-
27
17
  export default class ActionFactory {
28
18
  private actionOptions: FeatureActionFactoryOptions
29
19
  private blockedCommands?: BlockedCommands
30
20
  private optionOverrides?: OptionOverrides
21
+ private static overrides: Record<string, ActionConstructor> = {}
31
22
 
32
23
  public constructor(options: FeatureActionFactoryOptions) {
33
24
  const { blockedCommands, optionOverrides, ...actionOptions } = options
@@ -53,19 +44,23 @@ export default class ActionFactory {
53
44
  )
54
45
  }
55
46
 
56
- const classPath = diskUtil.resolvePath(
57
- feature.actionsDir,
58
- `${namesUtil.toPascal(actionCode)}Action`
59
- )
60
-
61
47
  let Class: new (options: ActionOptions) => AbstractAction | undefined
62
48
  let originalError: Error | undefined
63
49
 
64
- try {
65
- Class = require(classPath).default
66
- // eslint-disable-next-line no-empty
67
- } catch (err: any) {
68
- originalError = err
50
+ const key = ActionFactory.overrideKey(featureCode, actionCode)
51
+ if (ActionFactory.overrides[key]) {
52
+ Class = ActionFactory.overrides[key]
53
+ } else {
54
+ const classPath = diskUtil.resolvePath(
55
+ feature.actionsDir,
56
+ `${namesUtil.toPascal(actionCode)}Action`
57
+ )
58
+ try {
59
+ Class = require(classPath).default
60
+ // eslint-disable-next-line no-empty
61
+ } catch (err: any) {
62
+ originalError = err
63
+ }
69
64
  }
70
65
 
71
66
  //@ts-ignore
@@ -109,4 +104,33 @@ export default class ActionFactory {
109
104
 
110
105
  return actionDecorator as FeatureAction<S>
111
106
  }
107
+
108
+ public static setActionClass(
109
+ featureCode: FeatureCode,
110
+ action: string,
111
+ ExecuteTrackingAction: ActionConstructor
112
+ ) {
113
+ this.overrides[ActionFactory.overrideKey(featureCode, action)] =
114
+ ExecuteTrackingAction
115
+ }
116
+
117
+ private static overrideKey(featureCode: string, action: string) {
118
+ return `${featureCode}${action}`
119
+ }
120
+
121
+ public static clearActionOverrides() {
122
+ this.overrides = {}
123
+ }
124
+ }
125
+
126
+ export interface FeatureActionFactoryOptions
127
+ extends Omit<
128
+ ActionOptions,
129
+ 'parent' | 'actionExecuter' | 'featureInstaller'
130
+ > {
131
+ emitter: GlobalEmitter
132
+ blockedCommands?: BlockedCommands
133
+ optionOverrides?: OptionOverrides
112
134
  }
135
+
136
+ type ActionConstructor = new (options: ActionOptions) => AbstractAction
@@ -15,23 +15,6 @@ import {
15
15
  FeatureMap,
16
16
  } from './features.types'
17
17
 
18
- type FeatureCommandExecuteOptions<
19
- F extends FeatureCode,
20
- S extends Schema | undefined = FeatureMap[F]['optionsSchema']
21
- > = S extends Schema ? SchemaPartialValues<S> : undefined
22
-
23
- type FeatureDependencyWithFeature = FeatureDependency & {
24
- feature: AbstractFeature
25
- }
26
-
27
- function s(array: any[]) {
28
- return array.length === 1 ? '' : ''
29
- }
30
-
31
- function areIs(array: any[]) {
32
- return array.length === 1 ? 'is' : 'are'
33
- }
34
-
35
18
  export default class ActionOptionAsker<F extends FeatureCode = FeatureCode> {
36
19
  private ui: GraphicsInterface
37
20
  private featureInstaller: FeatureInstaller
@@ -388,3 +371,20 @@ export default class ActionOptionAsker<F extends FeatureCode = FeatureCode> {
388
371
  return `Before you can run \`${this.getCommandName()}\`, ${message} Don't worry, I'll walk you through it!`
389
372
  }
390
373
  }
374
+
375
+ type FeatureCommandExecuteOptions<
376
+ F extends FeatureCode,
377
+ S extends Schema | undefined = FeatureMap[F]['optionsSchema']
378
+ > = S extends Schema ? SchemaPartialValues<S> : undefined
379
+
380
+ type FeatureDependencyWithFeature = FeatureDependency & {
381
+ feature: AbstractFeature
382
+ }
383
+
384
+ function s(array: any[]) {
385
+ return array.length === 1 ? '' : ''
386
+ }
387
+
388
+ function areIs(array: any[]) {
389
+ return array.length === 1 ? 'is' : 'are'
390
+ }
@@ -42,7 +42,7 @@ export default class ConversationFeature extends AbstractFeature {
42
42
  actionCode: string
43
43
  featureCode: string
44
44
  }) {
45
- const isInstalled = await this.featureInstaller.isInstalled('conversation')
45
+ const isInstalled = await this.features.isInstalled('conversation')
46
46
 
47
47
  if (
48
48
  payload.featureCode === 'node' &&
@@ -22,6 +22,6 @@ export default class DependencyFeature extends AbstractFeature {
22
22
  public packageDependencies = []
23
23
 
24
24
  public async isInstalled() {
25
- return this.featureInstaller.isInstalled('skill')
25
+ return this.features.isInstalled('skill')
26
26
  }
27
27
  }
@@ -41,7 +41,7 @@ export default class DeployAction extends AbstractAction<OptionsSchema> {
41
41
  let results: FeatureActionResponse = {}
42
42
 
43
43
  try {
44
- await this.assertRegisteredSkill()
44
+ this.assertRegisteredSkill()
45
45
  await this.assertDependencies()
46
46
  await this.assertLoggedInToHeroku()
47
47
  await this.setupGitRepo()
@@ -51,7 +51,7 @@ export default class DeployAction extends AbstractAction<OptionsSchema> {
51
51
  results = actionUtil.mergeActionResults(results, procResults)
52
52
 
53
53
  await this.assertNoPendingGitChanges()
54
- } catch (err) {
54
+ } catch (err: any) {
55
55
  return {
56
56
  errors: [err],
57
57
  }
@@ -43,7 +43,7 @@ export default class ErrorFeature extends AbstractFeature {
43
43
  )
44
44
 
45
45
  void this.emitter.on('skill.will-write-directory-template', async () => {
46
- const isInstalled = await this.featureInstaller.isInstalled('error')
46
+ const isInstalled = await this.features.isInstalled('error')
47
47
  if (isInstalled) {
48
48
  return {
49
49
  filesToSkip: ['options.types.ts'],
@@ -55,7 +55,7 @@ export default class ErrorFeature extends AbstractFeature {
55
55
  }
56
56
 
57
57
  public async afterPackageInstall(): Promise<InstallResults> {
58
- const isSkillInstalled = await this.featureInstaller.isInstalled('skill')
58
+ const isSkillInstalled = await this.features.isInstalled('skill')
59
59
 
60
60
  if (!isSkillInstalled) {
61
61
  return {}
@@ -74,9 +74,9 @@ export default class ErrorFeature extends AbstractFeature {
74
74
  }) {
75
75
  const { featureCode, actionCode } = payload
76
76
 
77
- const isInstalled = await this.featureInstaller.isInstalled('error')
77
+ const isInstalled = await this.features.isInstalled('error')
78
78
 
79
- const isSkillInstalled = await this.featureInstaller.isInstalled('skill')
79
+ const isSkillInstalled = await this.features.isInstalled('skill')
80
80
 
81
81
  if (isInstalled && featureCode === 'node' && actionCode === 'upgrade') {
82
82
  const results = await this.Action('error', 'sync').execute({})
@@ -12,22 +12,13 @@ import { FeatureActionResponse, FeatureCode } from '../features.types'
12
12
  import EventContractBuilder from './builders/EventContractBuilder'
13
13
  import EventStore from './stores/EventStore'
14
14
 
15
- declare module '../../features/features.types' {
16
- interface FeatureMap {
17
- event: EventFeature
18
- }
19
-
20
- interface FeatureOptionsMap {
21
- event: undefined
22
- }
23
- }
24
-
25
15
  export default class EventFeature extends AbstractFeature {
26
16
  public code: FeatureCode = 'event'
27
17
  public nameReadable = 'Events'
28
18
  public description = 'Connect to the Mercury Event Engine.'
29
19
  public dependencies: FeatureDependency[] = [
30
20
  { code: 'schema', isRequired: true },
21
+ { code: 'permission', isRequired: true },
31
22
  ]
32
23
  public packageDependencies = [
33
24
  {
@@ -74,7 +65,7 @@ export default class EventFeature extends AbstractFeature {
74
65
 
75
66
  public async afterPackageInstall() {
76
67
  diskUtil.createDir(diskUtil.resolvePath(this.cwd, 'src', 'events'))
77
- const isSkillInstalled = await this.featureInstaller.isInstalled('skill')
68
+ const isSkillInstalled = await this.features.isInstalled('skill')
78
69
  if (isSkillInstalled) {
79
70
  return await this.Action('event', 'sync.listeners').execute({})
80
71
  }
@@ -101,7 +92,7 @@ export default class EventFeature extends AbstractFeature {
101
92
  settings.clearListenerCache()
102
93
  }
103
94
 
104
- const isInstalled = await this.featureInstaller.isInstalled('event')
95
+ const isInstalled = await this.features.isInstalled('event')
105
96
  const isRemoteRelevant =
106
97
  isInstalled &&
107
98
  (featureCode === 'event' ||
@@ -128,7 +119,7 @@ export default class EventFeature extends AbstractFeature {
128
119
  actionCode: string
129
120
  }) {
130
121
  const { featureCode, actionCode } = payload
131
- const isInstalled = await this.featureInstaller.isInstalled('event')
122
+ const isInstalled = await this.features.isInstalled('event')
132
123
 
133
124
  let results = {}
134
125
 
@@ -178,7 +169,7 @@ export default class EventFeature extends AbstractFeature {
178
169
  }
179
170
 
180
171
  private async handleDidFetchSchemas(payload: { schemas?: Schema[] | null }) {
181
- const isInstalled = await this.featureInstaller.isInstalled(this.code)
172
+ const isInstalled = await this.features.isInstalled(this.code)
182
173
 
183
174
  const lastSync = this.Service('eventSettings').getLastSyncOptions()
184
175
 
@@ -225,3 +216,13 @@ export default class EventFeature extends AbstractFeature {
225
216
  return false
226
217
  }
227
218
  }
219
+
220
+ declare module '../../features/features.types' {
221
+ interface FeatureMap {
222
+ event: EventFeature
223
+ }
224
+
225
+ interface FeatureOptionsMap {
226
+ event: undefined
227
+ }
228
+ }
@@ -102,7 +102,7 @@ export default class CreateAction extends AbstractAction<OptionsSchema> {
102
102
  { files, meta: { fqen } },
103
103
  syncResponse
104
104
  )
105
- } catch (err) {
105
+ } catch (err: any) {
106
106
  return {
107
107
  errors: [err],
108
108
  }
@@ -148,7 +148,7 @@ export default class ListenAction extends AbstractAction<OptionsSchema> {
148
148
  }
149
149
 
150
150
  return response
151
- } catch (err) {
151
+ } catch (err: any) {
152
152
  return {
153
153
  errors: [err],
154
154
  }
@@ -22,43 +22,6 @@ import AbstractStore from '../../../stores/AbstractStore'
22
22
  import { InternalUpdateHandler } from '../../../types/cli.types'
23
23
  import { eventContractCleanerUtil } from '../../../utilities/eventContractCleaner.utility'
24
24
 
25
- export interface EventStoreFetchEventContractsResponse {
26
- errors: SpruceError[]
27
- contracts: EventContract[]
28
- }
29
-
30
- type Options = Omit<
31
- EventSignature,
32
- | 'responsePayloadSchema'
33
- | 'emitPayloadSchema'
34
- | 'listenPermissionContract'
35
- | 'emitPermissionContract'
36
- >
37
-
38
- interface EventImport {
39
- options?: Options
40
- emitPayload?: Schema
41
- emitTarget?: Schema
42
- responsePayload?: Schema
43
- emitPermissions?: PermissionContract
44
- listenPermissions?: PermissionContract
45
- }
46
-
47
- const eventFileNamesImportKeyMap = {
48
- 'event.options.ts': { key: 'options', isSchema: false },
49
- 'emitPayload.builder.ts': { key: 'emitPayload', isSchema: true },
50
- 'emitTarget.builder.ts': { key: 'emitTarget', isSchema: true },
51
- 'responsePayload.builder.ts': { key: 'responsePayload', isSchema: true },
52
- 'emitPermissions.builder.ts': { key: 'emitPermissions', isSchema: false },
53
- 'listenPermissions.builder.ts': { key: 'listenPermissions', isSchema: false },
54
- }
55
-
56
- export interface FetchContractsOptions {
57
- localNamespace?: string
58
- namespaces?: string[]
59
- didUpdateHandler?: InternalUpdateHandler
60
- }
61
-
62
25
  export default class EventStore extends AbstractStore {
63
26
  public name = 'event'
64
27
  protected static contractCache: Record<string, any> = {}
@@ -314,3 +277,40 @@ export default class EventStore extends AbstractStore {
314
277
  EventStore.contractCache = {}
315
278
  }
316
279
  }
280
+
281
+ export interface EventStoreFetchEventContractsResponse {
282
+ errors: SpruceError[]
283
+ contracts: EventContract[]
284
+ }
285
+
286
+ type Options = Omit<
287
+ EventSignature,
288
+ | 'responsePayloadSchema'
289
+ | 'emitPayloadSchema'
290
+ | 'listenPermissionContract'
291
+ | 'emitPermissionContract'
292
+ >
293
+
294
+ interface EventImport {
295
+ options?: Options
296
+ emitPayload?: Schema
297
+ emitTarget?: Schema
298
+ responsePayload?: Schema
299
+ emitPermissions?: PermissionContract
300
+ listenPermissions?: PermissionContract
301
+ }
302
+
303
+ const eventFileNamesImportKeyMap = {
304
+ 'event.options.ts': { key: 'options', isSchema: false },
305
+ 'emitPayload.builder.ts': { key: 'emitPayload', isSchema: true },
306
+ 'emitTarget.builder.ts': { key: 'emitTarget', isSchema: true },
307
+ 'responsePayload.builder.ts': { key: 'responsePayload', isSchema: true },
308
+ 'emitPermissions.builder.ts': { key: 'emitPermissions', isSchema: false },
309
+ 'listenPermissions.builder.ts': { key: 'listenPermissions', isSchema: false },
310
+ }
311
+
312
+ export interface FetchContractsOptions {
313
+ localNamespace?: string
314
+ namespaces?: string[]
315
+ didUpdateHandler?: InternalUpdateHandler
316
+ }
@@ -14,7 +14,12 @@ export default class EventContractFeature extends AbstractFeature {
14
14
  public nameReadable = 'Event Contract'
15
15
  public description =
16
16
  'Pull core Mercury events down and write to single, portable, dependency-free, strongly typed contract.'
17
- public dependencies: FeatureDependency[] = []
17
+ public dependencies: FeatureDependency[] = [
18
+ {
19
+ code: 'permission',
20
+ isRequired: true,
21
+ },
22
+ ]
18
23
  public packageDependencies = []
19
24
 
20
25
  public actionsDir = diskUtil.resolvePath(__dirname, 'actions')
@@ -1,5 +1,6 @@
1
1
  import { buildSchema, SchemaValues } from '@sprucelabs/schema'
2
2
  import { diskUtil } from '@sprucelabs/spruce-skill-utils'
3
+ import actionUtil from '../../../utilities/action.utility'
3
4
  import AbstractAction from '../../AbstractAction'
4
5
  import { FeatureActionResponse } from '../../features.types'
5
6
 
@@ -30,7 +31,8 @@ export default class PullAction extends AbstractAction<PullOptionsSchema> {
30
31
  destination = diskUtil.resolvePath(this.cwd, destination, filename)
31
32
 
32
33
  const { contracts } = await this.Store('event').fetchEventContracts()
33
- let buildEventContractImport = `import { buildEventContract } from '@sprucelabs/mercury-types'`
34
+ let buildEventContractImport = `import { buildEventContract } from '@sprucelabs/mercury-types'
35
+ import '${'#spruce'}/permissions/permissions.types'`
34
36
 
35
37
  const contents = `${buildEventContractImport}
36
38
  const eventContracts = [${contracts
@@ -48,7 +50,9 @@ export type CoreEventContract = ${contracts
48
50
 
49
51
  diskUtil.writeFile(destination, contents)
50
52
 
51
- return {
53
+ const results = await this.Action('permission', 'sync').execute({})
54
+
55
+ return actionUtil.mergeActionResults(results, {
52
56
  files: [
53
57
  {
54
58
  name: filename,
@@ -57,6 +61,6 @@ export type CoreEventContract = ${contracts
57
61
  description: 'All your Mercury core events ready for testing!',
58
62
  },
59
63
  ],
60
- }
64
+ })
61
65
  }
62
66
  }
@@ -1,6 +1,6 @@
1
- import { buildSchema, Schema, SchemaValues } from '@sprucelabs/schema'
1
+ import { SpruceSchemas } from '@sprucelabs/mercury-types'
2
+ import { Schema, SchemaValues } from '@sprucelabs/schema'
2
3
  import { Templates } from '@sprucelabs/spruce-templates'
3
- import generatedFileSchema from '#spruce/schemas/spruceCli/v2020_07_22/generatedFile.schema'
4
4
  import { GlobalEmitter } from '../GlobalEmitter'
5
5
  import ServiceFactory from '../services/ServiceFactory'
6
6
  import StoreFactory from '../stores/StoreFactory'
@@ -58,50 +58,13 @@ export interface InstallFeatureOptions {
58
58
  didUpdateHandler?: InternalUpdateHandler
59
59
  }
60
60
 
61
- export const actionResponseSchema = buildSchema({
62
- id: 'actionResponse',
63
- fields: {
64
- files: {
65
- type: 'schema',
66
- isArray: true,
67
- options: {
68
- schema: generatedFileSchema,
69
- },
70
- },
71
- headline: {
72
- type: 'text',
73
- },
74
- hints: {
75
- type: 'text',
76
- isArray: true,
77
- },
78
- summaryLines: {
79
- type: 'text',
80
- isArray: true,
81
- },
82
- errors: {
83
- type: 'raw',
84
- isArray: true,
85
- options: {
86
- valueType: 'SpruceError<any>',
87
- },
88
- },
89
- meta: {
90
- type: 'raw',
91
- options: {
92
- valueType: 'Record<string, any>',
93
- },
94
- },
95
- },
96
- })
97
-
98
61
  export interface FeatureInstallResponse {
99
62
  files?: GeneratedFile[]
100
63
  packagesInstalled?: NpmPackage[]
101
64
  }
102
65
 
103
- export type FeatureActionResponse = SchemaValues<typeof actionResponseSchema> &
104
- FeatureInstallResponse
66
+ export type FeatureActionResponse =
67
+ SpruceSchemas.SpruceCli.v2020_07_22.ActionResponse & FeatureInstallResponse
105
68
 
106
69
  export interface FeatureAction<S extends Schema = Schema> {
107
70
  optionsSchema?: S
@@ -23,6 +23,6 @@ export default class LogFeature extends AbstractFeature {
23
23
  public actionsDir = diskUtil.resolvePath(__dirname, 'actions')
24
24
 
25
25
  public isInstalled() {
26
- return this.featureInstaller.isInstalled('skill')
26
+ return this.features.isInstalled('skill')
27
27
  }
28
28
  }
@@ -78,7 +78,7 @@ export default class NodeFeature<
78
78
  'Code rebuilt successfully.',
79
79
  ],
80
80
  }
81
- } catch (err) {
81
+ } catch (err: any) {
82
82
  return {
83
83
  errors: [err],
84
84
  }
@@ -68,7 +68,7 @@ export default class InstallAction extends AbstractAction<OptionsSchema> {
68
68
  return {
69
69
  summaryLines: ['Skill installed!'],
70
70
  }
71
- } catch (err) {
71
+ } catch (err: any) {
72
72
  return {
73
73
  errors: [err],
74
74
  }