@sprucelabs/spruce-cli 17.1.39 → 17.1.42
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 +24 -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/node_modules/@typescript-eslint/parser/package.json +5 -5
- package/node_modules/@typescript-eslint/scope-manager/package.json +5 -5
- package/node_modules/@typescript-eslint/types/package.json +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/package.json +5 -5
- package/node_modules/@typescript-eslint/visitor-keys/package.json +3 -3
- package/package.json +15 -23
- 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
|
@@ -23,13 +23,13 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
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 _globby = _interopRequireDefault(require("globby"));
|
|
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, _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 GeneratingFieldTypesOnlyTest = (_dec = (0,
|
|
40
|
+
var GeneratingFieldTypesOnlyTest = (_dec = (0, _testUtils.test)(), _dec2 = (0, _testUtils.test)(), (_class = /*#__PURE__*/function (_AbstractSchemaTest) {
|
|
41
41
|
(0, _inherits2["default"])(GeneratingFieldTypesOnlyTest, _AbstractSchemaTest);
|
|
42
42
|
|
|
43
43
|
var _super = _createSuper(GeneratingFieldTypesOnlyTest);
|
|
@@ -58,7 +58,7 @@ var GeneratingFieldTypesOnlyTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.
|
|
|
58
58
|
case 0:
|
|
59
59
|
action = this.Action('schema', 'syncFields');
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
_testUtils.assert.isTruthy(action);
|
|
62
62
|
|
|
63
63
|
case 2:
|
|
64
64
|
case "end":
|
|
@@ -94,11 +94,11 @@ var GeneratingFieldTypesOnlyTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.
|
|
|
94
94
|
case 4:
|
|
95
95
|
results = _context2.sent;
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
_testUtils.assert.isFalsy(results.errors);
|
|
98
98
|
|
|
99
99
|
matches = _globby["default"].sync(this.resolveHashSprucePath('schemas'));
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
_testUtils.assert.isLength(matches, 2);
|
|
102
102
|
|
|
103
103
|
expectedFields = ['fields.types.ts', 'fieldClassMap.ts'];
|
|
104
104
|
typeChecker = this.Service('typeChecker');
|
|
@@ -111,7 +111,7 @@ var GeneratingFieldTypesOnlyTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
file = _expectedFields[_i];
|
|
114
|
-
match =
|
|
114
|
+
match = _test["default"].assertFileByNameInGeneratedFiles(file, (_results$files = results.files) !== null && _results$files !== void 0 ? _results$files : []);
|
|
115
115
|
_context2.next = 16;
|
|
116
116
|
return typeChecker.check(match);
|
|
117
117
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeneratingFieldTypesOnly.test.js","names":["GeneratingFieldTypesOnlyTest","test","action","Action","assert","isTruthy","installSchemaFeature","execute","results","isFalsy","errors","matches","globby","sync","resolveHashSprucePath","isLength","expectedFields","typeChecker","Service","file","match","testUtil","assertFileByNameInGeneratedFiles","files","check","AbstractSchemaTest"],"sources":["../../../../src/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.ts"],"sourcesContent":["import { test, assert } from '@sprucelabs/test'\nimport globby from 'globby'\nimport AbstractSchemaTest from '../../../tests/AbstractSchemaTest'\nimport testUtil from '../../../tests/utilities/test.utility'\n\nexport default class GeneratingFieldTypesOnlyTest extends AbstractSchemaTest {\n\t@test()\n\tprotected static async syncFieldsActionExists() {\n\t\tconst action = this.Action('schema', 'syncFields')\n\t\tassert.isTruthy(action)\n\t}\n\n\t@test()\n\tprotected static async generatesOnlyFieldTypes() {\n\t\tawait this.installSchemaFeature('schemas')\n\t\tconst results = await this.Action('schema', 'syncFields').execute({})\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tconst matches = globby.sync(this.resolveHashSprucePath('schemas'))\n\t\tassert.isLength(matches, 2)\n\n\t\tconst expectedFields = ['fields.types.ts', 'fieldClassMap.ts']\n\n\t\tconst typeChecker = this.Service('typeChecker')\n\t\tfor (const file of expectedFields) {\n\t\t\tconst match = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t\tfile,\n\t\t\t\tresults.files ?? []\n\t\t\t)\n\t\t\tawait typeChecker.check(match)\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;IAEqBA,4B,WACnB,IAAAC,
|
|
1
|
+
{"version":3,"file":"GeneratingFieldTypesOnly.test.js","names":["GeneratingFieldTypesOnlyTest","test","action","Action","assert","isTruthy","installSchemaFeature","execute","results","isFalsy","errors","matches","globby","sync","resolveHashSprucePath","isLength","expectedFields","typeChecker","Service","file","match","testUtil","assertFileByNameInGeneratedFiles","files","check","AbstractSchemaTest"],"sources":["../../../../src/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.ts"],"sourcesContent":["import { test, assert } from '@sprucelabs/test-utils'\nimport globby from 'globby'\nimport AbstractSchemaTest from '../../../tests/AbstractSchemaTest'\nimport testUtil from '../../../tests/utilities/test.utility'\n\nexport default class GeneratingFieldTypesOnlyTest extends AbstractSchemaTest {\n\t@test()\n\tprotected static async syncFieldsActionExists() {\n\t\tconst action = this.Action('schema', 'syncFields')\n\t\tassert.isTruthy(action)\n\t}\n\n\t@test()\n\tprotected static async generatesOnlyFieldTypes() {\n\t\tawait this.installSchemaFeature('schemas')\n\t\tconst results = await this.Action('schema', 'syncFields').execute({})\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tconst matches = globby.sync(this.resolveHashSprucePath('schemas'))\n\t\tassert.isLength(matches, 2)\n\n\t\tconst expectedFields = ['fields.types.ts', 'fieldClassMap.ts']\n\n\t\tconst typeChecker = this.Service('typeChecker')\n\t\tfor (const file of expectedFields) {\n\t\t\tconst match = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t\tfile,\n\t\t\t\tresults.files ?? []\n\t\t\t)\n\t\t\tawait typeChecker.check(match)\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;IAEqBA,4B,WACnB,IAAAC,eAAA,G,UAMA,IAAAA,eAAA,G;;;;;;;;;;;;;kHAND;QAAA;QAAA;UAAA;YAAA;cAAA;gBAEOC,MAFP,GAEgB,KAAKC,MAAL,CAAY,QAAZ,EAAsB,YAAtB,CAFhB;;gBAGCC,iBAAA,CAAOC,QAAP,CAAgBH,MAAhB;;cAHD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;;mHAMA;QAAA;;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA,OAEO,KAAKI,oBAAL,CAA0B,SAA1B,CAFP;;cAAA;gBAAA;gBAAA,OAGuB,KAAKH,MAAL,CAAY,QAAZ,EAAsB,YAAtB,EAAoCI,OAApC,CAA4C,EAA5C,CAHvB;;cAAA;gBAGOC,OAHP;;gBAKCJ,iBAAA,CAAOK,OAAP,CAAeD,OAAO,CAACE,MAAvB;;gBAEMC,OAPP,GAOiBC,kBAAA,CAAOC,IAAP,CAAY,KAAKC,qBAAL,CAA2B,SAA3B,CAAZ,CAPjB;;gBAQCV,iBAAA,CAAOW,QAAP,CAAgBJ,OAAhB,EAAyB,CAAzB;;gBAEMK,cAVP,GAUwB,CAAC,iBAAD,EAAoB,kBAApB,CAVxB;gBAYOC,WAZP,GAYqB,KAAKC,OAAL,CAAa,aAAb,CAZrB;gBAAA,0BAaoBF,cAbpB;;cAAA;gBAAA;kBAAA;kBAAA;gBAAA;;gBAaYG,IAbZ;gBAcQC,KAdR,GAcgBC,gBAAA,CAASC,gCAAT,CACbH,IADa,oBAEbX,OAAO,CAACe,KAFK,2DAEI,EAFJ,CAdhB;gBAAA;gBAAA,OAkBQN,WAAW,CAACO,KAAZ,CAAkBJ,KAAlB,CAlBR;;cAAA;gBAAA;gBAAA;gBAAA;;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;EAPyDK,+B"}
|
|
@@ -27,7 +27,7 @@ var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/
|
|
|
27
27
|
|
|
28
28
|
var _spruceSkillUtils = require("@sprucelabs/spruce-skill-utils");
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _testUtils = require("@sprucelabs/test-utils");
|
|
31
31
|
|
|
32
32
|
var _SchemaStore = require("../../../features/schema/stores/SchemaStore");
|
|
33
33
|
|
|
@@ -39,7 +39,7 @@ 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 GettingSchemasFromHealthCheckTest = (_dec = (0,
|
|
42
|
+
var GettingSchemasFromHealthCheckTest = (_dec = (0, _testUtils.test)(), _dec2 = (0, _testUtils.test)(), (_class = /*#__PURE__*/function (_AbstractSchemaTest) {
|
|
43
43
|
(0, _inherits2["default"])(GettingSchemasFromHealthCheckTest, _AbstractSchemaTest);
|
|
44
44
|
|
|
45
45
|
var _super = _createSuper(GettingSchemasFromHealthCheckTest);
|
|
@@ -96,13 +96,13 @@ var GettingSchemasFromHealthCheckTest = (_dec = (0, _test.test)(), _dec2 = (0, _
|
|
|
96
96
|
case 2:
|
|
97
97
|
health = _context2.sent;
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
_testUtils.assert.isFalsy(health.skill.errors);
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
_testUtils.assert.isTruthy(health.schema);
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
_testUtils.assert.isEqual(health.schema.status, 'passed');
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
_testUtils.assert.isEqualDeep(this.sortSchemas(health.schema.schemas), expected);
|
|
106
106
|
|
|
107
107
|
case 7:
|
|
108
108
|
case "end":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GettingSchemasFromHealthCheck.test.js","names":["GettingSchemasFromHealthCheckTest","test","installAndSyncSchemas","cli","cleanedExpected","generateExpectedHealthSchemas","Object","values","coreSchemas","assertExpectedSchemas","expected","checkHealth","health","assert","isFalsy","skill","errors","isTruthy","schema","isEqual","status","isEqualDeep","sortSchemas","schemas","createSchema","Action","execute","nameReadable","namePascal","nameCamel","description","id","name","version","versionUtil","generateVersion","constValue","namespace","installSchemaFeature","AbstractSchemaTest"],"sources":["../../../../src/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.ts"],"sourcesContent":["import { Schema } from '@sprucelabs/schema'\nimport { versionUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test'\nimport { CliInterface } from '../../../cli'\nimport { coreSchemas } from '../../../features/schema/stores/SchemaStore'\nimport AbstractSchemaTest from '../../../tests/AbstractSchemaTest'\n\nexport default class GettingSchemasFromHealthCheckTest extends AbstractSchemaTest {\n\t@test()\n\tprotected static async getsCoreSchemasFromHealthCheck() {\n\t\tconst cli = await this.installAndSyncSchemas()\n\n\t\tconst cleanedExpected = this.generateExpectedHealthSchemas(\n\t\t\tObject.values(coreSchemas)\n\t\t)\n\n\t\tawait this.assertExpectedSchemas(cli, cleanedExpected)\n\t}\n\n\tprivate static async assertExpectedSchemas(\n\t\tcli: CliInterface,\n\t\texpected: Schema[]\n\t) {\n\t\tconst health = await cli.checkHealth()\n\t\tassert.isFalsy(health.skill.errors)\n\t\tassert.isTruthy(health.schema)\n\t\tassert.isEqual(health.schema.status, 'passed')\n\n\t\tassert.isEqualDeep(this.sortSchemas(health.schema.schemas), expected)\n\t}\n\n\t@test()\n\tprotected static async getsCoreAndLocalSchemasFromHealthCheck() {\n\t\tconst cli = await this.installAndSyncSchemas()\n\t\tconst createSchema = this.Action('schema', 'create')\n\n\t\tawait createSchema.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\tconst cleanedExpected = this.generateExpectedHealthSchemas([\n\t\t\t...Object.values(coreSchemas),\n\t\t\t{\n\t\t\t\tid: 'test',\n\t\t\t\tname: 'Test schema!',\n\t\t\t\tversion: versionUtil.generateVersion().constValue,\n\t\t\t\tnamespace: 'TestingSchemas',\n\t\t\t\tdescription: 'this is so great!',\n\t\t\t},\n\t\t])\n\n\t\tawait this.assertExpectedSchemas(cli, cleanedExpected)\n\t}\n\n\tprivate static async installAndSyncSchemas() {\n\t\tconst cli = await this.installSchemaFeature('schemas')\n\t\tawait this.Action('schema', 'sync').execute({})\n\t\treturn cli\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AAEA;;AACA;;;;;;;;IAEqBA,iC,WACnB,IAAAC,
|
|
1
|
+
{"version":3,"file":"GettingSchemasFromHealthCheck.test.js","names":["GettingSchemasFromHealthCheckTest","test","installAndSyncSchemas","cli","cleanedExpected","generateExpectedHealthSchemas","Object","values","coreSchemas","assertExpectedSchemas","expected","checkHealth","health","assert","isFalsy","skill","errors","isTruthy","schema","isEqual","status","isEqualDeep","sortSchemas","schemas","createSchema","Action","execute","nameReadable","namePascal","nameCamel","description","id","name","version","versionUtil","generateVersion","constValue","namespace","installSchemaFeature","AbstractSchemaTest"],"sources":["../../../../src/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.ts"],"sourcesContent":["import { Schema } from '@sprucelabs/schema'\nimport { versionUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test-utils'\nimport { CliInterface } from '../../../cli'\nimport { coreSchemas } from '../../../features/schema/stores/SchemaStore'\nimport AbstractSchemaTest from '../../../tests/AbstractSchemaTest'\n\nexport default class GettingSchemasFromHealthCheckTest extends AbstractSchemaTest {\n\t@test()\n\tprotected static async getsCoreSchemasFromHealthCheck() {\n\t\tconst cli = await this.installAndSyncSchemas()\n\n\t\tconst cleanedExpected = this.generateExpectedHealthSchemas(\n\t\t\tObject.values(coreSchemas)\n\t\t)\n\n\t\tawait this.assertExpectedSchemas(cli, cleanedExpected)\n\t}\n\n\tprivate static async assertExpectedSchemas(\n\t\tcli: CliInterface,\n\t\texpected: Schema[]\n\t) {\n\t\tconst health = await cli.checkHealth()\n\t\tassert.isFalsy(health.skill.errors)\n\t\tassert.isTruthy(health.schema)\n\t\tassert.isEqual(health.schema.status, 'passed')\n\n\t\tassert.isEqualDeep(this.sortSchemas(health.schema.schemas), expected)\n\t}\n\n\t@test()\n\tprotected static async getsCoreAndLocalSchemasFromHealthCheck() {\n\t\tconst cli = await this.installAndSyncSchemas()\n\t\tconst createSchema = this.Action('schema', 'create')\n\n\t\tawait createSchema.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\tconst cleanedExpected = this.generateExpectedHealthSchemas([\n\t\t\t...Object.values(coreSchemas),\n\t\t\t{\n\t\t\t\tid: 'test',\n\t\t\t\tname: 'Test schema!',\n\t\t\t\tversion: versionUtil.generateVersion().constValue,\n\t\t\t\tnamespace: 'TestingSchemas',\n\t\t\t\tdescription: 'this is so great!',\n\t\t\t},\n\t\t])\n\n\t\tawait this.assertExpectedSchemas(cli, cleanedExpected)\n\t}\n\n\tprivate static async installAndSyncSchemas() {\n\t\tconst cli = await this.installSchemaFeature('schemas')\n\t\tawait this.Action('schema', 'sync').execute({})\n\t\treturn cli\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AAEA;;AACA;;;;;;;;IAEqBA,iC,WACnB,IAAAC,eAAA,G,UAuBA,IAAAA,eAAA,G;;;;;;;;;;;;;0HAvBD;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA,OAEmB,KAAKC,qBAAL,EAFnB;;cAAA;gBAEOC,GAFP;gBAIOC,eAJP,GAIyB,KAAKC,6BAAL,CACvBC,MAAM,CAACC,MAAP,CAAcC,wBAAd,CADuB,CAJzB;gBAAA;gBAAA,OAQO,KAAKC,qBAAL,CAA2BN,GAA3B,EAAgCC,eAAhC,CARP;;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;;iHAWA,kBACCD,GADD,EAECO,QAFD;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA,OAIsBP,GAAG,CAACQ,WAAJ,EAJtB;;cAAA;gBAIOC,MAJP;;gBAKCC,iBAAA,CAAOC,OAAP,CAAeF,MAAM,CAACG,KAAP,CAAaC,MAA5B;;gBACAH,iBAAA,CAAOI,QAAP,CAAgBL,MAAM,CAACM,MAAvB;;gBACAL,iBAAA,CAAOM,OAAP,CAAeP,MAAM,CAACM,MAAP,CAAcE,MAA7B,EAAqC,QAArC;;gBAEAP,iBAAA,CAAOQ,WAAP,CAAmB,KA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yDecoratedDescriptor2 = _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, _dec2, _dec3, _dec4, _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 HandlesRelatedSchemasTest = (_dec = (0,
|
|
40
|
+
var HandlesRelatedSchemasTest = (_dec = (0, _testUtils.test)(), _dec2 = (0, _testUtils.test)(), _dec3 = (0, _testUtils.test)(), _dec4 = (0, _testUtils.test)(), (_class = /*#__PURE__*/function (_AbstractSchemaTest) {
|
|
41
41
|
(0, _inherits2["default"])(HandlesRelatedSchemasTest, _AbstractSchemaTest);
|
|
42
42
|
|
|
43
43
|
var _super = _createSuper(HandlesRelatedSchemasTest);
|
|
@@ -64,13 +64,13 @@ var HandlesRelatedSchemasTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.tes
|
|
|
64
64
|
_yield$this$installCo = _context.sent;
|
|
65
65
|
results = _yield$this$installCo.syncResults;
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
_testUtils.assert.isUndefined(results.errors);
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
_test["default"].assertFileByNameInGeneratedFiles(/testPerson\.schema/, results.files);
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
_test["default"].assertFileByNameInGeneratedFiles(/pet\.schema/, results.files);
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
_test["default"].assertFileByNameInGeneratedFiles(/nested-schema\.schema/, results.files);
|
|
74
74
|
|
|
75
75
|
_context.next = 10;
|
|
76
76
|
return this.assertValidActionResponseFiles(results);
|
|
@@ -115,13 +115,13 @@ var HandlesRelatedSchemasTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.tes
|
|
|
115
115
|
typesPath = this.resolveHashSprucePath('schemas', 'schemas.types.ts');
|
|
116
116
|
typesContent = _spruceSkillUtils.diskUtil.readFile(typesPath);
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
_testUtils.assert.doesInclude(typesContent, "[fullyQualifiedEventName:string]: { schemaId: 'eventSignature', version: 'v2020_07_22', values: SpruceSchemas.TestingSchemas.v2020_07_22.EventSignature } | { schemaId: 'eventSignature2', version: 'v2020_07_22', values: SpruceSchemas.TestingSchemas.v2020_07_22.EventSignature2 }");
|
|
119
119
|
|
|
120
120
|
_context2.next = 13;
|
|
121
121
|
return this.Service('typeChecker').check(typesPath);
|
|
122
122
|
|
|
123
123
|
case 13:
|
|
124
|
-
schemaMatch =
|
|
124
|
+
schemaMatch = _test["default"].assertFileByNameInGeneratedFiles('mercuryContract.schema.ts', results.files);
|
|
125
125
|
_context2.next = 16;
|
|
126
126
|
return this.Service('typeChecker').check(schemaMatch);
|
|
127
127
|
|
|
@@ -156,11 +156,11 @@ var HandlesRelatedSchemasTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.tes
|
|
|
156
156
|
_yield$this$installCo2 = _context3.sent;
|
|
157
157
|
syncResults = _yield$this$installCo2.syncResults;
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
_testUtils.assert.isFalsy(syncResults.errors);
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
_testUtils.assert.isTruthy(syncResults.files);
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
_test["default"].assertCountsByAction(syncResults.files, {
|
|
164
164
|
generated: syncResults.files.length,
|
|
165
165
|
updated: 0,
|
|
166
166
|
skipped: 0
|
|
@@ -197,21 +197,21 @@ var HandlesRelatedSchemasTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.tes
|
|
|
197
197
|
_yield$this$installCo3 = _context4.sent;
|
|
198
198
|
syncResults = _yield$this$installCo3.syncResults;
|
|
199
199
|
|
|
200
|
-
|
|
200
|
+
_testUtils.assert.isFalsy(syncResults.errors);
|
|
201
201
|
|
|
202
|
-
|
|
202
|
+
_testUtils.assert.isTruthy(syncResults.files);
|
|
203
203
|
|
|
204
204
|
matches = syncResults.files.filter(function (f) {
|
|
205
205
|
return f.name === 'skillCreator.schema.ts';
|
|
206
206
|
});
|
|
207
207
|
|
|
208
|
-
|
|
208
|
+
_testUtils.assert.isLength(matches, 1);
|
|
209
209
|
|
|
210
|
-
|
|
210
|
+
_testUtils.assert.doesInclude(matches[0].path, _spruceSkillUtils.CORE_SCHEMA_VERSION.dirValue);
|
|
211
211
|
|
|
212
|
-
|
|
212
|
+
_testUtils.assert.doesInclude(matches[0].path, _spruceSkillUtils.CORE_NAMESPACE.toLowerCase());
|
|
213
213
|
|
|
214
|
-
|
|
214
|
+
_testUtils.assert.doesNotInclude(matches[0].path, 'testing');
|
|
215
215
|
|
|
216
216
|
case 11:
|
|
217
217
|
case "end":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HandlesRelatedSchemas.test.js","names":["HandlesRelatedSchemasTest","test","installCopyAndSync","results","syncResults","assert","isUndefined","errors","testUtil","assertFileByNameInGeneratedFiles","files","assertValidActionResponseFiles","installSchemaFeature","schemasDir","resolvePath","diskUtil","copyDir","resolveTestPath","Action","execute","typesPath","resolveHashSprucePath","typesContent","readFile","doesInclude","Service","check","schemaMatch","isFalsy","isTruthy","assertCountsByAction","generated","length","updated","skipped","matches","filter","f","name","isLength","path","CORE_SCHEMA_VERSION","dirValue","CORE_NAMESPACE","toLowerCase","doesNotInclude","testDir","cli","source","destination","AbstractSchemaTest"],"sources":["../../../../src/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.ts"],"sourcesContent":["import {\n\tCORE_NAMESPACE,\n\tCORE_SCHEMA_VERSION,\n\tdiskUtil,\n} 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 HandlesRelatedSchemasTest extends AbstractSchemaTest {\n\t@test()\n\tprotected static async relatedSchemasGeneratesValidFiles() {\n\t\tconst { syncResults: results } = await this.installCopyAndSync()\n\n\t\tassert.isUndefined(results.errors)\n\t\ttestUtil.assertFileByNameInGeneratedFiles(\n\t\t\t/testPerson\\.schema/,\n\t\t\tresults.files\n\t\t)\n\n\t\ttestUtil.assertFileByNameInGeneratedFiles(/pet\\.schema/, results.files)\n\n\t\ttestUtil.assertFileByNameInGeneratedFiles(\n\t\t\t/nested-schema\\.schema/,\n\t\t\tresults.files\n\t\t)\n\n\t\tawait this.assertValidActionResponseFiles(results)\n\t}\n\n\t@test()\n\tprotected static async nestedSchemasInDynamicFields() {\n\t\tawait this.installSchemaFeature('schemas')\n\t\tconst schemasDir = this.resolvePath('src', 'schemas')\n\n\t\tawait diskUtil.copyDir(\n\t\t\tthis.resolveTestPath('dynamic_key_schemas'),\n\t\t\tschemasDir\n\t\t)\n\n\t\tconst results = await this.Action('schema', 'sync').execute({})\n\n\t\tconst typesPath = this.resolveHashSprucePath('schemas', 'schemas.types.ts')\n\t\tconst typesContent = diskUtil.readFile(typesPath)\n\n\t\tassert.doesInclude(\n\t\t\ttypesContent,\n\t\t\t\"[fullyQualifiedEventName:string]: { schemaId: 'eventSignature', version: 'v2020_07_22', values: SpruceSchemas.TestingSchemas.v2020_07_22.EventSignature } | { schemaId: 'eventSignature2', version: 'v2020_07_22', values: SpruceSchemas.TestingSchemas.v2020_07_22.EventSignature2 }\"\n\t\t)\n\n\t\tawait this.Service('typeChecker').check(typesPath)\n\n\t\tconst schemaMatch = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'mercuryContract.schema.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tawait this.Service('typeChecker').check(schemaMatch)\n\t}\n\n\t@test()\n\tprotected static async generatesCoreSchemasFirstSoSchemasCanRelateToThem() {\n\t\tconst { syncResults } = await this.installCopyAndSync()\n\n\t\tassert.isFalsy(syncResults.errors)\n\t\tassert.isTruthy(syncResults.files)\n\n\t\ttestUtil.assertCountsByAction(syncResults.files, {\n\t\t\tgenerated: syncResults.files.length,\n\t\t\tupdated: 0,\n\t\t\tskipped: 0,\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async makesSureMixinSchemaFieldsDontCopySchemaToLocal() {\n\t\tconst { syncResults } = await this.installCopyAndSync()\n\n\t\tassert.isFalsy(syncResults.errors)\n\t\tassert.isTruthy(syncResults.files)\n\n\t\tconst matches = syncResults.files.filter(\n\t\t\t(f) => f.name === 'skillCreator.schema.ts'\n\t\t)\n\n\t\tassert.isLength(matches, 1)\n\t\tassert.doesInclude(matches[0].path, CORE_SCHEMA_VERSION.dirValue)\n\t\tassert.doesInclude(matches[0].path, CORE_NAMESPACE.toLowerCase())\n\t\tassert.doesNotInclude(matches[0].path, 'testing')\n\t}\n\n\tprivate static async installCopyAndSync(testDir = 'related_schemas') {\n\t\tconst cli = await this.installSchemaFeature('schemas')\n\t\tconst source = this.resolveTestPath(testDir)\n\t\tconst destination = this.resolvePath('src/schemas')\n\n\t\tawait diskUtil.copyDir(source, destination)\n\n\t\tconst syncResults = await this.Action('schema', 'sync').execute({})\n\n\t\treturn { cli, syncResults }\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAKA;;AACA;;AACA;;;;;;;;IAEqBA,yB,WACnB,IAAAC,
|
|
1
|
+
{"version":3,"file":"HandlesRelatedSchemas.test.js","names":["HandlesRelatedSchemasTest","test","installCopyAndSync","results","syncResults","assert","isUndefined","errors","testUtil","assertFileByNameInGeneratedFiles","files","assertValidActionResponseFiles","installSchemaFeature","schemasDir","resolvePath","diskUtil","copyDir","resolveTestPath","Action","execute","typesPath","resolveHashSprucePath","typesContent","readFile","doesInclude","Service","check","schemaMatch","isFalsy","isTruthy","assertCountsByAction","generated","length","updated","skipped","matches","filter","f","name","isLength","path","CORE_SCHEMA_VERSION","dirValue","CORE_NAMESPACE","toLowerCase","doesNotInclude","testDir","cli","source","destination","AbstractSchemaTest"],"sources":["../../../../src/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.ts"],"sourcesContent":["import {\n\tCORE_NAMESPACE,\n\tCORE_SCHEMA_VERSION,\n\tdiskUtil,\n} 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 HandlesRelatedSchemasTest extends AbstractSchemaTest {\n\t@test()\n\tprotected static async relatedSchemasGeneratesValidFiles() {\n\t\tconst { syncResults: results } = await this.installCopyAndSync()\n\n\t\tassert.isUndefined(results.errors)\n\t\ttestUtil.assertFileByNameInGeneratedFiles(\n\t\t\t/testPerson\\.schema/,\n\t\t\tresults.files\n\t\t)\n\n\t\ttestUtil.assertFileByNameInGeneratedFiles(/pet\\.schema/, results.files)\n\n\t\ttestUtil.assertFileByNameInGeneratedFiles(\n\t\t\t/nested-schema\\.schema/,\n\t\t\tresults.files\n\t\t)\n\n\t\tawait this.assertValidActionResponseFiles(results)\n\t}\n\n\t@test()\n\tprotected static async nestedSchemasInDynamicFields() {\n\t\tawait this.installSchemaFeature('schemas')\n\t\tconst schemasDir = this.resolvePath('src', 'schemas')\n\n\t\tawait diskUtil.copyDir(\n\t\t\tthis.resolveTestPath('dynamic_key_schemas'),\n\t\t\tschemasDir\n\t\t)\n\n\t\tconst results = await this.Action('schema', 'sync').execute({})\n\n\t\tconst typesPath = this.resolveHashSprucePath('schemas', 'schemas.types.ts')\n\t\tconst typesContent = diskUtil.readFile(typesPath)\n\n\t\tassert.doesInclude(\n\t\t\ttypesContent,\n\t\t\t\"[fullyQualifiedEventName:string]: { schemaId: 'eventSignature', version: 'v2020_07_22', values: SpruceSchemas.TestingSchemas.v2020_07_22.EventSignature } | { schemaId: 'eventSignature2', version: 'v2020_07_22', values: SpruceSchemas.TestingSchemas.v2020_07_22.EventSignature2 }\"\n\t\t)\n\n\t\tawait this.Service('typeChecker').check(typesPath)\n\n\t\tconst schemaMatch = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'mercuryContract.schema.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tawait this.Service('typeChecker').check(schemaMatch)\n\t}\n\n\t@test()\n\tprotected static async generatesCoreSchemasFirstSoSchemasCanRelateToThem() {\n\t\tconst { syncResults } = await this.installCopyAndSync()\n\n\t\tassert.isFalsy(syncResults.errors)\n\t\tassert.isTruthy(syncResults.files)\n\n\t\ttestUtil.assertCountsByAction(syncResults.files, {\n\t\t\tgenerated: syncResults.files.length,\n\t\t\tupdated: 0,\n\t\t\tskipped: 0,\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async makesSureMixinSchemaFieldsDontCopySchemaToLocal() {\n\t\tconst { syncResults } = await this.installCopyAndSync()\n\n\t\tassert.isFalsy(syncResults.errors)\n\t\tassert.isTruthy(syncResults.files)\n\n\t\tconst matches = syncResults.files.filter(\n\t\t\t(f) => f.name === 'skillCreator.schema.ts'\n\t\t)\n\n\t\tassert.isLength(matches, 1)\n\t\tassert.doesInclude(matches[0].path, CORE_SCHEMA_VERSION.dirValue)\n\t\tassert.doesInclude(matches[0].path, CORE_NAMESPACE.toLowerCase())\n\t\tassert.doesNotInclude(matches[0].path, 'testing')\n\t}\n\n\tprivate static async installCopyAndSync(testDir = 'related_schemas') {\n\t\tconst cli = await this.installSchemaFeature('schemas')\n\t\tconst source = this.resolveTestPath(testDir)\n\t\tconst destination = this.resolvePath('src/schemas')\n\n\t\tawait diskUtil.copyDir(source, destination)\n\n\t\tconst syncResults = await this.Action('schema', 'sync').execute({})\n\n\t\treturn { cli, syncResults }\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAKA;;AACA;;AACA;;;;;;;;IAEqBA,yB,WACnB,IAAAC,eAAA,G,UAoBA,IAAAA,eAAA,G,UA8BA,IAAAA,eAAA,G,UAcA,IAAAA,eAAA,G;;;;;;;;;;;;;6HAhED;QAAA;;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA,OAEwC,KAAKC,kBAAL,EAFxC;;cAAA;gBAAA;gBAEsBC,OAFtB,yBAESC,WAFT;;gBAICC,iBAAA,CAAOC,WAAP,CAAmBH,OAAO,CAACI,MAA3B;;gBACAC,gBAAA,CAASC,gCAAT,CACC,oBADD,EAECN,OAAO,CAACO,KAFT;;gBAKAF,gBAAA,CAASC,gCAAT,CAA0C,aAA1C,EAAyDN,OAAO,CAACO,KAAjE;;gBAEAF,gBAAA,CAASC,gCAAT,CACC,uBADD,EAECN,OAAO,CAACO,KAFT;;gBAZD;gBAAA,OAiBO,KAAKC,8BAAL,CAAoCR,OAApC,CAjBP;;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;;wHAoBA;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA,OAEO,KAAKS,oBAAL,CAA0B,SAA1B,CAFP;;cAAA;gBAGOC,UAHP,GAGoB,KAAKC,WAAL,CAAiB,KAAjB,EAAwB,SAAxB,CAHpB;gBAAA;gBAAA,OAKOC,0BAAA,CAASC,OAAT,CACL,KAAKC,eAAL,CAAqB,qBAArB,CADK,EAELJ,UAFK,CALP;;cAAA;gBAAA;gBAAA,OAUuB,KAAKK,MAAL,CAAY,QAAZ,EAAsB,MAAtB,EAA8BC,OAA9B,CAAsC,EAAtC,CAVvB;;cAAA;gBA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AAA;QAAA;MAAA,C;;;;;;;;;;EAlFsD8C,+B"}
|
|
@@ -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 ImportingSchemaImportsTest = (_dec = (0,
|
|
40
|
+
var ImportingSchemaImportsTest = (_dec = (0, _testUtils.test)(), (_class = /*#__PURE__*/function (_AbstractSchemaTest) {
|
|
41
41
|
(0, _inherits2["default"])(ImportingSchemaImportsTest, _AbstractSchemaTest);
|
|
42
42
|
|
|
43
43
|
var _super = _createSuper(ImportingSchemaImportsTest);
|
|
@@ -74,14 +74,14 @@ var ImportingSchemaImportsTest = (_dec = (0, _test.test)(), (_class = /*#__PURE_
|
|
|
74
74
|
case 9:
|
|
75
75
|
results = _context.sent;
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
_testUtils.assert.isFalsy(results.errors);
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
_testUtils.assert.isTruthy(results.files);
|
|
80
80
|
|
|
81
|
-
match =
|
|
81
|
+
match = _test["default"].assertFileByNameInGeneratedFiles('schemas.types.ts', results.files);
|
|
82
82
|
contents = _spruceSkillUtils.diskUtil.readFile(match);
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
_testUtils.assert.doesInclude(contents, "import { BaseWidget } from '" + "#spruce/../widgets/widgets.types'");
|
|
85
85
|
|
|
86
86
|
_context.next = 17;
|
|
87
87
|
return this.assertValidActionResponseFiles(results);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImportingSchemaImports.test.js","names":["ImportingSchemaImportsTest","test","installSchemaFeature","source","resolveTestPath","destination","resolvePath","diskUtil","copyDir","writeFile","Action","execute","results","assert","isFalsy","errors","isTruthy","files","match","testUtil","assertFileByNameInGeneratedFiles","contents","readFile","doesInclude","assertValidActionResponseFiles","AbstractSchemaTest"],"sources":["../../../../src/__tests__/behavioral/schemas/ImportingSchemaImports.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 ImportingSchemaImportsTest 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_imports')\n\n\t\tconst destination = this.resolvePath('src', 'schemas')\n\n\t\tawait diskUtil.copyDir(source, destination)\n\n\t\tdiskUtil.writeFile(\n\t\t\tthis.resolvePath('src', 'widgets', 'widgets.types.ts'),\n\t\t\t'export type BaseWidget = {}'\n\t\t)\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(\n\t\t\tcontents,\n\t\t\t\"import { BaseWidget } from '\" + \"#spruce/../widgets/widgets.types'\"\n\t\t)\n\n\t\tawait this.assertValidActionResponseFiles(results)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;IAEqBA,0B,WACnB,IAAAC,
|
|
1
|
+
{"version":3,"file":"ImportingSchemaImports.test.js","names":["ImportingSchemaImportsTest","test","installSchemaFeature","source","resolveTestPath","destination","resolvePath","diskUtil","copyDir","writeFile","Action","execute","results","assert","isFalsy","errors","isTruthy","files","match","testUtil","assertFileByNameInGeneratedFiles","contents","readFile","doesInclude","assertValidActionResponseFiles","AbstractSchemaTest"],"sources":["../../../../src/__tests__/behavioral/schemas/ImportingSchemaImports.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 ImportingSchemaImportsTest 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_imports')\n\n\t\tconst destination = this.resolvePath('src', 'schemas')\n\n\t\tawait diskUtil.copyDir(source, destination)\n\n\t\tdiskUtil.writeFile(\n\t\t\tthis.resolvePath('src', 'widgets', 'widgets.types.ts'),\n\t\t\t'export type BaseWidget = {}'\n\t\t)\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(\n\t\t\tcontents,\n\t\t\t\"import { BaseWidget } from '\" + \"#spruce/../widgets/widgets.types'\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