@sprucelabs/spruce-cli 19.1.23 → 19.1.25
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.
- package/CHANGELOG.md +16 -0
- package/build/__tests__/behavioral/AddingADependency.test.js +29 -57
- package/build/__tests__/behavioral/AddingADependency.test.js.map +1 -1
- package/build/__tests__/behavioral/BlockingCommands.test.js +9 -17
- package/build/__tests__/behavioral/BlockingCommands.test.js.map +1 -1
- package/build/__tests__/behavioral/BootingTheCli.test.js +9 -17
- package/build/__tests__/behavioral/BootingTheCli.test.js.map +1 -1
- package/build/__tests__/behavioral/BootingWithBadFiles.test.js +13 -25
- package/build/__tests__/behavioral/BootingWithBadFiles.test.js.map +1 -1
- package/build/__tests__/behavioral/CreatingAConversationTopic.test.js +13 -25
- package/build/__tests__/behavioral/CreatingAConversationTopic.test.js.map +1 -1
- package/build/__tests__/behavioral/DeployingASkill.test.js +73 -145
- package/build/__tests__/behavioral/DeployingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/DeployingToSandbox.test.js +61 -121
- package/build/__tests__/behavioral/DeployingToSandbox.test.js.map +1 -1
- package/build/__tests__/behavioral/EnablingAndDisablingCache.test.js +33 -65
- package/build/__tests__/behavioral/EnablingAndDisablingCache.test.js.map +1 -1
- package/build/__tests__/behavioral/GettingCliVersion.test.js +13 -25
- package/build/__tests__/behavioral/GettingCliVersion.test.js.map +1 -1
- package/build/__tests__/behavioral/ManagingDependencies.test.js +21 -41
- package/build/__tests__/behavioral/ManagingDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/OverridingCommandsInPackageJson.test.js +9 -17
- package/build/__tests__/behavioral/OverridingCommandsInPackageJson.test.js.map +1 -1
- package/build/__tests__/behavioral/RegisteringConversationsOnBoot.test.js +10 -18
- package/build/__tests__/behavioral/RegisteringConversationsOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/RememberingUpgradeSelections.test.js +17 -33
- package/build/__tests__/behavioral/RememberingUpgradeSelections.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingLogTransportsInASkill.test.js +29 -57
- package/build/__tests__/behavioral/SettingLogTransportsInASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingRemote.test.js +21 -41
- package/build/__tests__/behavioral/SettingRemote.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingUpVscode.test.js +9 -17
- package/build/__tests__/behavioral/SettingUpVscode.test.js.map +1 -1
- package/build/__tests__/behavioral/TestingAConversation.test.js +25 -49
- package/build/__tests__/behavioral/TestingAConversation.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/CreatingANewErrorBuilder.test.js +21 -41
- package/build/__tests__/behavioral/errors/CreatingANewErrorBuilder.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/KeepingErrorClassInSync.test.js +9 -17
- package/build/__tests__/behavioral/errors/KeepingErrorClassInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/KeepingErrorsInSync.test.js +21 -41
- package/build/__tests__/behavioral/errors/KeepingErrorsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/SettingUpErrors.test.js +9 -17
- package/build/__tests__/behavioral/errors/SettingUpErrors.test.js.map +1 -1
- package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js +45 -89
- package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js.map +1 -1
- package/build/__tests__/behavioral/events/CreatingAListener.test.js +73 -145
- package/build/__tests__/behavioral/events/CreatingAListener.test.js.map +1 -1
- package/build/__tests__/behavioral/events/CreatingAnEvent.test.js +53 -105
- package/build/__tests__/behavioral/events/CreatingAnEvent.test.js.map +1 -1
- package/build/__tests__/behavioral/events/EventWriter.test.js +5 -9
- package/build/__tests__/behavioral/events/EventWriter.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingEventsInSync.test.js +61 -121
- package/build/__tests__/behavioral/events/KeepingEventsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingEventsInSync2.test.js +41 -81
- package/build/__tests__/behavioral/events/KeepingEventsInSync2.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingListenersInSync.test.js +13 -25
- package/build/__tests__/behavioral/events/KeepingListenersInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/events/ListeningToAnEventYouCreate.test.js +9 -17
- package/build/__tests__/behavioral/events/ListeningToAnEventYouCreate.test.js.map +1 -1
- package/build/__tests__/behavioral/events/ListeningToCoreEvents.test.js +9 -17
- package/build/__tests__/behavioral/events/ListeningToCoreEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/events/RegisteringEventsOnBoot.test.js +14 -26
- package/build/__tests__/behavioral/events/RegisteringEventsOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/events/RegisteringGlobalEvents.test.js +26 -50
- package/build/__tests__/behavioral/events/RegisteringGlobalEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/events/SettingUpEvents.test.js +5 -9
- package/build/__tests__/behavioral/events/SettingUpEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.js +13 -25
- package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/events/SyncingEventsOnlyFromDependencies.test.js +13 -25
- package/build/__tests__/behavioral/events/SyncingEventsOnlyFromDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/node/CreatingANodeModule.test.js +13 -25
- package/build/__tests__/behavioral/node/CreatingANodeModule.test.js.map +1 -1
- package/build/__tests__/behavioral/onboard/StartingOnboarding.test.js +13 -25
- package/build/__tests__/behavioral/onboard/StartingOnboarding.test.js.map +1 -1
- package/build/__tests__/behavioral/organization/CreatingAnOrg.test.js +9 -17
- package/build/__tests__/behavioral/organization/CreatingAnOrg.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/CreatingPermissions.test.js +13 -25
- package/build/__tests__/behavioral/permissions/CreatingPermissions.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/PermissionPlugin.test.js +9 -17
- package/build/__tests__/behavioral/permissions/PermissionPlugin.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/PermissionStore.test.js +49 -97
- package/build/__tests__/behavioral/permissions/PermissionStore.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/PermissionWriter.test.js +9 -17
- package/build/__tests__/behavioral/permissions/PermissionWriter.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/SyncingPermissions.test.js +59 -113
- package/build/__tests__/behavioral/permissions/SyncingPermissions.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/support/AbstractPermissionsTest.js +13 -25
- package/build/__tests__/behavioral/permissions/support/AbstractPermissionsTest.js.map +1 -1
- package/build/__tests__/behavioral/person/LoggingInAsPerson.test.js +37 -73
- package/build/__tests__/behavioral/person/LoggingInAsPerson.test.js.map +1 -1
- package/build/__tests__/behavioral/person/SeeWhoIsLoggedIn.test.js +13 -25
- package/build/__tests__/behavioral/person/SeeWhoIsLoggedIn.test.js.map +1 -1
- package/build/__tests__/behavioral/polish/SettingUpPolish.test.js +29 -57
- package/build/__tests__/behavioral/polish/SettingUpPolish.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/CreatingANewSchemaBuilder.test.js +41 -81
- package/build/__tests__/behavioral/schemas/CreatingANewSchemaBuilder.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/CreatingSchemasWithGenerics.test.js +5 -9
- package/build/__tests__/behavioral/schemas/CreatingSchemasWithGenerics.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.js +9 -17
- package/build/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.js +17 -33
- package/build/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.js +21 -41
- package/build/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/ImportingSchemaImports.test.js +5 -9
- package/build/__tests__/behavioral/schemas/ImportingSchemaImports.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/KeepingSchemasInSync.test.js +81 -161
- package/build/__tests__/behavioral/schemas/KeepingSchemasInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/SettingUpSchemas.test.js +13 -25
- package/build/__tests__/behavioral/schemas/SettingUpSchemas.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/SettingUpSchemasForModuleDistribution.test.js +49 -97
- package/build/__tests__/behavioral/schemas/SettingUpSchemasForModuleDistribution.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/SyncingBadSchemasProvidesHelpfulErrorMessages.test.js +5 -9
- package/build/__tests__/behavioral/schemas/SyncingBadSchemasProvidesHelpfulErrorMessages.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/UsingSchemasInCli.test.js +5 -9
- package/build/__tests__/behavioral/schemas/UsingSchemasInCli.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/BootingASkill.test.js +13 -25
- package/build/__tests__/behavioral/skill/BootingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/CreatingASkill.test.js +9 -17
- package/build/__tests__/behavioral/skill/CreatingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/InstallingASkillAtAnOrg.test.js +33 -65
- package/build/__tests__/behavioral/skill/InstallingASkillAtAnOrg.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/LoggingInAsASkill.test.js +37 -73
- package/build/__tests__/behavioral/skill/LoggingInAsASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/RebuildingASkill.test.js +13 -25
- package/build/__tests__/behavioral/skill/RebuildingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/RegisteringASkill.test.js +17 -33
- package/build/__tests__/behavioral/skill/RegisteringASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/SettingUpASkill.test.js +29 -57
- package/build/__tests__/behavioral/skill/SettingUpASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/stores/CreatingADataStore.test.js +45 -89
- package/build/__tests__/behavioral/stores/CreatingADataStore.test.js.map +1 -1
- package/build/__tests__/behavioral/stores/KeepingDataStoresInSync.test.js +41 -81
- package/build/__tests__/behavioral/stores/KeepingDataStoresInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/CreatingATest.test.js +41 -81
- package/build/__tests__/behavioral/tests/CreatingATest.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/RunningTests.test.js +17 -33
- package/build/__tests__/behavioral/tests/RunningTests.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js +45 -89
- package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/SettingUpASkillForTesting.test.js +21 -41
- package/build/__tests__/behavioral/tests/SettingUpASkillForTesting.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/SettingUpTests.test.js +9 -17
- package/build/__tests__/behavioral/tests/SettingUpTests.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/TestReporterSettingsRemembered.test.js +9 -17
- package/build/__tests__/behavioral/tests/TestReporterSettingsRemembered.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/TestingDataStores.test.js +9 -17
- package/build/__tests__/behavioral/tests/TestingDataStores.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies.test.js +17 -33
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies2.test.js +21 -41
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies2.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingANodeModule.test.js +17 -33
- package/build/__tests__/behavioral/upgrading/UpgradingANodeModule.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill.test.js +41 -81
- package/build/__tests__/behavioral/upgrading/UpgradingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill2.test.js +29 -57
- package/build/__tests__/behavioral/upgrading/UpgradingASkill2.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill3.test.js +41 -81
- package/build/__tests__/behavioral/upgrading/UpgradingASkill3.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill4.test.js +17 -33
- package/build/__tests__/behavioral/upgrading/UpgradingASkill4.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill5.test.js +29 -57
- package/build/__tests__/behavioral/upgrading/UpgradingASkill5.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingWithListeners.test.js +18 -32
- package/build/__tests__/behavioral/upgrading/UpgradingWithListeners.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingWithSandboxFeatureInstalled.test.js +29 -57
- package/build/__tests__/behavioral/upgrading/UpgradingWithSandboxFeatureInstalled.test.js.map +1 -1
- package/build/__tests__/behavioral/views/CreatingASkillView.test.js +53 -105
- package/build/__tests__/behavioral/views/CreatingASkillView.test.js.map +1 -1
- package/build/__tests__/behavioral/views/CreatingATheme.test.js +30 -56
- package/build/__tests__/behavioral/views/CreatingATheme.test.js.map +1 -1
- package/build/__tests__/behavioral/views/KeepingViewsInSync.test.js +25 -49
- package/build/__tests__/behavioral/views/KeepingViewsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/views/RegisteringSkillViewOnBoot.test.js +25 -49
- package/build/__tests__/behavioral/views/RegisteringSkillViewOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/views/SettingUpViews.test.js +9 -17
- package/build/__tests__/behavioral/views/SettingUpViews.test.js.map +1 -1
- package/build/__tests__/behavioral/views/TestingViewControllers.test.js +21 -41
- package/build/__tests__/behavioral/views/TestingViewControllers.test.js.map +1 -1
- package/build/__tests__/behavioral/views/WatchingSkillViews.test.js +13 -25
- package/build/__tests__/behavioral/views/WatchingSkillViews.test.js.map +1 -1
- package/build/__tests__/behavioral/watchers/WatchingForChanges.test.js +53 -105
- package/build/__tests__/behavioral/watchers/WatchingForChanges.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter.test.js +9 -17
- package/build/__tests__/implementation/ActionExecuter.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter2.test.js +33 -65
- package/build/__tests__/implementation/ActionExecuter2.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter3.test.js +17 -33
- package/build/__tests__/implementation/ActionExecuter3.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter4.test.js +13 -25
- package/build/__tests__/implementation/ActionExecuter4.test.js.map +1 -1
- package/build/__tests__/implementation/ArgParser.test.js +9 -17
- package/build/__tests__/implementation/ArgParser.test.js.map +1 -1
- package/build/__tests__/implementation/BuildService.test.js +9 -17
- package/build/__tests__/implementation/BuildService.test.js.map +1 -1
- package/build/__tests__/implementation/BulkImporting.test.js +41 -81
- package/build/__tests__/implementation/BulkImporting.test.js.map +1 -1
- package/build/__tests__/implementation/CachingImports.test.js +21 -41
- package/build/__tests__/implementation/CachingImports.test.js.map +1 -1
- package/build/__tests__/implementation/CommanderCommandResultMapper.test.js +37 -73
- package/build/__tests__/implementation/CommanderCommandResultMapper.test.js.map +1 -1
- package/build/__tests__/implementation/DataStoreStore.test.js +41 -81
- package/build/__tests__/implementation/DataStoreStore.test.js.map +1 -1
- package/build/__tests__/implementation/DeletingOrphanedSchemaDefinitions.test.js +13 -25
- package/build/__tests__/implementation/DeletingOrphanedSchemaDefinitions.test.js.map +1 -1
- package/build/__tests__/implementation/EventContractCleanerUtil.test.js +17 -33
- package/build/__tests__/implementation/EventContractCleanerUtil.test.js.map +1 -1
- package/build/__tests__/implementation/EventStore.test.js +58 -113
- package/build/__tests__/implementation/EventStore.test.js.map +1 -1
- package/build/__tests__/implementation/EventTemplateItemBuilder.test.js +13 -25
- package/build/__tests__/implementation/EventTemplateItemBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/FeatureCommandAttacher.test.js +37 -73
- package/build/__tests__/implementation/FeatureCommandAttacher.test.js.map +1 -1
- package/build/__tests__/implementation/FeatureFixture.test.js +17 -33
- package/build/__tests__/implementation/FeatureFixture.test.js.map +1 -1
- package/build/__tests__/implementation/FeatureInstaller.test.js +17 -33
- package/build/__tests__/implementation/FeatureInstaller.test.js.map +1 -1
- package/build/__tests__/implementation/FeaturesUtil.test.js +5 -9
- package/build/__tests__/implementation/FeaturesUtil.test.js.map +1 -1
- package/build/__tests__/implementation/FieldTemplateItemBuilder.test.js +5 -9
- package/build/__tests__/implementation/FieldTemplateItemBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/GlobalEmitter.test.js +9 -17
- package/build/__tests__/implementation/GlobalEmitter.test.js.map +1 -1
- package/build/__tests__/implementation/JestJsonParser.test.js +5 -9
- package/build/__tests__/implementation/JestJsonParser.test.js.map +1 -1
- package/build/__tests__/implementation/LintService.test.js +9 -17
- package/build/__tests__/implementation/LintService.test.js.map +1 -1
- package/build/__tests__/implementation/OnboardingScriptLoader.test.js +19 -34
- package/build/__tests__/implementation/OnboardingScriptLoader.test.js.map +1 -1
- package/build/__tests__/implementation/OnboardingScriptPlayer.test.js +58 -103
- package/build/__tests__/implementation/OnboardingScriptPlayer.test.js.map +1 -1
- package/build/__tests__/implementation/OnboardingStore.test.js +9 -17
- package/build/__tests__/implementation/OnboardingStore.test.js.map +1 -1
- package/build/__tests__/implementation/OrganizationStore.test.js +21 -41
- package/build/__tests__/implementation/OrganizationStore.test.js.map +1 -1
- package/build/__tests__/implementation/ParentTestFinder.test.js +13 -25
- package/build/__tests__/implementation/ParentTestFinder.test.js.map +1 -1
- package/build/__tests__/implementation/PkgService.test.js +25 -49
- package/build/__tests__/implementation/PkgService.test.js.map +1 -1
- package/build/__tests__/implementation/SchemaStore.test.js +65 -129
- package/build/__tests__/implementation/SchemaStore.test.js.map +1 -1
- package/build/__tests__/implementation/SchemaTemplateItemBuilder.test.js +5 -9
- package/build/__tests__/implementation/SchemaTemplateItemBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/SchemaValueTypeWriter.test.js +29 -57
- package/build/__tests__/implementation/SchemaValueTypeWriter.test.js.map +1 -1
- package/build/__tests__/implementation/ServiceFactory.test.js +5 -9
- package/build/__tests__/implementation/ServiceFactory.test.js.map +1 -1
- package/build/__tests__/implementation/SettingUpANodeModule.test.js +13 -25
- package/build/__tests__/implementation/SettingUpANodeModule.test.js.map +1 -1
- package/build/__tests__/implementation/SkillStore.test.js +33 -65
- package/build/__tests__/implementation/SkillStore.test.js.map +1 -1
- package/build/__tests__/implementation/StoreFeature.test.js +10 -16
- package/build/__tests__/implementation/StoreFeature.test.js.map +1 -1
- package/build/__tests__/implementation/TestReporter.test.js +17 -33
- package/build/__tests__/implementation/TestReporter.test.js.map +1 -1
- package/build/__tests__/implementation/TestRunner.test.js +37 -73
- package/build/__tests__/implementation/TestRunner.test.js.map +1 -1
- package/build/__tests__/implementation/ValueTypeMapping.test.js +9 -17
- package/build/__tests__/implementation/ValueTypeMapping.test.js.map +1 -1
- package/build/__tests__/implementation/Widgets.test.js +17 -33
- package/build/__tests__/implementation/Widgets.test.js.map +1 -1
- package/build/__tests__/support/EventFaker.js +5 -9
- package/build/__tests__/support/EventFaker.js.map +1 -1
- package/build/__tests__/support/scripts/first.script.js +5 -7
- package/build/__tests__/support/scripts/first.script.js.map +1 -1
- package/build/boot.js +5 -12
- package/build/boot.js.map +1 -1
- package/build/cli/Cli.js +42 -80
- package/build/cli/Cli.js.map +1 -1
- package/build/components/FormComponent.js +9 -17
- package/build/components/FormComponent.js.map +1 -1
- package/build/components/QuizComponent.js +9 -17
- package/build/components/QuizComponent.js.map +1 -1
- package/build/features/AbstractAction.js +13 -25
- package/build/features/AbstractAction.js.map +1 -1
- package/build/features/AbstractFeature.js +17 -33
- package/build/features/AbstractFeature.js.map +1 -1
- package/build/features/ActionExecuter.js +11 -17
- package/build/features/ActionExecuter.js.map +1 -1
- package/build/features/ActionQuestionAsker.js +35 -65
- package/build/features/ActionQuestionAsker.js.map +1 -1
- package/build/features/FeatureCommandAttacher.js +5 -9
- package/build/features/FeatureCommandAttacher.js.map +1 -1
- package/build/features/FeatureInstaller.js +43 -81
- package/build/features/FeatureInstaller.js.map +1 -1
- package/build/features/OverrideActionDecorator.js +6 -8
- package/build/features/OverrideActionDecorator.js.map +1 -1
- package/build/features/cache/CacheFeature.js +5 -9
- package/build/features/cache/CacheFeature.js.map +1 -1
- package/build/features/cache/actions/DisableAction.js +5 -9
- package/build/features/cache/actions/DisableAction.js.map +1 -1
- package/build/features/cache/actions/EnableAction.js +5 -9
- package/build/features/cache/actions/EnableAction.js.map +1 -1
- package/build/features/conversation/ConversationFeature.js +13 -25
- package/build/features/conversation/ConversationFeature.js.map +1 -1
- package/build/features/conversation/actions/CreateAction.js +5 -9
- package/build/features/conversation/actions/CreateAction.js.map +1 -1
- package/build/features/conversation/actions/TestAction.js +14 -24
- package/build/features/conversation/actions/TestAction.js.map +1 -1
- package/build/features/conversation/stores/ConversationStore.js +5 -9
- package/build/features/conversation/stores/ConversationStore.js.map +1 -1
- package/build/features/conversation/writers/ConversationWriter.js +5 -9
- package/build/features/conversation/writers/ConversationWriter.js.map +1 -1
- package/build/features/dependencies/DependencyFeature.js +5 -9
- package/build/features/dependencies/DependencyFeature.js.map +1 -1
- package/build/features/dependencies/actions/AddAction.js +5 -9
- package/build/features/dependencies/actions/AddAction.js.map +1 -1
- package/build/features/dependencies/actions/ManageAction.js +5 -9
- package/build/features/dependencies/actions/ManageAction.js.map +1 -1
- package/build/features/deploy/DeployFeature.js +5 -9
- package/build/features/deploy/DeployFeature.js.map +1 -1
- package/build/features/deploy/actions/HerokuAction.js +41 -81
- package/build/features/deploy/actions/HerokuAction.js.map +1 -1
- package/build/features/error/ErrorFeature.js +13 -25
- package/build/features/error/ErrorFeature.js.map +1 -1
- package/build/features/error/ParentTestFinder.js +5 -9
- package/build/features/error/ParentTestFinder.js.map +1 -1
- package/build/features/error/actions/CreateAction.js +5 -9
- package/build/features/error/actions/CreateAction.js.map +1 -1
- package/build/features/error/actions/SyncAction.js +13 -25
- package/build/features/error/actions/SyncAction.js.map +1 -1
- package/build/features/error/writers/ErrorWriter.js +21 -41
- package/build/features/error/writers/ErrorWriter.js.map +1 -1
- package/build/features/event/EventFeature.js +29 -57
- package/build/features/event/EventFeature.js.map +1 -1
- package/build/features/event/actions/CreateAction.js +5 -9
- package/build/features/event/actions/CreateAction.js.map +1 -1
- package/build/features/event/actions/ListenAction.js +29 -57
- package/build/features/event/actions/ListenAction.js.map +1 -1
- package/build/features/event/actions/SetRemoteAction.js +5 -9
- package/build/features/event/actions/SetRemoteAction.js.map +1 -1
- package/build/features/event/actions/SyncAction.js +5 -9
- package/build/features/event/actions/SyncAction.js.map +1 -1
- package/build/features/event/actions/SyncListenersAction.js +5 -9
- package/build/features/event/actions/SyncListenersAction.js.map +1 -1
- package/build/features/event/builders/EventContractBuilder.js +17 -33
- package/build/features/event/builders/EventContractBuilder.js.map +1 -1
- package/build/features/event/stores/EventStore.js +26 -48
- package/build/features/event/stores/EventStore.js.map +1 -1
- package/build/features/event/stores/ListenerStore.js +5 -9
- package/build/features/event/stores/ListenerStore.js.map +1 -1
- package/build/features/event/writers/EventWriter.js +25 -49
- package/build/features/event/writers/EventWriter.js.map +1 -1
- package/build/features/eventContract/actions/PullAction.js +9 -17
- package/build/features/eventContract/actions/PullAction.js.map +1 -1
- package/build/features/log/actions/CreateTransportAction.js +5 -9
- package/build/features/log/actions/CreateTransportAction.js.map +1 -1
- package/build/features/log/writers/LogWriter.js +5 -9
- package/build/features/log/writers/LogWriter.js.map +1 -1
- package/build/features/node/NodeFeature.js +22 -40
- package/build/features/node/NodeFeature.js.map +1 -1
- package/build/features/node/actions/CreateAction.js +5 -9
- package/build/features/node/actions/CreateAction.js.map +1 -1
- package/build/features/node/actions/UpdateDependenciesAction.js +9 -17
- package/build/features/node/actions/UpdateDependenciesAction.js.map +1 -1
- package/build/features/node/actions/UpgradeAction.js +13 -25
- package/build/features/node/actions/UpgradeAction.js.map +1 -1
- package/build/features/node/writers/NodeWriter.js +5 -9
- package/build/features/node/writers/NodeWriter.js.map +1 -1
- package/build/features/onboard/OnboardFeature.js +18 -33
- package/build/features/onboard/OnboardFeature.js.map +1 -1
- package/build/features/onboard/ScriptLoader.js +5 -9
- package/build/features/onboard/ScriptLoader.js.map +1 -1
- package/build/features/onboard/ScriptPlayer.js +13 -25
- package/build/features/onboard/ScriptPlayer.js.map +1 -1
- package/build/features/onboard/actions/OnboardAction.js +5 -9
- package/build/features/onboard/actions/OnboardAction.js.map +1 -1
- package/build/features/onboard/scripts/onboarding.first.script.js +18 -37
- package/build/features/onboard/scripts/onboarding.first.script.js.map +1 -1
- package/build/features/onboard/scripts/onboarding.immersive.script.js +8 -13
- package/build/features/onboard/scripts/onboarding.immersive.script.js.map +1 -1
- package/build/features/onboard/scripts/onboarding.returning.script.js +5 -7
- package/build/features/onboard/scripts/onboarding.returning.script.js.map +1 -1
- package/build/features/onboard/scripts/onboarding.short.script.js +17 -31
- package/build/features/onboard/scripts/onboarding.short.script.js.map +1 -1
- package/build/features/onboard/scripts/todo/todo.create.skill.script.js +5 -7
- package/build/features/onboard/scripts/todo/todo.create.skill.script.js.map +1 -1
- package/build/features/onboard/scripts/todo/todo.test.script.js +5 -7
- package/build/features/onboard/scripts/todo/todo.test.script.js.map +1 -1
- package/build/features/onboard/scripts/wrongCommand.script.js +5 -7
- package/build/features/onboard/scripts/wrongCommand.script.js.map +1 -1
- package/build/features/organization/actions/CreateAction.js +5 -9
- package/build/features/organization/actions/CreateAction.js.map +1 -1
- package/build/features/organization/actions/InstallAction.js +5 -9
- package/build/features/organization/actions/InstallAction.js.map +1 -1
- package/build/features/organization/stores/OrganizationStore.js +21 -41
- package/build/features/organization/stores/OrganizationStore.js.map +1 -1
- package/build/features/permission/PermissionFeature.js +17 -33
- package/build/features/permission/PermissionFeature.js.map +1 -1
- package/build/features/permission/actions/CreateAction.js +5 -9
- package/build/features/permission/actions/CreateAction.js.map +1 -1
- package/build/features/permission/actions/SyncAction.js +8 -15
- package/build/features/permission/actions/SyncAction.js.map +1 -1
- package/build/features/permission/stores/PermissionStore.js +9 -17
- package/build/features/permission/stores/PermissionStore.js.map +1 -1
- package/build/features/permission/writers/PermissionWriter.js +13 -25
- package/build/features/permission/writers/PermissionWriter.js.map +1 -1
- package/build/features/person/actions/LoginAction.js +5 -9
- package/build/features/person/actions/LoginAction.js.map +1 -1
- package/build/features/person/actions/LogoutAction.js +5 -9
- package/build/features/person/actions/LogoutAction.js.map +1 -1
- package/build/features/person/actions/WhoamiAction.js +5 -9
- package/build/features/person/actions/WhoamiAction.js.map +1 -1
- package/build/features/polish/actions/SetupAction.js +5 -9
- package/build/features/polish/actions/SetupAction.js.map +1 -1
- package/build/features/polish/writers/PolishWriter.js +5 -9
- package/build/features/polish/writers/PolishWriter.js.map +1 -1
- package/build/features/sandbox/SandboxFeature.js +5 -7
- package/build/features/sandbox/SandboxFeature.js.map +1 -1
- package/build/features/sandbox/actions/SetupAction.js +5 -9
- package/build/features/sandbox/actions/SetupAction.js.map +1 -1
- package/build/features/sandbox/writers/SandboxWriter.js +5 -9
- package/build/features/sandbox/writers/SandboxWriter.js.map +1 -1
- package/build/features/schema/SchemaFeature.js +17 -33
- package/build/features/schema/SchemaFeature.js.map +1 -1
- package/build/features/schema/ValueTypeBuilder.js +5 -9
- package/build/features/schema/ValueTypeBuilder.js.map +1 -1
- package/build/features/schema/actions/CreateAction.js +5 -9
- package/build/features/schema/actions/CreateAction.js.map +1 -1
- package/build/features/schema/actions/SyncAction.js +21 -41
- package/build/features/schema/actions/SyncAction.js.map +1 -1
- package/build/features/schema/actions/SyncFieldsAction.js +5 -9
- package/build/features/schema/actions/SyncFieldsAction.js.map +1 -1
- package/build/features/schema/services/SchemaService.js +5 -9
- package/build/features/schema/services/SchemaService.js.map +1 -1
- package/build/features/schema/stores/SchemaStore.js +31 -57
- package/build/features/schema/stores/SchemaStore.js.map +1 -1
- package/build/features/schema/writers/SchemaWriter.js +25 -49
- package/build/features/schema/writers/SchemaWriter.js.map +1 -1
- package/build/features/skill/SkillFeature.js +25 -49
- package/build/features/skill/SkillFeature.js.map +1 -1
- package/build/features/skill/actions/BootAction.js +9 -17
- package/build/features/skill/actions/BootAction.js.map +1 -1
- package/build/features/skill/actions/CreateAction.js +5 -9
- package/build/features/skill/actions/CreateAction.js.map +1 -1
- package/build/features/skill/actions/DashboardAction.js +5 -9
- package/build/features/skill/actions/DashboardAction.js.map +1 -1
- package/build/features/skill/actions/LoginAction.js +5 -9
- package/build/features/skill/actions/LoginAction.js.map +1 -1
- package/build/features/skill/actions/RebuildAction.js +5 -9
- package/build/features/skill/actions/RebuildAction.js.map +1 -1
- package/build/features/skill/actions/RegisterAction.js +5 -9
- package/build/features/skill/actions/RegisterAction.js.map +1 -1
- package/build/features/skill/stores/SkillStore.js +37 -73
- package/build/features/skill/stores/SkillStore.js.map +1 -1
- package/build/features/skill/updaters/Updater.js +5 -9
- package/build/features/skill/updaters/Updater.js.map +1 -1
- package/build/features/skill/writers/SkillWriter.js +5 -9
- package/build/features/skill/writers/SkillWriter.js.map +1 -1
- package/build/features/store/StoreFeature.js +13 -25
- package/build/features/store/StoreFeature.js.map +1 -1
- package/build/features/store/actions/CreateAction.js +5 -9
- package/build/features/store/actions/CreateAction.js.map +1 -1
- package/build/features/store/actions/SyncAction.js +5 -9
- package/build/features/store/actions/SyncAction.js.map +1 -1
- package/build/features/store/stores/StoreStore.js +5 -9
- package/build/features/store/stores/StoreStore.js.map +1 -1
- package/build/features/store/writers/StoreWriter.js +17 -33
- package/build/features/store/writers/StoreWriter.js.map +1 -1
- package/build/features/test/TestFeature.js +9 -17
- package/build/features/test/TestFeature.js.map +1 -1
- package/build/features/test/TestReporter.js +17 -33
- package/build/features/test/TestReporter.js.map +1 -1
- package/build/features/test/TestRunner.js +14 -26
- package/build/features/test/TestRunner.js.map +1 -1
- package/build/features/test/actions/CreateAction.js +17 -33
- package/build/features/test/actions/CreateAction.js.map +1 -1
- package/build/features/test/actions/SetupAction.js +5 -9
- package/build/features/test/actions/SetupAction.js.map +1 -1
- package/build/features/test/actions/TestAction.js +21 -41
- package/build/features/test/actions/TestAction.js.map +1 -1
- package/build/features/test/writers/TestWriter.js +5 -9
- package/build/features/test/writers/TestWriter.js.map +1 -1
- package/build/features/view/ViewFeature.js +10 -16
- package/build/features/view/ViewFeature.js.map +1 -1
- package/build/features/view/actions/CreateAction.js +5 -9
- package/build/features/view/actions/CreateAction.js.map +1 -1
- package/build/features/view/actions/CreateThemeAction.js +5 -9
- package/build/features/view/actions/CreateThemeAction.js.map +1 -1
- package/build/features/view/actions/SyncAction.js +5 -9
- package/build/features/view/actions/SyncAction.js.map +1 -1
- package/build/features/view/actions/WatchAction.js +5 -9
- package/build/features/view/actions/WatchAction.js.map +1 -1
- package/build/features/view/stores/ViewStore.js +5 -9
- package/build/features/view/stores/ViewStore.js.map +1 -1
- package/build/features/view/writers/ViewWriter.js +9 -17
- package/build/features/view/writers/ViewWriter.js.map +1 -1
- package/build/features/vscode/actions/SetupAction.js +21 -41
- package/build/features/vscode/actions/SetupAction.js.map +1 -1
- package/build/features/vscode/services/VsCodeService.js +13 -25
- package/build/features/vscode/services/VsCodeService.js.map +1 -1
- package/build/features/vscode/writers/VsCodeWriter.js +5 -9
- package/build/features/vscode/writers/VsCodeWriter.js.map +1 -1
- package/build/features/watch/WatchFeature.js +23 -41
- package/build/features/watch/WatchFeature.js.map +1 -1
- package/build/interfaces/SpyInterface.js +25 -49
- package/build/interfaces/SpyInterface.js.map +1 -1
- package/build/interfaces/TerminalInterface.js +33 -65
- package/build/interfaces/TerminalInterface.js.map +1 -1
- package/build/services/BuildService.js +5 -9
- package/build/services/BuildService.js.map +1 -1
- package/build/services/CommandService.js +5 -9
- package/build/services/CommandService.js.map +1 -1
- package/build/services/GameService.js +5 -9
- package/build/services/GameService.js.map +1 -1
- package/build/services/ImportService.js +21 -31
- package/build/services/ImportService.js.map +1 -1
- package/build/services/LintService.js +6 -8
- package/build/services/LintService.js.map +1 -1
- package/build/services/PkgService.js +9 -17
- package/build/services/PkgService.js.map +1 -1
- package/build/services/TypeCheckerService.js +6 -8
- package/build/services/TypeCheckerService.js.map +1 -1
- package/build/stores/AbstractStore.js +5 -9
- package/build/stores/AbstractStore.js.map +1 -1
- package/build/tests/AbstractCliTest.js +61 -121
- package/build/tests/AbstractCliTest.js.map +1 -1
- package/build/tests/AbstractErrorTest.js +5 -9
- package/build/tests/AbstractErrorTest.js.map +1 -1
- package/build/tests/AbstractEventTest.js +17 -33
- package/build/tests/AbstractEventTest.js.map +1 -1
- package/build/tests/AbstractSchemaTest.js +13 -25
- package/build/tests/AbstractSchemaTest.js.map +1 -1
- package/build/tests/AbstractSkillTest.js +13 -25
- package/build/tests/AbstractSkillTest.js.map +1 -1
- package/build/tests/AbstractTestTest.js +5 -9
- package/build/tests/AbstractTestTest.js.map +1 -1
- package/build/tests/MockProgramFactory.js +10 -15
- package/build/tests/MockProgramFactory.js.map +1 -1
- package/build/tests/buildTestCache.js +32 -49
- package/build/tests/buildTestCache.js.map +1 -1
- package/build/tests/cleanTestData.js +27 -45
- package/build/tests/cleanTestData.js.map +1 -1
- package/build/tests/fixtures/FeatureFixture.js +25 -49
- package/build/tests/fixtures/FeatureFixture.js.map +1 -1
- package/build/tests/fixtures/MercuryFixture.js +5 -9
- package/build/tests/fixtures/MercuryFixture.js.map +1 -1
- package/build/tests/fixtures/OrganizationFixture.js +13 -25
- package/build/tests/fixtures/OrganizationFixture.js.map +1 -1
- package/build/tests/fixtures/PersonFixture.js +9 -17
- package/build/tests/fixtures/PersonFixture.js.map +1 -1
- package/build/tests/fixtures/SkillFixture.js +31 -57
- package/build/tests/fixtures/SkillFixture.js.map +1 -1
- package/build/tests/fixtures/ViewFixture.js +5 -9
- package/build/tests/fixtures/ViewFixture.js.map +1 -1
- package/build/updaters/ScriptUpdater.js +5 -9
- package/build/updaters/ScriptUpdater.js.map +1 -1
- package/build/widgets/terminalKit/TkBaseWidget.js +5 -9
- package/build/widgets/terminalKit/TkBaseWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkInputWidget.js +9 -17
- package/build/widgets/terminalKit/TkInputWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkLayoutWidget.js +5 -9
- package/build/widgets/terminalKit/TkLayoutWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkTextWidget.js +5 -9
- package/build/widgets/terminalKit/TkTextWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkWindowWidget.js +9 -17
- package/build/widgets/terminalKit/TkWindowWidget.js.map +1 -1
- package/build/writers/AbstractWriter.js +13 -25
- package/build/writers/AbstractWriter.js.map +1 -1
- package/package.json +29 -29
|
@@ -14,20 +14,15 @@ var _MercuryFixture = _interopRequireDefault(require("./fixtures/MercuryFixture"
|
|
|
14
14
|
var _OrganizationFixture = _interopRequireDefault(require("./fixtures/OrganizationFixture"));
|
|
15
15
|
var _PersonFixture = _interopRequireDefault(require("./fixtures/PersonFixture"));
|
|
16
16
|
var _SkillFixture = _interopRequireDefault(require("./fixtures/SkillFixture"));
|
|
17
|
+
var _run;
|
|
17
18
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
19
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
20
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
21
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
22
20
|
var demoNumbers = Object.values(demoNumbersByName);
|
|
23
21
|
var cwd = process.cwd();
|
|
24
22
|
var term = new _TerminalInterface["default"](cwd, true);
|
|
25
23
|
function run() {
|
|
26
|
-
return _run
|
|
27
|
-
|
|
28
|
-
function _run() {
|
|
29
|
-
_run = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
30
|
-
var serviceFactory, mercuryFixture, apiClientFactory, storeFactory, personFixture, orgFixture, skillFixture, _iterator, _step, number, totalOrgs, totalSkills, _err$stack;
|
|
24
|
+
return (_run = _run || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
25
|
+
var serviceFactory, mercuryFixture, apiClientFactory, storeFactory, personFixture, orgFixture, skillFixture, _i, _demoNumbers, number, totalOrgs, totalSkills, _err$stack;
|
|
31
26
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
32
27
|
while (1) switch (_context.prev = _context.next) {
|
|
33
28
|
case 0:
|
|
@@ -45,64 +40,51 @@ function _run() {
|
|
|
45
40
|
personFixture = new _PersonFixture["default"](apiClientFactory);
|
|
46
41
|
orgFixture = new _OrganizationFixture["default"](personFixture, storeFactory);
|
|
47
42
|
skillFixture = new _SkillFixture["default"](personFixture, storeFactory, apiClientFactory);
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
if ((_step = _iterator.n()).done) {
|
|
53
|
-
_context.next = 36;
|
|
43
|
+
_i = 0, _demoNumbers = demoNumbers;
|
|
44
|
+
case 9:
|
|
45
|
+
if (!(_i < _demoNumbers.length)) {
|
|
46
|
+
_context.next = 35;
|
|
54
47
|
break;
|
|
55
48
|
}
|
|
56
|
-
number =
|
|
49
|
+
number = _demoNumbers[_i];
|
|
57
50
|
term.renderLine("Starting cleanup for ".concat(number));
|
|
58
51
|
term.renderLine("Logging in...");
|
|
59
|
-
_context.next =
|
|
52
|
+
_context.next = 15;
|
|
60
53
|
return personFixture.loginAsDemoPerson(number);
|
|
61
|
-
case
|
|
54
|
+
case 15:
|
|
62
55
|
term.renderLine("Success");
|
|
63
56
|
term.renderLine("Deleting organizations");
|
|
64
|
-
_context.next =
|
|
57
|
+
_context.next = 19;
|
|
65
58
|
return orgFixture.clearAllOrgs();
|
|
66
|
-
case
|
|
59
|
+
case 19:
|
|
67
60
|
totalOrgs = _context.sent;
|
|
68
61
|
term.renderLine("".concat(totalOrgs, " orgs deleted"));
|
|
69
|
-
_context.prev =
|
|
62
|
+
_context.prev = 21;
|
|
70
63
|
term.renderLine('Deleting skills');
|
|
71
|
-
_context.next =
|
|
64
|
+
_context.next = 25;
|
|
72
65
|
return skillFixture.clearAllSkills();
|
|
73
|
-
case
|
|
66
|
+
case 25:
|
|
74
67
|
totalSkills = _context.sent;
|
|
75
68
|
term.renderLine("".concat(totalSkills, " deleted"));
|
|
76
|
-
_context.next =
|
|
69
|
+
_context.next = 32;
|
|
77
70
|
break;
|
|
78
|
-
case
|
|
79
|
-
_context.prev =
|
|
80
|
-
_context.t0 = _context["catch"](
|
|
71
|
+
case 29:
|
|
72
|
+
_context.prev = 29;
|
|
73
|
+
_context.t0 = _context["catch"](21);
|
|
81
74
|
console.error((_err$stack = _context.t0.stack) !== null && _err$stack !== void 0 ? _err$stack : _context.t0.message);
|
|
82
|
-
case
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
case 36:
|
|
86
|
-
_context.next = 41;
|
|
75
|
+
case 32:
|
|
76
|
+
_i++;
|
|
77
|
+
_context.next = 9;
|
|
87
78
|
break;
|
|
88
|
-
case
|
|
89
|
-
_context.
|
|
90
|
-
_context.t1 = _context["catch"](9);
|
|
91
|
-
_iterator.e(_context.t1);
|
|
92
|
-
case 41:
|
|
93
|
-
_context.prev = 41;
|
|
94
|
-
_iterator.f();
|
|
95
|
-
return _context.finish(41);
|
|
96
|
-
case 44:
|
|
97
|
-
_context.next = 46;
|
|
79
|
+
case 35:
|
|
80
|
+
_context.next = 37;
|
|
98
81
|
return mercuryFixture.disconnectAll();
|
|
99
|
-
case
|
|
82
|
+
case 37:
|
|
100
83
|
case "end":
|
|
101
84
|
return _context.stop();
|
|
102
85
|
}
|
|
103
|
-
}, _callee, null, [[
|
|
104
|
-
}));
|
|
105
|
-
return _run.apply(this, arguments);
|
|
86
|
+
}, _callee, null, [[21, 29]]);
|
|
87
|
+
}))).apply(this, arguments);
|
|
106
88
|
}
|
|
107
89
|
void run().then(function () {
|
|
108
90
|
term.renderLine('Done cleaning up!');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cleanTestData.js","names":["_os","_interopRequireDefault","require","_GlobalEmitter","_TerminalInterface","_ServiceFactory","_StoreFactory","demoNumbersByName","_interopRequireWildcard","_MercuryFixture","_OrganizationFixture","_PersonFixture","_SkillFixture","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","
|
|
1
|
+
{"version":3,"file":"cleanTestData.js","names":["_os","_interopRequireDefault","require","_GlobalEmitter","_TerminalInterface","_ServiceFactory","_StoreFactory","demoNumbersByName","_interopRequireWildcard","_MercuryFixture","_OrganizationFixture","_PersonFixture","_SkillFixture","_run","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","demoNumbers","values","cwd","process","term","TerminalInterface","run","_asyncToGenerator2","_regenerator","mark","_callee","serviceFactory","mercuryFixture","apiClientFactory","storeFactory","personFixture","orgFixture","skillFixture","_i","_demoNumbers","number","totalOrgs","totalSkills","_err$stack","wrap","_callee$","_context","prev","next","renderHeadline","concat","length","ServiceFactory","MercuryFixture","getApiClientFactory","StoreFactory","homeDir","osUtil","homedir","emitter","CliGlobalEmitter","Emitter","PersonFixture","OrganizationFixture","SkillFixture","renderLine","loginAsDemoPerson","clearAllOrgs","sent","clearAllSkills","t0","console","error","stack","message","disconnectAll","stop","apply","arguments","then","err","renderError","exit"],"sources":["../../src/tests/cleanTestData.ts"],"sourcesContent":["import osUtil from 'os'\nimport CliGlobalEmitter from '../GlobalEmitter'\nimport TerminalInterface from '../interfaces/TerminalInterface'\nimport ServiceFactory from '../services/ServiceFactory'\nimport StoreFactory from '../stores/StoreFactory'\nimport * as demoNumbersByName from '../tests/constants'\nimport MercuryFixture from './fixtures/MercuryFixture'\nimport OrganizationFixture from './fixtures/OrganizationFixture'\nimport PersonFixture from './fixtures/PersonFixture'\nimport SkillFixture from './fixtures/SkillFixture'\n\nconst demoNumbers = Object.values(demoNumbersByName)\n\nconst cwd = process.cwd()\nconst term = new TerminalInterface(cwd, true)\n\nasync function run() {\n\tterm.renderHeadline(\n\t\t`Starting cleanup for ${demoNumbers.length} demo numbers.`\n\t)\n\n\tconst serviceFactory = new ServiceFactory()\n\tconst mercuryFixture = new MercuryFixture(cwd, serviceFactory)\n\tconst apiClientFactory = mercuryFixture.getApiClientFactory()\n\tconst storeFactory = new StoreFactory({\n\t\tcwd,\n\t\tserviceFactory,\n\t\thomeDir: osUtil.homedir(),\n\t\temitter: CliGlobalEmitter.Emitter(),\n\t\tapiClientFactory,\n\t})\n\n\tconst personFixture = new PersonFixture(apiClientFactory)\n\tconst orgFixture = new OrganizationFixture(personFixture, storeFactory)\n\tconst skillFixture = new SkillFixture(\n\t\tpersonFixture,\n\t\tstoreFactory,\n\t\tapiClientFactory\n\t)\n\n\tfor (const number of demoNumbers) {\n\t\tterm.renderLine(`Starting cleanup for ${number}`)\n\t\tterm.renderLine(`Logging in...`)\n\n\t\tawait personFixture.loginAsDemoPerson(number)\n\n\t\tterm.renderLine(`Success`)\n\n\t\tterm.renderLine(`Deleting organizations`)\n\t\tconst totalOrgs = await orgFixture.clearAllOrgs()\n\t\tterm.renderLine(`${totalOrgs} orgs deleted`)\n\n\t\ttry {\n\t\t\tterm.renderLine('Deleting skills')\n\t\t\tconst totalSkills = await skillFixture.clearAllSkills()\n\t\t\tterm.renderLine(`${totalSkills} deleted`)\n\t\t} catch (err: any) {\n\t\t\tconsole.error(err.stack ?? err.message)\n\t\t}\n\t}\n\n\tawait mercuryFixture.disconnect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AA;UAG3CvB,IAAI,CAACyC,UAAU,CAAC,iBAAiB,CAAC;UAAAnB,QAAA,CAAAE,IAAA;UAAA,OACRX,YAAY,CAACgC,cAAc,CAAC,CAAC;QAAA;UAAjD3B,WAAW,GAAAI,QAAA,CAAAsB,IAAA;UACjB5C,IAAI,CAACyC,UAAU,IAAAf,MAAA,CAAIR,WAAW,aAAU,CAAC;UAAAI,QAAA,CAAAE,IAAA;UAAA;QAAA;UAAAF,QAAA,CAAAC,IAAA;UAAAD,QAAA,CAAAwB,EAAA,GAAAxB,QAAA;UAEzCyB,OAAO,CAACC,KAAK,EAAA7B,UAAA,GAACG,QAAA,CAAAwB,EAAA,CAAIG,KAAK,cAAA9B,UAAA,cAAAA,UAAA,GAAIG,QAAA,CAAAwB,EAAA,CAAII,OAAO,CAAC;QAAA;UAAApC,EAAA;UAAAQ,QAAA,CAAAE,IAAA;UAAA;QAAA;UAAAF,QAAA,CAAAE,IAAA;UAAA,OAInChB,cAAc,CAAC2C,aAAa,CAAC,CAAC;QAAA;QAAA;UAAA,OAAA7B,QAAA,CAAA8B,IAAA;MAAA;IAAA,GAAA9C,OAAA;EAAA,CACpC,IAAA+C,KAAA,OAAAC,SAAA;AAAA;AAED,KAAKpD,GAAG,CAAC,CAAC,CACRqD,IAAI,CAAC,YAAM;EACXvD,IAAI,CAACyC,UAAU,CAAC,mBAAmB,CAAC;AACrC,CAAC,CAAC,SACI,CAAC,UAACe,GAAG,EAAK;EACfxD,IAAI,CAACyD,WAAW,CAACD,GAAG,CAAC;EACrBzD,OAAO,CAAC2D,IAAI,CAAC,CAAC,CAAC;AAChB,CAAC,CAAC"}
|
|
@@ -19,7 +19,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
19
19
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
20
20
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21
21
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22
|
-
var FeatureFixture = /*#__PURE__*/function () {
|
|
22
|
+
var FeatureFixture = /*#__PURE__*/function (_Cli2, _linkWorkspacePackages, _installCachedFeatures, _installFeatures, _linkLocalPackages, _copyCachedSkillToCwd) {
|
|
23
23
|
function FeatureFixture(options) {
|
|
24
24
|
(0, _classCallCheck2["default"])(this, FeatureFixture);
|
|
25
25
|
(0, _defineProperty2["default"])(this, "cwd", void 0);
|
|
@@ -56,8 +56,8 @@ var FeatureFixture = /*#__PURE__*/function () {
|
|
|
56
56
|
})
|
|
57
57
|
}, {
|
|
58
58
|
key: "Cli",
|
|
59
|
-
value: function () {
|
|
60
|
-
|
|
59
|
+
value: function Cli(_x3) {
|
|
60
|
+
return (_Cli2 = _Cli2 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(options) {
|
|
61
61
|
var cli;
|
|
62
62
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
63
63
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -81,16 +81,12 @@ var FeatureFixture = /*#__PURE__*/function () {
|
|
|
81
81
|
return _context.stop();
|
|
82
82
|
}
|
|
83
83
|
}, _callee, this);
|
|
84
|
-
}));
|
|
85
|
-
|
|
86
|
-
return _Cli2.apply(this, arguments);
|
|
87
|
-
}
|
|
88
|
-
return Cli;
|
|
89
|
-
}()
|
|
84
|
+
}))).apply(this, arguments);
|
|
85
|
+
}
|
|
90
86
|
}, {
|
|
91
87
|
key: "linkWorkspacePackages",
|
|
92
|
-
value: function () {
|
|
93
|
-
|
|
88
|
+
value: function linkWorkspacePackages() {
|
|
89
|
+
return (_linkWorkspacePackages = _linkWorkspacePackages || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
94
90
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
95
91
|
while (1) switch (_context2.prev = _context2.next) {
|
|
96
92
|
case 0:
|
|
@@ -134,16 +130,12 @@ var FeatureFixture = /*#__PURE__*/function () {
|
|
|
134
130
|
return _context2.stop();
|
|
135
131
|
}
|
|
136
132
|
}, _callee2);
|
|
137
|
-
}));
|
|
138
|
-
|
|
139
|
-
return _linkWorkspacePackages.apply(this, arguments);
|
|
140
|
-
}
|
|
141
|
-
return linkWorkspacePackages;
|
|
142
|
-
}()
|
|
133
|
+
}))).apply(this, arguments);
|
|
134
|
+
}
|
|
143
135
|
}, {
|
|
144
136
|
key: "installCachedFeatures",
|
|
145
|
-
value: function () {
|
|
146
|
-
|
|
137
|
+
value: function installCachedFeatures(_x4, _x5) {
|
|
138
|
+
return (_installCachedFeatures = _installCachedFeatures || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(cacheKey, bootOptions) {
|
|
147
139
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
148
140
|
while (1) switch (_context3.prev = _context3.next) {
|
|
149
141
|
case 0:
|
|
@@ -153,16 +145,12 @@ var FeatureFixture = /*#__PURE__*/function () {
|
|
|
153
145
|
return _context3.stop();
|
|
154
146
|
}
|
|
155
147
|
}, _callee3, this);
|
|
156
|
-
}));
|
|
157
|
-
|
|
158
|
-
return _installCachedFeatures.apply(this, arguments);
|
|
159
|
-
}
|
|
160
|
-
return installCachedFeatures;
|
|
161
|
-
}()
|
|
148
|
+
}))).apply(this, arguments);
|
|
149
|
+
}
|
|
162
150
|
}, {
|
|
163
151
|
key: "installFeatures",
|
|
164
|
-
value: function () {
|
|
165
|
-
|
|
152
|
+
value: function installFeatures(_x6, _x7, _x8) {
|
|
153
|
+
return (_installFeatures = _installFeatures || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(features, cacheKey, bootOptions) {
|
|
166
154
|
var isCached, cli;
|
|
167
155
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
168
156
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -223,12 +211,8 @@ var FeatureFixture = /*#__PURE__*/function () {
|
|
|
223
211
|
return _context4.stop();
|
|
224
212
|
}
|
|
225
213
|
}, _callee4, this);
|
|
226
|
-
}));
|
|
227
|
-
|
|
228
|
-
return _installFeatures.apply(this, arguments);
|
|
229
|
-
}
|
|
230
|
-
return installFeatures;
|
|
231
|
-
}()
|
|
214
|
+
}))).apply(this, arguments);
|
|
215
|
+
}
|
|
232
216
|
}, {
|
|
233
217
|
key: "isCached",
|
|
234
218
|
value: function isCached(cacheKey) {
|
|
@@ -236,8 +220,8 @@ var FeatureFixture = /*#__PURE__*/function () {
|
|
|
236
220
|
}
|
|
237
221
|
}, {
|
|
238
222
|
key: "linkLocalPackages",
|
|
239
|
-
value: function () {
|
|
240
|
-
|
|
223
|
+
value: function linkLocalPackages() {
|
|
224
|
+
return (_linkLocalPackages = _linkLocalPackages || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
|
241
225
|
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
242
226
|
while (1) switch (_context5.prev = _context5.next) {
|
|
243
227
|
case 0:
|
|
@@ -245,16 +229,12 @@ var FeatureFixture = /*#__PURE__*/function () {
|
|
|
245
229
|
return _context5.stop();
|
|
246
230
|
}
|
|
247
231
|
}, _callee5);
|
|
248
|
-
}));
|
|
249
|
-
|
|
250
|
-
return _linkLocalPackages.apply(this, arguments);
|
|
251
|
-
}
|
|
252
|
-
return linkLocalPackages;
|
|
253
|
-
}()
|
|
232
|
+
}))).apply(this, arguments);
|
|
233
|
+
}
|
|
254
234
|
}, {
|
|
255
235
|
key: "copyCachedSkillToCwd",
|
|
256
|
-
value: function () {
|
|
257
|
-
|
|
236
|
+
value: function copyCachedSkillToCwd(_x9) {
|
|
237
|
+
return (_copyCachedSkillToCwd = _copyCachedSkillToCwd || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(cacheKey) {
|
|
258
238
|
var isCached, settings;
|
|
259
239
|
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
260
240
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -277,12 +257,8 @@ var FeatureFixture = /*#__PURE__*/function () {
|
|
|
277
257
|
return _context6.stop();
|
|
278
258
|
}
|
|
279
259
|
}, _callee6, this);
|
|
280
|
-
}));
|
|
281
|
-
|
|
282
|
-
return _copyCachedSkillToCwd.apply(this, arguments);
|
|
283
|
-
}
|
|
284
|
-
return copyCachedSkillToCwd;
|
|
285
|
-
}()
|
|
260
|
+
}))).apply(this, arguments);
|
|
261
|
+
}
|
|
286
262
|
}, {
|
|
287
263
|
key: "addCwdToCacheTracker",
|
|
288
264
|
value: function addCwdToCacheTracker(cacheKey) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureFixture.js","names":["_path","_interopRequireDefault","require","_spruceSkillUtils","_Cli3","_test","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_e","f","TypeError","normalCompletion","didErr","err","call","step","next","_e2","minLen","_arrayLikeToArray","Object","prototype","toString","slice","constructor","name","from","test","arr","len","arr2","ownKeys","r","t","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","FeatureFixture","options","_classCallCheck2","cwd","search","Error","serviceFactory","ui","generateCacheIfMissing","shouldGenerateCacheIfMissing","apiClientFactory","emitter","featureInstaller","_createClass2","key","_Service","Service","_x","_x2","type","_Cli2","_asyncToGenerator2","_regenerator","mark","_callee","cli","wrap","_callee$","_context","prev","linkWorkspacePackages","Cli","Boot","graphicsInterface","sent","abrupt","stop","_x3","_linkWorkspacePackages","_callee2","_callee2$","_context2","linkedUtils","_installCachedFeatures","_callee3","cacheKey","bootOptions","_callee3$","_context3","installFeatures","installCachedFeatures","_x4","_x5","_installFeatures","_callee4","features","isCached","_callee4$","_context4","installedSkills","testUtil","isCacheEnabled","doesCacheExist","concat","copyCachedSkillToCwd","removeCwdFromCacheTracker","addCwdToCacheTracker","cacheCli","linkLocalPackages","_x6","_x7","_x8","_linkLocalPackages","_callee5","_callee5$","_context5","_copyCachedSkillToCwd","_callee6","settings","_callee6$","_context6","loadCacheTracker","diskUtil","copyDir","process","env","TEST_HOST","set","dirsToDelete","_x9","writeCacheSettings","settingsFile","getTestCacheTrackerFilePath","settingsFolder","pathUtil","dirname","doesDirExist","createDir","writeFile","JSON","stringify","alreadyInstalled","resolvePath","exists","doesFileExist","settingsObject","parse","readFile","_unused","resolveHashSprucePath","__dirname","deleteOldSkillDirs","_iterator","_step","dir","deleteDir","exports"],"sources":["../../../src/tests/fixtures/FeatureFixture.ts"],"sourcesContent":["import pathUtil from 'path'\nimport { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport Cli from '../../cli/Cli'\nimport FeatureInstaller from '../../features/FeatureInstaller'\nimport { InstallFeature } from '../../features/features.types'\nimport { GlobalEmitter } from '../../GlobalEmitter'\nimport ServiceFactory, {\n\tServiceProvider,\n\tService,\n\tServiceMap,\n} from '../../services/ServiceFactory'\nimport { ApiClientFactory } from '../../types/apiClient.types'\nimport {\n\tCliBootOptions,\n\tCliInterface,\n\tGraphicsInterface,\n} from '../../types/cli.types'\nimport testUtil from '../utilities/test.utility'\n\nexport default class FeatureFixture implements ServiceProvider {\n\tprivate cwd: string\n\tprivate installedSkills: Record<string, CachedCli> = {}\n\tprivate serviceFactory: ServiceFactory\n\tprivate static linkedUtils = false\n\tprivate static dirsToDelete: string[] = []\n\tprivate ui: GraphicsInterface\n\tprivate generateCacheIfMissing = false\n\tprivate apiClientFactory: ApiClientFactory\n\tprivate emitter?: GlobalEmitter\n\tprivate featureInstaller?: FeatureInstaller\n\n\tpublic constructor(options: FeatureFixtureOptions) {\n\t\tif (options.cwd.search('packages/spruce-cli') > -1) {\n\t\t\tthrow new Error(\"You can't run FeatureFixture in the cli directory.\")\n\t\t}\n\n\t\tthis.cwd = options.cwd\n\t\tthis.serviceFactory = options.serviceFactory\n\t\tthis.ui = options.ui\n\t\tthis.generateCacheIfMissing = !!options.shouldGenerateCacheIfMissing\n\t\tthis.apiClientFactory = options.apiClientFactory\n\t\tthis.emitter = options.emitter\n\t\tthis.featureInstaller = options.featureInstaller\n\t}\n\n\tpublic static deleteOldSkillDirs() {\n\t\tfor (const dir of this.dirsToDelete) {\n\t\t\tdiskUtil.deleteDir(dir)\n\t\t}\n\n\t\tthis.dirsToDelete = []\n\t}\n\n\tpublic Service<S extends Service>(\n\t\ttype: S,\n\t\tcwd?: string | undefined\n\t): ServiceMap[S] {\n\t\treturn this.serviceFactory.Service(cwd ?? this.cwd, type)\n\t}\n\n\tpublic async Cli(options?: CliBootOptions) {\n\t\tawait this.linkWorkspacePackages()\n\n\t\tconst cli = await Cli.Boot({\n\t\t\tcwd: this.cwd,\n\t\t\tgraphicsInterface: this.ui,\n\t\t\tapiClientFactory: this.apiClientFactory,\n\t\t\temitter: this.emitter,\n\t\t\tfeatureInstaller: this.featureInstaller,\n\t\t\t...(options ?? {}),\n\t\t})\n\n\t\treturn cli\n\t}\n\n\tprivate async linkWorkspacePackages() {\n\t\tif (!FeatureFixture.linkedUtils) {\n\t\t\tFeatureFixture.linkedUtils = true\n\n\t\t\t// const expectedLinkedDir = pathUtil.join(\n\t\t\t// \tos.homedir(),\n\t\t\t// \t'.config',\n\t\t\t// \t'yarn',\n\t\t\t// \t'link',\n\t\t\t// \t'@sprucelabs',\n\t\t\t// \t'spruce-skill-utils'\n\t\t\t// )\n\n\t\t\t// if (!fsUtil.existsSync(expectedLinkedDir)) {\n\t\t\t// \tconst command = this.Service('command')\n\t\t\t// \ttry {\n\t\t\t// \t\tawait command.execute(\n\t\t\t// \t\t\t`cd ${pathUtil.join(\n\t\t\t// \t\t\t\t__dirname,\n\t\t\t// \t\t\t\t'..',\n\t\t\t// \t\t\t\t'..',\n\t\t\t// \t\t\t\t'..',\n\t\t\t// \t\t\t\t'spruce-skill-utils'\n\t\t\t// \t\t\t)} && yarn link`\n\t\t\t// \t\t)\n\t\t\t// \t} catch (err) {\n\t\t\t// \t\tif (fsUtil.existsSync(expectedLinkedDir)) {\n\t\t\t// \t\t\tlog.warn(`Symlink ${expectedLinkedDir} already exists`)\n\t\t\t// \t\t} else {\n\t\t\t// \t\t\tlog.warn(\n\t\t\t// \t\t\t\t`Symlink ${expectedLinkedDir} failed, but the check thinks it is missing`\n\t\t\t// \t\t\t)\n\t\t\t// \t\t}\n\t\t\t// \t}\n\t\t\t// }\n\t\t}\n\t}\n\n\tpublic async installCachedFeatures(\n\t\tcacheKey: string,\n\t\tbootOptions?: CliBootOptions\n\t) {\n\t\treturn this.installFeatures([], cacheKey, bootOptions)\n\t}\n\n\tpublic async installFeatures(\n\t\tfeatures: InstallFeature[],\n\t\tcacheKey?: string,\n\t\tbootOptions?: CliBootOptions\n\t) {\n\t\tif (this.isCached(cacheKey)) {\n\t\t\treturn this.installedSkills[cacheKey as string].cli\n\t\t}\n\n\t\tlet isCached = false\n\t\tif (cacheKey && testUtil.isCacheEnabled()) {\n\t\t\tisCached = this.doesCacheExist(cacheKey)\n\n\t\t\tif (!isCached && !this.generateCacheIfMissing) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Cached skill not found, make sure\\n\\n\"${cacheKey}\"\\n\\nis in your package.json under \"testSkillCache\" and run\\n\\n\\`yarn cache.tests\\``\n\t\t\t\t)\n\t\t\t}\n\n\t\t\tif (isCached) {\n\t\t\t\tawait this.copyCachedSkillToCwd(cacheKey)\n\t\t\t} else {\n\t\t\t\tthis.removeCwdFromCacheTracker(cacheKey)\n\t\t\t}\n\t\t}\n\n\t\tconst cli = await this.Cli(bootOptions)\n\n\t\tif (!isCached) {\n\t\t\tawait cli.installFeatures({\n\t\t\t\tfeatures,\n\t\t\t})\n\t\t}\n\n\t\tif (cacheKey && testUtil.isCacheEnabled()) {\n\t\t\t!isCached && this.addCwdToCacheTracker(cacheKey)\n\t\t\tthis.cacheCli(cacheKey, cli)\n\t\t}\n\n\t\tawait this.linkLocalPackages()\n\n\t\treturn cli\n\t}\n\n\tprivate isCached(cacheKey: string | undefined) {\n\t\treturn (\n\t\t\tcacheKey && this.installedSkills[cacheKey] && testUtil.isCacheEnabled()\n\t\t)\n\t}\n\n\tpublic async linkLocalPackages() {\n\t\t// const command = this.Service('command')\n\t\t// await command.execute(`yarn link @sprucelabs/spruce-skill-utils`)\n\t}\n\n\tprivate async copyCachedSkillToCwd(cacheKey: string) {\n\t\tlet isCached = this.doesCacheExist(cacheKey)\n\n\t\tif (isCached) {\n\t\t\tlet settings = this.loadCacheTracker()\n\t\t\tawait diskUtil.copyDir(settings[cacheKey], this.cwd)\n\n\t\t\tif (process.env.TEST_HOST) {\n\t\t\t\tthis.Service('env').set('HOST', process.env.TEST_HOST)\n\t\t\t}\n\n\t\t\tFeatureFixture.dirsToDelete.push(this.cwd)\n\t\t}\n\t}\n\n\tprivate addCwdToCacheTracker(cacheKey: string) {\n\t\tlet settings = this.loadCacheTracker()\n\n\t\tif (!settings) {\n\t\t\tsettings = {}\n\t\t}\n\n\t\tif (!settings[cacheKey]) {\n\t\t\tsettings[cacheKey] = this.cwd\n\t\t\tthis.writeCacheSettings(settings)\n\t\t}\n\t\treturn settings\n\t}\n\n\tprivate removeCwdFromCacheTracker(cacheKey: string) {\n\t\tlet settings = this.loadCacheTracker()\n\n\t\tif (!settings) {\n\t\t\tsettings = {}\n\t\t}\n\n\t\tif (settings[cacheKey]) {\n\t\t\tdelete settings[cacheKey]\n\t\t\tthis.writeCacheSettings(settings)\n\t\t}\n\t}\n\n\tprivate writeCacheSettings(settings: Record<string, any>) {\n\t\tconst settingsFile = this.getTestCacheTrackerFilePath()\n\t\tconst settingsFolder = pathUtil.dirname(settingsFile)\n\n\t\t!diskUtil.doesDirExist(settingsFolder) && diskUtil.createDir(settingsFolder)\n\n\t\tdiskUtil.writeFile(settingsFile, JSON.stringify(settings, null, 2))\n\t}\n\n\tprivate doesCacheExist(cacheKey: string) {\n\t\tlet alreadyInstalled = false\n\n\t\tconst settings = this.loadCacheTracker()\n\n\t\tif (settings?.[cacheKey]) {\n\t\t\talreadyInstalled = true\n\t\t}\n\n\t\tif (alreadyInstalled) {\n\t\t\talreadyInstalled = diskUtil.doesDirExist(\n\t\t\t\tdiskUtil.resolvePath(settings[cacheKey], 'node_modules')\n\t\t\t)\n\t\t}\n\n\t\treturn alreadyInstalled\n\t}\n\n\tpublic loadCacheTracker() {\n\t\tconst settingsFile = this.getTestCacheTrackerFilePath()\n\n\t\tconst exists = diskUtil.doesFileExist(settingsFile)\n\t\tlet settingsObject: Record<string, any> = {}\n\n\t\ttry {\n\t\t\tsettingsObject = exists ? JSON.parse(diskUtil.readFile(settingsFile)) : {}\n\t\t\t// eslint-disable-next-line no-empty\n\t\t} catch {}\n\n\t\treturn settingsObject\n\t}\n\n\tpublic getTestCacheTrackerFilePath() {\n\t\treturn diskUtil.resolveHashSprucePath(\n\t\t\t__dirname,\n\t\t\t'tmp',\n\t\t\t`cached-skills.json`\n\t\t)\n\t}\n\n\tprivate cacheCli(cacheKey: string, cli: CliInterface) {\n\t\tthis.installedSkills[cacheKey] = {\n\t\t\tcwd: this.cwd,\n\t\t\tcli,\n\t\t}\n\t}\n}\n\nexport interface CachedCli {\n\tcli: CliInterface\n\tcwd: string\n}\n\nexport interface FeatureFixtureOptions {\n\tcwd: string\n\tserviceFactory: ServiceFactory\n\tui: GraphicsInterface\n\tshouldGenerateCacheIfMissing?: boolean\n\tapiClientFactory: ApiClientFactory\n\temitter?: GlobalEmitter\n\tfeatureInstaller?: FeatureInstaller\n}\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAH,sBAAA,CAAAC,OAAA;AAeA,IAAAG,KAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAgD,SAAAI,2BAAAC,CAAA,EAAAC,cAAA,QAAAC,EAAA,UAAAC,MAAA,oBAAAH,CAAA,CAAAG,MAAA,CAAAC,QAAA,KAAAJ,CAAA,qBAAAE,EAAA,QAAAG,KAAA,CAAAC,OAAA,CAAAN,CAAA,MAAAE,EAAA,GAAAK,2BAAA,CAAAP,CAAA,MAAAC,cAAA,IAAAD,CAAA,WAAAA,CAAA,CAAAQ,MAAA,qBAAAN,EAAA,EAAAF,CAAA,GAAAE,EAAA,MAAAO,CAAA,UAAAC,CAAA,YAAAA,EAAA,eAAAC,CAAA,EAAAD,CAAA,EAAAE,CAAA,WAAAA,EAAA,QAAAH,CAAA,IAAAT,CAAA,CAAAQ,MAAA,WAAAK,IAAA,mBAAAA,IAAA,SAAAC,KAAA,EAAAd,CAAA,CAAAS,CAAA,UAAAM,CAAA,WAAAA,EAAAC,EAAA,UAAAA,EAAA,KAAAC,CAAA,EAAAP,CAAA,gBAAAQ,SAAA,iJAAAC,gBAAA,SAAAC,MAAA,UAAAC,GAAA,WAAAV,CAAA,WAAAA,EAAA,IAAAT,EAAA,GAAAA,EAAA,CAAAoB,IAAA,CAAAtB,CAAA,MAAAY,CAAA,WAAAA,EAAA,QAAAW,IAAA,GAAArB,EAAA,CAAAsB,IAAA,IAAAL,gBAAA,GAAAI,IAAA,CAAAV,IAAA,SAAAU,IAAA,KAAAR,CAAA,WAAAA,EAAAU,G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G,CAAC,CAAC;QAC1E;MACD,CAAC,CAAC,OAAAiB,OAAA,EAAM,CAAC;MAET,OAAOH,cAAc;IACtB;EAAC;IAAA3F,GAAA;IAAAxD,KAAA,EAED,SAAAsI,4BAAA,EAAqC;MACpC,OAAOV,0BAAQ,CAAC2B,qBAAqB,CACpCC,SAAS,EACT,KAAK,sBAEN,CAAC;IACF;EAAC;IAAAhG,GAAA;IAAAxD,KAAA,EAED,SAAA6G,SAAiBtB,QAAgB,EAAEpB,GAAiB,EAAE;MACrD,IAAI,CAACkC,eAAe,CAACd,QAAQ,CAAC,GAAG;QAChC1C,GAAG,EAAE,IAAI,CAACA,GAAG;QACbsB,GAAG,EAAHA;MACD,CAAC;IACF;EAAC;IAAAX,GAAA;IAAAxD,KAAA,EAlOD,SAAAyJ,mBAAA,EAAmC;MAAA,IAAAC,SAAA,GAAAzK,0BAAA,CAChB,IAAI,CAACiJ,YAAY;QAAAyB,KAAA;MAAA;QAAnC,KAAAD,SAAA,CAAA7J,CAAA,MAAA8J,KAAA,GAAAD,SAAA,CAAA5J,CAAA,IAAAC,IAAA,GAAqC;UAAA,IAA1B6J,GAAG,GAAAD,KAAA,CAAA3J,KAAA;UACb4H,0BAAQ,CAACiC,SAAS,CAACD,GAAG,CAAC;QACxB;MAAC,SAAArJ,GAAA;QAAAmJ,SAAA,CAAAzJ,CAAA,CAAAM,GAAA;MAAA;QAAAmJ,SAAA,CAAAvJ,CAAA;MAAA;MAED,IAAI,CAAC+H,YAAY,GAAG,EAAE;IACvB;EAAC;EAAA,OAAAxF,cAAA;AAAA;AAAAoH,OAAA,cAAApH,cAAA;AAAA,IAAAJ,gBAAA,aAhCmBI,cAAc,iBAIL,KAAK;AAAA,IAAAJ,gBAAA,aAJdI,cAAc,kBAKM,EAAE"}
|
|
1
|
+
{"version":3,"file":"FeatureFixture.js","names":["_path","_interopRequireDefault","require","_spruceSkillUtils","_Cli3","_test","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_e","f","TypeError","normalCompletion","didErr","err","call","step","next","_e2","minLen","_arrayLikeToArray","Object","prototype","toString","slice","constructor","name","from","test","arr","len","arr2","ownKeys","r","t","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","FeatureFixture","_Cli2","_linkWorkspacePackages","_installCachedFeatures","_installFeatures","_linkLocalPackages","_copyCachedSkillToCwd","options","_classCallCheck2","cwd","search","Error","serviceFactory","ui","generateCacheIfMissing","shouldGenerateCacheIfMissing","apiClientFactory","emitter","featureInstaller","_createClass2","key","_Service","Service","_x","_x2","type","Cli","_x3","_asyncToGenerator2","_regenerator","mark","_callee","cli","wrap","_callee$","_context","prev","linkWorkspacePackages","Boot","graphicsInterface","sent","abrupt","stop","_callee2","_callee2$","_context2","linkedUtils","installCachedFeatures","_x4","_x5","_callee3","cacheKey","bootOptions","_callee3$","_context3","installFeatures","_x6","_x7","_x8","_callee4","features","isCached","_callee4$","_context4","installedSkills","testUtil","isCacheEnabled","doesCacheExist","concat","copyCachedSkillToCwd","removeCwdFromCacheTracker","addCwdToCacheTracker","cacheCli","linkLocalPackages","_callee5","_callee5$","_context5","_x9","_callee6","settings","_callee6$","_context6","loadCacheTracker","diskUtil","copyDir","process","env","TEST_HOST","set","dirsToDelete","writeCacheSettings","settingsFile","getTestCacheTrackerFilePath","settingsFolder","pathUtil","dirname","doesDirExist","createDir","writeFile","JSON","stringify","alreadyInstalled","resolvePath","exists","doesFileExist","settingsObject","parse","readFile","_unused","resolveHashSprucePath","__dirname","deleteOldSkillDirs","_iterator","_step","dir","deleteDir","exports"],"sources":["../../../src/tests/fixtures/FeatureFixture.ts"],"sourcesContent":["import pathUtil from 'path'\nimport { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport Cli from '../../cli/Cli'\nimport FeatureInstaller from '../../features/FeatureInstaller'\nimport { InstallFeature } from '../../features/features.types'\nimport { GlobalEmitter } from '../../GlobalEmitter'\nimport ServiceFactory, {\n\tServiceProvider,\n\tService,\n\tServiceMap,\n} from '../../services/ServiceFactory'\nimport { ApiClientFactory } from '../../types/apiClient.types'\nimport {\n\tCliBootOptions,\n\tCliInterface,\n\tGraphicsInterface,\n} from '../../types/cli.types'\nimport testUtil from '../utilities/test.utility'\n\nexport default class FeatureFixture implements ServiceProvider {\n\tprivate cwd: string\n\tprivate installedSkills: Record<string, CachedCli> = {}\n\tprivate serviceFactory: ServiceFactory\n\tprivate static linkedUtils = false\n\tprivate static dirsToDelete: string[] = []\n\tprivate ui: GraphicsInterface\n\tprivate generateCacheIfMissing = false\n\tprivate apiClientFactory: ApiClientFactory\n\tprivate emitter?: GlobalEmitter\n\tprivate featureInstaller?: FeatureInstaller\n\n\tpublic constructor(options: FeatureFixtureOptions) {\n\t\tif (options.cwd.search('packages/spruce-cli') > -1) {\n\t\t\tthrow new Error(\"You can't run FeatureFixture in the cli directory.\")\n\t\t}\n\n\t\tthis.cwd = options.cwd\n\t\tthis.serviceFactory = options.serviceFactory\n\t\tthis.ui = options.ui\n\t\tthis.generateCacheIfMissing = !!options.shouldGenerateCacheIfMissing\n\t\tthis.apiClientFactory = options.apiClientFactory\n\t\tthis.emitter = options.emitter\n\t\tthis.featureInstaller = options.featureInstaller\n\t}\n\n\tpublic static deleteOldSkillDirs() {\n\t\tfor (const dir of this.dirsToDelete) {\n\t\t\tdiskUtil.deleteDir(dir)\n\t\t}\n\n\t\tthis.dirsToDelete = []\n\t}\n\n\tpublic Service<S extends Service>(\n\t\ttype: S,\n\t\tcwd?: string | undefined\n\t): ServiceMap[S] {\n\t\treturn this.serviceFactory.Service(cwd ?? this.cwd, type)\n\t}\n\n\tpublic async Cli(options?: CliBootOptions) {\n\t\tawait this.linkWorkspacePackages()\n\n\t\tconst cli = await Cli.Boot({\n\t\t\tcwd: this.cwd,\n\t\t\tgraphicsInterface: this.ui,\n\t\t\tapiClientFactory: this.apiClientFactory,\n\t\t\temitter: this.emitter,\n\t\t\tfeatureInstaller: this.featureInstaller,\n\t\t\t...(options ?? {}),\n\t\t})\n\n\t\treturn cli\n\t}\n\n\tprivate async linkWorkspacePackages() {\n\t\tif (!FeatureFixture.linkedUtils) {\n\t\t\tFeatureFixture.linkedUtils = true\n\n\t\t\t// const expectedLinkedDir = pathUtil.join(\n\t\t\t// \tos.homedir(),\n\t\t\t// \t'.config',\n\t\t\t// \t'yarn',\n\t\t\t// \t'link',\n\t\t\t// \t'@sprucelabs',\n\t\t\t// \t'spruce-skill-utils'\n\t\t\t// )\n\n\t\t\t// if (!fsUtil.existsSync(expectedLinkedDir)) {\n\t\t\t// \tconst command = this.Service('command')\n\t\t\t// \ttry {\n\t\t\t// \t\tawait command.execute(\n\t\t\t// \t\t\t`cd ${pathUtil.join(\n\t\t\t// \t\t\t\t__dirname,\n\t\t\t// \t\t\t\t'..',\n\t\t\t// \t\t\t\t'..',\n\t\t\t// \t\t\t\t'..',\n\t\t\t// \t\t\t\t'spruce-skill-utils'\n\t\t\t// \t\t\t)} && yarn link`\n\t\t\t// \t\t)\n\t\t\t// \t} catch (err) {\n\t\t\t// \t\tif (fsUtil.existsSync(expectedLinkedDir)) {\n\t\t\t// \t\t\tlog.warn(`Symlink ${expectedLinkedDir} already exists`)\n\t\t\t// \t\t} else {\n\t\t\t// \t\t\tlog.warn(\n\t\t\t// \t\t\t\t`Symlink ${expectedLinkedDir} failed, but the check thinks it is missing`\n\t\t\t// \t\t\t)\n\t\t\t// \t\t}\n\t\t\t// \t}\n\t\t\t// }\n\t\t}\n\t}\n\n\tpublic async installCachedFeatures(\n\t\tcacheKey: string,\n\t\tbootOptions?: CliBootOptions\n\t) {\n\t\treturn this.installFeatures([], cacheKey, bootOptions)\n\t}\n\n\tpublic async installFeatures(\n\t\tfeatures: InstallFeature[],\n\t\tcacheKey?: string,\n\t\tbootOptions?: CliBootOptions\n\t) {\n\t\tif (this.isCached(cacheKey)) {\n\t\t\treturn this.installedSkills[cacheKey as string].cli\n\t\t}\n\n\t\tlet isCached = false\n\t\tif (cacheKey && testUtil.isCacheEnabled()) {\n\t\t\tisCached = this.doesCacheExist(cacheKey)\n\n\t\t\tif (!isCached && !this.generateCacheIfMissing) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Cached skill not found, make sure\\n\\n\"${cacheKey}\"\\n\\nis in your package.json under \"testSkillCache\" and run\\n\\n\\`yarn cache.tests\\``\n\t\t\t\t)\n\t\t\t}\n\n\t\t\tif (isCached) {\n\t\t\t\tawait this.copyCachedSkillToCwd(cacheKey)\n\t\t\t} else {\n\t\t\t\tthis.removeCwdFromCacheTracker(cacheKey)\n\t\t\t}\n\t\t}\n\n\t\tconst cli = await this.Cli(bootOptions)\n\n\t\tif (!isCached) {\n\t\t\tawait cli.installFeatures({\n\t\t\t\tfeatures,\n\t\t\t})\n\t\t}\n\n\t\tif (cacheKey && testUtil.isCacheEnabled()) {\n\t\t\t!isCached && this.addCwdToCacheTracker(cacheKey)\n\t\t\tthis.cacheCli(cacheKey, cli)\n\t\t}\n\n\t\tawait this.linkLocalPackages()\n\n\t\treturn cli\n\t}\n\n\tprivate isCached(cacheKey: string | undefined) {\n\t\treturn (\n\t\t\tcacheKey && this.installedSkills[cacheKey] && testUtil.isCacheEnabled()\n\t\t)\n\t}\n\n\tpublic async linkLocalPackages() {\n\t\t// const command = this.Service('command')\n\t\t// await command.execute(`yarn link @sprucelabs/spruce-skill-utils`)\n\t}\n\n\tprivate async copyCachedSkillToCwd(cacheKey: string) {\n\t\tlet isCached = this.doesCacheExist(cacheKey)\n\n\t\tif (isCached) {\n\t\t\tlet settings = this.loadCacheTracker()\n\t\t\tawait diskUtil.copyDir(settings[cacheKey], this.cwd)\n\n\t\t\tif (process.env.TEST_HOST) {\n\t\t\t\tthis.Service('env').set('HOST', process.env.TEST_HOST)\n\t\t\t}\n\n\t\t\tFeatureFixture.dirsToDelete.push(this.cwd)\n\t\t}\n\t}\n\n\tprivate addCwdToCacheTracker(cacheKey: string) {\n\t\tlet settings = this.loadCacheTracker()\n\n\t\tif (!settings) {\n\t\t\tsettings = {}\n\t\t}\n\n\t\tif (!settings[cacheKey]) {\n\t\t\tsettings[cacheKey] = this.cwd\n\t\t\tthis.writeCacheSettings(settings)\n\t\t}\n\t\treturn settings\n\t}\n\n\tprivate removeCwdFromCacheTracker(cacheKey: string) {\n\t\tlet settings = this.loadCacheTracker()\n\n\t\tif (!settings) {\n\t\t\tsettings = {}\n\t\t}\n\n\t\tif (settings[cacheKey]) {\n\t\t\tdelete settings[cacheKey]\n\t\t\tthis.writeCacheSettings(settings)\n\t\t}\n\t}\n\n\tprivate writeCacheSettings(settings: Record<string, any>) {\n\t\tconst settingsFile = this.getTestCacheTrackerFilePath()\n\t\tconst settingsFolder = pathUtil.dirname(settingsFile)\n\n\t\t!diskUtil.doesDirExist(settingsFolder) && diskUtil.createDir(settingsFolder)\n\n\t\tdiskUtil.writeFile(settingsFile, JSON.stringify(settings, null, 2))\n\t}\n\n\tprivate doesCacheExist(cacheKey: string) {\n\t\tlet alreadyInstalled = false\n\n\t\tconst settings = this.loadCacheTracker()\n\n\t\tif (settings?.[cacheKey]) {\n\t\t\talreadyInstalled = true\n\t\t}\n\n\t\tif (alreadyInstalled) {\n\t\t\talreadyInstalled = diskUtil.doesDirExist(\n\t\t\t\tdiskUtil.resolvePath(settings[cacheKey], 'node_modules')\n\t\t\t)\n\t\t}\n\n\t\treturn alreadyInstalled\n\t}\n\n\tpublic loadCacheTracker() {\n\t\tconst settingsFile = this.getTestCacheTrackerFilePath()\n\n\t\tconst exists = diskUtil.doesFileExist(settingsFile)\n\t\tlet settingsObject: Record<string, any> = {}\n\n\t\ttry {\n\t\t\tsettingsObject = exists ? JSON.parse(diskUtil.readFile(settingsFile)) : {}\n\t\t\t// eslint-disable-next-line no-empty\n\t\t} catch {}\n\n\t\treturn settingsObject\n\t}\n\n\tpublic getTestCacheTrackerFilePath() {\n\t\treturn diskUtil.resolveHashSprucePath(\n\t\t\t__dirname,\n\t\t\t'tmp',\n\t\t\t`cached-skills.json`\n\t\t)\n\t}\n\n\tprivate cacheCli(cacheKey: string, cli: CliInterface) {\n\t\tthis.installedSkills[cacheKey] = {\n\t\t\tcwd: this.cwd,\n\t\t\tcli,\n\t\t}\n\t}\n}\n\nexport interface CachedCli {\n\tcli: CliInterface\n\tcwd: string\n}\n\nexport interface FeatureFixtureOptions {\n\tcwd: string\n\tserviceFactory: ServiceFactory\n\tui: GraphicsInterface\n\tshouldGenerateCacheIfMissing?: boolean\n\tapiClientFactory: ApiClientFactory\n\temitter?: GlobalEmitter\n\tfeatureInstaller?: FeatureInstaller\n}\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAH,sBAAA,CAAAC,OAAA;AAeA,IAAAG,KAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAgD,SAAAI,2BAAAC,CAAA,EAAAC,cAAA,QAAAC,EAAA,UAAAC,MAAA,oBAAAH,CAAA,CAAAG,MAAA,CAAAC,QAAA,KAAAJ,CAAA,qBAAAE,EAAA,QAAAG,KAAA,CAAAC,OAAA,CAAAN,CAAA,MAAAE,EAAA,GAAAK,2BAAA,CAAAP,CAAA,MAAAC,cAAA,IAAAD,CAAA,WAAAA,CAAA,CAAAQ,MAAA,qBAAAN,EAAA,EAAAF,CAAA,GAAAE,EAAA,MAAAO,CAAA,UAAAC,CAAA,YAAAA,EAAA,eAAAC,CAAA,EAAAD,CAAA,EAAAE,CAAA,WAAAA,EAAA,QAAAH,CAAA,IAAAT,CAAA,CAAAQ,MAAA,WAAAK,IAAA,mBAAAA,IAAA,SAAAC,KAAA,EAAAd,CAAA,CAAAS,CAAA,UAAAM,CAAA,WAAAA,EAAAC,EAAA,UAAAA,EAAA,KAAAC,CAAA,EAAAP,CAAA,gBAAAQ,SAAA,iJAAA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
|
@@ -15,7 +15,7 @@ var _constants = require("../../constants");
|
|
|
15
15
|
var _process$env$TEST_HOS;
|
|
16
16
|
require('dotenv').config();
|
|
17
17
|
var TEST_HOST = (_process$env$TEST_HOS = process.env.TEST_HOST) !== null && _process$env$TEST_HOS !== void 0 ? _process$env$TEST_HOS : _constants.DEFAULT_HOST;
|
|
18
|
-
var MercuryFixture = /*#__PURE__*/function () {
|
|
18
|
+
var MercuryFixture = /*#__PURE__*/function (_disconnectAll) {
|
|
19
19
|
function MercuryFixture(cwd, serviceFactory) {
|
|
20
20
|
(0, _classCallCheck2["default"])(this, MercuryFixture);
|
|
21
21
|
(0, _defineProperty2["default"])(this, "cwd", void 0);
|
|
@@ -40,8 +40,8 @@ var MercuryFixture = /*#__PURE__*/function () {
|
|
|
40
40
|
}
|
|
41
41
|
}, {
|
|
42
42
|
key: "disconnectAll",
|
|
43
|
-
value: function () {
|
|
44
|
-
|
|
43
|
+
value: function disconnectAll() {
|
|
44
|
+
return (_disconnectAll = _disconnectAll || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
45
45
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
46
46
|
while (1) switch (_context.prev = _context.next) {
|
|
47
47
|
case 0:
|
|
@@ -52,12 +52,8 @@ var MercuryFixture = /*#__PURE__*/function () {
|
|
|
52
52
|
return _context.stop();
|
|
53
53
|
}
|
|
54
54
|
}, _callee);
|
|
55
|
-
}));
|
|
56
|
-
|
|
57
|
-
return _disconnectAll.apply(this, arguments);
|
|
58
|
-
}
|
|
59
|
-
return disconnectAll;
|
|
60
|
-
}()
|
|
55
|
+
}))).apply(this, arguments);
|
|
56
|
+
}
|
|
61
57
|
}]);
|
|
62
58
|
return MercuryFixture;
|
|
63
59
|
}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MercuryFixture.js","names":["_Cli","_interopRequireDefault","require","_constants","_process$env$TEST_HOS","config","TEST_HOST","process","env","DEFAULT_HOST","MercuryFixture","cwd","serviceFactory","_classCallCheck2","_defineProperty2","apiClientFactory","Cli","buildApiClientFactory","host","shouldReconnect","_createClass2","key","value","getApiClientFactory","connectToApi","options","
|
|
1
|
+
{"version":3,"file":"MercuryFixture.js","names":["_Cli","_interopRequireDefault","require","_constants","_process$env$TEST_HOS","config","TEST_HOST","process","env","DEFAULT_HOST","MercuryFixture","_disconnectAll","cwd","serviceFactory","_classCallCheck2","_defineProperty2","apiClientFactory","Cli","buildApiClientFactory","host","shouldReconnect","_createClass2","key","value","getApiClientFactory","connectToApi","options","disconnectAll","_asyncToGenerator2","_regenerator","mark","_callee","wrap","_callee$","_context","prev","next","resetApiClients","stop","apply","arguments","exports"],"sources":["../../../src/tests/fixtures/MercuryFixture.ts"],"sourcesContent":["import Cli from '../../cli/Cli'\nimport { DEFAULT_HOST } from '../../constants'\nimport ServiceFactory from '../../services/ServiceFactory'\nimport {\n\tApiClientFactory,\n\tApiClientFactoryOptions,\n} from '../../types/apiClient.types'\nrequire('dotenv').config()\n\nconst TEST_HOST = process.env.TEST_HOST ?? DEFAULT_HOST\n\nexport default class MercuryFixture {\n\tprivate cwd: string\n\tprivate serviceFactory: ServiceFactory\n\tprivate apiClientFactory: any\n\n\tpublic constructor(cwd: string, serviceFactory: ServiceFactory) {\n\t\tthis.cwd = cwd\n\t\tthis.serviceFactory = serviceFactory\n\t\tthis.apiClientFactory = Cli.buildApiClientFactory(\n\t\t\tthis.cwd,\n\t\t\tthis.serviceFactory,\n\t\t\t{ host: TEST_HOST, shouldReconnect: false }\n\t\t)\n\t}\n\n\tpublic getApiClientFactory(): ApiClientFactory {\n\t\treturn this.apiClientFactory\n\t}\n\n\tpublic connectToApi(options?: ApiClientFactoryOptions) {\n\t\treturn this.getApiClientFactory()(options)\n\t}\n\n\tpublic async disconnectAll() {\n\t\tawait Cli.resetApiClients()\n\t}\n}\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,O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CAACoB,eAAe,CAAC,CAAC;YAAA;YAAA;cAAA,OAAAH,QAAA,CAAAI,IAAA;UAAA;QAAA,GAAAP,OAAA;MAAA,CAC3B,IAAAQ,KAAA,OAAAC,SAAA;IAAA;EAAA;EAAA,OAAA9B,cAAA;AAAA;AAAA+B,OAAA,cAAA/B,cAAA"}
|
|
@@ -15,7 +15,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
15
15
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
16
16
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
17
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
|
-
var OrganizationFixture = /*#__PURE__*/function () {
|
|
18
|
+
var OrganizationFixture = /*#__PURE__*/function (_seedDemoOrg, _clearAllOrgs, _installSkillAtOrganization) {
|
|
19
19
|
function OrganizationFixture(personFixture, storeFactory) {
|
|
20
20
|
(0, _classCallCheck2["default"])(this, OrganizationFixture);
|
|
21
21
|
(0, _defineProperty2["default"])(this, "storeFactory", void 0);
|
|
@@ -25,8 +25,8 @@ var OrganizationFixture = /*#__PURE__*/function () {
|
|
|
25
25
|
}
|
|
26
26
|
(0, _createClass2["default"])(OrganizationFixture, [{
|
|
27
27
|
key: "seedDemoOrg",
|
|
28
|
-
value: function () {
|
|
29
|
-
|
|
28
|
+
value: function seedDemoOrg(_x) {
|
|
29
|
+
return (_seedDemoOrg = _seedDemoOrg || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(options) {
|
|
30
30
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
31
31
|
while (1) switch (_context.prev = _context.next) {
|
|
32
32
|
case 0:
|
|
@@ -41,16 +41,12 @@ var OrganizationFixture = /*#__PURE__*/function () {
|
|
|
41
41
|
return _context.stop();
|
|
42
42
|
}
|
|
43
43
|
}, _callee, this);
|
|
44
|
-
}));
|
|
45
|
-
|
|
46
|
-
return _seedDemoOrg.apply(this, arguments);
|
|
47
|
-
}
|
|
48
|
-
return seedDemoOrg;
|
|
49
|
-
}()
|
|
44
|
+
}))).apply(this, arguments);
|
|
45
|
+
}
|
|
50
46
|
}, {
|
|
51
47
|
key: "clearAllOrgs",
|
|
52
|
-
value: function () {
|
|
53
|
-
|
|
48
|
+
value: function clearAllOrgs() {
|
|
49
|
+
return (_clearAllOrgs = _clearAllOrgs || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
54
50
|
var orgStore, orgs, _iterator, _step, org;
|
|
55
51
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
56
52
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -95,16 +91,12 @@ var OrganizationFixture = /*#__PURE__*/function () {
|
|
|
95
91
|
return _context2.stop();
|
|
96
92
|
}
|
|
97
93
|
}, _callee2, this, [[7, 17, 20, 23]]);
|
|
98
|
-
}));
|
|
99
|
-
|
|
100
|
-
return _clearAllOrgs.apply(this, arguments);
|
|
101
|
-
}
|
|
102
|
-
return clearAllOrgs;
|
|
103
|
-
}()
|
|
94
|
+
}))).apply(this, arguments);
|
|
95
|
+
}
|
|
104
96
|
}, {
|
|
105
97
|
key: "installSkillAtOrganization",
|
|
106
|
-
value: function () {
|
|
107
|
-
|
|
98
|
+
value: function installSkillAtOrganization(_x2, _x3) {
|
|
99
|
+
return (_installSkillAtOrganization = _installSkillAtOrganization || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(skillId, orgId) {
|
|
108
100
|
var orgStore;
|
|
109
101
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
110
102
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -120,12 +112,8 @@ var OrganizationFixture = /*#__PURE__*/function () {
|
|
|
120
112
|
return _context3.stop();
|
|
121
113
|
}
|
|
122
114
|
}, _callee3, this);
|
|
123
|
-
}));
|
|
124
|
-
|
|
125
|
-
return _installSkillAtOrganization.apply(this, arguments);
|
|
126
|
-
}
|
|
127
|
-
return installSkillAtOrganization;
|
|
128
|
-
}()
|
|
115
|
+
}))).apply(this, arguments);
|
|
116
|
+
}
|
|
129
117
|
}]);
|
|
130
118
|
return OrganizationFixture;
|
|
131
119
|
}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrganizationFixture.js","names":["OrganizationFixture","personFixture","storeFactory","_classCallCheck2","_defineProperty2","_createClass2","key","value","
|
|
1
|
+
{"version":3,"file":"OrganizationFixture.js","names":["OrganizationFixture","_seedDemoOrg","_clearAllOrgs","_installSkillAtOrganization","personFixture","storeFactory","_classCallCheck2","_defineProperty2","_createClass2","key","value","seedDemoOrg","_x","_asyncToGenerator2","_regenerator","mark","_callee","options","wrap","_callee$","_context","prev","next","loginAsDemoPerson","abrupt","Store","create","_objectSpread","slug","concat","Date","getTime","stop","apply","arguments","clearAllOrgs","_callee2","orgStore","orgs","_iterator","_step","org","_callee2$","_context2","fetchMyOrganizations","sent","_createForOfIteratorHelper","s","n","done","deleteOrganization","id","t0","e","f","finish","length","installSkillAtOrganization","_x2","_x3","_callee3","skillId","orgId","_callee3$","_context3","exports"],"sources":["../../../src/tests/fixtures/OrganizationFixture.ts"],"sourcesContent":["import StoreFactory from '../../stores/StoreFactory'\nimport PersonFixture from './PersonFixture'\n\nexport default class OrganizationFixture {\n\tprivate storeFactory: StoreFactory\n\tprivate personFixture: PersonFixture\n\n\tpublic constructor(personFixture: PersonFixture, storeFactory: StoreFactory) {\n\t\tthis.storeFactory = storeFactory\n\t\tthis.personFixture = personFixture\n\t}\n\n\tpublic async seedDemoOrg(options: { name: string; slug?: string }) {\n\t\tawait this.personFixture.loginAsDemoPerson()\n\n\t\treturn this.storeFactory.Store('organization').create({\n\t\t\tslug: `my-org-${new Date().getTime()}`,\n\t\t\t...options,\n\t\t})\n\t}\n\n\tpublic async clearAllOrgs() {\n\t\tawait this.personFixture.loginAsDemoPerson()\n\n\t\tconst orgStore = this.storeFactory.Store('organization')\n\t\tconst orgs = await orgStore.fetchMyOrganizations()\n\n\t\tfor (const org of orgs) {\n\t\t\tawait orgStore.deleteOrganization(org.id)\n\t\t}\n\n\t\treturn orgs.length\n\t}\n\n\tpublic async installSkillAtOrganization(skillId: string, orgId: string) {\n\t\tawait this.personFixture.loginAsDemoPerson()\n\t\tconst orgStore = this.storeFactory.Store('organization')\n\n\t\tawait orgStore.installSkillAtOrganization(skillId, orgId)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;IAGqBA,mBAAmB,0BAAAC,YAAA,EAAAC,aAAA,EAAAC,2BAAA;EAIvC,SAAAH,oBAAmBI,aAA4B,EAAEC,YAA0B,EAAE;IAAA,IAAAC,gBAAA,mBAAAN,mBAAA;IAAA,IAAAO,gBAAA;IAAA,IAAAA,gBAAA;IAC5E,IAAI,CAACF,YAAY,GAAGA,YAAY;IAChC,IAAI,CAACD,aAAa,GAAGA,aAAa;EACnC;EAAC,IAAAI,aAAA,aAAAR,mBAAA;IAAAS,GAAA;IAAAC,KAAA,WAAAC,YAAAC,EAAA;MAAA,QAAAX,YAAA,GAAAA,YAAA,QAAAY,kBAAA,2BAAAC,YAAA,YAAAC,IAAA,CAED,SAAAC,QAAyBC,OAAwC;QAAA,OAAAH,YAAA,YAAAI,IAAA,UAAAC,SAAA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