@aaqu/fromcubes-portal-react 0.1.0-alpha.1 → 0.1.0-alpha.3

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 CHANGED
@@ -175,7 +175,7 @@
175
175
 
176
176
  END OF TERMS AND CONDITIONS
177
177
 
178
- Copyright 2026 aaqu
178
+ Copyright 2026 Mazur Albert Fromcubes
179
179
 
180
180
  Licensed under the Apache License, Version 2.0 (the "License");
181
181
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -29,7 +29,7 @@ React portal node for Node-RED. Server-side JSX transpilation via esbuild. Tailw
29
29
 
30
30
  ```bash
31
31
  cd ~/.node-red
32
- npm install /path/to/fromcubes-portal-react
32
+ npm install @aaqu/fromcubes-portal-react@alpha
33
33
  # restart Node-RED
34
34
  ```
35
35
 
@@ -117,4 +117,4 @@ No Babel, no Sucrase client, no Vue, no Vuetify, no Socket.IO.
117
117
 
118
118
  ## License
119
119
 
120
- MIT
120
+ Apache-2.0
@@ -22,6 +22,10 @@ const reactHash = crypto
22
22
  .slice(0, 10);
23
23
 
24
24
  module.exports = function (RED) {
25
+ // ── Admin root prefix (for correct URLs when httpAdminRoot is set) ──
26
+ const adminRoot = (RED.settings.httpAdminRoot || "/").replace(/\/$/, "");
27
+ const nodeRoot = (RED.settings.httpNodeRoot || "/").replace(/\/$/, "");
28
+
25
29
  // ── Shared state ──────────────────────────────────────────────
26
30
  // Component registry: populated by fc-portal-component canvas nodes at deploy time
27
31
  if (!RED.settings.fcPortalRegistry) {
@@ -199,7 +203,7 @@ module.exports = function (RED) {
199
203
  let wsServer = null;
200
204
  let isClosing = false;
201
205
 
202
- const wsPath = endpoint + "/_ws";
206
+ const wsPath = nodeRoot + endpoint + "/_ws";
203
207
 
204
208
  // ── Rebuild: transpile JSX + update page state ────────────
205
209
 
@@ -537,8 +541,8 @@ module.exports = function (RED) {
537
541
  <meta charset="UTF-8">
538
542
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
539
543
  <title>${esc(title)}</title>
540
- <script src="/portal-react/vendor/react.min.js?v=${reactHash}"><\/script>
541
- ${cssHash ? `<link rel="stylesheet" href="/portal-react/css/${cssHash}.css">` : ""}
544
+ <script src="${adminRoot}/portal-react/vendor/react.min.js?v=${reactHash}"><\/script>
545
+ ${cssHash ? `<link rel="stylesheet" href="${adminRoot}/portal-react/css/${cssHash}.css">` : ""}
542
546
  ${escScript(customHead)}
543
547
  <style>
544
548
  @layer base{
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aaqu/fromcubes-portal-react",
3
- "version": "0.1.0-alpha.1",
4
- "description": "React portal node for Node-RED — server-side JSX transpilation, Monaco editor, component registry, WebSocket I/O",
3
+ "version": "0.1.0-alpha.3",
4
+ "description": "Fromcubes Portal - React for Node-RED",
5
5
  "keywords": [
6
6
  "node-red",
7
7
  "react",