@bonsae/nrg 0.20.1 → 0.21.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/README.md +8 -0
- package/package.json +1 -1
- package/server/index.cjs +98 -86
- package/server/resources/nrg-client.js +2361 -2105
- package/test/client/component/setup.js +22 -21
- package/test/client/e2e/index.js +307 -52
- package/types/client.d.ts +17 -4
- package/types/server.d.ts +41 -25
- package/types/shims/client/types.d.ts +17 -4
- package/types/test-client-component.d.ts +9 -4
- package/types/test-client-unit.d.ts +9 -4
- package/vite/index.js +302 -51
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { beforeEach as z } from "vitest";
|
|
2
2
|
import { config as O } from "vitest-browser-vue";
|
|
3
|
-
import { defineComponent as V, openBlock as l, createElementBlock as c, normalizeClass as
|
|
3
|
+
import { defineComponent as V, openBlock as l, createElementBlock as c, normalizeClass as N, createCommentVNode as f, renderSlot as w, createTextVNode as D, toDisplayString as T, resolveComponent as g, createBlock as v, createElementVNode as m, shallowRef as q, withDirectives as H, vShow as J, Teleport as K, Fragment as _, renderList as L, createVNode as R } from "vue";
|
|
4
4
|
function j() {
|
|
5
5
|
const e = {
|
|
6
6
|
get(t) {
|
|
@@ -354,7 +354,7 @@ function ne(e, t, n, r, s, d) {
|
|
|
354
354
|
"i",
|
|
355
355
|
{
|
|
356
356
|
key: 0,
|
|
357
|
-
class:
|
|
357
|
+
class: N(e.iconClass)
|
|
358
358
|
},
|
|
359
359
|
null,
|
|
360
360
|
2
|
|
@@ -855,7 +855,7 @@ function Ee(e, t, n, r, s, d) {
|
|
|
855
855
|
)) : f("v-if", !0)
|
|
856
856
|
]);
|
|
857
857
|
}
|
|
858
|
-
const
|
|
858
|
+
const M = /* @__PURE__ */ E($e, [["render", Ee]]), we = V({
|
|
859
859
|
components: { NodeRedInputLabel: k },
|
|
860
860
|
props: {
|
|
861
861
|
modelValue: {
|
|
@@ -1108,7 +1108,7 @@ const F = /* @__PURE__ */ E($e, [["render", Ee]]), we = V({
|
|
|
1108
1108
|
ref: "container",
|
|
1109
1109
|
class: "container"
|
|
1110
1110
|
}, Se = { class: "editor-wrapper" }, qe = ["id"];
|
|
1111
|
-
function
|
|
1111
|
+
function Re(e, t, n, r, s, d) {
|
|
1112
1112
|
const a = g("NodeRedInputLabel");
|
|
1113
1113
|
return l(), c(
|
|
1114
1114
|
"div",
|
|
@@ -1167,7 +1167,7 @@ function Ne(e, t, n, r, s, d) {
|
|
|
1167
1167
|
/* NEED_PATCH */
|
|
1168
1168
|
);
|
|
1169
1169
|
}
|
|
1170
|
-
const
|
|
1170
|
+
const F = /* @__PURE__ */ E(we, [["render", Re], ["__scopeId", "data-v-ea93e881"]]), Ne = V({
|
|
1171
1171
|
name: "NodeRedToggle",
|
|
1172
1172
|
props: {
|
|
1173
1173
|
modelValue: {
|
|
@@ -1198,7 +1198,7 @@ function Ce(e, t, n, r, s, d) {
|
|
|
1198
1198
|
m(
|
|
1199
1199
|
"label",
|
|
1200
1200
|
{
|
|
1201
|
-
class:
|
|
1201
|
+
class: N(["nrg-toggle", { "nrg-toggle--checked": e.modelValue }])
|
|
1202
1202
|
},
|
|
1203
1203
|
[
|
|
1204
1204
|
m("input", {
|
|
@@ -1215,7 +1215,7 @@ function Ce(e, t, n, r, s, d) {
|
|
|
1215
1215
|
"i",
|
|
1216
1216
|
{
|
|
1217
1217
|
key: 0,
|
|
1218
|
-
class:
|
|
1218
|
+
class: N(e.iconClass)
|
|
1219
1219
|
},
|
|
1220
1220
|
null,
|
|
1221
1221
|
2
|
|
@@ -1240,7 +1240,7 @@ function Ce(e, t, n, r, s, d) {
|
|
|
1240
1240
|
)
|
|
1241
1241
|
]);
|
|
1242
1242
|
}
|
|
1243
|
-
const P = /* @__PURE__ */ E(
|
|
1243
|
+
const P = /* @__PURE__ */ E(Ne, [["render", Ce], ["__scopeId", "data-v-724dcae4"]]), Ae = /* @__PURE__ */ new Set([
|
|
1244
1244
|
"id",
|
|
1245
1245
|
"type",
|
|
1246
1246
|
"x",
|
|
@@ -1251,9 +1251,10 @@ const P = /* @__PURE__ */ E(Re, [["render", Ce], ["__scopeId", "data-v-724dcae4"
|
|
|
1251
1251
|
"credentials",
|
|
1252
1252
|
"_users",
|
|
1253
1253
|
"validateInput",
|
|
1254
|
-
"
|
|
1254
|
+
"validateOutputs",
|
|
1255
1255
|
"outputs",
|
|
1256
|
-
"
|
|
1256
|
+
"contextModes",
|
|
1257
|
+
"outputReturnProperties",
|
|
1257
1258
|
...ue
|
|
1258
1259
|
]);
|
|
1259
1260
|
function Oe(e) {
|
|
@@ -1393,10 +1394,10 @@ const We = V({
|
|
|
1393
1394
|
NodeRedInputLabel: k,
|
|
1394
1395
|
NodeRedToggle: P,
|
|
1395
1396
|
NodeRedInput: W,
|
|
1396
|
-
NodeRedSelectInput:
|
|
1397
|
+
NodeRedSelectInput: M,
|
|
1397
1398
|
NodeRedTypedInput: B,
|
|
1398
1399
|
NodeRedConfigInput: U,
|
|
1399
|
-
NodeRedEditorInput:
|
|
1400
|
+
NodeRedEditorInput: F
|
|
1400
1401
|
},
|
|
1401
1402
|
props: {
|
|
1402
1403
|
node: {
|
|
@@ -1453,7 +1454,7 @@ const We = V({
|
|
|
1453
1454
|
return n;
|
|
1454
1455
|
}
|
|
1455
1456
|
}
|
|
1456
|
-
}), Be = { key: 1 }, Ue = { key: 2 },
|
|
1457
|
+
}), Be = { key: 1 }, Ue = { key: 2 }, Me = ["checked", "onChange"], Fe = { key: 6 }, Pe = ["value", "onInput"], ze = {
|
|
1457
1458
|
key: 0,
|
|
1458
1459
|
class: "node-red-vue-input-error-message"
|
|
1459
1460
|
};
|
|
@@ -1477,14 +1478,14 @@ function He(e, t, n, r, s, d) {
|
|
|
1477
1478
|
required: o.required,
|
|
1478
1479
|
error: e.errors[`node.${o.key}`]
|
|
1479
1480
|
}, null, 8, ["value", "onUpdate:value", "type", "label", "icon", "required", "error"])) : o.inputType === "boolean" && o.toggle ? (l(), c("div", Be, [
|
|
1480
|
-
|
|
1481
|
+
R(h, {
|
|
1481
1482
|
"model-value": e.node[o.key],
|
|
1482
1483
|
label: o.label,
|
|
1483
1484
|
icon: o.icon,
|
|
1484
1485
|
"onUpdate:modelValue": (p) => e.node[o.key] = p
|
|
1485
1486
|
}, null, 8, ["model-value", "label", "icon", "onUpdate:modelValue"])
|
|
1486
1487
|
])) : o.inputType === "boolean" ? (l(), c("div", Ue, [
|
|
1487
|
-
|
|
1488
|
+
R(b, {
|
|
1488
1489
|
label: o.label,
|
|
1489
1490
|
icon: o.icon,
|
|
1490
1491
|
required: o.required
|
|
@@ -1496,7 +1497,7 @@ function He(e, t, n, r, s, d) {
|
|
|
1496
1497
|
onChange: (p) => {
|
|
1497
1498
|
e.node[o.key] = p.target.checked;
|
|
1498
1499
|
}
|
|
1499
|
-
}, null, 40,
|
|
1500
|
+
}, null, 40, Me)
|
|
1500
1501
|
])) : o.inputType === "select" ? (l(), v(i, {
|
|
1501
1502
|
key: 3,
|
|
1502
1503
|
value: e.node[o.key],
|
|
@@ -1527,8 +1528,8 @@ function He(e, t, n, r, s, d) {
|
|
|
1527
1528
|
icon: o.icon,
|
|
1528
1529
|
required: o.required,
|
|
1529
1530
|
error: e.errors[`node.${o.key}`]
|
|
1530
|
-
}, null, 8, ["value", "onUpdate:value", "type", "node", "prop-name", "label", "icon", "required", "error"])) : o.inputType === "array-text" ? (l(), c("div",
|
|
1531
|
-
|
|
1531
|
+
}, null, 8, ["value", "onUpdate:value", "type", "node", "prop-name", "label", "icon", "required", "error"])) : o.inputType === "array-text" ? (l(), c("div", Fe, [
|
|
1532
|
+
R(b, {
|
|
1532
1533
|
label: o.label,
|
|
1533
1534
|
icon: o.icon,
|
|
1534
1535
|
required: o.required
|
|
@@ -1576,7 +1577,7 @@ function He(e, t, n, r, s, d) {
|
|
|
1576
1577
|
key: `cred-${o.key}`,
|
|
1577
1578
|
class: "form-row"
|
|
1578
1579
|
}, [
|
|
1579
|
-
|
|
1580
|
+
R(a, {
|
|
1580
1581
|
value: e.node.credentials[o.key],
|
|
1581
1582
|
"onUpdate:value": (p) => e.node.credentials[o.key] = p,
|
|
1582
1583
|
type: o.htmlType,
|
|
@@ -1599,8 +1600,8 @@ O.global.components = {
|
|
|
1599
1600
|
NodeRedInput: W,
|
|
1600
1601
|
NodeRedTypedInput: B,
|
|
1601
1602
|
NodeRedConfigInput: U,
|
|
1602
|
-
NodeRedSelectInput:
|
|
1603
|
-
NodeRedEditorInput:
|
|
1603
|
+
NodeRedSelectInput: M,
|
|
1604
|
+
NodeRedEditorInput: F,
|
|
1604
1605
|
NodeRedJsonSchemaForm: Je
|
|
1605
1606
|
};
|
|
1606
1607
|
window.$ = X();
|
package/test/client/e2e/index.js
CHANGED
|
@@ -1375,113 +1375,363 @@ function localesGenerator(options) {
|
|
|
1375
1375
|
];
|
|
1376
1376
|
const frameworkLabels = {
|
|
1377
1377
|
"en-US": {
|
|
1378
|
-
configs: { name: "Name"
|
|
1378
|
+
configs: { name: "Name" },
|
|
1379
1379
|
toggles: {
|
|
1380
|
-
validateInput: "Validate
|
|
1381
|
-
validateOutput: "Validate Output",
|
|
1380
|
+
validateInput: "Validate",
|
|
1382
1381
|
errorPort: "Error Port",
|
|
1383
1382
|
completePort: "Complete Port",
|
|
1384
|
-
statusPort: "Status Port"
|
|
1385
|
-
|
|
1383
|
+
statusPort: "Status Port"
|
|
1384
|
+
},
|
|
1385
|
+
sections: {
|
|
1386
|
+
portsSettings: "Ports Settings",
|
|
1387
|
+
input: "Input",
|
|
1388
|
+
outputs: "Outputs",
|
|
1389
|
+
lifecyclePorts: "Lifecycle Ports"
|
|
1390
|
+
},
|
|
1391
|
+
outputs: {
|
|
1392
|
+
port: "Port",
|
|
1393
|
+
label: "Label",
|
|
1394
|
+
validate: "Validate",
|
|
1395
|
+
returnProperty: "Return Property",
|
|
1396
|
+
contextMode: "Context Mode"
|
|
1397
|
+
},
|
|
1398
|
+
contextModes: {
|
|
1399
|
+
modes: {
|
|
1400
|
+
default: "Default",
|
|
1401
|
+
carry: "carry",
|
|
1402
|
+
trace: "trace",
|
|
1403
|
+
reset: "reset"
|
|
1404
|
+
}
|
|
1405
|
+
},
|
|
1406
|
+
help: {
|
|
1407
|
+
validateInput: "Validate incoming messages against the input schema before input() runs.",
|
|
1408
|
+
outputs: "Per-port output settings. Validate checks the sent value against the port's schema; Context Mode controls how the incoming message is carried.",
|
|
1409
|
+
lifecyclePorts: "Optional extra output ports that fire on error, on completion, and on every status change.",
|
|
1410
|
+
learnMore: "Learn more"
|
|
1386
1411
|
}
|
|
1387
1412
|
},
|
|
1388
1413
|
de: {
|
|
1389
|
-
configs: { name: "Name"
|
|
1414
|
+
configs: { name: "Name" },
|
|
1390
1415
|
toggles: {
|
|
1391
|
-
validateInput: "
|
|
1392
|
-
validateOutput: "Ausgabe validieren",
|
|
1416
|
+
validateInput: "Validieren",
|
|
1393
1417
|
errorPort: "Fehler-Port",
|
|
1394
1418
|
completePort: "Abschluss-Port",
|
|
1395
|
-
statusPort: "Status-Port"
|
|
1396
|
-
|
|
1419
|
+
statusPort: "Status-Port"
|
|
1420
|
+
},
|
|
1421
|
+
sections: {
|
|
1422
|
+
portsSettings: "Port-Einstellungen",
|
|
1423
|
+
input: "Eingang",
|
|
1424
|
+
outputs: "Ausg\xE4nge",
|
|
1425
|
+
lifecyclePorts: "Lebenszyklus-Ports"
|
|
1426
|
+
},
|
|
1427
|
+
outputs: {
|
|
1428
|
+
port: "Port",
|
|
1429
|
+
label: "Bezeichnung",
|
|
1430
|
+
validate: "Validieren",
|
|
1431
|
+
returnProperty: "R\xFCckgabe-Eigenschaft",
|
|
1432
|
+
contextMode: "Kontextmodus"
|
|
1433
|
+
},
|
|
1434
|
+
contextModes: {
|
|
1435
|
+
modes: {
|
|
1436
|
+
default: "Standard",
|
|
1437
|
+
carry: "carry",
|
|
1438
|
+
trace: "trace",
|
|
1439
|
+
reset: "reset"
|
|
1440
|
+
}
|
|
1441
|
+
},
|
|
1442
|
+
help: {
|
|
1443
|
+
validateInput: "Eingehende Nachrichten vor dem Ausf\xFChren von input() gegen das Eingabe-Schema validieren.",
|
|
1444
|
+
outputs: "Ausgabe-Einstellungen pro Port. Validieren pr\xFCft den gesendeten Wert gegen das Schema des Ports; Kontextmodus steuert, wie die eingehende Nachricht \xFCbertragen wird.",
|
|
1445
|
+
lifecyclePorts: "Optionale zus\xE4tzliche Ausg\xE4nge, die bei Fehler, Abschluss und jeder Status\xE4nderung ausl\xF6sen.",
|
|
1446
|
+
learnMore: "Mehr erfahren"
|
|
1397
1447
|
}
|
|
1398
1448
|
},
|
|
1399
1449
|
"es-ES": {
|
|
1400
|
-
configs: { name: "Nombre"
|
|
1450
|
+
configs: { name: "Nombre" },
|
|
1401
1451
|
toggles: {
|
|
1402
|
-
validateInput: "Validar
|
|
1403
|
-
validateOutput: "Validar salida",
|
|
1452
|
+
validateInput: "Validar",
|
|
1404
1453
|
errorPort: "Puerto de error",
|
|
1405
1454
|
completePort: "Puerto de completado",
|
|
1406
|
-
statusPort: "Puerto de estado"
|
|
1407
|
-
|
|
1455
|
+
statusPort: "Puerto de estado"
|
|
1456
|
+
},
|
|
1457
|
+
sections: {
|
|
1458
|
+
portsSettings: "Configuraci\xF3n de puertos",
|
|
1459
|
+
input: "Entrada",
|
|
1460
|
+
outputs: "Salidas",
|
|
1461
|
+
lifecyclePorts: "Puertos de ciclo de vida"
|
|
1462
|
+
},
|
|
1463
|
+
outputs: {
|
|
1464
|
+
port: "Puerto",
|
|
1465
|
+
label: "Etiqueta",
|
|
1466
|
+
validate: "Validar",
|
|
1467
|
+
returnProperty: "Propiedad de retorno",
|
|
1468
|
+
contextMode: "Modo de contexto"
|
|
1469
|
+
},
|
|
1470
|
+
contextModes: {
|
|
1471
|
+
modes: {
|
|
1472
|
+
default: "Predeterminado",
|
|
1473
|
+
carry: "carry",
|
|
1474
|
+
trace: "trace",
|
|
1475
|
+
reset: "reset"
|
|
1476
|
+
}
|
|
1477
|
+
},
|
|
1478
|
+
help: {
|
|
1479
|
+
validateInput: "Valida los mensajes entrantes con el esquema de entrada antes de ejecutar input().",
|
|
1480
|
+
outputs: "Ajustes de salida por puerto. Validar comprueba el valor enviado con el esquema del puerto; Modo de contexto controla c\xF3mo se transporta el mensaje entrante.",
|
|
1481
|
+
lifecyclePorts: "Puertos de salida adicionales opcionales que se activan en error, al completar y en cada cambio de estado.",
|
|
1482
|
+
learnMore: "M\xE1s informaci\xF3n"
|
|
1408
1483
|
}
|
|
1409
1484
|
},
|
|
1410
1485
|
fr: {
|
|
1411
|
-
configs: { name: "Nom"
|
|
1486
|
+
configs: { name: "Nom" },
|
|
1412
1487
|
toggles: {
|
|
1413
|
-
validateInput: "Valider
|
|
1414
|
-
validateOutput: "Valider la sortie",
|
|
1488
|
+
validateInput: "Valider",
|
|
1415
1489
|
errorPort: "Port d'erreur",
|
|
1416
1490
|
completePort: "Port de compl\xE9tion",
|
|
1417
|
-
statusPort: "Port de statut"
|
|
1418
|
-
|
|
1491
|
+
statusPort: "Port de statut"
|
|
1492
|
+
},
|
|
1493
|
+
sections: {
|
|
1494
|
+
portsSettings: "Param\xE8tres des ports",
|
|
1495
|
+
input: "Entr\xE9e",
|
|
1496
|
+
outputs: "Sorties",
|
|
1497
|
+
lifecyclePorts: "Ports de cycle de vie"
|
|
1498
|
+
},
|
|
1499
|
+
outputs: {
|
|
1500
|
+
port: "Port",
|
|
1501
|
+
label: "Libell\xE9",
|
|
1502
|
+
validate: "Valider",
|
|
1503
|
+
returnProperty: "Propri\xE9t\xE9 de retour",
|
|
1504
|
+
contextMode: "Mode de contexte"
|
|
1505
|
+
},
|
|
1506
|
+
contextModes: {
|
|
1507
|
+
modes: {
|
|
1508
|
+
default: "Par d\xE9faut",
|
|
1509
|
+
carry: "carry",
|
|
1510
|
+
trace: "trace",
|
|
1511
|
+
reset: "reset"
|
|
1512
|
+
}
|
|
1513
|
+
},
|
|
1514
|
+
help: {
|
|
1515
|
+
validateInput: "Valide les messages entrants avec le sch\xE9ma d'entr\xE9e avant l'ex\xE9cution de input().",
|
|
1516
|
+
outputs: "R\xE9glages de sortie par port. Valider v\xE9rifie la valeur envoy\xE9e avec le sch\xE9ma du port ; Mode de contexte contr\xF4le la fa\xE7on dont le message entrant est transmis.",
|
|
1517
|
+
lifecyclePorts: "Ports de sortie suppl\xE9mentaires optionnels d\xE9clench\xE9s en cas d'erreur, \xE0 la fin et \xE0 chaque changement de statut.",
|
|
1518
|
+
learnMore: "En savoir plus"
|
|
1419
1519
|
}
|
|
1420
1520
|
},
|
|
1421
1521
|
ko: {
|
|
1422
|
-
configs: { name: "\uC774\uB984"
|
|
1522
|
+
configs: { name: "\uC774\uB984" },
|
|
1423
1523
|
toggles: {
|
|
1424
|
-
validateInput: "\
|
|
1425
|
-
validateOutput: "\uCD9C\uB825 \uAC80\uC99D",
|
|
1524
|
+
validateInput: "\uAC80\uC99D",
|
|
1426
1525
|
errorPort: "\uC624\uB958 \uD3EC\uD2B8",
|
|
1427
1526
|
completePort: "\uC644\uB8CC \uD3EC\uD2B8",
|
|
1428
|
-
statusPort: "\uC0C1\uD0DC \uD3EC\uD2B8"
|
|
1429
|
-
|
|
1527
|
+
statusPort: "\uC0C1\uD0DC \uD3EC\uD2B8"
|
|
1528
|
+
},
|
|
1529
|
+
sections: {
|
|
1530
|
+
portsSettings: "\uD3EC\uD2B8 \uC124\uC815",
|
|
1531
|
+
input: "\uC785\uB825",
|
|
1532
|
+
outputs: "\uCD9C\uB825",
|
|
1533
|
+
lifecyclePorts: "\uC218\uBA85 \uC8FC\uAE30 \uD3EC\uD2B8"
|
|
1534
|
+
},
|
|
1535
|
+
outputs: {
|
|
1536
|
+
port: "\uD3EC\uD2B8",
|
|
1537
|
+
label: "\uB808\uC774\uBE14",
|
|
1538
|
+
validate: "\uAC80\uC99D",
|
|
1539
|
+
returnProperty: "\uBC18\uD658 \uC18D\uC131",
|
|
1540
|
+
contextMode: "\uCEE8\uD14D\uC2A4\uD2B8 \uBAA8\uB4DC"
|
|
1541
|
+
},
|
|
1542
|
+
contextModes: {
|
|
1543
|
+
modes: {
|
|
1544
|
+
default: "\uAE30\uBCF8\uAC12",
|
|
1545
|
+
carry: "carry",
|
|
1546
|
+
trace: "trace",
|
|
1547
|
+
reset: "reset"
|
|
1548
|
+
}
|
|
1549
|
+
},
|
|
1550
|
+
help: {
|
|
1551
|
+
validateInput: "input() \uC2E4\uD589 \uC804\uC5D0 \uB4E4\uC5B4\uC624\uB294 \uBA54\uC2DC\uC9C0\uB97C \uC785\uB825 \uC2A4\uD0A4\uB9C8\uB85C \uAC80\uC99D\uD569\uB2C8\uB2E4.",
|
|
1552
|
+
outputs: "\uD3EC\uD2B8\uBCC4 \uCD9C\uB825 \uC124\uC815. \uAC80\uC99D\uC740 \uC804\uC1A1 \uAC12\uC744 \uD3EC\uD2B8 \uC2A4\uD0A4\uB9C8\uB85C \uD655\uC778\uD558\uACE0, \uCEE8\uD14D\uC2A4\uD2B8 \uBAA8\uB4DC\uB294 \uB4E4\uC5B4\uC628 \uBA54\uC2DC\uC9C0\uB97C \uC804\uB2EC\uD558\uB294 \uBC29\uC2DD\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.",
|
|
1553
|
+
lifecyclePorts: "\uC624\uB958, \uC644\uB8CC, \uBAA8\uB4E0 \uC0C1\uD0DC \uBCC0\uACBD \uC2DC \uBC1C\uC0DD\uD558\uB294 \uC120\uD0DD\uC801 \uCD94\uAC00 \uCD9C\uB825 \uD3EC\uD2B8\uC785\uB2C8\uB2E4.",
|
|
1554
|
+
learnMore: "\uC790\uC138\uD788 \uBCF4\uAE30"
|
|
1430
1555
|
}
|
|
1431
1556
|
},
|
|
1432
1557
|
"pt-BR": {
|
|
1433
|
-
configs: { name: "Nome"
|
|
1558
|
+
configs: { name: "Nome" },
|
|
1434
1559
|
toggles: {
|
|
1435
|
-
validateInput: "Validar
|
|
1436
|
-
validateOutput: "Validar Sa\xEDda",
|
|
1560
|
+
validateInput: "Validar",
|
|
1437
1561
|
errorPort: "Porta de Erro",
|
|
1438
1562
|
completePort: "Porta de Conclus\xE3o",
|
|
1439
|
-
statusPort: "Porta de Status"
|
|
1440
|
-
|
|
1563
|
+
statusPort: "Porta de Status"
|
|
1564
|
+
},
|
|
1565
|
+
sections: {
|
|
1566
|
+
portsSettings: "Configura\xE7\xF5es de portas",
|
|
1567
|
+
input: "Entrada",
|
|
1568
|
+
outputs: "Sa\xEDdas",
|
|
1569
|
+
lifecyclePorts: "Portas de ciclo de vida"
|
|
1570
|
+
},
|
|
1571
|
+
outputs: {
|
|
1572
|
+
port: "Porta",
|
|
1573
|
+
label: "R\xF3tulo",
|
|
1574
|
+
validate: "Validar",
|
|
1575
|
+
returnProperty: "Propriedade de retorno",
|
|
1576
|
+
contextMode: "Modo de contexto"
|
|
1577
|
+
},
|
|
1578
|
+
contextModes: {
|
|
1579
|
+
modes: {
|
|
1580
|
+
default: "Padr\xE3o",
|
|
1581
|
+
carry: "carry",
|
|
1582
|
+
trace: "trace",
|
|
1583
|
+
reset: "reset"
|
|
1584
|
+
}
|
|
1585
|
+
},
|
|
1586
|
+
help: {
|
|
1587
|
+
validateInput: "Valida as mensagens recebidas com o esquema de entrada antes de input() executar.",
|
|
1588
|
+
outputs: "Configura\xE7\xF5es de sa\xEDda por porta. Validar verifica o valor enviado com o esquema da porta; Modo de contexto controla como a mensagem recebida \xE9 transportada.",
|
|
1589
|
+
lifecyclePorts: "Portas de sa\xEDda extras opcionais que disparam em erro, na conclus\xE3o e a cada mudan\xE7a de status.",
|
|
1590
|
+
learnMore: "Saiba mais"
|
|
1441
1591
|
}
|
|
1442
1592
|
},
|
|
1443
1593
|
ru: {
|
|
1444
|
-
configs: { name: "\u0418\u043C\u044F"
|
|
1594
|
+
configs: { name: "\u0418\u043C\u044F" },
|
|
1445
1595
|
toggles: {
|
|
1446
|
-
validateInput: "\u041F\u0440\u043E\u0432\u0435\u0440\
|
|
1447
|
-
validateOutput: "\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0432\u044B\u0445\u043E\u0434",
|
|
1596
|
+
validateInput: "\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0442\u044C",
|
|
1448
1597
|
errorPort: "\u041F\u043E\u0440\u0442 \u043E\u0448\u0438\u0431\u043A\u0438",
|
|
1449
1598
|
completePort: "\u041F\u043E\u0440\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F",
|
|
1450
|
-
statusPort: "\u041F\u043E\u0440\u0442 \u0441\u0442\u0430\u0442\u0443\u0441\u0430"
|
|
1451
|
-
|
|
1599
|
+
statusPort: "\u041F\u043E\u0440\u0442 \u0441\u0442\u0430\u0442\u0443\u0441\u0430"
|
|
1600
|
+
},
|
|
1601
|
+
sections: {
|
|
1602
|
+
portsSettings: "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043F\u043E\u0440\u0442\u043E\u0432",
|
|
1603
|
+
input: "\u0412\u0445\u043E\u0434",
|
|
1604
|
+
outputs: "\u0412\u044B\u0445\u043E\u0434\u044B",
|
|
1605
|
+
lifecyclePorts: "\u041F\u043E\u0440\u0442\u044B \u0436\u0438\u0437\u043D\u0435\u043D\u043D\u043E\u0433\u043E \u0446\u0438\u043A\u043B\u0430"
|
|
1606
|
+
},
|
|
1607
|
+
outputs: {
|
|
1608
|
+
port: "\u041F\u043E\u0440\u0442",
|
|
1609
|
+
label: "\u041C\u0435\u0442\u043A\u0430",
|
|
1610
|
+
validate: "\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0442\u044C",
|
|
1611
|
+
returnProperty: "\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u043E \u0432\u043E\u0437\u0432\u0440\u0430\u0442\u0430",
|
|
1612
|
+
contextMode: "\u0420\u0435\u0436\u0438\u043C \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0430"
|
|
1613
|
+
},
|
|
1614
|
+
contextModes: {
|
|
1615
|
+
modes: {
|
|
1616
|
+
default: "\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E",
|
|
1617
|
+
carry: "carry",
|
|
1618
|
+
trace: "trace",
|
|
1619
|
+
reset: "reset"
|
|
1620
|
+
}
|
|
1621
|
+
},
|
|
1622
|
+
help: {
|
|
1623
|
+
validateInput: "\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0442\u044C \u0432\u0445\u043E\u0434\u044F\u0449\u0438\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043F\u043E \u0441\u0445\u0435\u043C\u0435 \u0432\u0432\u043E\u0434\u0430 \u043F\u0435\u0440\u0435\u0434 \u0432\u044B\u0437\u043E\u0432\u043E\u043C input().",
|
|
1624
|
+
outputs: "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0432\u044B\u0432\u043E\u0434\u0430 \u0434\u043B\u044F \u043A\u0430\u0436\u0434\u043E\u0433\u043E \u043F\u043E\u0440\u0442\u0430. \xAB\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0442\u044C\xBB \u0441\u0432\u0435\u0440\u044F\u0435\u0442 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0441\u043E \u0441\u0445\u0435\u043C\u043E\u0439 \u043F\u043E\u0440\u0442\u0430; \xAB\u0420\u0435\u0436\u0438\u043C \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0430\xBB \u0443\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0442\u0435\u043C, \u043A\u0430\u043A \u043F\u0435\u0440\u0435\u043D\u043E\u0441\u0438\u0442\u0441\u044F \u0432\u0445\u043E\u0434\u044F\u0449\u0435\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435.",
|
|
1625
|
+
lifecyclePorts: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u043D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0432\u044B\u0445\u043E\u0434\u043D\u044B\u0435 \u043F\u043E\u0440\u0442\u044B, \u0441\u0440\u0430\u0431\u0430\u0442\u044B\u0432\u0430\u044E\u0449\u0438\u0435 \u043F\u0440\u0438 \u043E\u0448\u0438\u0431\u043A\u0435, \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u0438 \u0438 \u043A\u0430\u0436\u0434\u043E\u043C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0430.",
|
|
1626
|
+
learnMore: "\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435"
|
|
1452
1627
|
}
|
|
1453
1628
|
},
|
|
1454
1629
|
ja: {
|
|
1455
|
-
configs: { name: "\u540D\u524D"
|
|
1630
|
+
configs: { name: "\u540D\u524D" },
|
|
1456
1631
|
toggles: {
|
|
1457
|
-
validateInput: "\
|
|
1458
|
-
validateOutput: "\u51FA\u529B\u691C\u8A3C",
|
|
1632
|
+
validateInput: "\u691C\u8A3C",
|
|
1459
1633
|
errorPort: "\u30A8\u30E9\u30FC\u30DD\u30FC\u30C8",
|
|
1460
1634
|
completePort: "\u5B8C\u4E86\u30DD\u30FC\u30C8",
|
|
1461
|
-
statusPort: "\u30B9\u30C6\u30FC\u30BF\u30B9\u30DD\u30FC\u30C8"
|
|
1462
|
-
|
|
1635
|
+
statusPort: "\u30B9\u30C6\u30FC\u30BF\u30B9\u30DD\u30FC\u30C8"
|
|
1636
|
+
},
|
|
1637
|
+
sections: {
|
|
1638
|
+
portsSettings: "\u30DD\u30FC\u30C8\u8A2D\u5B9A",
|
|
1639
|
+
input: "\u5165\u529B",
|
|
1640
|
+
outputs: "\u51FA\u529B",
|
|
1641
|
+
lifecyclePorts: "\u30E9\u30A4\u30D5\u30B5\u30A4\u30AF\u30EB\u30DD\u30FC\u30C8"
|
|
1642
|
+
},
|
|
1643
|
+
outputs: {
|
|
1644
|
+
port: "\u30DD\u30FC\u30C8",
|
|
1645
|
+
label: "\u30E9\u30D9\u30EB",
|
|
1646
|
+
validate: "\u691C\u8A3C",
|
|
1647
|
+
returnProperty: "\u623B\u308A\u30D7\u30ED\u30D1\u30C6\u30A3",
|
|
1648
|
+
contextMode: "\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30E2\u30FC\u30C9"
|
|
1649
|
+
},
|
|
1650
|
+
contextModes: {
|
|
1651
|
+
modes: {
|
|
1652
|
+
default: "\u30C7\u30D5\u30A9\u30EB\u30C8",
|
|
1653
|
+
carry: "carry",
|
|
1654
|
+
trace: "trace",
|
|
1655
|
+
reset: "reset"
|
|
1656
|
+
}
|
|
1657
|
+
},
|
|
1658
|
+
help: {
|
|
1659
|
+
validateInput: "input() \u306E\u5B9F\u884C\u524D\u306B\u3001\u53D7\u4FE1\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u5165\u529B\u30B9\u30AD\u30FC\u30DE\u3067\u691C\u8A3C\u3057\u307E\u3059\u3002",
|
|
1660
|
+
outputs: "\u30DD\u30FC\u30C8\u3054\u3068\u306E\u51FA\u529B\u8A2D\u5B9A\u3002\u691C\u8A3C\u306F\u9001\u4FE1\u5024\u3092\u30DD\u30FC\u30C8\u306E\u30B9\u30AD\u30FC\u30DE\u3067\u78BA\u8A8D\u3057\u3001\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30E2\u30FC\u30C9\u306F\u53D7\u4FE1\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u5F15\u304D\u7D99\u304E\u65B9\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002",
|
|
1661
|
+
lifecyclePorts: "\u30A8\u30E9\u30FC\u6642\u30FB\u5B8C\u4E86\u6642\u30FB\u30B9\u30C6\u30FC\u30BF\u30B9\u5909\u66F4\u3054\u3068\u306B\u767A\u706B\u3059\u308B\u4EFB\u610F\u306E\u8FFD\u52A0\u51FA\u529B\u30DD\u30FC\u30C8\u3002",
|
|
1662
|
+
learnMore: "\u8A73\u7D30"
|
|
1463
1663
|
}
|
|
1464
1664
|
},
|
|
1465
1665
|
"zh-CN": {
|
|
1466
|
-
configs: { name: "\u540D\u79F0"
|
|
1666
|
+
configs: { name: "\u540D\u79F0" },
|
|
1467
1667
|
toggles: {
|
|
1468
|
-
validateInput: "\u9A8C\u8BC1
|
|
1469
|
-
validateOutput: "\u9A8C\u8BC1\u8F93\u51FA",
|
|
1668
|
+
validateInput: "\u9A8C\u8BC1",
|
|
1470
1669
|
errorPort: "\u9519\u8BEF\u7AEF\u53E3",
|
|
1471
1670
|
completePort: "\u5B8C\u6210\u7AEF\u53E3",
|
|
1472
|
-
statusPort: "\u72B6\u6001\u7AEF\u53E3"
|
|
1473
|
-
|
|
1671
|
+
statusPort: "\u72B6\u6001\u7AEF\u53E3"
|
|
1672
|
+
},
|
|
1673
|
+
sections: {
|
|
1674
|
+
portsSettings: "\u7AEF\u53E3\u8BBE\u7F6E",
|
|
1675
|
+
input: "\u8F93\u5165",
|
|
1676
|
+
outputs: "\u8F93\u51FA",
|
|
1677
|
+
lifecyclePorts: "\u751F\u547D\u5468\u671F\u7AEF\u53E3"
|
|
1678
|
+
},
|
|
1679
|
+
outputs: {
|
|
1680
|
+
port: "\u7AEF\u53E3",
|
|
1681
|
+
label: "\u6807\u7B7E",
|
|
1682
|
+
validate: "\u9A8C\u8BC1",
|
|
1683
|
+
returnProperty: "\u8FD4\u56DE\u5C5E\u6027",
|
|
1684
|
+
contextMode: "\u4E0A\u4E0B\u6587\u6A21\u5F0F"
|
|
1685
|
+
},
|
|
1686
|
+
contextModes: {
|
|
1687
|
+
modes: {
|
|
1688
|
+
default: "\u9ED8\u8BA4",
|
|
1689
|
+
carry: "carry",
|
|
1690
|
+
trace: "trace",
|
|
1691
|
+
reset: "reset"
|
|
1692
|
+
}
|
|
1693
|
+
},
|
|
1694
|
+
help: {
|
|
1695
|
+
validateInput: "\u5728 input() \u8FD0\u884C\u524D\uFF0C\u6839\u636E\u8F93\u5165\u6A21\u5F0F\u6821\u9A8C\u4F20\u5165\u6D88\u606F\u3002",
|
|
1696
|
+
outputs: "\u6309\u7AEF\u53E3\u7684\u8F93\u51FA\u8BBE\u7F6E\u3002\u9A8C\u8BC1\u6839\u636E\u7AEF\u53E3\u6A21\u5F0F\u6821\u9A8C\u53D1\u9001\u7684\u503C\uFF1B\u4E0A\u4E0B\u6587\u6A21\u5F0F\u63A7\u5236\u5982\u4F55\u643A\u5E26\u4F20\u5165\u6D88\u606F\u3002",
|
|
1697
|
+
lifecyclePorts: "\u53EF\u9009\u7684\u989D\u5916\u8F93\u51FA\u7AEF\u53E3\uFF0C\u5728\u51FA\u9519\u3001\u5B8C\u6210\u4EE5\u53CA\u6BCF\u6B21\u72B6\u6001\u53D8\u5316\u65F6\u89E6\u53D1\u3002",
|
|
1698
|
+
learnMore: "\u4E86\u89E3\u66F4\u591A"
|
|
1474
1699
|
}
|
|
1475
1700
|
},
|
|
1476
1701
|
"zh-TW": {
|
|
1477
|
-
configs: { name: "\u540D\u7A31"
|
|
1702
|
+
configs: { name: "\u540D\u7A31" },
|
|
1478
1703
|
toggles: {
|
|
1479
|
-
validateInput: "\u9A57\u8B49
|
|
1480
|
-
validateOutput: "\u9A57\u8B49\u8F38\u51FA",
|
|
1704
|
+
validateInput: "\u9A57\u8B49",
|
|
1481
1705
|
errorPort: "\u932F\u8AA4\u7AEF\u53E3",
|
|
1482
1706
|
completePort: "\u5B8C\u6210\u7AEF\u53E3",
|
|
1483
|
-
statusPort: "\u72C0\u614B\u7AEF\u53E3"
|
|
1484
|
-
|
|
1707
|
+
statusPort: "\u72C0\u614B\u7AEF\u53E3"
|
|
1708
|
+
},
|
|
1709
|
+
sections: {
|
|
1710
|
+
portsSettings: "\u7AEF\u53E3\u8A2D\u5B9A",
|
|
1711
|
+
input: "\u8F38\u5165",
|
|
1712
|
+
outputs: "\u8F38\u51FA",
|
|
1713
|
+
lifecyclePorts: "\u751F\u547D\u9031\u671F\u7AEF\u53E3"
|
|
1714
|
+
},
|
|
1715
|
+
outputs: {
|
|
1716
|
+
port: "\u7AEF\u53E3",
|
|
1717
|
+
label: "\u6A19\u7C64",
|
|
1718
|
+
validate: "\u9A57\u8B49",
|
|
1719
|
+
returnProperty: "\u8FD4\u56DE\u5C6C\u6027",
|
|
1720
|
+
contextMode: "\u5167\u5BB9\u6A21\u5F0F"
|
|
1721
|
+
},
|
|
1722
|
+
contextModes: {
|
|
1723
|
+
modes: {
|
|
1724
|
+
default: "\u9810\u8A2D",
|
|
1725
|
+
carry: "carry",
|
|
1726
|
+
trace: "trace",
|
|
1727
|
+
reset: "reset"
|
|
1728
|
+
}
|
|
1729
|
+
},
|
|
1730
|
+
help: {
|
|
1731
|
+
validateInput: "\u5728 input() \u57F7\u884C\u524D\uFF0C\u4F9D\u8F38\u5165\u7D50\u69CB\u63CF\u8FF0\u9A57\u8B49\u50B3\u5165\u8A0A\u606F\u3002",
|
|
1732
|
+
outputs: "\u4F9D\u9023\u63A5\u57E0\u7684\u8F38\u51FA\u8A2D\u5B9A\u3002\u9A57\u8B49\u4F9D\u9023\u63A5\u57E0\u7D50\u69CB\u63CF\u8FF0\u6AA2\u67E5\u9001\u51FA\u7684\u503C\uFF1B\u5167\u5BB9\u6A21\u5F0F\u63A7\u5236\u5982\u4F55\u651C\u5E36\u50B3\u5165\u8A0A\u606F\u3002",
|
|
1733
|
+
lifecyclePorts: "\u53EF\u9078\u7684\u984D\u5916\u8F38\u51FA\u9023\u63A5\u57E0\uFF0C\u5728\u767C\u751F\u932F\u8AA4\u3001\u5B8C\u6210\u4EE5\u53CA\u6BCF\u6B21\u72C0\u614B\u8B8A\u66F4\u6642\u89F8\u767C\u3002",
|
|
1734
|
+
learnMore: "\u77AD\u89E3\u66F4\u591A"
|
|
1485
1735
|
}
|
|
1486
1736
|
}
|
|
1487
1737
|
};
|
|
@@ -1688,7 +1938,8 @@ function nodeDefinitionsInliner(serverOutDir, entryPath, iconsDir, componentsDir
|
|
|
1688
1938
|
defaults.validateInput = { required: false, value: false };
|
|
1689
1939
|
}
|
|
1690
1940
|
if (defaults && outputsSchema) {
|
|
1691
|
-
defaults.
|
|
1941
|
+
defaults.validateOutputs = { required: false, value: {} };
|
|
1942
|
+
defaults.contextModes = { required: false, value: {} };
|
|
1692
1943
|
}
|
|
1693
1944
|
const credentials = getCredentialsFromSchema(credentialsSchema);
|
|
1694
1945
|
_definitions[type] = {
|
|
@@ -2697,7 +2948,10 @@ var NodeRedEditor = class {
|
|
|
2697
2948
|
this.page = page;
|
|
2698
2949
|
this.port = port;
|
|
2699
2950
|
this.screenshotDir = options?.screenshotDir ?? "test-results/screenshots";
|
|
2700
|
-
page.on("pageerror", (err) =>
|
|
2951
|
+
page.on("pageerror", (err) => {
|
|
2952
|
+
if (err.message.includes("ResizeObserver")) return;
|
|
2953
|
+
this.errors.push(err.message);
|
|
2954
|
+
});
|
|
2701
2955
|
}
|
|
2702
2956
|
errors = [];
|
|
2703
2957
|
screenshotDir;
|
|
@@ -2940,6 +3194,7 @@ var NodeRedField = class {
|
|
|
2940
3194
|
return this.row.locator(".nrg-toggle__slider");
|
|
2941
3195
|
}
|
|
2942
3196
|
async toggle() {
|
|
3197
|
+
await this.toggleSlider.scrollIntoViewIfNeeded();
|
|
2943
3198
|
await this.toggleSlider.click();
|
|
2944
3199
|
}
|
|
2945
3200
|
get checkbox() {
|
package/types/client.d.ts
CHANGED
|
@@ -96,14 +96,19 @@ export interface NodeRedNode {
|
|
|
96
96
|
outputs?: number;
|
|
97
97
|
/** injected when the node has an inputSchema */
|
|
98
98
|
validateInput?: boolean;
|
|
99
|
-
/** injected when the node has an outputsSchema */
|
|
100
|
-
validateOutput?: boolean;
|
|
101
|
-
/** present when the node's configSchema declares SchemaType.ReturnProperty() */
|
|
102
|
-
returnProperty?: string;
|
|
103
99
|
/** built-in port toggles, present when declared in the configSchema */
|
|
104
100
|
errorPort?: boolean;
|
|
105
101
|
completePort?: boolean;
|
|
106
102
|
statusPort?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Per-port output settings, indexed by base-output port; injected (empty) when
|
|
105
|
+
* the node has an outputsSchema. Read at runtime by IONode.
|
|
106
|
+
* `outputReturnProperties` is author-declared (SchemaType.OutputReturnProperties)
|
|
107
|
+
* — present only when the node opts into per-port return keys.
|
|
108
|
+
*/
|
|
109
|
+
validateOutputs?: Record<number, boolean>;
|
|
110
|
+
contextModes?: Record<number, "carry" | "trace" | "reset">;
|
|
111
|
+
outputReturnProperties?: Record<number, string>;
|
|
107
112
|
[key: string]: any;
|
|
108
113
|
}
|
|
109
114
|
export interface NodeDefinition {
|
|
@@ -198,6 +203,14 @@ export interface NodeCredentials {
|
|
|
198
203
|
export interface NodeFeatures {
|
|
199
204
|
hasInputSchema: boolean;
|
|
200
205
|
hasOutputSchema: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Base output ports (excludes built-in error/complete/status), in port-index
|
|
208
|
+
* order. Drives the per-port context-mode rows in the Outputs subsection.
|
|
209
|
+
*/
|
|
210
|
+
outputPorts: {
|
|
211
|
+
index: number;
|
|
212
|
+
label: string;
|
|
213
|
+
}[];
|
|
201
214
|
}
|
|
202
215
|
/** Client-side representation of a TypedInput field: the raw value string and its type selector. */
|
|
203
216
|
export interface TypedInputValue {
|