@sprucelabs/spruce-cli 15.2.0 → 15.2.4

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 (68) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/build/__tests__/behavioral/AddingADependency.test.js +3 -3
  3. package/build/__tests__/behavioral/BlockingCommands.test.js +3 -3
  4. package/build/__tests__/behavioral/DeployingASkill.test.js +3 -3
  5. package/build/__tests__/behavioral/DeployingToSandbox.test.js +3 -3
  6. package/build/__tests__/behavioral/ListeningToCoreEvents.test.js +3 -3
  7. package/build/__tests__/behavioral/LoggingInAsASkill.test.js +3 -3
  8. package/build/__tests__/behavioral/ManagingDependencies.test.js +3 -3
  9. package/build/__tests__/behavioral/OverridingCommandsInPackageJson.test.js +3 -3
  10. package/build/__tests__/behavioral/RebuildingASkill.test.js +3 -3
  11. package/build/__tests__/behavioral/RegisteringGlobalEvents.test.js +3 -3
  12. package/build/__tests__/behavioral/RegisteringSkillViewOnBoot.test.js +3 -3
  13. package/build/__tests__/behavioral/RememberingUpgradeSelections.test.js +3 -3
  14. package/build/__tests__/behavioral/SettingLogTransportsInASkill.test.js +3 -3
  15. package/build/__tests__/behavioral/SettingRemote.test.js +3 -3
  16. package/build/__tests__/behavioral/SettingUpASkillForTesting.test.js +3 -3
  17. package/build/__tests__/behavioral/SettingUpSchemasForModuleDistribution.test.js +3 -3
  18. package/build/__tests__/behavioral/SyncingEventsOnlyFromDependencies.test.js +3 -3
  19. package/build/__tests__/behavioral/TestingDataStores.test.js +3 -3
  20. package/build/__tests__/behavioral/UpdatingDependencies.test.js +3 -3
  21. package/build/__tests__/behavioral/UpdatingDependencies2.test.js +3 -3
  22. package/build/__tests__/behavioral/WatchingSkillViews.test.js +3 -3
  23. package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js +3 -3
  24. package/build/__tests__/behavioral/events/CreatingAListener.test.js +3 -3
  25. package/build/__tests__/behavioral/events/CreatingAnEvent.test.js +3 -3
  26. package/build/__tests__/behavioral/events/KeepingEventsInSync2.test.js +3 -3
  27. package/build/__tests__/behavioral/schemas/KeepingSchemasInSync.test.js +3 -3
  28. package/build/__tests__/behavioral/skill/BootingASkill.test.js +3 -3
  29. package/build/__tests__/behavioral/skill/UpgradingASkill2.test.js +3 -3
  30. package/build/__tests__/behavioral/stores/CreatingADataStore.test.js +3 -3
  31. package/build/__tests__/behavioral/stores/KeepingDataStoresInSync.test.js +3 -3
  32. package/build/__tests__/behavioral/tests/CreatingATest.test.d.ts +1 -1
  33. package/build/__tests__/behavioral/tests/CreatingATest.test.js +72 -78
  34. package/build/__tests__/behavioral/tests/CreatingATest.test.js.map +1 -1
  35. package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.d.ts +5 -0
  36. package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js +331 -160
  37. package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js.map +1 -1
  38. package/build/__tests__/behavioral/views/CreatingASkillView.test.js +3 -3
  39. package/build/__tests__/behavioral/views/CreatingATheme.test.js +3 -3
  40. package/build/__tests__/behavioral/views/KeepingViewsInSync.test.js +3 -3
  41. package/build/__tests__/behavioral/views/TestingViewControllers.test.js +3 -3
  42. package/build/__tests__/implementation/BulkImporting.test.js +3 -3
  43. package/build/__tests__/implementation/CachingImports.test.js +3 -3
  44. package/build/__tests__/implementation/CommanderCommandResultMapper.test.js +3 -3
  45. package/build/__tests__/implementation/DataStoreStore.test.js +3 -3
  46. package/build/__tests__/implementation/EventStore.test.js +3 -3
  47. package/build/__tests__/implementation/EventTemplateItemBuilder.test.js +3 -3
  48. package/build/__tests__/implementation/FeatureCommandAttacher.test.js +3 -3
  49. package/build/__tests__/implementation/FeatureFixture.test.js +3 -3
  50. package/build/__tests__/implementation/FeatureInstaller.test.js +3 -3
  51. package/build/__tests__/implementation/FieldTemplateItemBuilder.test.js +3 -3
  52. package/build/__tests__/implementation/JestJsonParser.test.js +3 -3
  53. package/build/__tests__/implementation/OnboardingScriptLoader.test.js +3 -3
  54. package/build/__tests__/implementation/OnboardingScriptPlayer.test.js +3 -3
  55. package/build/__tests__/implementation/OnboardingStore.test.js +3 -3
  56. package/build/__tests__/implementation/PkgService.test.js +3 -3
  57. package/build/__tests__/implementation/SchemaTemplateItemBuilder.test.js +3 -3
  58. package/build/__tests__/implementation/SchemaValueTypeWriter.test.js +3 -3
  59. package/build/__tests__/implementation/ServiceFactory.test.js +3 -3
  60. package/build/__tests__/implementation/TestReporter.test.js +3 -3
  61. package/build/__tests__/implementation/TestRunner.test.js +3 -3
  62. package/build/__tests__/implementation/Widgets.test.js +3 -3
  63. package/build/features/test/actions/CreateAction.js +6 -6
  64. package/build/features/test/actions/CreateAction.js.map +1 -1
  65. package/package.json +27 -27
  66. package/src/__tests__/behavioral/tests/CreatingATest.test.ts +16 -21
  67. package/src/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.ts +62 -23
  68. package/src/features/test/actions/CreateAction.ts +7 -7
@@ -33,13 +33,13 @@ var _ScriptPlayer = _interopRequireDefault(require("../../features/onboard/Scrip
33
33
 
34
34
  var _AbstractCliTest2 = _interopRequireDefault(require("../../tests/AbstractCliTest"));
35
35
 
36
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _temp;
36
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2;
37
37
 
38
38
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
39
39
 
40
40
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
41
41
 
42
- var OnboardingScriptPlayerTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3 = (0, _test.test)(), _dec4 = (0, _test.test)(), _dec5 = (0, _test.test)(), _dec6 = (0, _test.test)(), _dec7 = (0, _test.test)(), _dec8 = (0, _test.test)(), _dec9 = (0, _test.test)(), (_class = (_temp = _class2 = /*#__PURE__*/function (_AbstractCliTest) {
42
+ var OnboardingScriptPlayerTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3 = (0, _test.test)(), _dec4 = (0, _test.test)(), _dec5 = (0, _test.test)(), _dec6 = (0, _test.test)(), _dec7 = (0, _test.test)(), _dec8 = (0, _test.test)(), _dec9 = (0, _test.test)(), (_class = (_class2 = /*#__PURE__*/function (_AbstractCliTest) {
43
43
  (0, _inherits2["default"])(OnboardingScriptPlayerTest, _AbstractCliTest);
44
44
 
45
45
  var _super = _createSuper(OnboardingScriptPlayerTest);
@@ -472,6 +472,6 @@ var OnboardingScriptPlayerTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.te
472
472
  }()
473
473
  }]);
474
474
  return OnboardingScriptPlayerTest;
475
- }(_AbstractCliTest2["default"]), (0, _defineProperty2["default"])(_class2, "player", void 0), (0, _defineProperty2["default"])(_class2, "commandExecuterCommands", []), _temp), ((0, _applyDecoratedDescriptor2["default"])(_class, "canCreateScriptPlayer", [_dec], Object.getOwnPropertyDescriptor(_class, "canCreateScriptPlayer"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canPlayTextScript", [_dec2], Object.getOwnPropertyDescriptor(_class, "canPlayTextScript"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canPlayCallback", [_dec3], Object.getOwnPropertyDescriptor(_class, "canPlayCallback"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canPlayAsyncCallback", [_dec4], Object.getOwnPropertyDescriptor(_class, "canPlayAsyncCallback"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "throwsWithBadScriptKey", [_dec5], Object.getOwnPropertyDescriptor(_class, "throwsWithBadScriptKey"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canLoadScriptsByKey", [_dec6], Object.getOwnPropertyDescriptor(_class, "canLoadScriptsByKey"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "onScriptCanRedirectToAnother", [_dec7], Object.getOwnPropertyDescriptor(_class, "onScriptCanRedirectToAnother"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "scriptsCanAccessOnboardingStore", [_dec8], Object.getOwnPropertyDescriptor(_class, "scriptsCanAccessOnboardingStore"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canInvokeCommand", [_dec9], Object.getOwnPropertyDescriptor(_class, "canInvokeCommand"), _class)), _class));
475
+ }(_AbstractCliTest2["default"]), (0, _defineProperty2["default"])(_class2, "player", void 0), (0, _defineProperty2["default"])(_class2, "commandExecuterCommands", []), _class2), ((0, _applyDecoratedDescriptor2["default"])(_class, "canCreateScriptPlayer", [_dec], Object.getOwnPropertyDescriptor(_class, "canCreateScriptPlayer"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canPlayTextScript", [_dec2], Object.getOwnPropertyDescriptor(_class, "canPlayTextScript"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canPlayCallback", [_dec3], Object.getOwnPropertyDescriptor(_class, "canPlayCallback"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canPlayAsyncCallback", [_dec4], Object.getOwnPropertyDescriptor(_class, "canPlayAsyncCallback"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "throwsWithBadScriptKey", [_dec5], Object.getOwnPropertyDescriptor(_class, "throwsWithBadScriptKey"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canLoadScriptsByKey", [_dec6], Object.getOwnPropertyDescriptor(_class, "canLoadScriptsByKey"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "onScriptCanRedirectToAnother", [_dec7], Object.getOwnPropertyDescriptor(_class, "onScriptCanRedirectToAnother"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "scriptsCanAccessOnboardingStore", [_dec8], Object.getOwnPropertyDescriptor(_class, "scriptsCanAccessOnboardingStore"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canInvokeCommand", [_dec9], Object.getOwnPropertyDescriptor(_class, "canInvokeCommand"), _class)), _class));
476
476
  exports["default"] = OnboardingScriptPlayerTest;
477
477
  //# sourceMappingURL=OnboardingScriptPlayer.test.js.map
@@ -33,13 +33,13 @@ var _feature = _interopRequireDefault(require("../../features/feature.utilities"
33
33
 
34
34
  var _AbstractCliTest2 = _interopRequireDefault(require("../../tests/AbstractCliTest"));
35
35
 
36
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _class, _class2, _temp;
36
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _class, _class2;
37
37
 
38
38
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
39
39
 
40
40
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
41
41
 
42
- var OnboardingStoreTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3 = (0, _test.test)(), _dec4 = (0, _test.test)(), _dec5 = (0, _test.test)(), _dec6 = (0, _test.test)(), _dec7 = (0, _test.test)(), _dec8 = (0, _test.test)(), _dec9 = (0, _test.test)(), _dec10 = (0, _test.test)(), _dec11 = (0, _test.test)(), (_class = (_temp = _class2 = /*#__PURE__*/function (_AbstractCliTest) {
42
+ var OnboardingStoreTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3 = (0, _test.test)(), _dec4 = (0, _test.test)(), _dec5 = (0, _test.test)(), _dec6 = (0, _test.test)(), _dec7 = (0, _test.test)(), _dec8 = (0, _test.test)(), _dec9 = (0, _test.test)(), _dec10 = (0, _test.test)(), _dec11 = (0, _test.test)(), (_class = (_class2 = /*#__PURE__*/function (_AbstractCliTest) {
43
43
  (0, _inherits2["default"])(OnboardingStoreTest, _AbstractCliTest);
44
44
 
45
45
  var _super = _createSuper(OnboardingStoreTest);
@@ -195,6 +195,6 @@ var OnboardingStoreTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(),
195
195
  }
196
196
  }]);
197
197
  return OnboardingStoreTest;
198
- }(_AbstractCliTest2["default"]), (0, _defineProperty2["default"])(_class2, "store", void 0), _temp), ((0, _applyDecoratedDescriptor2["default"])(_class, "canGetStore", [_dec], Object.getOwnPropertyDescriptor(_class, "canGetStore"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "startsAsOff", [_dec2], Object.getOwnPropertyDescriptor(_class, "startsAsOff"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canSetToShortMode", [_dec3], Object.getOwnPropertyDescriptor(_class, "canSetToShortMode"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canSetToImmersiveMode", [_dec4], Object.getOwnPropertyDescriptor(_class, "canSetToImmersiveMode"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "remembersModeBetweenBoots", [_dec5], Object.getOwnPropertyDescriptor(_class, "remembersModeBetweenBoots"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "remembersStageBetweenBoots", [_dec6], Object.getOwnPropertyDescriptor(_class, "remembersStageBetweenBoots"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "valuesSharedBetween2Instances", [_dec7], Object.getOwnPropertyDescriptor(_class, "valuesSharedBetween2Instances"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "stageIsNotSetToStart", [_dec8], Object.getOwnPropertyDescriptor(_class, "stageIsNotSetToStart"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "stageCanBeSet", [_dec9], Object.getOwnPropertyDescriptor(_class, "stageCanBeSet"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canBeReset", [_dec10], Object.getOwnPropertyDescriptor(_class, "canBeReset"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "cantSetBadStage", [_dec11], Object.getOwnPropertyDescriptor(_class, "cantSetBadStage"), _class)), _class));
198
+ }(_AbstractCliTest2["default"]), (0, _defineProperty2["default"])(_class2, "store", void 0), _class2), ((0, _applyDecoratedDescriptor2["default"])(_class, "canGetStore", [_dec], Object.getOwnPropertyDescriptor(_class, "canGetStore"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "startsAsOff", [_dec2], Object.getOwnPropertyDescriptor(_class, "startsAsOff"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canSetToShortMode", [_dec3], Object.getOwnPropertyDescriptor(_class, "canSetToShortMode"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canSetToImmersiveMode", [_dec4], Object.getOwnPropertyDescriptor(_class, "canSetToImmersiveMode"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "remembersModeBetweenBoots", [_dec5], Object.getOwnPropertyDescriptor(_class, "remembersModeBetweenBoots"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "remembersStageBetweenBoots", [_dec6], Object.getOwnPropertyDescriptor(_class, "remembersStageBetweenBoots"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "valuesSharedBetween2Instances", [_dec7], Object.getOwnPropertyDescriptor(_class, "valuesSharedBetween2Instances"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "stageIsNotSetToStart", [_dec8], Object.getOwnPropertyDescriptor(_class, "stageIsNotSetToStart"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "stageCanBeSet", [_dec9], Object.getOwnPropertyDescriptor(_class, "stageCanBeSet"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canBeReset", [_dec10], Object.getOwnPropertyDescriptor(_class, "canBeReset"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "cantSetBadStage", [_dec11], Object.getOwnPropertyDescriptor(_class, "cantSetBadStage"), _class)), _class));
199
199
  exports["default"] = OnboardingStoreTest;
200
200
  //# sourceMappingURL=OnboardingStore.test.js.map
@@ -35,13 +35,13 @@ var _CommandService = _interopRequireDefault(require("../../services/CommandServ
35
35
 
36
36
  var _AbstractSkillTest2 = _interopRequireDefault(require("../../tests/AbstractSkillTest"));
37
37
 
38
- var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _temp;
38
+ var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2;
39
39
 
40
40
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
41
41
 
42
42
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
43
43
 
44
- var PkgServiceTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3 = (0, _test.test)(), _dec4 = (0, _test.test)(), _dec5 = (0, _test.test)(), (_class = (_temp = _class2 = /*#__PURE__*/function (_AbstractSkillTest) {
44
+ var PkgServiceTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3 = (0, _test.test)(), _dec4 = (0, _test.test)(), _dec5 = (0, _test.test)(), (_class = (_class2 = /*#__PURE__*/function (_AbstractSkillTest) {
45
45
  (0, _inherits2["default"])(PkgServiceTest, _AbstractSkillTest);
46
46
 
47
47
  var _super = _createSuper(PkgServiceTest);
@@ -242,6 +242,6 @@ var PkgServiceTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
242
242
  }()
243
243
  }]);
244
244
  return PkgServiceTest;
245
- }(_AbstractSkillTest2["default"]), (0, _defineProperty2["default"])(_class2, "skillCacheKey", 'skills'), (0, _defineProperty2["default"])(_class2, "pkg", void 0), _temp), ((0, _applyDecoratedDescriptor2["default"])(_class, "canCreatePkgService", [_dec], Object.getOwnPropertyDescriptor(_class, "canCreatePkgService"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "installANonSpruceLabsModuleMakesItsVersionAnActualVersion", [_dec2], Object.getOwnPropertyDescriptor(_class, "installANonSpruceLabsModuleMakesItsVersionAnActualVersion"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "handlesAtLatestInName", [_dec3], Object.getOwnPropertyDescriptor(_class, "handlesAtLatestInName"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "ifInstallingOnlySpruceModulesShouldNotRunNPMAdd", [_dec4], Object.getOwnPropertyDescriptor(_class, "ifInstallingOnlySpruceModulesShouldNotRunNPMAdd"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "installingSpruceAndOtherModulesDoesntRemoveSpruceModule", [_dec5], Object.getOwnPropertyDescriptor(_class, "installingSpruceAndOtherModulesDoesntRemoveSpruceModule"), _class)), _class));
245
+ }(_AbstractSkillTest2["default"]), (0, _defineProperty2["default"])(_class2, "skillCacheKey", 'skills'), (0, _defineProperty2["default"])(_class2, "pkg", void 0), _class2), ((0, _applyDecoratedDescriptor2["default"])(_class, "canCreatePkgService", [_dec], Object.getOwnPropertyDescriptor(_class, "canCreatePkgService"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "installANonSpruceLabsModuleMakesItsVersionAnActualVersion", [_dec2], Object.getOwnPropertyDescriptor(_class, "installANonSpruceLabsModuleMakesItsVersionAnActualVersion"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "handlesAtLatestInName", [_dec3], Object.getOwnPropertyDescriptor(_class, "handlesAtLatestInName"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "ifInstallingOnlySpruceModulesShouldNotRunNPMAdd", [_dec4], Object.getOwnPropertyDescriptor(_class, "ifInstallingOnlySpruceModulesShouldNotRunNPMAdd"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "installingSpruceAndOtherModulesDoesntRemoveSpruceModule", [_dec5], Object.getOwnPropertyDescriptor(_class, "installingSpruceAndOtherModulesDoesntRemoveSpruceModule"), _class)), _class));
246
246
  exports["default"] = PkgServiceTest;
247
247
  //# sourceMappingURL=PkgService.test.js.map
@@ -37,7 +37,7 @@ var _SchemaTemplateItemBuilder = _interopRequireDefault(require("../../templateI
37
37
 
38
38
  var _AbstractCliTest2 = _interopRequireDefault(require("../../tests/AbstractCliTest"));
39
39
 
40
- var _nestedMercuryContrac, _nestedMercuryContrac2, _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _class, _class2, _temp;
40
+ var _nestedMercuryContrac, _nestedMercuryContrac2, _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _class, _class2;
41
41
 
42
42
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
43
43
 
@@ -1145,7 +1145,7 @@ var localSchemaTemplateItem = {
1145
1145
  destinationDir: '#spruce/schemas',
1146
1146
  schema: localSchema
1147
1147
  };
1148
- var SchemaTemplateItemBuilderTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3 = (0, _test.test)(), _dec4 = (0, _test.test)('turns 2 definitions into 2 template items', [cowbellV1, personV1], [personV1TemplateItem, cowbellV1TemplateItem]), _dec5 = (0, _test.test)('turns one nested definition into 2 items', [personV2], [vehicleV1TemplateItem, personV2TemplateItem]), _dec6 = (0, _test.test)('handles recursion without looping forever', [personV3], [cowbellV1NestedTemplateItem, personV3TemplateItem, cowbellV2NestedTemplateItem]), _dec7 = (0, _test.test)('handles duplication', [cowbellV1, cowbellV1, cowbellV1], [cowbellV1TemplateItem]), _dec8 = (0, _test.test)('handles resolving by id and version', [personV4, personV3, cowbellV1, cowbellV2], [cowbellV2TemplateItem, cowbellV1TemplateItem, personV3TemplateItem, personV4TemplateItem]), _dec9 = (0, _test.test)('handles resolving by id and version in different order', [cowbellV1, personV4, personV3, cowbellV2], [cowbellV2TemplateItem, cowbellV1TemplateItem, personV3TemplateItem, personV4TemplateItem]), _dec10 = (0, _test.test)('handles nested schema in dynamic key signature', [nestedMercuryContract], [eventSignatureTemplateItem, mercuryTemplateItem]), _dec11 = (0, _test.test)('handles nested schemas in dynamic key signature', [nestedMercuryContractArray], [eventSignatureTemplateItem2, eventSignatureTemplateItem, mercuryTemplateItemArray]), _dec12 = (0, _test.test)('handles many layers of nested schemas', [schemaWithManyNestedSchemas], [lastLayerTemplateItem, secondLayerTemplateItem, firstLayerTemplateItem, manyNestedTemplateItem]), _dec13 = (0, _test.test)('can import event contracts', mercurySchemas, mercuryTemplateItems), _dec14 = (0, _test.test)('import from not set if matching local namespace', [localSchema], [localSchemaTemplateItem], 'Mercury'), _dec15 = (0, _test.test)(), _dec16 = (0, _test.test)(), (_class = (_temp = _class2 = /*#__PURE__*/function (_AbstractCliTest) {
1148
+ var SchemaTemplateItemBuilderTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3 = (0, _test.test)(), _dec4 = (0, _test.test)('turns 2 definitions into 2 template items', [cowbellV1, personV1], [personV1TemplateItem, cowbellV1TemplateItem]), _dec5 = (0, _test.test)('turns one nested definition into 2 items', [personV2], [vehicleV1TemplateItem, personV2TemplateItem]), _dec6 = (0, _test.test)('handles recursion without looping forever', [personV3], [cowbellV1NestedTemplateItem, personV3TemplateItem, cowbellV2NestedTemplateItem]), _dec7 = (0, _test.test)('handles duplication', [cowbellV1, cowbellV1, cowbellV1], [cowbellV1TemplateItem]), _dec8 = (0, _test.test)('handles resolving by id and version', [personV4, personV3, cowbellV1, cowbellV2], [cowbellV2TemplateItem, cowbellV1TemplateItem, personV3TemplateItem, personV4TemplateItem]), _dec9 = (0, _test.test)('handles resolving by id and version in different order', [cowbellV1, personV4, personV3, cowbellV2], [cowbellV2TemplateItem, cowbellV1TemplateItem, personV3TemplateItem, personV4TemplateItem]), _dec10 = (0, _test.test)('handles nested schema in dynamic key signature', [nestedMercuryContract], [eventSignatureTemplateItem, mercuryTemplateItem]), _dec11 = (0, _test.test)('handles nested schemas in dynamic key signature', [nestedMercuryContractArray], [eventSignatureTemplateItem2, eventSignatureTemplateItem, mercuryTemplateItemArray]), _dec12 = (0, _test.test)('handles many layers of nested schemas', [schemaWithManyNestedSchemas], [lastLayerTemplateItem, secondLayerTemplateItem, firstLayerTemplateItem, manyNestedTemplateItem]), _dec13 = (0, _test.test)('can import event contracts', mercurySchemas, mercuryTemplateItems), _dec14 = (0, _test.test)('import from not set if matching local namespace', [localSchema], [localSchemaTemplateItem], 'Mercury'), _dec15 = (0, _test.test)(), _dec16 = (0, _test.test)(), (_class = (_class2 = /*#__PURE__*/function (_AbstractCliTest) {
1149
1149
  (0, _inherits2["default"])(SchemaTemplateItemBuilderTest, _AbstractCliTest);
1150
1150
 
1151
1151
  var _super = _createSuper(SchemaTemplateItemBuilderTest);
@@ -1407,6 +1407,6 @@ var SchemaTemplateItemBuilderTest = (_dec = (0, _test.test)(), _dec2 = (0, _test
1407
1407
  }
1408
1408
  }]);
1409
1409
  return SchemaTemplateItemBuilderTest;
1410
- }(_AbstractCliTest2["default"]), (0, _defineProperty2["default"])(_class2, "itemBuilder", void 0), (0, _defineProperty2["default"])(_class2, "LOCAL_NAMESPACE", 'LocalNamespace'), _temp), ((0, _applyDecoratedDescriptor2["default"])(_class, "canInstantiate", [_dec], Object.getOwnPropertyDescriptor(_class, "canInstantiate"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "hasGenerateFunction", [_dec2], Object.getOwnPropertyDescriptor(_class, "hasGenerateFunction"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "turnsSingleDefinitionIntoTemplateItem", [_dec3], Object.getOwnPropertyDescriptor(_class, "turnsSingleDefinitionIntoTemplateItem"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "generationTests", [_dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14], Object.getOwnPropertyDescriptor(_class, "generationTests"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "setsImports", [_dec15], Object.getOwnPropertyDescriptor(_class, "setsImports"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "bringsImportsFromRemoteFromRelatedSchemas", [_dec16], Object.getOwnPropertyDescriptor(_class, "bringsImportsFromRemoteFromRelatedSchemas"), _class)), _class));
1410
+ }(_AbstractCliTest2["default"]), (0, _defineProperty2["default"])(_class2, "itemBuilder", void 0), (0, _defineProperty2["default"])(_class2, "LOCAL_NAMESPACE", 'LocalNamespace'), _class2), ((0, _applyDecoratedDescriptor2["default"])(_class, "canInstantiate", [_dec], Object.getOwnPropertyDescriptor(_class, "canInstantiate"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "hasGenerateFunction", [_dec2], Object.getOwnPropertyDescriptor(_class, "hasGenerateFunction"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "turnsSingleDefinitionIntoTemplateItem", [_dec3], Object.getOwnPropertyDescriptor(_class, "turnsSingleDefinitionIntoTemplateItem"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "generationTests", [_dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14], Object.getOwnPropertyDescriptor(_class, "generationTests"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "setsImports", [_dec15], Object.getOwnPropertyDescriptor(_class, "setsImports"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "bringsImportsFromRemoteFromRelatedSchemas", [_dec16], Object.getOwnPropertyDescriptor(_class, "bringsImportsFromRemoteFromRelatedSchemas"), _class)), _class));
1411
1411
  exports["default"] = SchemaTemplateItemBuilderTest;
1412
1412
  //# sourceMappingURL=SchemaTemplateItemBuilder.test.js.map
@@ -43,7 +43,7 @@ var _SchemaTemplateItemBuilder = _interopRequireDefault(require("../../templateI
43
43
 
44
44
  var _AbstractSchemaTest2 = _interopRequireDefault(require("../../tests/AbstractSchemaTest"));
45
45
 
46
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _temp;
46
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2;
47
47
 
48
48
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
49
49
 
@@ -62,7 +62,7 @@ var SchemaValueTypeGenerationTest = (_dec = (0, _test.test)(), _dec2 = (0, _test
62
62
  type: "{ schemaId: 'eventSignature', version: 'v2020_07_22', values: SpruceSchemas.".concat(LOCAL_NAMESPACE, ".v2020_07_22.EventSignature } | { schemaId: 'eventSignature2', version: 'v2020_07_22', values: SpruceSchemas.").concat(LOCAL_NAMESPACE, ".v2020_07_22.EventSignature2 }"),
63
63
  value: '[eventSignatureSchema_v2020_07_22, eventSignature2Schema_v2020_07_22]',
64
64
  schemaType: "(SpruceSchemas.".concat(LOCAL_NAMESPACE, ".v2020_07_22.EventSignatureSchema | SpruceSchemas.").concat(LOCAL_NAMESPACE, ".v2020_07_22.EventSignature2Schema)[]")
65
- }), (_class = (_temp = _class2 = /*#__PURE__*/function (_AbstractSchemaTest) {
65
+ }), (_class = (_class2 = /*#__PURE__*/function (_AbstractSchemaTest) {
66
66
  (0, _inherits2["default"])(SchemaValueTypeGenerationTest, _AbstractSchemaTest);
67
67
 
68
68
  var _super = _createSuper(SchemaValueTypeGenerationTest);
@@ -359,6 +359,6 @@ var SchemaValueTypeGenerationTest = (_dec = (0, _test.test)(), _dec2 = (0, _test
359
359
  }()
360
360
  }]);
361
361
  return SchemaValueTypeGenerationTest;
362
- }(_AbstractSchemaTest2["default"]), (0, _defineProperty2["default"])(_class2, "generator", void 0), _temp), ((0, _applyDecoratedDescriptor2["default"])(_class, "hasGenerateMethod", [_dec], Object.getOwnPropertyDescriptor(_class, "hasGenerateMethod"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "runsWithoutBreakingWithNoArgs", [_dec2], Object.getOwnPropertyDescriptor(_class, "runsWithoutBreakingWithNoArgs"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "generatesValidTypesFile", [_dec3], Object.getOwnPropertyDescriptor(_class, "generatesValidTypesFile"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "importsTypes", [_dec4, _dec5, _dec6], Object.getOwnPropertyDescriptor(_class, "importsTypes"), _class)), _class));
362
+ }(_AbstractSchemaTest2["default"]), (0, _defineProperty2["default"])(_class2, "generator", void 0), _class2), ((0, _applyDecoratedDescriptor2["default"])(_class, "hasGenerateMethod", [_dec], Object.getOwnPropertyDescriptor(_class, "hasGenerateMethod"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "runsWithoutBreakingWithNoArgs", [_dec2], Object.getOwnPropertyDescriptor(_class, "runsWithoutBreakingWithNoArgs"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "generatesValidTypesFile", [_dec3], Object.getOwnPropertyDescriptor(_class, "generatesValidTypesFile"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "importsTypes", [_dec4, _dec5, _dec6], Object.getOwnPropertyDescriptor(_class, "importsTypes"), _class)), _class));
363
363
  exports["default"] = SchemaValueTypeGenerationTest;
364
364
  //# sourceMappingURL=SchemaValueTypeWriter.test.js.map
@@ -33,13 +33,13 @@ var _ServiceFactory = _interopRequireDefault(require("../../services/ServiceFact
33
33
 
34
34
  var _AbstractCliTest2 = _interopRequireDefault(require("../../tests/AbstractCliTest"));
35
35
 
36
- var _dec, _dec2, _class, _class2, _temp;
36
+ var _dec, _dec2, _class, _class2;
37
37
 
38
38
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
39
39
 
40
40
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
41
41
 
42
- var ServiceFactoryTest = (_dec = (0, _test.test)('can build pin service', 'pkg', 'readPackage'), _dec2 = (0, _test.test)('can build pin service', 'vsCode', 'installExtensions'), (_class = (_temp = _class2 = /*#__PURE__*/function (_AbstractCliTest) {
42
+ var ServiceFactoryTest = (_dec = (0, _test.test)('can build pin service', 'pkg', 'readPackage'), _dec2 = (0, _test.test)('can build pin service', 'vsCode', 'installExtensions'), (_class = (_class2 = /*#__PURE__*/function (_AbstractCliTest) {
43
43
  (0, _inherits2["default"])(ServiceFactoryTest, _AbstractCliTest);
44
44
 
45
45
  var _super = _createSuper(ServiceFactoryTest);
@@ -84,6 +84,6 @@ var ServiceFactoryTest = (_dec = (0, _test.test)('can build pin service', 'pkg',
84
84
  }
85
85
  }]);
86
86
  return ServiceFactoryTest;
87
- }(_AbstractCliTest2["default"]), (0, _defineProperty2["default"])(_class2, "factory", void 0), _temp), ((0, _applyDecoratedDescriptor2["default"])(_class, "canBuild", [_dec, _dec2], Object.getOwnPropertyDescriptor(_class, "canBuild"), _class)), _class));
87
+ }(_AbstractCliTest2["default"]), (0, _defineProperty2["default"])(_class2, "factory", void 0), _class2), ((0, _applyDecoratedDescriptor2["default"])(_class, "canBuild", [_dec, _dec2], Object.getOwnPropertyDescriptor(_class, "canBuild"), _class)), _class));
88
88
  exports["default"] = ServiceFactoryTest;
89
89
  //# sourceMappingURL=ServiceFactory.test.js.map
@@ -33,13 +33,13 @@ var _TestReporter = _interopRequireDefault(require("../../features/test/TestRepo
33
33
 
34
34
  var _AbstractCliTest2 = _interopRequireDefault(require("../../tests/AbstractCliTest"));
35
35
 
36
- var _dec, _dec2, _dec3, _class, _class2, _temp;
36
+ var _dec, _dec2, _dec3, _class, _class2;
37
37
 
38
38
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
39
39
 
40
40
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
41
41
 
42
- var TestReporterTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3 = (0, _test.test)(), (_class = (_temp = _class2 = /*#__PURE__*/function (_AbstractCliTest) {
42
+ var TestReporterTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3 = (0, _test.test)(), (_class = (_class2 = /*#__PURE__*/function (_AbstractCliTest) {
43
43
  (0, _inherits2["default"])(TestReporterTest, _AbstractCliTest);
44
44
 
45
45
  var _super = _createSuper(TestReporterTest);
@@ -157,6 +157,6 @@ var TestReporterTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _de
157
157
  }()
158
158
  }]);
159
159
  return TestReporterTest;
160
- }(_AbstractCliTest2["default"]), (0, _defineProperty2["default"])(_class2, "reporter", void 0), _temp), ((0, _applyDecoratedDescriptor2["default"])(_class, "canCreateReporter", [_dec], Object.getOwnPropertyDescriptor(_class, "canCreateReporter"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "hasRenderMethod", [_dec2], Object.getOwnPropertyDescriptor(_class, "hasRenderMethod"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "cantFeedInResultsIfNotStarted", [_dec3], Object.getOwnPropertyDescriptor(_class, "cantFeedInResultsIfNotStarted"), _class)), _class));
160
+ }(_AbstractCliTest2["default"]), (0, _defineProperty2["default"])(_class2, "reporter", void 0), _class2), ((0, _applyDecoratedDescriptor2["default"])(_class, "canCreateReporter", [_dec], Object.getOwnPropertyDescriptor(_class, "canCreateReporter"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "hasRenderMethod", [_dec2], Object.getOwnPropertyDescriptor(_class, "hasRenderMethod"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "cantFeedInResultsIfNotStarted", [_dec3], Object.getOwnPropertyDescriptor(_class, "cantFeedInResultsIfNotStarted"), _class)), _class));
161
161
  exports["default"] = TestReporterTest;
162
162
  //# sourceMappingURL=TestReporter.test.js.map
@@ -37,13 +37,13 @@ var _TestRunner = _interopRequireDefault(require("../../features/test/TestRunner
37
37
 
38
38
  var _AbstractTestTest2 = _interopRequireDefault(require("../../tests/AbstractTestTest"));
39
39
 
40
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _temp;
40
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2;
41
41
 
42
42
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
43
43
 
44
44
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
45
45
 
46
- var TestRunnerTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3 = (0, _test.test)(), _dec4 = (0, _test.test)(), _dec5 = (0, _test.test)(), _dec6 = (0, _test.test)(), _dec7 = (0, _test.test)(), (_class = (_temp = _class2 = /*#__PURE__*/function (_AbstractTestTest) {
46
+ var TestRunnerTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3 = (0, _test.test)(), _dec4 = (0, _test.test)(), _dec5 = (0, _test.test)(), _dec6 = (0, _test.test)(), _dec7 = (0, _test.test)(), (_class = (_class2 = /*#__PURE__*/function (_AbstractTestTest) {
47
47
  (0, _inherits2["default"])(TestRunnerTest, _AbstractTestTest);
48
48
 
49
49
  var _super = _createSuper(TestRunnerTest);
@@ -494,6 +494,6 @@ var TestRunnerTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
494
494
  }()
495
495
  }]);
496
496
  return TestRunnerTest;
497
- }(_AbstractTestTest2["default"]), (0, _defineProperty2["default"])(_class2, "testRunner", void 0), _temp), ((0, _applyDecoratedDescriptor2["default"])(_class, "canCreateTestRunner", [_dec], Object.getOwnPropertyDescriptor(_class, "canCreateTestRunner"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "runningOnDirWithNoTestsConfiguredThrows", [_dec2], Object.getOwnPropertyDescriptor(_class, "runningOnDirWithNoTestsConfiguredThrows"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "getsFailedResultsWhenTestFails", [_dec3], Object.getOwnPropertyDescriptor(_class, "getsFailedResultsWhenTestFails"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "passesOnGoodTests", [_dec4], Object.getOwnPropertyDescriptor(_class, "passesOnGoodTests"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "emitsEventsOnTestUpdates", [_dec5], Object.getOwnPropertyDescriptor(_class, "emitsEventsOnTestUpdates"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canHandlePattern", [_dec6], Object.getOwnPropertyDescriptor(_class, "canHandlePattern"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "testsCanBeKilled", [_dec7], Object.getOwnPropertyDescriptor(_class, "testsCanBeKilled"), _class)), _class));
497
+ }(_AbstractTestTest2["default"]), (0, _defineProperty2["default"])(_class2, "testRunner", void 0), _class2), ((0, _applyDecoratedDescriptor2["default"])(_class, "canCreateTestRunner", [_dec], Object.getOwnPropertyDescriptor(_class, "canCreateTestRunner"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "runningOnDirWithNoTestsConfiguredThrows", [_dec2], Object.getOwnPropertyDescriptor(_class, "runningOnDirWithNoTestsConfiguredThrows"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "getsFailedResultsWhenTestFails", [_dec3], Object.getOwnPropertyDescriptor(_class, "getsFailedResultsWhenTestFails"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "passesOnGoodTests", [_dec4], Object.getOwnPropertyDescriptor(_class, "passesOnGoodTests"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "emitsEventsOnTestUpdates", [_dec5], Object.getOwnPropertyDescriptor(_class, "emitsEventsOnTestUpdates"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canHandlePattern", [_dec6], Object.getOwnPropertyDescriptor(_class, "canHandlePattern"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "testsCanBeKilled", [_dec7], Object.getOwnPropertyDescriptor(_class, "testsCanBeKilled"), _class)), _class));
498
498
  exports["default"] = TestRunnerTest;
499
499
  //# sourceMappingURL=TestRunner.test.js.map
@@ -33,13 +33,13 @@ var _AbstractCliTest2 = _interopRequireDefault(require("../../tests/AbstractCliT
33
33
 
34
34
  var _WidgetFactory = _interopRequireDefault(require("../../widgets/WidgetFactory"));
35
35
 
36
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _temp;
36
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2;
37
37
 
38
38
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
39
39
 
40
40
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
41
41
 
42
- var WidgetsTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3 = (0, _test.test)(), _dec4 = (0, _test.test)(), _dec5 = (0, _test.test)(), _dec6 = (0, _test.test)(), _dec7 = _test.test.skip('enable when ready to fake termkit'), (_class = (_temp = _class2 = /*#__PURE__*/function (_AbstractCliTest) {
42
+ var WidgetsTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3 = (0, _test.test)(), _dec4 = (0, _test.test)(), _dec5 = (0, _test.test)(), _dec6 = (0, _test.test)(), _dec7 = _test.test.skip('enable when ready to fake termkit'), (_class = (_class2 = /*#__PURE__*/function (_AbstractCliTest) {
43
43
  (0, _inherits2["default"])(WidgetsTest, _AbstractCliTest);
44
44
 
45
45
  var _super = _createSuper(WidgetsTest);
@@ -218,6 +218,6 @@ var WidgetsTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3 =
218
218
  }
219
219
  }]);
220
220
  return WidgetsTest;
221
- }(_AbstractCliTest2["default"]), (0, _defineProperty2["default"])(_class2, "factory", void 0), _temp), ((0, _applyDecoratedDescriptor2["default"])(_class, "canCreateFactory", [_dec], Object.getOwnPropertyDescriptor(_class, "canCreateFactory"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canCreateTextWidget", [_dec2], Object.getOwnPropertyDescriptor(_class, "canCreateTextWidget"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "setsStartingFrame", [_dec3], Object.getOwnPropertyDescriptor(_class, "setsStartingFrame"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canCreateWindow", [_dec4], Object.getOwnPropertyDescriptor(_class, "canCreateWindow"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canCreateProgressBar", [_dec5], Object.getOwnPropertyDescriptor(_class, "canCreateProgressBar"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canCreateText", [_dec6], Object.getOwnPropertyDescriptor(_class, "canCreateText"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canCreateLayout", [_dec7], Object.getOwnPropertyDescriptor(_class, "canCreateLayout"), _class)), _class));
221
+ }(_AbstractCliTest2["default"]), (0, _defineProperty2["default"])(_class2, "factory", void 0), _class2), ((0, _applyDecoratedDescriptor2["default"])(_class, "canCreateFactory", [_dec], Object.getOwnPropertyDescriptor(_class, "canCreateFactory"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canCreateTextWidget", [_dec2], Object.getOwnPropertyDescriptor(_class, "canCreateTextWidget"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "setsStartingFrame", [_dec3], Object.getOwnPropertyDescriptor(_class, "setsStartingFrame"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canCreateWindow", [_dec4], Object.getOwnPropertyDescriptor(_class, "canCreateWindow"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canCreateProgressBar", [_dec5], Object.getOwnPropertyDescriptor(_class, "canCreateProgressBar"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canCreateText", [_dec6], Object.getOwnPropertyDescriptor(_class, "canCreateText"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canCreateLayout", [_dec7], Object.getOwnPropertyDescriptor(_class, "canCreateLayout"), _class)), _class));
222
222
  exports["default"] = WidgetsTest;
223
223
  //# sourceMappingURL=Widgets.test.js.map
@@ -84,28 +84,28 @@ var CreateAction = /*#__PURE__*/function (_AbstractAction) {
84
84
  case 8:
85
85
  candidates = _context.sent;
86
86
 
87
- if (!(candidates.length > 0)) {
87
+ if (!_spruceSkillUtils.diskUtil.doesDirExist(resolvedDestination)) {
88
88
  _context.next = 13;
89
89
  break;
90
90
  }
91
91
 
92
92
  _context.next = 12;
93
- return this.promptForParentTestClassAndOptionallyInstallDependencies(candidates, parentTestClass, resolvedDestination);
93
+ return this.promptForSubDir(resolvedDestination, type);
94
94
 
95
95
  case 12:
96
- parentTestClass = _context.sent;
96
+ resolvedDestination = _context.sent;
97
97
 
98
98
  case 13:
99
- if (!_spruceSkillUtils.diskUtil.doesDirExist(resolvedDestination)) {
99
+ if (!(candidates.length > 0)) {
100
100
  _context.next = 17;
101
101
  break;
102
102
  }
103
103
 
104
104
  _context.next = 16;
105
- return this.promptForSubDir(resolvedDestination, type);
105
+ return this.promptForParentTestClassAndOptionallyInstallDependencies(candidates, parentTestClass, resolvedDestination);
106
106
 
107
107
  case 16:
108
- resolvedDestination = _context.sent;
108
+ parentTestClass = _context.sent;
109
109
 
110
110
  case 17:
111
111
  this.ui.startLoading('Generating test file...');
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/features/test/actions/CreateAction.ts"],"names":["CreateAction","createTestActionSchema","options","normalizedOptions","validateAndNormalizeOptions","testDestinationDir","namePascal","nameCamel","type","resolvedDestination","diskUtil","resolvePath","cwd","ui","startLoading","testFeature","parent","stopLoading","buildParentClassCandidates","candidates","length","promptForParentTestClassAndOptionallyInstallDependencies","parentTestClass","doesDirExist","promptForSubDir","writer","Writer","generateTest","namesUtil","toPascal","results","files","hints","subdirs","readDir","filter","d","isDir","prompt","label","isRequired","choices","value","map","dir","match","candidate","idx","optionallyInstallFeatureBasedOnSelection","buildParentClassFromCandidate","featureCode","featureInstaller","isInstalled","name","install","features","code","isDefaultExport","importPath","pathUtil","relative","path","replace","extname","AbstractAction"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAGA;;AACA;;;;;;;;;;IAOqBA,Y;;;;;;;;;;;;;;;sGACGC,6B;0GACI,uB;;;;;;;mGAE3B,iBAAqBC,OAArB;AAAA;AAAA;AAAA;AAAA;AAAA;AACOC,gBAAAA,iBADP,GAC2B,KAAKC,2BAAL,CAAiCF,OAAjC,CAD3B;AAESG,gBAAAA,kBAFT,GAGEF,iBAHF,CAESE,kBAFT,EAE6BC,UAF7B,GAGEH,iBAHF,CAE6BG,UAF7B,EAEyCC,SAFzC,GAGEJ,iBAHF,CAEyCI,SAFzC,EAEoDC,IAFpD,GAGEL,iBAHF,CAEoDK,IAFpD;AAKKC,gBAAAA,mBALL,GAK2BC,2BAASC,WAAT,CACzB,KAAKC,GADoB,EAEzBP,kBAFyB,EAGzBG,IAHyB,CAL3B;AAWC,qBAAKK,EAAL,CAAQC,YAAR,CAAqB,wCAArB;AAEMC,gBAAAA,WAbP,GAaqB,KAAKC,MAb1B;AAeC,qBAAKH,EAAL,CAAQI,WAAR;AAfD;AAAA,uBAqB0BF,WAAW,CAACG,0BAAZ,EArB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;AAAA;AAAA;AAAA,O;;;;;;;;;;WAkBA,uCACC4B,KADD,EAECpC,mBAFD,EAQE;AAAA;;AACD,aAAO;AACN4C,QAAAA,IAAI,EAAER,KAAK,CAACQ,IADN;AAENd,QAAAA,KAAK,EAAEM,KAAK,CAACN,KAFP;AAGNkB,QAAAA,eAAe,EAAEZ,KAAK,CAACY,eAHjB;AAINC,QAAAA,UAAU,mBACTb,KAAK,UADI,yDAETc,iBAASC,QAAT,CACCnD,mBADD,EAEC;AACAoC,QAAAA,KAAK,CAACgB,IAAN,CAAWC,OAAX,CAAmBH,iBAASI,OAAT,CAAiBlB,KAAK,CAACgB,IAAvB,CAAnB,EAAiD,EAAjD,CAHD;AANK,OAAP;AAYA;;;EAvKwCG,2B","sourcesContent":["import pathUtil from 'path'\nimport { namesUtil } from '@sprucelabs/spruce-skill-utils'\nimport { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { SpruceSchemas } from '#spruce/schemas/schemas.types'\nimport createTestActionSchema from '#spruce/schemas/spruceCli/v2020_07_22/createTestOptions.schema'\nimport AbstractAction from '../../AbstractAction'\nimport { FeatureActionResponse } from '../../features.types'\nimport TestFeature, { ParentClassCandidate } from '../TestFeature'\n\ntype OptionsSchema = SpruceSchemas.SpruceCli.v2020_07_22.CreateTestOptionsSchema\ntype Options = SpruceSchemas.SpruceCli.v2020_07_22.CreateTestOptions\n\nexport default class CreateAction extends AbstractAction<OptionsSchema> {\n\tpublic optionsSchema = createTestActionSchema\n\tpublic invocationMessage = 'Creating a test... 🛡'\n\n\tpublic async execute(options: Options): Promise<FeatureActionResponse> {\n\t\tconst normalizedOptions = this.validateAndNormalizeOptions(options)\n\t\tconst { testDestinationDir, namePascal, nameCamel, type } =\n\t\t\tnormalizedOptions\n\n\t\tlet resolvedDestination = diskUtil.resolvePath(\n\t\t\tthis.cwd,\n\t\t\ttestDestinationDir,\n\t\t\ttype\n\t\t)\n\n\t\tthis.ui.startLoading('Checking potential parent test classes')\n\n\t\tconst testFeature = this.parent as TestFeature\n\n\t\tthis.ui.stopLoading()\n\n\t\tlet parentTestClass:\n\t\t\t| undefined\n\t\t\t| { name: string; importPath: string; isDefaultExport: boolean }\n\n\t\tconst candidates = await testFeature.buildParentClassCandidates()\n\n\t\tif (candidates.length > 0) {\n\t\t\tparentTestClass =\n\t\t\t\tawait this.promptForParentTestClassAndOptionallyInstallDependencies(\n\t\t\t\t\tcandidates,\n\t\t\t\t\tparentTestClass,\n\t\t\t\t\tresolvedDestination\n\t\t\t\t)\n\t\t}\n\n\t\tif (diskUtil.doesDirExist(resolvedDestination)) {\n\t\t\tresolvedDestination = await this.promptForSubDir(\n\t\t\t\tresolvedDestination,\n\t\t\t\ttype\n\t\t\t)\n\t\t}\n\n\t\tthis.ui.startLoading('Generating test file...')\n\n\t\tconst writer = this.Writer('test')\n\n\t\tconst results = await writer.generateTest(resolvedDestination, {\n\t\t\t...normalizedOptions,\n\t\t\ttype,\n\t\t\tnameCamel,\n\t\t\tparentTestClass,\n\t\t\tnamePascal: namePascal ?? namesUtil.toPascal(nameCamel),\n\t\t})\n\n\t\treturn {\n\t\t\tfiles: results,\n\t\t\thints: [\"run `spruce test` in your skill when you're ready!\"],\n\t\t}\n\t}\n\tprivate async promptForSubDir(resolvedDestination: string, type: string) {\n\t\tconst subdirs = diskUtil\n\t\t\t.readDir(resolvedDestination)\n\t\t\t.filter((d) =>\n\t\t\t\tdiskUtil.isDir(diskUtil.resolvePath(resolvedDestination, d))\n\t\t\t)\n\n\t\tif (subdirs.length > 0) {\n\t\t\tconst match = await this.ui.prompt({\n\t\t\t\ttype: 'select',\n\t\t\t\tlabel: 'Where should I write this test?',\n\t\t\t\tisRequired: true,\n\t\t\t\toptions: {\n\t\t\t\t\tchoices: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvalue: '.',\n\t\t\t\t\t\t\tlabel: `${type}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t...subdirs.map((dir) => ({\n\t\t\t\t\t\t\tvalue: `${dir}`,\n\t\t\t\t\t\t\tlabel: `${type}/${dir}`,\n\t\t\t\t\t\t})),\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t})\n\n\t\t\tresolvedDestination = diskUtil.resolvePath(resolvedDestination, match)\n\t\t}\n\t\treturn resolvedDestination\n\t}\n\n\tprivate async promptForParentTestClassAndOptionallyInstallDependencies(\n\t\tcandidates: ParentClassCandidate[],\n\t\tparentTestClass:\n\t\t\t| { name: string; importPath: string; isDefaultExport: boolean }\n\t\t\t| undefined,\n\t\tresolvedDestination: string\n\t) {\n\t\tconst idx = await this.ui.prompt({\n\t\t\ttype: 'select',\n\t\t\tisRequired: true,\n\t\t\tlabel: 'Which abstract test class do you want to extend?',\n\t\t\toptions: {\n\t\t\t\tchoices: [\n\t\t\t\t\t{ value: '', label: 'AbstractSpruceTest (default)' },\n\t\t\t\t\t...candidates.map((candidate, idx) => ({\n\t\t\t\t\t\tvalue: `${idx}`,\n\t\t\t\t\t\tlabel: candidate.label,\n\t\t\t\t\t})),\n\t\t\t\t],\n\t\t\t},\n\t\t})\n\n\t\tif (idx !== '' && candidates[+idx]) {\n\t\t\tconst match = candidates[+idx]\n\n\t\t\tif (match) {\n\t\t\t\tawait this.optionallyInstallFeatureBasedOnSelection(match)\n\n\t\t\t\tparentTestClass = this.buildParentClassFromCandidate(\n\t\t\t\t\tmatch,\n\t\t\t\t\tresolvedDestination\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t\treturn parentTestClass\n\t}\n\n\tprivate async optionallyInstallFeatureBasedOnSelection(\n\t\tmatch: ParentClassCandidate\n\t) {\n\t\tif (match.featureCode) {\n\t\t\tconst isInstalled = await this.featureInstaller.isInstalled(\n\t\t\t\tmatch.featureCode\n\t\t\t)\n\n\t\t\tif (!isInstalled) {\n\t\t\t\tthis.ui.startLoading(`Installing ${match.name}...`)\n\t\t\t\tawait this.featureInstaller.install({\n\t\t\t\t\tfeatures: [{ code: match.featureCode as any }],\n\t\t\t\t})\n\t\t\t\tthis.ui.stopLoading()\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate buildParentClassFromCandidate(\n\t\tmatch: ParentClassCandidate,\n\t\tresolvedDestination: string\n\t): {\n\t\tname: string\n\t\tlabel: string\n\t\timportPath: string\n\t\tisDefaultExport: boolean\n\t} {\n\t\treturn {\n\t\t\tname: match.name,\n\t\t\tlabel: match.label,\n\t\t\tisDefaultExport: match.isDefaultExport,\n\t\t\timportPath:\n\t\t\t\tmatch.import ??\n\t\t\t\tpathUtil.relative(\n\t\t\t\t\tresolvedDestination,\n\t\t\t\t\t//@ts-ignore\n\t\t\t\t\tmatch.path.replace(pathUtil.extname(match.path), '')\n\t\t\t\t),\n\t\t}\n\t}\n}\n"],"file":"CreateAction.js"}
1
+ {"version":3,"sources":["../../../../src/features/test/actions/CreateAction.ts"],"names":["CreateAction","createTestActionSchema","options","normalizedOptions","validateAndNormalizeOptions","testDestinationDir","namePascal","nameCamel","type","resolvedDestination","diskUtil","resolvePath","cwd","ui","startLoading","testFeature","parent","stopLoading","buildParentClassCandidates","candidates","doesDirExist","promptForSubDir","length","promptForParentTestClassAndOptionallyInstallDependencies","parentTestClass","writer","Writer","generateTest","namesUtil","toPascal","results","files","hints","subdirs","readDir","filter","d","isDir","prompt","label","isRequired","choices","value","map","dir","match","candidate","idx","optionallyInstallFeatureBasedOnSelection","buildParentClassFromCandidate","featureCode","featureInstaller","isInstalled","name","install","features","code","isDefaultExport","importPath","pathUtil","relative","path","replace","extname","AbstractAction"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAGA;;AACA;;;;;;;;;;IAOqBA,Y;;;;;;;;;;;;;;;sGACGC,6B;0GACI,uB;;;;;;;mGAE3B,iBAAqBC,OAArB;AAAA;AAAA;AAAA;AAAA;AAAA;AACOC,gBAAAA,iBADP,GAC2B,KAAKC,2BAAL,CAAiCF,OAAjC,CAD3B;AAESG,gBAAAA,kBAFT,GAGEF,iBAHF,CAESE,kBAFT,EAE6BC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,WAAtB,CACzBP,KAAK,CAACK,WADmB,CAJ5B;;AAAA;AAIQE,gBAAAA,WAJR;;AAAA,oBAQOA,WARP;AAAA;AAAA;AAAA;;AASG,qBAAKvC,EAAL,CAAQC,YAAR,sBAAmC+B,KAAK,CAACQ,IAAzC;AATH;AAAA,uBAUS,KAAKF,gBAAL,CAAsBG,OAAtB,CAA8B;AACnCC,kBAAAA,QAAQ,EAAE,CAAC;AAAEC,oBAAAA,IAAI,EAAEX,KAAK,CAACK;AAAd,mBAAD;AADyB,iBAA9B,CAVT;;AAAA;AAaG,qBAAKrC,EAAL,CAAQI,WAAR;;AAbH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;WAkBA,uCACC4B,KADD,EAECpC,mBAFD,EAQE;AAAA;;AACD,aAAO;AACN4C,QAAAA,IAAI,EAAER,KAAK,CAACQ,IADN;AAENd,QAAAA,KAAK,EAAEM,KAAK,CAACN,KAFP;AAGNkB,QAAAA,eAAe,EAAEZ,KAAK,CAACY,eAHjB;AAINC,QAAAA,UAAU,mBACTb,KAAK,UADI,yDAETc,iBAASC,QAAT,CACCnD,mBADD,EAEC;AACAoC,QAAAA,KAAK,CAACgB,IAAN,CAAWC,OAAX,CAAmBH,iBAASI,OAAT,CAAiBlB,KAAK,CAACgB,IAAvB,CAAnB,EAAiD,EAAjD,CAHD;AANK,OAAP;AAYA;;;EAvKwCG,2B","sourcesContent":["import pathUtil from 'path'\nimport { namesUtil } from '@sprucelabs/spruce-skill-utils'\nimport { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { SpruceSchemas } from '#spruce/schemas/schemas.types'\nimport createTestActionSchema from '#spruce/schemas/spruceCli/v2020_07_22/createTestOptions.schema'\nimport AbstractAction from '../../AbstractAction'\nimport { FeatureActionResponse } from '../../features.types'\nimport TestFeature, { ParentClassCandidate } from '../TestFeature'\n\ntype OptionsSchema = SpruceSchemas.SpruceCli.v2020_07_22.CreateTestOptionsSchema\ntype Options = SpruceSchemas.SpruceCli.v2020_07_22.CreateTestOptions\n\nexport default class CreateAction extends AbstractAction<OptionsSchema> {\n\tpublic optionsSchema = createTestActionSchema\n\tpublic invocationMessage = 'Creating a test... 🛡'\n\n\tpublic async execute(options: Options): Promise<FeatureActionResponse> {\n\t\tconst normalizedOptions = this.validateAndNormalizeOptions(options)\n\t\tconst { testDestinationDir, namePascal, nameCamel, type } =\n\t\t\tnormalizedOptions\n\n\t\tlet resolvedDestination = diskUtil.resolvePath(\n\t\t\tthis.cwd,\n\t\t\ttestDestinationDir,\n\t\t\ttype\n\t\t)\n\n\t\tthis.ui.startLoading('Checking potential parent test classes')\n\n\t\tconst testFeature = this.parent as TestFeature\n\n\t\tthis.ui.stopLoading()\n\n\t\tlet parentTestClass:\n\t\t\t| undefined\n\t\t\t| { name: string; importPath: string; isDefaultExport: boolean }\n\n\t\tconst candidates = await testFeature.buildParentClassCandidates()\n\n\t\tif (diskUtil.doesDirExist(resolvedDestination)) {\n\t\t\tresolvedDestination = await this.promptForSubDir(\n\t\t\t\tresolvedDestination,\n\t\t\t\ttype\n\t\t\t)\n\t\t}\n\n\t\tif (candidates.length > 0) {\n\t\t\tparentTestClass =\n\t\t\t\tawait this.promptForParentTestClassAndOptionallyInstallDependencies(\n\t\t\t\t\tcandidates,\n\t\t\t\t\tparentTestClass,\n\t\t\t\t\tresolvedDestination\n\t\t\t\t)\n\t\t}\n\n\t\tthis.ui.startLoading('Generating test file...')\n\n\t\tconst writer = this.Writer('test')\n\n\t\tconst results = await writer.generateTest(resolvedDestination, {\n\t\t\t...normalizedOptions,\n\t\t\ttype,\n\t\t\tnameCamel,\n\t\t\tparentTestClass,\n\t\t\tnamePascal: namePascal ?? namesUtil.toPascal(nameCamel),\n\t\t})\n\n\t\treturn {\n\t\t\tfiles: results,\n\t\t\thints: [\"run `spruce test` in your skill when you're ready!\"],\n\t\t}\n\t}\n\tprivate async promptForSubDir(resolvedDestination: string, type: string) {\n\t\tconst subdirs = diskUtil\n\t\t\t.readDir(resolvedDestination)\n\t\t\t.filter((d) =>\n\t\t\t\tdiskUtil.isDir(diskUtil.resolvePath(resolvedDestination, d))\n\t\t\t)\n\n\t\tif (subdirs.length > 0) {\n\t\t\tconst match = await this.ui.prompt({\n\t\t\t\ttype: 'select',\n\t\t\t\tlabel: 'Where should I write this test?',\n\t\t\t\tisRequired: true,\n\t\t\t\toptions: {\n\t\t\t\t\tchoices: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvalue: '.',\n\t\t\t\t\t\t\tlabel: `${type}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t...subdirs.map((dir) => ({\n\t\t\t\t\t\t\tvalue: `${dir}`,\n\t\t\t\t\t\t\tlabel: `${type}/${dir}`,\n\t\t\t\t\t\t})),\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t})\n\n\t\t\tresolvedDestination = diskUtil.resolvePath(resolvedDestination, match)\n\t\t}\n\t\treturn resolvedDestination\n\t}\n\n\tprivate async promptForParentTestClassAndOptionallyInstallDependencies(\n\t\tcandidates: ParentClassCandidate[],\n\t\tparentTestClass:\n\t\t\t| { name: string; importPath: string; isDefaultExport: boolean }\n\t\t\t| undefined,\n\t\tresolvedDestination: string\n\t) {\n\t\tconst idx = await this.ui.prompt({\n\t\t\ttype: 'select',\n\t\t\tisRequired: true,\n\t\t\tlabel: 'Which abstract test class do you want to extend?',\n\t\t\toptions: {\n\t\t\t\tchoices: [\n\t\t\t\t\t{ value: '', label: 'AbstractSpruceTest (default)' },\n\t\t\t\t\t...candidates.map((candidate, idx) => ({\n\t\t\t\t\t\tvalue: `${idx}`,\n\t\t\t\t\t\tlabel: candidate.label,\n\t\t\t\t\t})),\n\t\t\t\t],\n\t\t\t},\n\t\t})\n\n\t\tif (idx !== '' && candidates[+idx]) {\n\t\t\tconst match = candidates[+idx]\n\n\t\t\tif (match) {\n\t\t\t\tawait this.optionallyInstallFeatureBasedOnSelection(match)\n\n\t\t\t\tparentTestClass = this.buildParentClassFromCandidate(\n\t\t\t\t\tmatch,\n\t\t\t\t\tresolvedDestination\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t\treturn parentTestClass\n\t}\n\n\tprivate async optionallyInstallFeatureBasedOnSelection(\n\t\tmatch: ParentClassCandidate\n\t) {\n\t\tif (match.featureCode) {\n\t\t\tconst isInstalled = await this.featureInstaller.isInstalled(\n\t\t\t\tmatch.featureCode\n\t\t\t)\n\n\t\t\tif (!isInstalled) {\n\t\t\t\tthis.ui.startLoading(`Installing ${match.name}...`)\n\t\t\t\tawait this.featureInstaller.install({\n\t\t\t\t\tfeatures: [{ code: match.featureCode as any }],\n\t\t\t\t})\n\t\t\t\tthis.ui.stopLoading()\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate buildParentClassFromCandidate(\n\t\tmatch: ParentClassCandidate,\n\t\tresolvedDestination: string\n\t): {\n\t\tname: string\n\t\tlabel: string\n\t\timportPath: string\n\t\tisDefaultExport: boolean\n\t} {\n\t\treturn {\n\t\t\tname: match.name,\n\t\t\tlabel: match.label,\n\t\t\tisDefaultExport: match.isDefaultExport,\n\t\t\timportPath:\n\t\t\t\tmatch.import ??\n\t\t\t\tpathUtil.relative(\n\t\t\t\t\tresolvedDestination,\n\t\t\t\t\t//@ts-ignore\n\t\t\t\t\tmatch.path.replace(pathUtil.extname(match.path), '')\n\t\t\t\t),\n\t\t}\n\t}\n}\n"],"file":"CreateAction.js"}
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  ]
19
19
  },
20
20
  "license": "MIT",
21
- "version": "15.2.0",
21
+ "version": "15.2.4",
22
22
  "bin": {
23
23
  "spruce": "./build/index.js"
24
24
  },
@@ -72,25 +72,25 @@
72
72
  "watch.tsc": "tsc -w --sourceMap"
73
73
  },
74
74
  "dependencies": {
75
- "@babel/cli": "^7.17.0",
75
+ "@babel/cli": "^7.17.3",
76
76
  "@babel/plugin-proposal-decorators": "^7.17.2",
77
77
  "@babel/runtime": "^7.17.2",
78
78
  "@jest/reporters": "^27.5.1",
79
- "@sprucelabs/error": "^5.0.397",
80
- "@sprucelabs/heartwood-view-controllers": "^63.3.12",
81
- "@sprucelabs/jest-json-reporter": "^6.0.324",
82
- "@sprucelabs/mercury-client": "^21.0.50",
83
- "@sprucelabs/mercury-event-emitter": "^21.0.50",
84
- "@sprucelabs/mercury-types": "^27.0.70",
85
- "@sprucelabs/schema": "^26.0.66",
86
- "@sprucelabs/spruce-core-schemas": "^23.0.68",
87
- "@sprucelabs/spruce-event-plugin": "^24.0.53",
88
- "@sprucelabs/spruce-event-utils": "^18.0.70",
89
- "@sprucelabs/spruce-skill-booter": "^24.0.53",
90
- "@sprucelabs/spruce-skill-utils": "^24.1.16",
91
- "@sprucelabs/spruce-templates": "^15.2.0",
92
- "@typescript-eslint/eslint-plugin": "^5.11.0",
93
- "@typescript-eslint/parser": "^5.11.0",
79
+ "@sprucelabs/error": "^5.0.398",
80
+ "@sprucelabs/heartwood-view-controllers": "^63.4.4",
81
+ "@sprucelabs/jest-json-reporter": "^6.0.325",
82
+ "@sprucelabs/mercury-client": "^21.0.57",
83
+ "@sprucelabs/mercury-event-emitter": "^21.0.57",
84
+ "@sprucelabs/mercury-types": "^27.0.78",
85
+ "@sprucelabs/schema": "^26.0.73",
86
+ "@sprucelabs/spruce-core-schemas": "^23.0.76",
87
+ "@sprucelabs/spruce-event-plugin": "^24.0.63",
88
+ "@sprucelabs/spruce-event-utils": "^18.0.80",
89
+ "@sprucelabs/spruce-skill-booter": "^24.0.63",
90
+ "@sprucelabs/spruce-skill-utils": "^24.1.24",
91
+ "@sprucelabs/spruce-templates": "^15.2.4",
92
+ "@typescript-eslint/eslint-plugin": "^5.12.0",
93
+ "@typescript-eslint/parser": "^5.12.0",
94
94
  "cfonts": "^2.10.0",
95
95
  "chalk": "^4.1.2",
96
96
  "chokidar": "^3.5.3",
@@ -119,16 +119,16 @@
119
119
  "uuid": "^8.3.2"
120
120
  },
121
121
  "devDependencies": {
122
- "@sprucelabs/data-stores": "^8.0.73",
123
- "@sprucelabs/jest-sheets-reporter": "^1.3.8",
124
- "@sprucelabs/mercury-core-events": "^2.0.71",
122
+ "@sprucelabs/data-stores": "^8.0.81",
123
+ "@sprucelabs/jest-sheets-reporter": "^1.3.9",
124
+ "@sprucelabs/mercury-core-events": "^2.0.81",
125
125
  "@sprucelabs/resolve-path-aliases": "^1.0.260",
126
- "@sprucelabs/spruce-conversation-plugin": "^24.0.53",
127
- "@sprucelabs/spruce-deploy-plugin": "^24.0.53",
128
- "@sprucelabs/spruce-store-plugin": "^24.0.53",
129
- "@sprucelabs/spruce-test-fixtures": "^24.0.53",
126
+ "@sprucelabs/spruce-conversation-plugin": "^24.0.63",
127
+ "@sprucelabs/spruce-deploy-plugin": "^24.0.63",
128
+ "@sprucelabs/spruce-store-plugin": "^24.0.63",
129
+ "@sprucelabs/spruce-test-fixtures": "^24.0.63",
130
130
  "@sprucelabs/test": "^7.7.280",
131
- "@sprucelabs/test-utils": "^3.0.410",
131
+ "@sprucelabs/test-utils": "^3.0.412",
132
132
  "@types/blessed": "^0.1.19",
133
133
  "@types/eslint": "^8.4.1",
134
134
  "@types/fs-extra": "^9.0.13",
@@ -138,7 +138,7 @@
138
138
  "@types/lodash": "^4.14.178",
139
139
  "@types/md5": "^2.3.2",
140
140
  "@types/mkdirp": "^1.0.2",
141
- "@types/node": "^17.0.17",
141
+ "@types/node": "^17.0.18",
142
142
  "@types/promise.allsettled": "^1.0.3",
143
143
  "@types/ps-node": "^0.1.1",
144
144
  "@types/rimraf": "^3.0.2",
@@ -597,5 +597,5 @@
597
597
  "ora"
598
598
  ]
599
599
  },
600
- "gitHead": "ec064c3ab66d4a4252077a10eeb41265041f3bae"
600
+ "gitHead": "2849362facb4de6b8b0e8c1d4e6fc308ccabfc9a"
601
601
  }
@@ -29,7 +29,7 @@ export default class CreatingBehavioralTestsTest extends AbstractTestTest {
29
29
  'AbstractSpruceFixtureTest'
30
30
  )
31
31
  @test(
32
- 'can create behavioral test with AbstractSpruceFixtureTest',
32
+ 'can create behavioral test with AbstractStoreTest',
33
33
  'AbstractStoreTest (requires install)'
34
34
  )
35
35
  protected static async canCreateBehavioralTest(testName: string) {
@@ -64,7 +64,7 @@ export default class CreatingBehavioralTestsTest extends AbstractTestTest {
64
64
 
65
65
  this.createTestSubDir(testType, 'dummy1')
66
66
 
67
- const { promise } = await this.installStartTestSelectSubclassWaitForInput(
67
+ const { promise } = await this.installAndStartTestActionAndWaitForInput(
68
68
  testType
69
69
  )
70
70
 
@@ -72,6 +72,7 @@ export default class CreatingBehavioralTestsTest extends AbstractTestTest {
72
72
  uiAssert.assertSelectRenderChoice(this.ui, `dummy1`, `${testType}/dummy1`)
73
73
 
74
74
  await this.ui.sendInput('.')
75
+ await this.waitAndSelectSubClass()
75
76
 
76
77
  await promise
77
78
  }
@@ -86,7 +87,7 @@ export default class CreatingBehavioralTestsTest extends AbstractTestTest {
86
87
  this.createTestSubDir('behavioral', dir)
87
88
  }
88
89
 
89
- const { promise } = await this.installStartTestSelectSubclassWaitForInput()
90
+ const { promise } = await this.installAndStartTestActionAndWaitForInput()
90
91
 
91
92
  for (const dir of dirs) {
92
93
  uiAssert.assertSelectRenderChoice(this.ui, `${dir}`, `behavioral/${dir}`)
@@ -94,6 +95,8 @@ export default class CreatingBehavioralTestsTest extends AbstractTestTest {
94
95
 
95
96
  await this.ui.sendInput('.')
96
97
 
98
+ await this.waitAndSelectSubClass()
99
+
97
100
  await promise
98
101
  }
99
102
 
@@ -103,12 +106,14 @@ export default class CreatingBehavioralTestsTest extends AbstractTestTest {
103
106
  await this.installTests()
104
107
  this.createTestSubDir('behavioral', dirName)
105
108
 
106
- const { promise } = await this.installStartTestSelectSubclassWaitForInput(
109
+ const { promise } = await this.installAndStartTestActionAndWaitForInput(
107
110
  'behavioral'
108
111
  )
109
112
 
110
113
  await this.ui.sendInput(`${dirName}`)
111
114
 
115
+ await this.waitAndSelectSubClass()
116
+
112
117
  const results = await promise
113
118
 
114
119
  const expectedPath = this.resolvePath(
@@ -130,7 +135,7 @@ export default class CreatingBehavioralTestsTest extends AbstractTestTest {
130
135
  const file = this.resolveTestDir('behavioral', 'test.ts')
131
136
  diskUtil.writeFile(file, 'what the!?')
132
137
 
133
- const { promise } = await this.installStartTestSelectSubclassWaitForInput()
138
+ await this.installAndStartTestActionAndWaitForInput()
134
139
 
135
140
  uiAssert.assertSelectDidNotRenderChoice(
136
141
  this.ui,
@@ -138,22 +143,7 @@ export default class CreatingBehavioralTestsTest extends AbstractTestTest {
138
143
  `behavioral/test/test.ts`
139
144
  )
140
145
 
141
- await promise
142
- }
143
-
144
- private static async installStartTestSelectSubclassWaitForInput(
145
- testType?: string,
146
- selectedSubClass?: string
147
- ) {
148
- const { promise } = await this.installAndStartTestActionAndWaitForInput(
149
- testType
150
- )
151
-
152
- await this.ui.sendInput(selectedSubClass ?? '')
153
-
154
- await uiAssert.assertRendersSelect(this.ui)
155
-
156
- return { promise }
146
+ this.ui.reset()
157
147
  }
158
148
 
159
149
  private static createTestSubDir(...testDirs: string[]) {
@@ -179,4 +169,9 @@ export default class CreatingBehavioralTestsTest extends AbstractTestTest {
179
169
  await this.waitForInput()
180
170
  return { promise }
181
171
  }
172
+
173
+ private static async waitAndSelectSubClass(selectedSubClass?: string) {
174
+ await this.waitForInput()
175
+ await this.ui.sendInput(selectedSubClass ?? '')
176
+ }
182
177
  }