@sprucelabs/spruce-cli 17.1.49 → 17.1.51
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 +2525 -8165
- package/build/features/onboard/OnboardFeature.js +2 -2
- package/build/features/onboard/OnboardFeature.js.map +1 -1
- package/build/features/onboard/templates/{ManagingTodos.test.ts.hbs → RootViewController.test.ts.hbs} +9 -7
- package/build/features/skill/actions/RegisterAction.js +1 -1
- package/build/features/skill/actions/RegisterAction.js.map +1 -1
- package/node_modules/@typescript-eslint/parser/_ts3.4/dist/index.d.ts +4 -0
- package/node_modules/@typescript-eslint/parser/_ts3.4/dist/parser.d.ts +22 -0
- package/node_modules/@typescript-eslint/parser/package.json +5 -5
- package/node_modules/@typescript-eslint/scope-manager/package.json +5 -5
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/generated/ast-spec.d.ts +1732 -0
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/index.d.ts +5 -0
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/lib.d.ts +3 -0
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/parser-options.d.ts +36 -0
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/ts-estree.d.ts +9 -0
- package/node_modules/@typescript-eslint/types/package.json +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ast-converter.d.ts +9 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/convert-comments.d.ts +11 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/convert.d.ts +159 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/WatchCompilerHostOfConfigFile.d.ts +13 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createDefaultProgram.d.ts +12 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createIsolatedProgram.d.ts +9 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createProjectProgram.d.ts +11 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createSourceFile.d.ts +5 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createWatchProgram.d.ts +19 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/getScriptKind.d.ts +5 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/shared.d.ts +22 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/useProvidedPrograms.d.ts +13 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/getModifiers.d.ts +4 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/index.d.ts +12 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/jsx/xhtml-entities.d.ts +2 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/node-utils.d.ts +231 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser-options.d.ts +188 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser.d.ts +25 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/semantic-or-syntactic-errors.d.ts +13 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/simple-traverse.d.ts +9 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/estree-to-ts-node-types.d.ts +175 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/index.d.ts +4 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/ts-nodes.d.ts +18 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/version-check.d.ts +3 -0
- package/node_modules/@typescript-eslint/typescript-estree/package.json +5 -5
- package/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/get-keys.d.ts +4 -0
- package/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/index.d.ts +3 -0
- package/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/visitor-keys.d.ts +6 -0
- package/node_modules/@typescript-eslint/visitor-keys/package.json +3 -3
- package/package.json +3 -3
- package/src/features/onboard/OnboardFeature.ts +2 -2
- package/src/features/onboard/templates/{ManagingTodos.test.ts.hbs → RootViewController.test.ts.hbs} +9 -7
- package/src/features/skill/actions/RegisterAction.ts +1 -1
|
@@ -196,11 +196,11 @@ var OnboardFeature = /*#__PURE__*/function (_AbstractFeature) {
|
|
|
196
196
|
var onboarding = this.Store('onboarding');
|
|
197
197
|
|
|
198
198
|
if (onboarding.getMode() !== 'off') {
|
|
199
|
-
var source = _spruceSkillUtils.diskUtil.resolvePath(__dirname, 'templates', '
|
|
199
|
+
var source = _spruceSkillUtils.diskUtil.resolvePath(__dirname, 'templates', 'RootViewController.test.ts.hbs');
|
|
200
200
|
|
|
201
201
|
var contents = _spruceSkillUtils.diskUtil.readFile(source);
|
|
202
202
|
|
|
203
|
-
var destination = _spruceSkillUtils.diskUtil.resolvePath(this.cwd, _createTestOptions["default"].fields.testDestinationDir.defaultValue, 'behavioral', '
|
|
203
|
+
var destination = _spruceSkillUtils.diskUtil.resolvePath(this.cwd, _createTestOptions["default"].fields.testDestinationDir.defaultValue, 'behavioral', 'RootViewController.test.ts');
|
|
204
204
|
|
|
205
205
|
_spruceSkillUtils.diskUtil.writeFile(destination, contents);
|
|
206
206
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OnboardFeature.js","names":["OnboardFeature","options","diskUtil","resolvePath","__dirname","emitter","on","handleWillExecuteCommand","bind","handleTestReporterDidBoot","onboardingStore","Store","store","OnboardingStore","ScriptLoader","LoadScripts","ui","dir","scriptsDir","commandExecuter","_command","Error","player","payload","onboarding","getMode","command","generateCommandFromPayload","confirmExpectedCommand","isExpectedCommand","ScriptPlayer","playScriptWithKey","source","contents","readFile","destination","cwd","createTestOptionsSchema","fields","testDestinationDir","defaultValue","writeFile","reset","featuresUtil","generateCommand","featureCode","actionCode","stage","getStage","AbstractFeature"],"sources":["../../../src/features/onboard/OnboardFeature.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport createTestOptionsSchema from '#spruce/schemas/spruceCli/v2020_07_22/createTestOptions.schema'\nimport AbstractFeature, {\n\tFeatureDependency,\n\tFeatureOptions,\n} from '../AbstractFeature'\nimport featuresUtil from '../feature.utilities'\nimport { FeatureCode } from '../features.types'\nimport ScriptLoader from './ScriptLoader'\nimport OnboardingStore from './stores/OnboardingStore'\n\ndeclare module '../../features/features.types' {\n\tinterface FeatureMap {\n\t\tonboard: OnboardFeature\n\t}\n}\n\nexport default class OnboardFeature extends AbstractFeature {\n\tpublic code: FeatureCode = 'onboard'\n\tpublic nameReadable = 'Onboard'\n\tpublic description = 'Get building your first skill already!'\n\tpublic dependencies: FeatureDependency[] = []\n\tpublic packageDependencies = []\n\n\tpublic actionsDir = diskUtil.resolvePath(__dirname, 'actions')\n\n\tprivate onboardingStore?: OnboardingStore\n\tprivate scriptsDir = diskUtil.resolvePath(__dirname, 'scripts')\n\n\tpublic constructor(options: FeatureOptions) {\n\t\tsuper(options)\n\n\t\tvoid this.emitter.on(\n\t\t\t'feature.will-execute',\n\t\t\tthis.handleWillExecuteCommand.bind(this)\n\t\t)\n\n\t\tvoid this.emitter.on(\n\t\t\t'test.reporter-did-boot',\n\t\t\tthis.handleTestReporterDidBoot.bind(this)\n\t\t)\n\t}\n\n\tpublic OnboardingStore() {\n\t\tif (!this.onboardingStore) {\n\t\t\tthis.onboardingStore = this.Store('onboarding')\n\t\t}\n\t\treturn this.onboardingStore\n\t}\n\n\tpublic async ScriptPlayer() {\n\t\tconst store = this.OnboardingStore()\n\n\t\tconst player = await ScriptLoader.LoadScripts({\n\t\t\tui: this.ui,\n\t\t\tdir: this.scriptsDir,\n\t\t\tonboardingStore: store,\n\t\t\tcommandExecuter: async (_command: string) => {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"I can't run commands for you yet, but will be able to soon. For now run `\" +\n\t\t\t\t\t\t_command +\n\t\t\t\t\t\t'` manually.'\n\t\t\t\t)\n\t\t\t},\n\t\t})\n\n\t\treturn player\n\t}\n\n\tprivate async handleWillExecuteCommand(payload: {\n\t\tfeatureCode: string\n\t\tactionCode: string\n\t}) {\n\t\tconst onboarding = this.Store('onboarding')\n\n\t\tif (onboarding.getMode() !== 'off') {\n\t\t\tconst command = this.generateCommandFromPayload(payload)\n\t\t\tawait this.confirmExpectedCommand(payload, onboarding)\n\n\t\t\tif (\n\t\t\t\tonboarding.getMode() !== 'off' &&\n\t\t\t\tthis.isExpectedCommand(command, onboarding)\n\t\t\t) {\n\t\t\t\tconst player = await this.ScriptPlayer()\n\t\t\t\tawait player.playScriptWithKey(`todo.${command}`)\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate handleTestReporterDidBoot() {\n\t\tconst onboarding = this.Store('onboarding')\n\n\t\tif (onboarding.getMode() !== 'off') {\n\t\t\tconst source = diskUtil.resolvePath(\n\t\t\t\t__dirname,\n\t\t\t\t'templates',\n\t\t\t\t'
|
|
1
|
+
{"version":3,"file":"OnboardFeature.js","names":["OnboardFeature","options","diskUtil","resolvePath","__dirname","emitter","on","handleWillExecuteCommand","bind","handleTestReporterDidBoot","onboardingStore","Store","store","OnboardingStore","ScriptLoader","LoadScripts","ui","dir","scriptsDir","commandExecuter","_command","Error","player","payload","onboarding","getMode","command","generateCommandFromPayload","confirmExpectedCommand","isExpectedCommand","ScriptPlayer","playScriptWithKey","source","contents","readFile","destination","cwd","createTestOptionsSchema","fields","testDestinationDir","defaultValue","writeFile","reset","featuresUtil","generateCommand","featureCode","actionCode","stage","getStage","AbstractFeature"],"sources":["../../../src/features/onboard/OnboardFeature.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport createTestOptionsSchema from '#spruce/schemas/spruceCli/v2020_07_22/createTestOptions.schema'\nimport AbstractFeature, {\n\tFeatureDependency,\n\tFeatureOptions,\n} from '../AbstractFeature'\nimport featuresUtil from '../feature.utilities'\nimport { FeatureCode } from '../features.types'\nimport ScriptLoader from './ScriptLoader'\nimport OnboardingStore from './stores/OnboardingStore'\n\ndeclare module '../../features/features.types' {\n\tinterface FeatureMap {\n\t\tonboard: OnboardFeature\n\t}\n}\n\nexport default class OnboardFeature extends AbstractFeature {\n\tpublic code: FeatureCode = 'onboard'\n\tpublic nameReadable = 'Onboard'\n\tpublic description = 'Get building your first skill already!'\n\tpublic dependencies: FeatureDependency[] = []\n\tpublic packageDependencies = []\n\n\tpublic actionsDir = diskUtil.resolvePath(__dirname, 'actions')\n\n\tprivate onboardingStore?: OnboardingStore\n\tprivate scriptsDir = diskUtil.resolvePath(__dirname, 'scripts')\n\n\tpublic constructor(options: FeatureOptions) {\n\t\tsuper(options)\n\n\t\tvoid this.emitter.on(\n\t\t\t'feature.will-execute',\n\t\t\tthis.handleWillExecuteCommand.bind(this)\n\t\t)\n\n\t\tvoid this.emitter.on(\n\t\t\t'test.reporter-did-boot',\n\t\t\tthis.handleTestReporterDidBoot.bind(this)\n\t\t)\n\t}\n\n\tpublic OnboardingStore() {\n\t\tif (!this.onboardingStore) {\n\t\t\tthis.onboardingStore = this.Store('onboarding')\n\t\t}\n\t\treturn this.onboardingStore\n\t}\n\n\tpublic async ScriptPlayer() {\n\t\tconst store = this.OnboardingStore()\n\n\t\tconst player = await ScriptLoader.LoadScripts({\n\t\t\tui: this.ui,\n\t\t\tdir: this.scriptsDir,\n\t\t\tonboardingStore: store,\n\t\t\tcommandExecuter: async (_command: string) => {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"I can't run commands for you yet, but will be able to soon. For now run `\" +\n\t\t\t\t\t\t_command +\n\t\t\t\t\t\t'` manually.'\n\t\t\t\t)\n\t\t\t},\n\t\t})\n\n\t\treturn player\n\t}\n\n\tprivate async handleWillExecuteCommand(payload: {\n\t\tfeatureCode: string\n\t\tactionCode: string\n\t}) {\n\t\tconst onboarding = this.Store('onboarding')\n\n\t\tif (onboarding.getMode() !== 'off') {\n\t\t\tconst command = this.generateCommandFromPayload(payload)\n\t\t\tawait this.confirmExpectedCommand(payload, onboarding)\n\n\t\t\tif (\n\t\t\t\tonboarding.getMode() !== 'off' &&\n\t\t\t\tthis.isExpectedCommand(command, onboarding)\n\t\t\t) {\n\t\t\t\tconst player = await this.ScriptPlayer()\n\t\t\t\tawait player.playScriptWithKey(`todo.${command}`)\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate handleTestReporterDidBoot() {\n\t\tconst onboarding = this.Store('onboarding')\n\n\t\tif (onboarding.getMode() !== 'off') {\n\t\t\tconst source = diskUtil.resolvePath(\n\t\t\t\t__dirname,\n\t\t\t\t'templates',\n\t\t\t\t'RootViewController.test.ts.hbs'\n\t\t\t)\n\n\t\t\tconst contents = diskUtil.readFile(source)\n\n\t\t\tconst destination = diskUtil.resolvePath(\n\t\t\t\tthis.cwd,\n\t\t\t\tcreateTestOptionsSchema.fields.testDestinationDir.defaultValue,\n\t\t\t\t'behavioral',\n\t\t\t\t'RootViewController.test.ts'\n\t\t\t)\n\n\t\t\tdiskUtil.writeFile(destination, contents)\n\n\t\t\tthis.Store('onboarding').reset()\n\t\t}\n\t}\n\n\tprivate generateCommandFromPayload(payload: {\n\t\tfeatureCode: string\n\t\tactionCode: string\n\t}) {\n\t\treturn featuresUtil.generateCommand(payload.featureCode, payload.actionCode)\n\t}\n\n\tpublic isInstalled = async (): Promise<boolean> => {\n\t\treturn true\n\t}\n\n\tprivate async confirmExpectedCommand(\n\t\tpayload: { featureCode: string; actionCode: string },\n\t\tstore: OnboardingStore\n\t) {\n\t\tconst command = this.generateCommandFromPayload(payload)\n\t\tconst isExpectedCommand = this.isExpectedCommand(command, store)\n\n\t\tif (\n\t\t\tcommand !== 'setup.vscode' &&\n\t\t\tpayload.featureCode !== 'onboard' &&\n\t\t\t!isExpectedCommand\n\t\t) {\n\t\t\tconst player = await this.ScriptPlayer()\n\t\t\tawait player.playScriptWithKey('wrongCommand')\n\t\t}\n\t}\n\n\tprivate isExpectedCommand(command: string, store: OnboardingStore) {\n\t\tconst stage = store.getStage()\n\n\t\tconst isExpectedCommand = command === stage\n\t\treturn isExpectedCommand\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAIA;;AAEA;;;;;;IASqBA,c;;;;;EAYpB,wBAAmBC,OAAnB,EAA4C;IAAA;;IAAA;IAC3C,0BAAMA,OAAN;IAD2C,yFAXjB,SAWiB;IAAA,iGAVtB,SAUsB;IAAA,gGATvB,wCASuB;IAAA,iGARD,EAQC;IAAA,wGAPf,EAOe;IAAA,+FALxBC,0BAAA,CAASC,WAAT,CAAqBC,SAArB,EAAgC,SAAhC,CAKwB;IAAA;IAAA,+FAFvBF,0BAAA,CAASC,WAAT,CAAqBC,SAArB,EAAgC,SAAhC,CAEuB;IAAA,2LA4FvB;MAAA;QAAA;UAAA;YAAA;cAAA,iCACb,IADa;;YAAA;YAAA;cAAA;UAAA;QAAA;MAAA;IAAA,CA5FuB;IAG3C,KAAK,MAAKC,OAAL,CAAaC,EAAb,CACJ,sBADI,EAEJ,MAAKC,wBAAL,CAA8BC,IAA9B,gDAFI,CAAL;IAKA,KAAK,MAAKH,OAAL,CAAaC,EAAb,CACJ,wBADI,EAEJ,MAAKG,yBAAL,CAA+BD,IAA/B,gDAFI,CAAL;IAR2C;EAY3C;;;;WAED,2BAAyB;MACxB,IAAI,CAAC,KAAKE,eAAV,EAA2B;QAC1B,KAAKA,eAAL,GAAuB,KAAKC,KAAL,CAAW,YAAX,CAAvB;MACA;;MACD,OAAO,KAAKD,eAAZ;IACA;;;;wGAED;QAAA;QAAA;UAAA;YAAA;cAAA;gBACOE,KADP,GACe,KAAKC,eAAL,EADf;gBAAA;gBAAA,OAGsBC,wBAAA,CAAaC,WAAb,CAAyB;kBAC7CC,EAAE,EAAE,KAAKA,EADoC;kBAE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
|
@@ -5,26 +5,28 @@ import AbstractSpruceTest, { test, assert } from '@sprucelabs/test-utils'
|
|
|
5
5
|
|
|
6
6
|
// Can you believe how far we've come?
|
|
7
7
|
|
|
8
|
-
//
|
|
8
|
+
// When you're ready....
|
|
9
9
|
|
|
10
|
-
//
|
|
10
|
+
// And by ready, I mean, like have 2 hours to focus...
|
|
11
11
|
|
|
12
|
-
//
|
|
12
|
+
// Checkout the onboarding video Tay stumbled through making.
|
|
13
13
|
|
|
14
|
-
//
|
|
14
|
+
// I highlighly recommend you second screen this video and code along.
|
|
15
15
|
|
|
16
|
-
//
|
|
16
|
+
// And make popcorn 🍿
|
|
17
|
+
|
|
18
|
+
// https://youtu.be/SiUckNpPLag
|
|
17
19
|
|
|
18
20
|
// 🌲🤖
|
|
19
21
|
|
|
20
|
-
export default class
|
|
22
|
+
export default class RootViewControllerTest extends AbstractSpruceTest {
|
|
21
23
|
@test()
|
|
22
24
|
protected static async introduction() {
|
|
23
25
|
const script: string[] = [
|
|
24
26
|
'Hey there! 👋',
|
|
25
27
|
"I'm so happy we've made it this far.",
|
|
26
28
|
'I have gone ahead and created your first test.',
|
|
27
|
-
"All you gotta do is click on 'behavior/
|
|
29
|
+
"All you gotta do is click on 'behavior/RootViewController.test.ts' and then 'Open' to get started!",
|
|
28
30
|
'See you soon! 🌲🤖',
|
|
29
31
|
"PS: I'm going to fail this test now.",
|
|
30
32
|
]
|
|
@@ -148,6 +148,6 @@ var RegisterAction = /*#__PURE__*/function (_AbstractAction) {
|
|
|
148
148
|
exports["default"] = RegisterAction;
|
|
149
149
|
|
|
150
150
|
function generateSkillSummaryLines(skill) {
|
|
151
|
-
return ["Name: ".concat(skill.name), "
|
|
151
|
+
return ["Name: ".concat(skill.name), "Namespace: ".concat(skill.slug), "ID: ".concat(skill.id), "API Key: ".concat(skill.apiKey)];
|
|
152
152
|
}
|
|
153
153
|
//# sourceMappingURL=RegisterAction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RegisterAction.js","names":["optionsSchema","buildSchema","id","description","fields","nameReadable","type","label","isRequired","hint","nameKebab","RegisterAction","options","validateAndNormalizeOptions","connectToApi","client","emit","payload","name","slug","results","eventResponseUtil","getFirstResponseOrThrow","skill","summaryLines","generateSkillSummaryLines","Service","updateCurrentSkill","hints","meta","errors","AbstractAction","apiKey"],"sources":["../../../../src/features/skill/actions/RegisterAction.ts"],"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\thint: 'The name people will see with their special eyes!',\n\t\t},\n\t\tnameKebab: {\n\t\t\ttype: 'text',\n\t\t\tlabel: 'Namespace',\n\t\t\tisRequired: true,\n\t\t\thint: 'The namespace of your skill in-kebab-case',\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`
|
|
1
|
+
{"version":3,"file":"RegisterAction.js","names":["optionsSchema","buildSchema","id","description","fields","nameReadable","type","label","isRequired","hint","nameKebab","RegisterAction","options","validateAndNormalizeOptions","connectToApi","client","emit","payload","name","slug","results","eventResponseUtil","getFirstResponseOrThrow","skill","summaryLines","generateSkillSummaryLines","Service","updateCurrentSkill","hints","meta","errors","AbstractAction","apiKey"],"sources":["../../../../src/features/skill/actions/RegisterAction.ts"],"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\thint: 'The name people will see with their special eyes!',\n\t\t},\n\t\tnameKebab: {\n\t\t\ttype: 'text',\n\t\t\tlabel: 'Namespace',\n\t\t\tisRequired: true,\n\t\t\thint: 'The namespace of your skill in-kebab-case',\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`Namespace: ${skill.slug}`,\n\t\t`ID: ${skill.id}`,\n\t\t`API Key: ${skill.apiKey}`,\n\t]\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAEA;;;;;;AAGA,IAAMA,aAAa,GAAG,IAAAC,mBAAA,EAAY;EACjCC,EAAE,EAAE,qBAD6B;EAEjCC,WAAW,EACV,oFAHgC;EAIjCC,MAAM,EAAE;IACPC,YAAY,EAAE;MACbC,IAAI,EAAE,MADO;MAEbC,KAAK,8BAFQ;MAGbC,UAAU,EAAE,IAHC;MAIbC,IAAI,EAAE;IAJO,CADP;IAOPC,SAAS,EAAE;MACVJ,IAAI,EAAE,MADI;MAEVC,KAAK,EAAE,WAFG;MAGVC,UAAU,EAAE,IAHF;MAIVC,IAAI,EAAE;IAJI,CAPJ;IAaPN,WAAW,EAAE;MACZG,IAAI,EAAE,MADM;MAEZC,KAAK,EAAE;IAFK;EAbN;AAJyB,CAAZ,CAAtB;;IA2BqBI,c;;;;;;;;;;;;;;;sGACkBX,a;uGACd,CAAC,gBAAD,EAAmB,UAAnB,C;0GACG,8B;;;;;;;mGAE3B,iBAAqBY,OAArB;QAAA;;QAAA;UAAA;YAAA;cAAA;gBAAA,wBAEE,KAAKC,2BAAL,CAAiCD,OAAjC,CAFF,EACSP,YADT,yBACSA,YADT,EACuBK,SADvB,yBACuBA,SADvB,EACkCP,WADlC,yBACkCA,WADlC;gBAAA;gBAAA,OAIsB,KAAKW,YAAL,EAJtB;;cAAA;gBAIOC,MAJP;gBAAA;gBAAA,OAKuBA,MAAM,CAACC,IAAP,CAAY,6BAAZ,EAA2C;kBAChEC,OAAO,EAAE;oBACRC,IAAI,EAAEb,YADE;oBAERc,IAAI,EAAET,SAFE;oBAGRP,WAAW,EAAXA;kBAHQ;gBADuD,CAA3C,CALvB;;cAAA;gBAKOiB,OALP;gBAAA;gBAAA,wBAcoBC,mCAAA,CAAkBC,uBAAlB,CAA0CF,OAA1C,CAdpB,EAcUG,KAdV,yBAcUA,KAdV;gBAgBQC,YAhBR,GAgBuBC,yBAAyB,CAACF,KAAD,CAhBhD;gBAkBE,KAAKG,OAAL,CAAa,MAAb,EAAqBC,kBAArB,CAAwCJ,KAAxC;gBAlBF,iCAoBS;kBACNC,YAAY,EAAZA,YADM;kBAENI,KAAK,EAAE,CACN,2BADM,EAEN,2CAFM,EAGN,oDAHM,CAFD;kBAONC,IAAI,EAAE;oBACLN,KAAK,EAALA;kBADK;gBAPA,CApBT;;cAAA;gBAAA;gBAAA;gBAAA,iCAgCS;kBACNK,KAAK,EAAE,sEADD;kBAINE,MAAM,EAAE;gBAJF,CAhCT;;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;EAL2CC,2B;;;;AA+CrC,SAASN,yBAAT,CAAmCF,KAAnC,EAA2D;EACjE,OAAO,iBACGA,KAAK,CAACL,IADT,wBAEQK,KAAK,CAACJ,IAFd,iBAGCI,KAAK,CAACrB,EAHP,sBAIMqB,KAAK,CAACS,MAJZ,EAAP;AAMA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ScopeManager } from '@typescript-eslint/scope-manager';
|
|
2
|
+
import { TSESTree } from '@typescript-eslint/types';
|
|
3
|
+
import { ParserOptions } from '@typescript-eslint/types';
|
|
4
|
+
import { ParserServices } from '@typescript-eslint/typescript-estree';
|
|
5
|
+
import { visitorKeys } from '@typescript-eslint/typescript-estree';
|
|
6
|
+
interface ParseForESLintResult {
|
|
7
|
+
ast: TSESTree.Program & {
|
|
8
|
+
range?: [
|
|
9
|
+
number,
|
|
10
|
+
number
|
|
11
|
+
];
|
|
12
|
+
tokens?: TSESTree.Token[];
|
|
13
|
+
comments?: TSESTree.Comment[];
|
|
14
|
+
};
|
|
15
|
+
services: ParserServices;
|
|
16
|
+
visitorKeys: typeof visitorKeys;
|
|
17
|
+
scopeManager: ScopeManager;
|
|
18
|
+
}
|
|
19
|
+
declare function parse(code: string, options?: ParserOptions): ParseForESLintResult['ast'];
|
|
20
|
+
declare function parseForESLint(code: string, options?: ParserOptions | null): ParseForESLintResult;
|
|
21
|
+
export { parse, parseForESLint, ParserOptions };
|
|
22
|
+
//# sourceMappingURL=parser.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/parser",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.39.0",
|
|
4
4
|
"description": "An ESLint custom parser which leverages TypeScript ESTree",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@typescript-eslint/scope-manager": "5.
|
|
49
|
-
"@typescript-eslint/types": "5.
|
|
50
|
-
"@typescript-eslint/typescript-estree": "5.
|
|
48
|
+
"@typescript-eslint/scope-manager": "5.39.0",
|
|
49
|
+
"@typescript-eslint/types": "5.39.0",
|
|
50
|
+
"@typescript-eslint/typescript-estree": "5.39.0",
|
|
51
51
|
"debug": "^4.3.4"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
]
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "556b71f3b77f85bdb3d5f454e922c26f2ed1b6a8"
|
|
75
75
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/scope-manager",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.39.0",
|
|
4
4
|
"description": "TypeScript scope analyser for ESLint",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
"typecheck": "cd ../../ && nx typecheck @typescript-eslint/scope-manager"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@typescript-eslint/types": "5.
|
|
42
|
-
"@typescript-eslint/visitor-keys": "5.
|
|
41
|
+
"@typescript-eslint/types": "5.39.0",
|
|
42
|
+
"@typescript-eslint/visitor-keys": "5.39.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/glob": "*",
|
|
46
|
-
"@typescript-eslint/typescript-estree": "5.
|
|
46
|
+
"@typescript-eslint/typescript-estree": "5.39.0",
|
|
47
47
|
"glob": "*",
|
|
48
48
|
"jest-specific-snapshot": "*",
|
|
49
49
|
"make-dir": "*",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
]
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "556b71f3b77f85bdb3d5f454e922c26f2ed1b6a8"
|
|
67
67
|
}
|