@sprucelabs/spruce-cli 22.1.13 → 22.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.DS_Store +0 -0
- package/.env +25 -0
- package/.env-dev +24 -0
- package/.eslintcache +1 -0
- package/build/.spruce/errors/errors.types.d.ts +137 -123
- package/build/.spruce/errors/options.types.d.ts +9 -3
- package/build/.spruce/errors/spruceCli/actionCancelled.schema.js +1 -1
- package/build/.spruce/errors/spruceCli/actionCancelled.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/appViewControllerAlreadyExists.schema.d.ts +3 -0
- package/build/.spruce/errors/spruceCli/appViewControllerAlreadyExists.schema.js +12 -0
- package/build/.spruce/errors/spruceCli/appViewControllerAlreadyExists.schema.js.map +1 -0
- package/build/.spruce/errors/spruceCli/bootError.schema.js +1 -1
- package/build/.spruce/errors/spruceCli/bootError.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/buildFailed.schema.js +3 -3
- package/build/.spruce/errors/spruceCli/buildFailed.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/cacheNotEnabled.schema.js +1 -1
- package/build/.spruce/errors/spruceCli/cacheNotEnabled.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/cannotPromptInCi.schema.d.ts +3 -0
- package/build/.spruce/errors/spruceCli/cannotPromptInCi.schema.js +12 -0
- package/build/.spruce/errors/spruceCli/cannotPromptInCi.schema.js.map +1 -0
- package/build/.spruce/errors/spruceCli/commandAborted.schema.js +3 -3
- package/build/.spruce/errors/spruceCli/commandAborted.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/commandBlocked.schema.js +5 -5
- package/build/.spruce/errors/spruceCli/commandBlocked.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/commandNotImplemented.schema.js +5 -5
- package/build/.spruce/errors/spruceCli/commandNotImplemented.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/createAutoloaderFailed.schema.js +10 -10
- package/build/.spruce/errors/spruceCli/createAutoloaderFailed.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/dependencyExists.schema.js +3 -3
- package/build/.spruce/errors/spruceCli/dependencyExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/deployFailed.schema.js +3 -13
- package/build/.spruce/errors/spruceCli/deployFailed.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/directoryEmpty.schema.js +3 -3
- package/build/.spruce/errors/spruceCli/directoryEmpty.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/directoryNotSkill.schema.js +1 -1
- package/build/.spruce/errors/spruceCli/directoryNotSkill.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/dockerNotStarted.schema.js +1 -1
- package/build/.spruce/errors/spruceCli/dockerNotStarted.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/executingCommandFailed.schema.js +11 -11
- package/build/.spruce/errors/spruceCli/executingCommandFailed.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/failedToImport.schema.js +3 -3
- package/build/.spruce/errors/spruceCli/failedToImport.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/featureNotInstalled.schema.js +3 -3
- package/build/.spruce/errors/spruceCli/featureNotInstalled.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/fileExists.schema.js +3 -3
- package/build/.spruce/errors/spruceCli/fileExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/generic.schema.js +4 -4
- package/build/.spruce/errors/spruceCli/generic.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/invalidCommand.schema.js +3 -3
- package/build/.spruce/errors/spruceCli/invalidCommand.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/invalidEventContract.schema.js +5 -5
- package/build/.spruce/errors/spruceCli/invalidEventContract.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/invalidFeatureCode.schema.js +3 -3
- package/build/.spruce/errors/spruceCli/invalidFeatureCode.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/invalidTestDirectory.schema.js +3 -3
- package/build/.spruce/errors/spruceCli/invalidTestDirectory.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/lintFailed.schema.js +3 -3
- package/build/.spruce/errors/spruceCli/lintFailed.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/mercuryResponseError.schema.js +3 -3
- package/build/.spruce/errors/spruceCli/mercuryResponseError.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/missingDependencies.schema.js +3 -3
- package/build/.spruce/errors/spruceCli/missingDependencies.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/missingDependenciesDependency.schema.js +5 -5
- package/build/.spruce/errors/spruceCli/missingDependenciesDependency.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/noOrganizationsFound.schema.js +1 -1
- package/build/.spruce/errors/spruceCli/noOrganizationsFound.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/noSkillsRegistered.schema.js +1 -1
- package/build/.spruce/errors/spruceCli/noSkillsRegistered.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/notImplemented.schema.js +1 -1
- package/build/.spruce/errors/spruceCli/notImplemented.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/notLoggedIn.schema.js +1 -1
- package/build/.spruce/errors/spruceCli/notLoggedIn.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/schemaExists.schema.js +5 -5
- package/build/.spruce/errors/spruceCli/schemaExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/schemaFailedToImport.schema.js +3 -3
- package/build/.spruce/errors/spruceCli/schemaFailedToImport.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/schemaTemplateItemBuildingFailed.schema.js +9 -9
- package/build/.spruce/errors/spruceCli/schemaTemplateItemBuildingFailed.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/skillNotFound.schema.js +1 -1
- package/build/.spruce/errors/spruceCli/skillNotFound.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/skillNotRegistered.schema.js +1 -1
- package/build/.spruce/errors/spruceCli/skillNotRegistered.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/skillViewExists.schema.js +3 -3
- package/build/.spruce/errors/spruceCli/skillViewExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/storeExists.schema.js +1 -1
- package/build/.spruce/errors/spruceCli/storeExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/testFailed.schema.js +7 -7
- package/build/.spruce/errors/spruceCli/testFailed.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/themeExists.schema.js +1 -1
- package/build/.spruce/errors/spruceCli/themeExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/transportAlreadyExists.schema.js +3 -3
- package/build/.spruce/errors/spruceCli/transportAlreadyExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/viewPluginAlreadyExists.schema.js +3 -3
- package/build/.spruce/errors/spruceCli/viewPluginAlreadyExists.schema.js.map +1 -1
- package/build/.spruce/errors/spruceCli/vscodeNotInstalled.schema.js +1 -1
- package/build/.spruce/errors/spruceCli/vscodeNotInstalled.schema.js.map +1 -1
- package/build/GlobalEmitter.js.map +1 -1
- package/build/__tests__/behavioral/features/InstallingFeaturesDirectly.test.d.ts +17 -0
- package/build/__tests__/behavioral/features/InstallingFeaturesDirectly.test.js +142 -0
- package/build/__tests__/behavioral/features/InstallingFeaturesDirectly.test.js.map +1 -0
- package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js +1 -1
- package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js.map +1 -1
- package/build/__tests__/behavioral/views/CreatingAnAppViewController.test.d.ts +23 -0
- package/build/__tests__/behavioral/views/CreatingAnAppViewController.test.js +136 -0
- package/build/__tests__/behavioral/views/CreatingAnAppViewController.test.js.map +1 -0
- package/build/__tests__/behavioral/views/KeepingViewsInSync.test.js +1 -1
- package/build/__tests__/behavioral/views/KeepingViewsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/views/plugins/CreatingAViewPlugin.test.js +1 -1
- package/build/__tests__/behavioral/views/plugins/CreatingAViewPlugin.test.js.map +1 -1
- package/build/__tests__/implementation/TerminalInterface.test.d.ts +1 -0
- package/build/__tests__/implementation/TerminalInterface.test.js +8 -0
- package/build/__tests__/implementation/TerminalInterface.test.js.map +1 -1
- package/build/cli/Cli.js +0 -1
- package/build/cli/Cli.js.map +1 -1
- package/build/errors/SpruceError.js +6 -0
- package/build/errors/SpruceError.js.map +1 -1
- package/build/errors/appViewControllerAlreadyExists.builder.d.ts +6 -0
- package/build/errors/appViewControllerAlreadyExists.builder.js +9 -0
- package/build/errors/appViewControllerAlreadyExists.builder.js.map +1 -0
- package/build/errors/cannotPromptInCi.builder.d.ts +6 -0
- package/build/errors/cannotPromptInCi.builder.js +9 -0
- package/build/errors/cannotPromptInCi.builder.js.map +1 -0
- package/build/features/cache/CacheFeature.d.ts +8 -5
- package/build/features/cache/CacheFeature.js.map +1 -1
- package/build/features/conversation/ConversationFeature.d.ts +8 -5
- package/build/features/conversation/ConversationFeature.js.map +1 -1
- package/build/features/dependencies/DependencyFeature.d.ts +8 -5
- package/build/features/dependencies/DependencyFeature.js.map +1 -1
- package/build/features/deploy/DeployFeature.d.ts +8 -5
- package/build/features/deploy/DeployFeature.js.map +1 -1
- package/build/features/error/ErrorFeature.d.ts +8 -8
- package/build/features/error/ErrorFeature.js.map +1 -1
- package/build/features/eventContract/EventContractFeature.d.ts +8 -5
- package/build/features/eventContract/EventContractFeature.js.map +1 -1
- package/build/features/onboard/OnboardFeature.d.ts +8 -5
- package/build/features/onboard/OnboardFeature.js.map +1 -1
- package/build/features/organization/OrganizationFeature.d.ts +3 -0
- package/build/features/permission/PermissionFeature.d.ts +3 -0
- package/build/features/person/PersonFeature.d.ts +3 -0
- package/build/features/polish/PolishFeature.d.ts +3 -0
- package/build/features/sandbox/SandboxFeature.d.ts +8 -5
- package/build/features/sandbox/SandboxFeature.js.map +1 -1
- package/build/features/skill/actions/BootAction.d.ts +9 -9
- package/build/features/skill/actions/BootAction.js.map +1 -1
- package/build/features/skill/actions/InstallFeature.d.ts +0 -0
- package/build/features/skill/actions/InstallFeature.js +2 -0
- package/build/features/skill/actions/InstallFeature.js.map +1 -0
- package/build/features/skill/actions/InstallFeatureAction.d.ts +37 -0
- package/build/features/skill/actions/InstallFeatureAction.js +79 -0
- package/build/features/skill/actions/InstallFeatureAction.js.map +1 -0
- package/build/features/store/StoreFeature.d.ts +8 -5
- package/build/features/store/StoreFeature.js.map +1 -1
- package/build/features/test/TestFeature.d.ts +8 -5
- package/build/features/test/TestFeature.js.map +1 -1
- package/build/features/view/ViewFeature.d.ts +8 -8
- package/build/features/view/ViewFeature.js.map +1 -1
- package/build/features/view/actions/CreateAppAction.d.ts +17 -0
- package/build/features/view/actions/CreateAppAction.js +28 -0
- package/build/features/view/actions/CreateAppAction.js.map +1 -0
- package/build/features/view/actions/SyncAction.d.ts +1 -2
- package/build/features/view/actions/SyncAction.js +13 -4
- package/build/features/view/actions/SyncAction.js.map +1 -1
- package/build/features/view/writers/ViewWriter.d.ts +1 -0
- package/build/features/view/writers/ViewWriter.js +11 -0
- package/build/features/view/writers/ViewWriter.js.map +1 -1
- package/build/features/vscode/VsCodeFeature.d.ts +8 -5
- package/build/features/vscode/VsCodeFeature.js.map +1 -1
- package/build/index.js +0 -0
- package/build/interfaces/TerminalInterface.js +3 -0
- package/build/interfaces/TerminalInterface.js.map +1 -1
- package/build/tests/fixtures/ViewFixture.js +1 -1
- package/build/tests/fixtures/ViewFixture.js.map +1 -1
- package/build/utilities/isCi.js +3 -0
- package/build/utilities/isCi.js.map +1 -1
- package/dist/spruce-darwin-arm64 +0 -0
- package/dist/spruce-linux-arm64 +0 -0
- package/junit.xml +1782 -0
- package/package.json +29 -29
- package/src/.spruce/errors/errors.types.ts +1180 -911
- package/src/.spruce/errors/options.types.ts +131 -248
- package/src/.spruce/errors/spruceCli/actionCancelled.schema.ts +8 -5
- package/src/.spruce/errors/spruceCli/appViewControllerAlreadyExists.schema.ts +16 -0
- package/src/.spruce/errors/spruceCli/bootError.schema.ts +8 -5
- package/src/.spruce/errors/spruceCli/buildFailed.schema.ts +16 -15
- package/src/.spruce/errors/spruceCli/cacheNotEnabled.schema.ts +8 -5
- package/src/.spruce/errors/spruceCli/cannotPromptInCi.schema.ts +16 -0
- package/src/.spruce/errors/spruceCli/commandAborted.schema.ts +15 -13
- package/src/.spruce/errors/spruceCli/commandBlocked.schema.ts +20 -18
- package/src/.spruce/errors/spruceCli/commandNotImplemented.schema.ts +26 -25
- package/src/.spruce/errors/spruceCli/createAutoloaderFailed.schema.ts +43 -42
- package/src/.spruce/errors/spruceCli/dependencyExists.schema.ts +14 -12
- package/src/.spruce/errors/spruceCli/deployFailed.schema.ts +14 -22
- package/src/.spruce/errors/spruceCli/directoryEmpty.schema.ts +14 -12
- package/src/.spruce/errors/spruceCli/directoryNotSkill.schema.ts +9 -7
- package/src/.spruce/errors/spruceCli/dockerNotStarted.schema.ts +8 -5
- package/src/.spruce/errors/spruceCli/executingCommandFailed.schema.ts +41 -40
- package/src/.spruce/errors/spruceCli/failedToImport.schema.ts +17 -15
- package/src/.spruce/errors/spruceCli/featureNotInstalled.schema.ts +15 -14
- package/src/.spruce/errors/spruceCli/fileExists.schema.ts +17 -15
- package/src/.spruce/errors/spruceCli/generic.schema.ts +15 -13
- package/src/.spruce/errors/spruceCli/invalidCommand.schema.ts +17 -15
- package/src/.spruce/errors/spruceCli/invalidEventContract.schema.ts +21 -20
- package/src/.spruce/errors/spruceCli/invalidFeatureCode.schema.ts +15 -14
- package/src/.spruce/errors/spruceCli/invalidTestDirectory.schema.ts +15 -14
- package/src/.spruce/errors/spruceCli/lintFailed.schema.ts +17 -15
- package/src/.spruce/errors/spruceCli/mercuryResponseError.schema.ts +16 -15
- package/src/.spruce/errors/spruceCli/missingDependencies.schema.ts +16 -16
- package/src/.spruce/errors/spruceCli/missingDependenciesDependency.schema.ts +21 -20
- package/src/.spruce/errors/spruceCli/noOrganizationsFound.schema.ts +9 -7
- package/src/.spruce/errors/spruceCli/noSkillsRegistered.schema.ts +9 -7
- package/src/.spruce/errors/spruceCli/notImplemented.schema.ts +9 -6
- package/src/.spruce/errors/spruceCli/notLoggedIn.schema.ts +8 -5
- package/src/.spruce/errors/spruceCli/schemaExists.schema.ts +21 -19
- package/src/.spruce/errors/spruceCli/schemaFailedToImport.schema.ts +18 -17
- package/src/.spruce/errors/spruceCli/schemaTemplateItemBuildingFailed.schema.ts +33 -32
- package/src/.spruce/errors/spruceCli/skillNotFound.schema.ts +8 -5
- package/src/.spruce/errors/spruceCli/skillNotRegistered.schema.ts +9 -7
- package/src/.spruce/errors/spruceCli/skillViewExists.schema.ts +14 -12
- package/src/.spruce/errors/spruceCli/storeExists.schema.ts +8 -5
- package/src/.spruce/errors/spruceCli/testFailed.schema.ts +26 -24
- package/src/.spruce/errors/spruceCli/themeExists.schema.ts +8 -5
- package/src/.spruce/errors/spruceCli/transportAlreadyExists.schema.ts +16 -15
- package/src/.spruce/errors/spruceCli/viewPluginAlreadyExists.schema.ts +15 -14
- package/src/.spruce/errors/spruceCli/vscodeNotInstalled.schema.ts +9 -7
- package/src/GlobalEmitter.ts +0 -1
- package/src/__tests__/behavioral/features/InstallingFeaturesDirectly.test.ts +149 -0
- package/src/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.ts +1 -1
- package/src/__tests__/behavioral/views/CreatingAnAppViewController.test.ts +158 -0
- package/src/__tests__/behavioral/views/KeepingViewsInSync.test.ts +1 -1
- package/src/__tests__/behavioral/views/plugins/CreatingAViewPlugin.test.ts +1 -1
- package/src/__tests__/implementation/TerminalInterface.test.ts +14 -1
- package/src/cli/Cli.ts +1 -2
- package/src/errors/SpruceError.ts +8 -0
- package/src/errors/appViewControllerAlreadyExists.builder.ts +7 -0
- package/src/errors/cannotPromptInCi.builder.ts +7 -0
- package/src/features/cache/CacheFeature.ts +10 -6
- package/src/features/conversation/ConversationFeature.ts +10 -6
- package/src/features/dependencies/DependencyFeature.ts +10 -6
- package/src/features/deploy/DeployFeature.ts +10 -6
- package/src/features/error/ErrorFeature.ts +10 -10
- package/src/features/eventContract/EventContractFeature.ts +10 -6
- package/src/features/onboard/OnboardFeature.ts +10 -6
- package/src/features/organization/OrganizationFeature.ts +4 -0
- package/src/features/permission/PermissionFeature.ts +4 -0
- package/src/features/person/PersonFeature.ts +4 -0
- package/src/features/polish/PolishFeature.ts +4 -0
- package/src/features/sandbox/SandboxFeature.ts +10 -6
- package/src/features/skill/actions/BootAction.ts +11 -11
- package/src/features/skill/actions/InstallFeatureAction.ts +93 -0
- package/src/features/store/StoreFeature.ts +10 -6
- package/src/features/test/TestFeature.ts +10 -6
- package/src/features/view/ViewFeature.ts +10 -10
- package/src/features/view/actions/CreateAppAction.ts +32 -0
- package/src/features/view/actions/SyncAction.ts +13 -7
- package/src/features/view/writers/ViewWriter.ts +19 -0
- package/src/features/vscode/VsCodeFeature.ts +9 -6
- package/src/interfaces/TerminalInterface.ts +5 -0
- package/src/tests/fixtures/ViewFixture.ts +1 -1
- package/src/utilities/isCi.ts +4 -0
- package/yarn-error.log +597 -0
- package/LICENSE +0 -21
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
import { SchemaRegistry } from '@sprucelabs/schema'
|
|
2
2
|
import { SpruceErrors } from '../errors.types'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
const testFailedSchema: SpruceErrors.SpruceCli.TestFailedSchema = {
|
|
7
|
+
id: 'testFailed',
|
|
8
|
+
namespace: 'SpruceCli',
|
|
9
|
+
name: 'Test failed',
|
|
10
|
+
fields: {
|
|
11
|
+
/** . */
|
|
12
|
+
'fileName': {
|
|
13
|
+
type: 'text',
|
|
14
|
+
isRequired: true,
|
|
15
|
+
options: undefined
|
|
16
|
+
},
|
|
17
|
+
/** . */
|
|
18
|
+
'testName': {
|
|
19
|
+
type: 'text',
|
|
20
|
+
isRequired: true,
|
|
21
|
+
options: undefined
|
|
22
|
+
},
|
|
23
|
+
/** . */
|
|
24
|
+
'errorMessage': {
|
|
25
|
+
type: 'text',
|
|
26
|
+
isRequired: true,
|
|
27
|
+
options: undefined
|
|
28
|
+
},
|
|
29
|
+
}
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
SchemaRegistry.getInstance().trackSchema(testFailedSchema)
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { SchemaRegistry } from '@sprucelabs/schema'
|
|
2
2
|
import { SpruceErrors } from '../errors.types'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
const themeExistsSchema: SpruceErrors.SpruceCli.ThemeExistsSchema = {
|
|
7
|
+
id: 'themeExists',
|
|
8
|
+
namespace: 'SpruceCli',
|
|
9
|
+
name: 'Theme exists',
|
|
10
|
+
fields: {
|
|
11
|
+
}
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
SchemaRegistry.getInstance().trackSchema(themeExistsSchema)
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { SchemaRegistry } from '@sprucelabs/schema'
|
|
2
2
|
import { SpruceErrors } from '../errors.types'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
const transportAlreadyExistsSchema: SpruceErrors.SpruceCli.TransportAlreadyExistsSchema = {
|
|
7
|
+
id: 'transportAlreadyExists',
|
|
8
|
+
namespace: 'SpruceCli',
|
|
9
|
+
name: 'transport already exists',
|
|
10
|
+
fields: {
|
|
11
|
+
/** Transport name. */
|
|
12
|
+
'name': {
|
|
13
|
+
label: 'Transport name',
|
|
14
|
+
type: 'text',
|
|
15
|
+
isRequired: true,
|
|
16
|
+
options: undefined
|
|
17
|
+
},
|
|
18
|
+
}
|
|
19
|
+
}
|
|
19
20
|
|
|
20
21
|
SchemaRegistry.getInstance().trackSchema(transportAlreadyExistsSchema)
|
|
21
22
|
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { SchemaRegistry } from '@sprucelabs/schema'
|
|
2
2
|
import { SpruceErrors } from '../errors.types'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
const viewPluginAlreadyExistsSchema: SpruceErrors.SpruceCli.ViewPluginAlreadyExistsSchema = {
|
|
7
|
+
id: 'viewPluginAlreadyExists',
|
|
8
|
+
namespace: 'SpruceCli',
|
|
9
|
+
name: 'View plugin already exists',
|
|
10
|
+
fields: {
|
|
11
|
+
/** . */
|
|
12
|
+
'name': {
|
|
13
|
+
type: 'text',
|
|
14
|
+
isRequired: true,
|
|
15
|
+
options: undefined
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
}
|
|
18
19
|
|
|
19
20
|
SchemaRegistry.getInstance().trackSchema(viewPluginAlreadyExistsSchema)
|
|
20
21
|
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { SchemaRegistry } from '@sprucelabs/schema'
|
|
2
2
|
import { SpruceErrors } from '../errors.types'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
const vscodeNotInstalledSchema: SpruceErrors.SpruceCli.VscodeNotInstalledSchema = {
|
|
7
|
+
id: 'vscodeNotInstalled',
|
|
8
|
+
namespace: 'SpruceCli',
|
|
9
|
+
name: 'vscode not installed',
|
|
10
|
+
fields: {
|
|
11
|
+
}
|
|
12
|
+
}
|
|
11
13
|
|
|
12
14
|
SchemaRegistry.getInstance().trackSchema(vscodeNotInstalledSchema)
|
|
13
15
|
|
package/src/GlobalEmitter.ts
CHANGED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { SelectChoice } from '@sprucelabs/spruce-core-schemas'
|
|
2
|
+
import { test, assert, generateId } from '@sprucelabs/test-utils'
|
|
3
|
+
import { InstallFeatureOptions } from '../../../features/features.types'
|
|
4
|
+
import InstallFeatureAction, {
|
|
5
|
+
InstallFeatureActionOptions,
|
|
6
|
+
} from '../../../features/skill/actions/InstallFeatureAction'
|
|
7
|
+
import AbstractSkillTest from '../../../tests/AbstractSkillTest'
|
|
8
|
+
|
|
9
|
+
export default class InstallingFeaturesDirectlyTest extends AbstractSkillTest {
|
|
10
|
+
private static action: InstallFeatureAction
|
|
11
|
+
protected static skillCacheKey = 'skills'
|
|
12
|
+
|
|
13
|
+
protected static async beforeEach() {
|
|
14
|
+
await super.beforeEach()
|
|
15
|
+
this.action = this.Action('skill', 'installFeature')
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
protected static async afterEach() {
|
|
19
|
+
this.ui.reset()
|
|
20
|
+
await super.afterEach()
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@test()
|
|
24
|
+
protected static async hasExpectedAliases() {
|
|
25
|
+
assert.isEqualDeep(this.action.commandAliases, ['install.feature'])
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@test()
|
|
29
|
+
protected static async promptsForWhichFeatureToInstall() {
|
|
30
|
+
await this.executeAndWaitForPrompt()
|
|
31
|
+
|
|
32
|
+
const features = {
|
|
33
|
+
error: 'Errors',
|
|
34
|
+
event: 'Events',
|
|
35
|
+
schema: 'Schemas',
|
|
36
|
+
store: 'Stores (including database support)',
|
|
37
|
+
test: 'Tests',
|
|
38
|
+
view: 'Views',
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const choices: SelectChoice[] = Object.keys(features).map((key) => ({
|
|
42
|
+
label: features[key as keyof typeof features],
|
|
43
|
+
value: key,
|
|
44
|
+
}))
|
|
45
|
+
|
|
46
|
+
const last = this.ui.getLastInvocation()
|
|
47
|
+
assert.isEqual(last.command, 'prompt')
|
|
48
|
+
assert.isEqualDeep(last.options, {
|
|
49
|
+
type: 'select',
|
|
50
|
+
label: 'Which feature do you want to install?',
|
|
51
|
+
isRequired: true,
|
|
52
|
+
options: {
|
|
53
|
+
choices,
|
|
54
|
+
},
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@test('can install store feature', 'store')
|
|
59
|
+
@test('can install view feature', 'view')
|
|
60
|
+
@test('can install test feature', 'test')
|
|
61
|
+
protected static async selectingAFeatureTriesToInstallIt(featureCode: any) {
|
|
62
|
+
let passedOption: InstallFeatureOptions | undefined
|
|
63
|
+
|
|
64
|
+
this.featureInstaller.install = async (options) => {
|
|
65
|
+
passedOption = options
|
|
66
|
+
return {}
|
|
67
|
+
}
|
|
68
|
+
await this.executeAndWaitForPrompt()
|
|
69
|
+
await this.sendInput(featureCode)
|
|
70
|
+
|
|
71
|
+
assert.isEqualDeep(passedOption, { features: [{ code: featureCode }] })
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@test()
|
|
75
|
+
protected static async returnsResultsFromFeatureInstall() {
|
|
76
|
+
const results = {
|
|
77
|
+
[generateId()]: generateId(),
|
|
78
|
+
[generateId()]: generateId(),
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
this.featureInstaller.install = async () => results
|
|
82
|
+
|
|
83
|
+
const { promise } = await this.executeAndWaitForPrompt()
|
|
84
|
+
|
|
85
|
+
await this.sendInput('store')
|
|
86
|
+
|
|
87
|
+
const actual = await promise
|
|
88
|
+
|
|
89
|
+
assert.isEqualDeep(actual, results)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@test('skips view feature if already installed', 'view')
|
|
93
|
+
@test('skips store feature if already installed', 'store')
|
|
94
|
+
@test('skips test feature if already installed', 'test')
|
|
95
|
+
protected static async doesNotShowOptionForInstalledFeature(code: string) {
|
|
96
|
+
this.featureInstaller.install = async () => ({})
|
|
97
|
+
const installed = ['skill', code]
|
|
98
|
+
this.featureInstaller.isInstalled = async (code) =>
|
|
99
|
+
installed.includes(code)
|
|
100
|
+
await this.executeAndWaitForPrompt()
|
|
101
|
+
const { options } = this.ui.getLastInvocation()
|
|
102
|
+
const choices = options.options.choices as SelectChoice[]
|
|
103
|
+
assert.doesNotInclude(
|
|
104
|
+
choices.map((c) => c.value),
|
|
105
|
+
code
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@test()
|
|
110
|
+
protected static async ifThereAreNoFeaturesToInstallDonNotPrompt() {
|
|
111
|
+
this.featureInstaller.isInstalled = async () => true
|
|
112
|
+
const results = await this.execute()
|
|
113
|
+
assert.isEqualDeep(results, {
|
|
114
|
+
summaryLines: [
|
|
115
|
+
'Nothing to install, you have already installed everything!',
|
|
116
|
+
],
|
|
117
|
+
})
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@test('should install directly view', 'view')
|
|
121
|
+
@test('should install directly store', 'store')
|
|
122
|
+
@test('should install directly test', 'test')
|
|
123
|
+
protected static async passingFeatureCodeToActionSkipsPrompt(code: any) {
|
|
124
|
+
let passedOption: InstallFeatureOptions | undefined
|
|
125
|
+
this.featureInstaller.install = async (options) => {
|
|
126
|
+
passedOption = options
|
|
127
|
+
return {}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
this.ui.prompt = async () => assert.fail('Should not prompt')
|
|
131
|
+
|
|
132
|
+
await this.execute({ code })
|
|
133
|
+
assert.isEqualDeep(passedOption, { features: [{ code }] })
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
private static async sendInput(featureCode: string) {
|
|
137
|
+
await this.ui.sendInput(featureCode)
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
private static async executeAndWaitForPrompt() {
|
|
141
|
+
const promise = this.execute()
|
|
142
|
+
await this.ui.waitForInput()
|
|
143
|
+
return { promise }
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
private static execute(options?: InstallFeatureActionOptions) {
|
|
147
|
+
return this.action.execute(options ?? {})
|
|
148
|
+
}
|
|
149
|
+
}
|
|
@@ -131,8 +131,8 @@ export default class SelectingAnAbstractTestClassTest extends AbstractTestTest {
|
|
|
131
131
|
for (const feat of featuresWithRegisteredTests) {
|
|
132
132
|
await this.featureInstaller.install({
|
|
133
133
|
features: [
|
|
134
|
+
//@ts-ignore
|
|
134
135
|
{
|
|
135
|
-
//@ts-ignore
|
|
136
136
|
code: feat.featureCode,
|
|
137
137
|
},
|
|
138
138
|
],
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { diskUtil } from '@sprucelabs/spruce-skill-utils'
|
|
2
|
+
import { test, assert, errorAssert, generateId } from '@sprucelabs/test-utils'
|
|
3
|
+
import CreateAppAction from '../../../features/view/actions/CreateAppAction'
|
|
4
|
+
import AbstractSkillTest from '../../../tests/AbstractSkillTest'
|
|
5
|
+
import testUtil from '../../../tests/utilities/test.utility'
|
|
6
|
+
|
|
7
|
+
export default class CreatingAnAppViewControllerTest extends AbstractSkillTest {
|
|
8
|
+
protected static skillCacheKey = 'views'
|
|
9
|
+
private static avcPath: string
|
|
10
|
+
|
|
11
|
+
private static action: CreateAppAction
|
|
12
|
+
private static lastExecution: {
|
|
13
|
+
actionCode: string
|
|
14
|
+
featureCode: string
|
|
15
|
+
}[] = []
|
|
16
|
+
|
|
17
|
+
protected static async beforeAll(): Promise<void> {
|
|
18
|
+
await super.beforeAll()
|
|
19
|
+
this.avcPath = this.resolvePath('src/App.avc.ts')
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
protected static async beforeEach(): Promise<void> {
|
|
23
|
+
await super.beforeEach()
|
|
24
|
+
|
|
25
|
+
this.action = this.Action('view', 'createApp')
|
|
26
|
+
await this.cli.on('feature.will-execute', (payload) => {
|
|
27
|
+
this.lastExecution.push(payload)
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@test()
|
|
32
|
+
protected static async generatesExpectedFile() {
|
|
33
|
+
const results = await this.execute()
|
|
34
|
+
assert.isFalsy(results.errors)
|
|
35
|
+
|
|
36
|
+
testUtil.assertFileByPathInGeneratedFiles(this.avcPath, results.files)
|
|
37
|
+
|
|
38
|
+
assert.doesInclude(results.files, {
|
|
39
|
+
action: 'generated',
|
|
40
|
+
name: 'App.avc.ts',
|
|
41
|
+
path: this.avcPath,
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
assert.doesInclude(results.files, {
|
|
45
|
+
action: 'generated',
|
|
46
|
+
name: 'views.ts',
|
|
47
|
+
path: this.combinedViewsPath,
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@test()
|
|
52
|
+
protected static async syncsViewsOnCreation() {
|
|
53
|
+
debugger
|
|
54
|
+
assert.doesInclude(this.lastExecution, {
|
|
55
|
+
actionCode: 'sync',
|
|
56
|
+
featureCode: 'view',
|
|
57
|
+
})
|
|
58
|
+
assert.isEqual(this.lastExecution[1].actionCode, 'sync')
|
|
59
|
+
assert.isTrue(
|
|
60
|
+
diskUtil.doesFileExist(this.combinedViewsPath),
|
|
61
|
+
'views.ts does not exist'
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@test()
|
|
66
|
+
protected static async throwsIfAppAlreadyExists() {
|
|
67
|
+
await this.executeAndAssertThrowsAvcExists()
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@test()
|
|
71
|
+
protected static async avcIncludesExpectedContents() {
|
|
72
|
+
const contents = diskUtil.readFile(this.avcPath)
|
|
73
|
+
assert.doesInclude(
|
|
74
|
+
contents,
|
|
75
|
+
'export default class AppViewControllerImpl extends AbstractAppViewController'
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
assert.doesInclude(
|
|
79
|
+
contents,
|
|
80
|
+
'public async (_options: AppViewControllerLoadOptions)'
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@test()
|
|
85
|
+
protected static async generatedFilesAreValid() {
|
|
86
|
+
await this.Service('typeChecker').check(this.avcPath)
|
|
87
|
+
await this.assertCombinedViewsFileIsValid()
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@test()
|
|
91
|
+
protected static async doesNotDropAppIntoSkillViewTypes() {
|
|
92
|
+
const expected = `interface ViewControllerMap {}`
|
|
93
|
+
this.assertCombinedViewsContains(expected)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@test()
|
|
97
|
+
protected static async callsHeartwoodImportFunctionAsExpected() {
|
|
98
|
+
this.assertCombinedViewsContains(
|
|
99
|
+
'heartwood({ vcs, pluginsByName, App: AppViewControllerImpl })'
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@test()
|
|
104
|
+
protected static async throwsEvenIfAppAvcMoves() {
|
|
105
|
+
const destination = this.resolvePath(`src/${generateId()}/App.avc.ts`)
|
|
106
|
+
diskUtil.moveFile(this.avcPath, destination)
|
|
107
|
+
|
|
108
|
+
await this.executeAndAssertThrowsAvcExists()
|
|
109
|
+
this.avcPath = destination
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@test()
|
|
113
|
+
protected static async canRenameAppAvcAndItUpdatesCombinedViews() {
|
|
114
|
+
const contents = diskUtil.readFile(this.avcPath)
|
|
115
|
+
const updatedContents = contents.replace(
|
|
116
|
+
'AppViewControllerImpl',
|
|
117
|
+
'NewAppViewControllerImpl'
|
|
118
|
+
)
|
|
119
|
+
diskUtil.writeFile(this.avcPath, updatedContents)
|
|
120
|
+
await this.Action('view', 'sync').execute({})
|
|
121
|
+
|
|
122
|
+
this.assertCombinedViewsContains(
|
|
123
|
+
'heartwood({ vcs, pluginsByName, App: NewAppViewControllerImpl })'
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
await this.assertCombinedViewsFileIsValid()
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
private static async assertCombinedViewsFileIsValid() {
|
|
130
|
+
await this.Service('typeChecker').check(this.combinedViewsPath)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
private static assertCombinedViewsContains(expected: string) {
|
|
134
|
+
const contents = diskUtil.readFile(this.combinedViewsPath)
|
|
135
|
+
assert.doesInclude(
|
|
136
|
+
contents.replace(/\s/g, ''),
|
|
137
|
+
expected.replace(/\s/g, ''),
|
|
138
|
+
`The combined views file does not include the expected contents.`
|
|
139
|
+
)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
private static get combinedViewsPath() {
|
|
143
|
+
return this.resolveHashSprucePath('views', 'views.ts')
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
private static async executeAndAssertThrowsAvcExists() {
|
|
147
|
+
const results = await this.execute()
|
|
148
|
+
assert.isTruthy(results.errors)
|
|
149
|
+
errorAssert.assertError(
|
|
150
|
+
results.errors[0],
|
|
151
|
+
'APP_VIEW_CONTROLLER_ALREADY_EXISTS'
|
|
152
|
+
)
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
private static async execute() {
|
|
156
|
+
return await this.action.execute()
|
|
157
|
+
}
|
|
158
|
+
}
|
|
@@ -20,7 +20,7 @@ export default class KeepingViewsInSyncTest extends AbstractSkillTest {
|
|
|
20
20
|
|
|
21
21
|
@test()
|
|
22
22
|
protected static async syncingWithNoViewsGeneratesNothing() {
|
|
23
|
-
const results = await this.action.execute(
|
|
23
|
+
const results = await this.action.execute()
|
|
24
24
|
assert.isFalsy(results.errors)
|
|
25
25
|
assert.isFalsy(results.files)
|
|
26
26
|
}
|
|
@@ -92,7 +92,7 @@ export default class CreatingAViewPluginTest extends AbstractSkillTest {
|
|
|
92
92
|
`
|
|
93
93
|
|
|
94
94
|
this.assertCombinedFileIncludes(expected)
|
|
95
|
-
this.assertCombinedFileIncludes('heartwood(vcs, pluginsByName)')
|
|
95
|
+
this.assertCombinedFileIncludes('heartwood({ vcs, pluginsByName })')
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
@test()
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import AbstractSpruceTest, {
|
|
1
|
+
import AbstractSpruceTest, {
|
|
2
|
+
test,
|
|
3
|
+
assert,
|
|
4
|
+
errorAssert,
|
|
5
|
+
} from '@sprucelabs/test-utils'
|
|
2
6
|
import TerminalInterface from '../../interfaces/TerminalInterface'
|
|
3
7
|
|
|
4
8
|
export default class TerminalInterfaceTest extends AbstractSpruceTest {
|
|
@@ -33,6 +37,15 @@ export default class TerminalInterfaceTest extends AbstractSpruceTest {
|
|
|
33
37
|
assert.isTrue(this.wasOraHit)
|
|
34
38
|
}
|
|
35
39
|
|
|
40
|
+
@test()
|
|
41
|
+
protected static async askingToPromptThrowsIfInCi() {
|
|
42
|
+
process.env.CIRCLECI = 'true'
|
|
43
|
+
const err = await assert.doesThrowAsync(() =>
|
|
44
|
+
this.ui.prompt({ type: 'text' })
|
|
45
|
+
)
|
|
46
|
+
errorAssert.assertError(err, 'CANNOT_PROMPT_IN_CI')
|
|
47
|
+
}
|
|
48
|
+
|
|
36
49
|
private static async startLoading() {
|
|
37
50
|
await this.ui.startLoading()
|
|
38
51
|
}
|
package/src/cli/Cli.ts
CHANGED
|
@@ -269,6 +269,14 @@ export default class SpruceError extends AbstractSpruceError<ErrorOptions> {
|
|
|
269
269
|
message = `A view plugin by the name ${options.name} already exists!`
|
|
270
270
|
break
|
|
271
271
|
|
|
272
|
+
case 'CANNOT_PROMPT_IN_CI':
|
|
273
|
+
message = 'A cannot prompt in ci just happened!'
|
|
274
|
+
break
|
|
275
|
+
|
|
276
|
+
case 'APP_VIEW_CONTROLLER_ALREADY_EXISTS':
|
|
277
|
+
message = `You already have an AppViewController! Run \`spruce sync.views\` if you are having issues.`
|
|
278
|
+
break
|
|
279
|
+
|
|
272
280
|
default:
|
|
273
281
|
message = super.friendlyMessage()
|
|
274
282
|
}
|
|
@@ -2,12 +2,6 @@ import { diskUtil } from '@sprucelabs/spruce-skill-utils'
|
|
|
2
2
|
import AbstractFeature from '../AbstractFeature'
|
|
3
3
|
import { FeatureCode } from '../features.types'
|
|
4
4
|
|
|
5
|
-
declare module '../../features/features.types' {
|
|
6
|
-
interface FeatureMap {
|
|
7
|
-
cache: CacheFeature
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
5
|
export default class CacheFeature extends AbstractFeature {
|
|
12
6
|
public description = 'Caching for all things Sprucebot.'
|
|
13
7
|
public code: FeatureCode = 'cache'
|
|
@@ -18,3 +12,13 @@ export default class CacheFeature extends AbstractFeature {
|
|
|
18
12
|
return true
|
|
19
13
|
}
|
|
20
14
|
}
|
|
15
|
+
|
|
16
|
+
declare module '../../features/features.types' {
|
|
17
|
+
interface FeatureMap {
|
|
18
|
+
cache: CacheFeature
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface FeatureOptionsMap {
|
|
22
|
+
cache: undefined
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -7,12 +7,6 @@ import AbstractFeature, {
|
|
|
7
7
|
} from '../AbstractFeature'
|
|
8
8
|
import { FeatureCode } from '../features.types'
|
|
9
9
|
|
|
10
|
-
declare module '../../features/features.types' {
|
|
11
|
-
interface FeatureMap {
|
|
12
|
-
conversation: ConversationFeature
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
10
|
export default class ConversationFeature extends AbstractFeature {
|
|
17
11
|
public nameReadable = 'Conversation'
|
|
18
12
|
public code: FeatureCode = 'conversation'
|
|
@@ -68,3 +62,13 @@ export default class ConversationFeature extends AbstractFeature {
|
|
|
68
62
|
return this.Writer('conversation').writePlugin(this.cwd)
|
|
69
63
|
}
|
|
70
64
|
}
|
|
65
|
+
|
|
66
|
+
declare module '../../features/features.types' {
|
|
67
|
+
interface FeatureMap {
|
|
68
|
+
conversation: ConversationFeature
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
interface FeatureOptionsMap {
|
|
72
|
+
conversation: undefined
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -2,12 +2,6 @@ import { diskUtil } from '@sprucelabs/spruce-skill-utils'
|
|
|
2
2
|
import AbstractFeature, { FeatureDependency } from '../AbstractFeature'
|
|
3
3
|
import { FeatureCode } from '../features.types'
|
|
4
4
|
|
|
5
|
-
declare module '../../features/features.types' {
|
|
6
|
-
interface FeatureMap {
|
|
7
|
-
dependency: DependencyFeature
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
5
|
export default class DependencyFeature extends AbstractFeature {
|
|
12
6
|
public description = 'Tell me which skills you depend on.'
|
|
13
7
|
public code: FeatureCode = 'dependency'
|
|
@@ -25,3 +19,13 @@ export default class DependencyFeature extends AbstractFeature {
|
|
|
25
19
|
return this.features.isInstalled('skill')
|
|
26
20
|
}
|
|
27
21
|
}
|
|
22
|
+
|
|
23
|
+
declare module '../../features/features.types' {
|
|
24
|
+
interface FeatureMap {
|
|
25
|
+
dependency: DependencyFeature
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
interface FeatureOptionsMap {
|
|
29
|
+
dependency: undefined
|
|
30
|
+
}
|
|
31
|
+
}
|