@finsemble/finsemble-electron-adapter 1.0.0-beta-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/LICENSE +1 -0
- package/README.md +46 -0
- package/dist/app.js +3 -0
- package/dist/app.js.LICENSE.txt +331 -0
- package/dist/app.js.map +1 -0
- package/dist/e2o.js +2 -0
- package/dist/e2o.js.map +1 -0
- package/dist/exports.js +3 -0
- package/dist/exports.js.LICENSE.txt +331 -0
- package/dist/exports.js.map +1 -0
- package/exports.js +10 -0
- package/node_modules/electron-ipc-mock/.npmignore +2 -0
- package/node_modules/electron-ipc-mock/.travis.yml +8 -0
- package/node_modules/electron-ipc-mock/LICENSE +19 -0
- package/node_modules/electron-ipc-mock/README.md +42 -0
- package/node_modules/electron-ipc-mock/dist/constants.js +8 -0
- package/node_modules/electron-ipc-mock/dist/electron-ipc-mock.js +56 -0
- package/node_modules/electron-ipc-mock/dist/event.js +25 -0
- package/node_modules/electron-ipc-mock/dist/index.js +22 -0
- package/node_modules/electron-ipc-mock/dist/ipc-main.js +103 -0
- package/node_modules/electron-ipc-mock/dist/ipc-renderer.js +113 -0
- package/node_modules/electron-ipc-mock/dist/pipe.js +40 -0
- package/node_modules/electron-ipc-mock/dist/utils.js +33 -0
- package/node_modules/electron-ipc-mock/package.json +34 -0
- package/node_modules/image-size/LICENSE +9 -0
- package/node_modules/image-size/Readme.md +182 -0
- package/node_modules/image-size/bin/image-size.js +48 -0
- package/node_modules/image-size/dist/detector.d.ts +3 -0
- package/node_modules/image-size/dist/detector.js +30 -0
- package/node_modules/image-size/dist/index.d.ts +11 -0
- package/node_modules/image-size/dist/index.js +134 -0
- package/node_modules/image-size/dist/readUInt.d.ts +4 -0
- package/node_modules/image-size/dist/readUInt.js +11 -0
- package/node_modules/image-size/dist/types/bmp.d.ts +2 -0
- package/node_modules/image-size/dist/types/bmp.js +14 -0
- package/node_modules/image-size/dist/types/cur.d.ts +2 -0
- package/node_modules/image-size/dist/types/cur.js +16 -0
- package/node_modules/image-size/dist/types/dds.d.ts +2 -0
- package/node_modules/image-size/dist/types/dds.js +14 -0
- package/node_modules/image-size/dist/types/gif.d.ts +2 -0
- package/node_modules/image-size/dist/types/gif.js +16 -0
- package/node_modules/image-size/dist/types/icns.d.ts +2 -0
- package/node_modules/image-size/dist/types/icns.js +103 -0
- package/node_modules/image-size/dist/types/ico.d.ts +2 -0
- package/node_modules/image-size/dist/types/ico.js +67 -0
- package/node_modules/image-size/dist/types/interface.d.ts +14 -0
- package/node_modules/image-size/dist/types/interface.js +2 -0
- package/node_modules/image-size/dist/types/j2c.d.ts +2 -0
- package/node_modules/image-size/dist/types/j2c.js +15 -0
- package/node_modules/image-size/dist/types/jp2.d.ts +2 -0
- package/node_modules/image-size/dist/types/jp2.js +58 -0
- package/node_modules/image-size/dist/types/jpg.d.ts +2 -0
- package/node_modules/image-size/dist/types/jpg.js +123 -0
- package/node_modules/image-size/dist/types/ktx.d.ts +2 -0
- package/node_modules/image-size/dist/types/ktx.js +15 -0
- package/node_modules/image-size/dist/types/png.d.ts +2 -0
- package/node_modules/image-size/dist/types/png.js +34 -0
- package/node_modules/image-size/dist/types/pnm.d.ts +2 -0
- package/node_modules/image-size/dist/types/pnm.js +75 -0
- package/node_modules/image-size/dist/types/psd.d.ts +2 -0
- package/node_modules/image-size/dist/types/psd.js +14 -0
- package/node_modules/image-size/dist/types/svg.d.ts +2 -0
- package/node_modules/image-size/dist/types/svg.js +91 -0
- package/node_modules/image-size/dist/types/tiff.d.ts +2 -0
- package/node_modules/image-size/dist/types/tiff.js +97 -0
- package/node_modules/image-size/dist/types/webp.d.ts +2 -0
- package/node_modules/image-size/dist/types/webp.js +58 -0
- package/node_modules/image-size/dist/types.d.ts +19 -0
- package/node_modules/image-size/dist/types.js +38 -0
- package/node_modules/image-size/package.json +67 -0
- package/node_modules/inherits/LICENSE +16 -0
- package/node_modules/inherits/README.md +42 -0
- package/node_modules/inherits/inherits.js +9 -0
- package/node_modules/inherits/inherits_browser.js +27 -0
- package/node_modules/inherits/package.json +29 -0
- package/node_modules/queue/LICENSE +8 -0
- package/node_modules/queue/index.d.ts +173 -0
- package/node_modules/queue/index.js +195 -0
- package/node_modules/queue/package.json +43 -0
- package/node_modules/queue/readme.md +221 -0
- package/package.json +119 -0
- package/types/app.d.ts +1 -0
- package/types/deploy/deploymentHelpers.d.ts +10 -0
- package/types/deploy/installer.d.ts +5 -0
- package/types/deploy/packageCreator.d.ts +4 -0
- package/types/deploy/schemas/installer.d.ts +3 -0
- package/types/deploy/schemas/packager.d.ts +3 -0
- package/types/e2o.d.ts +2 -0
- package/types/exports.d.ts +19 -0
- package/types/logger/classes/LoggerMain.d.ts +21 -0
- package/types/logger/classes/LoggerRenderer.d.ts +11 -0
- package/types/logger/colorizer.d.ts +2 -0
- package/types/logger/config.d.ts +12 -0
- package/types/logger/formatters/basic.d.ts +2 -0
- package/types/logger/main.d.ts +2 -0
- package/types/logger/renderer.d.ts +1 -0
- package/types/logger/transports/winston-daily-rotate-file.d.ts +2 -0
- package/types/logger/transports/winston-terminal-transport.d.ts +2 -0
- package/types/logger/types.d.ts +9 -0
- package/types/main/AffinityGroupManager.d.ts +15 -0
- package/types/main/BrowserViews.d.ts +38 -0
- package/types/main/ExternalApplicationManager.d.ts +37 -0
- package/types/main/IAB.d.ts +17 -0
- package/types/main/IAC.d.ts +18 -0
- package/types/main/Main.d.ts +7 -0
- package/types/main/MainBus.d.ts +22 -0
- package/types/main/MainSystem.d.ts +75 -0
- package/types/main/MainWindow.d.ts +153 -0
- package/types/main/Manifest.d.ts +13 -0
- package/types/main/MonitorInfo.d.ts +4 -0
- package/types/main/PermissionsManager.d.ts +12 -0
- package/types/main/ScreenCapture.d.ts +7 -0
- package/types/main/SplashScreen.d.ts +13 -0
- package/types/main/appDataFolder.d.ts +9 -0
- package/types/main/autoUpdaterWrapper.d.ts +37 -0
- package/types/main/contentSecurity.d.ts +17 -0
- package/types/main/contextMenu.d.ts +2 -0
- package/types/main/download.d.ts +18 -0
- package/types/main/getWindowIdentity.d.ts +3 -0
- package/types/main/listeners.d.ts +6 -0
- package/types/main/mainStore.d.ts +3 -0
- package/types/main/preloads.d.ts +9 -0
- package/types/main/protocolHandler.d.ts +11 -0
- package/types/main/updateManager.d.ts +20 -0
- package/types/permissions/chromePermissions.d.ts +59 -0
- package/types/permissions/defaultWindowOptions.d.ts +377 -0
- package/types/render/InterApplicationBus.d.ts +16 -0
- package/types/render/Notification.d.ts +3 -0
- package/types/render/RequestHelper.d.ts +23 -0
- package/types/render/System.d.ts +62 -0
- package/types/render/Window.d.ts +75 -0
- package/types/render/renderHelpers.d.ts +1 -0
- package/types/server/AppD.d.ts +18 -0
- package/types/server/AppDStaticConfigPlugin.d.ts +8 -0
- package/types/server/CosaicCloud.d.ts +21 -0
- package/types/server/Progress.d.ts +26 -0
- package/types/server/Server.d.ts +17 -0
- package/types/server/SmartDesktop.d.ts +36 -0
- package/types/server/SmartDesktopEndpoints.d.ts +99 -0
- package/types/server/SmartDesktopStaticConfigPlugin.d.ts +9 -0
- package/types/server/cssUtilities.d.ts +6 -0
- package/types/server/writeJSON.d.ts +1 -0
- package/types/startup/e2oLauncher.d.ts +1 -0
- package/types/startup/runScriptInElectron.d.ts +6 -0
- package/types/types/types.d.ts +148 -0
- package/types/util.d.ts +13 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "queue",
|
|
3
|
+
"version": "6.0.2",
|
|
4
|
+
"description": "asynchronous function queue with adjustable concurrency",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"queue",
|
|
7
|
+
"async",
|
|
8
|
+
"asynchronous",
|
|
9
|
+
"synchronous",
|
|
10
|
+
"job",
|
|
11
|
+
"task",
|
|
12
|
+
"concurrency",
|
|
13
|
+
"concurrent"
|
|
14
|
+
],
|
|
15
|
+
"files": [
|
|
16
|
+
"index.js",
|
|
17
|
+
"index.d.ts"
|
|
18
|
+
],
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"inherits": "~2.0.3"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@types/node": "*",
|
|
24
|
+
"browserify": "^16.2.3",
|
|
25
|
+
"coveralls": "^3.0.3",
|
|
26
|
+
"istanbul": "^0.4.5",
|
|
27
|
+
"standard": "^12.0.1",
|
|
28
|
+
"tape": "^4.10.1",
|
|
29
|
+
"tsd-check": "*",
|
|
30
|
+
"typescript": "^3.3.3333"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"test": "standard && node test && tsd-check",
|
|
34
|
+
"test-browser": "standard && browserify test/index.js > test/bundle.js && echo \"open test/index.html in your browser\"",
|
|
35
|
+
"travis": "standard && istanbul cover test --report lcovonly && cat coverage/lcov.info | coveralls",
|
|
36
|
+
"travis-ts": "tsc test/typescript.ts --m System --out /dev/null && echo 'TypeScript compilation passed.'",
|
|
37
|
+
"example": "node example",
|
|
38
|
+
"lint": "standard"
|
|
39
|
+
},
|
|
40
|
+
"repository": "https://github.com/jessetane/queue.git",
|
|
41
|
+
"author": "Jesse Tane <jesse.tane@gmail.com>",
|
|
42
|
+
"license": "MIT"
|
|
43
|
+
}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
```
|
|
2
|
+
____ __ _____ __ _____
|
|
3
|
+
/ __ `/ / / / _ \/ / / / _ \
|
|
4
|
+
/ /_/ / /_/ / __/ /_/ / __/
|
|
5
|
+
\__, /\__,_/\___/\__,_/\___/
|
|
6
|
+
/_/
|
|
7
|
+
```
|
|
8
|
+
Asynchronous function queue with adjustable concurrency.
|
|
9
|
+
|
|
10
|
+
[](http://www.npmjs.org/queue)
|
|
11
|
+
[](https://travis-ci.org/jessetane/queue)
|
|
12
|
+
[](https://coveralls.io/r/jessetane/queue)
|
|
13
|
+
|
|
14
|
+
This module exports a class `Queue` that implements most of the `Array` API. Pass async functions (ones that accept a callback or return a promise) to an instance's additive array methods. Processing begins when you call `q.start()`.
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
`npm run example`
|
|
18
|
+
``` javascript
|
|
19
|
+
var queue = require('../')
|
|
20
|
+
|
|
21
|
+
var q = queue({ results: [] })
|
|
22
|
+
|
|
23
|
+
// add jobs using the familiar Array API
|
|
24
|
+
q.push(function (cb) {
|
|
25
|
+
const result = 'two'
|
|
26
|
+
cb(null, result)
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
q.push(
|
|
30
|
+
function (cb) {
|
|
31
|
+
const result = 'four'
|
|
32
|
+
cb(null, result)
|
|
33
|
+
},
|
|
34
|
+
function (cb) {
|
|
35
|
+
const result = 'five'
|
|
36
|
+
cb(null, result)
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
// jobs can accept a callback or return a promise
|
|
41
|
+
q.push(function () {
|
|
42
|
+
return new Promise(function (resolve, reject) {
|
|
43
|
+
const result = 'one'
|
|
44
|
+
resolve(result)
|
|
45
|
+
})
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
q.unshift(function (cb) {
|
|
49
|
+
const result = 'one'
|
|
50
|
+
cb(null, result)
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
q.splice(2, 0, function (cb) {
|
|
54
|
+
const result = 'three'
|
|
55
|
+
cb(null, result)
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
// use the timeout feature to deal with jobs that
|
|
59
|
+
// take too long or forget to execute a callback
|
|
60
|
+
q.timeout = 100
|
|
61
|
+
|
|
62
|
+
q.on('timeout', function (next, job) {
|
|
63
|
+
console.log('job timed out:', job.toString().replace(/\n/g, ''))
|
|
64
|
+
next()
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
q.push(function (cb) {
|
|
68
|
+
setTimeout(function () {
|
|
69
|
+
console.log('slow job finished')
|
|
70
|
+
cb()
|
|
71
|
+
}, 200)
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
q.push(function (cb) {
|
|
75
|
+
console.log('forgot to execute callback')
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
// jobs can also override the queue's timeout
|
|
79
|
+
// on a per-job basis
|
|
80
|
+
function extraSlowJob (cb) {
|
|
81
|
+
setTimeout(function () {
|
|
82
|
+
console.log('extra slow job finished')
|
|
83
|
+
cb()
|
|
84
|
+
}, 400)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
extraSlowJob.timeout = 500
|
|
88
|
+
q.push(extraSlowJob)
|
|
89
|
+
|
|
90
|
+
// jobs can also opt-out of the timeout altogether
|
|
91
|
+
function superSlowJob (cb) {
|
|
92
|
+
setTimeout(function () {
|
|
93
|
+
console.log('super slow job finished')
|
|
94
|
+
cb()
|
|
95
|
+
}, 1000)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
superSlowJob.timeout = null
|
|
99
|
+
q.push(superSlowJob)
|
|
100
|
+
|
|
101
|
+
// get notified when jobs complete
|
|
102
|
+
q.on('success', function (result, job) {
|
|
103
|
+
console.log('job finished processing:', job.toString().replace(/\n/g, ''))
|
|
104
|
+
console.log('The result is:', result)
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
// begin processing, get notified on end / failure
|
|
108
|
+
q.start(function (err) {
|
|
109
|
+
if (err) throw err
|
|
110
|
+
console.log('all done:', q.results)
|
|
111
|
+
})
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Install
|
|
116
|
+
`npm install queue`
|
|
117
|
+
|
|
118
|
+
_Note_: You may need to install the [`events`](https://github.com/Gozala/events) dependency if
|
|
119
|
+
your environment does not have it by default (eg. browser, react-native).
|
|
120
|
+
|
|
121
|
+
## Test
|
|
122
|
+
`npm test`
|
|
123
|
+
`npm run test-browser`
|
|
124
|
+
|
|
125
|
+
## API
|
|
126
|
+
|
|
127
|
+
### `var q = queue([opts])`
|
|
128
|
+
Constructor. `opts` may contain inital values for:
|
|
129
|
+
* `q.concurrency`
|
|
130
|
+
* `q.timeout`
|
|
131
|
+
* `q.autostart`
|
|
132
|
+
* `q.results`
|
|
133
|
+
|
|
134
|
+
## Instance methods
|
|
135
|
+
### `q.start([cb])`
|
|
136
|
+
cb, if passed, will be called when the queue empties or when an error occurs.
|
|
137
|
+
|
|
138
|
+
### `q.stop()`
|
|
139
|
+
Stops the queue. can be resumed with `q.start()`.
|
|
140
|
+
|
|
141
|
+
### `q.end([err])`
|
|
142
|
+
Stop and empty the queue immediately.
|
|
143
|
+
|
|
144
|
+
## Instance methods mixed in from `Array`
|
|
145
|
+
Mozilla has docs on how these methods work [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array). Note that `slice` does not copy the queue.
|
|
146
|
+
### `q.push(element1, ..., elementN)`
|
|
147
|
+
### `q.unshift(element1, ..., elementN)`
|
|
148
|
+
### `q.splice(index , howMany[, element1[, ...[, elementN]]])`
|
|
149
|
+
### `q.pop()`
|
|
150
|
+
### `q.shift()`
|
|
151
|
+
### `q.slice(begin[, end])`
|
|
152
|
+
### `q.reverse()`
|
|
153
|
+
### `q.indexOf(searchElement[, fromIndex])`
|
|
154
|
+
### `q.lastIndexOf(searchElement[, fromIndex])`
|
|
155
|
+
|
|
156
|
+
## Properties
|
|
157
|
+
### `q.concurrency`
|
|
158
|
+
Max number of jobs the queue should process concurrently, defaults to `Infinity`.
|
|
159
|
+
|
|
160
|
+
### `q.timeout`
|
|
161
|
+
Milliseconds to wait for a job to execute its callback. This can be overridden by specifying a `timeout` property on a per-job basis.
|
|
162
|
+
|
|
163
|
+
### `q.autostart`
|
|
164
|
+
Ensures the queue is always running if jobs are available. Useful in situations where you are using a queue only for concurrency control.
|
|
165
|
+
|
|
166
|
+
### `q.results`
|
|
167
|
+
An array to set job callback arguments on.
|
|
168
|
+
|
|
169
|
+
### `q.length`
|
|
170
|
+
Jobs pending + jobs to process (readonly).
|
|
171
|
+
|
|
172
|
+
## Events
|
|
173
|
+
|
|
174
|
+
### `q.emit('start', job)`
|
|
175
|
+
Immediately before a job begins to execute.
|
|
176
|
+
|
|
177
|
+
### `q.emit('success', result, job)`
|
|
178
|
+
After a job executes its callback.
|
|
179
|
+
|
|
180
|
+
### `q.emit('error', err, job)`
|
|
181
|
+
After a job passes an error to its callback.
|
|
182
|
+
|
|
183
|
+
### `q.emit('timeout', continue, job)`
|
|
184
|
+
After `q.timeout` milliseconds have elapsed and a job has not executed its callback.
|
|
185
|
+
|
|
186
|
+
### `q.emit('end'[, err])`
|
|
187
|
+
After all jobs have been processed
|
|
188
|
+
|
|
189
|
+
## Releases
|
|
190
|
+
The latest stable release is published to [npm](http://npmjs.org/queue). Abbreviated changelog below:
|
|
191
|
+
* [6.0](https://github.com/jessetane/queue/archive/6.0.1.tar.gz)
|
|
192
|
+
* Add `start` event before job begins (@joelgriffith)
|
|
193
|
+
* Add `timeout` property on a job to override the queue's timeout (@joelgriffith)
|
|
194
|
+
* [5.0](https://github.com/jessetane/queue/archive/5.0.0.tar.gz)
|
|
195
|
+
* Updated TypeScript bindings (@Codex-)
|
|
196
|
+
* [4.4](https://github.com/jessetane/queue/archive/4.4.0.tar.gz)
|
|
197
|
+
* Add results feature
|
|
198
|
+
* [4.3](https://github.com/jessetane/queue/archive/4.3.0.tar.gz)
|
|
199
|
+
* Add promise support (@kwolfy)
|
|
200
|
+
* [4.2](https://github.com/jessetane/queue/archive/4.2.0.tar.gz)
|
|
201
|
+
* Unref timers on end
|
|
202
|
+
* [4.1](https://github.com/jessetane/queue/archive/4.1.0.tar.gz)
|
|
203
|
+
* Add autostart feature
|
|
204
|
+
* [4.0](https://github.com/jessetane/queue/archive/4.0.0.tar.gz)
|
|
205
|
+
* Change license to MIT
|
|
206
|
+
* [3.1.x](https://github.com/jessetane/queue/archive/3.0.6.tar.gz)
|
|
207
|
+
* Add .npmignore
|
|
208
|
+
* [3.0.x](https://github.com/jessetane/queue/archive/3.0.6.tar.gz)
|
|
209
|
+
* Change the default concurrency to `Infinity`
|
|
210
|
+
* Allow `q.start()` to accept an optional callback executed on `q.emit('end')`
|
|
211
|
+
* [2.x](https://github.com/jessetane/queue/archive/2.2.0.tar.gz)
|
|
212
|
+
* Major api changes / not backwards compatible with 1.x
|
|
213
|
+
* [1.x](https://github.com/jessetane/queue/archive/1.0.2.tar.gz)
|
|
214
|
+
* Early prototype
|
|
215
|
+
|
|
216
|
+
## License
|
|
217
|
+
Copyright © 2014 Jesse Tane <jesse.tane@gmail.com>
|
|
218
|
+
|
|
219
|
+
This work is free. You can redistribute it and/or modify it under the
|
|
220
|
+
terms of the [MIT License](https://opensource.org/licenses/MIT).
|
|
221
|
+
See LICENSE for full details.
|
package/package.json
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@finsemble/finsemble-electron-adapter",
|
|
3
|
+
"productName": "finsemble-electron-adapter",
|
|
4
|
+
"description": "Adapter for running finsemble on electron",
|
|
5
|
+
"version": "1.0.0-beta-1",
|
|
6
|
+
"main": "dist/app.js",
|
|
7
|
+
"types": "types/exports.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"deploy/configs",
|
|
10
|
+
"dist",
|
|
11
|
+
"exports.js",
|
|
12
|
+
"types"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "webpack --env NODE_ENV=production --config build/webpack.js",
|
|
16
|
+
"clean": "gulp clean && rimraf coverage",
|
|
17
|
+
"depcheck": "depcheck",
|
|
18
|
+
"dev": "cross-env NODE_ENV=development gulp buildE2O",
|
|
19
|
+
"do-audit": " improved-yarn-audit --min-severity high",
|
|
20
|
+
"monodev": "yarn dev",
|
|
21
|
+
"obfuscate": "cross-env OBFUSCATE_ENV=true NODE_ENV=production gulp buildE2O",
|
|
22
|
+
"pack_obfuscate": "npm install --force --no-package-lock && yarn run obfuscate && npm pack && npm pack && mv *.tgz fea.tgz",
|
|
23
|
+
"prod": "cross-env NODE_ENV=production gulp buildE2O",
|
|
24
|
+
"startbrk": "---need to re-write this---gulp dev:noLaunch --gulpfile=./finsemble-seed/gulpfile.js & set ELECTRON_DEV=true && electron dist/app.js --inspect-brk=5858 --remote-debugging-port=9090 --manifest http://localhost:3375/configs/application/manifest-local.json",
|
|
25
|
+
"test": "npx electron-mocha --full-trace --require babel-register \"src/**/*.spec.ts\" --timeout 10000",
|
|
26
|
+
"test:watch": "npx chokidar-cli \"src/**/*.ts\" \"spec/**/*.ts\" -c \"npm test\"",
|
|
27
|
+
"test-coverage": "nyc yarn test && nyc merge .nyc_output ../../.nyc_output/electron.json"
|
|
28
|
+
},
|
|
29
|
+
"build": {
|
|
30
|
+
"appId": "e2o",
|
|
31
|
+
"protocols": [
|
|
32
|
+
{
|
|
33
|
+
"name": "fsbl",
|
|
34
|
+
"role": "Viewer",
|
|
35
|
+
"schemes": [
|
|
36
|
+
"fsbl"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"author": "Cosaic",
|
|
42
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@types/electron-installer-dmg": "^3.0.0",
|
|
45
|
+
"@types/lodash": "^4.14.175",
|
|
46
|
+
"@types/lodash.get": "^4.4.6",
|
|
47
|
+
"@types/mkdirp": "^1.0.2",
|
|
48
|
+
"@types/unzipper": "^0.10.4",
|
|
49
|
+
"electron": "17.0.0",
|
|
50
|
+
"electron-installer-dmg": "4.0.0",
|
|
51
|
+
"electron-packager": "15.5.1",
|
|
52
|
+
"electron-winstaller": "5.0.0"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@babel/core": "7.18.2",
|
|
56
|
+
"@babel/preset-env": "7.17.10",
|
|
57
|
+
"@babel/preset-typescript": "7.17.12",
|
|
58
|
+
"@babel/register": "7.17.7",
|
|
59
|
+
"@types/archiver": "^5.1.0",
|
|
60
|
+
"@types/chai": "^4.3.0",
|
|
61
|
+
"@types/chai-http": "^4.2.0",
|
|
62
|
+
"@types/deepmerge": "^2.2.0",
|
|
63
|
+
"@types/express": "^4.17.11",
|
|
64
|
+
"@types/express-fileupload": "^1.1.6",
|
|
65
|
+
"@types/fs-extra": "^9.0.6",
|
|
66
|
+
"@types/minimist": "^1.2.1",
|
|
67
|
+
"@types/mocha": "^9.0.0",
|
|
68
|
+
"@types/node": "^14.14.22",
|
|
69
|
+
"@types/sinon": "^10.0.4",
|
|
70
|
+
"@types/ws": "8.5.3",
|
|
71
|
+
"add-filename-increment": "^1.0.0",
|
|
72
|
+
"archiver": "^5.2.0",
|
|
73
|
+
"body-parser": "^1.19.0",
|
|
74
|
+
"case-sensitive-paths-webpack-plugin": "2.4.0",
|
|
75
|
+
"chai": "4.3.6",
|
|
76
|
+
"chai-http": "^4.3.0",
|
|
77
|
+
"cross-env": "7.0.3",
|
|
78
|
+
"css-variables-parser": "^1.0.0",
|
|
79
|
+
"deepmerge": "4.2.2",
|
|
80
|
+
"depcheck": "1.4.3",
|
|
81
|
+
"electron-ipc-mock": "0.0.3",
|
|
82
|
+
"electron-mocha": "11.0.2",
|
|
83
|
+
"express": "^4.17.1",
|
|
84
|
+
"express-fileupload": "^1.2.1",
|
|
85
|
+
"fast-safe-stringify": "2.1.1",
|
|
86
|
+
"fs-extra": "^10.0.0",
|
|
87
|
+
"gulp": "4.0.2",
|
|
88
|
+
"image-size": "1.0.1",
|
|
89
|
+
"improved-yarn-audit": "^3.0.0",
|
|
90
|
+
"joi": "17.6.0",
|
|
91
|
+
"lodash.get": "4.4.2",
|
|
92
|
+
"minimist": "^1.2.5",
|
|
93
|
+
"mkdirp": "1.0.4",
|
|
94
|
+
"node-loader": "2.0.0",
|
|
95
|
+
"nyc": "15.1.0",
|
|
96
|
+
"shelljs": "^0.8.4",
|
|
97
|
+
"signtool": "1.0.0",
|
|
98
|
+
"sinon": "14.0.0",
|
|
99
|
+
"systeminformation": "5.11.15",
|
|
100
|
+
"ts-loader": "9.3.0",
|
|
101
|
+
"typescript": "4.5.5",
|
|
102
|
+
"unzipper": "0.10.11",
|
|
103
|
+
"uuid-random": "^1.3.2",
|
|
104
|
+
"webpack": "5.72.0",
|
|
105
|
+
"webpack-cli": "4.9.2",
|
|
106
|
+
"winston": "3.7.2",
|
|
107
|
+
"winston-daily-rotate-file": "4.6.1",
|
|
108
|
+
"ws": "7.5.3"
|
|
109
|
+
},
|
|
110
|
+
"bundledDependencies": [
|
|
111
|
+
"electron-ipc-mock",
|
|
112
|
+
"image-size"
|
|
113
|
+
],
|
|
114
|
+
"resolutions": {
|
|
115
|
+
"glob-parent": "^5.1.2",
|
|
116
|
+
"async": "^2.6.4",
|
|
117
|
+
"ansi-regex": "^5.0.1"
|
|
118
|
+
}
|
|
119
|
+
}
|
package/types/app.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const setChromiumFlags: (chromiumFlags: any) => Promise<void>;
|
|
2
|
+
export declare const setSDServerEnabled: () => Promise<void>;
|
|
3
|
+
export declare const setManifestURL: (manifestUrl: any) => Promise<void>;
|
|
4
|
+
export declare const copySocketCertificates: (certificatePathObj: any) => Promise<void>;
|
|
5
|
+
export declare const setUpdateURL: (updateFeedUrl: any) => Promise<void>;
|
|
6
|
+
export declare const setFeaPath: (feaPath: string) => void;
|
|
7
|
+
export declare const setApplicationFolderName: (folderName: string) => Promise<void>;
|
|
8
|
+
export declare const createPackage: (packageConfig: any) => Promise<string[]>;
|
|
9
|
+
export declare const createInstaller: (installerConfig: any) => Promise<void>;
|
|
10
|
+
export declare const createFullInstaller: (config: any) => Promise<void>;
|
package/types/e2o.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as Server from "./server/Server";
|
|
2
|
+
import * as AppD from "./server/AppD";
|
|
3
|
+
import * as AppDStaticConfigPlugin from "./server/AppDStaticConfigPlugin";
|
|
4
|
+
import * as SmartDesktopStaticConfigPlugin from "./server/SmartDesktopStaticConfigPlugin";
|
|
5
|
+
import { runScriptInElectron } from "./startup/runScriptInElectron";
|
|
6
|
+
declare const _default: {
|
|
7
|
+
e2oLauncher: (params: object, cb?: Function) => any;
|
|
8
|
+
runScriptInElectron: typeof runScriptInElectron;
|
|
9
|
+
packager: any;
|
|
10
|
+
e2oApplication: (app: any, manifest: object, socketCertificatePath?: {
|
|
11
|
+
key: string;
|
|
12
|
+
cert: string;
|
|
13
|
+
} | undefined) => void;
|
|
14
|
+
Server: typeof Server;
|
|
15
|
+
AppD: typeof AppD;
|
|
16
|
+
AppDStaticConfigPlugin: typeof AppDStaticConfigPlugin;
|
|
17
|
+
SmartDesktopStaticConfigPlugin: typeof SmartDesktopStaticConfigPlugin;
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
export declare class LoggerMain {
|
|
3
|
+
initialized: boolean;
|
|
4
|
+
winston: any;
|
|
5
|
+
fileTransport: any;
|
|
6
|
+
terminalTransport: any;
|
|
7
|
+
logLevel: string;
|
|
8
|
+
errorCallback: ((...args: any[]) => void) | null;
|
|
9
|
+
constructor(winstonLogger: any);
|
|
10
|
+
initialize(): void;
|
|
11
|
+
enableConsole(): void;
|
|
12
|
+
setLevel(level?: string): void;
|
|
13
|
+
onLog(event: any, message: any): void;
|
|
14
|
+
setErrorCallback(cb: (...args: any[]) => void): void;
|
|
15
|
+
error(...messages: any[]): void;
|
|
16
|
+
warn(...messages: any[]): void;
|
|
17
|
+
info(...messages: any[]): void;
|
|
18
|
+
log(...messages: any[]): void;
|
|
19
|
+
debug(...messages: any[]): void;
|
|
20
|
+
verbose(...messages: any[]): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default class LoggerRenderer {
|
|
2
|
+
ipc: any;
|
|
3
|
+
constructor(ipcRenderer: any);
|
|
4
|
+
send(level: string, args: any): void;
|
|
5
|
+
error(...messages: any[]): void;
|
|
6
|
+
warn(...messages: any[]): void;
|
|
7
|
+
info(...messages: any[]): void;
|
|
8
|
+
log(...messages: any[]): void;
|
|
9
|
+
debug(...messages: any[]): void;
|
|
10
|
+
verbose(...messages: any[]): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getOrCreateRendererLogger: () => any;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface ConsoleLogger {
|
|
2
|
+
debug: (...args: any[]) => void;
|
|
3
|
+
error: (...args: any[]) => void;
|
|
4
|
+
info: (...args: any[]) => void;
|
|
5
|
+
log: (...args: any[]) => void;
|
|
6
|
+
warn: (...args: any[]) => void;
|
|
7
|
+
verbose: (...args: any[]) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const noopLogger: ConsoleLogger;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BrowserWindow } from "electron";
|
|
2
|
+
import { BrowserWindowConstructorOptions } from "electron/main";
|
|
3
|
+
export declare class AffinityManager {
|
|
4
|
+
private affinitySurrogateInstances;
|
|
5
|
+
private static surrogateURL;
|
|
6
|
+
constructor();
|
|
7
|
+
static getSurrogateUrl(): string | null;
|
|
8
|
+
static setSurrogateUrl(url: string): void;
|
|
9
|
+
private maybeCreateAffinitySurrogate;
|
|
10
|
+
private createAffinitySurrogate;
|
|
11
|
+
private removeAffinitySurrogate;
|
|
12
|
+
spawn(affinityID: string, url: string, opts: BrowserWindowConstructorOptions): Promise<BrowserWindow>;
|
|
13
|
+
}
|
|
14
|
+
declare const affinityManagerSingleton: AffinityManager;
|
|
15
|
+
export { affinityManagerSingleton };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { MainWindow } from "./MainWindow";
|
|
2
|
+
import { WebContentsId } from "../types/types";
|
|
3
|
+
import { BrowserView, BrowserWindow } from "electron";
|
|
4
|
+
export declare const setViewBounds: (bounds: any, view: any) => void;
|
|
5
|
+
export declare const calculateBrowserViewBounds: (windowWidth: number, windowHeight: number, titleBarHeight: number | undefined | null, overrideBounds: any) => {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
};
|
|
11
|
+
declare type View = {
|
|
12
|
+
id: WebContentsId;
|
|
13
|
+
browserView: BrowserView;
|
|
14
|
+
devtools: BrowserWindow | null;
|
|
15
|
+
webContentsName: string;
|
|
16
|
+
};
|
|
17
|
+
export declare class BrowserViews {
|
|
18
|
+
views: Record<string, View>;
|
|
19
|
+
parentWindow: MainWindow;
|
|
20
|
+
constructor(parentWindow: MainWindow);
|
|
21
|
+
addBrowserView(params: {
|
|
22
|
+
url: string;
|
|
23
|
+
webContentsName?: string;
|
|
24
|
+
allowAutoResize?: boolean;
|
|
25
|
+
bounds?: any;
|
|
26
|
+
}): Promise<number>;
|
|
27
|
+
adjustToParent(id?: number): void;
|
|
28
|
+
showDeveloperTools(id: number): void;
|
|
29
|
+
reload(): boolean;
|
|
30
|
+
setViewBounds(id: number, bounds: any): void;
|
|
31
|
+
bringViewToFront(id: number): void;
|
|
32
|
+
focus(id?: number): boolean;
|
|
33
|
+
removeAll(): Promise<void>;
|
|
34
|
+
closeCleanup(): void;
|
|
35
|
+
private cleanupView;
|
|
36
|
+
removeBrowserView(id: number): Promise<boolean>;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Asset } from "../types/types";
|
|
3
|
+
import { SpawnOptionsWithoutStdio } from "child_process";
|
|
4
|
+
import { StandardResponse, StandardPromise } from "../types/types";
|
|
5
|
+
declare type ExternalApp = {
|
|
6
|
+
filePath: string;
|
|
7
|
+
kill: (signal?: number | NodeJS.Signals | undefined) => void;
|
|
8
|
+
};
|
|
9
|
+
declare type DownloadedAsset = {
|
|
10
|
+
alias: string;
|
|
11
|
+
executable: string;
|
|
12
|
+
version: string;
|
|
13
|
+
assetFolder: string;
|
|
14
|
+
url: string;
|
|
15
|
+
};
|
|
16
|
+
export declare class ExternalApplicationManager {
|
|
17
|
+
assets: Record<string, DownloadedAsset>;
|
|
18
|
+
assetsFolder: string;
|
|
19
|
+
externalApps: ExternalApp[];
|
|
20
|
+
constructor(assetsFolder: string);
|
|
21
|
+
maybeDownloadAsset(asset: Asset): StandardPromise<void>;
|
|
22
|
+
deleteAssets(alias?: string | null): string | null;
|
|
23
|
+
downloadAssets(appAssets: Asset[]): Promise<string | null>;
|
|
24
|
+
maybePathFromAlias(alias?: string): StandardResponse<string>;
|
|
25
|
+
spawn({ alias, path: filePath, certificate, options, arguments: spawnArguments, env, }: {
|
|
26
|
+
alias?: string;
|
|
27
|
+
path?: string;
|
|
28
|
+
certificate?: {
|
|
29
|
+
trusted: boolean;
|
|
30
|
+
};
|
|
31
|
+
options?: SpawnOptionsWithoutStdio;
|
|
32
|
+
arguments?: string[] | string;
|
|
33
|
+
env?: Record<string, string>;
|
|
34
|
+
}): StandardPromise<void>;
|
|
35
|
+
closeAllApps(): void;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IpcMainEvent, WebContents } from "electron";
|
|
2
|
+
import { WebContentsId, IABPublish, IABSubscribe, IABUnsubscribe } from "../types/types";
|
|
3
|
+
declare class IAB {
|
|
4
|
+
subscribers: {
|
|
5
|
+
[destination: string]: {
|
|
6
|
+
[listenerID: string]: WebContents;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
constructor();
|
|
10
|
+
unsubscribeWebContentsId(closingWebContentsId: WebContentsId): void;
|
|
11
|
+
onIABSubscribe(event: IpcMainEvent, arg: IABSubscribe): void;
|
|
12
|
+
onIABUnsubscribe(event: IpcMainEvent, arg: IABUnsubscribe): void;
|
|
13
|
+
onIABPublish(event: IpcMainEvent, arg: IABPublish): void;
|
|
14
|
+
setupListeners(): void;
|
|
15
|
+
}
|
|
16
|
+
export declare const iab: IAB;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Manifest, SocketCertificatePath } from "../types/types";
|
|
2
|
+
import ws from "ws";
|
|
3
|
+
export declare type IACOptions = {
|
|
4
|
+
key?: string;
|
|
5
|
+
cert?: string;
|
|
6
|
+
ca?: string;
|
|
7
|
+
secure?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare class IAC {
|
|
10
|
+
wss: ws.Server | null;
|
|
11
|
+
port: number;
|
|
12
|
+
host: string;
|
|
13
|
+
options: IACOptions;
|
|
14
|
+
constructor(port?: number, host?: string, options?: IACOptions);
|
|
15
|
+
connect(): void;
|
|
16
|
+
}
|
|
17
|
+
export declare const startIAC: (manifest: Manifest, socketCertificatePath: SocketCertificatePath | null) => IAC;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Manifest, SocketCertificatePath } from "../types/types";
|
|
2
|
+
import { App } from "electron";
|
|
3
|
+
export declare const main: ({ app, manifest, socketCertificatePath, }: {
|
|
4
|
+
app: App;
|
|
5
|
+
manifest: Manifest;
|
|
6
|
+
socketCertificatePath: SocketCertificatePath | null;
|
|
7
|
+
}) => Promise<string | null>;
|