-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.cjs
40 lines (36 loc) · 1.19 KB
/
index.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
'use strict';
/**
* @file Entry point for the library. Exposes the external facing function that
* accepts the input defined in the API documentation.
*/
const { OPTIONS } = require('./api-type-definitions.cjs');
const downloadLatestAppAndOpenWindowInBackground = require('./src/downloadLatestAppAndOpenWindowInBackground/index.cjs');
const nwSplasherAutoUpdate = {
downloadLatestAppAndOpenWindowInBackground,
/**
* Sets the current working directory (process.cwd) to the latest downloaded/extracted app version.
*/
setCurrentWorkingDirectory: function () {
console.log('This is a stub');
},
/**
* Ran from the new app window. This will tell the splash window to close itself. Then displays the new window.
*
* @param {OPTIONS} options Users options object.
*/
closeSplashAndShowApp: function (options) {
options = {
// Must match the port number used in the splash.html
port: 4443
};
console.log(options);
console.log('This is a stub');
},
/**
* Deletes past downloaded app versions, leaving the latest in place.
*/
deletePastVersions: function () {
console.log('This is a stub');
}
};
module.exports = nwSplasherAutoUpdate;