nw-builder 4.13.0 → 4.13.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nw-builder",
3
- "version": "4.13.0",
3
+ "version": "4.13.1",
4
4
  "description": "Build NW.js desktop applications for MacOS, Windows and Linux.",
5
5
  "keywords": [
6
6
  "NW.js",
package/src/index.d.ts CHANGED
@@ -176,6 +176,6 @@ export interface OsxAppOptions {
176
176
  /**
177
177
  * Automates building an NW.js application.
178
178
  */
179
- declare function nwbuild<P extends SupportedPlatform>(options: Options<P>): Promise<void>;
179
+ declare function nwbuild<P extends SupportedPlatform>(options: Options<P>): Promise<child_process.ChildProcess | null | undefined>;
180
180
 
181
181
  export default nwbuild;
package/src/index.js CHANGED
@@ -36,7 +36,7 @@ import util from './util.js';
36
36
  * @async
37
37
  * @function
38
38
  * @param {Options} options Options
39
- * @returns {Promise<void>}
39
+ * @returns {Promise<child_process.ChildProcess | null | undefined>}
40
40
  */
41
41
  async function nwbuild(options) {
42
42
  let built;
@@ -108,12 +108,12 @@ async function nwbuild(options) {
108
108
 
109
109
  if (options.mode === 'get') {
110
110
  // Do nothing else since we have already downloaded the binaries.
111
- return;
111
+ return undefined;
112
112
  }
113
113
 
114
114
  if (options.mode === 'run') {
115
115
  util.log('info', options.logLevel, 'Running NW.js in run mode...');
116
- await run({
116
+ const nwProcess = await run({
117
117
  version: options.version,
118
118
  flavor: options.flavor,
119
119
  platform: options.platform,
@@ -123,6 +123,7 @@ async function nwbuild(options) {
123
123
  glob: options.glob,
124
124
  argv: options.argv,
125
125
  });
126
+ return nwProcess;
126
127
  } else if (options.mode === 'build') {
127
128
  util.log('info', options.logLevel, `Build a NW.js application for ${options.platform} ${options.arch}...`);
128
129
  await bld({
@@ -147,6 +148,8 @@ async function nwbuild(options) {
147
148
  console.error(error);
148
149
  throw error;
149
150
  }
151
+
152
+ return undefined;
150
153
  }
151
154
 
152
155
  export default nwbuild;