@sprucelabs/spruce-cli 14.23.1 → 14.24.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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
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.24.0](https://github.com/sprucelabsai/spruce-cli-workspace/compare/v14.23.1...v14.24.0) (2021-10-27)
7
+
8
+
9
+ ### Features
10
+
11
+ * add.dependency asccepts namespace as first unnamed arg ([fc83ee9](https://github.com/sprucelabsai/spruce-cli-workspace/commit/fc83ee9))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [14.23.1](https://github.com/sprucelabsai/spruce-cli-workspace/compare/v14.23.0...v14.23.1) (2021-10-27)
7
18
 
8
19
  **Note:** Version bump only for package @sprucelabs/spruce-cli
@@ -63,7 +63,7 @@ var DeployAction = /*#__PURE__*/function (_AbstractAction) {
63
63
 
64
64
  _this = _super.call.apply(_super, [this].concat(args));
65
65
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "optionsSchema", optionsSchema);
66
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "commandAliases", ['add.dependency']);
66
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "commandAliases", ['add.dependency [namespace]']);
67
67
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "invocationMessage", 'Adding a dependency... 🔗');
68
68
  return _this;
69
69
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/features/dependencies/actions/AddAction.ts"],"names":["optionsSchema","id","description","fields","namespace","type","label","hint","DeployAction","options","validateAndNormalizeOptions","Store","fetchAllSkills","skills","ui","prompt","isRequired","choices","map","s","value","slug","name","skill","find","SpruceError","code","friendlyMessage","Service","add","summaryLines","AbstractAction"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;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oBAqBMmB,KArBN;AAAA;AAAA;AAAA;;AAAA,sBAsBQ,IAAIE,uBAAJ,CAAgB;AACrBC,kBAAAA,IAAI,EAAE,iBADe;AAErBC,kBAAAA,eAAe,sDAA+CvB,SAA/C;AAFM,iBAAhB,CAtBR;;AAAA;AA4BC,qBAAKwB,OAAL,CAAa,YAAb,EAA2BC,GAA3B,CAA+B;AAC9B5B,kBAAAA,EAAE,EAAEsB,KAAK,CAACtB,EADoB;AAE9BG,kBAAAA,SAAS,EAAEmB,KAAK,CAACF;AAFa,iBAA/B;AA5BD,iDAiCQ;AACNS,kBAAAA,YAAY,EAAE,mBAAWP,KAAK,CAACD,IAAjB;AADR,iBAjCR;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;EALyCS,2B","sourcesContent":["import { buildSchema, SchemaValues } from '@sprucelabs/schema'\nimport SpruceError from '../../../errors/SpruceError'\nimport AbstractAction from '../../AbstractAction'\nimport { FeatureActionResponse } from '../../features.types'\n\nconst optionsSchema = buildSchema({\n\tid: 'addDepnedency',\n\tdescription: 'Add a skill as a dependency.',\n\tfields: {\n\t\tnamespace: {\n\t\t\ttype: 'id',\n\t\t\tlabel: 'Namespace',\n\t\t\thint: 'The namespace of the skill you want to add as a dependency.',\n\t\t},\n\t},\n})\n\ntype OptionsSchema = typeof optionsSchema\ntype Options = SchemaValues<OptionsSchema>\n\nexport default class DeployAction extends AbstractAction<OptionsSchema> {\n\tpublic optionsSchema = optionsSchema\n\tpublic commandAliases = ['add.dependency']\n\tpublic invocationMessage = 'Adding a dependency... 🔗'\n\n\tpublic async execute(options: Options): Promise<FeatureActionResponse> {\n\t\tlet { namespace } = this.validateAndNormalizeOptions(options)\n\n\t\tconst skills = await this.Store('skill').fetchAllSkills()\n\n\t\tif (!namespace) {\n\t\t\tnamespace = await this.ui.prompt({\n\t\t\t\ttype: 'select',\n\t\t\t\tlabel: 'Which skill would you like to add as a dependency?',\n\t\t\t\tisRequired: true,\n\t\t\t\toptions: {\n\t\t\t\t\tchoices: skills.map((s) => ({\n\t\t\t\t\t\tvalue: s.slug,\n\t\t\t\t\t\tlabel: s.name,\n\t\t\t\t\t})),\n\t\t\t\t},\n\t\t\t})\n\t\t}\n\n\t\tconst skill = skills.find((s) => s.slug === namespace)\n\n\t\tif (!skill) {\n\t\t\tthrow new SpruceError({\n\t\t\t\tcode: 'SKILL_NOT_FOUND',\n\t\t\t\tfriendlyMessage: `I could not find a skill with the slug of ${namespace}.`,\n\t\t\t})\n\t\t}\n\n\t\tthis.Service('dependency').add({\n\t\t\tid: skill.id,\n\t\t\tnamespace: skill.slug,\n\t\t})\n\n\t\treturn {\n\t\t\tsummaryLines: [`Added \"${skill.name}\" as a dependency!`],\n\t\t}\n\t}\n}\n"],"file":"AddAction.js"}
1
+ {"version":3,"sources":["../../../../src/features/dependencies/actions/AddAction.ts"],"names":["optionsSchema","id","description","fields","namespace","type","label","hint","DeployAction","options","validateAndNormalizeOptions","Store","fetchAllSkills","skills","ui","prompt","isRequired","choices","map","s","value","slug","name","skill","find","SpruceError","code","friendlyMessage","Service","add","summaryLines","AbstractAction"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;AAGA,IAAMA,aAAa,GAAG,yBAAY;AACjCC,EAAAA,EAAE,EAAE,eAD6B;AAEjCC,EAAAA,WAAW,EAAE,8BAFoB;AAGjCC,EAAAA,MAAM,EAAE;AACPC,IAAAA,SAAS,EAAE;AACVC,MAAAA,IAAI,EAAE,IADI;AAEVC,MAAAA,KAAK,EAAE,WAFG;AAGVC,MAAAA,IAAI,EAAE;AAHI;AADJ;AAHyB,CAAZ,CAAtB;;IAeqBC,Y;;;;;;;;;;;;;;;sGACGR,a;uGACC,CAAC,4BAAD,C;0GACG,2B;;;;;;;mGAE3B,iBAAqBS,OAArB;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA,wCACqB,KAAKC,2BAAL,CAAiCD,OAAjC,CADrB,EACOL,SADP,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CS,2B","sourcesContent":["import { buildSchema, SchemaValues } from '@sprucelabs/schema'\nimport SpruceError from '../../../errors/SpruceError'\nimport AbstractAction from '../../AbstractAction'\nimport { FeatureActionResponse } from '../../features.types'\n\nconst optionsSchema = buildSchema({\n\tid: 'addDepnedency',\n\tdescription: 'Add a skill as a dependency.',\n\tfields: {\n\t\tnamespace: {\n\t\t\ttype: 'id',\n\t\t\tlabel: 'Namespace',\n\t\t\thint: 'The namespace of the skill you want to add as a dependency.',\n\t\t},\n\t},\n})\n\ntype OptionsSchema = typeof optionsSchema\ntype Options = SchemaValues<OptionsSchema>\n\nexport default class DeployAction extends AbstractAction<OptionsSchema> {\n\tpublic optionsSchema = optionsSchema\n\tpublic commandAliases = ['add.dependency [namespace]']\n\tpublic invocationMessage = 'Adding a dependency... 🔗'\n\n\tpublic async execute(options: Options): Promise<FeatureActionResponse> {\n\t\tlet { namespace } = this.validateAndNormalizeOptions(options)\n\n\t\tconst skills = await this.Store('skill').fetchAllSkills()\n\n\t\tif (!namespace) {\n\t\t\tnamespace = await this.ui.prompt({\n\t\t\t\ttype: 'select',\n\t\t\t\tlabel: 'Which skill would you like to add as a dependency?',\n\t\t\t\tisRequired: true,\n\t\t\t\toptions: {\n\t\t\t\t\tchoices: skills.map((s) => ({\n\t\t\t\t\t\tvalue: s.slug,\n\t\t\t\t\t\tlabel: s.name,\n\t\t\t\t\t})),\n\t\t\t\t},\n\t\t\t})\n\t\t}\n\n\t\tconst skill = skills.find((s) => s.slug === namespace)\n\n\t\tif (!skill) {\n\t\t\tthrow new SpruceError({\n\t\t\t\tcode: 'SKILL_NOT_FOUND',\n\t\t\t\tfriendlyMessage: `I could not find a skill with the slug of ${namespace}.`,\n\t\t\t})\n\t\t}\n\n\t\tthis.Service('dependency').add({\n\t\t\tid: skill.id,\n\t\t\tnamespace: skill.slug,\n\t\t})\n\n\t\treturn {\n\t\t\tsummaryLines: [`Added \"${skill.name}\" as a dependency!`],\n\t\t}\n\t}\n}\n"],"file":"AddAction.js"}
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  ]
18
18
  },
19
19
  "license": "MIT",
20
- "version": "14.23.1",
20
+ "version": "14.24.0",
21
21
  "bin": {
22
22
  "spruce": "./build/index.js"
23
23
  },
@@ -87,7 +87,7 @@
87
87
  "@sprucelabs/spruce-event-utils": "^16.0.622",
88
88
  "@sprucelabs/spruce-skill-booter": "^5.5.44",
89
89
  "@sprucelabs/spruce-skill-utils": "^20.6.357",
90
- "@sprucelabs/spruce-templates": "^14.23.1",
90
+ "@sprucelabs/spruce-templates": "^14.24.0",
91
91
  "cfonts": "^2.10.0",
92
92
  "chalk": "^4.1.2",
93
93
  "chokidar": "^3.5.2",
@@ -592,5 +592,5 @@
592
592
  "ora"
593
593
  ]
594
594
  },
595
- "gitHead": "1a4c909a3d01a2c1e96125018d2372342fab3987"
595
+ "gitHead": "c2fe287baa888c507fcc7ee00baab251f8efaf7b"
596
596
  }
@@ -20,7 +20,7 @@ type Options = SchemaValues<OptionsSchema>
20
20
 
21
21
  export default class DeployAction extends AbstractAction<OptionsSchema> {
22
22
  public optionsSchema = optionsSchema
23
- public commandAliases = ['add.dependency']
23
+ public commandAliases = ['add.dependency [namespace]']
24
24
  public invocationMessage = 'Adding a dependency... 🔗'
25
25
 
26
26
  public async execute(options: Options): Promise<FeatureActionResponse> {