iobroker.javascript 8.9.2 → 9.0.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 +7 -3
- package/admin/assets/{createSvgIcon-BdRvDw53.js → createSvgIcon-BQT-7-GS.js} +1 -1
- package/admin/assets/{docs-6na4NFtj.js → docs-BrInh2Pn.js} +2 -2
- package/admin/assets/index-B0RKH_iG.js +1329 -0
- package/admin/assets/index-CfuHVX2B.js +193 -0
- package/admin/assets/index-CuCs5aLs.js +5 -0
- package/admin/assets/index-tExaxF69.js +930 -0
- package/admin/assets/inheritsLoose--KnFDOw1.js +36 -0
- package/admin/assets/{useTheme-Cl1QmYFL.js → useTheme-DF6qfrtI.js} +1 -1
- package/admin/custom/assets/{Components-ChpTW7sE.js → Components-D9kRsHNY.js} +1 -1
- package/admin/custom/assets/{DefaultPropsProvider-CHpMCMgA.js → DefaultPropsProvider-9qubdy-V.js} +2 -2
- package/admin/custom/assets/{FilledInput-CtcQVKyj.js → FilledInput-BpuM_GyB.js} +1 -1
- package/admin/custom/assets/Tabs-CvEv0KOT.js +138 -0
- package/admin/custom/assets/ThemeProvider-DZTpMR8n.js +29 -0
- package/admin/custom/assets/{createSvgIcon-C_vAELFU.js → createSvgIcon-BQThUM-f.js} +1 -1
- package/admin/custom/assets/hostInit-CrAs5YZS.js +1 -1
- package/admin/custom/assets/{index-DwsbskQy.js → index-DIWNdd4a.js} +1 -1
- package/admin/custom/assets/index-DZqbj5K4.js +55 -0
- package/admin/custom/assets/{index-D5apCzjJ.js → index-Dbe-II7_.js} +6 -6
- package/admin/custom/assets/index-az76fZMP.js +904 -0
- package/admin/custom/assets/index-sawv1cUe.js +1399 -0
- package/admin/custom/assets/{virtualExposes-BPncCdUy.js → virtualExposes-BMKIjWrE.js} +2 -2
- package/admin/custom/customComponents.js +2 -2
- package/admin/custom/i18n/de.json +29 -29
- package/admin/custom/i18n/es.json +29 -29
- package/admin/custom/i18n/fr.json +29 -29
- package/admin/custom/i18n/it.json +29 -29
- package/admin/custom/i18n/nl.json +29 -29
- package/admin/custom/i18n/pl.json +29 -29
- package/admin/custom/i18n/pt.json +29 -29
- package/admin/custom/i18n/ru.json +29 -29
- package/admin/custom/i18n/uk.json +29 -29
- package/admin/custom/i18n/zh-cn.json +29 -29
- package/admin/google-blockly/blockly_compressed.js +875 -887
- package/admin/google-blockly/blocks_compressed.js +38 -41
- package/admin/google-blockly/javascript_compressed.js +19 -54
- package/admin/google-blockly/media/delete-icon.svg +1 -0
- package/admin/google-blockly/media/foldout-icon.svg +1 -0
- package/admin/google-blockly/media/resize-handle.svg +3 -0
- package/admin/jsonConfig.json +2 -0
- package/admin/mf-manifest.json +1 -1
- package/admin/remoteEntry.js +2 -2
- package/admin/tab.html +4 -4
- package/admin/vsFont/README.md +1 -1
- package/admin/vsFont/createJson.js +1 -1
- package/build-backend/lib/consts.js +346 -0
- package/build-backend/lib/consts.js.map +1 -0
- package/build-backend/lib/convert.js +120 -0
- package/build-backend/lib/convert.js.map +1 -0
- package/build-backend/lib/debug.js +163 -0
- package/build-backend/lib/debug.js.map +1 -0
- package/{lib → build-backend/lib}/debugger.js +261 -232
- package/build-backend/lib/debugger.js.map +1 -0
- package/build-backend/lib/eventObj.js +177 -0
- package/build-backend/lib/eventObj.js.map +1 -0
- package/build-backend/lib/inspect.js +728 -0
- package/build-backend/lib/inspect.js.map +1 -0
- package/build-backend/lib/javascript.d.ts +1972 -0
- package/{lib → build-backend/lib}/mirror.js +185 -182
- package/build-backend/lib/mirror.js.map +1 -0
- package/build-backend/lib/nodeModulesManagement.js +25 -0
- package/build-backend/lib/nodeModulesManagement.js.map +1 -0
- package/build-backend/lib/patternCompareFunctions.js +321 -0
- package/build-backend/lib/patternCompareFunctions.js.map +1 -0
- package/build-backend/lib/protectFs.js +477 -0
- package/build-backend/lib/protectFs.js.map +1 -0
- package/build-backend/lib/request.js +89 -0
- package/build-backend/lib/request.js.map +1 -0
- package/{lib → build-backend/lib}/sandbox.js +2046 -1852
- package/build-backend/lib/sandbox.js.map +1 -0
- package/build-backend/lib/scheduler.js +553 -0
- package/build-backend/lib/scheduler.js.map +1 -0
- package/build-backend/lib/tools.js +183 -0
- package/build-backend/lib/tools.js.map +1 -0
- package/build-backend/lib/typescriptSettings.js +39 -0
- package/build-backend/lib/typescriptSettings.js.map +1 -0
- package/build-backend/lib/typescriptTools.js +435 -0
- package/build-backend/lib/typescriptTools.js.map +1 -0
- package/build-backend/lib/utils.js +66 -0
- package/build-backend/lib/utils.js.map +1 -0
- package/{lib → build-backend/lib}/words.js +23 -30
- package/build-backend/lib/words.js.map +1 -0
- package/build-backend/main.js +2671 -0
- package/build-backend/main.js.map +1 -0
- package/build-backend/types.d.ts +742 -0
- package/docs/de/README.md +1 -1
- package/docs/en/README.md +1 -1
- package/docs/en/javascript.md +10 -6
- package/docs/ru/README.md +1 -1
- package/install/installTypings.js +34 -47
- package/io-package.json +14 -14
- package/package.json +14 -14
- package/admin/assets/index-DCkkMRRa.js +0 -1335
- package/admin/assets/index-DJfSBoBB.js +0 -192
- package/admin/assets/index-DTiA4WdK.js +0 -930
- package/admin/assets/index-qABB1JVe.js +0 -5
- package/admin/assets/inheritsLoose-BW-3V39H.js +0 -36
- package/admin/custom/assets/Tabs-C1KOyWRi.js +0 -137
- package/admin/custom/assets/ThemeProvider-Buvx5nSd.js +0 -29
- package/admin/custom/assets/index-BGCRznKh.js +0 -904
- package/admin/custom/assets/index-DfBPYXqA.js +0 -55
- package/admin/custom/assets/index-jIr6kOLK.js +0 -1398
- package/lib/adapter-config.d.ts +0 -16
- package/lib/consts.js +0 -83
- package/lib/convert.js +0 -106
- package/lib/debug.js +0 -154
- package/lib/eventObj.js +0 -201
- package/lib/inspect.js +0 -688
- package/lib/javascript.d.ts +0 -1858
- package/lib/nodeModulesManagement.js +0 -26
- package/lib/patternCompareFunctions.js +0 -391
- package/lib/protectFs.js +0 -401
- package/lib/request.js +0 -72
- package/lib/scheduler.js +0 -447
- package/lib/tools.js +0 -192
- package/lib/typescriptSettings.js +0 -44
- package/lib/typescriptTools.js +0 -529
- package/lib/utils.js +0 -87
- package/main.js +0 -2653
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setLanguage = setLanguage;
|
|
4
|
+
exports.getLanguage = getLanguage;
|
|
5
|
+
exports._ = _;
|
|
6
|
+
let systemLang = 'en';
|
|
7
|
+
const systemDictionary = {
|
|
7
8
|
'was not executed, while debug mode is active': {
|
|
8
9
|
en: 'was not executed, while debug mode is active',
|
|
9
10
|
de: 'wurde nicht ausgeführt, während der Debug-Modus aktiv ist',
|
|
10
11
|
ru: 'не был выполнен, пока активен режим отладки',
|
|
11
12
|
pt: 'não foi executado, enquanto o modo de depuração está ativo',
|
|
12
13
|
nl: 'is niet uitgevoerd, terwijl de foutopsporingsmodus actief is',
|
|
13
|
-
fr:
|
|
14
|
+
fr: "n'a pas été exécuté alors que le mode débogage est actif",
|
|
14
15
|
it: 'non è stato eseguito, mentre la modalità debug è attiva',
|
|
15
16
|
es: 'no se ejecutó, mientras el modo de depuración está activo',
|
|
16
17
|
pl: 'nie zostało wykonane, gdy aktywny jest tryb debugowania',
|
|
@@ -18,66 +19,58 @@ systemDictionary = {
|
|
|
18
19
|
'zh-cn': '调试模式处于活动状态时未执行',
|
|
19
20
|
},
|
|
20
21
|
};
|
|
21
|
-
/* eslint-enable quotes */
|
|
22
|
-
|
|
23
22
|
function setLanguage(language) {
|
|
24
23
|
systemLang = language;
|
|
25
24
|
}
|
|
26
|
-
|
|
27
25
|
function getLanguage() {
|
|
28
26
|
return systemLang;
|
|
29
27
|
}
|
|
30
|
-
|
|
31
28
|
function translateWord(text, lang, dictionary) {
|
|
32
29
|
if (!text) {
|
|
33
30
|
return '';
|
|
34
31
|
}
|
|
35
|
-
lang
|
|
32
|
+
lang = lang || systemLang;
|
|
36
33
|
dictionary = dictionary || systemDictionary;
|
|
37
|
-
|
|
38
34
|
if (dictionary[text]) {
|
|
39
35
|
let newText = dictionary[text][lang];
|
|
40
36
|
if (newText) {
|
|
41
37
|
return newText;
|
|
42
|
-
}
|
|
38
|
+
}
|
|
39
|
+
else if (lang !== 'en') {
|
|
43
40
|
newText = dictionary[text].en;
|
|
44
41
|
if (newText) {
|
|
45
42
|
return newText;
|
|
46
43
|
}
|
|
47
44
|
}
|
|
48
|
-
}
|
|
45
|
+
}
|
|
46
|
+
else if (typeof text === 'string' && !text.match(/_tooltip$/)) {
|
|
49
47
|
console.log(`"${text}": {"en": "${text}", "de": "${text}", "ru": "${text}"},`);
|
|
50
|
-
}
|
|
51
|
-
|
|
48
|
+
}
|
|
49
|
+
else if (typeof text !== 'string') {
|
|
50
|
+
console.warn(`Trying to translate non-text: ${JSON.stringify(text)}`);
|
|
52
51
|
}
|
|
53
52
|
return text;
|
|
54
53
|
}
|
|
55
|
-
|
|
56
54
|
function _(text, arg1, arg2, arg3) {
|
|
57
55
|
text = translateWord(text);
|
|
58
|
-
|
|
59
56
|
let pos = text.indexOf('%s');
|
|
60
57
|
if (pos !== -1) {
|
|
61
58
|
text = text.replace('%s', arg1);
|
|
62
|
-
}
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
63
61
|
return text;
|
|
64
62
|
}
|
|
65
|
-
|
|
66
63
|
pos = text.indexOf('%s');
|
|
67
|
-
if (pos !== -1)
|
|
64
|
+
if (pos !== -1) {
|
|
68
65
|
text = text.replace('%s', arg2);
|
|
69
|
-
}
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
70
68
|
return text;
|
|
71
69
|
}
|
|
72
|
-
|
|
73
70
|
pos = text.indexOf('%s');
|
|
74
|
-
if (pos !== -1)
|
|
71
|
+
if (pos !== -1) {
|
|
75
72
|
text = text.replace('%s', arg3);
|
|
76
73
|
}
|
|
77
|
-
|
|
78
74
|
return text;
|
|
79
75
|
}
|
|
80
|
-
|
|
81
|
-
module.exports.setLanguage = setLanguage;
|
|
82
|
-
module.exports.getLanguage = getLanguage;
|
|
83
|
-
module.exports._ = _;
|
|
76
|
+
//# sourceMappingURL=words.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"words.js","sourceRoot":"","sources":["../../src/lib/words.ts"],"names":[],"mappings":";;AAiBA,kCAEC;AAED,kCAEC;AA+BD,cAuBC;AA7ED,IAAI,UAAU,GAAuB,IAAI,CAAC;AAC1C,MAAM,gBAAgB,GAAwC;IAC1D,8CAA8C,EAAE;QAC5C,EAAE,EAAE,8CAA8C;QAClD,EAAE,EAAE,2DAA2D;QAC/D,EAAE,EAAE,6CAA6C;QACjD,EAAE,EAAE,4DAA4D;QAChE,EAAE,EAAE,8DAA8D;QAClE,EAAE,EAAE,0DAA0D;QAC9D,EAAE,EAAE,yDAAyD;QAC7D,EAAE,EAAE,2DAA2D;QAC/D,EAAE,EAAE,yDAAyD;QAC7D,EAAE,EAAE,oDAAoD;QACxD,OAAO,EAAE,gBAAgB;KAC5B;CACJ,CAAC;AAEF,SAAgB,WAAW,CAAC,QAA4B;IACpD,UAAU,GAAG,QAAQ,CAAC;AAC1B,CAAC;AAED,SAAgB,WAAW;IACvB,OAAO,UAAU,CAAC;AACtB,CAAC;AAED,SAAS,aAAa,CAClB,IAAY,EACZ,IAAyB,EACzB,UAAgD;IAEhD,IAAI,CAAC,IAAI,EAAE,CAAC;QACR,OAAO,EAAE,CAAC;IACd,CAAC;IACD,IAAI,GAAG,IAAI,IAAI,UAAU,CAAC;IAC1B,UAAU,GAAG,UAAU,IAAI,gBAAgB,CAAC;IAE5C,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACnB,IAAI,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,OAAO,EAAE,CAAC;YACV,OAAO,OAAO,CAAC;QACnB,CA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C,IAAI,CAAC,CAAC;IACzB,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC;QACb,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC","sourcesContent":["let systemLang: ioBroker.Languages = 'en';\nconst systemDictionary: Record<string, ioBroker.Translated> = {\n 'was not executed, while debug mode is active': {\n en: 'was not executed, while debug mode is active',\n de: 'wurde nicht ausgeführt, während der Debug-Modus aktiv ist',\n ru: 'не был выполнен, пока активен режим отладки',\n pt: 'não foi executado, enquanto o modo de depuração está ativo',\n nl: 'is niet uitgevoerd, terwijl de foutopsporingsmodus actief is',\n fr: \"n'a pas été exécuté alors que le mode débogage est actif\",\n it: 'non è stato eseguito, mentre la modalità debug è attiva',\n es: 'no se ejecutó, mientras el modo de depuración está activo',\n pl: 'nie zostało wykonane, gdy aktywny jest tryb debugowania',\n uk: 'не було виконано, поки активний режим налагодження',\n 'zh-cn': '调试模式处于活动状态时未执行',\n },\n};\n\nexport function setLanguage(language: ioBroker.Languages): void {\n systemLang = language;\n}\n\nexport function getLanguage(): ioBroker.Languages {\n return systemLang;\n}\n\nfunction translateWord(\n text: string,\n lang?: ioBroker.Languages,\n dictionary?: Record<string, ioBroker.Translated>,\n): string {\n if (!text) {\n return '';\n }\n lang = lang || systemLang;\n dictionary = dictionary || systemDictionary;\n\n if (dictionary[text]) {\n let newText = dictionary[text][lang];\n if (newText) {\n return newText;\n } else if (lang !== 'en') {\n newText = dictionary[text].en;\n if (newText) {\n return newText;\n }\n }\n } else if (typeof text === 'string' && !text.match(/_tooltip$/)) {\n console.log(`\"${text}\": {\"en\": \"${text}\", \"de\": \"${text}\", \"ru\": \"${text}\"},`);\n } else if (typeof text !== 'string') {\n console.warn(`Trying to translate non-text: ${JSON.stringify(text)}`);\n }\n return text;\n}\n\nexport function _(text: string, arg1?: any, arg2?: any, arg3?: any): string {\n text = translateWord(text);\n\n let pos = text.indexOf('%s');\n if (pos !== -1) {\n text = text.replace('%s', arg1);\n } else {\n return text;\n }\n\n pos = text.indexOf('%s');\n if (pos !== -1) {\n text = text.replace('%s', arg2);\n } else {\n return text;\n }\n\n pos = text.indexOf('%s');\n if (pos !== -1) {\n text = text.replace('%s', arg3);\n }\n\n return text;\n}\n"]}
|