@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
|
@@ -17,7 +17,7 @@ var _CommandService2 = _interopRequireDefault(require("../../../services/Command
|
|
|
17
17
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
18
18
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
19
19
|
var VSCODE_MINIMUM_VERSION = '1.44.0';
|
|
20
|
-
var VsCodeService = /*#__PURE__*/function (_CommandService) {
|
|
20
|
+
var VsCodeService = /*#__PURE__*/function (_CommandService, _isInstalled, _getVSCodeExtensions, _installExtensions) {
|
|
21
21
|
(0, _inherits2["default"])(VsCodeService, _CommandService);
|
|
22
22
|
var _super = _createSuper(VsCodeService);
|
|
23
23
|
function VsCodeService() {
|
|
@@ -26,8 +26,8 @@ var VsCodeService = /*#__PURE__*/function (_CommandService) {
|
|
|
26
26
|
}
|
|
27
27
|
(0, _createClass2["default"])(VsCodeService, [{
|
|
28
28
|
key: "isInstalled",
|
|
29
|
-
value: /** Returns whether or not vscode is installed */function () {
|
|
30
|
-
|
|
29
|
+
value: /** Returns whether or not vscode is installed */function isInstalled() {
|
|
30
|
+
return (_isInstalled = _isInstalled || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
31
31
|
var isInstalled, _yield$this$execute, stdout, lines;
|
|
32
32
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
33
33
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -60,16 +60,12 @@ var VsCodeService = /*#__PURE__*/function (_CommandService) {
|
|
|
60
60
|
return _context.stop();
|
|
61
61
|
}
|
|
62
62
|
}, _callee, this, [[1, 11]]);
|
|
63
|
-
}));
|
|
64
|
-
|
|
65
|
-
return _isInstalled.apply(this, arguments);
|
|
66
|
-
}
|
|
67
|
-
return isInstalled;
|
|
68
|
-
}()
|
|
63
|
+
}))).apply(this, arguments);
|
|
64
|
+
}
|
|
69
65
|
}, {
|
|
70
66
|
key: "getVSCodeExtensions",
|
|
71
|
-
value: function () {
|
|
72
|
-
|
|
67
|
+
value: function getVSCodeExtensions() {
|
|
68
|
+
return (_getVSCodeExtensions = _getVSCodeExtensions || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
73
69
|
var extensions, _yield$this$execute2, stdout;
|
|
74
70
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
75
71
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -97,16 +93,12 @@ var VsCodeService = /*#__PURE__*/function (_CommandService) {
|
|
|
97
93
|
return _context2.stop();
|
|
98
94
|
}
|
|
99
95
|
}, _callee2, this, [[1, 9]]);
|
|
100
|
-
}));
|
|
101
|
-
|
|
102
|
-
return _getVSCodeExtensions.apply(this, arguments);
|
|
103
|
-
}
|
|
104
|
-
return getVSCodeExtensions;
|
|
105
|
-
}()
|
|
96
|
+
}))).apply(this, arguments);
|
|
97
|
+
}
|
|
106
98
|
}, {
|
|
107
99
|
key: "installExtensions",
|
|
108
|
-
value: function () {
|
|
109
|
-
|
|
100
|
+
value: function installExtensions(_x) {
|
|
101
|
+
return (_installExtensions = _installExtensions || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(extensionIds) {
|
|
110
102
|
var args;
|
|
111
103
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
112
104
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -124,12 +116,8 @@ var VsCodeService = /*#__PURE__*/function (_CommandService) {
|
|
|
124
116
|
return _context3.stop();
|
|
125
117
|
}
|
|
126
118
|
}, _callee3, this);
|
|
127
|
-
}));
|
|
128
|
-
|
|
129
|
-
return _installExtensions.apply(this, arguments);
|
|
130
|
-
}
|
|
131
|
-
return installExtensions;
|
|
132
|
-
}()
|
|
119
|
+
}))).apply(this, arguments);
|
|
120
|
+
}
|
|
133
121
|
}]);
|
|
134
122
|
return VsCodeService;
|
|
135
123
|
}(_CommandService2["default"]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VsCodeService.js","names":["_semver","_interopRequireDefault","require","_CommandService2","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","VSCODE_MINIMUM_VERSION","VsCodeService","_CommandService","_inherits2","_super","_classCallCheck2","_createClass2","key","value","
|
|
1
|
+
{"version":3,"file":"VsCodeService.js","names":["_semver","_interopRequireDefault","require","_CommandService2","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","VSCODE_MINIMUM_VERSION","VsCodeService","_CommandService","_isInstalled","_getVSCodeExtensions","_installExtensions","_inherits2","_super","_classCallCheck2","_createClass2","key","value","isInstalled","_asyncToGenerator2","_regenerator","mark","_callee","_yield$this$execute","stdout","lines","wrap","_callee$","_context","prev","next","execute","args","sent","split","semver","satisfies","concat","abrupt","t0","stop","getVSCodeExtensions","_callee2","extensions","_yield$this$execute2","_callee2$","_context2","installExtensions","_x","_callee3","extensionIds","_callee3$","_context3","forEach","eId","CommandService","exports"],"sources":["../../../../src/features/vscode/services/VsCodeService.ts"],"sourcesContent":["import semver from 'semver'\nimport CommandService from '../../../services/CommandService'\n\nconst VSCODE_MINIMUM_VERSION = '1.44.0'\n\nexport interface Extension {\n\t/** The vscode extension id like dbaeumer.vscode-eslint */\n\tid: string\n\t/** A friendly name / description that will describe what the extension is or does */\n\tlabel: string\n}\n\nexport default class VsCodeService extends CommandService {\n\t/** Returns whether or not vscode is installed */\n\tpublic async isInstalled(): Promise<boolean> {\n\t\tconst isInstalled = false\n\t\ttry {\n\t\t\tconst { stdout } = await this.execute('code', {\n\t\t\t\targs: ['--version'],\n\t\t\t})\n\n\t\t\tconst lines = stdout.split('\\n')\n\t\t\tif (\n\t\t\t\tlines &&\n\t\t\t\tlines[0] &&\n\t\t\t\tsemver.satisfies(lines[0], `>=${VSCODE_MINIMUM_VERSION}`)\n\t\t\t) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\t// eslint-disable-next-line no-empty\n\t\t} catch (e) {}\n\n\t\treturn isInstalled\n\t}\n\n\tpublic async getVSCodeExtensions(): Promise<string[]> {\n\t\tlet extensions: string[] = []\n\n\t\ttry {\n\t\t\tconst { stdout } = await this.execute('code', {\n\t\t\t\targs: ['--list-extensions'],\n\t\t\t})\n\n\t\t\textensions = stdout.split('\\n')\n\t\t\t// eslint-disable-next-line no-empty\n\t\t} catch (e) {}\n\n\t\treturn extensions\n\t}\n\n\tpublic async installExtensions(extensionIds: string[]) {\n\t\tlet args: string[] = []\n\t\textensionIds.forEach((eId) => {\n\t\t\targs = args.concat('--install-extension', eId)\n\t\t})\n\n\t\tawait this.execute('code', {\n\t\t\targs,\n\t\t})\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAA6D,SAAAE,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,aAAAL,OAAA,GAAAM,MAAA,MAAAL,yBAAA,QAAAM,SAAA,OAAAF,gBAAA,mBAAAG,WAAA,EAAAF,MAAA,GAAAG,OAAA,CAAAC,SAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAJ,SAAA,YAAAD,MAAA,GAAAF,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,mBAAAP,MAAA;AAAA,SAAAJ,0BAAA,eAAAO,OAAA,qBAAAA,OAAA,CAAAC,SAAA,oBAAAD,OAAA,CAAAC,SAAA,CAAAI,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAV,OAAA,CAAAC,SAAA,CAAAM,OAAA,8CAAAI,CAAA;AAE7D,IAAMC,sBAAsB,GAAG,QAAQ;AAAA,IASlBC,aAAa,0BAAAC,eAAA,EAAAC,YAAA,EAAAC,oBAAA,EAAAC,kBAAA;EAAA,IAAAC,UAAA,aAAAL,aAAA,EAAAC,eAAA;EAAA,IAAAK,MAAA,GAAA7B,YAAA,CAAAuB,aAAA;EAAA,SAAAA,cAAA;IAAA,IAAAO,gBAAA,mBAAAP,aAAA;IAAA,OAAAM,MAAA,CAAAhB,KAAA,OAAAD,SAAA;EAAA;EAAA,IAAAmB,aAAA,aAAAR,aAAA;IAAAS,GAAA;IAAAC,KAAA,EACjC,0DAAA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AAI,CAACK,MAAM,CAAC,qBAAqB,EAAEiB,GAAG,CAAC;cAC/C,CAAC,CAAC;cAAAF,SAAA,CAAAtB,IAAA;cAAA,OAEI,IAAI,CAACC,OAAO,CAAC,MAAM,EAAE;gBAC1BC,IAAI,EAAJA;cACD,CAAC,CAAC;YAAA;YAAA;cAAA,OAAAoB,SAAA,CAAAZ,IAAA;UAAA;QAAA,GAAAS,QAAA;MAAA,CACF,IAAApD,KAAA,OAAAD,SAAA;IAAA;EAAA;EAAA,OAAAW,aAAA;AAAA,EA/CyCgD,2BAAc;AAAAC,OAAA,cAAAjD,aAAA"}
|
|
@@ -16,7 +16,7 @@ var _spruceTemplates = require("@sprucelabs/spruce-templates");
|
|
|
16
16
|
var _AbstractWriter2 = _interopRequireDefault(require("../../../writers/AbstractWriter"));
|
|
17
17
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
18
18
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
19
|
-
var VsCodeWriter = /*#__PURE__*/function (_AbstractWriter) {
|
|
19
|
+
var VsCodeWriter = /*#__PURE__*/function (_AbstractWriter, _writeVsCodeConfigurations) {
|
|
20
20
|
(0, _inherits2["default"])(VsCodeWriter, _AbstractWriter);
|
|
21
21
|
var _super = _createSuper(VsCodeWriter);
|
|
22
22
|
function VsCodeWriter() {
|
|
@@ -25,8 +25,8 @@ var VsCodeWriter = /*#__PURE__*/function (_AbstractWriter) {
|
|
|
25
25
|
}
|
|
26
26
|
(0, _createClass2["default"])(VsCodeWriter, [{
|
|
27
27
|
key: "writeVsCodeConfigurations",
|
|
28
|
-
value: function () {
|
|
29
|
-
|
|
28
|
+
value: function writeVsCodeConfigurations(_x) {
|
|
29
|
+
return (_writeVsCodeConfigurations = _writeVsCodeConfigurations || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(destinationDir) {
|
|
30
30
|
var shouldConfirmBeforeWriting,
|
|
31
31
|
_args = arguments;
|
|
32
32
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
@@ -44,12 +44,8 @@ var VsCodeWriter = /*#__PURE__*/function (_AbstractWriter) {
|
|
|
44
44
|
return _context.stop();
|
|
45
45
|
}
|
|
46
46
|
}, _callee, this);
|
|
47
|
-
}));
|
|
48
|
-
|
|
49
|
-
return _writeVsCodeConfigurations.apply(this, arguments);
|
|
50
|
-
}
|
|
51
|
-
return writeVsCodeConfigurations;
|
|
52
|
-
}()
|
|
47
|
+
}))).apply(this, arguments);
|
|
48
|
+
}
|
|
53
49
|
}]);
|
|
54
50
|
return VsCodeWriter;
|
|
55
51
|
}(_AbstractWriter2["default"]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VsCodeWriter.js","names":["_spruceTemplates","require","_AbstractWriter2","_interopRequireDefault","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","VsCodeWriter","_AbstractWriter","_inherits2","_super","_classCallCheck2","_createClass2","key","value","
|
|
1
|
+
{"version":3,"file":"VsCodeWriter.js","names":["_spruceTemplates","require","_AbstractWriter2","_interopRequireDefault","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","VsCodeWriter","_AbstractWriter","_writeVsCodeConfigurations","_inherits2","_super","_classCallCheck2","_createClass2","key","value","writeVsCodeConfigurations","_x","_asyncToGenerator2","_regenerator","mark","_callee","destinationDir","shouldConfirmBeforeWriting","_args","wrap","_callee$","_context","prev","next","length","undefined","abrupt","writeDirectoryTemplate","code","DirectoryTemplateCode","VsCode","context","stop","AbstractWriter","exports"],"sources":["../../../../src/features/vscode/writers/VsCodeWriter.ts"],"sourcesContent":["import { DirectoryTemplateCode } from '@sprucelabs/spruce-templates'\nimport AbstractWriter, { WriteResults } from '../../../writers/AbstractWriter'\n\nexport default class VsCodeWriter extends AbstractWriter {\n\tpublic async writeVsCodeConfigurations(\n\t\tdestinationDir: string,\n\t\tshouldConfirmBeforeWriting = true\n\t): Promise<WriteResults> {\n\t\treturn this.writeDirectoryTemplate({\n\t\t\tdestinationDir,\n\t\t\tcode: DirectoryTemplateCode.VsCode,\n\t\t\tshouldConfirmBeforeWriting,\n\t\t\tcontext: {},\n\t\t})\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA8E,SAAAG,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,aAAAL,OAAA,GAAAM,MAAA,MAAAL,yBAAA,QAAAM,SAAA,OAAAF,gBAAA,mBAAAG,WAAA,EAAAF,MAAA,GAAAG,OAAA,CAAAC,SAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAJ,SAAA,YAAAD,MAAA,GAAAF,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,mBAAAP,MAAA;AAAA,SAAAJ,0BAAA,eAAAO,OAAA,qBAAAA,OAAA,CAAAC,SAAA,oBAAAD,OAAA,CAAAC,SAAA,CAAAI,IAAA,2BAAAC,KAAA,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 @@ var _chokidar = _interopRequireDefault(require("chokidar"));
|
|
|
20
20
|
var _AbstractFeature2 = _interopRequireDefault(require("../AbstractFeature"));
|
|
21
21
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
22
22
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
23
|
-
var WatchFeature = /*#__PURE__*/function (_AbstractFeature) {
|
|
23
|
+
var WatchFeature = /*#__PURE__*/function (_AbstractFeature, _isWatching, _startWatching, _fireChange, _stopWatching) {
|
|
24
24
|
(0, _inherits2["default"])(WatchFeature, _AbstractFeature);
|
|
25
25
|
var _super = _createSuper(WatchFeature);
|
|
26
26
|
function WatchFeature() {
|
|
@@ -42,8 +42,8 @@ var WatchFeature = /*#__PURE__*/function (_AbstractFeature) {
|
|
|
42
42
|
}
|
|
43
43
|
(0, _createClass2["default"])(WatchFeature, [{
|
|
44
44
|
key: "isWatching",
|
|
45
|
-
value: function () {
|
|
46
|
-
|
|
45
|
+
value: function isWatching() {
|
|
46
|
+
return (_isWatching = _isWatching || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
47
47
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
48
48
|
while (1) switch (_context.prev = _context.next) {
|
|
49
49
|
case 0:
|
|
@@ -53,18 +53,15 @@ var WatchFeature = /*#__PURE__*/function (_AbstractFeature) {
|
|
|
53
53
|
return _context.stop();
|
|
54
54
|
}
|
|
55
55
|
}, _callee, this);
|
|
56
|
-
}));
|
|
57
|
-
|
|
58
|
-
return _isWatching.apply(this, arguments);
|
|
59
|
-
}
|
|
60
|
-
return isWatching;
|
|
61
|
-
}()
|
|
56
|
+
}))).apply(this, arguments);
|
|
57
|
+
}
|
|
62
58
|
}, {
|
|
63
59
|
key: "startWatching",
|
|
64
|
-
value: function () {
|
|
65
|
-
|
|
60
|
+
value: function startWatching(_x) {
|
|
61
|
+
return (_startWatching = _startWatching || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(options) {
|
|
66
62
|
var _options$sourceDir,
|
|
67
|
-
_this2 = this
|
|
63
|
+
_this2 = this,
|
|
64
|
+
_ref;
|
|
68
65
|
var watchDir, startsWith;
|
|
69
66
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
70
67
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -75,8 +72,8 @@ var WatchFeature = /*#__PURE__*/function (_AbstractFeature) {
|
|
|
75
72
|
ignoreInitial: true
|
|
76
73
|
});
|
|
77
74
|
startsWith = _spruceSkillUtils.diskUtil.resolvePath(watchDir, 'build');
|
|
78
|
-
this.watcher.on('all',
|
|
79
|
-
|
|
75
|
+
this.watcher.on('all', function (_x2, _x3) {
|
|
76
|
+
return (_ref = _ref || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(action, path) {
|
|
80
77
|
var _options$delay;
|
|
81
78
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
82
79
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -112,22 +109,15 @@ var WatchFeature = /*#__PURE__*/function (_AbstractFeature) {
|
|
|
112
109
|
return _context3.stop();
|
|
113
110
|
}
|
|
114
111
|
}, _callee3);
|
|
115
|
-
}));
|
|
116
|
-
|
|
117
|
-
return _ref.apply(this, arguments);
|
|
118
|
-
};
|
|
119
|
-
}());
|
|
112
|
+
}))).apply(this, arguments);
|
|
113
|
+
});
|
|
120
114
|
case 5:
|
|
121
115
|
case "end":
|
|
122
116
|
return _context4.stop();
|
|
123
117
|
}
|
|
124
118
|
}, _callee4, this);
|
|
125
|
-
}));
|
|
126
|
-
|
|
127
|
-
return _startWatching.apply(this, arguments);
|
|
128
|
-
}
|
|
129
|
-
return startWatching;
|
|
130
|
-
}()
|
|
119
|
+
}))).apply(this, arguments);
|
|
120
|
+
}
|
|
131
121
|
}, {
|
|
132
122
|
key: "mapChokidarActionToSchemaId",
|
|
133
123
|
value: function mapChokidarActionToSchemaId(action) {
|
|
@@ -147,8 +137,8 @@ var WatchFeature = /*#__PURE__*/function (_AbstractFeature) {
|
|
|
147
137
|
}
|
|
148
138
|
}, {
|
|
149
139
|
key: "fireChange",
|
|
150
|
-
value: function () {
|
|
151
|
-
|
|
140
|
+
value: function fireChange() {
|
|
141
|
+
return (_fireChange = _fireChange || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
|
152
142
|
var changes;
|
|
153
143
|
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
154
144
|
while (1) switch (_context5.prev = _context5.next) {
|
|
@@ -164,16 +154,12 @@ var WatchFeature = /*#__PURE__*/function (_AbstractFeature) {
|
|
|
164
154
|
return _context5.stop();
|
|
165
155
|
}
|
|
166
156
|
}, _callee5, this);
|
|
167
|
-
}));
|
|
168
|
-
|
|
169
|
-
return _fireChange.apply(this, arguments);
|
|
170
|
-
}
|
|
171
|
-
return fireChange;
|
|
172
|
-
}()
|
|
157
|
+
}))).apply(this, arguments);
|
|
158
|
+
}
|
|
173
159
|
}, {
|
|
174
160
|
key: "stopWatching",
|
|
175
|
-
value: function () {
|
|
176
|
-
|
|
161
|
+
value: function stopWatching() {
|
|
162
|
+
return (_stopWatching = _stopWatching || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
|
|
177
163
|
var _this$watcher;
|
|
178
164
|
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
179
165
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -186,12 +172,8 @@ var WatchFeature = /*#__PURE__*/function (_AbstractFeature) {
|
|
|
186
172
|
return _context6.stop();
|
|
187
173
|
}
|
|
188
174
|
}, _callee6, this);
|
|
189
|
-
}));
|
|
190
|
-
|
|
191
|
-
return _stopWatching.apply(this, arguments);
|
|
192
|
-
}
|
|
193
|
-
return stopWatching;
|
|
194
|
-
}()
|
|
175
|
+
}))).apply(this, arguments);
|
|
176
|
+
}
|
|
195
177
|
}]);
|
|
196
178
|
return WatchFeature;
|
|
197
179
|
}(_AbstractFeature2["default"]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WatchFeature.js","names":["_path","_interopRequireDefault","require","_spruceSkillUtils","_chokidar","_AbstractFeature2","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","WatchFeature","_AbstractFeature","_inherits2","_super","_this","_classCallCheck2","_len","length","args","Array","_key","concat","_defineProperty2","_assertThisInitialized2","_createClass2","key","value","_isWatching","_asyncToGenerator2","_regenerator","mark","_callee","wrap","_callee$","_context","prev","next","abrupt","stop","isWatching","_startWatching","_callee4","options","_options$sourceDir","_this2","watchDir","startsWith","_callee4$","_context4","diskUtil","resolvePath","cwd","sourceDir","watcher","chokidar","watch","ignoreInitial","on","_ref","_callee3","action","path","_options$delay","_callee3$","_context3","changesSinceLastChange","push","schemaId","mapChokidarActionToSchemaId","version","values","mapChokidarActionToGeneratedAction","name","pathUtil","basename","timeoutId","clearTimeout","setTimeout","_callee2","_callee2$","_context2","fireChange","delay","_x2","_x3","startWatching","_x","search","map","add","addDir","change","unlink","unlinkDir","_fireChange","_callee5","changes","_callee5$","_context5","emitter","emitAndFlattenResponses","_stopWatching","_callee6","_this$watcher","_callee6$","_context6","close","stopWatching","AbstractFeature","exports"],"sources":["../../../src/features/watch/WatchFeature.ts"],"sourcesContent":["import pathUtil from 'path'\nimport { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport chokidar from 'chokidar'\nimport { GeneratedFile, GeneratedFileOrDir } from '../../types/cli.types'\nimport AbstractFeature from '../AbstractFeature'\nimport { FeatureCode } from '../features.types'\n\ntype ChokidarAction = 'add' | 'addDir' | 'change' | 'unlink' | 'unlinkDir'\n\ndeclare module '../../features/features.types' {\n\tinterface FeatureMap {\n\t\twatch: WatchFeature\n\t}\n\n\tinterface FeatureOptionsMap {\n\t\twatch: undefined\n\t}\n}\n\nexport default class WatchFeature extends AbstractFeature {\n\tpublic description =\n\t\t'Watches for changes on the file system and emits app level events for other features to respond to.'\n\tpublic code: FeatureCode = 'watch'\n\tpublic nameReadable = 'Watch'\n\n\tprivate _isWatching = false\n\tprivate watcher?: chokidar.FSWatcher\n\t// eslint-disable-next-line no-undef\n\tprivate timeoutId?: NodeJS.Timeout\n\tprivate changesSinceLastChange: GeneratedFileOrDir[] = []\n\n\tpublic async isWatching() {\n\t\treturn this._isWatching\n\t}\n\n\tpublic async startWatching(options?: { delay?: number; sourceDir?: string }) {\n\t\tthis._isWatching = true\n\n\t\tconst watchDir = diskUtil.resolvePath(this.cwd, options?.sourceDir ?? '')\n\n\t\tthis.watcher = chokidar.watch(watchDir, {\n\t\t\tignoreInitial: true,\n\t\t})\n\n\t\tconst startsWith = diskUtil.resolvePath(watchDir, 'build')\n\n\t\tthis.watcher.on('all', async (action, path) => {\n\t\t\tif (path.startsWith(startsWith)) {\n\t\t\t\tthis.changesSinceLastChange.push({\n\t\t\t\t\tschemaId: this.mapChokidarActionToSchemaId(action),\n\t\t\t\t\tversion: 'v2020_07_22',\n\t\t\t\t\tvalues: {\n\t\t\t\t\t\taction: this.mapChokidarActionToGeneratedAction(action),\n\t\t\t\t\t\tpath,\n\t\t\t\t\t\tname: pathUtil.basename(path),\n\t\t\t\t\t},\n\t\t\t\t})\n\n\t\t\t\tif (this.timeoutId) {\n\t\t\t\t\tclearTimeout(this.timeoutId)\n\t\t\t\t}\n\n\t\t\t\tthis.timeoutId = setTimeout(\n\t\t\t\t\tasync () => {\n\t\t\t\t\t\tawait this.fireChange()\n\t\t\t\t\t},\n\t\t\t\t\toptions?.delay ?? 500\n\t\t\t\t)\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate mapChokidarActionToSchemaId(\n\t\taction: ChokidarAction\n\t): GeneratedFileOrDir['schemaId'] {\n\t\treturn action.search(/dir/gi) > -1 ? 'generatedDir' : 'generatedFile'\n\t}\n\n\tprivate mapChokidarActionToGeneratedAction(chokidar: ChokidarAction) {\n\t\tconst map = {\n\t\t\tadd: 'generated',\n\t\t\taddDir: 'generated',\n\t\t\tchange: 'updated',\n\t\t\tunlink: 'deleted',\n\t\t\tunlinkDir: 'deleted',\n\t\t}\n\n\t\treturn map[chokidar] as GeneratedFile['action']\n\t}\n\n\tprivate async fireChange() {\n\t\tconst changes = this.changesSinceLastChange\n\t\tthis.changesSinceLastChange = []\n\n\t\tawait this.emitter.emitAndFlattenResponses('watcher.did-detect-change', {\n\t\t\tchanges,\n\t\t})\n\t}\n\n\tpublic async stopWatching() {\n\t\tthis._isWatching = false\n\t\tawait this.watcher?.close()\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAAG,iBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAgD,SAAAI,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,aAAAL,OAAA,GAAAM,MAAA,MAAAL,yBAAA,QAAAM,SAAA,OAAAF,gBAAA,mBAAAG,WAAA,EAAAF,MAAA,GAAAG,OAAA,CAAAC,SAAA,CAAAN,KAAA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,IAAI,CAAC/B,sBAAsB;cAC3C,IAAI,CAACA,sBAAsB,GAAG,EAAE;cAAAiC,SAAA,CAAA9D,IAAA;cAAA,OAE1B,IAAI,CAAC+D,OAAO,CAACC,uBAAuB,CAAC,2BAA2B,EAAE;gBACvEJ,OAAO,EAAPA;cACD,CAAC,CAAC;YAAA;YAAA;cAAA,OAAAE,SAAA,CAAA5D,IAAA;UAAA;QAAA,GAAAyD,QAAA;MAAA,CACF;MAAA,SAAAd,WAAA;QAAA,OAAAa,WAAA,CAAA7F,KAAA,OAAAD,SAAA;MAAA;MAAA,OAAAiF,UAAA;IAAA;EAAA;IAAAxD,GAAA;IAAAC,KAAA;MAAA,IAAA2E,aAAA,OAAAzE,kBAAA,2BAAAC,YAAA,YAAAC,IAAA,CAED,SAAAwE,SAAA;QAAA,IAAAC,aAAA;QAAA,OAAA1E,YAAA,YAAAG,IAAA,UAAAwE,UAAAC,SAAA;UAAA,kBAAAA,SAAA,CAAAtE,IAAA,GAAAsE,SAAA,CAAArE,IAAA;YAAA;cACC,IAAI,CAACT,WAAW,GAAG,KAAK;cAAA8E,SAAA,CAAArE,IAAA;cAAA,QAAAmE,aAAA,GAClB,IAAI,CAAClD,OAAO,cAAAkD,aAAA,uBAAZA,aAAA,CAAcG,KAAK,CAAC,CAAC;YAAA;YAAA;cAAA,OAAAD,SAAA,CAAAnE,IAAA;UAAA;QAAA,GAAAgE,QAAA;MAAA,CAC3B;MAAA,SAAAK,aAAA;QAAA,OAAAN,aAAA,CAAApG,KAAA,OAAAD,SAAA;MAAA;MAAA,OAAA2G,YAAA;IAAA;EAAA;EAAA,OAAAjG,YAAA;AAAA,EAnFwCkG,4BAAe;AAAAC,OAAA,cAAAnG,YAAA"}
|
|
1
|
+
{"version":3,"file":"WatchFeature.js","names":["_path","_interopRequireDefault","require","_spruceSkillUtils","_chokidar","_AbstractFeature2","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","WatchFeature","_AbstractFeature","_isWatching","_startWatching","_fireChange","_stopWatching","_inherits2","_super","_this","_classCallCheck2","_len","length","args","Array","_key","concat","_defineProperty2","_assertThisInitialized2","_createClass2","key","value","isWatching","_asyncToGenerator2","_regenerator","mark","_callee","wrap","_callee$","_context","prev","next","abrupt","stop","startWatching","_x","_callee4","options","_options$sourceDir","_this2","_ref","watchDir","startsWith","_callee4$","_context4","diskUtil","resolvePath","cwd","sourceDir","watcher","chokidar","watch","ignoreInitial","on","_x2","_x3","_callee3","action","path","_options$delay","_callee3$","_context3","changesSinceLastChange","push","schemaId","mapChokidarActionToSchemaId","version","values","mapChokidarActionToGeneratedAction","name","pathUtil","basename","timeoutId","clearTimeout","setTimeout","_callee2","_callee2$","_context2","fireChange","delay","search","map","add","addDir","change","unlink","unlinkDir","_callee5","changes","_callee5$","_context5","emitter","emitAndFlattenResponses","stopWatching","_callee6","_this$watcher","_callee6$","_context6","close","AbstractFeature","exports"],"sources":["../../../src/features/watch/WatchFeature.ts"],"sourcesContent":["import pathUtil from 'path'\nimport { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport chokidar from 'chokidar'\nimport { GeneratedFile, GeneratedFileOrDir } from '../../types/cli.types'\nimport AbstractFeature from '../AbstractFeature'\nimport { FeatureCode } from '../features.types'\n\ntype ChokidarAction = 'add' | 'addDir' | 'change' | 'unlink' | 'unlinkDir'\n\ndeclare module '../../features/features.types' {\n\tinterface FeatureMap {\n\t\twatch: WatchFeature\n\t}\n\n\tinterface FeatureOptionsMap {\n\t\twatch: undefined\n\t}\n}\n\nexport default class WatchFeature extends AbstractFeature {\n\tpublic description =\n\t\t'Watches for changes on the file system and emits app level events for other features to respond to.'\n\tpublic code: FeatureCode = 'watch'\n\tpublic nameReadable = 'Watch'\n\n\tprivate _isWatching = false\n\tprivate watcher?: chokidar.FSWatcher\n\t// eslint-disable-next-line no-undef\n\tprivate timeoutId?: NodeJS.Timeout\n\tprivate changesSinceLastChange: GeneratedFileOrDir[] = []\n\n\tpublic async isWatching() {\n\t\treturn this._isWatching\n\t}\n\n\tpublic async startWatching(options?: { delay?: number; sourceDir?: string }) {\n\t\tthis._isWatching = true\n\n\t\tconst watchDir = diskUtil.resolvePath(this.cwd, options?.sourceDir ?? '')\n\n\t\tthis.watcher = chokidar.watch(watchDir, {\n\t\t\tignoreInitial: true,\n\t\t})\n\n\t\tconst startsWith = diskUtil.resolvePath(watchDir, 'build')\n\n\t\tthis.watcher.on('all', async (action, path) => {\n\t\t\tif (path.startsWith(startsWith)) {\n\t\t\t\tthis.changesSinceLastChange.push({\n\t\t\t\t\tschemaId: this.mapChokidarActionToSchemaId(action),\n\t\t\t\t\tversion: 'v2020_07_22',\n\t\t\t\t\tvalues: {\n\t\t\t\t\t\taction: this.mapChokidarActionToGeneratedAction(action),\n\t\t\t\t\t\tpath,\n\t\t\t\t\t\tname: pathUtil.basename(path),\n\t\t\t\t\t},\n\t\t\t\t})\n\n\t\t\t\tif (this.timeoutId) {\n\t\t\t\t\tclearTimeout(this.timeoutId)\n\t\t\t\t}\n\n\t\t\t\tthis.timeoutId = setTimeout(\n\t\t\t\t\tasync () => {\n\t\t\t\t\t\tawait this.fireChange()\n\t\t\t\t\t},\n\t\t\t\t\toptions?.delay ?? 500\n\t\t\t\t)\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate mapChokidarActionToSchemaId(\n\t\taction: ChokidarAction\n\t): GeneratedFileOrDir['schemaId'] {\n\t\treturn action.search(/dir/gi) > -1 ? 'generatedDir' : 'generatedFile'\n\t}\n\n\tprivate mapChokidarActionToGeneratedAction(chokidar: ChokidarAction) {\n\t\tconst map = {\n\t\t\tadd: 'generated',\n\t\t\taddDir: 'generated',\n\t\t\tchange: 'updated',\n\t\t\tunlink: 'deleted',\n\t\t\tunlinkDir: 'deleted',\n\t\t}\n\n\t\treturn map[chokidar] as GeneratedFile['action']\n\t}\n\n\tprivate async fireChange() {\n\t\tconst changes = this.changesSinceLastChange\n\t\tthis.changesSinceLastChange = []\n\n\t\tawait this.emitter.emitAndFlattenResponses('watcher.did-detect-change', {\n\t\t\tchanges,\n\t\t})\n\t}\n\n\tpublic async stopWatching() {\n\t\tthis._isWatching = false\n\t\tawait this.watcher?.close()\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAAG,iBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAgD,SAAAI,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,aAAAL,OAAA,GAAAM,MAAA,MAAAL,yBAAA,QAAAM,SAAA,OAAAF,gBAAA,mBAAAG,WAAA,EAAAF,MAAA,GAAAG,OAAA,CAAAC,SAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAJ,SAAA,YAAAD,MAAA,GAAAF,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,mBAAAP,MAAA;AAAA,SAAAJ,0BAAA,eAAAO,OAAA,qBAAAA,OAAA,CAAAC,SAAA,oBAAAD,OAAA,CAAAC,SAAA,CAAAI,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAV,OAAA,CAAAC,SAAA,CAAAM,OAAA,8CAAAI,CAAA;AAAA,IAe3BC,YAAY,0BAAAC,gBAAA,EAAAC,WAAA,EAAAC,cAAA,EAAAC,WAAA,EAAAC,aAAA;EAAA,IAAAC,UAAA,aAAAN,YAAA,EAAAC,gBAAA;EAAA,IAAAM,MAAA,GAAA7B,YAAA,CAAAsB,YAAA;EAAA,SAAAA,aAAA;IAAA,IAAAQ,KAAA;IAAA,IAA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AAmE,SAAA,CAAAlE,IAAA;YAAA;cACC,IAAI,CAAC5B,WAAW,GAAG,KAAK;cAAA8F,SAAA,CAAAlE,IAAA;cAAA,QAAAgE,aAAA,GAClB,IAAI,CAAC9C,OAAO,cAAA8C,aAAA,uBAAZA,aAAA,CAAcG,KAAK,CAAC,CAAC;YAAA;YAAA;cAAA,OAAAD,SAAA,CAAAhE,IAAA;UAAA;QAAA,GAAA6D,QAAA;MAAA,CAC3B,IAAAtG,KAAA,OAAAD,SAAA;IAAA;EAAA;EAAA,OAAAU,YAAA;AAAA,EAnFwCkG,4BAAe;AAAAC,OAAA,cAAAnG,YAAA"}
|
|
@@ -15,7 +15,7 @@ var _testUtils = require("@sprucelabs/test-utils");
|
|
|
15
15
|
var _test = _interopRequireDefault(require("../tests/utilities/test.utility"));
|
|
16
16
|
var _duration = _interopRequireDefault(require("../utilities/duration.utility"));
|
|
17
17
|
var _TerminalInterface = _interopRequireDefault(require("./TerminalInterface"));
|
|
18
|
-
var SpyInterface = /*#__PURE__*/function () {
|
|
18
|
+
var SpyInterface = /*#__PURE__*/function (_sendInput, _renderImage, _prompt, _waitForEnter, _waitForInput, _getCursorPosition) {
|
|
19
19
|
function SpyInterface() {
|
|
20
20
|
var _this = this;
|
|
21
21
|
(0, _classCallCheck2["default"])(this, SpyInterface);
|
|
@@ -103,8 +103,8 @@ var SpyInterface = /*#__PURE__*/function () {
|
|
|
103
103
|
}
|
|
104
104
|
}, {
|
|
105
105
|
key: "sendInput",
|
|
106
|
-
value: function () {
|
|
107
|
-
|
|
106
|
+
value: function sendInput(_x) {
|
|
107
|
+
return (_sendInput = _sendInput || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(input) {
|
|
108
108
|
var resolver, _resolver, _resolver2;
|
|
109
109
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
110
110
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -151,12 +151,8 @@ var SpyInterface = /*#__PURE__*/function () {
|
|
|
151
151
|
return _context.stop();
|
|
152
152
|
}
|
|
153
153
|
}, _callee, this);
|
|
154
|
-
}));
|
|
155
|
-
|
|
156
|
-
return _sendInput.apply(this, arguments);
|
|
157
|
-
}
|
|
158
|
-
return sendInput;
|
|
159
|
-
}()
|
|
154
|
+
}))).apply(this, arguments);
|
|
155
|
+
}
|
|
160
156
|
}, {
|
|
161
157
|
key: "renderSection",
|
|
162
158
|
value: function renderSection(options) {
|
|
@@ -243,8 +239,8 @@ var SpyInterface = /*#__PURE__*/function () {
|
|
|
243
239
|
}
|
|
244
240
|
}, {
|
|
245
241
|
key: "renderImage",
|
|
246
|
-
value: function () {
|
|
247
|
-
|
|
242
|
+
value: function renderImage(_x2, _x3) {
|
|
243
|
+
return (_renderImage = _renderImage || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(path, options) {
|
|
248
244
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
249
245
|
while (1) switch (_context2.prev = _context2.next) {
|
|
250
246
|
case 0:
|
|
@@ -257,12 +253,8 @@ var SpyInterface = /*#__PURE__*/function () {
|
|
|
257
253
|
return _context2.stop();
|
|
258
254
|
}
|
|
259
255
|
}, _callee2, this);
|
|
260
|
-
}));
|
|
261
|
-
|
|
262
|
-
return _renderImage.apply(this, arguments);
|
|
263
|
-
}
|
|
264
|
-
return renderImage;
|
|
265
|
-
}()
|
|
256
|
+
}))).apply(this, arguments);
|
|
257
|
+
}
|
|
266
258
|
}, {
|
|
267
259
|
key: "renderLines",
|
|
268
260
|
value: function renderLines(messages, effects) {
|
|
@@ -275,8 +267,8 @@ var SpyInterface = /*#__PURE__*/function () {
|
|
|
275
267
|
}
|
|
276
268
|
}, {
|
|
277
269
|
key: "prompt",
|
|
278
|
-
value: function () {
|
|
279
|
-
|
|
270
|
+
value: function prompt(_x4) {
|
|
271
|
+
return (_prompt = _prompt || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(definition) {
|
|
280
272
|
var _this2 = this;
|
|
281
273
|
var msg;
|
|
282
274
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
@@ -319,12 +311,8 @@ var SpyInterface = /*#__PURE__*/function () {
|
|
|
319
311
|
return _context3.stop();
|
|
320
312
|
}
|
|
321
313
|
}, _callee3, this);
|
|
322
|
-
}));
|
|
323
|
-
|
|
324
|
-
return _prompt.apply(this, arguments);
|
|
325
|
-
}
|
|
326
|
-
return prompt;
|
|
327
|
-
}()
|
|
314
|
+
}))).apply(this, arguments);
|
|
315
|
+
}
|
|
328
316
|
}, {
|
|
329
317
|
key: "startLoading",
|
|
330
318
|
value: function startLoading(message) {
|
|
@@ -339,8 +327,8 @@ var SpyInterface = /*#__PURE__*/function () {
|
|
|
339
327
|
}
|
|
340
328
|
}, {
|
|
341
329
|
key: "waitForEnter",
|
|
342
|
-
value: function () {
|
|
343
|
-
|
|
330
|
+
value: function waitForEnter(_x5) {
|
|
331
|
+
return (_waitForEnter = _waitForEnter || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(message) {
|
|
344
332
|
var _this3 = this;
|
|
345
333
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
346
334
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -355,16 +343,12 @@ var SpyInterface = /*#__PURE__*/function () {
|
|
|
355
343
|
return _context4.stop();
|
|
356
344
|
}
|
|
357
345
|
}, _callee4, this);
|
|
358
|
-
}));
|
|
359
|
-
|
|
360
|
-
return _waitForEnter.apply(this, arguments);
|
|
361
|
-
}
|
|
362
|
-
return waitForEnter;
|
|
363
|
-
}()
|
|
346
|
+
}))).apply(this, arguments);
|
|
347
|
+
}
|
|
364
348
|
}, {
|
|
365
349
|
key: "waitForInput",
|
|
366
|
-
value: function () {
|
|
367
|
-
|
|
350
|
+
value: function waitForInput() {
|
|
351
|
+
return (_waitForInput = _waitForInput || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
|
368
352
|
var ttl, checkInterval, loops, lastWriteCount, hasWritten;
|
|
369
353
|
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
370
354
|
while (1) switch (_context5.prev = _context5.next) {
|
|
@@ -407,12 +391,8 @@ var SpyInterface = /*#__PURE__*/function () {
|
|
|
407
391
|
return _context5.stop();
|
|
408
392
|
}
|
|
409
393
|
}, _callee5, this);
|
|
410
|
-
}));
|
|
411
|
-
|
|
412
|
-
return _waitForInput.apply(this, arguments);
|
|
413
|
-
}
|
|
414
|
-
return waitForInput;
|
|
415
|
-
}()
|
|
394
|
+
}))).apply(this, arguments);
|
|
395
|
+
}
|
|
416
396
|
}, {
|
|
417
397
|
key: "confirm",
|
|
418
398
|
value: function confirm(question) {
|
|
@@ -447,8 +427,8 @@ var SpyInterface = /*#__PURE__*/function () {
|
|
|
447
427
|
}
|
|
448
428
|
}, {
|
|
449
429
|
key: "getCursorPosition",
|
|
450
|
-
value: function () {
|
|
451
|
-
|
|
430
|
+
value: function getCursorPosition() {
|
|
431
|
+
return (_getCursorPosition = _getCursorPosition || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
|
|
452
432
|
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
453
433
|
while (1) switch (_context6.prev = _context6.next) {
|
|
454
434
|
case 0:
|
|
@@ -459,12 +439,8 @@ var SpyInterface = /*#__PURE__*/function () {
|
|
|
459
439
|
return _context6.stop();
|
|
460
440
|
}
|
|
461
441
|
}, _callee6, this);
|
|
462
|
-
}));
|
|
463
|
-
|
|
464
|
-
return _getCursorPosition.apply(this, arguments);
|
|
465
|
-
}
|
|
466
|
-
return getCursorPosition;
|
|
467
|
-
}()
|
|
442
|
+
}))).apply(this, arguments);
|
|
443
|
+
}
|
|
468
444
|
}, {
|
|
469
445
|
key: "setCursorPosition",
|
|
470
446
|
value: function setCursorPosition(pos) {
|