@platformatic/watt-extra 1.12.0-alpha.4 → 1.12.0
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/.claude/settings.local.json +7 -0
- package/lib/watt.js +5 -17
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(node -e \"const schema = require\\(''''@platformatic/runtime/lib/schema.js''''\\); console.log\\(JSON.stringify\\(schema.default?.properties?.services?.items?.properties || schema.properties?.services?.items?.properties, null, 2\\)\\)\")"
|
|
5
|
+
]
|
|
6
|
+
}
|
|
7
|
+
}
|
package/lib/watt.js
CHANGED
|
@@ -525,11 +525,9 @@ class Watt {
|
|
|
525
525
|
].includes(app.type)
|
|
526
526
|
) {
|
|
527
527
|
await this.#configurePlatformaticServices(runtime, app)
|
|
528
|
+
} else if (app.type === '@platformatic/regina') {
|
|
529
|
+
await this.#configureReginaService(runtime, app)
|
|
528
530
|
}
|
|
529
|
-
// else if (app.type === '@platformatic/regina') {
|
|
530
|
-
// this.#configureReginaService(runtime, app)
|
|
531
|
-
// }
|
|
532
|
-
this.#configureReginaService(runtime, app)
|
|
533
531
|
}
|
|
534
532
|
}
|
|
535
533
|
|
|
@@ -606,27 +604,17 @@ class Watt {
|
|
|
606
604
|
}
|
|
607
605
|
|
|
608
606
|
async #configureReginaService (runtime, app) {
|
|
609
|
-
process._rawDebug('--------INSTANCE CONFIG--------', this.#instanceConfig)
|
|
610
|
-
|
|
611
607
|
const privateIp = await this.#getPrivateIp()
|
|
612
608
|
const port = this.#getRuntimePort()
|
|
613
|
-
|
|
614
|
-
if (!privateIp) {
|
|
615
|
-
this.#logger.warn('Missing private IP address, not setting up Regina member address')
|
|
616
|
-
return
|
|
617
|
-
}
|
|
618
|
-
|
|
619
609
|
const address = `http://${privateIp}:${port}`
|
|
620
|
-
process._rawDebug('--------ADDRESS--------', address)
|
|
621
610
|
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
611
|
+
this.#patchService(runtime, app.id, [
|
|
612
|
+
{ op: 'add', path: '/regina/memberAddress', value: address }
|
|
613
|
+
])
|
|
625
614
|
}
|
|
626
615
|
|
|
627
616
|
async #getPrivateIp () {
|
|
628
617
|
const { address } = await dns.lookup(os.hostname())
|
|
629
|
-
process._rawDebug('--------IP--------', address)
|
|
630
618
|
return address
|
|
631
619
|
}
|
|
632
620
|
|