@sprucelabs/spruce-cli 14.30.6 → 14.30.10

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 CHANGED
@@ -3,6 +3,38 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [14.30.10](https://github.com/sprucelabsai/spruce-cli-workspace/compare/v14.30.9...v14.30.10) (2022-01-24)
7
+
8
+ **Note:** Version bump only for package @sprucelabs/spruce-cli
9
+
10
+
11
+
12
+
13
+
14
+ ## [14.30.9](https://github.com/sprucelabsai/spruce-cli-workspace/compare/v14.30.8...v14.30.9) (2022-01-22)
15
+
16
+ **Note:** Version bump only for package @sprucelabs/spruce-cli
17
+
18
+
19
+
20
+
21
+
22
+ ## [14.30.8](https://github.com/sprucelabsai/spruce-cli-workspace/compare/v14.30.7...v14.30.8) (2022-01-19)
23
+
24
+ **Note:** Version bump only for package @sprucelabs/spruce-cli
25
+
26
+
27
+
28
+
29
+
30
+ ## [14.30.7](https://github.com/sprucelabsai/spruce-cli-workspace/compare/v14.30.6...v14.30.7) (2022-01-19)
31
+
32
+ **Note:** Version bump only for package @sprucelabs/spruce-cli
33
+
34
+
35
+
36
+
37
+
6
38
  ## [14.30.6](https://github.com/sprucelabsai/spruce-cli-workspace/compare/v14.30.5...v14.30.6) (2022-01-18)
7
39
 
8
40
  **Note:** Version bump only for package @sprucelabs/spruce-cli
@@ -140,11 +140,15 @@ var CreatingAConversationTopicTest = (_dec = (0, _test.test)(), _dec2 = (0, _tes
140
140
  case 2:
141
141
  health = _context3.sent;
142
142
 
143
- _test.assert.isTruthy(health.conversation);
143
+ //@ts-ignore
144
+ _test.assert.isTruthy(health.conversation); //@ts-ignore
144
145
 
145
- _test.assert.isArray(health.conversation.topics);
146
146
 
147
- _test.assert.isLength(health.conversation.topics, 1);
147
+ _test.assert.isArray(health.conversation.topics); //@ts-ignore
148
+
149
+
150
+ _test.assert.isLength(health.conversation.topics, 1); //@ts-ignore
151
+
148
152
 
149
153
  _test.assert.doesInclude(health.conversation.topics, 'bookAnAppointment');
150
154
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/__tests__/behavioral/CreatingAConversationTopic.test.ts"],"names":["CreatingAConversationTopicTest","assert","isFunction","Action","execute","FeatureFixture","installCachedFeatures","cli","nameReadable","nameCamel","results","match","testUtil","assertFileByNameInGeneratedFiles","files","Service","importDefault","imported","isTruthy","isEqual","label","isArray","utterances","script","assertHealthCheckResultsAreValid","checkHealth","health","conversation","topics","isLength","doesInclude","AbstractCliTest"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;IAEqBA,8B,WACnB,iB,UAKA,iB;;;;;;;;;;;;;uHALD;AAAA;AAAA;AAAA;AAAA;AAECC,6BAAOC,UAAP,CAAkB,KAAKC,MAAL,CAAY,cAAZ,EAA4B,QAA5B,EAAsCC,OAAxD;;AAFD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;;mIAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAEmB,KAAKC,cAAL,GAAsBC,qBAAtB,CACjB,cADiB,CAFnB;;AAAA;AAEOC,gBAAAA,GAFP;AAAA;AAAA,uBAMuB,KAAKJ,MAAL,CAAY,cAAZ,EAA4B,QAA5B,EAAsCC,OAAtC,CAA8C;AACnEI,kBAAAA,YAAY,EAAE,qBADqD;AAEnEC,kBAAAA,SAAS,EAAE;AAFwD,iBAA9C,CANvB;;AAAA;AAMOC,gBAAAA,OANP;AAWOC,gBAAAA,KAXP,GAWeC,kBAASC,gCAAT,CACb,4BADa,EAEbH,OAAO,CAACI,KAFK,CAXf;AAAA;AAAA,uBAgBwB,KAAKC,OAAL,CAAa,QAAb,EAAuBC,aAAvB,CAAqCL,KAArC,CAhBxB;;AAAA;AAgBOM,gBAAAA,QAhBP;;AAkBChB,6BAAOiB,QAAP,CAAgBD,QAAhB;;AACAhB,6BAAOkB,OAAP,CAAeF,QAAQ,CAACG,KAAxB,EAA+B,qBAA/B;;AACAnB,6BAAOoB,OAAP,CAAeJ,QAAQ,CAACK,UAAxB;;AACArB,6BAAOoB,OAAP,CAAeJ,QAAQ,CAACM,MAAxB;;AArBD;AAAA,uBAuBO,KAAKC,gCAAL,CAAsCjB,GAAtC,CAvBP;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;;4HA0BA,kBAAsDA,GAAtD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBACsBA,GAAG,CAACkB,WAAJ,EADtB;;AAAA;AACOC,gBAAAA,MADP;;AAECzB,6BAAOiB,QAAP,CAAgBQ,MAAM,CAACC,YAAvB;;AACA1B,6BAAOoB,OAAP,CAAeK,MAAM,CAACC,YAAP,CAAoBC,MAAnC;;AACA3B,6BAAO4B,QAAP,CAAgBH,MAAM,CAACC,YAAP,CAAoBC,MAApC,EAA4C,CAA5C;;AACA3B,6BAAO6B,WAAP,CAAmBJ,MAAM,CAACC,YAAP,CAAoBC,MAAvC,EAA+C,mBAA/C;;AALD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;EAhC2DG,4B","sourcesContent":["import '@sprucelabs/spruce-conversation-plugin'\nimport { test, assert } from '@sprucelabs/test'\nimport { CliInterface } from '../../cli'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\nimport testUtil from '../../tests/utilities/test.utility'\n\nexport default class CreatingAConversationTopicTest extends AbstractCliTest {\n\t@test()\n\tprotected static async hasCreateConversationAction() {\n\t\tassert.isFunction(this.Action('conversation', 'create').execute)\n\t}\n\n\t@test()\n\tprotected static async createsValidConversationTopicDefinition() {\n\t\tconst cli = await this.FeatureFixture().installCachedFeatures(\n\t\t\t'conversation'\n\t\t)\n\n\t\tconst results = await this.Action('conversation', 'create').execute({\n\t\t\tnameReadable: 'book an appointment',\n\t\t\tnameCamel: 'bookAnAppointment',\n\t\t})\n\n\t\tconst match = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'bookAnAppointment.topic.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tconst imported = await this.Service('import').importDefault(match)\n\n\t\tassert.isTruthy(imported)\n\t\tassert.isEqual(imported.label, 'book an appointment')\n\t\tassert.isArray(imported.utterances)\n\t\tassert.isArray(imported.script)\n\n\t\tawait this.assertHealthCheckResultsAreValid(cli)\n\t}\n\n\tprivate static async assertHealthCheckResultsAreValid(cli: CliInterface) {\n\t\tconst health = await cli.checkHealth()\n\t\tassert.isTruthy(health.conversation)\n\t\tassert.isArray(health.conversation.topics)\n\t\tassert.isLength(health.conversation.topics, 1)\n\t\tassert.doesInclude(health.conversation.topics, 'bookAnAppointment')\n\t}\n}\n"],"file":"CreatingAConversationTopic.test.js"}
1
+ {"version":3,"sources":["../../../src/__tests__/behavioral/CreatingAConversationTopic.test.ts"],"names":["CreatingAConversationTopicTest","assert","isFunction","Action","execute","FeatureFixture","installCachedFeatures","cli","nameReadable","nameCamel","results","match","testUtil","assertFileByNameInGeneratedFiles","files","Service","importDefault","imported","isTruthy","isEqual","label","isArray","utterances","script","assertHealthCheckResultsAreValid","checkHealth","health","conversation","topics","isLength","doesInclude","AbstractCliTest"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;IAEqBA,8B,WACnB,iB,UAKA,iB;;;;;;;;;;;;;uHALD;AAAA;AAAA;AAAA;AAAA;AAECC,6BAAOC,UAAP,CAAkB,KAAKC,MAAL,CAAY,cAAZ,EAA4B,QAA5B,EAAsCC,OAAxD;;AAFD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;;mIAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAEmB,KAAKC,cAAL,GAAsBC,qBAAtB,CACjB,cADiB,CAFnB;;AAAA;AAEOC,gBAAAA,GAFP;A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;;;;;;EAhC2DG,4B","sourcesContent":["import '@sprucelabs/spruce-conversation-plugin'\nimport { test, assert } from '@sprucelabs/test'\nimport { CliInterface } from '../../cli'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\nimport testUtil from '../../tests/utilities/test.utility'\n\nexport default class CreatingAConversationTopicTest extends AbstractCliTest {\n\t@test()\n\tprotected static async hasCreateConversationAction() {\n\t\tassert.isFunction(this.Action('conversation', 'create').execute)\n\t}\n\n\t@test()\n\tprotected static async createsValidConversationTopicDefinition() {\n\t\tconst cli = await this.FeatureFixture().installCachedFeatures(\n\t\t\t'conversation'\n\t\t)\n\n\t\tconst results = await this.Action('conversation', 'create').execute({\n\t\t\tnameReadable: 'book an appointment',\n\t\t\tnameCamel: 'bookAnAppointment',\n\t\t})\n\n\t\tconst match = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'bookAnAppointment.topic.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tconst imported = await this.Service('import').importDefault(match)\n\n\t\tassert.isTruthy(imported)\n\t\tassert.isEqual(imported.label, 'book an appointment')\n\t\tassert.isArray(imported.utterances)\n\t\tassert.isArray(imported.script)\n\n\t\tawait this.assertHealthCheckResultsAreValid(cli)\n\t}\n\n\tprivate static async assertHealthCheckResultsAreValid(cli: CliInterface) {\n\t\tconst health = await cli.checkHealth()\n\t\t//@ts-ignore\n\t\tassert.isTruthy(health.conversation)\n\t\t//@ts-ignore\n\t\tassert.isArray(health.conversation.topics)\n\t\t//@ts-ignore\n\t\tassert.isLength(health.conversation.topics, 1)\n\t\t//@ts-ignore\n\t\tassert.doesInclude(health.conversation.topics, 'bookAnAppointment')\n\t}\n}\n"],"file":"CreatingAConversationTopic.test.js"}
@@ -39,7 +39,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
39
39
 
40
40
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
41
41
 
42
- var SettingRemoteTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)("saves local as ".concat(_spruceEventUtils.REMOTE_LOCAL), "local", "".concat(_spruceEventUtils.REMOTE_LOCAL)), _dec3 = (0, _test.test)("saves dev as ".concat(_spruceEventUtils.REMOTE_DEV), "developer", "".concat(_spruceEventUtils.REMOTE_DEV)), _dec4 = (0, _test.test)("saves sandbox as ".concat(_spruceEventUtils.REMOTE_SANDBOX), "sandbox", "".concat(_spruceEventUtils.REMOTE_SANDBOX)), _dec5 = (0, _test.test)("saves prod as ".concat(_spruceEventUtils.REMOTE_PROD), "production", "".concat(_spruceEventUtils.REMOTE_PROD)), _dec6 = (0, _test.test)('create.event asks for remote on IS TTY', 'event', 'create'), _dec7 = (0, _test.test)('sync.events asks for remote on IS TTY', 'event', 'sync'), _dec8 = (0, _test.test)('login asks for remote on IS TTY', 'person', 'login'), _dec9 = (0, _test.test)('skill.login asks for remote on IS TTY', 'skill', 'login'), _dec10 = (0, _test.test)('create.event throws for remote on NOT TTY', 'create', false), _dec11 = (0, _test.test)('sync.events throws for remote on NOT TTY', 'sync', false), _dec12 = (0, _test.test)(), (_class = (_temp = _class2 = /*#__PURE__*/function (_AbstractSkillTest) {
42
+ var SettingRemoteTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)("saves local as ".concat(_spruceEventUtils.REMOTE_LOCAL), "local", "".concat(_spruceEventUtils.REMOTE_LOCAL)), _dec3 = (0, _test.test)("saves dev as ".concat(_spruceEventUtils.REMOTE_DEV), "developer", "".concat(_spruceEventUtils.REMOTE_DEV)), _dec4 = (0, _test.test)("saves sandbox as ".concat(_spruceEventUtils.REMOTE_SANDBOX), "sandbox", "".concat(_spruceEventUtils.REMOTE_SANDBOX)), _dec5 = (0, _test.test)("saves prod as ".concat(_spruceEventUtils.REMOTE_PROD), "production", "".concat(_spruceEventUtils.REMOTE_PROD)), _dec6 = (0, _test.test)('create.event asks for remote on IS TTY', 'event', 'create'), _dec7 = (0, _test.test)('sync.events asks for remote on IS TTY', 'event', 'sync'), _dec8 = (0, _test.test)('login asks for remote on IS TTY', 'person', 'login'), _dec9 = (0, _test.test)('login.skill asks for remote on IS TTY', 'skill', 'login'), _dec10 = (0, _test.test)('create.event throws for remote on NOT TTY', 'create', false), _dec11 = (0, _test.test)('sync.events throws for remote on NOT TTY', 'sync', false), _dec12 = (0, _test.test)(), (_class = (_temp = _class2 = /*#__PURE__*/function (_AbstractSkillTest) {
43
43
  (0, _inherits2["default"])(SettingRemoteTest, _AbstractSkillTest);
44
44
 
45
45
  var _super = _createSuper(SettingRemoteTest);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/__tests__/behavioral/SettingRemote.test.ts"],"names":["SettingRemoteTest","REMOTE_LOCAL","REMOTE_DEV","REMOTE_SANDBOX","REMOTE_PROD","assert","isFunction","Action","execute","remote","expected","env","Service","host","get","isEqual","feature","action","TerminalInterface","setDoesSupportColor","unset","shouldAutoHandleDependencies","waitForInput","last","ui","getLastInvocation","doesInclude","options","label","reset","shouldThrowOnListenerError","results","isTruthy","errors","stack","set","summaryLines","AbstractSkillTest"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAMA;;AAEA;;AACA;;;;;;;;IAEqBA,iB,WAGnB,iB,UAKA,yCAAuBC,8BAAvB,sBAAmDA,8BAAnD,E,UACA,uCAAqBC,4BAArB,0BAAmDA,4BAAnD,E,UACA,2CAAyBC,gCAAzB,wBAAyDA,gCAAzD,E,UACA,wCAAsBC,6BAAtB,2BAAsDA,6BAAtD,E,UAUA,gBAAK,wCAAL,EAA+C,OAA/C,EAAwD,QAAxD,C,UACA,gBAAK,uCAAL,EAA8C,OAA9C,EAAuD,MAAvD,C,UACA,gBAAK,iCAAL,EAAwC,QAAxC,EAAkD,OAAlD,C,UACA,gBAAK,uCAAL,EAA8C,OAA9C,EAAuD,OAAvD,C,WAuBA,gB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abs/spruce-event-utils'\nimport { test, assert } from '@sprucelabs/test'\nimport { FeatureCode } from '../../features/features.types'\nimport TerminalInterface from '../../interfaces/TerminalInterface'\nimport AbstractSkillTest from '../../tests/AbstractSkillTest'\n\nexport default class SettingRemoteTest extends AbstractSkillTest {\n\tprotected static skillCacheKey = 'events'\n\n\t@test()\n\tprotected static async hasSetRemoteAction() {\n\t\tassert.isFunction(this.Action('event', 'setRemote').execute)\n\t}\n\n\t@test(`saves local as ${REMOTE_LOCAL}`, `local`, `${REMOTE_LOCAL}`)\n\t@test(`saves dev as ${REMOTE_DEV}`, `developer`, `${REMOTE_DEV}`)\n\t@test(`saves sandbox as ${REMOTE_SANDBOX}`, `sandbox`, `${REMOTE_SANDBOX}`)\n\t@test(`saves prod as ${REMOTE_PROD}`, `production`, `${REMOTE_PROD}`)\n\tprotected static async savesRemote(remote: string, expected: string) {\n\t\tawait this.Action('event', 'setRemote').execute({ remote })\n\n\t\tconst env = this.Service('env')\n\t\tconst host = env.get('HOST')\n\n\t\tassert.isEqual(host, expected)\n\t}\n\n\t@test('create.event asks for remote on IS TTY', 'event', 'create')\n\t@test('sync.events asks for remote on IS TTY', 'event', 'sync')\n\t@test('login asks for remote on IS TTY', 'person', 'login')\n\t@test('skill.login asks for remote on IS TTY', 'skill', 'login')\n\tprotected static async shouldAskForRemoteBeforeEventActionIsInvokedIfTerminalSupportsIt(\n\t\tfeature: FeatureCode,\n\t\taction: string\n\t) {\n\t\tTerminalInterface.setDoesSupportColor(true)\n\n\t\tconst env = this.Service('env')\n\t\tenv.unset('HOST')\n\n\t\tvoid this.Action(feature, action, {\n\t\t\tshouldAutoHandleDependencies: true,\n\t\t}).execute({})\n\n\t\tawait this.waitForInput()\n\n\t\tconst last = this.ui.getLastInvocation()\n\n\t\tassert.doesInclude(last.options.label, 'remote')\n\n\t\tthis.ui.reset()\n\t}\n\n\t@test('create.event throws for remote on NOT TTY', 'create', false)\n\t@test('sync.events throws for remote on NOT TTY', 'sync', false)\n\tprotected static async shouldThrowBeforeEventActionIsInvokedIfTerminalSupportsIt(\n\t\taction: string\n\t) {\n\t\tTerminalInterface.setDoesSupportColor(false)\n\t\tconst env = this.Service('env')\n\t\tenv.unset('HOST')\n\n\t\tconst results = await this.Action('event', action, {\n\t\t\tshouldThrowOnListenerError: false,\n\t\t}).execute({})\n\n\t\tassert.isTruthy(results.errors)\n\t\tassert.doesInclude(results.errors[0].stack, 'env.HOST')\n\t}\n\n\t@test()\n\tprotected static async resultsOfCommandHasRemoteMixedIntoSummary() {\n\t\tthis.Service('remote').set('developer')\n\t\tconst results = await this.Action('event', 'sync').execute({})\n\n\t\tassert.isTruthy(results.summaryLines)\n\t\tassert.doesInclude(results.summaryLines, 'Remote: dev')\n\t}\n}\n"],"file":"SettingRemote.test.js"}
1
+ {"version":3,"sources":["../../../src/__tests__/behavioral/SettingRemote.test.ts"],"names":["SettingRemoteTest","REMOTE_LOCAL","REMOTE_DEV","REMOTE_SANDBOX","REMOTE_PROD","assert","isFunction","Action","execute","remote","expected","env","Service","host","get","isEqual","feature","action","TerminalInterface","setDoesSupportColor","unset","shouldAutoHandleDependencies","waitForInput","last","ui","getLastInvocation","doesInclude","options","label","reset","shouldThrowOnListenerError","results","isTruthy","errors","stack","set","summaryLines","AbstractSkillTest"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAMA;;AAEA;;AACA;;;;;;;;IAEqBA,iB,WAGnB,iB,UAKA,yCAAuBC,8BAAvB,sBAAmDA,8BAAnD,E,UACA,uCAAqBC,4BAArB,0BAAmDA,4BAAnD,E,UACA,2CAAyBC,gCAAzB,wBAAyDA,gCAAzD,E,UACA,wCAAsBC,6BAAtB,2BAAsDA,6BAAtD,E,UAUA,gBAAK,wCAAL,EAA+C,OAA/C,EAAwD,QAAxD,C,UACA,gBAAK,uCAAL,EAA8C,OAA9C,EAAuD,MAAvD,C,UACA,gBAAK,iCAAL,EAAwC,QAAxC,EAAkD,OAAlD,C,UACA,gBAAK,uCA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REMOTE_PROD,\n\tREMOTE_SANDBOX,\n} from '@sprucelabs/spruce-event-utils'\nimport { test, assert } from '@sprucelabs/test'\nimport { FeatureCode } from '../../features/features.types'\nimport TerminalInterface from '../../interfaces/TerminalInterface'\nimport AbstractSkillTest from '../../tests/AbstractSkillTest'\n\nexport default class SettingRemoteTest extends AbstractSkillTest {\n\tprotected static skillCacheKey = 'events'\n\n\t@test()\n\tprotected static async hasSetRemoteAction() {\n\t\tassert.isFunction(this.Action('event', 'setRemote').execute)\n\t}\n\n\t@test(`saves local as ${REMOTE_LOCAL}`, `local`, `${REMOTE_LOCAL}`)\n\t@test(`saves dev as ${REMOTE_DEV}`, `developer`, `${REMOTE_DEV}`)\n\t@test(`saves sandbox as ${REMOTE_SANDBOX}`, `sandbox`, `${REMOTE_SANDBOX}`)\n\t@test(`saves prod as ${REMOTE_PROD}`, `production`, `${REMOTE_PROD}`)\n\tprotected static async savesRemote(remote: string, expected: string) {\n\t\tawait this.Action('event', 'setRemote').execute({ remote })\n\n\t\tconst env = this.Service('env')\n\t\tconst host = env.get('HOST')\n\n\t\tassert.isEqual(host, expected)\n\t}\n\n\t@test('create.event asks for remote on IS TTY', 'event', 'create')\n\t@test('sync.events asks for remote on IS TTY', 'event', 'sync')\n\t@test('login asks for remote on IS TTY', 'person', 'login')\n\t@test('login.skill asks for remote on IS TTY', 'skill', 'login')\n\tprotected static async shouldAskForRemoteBeforeEventActionIsInvokedIfTerminalSupportsIt(\n\t\tfeature: FeatureCode,\n\t\taction: string\n\t) {\n\t\tTerminalInterface.setDoesSupportColor(true)\n\n\t\tconst env = this.Service('env')\n\t\tenv.unset('HOST')\n\n\t\tvoid this.Action(feature, action, {\n\t\t\tshouldAutoHandleDependencies: true,\n\t\t}).execute({})\n\n\t\tawait this.waitForInput()\n\n\t\tconst last = this.ui.getLastInvocation()\n\n\t\tassert.doesInclude(last.options.label, 'remote')\n\n\t\tthis.ui.reset()\n\t}\n\n\t@test('create.event throws for remote on NOT TTY', 'create', false)\n\t@test('sync.events throws for remote on NOT TTY', 'sync', false)\n\tprotected static async shouldThrowBeforeEventActionIsInvokedIfTerminalSupportsIt(\n\t\taction: string\n\t) {\n\t\tTerminalInterface.setDoesSupportColor(false)\n\t\tconst env = this.Service('env')\n\t\tenv.unset('HOST')\n\n\t\tconst results = await this.Action('event', action, {\n\t\t\tshouldThrowOnListenerError: false,\n\t\t}).execute({})\n\n\t\tassert.isTruthy(results.errors)\n\t\tassert.doesInclude(results.errors[0].stack, 'env.HOST')\n\t}\n\n\t@test()\n\tprotected static async resultsOfCommandHasRemoteMixedIntoSummary() {\n\t\tthis.Service('remote').set('developer')\n\t\tconst results = await this.Action('event', 'sync').execute({})\n\n\t\tassert.isTruthy(results.summaryLines)\n\t\tassert.doesInclude(results.summaryLines, 'Remote: dev')\n\t}\n}\n"],"file":"SettingRemote.test.js"}
@@ -96,13 +96,17 @@ var CreatingDataStoresTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
96
96
  case 2:
97
97
  health = _context2.sent;
98
98
 
99
- _test.assert.isFalsy(health.skill.errors);
99
+ _test.assert.isFalsy(health.skill.errors); //@ts-ignore
100
100
 
101
- _test.assert.isTruthy(health.store);
102
101
 
103
- _test.assert.isFalsy(health.store.errors);
102
+ _test.assert.isTruthy(health.store); //@ts-ignore
103
+
104
+
105
+ _test.assert.isFalsy(health.store.errors); //@ts-ignore
106
+
107
+
108
+ _test.assert.isArray(health.store.stores); //@ts-ignore
104
109
 
105
- _test.assert.isArray(health.store.stores);
106
110
 
107
111
  _test.assert.isLength(health.store.stores, 0);
108
112
 
@@ -206,11 +210,15 @@ var CreatingDataStoresTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
206
210
  case 2:
207
211
  health = _context5.sent;
208
212
 
209
- _test.assert.isTruthy(health.store);
213
+ //@ts-ignore
214
+ _test.assert.isTruthy(health.store); //@ts-ignore
215
+
216
+
217
+ _test.assert.isFalsy(health.store.errors); //@ts-ignore
210
218
 
211
- _test.assert.isFalsy(health.store.errors);
212
219
 
213
- _test.assert.isLength(health.store.stores, 1);
220
+ _test.assert.isLength(health.store.stores, 1); //@ts-ignore
221
+
214
222
 
215
223
  _test.assert.isEqual(health.store.stores[0].name, 'People');
216
224
 
@@ -284,13 +292,18 @@ var CreatingDataStoresTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
284
292
  case 2:
285
293
  health = _context7.sent;
286
294
 
287
- _test.assert.isTruthy(health.store);
295
+ //@ts-ignore
296
+ _test.assert.isTruthy(health.store); //@ts-ignore
297
+
298
+
299
+ _test.assert.isFalsy(health.store.errors); //@ts-ignore
300
+
301
+
302
+ _test.assert.isLength(health.store.stores, 2); //@ts-ignore
288
303
 
289
- _test.assert.isFalsy(health.store.errors);
290
304
 
291
- _test.assert.isLength(health.store.stores, 2);
305
+ _test.assert.isEqual(health.store.stores[0].name, 'Bids'); //@ts-ignore
292
306
 
293
- _test.assert.isEqual(health.store.stores[0].name, 'Bids');
294
307
 
295
308
  _test.assert.isEqual(health.store.stores[1].name, 'People');
296
309
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/__tests__/behavioral/stores/CreatingADataStore.test.ts"],"names":["CreatingDataStoresTest","assert","isFunction","Action","execute","cli","checkHealth","shouldRunOnSourceFiles","health","isFalsy","skill","errors","isTruthy","store","isArray","stores","isLength","nameReadable","nameReadablePlural","namePascal","results","path","testUtil","assertFileByNameInGeneratedFiles","files","Service","check","file","resolveHashSprucePath","isTrue","diskUtil","doesFileExist","isEqual","name","errorAssertUtil","assertError","storeContents","readFile","replace","writeFile","testFile","resolveTestPath","testContents","dest","resolvePath","isFalse","getAbstractTestPath","CommandService","setMockResponse","code","storesFile","deleteFile","AbstractSkillTest"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;IAEqBA,sB,WAGnB,iB,UAKA,iB,UAWA,iB,UAkBA,iB,UAOA,iB,UASA,iB,UAkB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AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;;yHAOA;AAAA;AAAA;AAAA;AAAA;AAAA;AAECC,2CAAeC,eAAf,CAA+B,cAA/B,EAA+C;AAC9CC,kBAAAA,IAAI,EAAE;AADwC,iBAA/C;;AAIAF,2CAAeC,eAAf,CAA+B,YAA/B,EAA8C;AAC7CC,kBAAAA,IAAI,EAAE;AADuC,iBAA9C;;AAIMC,gBAAAA,UAVP,GAUoB,KAAKtB,qBAAL,CAA2B,wBAA3B,CAVpB;;AAWCE,2CAASqB,UAAT,CAAoBD,UAApB;;AAXD;AAAA,uBAYO,KAAK/C,MAAL,CAAY,MAAZ,EAAoB,SAApB,EAA+BC,OAA/B,CAAuC,EAAvC,CAZP;;AAAA;AAaCH,6BAAO4B,MAAP,CAAcC,2BAASC,aAAT,CAAuBmB,UAAvB,CAAd;;AAbD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;WAgBA,+BAA6C;AAC5C,aAAO,KAAKN,WAAL,CAAiB,KAAjB,EAAwB,OAAxB,EAAiC,0BAAjC,CAAP;AACA;;;EAtJkDQ,8B,8DAClB,Q","sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test'\nimport { errorAssertUtil } from '@sprucelabs/test-utils'\nimport '@sprucelabs/spruce-store-plugin'\nimport CommandService from '../../../services/CommandService'\nimport AbstractSkillTest from '../../../tests/AbstractSkillTest'\nimport testUtil from '../../../tests/utilities/test.utility'\n\nexport default class CreatingDataStoresTest extends AbstractSkillTest {\n\tprotected static skillCacheKey = 'stores'\n\n\t@test()\n\tprotected static async hasCreateStoreAction() {\n\t\tassert.isFunction(this.Action('store', 'create').execute)\n\t}\n\n\t@test()\n\tprotected static async getsNoStoresBackFromHealthCheck() {\n\t\tconst health = await this.cli.checkHealth({ shouldRunOnSourceFiles: true })\n\n\t\tassert.isFalsy(health.skill.errors)\n\t\tassert.isTruthy(health.store)\n\t\tassert.isFalsy(health.store.errors)\n\t\tassert.isArray(health.store.stores)\n\t\tassert.isLength(health.store.stores, 0)\n\t}\n\n\t@test()\n\tprotected static async generatesValidStoreFile() {\n\t\tconst results = await this.Action('store', 'create').execute({\n\t\t\tnameReadable: 'Person',\n\t\t\tnameReadablePlural: 'People',\n\t\t\tnamePascal: 'Person',\n\t\t})\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tconst path = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'People.store.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tawait this.Service('typeChecker').check(path)\n\t}\n\n\t@test()\n\tprotected static async generatesAMapFile() {\n\t\tconst file = this.resolveHashSprucePath('stores', 'stores.ts')\n\t\tassert.isTrue(diskUtil.doesFileExist(file))\n\t\tawait this.Service('typeChecker').check(file)\n\t}\n\n\t@test()\n\tprotected static async getsOneStoresBackFromHealthCheck() {\n\t\tconst health = await this.cli.checkHealth({ shouldRunOnSourceFiles: true })\n\t\tassert.isTruthy(health.store)\n\t\tassert.isFalsy(health.store.errors)\n\t\tassert.isLength(health.store.stores, 1)\n\t\tassert.isEqual(health.store.stores[0].name, 'People')\n\t}\n\n\t@test()\n\tprotected static async canGenerateASecondStoreFile() {\n\t\tconst results = await this.Action('store', 'create').execute({\n\t\t\tnameReadable: 'Bid',\n\t\t\tnameReadablePlural: 'Bids',\n\t\t\tnamePascal: 'Bid',\n\t\t})\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tconst path = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'Bids.store.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tawait this.Service('typeChecker').check(path)\n\t}\n\n\t@test()\n\tprotected static async getsSecondStoresBackFromHealthCheck() {\n\t\tconst health = await this.cli.checkHealth({ shouldRunOnSourceFiles: true })\n\n\t\tassert.isTruthy(health.store)\n\t\tassert.isFalsy(health.store.errors)\n\t\tassert.isLength(health.store.stores, 2)\n\t\tassert.isEqual(health.store.stores[0].name, 'Bids')\n\t\tassert.isEqual(health.store.stores[1].name, 'People')\n\t}\n\n\t@test()\n\tprotected static async errorsWhenGeneratingAStoreWithTheSameName() {\n\t\tconst results = await this.Action('store', 'create').execute({\n\t\t\tnameReadable: 'Bid',\n\t\t\tnameReadablePlural: 'Bids',\n\t\t\tnamePascal: 'Bid',\n\t\t})\n\n\t\tassert.isTruthy(results.errors)\n\t\terrorAssertUtil.assertError(results.errors[0], 'STORE_EXISTS')\n\t}\n\n\t@test()\n\tprotected static async storeFactoryAndStoresAreTyped() {\n\t\tconst results = await this.Action('store', 'create').execute({\n\t\t\tnameReadable: 'Product',\n\t\t\tnameReadablePlural: 'Products',\n\t\t\tnamePascal: 'Product',\n\t\t})\n\n\t\tconst path = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'Products.store.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tconst storeContents = diskUtil\n\t\t\t.readFile(path)\n\t\t\t.replace(\n\t\t\t\t'type ProductsStoreOptions = UniversalStoreOptions',\n\t\t\t\t'type ProductsStoreOptions = UniversalStoreOptions & {hello: string}'\n\t\t\t)\n\n\t\tdiskUtil.writeFile(path, storeContents)\n\n\t\tconst testFile = this.resolveTestPath('store-test.ts.hbs')\n\t\tconst testContents = diskUtil.readFile(testFile)\n\n\t\tconst dest = this.resolvePath('src', 'test.ts')\n\t\tdiskUtil.writeFile(dest, testContents)\n\n\t\tawait this.Service('typeChecker').check(dest)\n\t}\n\n\t@test()\n\tprotected static async doesNotCreateAbstractTestFileBecauseTestIsNotInstalled() {\n\t\tassert.isFalse(\n\t\t\tdiskUtil.doesFileExist(CreatingDataStoresTest.getAbstractTestPath())\n\t\t)\n\t}\n\n\t@test()\n\tprotected static async upgradeRestoresDataStoreTypes() {\n\t\tCommandService.setMockResponse('yarn rebuild', {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tCommandService.setMockResponse(/yarn add/gis, {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tconst storesFile = this.resolveHashSprucePath('stores/stores.types.ts')\n\t\tdiskUtil.deleteFile(storesFile)\n\t\tawait this.Action('node', 'upgrade').execute({})\n\t\tassert.isTrue(diskUtil.doesFileExist(storesFile))\n\t}\n\n\tprivate static getAbstractTestPath(): string {\n\t\treturn this.resolvePath('src', 'tests', 'AbstractDataStoreTest.ts')\n\t}\n}\n"],"file":"CreatingADataStore.test.js"}
1
+ {"version":3,"sources":["../../../../src/__tests__/behavioral/stores/CreatingADataStore.test.ts"],"names":["CreatingDataStoresTest","assert","isFunction","Action","execute","cli","checkHealth","shouldRunOnSourceFiles","health","isFalsy","skill","errors","isTruthy","store","isArray","stores","isLength","nameReadable","nameReadablePlural","namePascal","results","path","testUtil","assertFileByNameInGeneratedFiles","files","Service","check","file","resolveHashSprucePath","isTrue","diskUtil","doesFileExist","isEqual","name","errorAssertUtil","assertError","storeContents","readFile","replace","writeFile","testFile","resolveTestPath","testContents","dest","resolvePath","isFalse","getAbstractTestPath","CommandService","setMockResponse","code","storesFile","deleteFile","AbstractSkillTest"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;IAEqBA,sB,WAGnB,iB,UAKA,iB,UAeA,iB,UAkBA,iB,UAOA,iB,UAaA,iB,UAkBA,iB,UAgBA,iB,UAYA,iB,WA+BA,iB,WAOA,iB;;;;;;;;;;;;;gHA9ID;AAAA;AAAA;AAAA;AAAA;AAECC,6BAAOC,UAAP,CAAkB,KAAKC,MAAL,CAAY,OAAZ,EAAqB,QAArB,EAA+BC,OAAjD;;AAFD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;;2HAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAEsB,KAAKC,GAAL,CAASC,WAAT,CAAqB;AAAEC,kBAAAA,sBAAsB,EAAE;AAA1B,iBAArB,CAFtB;;AAAA;AAEOC,gBAAAA,MAFP;;AAICP,6BAAOQ,OAAP,CAAeD,MAAM,CAACE,KA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CAA2B,wBAA3B,CAVpB;;AAWCE,2CAASqB,UAAT,CAAoBD,UAApB;;AAXD;AAAA,uBAYO,KAAK/C,MAAL,CAAY,MAAZ,EAAoB,SAApB,EAA+BC,OAA/B,CAAuC,EAAvC,CAZP;;AAAA;AAaCH,6BAAO4B,MAAP,CAAcC,2BAASC,aAAT,CAAuBmB,UAAvB,CAAd;;AAbD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;WAgBA,+BAA6C;AAC5C,aAAO,KAAKN,WAAL,CAAiB,KAAjB,EAAwB,OAAxB,EAAiC,0BAAjC,CAAP;AACA;;;EAnKkDQ,8B,8DAClB,Q","sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test'\nimport { errorAssertUtil } from '@sprucelabs/test-utils'\nimport '@sprucelabs/spruce-store-plugin'\nimport CommandService from '../../../services/CommandService'\nimport AbstractSkillTest from '../../../tests/AbstractSkillTest'\nimport testUtil from '../../../tests/utilities/test.utility'\n\nexport default class CreatingDataStoresTest extends AbstractSkillTest {\n\tprotected static skillCacheKey = 'stores'\n\n\t@test()\n\tprotected static async hasCreateStoreAction() {\n\t\tassert.isFunction(this.Action('store', 'create').execute)\n\t}\n\n\t@test()\n\tprotected static async getsNoStoresBackFromHealthCheck() {\n\t\tconst health = await this.cli.checkHealth({ shouldRunOnSourceFiles: true })\n\n\t\tassert.isFalsy(health.skill.errors)\n\t\t//@ts-ignore\n\t\tassert.isTruthy(health.store)\n\t\t//@ts-ignore\n\t\tassert.isFalsy(health.store.errors)\n\t\t//@ts-ignore\n\t\tassert.isArray(health.store.stores)\n\t\t//@ts-ignore\n\t\tassert.isLength(health.store.stores, 0)\n\t}\n\n\t@test()\n\tprotected static async generatesValidStoreFile() {\n\t\tconst results = await this.Action('store', 'create').execute({\n\t\t\tnameReadable: 'Person',\n\t\t\tnameReadablePlural: 'People',\n\t\t\tnamePascal: 'Person',\n\t\t})\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tconst path = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'People.store.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tawait this.Service('typeChecker').check(path)\n\t}\n\n\t@test()\n\tprotected static async generatesAMapFile() {\n\t\tconst file = this.resolveHashSprucePath('stores', 'stores.ts')\n\t\tassert.isTrue(diskUtil.doesFileExist(file))\n\t\tawait this.Service('typeChecker').check(file)\n\t}\n\n\t@test()\n\tprotected static async getsOneStoresBackFromHealthCheck() {\n\t\tconst health = await this.cli.checkHealth({ shouldRunOnSourceFiles: true })\n\t\t//@ts-ignore\n\t\tassert.isTruthy(health.store)\n\t\t//@ts-ignore\n\t\tassert.isFalsy(health.store.errors)\n\t\t//@ts-ignore\n\t\tassert.isLength(health.store.stores, 1)\n\t\t//@ts-ignore\n\t\tassert.isEqual(health.store.stores[0].name, 'People')\n\t}\n\n\t@test()\n\tprotected static async canGenerateASecondStoreFile() {\n\t\tconst results = await this.Action('store', 'create').execute({\n\t\t\tnameReadable: 'Bid',\n\t\t\tnameReadablePlural: 'Bids',\n\t\t\tnamePascal: 'Bid',\n\t\t})\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tconst path = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'Bids.store.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tawait this.Service('typeChecker').check(path)\n\t}\n\n\t@test()\n\tprotected static async getsSecondStoresBackFromHealthCheck() {\n\t\tconst health = await this.cli.checkHealth({ shouldRunOnSourceFiles: true })\n\n\t\t//@ts-ignore\n\t\tassert.isTruthy(health.store)\n\t\t//@ts-ignore\n\t\tassert.isFalsy(health.store.errors)\n\t\t//@ts-ignore\n\t\tassert.isLength(health.store.stores, 2)\n\t\t//@ts-ignore\n\t\tassert.isEqual(health.store.stores[0].name, 'Bids')\n\t\t//@ts-ignore\n\t\tassert.isEqual(health.store.stores[1].name, 'People')\n\t}\n\n\t@test()\n\tprotected static async errorsWhenGeneratingAStoreWithTheSameName() {\n\t\tconst results = await this.Action('store', 'create').execute({\n\t\t\tnameReadable: 'Bid',\n\t\t\tnameReadablePlural: 'Bids',\n\t\t\tnamePascal: 'Bid',\n\t\t})\n\n\t\tassert.isTruthy(results.errors)\n\t\terrorAssertUtil.assertError(results.errors[0], 'STORE_EXISTS')\n\t}\n\n\t@test()\n\tprotected static async storeFactoryAndStoresAreTyped() {\n\t\tconst results = await this.Action('store', 'create').execute({\n\t\t\tnameReadable: 'Product',\n\t\t\tnameReadablePlural: 'Products',\n\t\t\tnamePascal: 'Product',\n\t\t})\n\n\t\tconst path = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'Products.store.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tconst storeContents = diskUtil\n\t\t\t.readFile(path)\n\t\t\t.replace(\n\t\t\t\t'type ProductsStoreOptions = UniversalStoreOptions',\n\t\t\t\t'type ProductsStoreOptions = UniversalStoreOptions & {hello: string}'\n\t\t\t)\n\n\t\tdiskUtil.writeFile(path, storeContents)\n\n\t\tconst testFile = this.resolveTestPath('store-test.ts.hbs')\n\t\tconst testContents = diskUtil.readFile(testFile)\n\n\t\tconst dest = this.resolvePath('src', 'test.ts')\n\t\tdiskUtil.writeFile(dest, testContents)\n\n\t\tawait this.Service('typeChecker').check(dest)\n\t}\n\n\t@test()\n\tprotected static async doesNotCreateAbstractTestFileBecauseTestIsNotInstalled() {\n\t\tassert.isFalse(\n\t\t\tdiskUtil.doesFileExist(CreatingDataStoresTest.getAbstractTestPath())\n\t\t)\n\t}\n\n\t@test()\n\tprotected static async upgradeRestoresDataStoreTypes() {\n\t\tCommandService.setMockResponse('yarn rebuild', {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tCommandService.setMockResponse(/yarn add/gis, {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tconst storesFile = this.resolveHashSprucePath('stores/stores.types.ts')\n\t\tdiskUtil.deleteFile(storesFile)\n\t\tawait this.Action('node', 'upgrade').execute({})\n\t\tassert.isTrue(diskUtil.doesFileExist(storesFile))\n\t}\n\n\tprivate static getAbstractTestPath(): string {\n\t\treturn this.resolvePath('src', 'tests', 'AbstractDataStoreTest.ts')\n\t}\n}\n"],"file":"CreatingADataStore.test.js"}
@@ -121,7 +121,7 @@ var RegisterAction = /*#__PURE__*/function (_AbstractAction) {
121
121
  _context.prev = 14;
122
122
  _context.t0 = _context["catch"](7);
123
123
  return _context.abrupt("return", {
124
- hints: ["If you've already registered your skill, try 'spruce skill.login'!"],
124
+ hints: ["If you've already registered your skill, try 'spruce login.skill'!"],
125
125
  errors: [_context.t0]
126
126
  });
127
127
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/features/skill/actions/RegisterAction.ts"],"names":["optionsSchema","id","description","fields","nameReadable","type","label","isRequired","nameKebab","RegisterAction","options","validateAndNormalizeOptions","connectToApi","client","emit","payload","name","slug","results","eventResponseUtil","getFirstResponseOrThrow","skill","summaryLines","generateSkillSummaryLines","Service","updateCurrentSkill","hints","meta","errors","AbstractAction","apiKey"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAEA;;;;;;AAGA,IAAMA,aAAa,GAAG,yBAAY;AACjCC,EAAAA,EAAE,EAAE,qBAD6B;AAEjCC,EAAAA,WAAW,EACV,oFAHgC;AAIjCC,EAAAA,MAAM,EAAE;AACPC,IAAAA,YAAY,EAAE;AACbC,MAAAA,IAAI,EAAE,MADO;AAEbC,MAAAA,KAAK,8BAFQ;AAGbC,MAAAA,UAAU,EAAE;AAHC,KADP;AAMPC,IAAAA,SAAS,EAAE;AACVH,MAAAA,IAAI,EAAE,MADI;AAEVC,MAAAA,KAAK,EAAE,WAFG;AAGVC,MAAAA,UAAU,EAAE;AAHF,KANJ;AAWPL,IAAAA,WAAW,EAAE;AACZG,MAAAA,IAAI,EAAE,MADM;AAEZC,MAAAA,KAAK,EAAE;AAFK;AAXN;AAJyB,CAAZ,CAAtB;;IAyBqBG,c;;;;;;;;;;;;;;;sGACkBT,a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ACJ,IAFT,iBAGCI,KAAK,CAACpB,EAHP,sBAIMoB,KAAK,CAACS,MAJZ,EAAP;AAMA","sourcesContent":["import { buildSchema, SchemaValues } from '@sprucelabs/schema'\nimport { eventResponseUtil } from '@sprucelabs/spruce-event-utils'\nimport { RegisteredSkill } from '../../../types/cli.types'\nimport AbstractAction from '../../AbstractAction'\nimport { FeatureActionResponse } from '../../features.types'\n\nconst optionsSchema = buildSchema({\n\tid: 'registerSkillAction',\n\tdescription:\n\t\t'Register your skill with Mercury so you can start communicating with other skills.',\n\tfields: {\n\t\tnameReadable: {\n\t\t\ttype: 'text',\n\t\t\tlabel: `What is your skill's name?`,\n\t\t\tisRequired: true,\n\t\t},\n\t\tnameKebab: {\n\t\t\ttype: 'text',\n\t\t\tlabel: 'Namespace',\n\t\t\tisRequired: true,\n\t\t},\n\t\tdescription: {\n\t\t\ttype: 'text',\n\t\t\tlabel: 'Describe your skill',\n\t\t},\n\t},\n})\n\ntype OptionsSchema = typeof optionsSchema\ntype Options = SchemaValues<OptionsSchema>\n\nexport default class RegisterAction extends AbstractAction<OptionsSchema> {\n\tpublic optionsSchema: OptionsSchema = optionsSchema\n\tpublic commandAliases = ['register.skill', 'register']\n\tpublic invocationMessage = 'Registering your skill... ⚡️'\n\n\tpublic async execute(options: Options): Promise<FeatureActionResponse> {\n\t\tconst { nameReadable, nameKebab, description } =\n\t\t\tthis.validateAndNormalizeOptions(options)\n\n\t\tconst client = await this.connectToApi()\n\t\tconst results = await client.emit('register-skill::v2020_12_25', {\n\t\t\tpayload: {\n\t\t\t\tname: nameReadable,\n\t\t\t\tslug: nameKebab,\n\t\t\t\tdescription,\n\t\t\t},\n\t\t})\n\n\t\ttry {\n\t\t\tconst { skill } = eventResponseUtil.getFirstResponseOrThrow(results)\n\n\t\t\tconst summaryLines = generateSkillSummaryLines(skill)\n\n\t\t\tthis.Service('auth').updateCurrentSkill(skill)\n\n\t\t\treturn {\n\t\t\t\tsummaryLines,\n\t\t\t\thints: [\n\t\t\t\t\t'Your skill is registered.',\n\t\t\t\t\t'You can check your .env for more details.',\n\t\t\t\t\t\"If you're ready to deploy, try `spruce deploy`. 🚀\",\n\t\t\t\t],\n\t\t\t\tmeta: {\n\t\t\t\t\tskill,\n\t\t\t\t},\n\t\t\t}\n\t\t} catch (err) {\n\t\t\treturn {\n\t\t\t\thints: [\n\t\t\t\t\t`If you've already registered your skill, try 'spruce skill.login'!`,\n\t\t\t\t],\n\t\t\t\terrors: [err],\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport function generateSkillSummaryLines(skill: RegisteredSkill) {\n\treturn [\n\t\t`Name: ${skill.name}`,\n\t\t`Slug: ${skill.slug}`,\n\t\t`ID: ${skill.id}`,\n\t\t`API Key: ${skill.apiKey}`,\n\t]\n}\n"],"file":"RegisterAction.js"}
1
+ {"version":3,"sources":["../../../../src/features/skill/actions/RegisterAction.ts"],"names":["optionsSchema","id","description","fields","nameReadable","type","label","isRequired","nameKebab","RegisterAction","options","validateAndNormalizeOptions","connectToApi","client","emit","payload","name","slug","results","eventResponseUtil","getFirstResponseOrThrow","skill","summaryLines","generateSkillSummaryLines","Service","updateCurrentSkill","hints","meta","errors","AbstractAction","apiKey"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAEA;;;;;;AAGA,IAAMA,aAAa,GAAG,yBAAY;AACjCC,EAAAA,EAAE,EAAE,qBAD6B;AAEjCC,EAAAA,WAAW,EACV,oFAHgC;AAIjCC,EAAAA,MAAM,EAAE;AACPC,IAAAA,YAAY,EAAE;AACbC,MAAAA,IAAI,EAAE,MADO;AAEbC,MAAAA,KAAK,8BAFQ;AAGbC,MAAAA,UAAU,EAAE;AAHC,KADP;AAMPC,IAAAA,SAAS,EAAE;AACVH,MAAAA,IAAI,EAAE,MADI;AAEVC,MAAAA,KAAK,EAAE,WAFG;AAGVC,MAAAA,UAAU,EAAE;AAHF,KANJ;AAWPL,IAAAA,WAAW,EAAE;AACZG,MAAAA,IAAI,E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2CC,2B;;;;AA+CrC,SAASN,yBAAT,CAAmCF,KAAnC,EAA2D;AACjE,SAAO,iBACGA,KAAK,CAACL,IADT,mBAEGK,KAAK,CAACJ,IAFT,iBAGCI,KAAK,CAACpB,EAHP,sBAIMoB,KAAK,CAACS,MAJZ,EAAP;AAMA","sourcesContent":["import { buildSchema, SchemaValues } from '@sprucelabs/schema'\nimport { eventResponseUtil } from '@sprucelabs/spruce-event-utils'\nimport { RegisteredSkill } from '../../../types/cli.types'\nimport AbstractAction from '../../AbstractAction'\nimport { FeatureActionResponse } from '../../features.types'\n\nconst optionsSchema = buildSchema({\n\tid: 'registerSkillAction',\n\tdescription:\n\t\t'Register your skill with Mercury so you can start communicating with other skills.',\n\tfields: {\n\t\tnameReadable: {\n\t\t\ttype: 'text',\n\t\t\tlabel: `What is your skill's name?`,\n\t\t\tisRequired: true,\n\t\t},\n\t\tnameKebab: {\n\t\t\ttype: 'text',\n\t\t\tlabel: 'Namespace',\n\t\t\tisRequired: true,\n\t\t},\n\t\tdescription: {\n\t\t\ttype: 'text',\n\t\t\tlabel: 'Describe your skill',\n\t\t},\n\t},\n})\n\ntype OptionsSchema = typeof optionsSchema\ntype Options = SchemaValues<OptionsSchema>\n\nexport default class RegisterAction extends AbstractAction<OptionsSchema> {\n\tpublic optionsSchema: OptionsSchema = optionsSchema\n\tpublic commandAliases = ['register.skill', 'register']\n\tpublic invocationMessage = 'Registering your skill... ⚡️'\n\n\tpublic async execute(options: Options): Promise<FeatureActionResponse> {\n\t\tconst { nameReadable, nameKebab, description } =\n\t\t\tthis.validateAndNormalizeOptions(options)\n\n\t\tconst client = await this.connectToApi()\n\t\tconst results = await client.emit('register-skill::v2020_12_25', {\n\t\t\tpayload: {\n\t\t\t\tname: nameReadable,\n\t\t\t\tslug: nameKebab,\n\t\t\t\tdescription,\n\t\t\t},\n\t\t})\n\n\t\ttry {\n\t\t\tconst { skill } = eventResponseUtil.getFirstResponseOrThrow(results)\n\n\t\t\tconst summaryLines = generateSkillSummaryLines(skill)\n\n\t\t\tthis.Service('auth').updateCurrentSkill(skill)\n\n\t\t\treturn {\n\t\t\t\tsummaryLines,\n\t\t\t\thints: [\n\t\t\t\t\t'Your skill is registered.',\n\t\t\t\t\t'You can check your .env for more details.',\n\t\t\t\t\t\"If you're ready to deploy, try `spruce deploy`. 🚀\",\n\t\t\t\t],\n\t\t\t\tmeta: {\n\t\t\t\t\tskill,\n\t\t\t\t},\n\t\t\t}\n\t\t} catch (err) {\n\t\t\treturn {\n\t\t\t\thints: [\n\t\t\t\t\t`If you've already registered your skill, try 'spruce login.skill'!`,\n\t\t\t\t],\n\t\t\t\terrors: [err],\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport function generateSkillSummaryLines(skill: RegisteredSkill) {\n\treturn [\n\t\t`Name: ${skill.name}`,\n\t\t`Slug: ${skill.slug}`,\n\t\t`ID: ${skill.id}`,\n\t\t`API Key: ${skill.apiKey}`,\n\t]\n}\n"],"file":"RegisterAction.js"}
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  ]
19
19
  },
20
20
  "license": "MIT",
21
- "version": "14.30.6",
21
+ "version": "14.30.10",
22
22
  "bin": {
23
23
  "spruce": "./build/index.js"
24
24
  },
@@ -76,19 +76,19 @@
76
76
  "@babel/plugin-proposal-decorators": "^7.16.7",
77
77
  "@babel/runtime": "^7.16.7",
78
78
  "@jest/reporters": "^27.4.6",
79
- "@sprucelabs/error": "^5.0.376",
80
- "@sprucelabs/heartwood-view-controllers": "^56.7.7",
81
- "@sprucelabs/jest-json-reporter": "^6.0.309",
82
- "@sprucelabs/mercury-client": "^19.3.46",
83
- "@sprucelabs/mercury-event-emitter": "^19.3.46",
84
- "@sprucelabs/mercury-types": "^26.2.71",
85
- "@sprucelabs/schema": "^25.6.69",
86
- "@sprucelabs/spruce-core-schemas": "^22.8.38",
87
- "@sprucelabs/spruce-event-plugin": "^22.0.42",
88
- "@sprucelabs/spruce-event-utils": "^17.1.539",
89
- "@sprucelabs/spruce-skill-booter": "^22.0.42",
90
- "@sprucelabs/spruce-skill-utils": "^22.2.197",
91
- "@sprucelabs/spruce-templates": "^14.30.6",
79
+ "@sprucelabs/error": "^5.0.381",
80
+ "@sprucelabs/heartwood-view-controllers": "^57.3.5",
81
+ "@sprucelabs/jest-json-reporter": "^6.0.312",
82
+ "@sprucelabs/mercury-client": "^20.0.18",
83
+ "@sprucelabs/mercury-event-emitter": "^20.0.18",
84
+ "@sprucelabs/mercury-types": "^26.2.93",
85
+ "@sprucelabs/schema": "^25.6.91",
86
+ "@sprucelabs/spruce-core-schemas": "^22.8.59",
87
+ "@sprucelabs/spruce-event-plugin": "^23.0.16",
88
+ "@sprucelabs/spruce-event-utils": "^17.1.563",
89
+ "@sprucelabs/spruce-skill-booter": "^23.0.16",
90
+ "@sprucelabs/spruce-skill-utils": "^23.0.19",
91
+ "@sprucelabs/spruce-templates": "^14.30.10",
92
92
  "@typescript-eslint/eslint-plugin": "^5.10.0",
93
93
  "@typescript-eslint/parser": "^5.10.0",
94
94
  "cfonts": "^2.10.0",
@@ -119,18 +119,18 @@
119
119
  "uuid": "^8.3.2"
120
120
  },
121
121
  "devDependencies": {
122
- "@sprucelabs/data-stores": "^7.2.206",
123
- "@sprucelabs/jest-sheets-reporter": "^1.2.312",
124
- "@sprucelabs/mercury-core-events": "^1.7.126",
125
- "@sprucelabs/resolve-path-aliases": "^1.0.253",
126
- "@sprucelabs/spruce-conversation-plugin": "^22.0.42",
127
- "@sprucelabs/spruce-deploy-plugin": "^22.0.42",
128
- "@sprucelabs/spruce-store-plugin": "^22.0.42",
129
- "@sprucelabs/spruce-test-fixtures": "^22.0.42",
130
- "@sprucelabs/test": "^7.7.274",
131
- "@sprucelabs/test-utils": "^3.0.379",
122
+ "@sprucelabs/data-stores": "^7.2.230",
123
+ "@sprucelabs/jest-sheets-reporter": "^1.2.313",
124
+ "@sprucelabs/mercury-core-events": "^1.7.149",
125
+ "@sprucelabs/resolve-path-aliases": "^1.0.255",
126
+ "@sprucelabs/spruce-conversation-plugin": "^23.0.16",
127
+ "@sprucelabs/spruce-deploy-plugin": "^23.0.16",
128
+ "@sprucelabs/spruce-store-plugin": "^23.0.16",
129
+ "@sprucelabs/spruce-test-fixtures": "^23.0.16",
130
+ "@sprucelabs/test": "^7.7.276",
131
+ "@sprucelabs/test-utils": "^3.0.385",
132
132
  "@types/blessed": "^0.1.19",
133
- "@types/eslint": "^8.2.2",
133
+ "@types/eslint": "^8.4.1",
134
134
  "@types/fs-extra": "^9.0.13",
135
135
  "@types/inflection": "^1.13.0",
136
136
  "@types/inquirer": "^8.1.3",
@@ -138,7 +138,7 @@
138
138
  "@types/lodash": "^4.14.178",
139
139
  "@types/md5": "^2.3.1",
140
140
  "@types/mkdirp": "^1.0.2",
141
- "@types/node": "^17.0.9",
141
+ "@types/node": "^17.0.10",
142
142
  "@types/promise.allsettled": "^1.0.3",
143
143
  "@types/ps-node": "^0.1.1",
144
144
  "@types/rimraf": "^3.0.2",
@@ -153,7 +153,7 @@
153
153
  "conventional-changelog-sprucelabs": "^1.1.2",
154
154
  "dotenv": "^14.2.0",
155
155
  "eslint": "^8.7.0",
156
- "eslint-config-spruce": "^10.11.1",
156
+ "eslint-config-spruce": "^10.11.2",
157
157
  "find-process": "^1.4.7",
158
158
  "jest": "^27.4.7",
159
159
  "jest-circus": "^27.4.6",
@@ -166,7 +166,7 @@
166
166
  "ts-node": "^10.4.0",
167
167
  "tsc-watch": "^4.6.0",
168
168
  "tsconfig-paths": "^3.12.0",
169
- "typescript": "^4.5.4"
169
+ "typescript": "^4.5.5"
170
170
  },
171
171
  "testSkillCache": {
172
172
  "everything": [
@@ -574,7 +574,7 @@
574
574
  "canAlwaysSkipFiles": "I264",
575
575
  "upgradingWritesExpectedFiles": "I289",
576
576
  "globalEmitterEmitsSEquentally": "I328",
577
- "skill.login asks for remote on IS TTY": "I338",
577
+ "login.skill asks for remote on IS TTY": "I338",
578
578
  "syncsEventsForSkillsWeveAddedAsDependencies": "I347"
579
579
  }
580
580
  }
@@ -597,5 +597,5 @@
597
597
  "ora"
598
598
  ]
599
599
  },
600
- "gitHead": "af1a9ab4ee866298e1009258437fd10d7d403429"
600
+ "gitHead": "a10f61998293f4918bfe82c45684a1137923e323"
601
601
  }
@@ -38,9 +38,13 @@ export default class CreatingAConversationTopicTest extends AbstractCliTest {
38
38
 
39
39
  private static async assertHealthCheckResultsAreValid(cli: CliInterface) {
40
40
  const health = await cli.checkHealth()
41
+ //@ts-ignore
41
42
  assert.isTruthy(health.conversation)
43
+ //@ts-ignore
42
44
  assert.isArray(health.conversation.topics)
45
+ //@ts-ignore
43
46
  assert.isLength(health.conversation.topics, 1)
47
+ //@ts-ignore
44
48
  assert.doesInclude(health.conversation.topics, 'bookAnAppointment')
45
49
  }
46
50
  }
@@ -33,7 +33,7 @@ export default class SettingRemoteTest extends AbstractSkillTest {
33
33
  @test('create.event asks for remote on IS TTY', 'event', 'create')
34
34
  @test('sync.events asks for remote on IS TTY', 'event', 'sync')
35
35
  @test('login asks for remote on IS TTY', 'person', 'login')
36
- @test('skill.login asks for remote on IS TTY', 'skill', 'login')
36
+ @test('login.skill asks for remote on IS TTY', 'skill', 'login')
37
37
  protected static async shouldAskForRemoteBeforeEventActionIsInvokedIfTerminalSupportsIt(
38
38
  feature: FeatureCode,
39
39
  action: string
@@ -19,9 +19,13 @@ export default class CreatingDataStoresTest extends AbstractSkillTest {
19
19
  const health = await this.cli.checkHealth({ shouldRunOnSourceFiles: true })
20
20
 
21
21
  assert.isFalsy(health.skill.errors)
22
+ //@ts-ignore
22
23
  assert.isTruthy(health.store)
24
+ //@ts-ignore
23
25
  assert.isFalsy(health.store.errors)
26
+ //@ts-ignore
24
27
  assert.isArray(health.store.stores)
28
+ //@ts-ignore
25
29
  assert.isLength(health.store.stores, 0)
26
30
  }
27
31
 
@@ -53,9 +57,13 @@ export default class CreatingDataStoresTest extends AbstractSkillTest {
53
57
  @test()
54
58
  protected static async getsOneStoresBackFromHealthCheck() {
55
59
  const health = await this.cli.checkHealth({ shouldRunOnSourceFiles: true })
60
+ //@ts-ignore
56
61
  assert.isTruthy(health.store)
62
+ //@ts-ignore
57
63
  assert.isFalsy(health.store.errors)
64
+ //@ts-ignore
58
65
  assert.isLength(health.store.stores, 1)
66
+ //@ts-ignore
59
67
  assert.isEqual(health.store.stores[0].name, 'People')
60
68
  }
61
69
 
@@ -81,10 +89,15 @@ export default class CreatingDataStoresTest extends AbstractSkillTest {
81
89
  protected static async getsSecondStoresBackFromHealthCheck() {
82
90
  const health = await this.cli.checkHealth({ shouldRunOnSourceFiles: true })
83
91
 
92
+ //@ts-ignore
84
93
  assert.isTruthy(health.store)
94
+ //@ts-ignore
85
95
  assert.isFalsy(health.store.errors)
96
+ //@ts-ignore
86
97
  assert.isLength(health.store.stores, 2)
98
+ //@ts-ignore
87
99
  assert.isEqual(health.store.stores[0].name, 'Bids')
100
+ //@ts-ignore
88
101
  assert.isEqual(health.store.stores[1].name, 'People')
89
102
  }
90
103
 
@@ -68,7 +68,7 @@ export default class RegisterAction extends AbstractAction<OptionsSchema> {
68
68
  } catch (err) {
69
69
  return {
70
70
  hints: [
71
- `If you've already registered your skill, try 'spruce skill.login'!`,
71
+ `If you've already registered your skill, try 'spruce login.skill'!`,
72
72
  ],
73
73
  errors: [err],
74
74
  }