@sprucelabs/spruce-cli 19.0.0 → 19.1.1
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/.DS_Store +0 -0
- package/.env +25 -0
- package/.eslintcache +1 -0
- package/CHANGELOG.md +6 -0
- 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.map +1 -1
- package/build/InFlightEntertainment.js.map +1 -1
- package/build/__tests__/behavioral/AddingADependency.test.js +130 -144
- package/build/__tests__/behavioral/AddingADependency.test.js.map +1 -1
- package/build/__tests__/behavioral/BlockingCommands.test.js +59 -63
- package/build/__tests__/behavioral/BlockingCommands.test.js.map +1 -1
- package/build/__tests__/behavioral/BootingTheCli.test.d.ts +2 -1
- package/build/__tests__/behavioral/BootingTheCli.test.js +60 -22
- package/build/__tests__/behavioral/BootingTheCli.test.js.map +1 -1
- package/build/__tests__/behavioral/BootingWithBadFiles.test.js +46 -52
- package/build/__tests__/behavioral/BootingWithBadFiles.test.js.map +1 -1
- package/build/__tests__/behavioral/CreatingAConversationTopic.test.js +50 -56
- package/build/__tests__/behavioral/CreatingAConversationTopic.test.js.map +1 -1
- package/build/__tests__/behavioral/DeployingASkill.test.js +512 -548
- package/build/__tests__/behavioral/DeployingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/DeployingToSandbox.test.js +321 -351
- package/build/__tests__/behavioral/DeployingToSandbox.test.js.map +1 -1
- package/build/__tests__/behavioral/EnablingAndDisablingCache.test.js +137 -153
- package/build/__tests__/behavioral/EnablingAndDisablingCache.test.js.map +1 -1
- package/build/__tests__/behavioral/GettingCliVersion.test.js +31 -37
- package/build/__tests__/behavioral/GettingCliVersion.test.js.map +1 -1
- package/build/__tests__/behavioral/ManagingDependencies.test.js +112 -122
- package/build/__tests__/behavioral/ManagingDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/OverridingCommandsInPackageJson.test.js +41 -45
- package/build/__tests__/behavioral/OverridingCommandsInPackageJson.test.js.map +1 -1
- package/build/__tests__/behavioral/RegisteringConversationsOnBoot.test.js +55 -59
- package/build/__tests__/behavioral/RegisteringConversationsOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/RememberingUpgradeSelections.test.js +56 -64
- package/build/__tests__/behavioral/RememberingUpgradeSelections.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingLogTransportsInASkill.test.js +90 -104
- package/build/__tests__/behavioral/SettingLogTransportsInASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingRemote.test.js +64 -74
- package/build/__tests__/behavioral/SettingRemote.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingUpVscode.test.js +52 -56
- package/build/__tests__/behavioral/SettingUpVscode.test.js.map +1 -1
- package/build/__tests__/behavioral/TestingAConversation.test.js +143 -157
- package/build/__tests__/behavioral/TestingAConversation.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/CreatingANewErrorBuilder.test.js +90 -100
- package/build/__tests__/behavioral/errors/CreatingANewErrorBuilder.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/KeepingErrorClassInSync.test.js +74 -78
- package/build/__tests__/behavioral/errors/KeepingErrorClassInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/KeepingErrorsInSync.test.js +180 -190
- package/build/__tests__/behavioral/errors/KeepingErrorsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/SettingUpErrors.test.js +34 -38
- package/build/__tests__/behavioral/errors/SettingUpErrors.test.js.map +1 -1
- package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js +179 -201
- package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js.map +1 -1
- package/build/__tests__/behavioral/events/CreatingAListener.test.js +423 -459
- package/build/__tests__/behavioral/events/CreatingAListener.test.js.map +1 -1
- package/build/__tests__/behavioral/events/CreatingAnEvent.test.js +287 -315
- package/build/__tests__/behavioral/events/CreatingAnEvent.test.js.map +1 -1
- package/build/__tests__/behavioral/events/EventWriter.test.js +64 -66
- package/build/__tests__/behavioral/events/EventWriter.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingEventsInSync.test.js +286 -316
- package/build/__tests__/behavioral/events/KeepingEventsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingEventsInSync2.test.js +398 -420
- package/build/__tests__/behavioral/events/KeepingEventsInSync2.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingListenersInSync.test.js +43 -49
- package/build/__tests__/behavioral/events/KeepingListenersInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/events/ListeningToAnEventYouCreate.test.js +55 -59
- package/build/__tests__/behavioral/events/ListeningToAnEventYouCreate.test.js.map +1 -1
- package/build/__tests__/behavioral/events/ListeningToCoreEvents.test.js +31 -35
- package/build/__tests__/behavioral/events/ListeningToCoreEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/events/RegisteringEventsOnBoot.test.js +98 -104
- package/build/__tests__/behavioral/events/RegisteringEventsOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/events/RegisteringGlobalEvents.test.js +123 -135
- package/build/__tests__/behavioral/events/RegisteringGlobalEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/events/SettingUpEvents.test.js +15 -17
- package/build/__tests__/behavioral/events/SettingUpEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.js +66 -72
- package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/events/SyncingEventsOnlyFromDependencies.test.js +76 -82
- package/build/__tests__/behavioral/events/SyncingEventsOnlyFromDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/node/CreatingANodeModule.test.js +49 -55
- package/build/__tests__/behavioral/node/CreatingANodeModule.test.js.map +1 -1
- package/build/__tests__/behavioral/onboard/StartingOnboarding.test.js +79 -85
- package/build/__tests__/behavioral/onboard/StartingOnboarding.test.js.map +1 -1
- package/build/__tests__/behavioral/organization/CreatingAnOrg.test.js +45 -49
- package/build/__tests__/behavioral/organization/CreatingAnOrg.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/CreatingPermissions.test.js +40 -46
- package/build/__tests__/behavioral/permissions/CreatingPermissions.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/PermissionPlugin.test.js +15 -19
- package/build/__tests__/behavioral/permissions/PermissionPlugin.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/PermissionStore.test.js +174 -198
- package/build/__tests__/behavioral/permissions/PermissionStore.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/PermissionWriter.test.js +23 -27
- package/build/__tests__/behavioral/permissions/PermissionWriter.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/SyncingPermissions.test.d.ts +1 -0
- package/build/__tests__/behavioral/permissions/SyncingPermissions.test.js +209 -208
- package/build/__tests__/behavioral/permissions/SyncingPermissions.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/support/AbstractPermissionsTest.js +34 -40
- 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 +153 -171
- package/build/__tests__/behavioral/person/LoggingInAsPerson.test.js.map +1 -1
- package/build/__tests__/behavioral/person/SeeWhoIsLoggedIn.test.js +40 -46
- package/build/__tests__/behavioral/person/SeeWhoIsLoggedIn.test.js.map +1 -1
- package/build/__tests__/behavioral/polish/SettingUpPolish.test.js +102 -116
- package/build/__tests__/behavioral/polish/SettingUpPolish.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/CreatingANewSchemaBuilder.test.js +227 -247
- package/build/__tests__/behavioral/schemas/CreatingANewSchemaBuilder.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/CreatingSchemasWithGenerics.test.js +27 -29
- package/build/__tests__/behavioral/schemas/CreatingSchemasWithGenerics.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.js +38 -42
- package/build/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.js +65 -73
- package/build/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.js +100 -110
- package/build/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/ImportingSchemaImports.test.js +25 -27
- package/build/__tests__/behavioral/schemas/ImportingSchemaImports.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/KeepingSchemasInSync.test.js +425 -465
- package/build/__tests__/behavioral/schemas/KeepingSchemasInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/SettingUpSchemas.test.js +49 -55
- package/build/__tests__/behavioral/schemas/SettingUpSchemas.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/SettingUpSchemasForModuleDistribution.test.js +435 -467
- package/build/__tests__/behavioral/schemas/SettingUpSchemasForModuleDistribution.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/SyncingBadSchemasProvidesHelpfulErrorMessages.test.js +19 -21
- package/build/__tests__/behavioral/schemas/SyncingBadSchemasProvidesHelpfulErrorMessages.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/UsingSchemasInCli.test.js +9 -11
- package/build/__tests__/behavioral/schemas/UsingSchemasInCli.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/BootingASkill.test.js +61 -67
- package/build/__tests__/behavioral/skill/BootingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/CreatingASkill.test.js +37 -41
- package/build/__tests__/behavioral/skill/CreatingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/InstallingASkillAtAnOrg.test.js +183 -199
- package/build/__tests__/behavioral/skill/InstallingASkillAtAnOrg.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/LoggingInAsASkill.test.js +153 -171
- package/build/__tests__/behavioral/skill/LoggingInAsASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/RebuildingASkill.test.js +37 -43
- package/build/__tests__/behavioral/skill/RebuildingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/RegisteringASkill.test.js +96 -104
- package/build/__tests__/behavioral/skill/RegisteringASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/SettingUpASkill.test.js +168 -184
- package/build/__tests__/behavioral/skill/SettingUpASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/stores/CreatingADataStore.test.js +169 -191
- package/build/__tests__/behavioral/stores/CreatingADataStore.test.js.map +1 -1
- package/build/__tests__/behavioral/stores/KeepingDataStoresInSync.test.js +105 -125
- package/build/__tests__/behavioral/stores/KeepingDataStoresInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/CreatingATest.test.js +208 -232
- package/build/__tests__/behavioral/tests/CreatingATest.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/RunningTests.test.js +75 -79
- package/build/__tests__/behavioral/tests/RunningTests.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js +293 -355
- package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/SettingUpASkillForTesting.test.js +65 -75
- package/build/__tests__/behavioral/tests/SettingUpASkillForTesting.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/SettingUpTests.test.js +29 -33
- package/build/__tests__/behavioral/tests/SettingUpTests.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/TestReporterSettingsRemembered.test.js +50 -54
- package/build/__tests__/behavioral/tests/TestReporterSettingsRemembered.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/TestingDataStores.test.js +87 -95
- package/build/__tests__/behavioral/tests/TestingDataStores.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies.test.js +57 -65
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies2.test.js +146 -156
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies2.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingANodeModule.test.js +79 -87
- package/build/__tests__/behavioral/upgrading/UpgradingANodeModule.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill.test.js +282 -302
- package/build/__tests__/behavioral/upgrading/UpgradingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill2.test.js +183 -197
- package/build/__tests__/behavioral/upgrading/UpgradingASkill2.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill3.test.js +214 -238
- package/build/__tests__/behavioral/upgrading/UpgradingASkill3.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill4.test.js +118 -126
- package/build/__tests__/behavioral/upgrading/UpgradingASkill4.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill5.test.js +138 -152
- package/build/__tests__/behavioral/upgrading/UpgradingASkill5.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingWithListeners.test.js +61 -69
- package/build/__tests__/behavioral/upgrading/UpgradingWithListeners.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingWithSandboxFeatureInstalled.test.js +90 -104
- package/build/__tests__/behavioral/upgrading/UpgradingWithSandboxFeatureInstalled.test.js.map +1 -1
- package/build/__tests__/behavioral/views/CreatingASkillView.test.js +194 -220
- package/build/__tests__/behavioral/views/CreatingASkillView.test.js.map +1 -1
- package/build/__tests__/behavioral/views/CreatingATheme.test.js +83 -97
- package/build/__tests__/behavioral/views/CreatingATheme.test.js.map +1 -1
- package/build/__tests__/behavioral/views/KeepingViewsInSync.test.js +64 -76
- package/build/__tests__/behavioral/views/KeepingViewsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/views/RegisteringSkillViewOnBoot.test.js +102 -114
- package/build/__tests__/behavioral/views/RegisteringSkillViewOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/views/SettingUpViews.test.js +33 -37
- package/build/__tests__/behavioral/views/SettingUpViews.test.js.map +1 -1
- package/build/__tests__/behavioral/views/TestingViewControllers.test.js +94 -106
- package/build/__tests__/behavioral/views/TestingViewControllers.test.js.map +1 -1
- package/build/__tests__/behavioral/views/WatchingSkillViews.test.js +32 -38
- package/build/__tests__/behavioral/views/WatchingSkillViews.test.js.map +1 -1
- package/build/__tests__/behavioral/watchers/WatchingForChanges.test.js +302 -336
- package/build/__tests__/behavioral/watchers/WatchingForChanges.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter.test.js +132 -136
- package/build/__tests__/implementation/ActionExecuter.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter2.test.js +270 -286
- package/build/__tests__/implementation/ActionExecuter2.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter3.test.js +64 -72
- package/build/__tests__/implementation/ActionExecuter3.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter4.test.js +41 -47
- package/build/__tests__/implementation/ActionExecuter4.test.js.map +1 -1
- package/build/__tests__/implementation/ArgParser.test.js +13 -17
- package/build/__tests__/implementation/ArgParser.test.js.map +1 -1
- package/build/__tests__/implementation/BuildService.test.js +25 -29
- package/build/__tests__/implementation/BuildService.test.js.map +1 -1
- package/build/__tests__/implementation/BulkImporting.test.js +116 -136
- package/build/__tests__/implementation/BulkImporting.test.js.map +1 -1
- package/build/__tests__/implementation/CachingImports.test.js +89 -99
- package/build/__tests__/implementation/CachingImports.test.js.map +1 -1
- package/build/__tests__/implementation/CommandOptionBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/CommanderCommandResultMapper.test.js +72 -90
- package/build/__tests__/implementation/CommanderCommandResultMapper.test.js.map +1 -1
- package/build/__tests__/implementation/DataStoreStore.test.js +127 -147
- package/build/__tests__/implementation/DataStoreStore.test.js.map +1 -1
- package/build/__tests__/implementation/DeletingOrphanedSchemaDefinitions.test.js +46 -52
- package/build/__tests__/implementation/DeletingOrphanedSchemaDefinitions.test.js.map +1 -1
- package/build/__tests__/implementation/EventContractCleanerUtil.test.js +27 -35
- package/build/__tests__/implementation/EventContractCleanerUtil.test.js.map +1 -1
- package/build/__tests__/implementation/EventStore.test.js +371 -399
- package/build/__tests__/implementation/EventStore.test.js.map +1 -1
- package/build/__tests__/implementation/EventTemplateItemBuilder.test.js +21 -27
- package/build/__tests__/implementation/EventTemplateItemBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/FeatureCommandAttacher.test.js +155 -173
- package/build/__tests__/implementation/FeatureCommandAttacher.test.js.map +1 -1
- package/build/__tests__/implementation/FeatureFixture.test.js +54 -62
- package/build/__tests__/implementation/FeatureFixture.test.js.map +1 -1
- package/build/__tests__/implementation/FeatureInstaller.test.js +69 -77
- package/build/__tests__/implementation/FeatureInstaller.test.js.map +1 -1
- package/build/__tests__/implementation/FeaturesUtil.test.js +7 -9
- package/build/__tests__/implementation/FeaturesUtil.test.js.map +1 -1
- package/build/__tests__/implementation/FieldTemplateItemBuilder.test.js +6 -8
- package/build/__tests__/implementation/FieldTemplateItemBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/GlobalEmitter.test.js +29 -33
- package/build/__tests__/implementation/GlobalEmitter.test.js.map +1 -1
- package/build/__tests__/implementation/Introspection.test.js.map +1 -1
- package/build/__tests__/implementation/JestJsonParser.test.js +9 -11
- package/build/__tests__/implementation/JestJsonParser.test.js.map +1 -1
- package/build/__tests__/implementation/LintService.test.js +32 -36
- package/build/__tests__/implementation/LintService.test.js.map +1 -1
- package/build/__tests__/implementation/ListenerStore.test.js.map +1 -1
- package/build/__tests__/implementation/OnboardingScriptLoader.test.js +72 -80
- package/build/__tests__/implementation/OnboardingScriptLoader.test.js.map +1 -1
- package/build/__tests__/implementation/OnboardingScriptPlayer.test.js +217 -243
- package/build/__tests__/implementation/OnboardingScriptPlayer.test.js.map +1 -1
- package/build/__tests__/implementation/OnboardingStore.test.js +19 -23
- package/build/__tests__/implementation/OnboardingStore.test.js.map +1 -1
- package/build/__tests__/implementation/OrganizationStore.test.js +114 -124
- package/build/__tests__/implementation/OrganizationStore.test.js.map +1 -1
- package/build/__tests__/implementation/ParentTestFinder.test.js +38 -44
- package/build/__tests__/implementation/ParentTestFinder.test.js.map +1 -1
- package/build/__tests__/implementation/PkgService.test.js +63 -75
- package/build/__tests__/implementation/PkgService.test.js.map +1 -1
- package/build/__tests__/implementation/SchemaStore.test.js +314 -346
- package/build/__tests__/implementation/SchemaStore.test.js.map +1 -1
- package/build/__tests__/implementation/SchemaTemplateItemBuilder.test.js +9 -11
- package/build/__tests__/implementation/SchemaTemplateItemBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/SchemaValueTypeWriter.test.js +128 -142
- package/build/__tests__/implementation/SchemaValueTypeWriter.test.js.map +1 -1
- package/build/__tests__/implementation/ServiceFactory.test.js +8 -10
- package/build/__tests__/implementation/ServiceFactory.test.js.map +1 -1
- package/build/__tests__/implementation/SettingUpANodeModule.test.js +59 -65
- package/build/__tests__/implementation/SettingUpANodeModule.test.js.map +1 -1
- package/build/__tests__/implementation/SkillStore.test.js +153 -169
- package/build/__tests__/implementation/SkillStore.test.js.map +1 -1
- package/build/__tests__/implementation/StoreFeature.test.js +49 -53
- package/build/__tests__/implementation/StoreFeature.test.js.map +1 -1
- package/build/__tests__/implementation/TestReporter.test.js +31 -39
- package/build/__tests__/implementation/TestReporter.test.js.map +1 -1
- package/build/__tests__/implementation/TestRunner.test.js +215 -233
- package/build/__tests__/implementation/TestRunner.test.js.map +1 -1
- package/build/__tests__/implementation/ValueTypeMapping.test.js +24 -28
- package/build/__tests__/implementation/ValueTypeMapping.test.js.map +1 -1
- package/build/__tests__/implementation/Widgets.test.js +34 -42
- package/build/__tests__/implementation/Widgets.test.js.map +1 -1
- package/build/__tests__/support/EventFaker.js +12 -14
- 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 +7 -9
- 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.d.ts +2 -0
- package/build/boot.js +162 -0
- package/build/boot.js.map +1 -0
- package/build/{cli.d.ts → cli/Cli.d.ts} +9 -33
- package/build/cli/Cli.js +528 -0
- package/build/cli/Cli.js.map +1 -0
- package/build/components/AbstractComponent.js.map +1 -1
- package/build/components/FormComponent.js +156 -160
- package/build/components/FormComponent.js.map +1 -1
- package/build/components/QuizComponent.js +124 -128
- package/build/components/QuizComponent.js.map +1 -1
- package/build/constants.js.map +1 -1
- package/build/errors/SpruceError.js +1 -1
- 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 +65 -71
- package/build/features/AbstractAction.js.map +1 -1
- package/build/features/AbstractFeature.js +54 -62
- package/build/features/AbstractFeature.js.map +1 -1
- package/build/features/ActionExecuter.js +206 -210
- package/build/features/ActionExecuter.js.map +1 -1
- package/build/features/ActionFactory.js.map +1 -1
- package/build/features/ActionQuestionAsker.js +304 -320
- package/build/features/ActionQuestionAsker.js.map +1 -1
- package/build/features/FeatureCommandAttacher.js +45 -49
- package/build/features/FeatureCommandAttacher.js.map +1 -1
- package/build/features/FeatureInstaller.js +353 -375
- package/build/features/FeatureInstaller.js.map +1 -1
- package/build/features/FeatureInstallerFactory.js.map +1 -1
- package/build/features/OverrideActionDecorator.js +13 -15
- package/build/features/OverrideActionDecorator.js.map +1 -1
- package/build/features/cache/CacheFeature.js +6 -8
- package/build/features/cache/CacheFeature.js.map +1 -1
- package/build/features/cache/actions/DisableAction.js +42 -44
- package/build/features/cache/actions/DisableAction.js.map +1 -1
- package/build/features/cache/actions/EnableAction.js +37 -39
- 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 +40 -46
- package/build/features/conversation/ConversationFeature.js.map +1 -1
- package/build/features/conversation/actions/CreateAction.js +16 -18
- package/build/features/conversation/actions/CreateAction.js.map +1 -1
- package/build/features/conversation/actions/TestAction.js +96 -102
- package/build/features/conversation/actions/TestAction.js.map +1 -1
- package/build/features/conversation/stores/ConversationStore.js +19 -21
- package/build/features/conversation/stores/ConversationStore.js.map +1 -1
- package/build/features/conversation/writers/ConversationWriter.js +22 -24
- package/build/features/conversation/writers/ConversationWriter.js.map +1 -1
- package/build/features/dependencies/DependencyFeature.js +6 -8
- package/build/features/dependencies/DependencyFeature.js.map +1 -1
- package/build/features/dependencies/actions/AddAction.js +64 -66
- package/build/features/dependencies/actions/AddAction.js.map +1 -1
- package/build/features/dependencies/actions/ManageAction.js +63 -65
- package/build/features/dependencies/actions/ManageAction.js.map +1 -1
- package/build/features/deploy/DeployFeature.js +12 -14
- package/build/features/deploy/DeployFeature.js.map +1 -1
- package/build/features/deploy/actions/HerokuAction.js +389 -409
- package/build/features/deploy/actions/HerokuAction.js.map +1 -1
- package/build/features/deploy/writers/DeployWriter.js.map +1 -1
- package/build/features/error/ErrorFeature.js +84 -92
- package/build/features/error/ErrorFeature.js.map +1 -1
- package/build/features/error/ParentTestFinder.js +22 -24
- package/build/features/error/ParentTestFinder.js.map +1 -1
- package/build/features/error/actions/CreateAction.js +24 -26
- package/build/features/error/actions/CreateAction.js.map +1 -1
- package/build/features/error/actions/SyncAction.js +85 -91
- package/build/features/error/actions/SyncAction.js.map +1 -1
- package/build/features/error/writers/ErrorWriter.js +130 -140
- package/build/features/error/writers/ErrorWriter.js.map +1 -1
- package/build/features/event/EventFeature.js +153 -167
- package/build/features/event/EventFeature.js.map +1 -1
- package/build/features/event/actions/CreateAction.js +59 -61
- package/build/features/event/actions/CreateAction.js.map +1 -1
- package/build/features/event/actions/ListenAction.js +205 -219
- package/build/features/event/actions/ListenAction.js.map +1 -1
- package/build/features/event/actions/SetRemoteAction.js +11 -13
- package/build/features/event/actions/SetRemoteAction.js.map +1 -1
- package/build/features/event/actions/SyncAction.js +25 -27
- package/build/features/event/actions/SyncAction.js.map +1 -1
- package/build/features/event/actions/SyncListenersAction.js +23 -25
- package/build/features/event/actions/SyncListenersAction.js.map +1 -1
- package/build/features/event/builders/EventContractBuilder.js +136 -144
- package/build/features/event/builders/EventContractBuilder.js.map +1 -1
- package/build/features/event/builders/ListenerTemplateItemBuilder.js +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 +246 -258
- package/build/features/event/stores/EventStore.js.map +1 -1
- package/build/features/event/stores/ListenerStore.js +26 -28
- package/build/features/event/stores/ListenerStore.js.map +1 -1
- package/build/features/event/writers/EventWriter.js +171 -183
- package/build/features/event/writers/EventWriter.js.map +1 -1
- package/build/features/eventContract/EventContractFeature.js +6 -8
- package/build/features/eventContract/EventContractFeature.js.map +1 -1
- package/build/features/eventContract/actions/PullAction.js +58 -62
- package/build/features/eventContract/actions/PullAction.js.map +1 -1
- package/build/features/feature.utilities.js.map +1 -1
- package/build/features/log/LogFeature.js.map +1 -1
- package/build/features/log/actions/CreateTransportAction.js +16 -18
- package/build/features/log/actions/CreateTransportAction.js.map +1 -1
- package/build/features/log/writers/LogWriter.js +23 -25
- package/build/features/log/writers/LogWriter.js.map +1 -1
- package/build/features/node/NodeFeature.js +110 -122
- package/build/features/node/NodeFeature.js.map +1 -1
- package/build/features/node/actions/CreateAction.js +9 -11
- package/build/features/node/actions/CreateAction.js.map +1 -1
- package/build/features/node/actions/UpdateDependenciesAction.js +140 -113
- package/build/features/node/actions/UpdateDependenciesAction.js.map +1 -1
- package/build/features/node/actions/UpgradeAction.js +70 -76
- package/build/features/node/actions/UpgradeAction.js.map +1 -1
- package/build/features/node/writers/NodeWriter.js +29 -31
- package/build/features/node/writers/NodeWriter.js.map +1 -1
- package/build/features/onboard/OnboardFeature.js +77 -87
- package/build/features/onboard/OnboardFeature.js.map +1 -1
- package/build/features/onboard/ScriptLoader.js +31 -33
- package/build/features/onboard/ScriptLoader.js.map +1 -1
- package/build/features/onboard/ScriptPlayer.js +80 -86
- package/build/features/onboard/ScriptPlayer.js.map +1 -1
- package/build/features/onboard/actions/OnboardAction.js +36 -38
- package/build/features/onboard/actions/OnboardAction.js.map +1 -1
- package/build/features/onboard/scripts/onboarding.first.script.js +68 -80
- package/build/features/onboard/scripts/onboarding.first.script.js.map +1 -1
- package/build/features/onboard/scripts/onboarding.immersive.script.js +24 -28
- package/build/features/onboard/scripts/onboarding.immersive.script.js.map +1 -1
- package/build/features/onboard/scripts/onboarding.returning.script.js +42 -44
- package/build/features/onboard/scripts/onboarding.returning.script.js.map +1 -1
- package/build/features/onboard/scripts/onboarding.short.script.js +38 -48
- package/build/features/onboard/scripts/onboarding.short.script.js.map +1 -1
- package/build/features/onboard/scripts/todo/todo.create.skill.script.js +9 -11
- package/build/features/onboard/scripts/todo/todo.create.skill.script.js.map +1 -1
- package/build/features/onboard/scripts/todo/todo.test.script.js +7 -9
- package/build/features/onboard/scripts/todo/todo.test.script.js.map +1 -1
- package/build/features/onboard/scripts/wrongCommand.script.js +40 -42
- package/build/features/onboard/scripts/wrongCommand.script.js.map +1 -1
- package/build/features/onboard/stores/OnboardingStore.js.map +1 -1
- package/build/features/organization/OrganizationFeature.js.map +1 -1
- package/build/features/organization/actions/CreateAction.js +18 -20
- package/build/features/organization/actions/CreateAction.js.map +1 -1
- package/build/features/organization/actions/InstallAction.js +81 -83
- package/build/features/organization/actions/InstallAction.js.map +1 -1
- package/build/features/organization/stores/OrganizationStore.js +101 -111
- package/build/features/organization/stores/OrganizationStore.js.map +1 -1
- package/build/features/permission/PermissionFeature.js +73 -79
- package/build/features/permission/PermissionFeature.js.map +1 -1
- package/build/features/permission/actions/CreateAction.js +23 -25
- package/build/features/permission/actions/CreateAction.js.map +1 -1
- package/build/features/permission/actions/SyncAction.js +50 -54
- package/build/features/permission/actions/SyncAction.js.map +1 -1
- package/build/features/permission/stores/PermissionStore.js +100 -104
- package/build/features/permission/stores/PermissionStore.js.map +1 -1
- package/build/features/permission/writers/PermissionWriter.js +57 -63
- package/build/features/permission/writers/PermissionWriter.js.map +1 -1
- package/build/features/person/PersonFeature.js.map +1 -1
- package/build/features/person/actions/LoginAction.js +69 -71
- package/build/features/person/actions/LoginAction.js.map +1 -1
- package/build/features/person/actions/LogoutAction.js +21 -23
- package/build/features/person/actions/LogoutAction.js.map +1 -1
- package/build/features/person/actions/WhoamiAction.js +24 -26
- package/build/features/person/actions/WhoamiAction.js.map +1 -1
- package/build/features/polish/PolishFeature.js.map +1 -1
- package/build/features/polish/actions/SetupAction.js +23 -25
- package/build/features/polish/actions/SetupAction.js.map +1 -1
- package/build/features/polish/writers/PolishWriter.js +16 -18
- package/build/features/polish/writers/PolishWriter.js.map +1 -1
- package/build/features/sandbox/SandboxFeature.js +20 -22
- package/build/features/sandbox/SandboxFeature.js.map +1 -1
- package/build/features/sandbox/actions/SetupAction.js +42 -44
- package/build/features/sandbox/actions/SetupAction.js.map +1 -1
- package/build/features/sandbox/writers/SandboxWriter.js +9 -11
- package/build/features/sandbox/writers/SandboxWriter.js.map +1 -1
- package/build/features/schema/SchemaFeature.js +82 -90
- package/build/features/schema/SchemaFeature.js.map +1 -1
- package/build/features/schema/ValueTypeBuilder.js +26 -28
- package/build/features/schema/ValueTypeBuilder.js.map +1 -1
- package/build/features/schema/actions/CreateAction.js +48 -50
- package/build/features/schema/actions/CreateAction.js.map +1 -1
- package/build/features/schema/actions/SyncAction.js +260 -270
- package/build/features/schema/actions/SyncAction.js.map +1 -1
- package/build/features/schema/actions/SyncFieldsAction.js +42 -44
- package/build/features/schema/actions/SyncFieldsAction.js.map +1 -1
- package/build/features/schema/services/SchemaService.js +24 -26
- package/build/features/schema/services/SchemaService.js.map +1 -1
- package/build/features/schema/stores/SchemaStore.js +205 -219
- 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 +15 -17
- package/build/features/schema/utilities/schemaDisk.utility.js.map +1 -1
- package/build/features/schema/utilities/schemaGenerator.utility.js +40 -42
- package/build/features/schema/utilities/schemaGenerator.utility.js.map +1 -1
- package/build/features/schema/writers/SchemaWriter.js +173 -185
- package/build/features/schema/writers/SchemaWriter.js.map +1 -1
- package/build/features/skill/SkillFeature.js +99 -112
- package/build/features/skill/SkillFeature.js.map +1 -1
- package/build/features/skill/actions/BootAction.js +92 -96
- package/build/features/skill/actions/BootAction.js.map +1 -1
- package/build/features/skill/actions/CreateAction.js +9 -11
- package/build/features/skill/actions/CreateAction.js.map +1 -1
- package/build/features/skill/actions/DashboardAction.js +8 -10
- package/build/features/skill/actions/DashboardAction.js.map +1 -1
- package/build/features/skill/actions/LoginAction.js +122 -124
- package/build/features/skill/actions/LoginAction.js.map +1 -1
- package/build/features/skill/actions/RebuildAction.js +33 -35
- package/build/features/skill/actions/RebuildAction.js.map +1 -1
- package/build/features/skill/actions/RegisterAction.js +38 -40
- package/build/features/skill/actions/RegisterAction.js.map +1 -1
- package/build/features/skill/stores/SkillStore.d.ts +2 -2
- package/build/features/skill/stores/SkillStore.js +198 -216
- package/build/features/skill/stores/SkillStore.js.map +1 -1
- package/build/features/skill/updaters/Updater.js +38 -40
- package/build/features/skill/updaters/Updater.js.map +1 -1
- package/build/features/skill/writers/SkillWriter.js +15 -17
- package/build/features/skill/writers/SkillWriter.js.map +1 -1
- package/build/features/store/StoreFeature.js +50 -56
- package/build/features/store/StoreFeature.js.map +1 -1
- package/build/features/store/actions/CreateAction.js +29 -31
- package/build/features/store/actions/CreateAction.js.map +1 -1
- package/build/features/store/actions/SyncAction.js +35 -37
- package/build/features/store/actions/SyncAction.js.map +1 -1
- package/build/features/store/stores/StoreStore.js +39 -41
- package/build/features/store/stores/StoreStore.js.map +1 -1
- package/build/features/store/templateItemBuilders/StoreTemplateItemBuilder.js +1 -1
- package/build/features/store/templateItemBuilders/StoreTemplateItemBuilder.js.map +1 -1
- package/build/features/store/writers/StoreWriter.js +65 -73
- package/build/features/store/writers/StoreWriter.js.map +1 -1
- package/build/features/test/TestFeature.js +98 -102
- package/build/features/test/TestFeature.js.map +1 -1
- package/build/features/test/TestLogItemGenerator.js.map +1 -1
- package/build/features/test/TestReporter.d.ts +19 -19
- package/build/features/test/TestReporter.js +74 -82
- package/build/features/test/TestReporter.js.map +1 -1
- package/build/features/test/TestRunner.js +82 -88
- package/build/features/test/TestRunner.js.map +1 -1
- package/build/features/test/actions/CreateAction.js +145 -153
- package/build/features/test/actions/CreateAction.js.map +1 -1
- package/build/features/test/actions/SetupAction.js +37 -39
- package/build/features/test/actions/SetupAction.js.map +1 -1
- package/build/features/test/actions/TestAction.js +203 -213
- package/build/features/test/actions/TestAction.js.map +1 -1
- package/build/features/test/test.types.d.ts +1 -1
- package/build/features/test/test.types.js.map +1 -1
- package/build/features/test/writers/TestWriter.js +17 -19
- 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 +52 -58
- package/build/features/view/ViewFeature.js.map +1 -1
- package/build/features/view/actions/CreateAction.js +64 -66
- package/build/features/view/actions/CreateAction.js.map +1 -1
- package/build/features/view/actions/CreateThemeAction.js +35 -37
- package/build/features/view/actions/CreateThemeAction.js.map +1 -1
- package/build/features/view/actions/SyncAction.js +61 -63
- package/build/features/view/actions/SyncAction.js.map +1 -1
- package/build/features/view/actions/WatchAction.d.ts +1 -0
- package/build/features/view/actions/WatchAction.js +26 -27
- package/build/features/view/actions/WatchAction.js.map +1 -1
- package/build/features/view/stores/ViewStore.js +35 -37
- package/build/features/view/stores/ViewStore.js.map +1 -1
- package/build/features/view/writers/ViewWriter.js +47 -51
- package/build/features/view/writers/ViewWriter.js.map +1 -1
- package/build/features/vscode/VsCodeFeature.js +18 -20
- package/build/features/vscode/VsCodeFeature.js.map +1 -1
- package/build/features/vscode/actions/SetupAction.js +173 -183
- package/build/features/vscode/actions/SetupAction.js.map +1 -1
- package/build/features/vscode/services/VsCodeService.js +63 -69
- package/build/features/vscode/services/VsCodeService.js.map +1 -1
- package/build/features/vscode/writers/VsCodeWriter.js +12 -14
- package/build/features/vscode/writers/VsCodeWriter.js.map +1 -1
- package/build/features/watch/WatchFeature.js +77 -88
- package/build/features/watch/WatchFeature.js.map +1 -1
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/build/interfaces/SpyInterface.d.ts +1 -0
- package/build/interfaces/SpyInterface.js +139 -148
- package/build/interfaces/SpyInterface.js.map +1 -1
- package/build/interfaces/TerminalInterface.d.ts +1 -0
- package/build/interfaces/TerminalInterface.js +196 -207
- 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 +16 -18
- package/build/services/BuildService.js.map +1 -1
- package/build/services/CommandService.js +107 -109
- package/build/services/CommandService.js.map +1 -1
- package/build/services/DependencyService.js.map +1 -1
- package/build/services/GameService.js +49 -51
- package/build/services/GameService.js.map +1 -1
- package/build/services/ImportService.js +186 -194
- package/build/services/ImportService.js.map +1 -1
- package/build/services/LintService.js +81 -83
- package/build/services/LintService.js.map +1 -1
- package/build/services/PkgService.js +85 -89
- package/build/services/PkgService.js.map +1 -1
- package/build/services/ServiceFactory.js.map +1 -1
- package/build/services/TypeCheckerService.js +7 -9
- package/build/services/TypeCheckerService.js.map +1 -1
- package/build/stores/AbstractLocalStore.js.map +1 -1
- package/build/stores/AbstractStore.js +6 -8
- package/build/stores/AbstractStore.js.map +1 -1
- package/build/stores/StoreFactory.js.map +1 -1
- package/build/templateItemBuilders/EventTemplateItemBuilder.js +1 -1
- package/build/templateItemBuilders/EventTemplateItemBuilder.js.map +1 -1
- package/build/templateItemBuilders/FieldTemplateItemBuilder.js +1 -1
- package/build/templateItemBuilders/FieldTemplateItemBuilder.js.map +1 -1
- package/build/templateItemBuilders/SchemaTemplateItemBuilder.js +1 -1
- package/build/templateItemBuilders/SchemaTemplateItemBuilder.js.map +1 -1
- package/build/tests/AbstractCliTest.d.ts +2 -3
- package/build/tests/AbstractCliTest.js +236 -266
- package/build/tests/AbstractCliTest.js.map +1 -1
- package/build/tests/AbstractErrorTest.d.ts +1 -1
- package/build/tests/AbstractErrorTest.js +19 -21
- package/build/tests/AbstractErrorTest.js.map +1 -1
- package/build/tests/AbstractEventTest.d.ts +3 -3
- package/build/tests/AbstractEventTest.js +89 -97
- package/build/tests/AbstractEventTest.js.map +1 -1
- package/build/tests/AbstractSchemaTest.d.ts +3 -3
- package/build/tests/AbstractSchemaTest.js +92 -98
- package/build/tests/AbstractSchemaTest.js.map +1 -1
- package/build/tests/AbstractSkillTest.d.ts +1 -1
- package/build/tests/AbstractSkillTest.js +40 -46
- package/build/tests/AbstractSkillTest.js.map +1 -1
- package/build/tests/AbstractTestTest.d.ts +1 -1
- package/build/tests/AbstractTestTest.js +14 -16
- package/build/tests/AbstractTestTest.js.map +1 -1
- package/build/tests/CommandFaker.js.map +1 -1
- package/build/tests/JestJsonParser.js +5 -2
- package/build/tests/JestJsonParser.js.map +1 -1
- package/build/tests/MockProgramFactory.js +11 -15
- package/build/tests/MockProgramFactory.js.map +1 -1
- package/build/tests/buildTestCache.js +223 -243
- package/build/tests/buildTestCache.js.map +1 -1
- package/build/tests/cleanTestCache.js.map +1 -1
- package/build/tests/cleanTestData.js +70 -72
- package/build/tests/cleanTestData.js.map +1 -1
- package/build/tests/constants.js.map +1 -1
- package/build/tests/fixtures/FeatureFixture.d.ts +15 -16
- package/build/tests/fixtures/FeatureFixture.js +142 -154
- package/build/tests/fixtures/FeatureFixture.js.map +1 -1
- package/build/tests/fixtures/MercuryFixture.js +9 -11
- package/build/tests/fixtures/MercuryFixture.js.map +1 -1
- package/build/tests/fixtures/OrganizationFixture.js +62 -68
- package/build/tests/fixtures/OrganizationFixture.js.map +1 -1
- package/build/tests/fixtures/PersonFixture.js +69 -73
- package/build/tests/fixtures/PersonFixture.js.map +1 -1
- package/build/tests/fixtures/SkillFixture.js +123 -137
- package/build/tests/fixtures/SkillFixture.js.map +1 -1
- package/build/tests/fixtures/ViewFixture.js +13 -15
- 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 +31 -35
- package/build/tests/utilities/uiAssert.utility.js.map +1 -1
- package/build/types/cli.types.d.ts +26 -0
- package/build/types/cli.types.js.map +1 -1
- package/build/types/graphicsInterface.types.js.map +1 -1
- package/build/updaters/ScriptUpdater.js +78 -80
- 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 +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 +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 +3 -3
- 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.map +1 -1
- package/build/widgets/terminalKit/TkBaseWidget.js +8 -10
- package/build/widgets/terminalKit/TkBaseWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkInputWidget.js +16 -20
- package/build/widgets/terminalKit/TkInputWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkLayoutCellWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkLayoutWidget.js +6 -8
- package/build/widgets/terminalKit/TkLayoutWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkMenuBarWidget.js +1 -1
- package/build/widgets/terminalKit/TkMenuBarWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkPopupWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkProgressBarWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkTextWidget.js +13 -15
- package/build/widgets/terminalKit/TkTextWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkWindowWidget.js +39 -45
- package/build/widgets/terminalKit/TkWindowWidget.js.map +1 -1
- package/build/widgets/terminalKit/termKit.utility.js +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/menuBar.types.js.map +1 -1
- package/build/widgets/types/popup.types.js.map +1 -1
- package/build/widgets/types/text.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 +160 -166
- package/build/writers/AbstractWriter.js.map +1 -1
- package/build/writers/WriterFactory.js.map +1 -1
- package/junit.xml +7 -0
- package/node_modules/@typescript-eslint/parser/package.json +5 -5
- package/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js +1 -3
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js +2 -2
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/package.json +5 -5
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/generated/ast-spec.d.ts +62 -7
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/parser-options.d.ts +6 -2
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +62 -7
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js.map +1 -1
- package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts +6 -2
- package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/types/package.json +4 -4
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/clear-caches.d.ts +10 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/describeFilePath.d.ts +2 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/shared.d.ts +7 -1
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/index.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/ExpiringCache.d.ts +17 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/createParseSettings.d.ts +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/getProjectConfigFiles.d.ts +12 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/index.d.ts +6 -1
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/resolveProjectList.d.ts +19 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser-options.d.ts +22 -3
- package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts +10 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js +24 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js +38 -12
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js +5 -10
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts +2 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js +32 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js +2 -15
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts +7 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js +15 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/index.js +2 -4
- package/node_modules/@typescript-eslint/typescript-estree/dist/index.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts +17 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js +62 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js +22 -48
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts +12 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js +70 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts +6 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts +19 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js +103 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts +22 -3
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/package.json +4 -5
- package/node_modules/@typescript-eslint/visitor-keys/package.json +3 -3
- package/package.json +592 -597
- package/src/.DS_Store +0 -0
- package/src/__tests__/behavioral/BootingTheCli.test.ts +32 -2
- package/src/__tests__/behavioral/CreatingAConversationTopic.test.ts +1 -1
- package/src/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.ts +1 -1
- package/src/__tests__/behavioral/events/CreatingAnEvent.test.ts +1 -2
- package/src/__tests__/behavioral/permissions/SyncingPermissions.test.ts +11 -0
- package/src/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingASkill.test.ts +1 -2
- package/src/__tests__/implementation/TestRunner.test.ts +1 -1
- package/src/boot.ts +92 -0
- package/src/{cli.ts → cli/Cli.ts} +48 -150
- package/src/features/AbstractFeature.ts +1 -1
- package/src/features/FeatureInstaller.ts +3 -3
- package/src/features/error/ParentTestFinder.ts +1 -1
- package/src/features/event/builders/EventContractBuilder.ts +1 -1
- package/src/features/event/stores/EventStore.ts +4 -2
- package/src/features/event/stores/ListenerStore.ts +1 -1
- package/src/features/onboard/ScriptLoader.ts +1 -1
- package/src/features/permission/PermissionFeature.ts +3 -1
- package/src/features/permission/stores/PermissionStore.ts +1 -1
- package/src/features/schema/stores/SchemaStore.ts +1 -1
- package/src/features/schema/utilities/schemaGenerator.utility.ts +1 -1
- package/src/features/skill/SkillFeature.ts +1 -1
- package/src/features/store/stores/StoreStore.ts +1 -1
- package/src/features/test/TestReporter.ts +25 -25
- package/src/features/test/test.types.ts +8 -1
- package/src/features/view/actions/SyncAction.ts +1 -1
- package/src/features/view/actions/WatchAction.ts +8 -3
- package/src/index.ts +1 -1
- package/src/interfaces/SpyInterface.ts +2 -0
- package/src/interfaces/TerminalInterface.ts +5 -1
- package/src/tests/AbstractCliTest.ts +2 -3
- package/src/tests/AbstractSchemaTest.ts +1 -1
- package/src/tests/AbstractSkillTest.ts +1 -1
- package/src/tests/JestJsonParser.ts +4 -1
- package/src/tests/fixtures/FeatureFixture.ts +24 -20
- package/src/tests/fixtures/MercuryFixture.ts +1 -1
- package/src/types/cli.types.ts +30 -0
- package/yarn-error.log +12174 -0
- package/LICENSE +0 -21
- package/build/__tests__/behavioral/events/EverythingInstalledInstaller.d.ts +0 -17
- package/build/__tests__/behavioral/events/EverythingInstalledInstaller.js +0 -137
- package/build/__tests__/behavioral/events/EverythingInstalledInstaller.js.map +0 -1
- package/build/cli.js +0 -690
- package/build/cli.js.map +0 -1
- package/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/gitignore.js +0 -120
- package/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/index.d.ts +0 -186
- package/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/index.js +0 -181
- package/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/license +0 -9
- package/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/package.json +0 -82
- package/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/readme.md +0 -170
- package/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/stream-utils.js +0 -46
- package/src/__tests__/behavioral/events/EverythingInstalledInstaller.ts +0 -46
|
@@ -47,209 +47,207 @@ var ActionExecuter = /*#__PURE__*/function () {
|
|
|
47
47
|
var _errors$length, _yield$asker$installO, _ref, _yield$asker$askAbout, _yield$asker$askAbout2, _ref2;
|
|
48
48
|
var featureCode, actionCode, action, originalExecute, actionOptions, installer, isInstalled, willExecuteResults, _eventResponseUtil$ge, willExecutePayloads, errors, feature, asker, response, installOptions, answers, _yield$asker$installO2, ourFeatureResults, executeResults, didExecuteResults, _eventResponseUtil$ge2, payloads, didExecuteErrors;
|
|
49
49
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
50
|
-
while (1) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
_context.next = 7;
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
63
|
-
throw new _SpruceError["default"]({
|
|
64
|
-
code: 'FEATURE_NOT_INSTALLED',
|
|
65
|
-
featureCode: featureCode,
|
|
66
|
-
friendlyMessage: "You need to install the `".concat(featureCode, "` feature.")
|
|
67
|
-
});
|
|
68
|
-
case 7:
|
|
69
|
-
_context.next = 9;
|
|
70
|
-
return this.emitter.emit('feature.will-execute', {
|
|
71
|
-
featureCode: featureCode,
|
|
72
|
-
actionCode: actionCode,
|
|
73
|
-
options: actionOptions
|
|
74
|
-
});
|
|
75
|
-
case 9:
|
|
76
|
-
willExecuteResults = _context.sent;
|
|
77
|
-
_eventResponseUtil$ge = _spruceEventUtils.eventResponseUtil.getAllResponsePayloadsAndErrors(willExecuteResults, _SpruceError["default"]), willExecutePayloads = _eventResponseUtil$ge.payloads, errors = _eventResponseUtil$ge.errors;
|
|
78
|
-
if (!((_errors$length = errors === null || errors === void 0 ? void 0 : errors.length) !== null && _errors$length !== void 0 ? _errors$length : 0 > 0)) {
|
|
79
|
-
_context.next = 15;
|
|
80
|
-
break;
|
|
81
|
-
}
|
|
82
|
-
if (!this.shouldThrowOnListenerError) {
|
|
83
|
-
_context.next = 14;
|
|
84
|
-
break;
|
|
85
|
-
}
|
|
86
|
-
throw errors[0];
|
|
87
|
-
case 14:
|
|
88
|
-
return _context.abrupt("return", {
|
|
89
|
-
errors: errors
|
|
90
|
-
});
|
|
91
|
-
case 15:
|
|
92
|
-
_action["default"].assertNoErrorsInResponse(willExecuteResults);
|
|
93
|
-
feature = installer.getFeature(featureCode);
|
|
94
|
-
asker = new _ActionQuestionAsker["default"]({
|
|
95
|
-
featureInstaller: installer,
|
|
96
|
-
feature: feature,
|
|
97
|
-
actionCode: actionCode,
|
|
98
|
-
shouldAutoHandleDependencies: this.shouldAutoHandleDependencies,
|
|
99
|
-
ui: this.ui
|
|
100
|
-
});
|
|
101
|
-
_context.next = 20;
|
|
102
|
-
return asker.installOrMarkAsSkippedMissingDependencies();
|
|
103
|
-
case 20:
|
|
104
|
-
_context.t1 = _yield$asker$installO = _context.sent;
|
|
105
|
-
_context.t0 = _context.t1 !== null;
|
|
106
|
-
if (!_context.t0) {
|
|
107
|
-
_context.next = 24;
|
|
108
|
-
break;
|
|
109
|
-
}
|
|
110
|
-
_context.t0 = _yield$asker$installO !== void 0;
|
|
111
|
-
case 24:
|
|
112
|
-
if (!_context.t0) {
|
|
113
|
-
_context.next = 28;
|
|
114
|
-
break;
|
|
115
|
-
}
|
|
116
|
-
_context.t2 = _yield$asker$installO;
|
|
117
|
-
_context.next = 29;
|
|
50
|
+
while (1) switch (_context.prev = _context.next) {
|
|
51
|
+
case 0:
|
|
52
|
+
featureCode = options.featureCode, actionCode = options.actionCode, action = options.action, originalExecute = options.originalExecute, actionOptions = options.options;
|
|
53
|
+
installer = this.getFeatureInstaller();
|
|
54
|
+
_context.next = 4;
|
|
55
|
+
return installer.isInstalled(featureCode);
|
|
56
|
+
case 4:
|
|
57
|
+
isInstalled = _context.sent;
|
|
58
|
+
if (!(!isInstalled && !this.shouldAutoHandleDependencies)) {
|
|
59
|
+
_context.next = 7;
|
|
118
60
|
break;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
_context.t6 = _yield$asker$askAbout;
|
|
139
|
-
_context.next = 41;
|
|
61
|
+
}
|
|
62
|
+
throw new _SpruceError["default"]({
|
|
63
|
+
code: 'FEATURE_NOT_INSTALLED',
|
|
64
|
+
featureCode: featureCode,
|
|
65
|
+
friendlyMessage: "You need to install the `".concat(featureCode, "` feature.")
|
|
66
|
+
});
|
|
67
|
+
case 7:
|
|
68
|
+
_context.next = 9;
|
|
69
|
+
return this.emitter.emit('feature.will-execute', {
|
|
70
|
+
featureCode: featureCode,
|
|
71
|
+
actionCode: actionCode,
|
|
72
|
+
options: actionOptions
|
|
73
|
+
});
|
|
74
|
+
case 9:
|
|
75
|
+
willExecuteResults = _context.sent;
|
|
76
|
+
_eventResponseUtil$ge = _spruceEventUtils.eventResponseUtil.getAllResponsePayloadsAndErrors(willExecuteResults, _SpruceError["default"]), willExecutePayloads = _eventResponseUtil$ge.payloads, errors = _eventResponseUtil$ge.errors;
|
|
77
|
+
if (!((_errors$length = errors === null || errors === void 0 ? void 0 : errors.length) !== null && _errors$length !== void 0 ? _errors$length : 0 > 0)) {
|
|
78
|
+
_context.next = 15;
|
|
140
79
|
break;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
_context.t7 = _ref = _context.t6;
|
|
145
|
-
_context.t3 = _context.t7 !== null;
|
|
146
|
-
if (!_context.t3) {
|
|
147
|
-
_context.next = 45;
|
|
148
|
-
break;
|
|
149
|
-
}
|
|
150
|
-
_context.t3 = _ref !== void 0;
|
|
151
|
-
case 45:
|
|
152
|
-
if (!_context.t3) {
|
|
153
|
-
_context.next = 49;
|
|
154
|
-
break;
|
|
155
|
-
}
|
|
156
|
-
_context.t8 = _ref;
|
|
157
|
-
_context.next = 50;
|
|
80
|
+
}
|
|
81
|
+
if (!this.shouldThrowOnListenerError) {
|
|
82
|
+
_context.next = 14;
|
|
158
83
|
break;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
84
|
+
}
|
|
85
|
+
throw errors[0];
|
|
86
|
+
case 14:
|
|
87
|
+
return _context.abrupt("return", {
|
|
88
|
+
errors: errors
|
|
89
|
+
});
|
|
90
|
+
case 15:
|
|
91
|
+
_action["default"].assertNoErrorsInResponse(willExecuteResults);
|
|
92
|
+
feature = installer.getFeature(featureCode);
|
|
93
|
+
asker = new _ActionQuestionAsker["default"]({
|
|
94
|
+
featureInstaller: installer,
|
|
95
|
+
feature: feature,
|
|
96
|
+
actionCode: actionCode,
|
|
97
|
+
shouldAutoHandleDependencies: this.shouldAutoHandleDependencies,
|
|
98
|
+
ui: this.ui
|
|
99
|
+
});
|
|
100
|
+
_context.next = 20;
|
|
101
|
+
return asker.installOrMarkAsSkippedMissingDependencies();
|
|
102
|
+
case 20:
|
|
103
|
+
_context.t1 = _yield$asker$installO = _context.sent;
|
|
104
|
+
_context.t0 = _context.t1 !== null;
|
|
105
|
+
if (!_context.t0) {
|
|
106
|
+
_context.next = 24;
|
|
180
107
|
break;
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
_context.next = 77;
|
|
187
|
-
break;
|
|
188
|
-
}
|
|
189
|
-
_context.next = 66;
|
|
190
|
-
return asker.installOurFeature(installOptions);
|
|
191
|
-
case 66:
|
|
192
|
-
_context.t13 = _yield$asker$installO2 = _context.sent;
|
|
193
|
-
_context.t12 = _context.t13 !== null;
|
|
194
|
-
if (!_context.t12) {
|
|
195
|
-
_context.next = 70;
|
|
196
|
-
break;
|
|
197
|
-
}
|
|
198
|
-
_context.t12 = _yield$asker$installO2 !== void 0;
|
|
199
|
-
case 70:
|
|
200
|
-
if (!_context.t12) {
|
|
201
|
-
_context.next = 74;
|
|
202
|
-
break;
|
|
203
|
-
}
|
|
204
|
-
_context.t14 = _yield$asker$installO2;
|
|
205
|
-
_context.next = 75;
|
|
108
|
+
}
|
|
109
|
+
_context.t0 = _yield$asker$installO !== void 0;
|
|
110
|
+
case 24:
|
|
111
|
+
if (!_context.t0) {
|
|
112
|
+
_context.next = 28;
|
|
206
113
|
break;
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
114
|
+
}
|
|
115
|
+
_context.t2 = _yield$asker$installO;
|
|
116
|
+
_context.next = 29;
|
|
117
|
+
break;
|
|
118
|
+
case 28:
|
|
119
|
+
_context.t2 = {};
|
|
120
|
+
case 29:
|
|
121
|
+
response = _context.t2;
|
|
122
|
+
_context.next = 32;
|
|
123
|
+
return asker.askAboutMissingFeatureOptionsIfFeatureIsNotInstalled(isInstalled, actionOptions);
|
|
124
|
+
case 32:
|
|
125
|
+
_context.t5 = _yield$asker$askAbout = _context.sent;
|
|
126
|
+
_context.t4 = _context.t5 !== null;
|
|
127
|
+
if (!_context.t4) {
|
|
128
|
+
_context.next = 36;
|
|
220
129
|
break;
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
130
|
+
}
|
|
131
|
+
_context.t4 = _yield$asker$askAbout !== void 0;
|
|
132
|
+
case 36:
|
|
133
|
+
if (!_context.t4) {
|
|
134
|
+
_context.next = 40;
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
_context.t6 = _yield$asker$askAbout;
|
|
138
|
+
_context.next = 41;
|
|
139
|
+
break;
|
|
140
|
+
case 40:
|
|
141
|
+
_context.t6 = actionOptions;
|
|
142
|
+
case 41:
|
|
143
|
+
_context.t7 = _ref = _context.t6;
|
|
144
|
+
_context.t3 = _context.t7 !== null;
|
|
145
|
+
if (!_context.t3) {
|
|
146
|
+
_context.next = 45;
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
_context.t3 = _ref !== void 0;
|
|
150
|
+
case 45:
|
|
151
|
+
if (!_context.t3) {
|
|
152
|
+
_context.next = 49;
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
_context.t8 = _ref;
|
|
156
|
+
_context.next = 50;
|
|
157
|
+
break;
|
|
158
|
+
case 49:
|
|
159
|
+
_context.t8 = {};
|
|
160
|
+
case 50:
|
|
161
|
+
installOptions = _context.t8;
|
|
162
|
+
_context.next = 53;
|
|
163
|
+
return asker.askAboutMissingActionOptions(action, installOptions);
|
|
164
|
+
case 53:
|
|
165
|
+
_context.t10 = _yield$asker$askAbout2 = _context.sent;
|
|
166
|
+
_context.t9 = _context.t10 !== null;
|
|
167
|
+
if (!_context.t9) {
|
|
168
|
+
_context.next = 57;
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
_context.t9 = _yield$asker$askAbout2 !== void 0;
|
|
172
|
+
case 57:
|
|
173
|
+
if (!_context.t9) {
|
|
174
|
+
_context.next = 61;
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
_context.t11 = _yield$asker$askAbout2;
|
|
178
|
+
_context.next = 62;
|
|
179
|
+
break;
|
|
180
|
+
case 61:
|
|
181
|
+
_context.t11 = installOptions;
|
|
182
|
+
case 62:
|
|
183
|
+
answers = _context.t11;
|
|
184
|
+
if (isInstalled) {
|
|
185
|
+
_context.next = 77;
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
_context.next = 66;
|
|
189
|
+
return asker.installOurFeature(installOptions);
|
|
190
|
+
case 66:
|
|
191
|
+
_context.t13 = _yield$asker$installO2 = _context.sent;
|
|
192
|
+
_context.t12 = _context.t13 !== null;
|
|
193
|
+
if (!_context.t12) {
|
|
194
|
+
_context.next = 70;
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
_context.t12 = _yield$asker$installO2 !== void 0;
|
|
198
|
+
case 70:
|
|
199
|
+
if (!_context.t12) {
|
|
200
|
+
_context.next = 74;
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
_context.t14 = _yield$asker$installO2;
|
|
204
|
+
_context.next = 75;
|
|
205
|
+
break;
|
|
206
|
+
case 74:
|
|
207
|
+
_context.t14 = {};
|
|
208
|
+
case 75:
|
|
209
|
+
ourFeatureResults = _context.t14;
|
|
210
|
+
response = (0, _merge["default"])(response, ourFeatureResults);
|
|
211
|
+
case 77:
|
|
212
|
+
executeResults = {};
|
|
213
|
+
_context.prev = 78;
|
|
214
|
+
_context.next = 81;
|
|
215
|
+
return originalExecute(_objectSpread({}, answers));
|
|
216
|
+
case 81:
|
|
217
|
+
executeResults = _context.sent;
|
|
218
|
+
_context.next = 87;
|
|
219
|
+
break;
|
|
220
|
+
case 84:
|
|
221
|
+
_context.prev = 84;
|
|
222
|
+
_context.t15 = _context["catch"](78);
|
|
223
|
+
executeResults.errors = [_context.t15];
|
|
224
|
+
case 87:
|
|
225
|
+
response = (0, _merge["default"])(response, executeResults);
|
|
226
|
+
_context.next = 90;
|
|
227
|
+
return this.emitter.emit('feature.did-execute', {
|
|
228
|
+
results: response,
|
|
229
|
+
featureCode: featureCode,
|
|
230
|
+
actionCode: actionCode
|
|
231
|
+
});
|
|
232
|
+
case 90:
|
|
233
|
+
didExecuteResults = _context.sent;
|
|
234
|
+
_eventResponseUtil$ge2 = _spruceEventUtils.eventResponseUtil.getAllResponsePayloadsAndErrors(didExecuteResults, _SpruceError["default"]), payloads = _eventResponseUtil$ge2.payloads, didExecuteErrors = _eventResponseUtil$ge2.errors;
|
|
235
|
+
if (!((_ref2 = this.shouldThrowOnListenerError && (didExecuteErrors === null || didExecuteErrors === void 0 ? void 0 : didExecuteErrors.length)) !== null && _ref2 !== void 0 ? _ref2 : 0 > 0)) {
|
|
236
|
+
_context.next = 94;
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
throw didExecuteErrors[0];
|
|
240
|
+
case 94:
|
|
241
|
+
response = _action["default"].mergeActionResults.apply(_action["default"], [response].concat((0, _toConsumableArray2["default"])(willExecutePayloads), (0, _toConsumableArray2["default"])(payloads)));
|
|
242
|
+
if (didExecuteErrors) {
|
|
243
|
+
response = _action["default"].mergeActionResults(response, {
|
|
244
|
+
errors: didExecuteErrors
|
|
232
245
|
});
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
break;
|
|
239
|
-
}
|
|
240
|
-
throw didExecuteErrors[0];
|
|
241
|
-
case 94:
|
|
242
|
-
response = _action["default"].mergeActionResults.apply(_action["default"], [response].concat((0, _toConsumableArray2["default"])(willExecutePayloads), (0, _toConsumableArray2["default"])(payloads)));
|
|
243
|
-
if (didExecuteErrors) {
|
|
244
|
-
response = _action["default"].mergeActionResults(response, {
|
|
245
|
-
errors: didExecuteErrors
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
return _context.abrupt("return", response);
|
|
249
|
-
case 97:
|
|
250
|
-
case "end":
|
|
251
|
-
return _context.stop();
|
|
252
|
-
}
|
|
246
|
+
}
|
|
247
|
+
return _context.abrupt("return", response);
|
|
248
|
+
case 97:
|
|
249
|
+
case "end":
|
|
250
|
+
return _context.stop();
|
|
253
251
|
}
|
|
254
252
|
}, _callee, this, [[78, 84]]);
|
|
255
253
|
}));
|
|
@@ -273,20 +271,18 @@ var ActionExecuter = /*#__PURE__*/function () {
|
|
|
273
271
|
action.execute = /*#__PURE__*/function () {
|
|
274
272
|
var _ref3 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(options) {
|
|
275
273
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
276
|
-
while (1) {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
return _context2.stop();
|
|
289
|
-
}
|
|
274
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
275
|
+
case 0:
|
|
276
|
+
return _context2.abrupt("return", _this.execute({
|
|
277
|
+
featureCode: featureCode,
|
|
278
|
+
actionCode: actionCode,
|
|
279
|
+
action: action,
|
|
280
|
+
originalExecute: originalExecute,
|
|
281
|
+
options: options
|
|
282
|
+
}));
|
|
283
|
+
case 1:
|
|
284
|
+
case "end":
|
|
285
|
+
return _context2.stop();
|
|
290
286
|
}
|
|
291
287
|
}, _callee2);
|
|
292
288
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionExecuter.js","names":["ActionExecuter","options","featureInstallerFactory","emitter","ui","actions","actionFactory","shouldAutoHandleDependencies","shouldThrowOnListenerError","featureCode","actionCode","action","originalExecute","actionOptions","installer","getFeatureInstaller","isInstalled","SpruceError","code","friendlyMessage","emit","willExecuteResults","eventResponseUtil","getAllResponsePayloadsAndErrors","willExecutePayloads","payloads","errors","length","actionUtil","assertNoErrorsInResponse","feature","getFeature","asker","ActionOptionAsker","featureInstaller","installOrMarkAsSkippedMissingDependencies","response","askAboutMissingFeatureOptionsIfFeatureIsNotInstalled","installOptions","askAboutMissingActionOptions","answers","installOurFeature","ourFeatureResults","merge","executeResults","results","didExecuteResults","didExecuteErrors","mergeActionResults","Action","actionExecuter","execute","bind"],"sources":["../../src/features/ActionExecuter.ts"],"sourcesContent":["import { eventResponseUtil } from '@sprucelabs/spruce-event-utils'\nimport merge from 'lodash/merge'\nimport SpruceError from '../errors/SpruceError'\nimport { GlobalEmitter } from '../GlobalEmitter'\nimport { GraphicsInterface } from '../types/cli.types'\nimport actionUtil from '../utilities/action.utility'\nimport ActionFactory from './ActionFactory'\nimport ActionOptionAsker from './ActionQuestionAsker'\nimport FeatureInstaller from './FeatureInstaller'\nimport {\n\tFeatureCode,\n\tFeatureInstallResponse,\n\tFeatureAction,\n\tFeatureActionResponse,\n} from './features.types'\n\nexport default class ActionExecuter {\n\tprivate emitter: GlobalEmitter\n\tprivate ui: GraphicsInterface\n\tprivate actions: ActionFactory\n\tprivate featureInstallerFactory: () => FeatureInstaller\n\tprivate shouldAutoHandleDependencies: boolean\n\tprivate shouldThrowOnListenerError: boolean\n\n\tpublic constructor(options: ActionExecuterOptions) {\n\t\tthis.featureInstallerFactory = options.featureInstallerFactory\n\t\tthis.emitter = options.emitter\n\t\tthis.ui = options.ui\n\t\tthis.actions = options.actionFactory\n\t\tthis.shouldAutoHandleDependencies =\n\t\t\toptions.shouldAutoHandleDependencies ?? true\n\n\t\tthis.shouldThrowOnListenerError = !!options.shouldThrowOnListenerError\n\t}\n\n\tprivate getFeatureInstaller() {\n\t\treturn this.featureInstallerFactory()\n\t}\n\n\tprivate async execute(options: {\n\t\tfeatureCode: FeatureCode\n\t\tactionCode: string\n\t\taction: any\n\t\toriginalExecute: any\n\t\toptions?: Record<string, any>\n\t}): Promise<FeatureInstallResponse & FeatureActionResponse> {\n\t\tconst {\n\t\t\tfeatureCode,\n\t\t\tactionCode,\n\t\t\taction,\n\t\t\toriginalExecute,\n\t\t\toptions: actionOptions,\n\t\t} = options\n\n\t\tconst installer = this.getFeatureInstaller()\n\t\tconst isInstalled = await installer.isInstalled(featureCode)\n\n\t\tif (!isInstalled && !this.shouldAutoHandleDependencies) {\n\t\t\tthrow new SpruceError({\n\t\t\t\tcode: 'FEATURE_NOT_INSTALLED',\n\t\t\t\tfeatureCode,\n\t\t\t\tfriendlyMessage: `You need to install the \\`${featureCode}\\` feature.`,\n\t\t\t})\n\t\t}\n\n\t\tconst willExecuteResults = await this.emitter.emit('feature.will-execute', {\n\t\t\tfeatureCode,\n\t\t\tactionCode,\n\t\t\toptions: actionOptions,\n\t\t})\n\n\t\tconst { payloads: willExecutePayloads, errors } =\n\t\t\teventResponseUtil.getAllResponsePayloadsAndErrors(\n\t\t\t\twillExecuteResults,\n\t\t\t\tSpruceError\n\t\t\t)\n\n\t\tif (errors?.length ?? 0 > 0) {\n\t\t\tif (this.shouldThrowOnListenerError) {\n\t\t\t\t//@ts-ignore\n\t\t\t\tthrow errors[0]\n\t\t\t}\n\t\t\treturn { errors }\n\t\t}\n\n\t\tactionUtil.assertNoErrorsInResponse(willExecuteResults)\n\n\t\tconst feature = installer.getFeature(featureCode)\n\n\t\tconst asker = new ActionOptionAsker({\n\t\t\tfeatureInstaller: installer,\n\t\t\tfeature,\n\t\t\tactionCode,\n\t\t\tshouldAutoHandleDependencies: this.shouldAutoHandleDependencies,\n\t\t\tui: this.ui,\n\t\t})\n\n\t\tlet response =\n\t\t\t(await asker.installOrMarkAsSkippedMissingDependencies()) ?? {}\n\n\t\tconst installOptions =\n\t\t\t(await asker.askAboutMissingFeatureOptionsIfFeatureIsNotInstalled(\n\t\t\t\tisInstalled,\n\t\t\t\tactionOptions\n\t\t\t)) ??\n\t\t\tactionOptions ??\n\t\t\t{}\n\n\t\tlet answers =\n\t\t\t(await asker.askAboutMissingActionOptions(action, installOptions)) ??\n\t\t\tinstallOptions\n\n\t\tif (!isInstalled) {\n\t\t\tconst ourFeatureResults =\n\t\t\t\t(await asker.installOurFeature(installOptions)) ?? {}\n\t\t\tresponse = merge(response, ourFeatureResults)\n\t\t}\n\n\t\tlet executeResults: FeatureActionResponse = {}\n\n\t\ttry {\n\t\t\texecuteResults = await originalExecute({\n\t\t\t\t...answers,\n\t\t\t})\n\t\t} catch (err: any) {\n\t\t\texecuteResults.errors = [err]\n\t\t}\n\n\t\tresponse = merge(response, executeResults)\n\n\t\tconst didExecuteResults = await this.emitter.emit('feature.did-execute', {\n\t\t\tresults: response,\n\t\t\tfeatureCode,\n\t\t\tactionCode,\n\t\t})\n\n\t\tconst { payloads, errors: didExecuteErrors } =\n\t\t\teventResponseUtil.getAllResponsePayloadsAndErrors(\n\t\t\t\tdidExecuteResults,\n\t\t\t\tSpruceError\n\t\t\t)\n\n\t\tif (\n\t\t\t(this.shouldThrowOnListenerError && didExecuteErrors?.length) ??\n\t\t\t0 > 0\n\t\t) {\n\t\t\t//@ts-ignore\n\t\t\tthrow didExecuteErrors[0]\n\t\t}\n\n\t\tresponse = actionUtil.mergeActionResults(\n\t\t\tresponse,\n\t\t\t...willExecutePayloads,\n\t\t\t...payloads\n\t\t)\n\n\t\tif (didExecuteErrors) {\n\t\t\tresponse = actionUtil.mergeActionResults(response, {\n\t\t\t\terrors: didExecuteErrors,\n\t\t\t})\n\t\t}\n\n\t\treturn response\n\t}\n\n\tpublic Action<F extends FeatureCode>(\n\t\tfeatureCode: F,\n\t\tactionCode: string\n\t): FeatureAction {\n\t\tconst featureInstaller = this.getFeatureInstaller()\n\n\t\tconst action = this.actions.Action({\n\t\t\tfeatureCode,\n\t\t\tactionCode,\n\t\t\tactionExecuter: this,\n\t\t\tfeatureInstaller,\n\t\t})\n\n\t\tconst originalExecute = action.execute.bind(action)\n\n\t\taction.execute = async (options: any) => {\n\t\t\treturn this.execute({\n\t\t\t\tfeatureCode,\n\t\t\t\tactionCode,\n\t\t\t\taction,\n\t\t\t\toriginalExecute,\n\t\t\t\toptions,\n\t\t\t})\n\t\t}\n\n\t\treturn action as any\n\t}\n}\n\nexport interface ActionExecuterOptions {\n\tui: GraphicsInterface\n\temitter: GlobalEmitter\n\tactionFactory: ActionFactory\n\tfeatureInstallerFactory: () => FeatureInstaller\n\tshouldAutoHandleDependencies?: boolean\n\tshouldThrowOnListenerError?: boolean\n}\n"],"mappings":";;;;;;;;;;;;;AAAA;AACA;AACA;AAGA;AAEA;AAAqD;AAAA;AAAA,IAShCA,cAAc;EAQlC,wBAAmBC,OAA8B,EAAE;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAClD,IAAI,CAACC,uBAAuB,GAAGD,OAAO,CAACC,uBAAuB;IAC9D,IAAI,CAACC,OAAO,GAAGF,OAAO,CAACE,OAAO;IAC9B,IAAI,CAACC,EAAE,GAAGH,OAAO,CAACG,EAAE;IACpB,IAAI,CAACC,OAAO,GAAGJ,OAAO,CAACK,aAAa;IACpC,IAAI,CAACC,4BAA4B,4BAChCN,OAAO,CAACM,4BAA4B,yEAAI,IAAI;IAE7C,IAAI,CAACC,0BAA0B,GAAG,CAAC,CAACP,OAAO,CAACO,0BAA0B;EACvE;EAAC;IAAA;IAAA,OAED,+BAA8B;MAC7B,OAAO,IAAI,CAACN,uBAAuB,EAAE;IACtC;EAAC;IAAA;IAAA;MAAA,6FAED,iBAAsBD,OAMrB;QAAA;QAAA;QAAA;UAAA;YAAA;cAAA;gBAECQ,WAAW,GAKRR,OAAO,CAL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CAEMX,QAAQ;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,CACf;MAAA;QAAA;MAAA;MAAA;IAAA;EAAA;IAAA;IAAA,OAED,gBACC3B,WAAc,EACdC,UAAkB,EACF;MAAA;MAChB,IAAMwB,gBAAgB,GAAG,IAAI,CAACnB,mBAAmB,EAAE;MAEnD,IAAMJ,MAAM,GAAG,IAAI,CAACN,OAAO,CAAC4C,MAAM,CAAC;QAClCxC,WAAW,EAAXA,WAAW;QACXC,UAAU,EAAVA,UAAU;QACVwC,cAAc,EAAE,IAAI;QACpBhB,gBAAgB,EAAhBA;MACD,CAAC,CAAC;MAEF,IAAMtB,eAAe,GAAGD,MAAM,CAACwC,OAAO,CAACC,IAAI,CAACzC,MAAM,CAAC;MAEnDA,MAAM,CAACwC,OAAO;QAAA,0FAAG,kBAAOlD,OAAY;UAAA;YAAA;cAAA;gBAAA;kBAAA,kCAC5B,KAAI,CAACkD,OAAO,CAAC;oBACnB1C,WAAW,EAAXA,WAAW;oBACXC,UAAU,EAAVA,UAAU;oBACVC,MAAM,EAANA,MAAM;oBACNC,eAAe,EAAfA,eAAe;oBACfX,OAAO,EAAPA;kBACD,CAAC,CAAC;gBAAA;gBAAA;kBAAA;cAAA;YAAA;UAAA;QAAA,CACF;QAAA;UAAA;QAAA;MAAA;MAED,OAAOU,MAAM;IACd;EAAC;EAAA;AAAA;AAAA"}
|
|
1
|
+
{"version":3,"file":"ActionExecuter.js","names":["_spruceEventUtils","require","_merge","_interopRequireDefault","_SpruceError","_action","_ActionQuestionAsker","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","ActionExecuter","options","_options$shouldAutoHa","_classCallCheck2","featureInstallerFactory","emitter","ui","actions","actionFactory","shouldAutoHandleDependencies","shouldThrowOnListenerError","_createClass2","value","getFeatureInstaller","_execute","_asyncToGenerator2","_regenerator","mark","_callee","_errors$length","_yield$asker$installO","_ref","_yield$asker$askAbout","_yield$asker$askAbout2","_ref2","featureCode","actionCode","action","originalExecute","actionOptions","installer","isInstalled","willExecuteResults","_eventResponseUtil$ge","willExecutePayloads","errors","feature","asker","response","installOptions","answers","_yield$asker$installO2","ourFeatureResults","executeResults","didExecuteResults","_eventResponseUtil$ge2","payloads","didExecuteErrors","wrap","_callee$","_context","prev","next","sent","SpruceError","code","friendlyMessage","concat","emit","eventResponseUtil","getAllResponsePayloadsAndErrors","abrupt","actionUtil","assertNoErrorsInResponse","getFeature","ActionOptionAsker","featureInstaller","installOrMarkAsSkippedMissingDependencies","t1","t0","t2","askAboutMissingFeatureOptionsIfFeatureIsNotInstalled","t5","t4","t6","t7","t3","t8","askAboutMissingActionOptions","t10","t9","t11","installOurFeature","t13","t12","t14","merge","t15","results","mergeActionResults","_toConsumableArray2","stop","execute","_x","Action","_this","actionExecuter","bind","_ref3","_callee2","_callee2$","_context2","_x2","exports"],"sources":["../../src/features/ActionExecuter.ts"],"sourcesContent":["import { eventResponseUtil } from '@sprucelabs/spruce-event-utils'\nimport merge from 'lodash/merge'\nimport SpruceError from '../errors/SpruceError'\nimport { GlobalEmitter } from '../GlobalEmitter'\nimport { GraphicsInterface } from '../types/cli.types'\nimport actionUtil from '../utilities/action.utility'\nimport ActionFactory from './ActionFactory'\nimport ActionOptionAsker from './ActionQuestionAsker'\nimport FeatureInstaller from './FeatureInstaller'\nimport {\n\tFeatureCode,\n\tFeatureInstallResponse,\n\tFeatureAction,\n\tFeatureActionResponse,\n} from './features.types'\n\nexport default class ActionExecuter {\n\tprivate emitter: GlobalEmitter\n\tprivate ui: GraphicsInterface\n\tprivate actions: ActionFactory\n\tprivate featureInstallerFactory: () => FeatureInstaller\n\tprivate shouldAutoHandleDependencies: boolean\n\tprivate shouldThrowOnListenerError: boolean\n\n\tpublic constructor(options: ActionExecuterOptions) {\n\t\tthis.featureInstallerFactory = options.featureInstallerFactory\n\t\tthis.emitter = options.emitter\n\t\tthis.ui = options.ui\n\t\tthis.actions = options.actionFactory\n\t\tthis.shouldAutoHandleDependencies =\n\t\t\toptions.shouldAutoHandleDependencies ?? true\n\n\t\tthis.shouldThrowOnListenerError = !!options.shouldThrowOnListenerError\n\t}\n\n\tprivate getFeatureInstaller() {\n\t\treturn this.featureInstallerFactory()\n\t}\n\n\tprivate async execute(options: {\n\t\tfeatureCode: FeatureCode\n\t\tactionCode: string\n\t\taction: any\n\t\toriginalExecute: any\n\t\toptions?: Record<string, any>\n\t}): Promise<FeatureInstallResponse & FeatureActionResponse> {\n\t\tconst {\n\t\t\tfeatureCode,\n\t\t\tactionCode,\n\t\t\taction,\n\t\t\toriginalExecute,\n\t\t\toptions: actionOptions,\n\t\t} = options\n\n\t\tconst installer = this.getFeatureInstaller()\n\t\tconst isInstalled = await installer.isInstalled(featureCode)\n\n\t\tif (!isInstalled && !this.shouldAutoHandleDependencies) {\n\t\t\tthrow new SpruceError({\n\t\t\t\tcode: 'FEATURE_NOT_INSTALLED',\n\t\t\t\tfeatureCode,\n\t\t\t\tfriendlyMessage: `You need to install the \\`${featureCode}\\` feature.`,\n\t\t\t})\n\t\t}\n\n\t\tconst willExecuteResults = await this.emitter.emit('feature.will-execute', {\n\t\t\tfeatureCode,\n\t\t\tactionCode,\n\t\t\toptions: actionOptions,\n\t\t})\n\n\t\tconst { payloads: willExecutePayloads, errors } =\n\t\t\teventResponseUtil.getAllResponsePayloadsAndErrors(\n\t\t\t\twillExecuteResults,\n\t\t\t\tSpruceError\n\t\t\t)\n\n\t\tif (errors?.length ?? 0 > 0) {\n\t\t\tif (this.shouldThrowOnListenerError) {\n\t\t\t\t//@ts-ignore\n\t\t\t\tthrow errors[0]\n\t\t\t}\n\t\t\treturn { errors }\n\t\t}\n\n\t\tactionUtil.assertNoErrorsInResponse(willExecuteResults)\n\n\t\tconst feature = installer.getFeature(featureCode)\n\n\t\tconst asker = new ActionOptionAsker({\n\t\t\tfeatureInstaller: installer,\n\t\t\tfeature,\n\t\t\tactionCode,\n\t\t\tshouldAutoHandleDependencies: this.shouldAutoHandleDependencies,\n\t\t\tui: this.ui,\n\t\t})\n\n\t\tlet response =\n\t\t\t(await asker.installOrMarkAsSkippedMissingDependencies()) ?? {}\n\n\t\tconst installOptions =\n\t\t\t(await asker.askAboutMissingFeatureOptionsIfFeatureIsNotInstalled(\n\t\t\t\tisInstalled,\n\t\t\t\tactionOptions\n\t\t\t)) ??\n\t\t\tactionOptions ??\n\t\t\t{}\n\n\t\tlet answers =\n\t\t\t(await asker.askAboutMissingActionOptions(action, installOptions)) ??\n\t\t\tinstallOptions\n\n\t\tif (!isInstalled) {\n\t\t\tconst ourFeatureResults =\n\t\t\t\t(await asker.installOurFeature(installOptions)) ?? {}\n\t\t\tresponse = merge(response, ourFeatureResults)\n\t\t}\n\n\t\tlet executeResults: FeatureActionResponse = {}\n\n\t\ttry {\n\t\t\texecuteResults = await originalExecute({\n\t\t\t\t...answers,\n\t\t\t})\n\t\t} catch (err: any) {\n\t\t\texecuteResults.errors = [err]\n\t\t}\n\n\t\tresponse = merge(response, executeResults)\n\n\t\tconst didExecuteResults = await this.emitter.emit('feature.did-execute', {\n\t\t\tresults: response,\n\t\t\tfeatureCode,\n\t\t\tactionCode,\n\t\t})\n\n\t\tconst { payloads, errors: didExecuteErrors } =\n\t\t\teventResponseUtil.getAllResponsePayloadsAndErrors(\n\t\t\t\tdidExecuteResults,\n\t\t\t\tSpruceError\n\t\t\t)\n\n\t\tif (\n\t\t\t(this.shouldThrowOnListenerError && didExecuteErrors?.length) ??\n\t\t\t0 > 0\n\t\t) {\n\t\t\t//@ts-ignore\n\t\t\tthrow didExecuteErrors[0]\n\t\t}\n\n\t\tresponse = actionUtil.mergeActionResults(\n\t\t\tresponse,\n\t\t\t...willExecutePayloads,\n\t\t\t...payloads\n\t\t)\n\n\t\tif (didExecuteErrors) {\n\t\t\tresponse = actionUtil.mergeActionResults(response, {\n\t\t\t\terrors: didExecuteErrors,\n\t\t\t})\n\t\t}\n\n\t\treturn response\n\t}\n\n\tpublic Action<F extends FeatureCode>(\n\t\tfeatureCode: F,\n\t\tactionCode: string\n\t): FeatureAction {\n\t\tconst featureInstaller = this.getFeatureInstaller()\n\n\t\tconst action = this.actions.Action({\n\t\t\tfeatureCode,\n\t\t\tactionCode,\n\t\t\tactionExecuter: this,\n\t\t\tfeatureInstaller,\n\t\t})\n\n\t\tconst originalExecute = action.execute.bind(action)\n\n\t\taction.execute = async (options: any) => {\n\t\t\treturn this.execute({\n\t\t\t\tfeatureCode,\n\t\t\t\tactionCode,\n\t\t\t\taction,\n\t\t\t\toriginalExecute,\n\t\t\t\toptions,\n\t\t\t})\n\t\t}\n\n\t\treturn action as any\n\t}\n}\n\nexport interface ActionExecuterOptions {\n\tui: GraphicsInterface\n\temitter: GlobalEmitter\n\tactionFactory: ActionFactory\n\tfeatureInstallerFactory: () => FeatureInstaller\n\tshouldAutoHandleDependencies?: boolean\n\tshouldThrowOnListenerError?: boolean\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAD,sBAAA,CAAAF,OAAA;AAGA,IAAAI,OAAA,GAAAF,sBAAA,CAAAF,OAAA;AAEA,IAAAK,oBAAA,GAAAH,sBAAA,CAAAF,OAAA;AAAqD,SAAAM,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAAC,cAAA,KAAAI,OAAA,GAAAA,OAAA,CAAAC,MAAA,WAAAC,GAAA,WAAAJ,MAAA,CAAAK,wBAAA,CAAAR,MAAA,EAAAO,GAAA,EAAAE,UAAA,OAAAP,IAAA,CAAAQ,IAAA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I,CAACrD,mBAAmB,EAAE;MAEnD,IAAMc,MAAM,GAAG,IAAI,CAACpB,OAAO,CAACuF,MAAM,CAAC;QAClCrE,WAAW,EAAXA,WAAW;QACXC,UAAU,EAAVA,UAAU;QACVsE,cAAc,EAAE,IAAI;QACpB9B,gBAAgB,EAAhBA;MACD,CAAC,CAAC;MAEF,IAAMtC,eAAe,GAAGD,MAAM,CAACiE,OAAO,CAACK,IAAI,CAACtE,MAAM,CAAC;MAEnDA,MAAM,CAACiE,OAAO;QAAA,IAAAM,KAAA,OAAAnF,kBAAA,2BAAAC,YAAA,YAAAC,IAAA,CAAG,SAAAkF,SAAOlG,OAAY;UAAA,OAAAe,YAAA,YAAAgC,IAAA,UAAAoD,UAAAC,SAAA;YAAA,kBAAAA,SAAA,CAAAlD,IAAA,GAAAkD,SAAA,CAAAjD,IAAA;cAAA;gBAAA,OAAAiD,SAAA,CAAAxC,MAAA,WAC5BkC,KAAI,CAACH,OAAO,CAAC;kBACnBnE,WAAW,EAAXA,WAAW;kBACXC,UAAU,EAAVA,UAAU;kBACVC,MAAM,EAANA,MAAM;kBACNC,eAAe,EAAfA,eAAe;kBACf3B,OAAO,EAAPA;gBACD,CAAC,CAAC;cAAA;cAAA;gBAAA,OAAAoG,SAAA,CAAAV,IAAA;YAAA;UAAA,GAAAQ,QAAA;QAAA,CACF;QAAA,iBAAAG,GAAA;UAAA,OAAAJ,KAAA,CAAA/G,KAAA,OAAAI,SAAA;QAAA;MAAA;MAED,OAAOoC,MAAM;IACd;EAAC;EAAA,OAAA3B,cAAA;AAAA;AAAAuG,OAAA,cAAAvG,cAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionFactory.js","names":["ActionFactory","options","blockedCommands","optionOverrides","actionOptions","featureCode","actionCode","actionExecuter","featureInstaller","feature","getFeature","actionsDir","Error","
|
|
1
|
+
{"version":3,"file":"ActionFactory.js","names":["_spruceSkillUtils","require","_SpruceError","_interopRequireDefault","_OverrideActionDecorator","_excluded","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","ActionFactory","options","_classCallCheck2","blockedCommands","optionOverrides","actionOptions","_objectWithoutProperties2","_createClass2","value","Action","featureCode","actionCode","actionExecuter","featureInstaller","feature","getFeature","actionsDir","Error","concat","Class","originalError","overrideKey","overrides","classPath","diskUtil","resolvePath","namesUtil","toPascal","err","SpruceError","code","friendlyMessage","action","parent","execute","actionDecorator","OverrideActionDecorator","ui","setActionClass","ExecuteTrackingAction","clearActionOverrides","exports"],"sources":["../../src/features/ActionFactory.ts"],"sourcesContent":["import { Schema } from '@sprucelabs/schema'\nimport { namesUtil } from '@sprucelabs/spruce-skill-utils'\nimport { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport SpruceError from '../errors/SpruceError'\nimport {\n\tFeatureAction,\n\tActionOptions,\n\tFeatureCode,\n} from '../features/features.types'\nimport { GlobalEmitter } from '../GlobalEmitter'\nimport { BlockedCommands, OptionOverrides } from '../types/cli.types'\nimport AbstractAction from './AbstractAction'\nimport ActionExecuter from './ActionExecuter'\nimport FeatureInstaller from './FeatureInstaller'\nimport OverrideActionDecorator from './OverrideActionDecorator'\n\nexport default class ActionFactory {\n\tprivate actionOptions: FeatureActionFactoryOptions\n\tprivate blockedCommands?: BlockedCommands\n\tprivate optionOverrides?: OptionOverrides\n\tprivate static overrides: Record<string, ActionConstructor> = {}\n\n\tpublic constructor(options: FeatureActionFactoryOptions) {\n\t\tconst { blockedCommands, optionOverrides, ...actionOptions } = options\n\t\tthis.actionOptions = actionOptions\n\t\tthis.blockedCommands = blockedCommands\n\t\tthis.optionOverrides = optionOverrides\n\t}\n\n\tpublic Action<F extends FeatureCode, S extends Schema = Schema>(options: {\n\t\tfeatureCode: F\n\t\tactionCode: string\n\t\tactionExecuter: ActionExecuter\n\t\tfeatureInstaller: FeatureInstaller\n\t}): FeatureAction<S> {\n\t\tconst { featureCode, actionCode, actionExecuter, featureInstaller } =\n\t\t\toptions\n\n\t\tconst feature = featureInstaller.getFeature(featureCode)\n\n\t\tif (!feature.actionsDir) {\n\t\t\tthrow new Error(\n\t\t\t\t`Your ${featureCode} features needs \\`public actionsDir = diskUtil.resolvePath(__dirname, 'actions')\\``\n\t\t\t)\n\t\t}\n\n\t\tlet Class: new (options: ActionOptions) => AbstractAction | undefined\n\t\tlet originalError: Error | undefined\n\n\t\tconst key = ActionFactory.overrideKey(featureCode, actionCode)\n\t\tif (ActionFactory.overrides[key]) {\n\t\t\tClass = ActionFactory.overrides[key]\n\t\t} else {\n\t\t\tconst classPath = diskUtil.resolvePath(\n\t\t\t\tfeature.actionsDir,\n\t\t\t\t`${namesUtil.toPascal(actionCode)}Action`\n\t\t\t)\n\t\t\ttry {\n\t\t\t\tClass = require(classPath).default\n\t\t\t\t// eslint-disable-next-line no-empty\n\t\t\t} catch (err: any) {\n\t\t\t\toriginalError = err\n\t\t\t}\n\t\t}\n\n\t\t//@ts-ignore\n\t\tif (!Class) {\n\t\t\tthrow new SpruceError({\n\t\t\t\tcode: 'GENERIC',\n\t\t\t\tfriendlyMessage: `I could not find any action named '${actionCode}' for the ${feature.code} feature. Make sure it's the default export and extends AbstractAction.`,\n\t\t\t\toriginalError,\n\t\t\t})\n\t\t}\n\n\t\tconst action = new Class({\n\t\t\t...this.actionOptions,\n\t\t\tactionExecuter,\n\t\t\tparent: feature,\n\t\t\tfeatureInstaller,\n\t\t})\n\n\t\tif (!action) {\n\t\t\tthrow new SpruceError({\n\t\t\t\tcode: 'GENERIC',\n\t\t\t\tfriendlyMessage: `I could not instantiate ${actionCode} action on ${feature.code} feature.`,\n\t\t\t})\n\t\t}\n\n\t\tif (!action.execute) {\n\t\t\tthrow new SpruceError({\n\t\t\t\tcode: 'GENERIC',\n\t\t\t\tfriendlyMessage: `It looks like the ${feature.code} feature's '${actionCode}' action does not properly extend AbstractAction.`,\n\t\t\t})\n\t\t}\n\n\t\tconst actionDecorator = new OverrideActionDecorator({\n\t\t\taction,\n\t\t\tfeature,\n\t\t\tblockedCommands: this.blockedCommands,\n\t\t\toptionOverrides: this.optionOverrides,\n\t\t\tui: this.actionOptions.ui,\n\t\t\tactionCode,\n\t\t})\n\n\t\treturn actionDecorator as FeatureAction<S>\n\t}\n\n\tpublic static setActionClass(\n\t\tfeatureCode: FeatureCode,\n\t\taction: string,\n\t\tExecuteTrackingAction: ActionConstructor\n\t) {\n\t\tthis.overrides[ActionFactory.overrideKey(featureCode, action)] =\n\t\t\tExecuteTrackingAction\n\t}\n\n\tprivate static overrideKey(featureCode: string, action: string) {\n\t\treturn `${featureCode}${action}`\n\t}\n\n\tpublic static clearActionOverrides() {\n\t\tthis.overrides = {}\n\t}\n}\n\nexport interface FeatureActionFactoryOptions\n\textends Omit<\n\t\tActionOptions,\n\t\t'parent' | 'actionExecuter' | 'featureInstaller'\n\t> {\n\temitter: GlobalEmitter\n\tblockedCommands?: BlockedCommands\n\toptionOverrides?: OptionOverrides\n}\n\ntype ActionConstructor = new (options: ActionOptions) => AbstractAction\n"],"mappings":";;;;;;;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AAWA,IAAAG,wBAAA,GAAAD,sBAAA,CAAAF,OAAA;AAA+D,IAAAI,SAAA;AAAA,SAAAC,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAAC,cAAA,KAAAI,OAAA,GAAAA,OAAA,CAAAC,MAAA,WAAAC,GAAA,WAAAJ,MAAA,CAAAK,wBAAA,CAAAR,MAAA,EAAAO,GAAA,EAAAE,UAAA,OAAAP,IAAA,CAAAQ,IAAA,CAA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