@winccoa-tools-pack/npm-winccoa-core 0.1.0-9176c0d

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.
Files changed (357) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +234 -0
  3. package/dist/cjs/index.js +24 -0
  4. package/dist/cjs/index.js.map +1 -0
  5. package/dist/cjs/types/components/WinCCOAComponent.js +327 -0
  6. package/dist/cjs/types/components/WinCCOAComponent.js.map +1 -0
  7. package/dist/cjs/types/components/implementations/AlertManagerComponent.js +14 -0
  8. package/dist/cjs/types/components/implementations/AlertManagerComponent.js.map +1 -0
  9. package/dist/cjs/types/components/implementations/AndroidComponent.js +17 -0
  10. package/dist/cjs/types/components/implementations/AndroidComponent.js.map +1 -0
  11. package/dist/cjs/types/components/implementations/ApiComponent.js +14 -0
  12. package/dist/cjs/types/components/implementations/ApiComponent.js.map +1 -0
  13. package/dist/cjs/types/components/implementations/AsciiManagerComponent.js +14 -0
  14. package/dist/cjs/types/components/implementations/AsciiManagerComponent.js.map +1 -0
  15. package/dist/cjs/types/components/implementations/ConfComponent.js +17 -0
  16. package/dist/cjs/types/components/implementations/ConfComponent.js.map +1 -0
  17. package/dist/cjs/types/components/implementations/CtrlComponent.js +34 -0
  18. package/dist/cjs/types/components/implementations/CtrlComponent.js.map +1 -0
  19. package/dist/cjs/types/components/implementations/DNP3Component.js +17 -0
  20. package/dist/cjs/types/components/implementations/DNP3Component.js.map +1 -0
  21. package/dist/cjs/types/components/implementations/DataComponent.js +17 -0
  22. package/dist/cjs/types/components/implementations/DataComponent.js.map +1 -0
  23. package/dist/cjs/types/components/implementations/DbManagerComponent.js +14 -0
  24. package/dist/cjs/types/components/implementations/DbManagerComponent.js.map +1 -0
  25. package/dist/cjs/types/components/implementations/DistComponent.js +14 -0
  26. package/dist/cjs/types/components/implementations/DistComponent.js.map +1 -0
  27. package/dist/cjs/types/components/implementations/DriverComponent.js +14 -0
  28. package/dist/cjs/types/components/implementations/DriverComponent.js.map +1 -0
  29. package/dist/cjs/types/components/implementations/EventComponent.js +17 -0
  30. package/dist/cjs/types/components/implementations/EventComponent.js.map +1 -0
  31. package/dist/cjs/types/components/implementations/HttpComponent.js +14 -0
  32. package/dist/cjs/types/components/implementations/HttpComponent.js.map +1 -0
  33. package/dist/cjs/types/components/implementations/IEC60870Component.js +17 -0
  34. package/dist/cjs/types/components/implementations/IEC60870Component.js.map +1 -0
  35. package/dist/cjs/types/components/implementations/IEC61850Component.js +17 -0
  36. package/dist/cjs/types/components/implementations/IEC61850Component.js.map +1 -0
  37. package/dist/cjs/types/components/implementations/IosComponent.js +17 -0
  38. package/dist/cjs/types/components/implementations/IosComponent.js.map +1 -0
  39. package/dist/cjs/types/components/implementations/JavaComponent.js +17 -0
  40. package/dist/cjs/types/components/implementations/JavaComponent.js.map +1 -0
  41. package/dist/cjs/types/components/implementations/JavaScriptComponent.js +17 -0
  42. package/dist/cjs/types/components/implementations/JavaScriptComponent.js.map +1 -0
  43. package/dist/cjs/types/components/implementations/ModbusComponent.js +17 -0
  44. package/dist/cjs/types/components/implementations/ModbusComponent.js.map +1 -0
  45. package/dist/cjs/types/components/implementations/OpcComponent.js +17 -0
  46. package/dist/cjs/types/components/implementations/OpcComponent.js.map +1 -0
  47. package/dist/cjs/types/components/implementations/OpcDaComponent.js +17 -0
  48. package/dist/cjs/types/components/implementations/OpcDaComponent.js.map +1 -0
  49. package/dist/cjs/types/components/implementations/OpcUaComponent.js +17 -0
  50. package/dist/cjs/types/components/implementations/OpcUaComponent.js.map +1 -0
  51. package/dist/cjs/types/components/implementations/PmonComponent.js +728 -0
  52. package/dist/cjs/types/components/implementations/PmonComponent.js.map +1 -0
  53. package/dist/cjs/types/components/implementations/RdbComponent.js +14 -0
  54. package/dist/cjs/types/components/implementations/RdbComponent.js.map +1 -0
  55. package/dist/cjs/types/components/implementations/ReduComponent.js +14 -0
  56. package/dist/cjs/types/components/implementations/ReduComponent.js.map +1 -0
  57. package/dist/cjs/types/components/implementations/ReportManagerComponent.js +14 -0
  58. package/dist/cjs/types/components/implementations/ReportManagerComponent.js.map +1 -0
  59. package/dist/cjs/types/components/implementations/S7Component.js +17 -0
  60. package/dist/cjs/types/components/implementations/S7Component.js.map +1 -0
  61. package/dist/cjs/types/components/implementations/S7TopSapComponent.js +17 -0
  62. package/dist/cjs/types/components/implementations/S7TopSapComponent.js.map +1 -0
  63. package/dist/cjs/types/components/implementations/SimComponent.js +17 -0
  64. package/dist/cjs/types/components/implementations/SimComponent.js.map +1 -0
  65. package/dist/cjs/types/components/implementations/SplitComponent.js +14 -0
  66. package/dist/cjs/types/components/implementations/SplitComponent.js.map +1 -0
  67. package/dist/cjs/types/components/implementations/UIComponent.js +36 -0
  68. package/dist/cjs/types/components/implementations/UIComponent.js.map +1 -0
  69. package/dist/cjs/types/components/implementations/ValueArchManagerComponent.js +14 -0
  70. package/dist/cjs/types/components/implementations/ValueArchManagerComponent.js.map +1 -0
  71. package/dist/cjs/types/components/implementations/VideoDriverComponent.js +14 -0
  72. package/dist/cjs/types/components/implementations/VideoDriverComponent.js.map +1 -0
  73. package/dist/cjs/types/components/implementations/VisionComponent.js +17 -0
  74. package/dist/cjs/types/components/implementations/VisionComponent.js.map +1 -0
  75. package/dist/cjs/types/components/implementations/WebUIComponent.js +17 -0
  76. package/dist/cjs/types/components/implementations/WebUIComponent.js.map +1 -0
  77. package/dist/cjs/types/components/implementations/index.js +74 -0
  78. package/dist/cjs/types/components/implementations/index.js.map +1 -0
  79. package/dist/cjs/types/index.js +23 -0
  80. package/dist/cjs/types/index.js.map +1 -0
  81. package/dist/cjs/types/localization/OaLanguage.js +136 -0
  82. package/dist/cjs/types/localization/OaLanguage.js.map +1 -0
  83. package/dist/cjs/types/logs/WinCCOAErrorHandler.js +94 -0
  84. package/dist/cjs/types/logs/WinCCOAErrorHandler.js.map +1 -0
  85. package/dist/cjs/types/logs/WinCCOALogEntry.js +3 -0
  86. package/dist/cjs/types/logs/WinCCOALogEntry.js.map +1 -0
  87. package/dist/cjs/types/logs/WinCCOALogParser.js +213 -0
  88. package/dist/cjs/types/logs/WinCCOALogParser.js.map +1 -0
  89. package/dist/cjs/types/project/CurrentProjectInfo.js +12 -0
  90. package/dist/cjs/types/project/CurrentProjectInfo.js.map +1 -0
  91. package/dist/cjs/types/project/ProjEnv.js +109 -0
  92. package/dist/cjs/types/project/ProjEnv.js.map +1 -0
  93. package/dist/cjs/types/project/ProjEnvErrorHandler.js +12 -0
  94. package/dist/cjs/types/project/ProjEnvErrorHandler.js.map +1 -0
  95. package/dist/cjs/types/project/ProjEnvPmonStatus.js +22 -0
  96. package/dist/cjs/types/project/ProjEnvPmonStatus.js.map +1 -0
  97. package/dist/cjs/types/project/ProjEnvProject.js +1015 -0
  98. package/dist/cjs/types/project/ProjEnvProject.js.map +1 -0
  99. package/dist/cjs/types/project/ProjEnvProjectConfig.js +327 -0
  100. package/dist/cjs/types/project/ProjEnvProjectConfig.js.map +1 -0
  101. package/dist/cjs/types/project/ProjEnvProjectRegistry.js +327 -0
  102. package/dist/cjs/types/project/ProjEnvProjectRegistry.js.map +1 -0
  103. package/dist/cjs/types/status/WinCCOAManager.js +3 -0
  104. package/dist/cjs/types/status/WinCCOAManager.js.map +1 -0
  105. package/dist/cjs/types/version/DetailedVersionInfo.js +6 -0
  106. package/dist/cjs/types/version/DetailedVersionInfo.js.map +1 -0
  107. package/dist/cjs/utils/index.js +25 -0
  108. package/dist/cjs/utils/index.js.map +1 -0
  109. package/dist/cjs/utils/winccoa-components.js +7 -0
  110. package/dist/cjs/utils/winccoa-components.js.map +1 -0
  111. package/dist/cjs/utils/winccoa-localization.js +12 -0
  112. package/dist/cjs/utils/winccoa-localization.js.map +1 -0
  113. package/dist/cjs/utils/winccoa-logging.js +3 -0
  114. package/dist/cjs/utils/winccoa-logging.js.map +1 -0
  115. package/dist/cjs/utils/winccoa-paths.js +222 -0
  116. package/dist/cjs/utils/winccoa-paths.js.map +1 -0
  117. package/dist/cjs/utils/winccoa-project-environment.js +73 -0
  118. package/dist/cjs/utils/winccoa-project-environment.js.map +1 -0
  119. package/dist/cjs/utils/winccoa-version-info.js +23 -0
  120. package/dist/cjs/utils/winccoa-version-info.js.map +1 -0
  121. package/dist/esm/index.js +8 -0
  122. package/dist/esm/index.js.map +1 -0
  123. package/dist/esm/types/components/WinCCOAComponent.js +290 -0
  124. package/dist/esm/types/components/WinCCOAComponent.js.map +1 -0
  125. package/dist/esm/types/components/implementations/AlertManagerComponent.js +10 -0
  126. package/dist/esm/types/components/implementations/AlertManagerComponent.js.map +1 -0
  127. package/dist/esm/types/components/implementations/AndroidComponent.js +13 -0
  128. package/dist/esm/types/components/implementations/AndroidComponent.js.map +1 -0
  129. package/dist/esm/types/components/implementations/ApiComponent.js +10 -0
  130. package/dist/esm/types/components/implementations/ApiComponent.js.map +1 -0
  131. package/dist/esm/types/components/implementations/AsciiManagerComponent.js +10 -0
  132. package/dist/esm/types/components/implementations/AsciiManagerComponent.js.map +1 -0
  133. package/dist/esm/types/components/implementations/ConfComponent.js +13 -0
  134. package/dist/esm/types/components/implementations/ConfComponent.js.map +1 -0
  135. package/dist/esm/types/components/implementations/CtrlComponent.js +30 -0
  136. package/dist/esm/types/components/implementations/CtrlComponent.js.map +1 -0
  137. package/dist/esm/types/components/implementations/DNP3Component.js +13 -0
  138. package/dist/esm/types/components/implementations/DNP3Component.js.map +1 -0
  139. package/dist/esm/types/components/implementations/DataComponent.js +13 -0
  140. package/dist/esm/types/components/implementations/DataComponent.js.map +1 -0
  141. package/dist/esm/types/components/implementations/DbManagerComponent.js +10 -0
  142. package/dist/esm/types/components/implementations/DbManagerComponent.js.map +1 -0
  143. package/dist/esm/types/components/implementations/DistComponent.js +10 -0
  144. package/dist/esm/types/components/implementations/DistComponent.js.map +1 -0
  145. package/dist/esm/types/components/implementations/DriverComponent.js +10 -0
  146. package/dist/esm/types/components/implementations/DriverComponent.js.map +1 -0
  147. package/dist/esm/types/components/implementations/EventComponent.js +13 -0
  148. package/dist/esm/types/components/implementations/EventComponent.js.map +1 -0
  149. package/dist/esm/types/components/implementations/HttpComponent.js +10 -0
  150. package/dist/esm/types/components/implementations/HttpComponent.js.map +1 -0
  151. package/dist/esm/types/components/implementations/IEC60870Component.js +13 -0
  152. package/dist/esm/types/components/implementations/IEC60870Component.js.map +1 -0
  153. package/dist/esm/types/components/implementations/IEC61850Component.js +13 -0
  154. package/dist/esm/types/components/implementations/IEC61850Component.js.map +1 -0
  155. package/dist/esm/types/components/implementations/IosComponent.js +13 -0
  156. package/dist/esm/types/components/implementations/IosComponent.js.map +1 -0
  157. package/dist/esm/types/components/implementations/JavaComponent.js +13 -0
  158. package/dist/esm/types/components/implementations/JavaComponent.js.map +1 -0
  159. package/dist/esm/types/components/implementations/JavaScriptComponent.js +13 -0
  160. package/dist/esm/types/components/implementations/JavaScriptComponent.js.map +1 -0
  161. package/dist/esm/types/components/implementations/ModbusComponent.js +13 -0
  162. package/dist/esm/types/components/implementations/ModbusComponent.js.map +1 -0
  163. package/dist/esm/types/components/implementations/OpcComponent.js +13 -0
  164. package/dist/esm/types/components/implementations/OpcComponent.js.map +1 -0
  165. package/dist/esm/types/components/implementations/OpcDaComponent.js +13 -0
  166. package/dist/esm/types/components/implementations/OpcDaComponent.js.map +1 -0
  167. package/dist/esm/types/components/implementations/OpcUaComponent.js +13 -0
  168. package/dist/esm/types/components/implementations/OpcUaComponent.js.map +1 -0
  169. package/dist/esm/types/components/implementations/PmonComponent.js +723 -0
  170. package/dist/esm/types/components/implementations/PmonComponent.js.map +1 -0
  171. package/dist/esm/types/components/implementations/RdbComponent.js +10 -0
  172. package/dist/esm/types/components/implementations/RdbComponent.js.map +1 -0
  173. package/dist/esm/types/components/implementations/ReduComponent.js +10 -0
  174. package/dist/esm/types/components/implementations/ReduComponent.js.map +1 -0
  175. package/dist/esm/types/components/implementations/ReportManagerComponent.js +10 -0
  176. package/dist/esm/types/components/implementations/ReportManagerComponent.js.map +1 -0
  177. package/dist/esm/types/components/implementations/S7Component.js +13 -0
  178. package/dist/esm/types/components/implementations/S7Component.js.map +1 -0
  179. package/dist/esm/types/components/implementations/S7TopSapComponent.js +13 -0
  180. package/dist/esm/types/components/implementations/S7TopSapComponent.js.map +1 -0
  181. package/dist/esm/types/components/implementations/SimComponent.js +13 -0
  182. package/dist/esm/types/components/implementations/SimComponent.js.map +1 -0
  183. package/dist/esm/types/components/implementations/SplitComponent.js +10 -0
  184. package/dist/esm/types/components/implementations/SplitComponent.js.map +1 -0
  185. package/dist/esm/types/components/implementations/UIComponent.js +32 -0
  186. package/dist/esm/types/components/implementations/UIComponent.js.map +1 -0
  187. package/dist/esm/types/components/implementations/ValueArchManagerComponent.js +10 -0
  188. package/dist/esm/types/components/implementations/ValueArchManagerComponent.js.map +1 -0
  189. package/dist/esm/types/components/implementations/VideoDriverComponent.js +10 -0
  190. package/dist/esm/types/components/implementations/VideoDriverComponent.js.map +1 -0
  191. package/dist/esm/types/components/implementations/VisionComponent.js +13 -0
  192. package/dist/esm/types/components/implementations/VisionComponent.js.map +1 -0
  193. package/dist/esm/types/components/implementations/WebUIComponent.js +13 -0
  194. package/dist/esm/types/components/implementations/WebUIComponent.js.map +1 -0
  195. package/dist/esm/types/components/implementations/index.js +36 -0
  196. package/dist/esm/types/components/implementations/index.js.map +1 -0
  197. package/dist/esm/types/index.js +7 -0
  198. package/dist/esm/types/index.js.map +1 -0
  199. package/dist/esm/types/localization/OaLanguage.js +132 -0
  200. package/dist/esm/types/localization/OaLanguage.js.map +1 -0
  201. package/dist/esm/types/logs/WinCCOAErrorHandler.js +90 -0
  202. package/dist/esm/types/logs/WinCCOAErrorHandler.js.map +1 -0
  203. package/dist/esm/types/logs/WinCCOALogEntry.js +2 -0
  204. package/dist/esm/types/logs/WinCCOALogEntry.js.map +1 -0
  205. package/dist/esm/types/logs/WinCCOALogParser.js +176 -0
  206. package/dist/esm/types/logs/WinCCOALogParser.js.map +1 -0
  207. package/dist/esm/types/project/CurrentProjectInfo.js +11 -0
  208. package/dist/esm/types/project/CurrentProjectInfo.js.map +1 -0
  209. package/dist/esm/types/project/ProjEnv.js +103 -0
  210. package/dist/esm/types/project/ProjEnv.js.map +1 -0
  211. package/dist/esm/types/project/ProjEnvErrorHandler.js +8 -0
  212. package/dist/esm/types/project/ProjEnvErrorHandler.js.map +1 -0
  213. package/dist/esm/types/project/ProjEnvPmonStatus.js +18 -0
  214. package/dist/esm/types/project/ProjEnvPmonStatus.js.map +1 -0
  215. package/dist/esm/types/project/ProjEnvProject.js +1008 -0
  216. package/dist/esm/types/project/ProjEnvProject.js.map +1 -0
  217. package/dist/esm/types/project/ProjEnvProjectConfig.js +287 -0
  218. package/dist/esm/types/project/ProjEnvProjectConfig.js.map +1 -0
  219. package/dist/esm/types/project/ProjEnvProjectRegistry.js +283 -0
  220. package/dist/esm/types/project/ProjEnvProjectRegistry.js.map +1 -0
  221. package/dist/esm/types/status/WinCCOAManager.js +2 -0
  222. package/dist/esm/types/status/WinCCOAManager.js.map +1 -0
  223. package/dist/esm/types/version/DetailedVersionInfo.js +5 -0
  224. package/dist/esm/types/version/DetailedVersionInfo.js.map +1 -0
  225. package/dist/esm/utils/index.js +9 -0
  226. package/dist/esm/utils/index.js.map +1 -0
  227. package/dist/esm/utils/winccoa-components.js +4 -0
  228. package/dist/esm/utils/winccoa-components.js.map +1 -0
  229. package/dist/esm/utils/winccoa-localization.js +9 -0
  230. package/dist/esm/utils/winccoa-localization.js.map +1 -0
  231. package/dist/esm/utils/winccoa-logging.js +3 -0
  232. package/dist/esm/utils/winccoa-logging.js.map +1 -0
  233. package/dist/esm/utils/winccoa-paths.js +184 -0
  234. package/dist/esm/utils/winccoa-paths.js.map +1 -0
  235. package/dist/esm/utils/winccoa-project-environment.js +66 -0
  236. package/dist/esm/utils/winccoa-project-environment.js.map +1 -0
  237. package/dist/esm/utils/winccoa-version-info.js +20 -0
  238. package/dist/esm/utils/winccoa-version-info.js.map +1 -0
  239. package/dist/index.d.ts +7 -0
  240. package/dist/index.d.ts.map +1 -0
  241. package/dist/types/components/WinCCOAComponent.d.ts +138 -0
  242. package/dist/types/components/WinCCOAComponent.d.ts.map +1 -0
  243. package/dist/types/components/implementations/AlertManagerComponent.d.ts +6 -0
  244. package/dist/types/components/implementations/AlertManagerComponent.d.ts.map +1 -0
  245. package/dist/types/components/implementations/AndroidComponent.d.ts +9 -0
  246. package/dist/types/components/implementations/AndroidComponent.d.ts.map +1 -0
  247. package/dist/types/components/implementations/ApiComponent.d.ts +6 -0
  248. package/dist/types/components/implementations/ApiComponent.d.ts.map +1 -0
  249. package/dist/types/components/implementations/AsciiManagerComponent.d.ts +6 -0
  250. package/dist/types/components/implementations/AsciiManagerComponent.d.ts.map +1 -0
  251. package/dist/types/components/implementations/ConfComponent.d.ts +9 -0
  252. package/dist/types/components/implementations/ConfComponent.d.ts.map +1 -0
  253. package/dist/types/components/implementations/CtrlComponent.d.ts +10 -0
  254. package/dist/types/components/implementations/CtrlComponent.d.ts.map +1 -0
  255. package/dist/types/components/implementations/DNP3Component.d.ts +9 -0
  256. package/dist/types/components/implementations/DNP3Component.d.ts.map +1 -0
  257. package/dist/types/components/implementations/DataComponent.d.ts +9 -0
  258. package/dist/types/components/implementations/DataComponent.d.ts.map +1 -0
  259. package/dist/types/components/implementations/DbManagerComponent.d.ts +6 -0
  260. package/dist/types/components/implementations/DbManagerComponent.d.ts.map +1 -0
  261. package/dist/types/components/implementations/DistComponent.d.ts +6 -0
  262. package/dist/types/components/implementations/DistComponent.d.ts.map +1 -0
  263. package/dist/types/components/implementations/DriverComponent.d.ts +6 -0
  264. package/dist/types/components/implementations/DriverComponent.d.ts.map +1 -0
  265. package/dist/types/components/implementations/EventComponent.d.ts +9 -0
  266. package/dist/types/components/implementations/EventComponent.d.ts.map +1 -0
  267. package/dist/types/components/implementations/HttpComponent.d.ts +6 -0
  268. package/dist/types/components/implementations/HttpComponent.d.ts.map +1 -0
  269. package/dist/types/components/implementations/IEC60870Component.d.ts +9 -0
  270. package/dist/types/components/implementations/IEC60870Component.d.ts.map +1 -0
  271. package/dist/types/components/implementations/IEC61850Component.d.ts +9 -0
  272. package/dist/types/components/implementations/IEC61850Component.d.ts.map +1 -0
  273. package/dist/types/components/implementations/IosComponent.d.ts +9 -0
  274. package/dist/types/components/implementations/IosComponent.d.ts.map +1 -0
  275. package/dist/types/components/implementations/JavaComponent.d.ts +9 -0
  276. package/dist/types/components/implementations/JavaComponent.d.ts.map +1 -0
  277. package/dist/types/components/implementations/JavaScriptComponent.d.ts +9 -0
  278. package/dist/types/components/implementations/JavaScriptComponent.d.ts.map +1 -0
  279. package/dist/types/components/implementations/ModbusComponent.d.ts +9 -0
  280. package/dist/types/components/implementations/ModbusComponent.d.ts.map +1 -0
  281. package/dist/types/components/implementations/OpcComponent.d.ts +9 -0
  282. package/dist/types/components/implementations/OpcComponent.d.ts.map +1 -0
  283. package/dist/types/components/implementations/OpcDaComponent.d.ts +9 -0
  284. package/dist/types/components/implementations/OpcDaComponent.d.ts.map +1 -0
  285. package/dist/types/components/implementations/OpcUaComponent.d.ts +9 -0
  286. package/dist/types/components/implementations/OpcUaComponent.d.ts.map +1 -0
  287. package/dist/types/components/implementations/PmonComponent.d.ts +168 -0
  288. package/dist/types/components/implementations/PmonComponent.d.ts.map +1 -0
  289. package/dist/types/components/implementations/RdbComponent.d.ts +6 -0
  290. package/dist/types/components/implementations/RdbComponent.d.ts.map +1 -0
  291. package/dist/types/components/implementations/ReduComponent.d.ts +6 -0
  292. package/dist/types/components/implementations/ReduComponent.d.ts.map +1 -0
  293. package/dist/types/components/implementations/ReportManagerComponent.d.ts +6 -0
  294. package/dist/types/components/implementations/ReportManagerComponent.d.ts.map +1 -0
  295. package/dist/types/components/implementations/S7Component.d.ts +9 -0
  296. package/dist/types/components/implementations/S7Component.d.ts.map +1 -0
  297. package/dist/types/components/implementations/S7TopSapComponent.d.ts +9 -0
  298. package/dist/types/components/implementations/S7TopSapComponent.d.ts.map +1 -0
  299. package/dist/types/components/implementations/SimComponent.d.ts +9 -0
  300. package/dist/types/components/implementations/SimComponent.d.ts.map +1 -0
  301. package/dist/types/components/implementations/SplitComponent.d.ts +6 -0
  302. package/dist/types/components/implementations/SplitComponent.d.ts.map +1 -0
  303. package/dist/types/components/implementations/UIComponent.d.ts +13 -0
  304. package/dist/types/components/implementations/UIComponent.d.ts.map +1 -0
  305. package/dist/types/components/implementations/ValueArchManagerComponent.d.ts +6 -0
  306. package/dist/types/components/implementations/ValueArchManagerComponent.d.ts.map +1 -0
  307. package/dist/types/components/implementations/VideoDriverComponent.d.ts +6 -0
  308. package/dist/types/components/implementations/VideoDriverComponent.d.ts.map +1 -0
  309. package/dist/types/components/implementations/VisionComponent.d.ts +9 -0
  310. package/dist/types/components/implementations/VisionComponent.d.ts.map +1 -0
  311. package/dist/types/components/implementations/WebUIComponent.d.ts +9 -0
  312. package/dist/types/components/implementations/WebUIComponent.d.ts.map +1 -0
  313. package/dist/types/components/implementations/index.d.ts +36 -0
  314. package/dist/types/components/implementations/index.d.ts.map +1 -0
  315. package/dist/types/index.d.ts +7 -0
  316. package/dist/types/index.d.ts.map +1 -0
  317. package/dist/types/localization/OaLanguage.d.ts +101 -0
  318. package/dist/types/localization/OaLanguage.d.ts.map +1 -0
  319. package/dist/types/logs/WinCCOAErrorHandler.d.ts +35 -0
  320. package/dist/types/logs/WinCCOAErrorHandler.d.ts.map +1 -0
  321. package/dist/types/logs/WinCCOALogEntry.d.ts +12 -0
  322. package/dist/types/logs/WinCCOALogEntry.d.ts.map +1 -0
  323. package/dist/types/logs/WinCCOALogParser.d.ts +53 -0
  324. package/dist/types/logs/WinCCOALogParser.d.ts.map +1 -0
  325. package/dist/types/project/CurrentProjectInfo.d.ts +24 -0
  326. package/dist/types/project/CurrentProjectInfo.d.ts.map +1 -0
  327. package/dist/types/project/ProjEnv.d.ts +73 -0
  328. package/dist/types/project/ProjEnv.d.ts.map +1 -0
  329. package/dist/types/project/ProjEnvErrorHandler.d.ts +6 -0
  330. package/dist/types/project/ProjEnvErrorHandler.d.ts.map +1 -0
  331. package/dist/types/project/ProjEnvPmonStatus.d.ts +23 -0
  332. package/dist/types/project/ProjEnvPmonStatus.d.ts.map +1 -0
  333. package/dist/types/project/ProjEnvProject.d.ts +475 -0
  334. package/dist/types/project/ProjEnvProject.d.ts.map +1 -0
  335. package/dist/types/project/ProjEnvProjectConfig.d.ts +54 -0
  336. package/dist/types/project/ProjEnvProjectConfig.d.ts.map +1 -0
  337. package/dist/types/project/ProjEnvProjectRegistry.d.ts +61 -0
  338. package/dist/types/project/ProjEnvProjectRegistry.d.ts.map +1 -0
  339. package/dist/types/status/WinCCOAManager.d.ts +15 -0
  340. package/dist/types/status/WinCCOAManager.d.ts.map +1 -0
  341. package/dist/types/version/DetailedVersionInfo.d.ts +16 -0
  342. package/dist/types/version/DetailedVersionInfo.d.ts.map +1 -0
  343. package/dist/utils/index.d.ts +9 -0
  344. package/dist/utils/index.d.ts.map +1 -0
  345. package/dist/utils/winccoa-components.d.ts +3 -0
  346. package/dist/utils/winccoa-components.d.ts.map +1 -0
  347. package/dist/utils/winccoa-localization.d.ts +7 -0
  348. package/dist/utils/winccoa-localization.d.ts.map +1 -0
  349. package/dist/utils/winccoa-logging.d.ts +1 -0
  350. package/dist/utils/winccoa-logging.d.ts.map +1 -0
  351. package/dist/utils/winccoa-paths.d.ts +49 -0
  352. package/dist/utils/winccoa-paths.d.ts.map +1 -0
  353. package/dist/utils/winccoa-project-environment.d.ts +34 -0
  354. package/dist/utils/winccoa-project-environment.d.ts.map +1 -0
  355. package/dist/utils/winccoa-version-info.d.ts +14 -0
  356. package/dist/utils/winccoa-version-info.d.ts.map +1 -0
  357. package/package.json +70 -0
@@ -0,0 +1,327 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.getRegisteredProjects = getRegisteredProjects;
40
+ exports.getRegisteredProducts = getRegisteredProducts;
41
+ exports.findProjectRegistryById = findProjectRegistryById;
42
+ exports.getProductByVersion = getProductByVersion;
43
+ exports.getLastUsedProjectDir = getLastUsedProjectDir;
44
+ exports.reloadProjectRegistries = reloadProjectRegistries;
45
+ const os = __importStar(require("os"));
46
+ const fs = __importStar(require("fs"));
47
+ const path_1 = __importDefault(require("path"));
48
+ /**
49
+ * Cache for registered projects loaded from pvssInst.conf.
50
+ * Automatically refreshed when the configuration file changes.
51
+ */
52
+ let registeredProjectsCache;
53
+ /**
54
+ * Cache for registered products (WinCC OA installations) loaded from pvssInst.conf.
55
+ * Automatically refreshed when the configuration file changes.
56
+ */
57
+ let registeredProducts;
58
+ /**
59
+ * File system watcher for pvssInst.conf.
60
+ * Monitors changes to the configuration file and triggers cache refresh.
61
+ */
62
+ let fileWatcher;
63
+ /**
64
+ * Debounce timeout handle for file change events.
65
+ * Prevents multiple rapid reloads by waiting 500ms after the last change.
66
+ */
67
+ let reloadTimeout;
68
+ /**
69
+ * Retrieves all registered WinCC OA projects from the system configuration.
70
+ * Loads from pvssInst.conf on first call and caches the results.
71
+ * The cache is automatically refreshed when the configuration file changes.
72
+ *
73
+ * @returns Array of all registered project configurations
74
+ */
75
+ function getRegisteredProjects() {
76
+ loadProjectRegistries();
77
+ return registeredProjectsCache;
78
+ }
79
+ /**
80
+ * Retrieves all registered WinCC OA product installations (versions) from the system.
81
+ * Loads from pvssInst.conf on first call and caches the results.
82
+ * The cache is automatically refreshed when the configuration file changes.
83
+ *
84
+ * @returns Array of all registered product (version) configurations
85
+ */
86
+ function getRegisteredProducts() {
87
+ loadProjectRegistries();
88
+ return registeredProducts;
89
+ }
90
+ /**
91
+ * Finds a registered project by its unique identifier.
92
+ *
93
+ * @param id - The project ID to search for
94
+ * @returns Project registry entry if found, undefined otherwise
95
+ */
96
+ function findProjectRegistryById(id) {
97
+ return getRegisteredProjects().find((projRegistry) => projRegistry.id === id);
98
+ }
99
+ function getProductByVersion(version) {
100
+ loadProjectRegistries();
101
+ return registeredProducts.find((product) => product.id === version);
102
+ }
103
+ function getLastUsedProjectDir(version) {
104
+ loadProjectRegistries();
105
+ return getProductByVersion(version)?.lastUsedProjectDir;
106
+ }
107
+ /**
108
+ * Forces an immediate reload of project registries from pvssInst.conf.
109
+ * Useful when you need to ensure the cache is up-to-date.
110
+ * Note: File watching with automatic reload is already active, so this
111
+ * is typically only needed for manual refresh scenarios.
112
+ */
113
+ function reloadProjectRegistries() {
114
+ loadProjectRegistries();
115
+ }
116
+ /**
117
+ * Internal function that loads project registries from pvssInst.conf and sets up file watching.
118
+ *
119
+ * **File Watching Behavior:**
120
+ * - Sets up a file system watcher on first call to monitor pvssInst.conf
121
+ * - Uses debouncing (500ms) to handle rapid successive file changes
122
+ * - Prevents premature reads of incomplete file writes
123
+ * - Automatically updates cache when changes are detected
124
+ *
125
+ * **Debouncing Strategy:**
126
+ * Multiple file change events within 500ms are collapsed into a single reload.
127
+ * This ensures the file is fully written and prevents performance issues from
128
+ * excessive parsing during bulk operations.
129
+ *
130
+ * The watcher remains active for the lifetime of the process.
131
+ */
132
+ function loadProjectRegistries() {
133
+ if (fileWatcher) {
134
+ return;
135
+ }
136
+ const configPath = getPvssInstConfPath();
137
+ parseProjRegistryFile(configPath);
138
+ // Set up file watcher to refresh cache when pvssInst.conf changes
139
+ if (!fileWatcher && fs.existsSync(configPath)) {
140
+ try {
141
+ console.log(`[${new Date().toISOString()}] Setting up file watcher for pvssInst.conf:`, configPath);
142
+ fileWatcher = fs.watch(configPath, (eventType) => {
143
+ if (eventType === 'change') {
144
+ // Debounce file changes - wait 500ms after last change before reloading
145
+ if (reloadTimeout) {
146
+ clearTimeout(reloadTimeout);
147
+ }
148
+ // console.log(
149
+ // `[${new Date().toISOString()}] pvssInst.conf change detected, scheduling reload in 100ms`,
150
+ // );
151
+ reloadTimeout = setTimeout(() => {
152
+ console.log(`[${new Date().toISOString()}] pvssInst.conf changed, reloading project registries`);
153
+ reloadTimeout = undefined;
154
+ console.log(`[${new Date().toISOString()}] Reloading project registries. Current cache size: ${registeredProjectsCache.length}`);
155
+ try {
156
+ parseProjRegistryFile(configPath);
157
+ console.log(`[${new Date().toISOString()}] Project registries reloaded. Current cache size: ${registeredProjectsCache.length}`);
158
+ }
159
+ catch (error) {
160
+ console.error(`[${new Date().toISOString()}] Failed to parse pvssInst.conf:`, error instanceof Error ? error.message : String(error));
161
+ // Clear cache on parse error to prevent corrupt state
162
+ registeredProjectsCache = [];
163
+ registeredProducts = [];
164
+ console.warn(`[${new Date().toISOString()}] Cleared project registry cache due to parse error`);
165
+ }
166
+ }, 100);
167
+ }
168
+ });
169
+ // Handle watcher errors to prevent crashes
170
+ fileWatcher.on('error', (error) => {
171
+ console.error(`[${new Date().toISOString()}] File watcher error for pvssInst.conf:`, error);
172
+ // Close watcher on error to prevent infinite loop
173
+ if (fileWatcher) {
174
+ fileWatcher.close();
175
+ fileWatcher = undefined;
176
+ }
177
+ console.warn(`[${new Date().toISOString()}] File watcher closed due to error. Manual refresh required.`);
178
+ });
179
+ }
180
+ catch (error) {
181
+ // Silently fail if file watching is not supported
182
+ console.warn(`[${new Date().toISOString()}] Could not create file watcher for pvssInst.conf:`, error);
183
+ }
184
+ }
185
+ }
186
+ function parseProjRegistryFile(configPath) {
187
+ console.log(`[${new Date().toISOString()}] Loading project registries from ${configPath}`);
188
+ if (!fs.existsSync(configPath)) {
189
+ throw new Error(`The WinCC OA is probably not installed. The pvssInst.conf file not found at path: ${configPath}`);
190
+ }
191
+ const content = fs.readFileSync(configPath, 'utf-8');
192
+ const lines = content.split('\n');
193
+ const projects = [];
194
+ const products = [];
195
+ let currentProjectSection = {
196
+ currentProject: false,
197
+ id: '',
198
+ installationDir: '',
199
+ notRunnable: true,
200
+ installationDate: '',
201
+ installationVersion: undefined,
202
+ };
203
+ let lastUsedProjectDir = '';
204
+ let currentproject = '';
205
+ let inProductSection = false;
206
+ for (const line of lines) {
207
+ const trimmedLine = line.trim();
208
+ if (trimmedLine.startsWith('[') && trimmedLine.endsWith(']')) {
209
+ // Save previous project if complete
210
+ if (inProductSection) {
211
+ const currentProductRegistry = currentProjectSection;
212
+ currentProductRegistry.lastUsedProjectDir = lastUsedProjectDir;
213
+ currentProductRegistry.currentproject = currentproject;
214
+ currentProductRegistry.notRunnable = true;
215
+ inProductSection = false;
216
+ products.push(currentProductRegistry);
217
+ }
218
+ else if (currentProjectSection.id != '') {
219
+ projects.push(currentProjectSection);
220
+ }
221
+ // Extract content inside the brackets
222
+ // Format: Software\<company>\<product>\Configs\<projectID>
223
+ // or: Software\<company>\<product>\<versionNumber>
224
+ const sectionPath = trimmedLine.slice(1, -1); // Remove [ and ]
225
+ const pathParts = sectionPath.split('\\');
226
+ // Extract project ID or version from the last part of the path
227
+ const projectId = pathParts[pathParts.length - 1] || '';
228
+ // Start new project section
229
+ currentProjectSection = {
230
+ currentProject: false,
231
+ id: projectId,
232
+ installationDir: '',
233
+ notRunnable: true,
234
+ installationDate: '',
235
+ };
236
+ lastUsedProjectDir = '';
237
+ currentproject = '';
238
+ }
239
+ else if (trimmedLine.includes('=')) {
240
+ const [key, value] = trimmedLine.split('=', 2).map((s) => s.trim());
241
+ switch (key.toLowerCase()) {
242
+ case 'firstPAStart':
243
+ inProductSection = true;
244
+ break;
245
+ case 'currentproject':
246
+ currentproject = value.replace(/['"]/g, '');
247
+ inProductSection = true;
248
+ break;
249
+ case 'lastusedprojectdir':
250
+ lastUsedProjectDir = value.replace(/['"]/g, '');
251
+ inProductSection = true;
252
+ break;
253
+ case 'installationdir':
254
+ {
255
+ const entryValue = value.replace(/['"]/g, '');
256
+ const idFromPath = path_1.default.basename(entryValue);
257
+ if (idFromPath && idFromPath !== currentProjectSection.id) {
258
+ currentProjectSection.invalidReason = `Project ID mismatch in registry entry. Expected: ${currentProjectSection.id}, Found in path: ${idFromPath}`;
259
+ break;
260
+ }
261
+ currentProjectSection.installationDir = path_1.default.dirname(entryValue);
262
+ }
263
+ break;
264
+ case 'installationdate':
265
+ currentProjectSection.installationDate = value.replace(/['"]/g, '');
266
+ break;
267
+ case 'installationversion':
268
+ currentProjectSection.installationVersion = value.replace(/['"]/g, '');
269
+ break;
270
+ case 'notrunnable':
271
+ {
272
+ if (value === '0' || value === '"0"') {
273
+ currentProjectSection.notRunnable = false;
274
+ }
275
+ else {
276
+ currentProjectSection.notRunnable = true;
277
+ }
278
+ }
279
+ break;
280
+ case 'company':
281
+ currentProjectSection.company = value.replace(/['"]/g, '');
282
+ break;
283
+ case 'name':
284
+ currentProjectSection.name = value.replace(/['"]/g, '');
285
+ break;
286
+ case 'description':
287
+ currentProjectSection.description = value.replace(/['"]/g, '');
288
+ break;
289
+ }
290
+ }
291
+ }
292
+ // Don't forget the last project
293
+ if (inProductSection) {
294
+ const currentProductRegistry = currentProjectSection;
295
+ currentProductRegistry.lastUsedProjectDir = lastUsedProjectDir;
296
+ currentProductRegistry.currentproject = currentproject;
297
+ currentProductRegistry.notRunnable = true;
298
+ products.push(currentProductRegistry);
299
+ }
300
+ else if (currentProjectSection.id != '') {
301
+ projects.push(currentProjectSection);
302
+ }
303
+ registeredProjectsCache = projects;
304
+ registeredProducts = products;
305
+ // Debug logging
306
+ console.log(`[PVSS REGISTRY] Parsed pvssInst.conf:`);
307
+ console.log(`[PVSS REGISTRY] Total projects: ${projects.length}`);
308
+ console.log(`[PVSS REGISTRY] Total products: ${products.length}`);
309
+ projects.forEach((p) => {
310
+ console.log(`[PVSS REGISTRY] Project: ${p.id} - notRunnable=${p.notRunnable} (${p.notRunnable ? 'FILTERED OUT' : 'WILL SHOW'})`);
311
+ });
312
+ }
313
+ /**
314
+ * Gets the platform-specific path to the pvssInst.conf file
315
+ * @returns The full path to the pvssInst.conf file
316
+ */
317
+ function getPvssInstConfPath() {
318
+ if (os.platform() === 'win32') {
319
+ // Windows path
320
+ return 'C:\\ProgramData\\Siemens\\WinCC_OA\\pvssInst.conf';
321
+ }
322
+ else {
323
+ // Unix/Linux path
324
+ return '/etc/opt/pvss/pvssInst.conf';
325
+ }
326
+ }
327
+ //# sourceMappingURL=ProjEnvProjectRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProjEnvProjectRegistry.js","sourceRoot":"","sources":["../../../../src/types/project/ProjEnvProjectRegistry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0EA,sDAGC;AASD,sDAGC;AAQD,0DAEC;AAED,kDAGC;AAED,sDAGC;AAQD,0DAEC;AAvHD,uCAAyB;AACzB,uCAAyB;AACzB,gDAAwB;AAyCxB;;;GAGG;AACH,IAAI,uBAAiD,CAAC;AAEtD;;;GAGG;AACH,IAAI,kBAA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AAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;SAAM,IAAI,qBAAqB,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC;QACxC,QAAQ,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACzC,CAAC;IAED,uBAAuB,GAAG,QAAQ,CAAC;IACnC,kBAAkB,GAAG,QAAQ,CAAC;IAE9B,gBAAgB;IAChB,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC;IACrD,OAAO,CAAC,GAAG,CAAC,qCAAqC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IACpE,OAAO,CAAC,GAAG,CAAC,qCAAqC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAEpE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QACnB,OAAO,CAAC,GAAG,CACP,8BAA8B,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAAC,WAAW,KAAK,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,WAAW,GAAG,CACxH,CAAC;IACN,CAAC,CAAC,CAAC;AACP,CAAC;AAED;;;GAGG;AACH,SAAS,mBAAmB;IACxB,IAAI,EAAE,CAAC,QAAQ,EAAE,KAAK,OAAO,EAAE,CAAC;QAC5B,eAAe;QACf,OAAO,mDAAmD,CAAC;IAC/D,CAAC;SAAM,CAAC;QACJ,kBAAkB;QAClB,OAAO,6BAA6B,CAAC;IACzC,CAAC;AACL,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=WinCCOAManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WinCCOAManager.js","sourceRoot":"","sources":["../../../../src/types/status/WinCCOAManager.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * Detailed version information for WinCC OA components.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ //# sourceMappingURL=DetailedVersionInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailedVersionInfo.js","sourceRoot":"","sources":["../../../../src/types/version/DetailedVersionInfo.ts"],"names":[],"mappings":";AAAA;;GAEG"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /**
3
+ * Utility Functions
4
+ * Core utility functions for WinCC OA operations
5
+ */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ __exportStar(require("./winccoa-components"), exports);
22
+ __exportStar(require("./winccoa-paths"), exports);
23
+ __exportStar(require("./winccoa-project-environment"), exports);
24
+ __exportStar(require("./winccoa-version-info"), exports);
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;AAEH,uDAAqC;AACrC,kDAAgC;AAChC,gEAA8C;AAC9C,yDAAuC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getComponentName = getComponentName;
4
+ function getComponentName(component) {
5
+ return component.getName();
6
+ }
7
+ //# sourceMappingURL=winccoa-components.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"winccoa-components.js","sourceRoot":"","sources":["../../../src/utils/winccoa-components.ts"],"names":[],"mappings":";;AAEA,4CAEC;AAFD,SAAgB,gBAAgB,CAAC,SAA2B;IACxD,OAAO,SAAS,CAAC,OAAO,EAAE,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tr = tr;
4
+ /** Translatess given 'text' string into current user langauge
5
+ *
6
+ * TODO: implement localizations
7
+ *
8
+ */
9
+ function tr(text) {
10
+ return text;
11
+ }
12
+ //# sourceMappingURL=winccoa-localization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"winccoa-localization.js","sourceRoot":"","sources":["../../../src/utils/winccoa-localization.ts"],"names":[],"mappings":";;AAKA,gBAEC;AAPD;;;;GAIG;AACH,SAAgB,EAAE,CAAC,IAAY;IAC3B,OAAO,IAAI,CAAC;AAChB,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // todo export here WinCC OA logging features
3
+ //# sourceMappingURL=winccoa-logging.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"winccoa-logging.js","sourceRoot":"","sources":["../../../src/utils/winccoa-logging.ts"],"names":[],"mappings":";AAAA,6CAA6C"}
@@ -0,0 +1,222 @@
1
+ "use strict";
2
+ /**
3
+ * WinCC OA Installation Path Utilities
4
+ * Handles platform-specific path discovery and component path resolution
5
+ *
6
+ * PERFORMANCE OPTIMIZATION:
7
+ * This module implements aggressive caching to minimize expensive file system
8
+ * and Windows registry operations. Cached values persist for the lifetime of
9
+ * the extension.
10
+ *
11
+ * IMPORTANT: If WinCC OA is installed or removed while VS Code is running,
12
+ * the extension must be reloaded (or VS Code restarted) to detect the changes.
13
+ * This is an acceptable trade-off for the significant performance improvement.
14
+ *
15
+ * Cache Strategy:
16
+ * - Installation paths are cached per version in cachedWinCCOAInstallationPathByVersion
17
+ * - Available versions list is cached once in cachedAvailableWinCCOAVersions
18
+ * - Both caches persist until extension reload/restart
19
+ *
20
+ * @author mPokornyETM
21
+ * @performance Caching reduces registry queries and file system operations by ~95%
22
+ */
23
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
24
+ if (k2 === undefined) k2 = k;
25
+ var desc = Object.getOwnPropertyDescriptor(m, k);
26
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
27
+ desc = { enumerable: true, get: function() { return m[k]; } };
28
+ }
29
+ Object.defineProperty(o, k2, desc);
30
+ }) : (function(o, m, k, k2) {
31
+ if (k2 === undefined) k2 = k;
32
+ o[k2] = m[k];
33
+ }));
34
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
35
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
36
+ }) : function(o, v) {
37
+ o["default"] = v;
38
+ });
39
+ var __importStar = (this && this.__importStar) || (function () {
40
+ var ownKeys = function(o) {
41
+ ownKeys = Object.getOwnPropertyNames || function (o) {
42
+ var ar = [];
43
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
44
+ return ar;
45
+ };
46
+ return ownKeys(o);
47
+ };
48
+ return function (mod) {
49
+ if (mod && mod.__esModule) return mod;
50
+ var result = {};
51
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
52
+ __setModuleDefault(result, mod);
53
+ return result;
54
+ };
55
+ })();
56
+ Object.defineProperty(exports, "__esModule", { value: true });
57
+ exports.getWinCCOAInstallationPathByVersion = getWinCCOAInstallationPathByVersion;
58
+ exports.getAvailableWinCCOAVersions = getAvailableWinCCOAVersions;
59
+ exports.getWindowsAvailableVersions = getWindowsAvailableVersions;
60
+ const os = __importStar(require("os"));
61
+ const path = __importStar(require("path"));
62
+ const fs = __importStar(require("fs"));
63
+ const child_process_1 = require("child_process");
64
+ const winccoa_version_info_js_1 = require("./winccoa-version-info.js");
65
+ /**
66
+ * Cache for WinCC OA installation paths indexed by version
67
+ * Prevents redundant registry queries and file system checks
68
+ *
69
+ * Note: Cache persists for extension lifetime. Extension reload required
70
+ * if WinCC OA installations change.
71
+ */
72
+ const cachedWinCCOAInstallationPathByVersion = {};
73
+ /**
74
+ * Finds the WinCC OA installation path for a given version
75
+ *
76
+ * CACHED: This function caches results per version. First lookup for each version
77
+ * performs registry query (Windows) or file system check (Linux). Subsequent
78
+ * lookups return cached value immediately.
79
+ *
80
+ * @param version - WinCC OA version (e.g., "3.20", "3.21")
81
+ * @returns Installation path or null if not found
82
+ * @performance First call per version: ~50-100ms, subsequent calls: <1ms
83
+ */
84
+ function getWinCCOAInstallationPathByVersion(version) {
85
+ // Check cache first - even null results are cached to avoid repeated failed lookups
86
+ if (cachedWinCCOAInstallationPathByVersion[version] !== undefined) {
87
+ return cachedWinCCOAInstallationPathByVersion[version];
88
+ }
89
+ const platform = os.platform();
90
+ if (platform === 'win32') {
91
+ cachedWinCCOAInstallationPathByVersion[version] = getWindowsInstallationPath(version);
92
+ }
93
+ else {
94
+ // Unix/Linux systems
95
+ cachedWinCCOAInstallationPathByVersion[version] = getUnixInstallationPath(version);
96
+ }
97
+ return cachedWinCCOAInstallationPathByVersion[version];
98
+ }
99
+ /**
100
+ * Gets WinCC OA installation path from Windows registry
101
+ * @param version - WinCC OA version
102
+ * @returns Installation path or null if not found
103
+ */
104
+ function getWindowsInstallationPath(version) {
105
+ try {
106
+ // Try to read from registry using execFileSync to prevent shell injection
107
+ const regKey = `HKLM\\Software\\ETM\\WinCC_OA\\${version}`;
108
+ const args = ['query', regKey, '/v', 'INSTALLDIR'];
109
+ const output = (0, child_process_1.execFileSync)('reg', args, { encoding: 'utf-8' });
110
+ // Parse the output to extract the INSTALLDIR value
111
+ const match = output.match(/INSTALLDIR\s+REG_SZ\s+(.+)/);
112
+ if (match && match[1]) {
113
+ const installPath = match[1].trim();
114
+ if (fs.existsSync(installPath)) {
115
+ return installPath;
116
+ }
117
+ }
118
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
119
+ }
120
+ catch (error) {
121
+ // Registry key not found or command failed
122
+ // Fall back to default paths
123
+ }
124
+ return null;
125
+ }
126
+ /**
127
+ * Gets WinCC OA installation path on Unix/Linux systems
128
+ * @param version - WinCC OA version
129
+ * @returns Installation path or null if not found
130
+ */
131
+ function getUnixInstallationPath(version) {
132
+ const installPath = `/opt/WinCC_OA/${version}`;
133
+ if (fs.existsSync(installPath)) {
134
+ return installPath;
135
+ }
136
+ return null;
137
+ }
138
+ /**
139
+ * Cache for available WinCC OA versions list
140
+ * Prevents redundant registry enumeration and directory scanning
141
+ *
142
+ * Performance Impact:
143
+ * - Windows: Eliminates repeated "reg query" command executions (~100ms each)
144
+ * - Linux: Eliminates repeated directory scans of /opt/WinCC_OA
145
+ *
146
+ * Note: Set to null initially, populated on first call. Cache persists for
147
+ * extension lifetime. Extension reload required if WinCC OA versions change.
148
+ */
149
+ let cachedAvailableWinCCOAVersions = null;
150
+ /**
151
+ * Gets available WinCC OA versions installed on the system
152
+ *
153
+ * CACHED: This function caches its result on first call. Subsequent calls
154
+ * return the cached value immediately without any file system or registry access.
155
+ *
156
+ * @returns Array of version strings sorted from highest to lowest
157
+ * @performance First call: ~100-200ms, subsequent calls: <1ms
158
+ */
159
+ function getAvailableWinCCOAVersions() {
160
+ // Return cached result if available - avoids expensive registry/filesystem operations
161
+ if (cachedAvailableWinCCOAVersions !== null) {
162
+ return cachedAvailableWinCCOAVersions;
163
+ }
164
+ const platform = os.platform();
165
+ if (platform === 'win32') {
166
+ cachedAvailableWinCCOAVersions = getWindowsAvailableVersions();
167
+ }
168
+ else {
169
+ cachedAvailableWinCCOAVersions = getUnixAvailableVersions();
170
+ }
171
+ return cachedAvailableWinCCOAVersions;
172
+ }
173
+ /**
174
+ * Gets available WinCC OA versions on Windows
175
+ * @returns Array of version strings sorted from highest to lowest
176
+ */
177
+ function getWindowsAvailableVersions() {
178
+ const versions = [];
179
+ try {
180
+ // Try to read from registry
181
+ const regKey = 'HKLM\\Software\\ETM\\WinCC_OA';
182
+ const command = `reg query "${regKey}"`;
183
+ const output = (0, child_process_1.execSync)(command, { encoding: 'utf-8' });
184
+ const lines = output.split('\n');
185
+ for (const line of lines) {
186
+ const match = line.match(/WinCC_OA\\(\d+\.\d+(?:\.\d+)?)/);
187
+ if (match && match[1]) {
188
+ versions.push(match[1]);
189
+ }
190
+ }
191
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
192
+ }
193
+ catch (error) {
194
+ // Registry query failed, try common paths
195
+ }
196
+ // Sort versions descending
197
+ return versions.sort((a, b) => (0, winccoa_version_info_js_1.parseVersionString)(b) - (0, winccoa_version_info_js_1.parseVersionString)(a));
198
+ }
199
+ /**
200
+ * Gets available WinCC OA versions on Unix/Linux
201
+ * @returns Array of version strings sorted from highest to lowest
202
+ */
203
+ function getUnixAvailableVersions() {
204
+ const basePath = '/opt/WinCC_OA';
205
+ if (!fs.existsSync(basePath)) {
206
+ return [];
207
+ }
208
+ try {
209
+ const entries = fs.readdirSync(basePath);
210
+ const versions = entries.filter((entry) => {
211
+ const fullPath = path.join(basePath, entry);
212
+ return fs.statSync(fullPath).isDirectory() && /^\d+\.\d+/.test(entry);
213
+ });
214
+ // Sort versions descending
215
+ return versions.sort((a, b) => (0, winccoa_version_info_js_1.parseVersionString)(b) - (0, winccoa_version_info_js_1.parseVersionString)(a));
216
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
217
+ }
218
+ catch (error) {
219
+ return [];
220
+ }
221
+ }
222
+ //# sourceMappingURL=winccoa-paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"winccoa-paths.js","sourceRoot":"","sources":["../../../src/utils/winccoa-paths.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BH,kFAgBC;AAoED,kEAeC;AAMD,kEAwBC;AA3JD,uCAAyB;AACzB,2CAA6B;AAC7B,uC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