pinokiod 0.1.54 → 0.1.55

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.
@@ -39,11 +39,11 @@ class FS {
39
39
  async share(req, ondata, kernel) {
40
40
  /////////////////////////////////////////////////////////////////////////////
41
41
  //
42
- // 1. 1:1 Interface mapping (1 interface, 1 file path)
42
+ // 1. 1:1 Drive mapping (1 file path per 1 drive folder)
43
43
  // {
44
44
  // “method”: “fs.share”,
45
45
  // “params”: {
46
- // "interface": {
46
+ // "drive": {
47
47
  // “models/checkpoints": "app/models/checkpoints",
48
48
  // “models/vae": "app/models/VAE",
49
49
  // },
@@ -52,11 +52,11 @@ class FS {
52
52
  // }
53
53
  //
54
54
  //
55
- // 2. 1:N Interface mapping (1 interface, N file paths)
55
+ // 2. 1:N Drive mapping (N file paths per 1 drive folder)
56
56
  // {
57
57
  // “method”: “fs.share”,
58
58
  // “params”: {
59
- // "interface": {
59
+ // "drive": {
60
60
  // “models/checkpoints": "app/models/checkpoints",
61
61
  // “models/loras": [ "app/models/Lora", "app/models/LyCORIS" ],
62
62
  // },
@@ -67,11 +67,11 @@ class FS {
67
67
  /////////////////////////////////////////////////////////////////////////////
68
68
 
69
69
 
70
- if (req.params.interface) {
70
+ if (req.params.drive) {
71
71
  const drivePath = kernel.path("drive")
72
72
  const drive = new Pdrive(drivePath)
73
- for(const route in req.params.interface) {
74
- const link = req.params.interface[route]
73
+ for(const route in req.params.drive) {
74
+ const link = req.params.drive[route]
75
75
  // Link path validation
76
76
  if (Array.isArray(link)) {
77
77
  let toContinue = false;
@@ -87,7 +87,7 @@ class FS {
87
87
  continue
88
88
  }
89
89
  }
90
- // Interface path validation
90
+ // Drive path validation
91
91
  if (path.isAbsolute(route) || route.startsWith(".")) {
92
92
  toContinue = true
93
93
  break
@@ -102,16 +102,16 @@ class FS {
102
102
  linkPath = path.resolve(req.cwd, link)
103
103
  }
104
104
 
105
- req.params.interface[route] = linkPath
105
+ req.params.drive[route] = linkPath
106
106
  }
107
107
  await drive.create({
108
108
  uri: req.parent.git,
109
- interface: req.params.interface,
109
+ drive: req.params.drive,
110
110
  peers: (req.params.peers ? req.params.peers : [])
111
111
  })
112
112
  ondata({ raw: `\r\nDone!` })
113
113
  } else {
114
- ondata({ raw: `\r\nMust pass an 'interface' mapping` })
114
+ ondata({ raw: `\r\nMust pass an 'drive' mapping` })
115
115
  }
116
116
 
117
117
  }
@@ -0,0 +1,15 @@
1
+ /*
2
+ {
3
+ method: "tab.open",
4
+ params: {
5
+ target:
6
+ url
7
+ }
8
+ }
9
+ (*/
10
+ class Tab {
11
+ async open(req, ondata, kernel) {
12
+ ondata(req.params, "tab.open")
13
+ }
14
+ }
15
+ module.exports = Tab
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "0.1.54",
3
+ "version": "0.1.55",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -40,7 +40,7 @@
40
40
  "multer": "^1.4.5-lts.1",
41
41
  "node-downloader-helper": "^2.1.9",
42
42
  "node-pty-prebuilt-multiarch-cp": "^0.10.1-pre.48",
43
- "pdrive": "^0.0.9",
43
+ "pdrive": "^0.0.10",
44
44
  "portfinder": "^1.0.32",
45
45
  "rimraf": "^5.0.0",
46
46
  "sanitize-filename": "^1.6.3",
@@ -703,6 +703,7 @@ window.addEventListener('message', (event) => {
703
703
  addTab(event.data.action.url)
704
704
  }
705
705
  } else {
706
+ console.log("data", event.data)
706
707
  refresh()
707
708
  }
708
709
  });
@@ -333,6 +333,8 @@ document.addEventListener("DOMContentLoaded", async () => {
333
333
  }]
334
334
  }
335
335
  */
336
+ } else if (packet.type === "tab.open") {
337
+ refreshParent(packet)
336
338
  } else if (packet.type === "browser.open") {
337
339
  /*
338
340
  {
@@ -312,6 +312,8 @@ document.addEventListener("DOMContentLoaded", async () => {
312
312
  }]
313
313
  }
314
314
  */
315
+ } else if (packet.type === "tab.open") {
316
+ refreshParent(packet)
315
317
  } else if (packet.type === "browser.open") {
316
318
  /*
317
319
  {