@sprucelabs/spruce-cli 19.1.40 → 19.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 +16 -0
- package/build/.spruce/errors/errors.types.js.map +1 -1
- package/build/.spruce/errors/options.types.js.map +1 -1
- package/build/.spruce/errors/spruceCli/actionCancelled.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/bootError.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/buildFailed.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/cacheNotEnabled.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/commandAborted.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/commandBlocked.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/commandNotImplemented.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/createAutoloaderFailed.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/dependencyExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/deployFailed.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/directoryEmpty.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/directoryNotSkill.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/dockerNotStarted.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/executingCommandFailed.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/failedToImport.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/featureNotInstalled.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/fileExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/generic.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/invalidCommand.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/invalidEventContract.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/invalidFeatureCode.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/invalidTestDirectory.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/lintFailed.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/mercuryResponseError.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/missingDependencies.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/missingDependenciesDependency.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/noOrganizationsFound.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/noSkillsRegistered.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/notImplemented.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/notLoggedIn.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/schemaExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/schemaFailedToImport.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/schemaTemplateItemBuildingFailed.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/skillNotFound.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/skillNotRegistered.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/skillViewExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/storeExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/testFailed.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/themeExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/transportAlreadyExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/vscodeNotInstalled.schema.js.map +1 -1
- package/build/.spruce/events/events.contract.js.map +1 -1
- package/build/.spruce/events/heartwood/didRegisterSkillViews.v2021_02_11.contract.js.map +1 -1
- package/build/.spruce/events/heartwood/generateUrl.v2021_02_11.contract.js.map +1 -1
- package/build/.spruce/events/heartwood/getActiveTheme.v2021_02_11.contract.js.map +1 -1
- package/build/.spruce/events/heartwood/getSkillViews.v2021_02_11.contract.js.map +1 -1
- package/build/.spruce/events/heartwood/listViews.v2021_02_11.contract.js.map +1 -1
- package/build/.spruce/events/heartwood/registerDashboardCards.v2021_02_11.contract.js.map +1 -1
- package/build/.spruce/events/heartwood/registerSkillViews.v2021_02_11.contract.js.map +1 -1
- package/build/.spruce/events/heartwood/upsertTheme.v2021_02_11.contract.js.map +1 -1
- package/build/.spruce/events/spruceCli/registerSkillViews.v2021_04_11.contract.js.map +1 -1
- package/build/.spruce/schemas/fields/fieldClassMap.js.map +1 -1
- package/build/.spruce/schemas/fields/fields.types.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/didRegisterSkillViewsEmitPayload.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/didRegisterSkillViewsEmitTarget.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/didRegisterSkillViewsEmitTargetAndPayload.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/generateUrlEmitPayload.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/generateUrlEmitTarget.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/generateUrlEmitTargetAndPayload.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/generateUrlResponsePayload.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/getActiveThemeEmitTarget.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/getActiveThemeEmitTargetAndPayload.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/getActiveThemeResponsePayload.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/getSkillViewsEmitTargetAndPayload.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/getSkillViewsResponsePayload.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/getViewControllersEmitTarget.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/listViewsResponsePayload.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/listViewsResult.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/registerDashboardCardsResponsePayload.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/registerSkillViewsEmitPayload.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/registerSkillViewsEmitTargetAndPayload.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/registerSkillViewsResponsePayload.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/theme.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/upsertThemeEmitPayload.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/upsertThemeEmitTarget.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/upsertThemeEmitTargetAndPayload.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/upsertThemeResponsePayload.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/theme.schema.js.map +1 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/themeProps.schema.js.map +1 -1
- package/build/.spruce/schemas/schemas.types.js.map +1 -1
- package/build/.spruce/schemas/spruce/v2020_07_22/choice.schema.js.map +1 -1
- package/build/.spruce/schemas/spruce/v2020_07_22/link.schema.js.map +1 -1
- package/build/.spruce/schemas/spruce/v2020_07_22/location.schema.js.map +1 -1
- package/build/.spruce/schemas/spruce/v2020_07_22/message.schema.js.map +1 -1
- package/build/.spruce/schemas/spruce/v2020_07_22/messageSource.schema.js.map +1 -1
- package/build/.spruce/schemas/spruce/v2020_07_22/messageTarget.schema.js.map +1 -1
- package/build/.spruce/schemas/spruce/v2020_07_22/organization.schema.js.map +1 -1
- package/build/.spruce/schemas/spruce/v2020_07_22/person.schema.js.map +1 -1
- package/build/.spruce/schemas/spruce/v2020_07_22/personLocation.schema.js.map +1 -1
- package/build/.spruce/schemas/spruce/v2020_07_22/personOrganization.schema.js.map +1 -1
- package/build/.spruce/schemas/spruce/v2020_07_22/role.schema.js.map +1 -1
- package/build/.spruce/schemas/spruce/v2020_07_22/sendMessage.schema.js.map +1 -1
- package/build/.spruce/schemas/spruce/v2020_07_22/skill.schema.js.map +1 -1
- package/build/.spruce/schemas/spruce/v2020_07_22/skillCreator.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/actionResponse.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/bootSkillOptions.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/createConversationTopicOptions.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/createErrorOptions.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/createOrganizationOptions.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/createSchemaOptions.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/createTestOptions.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/generatedDir.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/generatedFile.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/installSkillAtOrganizationOptions.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/listenEventOptions.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/namedTemplateItem.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/nodeFeatureOptions.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/npmPackage.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/onboardOptions.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/onboarding.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/personWithToken.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/registerDashboardWidgetsEmitPayloadSchema.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/setupTestsOptions.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/setupVscodeOptions.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/skillFeature.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/syncErrorOptions.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/syncEventOptions.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/syncSchemaFieldsOptions.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/syncSchemasOptions.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/testOptions.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/upgradeSkillOptions.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/watcherDidDetectChangesEmitPayload.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceEventUtils/v2021_09_13/eventSource.schema.js.map +1 -1
- package/build/.spruce/skill.types.js.map +1 -1
- package/build/GlobalEmitter.js +4 -5
- package/build/GlobalEmitter.js.map +1 -1
- package/build/InFlightEntertainment.js.map +1 -1
- package/build/__tests__/behavioral/AddingADependency.test.js +7 -8
- package/build/__tests__/behavioral/AddingADependency.test.js.map +1 -1
- package/build/__tests__/behavioral/BlockingCommands.test.js +7 -8
- package/build/__tests__/behavioral/BlockingCommands.test.js.map +1 -1
- package/build/__tests__/behavioral/BootingTheCli.test.js +4 -5
- package/build/__tests__/behavioral/BootingTheCli.test.js.map +1 -1
- package/build/__tests__/behavioral/BootingWithBadFiles.test.js +4 -5
- package/build/__tests__/behavioral/BootingWithBadFiles.test.js.map +1 -1
- package/build/__tests__/behavioral/CreatingAConversationTopic.test.js +4 -5
- package/build/__tests__/behavioral/CreatingAConversationTopic.test.js.map +1 -1
- package/build/__tests__/behavioral/DeployingASkill.test.js +9 -10
- package/build/__tests__/behavioral/DeployingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/DeployingToSandbox.test.js +8 -9
- package/build/__tests__/behavioral/DeployingToSandbox.test.js.map +1 -1
- package/build/__tests__/behavioral/EnablingAndDisablingCache.test.js +4 -5
- package/build/__tests__/behavioral/EnablingAndDisablingCache.test.js.map +1 -1
- package/build/__tests__/behavioral/GettingCliVersion.test.js +5 -6
- package/build/__tests__/behavioral/GettingCliVersion.test.js.map +1 -1
- package/build/__tests__/behavioral/ManagingDependencies.test.js +7 -8
- package/build/__tests__/behavioral/ManagingDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/OverridingCommandsInPackageJson.test.js +7 -8
- package/build/__tests__/behavioral/OverridingCommandsInPackageJson.test.js.map +1 -1
- package/build/__tests__/behavioral/RegisteringConversationsOnBoot.test.js +4 -5
- package/build/__tests__/behavioral/RegisteringConversationsOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/RememberingUpgradeSelections.test.js +7 -8
- package/build/__tests__/behavioral/RememberingUpgradeSelections.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingLogTransportsInASkill.test.js +7 -8
- package/build/__tests__/behavioral/SettingLogTransportsInASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingRemote.test.js +7 -8
- package/build/__tests__/behavioral/SettingRemote.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingUpVscode.test.js +4 -5
- package/build/__tests__/behavioral/SettingUpVscode.test.js.map +1 -1
- package/build/__tests__/behavioral/TestingAConversation.test.js +4 -5
- package/build/__tests__/behavioral/TestingAConversation.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/CreatingANewErrorBuilder.test.js +4 -5
- package/build/__tests__/behavioral/errors/CreatingANewErrorBuilder.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/KeepingErrorClassInSync.test.js +4 -5
- package/build/__tests__/behavioral/errors/KeepingErrorClassInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/KeepingErrorsInSync.test.js +4 -5
- package/build/__tests__/behavioral/errors/KeepingErrorsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/SettingUpErrors.test.js +4 -5
- package/build/__tests__/behavioral/errors/SettingUpErrors.test.js.map +1 -1
- package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js +8 -9
- package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js.map +1 -1
- package/build/__tests__/behavioral/events/CreatingAListener.test.js +8 -9
- package/build/__tests__/behavioral/events/CreatingAListener.test.js.map +1 -1
- package/build/__tests__/behavioral/events/CreatingAnEvent.test.js +7 -8
- package/build/__tests__/behavioral/events/CreatingAnEvent.test.js.map +1 -1
- package/build/__tests__/behavioral/events/EventWriter.test.js +4 -5
- package/build/__tests__/behavioral/events/EventWriter.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingEventsInSync.test.js +4 -5
- package/build/__tests__/behavioral/events/KeepingEventsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingEventsInSync2.test.js +7 -8
- package/build/__tests__/behavioral/events/KeepingEventsInSync2.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingListenersInSync.test.js +4 -5
- package/build/__tests__/behavioral/events/KeepingListenersInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/events/ListeningToAnEventYouCreate.test.js +4 -5
- package/build/__tests__/behavioral/events/ListeningToAnEventYouCreate.test.js.map +1 -1
- package/build/__tests__/behavioral/events/ListeningToCoreEvents.test.js +7 -8
- package/build/__tests__/behavioral/events/ListeningToCoreEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/events/RegisteringEventsOnBoot.test.js +5 -6
- package/build/__tests__/behavioral/events/RegisteringEventsOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/events/RegisteringGlobalEvents.test.js +8 -9
- package/build/__tests__/behavioral/events/RegisteringGlobalEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/events/SettingUpEvents.test.js +4 -5
- package/build/__tests__/behavioral/events/SettingUpEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.js +5 -6
- package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/events/SyncingEventsOnlyFromDependencies.test.js +7 -8
- package/build/__tests__/behavioral/events/SyncingEventsOnlyFromDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/node/CreatingANodeModule.test.js +4 -5
- package/build/__tests__/behavioral/node/CreatingANodeModule.test.js.map +1 -1
- package/build/__tests__/behavioral/onboard/StartingOnboarding.test.js +5 -7
- package/build/__tests__/behavioral/onboard/StartingOnboarding.test.js.map +1 -1
- package/build/__tests__/behavioral/organization/CreatingAnOrg.test.js +4 -5
- package/build/__tests__/behavioral/organization/CreatingAnOrg.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/CreatingPermissions.test.js +4 -5
- package/build/__tests__/behavioral/permissions/CreatingPermissions.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/PermissionPlugin.test.js +4 -5
- package/build/__tests__/behavioral/permissions/PermissionPlugin.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/PermissionStore.test.js +8 -9
- package/build/__tests__/behavioral/permissions/PermissionStore.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/PermissionWriter.test.js +4 -5
- package/build/__tests__/behavioral/permissions/PermissionWriter.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/SyncingPermissions.test.js +8 -10
- package/build/__tests__/behavioral/permissions/SyncingPermissions.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/support/AbstractPermissionsTest.js +5 -6
- package/build/__tests__/behavioral/permissions/support/AbstractPermissionsTest.js.map +1 -1
- package/build/__tests__/behavioral/permissions/support/generateShortAlphaId.js.map +1 -1
- package/build/__tests__/behavioral/permissions/support/renderPermissionTestFile.js.map +1 -1
- package/build/__tests__/behavioral/permissions/support/sortPermissionContracts.js.map +1 -1
- package/build/__tests__/behavioral/person/LoggingInAsPerson.test.js +4 -5
- package/build/__tests__/behavioral/person/LoggingInAsPerson.test.js.map +1 -1
- package/build/__tests__/behavioral/person/SeeWhoIsLoggedIn.test.js +4 -5
- package/build/__tests__/behavioral/person/SeeWhoIsLoggedIn.test.js.map +1 -1
- package/build/__tests__/behavioral/polish/SettingUpPolish.test.js +4 -5
- package/build/__tests__/behavioral/polish/SettingUpPolish.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/CreatingANewSchemaBuilder.test.js +4 -5
- package/build/__tests__/behavioral/schemas/CreatingANewSchemaBuilder.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/CreatingSchemasWithGenerics.test.js +4 -5
- package/build/__tests__/behavioral/schemas/CreatingSchemasWithGenerics.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.js +4 -5
- package/build/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.js +4 -5
- package/build/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.js +4 -5
- package/build/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/ImportingSchemaImports.test.js +4 -5
- package/build/__tests__/behavioral/schemas/ImportingSchemaImports.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/KeepingSchemasInSync.test.js +8 -9
- package/build/__tests__/behavioral/schemas/KeepingSchemasInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/SettingUpSchemas.test.js +4 -5
- package/build/__tests__/behavioral/schemas/SettingUpSchemas.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/SettingUpSchemasForModuleDistribution.test.js +9 -10
- package/build/__tests__/behavioral/schemas/SettingUpSchemasForModuleDistribution.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/SyncingBadSchemasProvidesHelpfulErrorMessages.test.js +4 -5
- package/build/__tests__/behavioral/schemas/SyncingBadSchemasProvidesHelpfulErrorMessages.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/UsingSchemasInCli.test.js +4 -5
- package/build/__tests__/behavioral/schemas/UsingSchemasInCli.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/BootingASkill.test.js +7 -8
- package/build/__tests__/behavioral/skill/BootingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/CreatingASkill.test.js +5 -6
- package/build/__tests__/behavioral/skill/CreatingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/InstallingASkillAtAnOrg.test.js +5 -6
- package/build/__tests__/behavioral/skill/InstallingASkillAtAnOrg.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/LoggingInAsASkill.test.js +8 -9
- package/build/__tests__/behavioral/skill/LoggingInAsASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/RebuildingASkill.test.js +7 -8
- package/build/__tests__/behavioral/skill/RebuildingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/RegisteringASkill.test.js +19 -14
- package/build/__tests__/behavioral/skill/RegisteringASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/SettingUpASkill.test.js +4 -5
- package/build/__tests__/behavioral/skill/SettingUpASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/stores/CreatingADataStore.test.js +7 -8
- package/build/__tests__/behavioral/stores/CreatingADataStore.test.js.map +1 -1
- package/build/__tests__/behavioral/stores/KeepingDataStoresInSync.test.js +8 -9
- package/build/__tests__/behavioral/stores/KeepingDataStoresInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/CreatingATest.test.js +4 -5
- package/build/__tests__/behavioral/tests/CreatingATest.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/RunningTests.test.js +8 -9
- package/build/__tests__/behavioral/tests/RunningTests.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js +4 -5
- package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/SettingUpASkillForTesting.test.js +7 -8
- package/build/__tests__/behavioral/tests/SettingUpASkillForTesting.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/SettingUpTests.test.js +4 -5
- package/build/__tests__/behavioral/tests/SettingUpTests.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/TestReporterSettingsRemembered.test.js +4 -5
- package/build/__tests__/behavioral/tests/TestReporterSettingsRemembered.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/TestingDataStores.test.js +7 -8
- package/build/__tests__/behavioral/tests/TestingDataStores.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies.test.js +8 -9
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies2.test.js +8 -9
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies2.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingANodeModule.test.js +5 -6
- package/build/__tests__/behavioral/upgrading/UpgradingANodeModule.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill.test.js +5 -6
- package/build/__tests__/behavioral/upgrading/UpgradingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill2.test.js +5 -6
- package/build/__tests__/behavioral/upgrading/UpgradingASkill2.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill3.test.js +8 -9
- package/build/__tests__/behavioral/upgrading/UpgradingASkill3.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill4.test.js +5 -6
- package/build/__tests__/behavioral/upgrading/UpgradingASkill4.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill5.test.d.ts +5 -0
- package/build/__tests__/behavioral/upgrading/UpgradingASkill5.test.js +238 -74
- package/build/__tests__/behavioral/upgrading/UpgradingASkill5.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingWithListeners.test.js +4 -5
- package/build/__tests__/behavioral/upgrading/UpgradingWithListeners.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingWithSandboxFeatureInstalled.test.js +5 -6
- package/build/__tests__/behavioral/upgrading/UpgradingWithSandboxFeatureInstalled.test.js.map +1 -1
- package/build/__tests__/behavioral/views/CreatingASkillView.test.js +8 -9
- package/build/__tests__/behavioral/views/CreatingASkillView.test.js.map +1 -1
- package/build/__tests__/behavioral/views/CreatingATheme.test.js +7 -8
- package/build/__tests__/behavioral/views/CreatingATheme.test.js.map +1 -1
- package/build/__tests__/behavioral/views/KeepingViewsInSync.test.js +8 -9
- package/build/__tests__/behavioral/views/KeepingViewsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/views/RegisteringSkillViewOnBoot.test.js +7 -8
- package/build/__tests__/behavioral/views/RegisteringSkillViewOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/views/SettingUpViews.test.js +4 -5
- package/build/__tests__/behavioral/views/SettingUpViews.test.js.map +1 -1
- package/build/__tests__/behavioral/views/TestingViewControllers.test.js +8 -9
- package/build/__tests__/behavioral/views/TestingViewControllers.test.js.map +1 -1
- package/build/__tests__/behavioral/views/WatchingSkillViews.test.js +8 -9
- package/build/__tests__/behavioral/views/WatchingSkillViews.test.js.map +1 -1
- package/build/__tests__/behavioral/watchers/WatchingForChanges.test.js +4 -5
- package/build/__tests__/behavioral/watchers/WatchingForChanges.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter.test.js +4 -5
- package/build/__tests__/implementation/ActionExecuter.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter2.test.js +4 -5
- package/build/__tests__/implementation/ActionExecuter2.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter3.test.js +4 -5
- package/build/__tests__/implementation/ActionExecuter3.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter4.test.js +5 -6
- package/build/__tests__/implementation/ActionExecuter4.test.js.map +1 -1
- package/build/__tests__/implementation/ArgParser.test.js +4 -5
- package/build/__tests__/implementation/ArgParser.test.js.map +1 -1
- package/build/__tests__/implementation/BuildService.test.js +4 -5
- package/build/__tests__/implementation/BuildService.test.js.map +1 -1
- package/build/__tests__/implementation/BulkImporting.test.js +7 -8
- package/build/__tests__/implementation/BulkImporting.test.js.map +1 -1
- package/build/__tests__/implementation/CachingImports.test.js +8 -9
- package/build/__tests__/implementation/CachingImports.test.js.map +1 -1
- package/build/__tests__/implementation/CommandOptionBuilder.test.js +4 -5
- package/build/__tests__/implementation/CommandOptionBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/CommanderCommandResultMapper.test.js +8 -9
- package/build/__tests__/implementation/CommanderCommandResultMapper.test.js.map +1 -1
- package/build/__tests__/implementation/DataStoreStore.test.js +8 -9
- package/build/__tests__/implementation/DataStoreStore.test.js.map +1 -1
- package/build/__tests__/implementation/DeletingOrphanedSchemaDefinitions.test.js +4 -5
- package/build/__tests__/implementation/DeletingOrphanedSchemaDefinitions.test.js.map +1 -1
- package/build/__tests__/implementation/EventContractCleanerUtil.test.js +4 -5
- package/build/__tests__/implementation/EventContractCleanerUtil.test.js.map +1 -1
- package/build/__tests__/implementation/EventStore.test.js +8 -9
- package/build/__tests__/implementation/EventStore.test.js.map +1 -1
- package/build/__tests__/implementation/EventTemplateItemBuilder.test.js +8 -9
- package/build/__tests__/implementation/EventTemplateItemBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/FeatureCommandAttacher.test.js +8 -9
- package/build/__tests__/implementation/FeatureCommandAttacher.test.js.map +1 -1
- package/build/__tests__/implementation/FeatureFixture.test.js +8 -9
- package/build/__tests__/implementation/FeatureFixture.test.js.map +1 -1
- package/build/__tests__/implementation/FeatureInstaller.test.js +8 -9
- package/build/__tests__/implementation/FeatureInstaller.test.js.map +1 -1
- package/build/__tests__/implementation/FeaturesUtil.test.js +4 -5
- package/build/__tests__/implementation/FeaturesUtil.test.js.map +1 -1
- package/build/__tests__/implementation/FieldTemplateItemBuilder.test.js +7 -8
- package/build/__tests__/implementation/FieldTemplateItemBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/GlobalEmitter.test.js +4 -5
- package/build/__tests__/implementation/GlobalEmitter.test.js.map +1 -1
- package/build/__tests__/implementation/Introspection.test.js +4 -5
- package/build/__tests__/implementation/Introspection.test.js.map +1 -1
- package/build/__tests__/implementation/JestJsonParser.test.js +8 -9
- package/build/__tests__/implementation/JestJsonParser.test.js.map +1 -1
- package/build/__tests__/implementation/LintService.test.js +4 -5
- package/build/__tests__/implementation/LintService.test.js.map +1 -1
- package/build/__tests__/implementation/ListenerStore.test.js +4 -5
- package/build/__tests__/implementation/ListenerStore.test.js.map +1 -1
- package/build/__tests__/implementation/OnboardingScriptLoader.test.js +7 -8
- package/build/__tests__/implementation/OnboardingScriptLoader.test.js.map +1 -1
- package/build/__tests__/implementation/OnboardingScriptPlayer.test.js +8 -9
- package/build/__tests__/implementation/OnboardingScriptPlayer.test.js.map +1 -1
- package/build/__tests__/implementation/OnboardingStore.test.js +8 -9
- package/build/__tests__/implementation/OnboardingStore.test.js.map +1 -1
- package/build/__tests__/implementation/OrganizationStore.test.js +4 -5
- package/build/__tests__/implementation/OrganizationStore.test.js.map +1 -1
- package/build/__tests__/implementation/ParentTestFinder.test.js +4 -5
- package/build/__tests__/implementation/ParentTestFinder.test.js.map +1 -1
- package/build/__tests__/implementation/PkgService.test.js +8 -9
- package/build/__tests__/implementation/PkgService.test.js.map +1 -1
- package/build/__tests__/implementation/SchemaStore.test.js +4 -5
- package/build/__tests__/implementation/SchemaStore.test.js.map +1 -1
- package/build/__tests__/implementation/SchemaTemplateItemBuilder.test.js +8 -9
- package/build/__tests__/implementation/SchemaTemplateItemBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/SchemaValueTypeWriter.test.js +8 -9
- package/build/__tests__/implementation/SchemaValueTypeWriter.test.js.map +1 -1
- package/build/__tests__/implementation/ServiceFactory.test.js +8 -9
- package/build/__tests__/implementation/ServiceFactory.test.js.map +1 -1
- package/build/__tests__/implementation/SettingUpANodeModule.test.js +4 -5
- package/build/__tests__/implementation/SettingUpANodeModule.test.js.map +1 -1
- package/build/__tests__/implementation/SkillStore.test.js +8 -9
- package/build/__tests__/implementation/SkillStore.test.js.map +1 -1
- package/build/__tests__/implementation/StoreFeature.test.js +4 -5
- package/build/__tests__/implementation/StoreFeature.test.js.map +1 -1
- package/build/__tests__/implementation/TestReporter.test.js +8 -9
- package/build/__tests__/implementation/TestReporter.test.js.map +1 -1
- package/build/__tests__/implementation/TestRunner.test.js +8 -9
- package/build/__tests__/implementation/TestRunner.test.js.map +1 -1
- package/build/__tests__/implementation/ValueTypeMapping.test.js +5 -6
- package/build/__tests__/implementation/ValueTypeMapping.test.js.map +1 -1
- package/build/__tests__/implementation/Widgets.test.js +8 -9
- package/build/__tests__/implementation/Widgets.test.js.map +1 -1
- package/build/__tests__/support/EventFaker.d.ts +2 -0
- package/build/__tests__/support/EventFaker.js +54 -0
- package/build/__tests__/support/EventFaker.js.map +1 -1
- package/build/__tests__/support/onTestFileResult.js.map +1 -1
- package/build/__tests__/support/scripts/first.script.js.map +1 -1
- package/build/__tests__/support/scripts/second.script.js.map +1 -1
- package/build/__tests__/support/scripts/third.test.script.js.map +1 -1
- package/build/addons/filePrompt.addon.js.map +1 -1
- package/build/boot.js.map +1 -1
- package/build/cli/Cli.js.map +1 -1
- package/build/components/AbstractComponent.js.map +1 -1
- package/build/components/FormComponent.js +5 -6
- package/build/components/FormComponent.js.map +1 -1
- package/build/components/QuizComponent.js.map +1 -1
- package/build/constants.js.map +1 -1
- package/build/errors/SpruceError.js +5 -6
- package/build/errors/SpruceError.js.map +1 -1
- package/build/errors/actionCancelled.builder.js.map +1 -1
- package/build/errors/bootError.builder.js.map +1 -1
- package/build/errors/buildFailed.builder.js.map +1 -1
- package/build/errors/cacheNotEnabled.builder.js.map +1 -1
- package/build/errors/commandAborted.builder.js.map +1 -1
- package/build/errors/commandBlocked.builder.js.map +1 -1
- package/build/errors/commandNotImplemented.builder.js.map +1 -1
- package/build/errors/createAutoloaderFailed.builder.js.map +1 -1
- package/build/errors/dependencyExists.builder.js.map +1 -1
- package/build/errors/deployFailed.builder.js.map +1 -1
- package/build/errors/directoryEmpty.builder.js.map +1 -1
- package/build/errors/directoryNotSkill.builder.js.map +1 -1
- package/build/errors/dockerNotStarted.builder.js.map +1 -1
- package/build/errors/executingCommandFailed.builder.js.map +1 -1
- package/build/errors/failedToImport.builder.js.map +1 -1
- package/build/errors/featureNotInstalled.builder.js.map +1 -1
- package/build/errors/fileExists.builder.js.map +1 -1
- package/build/errors/generic.builder.js.map +1 -1
- package/build/errors/invalidCommand.builder.js.map +1 -1
- package/build/errors/invalidEventContract.builder.js.map +1 -1
- package/build/errors/invalidFeatureCode.builder.js.map +1 -1
- package/build/errors/invalidTestDirectory.builder.js.map +1 -1
- package/build/errors/lintFailed.builder.js.map +1 -1
- package/build/errors/mercuryResponseError.builder.js.map +1 -1
- package/build/errors/missingDependencies.builder.js.map +1 -1
- package/build/errors/noOrganizationsFound.builder.js.map +1 -1
- package/build/errors/noSkillsRegistered.builder.js.map +1 -1
- package/build/errors/notImplemented.builder.js.map +1 -1
- package/build/errors/notLoggedIn.builder.js.map +1 -1
- package/build/errors/schemaExists.builder.js.map +1 -1
- package/build/errors/schemaFailedToImport.builder.js.map +1 -1
- package/build/errors/schemaTemplateItemBuildingFailed.builder.js.map +1 -1
- package/build/errors/skillNotFound.builder.js.map +1 -1
- package/build/errors/skillNotRegistered.builder.js.map +1 -1
- package/build/errors/skillViewExists.builder.js.map +1 -1
- package/build/errors/storeExists.builder.js.map +1 -1
- package/build/errors/testFailed.builder.js.map +1 -1
- package/build/errors/themeExists.builder.js.map +1 -1
- package/build/errors/transportAlreadyExists.builder.js.map +1 -1
- package/build/errors/vscodeNotInstalled.builder.js.map +1 -1
- package/build/features/AbstractAction.js.map +1 -1
- package/build/features/AbstractFeature.js.map +1 -1
- package/build/features/ActionExecuter.js.map +1 -1
- package/build/features/ActionFactory.d.ts +1 -2
- package/build/features/ActionFactory.js.map +1 -1
- package/build/features/ActionQuestionAsker.js.map +1 -1
- package/build/features/FeatureCommandAttacher.js.map +1 -1
- package/build/features/FeatureInstaller.js.map +1 -1
- package/build/features/FeatureInstallerFactory.js.map +1 -1
- package/build/features/OverrideActionDecorator.js.map +1 -1
- package/build/features/cache/CacheFeature.js +5 -6
- package/build/features/cache/CacheFeature.js.map +1 -1
- package/build/features/cache/actions/DisableAction.js +5 -6
- package/build/features/cache/actions/DisableAction.js.map +1 -1
- package/build/features/cache/actions/EnableAction.js +5 -6
- package/build/features/cache/actions/EnableAction.js.map +1 -1
- package/build/features/cache/constants.js.map +1 -1
- package/build/features/conversation/ConversationFeature.js +5 -6
- package/build/features/conversation/ConversationFeature.js.map +1 -1
- package/build/features/conversation/actions/CreateAction.js +5 -6
- package/build/features/conversation/actions/CreateAction.js.map +1 -1
- package/build/features/conversation/actions/TestAction.js +5 -6
- package/build/features/conversation/actions/TestAction.js.map +1 -1
- package/build/features/conversation/stores/ConversationStore.js +5 -6
- package/build/features/conversation/stores/ConversationStore.js.map +1 -1
- package/build/features/conversation/writers/ConversationWriter.js +4 -5
- package/build/features/conversation/writers/ConversationWriter.js.map +1 -1
- package/build/features/dependencies/DependencyFeature.js +5 -6
- package/build/features/dependencies/DependencyFeature.js.map +1 -1
- package/build/features/dependencies/actions/AddAction.js +5 -6
- package/build/features/dependencies/actions/AddAction.js.map +1 -1
- package/build/features/dependencies/actions/ManageAction.js +5 -6
- package/build/features/dependencies/actions/ManageAction.js.map +1 -1
- package/build/features/deploy/DeployFeature.js +5 -6
- package/build/features/deploy/DeployFeature.js.map +1 -1
- package/build/features/deploy/actions/HerokuAction.js +5 -6
- package/build/features/deploy/actions/HerokuAction.js.map +1 -1
- package/build/features/deploy/writers/DeployWriter.js +4 -5
- package/build/features/deploy/writers/DeployWriter.js.map +1 -1
- package/build/features/error/ErrorFeature.js +5 -6
- package/build/features/error/ErrorFeature.js.map +1 -1
- package/build/features/error/ParentTestFinder.js.map +1 -1
- package/build/features/error/actions/CreateAction.js +5 -6
- package/build/features/error/actions/CreateAction.js.map +1 -1
- package/build/features/error/actions/SyncAction.js +5 -6
- package/build/features/error/actions/SyncAction.js.map +1 -1
- package/build/features/error/writers/ErrorWriter.js +4 -5
- package/build/features/error/writers/ErrorWriter.js.map +1 -1
- package/build/features/event/EventFeature.js +5 -6
- package/build/features/event/EventFeature.js.map +1 -1
- package/build/features/event/actions/CreateAction.js +5 -6
- package/build/features/event/actions/CreateAction.js.map +1 -1
- package/build/features/event/actions/ListenAction.js +5 -6
- package/build/features/event/actions/ListenAction.js.map +1 -1
- package/build/features/event/actions/SetRemoteAction.js +5 -6
- package/build/features/event/actions/SetRemoteAction.js.map +1 -1
- package/build/features/event/actions/SyncAction.js +5 -6
- package/build/features/event/actions/SyncAction.js.map +1 -1
- package/build/features/event/actions/SyncListenersAction.js +5 -6
- package/build/features/event/actions/SyncListenersAction.js.map +1 -1
- package/build/features/event/builders/EventContractBuilder.js.map +1 -1
- package/build/features/event/builders/ListenerTemplateItemBuilder.js.map +1 -1
- package/build/features/event/services/EventSettingsService.js.map +1 -1
- package/build/features/event/services/RemoteService.js.map +1 -1
- package/build/features/event/stores/EventStore.js +5 -6
- package/build/features/event/stores/EventStore.js.map +1 -1
- package/build/features/event/stores/ListenerStore.js +5 -6
- package/build/features/event/stores/ListenerStore.js.map +1 -1
- package/build/features/event/writers/EventWriter.js +4 -5
- package/build/features/event/writers/EventWriter.js.map +1 -1
- package/build/features/eventContract/EventContractFeature.js +5 -6
- package/build/features/eventContract/EventContractFeature.js.map +1 -1
- package/build/features/eventContract/actions/PullAction.js +5 -6
- package/build/features/eventContract/actions/PullAction.js.map +1 -1
- package/build/features/feature.utilities.js.map +1 -1
- package/build/features/features.types.js.map +1 -1
- package/build/features/log/LogFeature.js +5 -6
- package/build/features/log/LogFeature.js.map +1 -1
- package/build/features/log/actions/CreateTransportAction.js +5 -6
- package/build/features/log/actions/CreateTransportAction.js.map +1 -1
- package/build/features/log/writers/LogWriter.js +4 -5
- package/build/features/log/writers/LogWriter.js.map +1 -1
- package/build/features/node/NodeFeature.js +5 -6
- package/build/features/node/NodeFeature.js.map +1 -1
- package/build/features/node/actions/CreateAction.js +5 -6
- package/build/features/node/actions/CreateAction.js.map +1 -1
- package/build/features/node/actions/UpdateDependenciesAction.js +5 -6
- package/build/features/node/actions/UpdateDependenciesAction.js.map +1 -1
- package/build/features/node/actions/UpgradeAction.js +13 -11
- package/build/features/node/actions/UpgradeAction.js.map +1 -1
- package/build/features/node/writers/NodeWriter.js +4 -5
- package/build/features/node/writers/NodeWriter.js.map +1 -1
- package/build/features/onboard/OnboardFeature.js +5 -6
- package/build/features/onboard/OnboardFeature.js.map +1 -1
- package/build/features/onboard/ScriptLoader.js.map +1 -1
- package/build/features/onboard/ScriptPlayer.js.map +1 -1
- package/build/features/onboard/actions/OnboardAction.js +5 -6
- package/build/features/onboard/actions/OnboardAction.js.map +1 -1
- package/build/features/onboard/scripts/onboarding.first.script.js.map +1 -1
- package/build/features/onboard/scripts/onboarding.immersive.script.js.map +1 -1
- package/build/features/onboard/scripts/onboarding.returning.script.js.map +1 -1
- package/build/features/onboard/scripts/onboarding.short.script.js.map +1 -1
- package/build/features/onboard/scripts/todo/todo.create.skill.script.js.map +1 -1
- package/build/features/onboard/scripts/todo/todo.test.script.js.map +1 -1
- package/build/features/onboard/scripts/wrongCommand.script.js.map +1 -1
- package/build/features/onboard/stores/OnboardingStore.js +5 -6
- package/build/features/onboard/stores/OnboardingStore.js.map +1 -1
- package/build/features/organization/OrganizationFeature.js +5 -6
- package/build/features/organization/OrganizationFeature.js.map +1 -1
- package/build/features/organization/actions/CreateAction.js +5 -6
- package/build/features/organization/actions/CreateAction.js.map +1 -1
- package/build/features/organization/actions/InstallAction.js +5 -6
- package/build/features/organization/actions/InstallAction.js.map +1 -1
- package/build/features/organization/stores/OrganizationStore.js +5 -6
- package/build/features/organization/stores/OrganizationStore.js.map +1 -1
- package/build/features/permission/PermissionFeature.js +5 -6
- package/build/features/permission/PermissionFeature.js.map +1 -1
- package/build/features/permission/actions/CreateAction.js +5 -6
- package/build/features/permission/actions/CreateAction.js.map +1 -1
- package/build/features/permission/actions/SyncAction.js +5 -6
- package/build/features/permission/actions/SyncAction.js.map +1 -1
- package/build/features/permission/stores/PermissionStore.js +5 -6
- package/build/features/permission/stores/PermissionStore.js.map +1 -1
- package/build/features/permission/writers/PermissionWriter.js +4 -5
- package/build/features/permission/writers/PermissionWriter.js.map +1 -1
- package/build/features/person/PersonFeature.js +5 -6
- package/build/features/person/PersonFeature.js.map +1 -1
- package/build/features/person/actions/LoginAction.js +5 -6
- package/build/features/person/actions/LoginAction.js.map +1 -1
- package/build/features/person/actions/LogoutAction.js +5 -6
- package/build/features/person/actions/LogoutAction.js.map +1 -1
- package/build/features/person/actions/WhoamiAction.js +5 -6
- package/build/features/person/actions/WhoamiAction.js.map +1 -1
- package/build/features/polish/PolishFeature.js +5 -6
- package/build/features/polish/PolishFeature.js.map +1 -1
- package/build/features/polish/actions/SetupAction.js +5 -6
- package/build/features/polish/actions/SetupAction.js.map +1 -1
- package/build/features/polish/writers/PolishWriter.js +4 -5
- package/build/features/polish/writers/PolishWriter.js.map +1 -1
- package/build/features/sandbox/SandboxFeature.js +5 -6
- package/build/features/sandbox/SandboxFeature.js.map +1 -1
- package/build/features/sandbox/actions/SetupAction.js +5 -6
- package/build/features/sandbox/actions/SetupAction.js.map +1 -1
- package/build/features/sandbox/writers/SandboxWriter.js +4 -5
- package/build/features/sandbox/writers/SandboxWriter.js.map +1 -1
- package/build/features/schema/SchemaFeature.js +5 -6
- package/build/features/schema/SchemaFeature.js.map +1 -1
- package/build/features/schema/ValueTypeBuilder.js.map +1 -1
- package/build/features/schema/actions/CreateAction.js +5 -6
- package/build/features/schema/actions/CreateAction.js.map +1 -1
- package/build/features/schema/actions/SyncAction.js +5 -6
- package/build/features/schema/actions/SyncAction.js.map +1 -1
- package/build/features/schema/actions/SyncFieldsAction.js +5 -6
- package/build/features/schema/actions/SyncFieldsAction.js.map +1 -1
- package/build/features/schema/services/SchemaService.js +4 -5
- package/build/features/schema/services/SchemaService.js.map +1 -1
- package/build/features/schema/stores/SchemaStore.js +5 -6
- package/build/features/schema/stores/SchemaStore.js.map +1 -1
- package/build/features/schema/utilities/schema.utility.js.map +1 -1
- package/build/features/schema/utilities/schemaDisk.utility.js.map +1 -1
- package/build/features/schema/utilities/schemaGenerator.utility.js.map +1 -1
- package/build/features/schema/writers/SchemaWriter.js +5 -6
- package/build/features/schema/writers/SchemaWriter.js.map +1 -1
- package/build/features/skill/SkillFeature.js +5 -6
- package/build/features/skill/SkillFeature.js.map +1 -1
- package/build/features/skill/actions/BootAction.js +5 -6
- package/build/features/skill/actions/BootAction.js.map +1 -1
- package/build/features/skill/actions/CreateAction.js +5 -6
- package/build/features/skill/actions/CreateAction.js.map +1 -1
- package/build/features/skill/actions/DashboardAction.js +5 -6
- package/build/features/skill/actions/DashboardAction.js.map +1 -1
- package/build/features/skill/actions/LoginAction.js +5 -6
- package/build/features/skill/actions/LoginAction.js.map +1 -1
- package/build/features/skill/actions/RebuildAction.js +5 -6
- package/build/features/skill/actions/RebuildAction.js.map +1 -1
- package/build/features/skill/actions/RegisterAction.js +5 -6
- package/build/features/skill/actions/RegisterAction.js.map +1 -1
- package/build/features/skill/stores/SkillStore.js +5 -6
- package/build/features/skill/stores/SkillStore.js.map +1 -1
- package/build/features/skill/updaters/Updater.js.map +1 -1
- package/build/features/skill/writers/SkillWriter.js +4 -5
- package/build/features/skill/writers/SkillWriter.js.map +1 -1
- package/build/features/store/StoreFeature.js +5 -6
- package/build/features/store/StoreFeature.js.map +1 -1
- package/build/features/store/actions/CreateAction.js +5 -6
- package/build/features/store/actions/CreateAction.js.map +1 -1
- package/build/features/store/actions/SyncAction.js +5 -6
- package/build/features/store/actions/SyncAction.js.map +1 -1
- package/build/features/store/stores/StoreStore.js +5 -6
- package/build/features/store/stores/StoreStore.js.map +1 -1
- package/build/features/store/templateItemBuilders/StoreTemplateItemBuilder.js.map +1 -1
- package/build/features/store/writers/StoreWriter.js +4 -5
- package/build/features/store/writers/StoreWriter.js.map +1 -1
- package/build/features/test/TestFeature.js +5 -6
- package/build/features/test/TestFeature.js.map +1 -1
- package/build/features/test/TestLogItemGenerator.js.map +1 -1
- package/build/features/test/TestReporter.js +2 -2
- package/build/features/test/TestReporter.js.map +1 -1
- package/build/features/test/TestRunner.js +5 -6
- package/build/features/test/TestRunner.js.map +1 -1
- package/build/features/test/actions/CreateAction.js +5 -6
- package/build/features/test/actions/CreateAction.js.map +1 -1
- package/build/features/test/actions/SetupAction.js +5 -6
- package/build/features/test/actions/SetupAction.js.map +1 -1
- package/build/features/test/actions/TestAction.js +5 -6
- package/build/features/test/actions/TestAction.js.map +1 -1
- package/build/features/test/test.types.js.map +1 -1
- package/build/features/test/writers/TestWriter.js +4 -5
- package/build/features/test/writers/TestWriter.js.map +1 -1
- package/build/features/universalDevDependencies.js.map +1 -1
- package/build/features/universalFileDescriptions.js.map +1 -1
- package/build/features/universalScripts.js.map +1 -1
- package/build/features/validateAndNormalize.utility.js.map +1 -1
- package/build/features/view/ViewFeature.js +5 -6
- package/build/features/view/ViewFeature.js.map +1 -1
- package/build/features/view/actions/CreateAction.js +5 -6
- package/build/features/view/actions/CreateAction.js.map +1 -1
- package/build/features/view/actions/CreateThemeAction.js +5 -6
- package/build/features/view/actions/CreateThemeAction.js.map +1 -1
- package/build/features/view/actions/SyncAction.js +5 -6
- package/build/features/view/actions/SyncAction.js.map +1 -1
- package/build/features/view/actions/WatchAction.js +5 -6
- package/build/features/view/actions/WatchAction.js.map +1 -1
- package/build/features/view/stores/ViewStore.js +5 -6
- package/build/features/view/stores/ViewStore.js.map +1 -1
- package/build/features/view/writers/ViewWriter.js +4 -5
- package/build/features/view/writers/ViewWriter.js.map +1 -1
- package/build/features/vscode/VsCodeFeature.js +5 -6
- package/build/features/vscode/VsCodeFeature.js.map +1 -1
- package/build/features/vscode/actions/SetupAction.js +5 -6
- package/build/features/vscode/actions/SetupAction.js.map +1 -1
- package/build/features/vscode/services/VsCodeService.js +4 -5
- package/build/features/vscode/services/VsCodeService.js.map +1 -1
- package/build/features/vscode/writers/VsCodeWriter.js +4 -5
- package/build/features/vscode/writers/VsCodeWriter.js.map +1 -1
- package/build/features/watch/WatchFeature.js +5 -6
- package/build/features/watch/WatchFeature.js.map +1 -1
- package/build/index.js.map +1 -1
- package/build/interfaces/SpyInterface.js.map +1 -1
- package/build/interfaces/TerminalInterface.js.map +1 -1
- package/build/schemas/v2020_07_22/actionResponse.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/bootSkillOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/createConversationTopicOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/createErrorOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/createOrganizationOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/createSchemaOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/createTestOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/generatedFile.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/installSkillAtOrganizationOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/listenEventOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/namedTemplateItem.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/nodeFeatureOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/onboardOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/onboarding.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/personWithToken.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/registerDashboardWidgetsEmitPayloadSchema.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/setupTestsOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/setupVscodeOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/skillFeature.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/syncErrorOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/syncEventOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/syncSchemaFieldsOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/syncSchemasOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/testOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/upgradeSkillOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/watcherDidDetectChangesEmitPayload.builder.js.map +1 -1
- package/build/services/BuildService.js.map +1 -1
- package/build/services/CommandService.js.map +1 -1
- package/build/services/DependencyService.js.map +1 -1
- package/build/services/GameService.js.map +1 -1
- package/build/services/ImportService.js.map +1 -1
- package/build/services/LintService.js.map +1 -1
- package/build/services/PkgService.js +5 -6
- package/build/services/PkgService.js.map +1 -1
- package/build/services/ServiceFactory.d.ts +7 -4
- package/build/services/ServiceFactory.js +15 -0
- package/build/services/ServiceFactory.js.map +1 -1
- package/build/services/TypeCheckerService.js.map +1 -1
- package/build/stores/AbstractLocalStore.js +4 -5
- package/build/stores/AbstractLocalStore.js.map +1 -1
- package/build/stores/AbstractStore.js.map +1 -1
- package/build/stores/StoreFactory.js.map +1 -1
- package/build/templateItemBuilders/EventTemplateItemBuilder.js.map +1 -1
- package/build/templateItemBuilders/FieldTemplateItemBuilder.js.map +1 -1
- package/build/templateItemBuilders/SchemaTemplateItemBuilder.js.map +1 -1
- package/build/tests/AbstractCliTest.d.ts +2 -0
- package/build/tests/AbstractCliTest.js +10 -7
- package/build/tests/AbstractCliTest.js.map +1 -1
- package/build/tests/AbstractErrorTest.js +4 -5
- package/build/tests/AbstractErrorTest.js.map +1 -1
- package/build/tests/AbstractEventTest.js +4 -5
- package/build/tests/AbstractEventTest.js.map +1 -1
- package/build/tests/AbstractSchemaTest.js +4 -5
- package/build/tests/AbstractSchemaTest.js.map +1 -1
- package/build/tests/AbstractSkillTest.js +5 -6
- package/build/tests/AbstractSkillTest.js.map +1 -1
- package/build/tests/AbstractTestTest.js +4 -5
- package/build/tests/AbstractTestTest.js.map +1 -1
- package/build/tests/CommandFaker.js.map +1 -1
- package/build/tests/JestJsonParser.js.map +1 -1
- package/build/tests/MockProgramFactory.js.map +1 -1
- package/build/tests/buildTestCache.js.map +1 -1
- package/build/tests/cleanTestCache.js.map +1 -1
- package/build/tests/cleanTestData.js.map +1 -1
- package/build/tests/constants.js.map +1 -1
- package/build/tests/fixtures/FeatureFixture.js.map +1 -1
- package/build/tests/fixtures/MercuryFixture.js.map +1 -1
- package/build/tests/fixtures/OrganizationFixture.js.map +1 -1
- package/build/tests/fixtures/PersonFixture.js.map +1 -1
- package/build/tests/fixtures/SkillFixture.js.map +1 -1
- package/build/tests/fixtures/ViewFixture.js.map +1 -1
- package/build/tests/utilities/test.utility.js.map +1 -1
- package/build/tests/utilities/uiAssert.utility.js.map +1 -1
- package/build/types/apiClient.types.js.map +1 -1
- package/build/types/cli.types.js.map +1 -1
- package/build/types/graphicsInterface.types.js.map +1 -1
- package/build/updaters/ScriptUpdater.js.map +1 -1
- package/build/utilities/action.utility.js.map +1 -1
- package/build/utilities/apiClient.utility.js.map +1 -1
- package/build/utilities/argParser.utility.js.map +1 -1
- package/build/utilities/commander.utility.js.map +1 -1
- package/build/utilities/duration.utility.js.map +1 -1
- package/build/utilities/eventContractCleaner.utility.js.map +1 -1
- package/build/utilities/form.utility.js.map +1 -1
- package/build/utilities/introspection.utility.js.map +1 -1
- package/build/utilities/isCi.js.map +1 -1
- package/build/utilities/tsConfig.utility.js.map +1 -1
- package/build/utilities/ui.utility.js.map +1 -1
- package/build/widgets/Theme.js.map +1 -1
- package/build/widgets/WidgetFactory.js.map +1 -1
- package/build/widgets/keySelectChoices.js.map +1 -1
- package/build/widgets/terminalKit/TKButtonWidget.js +5 -6
- package/build/widgets/terminalKit/TKButtonWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkBaseWidget.js +6 -7
- package/build/widgets/terminalKit/TkBaseWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkInputWidget.js +5 -6
- package/build/widgets/terminalKit/TkInputWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkLayoutCellWidget.js +6 -7
- package/build/widgets/terminalKit/TkLayoutCellWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkLayoutWidget.js +5 -6
- package/build/widgets/terminalKit/TkLayoutWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkMenuBarWidget.js +5 -6
- package/build/widgets/terminalKit/TkMenuBarWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkPopupWidget.js +6 -7
- package/build/widgets/terminalKit/TkPopupWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkProgressBarWidget.js +5 -6
- package/build/widgets/terminalKit/TkProgressBarWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkTextWidget.js +5 -6
- package/build/widgets/terminalKit/TkTextWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkWindowWidget.js +5 -6
- package/build/widgets/terminalKit/TkWindowWidget.js.map +1 -1
- package/build/widgets/terminalKit/termKit.utility.js.map +1 -1
- package/build/widgets/types/button.types.js.map +1 -1
- package/build/widgets/types/factory.types.js.map +1 -1
- package/build/widgets/types/input.types.js.map +1 -1
- package/build/widgets/types/layout.types.js.map +1 -1
- package/build/widgets/types/menuBar.types.js.map +1 -1
- package/build/widgets/types/popup.types.js.map +1 -1
- package/build/widgets/types/progressBar.types.js.map +1 -1
- package/build/widgets/types/table.types.js.map +1 -1
- package/build/widgets/types/text.types.js.map +1 -1
- package/build/widgets/types/widgets.types.js.map +1 -1
- package/build/widgets/types/window.types.js.map +1 -1
- package/build/widgets/widget.utilities.js.map +1 -1
- package/build/writers/AbstractWriter.js.map +1 -1
- package/build/writers/WriterFactory.js.map +1 -1
- package/package.json +38 -38
- package/src/__tests__/behavioral/skill/RegisteringASkill.test.ts +3 -0
- package/src/__tests__/behavioral/upgrading/UpgradingASkill5.test.ts +72 -6
- package/src/__tests__/support/EventFaker.ts +22 -0
- package/src/components/FormComponent.ts +3 -2
- package/src/features/ActionFactory.ts +2 -3
- package/src/features/node/actions/UpgradeAction.ts +2 -0
- package/src/features/test/TestReporter.ts +2 -2
- package/src/features/watch/WatchFeature.ts +3 -6
- package/src/services/ServiceFactory.ts +37 -22
- package/src/stores/AbstractStore.ts +4 -3
- package/src/tests/AbstractCliTest.ts +5 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorFeature.js","names":["_spruceSkillUtils","require","_AbstractFeature2","_interopRequireDefault","
|
|
1
|
+
{"version":3,"file":"ErrorFeature.js","names":["_spruceSkillUtils","require","_AbstractFeature2","_interopRequireDefault","_callSuper","t","o","e","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct","Reflect","construct","constructor","apply","Boolean","prototype","valueOf","call","ErrorFeature","exports","_AbstractFeature","_inherits2","options","_this","_classCallCheck2","_defineProperty2","_assertThisInitialized2","code","isRequired","name","diskUtil","resolvePath","__dirname","emitter","on","handleDidExecuteCommand","bind","_asyncToGenerator2","_regenerator","mark","_callee","isInstalled","wrap","_callee$","_context","prev","next","features","sent","abrupt","filesToSkip","stop","_createClass2","key","value","_afterPackageInstall","_callee2","isSkillInstalled","files","_callee2$","_context2","writePlugin","afterPackageInstall","arguments","_handleDidExecuteCommand","_callee3","payload","featureCode","actionCode","results","_results$files","plugin","_callee3$","_context3","Action","execute","push","_toConsumableArray2","_x","_writePlugin","_callee4","_callee4$","_context4","Writer","cwd","AbstractFeature"],"sources":["../../../src/features/error/ErrorFeature.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { NpmPackage } from '../../types/cli.types'\nimport AbstractFeature, {\n\tFeatureDependency,\n\tFeatureOptions,\n\tInstallResults,\n} from '../AbstractFeature'\nimport { FeatureCode } from '../features.types'\n\ndeclare module '../../features/features.types' {\n\tinterface FeatureMap {\n\t\terror: ErrorFeature\n\t}\n\n\tinterface FeatureOptionsMap {\n\t\terror: undefined\n\t}\n}\n\nexport default class ErrorFeature extends AbstractFeature {\n\tpublic nameReadable = 'error handling'\n\tpublic description =\n\t\t'Errors: Use schemas to define your errors and get great type checking!'\n\tpublic code: FeatureCode = 'error'\n\n\tpublic dependencies: FeatureDependency[] = [\n\t\t{ code: 'schema', isRequired: true },\n\t\t{ code: 'node', isRequired: true },\n\t]\n\tpublic packageDependencies: NpmPackage[] = [\n\t\t{\n\t\t\tname: '@sprucelabs/error@latest',\n\t\t},\n\t]\n\tpublic actionsDir = diskUtil.resolvePath(__dirname, 'actions')\n\n\tpublic constructor(options: FeatureOptions) {\n\t\tsuper(options)\n\n\t\tvoid this.emitter.on(\n\t\t\t'feature.did-execute',\n\t\t\tthis.handleDidExecuteCommand.bind(this)\n\t\t)\n\n\t\tvoid this.emitter.on('skill.will-write-directory-template', async () => {\n\t\t\tconst isInstalled = await this.features.isInstalled('error')\n\t\t\tif (isInstalled) {\n\t\t\t\treturn {\n\t\t\t\t\tfilesToSkip: ['options.types.ts'],\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {}\n\t\t})\n\t}\n\n\tpublic async afterPackageInstall(): Promise<InstallResults> {\n\t\tconst isSkillInstalled = await this.features.isInstalled('skill')\n\n\t\tif (!isSkillInstalled) {\n\t\t\treturn {}\n\t\t}\n\n\t\tconst files = await this.writePlugin()\n\n\t\treturn {\n\t\t\tfiles,\n\t\t}\n\t}\n\n\tprivate async handleDidExecuteCommand(payload: {\n\t\tfeatureCode: string\n\t\tactionCode: string\n\t}) {\n\t\tconst { featureCode, actionCode } = payload\n\n\t\tconst isInstalled = await this.features.isInstalled('error')\n\n\t\tconst isSkillInstalled = await this.features.isInstalled('skill')\n\n\t\tif (isInstalled && featureCode === 'node' && actionCode === 'upgrade') {\n\t\t\tconst results = await this.Action('error', 'sync').execute({})\n\n\t\t\tif (isSkillInstalled) {\n\t\t\t\tif (!results.files) {\n\t\t\t\t\tresults.files = []\n\t\t\t\t}\n\n\t\t\t\tconst plugin = await this.writePlugin()\n\t\t\t\tresults.files.push(...plugin)\n\t\t\t}\n\n\t\t\treturn results\n\t\t}\n\n\t\treturn {}\n\t}\n\tprivate async writePlugin() {\n\t\treturn this.Writer('error').writePlugin(this.cwd)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAI2B,SAAAG,WAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,WAAAD,CAAA,OAAAE,gBAAA,aAAAF,CAAA,OAAAG,2BAAA,aAAAJ,CAAA,EAAAK,yBAAA,KAAAC,OAAA,CAAAC,SAAA,CAAAN,CAAA,EAAAC,CAAA,YAAAC,gBAAA,aAAAH,CAAA,EAAAQ,WAAA,IAAAP,CAAA,CAAAQ,KAAA,CAAAT,CAAA,EAAAE,CAAA;AAAA,SAAAG,0BAAA,cAAAL,CAAA,IAAAU,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAP,OAAA,CAAAC,SAAA,CAAAG,OAAA,iCAAAV,CAAA,aAAAK,yBAAA,YAAAA,0BAAA,aAAAL,CAAA;AAAA,IAaNc,YAAY,GAAAC,OAAA,qCAAAC,gBAAA;EAAA,IAAAC,UAAA,aAAAH,YAAA,EAAAE,gBAAA;EAiBhC,SAAAF,aAAmBI,OAAuB,EAAE;IAAA,IAAAC,KAAA;IAAA,IAAAC,gBAAA,mBAAAN,YAAA;IAC3CK,KAAA,GAAApB,UAAA,OAAAe,YAAA,GAAMI,OAAO;IAAC,IAAAG,gBAAA,iBAAAC,uBAAA,aAAAH,KAAA,mBAjBO,gBAAgB;IAAA,IAAAE,gBAAA,iBAAAC,uBAAA,aAAAH,KAAA,kBAErC,wEAAwE;IAAA,IAAAE,gBAAA,iBAAAC,uBAAA,aAAAH,KAAA,WAC9C,OAAO;IAAA,IAAAE,gBAAA,iBAAAC,uBAAA,a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UAAA;QAAA,GAAAc,QAAA;MAAA,CACT;MAAA,SAAA9B,wBAAA2C,EAAA;QAAA,OAAAd,wBAAA,CAAAnD,KAAA,OAAAkD,SAAA;MAAA;MAAA,OAAA5B,uBAAA;IAAA;EAAA;IAAAkB,GAAA;IAAAC,KAAA;MAAA,IAAAyB,YAAA,OAAA1C,kBAAA,2BAAAC,YAAA,YAAAC,IAAA,CACD,SAAAyC,SAAA;QAAA,OAAA1C,YAAA,YAAAI,IAAA,UAAAuC,UAAAC,SAAA;UAAA,kBAAAA,SAAA,CAAArC,IAAA,GAAAqC,SAAA,CAAApC,IAAA;YAAA;cAAA,OAAAoC,SAAA,CAAAjC,MAAA,WACQ,IAAI,CAACkC,MAAM,CAAC,OAAO,CAAC,CAACtB,WAAW,CAAC,IAAI,CAACuB,GAAG,CAAC;YAAA;YAAA;cAAA,OAAAF,SAAA,CAAA/B,IAAA;UAAA;QAAA,GAAA6B,QAAA;MAAA,CACjD;MAAA,SAAAnB,YAAA;QAAA,OAAAkB,YAAA,CAAAlE,KAAA,OAAAkD,SAAA;MAAA;MAAA,OAAAF,WAAA;IAAA;EAAA;EAAA,OAAA3C,YAAA;AAAA,EAhFwCmE,4BAAe","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParentTestFinder.js","names":["_globby","_interopRequireDefault","require","_spruceSkillUtils","_introspection","ParentTestFinder","exports","cwd","_classCallCheck2","_defineProperty2","_createClass2","key","value","_findAbstractTests","_asyncToGenerator2","_regenerator","mark","_callee","matches","allDetails","wrap","_callee$","_context","prev","next","globby","diskUtil","resolvePath","sent","introspectionUtil","introspect","abrupt","map","path","idx","_details$classes","details","name","classes","className","isDefaultExport","filter","match","stop","findAbstractTests","apply","arguments"],"sources":["../../../src/features/error/ParentTestFinder.ts"],"sourcesContent":["import globby from '@sprucelabs/globby'\nimport { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport introspectionUtil from '../../utilities/introspection.utility'\n\nexport default class ParentTestFinder {\n\tprivate cwd: string\n\n\tpublic constructor(cwd: string) {\n\t\tthis.cwd = cwd\n\t}\n\n\tpublic async findAbstractTests() {\n\t\tconst matches = await globby([\n\t\t\tdiskUtil.resolvePath(this.cwd, '**', 'Abstract*Test*.ts'),\n\t\t\t'!**/*.d.ts',\n\t\t])\n\n\t\tconst allDetails = introspectionUtil.introspect(matches)\n\n\t\treturn matches\n\t\t\t.map((path, idx) => {\n\t\t\t\tconst details = allDetails[idx]\n\t\t\t\treturn {\n\t\t\t\t\tpath,\n\t\t\t\t\tname: details.classes?.[0]?.className,\n\t\t\t\t\tisDefaultExport: true,\n\t\t\t\t}\n\t\t\t})\n\t\t\t.filter((match) => !!match.name)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAqE,IAEhDG,gBAAgB,GAAAC,OAAA;EAGpC,SAAAD,iBAAmBE,GAAW,EAAE;IAAA,IAAAC,gBAAA,mBAAAH,gBAAA;IAAA,IAAAI,gBAAA;IAC/B,IAAI,CAACF,GAAG,GAAGA,GAAG;EACf;EAAC,IAAAG,aAAA,aAAAL,gBAAA;IAAAM,GAAA;IAAAC,KAAA;MAAA,IAAAC,kBAAA,OAAAC,kBAAA,2BAAAC,YAAA,YAAAC,IAAA,CAED,SAAAC,QAAA;QAAA,IAAAC,OAAA,EAAAC,UAAA;QAAA,OAAAJ,YAAA,YAAAK,IAAA,UAAAC,SAAAC,QAAA;UAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;YAAA;cAAAF,QAAA,CAAAE,IAAA;cAAA,OACuB,IAAAC,kBAAM,EAAC,CAC5BC,0BAAQ,CAACC,WAAW,CAAC,IAAI,CAACpB,GAAG,EAAE,IAAI,EAAE,mBAAmB,CAAC,EACzD,YAAY,CACZ,CAAC;YAAA;cAHIW,OAAO,GAAAI,QAAA,CAAAM,IAAA;cAKPT,UAAU,GAAGU,yBAAiB,CAACC,UAAU,CAACZ,OAAO,CAAC;cAAA,OAAAI,QAAA,CAAAS,MAAA,WAEjDb,OAAO,CACZc,GAAG,CAAC,UAACC,IAAI,EAAEC,GAAG,EAAK;gBAAA,IAAAC,gBAAA;gBACnB,IAAMC,OAAO,GAAGjB,UAAU,CAACe,GAAG,CAAC;gBAC/B,OAAO;kBACND,IAAI,EAAJA,IAAI;kBACJI,IAAI,GAAAF,gBAAA,GAAEC,OAAO,CAACE,OAAO,cAAAH,gBAAA,gBAAAA,gBAAA,GAAfA,gBAAA,CAAkB,CAAC,CAAC,cAAAA,gBAAA,uBAApBA,gBAAA,CAAsBI,SAAS;kBACrCC,eAAe,EAAE;gBAClB,CAAC;cACF,CAAC,CAAC,CACDC,MAAM,CAAC,UAACC,KAAK;gBAAA,OAAK,CAAC,CAACA,KAAK,CAACL,IAAI;cAAA,EAAC;YAAA;YAAA;cAAA,OAAAf,QAAA,CAAAqB,IAAA;UAAA;QAAA,GAAA1B,OAAA;MAAA,CACjC;MAAA,SAAA2B,kBAAA;QAAA,OAAA/B,kBAAA,CAAAgC,KAAA,OAAAC,SAAA;MAAA;MAAA,OAAAF,iBAAA;IAAA;EAAA;EAAA,OAAAvC,gBAAA;AAAA"}
|
|
1
|
+
{"version":3,"file":"ParentTestFinder.js","names":["_globby","_interopRequireDefault","require","_spruceSkillUtils","_introspection","ParentTestFinder","exports","cwd","_classCallCheck2","_defineProperty2","_createClass2","key","value","_findAbstractTests","_asyncToGenerator2","_regenerator","mark","_callee","matches","allDetails","wrap","_callee$","_context","prev","next","globby","diskUtil","resolvePath","sent","introspectionUtil","introspect","abrupt","map","path","idx","_details$classes","details","name","classes","className","isDefaultExport","filter","match","stop","findAbstractTests","apply","arguments"],"sources":["../../../src/features/error/ParentTestFinder.ts"],"sourcesContent":["import globby from '@sprucelabs/globby'\nimport { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport introspectionUtil from '../../utilities/introspection.utility'\n\nexport default class ParentTestFinder {\n\tprivate cwd: string\n\n\tpublic constructor(cwd: string) {\n\t\tthis.cwd = cwd\n\t}\n\n\tpublic async findAbstractTests() {\n\t\tconst matches = await globby([\n\t\t\tdiskUtil.resolvePath(this.cwd, '**', 'Abstract*Test*.ts'),\n\t\t\t'!**/*.d.ts',\n\t\t])\n\n\t\tconst allDetails = introspectionUtil.introspect(matches)\n\n\t\treturn matches\n\t\t\t.map((path, idx) => {\n\t\t\t\tconst details = allDetails[idx]\n\t\t\t\treturn {\n\t\t\t\t\tpath,\n\t\t\t\t\tname: details.classes?.[0]?.className,\n\t\t\t\t\tisDefaultExport: true,\n\t\t\t\t}\n\t\t\t})\n\t\t\t.filter((match) => !!match.name)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAqE,IAEhDG,gBAAgB,GAAAC,OAAA;EAGpC,SAAAD,iBAAmBE,GAAW,EAAE;IAAA,IAAAC,gBAAA,mBAAAH,gBAAA;IAAA,IAAAI,gBAAA;IAC/B,IAAI,CAACF,GAAG,GAAGA,GAAG;EACf;EAAC,IAAAG,aAAA,aAAAL,gBAAA;IAAAM,GAAA;IAAAC,KAAA;MAAA,IAAAC,kBAAA,OAAAC,kBAAA,2BAAAC,YAAA,YAAAC,IAAA,CAED,SAAAC,QAAA;QAAA,IAAAC,OAAA,EAAAC,UAAA;QAAA,OAAAJ,YAAA,YAAAK,IAAA,UAAAC,SAAAC,QAAA;UAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;YAAA;cAAAF,QAAA,CAAAE,IAAA;cAAA,OACuB,IAAAC,kBAAM,EAAC,CAC5BC,0BAAQ,CAACC,WAAW,CAAC,IAAI,CAACpB,GAAG,EAAE,IAAI,EAAE,mBAAmB,CAAC,EACzD,YAAY,CACZ,CAAC;YAAA;cAHIW,OAAO,GAAAI,QAAA,CAAAM,IAAA;cAKPT,UAAU,GAAGU,yBAAiB,CAACC,UAAU,CAACZ,OAAO,CAAC;cAAA,OAAAI,QAAA,CAAAS,MAAA,WAEjDb,OAAO,CACZc,GAAG,CAAC,UAACC,IAAI,EAAEC,GAAG,EAAK;gBAAA,IAAAC,gBAAA;gBACnB,IAAMC,OAAO,GAAGjB,UAAU,CAACe,GAAG,CAAC;gBAC/B,OAAO;kBACND,IAAI,EAAJA,IAAI;kBACJI,IAAI,GAAAF,gBAAA,GAAEC,OAAO,CAACE,OAAO,cAAAH,gBAAA,gBAAAA,gBAAA,GAAfA,gBAAA,CAAkB,CAAC,CAAC,cAAAA,gBAAA,uBAApBA,gBAAA,CAAsBI,SAAS;kBACrCC,eAAe,EAAE;gBAClB,CAAC;cACF,CAAC,CAAC,CACDC,MAAM,CAAC,UAACC,KAAK;gBAAA,OAAK,CAAC,CAACA,KAAK,CAACL,IAAI;cAAA,EAAC;YAAA;YAAA;cAAA,OAAAf,QAAA,CAAAqB,IAAA;UAAA;QAAA,GAAA1B,OAAA;MAAA,CACjC;MAAA,SAAA2B,kBAAA;QAAA,OAAA/B,kBAAA,CAAAgC,KAAA,OAAAC,SAAA;MAAA;MAAA,OAAAF,iBAAA;IAAA;EAAA;EAAA,OAAAvC,gBAAA;AAAA","ignoreList":[]}
|
|
@@ -9,10 +9,10 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
|
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
13
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
15
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
15
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
17
|
var _schema = require("@sprucelabs/schema");
|
|
18
18
|
var _createErrorOptions = _interopRequireDefault(require("../../../.spruce/schemas/spruceCli/v2020_07_22/createErrorOptions.schema"));
|
|
@@ -22,18 +22,17 @@ var _action = _interopRequireDefault(require("../../../utilities/action.utility"
|
|
|
22
22
|
var _AbstractAction2 = _interopRequireDefault(require("../../AbstractAction"));
|
|
23
23
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24
24
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25
|
-
function
|
|
26
|
-
function _isNativeReflectConstruct() {
|
|
25
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
26
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
27
27
|
var CreateAction = exports["default"] = /*#__PURE__*/function (_AbstractAction) {
|
|
28
28
|
(0, _inherits2["default"])(CreateAction, _AbstractAction);
|
|
29
|
-
var _super = _createSuper(CreateAction);
|
|
30
29
|
function CreateAction() {
|
|
31
30
|
var _this;
|
|
32
31
|
(0, _classCallCheck2["default"])(this, CreateAction);
|
|
33
32
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
34
33
|
args[_key] = arguments[_key];
|
|
35
34
|
}
|
|
36
|
-
_this =
|
|
35
|
+
_this = _callSuper(this, CreateAction, [].concat(args));
|
|
37
36
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "optionsSchema", _createErrorOptions["default"]);
|
|
38
37
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "invocationMessage", 'Creating a new error builder... 🤾♀️');
|
|
39
38
|
return _this;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateAction.js","names":["_schema","require","_createErrorOptions","_interopRequireDefault","_createSchemaOptions","_syncErrorOptions","_action","_AbstractAction2","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","
|
|
1
|
+
{"version":3,"file":"CreateAction.js","names":["_schema","require","_createErrorOptions","_interopRequireDefault","_createSchemaOptions","_syncErrorOptions","_action","_AbstractAction2","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","_callSuper","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct","Reflect","construct","constructor","Boolean","prototype","valueOf","call","CreateAction","exports","_AbstractAction","_inherits2","_this","_classCallCheck2","_len","args","Array","_key","concat","_assertThisInitialized2","createErrorActionSchema","_createClass2","key","value","_execute","_asyncToGenerator2","_regenerator","mark","_callee","options","normalizedOptions","schemaCreateAction","createSchemaOptions","createResults","syncOptions","syncResults","mergedResults","wrap","_callee$","_context","prev","next","validateAndNormalizeOptions","Action","normalizeSchemaValues","createSchemaActionSchema","builderFunction","shouldEnableVersioning","syncAfterCreate","schemaBuilderDestinationDir","errorBuilderDestinationDir","execute","sent","syncErrorActionSchema","actionUtil","mergeActionResults","abrupt","stop","_x","AbstractAction"],"sources":["../../../../src/features/error/actions/CreateAction.ts"],"sourcesContent":["import { normalizeSchemaValues } from '@sprucelabs/schema'\nimport { SpruceSchemas } from '#spruce/schemas/schemas.types'\nimport createErrorActionSchema from '#spruce/schemas/spruceCli/v2020_07_22/createErrorOptions.schema'\nimport createSchemaActionSchema from '#spruce/schemas/spruceCli/v2020_07_22/createSchemaOptions.schema'\nimport syncErrorActionSchema from '#spruce/schemas/spruceCli/v2020_07_22/syncErrorOptions.schema'\nimport actionUtil from '../../../utilities/action.utility'\nimport AbstractAction from '../../AbstractAction'\nimport { FeatureActionResponse } from '../../features.types'\n\ntype OptionsSchema =\n\tSpruceSchemas.SpruceCli.v2020_07_22.CreateErrorOptionsSchema\ntype Options = SpruceSchemas.SpruceCli.v2020_07_22.CreateErrorOptions\nexport default class CreateAction extends AbstractAction<OptionsSchema> {\n\tpublic optionsSchema = createErrorActionSchema\n\tpublic invocationMessage = 'Creating a new error builder... 🤾♀️'\n\n\tpublic async execute(options: Options): Promise<FeatureActionResponse> {\n\t\tconst normalizedOptions = this.validateAndNormalizeOptions(options)\n\n\t\tconst schemaCreateAction = this.Action('schema', 'create')\n\n\t\tconst createSchemaOptions = normalizeSchemaValues(\n\t\t\tcreateSchemaActionSchema,\n\t\t\t{\n\t\t\t\t...normalizedOptions,\n\t\t\t\tbuilderFunction: 'buildErrorSchema',\n\t\t\t\tshouldEnableVersioning: false,\n\t\t\t\tsyncAfterCreate: false,\n\t\t\t\tschemaBuilderDestinationDir:\n\t\t\t\t\tnormalizedOptions.errorBuilderDestinationDir,\n\t\t\t}\n\t\t)\n\n\t\tconst createResults = await schemaCreateAction.execute(createSchemaOptions)\n\n\t\tconst syncOptions = normalizeSchemaValues(\n\t\t\tsyncErrorActionSchema,\n\t\t\tnormalizedOptions\n\t\t)\n\t\tconst syncResults = await this.Action('error', 'sync').execute(syncOptions)\n\t\tconst mergedResults = actionUtil.mergeActionResults(\n\t\t\tcreateResults,\n\t\t\tsyncResults\n\t\t)\n\n\t\treturn mergedResults\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,iBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,OAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,gBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAAiD,SAAAO,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAA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oB,OAAO,CAACnB,mBAAmB,CAAC;YAAA;cAArEC,aAAa,GAAAM,QAAA,CAAAa,IAAA;cAEblB,WAAW,GAAG,IAAAU,6BAAqB,EACxCS,4BAAqB,EACrBvB,iBACD,CAAC;cAAAS,QAAA,CAAAE,IAAA;cAAA,OACyB,IAAI,CAACE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAACQ,OAAO,CAACjB,WAAW,CAAC;YAAA;cAArEC,WAAW,GAAAI,QAAA,CAAAa,IAAA;cACXhB,aAAa,GAAGkB,kBAAU,CAACC,kBAAkB,CAClDtB,aAAa,EACbE,WACD,CAAC;cAAA,OAAAI,QAAA,CAAAiB,MAAA,WAEMpB,aAAa;YAAA;YAAA;cAAA,OAAAG,QAAA,CAAAkB,IAAA;UAAA;QAAA,GAAA7B,OAAA;MAAA,CACpB;MAAA,SAAAuB,QAAAO,EAAA;QAAA,OAAAlC,QAAA,CAAApC,KAAA,OAAAE,SAAA;MAAA;MAAA,OAAA6D,OAAA;IAAA;EAAA;EAAA,OAAA3C,YAAA;AAAA,EAlCwCmD,2BAAc","ignoreList":[]}
|
|
@@ -10,10 +10,10 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
10
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
11
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
14
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
13
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
16
14
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
15
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
16
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
18
|
var _schema = require("@sprucelabs/schema");
|
|
19
19
|
var _spruceSkillUtils = require("@sprucelabs/spruce-skill-utils");
|
|
@@ -22,18 +22,17 @@ var _syncSchemasOptions = _interopRequireDefault(require("../../../.spruce/schem
|
|
|
22
22
|
var _AbstractAction2 = _interopRequireDefault(require("../../AbstractAction"));
|
|
23
23
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24
24
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25
|
-
function
|
|
26
|
-
function _isNativeReflectConstruct() {
|
|
25
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
26
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
27
27
|
var SyncAction = exports["default"] = /*#__PURE__*/function (_AbstractAction) {
|
|
28
28
|
(0, _inherits2["default"])(SyncAction, _AbstractAction);
|
|
29
|
-
var _super = _createSuper(SyncAction);
|
|
30
29
|
function SyncAction() {
|
|
31
30
|
var _this;
|
|
32
31
|
(0, _classCallCheck2["default"])(this, SyncAction);
|
|
33
32
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
34
33
|
args[_key] = arguments[_key];
|
|
35
34
|
}
|
|
36
|
-
_this =
|
|
35
|
+
_this = _callSuper(this, SyncAction, [].concat(args));
|
|
37
36
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "optionsSchema", _syncErrorOptions["default"]);
|
|
38
37
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "commandAliases", ['sync.errors']);
|
|
39
38
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "invocationMessage", 'Generating error types... 🤾♀️');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SyncAction.js","names":["_schema","require","_spruceSkillUtils","_syncErrorOptions","_interopRequireDefault","_syncSchemasOptions","_AbstractAction2","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","SyncAction","exports","_AbstractAction","_inherits2","_super","_this","_classCallCheck2","_len","args","Array","_key","concat","_assertThisInitialized2","syncErrorActionSchema","_createClass2","key","value","_execute","_asyncToGenerator2","_regenerator","mark","_callee","options","_errorSyncResults$fil","normalizedOptions","errorTypesDestinationDir","errorClassDestinationDir","schemaSyncAction","errorSyncResults","_ref","schemaTemplateItems","errorTemplateItems","errorWriter","optionsResults","errorClassGeneratedFiles","wrap","_callee$","_context","prev","next","validateAndNormalizeOptions","Action","syncErrors","sent","errors","abrupt","areSyncResultsEmpty","deleteOrphanedDirs","meta","map","item","code","namesUtil","toConst","namePascal","Writer","generateOptionTypes","writeOrAppendErrorsToClass","diskUtil","resolvePath","cwd","files","_toConsumableArray2","stop","execute","_x","deleteDir","_syncErrors","_callee2","resolvedErrorTypesDestinationDir","syncOptions","_callee2$","_context2","normalizeSchemaValues","syncSchemasActionSchema","schemaTypesDestinationDirOrFile","schemaLookupDir","errorLookupDir","shouldEnableVersioning","globalSchemaNamespace","shouldFetchRemoteSchemas","generateFieldTypes","generateStandaloneTypesFile","deleteDestinationDirIfNoSchemas","shouldFetchCoreSchemas","syncingMessage","_x2","_x3","_generateOptionTypes","_callee3","errorGenerator","resolvedTypesDestination","topLevelItems","_callee3$","_context3","i","isNested","writeOptionsTypesFile","_x4","_x5","_x6","AbstractAction"],"sources":["../../../../src/features/error/actions/SyncAction.ts"],"sourcesContent":["import {\n\tSchemaTemplateItem,\n\tnormalizeSchemaValues,\n\tSchemaValuesWithDefaults,\n} from '@sprucelabs/schema'\nimport { namesUtil } from '@sprucelabs/spruce-skill-utils'\nimport { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { ErrorTemplateItem } from '@sprucelabs/spruce-templates'\nimport { SpruceSchemas } from '#spruce/schemas/schemas.types'\nimport syncErrorActionSchema from '#spruce/schemas/spruceCli/v2020_07_22/syncErrorOptions.schema'\nimport syncSchemasActionSchema from '#spruce/schemas/spruceCli/v2020_07_22/syncSchemasOptions.schema'\nimport AbstractAction from '../../AbstractAction'\nimport { FeatureActionResponse, FeatureAction } from '../../features.types'\nimport ErrorWriter from '../writers/ErrorWriter'\n\ntype OptionsSchema = SpruceSchemas.SpruceCli.v2020_07_22.SyncErrorOptionsSchema\ntype Options = SpruceSchemas.SpruceCli.v2020_07_22.SyncErrorOptions\nexport default class SyncAction extends AbstractAction<OptionsSchema> {\n\tpublic optionsSchema = syncErrorActionSchema\n\tpublic commandAliases = ['sync.errors']\n\tpublic invocationMessage = 'Generating error types... 🤾♀️'\n\n\tpublic async execute(options: Options): Promise<FeatureActionResponse> {\n\t\tconst normalizedOptions = this.validateAndNormalizeOptions(options)\n\t\tconst { errorTypesDestinationDir, errorClassDestinationDir } =\n\t\t\tnormalizedOptions\n\n\t\tconst schemaSyncAction = this.Action(\n\t\t\t'schema',\n\t\t\t'sync'\n\t\t) as any as FeatureAction<SpruceSchemas.SpruceCli.v2020_07_22.SyncSchemasOptionsSchema>\n\n\t\tconst errorSyncResults = await this.syncErrors(\n\t\t\tschemaSyncAction,\n\t\t\tnormalizedOptions\n\t\t)\n\n\t\tif (errorSyncResults.errors) {\n\t\t\treturn errorSyncResults\n\t\t}\n\n\t\tif (this.areSyncResultsEmpty(errorSyncResults)) {\n\t\t\tthis.deleteOrphanedDirs(errorTypesDestinationDir)\n\t\t\treturn {}\n\t\t}\n\n\t\tconst { schemaTemplateItems } = errorSyncResults.meta as {\n\t\t\tschemaTemplateItems: SchemaTemplateItem[]\n\t\t}\n\n\t\tconst errorTemplateItems = schemaTemplateItems.map((item) => ({\n\t\t\t...item,\n\t\t\tcode: namesUtil.toConst(item.namePascal),\n\t\t}))\n\n\t\tconst errorWriter = this.Writer('error')\n\n\t\tconst optionsResults = await this.generateOptionTypes(\n\t\t\terrorWriter,\n\t\t\terrorTemplateItems,\n\t\t\terrorTypesDestinationDir\n\t\t)\n\n\t\tconst errorClassGeneratedFiles =\n\t\t\tawait errorWriter.writeOrAppendErrorsToClass(\n\t\t\t\tdiskUtil.resolvePath(this.cwd, errorClassDestinationDir),\n\t\t\t\terrorTemplateItems\n\t\t\t)\n\n\t\treturn {\n\t\t\tfiles: [\n\t\t\t\t...(errorSyncResults.files ?? []),\n\t\t\t\t...errorClassGeneratedFiles,\n\t\t\t\t...optionsResults,\n\t\t\t],\n\t\t}\n\t}\n\n\tprivate deleteOrphanedDirs(errorTypesDestinationDir: string) {\n\t\tdiskUtil.deleteDir(diskUtil.resolvePath(this.cwd, errorTypesDestinationDir))\n\t}\n\n\tprivate async syncErrors(\n\t\tschemaSyncAction: FeatureAction<SpruceSchemas.SpruceCli.v2020_07_22.SyncSchemasOptionsSchema>,\n\t\tnormalizedOptions: SchemaValuesWithDefaults<SpruceSchemas.SpruceCli.v2020_07_22.SyncErrorOptionsSchema>\n\t) {\n\t\tconst resolvedErrorTypesDestinationDir = diskUtil.resolvePath(\n\t\t\tthis.cwd,\n\t\t\tnormalizedOptions.errorTypesDestinationDir,\n\t\t\t'errors.types.ts'\n\t\t)\n\n\t\tconst syncOptions = normalizeSchemaValues(syncSchemasActionSchema, {\n\t\t\t...normalizedOptions,\n\t\t\tschemaTypesDestinationDirOrFile: resolvedErrorTypesDestinationDir,\n\t\t\tschemaLookupDir: normalizedOptions.errorLookupDir,\n\t\t\tshouldEnableVersioning: false,\n\t\t\tglobalSchemaNamespace: 'SpruceErrors',\n\t\t\tshouldFetchRemoteSchemas: false,\n\t\t\tgenerateFieldTypes: true,\n\t\t\tgenerateStandaloneTypesFile: true,\n\t\t\tdeleteDestinationDirIfNoSchemas: true,\n\t\t\tshouldFetchCoreSchemas: false,\n\t\t\tsyncingMessage: 'Syncing errors...',\n\t\t})\n\n\t\tconst errorSyncResults = await schemaSyncAction.execute(syncOptions)\n\n\t\treturn errorSyncResults\n\t}\n\n\tprivate areSyncResultsEmpty(errorSyncResults: FeatureActionResponse) {\n\t\treturn (\n\t\t\t!errorSyncResults.meta ||\n\t\t\t!errorSyncResults.files ||\n\t\t\terrorSyncResults.files.length === 0\n\t\t)\n\t}\n\n\tprivate async generateOptionTypes(\n\t\terrorGenerator: ErrorWriter,\n\t\terrorTemplateItems: ErrorTemplateItem[],\n\t\terrorTypesDestinationDir: string\n\t) {\n\t\tif (errorTemplateItems.length === 0) {\n\t\t\treturn []\n\t\t}\n\n\t\tconst resolvedTypesDestination = diskUtil.resolvePath(\n\t\t\tthis.cwd,\n\t\t\terrorTypesDestinationDir\n\t\t)\n\n\t\tconst topLevelItems = errorTemplateItems.filter((i) => !i.isNested)\n\n\t\tconst optionsResults = await errorGenerator.writeOptionsTypesFile(\n\t\t\tresolvedTypesDestination,\n\t\t\ttopLevelItems\n\t\t)\n\n\t\treturn optionsResults\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAKA,IAAAC,iBAAA,GAAAD,OAAA;AAIA,IAAAE,iBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,gBAAA,GAAAF,sBAAA,CAAAH,OAAA;AAAiD,SAAAM,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,CAAA,QAAAe,gBAAA,aAAAhB,CAAA,EAAAC,CAAA,EAAAC,CAAA,CAAAD,CAAA,SAAAE,MAAA,CAAAc,yBAAA,GAAAd,MAAA,CAAAe,gBAAA,CAAAlB,CAAA,EAAAG,MAAA,CAAAc,yBAAA,CAAAf,CAAA,KAAAH,OAAA,CAAAI,MAA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,IAAA;cAAA,OAEtCmD,cAAc,CAACO,qBAAqB,CAChEN,wBAAwB,EACxBC,aACD,CAAC;YAAA;cAHK3D,cAAc,GAAA6D,SAAA,CAAAnD,IAAA;cAAA,OAAAmD,SAAA,CAAAjD,MAAA,WAKbZ,cAAc;YAAA;YAAA;cAAA,OAAA6D,SAAA,CAAA/B,IAAA;UAAA;QAAA,GAAA0B,QAAA;MAAA,CACrB;MAAA,SAAAjC,oBAAA0C,GAAA,EAAAC,GAAA,EAAAC,GAAA;QAAA,OAAAZ,oBAAA,CAAApH,KAAA,OAAAE,SAAA;MAAA;MAAA,OAAAkF,mBAAA;IAAA;EAAA;EAAA,OAAAxD,UAAA;AAAA,EA5HsCqG,2BAAc"}
|
|
1
|
+
{"version":3,"file":"SyncAction.js","names":["_schema","require","_spruceSkillUtils","_syncErrorOptions","_interopRequireDefault","_syncSchemasOptions","_AbstractAction2","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","_callSuper","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct","Reflect","construct","constructor","Boolean","prototype","valueOf","call","SyncAction","exports","_AbstractAction","_inherits2","_this","_classCallCheck2","_len","args","Array","_key","concat","_assertThisInitialized2","syncErrorActionSchema","_createClass2","key","value","_execute","_asyncToGenerator2","_regenerator","mark","_callee","options","_errorSyncResults$fil","normalizedOptions","errorTypesDestinationDir","errorClassDestinationDir","schemaSyncAction","errorSyncResults","_ref","schemaTemplateItems","errorTemplateItems","errorWriter","optionsResults","errorClassGeneratedFiles","wrap","_callee$","_context","prev","next","validateAndNormalizeOptions","Action","syncErrors","sent","errors","abrupt","areSyncResultsEmpty","deleteOrphanedDirs","meta","map","item","code","namesUtil","toConst","namePascal","Writer","generateOptionTypes","writeOrAppendErrorsToClass","diskUtil","resolvePath","cwd","files","_toConsumableArray2","stop","execute","_x","deleteDir","_syncErrors","_callee2","resolvedErrorTypesDestinationDir","syncOptions","_callee2$","_context2","normalizeSchemaValues","syncSchemasActionSchema","schemaTypesDestinationDirOrFile","schemaLookupDir","errorLookupDir","shouldEnableVersioning","globalSchemaNamespace","shouldFetchRemoteSchemas","generateFieldTypes","generateStandaloneTypesFile","deleteDestinationDirIfNoSchemas","shouldFetchCoreSchemas","syncingMessage","_x2","_x3","_generateOptionTypes","_callee3","errorGenerator","resolvedTypesDestination","topLevelItems","_callee3$","_context3","i","isNested","writeOptionsTypesFile","_x4","_x5","_x6","AbstractAction"],"sources":["../../../../src/features/error/actions/SyncAction.ts"],"sourcesContent":["import {\n\tSchemaTemplateItem,\n\tnormalizeSchemaValues,\n\tSchemaValuesWithDefaults,\n} from '@sprucelabs/schema'\nimport { namesUtil } from '@sprucelabs/spruce-skill-utils'\nimport { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { ErrorTemplateItem } from '@sprucelabs/spruce-templates'\nimport { SpruceSchemas } from '#spruce/schemas/schemas.types'\nimport syncErrorActionSchema from '#spruce/schemas/spruceCli/v2020_07_22/syncErrorOptions.schema'\nimport syncSchemasActionSchema from '#spruce/schemas/spruceCli/v2020_07_22/syncSchemasOptions.schema'\nimport AbstractAction from '../../AbstractAction'\nimport { FeatureActionResponse, FeatureAction } from '../../features.types'\nimport ErrorWriter from '../writers/ErrorWriter'\n\ntype OptionsSchema = SpruceSchemas.SpruceCli.v2020_07_22.SyncErrorOptionsSchema\ntype Options = SpruceSchemas.SpruceCli.v2020_07_22.SyncErrorOptions\nexport default class SyncAction extends AbstractAction<OptionsSchema> {\n\tpublic optionsSchema = syncErrorActionSchema\n\tpublic commandAliases = ['sync.errors']\n\tpublic invocationMessage = 'Generating error types... 🤾♀️'\n\n\tpublic async execute(options: Options): Promise<FeatureActionResponse> {\n\t\tconst normalizedOptions = this.validateAndNormalizeOptions(options)\n\t\tconst { errorTypesDestinationDir, errorClassDestinationDir } =\n\t\t\tnormalizedOptions\n\n\t\tconst schemaSyncAction = this.Action(\n\t\t\t'schema',\n\t\t\t'sync'\n\t\t) as any as FeatureAction<SpruceSchemas.SpruceCli.v2020_07_22.SyncSchemasOptionsSchema>\n\n\t\tconst errorSyncResults = await this.syncErrors(\n\t\t\tschemaSyncAction,\n\t\t\tnormalizedOptions\n\t\t)\n\n\t\tif (errorSyncResults.errors) {\n\t\t\treturn errorSyncResults\n\t\t}\n\n\t\tif (this.areSyncResultsEmpty(errorSyncResults)) {\n\t\t\tthis.deleteOrphanedDirs(errorTypesDestinationDir)\n\t\t\treturn {}\n\t\t}\n\n\t\tconst { schemaTemplateItems } = errorSyncResults.meta as {\n\t\t\tschemaTemplateItems: SchemaTemplateItem[]\n\t\t}\n\n\t\tconst errorTemplateItems = schemaTemplateItems.map((item) => ({\n\t\t\t...item,\n\t\t\tcode: namesUtil.toConst(item.namePascal),\n\t\t}))\n\n\t\tconst errorWriter = this.Writer('error')\n\n\t\tconst optionsResults = await this.generateOptionTypes(\n\t\t\terrorWriter,\n\t\t\terrorTemplateItems,\n\t\t\terrorTypesDestinationDir\n\t\t)\n\n\t\tconst errorClassGeneratedFiles =\n\t\t\tawait errorWriter.writeOrAppendErrorsToClass(\n\t\t\t\tdiskUtil.resolvePath(this.cwd, errorClassDestinationDir),\n\t\t\t\terrorTemplateItems\n\t\t\t)\n\n\t\treturn {\n\t\t\tfiles: [\n\t\t\t\t...(errorSyncResults.files ?? []),\n\t\t\t\t...errorClassGeneratedFiles,\n\t\t\t\t...optionsResults,\n\t\t\t],\n\t\t}\n\t}\n\n\tprivate deleteOrphanedDirs(errorTypesDestinationDir: string) {\n\t\tdiskUtil.deleteDir(diskUtil.resolvePath(this.cwd, errorTypesDestinationDir))\n\t}\n\n\tprivate async syncErrors(\n\t\tschemaSyncAction: FeatureAction<SpruceSchemas.SpruceCli.v2020_07_22.SyncSchemasOptionsSchema>,\n\t\tnormalizedOptions: SchemaValuesWithDefaults<SpruceSchemas.SpruceCli.v2020_07_22.SyncErrorOptionsSchema>\n\t) {\n\t\tconst resolvedErrorTypesDestinationDir = diskUtil.resolvePath(\n\t\t\tthis.cwd,\n\t\t\tnormalizedOptions.errorTypesDestinationDir,\n\t\t\t'errors.types.ts'\n\t\t)\n\n\t\tconst syncOptions = normalizeSchemaValues(syncSchemasActionSchema, {\n\t\t\t...normalizedOptions,\n\t\t\tschemaTypesDestinationDirOrFile: resolvedErrorTypesDestinationDir,\n\t\t\tschemaLookupDir: normalizedOptions.errorLookupDir,\n\t\t\tshouldEnableVersioning: false,\n\t\t\tglobalSchemaNamespace: 'SpruceErrors',\n\t\t\tshouldFetchRemoteSchemas: false,\n\t\t\tgenerateFieldTypes: true,\n\t\t\tgenerateStandaloneTypesFile: true,\n\t\t\tdeleteDestinationDirIfNoSchemas: true,\n\t\t\tshouldFetchCoreSchemas: false,\n\t\t\tsyncingMessage: 'Syncing errors...',\n\t\t})\n\n\t\tconst errorSyncResults = await schemaSyncAction.execute(syncOptions)\n\n\t\treturn errorSyncResults\n\t}\n\n\tprivate areSyncResultsEmpty(errorSyncResults: FeatureActionResponse) {\n\t\treturn (\n\t\t\t!errorSyncResults.meta ||\n\t\t\t!errorSyncResults.files ||\n\t\t\terrorSyncResults.files.length === 0\n\t\t)\n\t}\n\n\tprivate async generateOptionTypes(\n\t\terrorGenerator: ErrorWriter,\n\t\terrorTemplateItems: ErrorTemplateItem[],\n\t\terrorTypesDestinationDir: string\n\t) {\n\t\tif (errorTemplateItems.length === 0) {\n\t\t\treturn []\n\t\t}\n\n\t\tconst resolvedTypesDestination = diskUtil.resolvePath(\n\t\t\tthis.cwd,\n\t\t\terrorTypesDestinationDir\n\t\t)\n\n\t\tconst topLevelItems = errorTemplateItems.filter((i) => !i.isNested)\n\n\t\tconst optionsResults = await errorGenerator.writeOptionsTypesFile(\n\t\t\tresolvedTypesDestination,\n\t\t\ttopLevelItems\n\t\t)\n\n\t\treturn optionsResults\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,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AAA;MAAA;MAAA,OAAAyE,mBAAA;IAAA;EAAA;EAAA,OAAAvD,UAAA;AAAA,EA5HsCoG,2BAAc","ignoreList":[]}
|
|
@@ -11,9 +11,9 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
11
11
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
12
12
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
13
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
14
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
14
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
16
15
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
16
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
17
|
var _spruceSkillUtils = require("@sprucelabs/spruce-skill-utils");
|
|
18
18
|
var _AbstractWriter2 = _interopRequireDefault(require("../../../writers/AbstractWriter"));
|
|
19
19
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
@@ -21,14 +21,13 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
21
21
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
22
22
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
23
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
|
-
function
|
|
25
|
-
function _isNativeReflectConstruct() {
|
|
24
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
25
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
26
26
|
var ErrorWriter = exports["default"] = /*#__PURE__*/function (_AbstractWriter) {
|
|
27
27
|
(0, _inherits2["default"])(ErrorWriter, _AbstractWriter);
|
|
28
|
-
var _super = _createSuper(ErrorWriter);
|
|
29
28
|
function ErrorWriter() {
|
|
30
29
|
(0, _classCallCheck2["default"])(this, ErrorWriter);
|
|
31
|
-
return
|
|
30
|
+
return _callSuper(this, ErrorWriter, arguments);
|
|
32
31
|
}
|
|
33
32
|
(0, _createClass2["default"])(ErrorWriter, [{
|
|
34
33
|
key: "writeOrAppendErrorsToClass",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorWriter.js","names":["_spruceSkillUtils","require","_AbstractWriter2","_interopRequireDefault","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_e","f","TypeError","normalCompletion","didErr","err","call","step","next","_e2","minLen","_arrayLikeToArray","Object","prototype","toString","slice","constructor","name","from","test","arr","len","arr2","ownKeys","r","t","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","Reflect","construct","_possibleConstructorReturn2","sham","Proxy","Boolean","valueOf","ErrorWriter","exports","_AbstractWriter","_inherits2","_super","_classCallCheck2","_createClass2","key","_writeOrAppendErrorsToClass","_asyncToGenerator2","_regenerator","mark","_callee","destinationDir","errors","results","resolvedDestination","errorContents","updates","wrap","_callee$","_context","prev","Error","diskUtil","resolvePath","doesFileExist","ui","startLoading","templates","error","isNested","writeFileIfChangedMixinResults","sent","dropInNewErrorCases","description","concat","abrupt","stop","writeOrAppendErrorsToClass","_x","_x2","_dropInNewErrorCases","_callee2","destinationFile","_iterator","_step","dropInResults","_callee2$","_context2","dropInErrorCaseIfMissing","_toConsumableArray2","t0","finish","_x3","_x4","_dropInErrorCaseIfMissing","_callee3","errorBlock","currentErrorContents","blockMatches","newErrorContents","_callee3$","_context3","renderClassDefinition","readFile","search","doesErrorCaseExist","substring","code","_x5","_x6","currentContents","RegExp","_writeOptionsTypesFile","_callee4","errorTemplateItems","contents","destination","_callee4$","_context4","errorOptionsTypes","options","lint","writeOptionsTypesFile","_x7","_x8","_writePlugin","_callee5","cwd","pluginContents","_callee5$","_context5","resolveHashSprucePath","errorPlugin","writePlugin","_x9","AbstractWriter"],"sources":["../../../../src/features/error/writers/ErrorWriter.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { ErrorTemplateItem } from '@sprucelabs/spruce-templates'\nimport { GeneratedFile } from '../../../types/cli.types'\nimport AbstractWriter, { WriteResults } from '../../../writers/AbstractWriter'\n\nexport default class ErrorWriter extends AbstractWriter {\n\tpublic async writeOrAppendErrorsToClass(\n\t\tdestinationDir: string,\n\t\terrors: ErrorTemplateItem[]\n\t): Promise<WriteResults> {\n\t\tlet results: WriteResults = []\n\n\t\tif (errors.length === 0) {\n\t\t\t// todo move to proper error\n\t\t\tthrow new Error('Need at least one error')\n\t\t}\n\n\t\tconst resolvedDestination = diskUtil.resolvePath(\n\t\t\tdestinationDir,\n\t\t\t`SpruceError.ts`\n\t\t)\n\n\t\tif (!diskUtil.doesFileExist(resolvedDestination)) {\n\t\t\tthis.ui.startLoading('Creating Error class')\n\n\t\t\tconst errorContents = this.templates.error({\n\t\t\t\terrors: errors.filter((error) => !error.isNested),\n\t\t\t})\n\t\t\tresults = await this.writeFileIfChangedMixinResults(\n\t\t\t\tresolvedDestination,\n\t\t\t\terrorContents,\n\t\t\t\t'A new subclass of SpruceBaseError where you can control your error messaging.',\n\t\t\t\tresults\n\t\t\t)\n\t\t} else {\n\t\t\tthis.ui.startLoading('Updating Error class')\n\n\t\t\tconst updates = await this.dropInNewErrorCases(\n\t\t\t\terrors,\n\t\t\t\tresolvedDestination\n\t\t\t)\n\t\t\tif (updates.length > 0) {\n\t\t\t\tresults.push({\n\t\t\t\t\t...updates[0],\n\t\t\t\t\tdescription: `${updates.length} new error cases were dropped in.`,\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\treturn results\n\t}\n\n\tprivate async dropInNewErrorCases(\n\t\terrors: ErrorTemplateItem[],\n\t\tdestinationFile: string\n\t) {\n\t\tlet results: GeneratedFile[] = []\n\n\t\tfor (const error of errors) {\n\t\t\tif (!error.isNested) {\n\t\t\t\tconst dropInResults = await this.dropInErrorCaseIfMissing(\n\t\t\t\t\terror,\n\t\t\t\t\tdestinationFile\n\t\t\t\t)\n\t\t\t\tresults.push(...dropInResults)\n\t\t\t}\n\t\t}\n\n\t\treturn results\n\t}\n\n\tprivate async dropInErrorCaseIfMissing(\n\t\terror: ErrorTemplateItem,\n\t\tdestinationFile: string\n\t) {\n\t\tlet results: GeneratedFile[] = []\n\t\tconst errorBlock = this.templates.error({\n\t\t\terrors: [error],\n\t\t\trenderClassDefinition: false,\n\t\t})\n\n\t\t// Try and drop in the block right before \"default:\"\n\t\tconst currentErrorContents = diskUtil.readFile(destinationFile)\n\t\tconst blockMatches = currentErrorContents.search(/default:/g)\n\t\tif (\n\t\t\tblockMatches > -1 &&\n\t\t\t!this.doesErrorCaseExist(currentErrorContents, error)\n\t\t) {\n\t\t\tconst newErrorContents =\n\t\t\t\tcurrentErrorContents.substring(0, blockMatches) +\n\t\t\t\t'\\n' +\n\t\t\t\terrorBlock +\n\t\t\t\t'\\n' +\n\t\t\t\tcurrentErrorContents.substring(blockMatches)\n\n\t\t\tresults = await this.writeFileIfChangedMixinResults(\n\t\t\t\tdestinationFile,\n\t\t\t\tnewErrorContents,\n\t\t\t\t`A new block was added to handle ${error.code}.`,\n\t\t\t\tresults\n\t\t\t)\n\t\t}\n\t\treturn results\n\t}\n\n\tprivate doesErrorCaseExist(\n\t\tcurrentContents: string,\n\t\terror: ErrorTemplateItem\n\t) {\n\t\treturn currentContents.search(new RegExp(`case '${error.code}':`)) > -1\n\t}\n\n\tpublic async writeOptionsTypesFile(\n\t\tdestinationDir: string,\n\t\terrorTemplateItems: ErrorTemplateItem[]\n\t): Promise<WriteResults> {\n\t\tconst contents = this.templates.errorOptionsTypes({\n\t\t\toptions: errorTemplateItems,\n\t\t})\n\n\t\tconst destination = diskUtil.resolvePath(destinationDir, 'options.types.ts')\n\n\t\tthis.ui.startLoading('Updating error options...')\n\n\t\tconst results = this.writeFileIfChangedMixinResults(\n\t\t\tdestination,\n\t\t\tcontents,\n\t\t\t'A union of all possible error codes and their options.'\n\t\t)\n\n\t\tawait this.lint(destination)\n\n\t\treturn results\n\t}\n\n\tpublic async writePlugin(cwd: string) {\n\t\tconst destination = diskUtil.resolveHashSprucePath(\n\t\t\tcwd,\n\t\t\t'features',\n\t\t\t'error.plugin.ts'\n\t\t)\n\n\t\tconst pluginContents = this.templates.errorPlugin()\n\n\t\tconst results = this.writeFileIfChangedMixinResults(\n\t\t\tdestination,\n\t\t\tpluginContents,\n\t\t\t'Supports your skill with Error generation and handling.'\n\t\t)\n\n\t\tawait this.lint(destination)\n\n\t\treturn results\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAGA,IAAAC,gBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA8E,SAAAG,2BAAAC,CAAA,EAAAC,cAAA,QAAAC,EAAA,UAAAC,MAAA,oBAAAH,CAAA,CAAAG,MAAA,CAAAC,QAAA,KAAAJ,CAAA,qBAAAE,EAAA,QAAAG,KAAA,CAAAC,OAAA,CAAAN,CAAA,MAAAE,EAAA,GAAAK,2BAAA,CAAAP,CAAA,MAAAC,cAAA,IAAAD,CAAA,WAAAA,CAAA,CAAAQ,MAAA,qBAAAN,EAAA,EAAAF,CAAA,GAAAE,EAAA,MAAAO,CAAA,UAAAC,CAAA,YAAAA,EAAA,eAAAC,CAAA,EAAAD,CAAA,EAAAE,CAAA,WAAAA,EAAA,QAAAH,CAAA,IAAAT,CAAA,CAAAQ,MAAA,WAAAK,IAAA,mBAAAA,IAAA,SAAAC,KAAA,EAAAd,CAAA,CAAAS,CAAA,UAAAM,CAAA,WAAAA,EAAAC,EAAA,UAAAA,EAAA,KAAAC,CAAA,EAAAP,CAAA,gBAAAQ,SAAA,iJAAAC,gBAAA,SAAAC,MAAA,UAAAC,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JuCiG,2BAAc"}
|
|
1
|
+
{"version":3,"file":"ErrorWriter.js","names":["_spruceSkillUtils","require","_AbstractWriter2","_interopRequireDefault","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_e","f","TypeError","normalCompletion","didErr","err","call","step","next","_e2","minLen","_arrayLikeToArray","Object","prototype","toString","slice","constructor","name","from","test","arr","len","arr2","ownKeys","r","t","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","_callSuper","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","ErrorWriter","exports","_AbstractWriter","_inherits2","_classCallCheck2","_createClass2","key","_writeOrAppendErrorsToClass","_asyncToGenerator2","_regenerator","mark","_callee","destinationDir","errors","results","resolvedDestination","errorContents","updates","wrap","_callee$","_context","prev","Error","diskUtil","resolvePath","doesFileExist","ui","startLoading","templates","error","isNested","writeFileIfChangedMixinResults","sent","dropInNewErrorCases","description","concat","abrupt","stop","writeOrAppendErrorsToClass","_x","_x2","_dropInNewErrorCases","_callee2","destinationFile","_iterator","_step","dropInResults","_callee2$","_context2","dropInErrorCaseIfMissing","_toConsumableArray2","t0","finish","_x3","_x4","_dropInErrorCaseIfMissing","_callee3","errorBlock","currentErrorContents","blockMatches","newErrorContents","_callee3$","_context3","renderClassDefinition","readFile","search","doesErrorCaseExist","substring","code","_x5","_x6","currentContents","RegExp","_writeOptionsTypesFile","_callee4","errorTemplateItems","contents","destination","_callee4$","_context4","errorOptionsTypes","options","lint","writeOptionsTypesFile","_x7","_x8","_writePlugin","_callee5","cwd","pluginContents","_callee5$","_context5","resolveHashSprucePath","errorPlugin","writePlugin","_x9","AbstractWriter"],"sources":["../../../../src/features/error/writers/ErrorWriter.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { ErrorTemplateItem } from '@sprucelabs/spruce-templates'\nimport { GeneratedFile } from '../../../types/cli.types'\nimport AbstractWriter, { WriteResults } from '../../../writers/AbstractWriter'\n\nexport default class ErrorWriter extends AbstractWriter {\n\tpublic async writeOrAppendErrorsToClass(\n\t\tdestinationDir: string,\n\t\terrors: ErrorTemplateItem[]\n\t): Promise<WriteResults> {\n\t\tlet results: WriteResults = []\n\n\t\tif (errors.length === 0) {\n\t\t\t// todo move to proper error\n\t\t\tthrow new Error('Need at least one error')\n\t\t}\n\n\t\tconst resolvedDestination = diskUtil.resolvePath(\n\t\t\tdestinationDir,\n\t\t\t`SpruceError.ts`\n\t\t)\n\n\t\tif (!diskUtil.doesFileExist(resolvedDestination)) {\n\t\t\tthis.ui.startLoading('Creating Error class')\n\n\t\t\tconst errorContents = this.templates.error({\n\t\t\t\terrors: errors.filter((error) => !error.isNested),\n\t\t\t})\n\t\t\tresults = await this.writeFileIfChangedMixinResults(\n\t\t\t\tresolvedDestination,\n\t\t\t\terrorContents,\n\t\t\t\t'A new subclass of SpruceBaseError where you can control your error messaging.',\n\t\t\t\tresults\n\t\t\t)\n\t\t} else {\n\t\t\tthis.ui.startLoading('Updating Error class')\n\n\t\t\tconst updates = await this.dropInNewErrorCases(\n\t\t\t\terrors,\n\t\t\t\tresolvedDestination\n\t\t\t)\n\t\t\tif (updates.length > 0) {\n\t\t\t\tresults.push({\n\t\t\t\t\t...updates[0],\n\t\t\t\t\tdescription: `${updates.length} new error cases were dropped in.`,\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\treturn results\n\t}\n\n\tprivate async dropInNewErrorCases(\n\t\terrors: ErrorTemplateItem[],\n\t\tdestinationFile: string\n\t) {\n\t\tlet results: GeneratedFile[] = []\n\n\t\tfor (const error of errors) {\n\t\t\tif (!error.isNested) {\n\t\t\t\tconst dropInResults = await this.dropInErrorCaseIfMissing(\n\t\t\t\t\terror,\n\t\t\t\t\tdestinationFile\n\t\t\t\t)\n\t\t\t\tresults.push(...dropInResults)\n\t\t\t}\n\t\t}\n\n\t\treturn results\n\t}\n\n\tprivate async dropInErrorCaseIfMissing(\n\t\terror: ErrorTemplateItem,\n\t\tdestinationFile: string\n\t) {\n\t\tlet results: GeneratedFile[] = []\n\t\tconst errorBlock = this.templates.error({\n\t\t\terrors: [error],\n\t\t\trenderClassDefinition: false,\n\t\t})\n\n\t\t// Try and drop in the block right before \"default:\"\n\t\tconst currentErrorContents = diskUtil.readFile(destinationFile)\n\t\tconst blockMatches = currentErrorContents.search(/default:/g)\n\t\tif (\n\t\t\tblockMatches > -1 &&\n\t\t\t!this.doesErrorCaseExist(currentErrorContents, error)\n\t\t) {\n\t\t\tconst newErrorContents =\n\t\t\t\tcurrentErrorContents.substring(0, blockMatches) +\n\t\t\t\t'\\n' +\n\t\t\t\terrorBlock +\n\t\t\t\t'\\n' +\n\t\t\t\tcurrentErrorContents.substring(blockMatches)\n\n\t\t\tresults = await this.writeFileIfChangedMixinResults(\n\t\t\t\tdestinationFile,\n\t\t\t\tnewErrorContents,\n\t\t\t\t`A new block was added to handle ${error.code}.`,\n\t\t\t\tresults\n\t\t\t)\n\t\t}\n\t\treturn results\n\t}\n\n\tprivate doesErrorCaseExist(\n\t\tcurrentContents: string,\n\t\terror: ErrorTemplateItem\n\t) {\n\t\treturn currentContents.search(new RegExp(`case '${error.code}':`)) > -1\n\t}\n\n\tpublic async writeOptionsTypesFile(\n\t\tdestinationDir: string,\n\t\terrorTemplateItems: ErrorTemplateItem[]\n\t): Promise<WriteResults> {\n\t\tconst contents = this.templates.errorOptionsTypes({\n\t\t\toptions: errorTemplateItems,\n\t\t})\n\n\t\tconst destination = diskUtil.resolvePath(destinationDir, 'options.types.ts')\n\n\t\tthis.ui.startLoading('Updating error options...')\n\n\t\tconst results = this.writeFileIfChangedMixinResults(\n\t\t\tdestination,\n\t\t\tcontents,\n\t\t\t'A union of all possible error codes and their options.'\n\t\t)\n\n\t\tawait this.lint(destination)\n\n\t\treturn results\n\t}\n\n\tpublic async writePlugin(cwd: string) {\n\t\tconst destination = diskUtil.resolveHashSprucePath(\n\t\t\tcwd,\n\t\t\t'features',\n\t\t\t'error.plugin.ts'\n\t\t)\n\n\t\tconst pluginContents = this.templates.errorPlugin()\n\n\t\tconst results = this.writeFileIfChangedMixinResults(\n\t\t\tdestination,\n\t\t\tpluginContents,\n\t\t\t'Supports your skill with Error generation and handling.'\n\t\t)\n\n\t\tawait this.lint(destination)\n\n\t\treturn results\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAGA,IAAAC,gBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA8E,SAAAG,2BAAAC,CAAA,EAAAC,cAAA,QAAAC,EAAA,UAAAC,MAAA,oBAAAH,CAAA,CAAAG,MAAA,CAAAC,QAAA,KAAAJ,CAAA,qBAAAE,EAAA,QAAAG,KAAA,CAAAC,OAAA,CAAAN,CAAA,MAAAE,EAAA,GAAAK,2BAAA,CAAAP,CAAA,MAAAC,cAAA,IAAAD,CAAA,WAAAA,CAAA,CAAAQ,MAAA,qBAAAN,EAAA,EAAAF,CAAA,GAAAE,EAAA,MAAAO,CAAA,UAAAC,CAAA,YAAAA,EAAA,eAAAC,CAAA,EAAAD,CAAA,EAAAE,CAAA,WAAAA,EAAA,QAAAH,CAAA,IAAAT,CAAA,CAAAQ,MAAA,WAAAK,IAAA,mBAAAA,IAAA,SAAAC,KAAA,EAAAd,CAAA,CAAAS,CAAA,UAAAM,CAAA,WAAAA,EAAAC,EAAA,UAAAA,EAAA,KAAAC,CAAA,EAAAP,CAAA,gBAAAQ,SAAA,iJAAAC,gBAAA,SAAAC,MAAA,UAAAC,GAAA,WAAAV,CAAA,WAAAA,EAAA,IAAAT,EAAA,GAAAA,EAAA,CAAAoB,IAAA,CAAAtB,CAAA,MAAAY,CAAA,WAAAA,EAAA,QAAAW,IAAA,GAAArB,EAAA,CAAAsB,IAAA,IAAAL,gBAAA,GAAA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AAA;MAAA,OAAAiG,qBAAA;IAAA;EAAA;IAAA7E,GAAA;IAAAxD,KAAA;MAAA,IAAAwI,YAAA,OAAA9E,kBAAA,2BAAAC,YAAA,YAAAC,IAAA,CAED,SAAA6E,SAAyBC,GAAW;QAAA,IAAAX,WAAA,EAAAY,cAAA,EAAA3E,OAAA;QAAA,OAAAL,YAAA,YAAAS,IAAA,UAAAwE,UAAAC,SAAA;UAAA,kBAAAA,SAAA,CAAAtE,IAAA,GAAAsE,SAAA,CAAAnI,IAAA;YAAA;cAC7BqH,WAAW,GAAGtD,0BAAQ,CAACqE,qBAAqB,CACjDJ,GAAG,EACH,UAAU,EACV,iBACD,CAAC;cAEKC,cAAc,GAAG,IAAI,CAAC7D,SAAS,CAACiE,WAAW,CAAC,CAAC;cAE7C/E,OAAO,GAAG,IAAI,CAACiB,8BAA8B,CAClD8C,WAAW,EACXY,cAAc,EACd,yDACD,CAAC;cAAAE,SAAA,CAAAnI,IAAA;cAAA,OAEK,IAAI,CAAC0H,IAAI,CAACL,WAAW,CAAC;YAAA;cAAA,OAAAc,SAAA,CAAAvD,MAAA,WAErBtB,OAAO;YAAA;YAAA;cAAA,OAAA6E,SAAA,CAAAtD,IAAA;UAAA;QAAA,GAAAkD,QAAA;MAAA,CACd;MAAA,SAAAO,YAAAC,GAAA;QAAA,OAAAT,YAAA,CAAAtG,KAAA,OAAAE,SAAA;MAAA;MAAA,OAAA4G,WAAA;IAAA;EAAA;EAAA,OAAA9F,WAAA;AAAA,EApJuCgG,2BAAc","ignoreList":[]}
|
|
@@ -9,10 +9,10 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
|
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
13
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
15
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
15
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
17
|
var _spruceSkillUtils = require("@sprucelabs/spruce-skill-utils");
|
|
18
18
|
var _syncEventOptions = _interopRequireDefault(require("../../.spruce/schemas/spruceCli/v2020_07_22/syncEventOptions.schema"));
|
|
@@ -21,15 +21,14 @@ var _action = _interopRequireDefault(require("../../utilities/action.utility"));
|
|
|
21
21
|
var _AbstractFeature2 = _interopRequireDefault(require("../AbstractFeature"));
|
|
22
22
|
var _EventContractBuilder = _interopRequireDefault(require("./builders/EventContractBuilder"));
|
|
23
23
|
var _EventStore = _interopRequireDefault(require("./stores/EventStore"));
|
|
24
|
-
function
|
|
25
|
-
function _isNativeReflectConstruct() {
|
|
24
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
25
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
26
26
|
var EventFeature = exports["default"] = /*#__PURE__*/function (_AbstractFeature) {
|
|
27
27
|
(0, _inherits2["default"])(EventFeature, _AbstractFeature);
|
|
28
|
-
var _super = _createSuper(EventFeature);
|
|
29
28
|
function EventFeature(options) {
|
|
30
29
|
var _this;
|
|
31
30
|
(0, _classCallCheck2["default"])(this, EventFeature);
|
|
32
|
-
_this =
|
|
31
|
+
_this = _callSuper(this, EventFeature, [options]);
|
|
33
32
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "code", 'event');
|
|
34
33
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "nameReadable", 'Events');
|
|
35
34
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "description", 'Connect to the Mercury Event Engine.');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventFeature.js","names":["_spruceSkillUtils","require","_syncEventOptions","_interopRequireDefault","_TerminalInterface","_action","_AbstractFeature2","_EventContractBuilder","_EventStore","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","EventFeature","exports","_AbstractFeature","_inherits2","_super","options","_this","_classCallCheck2","_defineProperty2","_assertThisInitialized2","code","isRequired","name","diskUtil","resolvePath","__dirname","emitter","on","handleDidFetchSchemas","bind","handleWillExecute","handleDidExecute","_createClass2","key","value","_afterPackageInstall","_asyncToGenerator2","_regenerator","mark","_callee","wrap","_callee$","_context","prev","next","createDir","cwd","abrupt","optionallySyncListeners","stop","afterPackageInstall","_optionallySyncListeners","_callee2","results","isSkillInstalled","_callee2$","_context2","features","isInstalled","sent","Action","execute","_handleWillExecute","_callee3","payload","featureCode","actionCode","combined","settings","isRemoteRelevant","remoteResults","_callee3$","_context3","initiatingAction","EventStore","clearCache","combineCodes","Service","clearListenerCache","appendRemoteToResultsOrPrompt","actionUtil","mergeActionResults","_x","_syncListenersAndMixinResults","_callee4","syncResults","_callee4$","_context4","syncListenersAndMixinResults","_x2","_handleDidExecute","_callee5","isUpgrade","_callee5$","_context5","_x3","concat","_appendRemoteToResultsOrPrompt","_callee6","remote","r","_callee6$","_context6","getRemote","TerminalInterface","doesSupportColor","Error","ui","stopLoading","renderLine","summaryLines","getHost","_handleDidFetchSchemas","_callee7","lastSync","_payload$schemas","_uniqueSchemas$schema","writer","uniqueSchemas","_callee7$","_context7","getLastSyncOptions","getEventContractBuilder","fetchContractsAndGenerateUniqueSchemas","schemas","shouldSyncOnlyCoreEvents","_x4","contractBuilder","EventContractBuilder","optionsSchema","syncEventActionSchema","eventGenerator","Writer","eventStore","Store","skillStore","dependencyService","hasBeenSynced","doesHashSprucePathExist","hasCombinedContractBeenWritten","AbstractFeature"],"sources":["../../../src/features/event/EventFeature.ts"],"sourcesContent":["import { Schema } from '@sprucelabs/schema'\nimport { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport syncEventActionSchema from '#spruce/schemas/spruceCli/v2020_07_22/syncEventOptions.schema'\nimport TerminalInterface from '../../interfaces/TerminalInterface'\nimport { FileDescription } from '../../types/cli.types'\nimport actionUtil from '../../utilities/action.utility'\nimport AbstractFeature, {\n\tFeatureDependency,\n\tFeatureOptions,\n} from '../AbstractFeature'\nimport { FeatureActionResponse, FeatureCode } from '../features.types'\nimport EventContractBuilder from './builders/EventContractBuilder'\nimport EventStore from './stores/EventStore'\n\nexport default class EventFeature extends AbstractFeature {\n\tpublic code: FeatureCode = 'event'\n\tpublic nameReadable = 'Events'\n\tpublic description = 'Connect to the Mercury Event Engine.'\n\tpublic dependencies: FeatureDependency[] = [\n\t\t{ code: 'schema', isRequired: true },\n\t\t{ code: 'permission', isRequired: true },\n\t]\n\tpublic packageDependencies = [\n\t\t{\n\t\t\tname: '@sprucelabs/mercury-client',\n\t\t},\n\t\t{\n\t\t\tname: '@sprucelabs/mercury-types',\n\t\t},\n\t\t{\n\t\t\tname: '@sprucelabs/spruce-event-utils',\n\t\t},\n\t\t{\n\t\t\tname: '@sprucelabs/spruce-event-plugin',\n\t\t},\n\t\t{\n\t\t\tname: '@sprucelabs/mercury-core-events',\n\t\t},\n\t]\n\n\tpublic actionsDir = diskUtil.resolvePath(__dirname, 'actions')\n\n\tpublic readonly fileDescriptions: FileDescription[] = []\n\tprivate contractBuilder?: EventContractBuilder\n\tprivate initiatingAction?: string\n\n\tpublic constructor(options: FeatureOptions) {\n\t\tsuper(options)\n\n\t\tvoid this.emitter.on(\n\t\t\t'schema.did-fetch-schemas',\n\t\t\tthis.handleDidFetchSchemas.bind(this)\n\t\t)\n\n\t\tvoid this.emitter.on(\n\t\t\t'feature.will-execute',\n\t\t\tthis.handleWillExecute.bind(this)\n\t\t)\n\n\t\tvoid this.emitter.on(\n\t\t\t'feature.did-execute',\n\t\t\tthis.handleDidExecute.bind(this)\n\t\t)\n\t}\n\n\tpublic async afterPackageInstall() {\n\t\tdiskUtil.createDir(diskUtil.resolvePath(this.cwd, 'src', 'events'))\n\t\treturn this.optionallySyncListeners()\n\t}\n\n\tprivate async optionallySyncListeners() {\n\t\tlet results: FeatureActionResponse = {}\n\n\t\tconst isSkillInstalled = await this.features.isInstalled('skill')\n\n\t\tif (isSkillInstalled) {\n\t\t\tresults = await this.Action('event', 'sync.listeners').execute({})\n\t\t}\n\t\treturn results\n\t}\n\n\tprivate async handleWillExecute(payload: {\n\t\tfeatureCode: string\n\t\tactionCode: string\n\t}): Promise<FeatureActionResponse> {\n\t\tconst { featureCode, actionCode } = payload\n\n\t\tlet results: FeatureActionResponse = {}\n\n\t\tif (!this.initiatingAction) {\n\t\t\tEventStore.clearCache()\n\t\t\tconst combined = this.combineCodes(featureCode, actionCode)\n\t\t\tthis.initiatingAction = combined\n\t\t}\n\n\t\tif (featureCode === 'node' || featureCode === 'upgrade') {\n\t\t\tconst settings = this.Service('eventSettings')\n\t\t\tsettings.clearListenerCache()\n\t\t}\n\n\t\tconst isInstalled = await this.features.isInstalled('event')\n\t\tconst isRemoteRelevant =\n\t\t\tisInstalled &&\n\t\t\t(featureCode === 'event' ||\n\t\t\t\tfeatureCode === 'eventContract' ||\n\t\t\t\tactionCode === 'login') &&\n\t\t\tactionCode !== 'setRemote'\n\n\t\tif (isRemoteRelevant) {\n\t\t\tconst remoteResults = await this.appendRemoteToResultsOrPrompt()\n\t\t\tresults = actionUtil.mergeActionResults(results, remoteResults)\n\t\t}\n\n\t\treturn results\n\t}\n\n\tprivate async syncListenersAndMixinResults(results: FeatureActionResponse) {\n\t\tconst syncResults = await this.optionallySyncListeners()\n\t\tresults = actionUtil.mergeActionResults(results, syncResults)\n\t\treturn results\n\t}\n\n\tprivate async handleDidExecute(payload: {\n\t\tfeatureCode: string\n\t\tactionCode: string\n\t}) {\n\t\tconst { featureCode, actionCode } = payload\n\t\tconst isInstalled = await this.features.isInstalled('event')\n\n\t\tlet results = {}\n\n\t\tconst isUpgrade =\n\t\t\tisInstalled && featureCode === 'node' && actionCode === 'upgrade'\n\n\t\tif (isUpgrade) {\n\t\t\tresults = await this.Action('event', 'sync').execute({})\n\t\t\tresults = await this.syncListenersAndMixinResults(results)\n\t\t}\n\n\t\tif (this.initiatingAction === this.combineCodes(featureCode, actionCode)) {\n\t\t\tEventStore.clearCache()\n\t\t}\n\n\t\treturn results\n\t}\n\n\tprivate combineCodes(featureCode: string, actionCode: string) {\n\t\treturn `${featureCode}.${actionCode}`\n\t}\n\n\tprivate async appendRemoteToResultsOrPrompt(): Promise<FeatureActionResponse> {\n\t\tconst remote = this.Service('remote')\n\t\tconst r = remote.getRemote()\n\n\t\tif (!r) {\n\t\t\tif (!TerminalInterface.doesSupportColor()) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Dang! I couldn't find env.HOST. Once that is set, lets try again!`\n\t\t\t\t)\n\t\t\t}\n\n\t\t\tthis.ui.stopLoading()\n\t\t\tthis.ui.renderLine(\n\t\t\t\t`Uh oh! It looks like you haven't configured your remote! We gotta do that.`\n\t\t\t)\n\n\t\t\tconst results = await this.Action('event', 'setRemote').execute({})\n\n\t\t\treturn results\n\t\t} else {\n\t\t\treturn {\n\t\t\t\tsummaryLines: [`Remote: ${r}`, `Host: ${remote.getHost()}`],\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate async handleDidFetchSchemas(payload: { schemas?: Schema[] | null }) {\n\t\tconst isInstalled = await this.features.isInstalled(this.code)\n\n\t\tconst lastSync = this.Service('eventSettings').getLastSyncOptions()\n\n\t\tif (lastSync && isInstalled) {\n\t\t\tconst writer = this.getEventContractBuilder()\n\n\t\t\tconst uniqueSchemas = await writer.fetchContractsAndGenerateUniqueSchemas(\n\t\t\t\tpayload.schemas ?? [],\n\t\t\t\tlastSync.shouldSyncOnlyCoreEvents\n\t\t\t)\n\n\t\t\treturn {\n\t\t\t\tschemas: uniqueSchemas.schemas ?? [],\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tschemas: [],\n\t\t}\n\t}\n\n\tpublic getEventContractBuilder() {\n\t\tif (!this.contractBuilder) {\n\t\t\tthis.contractBuilder = new EventContractBuilder({\n\t\t\t\tcwd: this.cwd,\n\t\t\t\toptionsSchema: syncEventActionSchema,\n\t\t\t\tui: this.ui,\n\t\t\t\teventGenerator: this.Writer('event'),\n\t\t\t\teventStore: this.Store('event'),\n\t\t\t\tskillStore: this.Store('skill'),\n\t\t\t\tdependencyService: this.Service('dependency'),\n\t\t\t})\n\t\t}\n\n\t\treturn this.contractBuilder\n\t}\n\n\tpublic hasBeenSynced() {\n\t\tif (diskUtil.doesHashSprucePathExist(this.cwd)) {\n\t\t\tconst writer = this.Writer('event')\n\t\t\treturn writer.hasCombinedContractBeenWritten(this.cwd)\n\t\t}\n\n\t\treturn false\n\t}\n}\n\ndeclare module '../../features/features.types' {\n\tinterface FeatureMap {\n\t\tevent: EventFeature\n\t}\n\n\tinterface FeatureOptionsMap {\n\t\tevent: undefined\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,O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eAAe;IAC5B;EAAC;IAAA9F,GAAA;IAAAC,KAAA,EAED,SAAAuG,cAAA,EAAuB;MACtB,IAAIlH,0BAAQ,CAACmH,uBAAuB,CAAC,IAAI,CAAC5F,GAAG,CAAC,EAAE;QAC/C,IAAMuE,MAAM,GAAG,IAAI,CAACe,MAAM,CAAC,OAAO,CAAC;QACnC,OAAOf,MAAM,CAACsB,8BAA8B,CAAC,IAAI,CAAC7F,GAAG,CAAC;MACvD;MAEA,OAAO,KAAK;IACb;EAAC;EAAA,OAAApC,YAAA;AAAA,EAhNwCkI,4BAAe"}
|
|
1
|
+
{"version":3,"file":"EventFeature.js","names":["_spruceSkillUtils","require","_syncEventOptions","_interopRequireDefault","_TerminalInterface","_action","_AbstractFeature2","_EventContractBuilder","_EventStore","_callSuper","t","o","e","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct","Reflect","construct","constructor","apply","Boolean","prototype","valueOf","call","EventFeature","exports","_AbstractFeature","_inherits2","options","_this","_classCallCheck2","_defineProperty2","_assertThisInitialized2","code","isRequired","name","diskUtil","resolvePath","__dirname","emitter","on","handleDidFetchSchemas","bind","handleWillExecute","handleDidExecute","_createClass2","key","value","_afterPackageInstall","_asyncToGenerator2","_regenerator","mark","_callee","wrap","_callee$","_context","prev","next","createDir","cwd","abrupt","optionallySyncListeners","stop","afterPackageInstall","arguments","_optionallySyncListeners","_callee2","results","isSkillInstalled","_callee2$","_context2","features","isInstalled","sent","Action","execute","_handleWillExecute","_callee3","payload","featureCode","actionCode","combined","settings","isRemoteRelevant","remoteResults","_callee3$","_context3","initiatingAction","EventStore","clearCache","combineCodes","Service","clearListenerCache","appendRemoteToResultsOrPrompt","actionUtil","mergeActionResults","_x","_syncListenersAndMixinResults","_callee4","syncResults","_callee4$","_context4","syncListenersAndMixinResults","_x2","_handleDidExecute","_callee5","isUpgrade","_callee5$","_context5","_x3","concat","_appendRemoteToResultsOrPrompt","_callee6","remote","r","_callee6$","_context6","getRemote","TerminalInterface","doesSupportColor","Error","ui","stopLoading","renderLine","summaryLines","getHost","_handleDidFetchSchemas","_callee7","lastSync","_payload$schemas","_uniqueSchemas$schema","writer","uniqueSchemas","_callee7$","_context7","getLastSyncOptions","getEventContractBuilder","fetchContractsAndGenerateUniqueSchemas","schemas","shouldSyncOnlyCoreEvents","_x4","contractBuilder","EventContractBuilder","optionsSchema","syncEventActionSchema","eventGenerator","Writer","eventStore","Store","skillStore","dependencyService","hasBeenSynced","doesHashSprucePathExist","hasCombinedContractBeenWritten","AbstractFeature"],"sources":["../../../src/features/event/EventFeature.ts"],"sourcesContent":["import { Schema } from '@sprucelabs/schema'\nimport { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport syncEventActionSchema from '#spruce/schemas/spruceCli/v2020_07_22/syncEventOptions.schema'\nimport TerminalInterface from '../../interfaces/TerminalInterface'\nimport { FileDescription } from '../../types/cli.types'\nimport actionUtil from '../../utilities/action.utility'\nimport AbstractFeature, {\n\tFeatureDependency,\n\tFeatureOptions,\n} from '../AbstractFeature'\nimport { FeatureActionResponse, FeatureCode } from '../features.types'\nimport EventContractBuilder from './builders/EventContractBuilder'\nimport EventStore from './stores/EventStore'\n\nexport default class EventFeature extends AbstractFeature {\n\tpublic code: FeatureCode = 'event'\n\tpublic nameReadable = 'Events'\n\tpublic description = 'Connect to the Mercury Event Engine.'\n\tpublic dependencies: FeatureDependency[] = [\n\t\t{ code: 'schema', isRequired: true },\n\t\t{ code: 'permission', isRequired: true },\n\t]\n\tpublic packageDependencies = [\n\t\t{\n\t\t\tname: '@sprucelabs/mercury-client',\n\t\t},\n\t\t{\n\t\t\tname: '@sprucelabs/mercury-types',\n\t\t},\n\t\t{\n\t\t\tname: '@sprucelabs/spruce-event-utils',\n\t\t},\n\t\t{\n\t\t\tname: '@sprucelabs/spruce-event-plugin',\n\t\t},\n\t\t{\n\t\t\tname: '@sprucelabs/mercury-core-events',\n\t\t},\n\t]\n\n\tpublic actionsDir = diskUtil.resolvePath(__dirname, 'actions')\n\n\tpublic readonly fileDescriptions: FileDescription[] = []\n\tprivate contractBuilder?: EventContractBuilder\n\tprivate initiatingAction?: string\n\n\tpublic constructor(options: FeatureOptions) {\n\t\tsuper(options)\n\n\t\tvoid this.emitter.on(\n\t\t\t'schema.did-fetch-schemas',\n\t\t\tthis.handleDidFetchSchemas.bind(this)\n\t\t)\n\n\t\tvoid this.emitter.on(\n\t\t\t'feature.will-execute',\n\t\t\tthis.handleWillExecute.bind(this)\n\t\t)\n\n\t\tvoid this.emitter.on(\n\t\t\t'feature.did-execute',\n\t\t\tthis.handleDidExecute.bind(this)\n\t\t)\n\t}\n\n\tpublic async afterPackageInstall() {\n\t\tdiskUtil.createDir(diskUtil.resolvePath(this.cwd, 'src', 'events'))\n\t\treturn this.optionallySyncListeners()\n\t}\n\n\tprivate async optionallySyncListeners() {\n\t\tlet results: FeatureActionResponse = {}\n\n\t\tconst isSkillInstalled = await this.features.isInstalled('skill')\n\n\t\tif (isSkillInstalled) {\n\t\t\tresults = await this.Action('event', 'sync.listeners').execute({})\n\t\t}\n\t\treturn results\n\t}\n\n\tprivate async handleWillExecute(payload: {\n\t\tfeatureCode: string\n\t\tactionCode: string\n\t}): Promise<FeatureActionResponse> {\n\t\tconst { featureCode, actionCode } = payload\n\n\t\tlet results: FeatureActionResponse = {}\n\n\t\tif (!this.initiatingAction) {\n\t\t\tEventStore.clearCache()\n\t\t\tconst combined = this.combineCodes(featureCode, actionCode)\n\t\t\tthis.initiatingAction = combined\n\t\t}\n\n\t\tif (featureCode === 'node' || featureCode === 'upgrade') {\n\t\t\tconst settings = this.Service('eventSettings')\n\t\t\tsettings.clearListenerCache()\n\t\t}\n\n\t\tconst isInstalled = await this.features.isInstalled('event')\n\t\tconst isRemoteRelevant =\n\t\t\tisInstalled &&\n\t\t\t(featureCode === 'event' ||\n\t\t\t\tfeatureCode === 'eventContract' ||\n\t\t\t\tactionCode === 'login') &&\n\t\t\tactionCode !== 'setRemote'\n\n\t\tif (isRemoteRelevant) {\n\t\t\tconst remoteResults = await this.appendRemoteToResultsOrPrompt()\n\t\t\tresults = actionUtil.mergeActionResults(results, remoteResults)\n\t\t}\n\n\t\treturn results\n\t}\n\n\tprivate async syncListenersAndMixinResults(results: FeatureActionResponse) {\n\t\tconst syncResults = await this.optionallySyncListeners()\n\t\tresults = actionUtil.mergeActionResults(results, syncResults)\n\t\treturn results\n\t}\n\n\tprivate async handleDidExecute(payload: {\n\t\tfeatureCode: string\n\t\tactionCode: string\n\t}) {\n\t\tconst { featureCode, actionCode } = payload\n\t\tconst isInstalled = await this.features.isInstalled('event')\n\n\t\tlet results = {}\n\n\t\tconst isUpgrade =\n\t\t\tisInstalled && featureCode === 'node' && actionCode === 'upgrade'\n\n\t\tif (isUpgrade) {\n\t\t\tresults = await this.Action('event', 'sync').execute({})\n\t\t\tresults = await this.syncListenersAndMixinResults(results)\n\t\t}\n\n\t\tif (this.initiatingAction === this.combineCodes(featureCode, actionCode)) {\n\t\t\tEventStore.clearCache()\n\t\t}\n\n\t\treturn results\n\t}\n\n\tprivate combineCodes(featureCode: string, actionCode: string) {\n\t\treturn `${featureCode}.${actionCode}`\n\t}\n\n\tprivate async appendRemoteToResultsOrPrompt(): Promise<FeatureActionResponse> {\n\t\tconst remote = this.Service('remote')\n\t\tconst r = remote.getRemote()\n\n\t\tif (!r) {\n\t\t\tif (!TerminalInterface.doesSupportColor()) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Dang! I couldn't find env.HOST. Once that is set, lets try again!`\n\t\t\t\t)\n\t\t\t}\n\n\t\t\tthis.ui.stopLoading()\n\t\t\tthis.ui.renderLine(\n\t\t\t\t`Uh oh! It looks like you haven't configured your remote! We gotta do that.`\n\t\t\t)\n\n\t\t\tconst results = await this.Action('event', 'setRemote').execute({})\n\n\t\t\treturn results\n\t\t} else {\n\t\t\treturn {\n\t\t\t\tsummaryLines: [`Remote: ${r}`, `Host: ${remote.getHost()}`],\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate async handleDidFetchSchemas(payload: { schemas?: Schema[] | null }) {\n\t\tconst isInstalled = await this.features.isInstalled(this.code)\n\n\t\tconst lastSync = this.Service('eventSettings').getLastSyncOptions()\n\n\t\tif (lastSync && isInstalled) {\n\t\t\tconst writer = this.getEventContractBuilder()\n\n\t\t\tconst uniqueSchemas = await writer.fetchContractsAndGenerateUniqueSchemas(\n\t\t\t\tpayload.schemas ?? [],\n\t\t\t\tlastSync.shouldSyncOnlyCoreEvents\n\t\t\t)\n\n\t\t\treturn {\n\t\t\t\tschemas: uniqueSchemas.schemas ?? [],\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tschemas: [],\n\t\t}\n\t}\n\n\tpublic getEventContractBuilder() {\n\t\tif (!this.contractBuilder) {\n\t\t\tthis.contractBuilder = new EventContractBuilder({\n\t\t\t\tcwd: this.cwd,\n\t\t\t\toptionsSchema: syncEventActionSchema,\n\t\t\t\tui: this.ui,\n\t\t\t\teventGenerator: this.Writer('event'),\n\t\t\t\teventStore: this.Store('event'),\n\t\t\t\tskillStore: this.Store('skill'),\n\t\t\t\tdependencyService: this.Service('dependency'),\n\t\t\t})\n\t\t}\n\n\t\treturn this.contractBuilder\n\t}\n\n\tpublic hasBeenSynced() {\n\t\tif (diskUtil.doesHashSprucePathExist(this.cwd)) {\n\t\t\tconst writer = this.Writer('event')\n\t\t\treturn writer.hasCombinedContractBeenWritten(this.cwd)\n\t\t}\n\n\t\treturn false\n\t}\n}\n\ndeclare module '../../features/features.types' {\n\tinterface FeatureMap {\n\t\tevent: EventFeature\n\t}\n\n\tinterface FeatureOptionsMap {\n\t\tevent: undefined\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,OAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,iBAAA,GA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G,CAAC;MACvD;MAEA,OAAO,KAAK;IACb;EAAC;EAAA,OAAAnC,YAAA;AAAA,EAhNwCkI,4BAAe","ignoreList":[]}
|
|
@@ -9,10 +9,10 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
|
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
13
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
15
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
15
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
17
|
var _schema = require("@sprucelabs/schema");
|
|
18
18
|
var _spruceEventUtils = require("@sprucelabs/spruce-event-utils");
|
|
@@ -22,8 +22,8 @@ var _syncEventOptions = _interopRequireDefault(require("../../../.spruce/schemas
|
|
|
22
22
|
var _SpruceError = _interopRequireDefault(require("../../../errors/SpruceError"));
|
|
23
23
|
var _action = _interopRequireDefault(require("../../../utilities/action.utility"));
|
|
24
24
|
var _AbstractAction2 = _interopRequireDefault(require("../../AbstractAction"));
|
|
25
|
-
function
|
|
26
|
-
function _isNativeReflectConstruct() {
|
|
25
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
26
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
27
27
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28
28
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29
29
|
var optionsSchema = (0, _schema.buildSchema)({
|
|
@@ -55,14 +55,13 @@ var optionsSchema = (0, _schema.buildSchema)({
|
|
|
55
55
|
});
|
|
56
56
|
var CreateAction = exports["default"] = /*#__PURE__*/function (_AbstractAction) {
|
|
57
57
|
(0, _inherits2["default"])(CreateAction, _AbstractAction);
|
|
58
|
-
var _super = _createSuper(CreateAction);
|
|
59
58
|
function CreateAction() {
|
|
60
59
|
var _this;
|
|
61
60
|
(0, _classCallCheck2["default"])(this, CreateAction);
|
|
62
61
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
63
62
|
args[_key] = arguments[_key];
|
|
64
63
|
}
|
|
65
|
-
_this =
|
|
64
|
+
_this = _callSuper(this, CreateAction, [].concat(args));
|
|
66
65
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "optionsSchema", optionsSchema);
|
|
67
66
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "invocationMessage", 'Creating a new event signature... 🜒');
|
|
68
67
|
return _this;
|