@sprucelabs/spruce-cli 17.1.40 → 17.1.41
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 +8 -0
- package/build/__tests__/behavioral/AddingADependency.test.js +10 -12
- package/build/__tests__/behavioral/AddingADependency.test.js.map +1 -1
- package/build/__tests__/behavioral/BlockingCommands.test.js +3 -5
- package/build/__tests__/behavioral/BlockingCommands.test.js.map +1 -1
- package/build/__tests__/behavioral/BootingTheCli.test.js +3 -3
- package/build/__tests__/behavioral/BootingTheCli.test.js.map +1 -1
- package/build/__tests__/behavioral/BootingWithBadFiles.test.js +7 -7
- package/build/__tests__/behavioral/BootingWithBadFiles.test.js.map +1 -1
- package/build/__tests__/behavioral/CreatingAConversationTopic.test.js +13 -13
- package/build/__tests__/behavioral/CreatingAConversationTopic.test.js.map +1 -1
- package/build/__tests__/behavioral/CreatingSchemasWithGenerics.test.js +10 -10
- package/build/__tests__/behavioral/CreatingSchemasWithGenerics.test.js.map +1 -1
- package/build/__tests__/behavioral/DeployingASkill.test.js +32 -34
- package/build/__tests__/behavioral/DeployingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/DeployingToSandbox.test.js +15 -17
- package/build/__tests__/behavioral/DeployingToSandbox.test.js.map +1 -1
- package/build/__tests__/behavioral/EnablingAndDisablingCache.test.js +11 -13
- package/build/__tests__/behavioral/EnablingAndDisablingCache.test.js.map +1 -1
- package/build/__tests__/behavioral/GettingCliVersion.test.js +4 -4
- package/build/__tests__/behavioral/GettingCliVersion.test.js.map +1 -1
- package/build/__tests__/behavioral/InstallingASkillAtAnOrg.test.js +11 -13
- package/build/__tests__/behavioral/InstallingASkillAtAnOrg.test.js.map +1 -1
- package/build/__tests__/behavioral/ListeningToCoreEvents.test.js +4 -4
- package/build/__tests__/behavioral/ListeningToCoreEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/LoggingInAsASkill.test.js +14 -16
- package/build/__tests__/behavioral/LoggingInAsASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/ManagingDependencies.test.js +9 -9
- package/build/__tests__/behavioral/ManagingDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/OverridingCommandsInPackageJson.test.js +3 -3
- package/build/__tests__/behavioral/OverridingCommandsInPackageJson.test.js.map +1 -1
- package/build/__tests__/behavioral/RebuildingASkill.test.js +4 -6
- package/build/__tests__/behavioral/RebuildingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/RegisteringConversationsOnBoot.test.js +4 -4
- package/build/__tests__/behavioral/RegisteringConversationsOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/RegisteringEventsOnBoot.test.js +7 -7
- package/build/__tests__/behavioral/RegisteringEventsOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/RegisteringGlobalEvents.test.js +11 -11
- package/build/__tests__/behavioral/RegisteringGlobalEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/RegisteringSkillViewOnBoot.test.js +6 -6
- package/build/__tests__/behavioral/RegisteringSkillViewOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/RememberingUpgradeSelections.test.js +5 -5
- package/build/__tests__/behavioral/RememberingUpgradeSelections.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingLogTransportsInASkill.test.js +10 -12
- package/build/__tests__/behavioral/SettingLogTransportsInASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingRemote.test.js +9 -9
- package/build/__tests__/behavioral/SettingRemote.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingUpASkillForTesting.test.js +10 -10
- package/build/__tests__/behavioral/SettingUpASkillForTesting.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingUpSchemasForModuleDistribution.test.js +29 -31
- package/build/__tests__/behavioral/SettingUpSchemasForModuleDistribution.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingUpVscode.test.js +10 -10
- package/build/__tests__/behavioral/SettingUpVscode.test.js.map +1 -1
- package/build/__tests__/behavioral/SyncingEventsOnlyFromDependencies.test.js +13 -13
- package/build/__tests__/behavioral/SyncingEventsOnlyFromDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/TestReporterSettingsRemembered.test.js +6 -6
- package/build/__tests__/behavioral/TestReporterSettingsRemembered.test.js.map +1 -1
- package/build/__tests__/behavioral/TestingAConversation.test.js +17 -17
- package/build/__tests__/behavioral/TestingAConversation.test.js.map +1 -1
- package/build/__tests__/behavioral/TestingDataStores.test.js +13 -13
- package/build/__tests__/behavioral/TestingDataStores.test.js.map +1 -1
- package/build/__tests__/behavioral/WatchingSkillViews.test.js +15 -15
- package/build/__tests__/behavioral/WatchingSkillViews.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/CreatingANewErrorBuilder.test.js +15 -15
- package/build/__tests__/behavioral/errors/CreatingANewErrorBuilder.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/KeepingErrorClassInSync.test.js +8 -8
- package/build/__tests__/behavioral/errors/KeepingErrorClassInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/KeepingErrorsInSync.test.js +32 -32
- package/build/__tests__/behavioral/errors/KeepingErrorsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/SettingUpErrors.test.js +4 -6
- package/build/__tests__/behavioral/errors/SettingUpErrors.test.js.map +1 -1
- package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js +25 -25
- package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js.map +1 -1
- package/build/__tests__/behavioral/events/CreatingAListener.test.js +29 -31
- package/build/__tests__/behavioral/events/CreatingAListener.test.js.map +1 -1
- package/build/__tests__/behavioral/events/CreatingAnEvent.test.js +26 -28
- package/build/__tests__/behavioral/events/CreatingAnEvent.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingEventsInSync.test.js +22 -22
- package/build/__tests__/behavioral/events/KeepingEventsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingEventsInSync2.test.js +38 -38
- package/build/__tests__/behavioral/events/KeepingEventsInSync2.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingListenersInSync.test.js +7 -7
- package/build/__tests__/behavioral/events/KeepingListenersInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/events/ListeningToAnEventYouCreate.test.js +6 -6
- package/build/__tests__/behavioral/events/ListeningToAnEventYouCreate.test.js.map +1 -1
- package/build/__tests__/behavioral/events/SettingUpEvents.test.js +4 -4
- package/build/__tests__/behavioral/events/SettingUpEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.js +3 -5
- package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/node/CreatingANodeModule.test.js +6 -6
- package/build/__tests__/behavioral/node/CreatingANodeModule.test.js.map +1 -1
- package/build/__tests__/behavioral/onboard/StartingOnboarding.test.js +6 -6
- package/build/__tests__/behavioral/onboard/StartingOnboarding.test.js.map +1 -1
- package/build/__tests__/behavioral/organization/CreatingAnOrg.test.js +6 -6
- package/build/__tests__/behavioral/organization/CreatingAnOrg.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/CreatingPermissions.test.js +3 -3
- package/build/__tests__/behavioral/permissions/CreatingPermissions.test.js.map +1 -1
- package/build/__tests__/behavioral/person/LoggingInAsPerson.test.js +14 -16
- package/build/__tests__/behavioral/person/LoggingInAsPerson.test.js.map +1 -1
- package/build/__tests__/behavioral/person/SeeWhoIsLoggedIn.test.js +7 -7
- package/build/__tests__/behavioral/person/SeeWhoIsLoggedIn.test.js.map +1 -1
- package/build/__tests__/behavioral/polish/SettingUpPolish.test.js +8 -8
- package/build/__tests__/behavioral/polish/SettingUpPolish.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/CreatingANewSchemaBuilder.test.js +23 -25
- package/build/__tests__/behavioral/schemas/CreatingANewSchemaBuilder.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.js +7 -7
- package/build/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.js +6 -6
- package/build/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.js +18 -18
- package/build/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/ImportingSchemaImports.test.js +7 -7
- package/build/__tests__/behavioral/schemas/ImportingSchemaImports.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/KeepingSchemasInSync.test.js +62 -64
- package/build/__tests__/behavioral/schemas/KeepingSchemasInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/SettingUpSchemas.test.js +6 -8
- package/build/__tests__/behavioral/schemas/SettingUpSchemas.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/SyncingBadSchemasProvidesHelpfulErrorMessages.test.js +4 -6
- package/build/__tests__/behavioral/schemas/SyncingBadSchemasProvidesHelpfulErrorMessages.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/UsingSchemasInCli.test.d.ts +1 -1
- package/build/__tests__/behavioral/schemas/UsingSchemasInCli.test.js +4 -4
- package/build/__tests__/behavioral/schemas/UsingSchemasInCli.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/BootingASkill.test.js +12 -12
- package/build/__tests__/behavioral/skill/BootingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/CreatingASkill.test.js +5 -5
- package/build/__tests__/behavioral/skill/CreatingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/RegisteringASkill.test.js +12 -14
- package/build/__tests__/behavioral/skill/RegisteringASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/SettingUpASkill.test.js +29 -29
- package/build/__tests__/behavioral/skill/SettingUpASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/stores/CreatingADataStore.test.js +26 -28
- package/build/__tests__/behavioral/stores/CreatingADataStore.test.js.map +1 -1
- package/build/__tests__/behavioral/stores/KeepingDataStoresInSync.test.js +8 -10
- package/build/__tests__/behavioral/stores/KeepingDataStoresInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/CreatingATest.test.js +10 -10
- package/build/__tests__/behavioral/tests/CreatingATest.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/RunningTests.test.js +8 -10
- package/build/__tests__/behavioral/tests/RunningTests.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js +17 -17
- package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/SettingUpTests.test.js +3 -5
- package/build/__tests__/behavioral/tests/SettingUpTests.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies.test.js +8 -8
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies2.test.js +7 -7
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies2.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingANodeModule.test.js +6 -6
- package/build/__tests__/behavioral/upgrading/UpgradingANodeModule.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill.test.js +15 -15
- package/build/__tests__/behavioral/upgrading/UpgradingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill2.test.js +24 -24
- package/build/__tests__/behavioral/upgrading/UpgradingASkill2.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill3.test.js +22 -22
- package/build/__tests__/behavioral/upgrading/UpgradingASkill3.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill4.test.js +10 -10
- package/build/__tests__/behavioral/upgrading/UpgradingASkill4.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill5.test.js +9 -9
- package/build/__tests__/behavioral/upgrading/UpgradingASkill5.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingWithListeners.test.js +4 -4
- package/build/__tests__/behavioral/upgrading/UpgradingWithListeners.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingWithSandboxFeatureInstalled.test.js +9 -9
- package/build/__tests__/behavioral/upgrading/UpgradingWithSandboxFeatureInstalled.test.js.map +1 -1
- package/build/__tests__/behavioral/views/CreatingASkillView.test.js +28 -30
- package/build/__tests__/behavioral/views/CreatingASkillView.test.js.map +1 -1
- package/build/__tests__/behavioral/views/CreatingATheme.test.js +9 -11
- package/build/__tests__/behavioral/views/CreatingATheme.test.js.map +1 -1
- package/build/__tests__/behavioral/views/KeepingViewsInSync.test.js +8 -8
- package/build/__tests__/behavioral/views/KeepingViewsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/views/SettingUpViews.test.js +5 -5
- package/build/__tests__/behavioral/views/SettingUpViews.test.js.map +1 -1
- package/build/__tests__/behavioral/views/TestingViewControllers.test.js +12 -12
- package/build/__tests__/behavioral/views/TestingViewControllers.test.js.map +1 -1
- package/build/__tests__/behavioral/watchers/WatchingForChanges.test.js +10 -10
- package/build/__tests__/behavioral/watchers/WatchingForChanges.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter.test.js +5 -5
- package/build/__tests__/implementation/ActionExecuter.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter2.test.js +30 -30
- package/build/__tests__/implementation/ActionExecuter2.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter3.test.js +3 -5
- package/build/__tests__/implementation/ActionExecuter3.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter4.test.js +2 -4
- package/build/__tests__/implementation/ActionExecuter4.test.js.map +1 -1
- package/build/__tests__/implementation/ArgParser.test.d.ts +1 -1
- package/build/__tests__/implementation/ArgParser.test.js +7 -7
- package/build/__tests__/implementation/ArgParser.test.js.map +1 -1
- package/build/__tests__/implementation/BuildService.test.js +4 -4
- package/build/__tests__/implementation/BuildService.test.js.map +1 -1
- package/build/__tests__/implementation/BulkImporting.test.d.ts +1 -1
- package/build/__tests__/implementation/BulkImporting.test.js +20 -22
- package/build/__tests__/implementation/BulkImporting.test.js.map +1 -1
- package/build/__tests__/implementation/CachingImports.test.js +3 -3
- package/build/__tests__/implementation/CachingImports.test.js.map +1 -1
- package/build/__tests__/implementation/CommandOptionBuilder.test.js +12 -12
- package/build/__tests__/implementation/CommandOptionBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/CommanderCommandResultMapper.test.d.ts +1 -1
- package/build/__tests__/implementation/CommanderCommandResultMapper.test.js +13 -13
- package/build/__tests__/implementation/CommanderCommandResultMapper.test.js.map +1 -1
- package/build/__tests__/implementation/DataStoreStore.test.js +16 -18
- package/build/__tests__/implementation/DataStoreStore.test.js.map +1 -1
- package/build/__tests__/implementation/DeletingOrphanedSchemaDefinitions.test.js +6 -6
- package/build/__tests__/implementation/DeletingOrphanedSchemaDefinitions.test.js.map +1 -1
- package/build/__tests__/implementation/EventContractCleanerUtil.test.d.ts +1 -1
- package/build/__tests__/implementation/EventContractCleanerUtil.test.js +7 -7
- package/build/__tests__/implementation/EventContractCleanerUtil.test.js.map +1 -1
- package/build/__tests__/implementation/EventStore.test.js +27 -29
- package/build/__tests__/implementation/EventStore.test.js.map +1 -1
- package/build/__tests__/implementation/EventTemplateItemBuilder.test.js +12 -12
- package/build/__tests__/implementation/EventTemplateItemBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/FeatureCommandAttacher.test.js +23 -23
- package/build/__tests__/implementation/FeatureCommandAttacher.test.js.map +1 -1
- package/build/__tests__/implementation/FeatureFixture.test.js +7 -7
- package/build/__tests__/implementation/FeatureFixture.test.js.map +1 -1
- package/build/__tests__/implementation/FeatureInstaller.test.js +8 -8
- package/build/__tests__/implementation/FeatureInstaller.test.js.map +1 -1
- package/build/__tests__/implementation/FeaturesUtil.test.d.ts +1 -1
- package/build/__tests__/implementation/FeaturesUtil.test.js +4 -4
- package/build/__tests__/implementation/FeaturesUtil.test.js.map +1 -1
- package/build/__tests__/implementation/FieldTemplateItemBuilder.test.js +11 -11
- package/build/__tests__/implementation/FieldTemplateItemBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/GlobalEmitter.js +3 -3
- package/build/__tests__/implementation/GlobalEmitter.js.map +1 -1
- package/build/__tests__/implementation/Introspection.test.js +4 -4
- package/build/__tests__/implementation/Introspection.test.js.map +1 -1
- package/build/__tests__/implementation/JestJsonParser.test.d.ts +1 -1
- package/build/__tests__/implementation/JestJsonParser.test.js +31 -31
- package/build/__tests__/implementation/JestJsonParser.test.js.map +1 -1
- package/build/__tests__/implementation/LintService.test.js +3 -3
- package/build/__tests__/implementation/LintService.test.js.map +1 -1
- package/build/__tests__/implementation/ListenerStore.test.js +3 -3
- package/build/__tests__/implementation/ListenerStore.test.js.map +1 -1
- package/build/__tests__/implementation/OnboardingScriptLoader.test.js +9 -9
- package/build/__tests__/implementation/OnboardingScriptLoader.test.js.map +1 -1
- package/build/__tests__/implementation/OnboardingScriptPlayer.test.js +17 -17
- package/build/__tests__/implementation/OnboardingScriptPlayer.test.js.map +1 -1
- package/build/__tests__/implementation/OnboardingStore.test.js +14 -14
- package/build/__tests__/implementation/OnboardingStore.test.js.map +1 -1
- package/build/__tests__/implementation/OrganizationStore.test.js +10 -10
- package/build/__tests__/implementation/OrganizationStore.test.js.map +1 -1
- package/build/__tests__/implementation/ParentTestFinder.test.js +6 -6
- package/build/__tests__/implementation/ParentTestFinder.test.js.map +1 -1
- package/build/__tests__/implementation/PkgService.test.js +8 -8
- package/build/__tests__/implementation/PkgService.test.js.map +1 -1
- package/build/__tests__/implementation/SchemaStore.test.js +30 -32
- package/build/__tests__/implementation/SchemaStore.test.js.map +1 -1
- package/build/__tests__/implementation/SchemaTemplateItemBuilder.test.js +10 -10
- package/build/__tests__/implementation/SchemaTemplateItemBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/SchemaValueTypeWriter.test.js +13 -13
- package/build/__tests__/implementation/SchemaValueTypeWriter.test.js.map +1 -1
- package/build/__tests__/implementation/ServiceFactory.test.js +3 -3
- package/build/__tests__/implementation/ServiceFactory.test.js.map +1 -1
- package/build/__tests__/implementation/SettingUpANodeModule.test.js +4 -6
- package/build/__tests__/implementation/SettingUpANodeModule.test.js.map +1 -1
- package/build/__tests__/implementation/SkillStore.test.js +25 -27
- package/build/__tests__/implementation/SkillStore.test.js.map +1 -1
- package/build/__tests__/implementation/StoreFeature.test.js +4 -4
- package/build/__tests__/implementation/StoreFeature.test.js.map +1 -1
- package/build/__tests__/implementation/TestReporter.test.js +5 -5
- package/build/__tests__/implementation/TestReporter.test.js.map +1 -1
- package/build/__tests__/implementation/TestRunner.test.js +23 -25
- package/build/__tests__/implementation/TestRunner.test.js.map +1 -1
- package/build/__tests__/implementation/ValueTypeMapping.test.js +4 -4
- package/build/__tests__/implementation/ValueTypeMapping.test.js.map +1 -1
- package/build/__tests__/implementation/Widgets.test.js +10 -10
- package/build/__tests__/implementation/Widgets.test.js.map +1 -1
- package/build/__tests__/testDirsAndFiles/abstract_tests/AbstractTest.d.ts +1 -1
- package/build/__tests__/testDirsAndFiles/abstract_tests/AbstractTest.ts +1 -1
- package/build/__tests__/testDirsAndFiles/abstract_tests/AbstractTest2.d.ts +1 -1
- package/build/__tests__/testDirsAndFiles/abstract_tests/AbstractTest2.ts +1 -1
- package/build/__tests__/testDirsAndFiles/abstract_tests/deeper/AbstractBananaTest.d.ts +1 -1
- package/build/__tests__/testDirsAndFiles/abstract_tests/deeper/AbstractBananaTest.ts +1 -1
- package/build/features/onboard/templates/ManagingTodos.test.ts.hbs +1 -1
- package/build/features/test/TestLogItemGenerator.js +2 -2
- package/build/features/test/TestLogItemGenerator.js.map +1 -1
- package/build/interfaces/SpyInterface.js +5 -5
- package/build/interfaces/SpyInterface.js.map +1 -1
- package/build/tests/AbstractCliTest.d.ts +1 -1
- package/build/tests/AbstractCliTest.js +11 -11
- package/build/tests/AbstractCliTest.js.map +1 -1
- package/build/tests/AbstractSchemaTest.js +4 -4
- package/build/tests/AbstractSchemaTest.js.map +1 -1
- package/build/tests/utilities/test.utility.js +6 -6
- package/build/tests/utilities/test.utility.js.map +1 -1
- package/build/tests/utilities/uiAssert.utility.js +6 -6
- package/build/tests/utilities/uiAssert.utility.js.map +1 -1
- package/package.json +5 -5
- package/src/__tests__/behavioral/AddingADependency.test.ts +1 -1
- package/src/__tests__/behavioral/BlockingCommands.test.ts +1 -1
- package/src/__tests__/behavioral/BootingTheCli.test.ts +1 -1
- package/src/__tests__/behavioral/BootingWithBadFiles.test.ts +1 -1
- package/src/__tests__/behavioral/CreatingAConversationTopic.test.ts +1 -1
- package/src/__tests__/behavioral/CreatingSchemasWithGenerics.test.ts +1 -1
- package/src/__tests__/behavioral/DeployingASkill.test.ts +1 -1
- package/src/__tests__/behavioral/DeployingToSandbox.test.ts +1 -1
- package/src/__tests__/behavioral/EnablingAndDisablingCache.test.ts +1 -1
- package/src/__tests__/behavioral/GettingCliVersion.test.ts +1 -1
- package/src/__tests__/behavioral/InstallingASkillAtAnOrg.test.ts +1 -1
- package/src/__tests__/behavioral/ListeningToCoreEvents.test.ts +1 -1
- package/src/__tests__/behavioral/LoggingInAsASkill.test.ts +1 -1
- package/src/__tests__/behavioral/ManagingDependencies.test.ts +1 -1
- package/src/__tests__/behavioral/OverridingCommandsInPackageJson.test.ts +1 -1
- package/src/__tests__/behavioral/RebuildingASkill.test.ts +1 -1
- package/src/__tests__/behavioral/RegisteringConversationsOnBoot.test.ts +1 -1
- package/src/__tests__/behavioral/RegisteringEventsOnBoot.test.ts +1 -1
- package/src/__tests__/behavioral/RegisteringGlobalEvents.test.ts +1 -1
- package/src/__tests__/behavioral/RegisteringSkillViewOnBoot.test.ts +1 -1
- package/src/__tests__/behavioral/RememberingUpgradeSelections.test.ts +1 -1
- package/src/__tests__/behavioral/SettingLogTransportsInASkill.test.ts +1 -1
- package/src/__tests__/behavioral/SettingRemote.test.ts +1 -1
- package/src/__tests__/behavioral/SettingUpASkillForTesting.test.ts +1 -1
- package/src/__tests__/behavioral/SettingUpSchemasForModuleDistribution.test.ts +1 -1
- package/src/__tests__/behavioral/SettingUpVscode.test.ts +1 -1
- package/src/__tests__/behavioral/SyncingEventsOnlyFromDependencies.test.ts +1 -1
- package/src/__tests__/behavioral/TestReporterSettingsRemembered.test.ts +1 -1
- package/src/__tests__/behavioral/TestingAConversation.test.ts +1 -1
- package/src/__tests__/behavioral/TestingDataStores.test.ts +1 -1
- package/src/__tests__/behavioral/WatchingSkillViews.test.ts +1 -1
- package/src/__tests__/behavioral/errors/CreatingANewErrorBuilder.test.ts +1 -1
- package/src/__tests__/behavioral/errors/KeepingErrorClassInSync.test.ts +1 -1
- package/src/__tests__/behavioral/errors/KeepingErrorsInSync.test.ts +1 -1
- package/src/__tests__/behavioral/errors/SettingUpErrors.test.ts +1 -1
- package/src/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.ts +1 -1
- package/src/__tests__/behavioral/events/CreatingAListener.test.ts +1 -1
- package/src/__tests__/behavioral/events/CreatingAnEvent.test.ts +1 -1
- package/src/__tests__/behavioral/events/KeepingEventsInSync.test.ts +1 -1
- package/src/__tests__/behavioral/events/KeepingEventsInSync2.test.ts +1 -1
- package/src/__tests__/behavioral/events/KeepingListenersInSync.test.ts +1 -1
- package/src/__tests__/behavioral/events/ListeningToAnEventYouCreate.test.ts +1 -1
- package/src/__tests__/behavioral/events/SettingUpEvents.test.ts +1 -1
- package/src/__tests__/behavioral/events/SkillEmitsBootEvents.test.ts +1 -1
- package/src/__tests__/behavioral/node/CreatingANodeModule.test.ts +1 -1
- package/src/__tests__/behavioral/onboard/StartingOnboarding.test.ts +1 -1
- package/src/__tests__/behavioral/organization/CreatingAnOrg.test.ts +1 -1
- package/src/__tests__/behavioral/permissions/CreatingPermissions.test.ts +1 -1
- package/src/__tests__/behavioral/person/LoggingInAsPerson.test.ts +1 -1
- package/src/__tests__/behavioral/person/SeeWhoIsLoggedIn.test.ts +1 -1
- package/src/__tests__/behavioral/polish/SettingUpPolish.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/CreatingANewSchemaBuilder.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/ImportingSchemaImports.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/KeepingSchemasInSync.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/SettingUpSchemas.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/SyncingBadSchemasProvidesHelpfulErrorMessages.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/UsingSchemasInCli.test.ts +1 -1
- package/src/__tests__/behavioral/skill/BootingASkill.test.ts +1 -1
- package/src/__tests__/behavioral/skill/CreatingASkill.test.ts +1 -1
- package/src/__tests__/behavioral/skill/RegisteringASkill.test.ts +1 -1
- package/src/__tests__/behavioral/skill/SettingUpASkill.test.ts +1 -1
- package/src/__tests__/behavioral/stores/CreatingADataStore.test.ts +1 -1
- package/src/__tests__/behavioral/stores/KeepingDataStoresInSync.test.ts +1 -1
- package/src/__tests__/behavioral/tests/CreatingATest.test.ts +1 -1
- package/src/__tests__/behavioral/tests/RunningTests.test.ts +1 -1
- package/src/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.ts +1 -1
- package/src/__tests__/behavioral/tests/SettingUpTests.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpdatingDependencies.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpdatingDependencies2.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingANodeModule.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingASkill.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingASkill2.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingASkill3.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingASkill4.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingASkill5.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingWithListeners.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingWithSandboxFeatureInstalled.test.ts +1 -1
- package/src/__tests__/behavioral/views/CreatingASkillView.test.ts +1 -1
- package/src/__tests__/behavioral/views/CreatingATheme.test.ts +1 -1
- package/src/__tests__/behavioral/views/KeepingViewsInSync.test.ts +1 -1
- package/src/__tests__/behavioral/views/SettingUpViews.test.ts +1 -1
- package/src/__tests__/behavioral/views/TestingViewControllers.test.ts +1 -1
- package/src/__tests__/behavioral/watchers/WatchingForChanges.test.ts +1 -1
- package/src/__tests__/implementation/ActionExecuter.test.ts +1 -1
- package/src/__tests__/implementation/ActionExecuter2.test.ts +1 -1
- package/src/__tests__/implementation/ActionExecuter3.test.ts +1 -1
- package/src/__tests__/implementation/ActionExecuter4.test.ts +1 -1
- package/src/__tests__/implementation/ArgParser.test.ts +1 -1
- package/src/__tests__/implementation/BuildService.test.ts +1 -1
- package/src/__tests__/implementation/BulkImporting.test.ts +1 -1
- package/src/__tests__/implementation/CachingImports.test.ts +1 -1
- package/src/__tests__/implementation/CommandOptionBuilder.test.ts +1 -1
- package/src/__tests__/implementation/CommanderCommandResultMapper.test.ts +1 -1
- package/src/__tests__/implementation/DataStoreStore.test.ts +1 -1
- package/src/__tests__/implementation/DeletingOrphanedSchemaDefinitions.test.ts +1 -1
- package/src/__tests__/implementation/EventContractCleanerUtil.test.ts +1 -1
- package/src/__tests__/implementation/EventStore.test.ts +1 -1
- package/src/__tests__/implementation/EventTemplateItemBuilder.test.ts +1 -1
- package/src/__tests__/implementation/FeatureCommandAttacher.test.ts +1 -1
- package/src/__tests__/implementation/FeatureFixture.test.ts +1 -1
- package/src/__tests__/implementation/FeatureInstaller.test.ts +1 -1
- package/src/__tests__/implementation/FeaturesUtil.test.ts +1 -1
- package/src/__tests__/implementation/FieldTemplateItemBuilder.test.ts +1 -1
- package/src/__tests__/implementation/GlobalEmitter.ts +1 -1
- package/src/__tests__/implementation/Introspection.test.ts +1 -1
- package/src/__tests__/implementation/JestJsonParser.test.ts +1 -1
- package/src/__tests__/implementation/LintService.test.ts +1 -1
- package/src/__tests__/implementation/ListenerStore.test.ts +1 -1
- package/src/__tests__/implementation/OnboardingScriptLoader.test.ts +1 -1
- package/src/__tests__/implementation/OnboardingScriptPlayer.test.ts +1 -1
- package/src/__tests__/implementation/OnboardingStore.test.ts +1 -1
- package/src/__tests__/implementation/OrganizationStore.test.ts +1 -1
- package/src/__tests__/implementation/ParentTestFinder.test.ts +1 -1
- package/src/__tests__/implementation/PkgService.test.ts +1 -1
- package/src/__tests__/implementation/SchemaStore.test.ts +1 -1
- package/src/__tests__/implementation/SchemaTemplateItemBuilder.test.ts +1 -1
- package/src/__tests__/implementation/SchemaValueTypeWriter.test.ts +1 -1
- package/src/__tests__/implementation/ServiceFactory.test.ts +1 -1
- package/src/__tests__/implementation/SettingUpANodeModule.test.ts +1 -1
- package/src/__tests__/implementation/SkillStore.test.ts +1 -1
- package/src/__tests__/implementation/StoreFeature.test.ts +1 -1
- package/src/__tests__/implementation/TestReporter.test.ts +1 -1
- package/src/__tests__/implementation/TestRunner.test.ts +1 -1
- package/src/__tests__/implementation/ValueTypeMapping.test.ts +1 -1
- package/src/__tests__/implementation/Widgets.test.ts +1 -1
- package/src/__tests__/testDirsAndFiles/abstract_tests/AbstractTest.ts +1 -1
- package/src/__tests__/testDirsAndFiles/abstract_tests/AbstractTest2.ts +1 -1
- package/src/__tests__/testDirsAndFiles/abstract_tests/deeper/AbstractBananaTest.ts +1 -1
- package/src/features/onboard/templates/ManagingTodos.test.ts.hbs +1 -1
- package/src/features/test/TestLogItemGenerator.ts +1 -1
- package/src/interfaces/SpyInterface.ts +1 -1
- package/src/tests/AbstractCliTest.ts +1 -1
- package/src/tests/AbstractSchemaTest.ts +1 -1
- package/src/tests/utilities/test.utility.ts +1 -1
- package/src/tests/utilities/uiAssert.utility.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [17.1.41](https://github.com/sprucelabsai/spruce-cli-workspace/compare/v17.1.40...v17.1.41) (2022-09-13)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @sprucelabs/spruce-cli
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [17.1.40](https://github.com/sprucelabsai/spruce-cli-workspace/compare/v17.1.39...v17.1.40) (2022-09-12)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @sprucelabs/spruce-cli
|
|
@@ -25,8 +25,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
25
25
|
|
|
26
26
|
var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/helpers/applyDecoratedDescriptor"));
|
|
27
27
|
|
|
28
|
-
var _test = require("@sprucelabs/test");
|
|
29
|
-
|
|
30
28
|
var _testUtils = require("@sprucelabs/test-utils");
|
|
31
29
|
|
|
32
30
|
var _AbstractSkillTest2 = _interopRequireDefault(require("../../tests/AbstractSkillTest"));
|
|
@@ -41,7 +39,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
41
39
|
|
|
42
40
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
43
41
|
|
|
44
|
-
var ConfiguringDependenciesTest = (_dec = (0,
|
|
42
|
+
var ConfiguringDependenciesTest = (_dec = (0, _testUtils.test)(), _dec2 = (0, _testUtils.test)(), _dec3 = (0, _testUtils.test)(), _dec4 = (0, _testUtils.test)(), _dec5 = (0, _testUtils.test)(), _dec6 = (0, _testUtils.test)(), _dec7 = (0, _testUtils.test)(), (_class = (_class2 = /*#__PURE__*/function (_AbstractSkillTest) {
|
|
45
43
|
(0, _inherits2["default"])(ConfiguringDependenciesTest, _AbstractSkillTest);
|
|
46
44
|
|
|
47
45
|
var _super = _createSuper(ConfiguringDependenciesTest);
|
|
@@ -59,7 +57,7 @@ var ConfiguringDependenciesTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
59
57
|
while (1) {
|
|
60
58
|
switch (_context.prev = _context.next) {
|
|
61
59
|
case 0:
|
|
62
|
-
|
|
60
|
+
_testUtils.assert.isFunction(this.Action('dependency', 'add').execute);
|
|
63
61
|
|
|
64
62
|
case 1:
|
|
65
63
|
case "end":
|
|
@@ -98,7 +96,7 @@ var ConfiguringDependenciesTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
98
96
|
case 4:
|
|
99
97
|
results = _context2.sent;
|
|
100
98
|
|
|
101
|
-
|
|
99
|
+
_testUtils.assert.isTruthy(results.errors);
|
|
102
100
|
|
|
103
101
|
_testUtils.errorAssert.assertError(results.errors[0], 'SKILL_NOT_FOUND');
|
|
104
102
|
|
|
@@ -140,13 +138,13 @@ var ConfiguringDependenciesTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
140
138
|
case 5:
|
|
141
139
|
results = _context3.sent;
|
|
142
140
|
|
|
143
|
-
|
|
141
|
+
_testUtils.assert.isFalsy(results.errors);
|
|
144
142
|
|
|
145
143
|
this.parentSkill = parentSkill;
|
|
146
144
|
settings = this.Service('settings');
|
|
147
145
|
dependencies = settings.get('dependencies');
|
|
148
146
|
|
|
149
|
-
|
|
147
|
+
_testUtils.assert.isEqualDeep(dependencies, [{
|
|
150
148
|
id: parentSkill.id,
|
|
151
149
|
namespace: parentSkill.slug
|
|
152
150
|
}]);
|
|
@@ -176,7 +174,7 @@ var ConfiguringDependenciesTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
176
174
|
while (1) {
|
|
177
175
|
switch (_context4.prev = _context4.next) {
|
|
178
176
|
case 0:
|
|
179
|
-
err =
|
|
177
|
+
err = _testUtils.assert.doesThrow(function () {
|
|
180
178
|
return _this.Service('dependency').add({
|
|
181
179
|
id: _this.parentSkill.id,
|
|
182
180
|
namespace: _this.parentSkill.slug
|
|
@@ -222,7 +220,7 @@ var ConfiguringDependenciesTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
222
220
|
case 6:
|
|
223
221
|
last = this.ui.getLastInvocation();
|
|
224
222
|
|
|
225
|
-
|
|
223
|
+
_testUtils.assert.doesInclude(last.options.options.choices, {
|
|
226
224
|
value: otherSkill.slug,
|
|
227
225
|
label: otherSkill.name
|
|
228
226
|
});
|
|
@@ -237,12 +235,12 @@ var ConfiguringDependenciesTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
237
235
|
case 12:
|
|
238
236
|
results = _context5.sent;
|
|
239
237
|
|
|
240
|
-
|
|
238
|
+
_testUtils.assert.isFalsy(results.errors);
|
|
241
239
|
|
|
242
240
|
settings = this.Service('settings');
|
|
243
241
|
dependencies = settings.get('dependencies');
|
|
244
242
|
|
|
245
|
-
|
|
243
|
+
_testUtils.assert.isEqualDeep(dependencies[1], {
|
|
246
244
|
id: otherSkill.id,
|
|
247
245
|
namespace: otherSkill.slug
|
|
248
246
|
});
|
|
@@ -325,7 +323,7 @@ var ConfiguringDependenciesTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
325
323
|
case 7:
|
|
326
324
|
results = _context7.sent;
|
|
327
325
|
|
|
328
|
-
|
|
326
|
+
_testUtils.assert.isFalsy(results.errors);
|
|
329
327
|
|
|
330
328
|
case 9:
|
|
331
329
|
case "end":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddingADependency.test.js","names":["ConfiguringDependenciesTest","test","assert","isFunction","Action","execute","getSkillFixture","registerCurrentSkill","name","namespace","results","isTruthy","errors","errorAssert","assertError","seedDemoSkill","parentSkill","slug","isFalsy","settings","Service","dependencies","get","isEqualDeep","id","err","doesThrow","add","otherSkill","promise","waitForInput","last","ui","getLastInvocation","doesInclude","options","choices","value","label","sendInput","people","loginAsDemoPerson","uiAssert","assertSelectDidNotRenderChoice","reset","isPublished","skill","DEMO_NUMBER_GLOBAL_EVENTS","AbstractSkillTest"],"sources":["../../../src/__tests__/behavioral/AddingADependency.test.ts"],"sourcesContent":["import { test, assert } from '@sprucelabs/test'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport AbstractSkillTest from '../../tests/AbstractSkillTest'\nimport { DEMO_NUMBER_GLOBAL_EVENTS } from '../../tests/constants'\nimport uiAssert from '../../tests/utilities/uiAssert.utility'\n\nexport default class ConfiguringDependenciesTest extends AbstractSkillTest {\n\tprotected static skillCacheKey = 'skills'\n\tprivate static parentSkill: {\n\t\tid: string\n\t\tslug: string\n\t\tname: string\n\t}\n\n\t@test()\n\tprotected static async hasAddDependencyAction() {\n\t\tassert.isFunction(this.Action('dependency', 'add').execute)\n\t}\n\n\t@test()\n\tprotected static async errorsWhenPassedBadNamespace() {\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'current skill in adding deps',\n\t\t})\n\n\t\tconst results = await this.Action('dependency', 'add').execute({\n\t\t\tnamespace: 'waka-waka',\n\t\t})\n\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'SKILL_NOT_FOUND')\n\t}\n\n\t@test()\n\tprotected static async succeedsWhenPassedGoodNamespace() {\n\t\tconst parentSkill = await this.getSkillFixture().seedDemoSkill({\n\t\t\tname: 'dependent skill',\n\t\t})\n\n\t\tconst results = await this.Action('dependency', 'add').execute({\n\t\t\tnamespace: parentSkill.slug,\n\t\t})\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tthis.parentSkill = parentSkill\n\n\t\tconst settings = this.Service('settings')\n\t\tconst dependencies = settings.get('dependencies')\n\n\t\tassert.isEqualDeep(dependencies, [\n\t\t\t{\n\t\t\t\tid: parentSkill.id,\n\t\t\t\tnamespace: parentSkill.slug,\n\t\t\t},\n\t\t])\n\t}\n\n\t@test()\n\tprotected static async cantAddDependencyTwice() {\n\t\tconst err = assert.doesThrow(() =>\n\t\t\tthis.Service('dependency').add({\n\t\t\t\tid: this.parentSkill.id,\n\t\t\t\tnamespace: this.parentSkill.slug,\n\t\t\t})\n\t\t)\n\n\t\terrorAssert.assertError(err, 'DEPENDENCY_EXISTS')\n\t}\n\n\t@test()\n\tprotected static async asksToSelectSkillWhenNoNamespacePassed() {\n\t\tconst otherSkill = await this.getSkillFixture().seedDemoSkill({\n\t\t\tname: 'dependent skill',\n\t\t})\n\n\t\tconst promise = this.Action('dependency', 'add').execute({})\n\n\t\tawait this.waitForInput()\n\n\t\tconst last = this.ui.getLastInvocation()\n\n\t\tassert.doesInclude(last.options.options.choices, {\n\t\t\tvalue: otherSkill.slug,\n\t\t\tlabel: otherSkill.name,\n\t\t})\n\n\t\tawait this.ui.sendInput(otherSkill.slug)\n\n\t\tconst results = await promise\n\t\tassert.isFalsy(results.errors)\n\n\t\tconst settings = this.Service('settings')\n\t\tconst dependencies = settings.get('dependencies')\n\n\t\tassert.isEqualDeep(dependencies[1], {\n\t\t\tid: otherSkill.id,\n\t\t\tnamespace: otherSkill.slug,\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async doesNotShowSkillsThatAreAlreadySetAsADependency() {\n\t\tawait this.people.loginAsDemoPerson()\n\n\t\tvoid this.Action('dependency', 'add').execute({})\n\n\t\tawait this.waitForInput()\n\n\t\tuiAssert.assertSelectDidNotRenderChoice(\n\t\t\tthis.ui,\n\t\t\tthis.parentSkill.slug,\n\t\t\tthis.parentSkill.name\n\t\t)\n\n\t\tthis.ui.reset()\n\t}\n\n\t@test()\n\tprotected static async canAddSkillThatWasCreatedBySomeoneElse() {\n\t\tconst skill = await this.getSkillFixture().seedDemoSkill({\n\t\t\tname: 'global dependency skill',\n\t\t\tisPublished: true,\n\t\t})\n\n\t\tawait this.people.loginAsDemoPerson(DEMO_NUMBER_GLOBAL_EVENTS)\n\n\t\tconst results = await this.Action('dependency', 'add').execute({\n\t\t\tnamespace: skill.slug,\n\t\t})\n\n\t\tassert.isFalsy(results.errors)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;
|
|
1
|
+
{"version":3,"file":"AddingADependency.test.js","names":["ConfiguringDependenciesTest","test","assert","isFunction","Action","execute","getSkillFixture","registerCurrentSkill","name","namespace","results","isTruthy","errors","errorAssert","assertError","seedDemoSkill","parentSkill","slug","isFalsy","settings","Service","dependencies","get","isEqualDeep","id","err","doesThrow","add","otherSkill","promise","waitForInput","last","ui","getLastInvocation","doesInclude","options","choices","value","label","sendInput","people","loginAsDemoPerson","uiAssert","assertSelectDidNotRenderChoice","reset","isPublished","skill","DEMO_NUMBER_GLOBAL_EVENTS","AbstractSkillTest"],"sources":["../../../src/__tests__/behavioral/AddingADependency.test.ts"],"sourcesContent":["import { test, assert } from '@sprucelabs/test-utils'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport AbstractSkillTest from '../../tests/AbstractSkillTest'\nimport { DEMO_NUMBER_GLOBAL_EVENTS } from '../../tests/constants'\nimport uiAssert from '../../tests/utilities/uiAssert.utility'\n\nexport default class ConfiguringDependenciesTest extends AbstractSkillTest {\n\tprotected static skillCacheKey = 'skills'\n\tprivate static parentSkill: {\n\t\tid: string\n\t\tslug: string\n\t\tname: string\n\t}\n\n\t@test()\n\tprotected static async hasAddDependencyAction() {\n\t\tassert.isFunction(this.Action('dependency', 'add').execute)\n\t}\n\n\t@test()\n\tprotected static async errorsWhenPassedBadNamespace() {\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'current skill in adding deps',\n\t\t})\n\n\t\tconst results = await this.Action('dependency', 'add').execute({\n\t\t\tnamespace: 'waka-waka',\n\t\t})\n\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'SKILL_NOT_FOUND')\n\t}\n\n\t@test()\n\tprotected static async succeedsWhenPassedGoodNamespace() {\n\t\tconst parentSkill = await this.getSkillFixture().seedDemoSkill({\n\t\t\tname: 'dependent skill',\n\t\t})\n\n\t\tconst results = await this.Action('dependency', 'add').execute({\n\t\t\tnamespace: parentSkill.slug,\n\t\t})\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tthis.parentSkill = parentSkill\n\n\t\tconst settings = this.Service('settings')\n\t\tconst dependencies = settings.get('dependencies')\n\n\t\tassert.isEqualDeep(dependencies, [\n\t\t\t{\n\t\t\t\tid: parentSkill.id,\n\t\t\t\tnamespace: parentSkill.slug,\n\t\t\t},\n\t\t])\n\t}\n\n\t@test()\n\tprotected static async cantAddDependencyTwice() {\n\t\tconst err = assert.doesThrow(() =>\n\t\t\tthis.Service('dependency').add({\n\t\t\t\tid: this.parentSkill.id,\n\t\t\t\tnamespace: this.parentSkill.slug,\n\t\t\t})\n\t\t)\n\n\t\terrorAssert.assertError(err, 'DEPENDENCY_EXISTS')\n\t}\n\n\t@test()\n\tprotected static async asksToSelectSkillWhenNoNamespacePassed() {\n\t\tconst otherSkill = await this.getSkillFixture().seedDemoSkill({\n\t\t\tname: 'dependent skill',\n\t\t})\n\n\t\tconst promise = this.Action('dependency', 'add').execute({})\n\n\t\tawait this.waitForInput()\n\n\t\tconst last = this.ui.getLastInvocation()\n\n\t\tassert.doesInclude(last.options.options.choices, {\n\t\t\tvalue: otherSkill.slug,\n\t\t\tlabel: otherSkill.name,\n\t\t})\n\n\t\tawait this.ui.sendInput(otherSkill.slug)\n\n\t\tconst results = await promise\n\t\tassert.isFalsy(results.errors)\n\n\t\tconst settings = this.Service('settings')\n\t\tconst dependencies = settings.get('dependencies')\n\n\t\tassert.isEqualDeep(dependencies[1], {\n\t\t\tid: otherSkill.id,\n\t\t\tnamespace: otherSkill.slug,\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async doesNotShowSkillsThatAreAlreadySetAsADependency() {\n\t\tawait this.people.loginAsDemoPerson()\n\n\t\tvoid this.Action('dependency', 'add').execute({})\n\n\t\tawait this.waitForInput()\n\n\t\tuiAssert.assertSelectDidNotRenderChoice(\n\t\t\tthis.ui,\n\t\t\tthis.parentSkill.slug,\n\t\t\tthis.parentSkill.name\n\t\t)\n\n\t\tthis.ui.reset()\n\t}\n\n\t@test()\n\tprotected static async canAddSkillThatWasCreatedBySomeoneElse() {\n\t\tconst skill = await this.getSkillFixture().seedDemoSkill({\n\t\t\tname: 'global dependency skill',\n\t\t\tisPublished: true,\n\t\t})\n\n\t\tawait this.people.loginAsDemoPerson(DEMO_NUMBER_GLOBAL_EVENTS)\n\n\t\tconst results = await this.Action('dependency', 'add').execute({\n\t\t\tnamespace: skill.slug,\n\t\t})\n\n\t\tassert.isFalsy(results.errors)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEA;;AACA;;AACA;;;;;;;;IAEqBA,2B,WAQnB,IAAAC,eAAA,G,UAKA,IAAAA,eAAA,G,UAeA,IAAAA,eAAA,G,UAyBA,IAAAA,eAAA,G,UAYA,IAAAA,eAAA,G,UA+BA,IAAAA,eAAA,G,UAiBA,IAAAA,eAAA,G;;;;;;;;;;;;;kHAzGD;QAAA;UAAA;YAAA;cAAA;gBAECC,iBAAA,CAAOC,UAAP,CAAkB,KAAKC,MAAL,CAAY,YAAZ,EAA0B,KAA1B,EAAiCC,OAAnD;;cAFD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;;wHAKA;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA,OAEO,KAAKC,eAAL,GAAuBC,oBAAvB,CAA4C;kBACjDC,IAAI,EAAE;gBAD2C,CAA5C,CAFP;;cAAA;gBAAA;gBAAA,OAMuB,KAAKJ,MAAL,CAAY,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
|
25
25
|
|
|
26
26
|
var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/helpers/applyDecoratedDescriptor"));
|
|
27
27
|
|
|
28
|
-
var _test = require("@sprucelabs/test");
|
|
29
|
-
|
|
30
28
|
var _testUtils = require("@sprucelabs/test-utils");
|
|
31
29
|
|
|
32
30
|
var _AbstractSkillTest2 = _interopRequireDefault(require("../../tests/AbstractSkillTest"));
|
|
@@ -39,7 +37,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
39
37
|
|
|
40
38
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
41
39
|
|
|
42
|
-
var OverridingCommandsInPackageJsonTest = (_dec = (0,
|
|
40
|
+
var OverridingCommandsInPackageJsonTest = (_dec = (0, _testUtils.test)(), _dec2 = (0, _testUtils.test)(), (_class = (_class2 = /*#__PURE__*/function (_AbstractSkillTest) {
|
|
43
41
|
(0, _inherits2["default"])(OverridingCommandsInPackageJsonTest, _AbstractSkillTest);
|
|
44
42
|
|
|
45
43
|
var _super = _createSuper(OverridingCommandsInPackageJsonTest);
|
|
@@ -80,7 +78,7 @@ var OverridingCommandsInPackageJsonTest = (_dec = (0, _test.test)(), _dec2 = (0,
|
|
|
80
78
|
case 8:
|
|
81
79
|
results = _context.sent;
|
|
82
80
|
|
|
83
|
-
|
|
81
|
+
_testUtils.assert.isTruthy(results.errors);
|
|
84
82
|
|
|
85
83
|
_testUtils.errorAssert.assertError(results.errors[0], 'COMMAND_BLOCKED');
|
|
86
84
|
|
|
@@ -136,7 +134,7 @@ var OverridingCommandsInPackageJsonTest = (_dec = (0, _test.test)(), _dec2 = (0,
|
|
|
136
134
|
case 8:
|
|
137
135
|
results = _context2.sent;
|
|
138
136
|
|
|
139
|
-
|
|
137
|
+
_testUtils.assert.isTruthy(results.errors);
|
|
140
138
|
|
|
141
139
|
_testUtils.errorAssert.assertError(results.errors[0], 'COMMAND_BLOCKED');
|
|
142
140
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockingCommands.test.js","names":["OverridingCommandsInPackageJsonTest","test","pkg","Service","set","path","value","FeatureFixture","Cli","program","MockProgramFactory","Program","cli","executer","getActionExecuter","Action","execute","results","assert","isTruthy","errors","errorAssert","assertError","cwd","graphicsInterface","ui","nameReadable","namePascal","nameCamel","description","AbstractSkillTest"],"sources":["../../../src/__tests__/behavioral/BlockingCommands.test.ts"],"sourcesContent":["import { test, assert } from '@sprucelabs/test'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport AbstractSkillTest from '../../tests/AbstractSkillTest'\nimport MockProgramFactory from '../../tests/MockProgramFactory'\n\nexport default class OverridingCommandsInPackageJsonTest extends AbstractSkillTest {\n\tprotected static skillCacheKey = 'schemas'\n\n\t@test()\n\tprotected static async blockedCommandsThrow() {\n\t\tconst pkg = this.Service('pkg')\n\t\tpkg.set({\n\t\t\tpath: ['skill', 'blockedCommands'],\n\t\t\tvalue: { 'sync.schemas': `Stop now!` },\n\t\t})\n\n\t\tconst cli = await this.FeatureFixture().Cli({\n\t\t\tprogram: MockProgramFactory.Program(),\n\t\t})\n\n\t\t//@ts-ignore\n\t\tconst executer = cli.getActionExecuter()\n\t\tconst results = await executer.Action('schema', 'sync').execute()\n\n\t\tassert.isTruthy(results.errors)\n\t\terrorAssert.assertError(results.errors[0], 'COMMAND_BLOCKED')\n\t}\n\n\t@test()\n\tprotected static async blocksWhenCommandIsForwardedFromAnother() {\n\t\tconst pkg = this.Service('pkg')\n\t\tpkg.set({\n\t\t\tpath: ['skill', 'blockedCommands'],\n\t\t\tvalue: { 'sync.schemas': `Stop now!` },\n\t\t})\n\n\t\tconst cli = await this.FeatureFixture().Cli({\n\t\t\tprogram: MockProgramFactory.Program(),\n\t\t\tcwd: this.cwd,\n\t\t\tgraphicsInterface: this.ui,\n\t\t})\n\n\t\t//@ts-ignore\n\t\tconst executer = cli.getActionExecuter()\n\t\tconst results = await executer.Action('schema', 'create').execute({\n\t\t\tnameReadable: 'Test schema!',\n\t\t\tnamePascal: 'Test',\n\t\t\tnameCamel: 'test',\n\t\t\tdescription: 'this is so great!',\n\t\t})\n\n\t\tassert.isTruthy(results.errors)\n\t\terrorAssert.assertError(results.errors[0], 'COMMAND_BLOCKED')\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;
|
|
1
|
+
{"version":3,"file":"BlockingCommands.test.js","names":["OverridingCommandsInPackageJsonTest","test","pkg","Service","set","path","value","FeatureFixture","Cli","program","MockProgramFactory","Program","cli","executer","getActionExecuter","Action","execute","results","assert","isTruthy","errors","errorAssert","assertError","cwd","graphicsInterface","ui","nameReadable","namePascal","nameCamel","description","AbstractSkillTest"],"sources":["../../../src/__tests__/behavioral/BlockingCommands.test.ts"],"sourcesContent":["import { test, assert } from '@sprucelabs/test-utils'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport AbstractSkillTest from '../../tests/AbstractSkillTest'\nimport MockProgramFactory from '../../tests/MockProgramFactory'\n\nexport default class OverridingCommandsInPackageJsonTest extends AbstractSkillTest {\n\tprotected static skillCacheKey = 'schemas'\n\n\t@test()\n\tprotected static async blockedCommandsThrow() {\n\t\tconst pkg = this.Service('pkg')\n\t\tpkg.set({\n\t\t\tpath: ['skill', 'blockedCommands'],\n\t\t\tvalue: { 'sync.schemas': `Stop now!` },\n\t\t})\n\n\t\tconst cli = await this.FeatureFixture().Cli({\n\t\t\tprogram: MockProgramFactory.Program(),\n\t\t})\n\n\t\t//@ts-ignore\n\t\tconst executer = cli.getActionExecuter()\n\t\tconst results = await executer.Action('schema', 'sync').execute()\n\n\t\tassert.isTruthy(results.errors)\n\t\terrorAssert.assertError(results.errors[0], 'COMMAND_BLOCKED')\n\t}\n\n\t@test()\n\tprotected static async blocksWhenCommandIsForwardedFromAnother() {\n\t\tconst pkg = this.Service('pkg')\n\t\tpkg.set({\n\t\t\tpath: ['skill', 'blockedCommands'],\n\t\t\tvalue: { 'sync.schemas': `Stop now!` },\n\t\t})\n\n\t\tconst cli = await this.FeatureFixture().Cli({\n\t\t\tprogram: MockProgramFactory.Program(),\n\t\t\tcwd: this.cwd,\n\t\t\tgraphicsInterface: this.ui,\n\t\t})\n\n\t\t//@ts-ignore\n\t\tconst executer = cli.getActionExecuter()\n\t\tconst results = await executer.Action('schema', 'create').execute({\n\t\t\tnameReadable: 'Test schema!',\n\t\t\tnamePascal: 'Test',\n\t\t\tnameCamel: 'test',\n\t\t\tdescription: 'this is so great!',\n\t\t})\n\n\t\tassert.isTruthy(results.errors)\n\t\terrorAssert.assertError(results.errors[0], 'COMMAND_BLOCKED')\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEA;;AACA;;;;;;;;IAEqBA,mC,WAGnB,IAAAC,eAAA,G,UAoBA,IAAAA,eAAA,G;;;;;;;;;;;;;gHApBD;QAAA;QAAA;UAAA;YAAA;cAAA;gBAEOC,GAFP,GAEa,KAAKC,OAAL,CAAa,KAAb,CAFb;gBAGCD,GAAG,CAACE,GAAJ,CAAQ;kBACPC,IAAI,EAAE,CAAC,OAAD,EAAU,iBAAV,CADC;kBAEPC,KAAK,EAAE;oBAAE;kBAAF;gBAFA,CAAR;gBAHD;gBAAA,OAQmB,KAAKC,cAAL,GAAsBC,GAAtB,CAA0B;kBAC3CC,OAAO,EAAEC,8BAAA,CAAmBC,OAAnB;gBADkC,CAA1B,CARnB;;cAAA;gBAQOC,GARP;gBAYC;gBACMC,QAbP,GAakBD,GAAG,CAACE,iBAAJ,EAblB;gBAAA;gBAAA,OAcuBD,QAAQ,CAACE,MAAT,CAAgB,QAAhB,EAA0B,MAA1B,EAAkCC,OAAlC,EAdvB;;cAAA;gBAcOC,OAdP;;gBAgBCC,iBAAA,CAAOC,QAAP,CAAgBF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
23
23
|
|
|
24
24
|
var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/helpers/applyDecoratedDescriptor"));
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _testUtils = require("@sprucelabs/test-utils");
|
|
27
27
|
|
|
28
28
|
var _AbstractCliTest2 = _interopRequireDefault(require("../../tests/AbstractCliTest"));
|
|
29
29
|
|
|
@@ -33,7 +33,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
33
33
|
|
|
34
34
|
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; } }
|
|
35
35
|
|
|
36
|
-
var BootTest = (_dec = (0,
|
|
36
|
+
var BootTest = (_dec = (0, _testUtils.test)(), (_class = /*#__PURE__*/function (_AbstractCliTest) {
|
|
37
37
|
(0, _inherits2["default"])(BootTest, _AbstractCliTest);
|
|
38
38
|
|
|
39
39
|
var _super = _createSuper(BootTest);
|
|
@@ -58,7 +58,7 @@ var BootTest = (_dec = (0, _test.test)(), (_class = /*#__PURE__*/function (_Abst
|
|
|
58
58
|
case 2:
|
|
59
59
|
cli = _context.sent;
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
_testUtils.assert.isTruthy(cli);
|
|
62
62
|
|
|
63
63
|
case 4:
|
|
64
64
|
case "end":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BootingTheCli.test.js","names":["BootTest","test","Cli","cli","assert","isTruthy","AbstractCliTest"],"sources":["../../../src/__tests__/behavioral/BootingTheCli.test.ts"],"sourcesContent":["import { test, assert } from '@sprucelabs/test'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\n\nexport default class BootTest extends AbstractCliTest {\n\t@test()\n\tprotected static async canBootTheCli() {\n\t\tconst cli = await this.Cli()\n\t\tassert.isTruthy(cli)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;;;;;;;IAEqBA,Q,WACnB,IAAAC,
|
|
1
|
+
{"version":3,"file":"BootingTheCli.test.js","names":["BootTest","test","Cli","cli","assert","isTruthy","AbstractCliTest"],"sources":["../../../src/__tests__/behavioral/BootingTheCli.test.ts"],"sourcesContent":["import { test, assert } from '@sprucelabs/test-utils'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\n\nexport default class BootTest extends AbstractCliTest {\n\t@test()\n\tprotected static async canBootTheCli() {\n\t\tconst cli = await this.Cli()\n\t\tassert.isTruthy(cli)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;;;;;;;IAEqBA,Q,WACnB,IAAAC,eAAA,G;;;;;;;;;;;;;yGAAD;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA,OAEmB,KAAKC,GAAL,EAFnB;;cAAA;gBAEOC,GAFP;;gBAGCC,iBAAA,CAAOC,QAAP,CAAgBF,GAAhB;;cAHD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;EADqCG,4B"}
|
|
@@ -25,11 +25,11 @@ var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/
|
|
|
25
25
|
|
|
26
26
|
var _spruceSkillUtils = require("@sprucelabs/spruce-skill-utils");
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _testUtils = require("@sprucelabs/test-utils");
|
|
29
29
|
|
|
30
30
|
var _AbstractCliTest2 = _interopRequireDefault(require("../../tests/AbstractCliTest"));
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _test = _interopRequireDefault(require("../../tests/utilities/test.utility"));
|
|
33
33
|
|
|
34
34
|
var _dec, _dec2, _class;
|
|
35
35
|
|
|
@@ -37,7 +37,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
37
37
|
|
|
38
38
|
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; } }
|
|
39
39
|
|
|
40
|
-
var BootingWithBadFilesTest = (_dec = (0,
|
|
40
|
+
var BootingWithBadFilesTest = (_dec = (0, _testUtils.test)(), _dec2 = (0, _testUtils.test)(), (_class = /*#__PURE__*/function (_AbstractCliTest) {
|
|
41
41
|
(0, _inherits2["default"])(BootingWithBadFilesTest, _AbstractCliTest);
|
|
42
42
|
|
|
43
43
|
var _super = _createSuper(BootingWithBadFilesTest);
|
|
@@ -66,9 +66,9 @@ var BootingWithBadFilesTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)
|
|
|
66
66
|
case 4:
|
|
67
67
|
bootResults = _context.sent;
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
_testUtils.assert.isTruthy(bootResults.errors);
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
_testUtils.assert.doesInclude(bootResults.errors[0].message, 'location.schema.ts');
|
|
72
72
|
|
|
73
73
|
case 7:
|
|
74
74
|
case "end":
|
|
@@ -105,7 +105,7 @@ var BootingWithBadFilesTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)
|
|
|
105
105
|
case 5:
|
|
106
106
|
bootResults = _context2.sent;
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
_testUtils.assert.isFalsy(bootResults.errors);
|
|
109
109
|
|
|
110
110
|
case 7:
|
|
111
111
|
case "end":
|
|
@@ -135,7 +135,7 @@ var BootingWithBadFilesTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)
|
|
|
135
135
|
|
|
136
136
|
case 2:
|
|
137
137
|
results = _context3.sent;
|
|
138
|
-
match =
|
|
138
|
+
match = _test["default"].assertFileByNameInGeneratedFiles('location.schema.ts', results.files);
|
|
139
139
|
|
|
140
140
|
_spruceSkillUtils.diskUtil.writeFile(match, '');
|
|
141
141
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BootingWithBadFiles.test.js","names":["BootingWithBadFilesTest","test","FeatureFixture","installCachedFeatures","breakSchemaAndBoot","bootResults","assert","isTruthy","errors","doesInclude","message","diskUtil","writeFile","resolvePath","isFalsy","Action","execute","results","match","testUtil","assertFileByNameInGeneratedFiles","files","local","AbstractCliTest"],"sources":["../../../src/__tests__/behavioral/BootingWithBadFiles.test.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\nimport testUtil from '../../tests/utilities/test.utility'\n\nexport default class BootingWithBadFilesTest extends AbstractCliTest {\n\t@test()\n\tprotected static async bootingWithAEmptySchemaThrowsErrorWithNameOfBadSchema() {\n\t\tawait this.FeatureFixture().installCachedFeatures('schemas')\n\t\tconst bootResults = await this.breakSchemaAndBoot()\n\t\tassert.isTruthy(bootResults.errors)\n\t\tassert.doesInclude(bootResults.errors[0].message, 'location.schema.ts')\n\t}\n\n\t@test()\n\tprotected static async disablesSchemaCheckingWithFlag() {\n\t\tawait this.FeatureFixture().installCachedFeatures('schemas')\n\t\tdiskUtil.writeFile(\n\t\t\tthis.resolvePath('.env'),\n\t\t\t'SHOULD_VALIDATE_SCHEMAS_ON_BOOT=false'\n\t\t)\n\t\tconst bootResults = await this.breakSchemaAndBoot()\n\t\tassert.isFalsy(bootResults.errors)\n\t}\n\n\tprivate static async breakSchemaAndBoot() {\n\t\tconst results = await this.Action('schema', 'sync').execute({})\n\n\t\tconst match = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'location.schema.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tdiskUtil.writeFile(match, '')\n\n\t\tconst bootResults = await this.Action('skill', 'boot').execute({\n\t\t\tlocal: true,\n\t\t})\n\n\t\treturn bootResults\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;IAEqBA,uB,WACnB,IAAAC,
|
|
1
|
+
{"version":3,"file":"BootingWithBadFiles.test.js","names":["BootingWithBadFilesTest","test","FeatureFixture","installCachedFeatures","breakSchemaAndBoot","bootResults","assert","isTruthy","errors","doesInclude","message","diskUtil","writeFile","resolvePath","isFalsy","Action","execute","results","match","testUtil","assertFileByNameInGeneratedFiles","files","local","AbstractCliTest"],"sources":["../../../src/__tests__/behavioral/BootingWithBadFiles.test.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test-utils'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\nimport testUtil from '../../tests/utilities/test.utility'\n\nexport default class BootingWithBadFilesTest extends AbstractCliTest {\n\t@test()\n\tprotected static async bootingWithAEmptySchemaThrowsErrorWithNameOfBadSchema() {\n\t\tawait this.FeatureFixture().installCachedFeatures('schemas')\n\t\tconst bootResults = await this.breakSchemaAndBoot()\n\t\tassert.isTruthy(bootResults.errors)\n\t\tassert.doesInclude(bootResults.errors[0].message, 'location.schema.ts')\n\t}\n\n\t@test()\n\tprotected static async disablesSchemaCheckingWithFlag() {\n\t\tawait this.FeatureFixture().installCachedFeatures('schemas')\n\t\tdiskUtil.writeFile(\n\t\t\tthis.resolvePath('.env'),\n\t\t\t'SHOULD_VALIDATE_SCHEMAS_ON_BOOT=false'\n\t\t)\n\t\tconst bootResults = await this.breakSchemaAndBoot()\n\t\tassert.isFalsy(bootResults.errors)\n\t}\n\n\tprivate static async breakSchemaAndBoot() {\n\t\tconst results = await this.Action('schema', 'sync').execute({})\n\n\t\tconst match = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'location.schema.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tdiskUtil.writeFile(match, '')\n\n\t\tconst bootResults = await this.Action('skill', 'boot').execute({\n\t\t\tlocal: true,\n\t\t})\n\n\t\treturn bootResults\n\t}\n}\n"],"mappings":";;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AL,CAAY,OAAZ,EAAqB,MAArB,EAA6BC,OAA7B,CAAqC;kBAC9DM,KAAK,EAAE;gBADuD,CAArC,CAV3B;;cAAA;gBAUOjB,WAVP;gBAAA,kCAcQA,WAdR;;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;EApBoDkB,4B"}
|
|
@@ -25,11 +25,11 @@ var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/
|
|
|
25
25
|
|
|
26
26
|
require("@sprucelabs/spruce-conversation-plugin");
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _testUtils = require("@sprucelabs/test-utils");
|
|
29
29
|
|
|
30
30
|
var _AbstractCliTest2 = _interopRequireDefault(require("../../tests/AbstractCliTest"));
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _test = _interopRequireDefault(require("../../tests/utilities/test.utility"));
|
|
33
33
|
|
|
34
34
|
var _dec, _dec2, _class;
|
|
35
35
|
|
|
@@ -37,7 +37,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
37
37
|
|
|
38
38
|
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; } }
|
|
39
39
|
|
|
40
|
-
var CreatingAConversationTopicTest = (_dec = (0,
|
|
40
|
+
var CreatingAConversationTopicTest = (_dec = (0, _testUtils.test)(), _dec2 = (0, _testUtils.test)(), (_class = /*#__PURE__*/function (_AbstractCliTest) {
|
|
41
41
|
(0, _inherits2["default"])(CreatingAConversationTopicTest, _AbstractCliTest);
|
|
42
42
|
|
|
43
43
|
var _super = _createSuper(CreatingAConversationTopicTest);
|
|
@@ -55,7 +55,7 @@ var CreatingAConversationTopicTest = (_dec = (0, _test.test)(), _dec2 = (0, _tes
|
|
|
55
55
|
while (1) {
|
|
56
56
|
switch (_context.prev = _context.next) {
|
|
57
57
|
case 0:
|
|
58
|
-
|
|
58
|
+
_testUtils.assert.isFunction(this.Action('conversation', 'create').execute);
|
|
59
59
|
|
|
60
60
|
case 1:
|
|
61
61
|
case "end":
|
|
@@ -93,20 +93,20 @@ var CreatingAConversationTopicTest = (_dec = (0, _test.test)(), _dec2 = (0, _tes
|
|
|
93
93
|
|
|
94
94
|
case 5:
|
|
95
95
|
results = _context2.sent;
|
|
96
|
-
match =
|
|
96
|
+
match = _test["default"].assertFileByNameInGeneratedFiles('bookAnAppointment.topic.ts', results.files);
|
|
97
97
|
_context2.next = 9;
|
|
98
98
|
return this.Service('import').importDefault(match);
|
|
99
99
|
|
|
100
100
|
case 9:
|
|
101
101
|
imported = _context2.sent;
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
_testUtils.assert.isTruthy(imported);
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
_testUtils.assert.isEqual(imported.label, 'book an appointment');
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
_testUtils.assert.isArray(imported.utterances);
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
_testUtils.assert.isArray(imported.script);
|
|
110
110
|
|
|
111
111
|
_context2.next = 16;
|
|
112
112
|
return this.assertHealthCheckResultsAreValid(cli);
|
|
@@ -141,16 +141,16 @@ var CreatingAConversationTopicTest = (_dec = (0, _test.test)(), _dec2 = (0, _tes
|
|
|
141
141
|
health = _context3.sent;
|
|
142
142
|
|
|
143
143
|
//@ts-ignore
|
|
144
|
-
|
|
144
|
+
_testUtils.assert.isTruthy(health.conversation); //@ts-ignore
|
|
145
145
|
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
_testUtils.assert.isArray(health.conversation.topics); //@ts-ignore
|
|
148
148
|
|
|
149
149
|
|
|
150
|
-
|
|
150
|
+
_testUtils.assert.isLength(health.conversation.topics, 1); //@ts-ignore
|
|
151
151
|
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
_testUtils.assert.doesInclude(health.conversation.topics, 'bookAnAppointment');
|
|
154
154
|
|
|
155
155
|
case 7:
|
|
156
156
|
case "end":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreatingAConversationTopic.test.js","names":["CreatingAConversationTopicTest","test","assert","isFunction","Action","execute","FeatureFixture","installCachedFeatures","cli","nameReadable","nameCamel","results","match","testUtil","assertFileByNameInGeneratedFiles","files","Service","importDefault","imported","isTruthy","isEqual","label","isArray","utterances","script","assertHealthCheckResultsAreValid","checkHealth","health","conversation","topics","isLength","doesInclude","AbstractCliTest"],"sources":["../../../src/__tests__/behavioral/CreatingAConversationTopic.test.ts"],"sourcesContent":["import '@sprucelabs/spruce-conversation-plugin'\nimport { test, assert } from '@sprucelabs/test'\nimport { CliInterface } from '../../cli'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\nimport testUtil from '../../tests/utilities/test.utility'\n\nexport default class CreatingAConversationTopicTest extends AbstractCliTest {\n\t@test()\n\tprotected static async hasCreateConversationAction() {\n\t\tassert.isFunction(this.Action('conversation', 'create').execute)\n\t}\n\n\t@test()\n\tprotected static async createsValidConversationTopicDefinition() {\n\t\tconst cli = await this.FeatureFixture().installCachedFeatures(\n\t\t\t'conversation'\n\t\t)\n\n\t\tconst results = await this.Action('conversation', 'create').execute({\n\t\t\tnameReadable: 'book an appointment',\n\t\t\tnameCamel: 'bookAnAppointment',\n\t\t})\n\n\t\tconst match = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'bookAnAppointment.topic.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tconst imported = await this.Service('import').importDefault(match)\n\n\t\tassert.isTruthy(imported)\n\t\tassert.isEqual(imported.label, 'book an appointment')\n\t\tassert.isArray(imported.utterances)\n\t\tassert.isArray(imported.script)\n\n\t\tawait this.assertHealthCheckResultsAreValid(cli)\n\t}\n\n\tprivate static async assertHealthCheckResultsAreValid(cli: CliInterface) {\n\t\tconst health = await cli.checkHealth()\n\t\t//@ts-ignore\n\t\tassert.isTruthy(health.conversation)\n\t\t//@ts-ignore\n\t\tassert.isArray(health.conversation.topics)\n\t\t//@ts-ignore\n\t\tassert.isLength(health.conversation.topics, 1)\n\t\t//@ts-ignore\n\t\tassert.doesInclude(health.conversation.topics, 'bookAnAppointment')\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;IAEqBA,8B,WACnB,IAAAC,
|
|
1
|
+
{"version":3,"file":"CreatingAConversationTopic.test.js","names":["CreatingAConversationTopicTest","test","assert","isFunction","Action","execute","FeatureFixture","installCachedFeatures","cli","nameReadable","nameCamel","results","match","testUtil","assertFileByNameInGeneratedFiles","files","Service","importDefault","imported","isTruthy","isEqual","label","isArray","utterances","script","assertHealthCheckResultsAreValid","checkHealth","health","conversation","topics","isLength","doesInclude","AbstractCliTest"],"sources":["../../../src/__tests__/behavioral/CreatingAConversationTopic.test.ts"],"sourcesContent":["import '@sprucelabs/spruce-conversation-plugin'\nimport { test, assert } from '@sprucelabs/test-utils'\nimport { CliInterface } from '../../cli'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\nimport testUtil from '../../tests/utilities/test.utility'\n\nexport default class CreatingAConversationTopicTest extends AbstractCliTest {\n\t@test()\n\tprotected static async hasCreateConversationAction() {\n\t\tassert.isFunction(this.Action('conversation', 'create').execute)\n\t}\n\n\t@test()\n\tprotected static async createsValidConversationTopicDefinition() {\n\t\tconst cli = await this.FeatureFixture().installCachedFeatures(\n\t\t\t'conversation'\n\t\t)\n\n\t\tconst results = await this.Action('conversation', 'create').execute({\n\t\t\tnameReadable: 'book an appointment',\n\t\t\tnameCamel: 'bookAnAppointment',\n\t\t})\n\n\t\tconst match = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'bookAnAppointment.topic.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tconst imported = await this.Service('import').importDefault(match)\n\n\t\tassert.isTruthy(imported)\n\t\tassert.isEqual(imported.label, 'book an appointment')\n\t\tassert.isArray(imported.utterances)\n\t\tassert.isArray(imported.script)\n\n\t\tawait this.assertHealthCheckResultsAreValid(cli)\n\t}\n\n\tprivate static async assertHealthCheckResultsAreValid(cli: CliInterface) {\n\t\tconst health = await cli.checkHealth()\n\t\t//@ts-ignore\n\t\tassert.isTruthy(health.conversation)\n\t\t//@ts-ignore\n\t\tassert.isArray(health.conversation.topics)\n\t\t//@ts-ignore\n\t\tassert.isLength(health.conversation.topics, 1)\n\t\t//@ts-ignore\n\t\tassert.doesInclude(health.conversation.topics, 'bookAnAppointment')\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;IAEqBA,8B,WACnB,IAAAC,eAAA,G,UAKA,IAAAA,eAAA,G;;;;;;;;;;;;;uHALD;QAAA;UAAA;YAAA;cAAA;gBAECC,iBAAA,CAAOC,UAAP,CAAkB,KAAKC,MAAL,CAAY,cAAZ,EAA4B,QAA5B,EAAsCC,OAAxD;;cAFD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;;mIAKA;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA,OAEmB,KAAKC,cAAL,GAAsBC,qBAAtB,CACjB,cADiB,CAFnB;;cAAA;gBAEOC,GAFP;gBAAA;gBAAA,OAMuB,KAAKJ,MAAL,CAAY,cAAZ,EAA4B,QAA5B,EAAsCC,OAAtC,CAA8C;kBACnEI,YAAY,EAAE,qBADqD;kBAEnEC,SAAS,EAAE;gBAFwD,CAA9C,CANvB;;cAAA;gBAMOC,OANP;gBAWOC,KAXP,GAWeC,gBAAA,CAASC,gCAAT,CACb,4BADa,EAEbH,OAAO,CAACI,KAFK,CAXf;gBAAA;gBAAA,OAgBwB,KAAKC,OAAL,CAAa,QAAb,EAAuBC,aAAvB,CAAqCL,KAArC,CAhBxB;;cAAA;gBAgBOM,QAhBP;;gBAkBChB,iBAAA,CAAOiB,QAAP,CAAgBD,QAAhB;;gBACAhB,iBAAA,CAAOkB,OAAP,CAAeF,QAAQ,CAACG,KAAxB,EAA+B,qBAA/B;;gBACAnB,iBAAA,CAAOoB,OAAP,CAAeJ,QAAQ,CAACK,UAAxB;;gBACArB,iBAAA,CAAOoB,OAAP,CAAeJ,QAAQ,CAACM,MAAxB;;gBArBD;gBAAA,OAuBO,KAAKC,gCAAL,CAAsCjB,GAAtC,CAvBP;;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;;4HA0BA,kBAAsDA,GAAtD;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA,OACsBA,GAAG,CAACkB,WAAJ,EADtB;;cAAA;gBACOC,MADP;;gBAEC;gBACAzB,iBAAA,CAAOiB,QAAP,CAAgBQ,MAAM,CAACC,YAAvB,EAHD,CAIC;;;gBACA1B,iBAAA,CAAOoB,OAAP,CAAeK,MAAM,CAACC,YAAP,CAAoBC,MAAnC,EALD,CAMC;;;gBACA3B,iBAAA,CAAO4B,QAAP,CAAgBH,MAAM,CAACC,YAAP,CAAoBC,MAApC,EAA4C,CAA5C,EAPD,CAQC;;;gBACA3B,iBAAA,CAAO6B,WAAP,CAAmBJ,MAAM,CAACC,YAAP,CAAoBC,MAAvC,EAA+C,mBAA/C;;cATD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;EAhC2DG,4B"}
|
|
@@ -25,11 +25,11 @@ var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/
|
|
|
25
25
|
|
|
26
26
|
var _spruceSkillUtils = require("@sprucelabs/spruce-skill-utils");
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _testUtils = require("@sprucelabs/test-utils");
|
|
29
29
|
|
|
30
30
|
var _AbstractSchemaTest2 = _interopRequireDefault(require("../../tests/AbstractSchemaTest"));
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _test = _interopRequireDefault(require("../../tests/utilities/test.utility"));
|
|
33
33
|
|
|
34
34
|
var _dec, _class;
|
|
35
35
|
|
|
@@ -37,7 +37,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
37
37
|
|
|
38
38
|
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; } }
|
|
39
39
|
|
|
40
|
-
var CreatingSchemasWithGenericsTest = (_dec = (0,
|
|
40
|
+
var CreatingSchemasWithGenericsTest = (_dec = (0, _testUtils.test)(), (_class = /*#__PURE__*/function (_AbstractSchemaTest) {
|
|
41
41
|
(0, _inherits2["default"])(CreatingSchemasWithGenericsTest, _AbstractSchemaTest);
|
|
42
42
|
|
|
43
43
|
var _super = _createSuper(CreatingSchemasWithGenericsTest);
|
|
@@ -72,20 +72,20 @@ var CreatingSchemasWithGenericsTest = (_dec = (0, _test.test)(), (_class = /*#__
|
|
|
72
72
|
case 8:
|
|
73
73
|
results = _context.sent;
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
_testUtils.assert.isFalsy(results.errors);
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
_testUtils.assert.isTruthy(results.files);
|
|
78
78
|
|
|
79
|
-
match =
|
|
79
|
+
match = _test["default"].assertFileByNameInGeneratedFiles('schemas.types.ts', results.files);
|
|
80
80
|
contents = _spruceSkillUtils.diskUtil.readFile(match);
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
_testUtils.assert.doesInclude(contents, '<Type extends string = string>');
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
_testUtils.assert.doesInclude(contents, '<Type2 extends string = string>');
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
_testUtils.assert.doesInclude(contents, '<Type>');
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
_testUtils.assert.doesInclude(contents, "typedByGeneric'?: (Type2)| undefined | null");
|
|
89
89
|
|
|
90
90
|
_context.next = 19;
|
|
91
91
|
return this.assertValidActionResponseFiles(results);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreatingSchemasWithGenerics.test.js","names":["CreatingSchemasWithGenericsTest","test","installSchemaFeature","source","resolveTestPath","destination","resolvePath","diskUtil","copyDir","Action","execute","results","assert","isFalsy","errors","isTruthy","files","match","testUtil","assertFileByNameInGeneratedFiles","contents","readFile","doesInclude","assertValidActionResponseFiles","AbstractSchemaTest"],"sources":["../../../src/__tests__/behavioral/CreatingSchemasWithGenerics.test.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test'\nimport AbstractSchemaTest from '../../tests/AbstractSchemaTest'\nimport testUtil from '../../tests/utilities/test.utility'\n\nexport default class CreatingSchemasWithGenericsTest extends AbstractSchemaTest {\n\t@test()\n\tprotected static async schemaImportsLocalImports() {\n\t\tawait this.installSchemaFeature('schemas')\n\n\t\tconst source = this.resolveTestPath('schemas_with_suffix')\n\n\t\tconst destination = this.resolvePath('src', 'schemas')\n\n\t\tawait diskUtil.copyDir(source, destination)\n\n\t\tconst results = await this.Action('schema', 'sync').execute({})\n\n\t\tassert.isFalsy(results.errors)\n\t\tassert.isTruthy(results.files)\n\n\t\tconst match = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'schemas.types.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tconst contents = diskUtil.readFile(match)\n\t\tassert.doesInclude(contents, '<Type extends string = string>')\n\t\tassert.doesInclude(contents, '<Type2 extends string = string>')\n\t\tassert.doesInclude(contents, '<Type>')\n\t\tassert.doesInclude(contents, \"typedByGeneric'?: (Type2)| undefined | null\")\n\n\t\tawait this.assertValidActionResponseFiles(results)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;IAEqBA,+B,WACnB,IAAAC,
|
|
1
|
+
{"version":3,"file":"CreatingSchemasWithGenerics.test.js","names":["CreatingSchemasWithGenericsTest","test","installSchemaFeature","source","resolveTestPath","destination","resolvePath","diskUtil","copyDir","Action","execute","results","assert","isFalsy","errors","isTruthy","files","match","testUtil","assertFileByNameInGeneratedFiles","contents","readFile","doesInclude","assertValidActionResponseFiles","AbstractSchemaTest"],"sources":["../../../src/__tests__/behavioral/CreatingSchemasWithGenerics.test.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test-utils'\nimport AbstractSchemaTest from '../../tests/AbstractSchemaTest'\nimport testUtil from '../../tests/utilities/test.utility'\n\nexport default class CreatingSchemasWithGenericsTest extends AbstractSchemaTest {\n\t@test()\n\tprotected static async schemaImportsLocalImports() {\n\t\tawait this.installSchemaFeature('schemas')\n\n\t\tconst source = this.resolveTestPath('schemas_with_suffix')\n\n\t\tconst destination = this.resolvePath('src', 'schemas')\n\n\t\tawait diskUtil.copyDir(source, destination)\n\n\t\tconst results = await this.Action('schema', 'sync').execute({})\n\n\t\tassert.isFalsy(results.errors)\n\t\tassert.isTruthy(results.files)\n\n\t\tconst match = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'schemas.types.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tconst contents = diskUtil.readFile(match)\n\t\tassert.doesInclude(contents, '<Type extends string = string>')\n\t\tassert.doesInclude(contents, '<Type2 extends string = string>')\n\t\tassert.doesInclude(contents, '<Type>')\n\t\tassert.doesInclude(contents, \"typedByGeneric'?: (Type2)| undefined | null\")\n\n\t\tawait this.assertValidActionResponseFiles(results)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;IAEqBA,+B,WACnB,IAAAC,eAAA,G;;;;;;;;;;;;;qHAAD;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA,OAEO,KAAKC,oBAAL,CAA0B,SAA1B,CAFP;;cAAA;gBA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