@bonsae/nrg 0.20.1 → 0.21.1
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 +106 -86
- package/server/resources/nrg-client.js +2671 -2384
- package/test/client/component/setup.js +22 -21
- package/test/client/e2e/index.js +296 -52
- package/types/client.d.ts +18 -4
- package/types/server.d.ts +41 -24
- package/types/shims/client/types.d.ts +18 -4
- package/types/test-client-component.d.ts +10 -4
- package/types/test-client-unit.d.ts +10 -4
- package/vite/index.js +291 -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
|
+
"outputContextModes",
|
|
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,353 @@ 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
|
+
carry: "carry",
|
|
1401
|
+
trace: "trace",
|
|
1402
|
+
reset: "reset"
|
|
1403
|
+
}
|
|
1404
|
+
},
|
|
1405
|
+
help: {
|
|
1406
|
+
validateInput: "Validate incoming messages against the input schema before input() runs.",
|
|
1407
|
+
outputs: "Per-port output settings. Validate checks the sent value against the port's schema; Context Mode controls how the incoming message is carried.",
|
|
1408
|
+
lifecyclePorts: "Optional extra output ports that fire on error, on completion, and on every status change.",
|
|
1409
|
+
learnMore: "Learn more"
|
|
1386
1410
|
}
|
|
1387
1411
|
},
|
|
1388
1412
|
de: {
|
|
1389
|
-
configs: { name: "Name"
|
|
1413
|
+
configs: { name: "Name" },
|
|
1390
1414
|
toggles: {
|
|
1391
|
-
validateInput: "
|
|
1392
|
-
validateOutput: "Ausgabe validieren",
|
|
1415
|
+
validateInput: "Validieren",
|
|
1393
1416
|
errorPort: "Fehler-Port",
|
|
1394
1417
|
completePort: "Abschluss-Port",
|
|
1395
|
-
statusPort: "Status-Port"
|
|
1396
|
-
|
|
1418
|
+
statusPort: "Status-Port"
|
|
1419
|
+
},
|
|
1420
|
+
sections: {
|
|
1421
|
+
portsSettings: "Port-Einstellungen",
|
|
1422
|
+
input: "Eingang",
|
|
1423
|
+
outputs: "Ausg\xE4nge",
|
|
1424
|
+
lifecyclePorts: "Lebenszyklus-Ports"
|
|
1425
|
+
},
|
|
1426
|
+
outputs: {
|
|
1427
|
+
port: "Port",
|
|
1428
|
+
label: "Bezeichnung",
|
|
1429
|
+
validate: "Validieren",
|
|
1430
|
+
returnProperty: "R\xFCckgabe-Eigenschaft",
|
|
1431
|
+
contextMode: "Kontextmodus"
|
|
1432
|
+
},
|
|
1433
|
+
contextModes: {
|
|
1434
|
+
modes: {
|
|
1435
|
+
carry: "carry",
|
|
1436
|
+
trace: "trace",
|
|
1437
|
+
reset: "reset"
|
|
1438
|
+
}
|
|
1439
|
+
},
|
|
1440
|
+
help: {
|
|
1441
|
+
validateInput: "Eingehende Nachrichten vor dem Ausf\xFChren von input() gegen das Eingabe-Schema validieren.",
|
|
1442
|
+
outputs: "Ausgabe-Einstellungen pro Port. Validieren pr\xFCft den gesendeten Wert gegen das Schema des Ports; Kontextmodus steuert, wie die eingehende Nachricht \xFCbertragen wird.",
|
|
1443
|
+
lifecyclePorts: "Optionale zus\xE4tzliche Ausg\xE4nge, die bei Fehler, Abschluss und jeder Status\xE4nderung ausl\xF6sen.",
|
|
1444
|
+
learnMore: "Mehr erfahren"
|
|
1397
1445
|
}
|
|
1398
1446
|
},
|
|
1399
1447
|
"es-ES": {
|
|
1400
|
-
configs: { name: "Nombre"
|
|
1448
|
+
configs: { name: "Nombre" },
|
|
1401
1449
|
toggles: {
|
|
1402
|
-
validateInput: "Validar
|
|
1403
|
-
validateOutput: "Validar salida",
|
|
1450
|
+
validateInput: "Validar",
|
|
1404
1451
|
errorPort: "Puerto de error",
|
|
1405
1452
|
completePort: "Puerto de completado",
|
|
1406
|
-
statusPort: "Puerto de estado"
|
|
1407
|
-
|
|
1453
|
+
statusPort: "Puerto de estado"
|
|
1454
|
+
},
|
|
1455
|
+
sections: {
|
|
1456
|
+
portsSettings: "Configuraci\xF3n de puertos",
|
|
1457
|
+
input: "Entrada",
|
|
1458
|
+
outputs: "Salidas",
|
|
1459
|
+
lifecyclePorts: "Puertos de ciclo de vida"
|
|
1460
|
+
},
|
|
1461
|
+
outputs: {
|
|
1462
|
+
port: "Puerto",
|
|
1463
|
+
label: "Etiqueta",
|
|
1464
|
+
validate: "Validar",
|
|
1465
|
+
returnProperty: "Propiedad de retorno",
|
|
1466
|
+
contextMode: "Modo de contexto"
|
|
1467
|
+
},
|
|
1468
|
+
contextModes: {
|
|
1469
|
+
modes: {
|
|
1470
|
+
carry: "carry",
|
|
1471
|
+
trace: "trace",
|
|
1472
|
+
reset: "reset"
|
|
1473
|
+
}
|
|
1474
|
+
},
|
|
1475
|
+
help: {
|
|
1476
|
+
validateInput: "Valida los mensajes entrantes con el esquema de entrada antes de ejecutar input().",
|
|
1477
|
+
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.",
|
|
1478
|
+
lifecyclePorts: "Puertos de salida adicionales opcionales que se activan en error, al completar y en cada cambio de estado.",
|
|
1479
|
+
learnMore: "M\xE1s informaci\xF3n"
|
|
1408
1480
|
}
|
|
1409
1481
|
},
|
|
1410
1482
|
fr: {
|
|
1411
|
-
configs: { name: "Nom"
|
|
1483
|
+
configs: { name: "Nom" },
|
|
1412
1484
|
toggles: {
|
|
1413
|
-
validateInput: "Valider
|
|
1414
|
-
validateOutput: "Valider la sortie",
|
|
1485
|
+
validateInput: "Valider",
|
|
1415
1486
|
errorPort: "Port d'erreur",
|
|
1416
1487
|
completePort: "Port de compl\xE9tion",
|
|
1417
|
-
statusPort: "Port de statut"
|
|
1418
|
-
|
|
1488
|
+
statusPort: "Port de statut"
|
|
1489
|
+
},
|
|
1490
|
+
sections: {
|
|
1491
|
+
portsSettings: "Param\xE8tres des ports",
|
|
1492
|
+
input: "Entr\xE9e",
|
|
1493
|
+
outputs: "Sorties",
|
|
1494
|
+
lifecyclePorts: "Ports de cycle de vie"
|
|
1495
|
+
},
|
|
1496
|
+
outputs: {
|
|
1497
|
+
port: "Port",
|
|
1498
|
+
label: "Libell\xE9",
|
|
1499
|
+
validate: "Valider",
|
|
1500
|
+
returnProperty: "Propri\xE9t\xE9 de retour",
|
|
1501
|
+
contextMode: "Mode de contexte"
|
|
1502
|
+
},
|
|
1503
|
+
contextModes: {
|
|
1504
|
+
modes: {
|
|
1505
|
+
carry: "carry",
|
|
1506
|
+
trace: "trace",
|
|
1507
|
+
reset: "reset"
|
|
1508
|
+
}
|
|
1509
|
+
},
|
|
1510
|
+
help: {
|
|
1511
|
+
validateInput: "Valide les messages entrants avec le sch\xE9ma d'entr\xE9e avant l'ex\xE9cution de input().",
|
|
1512
|
+
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.",
|
|
1513
|
+
lifecyclePorts: "Ports de sortie suppl\xE9mentaires optionnels d\xE9clench\xE9s en cas d'erreur, \xE0 la fin et \xE0 chaque changement de statut.",
|
|
1514
|
+
learnMore: "En savoir plus"
|
|
1419
1515
|
}
|
|
1420
1516
|
},
|
|
1421
1517
|
ko: {
|
|
1422
|
-
configs: { name: "\uC774\uB984"
|
|
1518
|
+
configs: { name: "\uC774\uB984" },
|
|
1423
1519
|
toggles: {
|
|
1424
|
-
validateInput: "\
|
|
1425
|
-
validateOutput: "\uCD9C\uB825 \uAC80\uC99D",
|
|
1520
|
+
validateInput: "\uAC80\uC99D",
|
|
1426
1521
|
errorPort: "\uC624\uB958 \uD3EC\uD2B8",
|
|
1427
1522
|
completePort: "\uC644\uB8CC \uD3EC\uD2B8",
|
|
1428
|
-
statusPort: "\uC0C1\uD0DC \uD3EC\uD2B8"
|
|
1429
|
-
|
|
1523
|
+
statusPort: "\uC0C1\uD0DC \uD3EC\uD2B8"
|
|
1524
|
+
},
|
|
1525
|
+
sections: {
|
|
1526
|
+
portsSettings: "\uD3EC\uD2B8 \uC124\uC815",
|
|
1527
|
+
input: "\uC785\uB825",
|
|
1528
|
+
outputs: "\uCD9C\uB825",
|
|
1529
|
+
lifecyclePorts: "\uC218\uBA85 \uC8FC\uAE30 \uD3EC\uD2B8"
|
|
1530
|
+
},
|
|
1531
|
+
outputs: {
|
|
1532
|
+
port: "\uD3EC\uD2B8",
|
|
1533
|
+
label: "\uB808\uC774\uBE14",
|
|
1534
|
+
validate: "\uAC80\uC99D",
|
|
1535
|
+
returnProperty: "\uBC18\uD658 \uC18D\uC131",
|
|
1536
|
+
contextMode: "\uCEE8\uD14D\uC2A4\uD2B8 \uBAA8\uB4DC"
|
|
1537
|
+
},
|
|
1538
|
+
contextModes: {
|
|
1539
|
+
modes: {
|
|
1540
|
+
carry: "carry",
|
|
1541
|
+
trace: "trace",
|
|
1542
|
+
reset: "reset"
|
|
1543
|
+
}
|
|
1544
|
+
},
|
|
1545
|
+
help: {
|
|
1546
|
+
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.",
|
|
1547
|
+
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.",
|
|
1548
|
+
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.",
|
|
1549
|
+
learnMore: "\uC790\uC138\uD788 \uBCF4\uAE30"
|
|
1430
1550
|
}
|
|
1431
1551
|
},
|
|
1432
1552
|
"pt-BR": {
|
|
1433
|
-
configs: { name: "Nome"
|
|
1553
|
+
configs: { name: "Nome" },
|
|
1434
1554
|
toggles: {
|
|
1435
|
-
validateInput: "Validar
|
|
1436
|
-
validateOutput: "Validar Sa\xEDda",
|
|
1555
|
+
validateInput: "Validar",
|
|
1437
1556
|
errorPort: "Porta de Erro",
|
|
1438
1557
|
completePort: "Porta de Conclus\xE3o",
|
|
1439
|
-
statusPort: "Porta de Status"
|
|
1440
|
-
|
|
1558
|
+
statusPort: "Porta de Status"
|
|
1559
|
+
},
|
|
1560
|
+
sections: {
|
|
1561
|
+
portsSettings: "Configura\xE7\xF5es de portas",
|
|
1562
|
+
input: "Entrada",
|
|
1563
|
+
outputs: "Sa\xEDdas",
|
|
1564
|
+
lifecyclePorts: "Portas de ciclo de vida"
|
|
1565
|
+
},
|
|
1566
|
+
outputs: {
|
|
1567
|
+
port: "Porta",
|
|
1568
|
+
label: "R\xF3tulo",
|
|
1569
|
+
validate: "Validar",
|
|
1570
|
+
returnProperty: "Propriedade de retorno",
|
|
1571
|
+
contextMode: "Modo de contexto"
|
|
1572
|
+
},
|
|
1573
|
+
contextModes: {
|
|
1574
|
+
modes: {
|
|
1575
|
+
carry: "carry",
|
|
1576
|
+
trace: "trace",
|
|
1577
|
+
reset: "reset"
|
|
1578
|
+
}
|
|
1579
|
+
},
|
|
1580
|
+
help: {
|
|
1581
|
+
validateInput: "Valida as mensagens recebidas com o esquema de entrada antes de input() executar.",
|
|
1582
|
+
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.",
|
|
1583
|
+
lifecyclePorts: "Portas de sa\xEDda extras opcionais que disparam em erro, na conclus\xE3o e a cada mudan\xE7a de status.",
|
|
1584
|
+
learnMore: "Saiba mais"
|
|
1441
1585
|
}
|
|
1442
1586
|
},
|
|
1443
1587
|
ru: {
|
|
1444
|
-
configs: { name: "\u0418\u043C\u044F"
|
|
1588
|
+
configs: { name: "\u0418\u043C\u044F" },
|
|
1445
1589
|
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",
|
|
1590
|
+
validateInput: "\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0442\u044C",
|
|
1448
1591
|
errorPort: "\u041F\u043E\u0440\u0442 \u043E\u0448\u0438\u0431\u043A\u0438",
|
|
1449
1592
|
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
|
-
|
|
1593
|
+
statusPort: "\u041F\u043E\u0440\u0442 \u0441\u0442\u0430\u0442\u0443\u0441\u0430"
|
|
1594
|
+
},
|
|
1595
|
+
sections: {
|
|
1596
|
+
portsSettings: "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043F\u043E\u0440\u0442\u043E\u0432",
|
|
1597
|
+
input: "\u0412\u0445\u043E\u0434",
|
|
1598
|
+
outputs: "\u0412\u044B\u0445\u043E\u0434\u044B",
|
|
1599
|
+
lifecyclePorts: "\u041F\u043E\u0440\u0442\u044B \u0436\u0438\u0437\u043D\u0435\u043D\u043D\u043E\u0433\u043E \u0446\u0438\u043A\u043B\u0430"
|
|
1600
|
+
},
|
|
1601
|
+
outputs: {
|
|
1602
|
+
port: "\u041F\u043E\u0440\u0442",
|
|
1603
|
+
label: "\u041C\u0435\u0442\u043A\u0430",
|
|
1604
|
+
validate: "\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0442\u044C",
|
|
1605
|
+
returnProperty: "\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u043E \u0432\u043E\u0437\u0432\u0440\u0430\u0442\u0430",
|
|
1606
|
+
contextMode: "\u0420\u0435\u0436\u0438\u043C \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0430"
|
|
1607
|
+
},
|
|
1608
|
+
contextModes: {
|
|
1609
|
+
modes: {
|
|
1610
|
+
carry: "carry",
|
|
1611
|
+
trace: "trace",
|
|
1612
|
+
reset: "reset"
|
|
1613
|
+
}
|
|
1614
|
+
},
|
|
1615
|
+
help: {
|
|
1616
|
+
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().",
|
|
1617
|
+
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.",
|
|
1618
|
+
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.",
|
|
1619
|
+
learnMore: "\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435"
|
|
1452
1620
|
}
|
|
1453
1621
|
},
|
|
1454
1622
|
ja: {
|
|
1455
|
-
configs: { name: "\u540D\u524D"
|
|
1623
|
+
configs: { name: "\u540D\u524D" },
|
|
1456
1624
|
toggles: {
|
|
1457
|
-
validateInput: "\
|
|
1458
|
-
validateOutput: "\u51FA\u529B\u691C\u8A3C",
|
|
1625
|
+
validateInput: "\u691C\u8A3C",
|
|
1459
1626
|
errorPort: "\u30A8\u30E9\u30FC\u30DD\u30FC\u30C8",
|
|
1460
1627
|
completePort: "\u5B8C\u4E86\u30DD\u30FC\u30C8",
|
|
1461
|
-
statusPort: "\u30B9\u30C6\u30FC\u30BF\u30B9\u30DD\u30FC\u30C8"
|
|
1462
|
-
|
|
1628
|
+
statusPort: "\u30B9\u30C6\u30FC\u30BF\u30B9\u30DD\u30FC\u30C8"
|
|
1629
|
+
},
|
|
1630
|
+
sections: {
|
|
1631
|
+
portsSettings: "\u30DD\u30FC\u30C8\u8A2D\u5B9A",
|
|
1632
|
+
input: "\u5165\u529B",
|
|
1633
|
+
outputs: "\u51FA\u529B",
|
|
1634
|
+
lifecyclePorts: "\u30E9\u30A4\u30D5\u30B5\u30A4\u30AF\u30EB\u30DD\u30FC\u30C8"
|
|
1635
|
+
},
|
|
1636
|
+
outputs: {
|
|
1637
|
+
port: "\u30DD\u30FC\u30C8",
|
|
1638
|
+
label: "\u30E9\u30D9\u30EB",
|
|
1639
|
+
validate: "\u691C\u8A3C",
|
|
1640
|
+
returnProperty: "\u623B\u308A\u30D7\u30ED\u30D1\u30C6\u30A3",
|
|
1641
|
+
contextMode: "\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30E2\u30FC\u30C9"
|
|
1642
|
+
},
|
|
1643
|
+
contextModes: {
|
|
1644
|
+
modes: {
|
|
1645
|
+
carry: "carry",
|
|
1646
|
+
trace: "trace",
|
|
1647
|
+
reset: "reset"
|
|
1648
|
+
}
|
|
1649
|
+
},
|
|
1650
|
+
help: {
|
|
1651
|
+
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",
|
|
1652
|
+
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",
|
|
1653
|
+
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",
|
|
1654
|
+
learnMore: "\u8A73\u7D30"
|
|
1463
1655
|
}
|
|
1464
1656
|
},
|
|
1465
1657
|
"zh-CN": {
|
|
1466
|
-
configs: { name: "\u540D\u79F0"
|
|
1658
|
+
configs: { name: "\u540D\u79F0" },
|
|
1467
1659
|
toggles: {
|
|
1468
|
-
validateInput: "\u9A8C\u8BC1
|
|
1469
|
-
validateOutput: "\u9A8C\u8BC1\u8F93\u51FA",
|
|
1660
|
+
validateInput: "\u9A8C\u8BC1",
|
|
1470
1661
|
errorPort: "\u9519\u8BEF\u7AEF\u53E3",
|
|
1471
1662
|
completePort: "\u5B8C\u6210\u7AEF\u53E3",
|
|
1472
|
-
statusPort: "\u72B6\u6001\u7AEF\u53E3"
|
|
1473
|
-
|
|
1663
|
+
statusPort: "\u72B6\u6001\u7AEF\u53E3"
|
|
1664
|
+
},
|
|
1665
|
+
sections: {
|
|
1666
|
+
portsSettings: "\u7AEF\u53E3\u8BBE\u7F6E",
|
|
1667
|
+
input: "\u8F93\u5165",
|
|
1668
|
+
outputs: "\u8F93\u51FA",
|
|
1669
|
+
lifecyclePorts: "\u751F\u547D\u5468\u671F\u7AEF\u53E3"
|
|
1670
|
+
},
|
|
1671
|
+
outputs: {
|
|
1672
|
+
port: "\u7AEF\u53E3",
|
|
1673
|
+
label: "\u6807\u7B7E",
|
|
1674
|
+
validate: "\u9A8C\u8BC1",
|
|
1675
|
+
returnProperty: "\u8FD4\u56DE\u5C5E\u6027",
|
|
1676
|
+
contextMode: "\u4E0A\u4E0B\u6587\u6A21\u5F0F"
|
|
1677
|
+
},
|
|
1678
|
+
contextModes: {
|
|
1679
|
+
modes: {
|
|
1680
|
+
carry: "carry",
|
|
1681
|
+
trace: "trace",
|
|
1682
|
+
reset: "reset"
|
|
1683
|
+
}
|
|
1684
|
+
},
|
|
1685
|
+
help: {
|
|
1686
|
+
validateInput: "\u5728 input() \u8FD0\u884C\u524D\uFF0C\u6839\u636E\u8F93\u5165\u6A21\u5F0F\u6821\u9A8C\u4F20\u5165\u6D88\u606F\u3002",
|
|
1687
|
+
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",
|
|
1688
|
+
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",
|
|
1689
|
+
learnMore: "\u4E86\u89E3\u66F4\u591A"
|
|
1474
1690
|
}
|
|
1475
1691
|
},
|
|
1476
1692
|
"zh-TW": {
|
|
1477
|
-
configs: { name: "\u540D\u7A31"
|
|
1693
|
+
configs: { name: "\u540D\u7A31" },
|
|
1478
1694
|
toggles: {
|
|
1479
|
-
validateInput: "\u9A57\u8B49
|
|
1480
|
-
validateOutput: "\u9A57\u8B49\u8F38\u51FA",
|
|
1695
|
+
validateInput: "\u9A57\u8B49",
|
|
1481
1696
|
errorPort: "\u932F\u8AA4\u7AEF\u53E3",
|
|
1482
1697
|
completePort: "\u5B8C\u6210\u7AEF\u53E3",
|
|
1483
|
-
statusPort: "\u72C0\u614B\u7AEF\u53E3"
|
|
1484
|
-
|
|
1698
|
+
statusPort: "\u72C0\u614B\u7AEF\u53E3"
|
|
1699
|
+
},
|
|
1700
|
+
sections: {
|
|
1701
|
+
portsSettings: "\u7AEF\u53E3\u8A2D\u5B9A",
|
|
1702
|
+
input: "\u8F38\u5165",
|
|
1703
|
+
outputs: "\u8F38\u51FA",
|
|
1704
|
+
lifecyclePorts: "\u751F\u547D\u9031\u671F\u7AEF\u53E3"
|
|
1705
|
+
},
|
|
1706
|
+
outputs: {
|
|
1707
|
+
port: "\u7AEF\u53E3",
|
|
1708
|
+
label: "\u6A19\u7C64",
|
|
1709
|
+
validate: "\u9A57\u8B49",
|
|
1710
|
+
returnProperty: "\u8FD4\u56DE\u5C6C\u6027",
|
|
1711
|
+
contextMode: "\u5167\u5BB9\u6A21\u5F0F"
|
|
1712
|
+
},
|
|
1713
|
+
contextModes: {
|
|
1714
|
+
modes: {
|
|
1715
|
+
carry: "carry",
|
|
1716
|
+
trace: "trace",
|
|
1717
|
+
reset: "reset"
|
|
1718
|
+
}
|
|
1719
|
+
},
|
|
1720
|
+
help: {
|
|
1721
|
+
validateInput: "\u5728 input() \u57F7\u884C\u524D\uFF0C\u4F9D\u8F38\u5165\u7D50\u69CB\u63CF\u8FF0\u9A57\u8B49\u50B3\u5165\u8A0A\u606F\u3002",
|
|
1722
|
+
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",
|
|
1723
|
+
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",
|
|
1724
|
+
learnMore: "\u77AD\u89E3\u66F4\u591A"
|
|
1485
1725
|
}
|
|
1486
1726
|
}
|
|
1487
1727
|
};
|
|
@@ -1688,7 +1928,7 @@ function nodeDefinitionsInliner(serverOutDir, entryPath, iconsDir, componentsDir
|
|
|
1688
1928
|
defaults.validateInput = { required: false, value: false };
|
|
1689
1929
|
}
|
|
1690
1930
|
if (defaults && outputsSchema) {
|
|
1691
|
-
defaults.
|
|
1931
|
+
defaults.validateOutputs = { required: false, value: {} };
|
|
1692
1932
|
}
|
|
1693
1933
|
const credentials = getCredentialsFromSchema(credentialsSchema);
|
|
1694
1934
|
_definitions[type] = {
|
|
@@ -2697,7 +2937,10 @@ var NodeRedEditor = class {
|
|
|
2697
2937
|
this.page = page;
|
|
2698
2938
|
this.port = port;
|
|
2699
2939
|
this.screenshotDir = options?.screenshotDir ?? "test-results/screenshots";
|
|
2700
|
-
page.on("pageerror", (err) =>
|
|
2940
|
+
page.on("pageerror", (err) => {
|
|
2941
|
+
if (err.message.includes("ResizeObserver")) return;
|
|
2942
|
+
this.errors.push(err.message);
|
|
2943
|
+
});
|
|
2701
2944
|
}
|
|
2702
2945
|
errors = [];
|
|
2703
2946
|
screenshotDir;
|
|
@@ -2940,6 +3183,7 @@ var NodeRedField = class {
|
|
|
2940
3183
|
return this.row.locator(".nrg-toggle__slider");
|
|
2941
3184
|
}
|
|
2942
3185
|
async toggle() {
|
|
3186
|
+
await this.toggleSlider.scrollIntoViewIfNeeded();
|
|
2943
3187
|
await this.toggleSlider.click();
|
|
2944
3188
|
}
|
|
2945
3189
|
get checkbox() {
|
package/types/client.d.ts
CHANGED
|
@@ -96,14 +96,20 @@ 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. `validateOutputs` is
|
|
105
|
+
* injected (empty) when the node has an outputsSchema; `outputReturnProperties`
|
|
106
|
+
* and `outputContextModes` are author-declared (SchemaType.*) — present only
|
|
107
|
+
* when the node opts into per-port return keys / context modes. Read at
|
|
108
|
+
* runtime by IONode.
|
|
109
|
+
*/
|
|
110
|
+
validateOutputs?: Record<number, boolean>;
|
|
111
|
+
outputContextModes?: Record<number, "carry" | "trace" | "reset">;
|
|
112
|
+
outputReturnProperties?: Record<number, string>;
|
|
107
113
|
[key: string]: any;
|
|
108
114
|
}
|
|
109
115
|
export interface NodeDefinition {
|
|
@@ -198,6 +204,14 @@ export interface NodeCredentials {
|
|
|
198
204
|
export interface NodeFeatures {
|
|
199
205
|
hasInputSchema: boolean;
|
|
200
206
|
hasOutputSchema: boolean;
|
|
207
|
+
/**
|
|
208
|
+
* Base output ports (excludes built-in error/complete/status), in port-index
|
|
209
|
+
* order. Drives the per-port context-mode rows in the Outputs subsection.
|
|
210
|
+
*/
|
|
211
|
+
outputPorts: {
|
|
212
|
+
index: number;
|
|
213
|
+
label: string;
|
|
214
|
+
}[];
|
|
201
215
|
}
|
|
202
216
|
/** Client-side representation of a TypedInput field: the raw value string and its type selector. */
|
|
203
217
|
export interface TypedInputValue {
|