@sprucelabs/spruce-cli 17.1.2 → 17.1.3

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,14 @@
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
+ ## [17.1.3](https://github.com/sprucelabsai/spruce-cli-workspace/compare/v17.1.2...v17.1.3) (2022-07-15)
7
+
8
+ **Note:** Version bump only for package @sprucelabs/spruce-cli
9
+
10
+
11
+
12
+
13
+
6
14
  ## [17.1.2](https://github.com/sprucelabsai/spruce-cli-workspace/compare/v17.1.1...v17.1.2) (2022-07-14)
7
15
 
8
16
  **Note:** Version bump only for package @sprucelabs/spruce-cli
@@ -10,11 +10,13 @@ declare const optionsSchema: {
10
10
  type: "text";
11
11
  label: string;
12
12
  isRequired: true;
13
+ hint: string;
13
14
  };
14
15
  nameKebab: {
15
16
  type: "text";
16
17
  label: string;
17
18
  isRequired: true;
19
+ hint: string;
18
20
  };
19
21
  description: {
20
22
  type: "text";
@@ -43,12 +43,14 @@ var optionsSchema = (0, _schema.buildSchema)({
43
43
  nameReadable: {
44
44
  type: 'text',
45
45
  label: "What is your skill's name?",
46
- isRequired: true
46
+ isRequired: true,
47
+ hint: 'The name people will see with their special eyes!'
47
48
  },
48
49
  nameKebab: {
49
50
  type: 'text',
50
51
  label: 'Namespace',
51
- isRequired: true
52
+ isRequired: true,
53
+ hint: 'The namespace of your skill in-kebab-case'
52
54
  },
53
55
  description: {
54
56
  type: 'text',
@@ -1 +1 @@
1
- {"version":3,"file":"RegisterAction.js","names":["optionsSchema","buildSchema","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"],"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},\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"],"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,CADP;IAMPC,SAAS,EAAE;MACVH,IAAI,EAAE,MADI;MAEVC,KAAK,EAAE,WAFG;MAGVC,UAAU,EAAE;IAHF,CANJ;IAWPL,WAAW,EAAE;MACZG,IAAI,EAAE,MADM;MAEZC,KAAK,EAAE;IAFK;EAXN;AAJyB,CAAZ,CAAtB;;IAyBqBG,c;;;;;;;;;;;;;;;sGACkBV,a;uGACd,CAAC,gBAAD,EAAmB,UAAnB,C;0GACG,8B;;;;;;;mGAE3B,iBAAqBW,OAArB;QAAA;;QAAA;UAAA;YAAA;cAAA;gBAAA,wBAEE,KAAKC,2BAAL,CAAiCD,OAAjC,CAFF,EACSN,YADT,yBACSA,YADT,EACuBI,SADvB,yBACuBA,SADvB,EACkCN,WADlC,yBACkCA,WADlC;gBAAA;gBAAA,OAIsB,KAAKU,YAAL,EAJtB;;cAAA;gBAIOC,MAJP;gBAAA;gBAAA,OAKuBA,MAAM,CAACC,IAAP,CAAY,6BAAZ,EAA2C;kBAChEC,OAAO,EAAE;oBACRC,IAAI,EAAEZ,YADE;oBAERa,IAAI,EAAET,SAFE;oBAGRN,WAAW,EAAXA;kBAHQ;gBADuD,CAA3C,CALvB;;cAAA;gBAKOgB,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,mBAEGK,KAAK,CAACJ,IAFT,iBAGCI,KAAK,CAACpB,EAHP,sBAIMoB,KAAK,CAACS,MAJZ,EAAP;AAMA"}
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`Slug: ${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,mBAEGK,KAAK,CAACJ,IAFT,iBAGCI,KAAK,CAACrB,EAHP,sBAIMqB,KAAK,CAACS,MAJZ,EAAP;AAMA"}
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  ]
19
19
  },
20
20
  "license": "MIT",
21
- "version": "17.1.2",
21
+ "version": "17.1.3",
22
22
  "bin": {
23
23
  "spruce": "./build/index.js"
24
24
  },
@@ -88,7 +88,7 @@
88
88
  "@sprucelabs/spruce-event-utils": "^27.0.5",
89
89
  "@sprucelabs/spruce-skill-booter": "^41.0.4",
90
90
  "@sprucelabs/spruce-skill-utils": "^26.0.88",
91
- "@sprucelabs/spruce-templates": "^17.1.2",
91
+ "@sprucelabs/spruce-templates": "^17.1.3",
92
92
  "@typescript-eslint/eslint-plugin": "^5.27.1",
93
93
  "@typescript-eslint/parser": "^5.27.1",
94
94
  "cfonts": "^3.1.0",
@@ -627,5 +627,5 @@
627
627
  "terminal-kit"
628
628
  ]
629
629
  },
630
- "gitHead": "dd59e470e34ad2dd6729caf3325c90695d5f1a82"
630
+ "gitHead": "7923db6829666ddfaa1484da32422b05afc8b544"
631
631
  }
@@ -13,11 +13,13 @@ const optionsSchema = buildSchema({
13
13
  type: 'text',
14
14
  label: `What is your skill's name?`,
15
15
  isRequired: true,
16
+ hint: 'The name people will see with their special eyes!',
16
17
  },
17
18
  nameKebab: {
18
19
  type: 'text',
19
20
  label: 'Namespace',
20
21
  isRequired: true,
22
+ hint: 'The namespace of your skill in-kebab-case',
21
23
  },
22
24
  description: {
23
25
  type: 'text',