@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
|
@@ -25,7 +25,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
25
25
|
|
|
26
26
|
var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/helpers/applyDecoratedDescriptor"));
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _testUtils = _interopRequireWildcard(require("@sprucelabs/test-utils"));
|
|
29
29
|
|
|
30
30
|
var _argParser = require("../../utilities/argParser.utility");
|
|
31
31
|
|
|
@@ -39,11 +39,11 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
39
39
|
|
|
40
40
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
41
41
|
|
|
42
|
-
var ArgParserTest = (_dec = (0,
|
|
42
|
+
var ArgParserTest = (_dec = (0, _testUtils.test)(), _dec2 = (0, _testUtils.test)('Parses empty string as empty array obj', '', {}), _dec3 = (0, _testUtils.test)('Parses `-d` as { d: "true" } ', '-d', {
|
|
43
43
|
d: 'true'
|
|
44
|
-
}), _dec4 = (0,
|
|
44
|
+
}), _dec4 = (0, _testUtils.test)('Parses `-d false` as { d: "false" }', '-d false', {
|
|
45
45
|
d: 'false'
|
|
46
|
-
}), _dec5 = (0,
|
|
46
|
+
}), _dec5 = (0, _testUtils.test)('Parses `-d false --test true` as { d: "false":, test: "true" }', '-d false --test true', {
|
|
47
47
|
d: 'false',
|
|
48
48
|
test: 'true'
|
|
49
49
|
}), (_class = /*#__PURE__*/function (_AbstractSpruceTest) {
|
|
@@ -64,7 +64,7 @@ var ArgParserTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)('Parses e
|
|
|
64
64
|
while (1) {
|
|
65
65
|
switch (_context.prev = _context.next) {
|
|
66
66
|
case 0:
|
|
67
|
-
|
|
67
|
+
_testUtils.assert.isTruthy(_argParser.argParserUtil);
|
|
68
68
|
|
|
69
69
|
case 1:
|
|
70
70
|
case "end":
|
|
@@ -91,7 +91,7 @@ var ArgParserTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)('Parses e
|
|
|
91
91
|
case 0:
|
|
92
92
|
results = _argParser.argParserUtil.parse(args);
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
_testUtils.assert.isEqualDeep(results, expected);
|
|
95
95
|
|
|
96
96
|
case 2:
|
|
97
97
|
case "end":
|
|
@@ -109,6 +109,6 @@ var ArgParserTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)('Parses e
|
|
|
109
109
|
}()
|
|
110
110
|
}]);
|
|
111
111
|
return ArgParserTest;
|
|
112
|
-
}(
|
|
112
|
+
}(_testUtils["default"]), ((0, _applyDecoratedDescriptor2["default"])(_class, "canGetArgParser", [_dec], Object.getOwnPropertyDescriptor(_class, "canGetArgParser"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "parse", [_dec2, _dec3, _dec4, _dec5], Object.getOwnPropertyDescriptor(_class, "parse"), _class)), _class));
|
|
113
113
|
exports["default"] = ArgParserTest;
|
|
114
114
|
//# sourceMappingURL=ArgParser.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArgParser.test.js","names":["ArgParserTest","test","d","assert","isTruthy","argParserUtil","args","expected","results","parse","isEqualDeep","AbstractSpruceTest"],"sources":["../../../src/__tests__/implementation/ArgParser.test.ts"],"sourcesContent":["import AbstractSpruceTest, { test, assert } from '@sprucelabs/test'\nimport { argParserUtil } from '../../utilities/argParser.utility'\n\nexport default class ArgParserTest extends AbstractSpruceTest {\n\t@test()\n\tprotected static async canGetArgParser() {\n\t\tassert.isTruthy(argParserUtil)\n\t}\n\n\t@test('Parses empty string as empty array obj', '', {})\n\t@test('Parses `-d` as { d: \"true\" } ', '-d', { d: 'true' })\n\t@test('Parses `-d false` as { d: \"false\" }', '-d false', { d: 'false' })\n\t@test(\n\t\t'Parses `-d false --test true` as { d: \"false\":, test: \"true\" }',\n\t\t'-d false --test true',\n\t\t{ d: 'false', test: 'true' }\n\t)\n\tprotected static async parse(args: string, expected: Record<string, string>) {\n\t\tconst results = argParserUtil.parse(args)\n\t\tassert.isEqualDeep(results, expected)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;;;;;;;;;;;IAEqBA,a,WACnB,IAAAC,
|
|
1
|
+
{"version":3,"file":"ArgParser.test.js","names":["ArgParserTest","test","d","assert","isTruthy","argParserUtil","args","expected","results","parse","isEqualDeep","AbstractSpruceTest"],"sources":["../../../src/__tests__/implementation/ArgParser.test.ts"],"sourcesContent":["import AbstractSpruceTest, { test, assert } from '@sprucelabs/test-utils'\nimport { argParserUtil } from '../../utilities/argParser.utility'\n\nexport default class ArgParserTest extends AbstractSpruceTest {\n\t@test()\n\tprotected static async canGetArgParser() {\n\t\tassert.isTruthy(argParserUtil)\n\t}\n\n\t@test('Parses empty string as empty array obj', '', {})\n\t@test('Parses `-d` as { d: \"true\" } ', '-d', { d: 'true' })\n\t@test('Parses `-d false` as { d: \"false\" }', '-d false', { d: 'false' })\n\t@test(\n\t\t'Parses `-d false --test true` as { d: \"false\":, test: \"true\" }',\n\t\t'-d false --test true',\n\t\t{ d: 'false', test: 'true' }\n\t)\n\tprotected static async parse(args: string, expected: Record<string, string>) {\n\t\tconst results = argParserUtil.parse(args)\n\t\tassert.isEqualDeep(results, expected)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;;;;;;;;;;;IAEqBA,a,WACnB,IAAAC,eAAA,G,UAKA,IAAAA,eAAA,EAAK,wCAAL,EAA+C,EAA/C,EAAmD,EAAnD,C,UACA,IAAAA,eAAA,EAAK,+BAAL,EAAsC,IAAtC,EAA4C;EAAEC,CAAC,EAAE;AAAL,CAA5C,C,UACA,IAAAD,eAAA,EAAK,qCAAL,EAA4C,UAA5C,EAAwD;EAAEC,CAAC,EAAE;AAAL,CAAxD,C,UACA,IAAAD,eAAA,EACA,gEADA,EAEA,sBAFA,EAGA;EAAEC,CAAC,EAAE,OAAL;EAAcD,IAAI,EAAE;AAApB,CAHA,C;;;;;;;;;;;;;2GARD;QAAA;UAAA;YAAA;cAAA;gBAECE,iBAAA,CAAOC,QAAP,CAAgBC,wBAAhB;;cAFD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;;iGAKA,kBAQ6BC,IAR7B,EAQ2CC,QAR3C;QAAA;QAAA;UAAA;YAAA;cAAA;gBASOC,OATP,GASiBH,wBAAA,CAAcI,KAAd,CAAoBH,IAApB,CATjB;;gBAUCH,iBAAA,CAAOO,WAAP,CAAmBF,OAAnB,EAA4BD,QAA5B;;cAVD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;EAN0CI,qB"}
|
|
@@ -25,7 +25,7 @@ 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
|
|
|
@@ -35,7 +35,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
35
35
|
|
|
36
36
|
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; } }
|
|
37
37
|
|
|
38
|
-
var BuildServiceTest = (_dec = (0,
|
|
38
|
+
var BuildServiceTest = (_dec = (0, _testUtils.test)(), _dec2 = (0, _testUtils.test)(), (_class = /*#__PURE__*/function (_AbstractCliTest) {
|
|
39
39
|
(0, _inherits2["default"])(BuildServiceTest, _AbstractCliTest);
|
|
40
40
|
|
|
41
41
|
var _super = _createSuper(BuildServiceTest);
|
|
@@ -50,7 +50,7 @@ var BuildServiceTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), (_c
|
|
|
50
50
|
value: function buildServiceExists() {
|
|
51
51
|
var service = this.Service('build');
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
_testUtils.assert.isTruthy(service);
|
|
54
54
|
}
|
|
55
55
|
}, {
|
|
56
56
|
key: "canBuildSkill",
|
|
@@ -78,7 +78,7 @@ var BuildServiceTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), (_c
|
|
|
78
78
|
builtFilePath = this.resolvePath('build/test.js');
|
|
79
79
|
contents = _spruceSkillUtils.diskUtil.readFile(builtFilePath);
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
_testUtils.assert.isEqual(contents, "\"use strict\";\nconst testVar = 'hello world';\nconsole.log(testVar);\n//# sourceMappingURL=test.js.map");
|
|
82
82
|
|
|
83
83
|
case 11:
|
|
84
84
|
case "end":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BuildService.test.js","names":["BuildServiceTest","test","service","Service","assert","isTruthy","installSkill","testFile","destination","resolvePath","diskUtil","writeFile","build","builtFilePath","contents","readFile","isEqual","cacheKey","FeatureFixture","installCachedFeatures","AbstractCliTest"],"sources":["../../../src/__tests__/implementation/BuildService.test.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\n\nexport default class BuildServiceTest extends AbstractCliTest {\n\t@test()\n\tprotected static buildServiceExists() {\n\t\tconst service = this.Service('build')\n\t\tassert.isTruthy(service)\n\t}\n\n\t@test()\n\tprotected static async canBuildSkill() {\n\t\tawait this.installSkill('skills')\n\n\t\tconst testFile = \"const testVar = 'hello world'\\nconsole.log(testVar)\\n\"\n\t\tconst destination = this.resolvePath('src/test.ts')\n\t\tdiskUtil.writeFile(destination, testFile)\n\n\t\tconst service = this.Service('build')\n\t\tawait service.build()\n\n\t\tconst builtFilePath = this.resolvePath('build/test.js')\n\t\tconst contents = diskUtil.readFile(builtFilePath)\n\n\t\tassert.isEqual(\n\t\t\tcontents,\n\t\t\t`\"use strict\";\nconst testVar = 'hello world';\nconsole.log(testVar);\n//# sourceMappingURL=test.js.map`\n\t\t)\n\t}\n\n\tprivate static async installSkill(cacheKey?: string) {\n\t\tawait this.FeatureFixture().installCachedFeatures(cacheKey ?? 'skills')\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;IAEqBA,gB,WACnB,IAAAC,
|
|
1
|
+
{"version":3,"file":"BuildService.test.js","names":["BuildServiceTest","test","service","Service","assert","isTruthy","installSkill","testFile","destination","resolvePath","diskUtil","writeFile","build","builtFilePath","contents","readFile","isEqual","cacheKey","FeatureFixture","installCachedFeatures","AbstractCliTest"],"sources":["../../../src/__tests__/implementation/BuildService.test.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test-utils'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\n\nexport default class BuildServiceTest extends AbstractCliTest {\n\t@test()\n\tprotected static buildServiceExists() {\n\t\tconst service = this.Service('build')\n\t\tassert.isTruthy(service)\n\t}\n\n\t@test()\n\tprotected static async canBuildSkill() {\n\t\tawait this.installSkill('skills')\n\n\t\tconst testFile = \"const testVar = 'hello world'\\nconsole.log(testVar)\\n\"\n\t\tconst destination = this.resolvePath('src/test.ts')\n\t\tdiskUtil.writeFile(destination, testFile)\n\n\t\tconst service = this.Service('build')\n\t\tawait service.build()\n\n\t\tconst builtFilePath = this.resolvePath('build/test.js')\n\t\tconst contents = diskUtil.readFile(builtFilePath)\n\n\t\tassert.isEqual(\n\t\t\tcontents,\n\t\t\t`\"use strict\";\nconst testVar = 'hello world';\nconsole.log(testVar);\n//# sourceMappingURL=test.js.map`\n\t\t)\n\t}\n\n\tprivate static async installSkill(cacheKey?: string) {\n\t\tawait this.FeatureFixture().installCachedFeatures(cacheKey ?? 'skills')\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;IAEqBA,gB,WACnB,IAAAC,eAAA,G,UAMA,IAAAA,eAAA,G;;;;;;;;;;;;WAND,8BACsC;MACrC,IAAMC,OAAO,GAAG,KAAKC,OAAL,CAAa,OAAb,CAAhB;;MACAC,iBAAA,CAAOC,QAAP,CAAgBH,OAAhB;IACA;;;;yGAED;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA,OAEO,KAAKI,YAAL,CAAkB,QAAlB,CAFP;;cAAA;gBAIOC,QAJP,GAIkB,uDAJlB;gBAKOC,WALP,GAKqB,KAAKC,WAAL,CAAiB,aAAjB,CALrB;;gBAMCC,0BAAA,CAASC,SAAT,CAAmBH,WAAnB,EAAgCD,QAAhC;;gBAEML,OARP,GAQiB,KAAKC,OAAL,CAAa,OAAb,CARjB;gBAAA;gBAAA,OASOD,OAAO,CAACU,KAAR,EATP;;cAAA;gBAWOC,aAXP,GAWuB,KAAKJ,WAAL,CAAiB,eAAjB,CAXvB;gBAYOK,QAZP,GAYkBJ,0BAAA,CAASK,QAAT,CAAkBF,aAAlB,CAZlB;;gBAcCT,iBAAA,CAAOY,OAAP,CACCF,QADD;;cAdD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;;wGAuBA,kBAAkCG,QAAlC;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA,OACO,KAAKC,cAAL,GAAsBC,qBAAtB,CAA4CF,QAA5C,aAA4CA,QAA5C,cAA4CA,QAA5C,GAAwD,QAAxD,CADP;;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;EA9B6CG,4B"}
|
|
@@ -33,9 +33,7 @@ var _path = _interopRequireDefault(require("path"));
|
|
|
33
33
|
|
|
34
34
|
var _spruceSkillUtils = require("@sprucelabs/spruce-skill-utils");
|
|
35
35
|
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
var _testUtils = require("@sprucelabs/test-utils");
|
|
36
|
+
var _testUtils = _interopRequireWildcard(require("@sprucelabs/test-utils"));
|
|
39
37
|
|
|
40
38
|
var _ServiceFactory = _interopRequireDefault(require("../../services/ServiceFactory"));
|
|
41
39
|
|
|
@@ -49,7 +47,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
49
47
|
|
|
50
48
|
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; } }
|
|
51
49
|
|
|
52
|
-
var BulkImportingTest = (_dec = (0,
|
|
50
|
+
var BulkImportingTest = (_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)(), _dec8 = (0, _testUtils.test)(), _dec9 = (0, _testUtils.test)(), (_class = (_class2 = /*#__PURE__*/function (_AbstractSpruceTest) {
|
|
53
51
|
(0, _inherits2["default"])(BulkImportingTest, _AbstractSpruceTest);
|
|
54
52
|
|
|
55
53
|
var _super = _createSuper(BulkImportingTest);
|
|
@@ -97,7 +95,7 @@ var BulkImportingTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _d
|
|
|
97
95
|
while (1) {
|
|
98
96
|
switch (_context2.prev = _context2.next) {
|
|
99
97
|
case 0:
|
|
100
|
-
|
|
98
|
+
_testUtils.assert.isFunction(this.importer.bulkImport);
|
|
101
99
|
|
|
102
100
|
case 1:
|
|
103
101
|
case "end":
|
|
@@ -131,11 +129,11 @@ var BulkImportingTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _d
|
|
|
131
129
|
_yield$this$importer$2 = (0, _slicedToArray2["default"])(_yield$this$importer$, 1);
|
|
132
130
|
schemaOne = _yield$this$importer$2[0];
|
|
133
131
|
|
|
134
|
-
|
|
132
|
+
_testUtils.assert.isTruthy(schemaOne);
|
|
135
133
|
|
|
136
|
-
|
|
134
|
+
_testUtils.assert.isTruthy(schemaOne.id);
|
|
137
135
|
|
|
138
|
-
|
|
136
|
+
_testUtils.assert.isEqual(schemaOne.id, 'schemaOne');
|
|
139
137
|
|
|
140
138
|
case 8:
|
|
141
139
|
case "end":
|
|
@@ -166,7 +164,7 @@ var BulkImportingTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _d
|
|
|
166
164
|
case 2:
|
|
167
165
|
results = _context4.sent;
|
|
168
166
|
|
|
169
|
-
|
|
167
|
+
_testUtils.assert.isLength(results, 0);
|
|
170
168
|
|
|
171
169
|
case 4:
|
|
172
170
|
case "end":
|
|
@@ -201,11 +199,11 @@ var BulkImportingTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _d
|
|
|
201
199
|
schemaOne = _yield$this$importer$4[0];
|
|
202
200
|
schemaTwo = _yield$this$importer$4[1];
|
|
203
201
|
|
|
204
|
-
|
|
202
|
+
_testUtils.assert.isTruthy(schemaOne);
|
|
205
203
|
|
|
206
|
-
|
|
204
|
+
_testUtils.assert.isTruthy(schemaTwo);
|
|
207
205
|
|
|
208
|
-
|
|
206
|
+
_testUtils.assert.isTruthy(schemaTwo.id, 'schemaTwo');
|
|
209
207
|
|
|
210
208
|
case 9:
|
|
211
209
|
case "end":
|
|
@@ -236,7 +234,7 @@ var BulkImportingTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _d
|
|
|
236
234
|
case 2:
|
|
237
235
|
tmpDir = this.resolvePath('.tmp');
|
|
238
236
|
|
|
239
|
-
|
|
237
|
+
_testUtils.assert.isFalse(_spruceSkillUtils.diskUtil.doesDirExist(tmpDir));
|
|
240
238
|
|
|
241
239
|
case 4:
|
|
242
240
|
case "end":
|
|
@@ -264,14 +262,14 @@ var BulkImportingTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _d
|
|
|
264
262
|
switch (_context7.prev = _context7.next) {
|
|
265
263
|
case 0:
|
|
266
264
|
_context7.next = 2;
|
|
267
|
-
return
|
|
265
|
+
return _testUtils.assert.doesThrowAsync(function () {
|
|
268
266
|
return _this.importer.bulkImport([_this.resolveTestPath('test_builders_one_bad/v2020_06_23/badSchema.builder.ts')]);
|
|
269
267
|
});
|
|
270
268
|
|
|
271
269
|
case 2:
|
|
272
270
|
tmpDir = this.resolvePath('.tmp');
|
|
273
271
|
|
|
274
|
-
|
|
272
|
+
_testUtils.assert.isFalse(_spruceSkillUtils.diskUtil.doesDirExist(tmpDir));
|
|
275
273
|
|
|
276
274
|
case 4:
|
|
277
275
|
case "end":
|
|
@@ -299,7 +297,7 @@ var BulkImportingTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _d
|
|
|
299
297
|
switch (_context8.prev = _context8.next) {
|
|
300
298
|
case 0:
|
|
301
299
|
_context8.next = 2;
|
|
302
|
-
return
|
|
300
|
+
return _testUtils.assert.doesThrowAsync(function () {
|
|
303
301
|
return _this2.importer.bulkImport([_this2.resolveTestPath('test_builders_one_bad/v2020_06_23/badSchema.builder.ts')]);
|
|
304
302
|
});
|
|
305
303
|
|
|
@@ -308,7 +306,7 @@ var BulkImportingTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _d
|
|
|
308
306
|
|
|
309
307
|
_testUtils.errorAssert.assertError(err, 'FAILED_TO_IMPORT');
|
|
310
308
|
|
|
311
|
-
|
|
309
|
+
_testUtils.assert.doesInclude(err.options.file, 'badSchema.builder.ts');
|
|
312
310
|
|
|
313
311
|
case 5:
|
|
314
312
|
case "end":
|
|
@@ -336,7 +334,7 @@ var BulkImportingTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _d
|
|
|
336
334
|
switch (_context9.prev = _context9.next) {
|
|
337
335
|
case 0:
|
|
338
336
|
_context9.next = 2;
|
|
339
|
-
return
|
|
337
|
+
return _testUtils.assert.doesThrowAsync(function () {
|
|
340
338
|
return _this3.importer.bulkImport([_this3.resolveTestPath('test_builders_two_bad/v2020_06_23/anotherBad.builder.ts'), _this3.resolveTestPath('test_builders_two_bad/v2020_06_23/badSchema.builder.ts'), _this3.resolveTestPath('test_builders/v2020_06_23/schemaTwo.builder.ts'), _this3.resolveTestPath('test_builders/v2020_06_23/schemaOne.builder.ts')]);
|
|
341
339
|
});
|
|
342
340
|
|
|
@@ -345,7 +343,7 @@ var BulkImportingTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _d
|
|
|
345
343
|
|
|
346
344
|
_testUtils.errorAssert.assertError(err, 'FAILED_TO_IMPORT');
|
|
347
345
|
|
|
348
|
-
|
|
346
|
+
_testUtils.assert.doesInclude(err.options.file, 'anotherBad.builder.ts');
|
|
349
347
|
|
|
350
348
|
case 5:
|
|
351
349
|
case "end":
|
|
@@ -373,7 +371,7 @@ var BulkImportingTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _d
|
|
|
373
371
|
switch (_context10.prev = _context10.next) {
|
|
374
372
|
case 0:
|
|
375
373
|
_context10.next = 2;
|
|
376
|
-
return
|
|
374
|
+
return _testUtils.assert.doesThrowAsync(function () {
|
|
377
375
|
return _this4.importer.bulkImport([_this4.resolveTestPath('test_builders/v2020_06_23/schemaTwo.builder.ts'), _this4.resolveTestPath('test_builders/v2020_06_23/schemaOne.builder.ts'), _this4.resolveTestPath('test_builders_two_bad/v2020_06_23/notDefault.builder.ts')]);
|
|
378
376
|
});
|
|
379
377
|
|
|
@@ -382,7 +380,7 @@ var BulkImportingTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _d
|
|
|
382
380
|
|
|
383
381
|
_testUtils.errorAssert.assertError(err, 'FAILED_TO_IMPORT');
|
|
384
382
|
|
|
385
|
-
|
|
383
|
+
_testUtils.assert.doesInclude(err.options.file, 'notDefault.builder.ts');
|
|
386
384
|
|
|
387
385
|
case 5:
|
|
388
386
|
case "end":
|
|
@@ -409,6 +407,6 @@ var BulkImportingTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _d
|
|
|
409
407
|
}
|
|
410
408
|
}]);
|
|
411
409
|
return BulkImportingTest;
|
|
412
|
-
}(
|
|
410
|
+
}(_testUtils["default"]), (0, _defineProperty2["default"])(_class2, "importer", void 0), _class2), ((0, _applyDecoratedDescriptor2["default"])(_class, "importerHasBulkImportMethod", [_dec], Object.getOwnPropertyDescriptor(_class, "importerHasBulkImportMethod"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canImportSingleFile", [_dec2], Object.getOwnPropertyDescriptor(_class, "canImportSingleFile"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "importingNothingGoesFast", [_dec3], Object.getOwnPropertyDescriptor(_class, "importingNothingGoesFast"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canImportTwoFiles", [_dec4], Object.getOwnPropertyDescriptor(_class, "canImportTwoFiles"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "shouldCleanupTmpDir", [_dec5], Object.getOwnPropertyDescriptor(_class, "shouldCleanupTmpDir"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "cleansUpOnError", [_dec6], Object.getOwnPropertyDescriptor(_class, "cleansUpOnError"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "throwsOnTheActualFileWithAnError", [_dec7], Object.getOwnPropertyDescriptor(_class, "throwsOnTheActualFileWithAnError"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "throwsOnTheFirstActualFileWithAnErrorWithManyFiles", [_dec8], Object.getOwnPropertyDescriptor(_class, "throwsOnTheFirstActualFileWithAnErrorWithManyFiles"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "helpfulErrorWhenImportNotExportedAsDefault", [_dec9], Object.getOwnPropertyDescriptor(_class, "helpfulErrorWhenImportNotExportedAsDefault"), _class)), _class));
|
|
413
411
|
exports["default"] = BulkImportingTest;
|
|
414
412
|
//# sourceMappingURL=BulkImporting.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BulkImporting.test.js","names":["BulkImportingTest","test","factory","ServiceFactory","importer","Service","cwd","tmpDir","resolvePath","diskUtil","deleteDir","assert","isFunction","bulkImport","resolveTestPath","schemaOne","isTruthy","id","isEqual","results","isLength","schemaTwo","isFalse","doesDirExist","doesThrowAsync","err","errorAssert","assertError","doesInclude","options","file","pathAfterTestDirsAndFiles","pathUil","join","AbstractSpruceTest"],"sources":["../../../src/__tests__/implementation/BulkImporting.test.ts"],"sourcesContent":["import pathUil from 'path'\nimport { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport AbstractSpruceTest, { test, assert } from '@sprucelabs/test'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport ImportService from '../../services/ImportService'\nimport ServiceFactory from '../../services/ServiceFactory'\n\nexport default class BulkImportingTest extends AbstractSpruceTest {\n\tprivate static importer: ImportService\n\n\tprotected static async beforeEach() {\n\t\t// await super.beforeEach()\n\t\tconst factory = new ServiceFactory()\n\t\tthis.importer = factory.Service(this.cwd, 'import')\n\n\t\tconst tmpDir = this.resolvePath('.tmp')\n\t\tdiskUtil.deleteDir(tmpDir)\n\t}\n\n\t@test()\n\tprotected static async importerHasBulkImportMethod() {\n\t\tassert.isFunction(this.importer.bulkImport)\n\t}\n\n\t@test()\n\tprotected static async canImportSingleFile() {\n\t\tconst [schemaOne] = await this.importer.bulkImport([\n\t\t\tthis.resolveTestPath('test_builders/v2020_06_23/schemaOne.builder.ts'),\n\t\t])\n\n\t\tassert.isTruthy(schemaOne)\n\t\tassert.isTruthy(schemaOne.id)\n\t\tassert.isEqual(schemaOne.id, 'schemaOne')\n\t}\n\n\t@test()\n\tprotected static async importingNothingGoesFast() {\n\t\tconst results = await this.importer.bulkImport([])\n\t\tassert.isLength(results, 0)\n\t}\n\n\t@test()\n\tprotected static async canImportTwoFiles() {\n\t\tconst [schemaOne, schemaTwo] = await this.importer.bulkImport([\n\t\t\tthis.resolveTestPath('test_builders/v2020_06_23/schemaOne.builder.ts'),\n\t\t\tthis.resolveTestPath('test_builders/v2020_06_23/schemaTwo.builder.ts'),\n\t\t])\n\n\t\tassert.isTruthy(schemaOne)\n\t\tassert.isTruthy(schemaTwo)\n\t\tassert.isTruthy(schemaTwo.id, 'schemaTwo')\n\t}\n\n\t@test()\n\tprotected static async shouldCleanupTmpDir() {\n\t\tawait this.importer.bulkImport([\n\t\t\tthis.resolveTestPath('test_builders/v2020_06_23/schemaOne.builder.ts'),\n\t\t\tthis.resolveTestPath('test_builders/v2020_06_23/schemaTwo.builder.ts'),\n\t\t])\n\n\t\tconst tmpDir = this.resolvePath('.tmp')\n\t\tassert.isFalse(diskUtil.doesDirExist(tmpDir))\n\t}\n\n\t@test()\n\tprotected static async cleansUpOnError() {\n\t\tawait assert.doesThrowAsync(() =>\n\t\t\tthis.importer.bulkImport([\n\t\t\t\tthis.resolveTestPath(\n\t\t\t\t\t'test_builders_one_bad/v2020_06_23/badSchema.builder.ts'\n\t\t\t\t),\n\t\t\t])\n\t\t)\n\n\t\tconst tmpDir = this.resolvePath('.tmp')\n\t\tassert.isFalse(diskUtil.doesDirExist(tmpDir))\n\t}\n\n\t@test()\n\tprotected static async throwsOnTheActualFileWithAnError() {\n\t\tconst err = await assert.doesThrowAsync(() =>\n\t\t\tthis.importer.bulkImport([\n\t\t\t\tthis.resolveTestPath(\n\t\t\t\t\t'test_builders_one_bad/v2020_06_23/badSchema.builder.ts'\n\t\t\t\t),\n\t\t\t])\n\t\t)\n\n\t\terrorAssert.assertError(err, 'FAILED_TO_IMPORT')\n\t\tassert.doesInclude((err as any).options.file, 'badSchema.builder.ts')\n\t}\n\n\t@test()\n\tprotected static async throwsOnTheFirstActualFileWithAnErrorWithManyFiles() {\n\t\tconst err = await assert.doesThrowAsync(() =>\n\t\t\tthis.importer.bulkImport([\n\t\t\t\tthis.resolveTestPath(\n\t\t\t\t\t'test_builders_two_bad/v2020_06_23/anotherBad.builder.ts'\n\t\t\t\t),\n\t\t\t\tthis.resolveTestPath(\n\t\t\t\t\t'test_builders_two_bad/v2020_06_23/badSchema.builder.ts'\n\t\t\t\t),\n\n\t\t\t\tthis.resolveTestPath('test_builders/v2020_06_23/schemaTwo.builder.ts'),\n\t\t\t\tthis.resolveTestPath('test_builders/v2020_06_23/schemaOne.builder.ts'),\n\t\t\t])\n\t\t)\n\n\t\terrorAssert.assertError(err, 'FAILED_TO_IMPORT')\n\t\tassert.doesInclude((err as any).options.file, 'anotherBad.builder.ts')\n\t}\n\n\t@test()\n\tprotected static async helpfulErrorWhenImportNotExportedAsDefault() {\n\t\tconst err = await assert.doesThrowAsync(() =>\n\t\t\tthis.importer.bulkImport([\n\t\t\t\tthis.resolveTestPath('test_builders/v2020_06_23/schemaTwo.builder.ts'),\n\t\t\t\tthis.resolveTestPath('test_builders/v2020_06_23/schemaOne.builder.ts'),\n\t\t\t\tthis.resolveTestPath(\n\t\t\t\t\t'test_builders_two_bad/v2020_06_23/notDefault.builder.ts'\n\t\t\t\t),\n\t\t\t])\n\t\t)\n\n\t\terrorAssert.assertError(err, 'FAILED_TO_IMPORT')\n\t\tassert.doesInclude((err as any).options.file, 'notDefault.builder.ts')\n\t}\n\n\tprotected static resolveTestPath(...pathAfterTestDirsAndFiles: string[]) {\n\t\treturn pathUil.join(\n\t\t\tthis.cwd,\n\t\t\t'build',\n\t\t\t'__tests__',\n\t\t\t'testDirsAndFiles',\n\t\t\t...pathAfterTestDirsAndFiles\n\t\t)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;
|
|
1
|
+
{"version":3,"file":"BulkImporting.test.js","names":["BulkImportingTest","test","factory","ServiceFactory","importer","Service","cwd","tmpDir","resolvePath","diskUtil","deleteDir","assert","isFunction","bulkImport","resolveTestPath","schemaOne","isTruthy","id","isEqual","results","isLength","schemaTwo","isFalse","doesDirExist","doesThrowAsync","err","errorAssert","assertError","doesInclude","options","file","pathAfterTestDirsAndFiles","pathUil","join","AbstractSpruceTest"],"sources":["../../../src/__tests__/implementation/BulkImporting.test.ts"],"sourcesContent":["import pathUil from 'path'\nimport { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport AbstractSpruceTest, { test, assert } from '@sprucelabs/test-utils'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport ImportService from '../../services/ImportService'\nimport ServiceFactory from '../../services/ServiceFactory'\n\nexport default class BulkImportingTest extends AbstractSpruceTest {\n\tprivate static importer: ImportService\n\n\tprotected static async beforeEach() {\n\t\t// await super.beforeEach()\n\t\tconst factory = new ServiceFactory()\n\t\tthis.importer = factory.Service(this.cwd, 'import')\n\n\t\tconst tmpDir = this.resolvePath('.tmp')\n\t\tdiskUtil.deleteDir(tmpDir)\n\t}\n\n\t@test()\n\tprotected static async importerHasBulkImportMethod() {\n\t\tassert.isFunction(this.importer.bulkImport)\n\t}\n\n\t@test()\n\tprotected static async canImportSingleFile() {\n\t\tconst [schemaOne] = await this.importer.bulkImport([\n\t\t\tthis.resolveTestPath('test_builders/v2020_06_23/schemaOne.builder.ts'),\n\t\t])\n\n\t\tassert.isTruthy(schemaOne)\n\t\tassert.isTruthy(schemaOne.id)\n\t\tassert.isEqual(schemaOne.id, 'schemaOne')\n\t}\n\n\t@test()\n\tprotected static async importingNothingGoesFast() {\n\t\tconst results = await this.importer.bulkImport([])\n\t\tassert.isLength(results, 0)\n\t}\n\n\t@test()\n\tprotected static async canImportTwoFiles() {\n\t\tconst [schemaOne, schemaTwo] = await this.importer.bulkImport([\n\t\t\tthis.resolveTestPath('test_builders/v2020_06_23/schemaOne.builder.ts'),\n\t\t\tthis.resolveTestPath('test_builders/v2020_06_23/schemaTwo.builder.ts'),\n\t\t])\n\n\t\tassert.isTruthy(schemaOne)\n\t\tassert.isTruthy(schemaTwo)\n\t\tassert.isTruthy(schemaTwo.id, 'schemaTwo')\n\t}\n\n\t@test()\n\tprotected static async shouldCleanupTmpDir() {\n\t\tawait this.importer.bulkImport([\n\t\t\tthis.resolveTestPath('test_builders/v2020_06_23/schemaOne.builder.ts'),\n\t\t\tthis.resolveTestPath('test_builders/v2020_06_23/schemaTwo.builder.ts'),\n\t\t])\n\n\t\tconst tmpDir = this.resolvePath('.tmp')\n\t\tassert.isFalse(diskUtil.doesDirExist(tmpDir))\n\t}\n\n\t@test()\n\tprotected static async cleansUpOnError() {\n\t\tawait assert.doesThrowAsync(() =>\n\t\t\tthis.importer.bulkImport([\n\t\t\t\tthis.resolveTestPath(\n\t\t\t\t\t'test_builders_one_bad/v2020_06_23/badSchema.builder.ts'\n\t\t\t\t),\n\t\t\t])\n\t\t)\n\n\t\tconst tmpDir = this.resolvePath('.tmp')\n\t\tassert.isFalse(diskUtil.doesDirExist(tmpDir))\n\t}\n\n\t@test()\n\tprotected static async throwsOnTheActualFileWithAnError() {\n\t\tconst err = await assert.doesThrowAsync(() =>\n\t\t\tthis.importer.bulkImport([\n\t\t\t\tthis.resolveTestPath(\n\t\t\t\t\t'test_builders_one_bad/v2020_06_23/badSchema.builder.ts'\n\t\t\t\t),\n\t\t\t])\n\t\t)\n\n\t\terrorAssert.assertError(err, 'FAILED_TO_IMPORT')\n\t\tassert.doesInclude((err as any).options.file, 'badSchema.builder.ts')\n\t}\n\n\t@test()\n\tprotected static async throwsOnTheFirstActualFileWithAnErrorWithManyFiles() {\n\t\tconst err = await assert.doesThrowAsync(() =>\n\t\t\tthis.importer.bulkImport([\n\t\t\t\tthis.resolveTestPath(\n\t\t\t\t\t'test_builders_two_bad/v2020_06_23/anotherBad.builder.ts'\n\t\t\t\t),\n\t\t\t\tthis.resolveTestPath(\n\t\t\t\t\t'test_builders_two_bad/v2020_06_23/badSchema.builder.ts'\n\t\t\t\t),\n\n\t\t\t\tthis.resolveTestPath('test_builders/v2020_06_23/schemaTwo.builder.ts'),\n\t\t\t\tthis.resolveTestPath('test_builders/v2020_06_23/schemaOne.builder.ts'),\n\t\t\t])\n\t\t)\n\n\t\terrorAssert.assertError(err, 'FAILED_TO_IMPORT')\n\t\tassert.doesInclude((err as any).options.file, 'anotherBad.builder.ts')\n\t}\n\n\t@test()\n\tprotected static async helpfulErrorWhenImportNotExportedAsDefault() {\n\t\tconst err = await assert.doesThrowAsync(() =>\n\t\t\tthis.importer.bulkImport([\n\t\t\t\tthis.resolveTestPath('test_builders/v2020_06_23/schemaTwo.builder.ts'),\n\t\t\t\tthis.resolveTestPath('test_builders/v2020_06_23/schemaOne.builder.ts'),\n\t\t\t\tthis.resolveTestPath(\n\t\t\t\t\t'test_builders_two_bad/v2020_06_23/notDefault.builder.ts'\n\t\t\t\t),\n\t\t\t])\n\t\t)\n\n\t\terrorAssert.assertError(err, 'FAILED_TO_IMPORT')\n\t\tassert.doesInclude((err as any).options.file, 'notDefault.builder.ts')\n\t}\n\n\tprotected static resolveTestPath(...pathAfterTestDirsAndFiles: string[]) {\n\t\treturn pathUil.join(\n\t\t\tthis.cwd,\n\t\t\t'build',\n\t\t\t'__tests__',\n\t\t\t'testDirsAndFiles',\n\t\t\t...pathAfterTestDirsAndFiles\n\t\t)\n\t}\n}\n"],"mappings":"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"}
|
|
@@ -29,7 +29,7 @@ var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/
|
|
|
29
29
|
|
|
30
30
|
var _spruceSkillUtils = require("@sprucelabs/spruce-skill-utils");
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _testUtils = require("@sprucelabs/test-utils");
|
|
33
33
|
|
|
34
34
|
var _ImportService = _interopRequireDefault(require("../../services/ImportService"));
|
|
35
35
|
|
|
@@ -41,7 +41,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
41
41
|
|
|
42
42
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
43
43
|
|
|
44
|
-
var CachingImportsTest = (_dec = (0,
|
|
44
|
+
var CachingImportsTest = (_dec = (0, _testUtils.test)(), _dec2 = (0, _testUtils.test)(), _dec3 = (0, _testUtils.test)(), (_class = (_class2 = /*#__PURE__*/function (_AbstractCliTest) {
|
|
45
45
|
(0, _inherits2["default"])(CachingImportsTest, _AbstractCliTest);
|
|
46
46
|
|
|
47
47
|
var _super = _createSuper(CachingImportsTest);
|
|
@@ -138,7 +138,7 @@ var CachingImportsTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _
|
|
|
138
138
|
case 2:
|
|
139
139
|
contents = _context3.sent;
|
|
140
140
|
|
|
141
|
-
|
|
141
|
+
_testUtils.assert.isEqualDeep(contents, expected);
|
|
142
142
|
|
|
143
143
|
case 4:
|
|
144
144
|
case "end":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CachingImports.test.js","names":["CachingImportsTest","test","ImportService","setCacheDir","diskUtil","createRandomTempDir","importService","Service","enableCaching","test1Path","resolvePath","writeFile","assertImportedCorrectly","hello","foo","expected","importAll","contents","assert","isEqualDeep","test2Path","FeatureFixture","installFeatures","code","options","name","description","wrapper","AbstractCliTest"],"sources":["../../../src/__tests__/implementation/CachingImports.test.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test'\nimport ImportService from '../../services/ImportService'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\n\nexport default class CachingImportsTest extends AbstractCliTest {\n\tprivate static importService: ImportService\n\n\tprotected static async beforeAll() {\n\t\tawait super.beforeAll()\n\n\t\tImportService.setCacheDir(diskUtil.createRandomTempDir())\n\t\tthis.importService = this.Service('import')\n\n\t\tImportService.enableCaching()\n\t}\n\n\t@test()\n\tprotected static async canTellIfFileChanged() {\n\t\tconst test1Path = this.resolvePath('test1.js')\n\t\tdiskUtil.writeFile(test1Path, 'module.exports = { hello: \"world\"}')\n\n\t\tawait this.assertImportedCorrectly(test1Path, { hello: 'world' })\n\n\t\tdiskUtil.writeFile(test1Path, 'module.exports = { foo: \"bar\"}')\n\n\t\tawait this.assertImportedCorrectly(test1Path, { foo: 'bar' })\n\t}\n\n\tprivate static async assertImportedCorrectly(\n\t\ttest1Path: string,\n\t\texpected: Record<string, any>\n\t) {\n\t\tconst contents = await this.importService.importAll(test1Path)\n\t\tassert.isEqualDeep(contents, expected)\n\t}\n\n\t@test()\n\tprotected static async canTellIfRelatedFileChanges() {\n\t\tconst test1Path = this.resolvePath('test1.js')\n\t\tdiskUtil.writeFile(\n\t\t\ttest1Path,\n\t\t\t'const value = require(\"./test2\"); module.exports = { hello: value }'\n\t\t)\n\n\t\tconst test2Path = this.resolvePath('test2.js')\n\t\tdiskUtil.writeFile(test2Path, 'module.exports = \"world\"')\n\n\t\tawait this.assertImportedCorrectly(test1Path, { hello: 'world' })\n\n\t\tdiskUtil.writeFile(test2Path, 'module.exports = \"bar\"')\n\t\tawait this.assertImportedCorrectly(test1Path, { hello: 'bar' })\n\t}\n\n\t@test()\n\tprotected static async canTellIfFilesChangedInASkill() {\n\t\tawait this.FeatureFixture().installFeatures(\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\tcode: 'skill',\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tname: 'file-change-skill',\n\t\t\t\t\t\tdescription: 'It should be good',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t\t'skills'\n\t\t)\n\n\t\tconst test1Path = this.resolvePath('src/test1.ts')\n\t\tdiskUtil.writeFile(\n\t\t\ttest1Path,\n\t\t\t\"import { value } from './test2'\\nexport const wrapper = { hello: value }\"\n\t\t)\n\n\t\tconst test2Path = this.resolvePath('src/test2.ts')\n\t\tdiskUtil.writeFile(test2Path, 'export const value = \"world\"')\n\n\t\tawait this.assertImportedCorrectly(test1Path, {\n\t\t\twrapper: { hello: 'world' },\n\t\t})\n\n\t\tdiskUtil.writeFile(test2Path, 'export const value = \"bar\"')\n\t\tawait this.assertImportedCorrectly(test1Path, { wrapper: { hello: 'bar' } })\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;IAEqBA,kB,WAYnB,IAAAC,
|
|
1
|
+
{"version":3,"file":"CachingImports.test.js","names":["CachingImportsTest","test","ImportService","setCacheDir","diskUtil","createRandomTempDir","importService","Service","enableCaching","test1Path","resolvePath","writeFile","assertImportedCorrectly","hello","foo","expected","importAll","contents","assert","isEqualDeep","test2Path","FeatureFixture","installFeatures","code","options","name","description","wrapper","AbstractCliTest"],"sources":["../../../src/__tests__/implementation/CachingImports.test.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test-utils'\nimport ImportService from '../../services/ImportService'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\n\nexport default class CachingImportsTest extends AbstractCliTest {\n\tprivate static importService: ImportService\n\n\tprotected static async beforeAll() {\n\t\tawait super.beforeAll()\n\n\t\tImportService.setCacheDir(diskUtil.createRandomTempDir())\n\t\tthis.importService = this.Service('import')\n\n\t\tImportService.enableCaching()\n\t}\n\n\t@test()\n\tprotected static async canTellIfFileChanged() {\n\t\tconst test1Path = this.resolvePath('test1.js')\n\t\tdiskUtil.writeFile(test1Path, 'module.exports = { hello: \"world\"}')\n\n\t\tawait this.assertImportedCorrectly(test1Path, { hello: 'world' })\n\n\t\tdiskUtil.writeFile(test1Path, 'module.exports = { foo: \"bar\"}')\n\n\t\tawait this.assertImportedCorrectly(test1Path, { foo: 'bar' })\n\t}\n\n\tprivate static async assertImportedCorrectly(\n\t\ttest1Path: string,\n\t\texpected: Record<string, any>\n\t) {\n\t\tconst contents = await this.importService.importAll(test1Path)\n\t\tassert.isEqualDeep(contents, expected)\n\t}\n\n\t@test()\n\tprotected static async canTellIfRelatedFileChanges() {\n\t\tconst test1Path = this.resolvePath('test1.js')\n\t\tdiskUtil.writeFile(\n\t\t\ttest1Path,\n\t\t\t'const value = require(\"./test2\"); module.exports = { hello: value }'\n\t\t)\n\n\t\tconst test2Path = this.resolvePath('test2.js')\n\t\tdiskUtil.writeFile(test2Path, 'module.exports = \"world\"')\n\n\t\tawait this.assertImportedCorrectly(test1Path, { hello: 'world' })\n\n\t\tdiskUtil.writeFile(test2Path, 'module.exports = \"bar\"')\n\t\tawait this.assertImportedCorrectly(test1Path, { hello: 'bar' })\n\t}\n\n\t@test()\n\tprotected static async canTellIfFilesChangedInASkill() {\n\t\tawait this.FeatureFixture().installFeatures(\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\tcode: 'skill',\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tname: 'file-change-skill',\n\t\t\t\t\t\tdescription: 'It should be good',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t\t'skills'\n\t\t)\n\n\t\tconst test1Path = this.resolvePath('src/test1.ts')\n\t\tdiskUtil.writeFile(\n\t\t\ttest1Path,\n\t\t\t\"import { value } from './test2'\\nexport const wrapper = { hello: value }\"\n\t\t)\n\n\t\tconst test2Path = this.resolvePath('src/test2.ts')\n\t\tdiskUtil.writeFile(test2Path, 'export const value = \"world\"')\n\n\t\tawait this.assertImportedCorrectly(test1Path, {\n\t\t\twrapper: { hello: 'world' },\n\t\t})\n\n\t\tdiskUtil.writeFile(test2Path, 'export const value = \"bar\"')\n\t\tawait this.assertImportedCorrectly(test1Path, { wrapper: { hello: 'bar' } })\n\t}\n}\n"],"mappings":"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"}
|
|
@@ -19,7 +19,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
19
19
|
|
|
20
20
|
var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/helpers/applyDecoratedDescriptor"));
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _testUtils = require("@sprucelabs/test-utils");
|
|
23
23
|
|
|
24
24
|
var _feature = _interopRequireDefault(require("../../features/feature.utilities"));
|
|
25
25
|
|
|
@@ -31,7 +31,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
31
31
|
|
|
32
32
|
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; } }
|
|
33
33
|
|
|
34
|
-
var CommandGeneratorTest = (_dec = (0,
|
|
34
|
+
var CommandGeneratorTest = (_dec = (0, _testUtils.test)(), _dec2 = (0, _testUtils.test)(), _dec3 = (0, _testUtils.test)(), _dec4 = (0, _testUtils.test)(), (_class = /*#__PURE__*/function (_AbstractCliTest) {
|
|
35
35
|
(0, _inherits2["default"])(CommandGeneratorTest, _AbstractCliTest);
|
|
36
36
|
|
|
37
37
|
var _super = _createSuper(CommandGeneratorTest);
|
|
@@ -44,7 +44,7 @@ var CommandGeneratorTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(),
|
|
|
44
44
|
(0, _createClass2["default"])(CommandGeneratorTest, null, [{
|
|
45
45
|
key: "hasAliasGenerated",
|
|
46
46
|
value: function hasAliasGenerated() {
|
|
47
|
-
|
|
47
|
+
_testUtils.assert.isFunction(_feature["default"].generateOptionAliases);
|
|
48
48
|
}
|
|
49
49
|
}, {
|
|
50
50
|
key: "canAliasOneOptionalField",
|
|
@@ -61,9 +61,9 @@ var CommandGeneratorTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(),
|
|
|
61
61
|
|
|
62
62
|
var aliases = _feature["default"].generateOptionAliases(person);
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
_testUtils.assert.isLength(Object.keys(aliases), 1);
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
_testUtils.assert.doesInclude(aliases, {
|
|
67
67
|
firstName: '--firstName <firstName>'
|
|
68
68
|
});
|
|
69
69
|
}
|
|
@@ -86,13 +86,13 @@ var CommandGeneratorTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(),
|
|
|
86
86
|
|
|
87
87
|
var aliases = _feature["default"].generateOptionAliases(person);
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
_testUtils.assert.isLength(Object.keys(aliases), 2);
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
_testUtils.assert.doesInclude(aliases, {
|
|
92
92
|
firstName: '--firstName <firstName>'
|
|
93
93
|
});
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
_testUtils.assert.doesInclude(aliases, {
|
|
96
96
|
lastName: '--lastName <lastName>'
|
|
97
97
|
});
|
|
98
98
|
}
|
|
@@ -119,17 +119,17 @@ var CommandGeneratorTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(),
|
|
|
119
119
|
|
|
120
120
|
var aliases = _feature["default"].generateOptionAliases(person);
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
_testUtils.assert.isLength(Object.keys(aliases), 3);
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
_testUtils.assert.doesInclude(aliases, {
|
|
125
125
|
defaultTrue: '--defaultTrue [true|false]'
|
|
126
126
|
});
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
_testUtils.assert.doesInclude(aliases, {
|
|
129
129
|
defaultFalse: '--defaultFalse [true|false]'
|
|
130
130
|
});
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
_testUtils.assert.doesInclude(aliases, {
|
|
133
133
|
boolNoDefault: '--boolNoDefault [true|false]'
|
|
134
134
|
});
|
|
135
135
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandOptionBuilder.test.js","names":["CommandGeneratorTest","test","assert","isFunction","featuresUtil","generateOptionAliases","person","id","name","fields","firstName","type","aliases","isLength","Object","keys","doesInclude","lastName","isRequired","defaultTrue","defaultValue","defaultFalse","boolNoDefault","AbstractCliTest"],"sources":["../../../src/__tests__/implementation/CommandOptionBuilder.test.ts"],"sourcesContent":["import { Schema } from '@sprucelabs/schema'\nimport { test, assert } from '@sprucelabs/test'\nimport featuresUtil from '../../features/feature.utilities'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\n\nexport default class CommandGeneratorTest extends AbstractCliTest {\n\t@test()\n\tprotected static hasAliasGenerated() {\n\t\tassert.isFunction(featuresUtil.generateOptionAliases)\n\t}\n\n\t@test()\n\tprotected static canAliasOneOptionalField() {\n\t\tconst person: Schema = {\n\t\t\tid: 'alias-person',\n\t\t\tname: 'person alias',\n\t\t\tfields: {\n\t\t\t\tfirstName: {\n\t\t\t\t\ttype: 'text',\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\n\t\tconst aliases = featuresUtil.generateOptionAliases(person)\n\n\t\tassert.isLength(Object.keys(aliases), 1)\n\t\tassert.doesInclude(aliases, {\n\t\t\tfirstName: '--firstName <firstName>',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static canAliasTwoFieldsOneRequired() {\n\t\tconst person: Schema = {\n\t\t\tid: 'alias-person',\n\t\t\tname: 'person alias',\n\t\t\tfields: {\n\t\t\t\tfirstName: {\n\t\t\t\t\ttype: 'text',\n\t\t\t\t},\n\t\t\t\tlastName: {\n\t\t\t\t\ttype: 'text',\n\t\t\t\t\tisRequired: true,\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\n\t\tconst aliases = featuresUtil.generateOptionAliases(person)\n\n\t\tassert.isLength(Object.keys(aliases), 2)\n\t\tassert.doesInclude(aliases, {\n\t\t\tfirstName: '--firstName <firstName>',\n\t\t})\n\t\tassert.doesInclude(aliases, {\n\t\t\tlastName: '--lastName <lastName>',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static properlyHandlesBooleans() {\n\t\tconst person: Schema = {\n\t\t\tid: 'alias-person',\n\t\t\tname: 'person alias',\n\t\t\tfields: {\n\t\t\t\tdefaultTrue: {\n\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\tdefaultValue: true,\n\t\t\t\t},\n\t\t\t\tdefaultFalse: {\n\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\tdefaultValue: false,\n\t\t\t\t},\n\t\t\t\tboolNoDefault: {\n\t\t\t\t\ttype: 'boolean',\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\n\t\tconst aliases = featuresUtil.generateOptionAliases(person)\n\n\t\tassert.isLength(Object.keys(aliases), 3)\n\t\tassert.doesInclude(aliases, {\n\t\t\tdefaultTrue: '--defaultTrue [true|false]',\n\t\t})\n\t\tassert.doesInclude(aliases, {\n\t\t\tdefaultFalse: '--defaultFalse [true|false]',\n\t\t})\n\n\t\tassert.doesInclude(aliases, {\n\t\t\tboolNoDefault: '--boolNoDefault [true|false]',\n\t\t})\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA;;;;;;;;IAEqBA,oB,WACnB,IAAAC,
|
|
1
|
+
{"version":3,"file":"CommandOptionBuilder.test.js","names":["CommandGeneratorTest","test","assert","isFunction","featuresUtil","generateOptionAliases","person","id","name","fields","firstName","type","aliases","isLength","Object","keys","doesInclude","lastName","isRequired","defaultTrue","defaultValue","defaultFalse","boolNoDefault","AbstractCliTest"],"sources":["../../../src/__tests__/implementation/CommandOptionBuilder.test.ts"],"sourcesContent":["import { Schema } from '@sprucelabs/schema'\nimport { test, assert } from '@sprucelabs/test-utils'\nimport featuresUtil from '../../features/feature.utilities'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\n\nexport default class CommandGeneratorTest extends AbstractCliTest {\n\t@test()\n\tprotected static hasAliasGenerated() {\n\t\tassert.isFunction(featuresUtil.generateOptionAliases)\n\t}\n\n\t@test()\n\tprotected static canAliasOneOptionalField() {\n\t\tconst person: Schema = {\n\t\t\tid: 'alias-person',\n\t\t\tname: 'person alias',\n\t\t\tfields: {\n\t\t\t\tfirstName: {\n\t\t\t\t\ttype: 'text',\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\n\t\tconst aliases = featuresUtil.generateOptionAliases(person)\n\n\t\tassert.isLength(Object.keys(aliases), 1)\n\t\tassert.doesInclude(aliases, {\n\t\t\tfirstName: '--firstName <firstName>',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static canAliasTwoFieldsOneRequired() {\n\t\tconst person: Schema = {\n\t\t\tid: 'alias-person',\n\t\t\tname: 'person alias',\n\t\t\tfields: {\n\t\t\t\tfirstName: {\n\t\t\t\t\ttype: 'text',\n\t\t\t\t},\n\t\t\t\tlastName: {\n\t\t\t\t\ttype: 'text',\n\t\t\t\t\tisRequired: true,\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\n\t\tconst aliases = featuresUtil.generateOptionAliases(person)\n\n\t\tassert.isLength(Object.keys(aliases), 2)\n\t\tassert.doesInclude(aliases, {\n\t\t\tfirstName: '--firstName <firstName>',\n\t\t})\n\t\tassert.doesInclude(aliases, {\n\t\t\tlastName: '--lastName <lastName>',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static properlyHandlesBooleans() {\n\t\tconst person: Schema = {\n\t\t\tid: 'alias-person',\n\t\t\tname: 'person alias',\n\t\t\tfields: {\n\t\t\t\tdefaultTrue: {\n\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\tdefaultValue: true,\n\t\t\t\t},\n\t\t\t\tdefaultFalse: {\n\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\tdefaultValue: false,\n\t\t\t\t},\n\t\t\t\tboolNoDefault: {\n\t\t\t\t\ttype: 'boolean',\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\n\t\tconst aliases = featuresUtil.generateOptionAliases(person)\n\n\t\tassert.isLength(Object.keys(aliases), 3)\n\t\tassert.doesInclude(aliases, {\n\t\t\tdefaultTrue: '--defaultTrue [true|false]',\n\t\t})\n\t\tassert.doesInclude(aliases, {\n\t\t\tdefaultFalse: '--defaultFalse [true|false]',\n\t\t})\n\n\t\tassert.doesInclude(aliases, {\n\t\t\tboolNoDefault: '--boolNoDefault [true|false]',\n\t\t})\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA;;;;;;;;IAEqBA,oB,WACnB,IAAAC,eAAA,G,UAKA,IAAAA,eAAA,G,UAoBA,IAAAA,eAAA,G,UA2BA,IAAAA,eAAA,G;;;;;;;;;;;;WApDD,6BACqC;MACpCC,iBAAA,CAAOC,UAAP,CAAkBC,mBAAA,CAAaC,qBAA/B;IACA;;;WAED,oCAC4C;MAC3C,IAAMC,MAAc,GAAG;QACtBC,EAAE,EAAE,cADkB;QAEtBC,IAAI,EAAE,cAFgB;QAGtBC,MAAM,EAAE;UACPC,SAAS,EAAE;YACVC,IAAI,EAAE;UADI;QADJ;MAHc,CAAvB;;MAUA,IAAMC,OAAO,GAAGR,mBAAA,CAAaC,qBAAb,CAAmCC,MAAnC,CAAhB;;MAEAJ,iBAAA,CAAOW,QAAP,CAAgBC,MAAM,CAACC,IAAP,CAAYH,OAAZ,CAAhB,EAAsC,CAAtC;;MACAV,iBAAA,CAAOc,WAAP,CAAmBJ,OAAnB,EAA4B;QAC3BF,SAAS,EAAE;MADgB,CAA5B;IAGA;;;WAED,wCACgD;MAC/C,IAAMJ,MAAc,GAAG;QACtBC,EAAE,EAAE,cADkB;QAEtBC,IAAI,EAAE,cAFgB;QAGtBC,MAAM,EAAE;UACPC,SAAS,EAAE;YACVC,IAAI,EAAE;UADI,CADJ;UAIPM,QAAQ,EAAE;YACTN,IAAI,EAAE,MADG;YAETO,UAAU,EAAE;UAFH;QAJH;MAHc,CAAvB;;MAcA,IAAMN,OAAO,GAAGR,mBAAA,CAAaC,qBAAb,CAAmCC,MAAnC,CAAhB;;MAEAJ,iBAAA,CAAOW,QAAP,CAAgBC,MAAM,CAACC,IAAP,CAAYH,OAAZ,CAAhB,EAAsC,CAAtC;;MACAV,iBAAA,CAAOc,WAAP,CAAmBJ,OAAnB,EAA4B;QAC3BF,SAAS,EAAE;MADgB,CAA5B;;MAGAR,iBAAA,CAAOc,WAAP,CAAmBJ,OAAnB,EAA4B;QAC3BK,QAAQ,EAAE;MADiB,CAA5B;IAGA;;;WAED,mCAC2C;MAC1C,IAAMX,MAAc,GAAG;QACtBC,EAAE,EAAE,cADkB;QAEtBC,IAAI,EAAE,cAFgB;QAGtBC,MAAM,EAAE;UACPU,WAAW,EAAE;YACZR,IAAI,EAAE,SADM;YAEZS,YAAY,EAAE;UAFF,CADN;UAKPC,YAAY,EAAE;YACbV,IAAI,EAAE,SADO;YAEbS,YAAY,EAAE;UAFD,CALP;UASPE,aAAa,EAAE;YACdX,IAAI,EAAE;UADQ;QATR;MAHc,CAAvB;;MAkBA,IAAMC,OAAO,GAAGR,mBAAA,CAAaC,qBAAb,CAAmCC,MAAnC,CAAhB;;MAEAJ,iBAAA,CAAOW,QAAP,CAAgBC,MAAM,CAACC,IAAP,CAAYH,OAAZ,CAAhB,EAAsC,CAAtC;;MACAV,iBAAA,CAAOc,WAAP,CAAmBJ,OAAnB,EAA4B;QAC3BO,WAAW,EAAE;MADc,CAA5B;;MAGAjB,iBAAA,CAAOc,WAAP,CAAmBJ,OAAnB,EAA4B;QAC3BS,YAAY,EAAE;MADa,CAA5B;;MAIAnB,iBAAA,CAAOc,WAAP,CAAmBJ,OAAnB,EAA4B;QAC3BU,aAAa,EAAE;MADY,CAA5B;IAGA;;;EAtFgDC,4B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import AbstractSpruceTest from '@sprucelabs/test';
|
|
1
|
+
import AbstractSpruceTest from '@sprucelabs/test-utils';
|
|
2
2
|
export default class CommanderCommandResultMapperTest extends AbstractSpruceTest {
|
|
3
3
|
private static readonly optionsSchema;
|
|
4
4
|
protected static utilExists(): Promise<void>;
|
|
@@ -29,7 +29,7 @@ var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/
|
|
|
29
29
|
|
|
30
30
|
var _schema = require("@sprucelabs/schema");
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _testUtils = _interopRequireWildcard(require("@sprucelabs/test-utils"));
|
|
33
33
|
|
|
34
34
|
var _commander = require("commander");
|
|
35
35
|
|
|
@@ -45,7 +45,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
45
45
|
|
|
46
46
|
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; } }
|
|
47
47
|
|
|
48
|
-
var CommanderCommandResultMapperTest = (_dec = (0,
|
|
48
|
+
var CommanderCommandResultMapperTest = (_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)(), _dec8 = (0, _testUtils.test)(), _dec9 = (0, _testUtils.test)(), _dec10 = (0, _testUtils.test)(), (_class = (_class2 = /*#__PURE__*/function (_AbstractSpruceTest) {
|
|
49
49
|
(0, _inherits2["default"])(CommanderCommandResultMapperTest, _AbstractSpruceTest);
|
|
50
50
|
|
|
51
51
|
var _super = _createSuper(CommanderCommandResultMapperTest);
|
|
@@ -63,7 +63,7 @@ var CommanderCommandResultMapperTest = (_dec = (0, _test.test)(), _dec2 = (0, _t
|
|
|
63
63
|
while (1) {
|
|
64
64
|
switch (_context.prev = _context.next) {
|
|
65
65
|
case 0:
|
|
66
|
-
|
|
66
|
+
_testUtils.assert.isTruthy(_commander2["default"]);
|
|
67
67
|
|
|
68
68
|
case 1:
|
|
69
69
|
case "end":
|
|
@@ -90,7 +90,7 @@ var CommanderCommandResultMapperTest = (_dec = (0, _test.test)(), _dec2 = (0, _t
|
|
|
90
90
|
case 0:
|
|
91
91
|
results = _commander2["default"].mapIncomingToOptions({});
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
_testUtils.assert.isEqualDeep(results, {});
|
|
94
94
|
|
|
95
95
|
case 2:
|
|
96
96
|
case "end":
|
|
@@ -117,7 +117,7 @@ var CommanderCommandResultMapperTest = (_dec = (0, _test.test)(), _dec2 = (0, _t
|
|
|
117
117
|
case 0:
|
|
118
118
|
results = _commander2["default"].mapIncomingToOptions();
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
_testUtils.assert.isEqualDeep(results, {});
|
|
121
121
|
|
|
122
122
|
case 2:
|
|
123
123
|
case "end":
|
|
@@ -144,7 +144,7 @@ var CommanderCommandResultMapperTest = (_dec = (0, _test.test)(), _dec2 = (0, _t
|
|
|
144
144
|
case 0:
|
|
145
145
|
results = _commander2["default"].mapIncomingToOptions({}, new _commander.Command());
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
_testUtils.assert.isEqualDeep(results, {});
|
|
148
148
|
|
|
149
149
|
case 2:
|
|
150
150
|
case "end":
|
|
@@ -171,7 +171,7 @@ var CommanderCommandResultMapperTest = (_dec = (0, _test.test)(), _dec2 = (0, _t
|
|
|
171
171
|
case 0:
|
|
172
172
|
results = _commander2["default"].mapIncomingToOptions({}, new _commander.Command(), undefined);
|
|
173
173
|
|
|
174
|
-
|
|
174
|
+
_testUtils.assert.isEqualDeep(results, {});
|
|
175
175
|
|
|
176
176
|
case 2:
|
|
177
177
|
case "end":
|
|
@@ -198,7 +198,7 @@ var CommanderCommandResultMapperTest = (_dec = (0, _test.test)(), _dec2 = (0, _t
|
|
|
198
198
|
case 0:
|
|
199
199
|
results = _commander2["default"].mapIncomingToOptions({}, new _commander.Command(), this.optionsSchema);
|
|
200
200
|
|
|
201
|
-
|
|
201
|
+
_testUtils.assert.isEqualDeep(results, {});
|
|
202
202
|
|
|
203
203
|
case 2:
|
|
204
204
|
case "end":
|
|
@@ -225,7 +225,7 @@ var CommanderCommandResultMapperTest = (_dec = (0, _test.test)(), _dec2 = (0, _t
|
|
|
225
225
|
case 0:
|
|
226
226
|
results = _commander2["default"].mapIncomingToOptions('my great skill', {}, new _commander.Command(), this.optionsSchema);
|
|
227
227
|
|
|
228
|
-
|
|
228
|
+
_testUtils.assert.isEqualDeep(results, {
|
|
229
229
|
name: 'my great skill'
|
|
230
230
|
});
|
|
231
231
|
|
|
@@ -256,7 +256,7 @@ var CommanderCommandResultMapperTest = (_dec = (0, _test.test)(), _dec2 = (0, _t
|
|
|
256
256
|
email: 't@t.com'
|
|
257
257
|
}, new _commander.Command(), this.optionsSchema);
|
|
258
258
|
|
|
259
|
-
|
|
259
|
+
_testUtils.assert.isEqualDeep(results, {
|
|
260
260
|
name: 'my great skill',
|
|
261
261
|
email: 't@t.com'
|
|
262
262
|
});
|
|
@@ -286,7 +286,7 @@ var CommanderCommandResultMapperTest = (_dec = (0, _test.test)(), _dec2 = (0, _t
|
|
|
286
286
|
case 0:
|
|
287
287
|
results = _commander2["default"].mapIncomingToOptions('my great skill', 't@t.com', {}, new _commander.Command(), this.optionsSchema);
|
|
288
288
|
|
|
289
|
-
|
|
289
|
+
_testUtils.assert.isEqualDeep(results, {
|
|
290
290
|
name: 'my great skill',
|
|
291
291
|
email: 't@t.com'
|
|
292
292
|
});
|
|
@@ -313,14 +313,14 @@ var CommanderCommandResultMapperTest = (_dec = (0, _test.test)(), _dec2 = (0, _t
|
|
|
313
313
|
email: 'test'
|
|
314
314
|
}, new _commander.Command(), this.optionsSchema);
|
|
315
315
|
|
|
316
|
-
|
|
316
|
+
_testUtils.assert.isEqualDeep(results, {
|
|
317
317
|
name: 'my great skill',
|
|
318
318
|
email: 't@t.com'
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
321
|
}]);
|
|
322
322
|
return CommanderCommandResultMapperTest;
|
|
323
|
-
}(
|
|
323
|
+
}(_testUtils["default"]), (0, _defineProperty2["default"])(_class2, "optionsSchema", (0, _schema.buildSchema)({
|
|
324
324
|
id: 'optionsSchema',
|
|
325
325
|
fields: {
|
|
326
326
|
name: {
|