@sprucelabs/spruce-cli 14.23.0 → 14.24.2

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,41 @@
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.2](https://github.com/sprucelabsai/spruce-cli-workspace/compare/v14.24.1...v14.24.2) (2021-10-28)
7
+
8
+ **Note:** Version bump only for package @sprucelabs/spruce-cli
9
+
10
+
11
+
12
+
13
+
14
+ ## [14.24.1](https://github.com/sprucelabsai/spruce-cli-workspace/compare/v14.24.0...v14.24.1) (2021-10-27)
15
+
16
+ **Note:** Version bump only for package @sprucelabs/spruce-cli
17
+
18
+
19
+
20
+
21
+
22
+ # [14.24.0](https://github.com/sprucelabsai/spruce-cli-workspace/compare/v14.23.1...v14.24.0) (2021-10-27)
23
+
24
+
25
+ ### Features
26
+
27
+ * add.dependency asccepts namespace as first unnamed arg ([fc83ee9](https://github.com/sprucelabsai/spruce-cli-workspace/commit/fc83ee9))
28
+
29
+
30
+
31
+
32
+
33
+ ## [14.23.1](https://github.com/sprucelabsai/spruce-cli-workspace/compare/v14.23.0...v14.23.1) (2021-10-27)
34
+
35
+ **Note:** Version bump only for package @sprucelabs/spruce-cli
36
+
37
+
38
+
39
+
40
+
6
41
  # [14.23.0](https://github.com/sprucelabsai/spruce-cli-workspace/compare/v14.22.10...v14.23.0) (2021-10-27)
7
42
 
8
43
 
@@ -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;;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,gBAAD,C;0GACG,2B;;;;;;;mGAE3B,iBAAqBS,OAArB;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA,wCACqB,KAAKC,2BAAL,CAAiCD,OAAjC,CADrB,EACOL,SADP,yBACOA,SADP;AAAA;AAAA,uBAGsB,KAAKO,KAAL,CAAW,OAAX,EAAoBC,cAApB,EAHtB;;AAAA;AAGOC,gBAAAA,MAHP;;AAAA,oBAKMT,SALN;AAAA;AAAA;AAAA;;AAAA;AAAA,uBAMoB,KAAKU,EAAL,CAAQC,MAAR,CAAe;AAChCV,kBAAAA,IAAI,EAAE,QAD0B;AAEhCC,kBAAAA,KAAK,EAAE,oDAFyB;AAGhCU,kBAAAA,UAAU,EAAE,IAHoB;AAIhCP,kBAAAA,OAAO,EAAE;AACRQ,oBAAAA,OAAO,EAAEJ,MAAM,CAACK,GAAP,CAAW,UAACC,CAAD;AAAA,6BAAQ;AAC3BC,wBAAAA,KAAK,EAAED,CAAC,CAACE,IADkB;AAE3Bf,wBAAAA,KAAK,EAAEa,CAAC,CAACG;AAFkB,uBAAR;AAAA,qBAAX;AADD;AAJuB,iBAAf,CANpB;;AAAA;AAMElB,gBAAAA,SANF;;AAAA;AAmBOmB,gBAAAA,KAnBP,GAmBeV,MAAM,CAACW,IAAP,CAAY,UAACL,CAAD;AAAA,yBAAOA,CAAC,CAACE,IAAF,KAAWjB,SAAlB;AAAA,iBAAZ,CAnBf;;AAAA,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,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AAI,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 [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.0",
20
+ "version": "14.24.2",
21
21
  "bin": {
22
22
  "spruce": "./build/index.js"
23
23
  },
@@ -75,25 +75,25 @@
75
75
  "@babel/plugin-proposal-decorators": "^7.15.8",
76
76
  "@babel/runtime": "^7.15.4",
77
77
  "@jest/reporters": "^27.3.1",
78
- "@sprucelabs/error": "^5.0.258",
79
- "@sprucelabs/heartwood-view-controllers": "^34.9.13",
80
- "@sprucelabs/jest-json-reporter": "^6.0.222",
81
- "@sprucelabs/mercury-client": "^16.13.148",
82
- "@sprucelabs/mercury-event-emitter": "^16.13.148",
83
- "@sprucelabs/mercury-types": "^26.1.566",
84
- "@sprucelabs/schema": "^25.3.389",
85
- "@sprucelabs/spruce-core-schemas": "^22.5.518",
86
- "@sprucelabs/spruce-event-plugin": "^5.5.33",
87
- "@sprucelabs/spruce-event-utils": "^16.0.579",
88
- "@sprucelabs/spruce-skill-booter": "^5.5.33",
89
- "@sprucelabs/spruce-skill-utils": "^20.6.338",
90
- "@sprucelabs/spruce-templates": "^14.23.0",
78
+ "@sprucelabs/error": "^5.0.262",
79
+ "@sprucelabs/heartwood-view-controllers": "^35.1.7",
80
+ "@sprucelabs/jest-json-reporter": "^6.0.225",
81
+ "@sprucelabs/mercury-client": "^16.13.192",
82
+ "@sprucelabs/mercury-event-emitter": "^16.13.192",
83
+ "@sprucelabs/mercury-types": "^26.1.622",
84
+ "@sprucelabs/schema": "^25.3.416",
85
+ "@sprucelabs/spruce-core-schemas": "^22.5.562",
86
+ "@sprucelabs/spruce-event-plugin": "^6.1.1",
87
+ "@sprucelabs/spruce-event-utils": "^16.0.641",
88
+ "@sprucelabs/spruce-skill-booter": "^6.1.1",
89
+ "@sprucelabs/spruce-skill-utils": "^20.6.367",
90
+ "@sprucelabs/spruce-templates": "^14.24.2",
91
91
  "cfonts": "^2.10.0",
92
92
  "chalk": "^4.1.2",
93
93
  "chokidar": "^3.5.2",
94
94
  "cli-table3": "^0.6.0",
95
95
  "commander": "^7.2.0",
96
- "core-js": "^3.18.3",
96
+ "core-js": "^3.19.0",
97
97
  "emphasize": "^4.2.0",
98
98
  "fs-extra": "^10.0.0",
99
99
  "gifwrap": "SimenB/gifwrap#patch-1",
@@ -116,16 +116,16 @@
116
116
  "uuid": "^8.3.2"
117
117
  },
118
118
  "devDependencies": {
119
- "@sprucelabs/data-stores": "^6.1.412",
120
- "@sprucelabs/jest-sheets-reporter": "^1.2.227",
121
- "@sprucelabs/mercury-core-events": "^1.3.0",
119
+ "@sprucelabs/data-stores": "^6.2.30",
120
+ "@sprucelabs/jest-sheets-reporter": "^1.2.230",
121
+ "@sprucelabs/mercury-core-events": "^1.3.41",
122
122
  "@sprucelabs/resolve-path-aliases": "^1.0.220",
123
- "@sprucelabs/spruce-conversation-plugin": "^5.5.33",
124
- "@sprucelabs/spruce-deploy-plugin": "^5.5.33",
125
- "@sprucelabs/spruce-store-plugin": "^5.5.33",
126
- "@sprucelabs/spruce-test-fixtures": "^5.5.33",
127
- "@sprucelabs/test": "^7.7.210",
128
- "@sprucelabs/test-utils": "^3.0.232",
123
+ "@sprucelabs/spruce-conversation-plugin": "^6.1.1",
124
+ "@sprucelabs/spruce-deploy-plugin": "^6.1.1",
125
+ "@sprucelabs/spruce-store-plugin": "^6.1.1",
126
+ "@sprucelabs/spruce-test-fixtures": "^6.1.1",
127
+ "@sprucelabs/test": "^7.7.212",
128
+ "@sprucelabs/test-utils": "^3.0.237",
129
129
  "@types/blessed": "^0.1.19",
130
130
  "@types/eslint": "^7.28.2",
131
131
  "@types/fs-extra": "^9.0.13",
@@ -135,7 +135,7 @@
135
135
  "@types/lodash": "^4.14.176",
136
136
  "@types/md5": "^2.3.1",
137
137
  "@types/mkdirp": "^1.0.2",
138
- "@types/node": "^16.11.4",
138
+ "@types/node": "^16.11.6",
139
139
  "@types/promise.allsettled": "^1.0.3",
140
140
  "@types/ps-node": "^0.1.1",
141
141
  "@types/rimraf": "^3.0.2",
@@ -592,5 +592,5 @@
592
592
  "ora"
593
593
  ]
594
594
  },
595
- "gitHead": "51ed0955fe8d06ad9a9a19cd5c7d2c1c3feb5ad2"
595
+ "gitHead": "4bb52a45b292d6180b9763bb77b804e7df428c7a"
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> {