particle-commands 1.0.0 → 1.0.1

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,9 @@
3
3
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
4
4
  and this project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ### 1.0.0 - 2024-03-13
7
+ - Fix return results for command site and library add
8
+
6
9
  ### 1.0.0 - 2024-03-13
7
10
  - Remove yeoman and use own template engine with particle-library-manager new version
8
11
 
@@ -43,7 +43,7 @@ var CommandSite = function () {
43
43
 
44
44
  try {
45
45
  await this.begin(state, this);
46
- await cmd.run(state, this);
46
+ return await cmd.run(state, this);
47
47
  } finally {
48
48
  await this.end(state, this);
49
49
  }
@@ -90,7 +90,7 @@ var LibraryAddCommand = exports.LibraryAddCommand = function () {
90
90
  await this.loadProject();
91
91
  var library = await this.fetchLibrary(lib.name, lib.version);
92
92
  await this.addLibraryToProject(library);
93
- await this.saveProject();
93
+ return this.saveProject();
94
94
  }
95
95
  }, {
96
96
  key: 'ensureProjectExists',
@@ -133,7 +133,7 @@ var LibraryAddCommand = exports.LibraryAddCommand = function () {
133
133
  key: 'addLibraryToProject',
134
134
  value: async function addLibraryToProject(library) {
135
135
  await this.site.addedLibrary(library.name, library.version);
136
- await this.properties.addDependency(library.name, library.version);
136
+ return this.properties.addDependency(library.name, library.version);
137
137
  }
138
138
  }, {
139
139
  key: 'saveProject',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "particle-commands",
3
3
  "description": "Library of UX-neutral commands that provide key functionality for developer tools",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "author": "Matthew McGowan",
6
6
  "bugs": {
7
7
  "url": "https://github.com/particle-iot/particle-commands/issues"
@@ -23,7 +23,7 @@ class CommandSite {
23
23
  async run(cmd, state = {}) {
24
24
  try {
25
25
  await this.begin(state, this);
26
- await cmd.run(state, this);
26
+ return await cmd.run(state, this);
27
27
  } finally {
28
28
  await this.end(state, this);
29
29
  }
@@ -51,7 +51,7 @@ export class LibraryAddCommand {
51
51
  await this.loadProject();
52
52
  const library = await this.fetchLibrary(lib.name, lib.version);
53
53
  await this.addLibraryToProject(library);
54
- await this.saveProject();
54
+ return this.saveProject();
55
55
  }
56
56
 
57
57
  ensureProjectExists(directory) {
@@ -88,7 +88,7 @@ export class LibraryAddCommand {
88
88
 
89
89
  async addLibraryToProject(library) {
90
90
  await this.site.addedLibrary(library.name, library.version);
91
- await this.properties.addDependency(library.name, library.version);
91
+ return this.properties.addDependency(library.name, library.version);
92
92
  }
93
93
 
94
94
  saveProject() {