pinokiod 3.8.13 → 3.8.15

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.
Files changed (2) hide show
  1. package/kernel/bin/caddy.js +33 -14
  2. package/package.json +1 -1
@@ -130,6 +130,25 @@ class Caddy {
130
130
  }
131
131
  ]
132
132
  },
133
+ {
134
+ "match": [{ "host": ["a.pinokio.localhost"] }],
135
+ "handle": [
136
+ {
137
+ "handler": "reverse_proxy",
138
+ "upstreams": [{ "dial": "localhost:7861" }]
139
+ },
140
+ {
141
+ "handler": "headers",
142
+ "response": {
143
+ "set": {
144
+ "Access-Control-Allow-Origin": ["*"],
145
+ "Access-Control-Allow-Methods": ["GET, POST, OPTIONS, PUT, DELETE"],
146
+ "Access-Control-Allow-Headers": ["*"]
147
+ }
148
+ }
149
+ }
150
+ ]
151
+ },
133
152
  {
134
153
  "match": [{ "host": ["b.pinokio.localhost"] }],
135
154
  "handle": [
@@ -316,20 +335,6 @@ class Caddy {
316
335
  }
317
336
  })
318
337
  })
319
- console.log("req", req)
320
- ondata({
321
- title: "Password",
322
- description: "Enter your system password to add the HTTPS certificate",
323
- form: [{
324
- type: "password",
325
- autofocus: true,
326
- key: "password",
327
- placeholder: "System password",
328
- }]
329
- }, "input")
330
- console.log("Wait until", id)
331
- let response = await this.kernel.api.wait(id)
332
- console.log({ response })
333
338
  if (this.kernel.platform === "win32") {
334
339
  await this.kernel.exec({
335
340
  message: `caddy trust`,
@@ -342,6 +347,20 @@ class Caddy {
342
347
  // }
343
348
  })
344
349
  } else {
350
+ console.log("req", req)
351
+ ondata({
352
+ title: "Password",
353
+ description: "Enter your system password to add the HTTPS certificate",
354
+ form: [{
355
+ type: "password",
356
+ autofocus: true,
357
+ key: "password",
358
+ placeholder: "System password",
359
+ }]
360
+ }, "input")
361
+ console.log("Wait until", id)
362
+ let response = await this.kernel.api.wait(id)
363
+ console.log({ response })
345
364
  await this.kernel.exec({
346
365
  message: `echo ${response.password} | sudo -S caddy trust`,
347
366
  path: this.kernel.homedir
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.8.13",
3
+ "version": "3.8.15",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {