@sprucelabs/spruce-cli 19.1.25 → 19.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/build/.spruce/errors/spruceCli/actionCancelled.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/actionCancelled.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/bootError.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/bootError.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/buildFailed.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/buildFailed.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/cacheNotEnabled.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/cacheNotEnabled.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/commandAborted.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/commandAborted.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/commandBlocked.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/commandBlocked.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/commandNotImplemented.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/commandNotImplemented.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/createAutoloaderFailed.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/createAutoloaderFailed.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/dependencyExists.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/dependencyExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/deployFailed.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/deployFailed.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/directoryEmpty.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/directoryEmpty.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/directoryNotSkill.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/directoryNotSkill.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/dockerNotStarted.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/dockerNotStarted.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/executingCommandFailed.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/executingCommandFailed.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/failedToImport.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/failedToImport.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/featureNotInstalled.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/featureNotInstalled.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/fileExists.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/fileExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/generic.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/generic.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/invalidCommand.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/invalidCommand.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/invalidEventContract.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/invalidEventContract.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/invalidFeatureCode.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/invalidFeatureCode.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/invalidTestDirectory.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/invalidTestDirectory.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/lintFailed.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/lintFailed.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/mercuryResponseError.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/mercuryResponseError.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/missingDependencies.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/missingDependencies.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/missingDependenciesDependency.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/missingDependenciesDependency.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/noOrganizationsFound.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/noOrganizationsFound.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/noSkillsRegistered.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/noSkillsRegistered.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/notImplemented.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/notImplemented.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/notLoggedIn.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/notLoggedIn.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/schemaExists.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/schemaExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/schemaFailedToImport.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/schemaFailedToImport.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/schemaTemplateItemBuildingFailed.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/schemaTemplateItemBuildingFailed.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/skillNotFound.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/skillNotFound.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/skillNotRegistered.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/skillNotRegistered.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/skillViewExists.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/skillViewExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/storeExists.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/storeExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/testFailed.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/testFailed.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/themeExists.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/themeExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/transportAlreadyExists.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/transportAlreadyExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/vscodeNotInstalled.schema.js +1 -2
- package/build/.spruce/errors/spruceCli/vscodeNotInstalled.schema.js.map +1 -1
- package/build/.spruce/events/events.contract.js +1 -2
- package/build/.spruce/events/events.contract.js.map +1 -1
- package/build/.spruce/events/heartwood/didRegisterSkillViews.v2021_02_11.contract.js +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- package/build/.spruce/events/spruceCli/registerSkillViews.v2021_04_11.contract.js.map +1 -1
- package/build/.spruce/schemas/fields/fieldClassMap.js +1 -2
- package/build/.spruce/schemas/fields/fieldClassMap.js.map +1 -1
- package/build/.spruce/schemas/heartwood/v2021_02_11/didRegisterSkillViewsEmitPayload.schema.js +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- package/build/.spruce/schemas/heartwood/v2021_02_11/upsertThemeResponsePayload.schema.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/actionResponse.schema.js +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- package/build/.spruce/schemas/spruceCli/v2020_07_22/watcherDidDetectChangesEmitPayload.schema.js.map +1 -1
- package/build/GlobalEmitter.js +2 -4
- package/build/GlobalEmitter.js.map +1 -1
- package/build/InFlightEntertainment.js +1 -2
- package/build/InFlightEntertainment.js.map +1 -1
- package/build/__tests__/behavioral/AddingADependency.test.js +57 -30
- package/build/__tests__/behavioral/AddingADependency.test.js.map +1 -1
- package/build/__tests__/behavioral/BlockingCommands.test.js +17 -10
- package/build/__tests__/behavioral/BlockingCommands.test.js.map +1 -1
- package/build/__tests__/behavioral/BootingTheCli.test.js +17 -10
- package/build/__tests__/behavioral/BootingTheCli.test.js.map +1 -1
- package/build/__tests__/behavioral/BootingWithBadFiles.test.js +25 -14
- package/build/__tests__/behavioral/BootingWithBadFiles.test.js.map +1 -1
- package/build/__tests__/behavioral/CreatingAConversationTopic.test.js +25 -14
- package/build/__tests__/behavioral/CreatingAConversationTopic.test.js.map +1 -1
- package/build/__tests__/behavioral/DeployingASkill.test.js +145 -74
- package/build/__tests__/behavioral/DeployingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/DeployingToSandbox.test.js +121 -62
- package/build/__tests__/behavioral/DeployingToSandbox.test.js.map +1 -1
- package/build/__tests__/behavioral/EnablingAndDisablingCache.test.js +65 -34
- package/build/__tests__/behavioral/EnablingAndDisablingCache.test.js.map +1 -1
- package/build/__tests__/behavioral/GettingCliVersion.test.js +25 -14
- package/build/__tests__/behavioral/GettingCliVersion.test.js.map +1 -1
- package/build/__tests__/behavioral/ManagingDependencies.test.js +41 -22
- package/build/__tests__/behavioral/ManagingDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/OverridingCommandsInPackageJson.test.js +17 -10
- package/build/__tests__/behavioral/OverridingCommandsInPackageJson.test.js.map +1 -1
- package/build/__tests__/behavioral/RegisteringConversationsOnBoot.test.js +18 -11
- package/build/__tests__/behavioral/RegisteringConversationsOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/RememberingUpgradeSelections.test.js +33 -18
- package/build/__tests__/behavioral/RememberingUpgradeSelections.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingLogTransportsInASkill.test.js +57 -30
- package/build/__tests__/behavioral/SettingLogTransportsInASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingRemote.test.js +41 -22
- package/build/__tests__/behavioral/SettingRemote.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingUpVscode.test.js +17 -10
- package/build/__tests__/behavioral/SettingUpVscode.test.js.map +1 -1
- package/build/__tests__/behavioral/TestingAConversation.test.js +49 -26
- package/build/__tests__/behavioral/TestingAConversation.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/CreatingANewErrorBuilder.test.js +41 -22
- package/build/__tests__/behavioral/errors/CreatingANewErrorBuilder.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/KeepingErrorClassInSync.test.js +17 -10
- package/build/__tests__/behavioral/errors/KeepingErrorClassInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/KeepingErrorsInSync.test.js +41 -22
- package/build/__tests__/behavioral/errors/KeepingErrorsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/SettingUpErrors.test.js +17 -10
- package/build/__tests__/behavioral/errors/SettingUpErrors.test.js.map +1 -1
- package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js +89 -46
- package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js.map +1 -1
- package/build/__tests__/behavioral/events/CreatingAListener.test.js +145 -74
- package/build/__tests__/behavioral/events/CreatingAListener.test.js.map +1 -1
- package/build/__tests__/behavioral/events/CreatingAnEvent.test.js +105 -54
- package/build/__tests__/behavioral/events/CreatingAnEvent.test.js.map +1 -1
- package/build/__tests__/behavioral/events/EventWriter.test.js +9 -6
- package/build/__tests__/behavioral/events/EventWriter.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingEventsInSync.test.js +121 -62
- package/build/__tests__/behavioral/events/KeepingEventsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingEventsInSync2.test.js +81 -42
- package/build/__tests__/behavioral/events/KeepingEventsInSync2.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingListenersInSync.test.js +25 -14
- package/build/__tests__/behavioral/events/KeepingListenersInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/events/ListeningToAnEventYouCreate.test.js +17 -10
- package/build/__tests__/behavioral/events/ListeningToAnEventYouCreate.test.js.map +1 -1
- package/build/__tests__/behavioral/events/ListeningToCoreEvents.test.js +17 -10
- package/build/__tests__/behavioral/events/ListeningToCoreEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/events/RegisteringEventsOnBoot.test.js +26 -15
- package/build/__tests__/behavioral/events/RegisteringEventsOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/events/RegisteringGlobalEvents.test.js +50 -27
- package/build/__tests__/behavioral/events/RegisteringGlobalEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/events/SettingUpEvents.test.js +9 -6
- package/build/__tests__/behavioral/events/SettingUpEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.js +25 -14
- package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/events/SyncingEventsOnlyFromDependencies.test.js +25 -14
- package/build/__tests__/behavioral/events/SyncingEventsOnlyFromDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/node/CreatingANodeModule.test.js +25 -14
- package/build/__tests__/behavioral/node/CreatingANodeModule.test.js.map +1 -1
- package/build/__tests__/behavioral/onboard/StartingOnboarding.test.js +25 -14
- package/build/__tests__/behavioral/onboard/StartingOnboarding.test.js.map +1 -1
- package/build/__tests__/behavioral/organization/CreatingAnOrg.test.js +17 -10
- package/build/__tests__/behavioral/organization/CreatingAnOrg.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/CreatingPermissions.test.js +25 -14
- package/build/__tests__/behavioral/permissions/CreatingPermissions.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/PermissionPlugin.test.js +17 -10
- package/build/__tests__/behavioral/permissions/PermissionPlugin.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/PermissionStore.test.js +97 -50
- package/build/__tests__/behavioral/permissions/PermissionStore.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/PermissionWriter.test.js +17 -10
- package/build/__tests__/behavioral/permissions/PermissionWriter.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/SyncingPermissions.test.js +113 -60
- package/build/__tests__/behavioral/permissions/SyncingPermissions.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/support/AbstractPermissionsTest.js +25 -14
- package/build/__tests__/behavioral/permissions/support/AbstractPermissionsTest.js.map +1 -1
- package/build/__tests__/behavioral/person/LoggingInAsPerson.test.js +73 -38
- package/build/__tests__/behavioral/person/LoggingInAsPerson.test.js.map +1 -1
- package/build/__tests__/behavioral/person/SeeWhoIsLoggedIn.test.js +25 -14
- package/build/__tests__/behavioral/person/SeeWhoIsLoggedIn.test.js.map +1 -1
- package/build/__tests__/behavioral/polish/SettingUpPolish.test.js +57 -30
- package/build/__tests__/behavioral/polish/SettingUpPolish.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/CreatingANewSchemaBuilder.test.js +81 -42
- package/build/__tests__/behavioral/schemas/CreatingANewSchemaBuilder.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/CreatingSchemasWithGenerics.test.js +9 -6
- package/build/__tests__/behavioral/schemas/CreatingSchemasWithGenerics.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.js +17 -10
- package/build/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.js +33 -18
- package/build/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.js +41 -22
- package/build/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/ImportingSchemaImports.test.js +9 -6
- package/build/__tests__/behavioral/schemas/ImportingSchemaImports.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/KeepingSchemasInSync.test.js +161 -82
- package/build/__tests__/behavioral/schemas/KeepingSchemasInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/SettingUpSchemas.test.js +25 -14
- package/build/__tests__/behavioral/schemas/SettingUpSchemas.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/SettingUpSchemasForModuleDistribution.test.js +97 -50
- package/build/__tests__/behavioral/schemas/SettingUpSchemasForModuleDistribution.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/SyncingBadSchemasProvidesHelpfulErrorMessages.test.js +9 -6
- package/build/__tests__/behavioral/schemas/SyncingBadSchemasProvidesHelpfulErrorMessages.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/UsingSchemasInCli.test.js +9 -6
- package/build/__tests__/behavioral/schemas/UsingSchemasInCli.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/BootingASkill.test.js +25 -14
- package/build/__tests__/behavioral/skill/BootingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/CreatingASkill.test.js +17 -10
- package/build/__tests__/behavioral/skill/CreatingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/InstallingASkillAtAnOrg.test.js +65 -34
- package/build/__tests__/behavioral/skill/InstallingASkillAtAnOrg.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/LoggingInAsASkill.test.js +73 -38
- package/build/__tests__/behavioral/skill/LoggingInAsASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/RebuildingASkill.test.js +25 -14
- package/build/__tests__/behavioral/skill/RebuildingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/RegisteringASkill.test.js +33 -18
- package/build/__tests__/behavioral/skill/RegisteringASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/SettingUpASkill.test.js +57 -30
- package/build/__tests__/behavioral/skill/SettingUpASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/stores/CreatingADataStore.test.js +89 -46
- package/build/__tests__/behavioral/stores/CreatingADataStore.test.js.map +1 -1
- package/build/__tests__/behavioral/stores/KeepingDataStoresInSync.test.js +81 -42
- package/build/__tests__/behavioral/stores/KeepingDataStoresInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/CreatingATest.test.js +81 -42
- package/build/__tests__/behavioral/tests/CreatingATest.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/RunningTests.test.js +33 -18
- package/build/__tests__/behavioral/tests/RunningTests.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js +89 -46
- package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/SettingUpASkillForTesting.test.js +41 -22
- package/build/__tests__/behavioral/tests/SettingUpASkillForTesting.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/SettingUpTests.test.js +17 -10
- package/build/__tests__/behavioral/tests/SettingUpTests.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/TestReporterSettingsRemembered.test.js +17 -10
- package/build/__tests__/behavioral/tests/TestReporterSettingsRemembered.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/TestingDataStores.test.js +17 -10
- package/build/__tests__/behavioral/tests/TestingDataStores.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies.test.js +33 -18
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies2.test.js +41 -22
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies2.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingANodeModule.test.js +33 -18
- package/build/__tests__/behavioral/upgrading/UpgradingANodeModule.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill.test.js +81 -42
- package/build/__tests__/behavioral/upgrading/UpgradingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill2.test.js +57 -30
- package/build/__tests__/behavioral/upgrading/UpgradingASkill2.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill3.test.js +81 -42
- package/build/__tests__/behavioral/upgrading/UpgradingASkill3.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill4.test.js +33 -18
- package/build/__tests__/behavioral/upgrading/UpgradingASkill4.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill5.test.js +57 -30
- package/build/__tests__/behavioral/upgrading/UpgradingASkill5.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingWithListeners.test.js +32 -19
- package/build/__tests__/behavioral/upgrading/UpgradingWithListeners.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingWithSandboxFeatureInstalled.test.js +57 -30
- package/build/__tests__/behavioral/upgrading/UpgradingWithSandboxFeatureInstalled.test.js.map +1 -1
- package/build/__tests__/behavioral/views/CreatingASkillView.test.js +105 -54
- package/build/__tests__/behavioral/views/CreatingASkillView.test.js.map +1 -1
- package/build/__tests__/behavioral/views/CreatingATheme.test.js +56 -31
- package/build/__tests__/behavioral/views/CreatingATheme.test.js.map +1 -1
- package/build/__tests__/behavioral/views/KeepingViewsInSync.test.js +49 -26
- package/build/__tests__/behavioral/views/KeepingViewsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/views/RegisteringSkillViewOnBoot.test.js +49 -26
- package/build/__tests__/behavioral/views/RegisteringSkillViewOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/views/SettingUpViews.test.js +17 -10
- package/build/__tests__/behavioral/views/SettingUpViews.test.js.map +1 -1
- package/build/__tests__/behavioral/views/TestingViewControllers.test.js +41 -22
- package/build/__tests__/behavioral/views/TestingViewControllers.test.js.map +1 -1
- package/build/__tests__/behavioral/views/WatchingSkillViews.test.js +25 -14
- package/build/__tests__/behavioral/views/WatchingSkillViews.test.js.map +1 -1
- package/build/__tests__/behavioral/watchers/WatchingForChanges.test.js +105 -54
- package/build/__tests__/behavioral/watchers/WatchingForChanges.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter.test.js +17 -10
- package/build/__tests__/implementation/ActionExecuter.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter2.test.js +65 -34
- package/build/__tests__/implementation/ActionExecuter2.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter3.test.js +33 -18
- package/build/__tests__/implementation/ActionExecuter3.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter4.test.js +25 -14
- package/build/__tests__/implementation/ActionExecuter4.test.js.map +1 -1
- package/build/__tests__/implementation/ArgParser.test.js +18 -11
- package/build/__tests__/implementation/ArgParser.test.js.map +1 -1
- package/build/__tests__/implementation/BuildService.test.js +17 -10
- package/build/__tests__/implementation/BuildService.test.js.map +1 -1
- package/build/__tests__/implementation/BulkImporting.test.js +81 -42
- package/build/__tests__/implementation/BulkImporting.test.js.map +1 -1
- package/build/__tests__/implementation/CachingImports.test.js +41 -22
- package/build/__tests__/implementation/CachingImports.test.js.map +1 -1
- package/build/__tests__/implementation/CommandOptionBuilder.test.js +1 -2
- package/build/__tests__/implementation/CommandOptionBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/CommanderCommandResultMapper.test.js +73 -38
- package/build/__tests__/implementation/CommanderCommandResultMapper.test.js.map +1 -1
- package/build/__tests__/implementation/DataStoreStore.test.js +81 -42
- package/build/__tests__/implementation/DataStoreStore.test.js.map +1 -1
- package/build/__tests__/implementation/DeletingOrphanedSchemaDefinitions.test.js +25 -14
- package/build/__tests__/implementation/DeletingOrphanedSchemaDefinitions.test.js.map +1 -1
- package/build/__tests__/implementation/EventContractCleanerUtil.test.js +33 -18
- package/build/__tests__/implementation/EventContractCleanerUtil.test.js.map +1 -1
- package/build/__tests__/implementation/EventStore.test.js +113 -59
- package/build/__tests__/implementation/EventStore.test.js.map +1 -1
- package/build/__tests__/implementation/EventTemplateItemBuilder.test.js +25 -14
- package/build/__tests__/implementation/EventTemplateItemBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/FeatureCommandAttacher.test.js +73 -38
- package/build/__tests__/implementation/FeatureCommandAttacher.test.js.map +1 -1
- package/build/__tests__/implementation/FeatureFixture.test.js +33 -18
- package/build/__tests__/implementation/FeatureFixture.test.js.map +1 -1
- package/build/__tests__/implementation/FeatureInstaller.test.js +33 -18
- package/build/__tests__/implementation/FeatureInstaller.test.js.map +1 -1
- package/build/__tests__/implementation/FeaturesUtil.test.js +9 -6
- package/build/__tests__/implementation/FeaturesUtil.test.js.map +1 -1
- package/build/__tests__/implementation/FieldTemplateItemBuilder.test.js +9 -6
- package/build/__tests__/implementation/FieldTemplateItemBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/GlobalEmitter.test.js +17 -10
- package/build/__tests__/implementation/GlobalEmitter.test.js.map +1 -1
- package/build/__tests__/implementation/Introspection.test.js +1 -2
- package/build/__tests__/implementation/Introspection.test.js.map +1 -1
- package/build/__tests__/implementation/JestJsonParser.test.js +9 -6
- package/build/__tests__/implementation/JestJsonParser.test.js.map +1 -1
- package/build/__tests__/implementation/LintService.test.js +17 -10
- package/build/__tests__/implementation/LintService.test.js.map +1 -1
- package/build/__tests__/implementation/ListenerStore.test.js +1 -2
- package/build/__tests__/implementation/ListenerStore.test.js.map +1 -1
- package/build/__tests__/implementation/OnboardingScriptLoader.test.js +34 -20
- package/build/__tests__/implementation/OnboardingScriptLoader.test.js.map +1 -1
- package/build/__tests__/implementation/OnboardingScriptPlayer.test.js +103 -59
- package/build/__tests__/implementation/OnboardingScriptPlayer.test.js.map +1 -1
- package/build/__tests__/implementation/OnboardingStore.test.js +17 -10
- package/build/__tests__/implementation/OnboardingStore.test.js.map +1 -1
- package/build/__tests__/implementation/OrganizationStore.test.js +41 -22
- package/build/__tests__/implementation/OrganizationStore.test.js.map +1 -1
- package/build/__tests__/implementation/ParentTestFinder.test.js +25 -14
- package/build/__tests__/implementation/ParentTestFinder.test.js.map +1 -1
- package/build/__tests__/implementation/PkgService.test.js +49 -26
- package/build/__tests__/implementation/PkgService.test.js.map +1 -1
- package/build/__tests__/implementation/SchemaStore.test.js +129 -66
- package/build/__tests__/implementation/SchemaStore.test.js.map +1 -1
- package/build/__tests__/implementation/SchemaTemplateItemBuilder.test.js +9 -6
- package/build/__tests__/implementation/SchemaTemplateItemBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/SchemaValueTypeWriter.test.js +58 -31
- package/build/__tests__/implementation/SchemaValueTypeWriter.test.js.map +1 -1
- package/build/__tests__/implementation/ServiceFactory.test.js +9 -6
- package/build/__tests__/implementation/ServiceFactory.test.js.map +1 -1
- package/build/__tests__/implementation/SettingUpANodeModule.test.js +25 -14
- package/build/__tests__/implementation/SettingUpANodeModule.test.js.map +1 -1
- package/build/__tests__/implementation/SkillStore.test.js +65 -34
- package/build/__tests__/implementation/SkillStore.test.js.map +1 -1
- package/build/__tests__/implementation/StoreFeature.test.js +16 -11
- package/build/__tests__/implementation/StoreFeature.test.js.map +1 -1
- package/build/__tests__/implementation/TestReporter.test.js +33 -18
- package/build/__tests__/implementation/TestReporter.test.js.map +1 -1
- package/build/__tests__/implementation/TestRunner.test.js +73 -38
- package/build/__tests__/implementation/TestRunner.test.js.map +1 -1
- package/build/__tests__/implementation/ValueTypeMapping.test.js +17 -10
- package/build/__tests__/implementation/ValueTypeMapping.test.js.map +1 -1
- package/build/__tests__/implementation/Widgets.test.js +33 -18
- package/build/__tests__/implementation/Widgets.test.js.map +1 -1
- package/build/__tests__/support/EventFaker.js +9 -6
- package/build/__tests__/support/EventFaker.js.map +1 -1
- package/build/__tests__/support/onTestFileResult.js +1 -2
- package/build/__tests__/support/onTestFileResult.js.map +1 -1
- package/build/__tests__/support/scripts/first.script.js +8 -7
- package/build/__tests__/support/scripts/first.script.js.map +1 -1
- package/build/__tests__/support/scripts/second.script.js +1 -2
- package/build/__tests__/support/scripts/second.script.js.map +1 -1
- package/build/__tests__/support/scripts/third.test.script.js +1 -2
- package/build/__tests__/support/scripts/third.test.script.js.map +1 -1
- package/build/boot.js +12 -5
- package/build/boot.js.map +1 -1
- package/build/cli/Cli.js +80 -43
- package/build/cli/Cli.js.map +1 -1
- package/build/components/AbstractComponent.js +1 -2
- package/build/components/AbstractComponent.js.map +1 -1
- package/build/components/FormComponent.js +17 -10
- package/build/components/FormComponent.js.map +1 -1
- package/build/components/QuizComponent.js +17 -10
- package/build/components/QuizComponent.js.map +1 -1
- package/build/constants.js +5 -10
- package/build/constants.js.map +1 -1
- package/build/errors/SpruceError.js +1 -2
- package/build/errors/SpruceError.js.map +1 -1
- package/build/errors/actionCancelled.builder.js +1 -2
- package/build/errors/actionCancelled.builder.js.map +1 -1
- package/build/errors/bootError.builder.js +1 -2
- package/build/errors/bootError.builder.js.map +1 -1
- package/build/errors/buildFailed.builder.js +1 -2
- package/build/errors/buildFailed.builder.js.map +1 -1
- package/build/errors/cacheNotEnabled.builder.js +1 -2
- package/build/errors/cacheNotEnabled.builder.js.map +1 -1
- package/build/errors/commandAborted.builder.js +1 -2
- package/build/errors/commandAborted.builder.js.map +1 -1
- package/build/errors/commandBlocked.builder.js +1 -2
- package/build/errors/commandBlocked.builder.js.map +1 -1
- package/build/errors/commandNotImplemented.builder.js +1 -2
- package/build/errors/commandNotImplemented.builder.js.map +1 -1
- package/build/errors/createAutoloaderFailed.builder.js +1 -2
- package/build/errors/createAutoloaderFailed.builder.js.map +1 -1
- package/build/errors/dependencyExists.builder.js +1 -2
- package/build/errors/dependencyExists.builder.js.map +1 -1
- package/build/errors/deployFailed.builder.js +1 -2
- package/build/errors/deployFailed.builder.js.map +1 -1
- package/build/errors/directoryEmpty.builder.js +1 -2
- package/build/errors/directoryEmpty.builder.js.map +1 -1
- package/build/errors/directoryNotSkill.builder.js +1 -2
- package/build/errors/directoryNotSkill.builder.js.map +1 -1
- package/build/errors/dockerNotStarted.builder.js +1 -2
- package/build/errors/dockerNotStarted.builder.js.map +1 -1
- package/build/errors/executingCommandFailed.builder.js +1 -2
- package/build/errors/executingCommandFailed.builder.js.map +1 -1
- package/build/errors/failedToImport.builder.js +1 -2
- package/build/errors/failedToImport.builder.js.map +1 -1
- package/build/errors/featureNotInstalled.builder.js +1 -2
- package/build/errors/featureNotInstalled.builder.js.map +1 -1
- package/build/errors/fileExists.builder.js +1 -2
- package/build/errors/fileExists.builder.js.map +1 -1
- package/build/errors/generic.builder.js +1 -2
- package/build/errors/generic.builder.js.map +1 -1
- package/build/errors/invalidCommand.builder.js +1 -2
- package/build/errors/invalidCommand.builder.js.map +1 -1
- package/build/errors/invalidEventContract.builder.js +1 -2
- package/build/errors/invalidEventContract.builder.js.map +1 -1
- package/build/errors/invalidFeatureCode.builder.js +1 -2
- package/build/errors/invalidFeatureCode.builder.js.map +1 -1
- package/build/errors/invalidTestDirectory.builder.js +1 -2
- package/build/errors/invalidTestDirectory.builder.js.map +1 -1
- package/build/errors/lintFailed.builder.js +1 -2
- package/build/errors/lintFailed.builder.js.map +1 -1
- package/build/errors/mercuryResponseError.builder.js +1 -2
- package/build/errors/mercuryResponseError.builder.js.map +1 -1
- package/build/errors/missingDependencies.builder.js +1 -2
- package/build/errors/missingDependencies.builder.js.map +1 -1
- package/build/errors/noOrganizationsFound.builder.js +1 -2
- package/build/errors/noOrganizationsFound.builder.js.map +1 -1
- package/build/errors/noSkillsRegistered.builder.js +1 -2
- package/build/errors/noSkillsRegistered.builder.js.map +1 -1
- package/build/errors/notImplemented.builder.js +1 -2
- package/build/errors/notImplemented.builder.js.map +1 -1
- package/build/errors/notLoggedIn.builder.js +1 -2
- package/build/errors/notLoggedIn.builder.js.map +1 -1
- package/build/errors/schemaExists.builder.js +1 -2
- package/build/errors/schemaExists.builder.js.map +1 -1
- package/build/errors/schemaFailedToImport.builder.js +1 -2
- package/build/errors/schemaFailedToImport.builder.js.map +1 -1
- package/build/errors/schemaTemplateItemBuildingFailed.builder.js +1 -2
- package/build/errors/schemaTemplateItemBuildingFailed.builder.js.map +1 -1
- package/build/errors/skillNotFound.builder.js +1 -2
- package/build/errors/skillNotFound.builder.js.map +1 -1
- package/build/errors/skillNotRegistered.builder.js +1 -2
- package/build/errors/skillNotRegistered.builder.js.map +1 -1
- package/build/errors/skillViewExists.builder.js +1 -2
- package/build/errors/skillViewExists.builder.js.map +1 -1
- package/build/errors/storeExists.builder.js +1 -2
- package/build/errors/storeExists.builder.js.map +1 -1
- package/build/errors/testFailed.builder.js +1 -2
- package/build/errors/testFailed.builder.js.map +1 -1
- package/build/errors/themeExists.builder.js +1 -2
- package/build/errors/themeExists.builder.js.map +1 -1
- package/build/errors/transportAlreadyExists.builder.js +1 -2
- package/build/errors/transportAlreadyExists.builder.js.map +1 -1
- package/build/errors/vscodeNotInstalled.builder.js +1 -2
- package/build/errors/vscodeNotInstalled.builder.js.map +1 -1
- package/build/features/AbstractAction.js +25 -14
- package/build/features/AbstractAction.js.map +1 -1
- package/build/features/AbstractFeature.js +33 -18
- package/build/features/AbstractFeature.js.map +1 -1
- package/build/features/ActionExecuter.js +17 -12
- package/build/features/ActionExecuter.js.map +1 -1
- package/build/features/ActionFactory.js +1 -2
- package/build/features/ActionFactory.js.map +1 -1
- package/build/features/ActionQuestionAsker.js +65 -36
- package/build/features/ActionQuestionAsker.js.map +1 -1
- package/build/features/FeatureCommandAttacher.js +9 -6
- package/build/features/FeatureCommandAttacher.js.map +1 -1
- package/build/features/FeatureInstaller.js +81 -44
- package/build/features/FeatureInstaller.js.map +1 -1
- package/build/features/FeatureInstallerFactory.js +1 -2
- package/build/features/FeatureInstallerFactory.js.map +1 -1
- package/build/features/OverrideActionDecorator.js +9 -8
- package/build/features/OverrideActionDecorator.js.map +1 -1
- package/build/features/cache/CacheFeature.js +9 -6
- package/build/features/cache/CacheFeature.js.map +1 -1
- package/build/features/cache/actions/DisableAction.js +9 -6
- package/build/features/cache/actions/DisableAction.js.map +1 -1
- package/build/features/cache/actions/EnableAction.js +9 -6
- package/build/features/cache/actions/EnableAction.js.map +1 -1
- package/build/features/cache/constants.js +2 -4
- package/build/features/cache/constants.js.map +1 -1
- package/build/features/conversation/ConversationFeature.js +25 -14
- package/build/features/conversation/ConversationFeature.js.map +1 -1
- package/build/features/conversation/actions/CreateAction.js +9 -6
- package/build/features/conversation/actions/CreateAction.js.map +1 -1
- package/build/features/conversation/actions/TestAction.js +24 -15
- package/build/features/conversation/actions/TestAction.js.map +1 -1
- package/build/features/conversation/stores/ConversationStore.js +9 -6
- package/build/features/conversation/stores/ConversationStore.js.map +1 -1
- package/build/features/conversation/writers/ConversationWriter.js +9 -6
- package/build/features/conversation/writers/ConversationWriter.js.map +1 -1
- package/build/features/dependencies/DependencyFeature.js +9 -6
- package/build/features/dependencies/DependencyFeature.js.map +1 -1
- package/build/features/dependencies/actions/AddAction.js +9 -6
- package/build/features/dependencies/actions/AddAction.js.map +1 -1
- package/build/features/dependencies/actions/ManageAction.js +9 -6
- package/build/features/dependencies/actions/ManageAction.js.map +1 -1
- package/build/features/deploy/DeployFeature.js +9 -6
- package/build/features/deploy/DeployFeature.js.map +1 -1
- package/build/features/deploy/actions/HerokuAction.js +81 -42
- package/build/features/deploy/actions/HerokuAction.js.map +1 -1
- package/build/features/deploy/writers/DeployWriter.js +1 -2
- package/build/features/deploy/writers/DeployWriter.js.map +1 -1
- package/build/features/error/ErrorFeature.js +25 -14
- package/build/features/error/ErrorFeature.js.map +1 -1
- package/build/features/error/ParentTestFinder.js +9 -6
- package/build/features/error/ParentTestFinder.js.map +1 -1
- package/build/features/error/actions/CreateAction.js +9 -6
- package/build/features/error/actions/CreateAction.js.map +1 -1
- package/build/features/error/actions/SyncAction.js +25 -14
- package/build/features/error/actions/SyncAction.js.map +1 -1
- package/build/features/error/writers/ErrorWriter.js +41 -22
- package/build/features/error/writers/ErrorWriter.js.map +1 -1
- package/build/features/event/EventFeature.js +57 -30
- package/build/features/event/EventFeature.js.map +1 -1
- package/build/features/event/actions/CreateAction.js +9 -6
- package/build/features/event/actions/CreateAction.js.map +1 -1
- package/build/features/event/actions/ListenAction.js +58 -32
- package/build/features/event/actions/ListenAction.js.map +1 -1
- package/build/features/event/actions/SetRemoteAction.js +9 -6
- package/build/features/event/actions/SetRemoteAction.js.map +1 -1
- package/build/features/event/actions/SyncAction.js +9 -6
- package/build/features/event/actions/SyncAction.js.map +1 -1
- package/build/features/event/actions/SyncListenersAction.js +9 -6
- package/build/features/event/actions/SyncListenersAction.js.map +1 -1
- package/build/features/event/builders/EventContractBuilder.js +33 -18
- package/build/features/event/builders/EventContractBuilder.js.map +1 -1
- package/build/features/event/builders/ListenerTemplateItemBuilder.js +1 -2
- package/build/features/event/builders/ListenerTemplateItemBuilder.js.map +1 -1
- package/build/features/event/services/EventSettingsService.js +1 -2
- package/build/features/event/services/EventSettingsService.js.map +1 -1
- package/build/features/event/services/RemoteService.js +1 -2
- package/build/features/event/services/RemoteService.js.map +1 -1
- package/build/features/event/stores/EventStore.js +48 -27
- package/build/features/event/stores/EventStore.js.map +1 -1
- package/build/features/event/stores/ListenerStore.js +9 -6
- package/build/features/event/stores/ListenerStore.js.map +1 -1
- package/build/features/event/writers/EventWriter.js +49 -26
- package/build/features/event/writers/EventWriter.js.map +1 -1
- package/build/features/eventContract/EventContractFeature.js +1 -2
- package/build/features/eventContract/EventContractFeature.js.map +1 -1
- package/build/features/eventContract/actions/PullAction.js +17 -10
- package/build/features/eventContract/actions/PullAction.js.map +1 -1
- package/build/features/feature.utilities.js +1 -2
- package/build/features/feature.utilities.js.map +1 -1
- package/build/features/log/LogFeature.js +1 -2
- package/build/features/log/LogFeature.js.map +1 -1
- package/build/features/log/actions/CreateTransportAction.js +9 -6
- package/build/features/log/actions/CreateTransportAction.js.map +1 -1
- package/build/features/log/writers/LogWriter.js +9 -6
- package/build/features/log/writers/LogWriter.js.map +1 -1
- package/build/features/node/NodeFeature.js +40 -23
- package/build/features/node/NodeFeature.js.map +1 -1
- package/build/features/node/actions/CreateAction.js +9 -6
- package/build/features/node/actions/CreateAction.js.map +1 -1
- package/build/features/node/actions/UpdateDependenciesAction.js +17 -10
- package/build/features/node/actions/UpdateDependenciesAction.js.map +1 -1
- package/build/features/node/actions/UpgradeAction.js +25 -14
- package/build/features/node/actions/UpgradeAction.js.map +1 -1
- package/build/features/node/writers/NodeWriter.js +10 -8
- package/build/features/node/writers/NodeWriter.js.map +1 -1
- package/build/features/onboard/OnboardFeature.js +33 -19
- package/build/features/onboard/OnboardFeature.js.map +1 -1
- package/build/features/onboard/ScriptLoader.js +9 -6
- package/build/features/onboard/ScriptLoader.js.map +1 -1
- package/build/features/onboard/ScriptPlayer.js +25 -14
- package/build/features/onboard/ScriptPlayer.js.map +1 -1
- package/build/features/onboard/actions/OnboardAction.js +9 -6
- package/build/features/onboard/actions/OnboardAction.js.map +1 -1
- package/build/features/onboard/scripts/onboarding.first.script.js +38 -20
- package/build/features/onboard/scripts/onboarding.first.script.js.map +1 -1
- package/build/features/onboard/scripts/onboarding.immersive.script.js +14 -10
- package/build/features/onboard/scripts/onboarding.immersive.script.js.map +1 -1
- package/build/features/onboard/scripts/onboarding.returning.script.js +8 -7
- package/build/features/onboard/scripts/onboarding.returning.script.js.map +1 -1
- package/build/features/onboard/scripts/onboarding.short.script.js +32 -19
- package/build/features/onboard/scripts/onboarding.short.script.js.map +1 -1
- package/build/features/onboard/scripts/todo/todo.create.skill.script.js +8 -7
- package/build/features/onboard/scripts/todo/todo.create.skill.script.js.map +1 -1
- package/build/features/onboard/scripts/todo/todo.test.script.js +8 -7
- package/build/features/onboard/scripts/todo/todo.test.script.js.map +1 -1
- package/build/features/onboard/scripts/wrongCommand.script.js +8 -7
- package/build/features/onboard/scripts/wrongCommand.script.js.map +1 -1
- package/build/features/onboard/stores/OnboardingStore.js +1 -2
- package/build/features/onboard/stores/OnboardingStore.js.map +1 -1
- package/build/features/organization/OrganizationFeature.js +1 -2
- package/build/features/organization/OrganizationFeature.js.map +1 -1
- package/build/features/organization/actions/CreateAction.js +9 -6
- package/build/features/organization/actions/CreateAction.js.map +1 -1
- package/build/features/organization/actions/InstallAction.js +9 -6
- package/build/features/organization/actions/InstallAction.js.map +1 -1
- package/build/features/organization/stores/OrganizationStore.js +41 -22
- package/build/features/organization/stores/OrganizationStore.js.map +1 -1
- package/build/features/permission/PermissionFeature.js +33 -18
- package/build/features/permission/PermissionFeature.js.map +1 -1
- package/build/features/permission/actions/CreateAction.js +9 -6
- package/build/features/permission/actions/CreateAction.js.map +1 -1
- package/build/features/permission/actions/SyncAction.js +15 -9
- package/build/features/permission/actions/SyncAction.js.map +1 -1
- package/build/features/permission/stores/PermissionStore.js +17 -10
- package/build/features/permission/stores/PermissionStore.js.map +1 -1
- package/build/features/permission/writers/PermissionWriter.js +25 -14
- package/build/features/permission/writers/PermissionWriter.js.map +1 -1
- package/build/features/person/PersonFeature.js +1 -2
- package/build/features/person/PersonFeature.js.map +1 -1
- package/build/features/person/actions/LoginAction.js +9 -6
- package/build/features/person/actions/LoginAction.js.map +1 -1
- package/build/features/person/actions/LogoutAction.js +9 -6
- package/build/features/person/actions/LogoutAction.js.map +1 -1
- package/build/features/person/actions/WhoamiAction.js +9 -6
- package/build/features/person/actions/WhoamiAction.js.map +1 -1
- package/build/features/polish/PolishFeature.js +1 -2
- package/build/features/polish/PolishFeature.js.map +1 -1
- package/build/features/polish/actions/SetupAction.js +9 -6
- package/build/features/polish/actions/SetupAction.js.map +1 -1
- package/build/features/polish/writers/PolishWriter.js +9 -6
- package/build/features/polish/writers/PolishWriter.js.map +1 -1
- package/build/features/sandbox/SandboxFeature.js +8 -7
- package/build/features/sandbox/SandboxFeature.js.map +1 -1
- package/build/features/sandbox/actions/SetupAction.js +9 -6
- package/build/features/sandbox/actions/SetupAction.js.map +1 -1
- package/build/features/sandbox/writers/SandboxWriter.js +9 -6
- package/build/features/sandbox/writers/SandboxWriter.js.map +1 -1
- package/build/features/schema/SchemaFeature.js +33 -18
- package/build/features/schema/SchemaFeature.js.map +1 -1
- package/build/features/schema/ValueTypeBuilder.js +9 -6
- package/build/features/schema/ValueTypeBuilder.js.map +1 -1
- package/build/features/schema/actions/CreateAction.js +9 -6
- package/build/features/schema/actions/CreateAction.js.map +1 -1
- package/build/features/schema/actions/SyncAction.js +41 -22
- package/build/features/schema/actions/SyncAction.js.map +1 -1
- package/build/features/schema/actions/SyncFieldsAction.js +9 -6
- package/build/features/schema/actions/SyncFieldsAction.js.map +1 -1
- package/build/features/schema/services/SchemaService.js +9 -6
- package/build/features/schema/services/SchemaService.js.map +1 -1
- package/build/features/schema/stores/SchemaStore.js +58 -34
- package/build/features/schema/stores/SchemaStore.js.map +1 -1
- package/build/features/schema/utilities/schema.utility.js +1 -2
- package/build/features/schema/utilities/schema.utility.js.map +1 -1
- package/build/features/schema/utilities/schemaDisk.utility.js +1 -2
- package/build/features/schema/utilities/schemaDisk.utility.js.map +1 -1
- package/build/features/schema/utilities/schemaGenerator.utility.js +1 -2
- package/build/features/schema/utilities/schemaGenerator.utility.js.map +1 -1
- package/build/features/schema/writers/SchemaWriter.js +49 -26
- package/build/features/schema/writers/SchemaWriter.js.map +1 -1
- package/build/features/skill/SkillFeature.js +49 -26
- package/build/features/skill/SkillFeature.js.map +1 -1
- package/build/features/skill/actions/BootAction.js +17 -10
- package/build/features/skill/actions/BootAction.js.map +1 -1
- package/build/features/skill/actions/CreateAction.js +9 -6
- package/build/features/skill/actions/CreateAction.js.map +1 -1
- package/build/features/skill/actions/DashboardAction.js +10 -8
- package/build/features/skill/actions/DashboardAction.js.map +1 -1
- package/build/features/skill/actions/LoginAction.js +9 -6
- package/build/features/skill/actions/LoginAction.js.map +1 -1
- package/build/features/skill/actions/RebuildAction.js +9 -6
- package/build/features/skill/actions/RebuildAction.js.map +1 -1
- package/build/features/skill/actions/RegisterAction.js +9 -6
- package/build/features/skill/actions/RegisterAction.js.map +1 -1
- package/build/features/skill/stores/SkillStore.js +73 -38
- package/build/features/skill/stores/SkillStore.js.map +1 -1
- package/build/features/skill/updaters/Updater.js +9 -6
- package/build/features/skill/updaters/Updater.js.map +1 -1
- package/build/features/skill/writers/SkillWriter.js +9 -6
- package/build/features/skill/writers/SkillWriter.js.map +1 -1
- package/build/features/store/StoreFeature.js +25 -14
- package/build/features/store/StoreFeature.js.map +1 -1
- package/build/features/store/actions/CreateAction.js +9 -6
- package/build/features/store/actions/CreateAction.js.map +1 -1
- package/build/features/store/actions/SyncAction.js +9 -6
- package/build/features/store/actions/SyncAction.js.map +1 -1
- package/build/features/store/stores/StoreStore.js +9 -6
- package/build/features/store/stores/StoreStore.js.map +1 -1
- package/build/features/store/templateItemBuilders/StoreTemplateItemBuilder.js +1 -2
- package/build/features/store/templateItemBuilders/StoreTemplateItemBuilder.js.map +1 -1
- package/build/features/store/writers/StoreWriter.js +33 -18
- package/build/features/store/writers/StoreWriter.js.map +1 -1
- package/build/features/test/TestFeature.js +17 -10
- package/build/features/test/TestFeature.js.map +1 -1
- package/build/features/test/TestLogItemGenerator.js +1 -2
- package/build/features/test/TestLogItemGenerator.js.map +1 -1
- package/build/features/test/TestReporter.js +33 -18
- package/build/features/test/TestReporter.js.map +1 -1
- package/build/features/test/TestRunner.js +26 -15
- package/build/features/test/TestRunner.js.map +1 -1
- package/build/features/test/actions/CreateAction.js +33 -18
- package/build/features/test/actions/CreateAction.js.map +1 -1
- package/build/features/test/actions/SetupAction.js +9 -6
- package/build/features/test/actions/SetupAction.js.map +1 -1
- package/build/features/test/actions/TestAction.js +42 -24
- package/build/features/test/actions/TestAction.js.map +1 -1
- package/build/features/test/writers/TestWriter.js +9 -6
- package/build/features/test/writers/TestWriter.js.map +1 -1
- package/build/features/universalDevDependencies.js +1 -2
- package/build/features/universalDevDependencies.js.map +1 -1
- package/build/features/universalFileDescriptions.js +5 -2
- package/build/features/universalFileDescriptions.js.map +1 -1
- package/build/features/universalScripts.js +1 -2
- package/build/features/universalScripts.js.map +1 -1
- package/build/features/validateAndNormalize.utility.js +1 -2
- package/build/features/validateAndNormalize.utility.js.map +1 -1
- package/build/features/view/ViewFeature.js +16 -11
- package/build/features/view/ViewFeature.js.map +1 -1
- package/build/features/view/actions/CreateAction.js +9 -6
- package/build/features/view/actions/CreateAction.js.map +1 -1
- package/build/features/view/actions/CreateThemeAction.js +9 -6
- package/build/features/view/actions/CreateThemeAction.js.map +1 -1
- package/build/features/view/actions/SyncAction.js +9 -6
- package/build/features/view/actions/SyncAction.js.map +1 -1
- package/build/features/view/actions/WatchAction.js +9 -6
- package/build/features/view/actions/WatchAction.js.map +1 -1
- package/build/features/view/stores/ViewStore.js +9 -6
- package/build/features/view/stores/ViewStore.js.map +1 -1
- package/build/features/view/writers/ViewWriter.js +17 -10
- package/build/features/view/writers/ViewWriter.js.map +1 -1
- package/build/features/vscode/VsCodeFeature.js +1 -2
- package/build/features/vscode/VsCodeFeature.js.map +1 -1
- package/build/features/vscode/actions/SetupAction.js +41 -22
- package/build/features/vscode/actions/SetupAction.js.map +1 -1
- package/build/features/vscode/services/VsCodeService.js +25 -14
- package/build/features/vscode/services/VsCodeService.js.map +1 -1
- package/build/features/vscode/writers/VsCodeWriter.js +9 -6
- package/build/features/vscode/writers/VsCodeWriter.js.map +1 -1
- package/build/features/watch/WatchFeature.js +41 -24
- package/build/features/watch/WatchFeature.js.map +1 -1
- package/build/interfaces/SpyInterface.js +49 -26
- package/build/interfaces/SpyInterface.js.map +1 -1
- package/build/interfaces/TerminalInterface.js +65 -34
- package/build/interfaces/TerminalInterface.js.map +1 -1
- package/build/schemas/v2020_07_22/actionResponse.builder.js +1 -2
- package/build/schemas/v2020_07_22/actionResponse.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/bootSkillOptions.builder.js +1 -2
- package/build/schemas/v2020_07_22/bootSkillOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/createConversationTopicOptions.builder.js +1 -2
- package/build/schemas/v2020_07_22/createConversationTopicOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/createErrorOptions.builder.js +1 -2
- package/build/schemas/v2020_07_22/createErrorOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/createOrganizationOptions.builder.js +1 -2
- package/build/schemas/v2020_07_22/createOrganizationOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/createSchemaOptions.builder.js +1 -2
- package/build/schemas/v2020_07_22/createSchemaOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/createTestOptions.builder.js +1 -2
- package/build/schemas/v2020_07_22/createTestOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/generatedFile.builder.js +1 -2
- package/build/schemas/v2020_07_22/generatedFile.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/installSkillAtOrganizationOptions.builder.js +1 -2
- package/build/schemas/v2020_07_22/installSkillAtOrganizationOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/listenEventOptions.builder.js +1 -2
- package/build/schemas/v2020_07_22/listenEventOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/namedTemplateItem.builder.js +1 -2
- package/build/schemas/v2020_07_22/namedTemplateItem.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/nodeFeatureOptions.builder.js +1 -2
- package/build/schemas/v2020_07_22/nodeFeatureOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/onboardOptions.builder.js +1 -2
- package/build/schemas/v2020_07_22/onboardOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/onboarding.builder.js +1 -2
- package/build/schemas/v2020_07_22/onboarding.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/personWithToken.builder.js +1 -2
- package/build/schemas/v2020_07_22/personWithToken.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/registerDashboardWidgetsEmitPayloadSchema.builder.js +1 -2
- package/build/schemas/v2020_07_22/registerDashboardWidgetsEmitPayloadSchema.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/setupTestsOptions.builder.js +1 -2
- package/build/schemas/v2020_07_22/setupTestsOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/setupVscodeOptions.builder.js +1 -2
- package/build/schemas/v2020_07_22/setupVscodeOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/skillFeature.builder.js +1 -2
- package/build/schemas/v2020_07_22/skillFeature.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/syncErrorOptions.builder.js +1 -2
- package/build/schemas/v2020_07_22/syncErrorOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/syncEventOptions.builder.js +1 -2
- package/build/schemas/v2020_07_22/syncEventOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/syncSchemaFieldsOptions.builder.js +1 -2
- package/build/schemas/v2020_07_22/syncSchemaFieldsOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/syncSchemasOptions.builder.js +1 -2
- package/build/schemas/v2020_07_22/syncSchemasOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/testOptions.builder.js +1 -2
- package/build/schemas/v2020_07_22/testOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/upgradeSkillOptions.builder.js +1 -2
- package/build/schemas/v2020_07_22/upgradeSkillOptions.builder.js.map +1 -1
- package/build/schemas/v2020_07_22/watcherDidDetectChangesEmitPayload.builder.js +1 -2
- package/build/schemas/v2020_07_22/watcherDidDetectChangesEmitPayload.builder.js.map +1 -1
- package/build/services/BuildService.js +9 -6
- package/build/services/BuildService.js.map +1 -1
- package/build/services/CommandService.js +9 -6
- package/build/services/CommandService.js.map +1 -1
- package/build/services/DependencyService.js +1 -2
- package/build/services/DependencyService.js.map +1 -1
- package/build/services/GameService.js +9 -6
- package/build/services/GameService.js.map +1 -1
- package/build/services/ImportService.js +31 -22
- package/build/services/ImportService.js.map +1 -1
- package/build/services/LintService.js +9 -8
- package/build/services/LintService.js.map +1 -1
- package/build/services/PkgService.js +17 -10
- package/build/services/PkgService.js.map +1 -1
- package/build/services/ServiceFactory.js +1 -2
- package/build/services/ServiceFactory.js.map +1 -1
- package/build/services/TypeCheckerService.js +9 -8
- package/build/services/TypeCheckerService.js.map +1 -1
- package/build/stores/AbstractLocalStore.js +1 -2
- package/build/stores/AbstractLocalStore.js.map +1 -1
- package/build/stores/AbstractStore.js +9 -6
- package/build/stores/AbstractStore.js.map +1 -1
- package/build/stores/StoreFactory.js +1 -2
- package/build/stores/StoreFactory.js.map +1 -1
- package/build/templateItemBuilders/EventTemplateItemBuilder.js +1 -2
- package/build/templateItemBuilders/EventTemplateItemBuilder.js.map +1 -1
- package/build/templateItemBuilders/FieldTemplateItemBuilder.js +1 -2
- package/build/templateItemBuilders/FieldTemplateItemBuilder.js.map +1 -1
- package/build/templateItemBuilders/SchemaTemplateItemBuilder.js +1 -2
- package/build/templateItemBuilders/SchemaTemplateItemBuilder.js.map +1 -1
- package/build/tests/AbstractCliTest.js +121 -62
- package/build/tests/AbstractCliTest.js.map +1 -1
- package/build/tests/AbstractErrorTest.js +9 -6
- package/build/tests/AbstractErrorTest.js.map +1 -1
- package/build/tests/AbstractEventTest.js +33 -18
- package/build/tests/AbstractEventTest.js.map +1 -1
- package/build/tests/AbstractSchemaTest.js +25 -14
- package/build/tests/AbstractSchemaTest.js.map +1 -1
- package/build/tests/AbstractSkillTest.js +25 -14
- package/build/tests/AbstractSkillTest.js.map +1 -1
- package/build/tests/AbstractTestTest.js +9 -6
- package/build/tests/AbstractTestTest.js.map +1 -1
- package/build/tests/CommandFaker.js +1 -2
- package/build/tests/CommandFaker.js.map +1 -1
- package/build/tests/JestJsonParser.js +1 -2
- package/build/tests/JestJsonParser.js.map +1 -1
- package/build/tests/MockProgramFactory.js +16 -12
- package/build/tests/MockProgramFactory.js.map +1 -1
- package/build/tests/buildTestCache.js +49 -32
- package/build/tests/buildTestCache.js.map +1 -1
- package/build/tests/cleanTestData.js +45 -27
- package/build/tests/cleanTestData.js.map +1 -1
- package/build/tests/constants.js +8 -16
- package/build/tests/constants.js.map +1 -1
- package/build/tests/fixtures/FeatureFixture.js +49 -26
- package/build/tests/fixtures/FeatureFixture.js.map +1 -1
- package/build/tests/fixtures/MercuryFixture.js +9 -6
- package/build/tests/fixtures/MercuryFixture.js.map +1 -1
- package/build/tests/fixtures/OrganizationFixture.js +25 -14
- package/build/tests/fixtures/OrganizationFixture.js.map +1 -1
- package/build/tests/fixtures/PersonFixture.js +18 -12
- package/build/tests/fixtures/PersonFixture.js.map +1 -1
- package/build/tests/fixtures/SkillFixture.js +57 -32
- package/build/tests/fixtures/SkillFixture.js.map +1 -1
- package/build/tests/fixtures/ViewFixture.js +9 -6
- package/build/tests/fixtures/ViewFixture.js.map +1 -1
- package/build/tests/utilities/test.utility.js +1 -2
- package/build/tests/utilities/test.utility.js.map +1 -1
- package/build/tests/utilities/uiAssert.utility.js +1 -2
- package/build/tests/utilities/uiAssert.utility.js.map +1 -1
- package/build/updaters/ScriptUpdater.js +9 -6
- package/build/updaters/ScriptUpdater.js.map +1 -1
- package/build/utilities/action.utility.js +1 -2
- package/build/utilities/action.utility.js.map +1 -1
- package/build/utilities/apiClient.utility.js +1 -2
- package/build/utilities/apiClient.utility.js.map +1 -1
- package/build/utilities/argParser.utility.js +1 -2
- package/build/utilities/argParser.utility.js.map +1 -1
- package/build/utilities/commander.utility.js +1 -2
- package/build/utilities/commander.utility.js.map +1 -1
- package/build/utilities/duration.utility.js +1 -2
- package/build/utilities/duration.utility.js.map +1 -1
- package/build/utilities/eventContractCleaner.utility.js +1 -2
- package/build/utilities/eventContractCleaner.utility.js.map +1 -1
- package/build/utilities/form.utility.js +1 -2
- package/build/utilities/form.utility.js.map +1 -1
- package/build/utilities/introspection.utility.js +1 -2
- package/build/utilities/introspection.utility.js.map +1 -1
- package/build/utilities/tsConfig.utility.js +1 -2
- package/build/utilities/tsConfig.utility.js.map +1 -1
- package/build/utilities/ui.utility.js +1 -2
- package/build/utilities/ui.utility.js.map +1 -1
- package/build/widgets/Theme.js +1 -2
- package/build/widgets/Theme.js.map +1 -1
- package/build/widgets/WidgetFactory.js +1 -2
- package/build/widgets/WidgetFactory.js.map +1 -1
- package/build/widgets/keySelectChoices.js +1 -2
- package/build/widgets/keySelectChoices.js.map +1 -1
- package/build/widgets/terminalKit/TKButtonWidget.js +1 -2
- package/build/widgets/terminalKit/TKButtonWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkBaseWidget.js +9 -6
- package/build/widgets/terminalKit/TkBaseWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkInputWidget.js +17 -10
- package/build/widgets/terminalKit/TkInputWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkLayoutCellWidget.js +1 -2
- package/build/widgets/terminalKit/TkLayoutCellWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkLayoutWidget.js +9 -6
- package/build/widgets/terminalKit/TkLayoutWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkMenuBarWidget.js +1 -2
- package/build/widgets/terminalKit/TkMenuBarWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkPopupWidget.js +1 -2
- package/build/widgets/terminalKit/TkPopupWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkProgressBarWidget.js +1 -2
- package/build/widgets/terminalKit/TkProgressBarWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkTextWidget.js +9 -6
- package/build/widgets/terminalKit/TkTextWidget.js.map +1 -1
- package/build/widgets/terminalKit/TkWindowWidget.js +17 -10
- package/build/widgets/terminalKit/TkWindowWidget.js.map +1 -1
- package/build/widgets/terminalKit/termKit.utility.js +1 -2
- package/build/widgets/terminalKit/termKit.utility.js.map +1 -1
- package/build/widgets/types/button.types.js +1 -2
- package/build/widgets/types/button.types.js.map +1 -1
- package/build/widgets/types/factory.types.js +2 -4
- package/build/widgets/types/factory.types.js.map +1 -1
- package/build/widgets/types/input.types.js +1 -2
- package/build/widgets/types/input.types.js.map +1 -1
- package/build/widgets/types/menuBar.types.js +1 -2
- package/build/widgets/types/menuBar.types.js.map +1 -1
- package/build/widgets/types/popup.types.js +1 -2
- package/build/widgets/types/popup.types.js.map +1 -1
- package/build/widgets/types/text.types.js +1 -2
- package/build/widgets/types/text.types.js.map +1 -1
- package/build/widgets/types/window.types.js +1 -2
- package/build/widgets/types/window.types.js.map +1 -1
- package/build/widgets/widget.utilities.js +1 -2
- package/build/widgets/widget.utilities.js.map +1 -1
- package/build/writers/AbstractWriter.js +25 -14
- package/build/writers/AbstractWriter.js.map +1 -1
- package/build/writers/WriterFactory.js +1 -2
- package/build/writers/WriterFactory.js.map +1 -1
- package/package.json +40 -40
- package/src/features/universalFileDescriptions.ts +5 -0
|
@@ -24,7 +24,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
24
24
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25
25
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
26
26
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
27
|
-
var CreateAction = /*#__PURE__*/function (_AbstractAction
|
|
27
|
+
var CreateAction = exports["default"] = /*#__PURE__*/function (_AbstractAction) {
|
|
28
28
|
(0, _inherits2["default"])(CreateAction, _AbstractAction);
|
|
29
29
|
var _super = _createSuper(CreateAction);
|
|
30
30
|
function CreateAction() {
|
|
@@ -40,8 +40,8 @@ var CreateAction = /*#__PURE__*/function (_AbstractAction, _execute) {
|
|
|
40
40
|
}
|
|
41
41
|
(0, _createClass2["default"])(CreateAction, [{
|
|
42
42
|
key: "execute",
|
|
43
|
-
value: function
|
|
44
|
-
|
|
43
|
+
value: function () {
|
|
44
|
+
var _execute = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(options) {
|
|
45
45
|
var normalizedOptions, schemaCreateAction, createSchemaOptions, createResults, syncOptions, syncResults, mergedResults;
|
|
46
46
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
47
47
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -70,10 +70,13 @@ var CreateAction = /*#__PURE__*/function (_AbstractAction, _execute) {
|
|
|
70
70
|
return _context.stop();
|
|
71
71
|
}
|
|
72
72
|
}, _callee, this);
|
|
73
|
-
}))
|
|
74
|
-
|
|
73
|
+
}));
|
|
74
|
+
function execute(_x) {
|
|
75
|
+
return _execute.apply(this, arguments);
|
|
76
|
+
}
|
|
77
|
+
return execute;
|
|
78
|
+
}()
|
|
75
79
|
}]);
|
|
76
80
|
return CreateAction;
|
|
77
81
|
}(_AbstractAction2["default"]);
|
|
78
|
-
exports["default"] = CreateAction;
|
|
79
82
|
//# sourceMappingURL=CreateAction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateAction.js","names":["_schema","require","_createErrorOptions","_interopRequireDefault","_createSchemaOptions","_syncErrorOptions","_action","_AbstractAction2","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","CreateAction","
|
|
1
|
+
{"version":3,"file":"CreateAction.js","names":["_schema","require","_createErrorOptions","_interopRequireDefault","_createSchemaOptions","_syncErrorOptions","_action","_AbstractAction2","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","CreateAction","exports","_AbstractAction","_inherits2","_super","_this","_classCallCheck2","_len","args","Array","_key","concat","_assertThisInitialized2","createErrorActionSchema","_createClass2","key","value","_execute","_asyncToGenerator2","_regenerator","mark","_callee","options","normalizedOptions","schemaCreateAction","createSchemaOptions","createResults","syncOptions","syncResults","mergedResults","wrap","_callee$","_context","prev","next","validateAndNormalizeOptions","Action","normalizeSchemaValues","createSchemaActionSchema","builderFunction","shouldEnableVersioning","syncAfterCreate","schemaBuilderDestinationDir","errorBuilderDestinationDir","execute","sent","syncErrorActionSchema","actionUtil","mergeActionResults","abrupt","stop","_x","AbstractAction"],"sources":["../../../../src/features/error/actions/CreateAction.ts"],"sourcesContent":["import { normalizeSchemaValues } from '@sprucelabs/schema'\nimport { SpruceSchemas } from '#spruce/schemas/schemas.types'\nimport createErrorActionSchema from '#spruce/schemas/spruceCli/v2020_07_22/createErrorOptions.schema'\nimport createSchemaActionSchema from '#spruce/schemas/spruceCli/v2020_07_22/createSchemaOptions.schema'\nimport syncErrorActionSchema from '#spruce/schemas/spruceCli/v2020_07_22/syncErrorOptions.schema'\nimport actionUtil from '../../../utilities/action.utility'\nimport AbstractAction from '../../AbstractAction'\nimport { FeatureActionResponse } from '../../features.types'\n\ntype OptionsSchema =\n\tSpruceSchemas.SpruceCli.v2020_07_22.CreateErrorOptionsSchema\ntype Options = SpruceSchemas.SpruceCli.v2020_07_22.CreateErrorOptions\nexport default class CreateAction extends AbstractAction<OptionsSchema> {\n\tpublic optionsSchema = createErrorActionSchema\n\tpublic invocationMessage = 'Creating a new error builder... 🤾♀️'\n\n\tpublic async execute(options: Options): Promise<FeatureActionResponse> {\n\t\tconst normalizedOptions = this.validateAndNormalizeOptions(options)\n\n\t\tconst schemaCreateAction = this.Action('schema', 'create')\n\n\t\tconst createSchemaOptions = normalizeSchemaValues(\n\t\t\tcreateSchemaActionSchema,\n\t\t\t{\n\t\t\t\t...normalizedOptions,\n\t\t\t\tbuilderFunction: 'buildErrorSchema',\n\t\t\t\tshouldEnableVersioning: false,\n\t\t\t\tsyncAfterCreate: false,\n\t\t\t\tschemaBuilderDestinationDir:\n\t\t\t\t\tnormalizedOptions.errorBuilderDestinationDir,\n\t\t\t}\n\t\t)\n\n\t\tconst createResults = await schemaCreateAction.execute(createSchemaOptions)\n\n\t\tconst syncOptions = normalizeSchemaValues(\n\t\t\tsyncErrorActionSchema,\n\t\t\tnormalizedOptions\n\t\t)\n\t\tconst syncResults = await this.Action('error', 'sync').execute(syncOptions)\n\t\tconst mergedResults = actionUtil.mergeActionResults(\n\t\t\tcreateResults,\n\t\t\tsyncResults\n\t\t)\n\n\t\treturn mergedResults\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,iBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,OAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,gBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAAiD,SAAAO,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAA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 -24,7 +24,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
24
24
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25
25
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
26
26
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
27
|
-
var SyncAction = /*#__PURE__*/function (_AbstractAction
|
|
27
|
+
var SyncAction = exports["default"] = /*#__PURE__*/function (_AbstractAction) {
|
|
28
28
|
(0, _inherits2["default"])(SyncAction, _AbstractAction);
|
|
29
29
|
var _super = _createSuper(SyncAction);
|
|
30
30
|
function SyncAction() {
|
|
@@ -41,8 +41,8 @@ var SyncAction = /*#__PURE__*/function (_AbstractAction, _execute, _syncErrors,
|
|
|
41
41
|
}
|
|
42
42
|
(0, _createClass2["default"])(SyncAction, [{
|
|
43
43
|
key: "execute",
|
|
44
|
-
value: function
|
|
45
|
-
|
|
44
|
+
value: function () {
|
|
45
|
+
var _execute = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(options) {
|
|
46
46
|
var _errorSyncResults$fil;
|
|
47
47
|
var normalizedOptions, errorTypesDestinationDir, errorClassDestinationDir, schemaSyncAction, errorSyncResults, _ref, schemaTemplateItems, errorTemplateItems, errorWriter, optionsResults, errorClassGeneratedFiles;
|
|
48
48
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
@@ -91,8 +91,12 @@ var SyncAction = /*#__PURE__*/function (_AbstractAction, _execute, _syncErrors,
|
|
|
91
91
|
return _context.stop();
|
|
92
92
|
}
|
|
93
93
|
}, _callee, this);
|
|
94
|
-
}))
|
|
95
|
-
|
|
94
|
+
}));
|
|
95
|
+
function execute(_x) {
|
|
96
|
+
return _execute.apply(this, arguments);
|
|
97
|
+
}
|
|
98
|
+
return execute;
|
|
99
|
+
}()
|
|
96
100
|
}, {
|
|
97
101
|
key: "deleteOrphanedDirs",
|
|
98
102
|
value: function deleteOrphanedDirs(errorTypesDestinationDir) {
|
|
@@ -100,8 +104,8 @@ var SyncAction = /*#__PURE__*/function (_AbstractAction, _execute, _syncErrors,
|
|
|
100
104
|
}
|
|
101
105
|
}, {
|
|
102
106
|
key: "syncErrors",
|
|
103
|
-
value: function
|
|
104
|
-
|
|
107
|
+
value: function () {
|
|
108
|
+
var _syncErrors = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(schemaSyncAction, normalizedOptions) {
|
|
105
109
|
var resolvedErrorTypesDestinationDir, syncOptions, errorSyncResults;
|
|
106
110
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
107
111
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -129,8 +133,12 @@ var SyncAction = /*#__PURE__*/function (_AbstractAction, _execute, _syncErrors,
|
|
|
129
133
|
return _context2.stop();
|
|
130
134
|
}
|
|
131
135
|
}, _callee2, this);
|
|
132
|
-
}))
|
|
133
|
-
|
|
136
|
+
}));
|
|
137
|
+
function syncErrors(_x2, _x3) {
|
|
138
|
+
return _syncErrors.apply(this, arguments);
|
|
139
|
+
}
|
|
140
|
+
return syncErrors;
|
|
141
|
+
}()
|
|
134
142
|
}, {
|
|
135
143
|
key: "areSyncResultsEmpty",
|
|
136
144
|
value: function areSyncResultsEmpty(errorSyncResults) {
|
|
@@ -138,8 +146,8 @@ var SyncAction = /*#__PURE__*/function (_AbstractAction, _execute, _syncErrors,
|
|
|
138
146
|
}
|
|
139
147
|
}, {
|
|
140
148
|
key: "generateOptionTypes",
|
|
141
|
-
value: function
|
|
142
|
-
|
|
149
|
+
value: function () {
|
|
150
|
+
var _generateOptionTypes = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(errorGenerator, errorTemplateItems, errorTypesDestinationDir) {
|
|
143
151
|
var resolvedTypesDestination, topLevelItems, optionsResults;
|
|
144
152
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
145
153
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -164,10 +172,13 @@ var SyncAction = /*#__PURE__*/function (_AbstractAction, _execute, _syncErrors,
|
|
|
164
172
|
return _context3.stop();
|
|
165
173
|
}
|
|
166
174
|
}, _callee3, this);
|
|
167
|
-
}))
|
|
168
|
-
|
|
175
|
+
}));
|
|
176
|
+
function generateOptionTypes(_x4, _x5, _x6) {
|
|
177
|
+
return _generateOptionTypes.apply(this, arguments);
|
|
178
|
+
}
|
|
179
|
+
return generateOptionTypes;
|
|
180
|
+
}()
|
|
169
181
|
}]);
|
|
170
182
|
return SyncAction;
|
|
171
183
|
}(_AbstractAction2["default"]);
|
|
172
|
-
exports["default"] = SyncAction;
|
|
173
184
|
//# sourceMappingURL=SyncAction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SyncAction.js","names":["_schema","require","_spruceSkillUtils","_syncErrorOptions","_interopRequireDefault","_syncSchemasOptions","_AbstractAction2","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","SyncAction","_AbstractAction","_execute","_syncErrors","_generateOptionTypes","_inherits2","_super","_this","_classCallCheck2","_len","args","Array","_key","concat","_assertThisInitialized2","syncErrorActionSchema","_createClass2","key","value","execute","_x","_asyncToGenerator2","_regenerator","mark","_callee","options","_errorSyncResults$fil","normalizedOptions","errorTypesDestinationDir","errorClassDestinationDir","schemaSyncAction","errorSyncResults","_ref","schemaTemplateItems","errorTemplateItems","errorWriter","optionsResults","errorClassGeneratedFiles","wrap","_callee$","_context","prev","next","validateAndNormalizeOptions","Action","syncErrors","sent","errors","abrupt","areSyncResultsEmpty","deleteOrphanedDirs","meta","map","item","code","namesUtil","toConst","namePascal","Writer","generateOptionTypes","writeOrAppendErrorsToClass","diskUtil","resolvePath","cwd","files","_toConsumableArray2","stop","deleteDir","_x2","_x3","_callee2","resolvedErrorTypesDestinationDir","syncOptions","_callee2$","_context2","normalizeSchemaValues","syncSchemasActionSchema","schemaTypesDestinationDirOrFile","schemaLookupDir","errorLookupDir","shouldEnableVersioning","globalSchemaNamespace","shouldFetchRemoteSchemas","generateFieldTypes","generateStandaloneTypesFile","deleteDestinationDirIfNoSchemas","shouldFetchCoreSchemas","syncingMessage","_x4","_x5","_x6","_callee3","errorGenerator","resolvedTypesDestination","topLevelItems","_callee3$","_context3","i","isNested","writeOptionsTypesFile","AbstractAction","exports"],"sources":["../../../../src/features/error/actions/SyncAction.ts"],"sourcesContent":["import {\n\tSchemaTemplateItem,\n\tnormalizeSchemaValues,\n\tSchemaValuesWithDefaults,\n} from '@sprucelabs/schema'\nimport { namesUtil } from '@sprucelabs/spruce-skill-utils'\nimport { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { ErrorTemplateItem } from '@sprucelabs/spruce-templates'\nimport { SpruceSchemas } from '#spruce/schemas/schemas.types'\nimport syncErrorActionSchema from '#spruce/schemas/spruceCli/v2020_07_22/syncErrorOptions.schema'\nimport syncSchemasActionSchema from '#spruce/schemas/spruceCli/v2020_07_22/syncSchemasOptions.schema'\nimport AbstractAction from '../../AbstractAction'\nimport { FeatureActionResponse, FeatureAction } from '../../features.types'\nimport ErrorWriter from '../writers/ErrorWriter'\n\ntype OptionsSchema = SpruceSchemas.SpruceCli.v2020_07_22.SyncErrorOptionsSchema\ntype Options = SpruceSchemas.SpruceCli.v2020_07_22.SyncErrorOptions\nexport default class SyncAction extends AbstractAction<OptionsSchema> {\n\tpublic optionsSchema = syncErrorActionSchema\n\tpublic commandAliases = ['sync.errors']\n\tpublic invocationMessage = 'Generating error types... 🤾♀️'\n\n\tpublic async execute(options: Options): Promise<FeatureActionResponse> {\n\t\tconst normalizedOptions = this.validateAndNormalizeOptions(options)\n\t\tconst { errorTypesDestinationDir, errorClassDestinationDir } =\n\t\t\tnormalizedOptions\n\n\t\tconst schemaSyncAction = this.Action(\n\t\t\t'schema',\n\t\t\t'sync'\n\t\t) as any as FeatureAction<SpruceSchemas.SpruceCli.v2020_07_22.SyncSchemasOptionsSchema>\n\n\t\tconst errorSyncResults = await this.syncErrors(\n\t\t\tschemaSyncAction,\n\t\t\tnormalizedOptions\n\t\t)\n\n\t\tif (errorSyncResults.errors) {\n\t\t\treturn errorSyncResults\n\t\t}\n\n\t\tif (this.areSyncResultsEmpty(errorSyncResults)) {\n\t\t\tthis.deleteOrphanedDirs(errorTypesDestinationDir)\n\t\t\treturn {}\n\t\t}\n\n\t\tconst { schemaTemplateItems } = errorSyncResults.meta as {\n\t\t\tschemaTemplateItems: SchemaTemplateItem[]\n\t\t}\n\n\t\tconst errorTemplateItems = schemaTemplateItems.map((item) => ({\n\t\t\t...item,\n\t\t\tcode: namesUtil.toConst(item.namePascal),\n\t\t}))\n\n\t\tconst errorWriter = this.Writer('error')\n\n\t\tconst optionsResults = await this.generateOptionTypes(\n\t\t\terrorWriter,\n\t\t\terrorTemplateItems,\n\t\t\terrorTypesDestinationDir\n\t\t)\n\n\t\tconst errorClassGeneratedFiles =\n\t\t\tawait errorWriter.writeOrAppendErrorsToClass(\n\t\t\t\tdiskUtil.resolvePath(this.cwd, errorClassDestinationDir),\n\t\t\t\terrorTemplateItems\n\t\t\t)\n\n\t\treturn {\n\t\t\tfiles: [\n\t\t\t\t...(errorSyncResults.files ?? []),\n\t\t\t\t...errorClassGeneratedFiles,\n\t\t\t\t...optionsResults,\n\t\t\t],\n\t\t}\n\t}\n\n\tprivate deleteOrphanedDirs(errorTypesDestinationDir: string) {\n\t\tdiskUtil.deleteDir(diskUtil.resolvePath(this.cwd, errorTypesDestinationDir))\n\t}\n\n\tprivate async syncErrors(\n\t\tschemaSyncAction: FeatureAction<SpruceSchemas.SpruceCli.v2020_07_22.SyncSchemasOptionsSchema>,\n\t\tnormalizedOptions: SchemaValuesWithDefaults<SpruceSchemas.SpruceCli.v2020_07_22.SyncErrorOptionsSchema>\n\t) {\n\t\tconst resolvedErrorTypesDestinationDir = diskUtil.resolvePath(\n\t\t\tthis.cwd,\n\t\t\tnormalizedOptions.errorTypesDestinationDir,\n\t\t\t'errors.types.ts'\n\t\t)\n\n\t\tconst syncOptions = normalizeSchemaValues(syncSchemasActionSchema, {\n\t\t\t...normalizedOptions,\n\t\t\tschemaTypesDestinationDirOrFile: resolvedErrorTypesDestinationDir,\n\t\t\tschemaLookupDir: normalizedOptions.errorLookupDir,\n\t\t\tshouldEnableVersioning: false,\n\t\t\tglobalSchemaNamespace: 'SpruceErrors',\n\t\t\tshouldFetchRemoteSchemas: false,\n\t\t\tgenerateFieldTypes: true,\n\t\t\tgenerateStandaloneTypesFile: true,\n\t\t\tdeleteDestinationDirIfNoSchemas: true,\n\t\t\tshouldFetchCoreSchemas: false,\n\t\t\tsyncingMessage: 'Syncing errors...',\n\t\t})\n\n\t\tconst errorSyncResults = await schemaSyncAction.execute(syncOptions)\n\n\t\treturn errorSyncResults\n\t}\n\n\tprivate areSyncResultsEmpty(errorSyncResults: FeatureActionResponse) {\n\t\treturn (\n\t\t\t!errorSyncResults.meta ||\n\t\t\t!errorSyncResults.files ||\n\t\t\terrorSyncResults.files.length === 0\n\t\t)\n\t}\n\n\tprivate async generateOptionTypes(\n\t\terrorGenerator: ErrorWriter,\n\t\terrorTemplateItems: ErrorTemplateItem[],\n\t\terrorTypesDestinationDir: string\n\t) {\n\t\tif (errorTemplateItems.length === 0) {\n\t\t\treturn []\n\t\t}\n\n\t\tconst resolvedTypesDestination = diskUtil.resolvePath(\n\t\t\tthis.cwd,\n\t\t\terrorTypesDestinationDir\n\t\t)\n\n\t\tconst topLevelItems = errorTemplateItems.filter((i) => !i.isNested)\n\n\t\tconst optionsResults = await errorGenerator.writeOptionsTypesFile(\n\t\t\tresolvedTypesDestination,\n\t\t\ttopLevelItems\n\t\t)\n\n\t\treturn optionsResults\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAKA,IAAAC,iBAAA,GAAAD,OAAA;AAIA,IAAAE,iBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,gBAAA,GAAAF,sBAAA,CAAAH,OAAA;AAAiD,SAAAM,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ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,IAAA,UAAAyD,UAAAC,SAAA;UAAA,kBAAAA,SAAA,CAAAvD,IAAA,GAAAuD,SAAA,CAAAtD,IAAA;YAAA;cAAA,MAE5BR,kBAAkB,CAAC3D,MAAM,KAAK,CAAC;gBAAAyH,SAAA,CAAAtD,IAAA;gBAAA;cAAA;cAAA,OAAAsD,SAAA,CAAAhD,MAAA,WAC3B,EAAE;YAAA;cAGJ6C,wBAAwB,GAAGhC,0BAAQ,CAACC,WAAW,CACpD,IAAI,CAACC,GAAG,EACRnC,wBACD,CAAC;cAEKkE,aAAa,GAAG5D,kBAAkB,CAAClE,MAAM,CAAC,UAACiI,CAAC;gBAAA,OAAK,CAACA,CAAC,CAACC,QAAQ;cAAA,EAAC;cAAAF,SAAA,CAAAtD,IAAA;cAAA,OAEtCkD,cAAc,CAACO,qBAAqB,CAChEN,wBAAwB,EACxBC,aACD,CAAC;YAAA;cAHK1D,cAAc,GAAA4D,SAAA,CAAAlD,IAAA;cAAA,OAAAkD,SAAA,CAAAhD,MAAA,WAKbZ,cAAc;YAAA;YAAA;cAAA,OAAA4D,SAAA,CAAA9B,IAAA;UAAA;QAAA,GAAAyB,QAAA;MAAA,CACrB,IAAAvH,KAAA,OAAAE,SAAA;IAAA;EAAA;EAAA,OAAA0B,UAAA;AAAA,EA5HsCoG,2BAAc;AAAAC,OAAA,cAAArG,UAAA"}
|
|
1
|
+
{"version":3,"file":"SyncAction.js","names":["_schema","require","_spruceSkillUtils","_syncErrorOptions","_interopRequireDefault","_syncSchemasOptions","_AbstractAction2","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","SyncAction","exports","_AbstractAction","_inherits2","_super","_this","_classCallCheck2","_len","args","Array","_key","concat","_assertThisInitialized2","syncErrorActionSchema","_createClass2","key","value","_execute","_asyncToGenerator2","_regenerator","mark","_callee","options","_errorSyncResults$fil","normalizedOptions","errorTypesDestinationDir","errorClassDestinationDir","schemaSyncAction","errorSyncResults","_ref","schemaTemplateItems","errorTemplateItems","errorWriter","optionsResults","errorClassGeneratedFiles","wrap","_callee$","_context","prev","next","validateAndNormalizeOptions","Action","syncErrors","sent","errors","abrupt","areSyncResultsEmpty","deleteOrphanedDirs","meta","map","item","code","namesUtil","toConst","namePascal","Writer","generateOptionTypes","writeOrAppendErrorsToClass","diskUtil","resolvePath","cwd","files","_toConsumableArray2","stop","execute","_x","deleteDir","_syncErrors","_callee2","resolvedErrorTypesDestinationDir","syncOptions","_callee2$","_context2","normalizeSchemaValues","syncSchemasActionSchema","schemaTypesDestinationDirOrFile","schemaLookupDir","errorLookupDir","shouldEnableVersioning","globalSchemaNamespace","shouldFetchRemoteSchemas","generateFieldTypes","generateStandaloneTypesFile","deleteDestinationDirIfNoSchemas","shouldFetchCoreSchemas","syncingMessage","_x2","_x3","_generateOptionTypes","_callee3","errorGenerator","resolvedTypesDestination","topLevelItems","_callee3$","_context3","i","isNested","writeOptionsTypesFile","_x4","_x5","_x6","AbstractAction"],"sources":["../../../../src/features/error/actions/SyncAction.ts"],"sourcesContent":["import {\n\tSchemaTemplateItem,\n\tnormalizeSchemaValues,\n\tSchemaValuesWithDefaults,\n} from '@sprucelabs/schema'\nimport { namesUtil } from '@sprucelabs/spruce-skill-utils'\nimport { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { ErrorTemplateItem } from '@sprucelabs/spruce-templates'\nimport { SpruceSchemas } from '#spruce/schemas/schemas.types'\nimport syncErrorActionSchema from '#spruce/schemas/spruceCli/v2020_07_22/syncErrorOptions.schema'\nimport syncSchemasActionSchema from '#spruce/schemas/spruceCli/v2020_07_22/syncSchemasOptions.schema'\nimport AbstractAction from '../../AbstractAction'\nimport { FeatureActionResponse, FeatureAction } from '../../features.types'\nimport ErrorWriter from '../writers/ErrorWriter'\n\ntype OptionsSchema = SpruceSchemas.SpruceCli.v2020_07_22.SyncErrorOptionsSchema\ntype Options = SpruceSchemas.SpruceCli.v2020_07_22.SyncErrorOptions\nexport default class SyncAction extends AbstractAction<OptionsSchema> {\n\tpublic optionsSchema = syncErrorActionSchema\n\tpublic commandAliases = ['sync.errors']\n\tpublic invocationMessage = 'Generating error types... 🤾♀️'\n\n\tpublic async execute(options: Options): Promise<FeatureActionResponse> {\n\t\tconst normalizedOptions = this.validateAndNormalizeOptions(options)\n\t\tconst { errorTypesDestinationDir, errorClassDestinationDir } =\n\t\t\tnormalizedOptions\n\n\t\tconst schemaSyncAction = this.Action(\n\t\t\t'schema',\n\t\t\t'sync'\n\t\t) as any as FeatureAction<SpruceSchemas.SpruceCli.v2020_07_22.SyncSchemasOptionsSchema>\n\n\t\tconst errorSyncResults = await this.syncErrors(\n\t\t\tschemaSyncAction,\n\t\t\tnormalizedOptions\n\t\t)\n\n\t\tif (errorSyncResults.errors) {\n\t\t\treturn errorSyncResults\n\t\t}\n\n\t\tif (this.areSyncResultsEmpty(errorSyncResults)) {\n\t\t\tthis.deleteOrphanedDirs(errorTypesDestinationDir)\n\t\t\treturn {}\n\t\t}\n\n\t\tconst { schemaTemplateItems } = errorSyncResults.meta as {\n\t\t\tschemaTemplateItems: SchemaTemplateItem[]\n\t\t}\n\n\t\tconst errorTemplateItems = schemaTemplateItems.map((item) => ({\n\t\t\t...item,\n\t\t\tcode: namesUtil.toConst(item.namePascal),\n\t\t}))\n\n\t\tconst errorWriter = this.Writer('error')\n\n\t\tconst optionsResults = await this.generateOptionTypes(\n\t\t\terrorWriter,\n\t\t\terrorTemplateItems,\n\t\t\terrorTypesDestinationDir\n\t\t)\n\n\t\tconst errorClassGeneratedFiles =\n\t\t\tawait errorWriter.writeOrAppendErrorsToClass(\n\t\t\t\tdiskUtil.resolvePath(this.cwd, errorClassDestinationDir),\n\t\t\t\terrorTemplateItems\n\t\t\t)\n\n\t\treturn {\n\t\t\tfiles: [\n\t\t\t\t...(errorSyncResults.files ?? []),\n\t\t\t\t...errorClassGeneratedFiles,\n\t\t\t\t...optionsResults,\n\t\t\t],\n\t\t}\n\t}\n\n\tprivate deleteOrphanedDirs(errorTypesDestinationDir: string) {\n\t\tdiskUtil.deleteDir(diskUtil.resolvePath(this.cwd, errorTypesDestinationDir))\n\t}\n\n\tprivate async syncErrors(\n\t\tschemaSyncAction: FeatureAction<SpruceSchemas.SpruceCli.v2020_07_22.SyncSchemasOptionsSchema>,\n\t\tnormalizedOptions: SchemaValuesWithDefaults<SpruceSchemas.SpruceCli.v2020_07_22.SyncErrorOptionsSchema>\n\t) {\n\t\tconst resolvedErrorTypesDestinationDir = diskUtil.resolvePath(\n\t\t\tthis.cwd,\n\t\t\tnormalizedOptions.errorTypesDestinationDir,\n\t\t\t'errors.types.ts'\n\t\t)\n\n\t\tconst syncOptions = normalizeSchemaValues(syncSchemasActionSchema, {\n\t\t\t...normalizedOptions,\n\t\t\tschemaTypesDestinationDirOrFile: resolvedErrorTypesDestinationDir,\n\t\t\tschemaLookupDir: normalizedOptions.errorLookupDir,\n\t\t\tshouldEnableVersioning: false,\n\t\t\tglobalSchemaNamespace: 'SpruceErrors',\n\t\t\tshouldFetchRemoteSchemas: false,\n\t\t\tgenerateFieldTypes: true,\n\t\t\tgenerateStandaloneTypesFile: true,\n\t\t\tdeleteDestinationDirIfNoSchemas: true,\n\t\t\tshouldFetchCoreSchemas: false,\n\t\t\tsyncingMessage: 'Syncing errors...',\n\t\t})\n\n\t\tconst errorSyncResults = await schemaSyncAction.execute(syncOptions)\n\n\t\treturn errorSyncResults\n\t}\n\n\tprivate areSyncResultsEmpty(errorSyncResults: FeatureActionResponse) {\n\t\treturn (\n\t\t\t!errorSyncResults.meta ||\n\t\t\t!errorSyncResults.files ||\n\t\t\terrorSyncResults.files.length === 0\n\t\t)\n\t}\n\n\tprivate async generateOptionTypes(\n\t\terrorGenerator: ErrorWriter,\n\t\terrorTemplateItems: ErrorTemplateItem[],\n\t\terrorTypesDestinationDir: string\n\t) {\n\t\tif (errorTemplateItems.length === 0) {\n\t\t\treturn []\n\t\t}\n\n\t\tconst resolvedTypesDestination = diskUtil.resolvePath(\n\t\t\tthis.cwd,\n\t\t\terrorTypesDestinationDir\n\t\t)\n\n\t\tconst topLevelItems = errorTemplateItems.filter((i) => !i.isNested)\n\n\t\tconst optionsResults = await errorGenerator.writeOptionsTypesFile(\n\t\t\tresolvedTypesDestination,\n\t\t\ttopLevelItems\n\t\t)\n\n\t\treturn optionsResults\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAKA,IAAAC,iBAAA,GAAAD,OAAA;AAIA,IAAAE,iBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,gBAAA,GAAAF,sBAAA,CAAAH,OAAA;AAAiD,SAAAM,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAA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AAjD,MAAA,WAC3B,EAAE;YAAA;cAGJ8C,wBAAwB,GAAGjC,0BAAQ,CAACC,WAAW,CACpD,IAAI,CAACC,GAAG,EACRnC,wBACD,CAAC;cAEKmE,aAAa,GAAG7D,kBAAkB,CAAC/D,MAAM,CAAC,UAAC+H,CAAC;gBAAA,OAAK,CAACA,CAAC,CAACC,QAAQ;cAAA,EAAC;cAAAF,SAAA,CAAAvD,IAAA;cAAA,OAEtCmD,cAAc,CAACO,qBAAqB,CAChEN,wBAAwB,EACxBC,aACD,CAAC;YAAA;cAHK3D,cAAc,GAAA6D,SAAA,CAAAnD,IAAA;cAAA,OAAAmD,SAAA,CAAAjD,MAAA,WAKbZ,cAAc;YAAA;YAAA;cAAA,OAAA6D,SAAA,CAAA/B,IAAA;UAAA;QAAA,GAAA0B,QAAA;MAAA,CACrB;MAAA,SAAAjC,oBAAA0C,GAAA,EAAAC,GAAA,EAAAC,GAAA;QAAA,OAAAZ,oBAAA,CAAApH,KAAA,OAAAE,SAAA;MAAA;MAAA,OAAAkF,mBAAA;IAAA;EAAA;EAAA,OAAAxD,UAAA;AAAA,EA5HsCqG,2BAAc"}
|
|
@@ -23,7 +23,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
23
23
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
24
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
25
25
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
26
|
-
var ErrorWriter = /*#__PURE__*/function (_AbstractWriter
|
|
26
|
+
var ErrorWriter = exports["default"] = /*#__PURE__*/function (_AbstractWriter) {
|
|
27
27
|
(0, _inherits2["default"])(ErrorWriter, _AbstractWriter);
|
|
28
28
|
var _super = _createSuper(ErrorWriter);
|
|
29
29
|
function ErrorWriter() {
|
|
@@ -32,8 +32,8 @@ var ErrorWriter = /*#__PURE__*/function (_AbstractWriter, _writeOrAppendErrorsTo
|
|
|
32
32
|
}
|
|
33
33
|
(0, _createClass2["default"])(ErrorWriter, [{
|
|
34
34
|
key: "writeOrAppendErrorsToClass",
|
|
35
|
-
value: function
|
|
36
|
-
|
|
35
|
+
value: function () {
|
|
36
|
+
var _writeOrAppendErrorsToClass = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(destinationDir, errors) {
|
|
37
37
|
var results, resolvedDestination, errorContents, updates;
|
|
38
38
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
39
39
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -80,12 +80,16 @@ var ErrorWriter = /*#__PURE__*/function (_AbstractWriter, _writeOrAppendErrorsTo
|
|
|
80
80
|
return _context.stop();
|
|
81
81
|
}
|
|
82
82
|
}, _callee, this);
|
|
83
|
-
}))
|
|
84
|
-
|
|
83
|
+
}));
|
|
84
|
+
function writeOrAppendErrorsToClass(_x, _x2) {
|
|
85
|
+
return _writeOrAppendErrorsToClass.apply(this, arguments);
|
|
86
|
+
}
|
|
87
|
+
return writeOrAppendErrorsToClass;
|
|
88
|
+
}()
|
|
85
89
|
}, {
|
|
86
90
|
key: "dropInNewErrorCases",
|
|
87
|
-
value: function
|
|
88
|
-
|
|
91
|
+
value: function () {
|
|
92
|
+
var _dropInNewErrorCases = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(errors, destinationFile) {
|
|
89
93
|
var results, _iterator, _step, error, dropInResults;
|
|
90
94
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
91
95
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -130,12 +134,16 @@ var ErrorWriter = /*#__PURE__*/function (_AbstractWriter, _writeOrAppendErrorsTo
|
|
|
130
134
|
return _context2.stop();
|
|
131
135
|
}
|
|
132
136
|
}, _callee2, this, [[2, 15, 18, 21]]);
|
|
133
|
-
}))
|
|
134
|
-
|
|
137
|
+
}));
|
|
138
|
+
function dropInNewErrorCases(_x3, _x4) {
|
|
139
|
+
return _dropInNewErrorCases.apply(this, arguments);
|
|
140
|
+
}
|
|
141
|
+
return dropInNewErrorCases;
|
|
142
|
+
}()
|
|
135
143
|
}, {
|
|
136
144
|
key: "dropInErrorCaseIfMissing",
|
|
137
|
-
value: function
|
|
138
|
-
|
|
145
|
+
value: function () {
|
|
146
|
+
var _dropInErrorCaseIfMissing = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(error, destinationFile) {
|
|
139
147
|
var results, errorBlock, currentErrorContents, blockMatches, newErrorContents;
|
|
140
148
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
141
149
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -163,8 +171,12 @@ var ErrorWriter = /*#__PURE__*/function (_AbstractWriter, _writeOrAppendErrorsTo
|
|
|
163
171
|
return _context3.stop();
|
|
164
172
|
}
|
|
165
173
|
}, _callee3, this);
|
|
166
|
-
}))
|
|
167
|
-
|
|
174
|
+
}));
|
|
175
|
+
function dropInErrorCaseIfMissing(_x5, _x6) {
|
|
176
|
+
return _dropInErrorCaseIfMissing.apply(this, arguments);
|
|
177
|
+
}
|
|
178
|
+
return dropInErrorCaseIfMissing;
|
|
179
|
+
}()
|
|
168
180
|
}, {
|
|
169
181
|
key: "doesErrorCaseExist",
|
|
170
182
|
value: function doesErrorCaseExist(currentContents, error) {
|
|
@@ -172,8 +184,8 @@ var ErrorWriter = /*#__PURE__*/function (_AbstractWriter, _writeOrAppendErrorsTo
|
|
|
172
184
|
}
|
|
173
185
|
}, {
|
|
174
186
|
key: "writeOptionsTypesFile",
|
|
175
|
-
value: function
|
|
176
|
-
|
|
187
|
+
value: function () {
|
|
188
|
+
var _writeOptionsTypesFile = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(destinationDir, errorTemplateItems) {
|
|
177
189
|
var contents, destination, results;
|
|
178
190
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
179
191
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -193,12 +205,16 @@ var ErrorWriter = /*#__PURE__*/function (_AbstractWriter, _writeOrAppendErrorsTo
|
|
|
193
205
|
return _context4.stop();
|
|
194
206
|
}
|
|
195
207
|
}, _callee4, this);
|
|
196
|
-
}))
|
|
197
|
-
|
|
208
|
+
}));
|
|
209
|
+
function writeOptionsTypesFile(_x7, _x8) {
|
|
210
|
+
return _writeOptionsTypesFile.apply(this, arguments);
|
|
211
|
+
}
|
|
212
|
+
return writeOptionsTypesFile;
|
|
213
|
+
}()
|
|
198
214
|
}, {
|
|
199
215
|
key: "writePlugin",
|
|
200
|
-
value: function
|
|
201
|
-
|
|
216
|
+
value: function () {
|
|
217
|
+
var _writePlugin = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(cwd) {
|
|
202
218
|
var destination, pluginContents, results;
|
|
203
219
|
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
204
220
|
while (1) switch (_context5.prev = _context5.next) {
|
|
@@ -215,10 +231,13 @@ var ErrorWriter = /*#__PURE__*/function (_AbstractWriter, _writeOrAppendErrorsTo
|
|
|
215
231
|
return _context5.stop();
|
|
216
232
|
}
|
|
217
233
|
}, _callee5, this);
|
|
218
|
-
}))
|
|
219
|
-
|
|
234
|
+
}));
|
|
235
|
+
function writePlugin(_x9) {
|
|
236
|
+
return _writePlugin.apply(this, arguments);
|
|
237
|
+
}
|
|
238
|
+
return writePlugin;
|
|
239
|
+
}()
|
|
220
240
|
}]);
|
|
221
241
|
return ErrorWriter;
|
|
222
242
|
}(_AbstractWriter2["default"]);
|
|
223
|
-
exports["default"] = ErrorWriter;
|
|
224
243
|
//# sourceMappingURL=ErrorWriter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorWriter.js","names":["_spruceSkillUtils","require","_AbstractWriter2","_interopRequireDefault","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_e","f","TypeError","normalCompletion","didErr","err","call","step","next","_e2","minLen","_arrayLikeToArray","Object","prototype","toString","slice","constructor","name","from","test","arr","len","arr2","ownKeys","r","t","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","Reflect","construct","_possibleConstructorReturn2","sham","Proxy","Boolean","valueOf","ErrorWriter","_AbstractWriter","_writeOrAppendErrorsToClass","_dropInNewErrorCases","_dropInErrorCaseIfMissing","_writeOptionsTypesFile","_writePlugin","_inherits2","_super","_classCallCheck2","_createClass2","key","writeOrAppendErrorsToClass","_x","_x2","_asyncToGenerator2","_regenerator","mark","_callee","destinationDir","errors","results","resolvedDestination","errorContents","updates","wrap","_callee$","_context","prev","Error","diskUtil","resolvePath","doesFileExist","ui","startLoading","templates","error","isNested","writeFileIfChangedMixinResults","sent","dropInNewErrorCases","description","concat","abrupt","stop","_x3","_x4","_callee2","destinationFile","_iterator","_step","dropInResults","_callee2$","_context2","dropInErrorCaseIfMissing","_toConsumableArray2","t0","finish","_x5","_x6","_callee3","errorBlock","currentErrorContents","blockMatches","newErrorContents","_callee3$","_context3","renderClassDefinition","readFile","search","doesErrorCaseExist","substring","code","currentContents","RegExp","writeOptionsTypesFile","_x7","_x8","_callee4","errorTemplateItems","contents","destination","_callee4$","_context4","errorOptionsTypes","options","lint","writePlugin","_x9","_callee5","cwd","pluginContents","_callee5$","_context5","resolveHashSprucePath","errorPlugin","AbstractWriter","exports"],"sources":["../../../../src/features/error/writers/ErrorWriter.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { ErrorTemplateItem } from '@sprucelabs/spruce-templates'\nimport { GeneratedFile } from '../../../types/cli.types'\nimport AbstractWriter, { WriteResults } from '../../../writers/AbstractWriter'\n\nexport default class ErrorWriter extends AbstractWriter {\n\tpublic async writeOrAppendErrorsToClass(\n\t\tdestinationDir: string,\n\t\terrors: ErrorTemplateItem[]\n\t): Promise<WriteResults> {\n\t\tlet results: WriteResults = []\n\n\t\tif (errors.length === 0) {\n\t\t\t// todo move to proper error\n\t\t\tthrow new Error('Need at least one error')\n\t\t}\n\n\t\tconst resolvedDestination = diskUtil.resolvePath(\n\t\t\tdestinationDir,\n\t\t\t`SpruceError.ts`\n\t\t)\n\n\t\tif (!diskUtil.doesFileExist(resolvedDestination)) {\n\t\t\tthis.ui.startLoading('Creating Error class')\n\n\t\t\tconst errorContents = this.templates.error({\n\t\t\t\terrors: errors.filter((error) => !error.isNested),\n\t\t\t})\n\t\t\tresults = await this.writeFileIfChangedMixinResults(\n\t\t\t\tresolvedDestination,\n\t\t\t\terrorContents,\n\t\t\t\t'A new subclass of SpruceBaseError where you can control your error messaging.',\n\t\t\t\tresults\n\t\t\t)\n\t\t} else {\n\t\t\tthis.ui.startLoading('Updating Error class')\n\n\t\t\tconst updates = await this.dropInNewErrorCases(\n\t\t\t\terrors,\n\t\t\t\tresolvedDestination\n\t\t\t)\n\t\t\tif (updates.length > 0) {\n\t\t\t\tresults.push({\n\t\t\t\t\t...updates[0],\n\t\t\t\t\tdescription: `${updates.length} new error cases were dropped in.`,\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\treturn results\n\t}\n\n\tprivate async dropInNewErrorCases(\n\t\terrors: ErrorTemplateItem[],\n\t\tdestinationFile: string\n\t) {\n\t\tlet results: GeneratedFile[] = []\n\n\t\tfor (const error of errors) {\n\t\t\tif (!error.isNested) {\n\t\t\t\tconst dropInResults = await this.dropInErrorCaseIfMissing(\n\t\t\t\t\terror,\n\t\t\t\t\tdestinationFile\n\t\t\t\t)\n\t\t\t\tresults.push(...dropInResults)\n\t\t\t}\n\t\t}\n\n\t\treturn results\n\t}\n\n\tprivate async dropInErrorCaseIfMissing(\n\t\terror: ErrorTemplateItem,\n\t\tdestinationFile: string\n\t) {\n\t\tlet results: GeneratedFile[] = []\n\t\tconst errorBlock = this.templates.error({\n\t\t\terrors: [error],\n\t\t\trenderClassDefinition: false,\n\t\t})\n\n\t\t// Try and drop in the block right before \"default:\"\n\t\tconst currentErrorContents = diskUtil.readFile(destinationFile)\n\t\tconst blockMatches = currentErrorContents.search(/default:/g)\n\t\tif (\n\t\t\tblockMatches > -1 &&\n\t\t\t!this.doesErrorCaseExist(currentErrorContents, error)\n\t\t) {\n\t\t\tconst newErrorContents =\n\t\t\t\tcurrentErrorContents.substring(0, blockMatches) +\n\t\t\t\t'\\n' +\n\t\t\t\terrorBlock +\n\t\t\t\t'\\n' +\n\t\t\t\tcurrentErrorContents.substring(blockMatches)\n\n\t\t\tresults = await this.writeFileIfChangedMixinResults(\n\t\t\t\tdestinationFile,\n\t\t\t\tnewErrorContents,\n\t\t\t\t`A new block was added to handle ${error.code}.`,\n\t\t\t\tresults\n\t\t\t)\n\t\t}\n\t\treturn results\n\t}\n\n\tprivate doesErrorCaseExist(\n\t\tcurrentContents: string,\n\t\terror: ErrorTemplateItem\n\t) {\n\t\treturn currentContents.search(new RegExp(`case '${error.code}':`)) > -1\n\t}\n\n\tpublic async writeOptionsTypesFile(\n\t\tdestinationDir: string,\n\t\terrorTemplateItems: ErrorTemplateItem[]\n\t): Promise<WriteResults> {\n\t\tconst contents = this.templates.errorOptionsTypes({\n\t\t\toptions: errorTemplateItems,\n\t\t})\n\n\t\tconst destination = diskUtil.resolvePath(destinationDir, 'options.types.ts')\n\n\t\tthis.ui.startLoading('Updating error options...')\n\n\t\tconst results = this.writeFileIfChangedMixinResults(\n\t\t\tdestination,\n\t\t\tcontents,\n\t\t\t'A union of all possible error codes and their options.'\n\t\t)\n\n\t\tawait this.lint(destination)\n\n\t\treturn results\n\t}\n\n\tpublic async writePlugin(cwd: string) {\n\t\tconst destination = diskUtil.resolveHashSprucePath(\n\t\t\tcwd,\n\t\t\t'features',\n\t\t\t'error.plugin.ts'\n\t\t)\n\n\t\tconst pluginContents = this.templates.errorPlugin()\n\n\t\tconst results = this.writeFileIfChangedMixinResults(\n\t\t\tdestination,\n\t\t\tpluginContents,\n\t\t\t'Supports your skill with Error generation and handling.'\n\t\t)\n\n\t\tawait this.lint(destination)\n\n\t\treturn results\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAGA,IAAAC,gBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA8E,SAAAG,2BAAAC,CAAA,EAAAC,cAAA,QAAAC,EAAA,UAAAC,MAAA,oBAAAH,CAAA,CAAAG,MAAA,CAAAC,QAAA,KAAAJ,CAAA,qBAAAE,EAAA,QAAAG,KAAA,CAAAC,OAAA,CAAAN,CAAA,MAAAE,EAAA,GAAAK,2BAAA,CAAAP,CAAA,MAAAC,cAAA,IAAAD,CAAA,WAAAA,CAAA,CAAAQ,MAAA,qBAAAN,EAAA,EAAAF,CAAA,GAAAE,EAAA,MAAAO,CAAA,UAAAC,CAAA,YAAAA,EAAA,e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AwE,SAAA,CAAAjD,IAAA;UAAA;QAAA,GAAA6C,QAAA;MAAA,CACd,IAAAjH,KAAA,OAAAE,SAAA;IAAA;EAAA;EAAA,OAAAsB,WAAA;AAAA,EApJuCgG,2BAAc;AAAAC,OAAA,cAAAjG,WAAA"}
|
|
1
|
+
{"version":3,"file":"ErrorWriter.js","names":["_spruceSkillUtils","require","_AbstractWriter2","_interopRequireDefault","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_e","f","TypeError","normalCompletion","didErr","err","call","step","next","_e2","minLen","_arrayLikeToArray","Object","prototype","toString","slice","constructor","name","from","test","arr","len","arr2","ownKeys","r","t","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","Reflect","construct","_possibleConstructorReturn2","sham","Proxy","Boolean","valueOf","ErrorWriter","exports","_AbstractWriter","_inherits2","_super","_classCallCheck2","_createClass2","key","_writeOrAppendErrorsToClass","_asyncToGenerator2","_regenerator","mark","_callee","destinationDir","errors","results","resolvedDestination","errorContents","updates","wrap","_callee$","_context","prev","Error","diskUtil","resolvePath","doesFileExist","ui","startLoading","templates","error","isNested","writeFileIfChangedMixinResults","sent","dropInNewErrorCases","description","concat","abrupt","stop","writeOrAppendErrorsToClass","_x","_x2","_dropInNewErrorCases","_callee2","destinationFile","_iterator","_step","dropInResults","_callee2$","_context2","dropInErrorCaseIfMissing","_toConsumableArray2","t0","finish","_x3","_x4","_dropInErrorCaseIfMissing","_callee3","errorBlock","currentErrorContents","blockMatches","newErrorContents","_callee3$","_context3","renderClassDefinition","readFile","search","doesErrorCaseExist","substring","code","_x5","_x6","currentContents","RegExp","_writeOptionsTypesFile","_callee4","errorTemplateItems","contents","destination","_callee4$","_context4","errorOptionsTypes","options","lint","writeOptionsTypesFile","_x7","_x8","_writePlugin","_callee5","cwd","pluginContents","_callee5$","_context5","resolveHashSprucePath","errorPlugin","writePlugin","_x9","AbstractWriter"],"sources":["../../../../src/features/error/writers/ErrorWriter.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { ErrorTemplateItem } from '@sprucelabs/spruce-templates'\nimport { GeneratedFile } from '../../../types/cli.types'\nimport AbstractWriter, { WriteResults } from '../../../writers/AbstractWriter'\n\nexport default class ErrorWriter extends AbstractWriter {\n\tpublic async writeOrAppendErrorsToClass(\n\t\tdestinationDir: string,\n\t\terrors: ErrorTemplateItem[]\n\t): Promise<WriteResults> {\n\t\tlet results: WriteResults = []\n\n\t\tif (errors.length === 0) {\n\t\t\t// todo move to proper error\n\t\t\tthrow new Error('Need at least one error')\n\t\t}\n\n\t\tconst resolvedDestination = diskUtil.resolvePath(\n\t\t\tdestinationDir,\n\t\t\t`SpruceError.ts`\n\t\t)\n\n\t\tif (!diskUtil.doesFileExist(resolvedDestination)) {\n\t\t\tthis.ui.startLoading('Creating Error class')\n\n\t\t\tconst errorContents = this.templates.error({\n\t\t\t\terrors: errors.filter((error) => !error.isNested),\n\t\t\t})\n\t\t\tresults = await this.writeFileIfChangedMixinResults(\n\t\t\t\tresolvedDestination,\n\t\t\t\terrorContents,\n\t\t\t\t'A new subclass of SpruceBaseError where you can control your error messaging.',\n\t\t\t\tresults\n\t\t\t)\n\t\t} else {\n\t\t\tthis.ui.startLoading('Updating Error class')\n\n\t\t\tconst updates = await this.dropInNewErrorCases(\n\t\t\t\terrors,\n\t\t\t\tresolvedDestination\n\t\t\t)\n\t\t\tif (updates.length > 0) {\n\t\t\t\tresults.push({\n\t\t\t\t\t...updates[0],\n\t\t\t\t\tdescription: `${updates.length} new error cases were dropped in.`,\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\treturn results\n\t}\n\n\tprivate async dropInNewErrorCases(\n\t\terrors: ErrorTemplateItem[],\n\t\tdestinationFile: string\n\t) {\n\t\tlet results: GeneratedFile[] = []\n\n\t\tfor (const error of errors) {\n\t\t\tif (!error.isNested) {\n\t\t\t\tconst dropInResults = await this.dropInErrorCaseIfMissing(\n\t\t\t\t\terror,\n\t\t\t\t\tdestinationFile\n\t\t\t\t)\n\t\t\t\tresults.push(...dropInResults)\n\t\t\t}\n\t\t}\n\n\t\treturn results\n\t}\n\n\tprivate async dropInErrorCaseIfMissing(\n\t\terror: ErrorTemplateItem,\n\t\tdestinationFile: string\n\t) {\n\t\tlet results: GeneratedFile[] = []\n\t\tconst errorBlock = this.templates.error({\n\t\t\terrors: [error],\n\t\t\trenderClassDefinition: false,\n\t\t})\n\n\t\t// Try and drop in the block right before \"default:\"\n\t\tconst currentErrorContents = diskUtil.readFile(destinationFile)\n\t\tconst blockMatches = currentErrorContents.search(/default:/g)\n\t\tif (\n\t\t\tblockMatches > -1 &&\n\t\t\t!this.doesErrorCaseExist(currentErrorContents, error)\n\t\t) {\n\t\t\tconst newErrorContents =\n\t\t\t\tcurrentErrorContents.substring(0, blockMatches) +\n\t\t\t\t'\\n' +\n\t\t\t\terrorBlock +\n\t\t\t\t'\\n' +\n\t\t\t\tcurrentErrorContents.substring(blockMatches)\n\n\t\t\tresults = await this.writeFileIfChangedMixinResults(\n\t\t\t\tdestinationFile,\n\t\t\t\tnewErrorContents,\n\t\t\t\t`A new block was added to handle ${error.code}.`,\n\t\t\t\tresults\n\t\t\t)\n\t\t}\n\t\treturn results\n\t}\n\n\tprivate doesErrorCaseExist(\n\t\tcurrentContents: string,\n\t\terror: ErrorTemplateItem\n\t) {\n\t\treturn currentContents.search(new RegExp(`case '${error.code}':`)) > -1\n\t}\n\n\tpublic async writeOptionsTypesFile(\n\t\tdestinationDir: string,\n\t\terrorTemplateItems: ErrorTemplateItem[]\n\t): Promise<WriteResults> {\n\t\tconst contents = this.templates.errorOptionsTypes({\n\t\t\toptions: errorTemplateItems,\n\t\t})\n\n\t\tconst destination = diskUtil.resolvePath(destinationDir, 'options.types.ts')\n\n\t\tthis.ui.startLoading('Updating error options...')\n\n\t\tconst results = this.writeFileIfChangedMixinResults(\n\t\t\tdestination,\n\t\t\tcontents,\n\t\t\t'A union of all possible error codes and their options.'\n\t\t)\n\n\t\tawait this.lint(destination)\n\n\t\treturn results\n\t}\n\n\tpublic async writePlugin(cwd: string) {\n\t\tconst destination = diskUtil.resolveHashSprucePath(\n\t\t\tcwd,\n\t\t\t'features',\n\t\t\t'error.plugin.ts'\n\t\t)\n\n\t\tconst pluginContents = this.templates.errorPlugin()\n\n\t\tconst results = this.writeFileIfChangedMixinResults(\n\t\t\tdestination,\n\t\t\tpluginContents,\n\t\t\t'Supports your skill with Error generation and handling.'\n\t\t)\n\n\t\tawait this.lint(destination)\n\n\t\treturn results\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAGA,IAAAC,gBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA8E,SAAAG,2BAAAC,CAAA,EAAAC,cAAA,QAAAC,EAAA,UAAAC,MAAA,oBAAAH,CAAA,CAAAG,MAAA,CAAAC,QAAA,KAAAJ,CAAA,qBAAAE,EAAA,QAAAG,KAAA,CAAAC,OAAA,CAAAN,CAAA,MAAAE,EAAA,GAAAK,2BAAA,CAAAP,CAAA,MAAAC,cAAA,IAAAD,CAAA,WAAAA,CAAA,CAAAQ,MAAA,qBAAAN,EAAA,EAAAF,CAAA,GAAAE,EAAA,MAAAO,CAAA,UAAAC,CAAA,YAAAA,EAAA,eAAAC,CAAA,EAAAD,CAAA,EAAAE,CAAA,WAAAA,EAAA,QAAAH,CAAA,IAAAT,CAAA,CAAAQ,MAAA,WAAAK,IAAA,mBAAAA,IAAA,SAAAC,KAAA,EAAAd,CAAA,CAAAS,CAAA,UAAAM,CAAA,WAAAA,EAAAC,EAAA,UAAAA,EAAA,KAAAC,CAAA,EAAAP,CAAA,gBAAAQ,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;IAAA;EAAA;EAAA,OAAA/F,WAAA;AAAA,EApJuCiG,2BAAc"}
|
|
@@ -23,7 +23,7 @@ var _EventContractBuilder = _interopRequireDefault(require("./builders/EventCont
|
|
|
23
23
|
var _EventStore = _interopRequireDefault(require("./stores/EventStore"));
|
|
24
24
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
25
25
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
26
|
-
var EventFeature = /*#__PURE__*/function (_AbstractFeature
|
|
26
|
+
var EventFeature = exports["default"] = /*#__PURE__*/function (_AbstractFeature) {
|
|
27
27
|
(0, _inherits2["default"])(EventFeature, _AbstractFeature);
|
|
28
28
|
var _super = _createSuper(EventFeature);
|
|
29
29
|
function EventFeature(options) {
|
|
@@ -62,8 +62,8 @@ var EventFeature = /*#__PURE__*/function (_AbstractFeature, _afterPackageInstall
|
|
|
62
62
|
}
|
|
63
63
|
(0, _createClass2["default"])(EventFeature, [{
|
|
64
64
|
key: "afterPackageInstall",
|
|
65
|
-
value: function
|
|
66
|
-
|
|
65
|
+
value: function () {
|
|
66
|
+
var _afterPackageInstall = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
67
67
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
68
68
|
while (1) switch (_context.prev = _context.next) {
|
|
69
69
|
case 0:
|
|
@@ -74,12 +74,16 @@ var EventFeature = /*#__PURE__*/function (_AbstractFeature, _afterPackageInstall
|
|
|
74
74
|
return _context.stop();
|
|
75
75
|
}
|
|
76
76
|
}, _callee, this);
|
|
77
|
-
}))
|
|
78
|
-
|
|
77
|
+
}));
|
|
78
|
+
function afterPackageInstall() {
|
|
79
|
+
return _afterPackageInstall.apply(this, arguments);
|
|
80
|
+
}
|
|
81
|
+
return afterPackageInstall;
|
|
82
|
+
}()
|
|
79
83
|
}, {
|
|
80
84
|
key: "optionallySyncListeners",
|
|
81
|
-
value: function
|
|
82
|
-
|
|
85
|
+
value: function () {
|
|
86
|
+
var _optionallySyncListeners = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
83
87
|
var results, isSkillInstalled;
|
|
84
88
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
85
89
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -104,12 +108,16 @@ var EventFeature = /*#__PURE__*/function (_AbstractFeature, _afterPackageInstall
|
|
|
104
108
|
return _context2.stop();
|
|
105
109
|
}
|
|
106
110
|
}, _callee2, this);
|
|
107
|
-
}))
|
|
108
|
-
|
|
111
|
+
}));
|
|
112
|
+
function optionallySyncListeners() {
|
|
113
|
+
return _optionallySyncListeners.apply(this, arguments);
|
|
114
|
+
}
|
|
115
|
+
return optionallySyncListeners;
|
|
116
|
+
}()
|
|
109
117
|
}, {
|
|
110
118
|
key: "handleWillExecute",
|
|
111
|
-
value: function
|
|
112
|
-
|
|
119
|
+
value: function () {
|
|
120
|
+
var _handleWillExecute = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(payload) {
|
|
113
121
|
var featureCode, actionCode, results, combined, settings, isInstalled, isRemoteRelevant, remoteResults;
|
|
114
122
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
115
123
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -146,12 +154,16 @@ var EventFeature = /*#__PURE__*/function (_AbstractFeature, _afterPackageInstall
|
|
|
146
154
|
return _context3.stop();
|
|
147
155
|
}
|
|
148
156
|
}, _callee3, this);
|
|
149
|
-
}))
|
|
150
|
-
|
|
157
|
+
}));
|
|
158
|
+
function handleWillExecute(_x) {
|
|
159
|
+
return _handleWillExecute.apply(this, arguments);
|
|
160
|
+
}
|
|
161
|
+
return handleWillExecute;
|
|
162
|
+
}()
|
|
151
163
|
}, {
|
|
152
164
|
key: "syncListenersAndMixinResults",
|
|
153
|
-
value: function
|
|
154
|
-
|
|
165
|
+
value: function () {
|
|
166
|
+
var _syncListenersAndMixinResults = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(results) {
|
|
155
167
|
var syncResults;
|
|
156
168
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
157
169
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -167,12 +179,16 @@ var EventFeature = /*#__PURE__*/function (_AbstractFeature, _afterPackageInstall
|
|
|
167
179
|
return _context4.stop();
|
|
168
180
|
}
|
|
169
181
|
}, _callee4, this);
|
|
170
|
-
}))
|
|
171
|
-
|
|
182
|
+
}));
|
|
183
|
+
function syncListenersAndMixinResults(_x2) {
|
|
184
|
+
return _syncListenersAndMixinResults.apply(this, arguments);
|
|
185
|
+
}
|
|
186
|
+
return syncListenersAndMixinResults;
|
|
187
|
+
}()
|
|
172
188
|
}, {
|
|
173
189
|
key: "handleDidExecute",
|
|
174
|
-
value: function
|
|
175
|
-
|
|
190
|
+
value: function () {
|
|
191
|
+
var _handleDidExecute = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(payload) {
|
|
176
192
|
var featureCode, actionCode, isInstalled, results, isUpgrade;
|
|
177
193
|
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
178
194
|
while (1) switch (_context5.prev = _context5.next) {
|
|
@@ -206,8 +222,12 @@ var EventFeature = /*#__PURE__*/function (_AbstractFeature, _afterPackageInstall
|
|
|
206
222
|
return _context5.stop();
|
|
207
223
|
}
|
|
208
224
|
}, _callee5, this);
|
|
209
|
-
}))
|
|
210
|
-
|
|
225
|
+
}));
|
|
226
|
+
function handleDidExecute(_x3) {
|
|
227
|
+
return _handleDidExecute.apply(this, arguments);
|
|
228
|
+
}
|
|
229
|
+
return handleDidExecute;
|
|
230
|
+
}()
|
|
211
231
|
}, {
|
|
212
232
|
key: "combineCodes",
|
|
213
233
|
value: function combineCodes(featureCode, actionCode) {
|
|
@@ -215,8 +235,8 @@ var EventFeature = /*#__PURE__*/function (_AbstractFeature, _afterPackageInstall
|
|
|
215
235
|
}
|
|
216
236
|
}, {
|
|
217
237
|
key: "appendRemoteToResultsOrPrompt",
|
|
218
|
-
value: function
|
|
219
|
-
|
|
238
|
+
value: function () {
|
|
239
|
+
var _appendRemoteToResultsOrPrompt = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
|
|
220
240
|
var remote, r, results;
|
|
221
241
|
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
222
242
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -249,12 +269,16 @@ var EventFeature = /*#__PURE__*/function (_AbstractFeature, _afterPackageInstall
|
|
|
249
269
|
return _context6.stop();
|
|
250
270
|
}
|
|
251
271
|
}, _callee6, this);
|
|
252
|
-
}))
|
|
253
|
-
|
|
272
|
+
}));
|
|
273
|
+
function appendRemoteToResultsOrPrompt() {
|
|
274
|
+
return _appendRemoteToResultsOrPrompt.apply(this, arguments);
|
|
275
|
+
}
|
|
276
|
+
return appendRemoteToResultsOrPrompt;
|
|
277
|
+
}()
|
|
254
278
|
}, {
|
|
255
279
|
key: "handleDidFetchSchemas",
|
|
256
|
-
value: function
|
|
257
|
-
|
|
280
|
+
value: function () {
|
|
281
|
+
var _handleDidFetchSchemas = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(payload) {
|
|
258
282
|
var isInstalled, lastSync, _payload$schemas, _uniqueSchemas$schema, writer, uniqueSchemas;
|
|
259
283
|
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
260
284
|
while (1) switch (_context7.prev = _context7.next) {
|
|
@@ -285,8 +309,12 @@ var EventFeature = /*#__PURE__*/function (_AbstractFeature, _afterPackageInstall
|
|
|
285
309
|
return _context7.stop();
|
|
286
310
|
}
|
|
287
311
|
}, _callee7, this);
|
|
288
|
-
}))
|
|
289
|
-
|
|
312
|
+
}));
|
|
313
|
+
function handleDidFetchSchemas(_x4) {
|
|
314
|
+
return _handleDidFetchSchemas.apply(this, arguments);
|
|
315
|
+
}
|
|
316
|
+
return handleDidFetchSchemas;
|
|
317
|
+
}()
|
|
290
318
|
}, {
|
|
291
319
|
key: "getEventContractBuilder",
|
|
292
320
|
value: function getEventContractBuilder() {
|
|
@@ -315,5 +343,4 @@ var EventFeature = /*#__PURE__*/function (_AbstractFeature, _afterPackageInstall
|
|
|
315
343
|
}]);
|
|
316
344
|
return EventFeature;
|
|
317
345
|
}(_AbstractFeature2["default"]);
|
|
318
|
-
exports["default"] = EventFeature;
|
|
319
346
|
//# sourceMappingURL=EventFeature.js.map
|