pear-electron 1.7.14 → 1.7.16
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/api.js +19 -0
- package/package.json +3 -3
package/api.js
CHANGED
|
@@ -365,6 +365,25 @@ module.exports = (api) => {
|
|
|
365
365
|
return this[this.constructor.UI].View
|
|
366
366
|
}
|
|
367
367
|
|
|
368
|
+
get worker () {
|
|
369
|
+
if (!this.constructor.COMPAT) console.warn('[ DEPRECATED ] Pear.worker is deprecated and will be removed (use pear-run & pear-pipe)')
|
|
370
|
+
const ipc = this.#ipc
|
|
371
|
+
return new class DeprecatedWorker {
|
|
372
|
+
#pipe = null
|
|
373
|
+
run (link, args = []) {
|
|
374
|
+
if (!this.constructor.COMPAT) console.warn('[ DEPRECATED ] Pear.worker.run() is now pear-run')
|
|
375
|
+
return ipc.run(link, args)
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
pipe () {
|
|
379
|
+
if (!this.constructor.COMPAT) console.warn('[ DEPRECATED ] Pear.worker.pipe() is now pear-pipe')
|
|
380
|
+
if (this.#pipe !== null) return this.#pipe
|
|
381
|
+
this.#pipe = ipc.pipe()
|
|
382
|
+
return this.#pipe
|
|
383
|
+
}
|
|
384
|
+
}()
|
|
385
|
+
}
|
|
386
|
+
|
|
368
387
|
exit = (code) => {
|
|
369
388
|
process.exitCode = code
|
|
370
389
|
this.#ipc.exit(code)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pear-electron",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.16",
|
|
4
4
|
"description": "Pear User-Interface Library for Electron",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"pear": {
|
|
21
21
|
"assets": {
|
|
22
22
|
"ui": {
|
|
23
|
-
"link": "pear://0.
|
|
23
|
+
"link": "pear://0.938.pkzpbccx8ojp4516p7abompuhyj5gcpqfux1s9e7e4zzcdhyhdto",
|
|
24
24
|
"name": "Pear Runtime",
|
|
25
25
|
"only": [
|
|
26
26
|
"/boot.bundle",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"iambus": "^1.0.3",
|
|
75
75
|
"localdrive": "^1.12.1",
|
|
76
76
|
"paparam": "^1.6.1",
|
|
77
|
-
"pear-api": "^1.28.
|
|
77
|
+
"pear-api": "^1.28.5",
|
|
78
78
|
"pear-ipc": "^6.4.0",
|
|
79
79
|
"script-linker": "^2.5.3",
|
|
80
80
|
"streamx": "^2.20.2",
|