@winccoa-tools-pack/npm-winccoa-core 0.1.0-9ec3b86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +234 -0
- package/dist/cjs/index.js +24 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/types/components/WinCCOAComponent.js +327 -0
- package/dist/cjs/types/components/WinCCOAComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/AlertManagerComponent.js +14 -0
- package/dist/cjs/types/components/implementations/AlertManagerComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/AndroidComponent.js +17 -0
- package/dist/cjs/types/components/implementations/AndroidComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/ApiComponent.js +14 -0
- package/dist/cjs/types/components/implementations/ApiComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/AsciiManagerComponent.js +14 -0
- package/dist/cjs/types/components/implementations/AsciiManagerComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/ConfComponent.js +17 -0
- package/dist/cjs/types/components/implementations/ConfComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/CtrlComponent.js +34 -0
- package/dist/cjs/types/components/implementations/CtrlComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/DNP3Component.js +17 -0
- package/dist/cjs/types/components/implementations/DNP3Component.js.map +1 -0
- package/dist/cjs/types/components/implementations/DataComponent.js +17 -0
- package/dist/cjs/types/components/implementations/DataComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/DbManagerComponent.js +14 -0
- package/dist/cjs/types/components/implementations/DbManagerComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/DistComponent.js +14 -0
- package/dist/cjs/types/components/implementations/DistComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/DriverComponent.js +14 -0
- package/dist/cjs/types/components/implementations/DriverComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/EventComponent.js +17 -0
- package/dist/cjs/types/components/implementations/EventComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/HttpComponent.js +14 -0
- package/dist/cjs/types/components/implementations/HttpComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/IEC60870Component.js +17 -0
- package/dist/cjs/types/components/implementations/IEC60870Component.js.map +1 -0
- package/dist/cjs/types/components/implementations/IEC61850Component.js +17 -0
- package/dist/cjs/types/components/implementations/IEC61850Component.js.map +1 -0
- package/dist/cjs/types/components/implementations/IosComponent.js +17 -0
- package/dist/cjs/types/components/implementations/IosComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/JavaComponent.js +17 -0
- package/dist/cjs/types/components/implementations/JavaComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/JavaScriptComponent.js +17 -0
- package/dist/cjs/types/components/implementations/JavaScriptComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/ModbusComponent.js +17 -0
- package/dist/cjs/types/components/implementations/ModbusComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/OpcComponent.js +17 -0
- package/dist/cjs/types/components/implementations/OpcComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/OpcDaComponent.js +17 -0
- package/dist/cjs/types/components/implementations/OpcDaComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/OpcUaComponent.js +17 -0
- package/dist/cjs/types/components/implementations/OpcUaComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/PmonComponent.js +728 -0
- package/dist/cjs/types/components/implementations/PmonComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/RdbComponent.js +14 -0
- package/dist/cjs/types/components/implementations/RdbComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/ReduComponent.js +14 -0
- package/dist/cjs/types/components/implementations/ReduComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/ReportManagerComponent.js +14 -0
- package/dist/cjs/types/components/implementations/ReportManagerComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/S7Component.js +17 -0
- package/dist/cjs/types/components/implementations/S7Component.js.map +1 -0
- package/dist/cjs/types/components/implementations/S7TopSapComponent.js +17 -0
- package/dist/cjs/types/components/implementations/S7TopSapComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/SimComponent.js +17 -0
- package/dist/cjs/types/components/implementations/SimComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/SplitComponent.js +14 -0
- package/dist/cjs/types/components/implementations/SplitComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/UIComponent.js +36 -0
- package/dist/cjs/types/components/implementations/UIComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/ValueArchManagerComponent.js +14 -0
- package/dist/cjs/types/components/implementations/ValueArchManagerComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/VideoDriverComponent.js +14 -0
- package/dist/cjs/types/components/implementations/VideoDriverComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/VisionComponent.js +17 -0
- package/dist/cjs/types/components/implementations/VisionComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/WebUIComponent.js +17 -0
- package/dist/cjs/types/components/implementations/WebUIComponent.js.map +1 -0
- package/dist/cjs/types/components/implementations/index.js +74 -0
- package/dist/cjs/types/components/implementations/index.js.map +1 -0
- package/dist/cjs/types/index.js +23 -0
- package/dist/cjs/types/index.js.map +1 -0
- package/dist/cjs/types/localization/OaLanguage.js +136 -0
- package/dist/cjs/types/localization/OaLanguage.js.map +1 -0
- package/dist/cjs/types/logs/WinCCOAErrorHandler.js +94 -0
- package/dist/cjs/types/logs/WinCCOAErrorHandler.js.map +1 -0
- package/dist/cjs/types/logs/WinCCOALogEntry.js +3 -0
- package/dist/cjs/types/logs/WinCCOALogEntry.js.map +1 -0
- package/dist/cjs/types/logs/WinCCOALogParser.js +213 -0
- package/dist/cjs/types/logs/WinCCOALogParser.js.map +1 -0
- package/dist/cjs/types/project/CurrentProjectInfo.js +12 -0
- package/dist/cjs/types/project/CurrentProjectInfo.js.map +1 -0
- package/dist/cjs/types/project/ProjEnv.js +109 -0
- package/dist/cjs/types/project/ProjEnv.js.map +1 -0
- package/dist/cjs/types/project/ProjEnvErrorHandler.js +12 -0
- package/dist/cjs/types/project/ProjEnvErrorHandler.js.map +1 -0
- package/dist/cjs/types/project/ProjEnvPmonStatus.js +22 -0
- package/dist/cjs/types/project/ProjEnvPmonStatus.js.map +1 -0
- package/dist/cjs/types/project/ProjEnvProject.js +1015 -0
- package/dist/cjs/types/project/ProjEnvProject.js.map +1 -0
- package/dist/cjs/types/project/ProjEnvProjectConfig.js +327 -0
- package/dist/cjs/types/project/ProjEnvProjectConfig.js.map +1 -0
- package/dist/cjs/types/project/ProjEnvProjectRegistry.js +301 -0
- package/dist/cjs/types/project/ProjEnvProjectRegistry.js.map +1 -0
- package/dist/cjs/types/status/WinCCOAManager.js +3 -0
- package/dist/cjs/types/status/WinCCOAManager.js.map +1 -0
- package/dist/cjs/types/version/DetailedVersionInfo.js +6 -0
- package/dist/cjs/types/version/DetailedVersionInfo.js.map +1 -0
- package/dist/cjs/utils/index.js +25 -0
- package/dist/cjs/utils/index.js.map +1 -0
- package/dist/cjs/utils/winccoa-components.js +7 -0
- package/dist/cjs/utils/winccoa-components.js.map +1 -0
- package/dist/cjs/utils/winccoa-localization.js +12 -0
- package/dist/cjs/utils/winccoa-localization.js.map +1 -0
- package/dist/cjs/utils/winccoa-logging.js +3 -0
- package/dist/cjs/utils/winccoa-logging.js.map +1 -0
- package/dist/cjs/utils/winccoa-paths.js +222 -0
- package/dist/cjs/utils/winccoa-paths.js.map +1 -0
- package/dist/cjs/utils/winccoa-project-environment.js +73 -0
- package/dist/cjs/utils/winccoa-project-environment.js.map +1 -0
- package/dist/cjs/utils/winccoa-version-info.js +23 -0
- package/dist/cjs/utils/winccoa-version-info.js.map +1 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/types/components/WinCCOAComponent.js +290 -0
- package/dist/esm/types/components/WinCCOAComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/AlertManagerComponent.js +10 -0
- package/dist/esm/types/components/implementations/AlertManagerComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/AndroidComponent.js +13 -0
- package/dist/esm/types/components/implementations/AndroidComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/ApiComponent.js +10 -0
- package/dist/esm/types/components/implementations/ApiComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/AsciiManagerComponent.js +10 -0
- package/dist/esm/types/components/implementations/AsciiManagerComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/ConfComponent.js +13 -0
- package/dist/esm/types/components/implementations/ConfComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/CtrlComponent.js +30 -0
- package/dist/esm/types/components/implementations/CtrlComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/DNP3Component.js +13 -0
- package/dist/esm/types/components/implementations/DNP3Component.js.map +1 -0
- package/dist/esm/types/components/implementations/DataComponent.js +13 -0
- package/dist/esm/types/components/implementations/DataComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/DbManagerComponent.js +10 -0
- package/dist/esm/types/components/implementations/DbManagerComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/DistComponent.js +10 -0
- package/dist/esm/types/components/implementations/DistComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/DriverComponent.js +10 -0
- package/dist/esm/types/components/implementations/DriverComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/EventComponent.js +13 -0
- package/dist/esm/types/components/implementations/EventComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/HttpComponent.js +10 -0
- package/dist/esm/types/components/implementations/HttpComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/IEC60870Component.js +13 -0
- package/dist/esm/types/components/implementations/IEC60870Component.js.map +1 -0
- package/dist/esm/types/components/implementations/IEC61850Component.js +13 -0
- package/dist/esm/types/components/implementations/IEC61850Component.js.map +1 -0
- package/dist/esm/types/components/implementations/IosComponent.js +13 -0
- package/dist/esm/types/components/implementations/IosComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/JavaComponent.js +13 -0
- package/dist/esm/types/components/implementations/JavaComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/JavaScriptComponent.js +13 -0
- package/dist/esm/types/components/implementations/JavaScriptComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/ModbusComponent.js +13 -0
- package/dist/esm/types/components/implementations/ModbusComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/OpcComponent.js +13 -0
- package/dist/esm/types/components/implementations/OpcComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/OpcDaComponent.js +13 -0
- package/dist/esm/types/components/implementations/OpcDaComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/OpcUaComponent.js +13 -0
- package/dist/esm/types/components/implementations/OpcUaComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/PmonComponent.js +723 -0
- package/dist/esm/types/components/implementations/PmonComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/RdbComponent.js +10 -0
- package/dist/esm/types/components/implementations/RdbComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/ReduComponent.js +10 -0
- package/dist/esm/types/components/implementations/ReduComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/ReportManagerComponent.js +10 -0
- package/dist/esm/types/components/implementations/ReportManagerComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/S7Component.js +13 -0
- package/dist/esm/types/components/implementations/S7Component.js.map +1 -0
- package/dist/esm/types/components/implementations/S7TopSapComponent.js +13 -0
- package/dist/esm/types/components/implementations/S7TopSapComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/SimComponent.js +13 -0
- package/dist/esm/types/components/implementations/SimComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/SplitComponent.js +10 -0
- package/dist/esm/types/components/implementations/SplitComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/UIComponent.js +32 -0
- package/dist/esm/types/components/implementations/UIComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/ValueArchManagerComponent.js +10 -0
- package/dist/esm/types/components/implementations/ValueArchManagerComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/VideoDriverComponent.js +10 -0
- package/dist/esm/types/components/implementations/VideoDriverComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/VisionComponent.js +13 -0
- package/dist/esm/types/components/implementations/VisionComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/WebUIComponent.js +13 -0
- package/dist/esm/types/components/implementations/WebUIComponent.js.map +1 -0
- package/dist/esm/types/components/implementations/index.js +36 -0
- package/dist/esm/types/components/implementations/index.js.map +1 -0
- package/dist/esm/types/index.js +7 -0
- package/dist/esm/types/index.js.map +1 -0
- package/dist/esm/types/localization/OaLanguage.js +132 -0
- package/dist/esm/types/localization/OaLanguage.js.map +1 -0
- package/dist/esm/types/logs/WinCCOAErrorHandler.js +90 -0
- package/dist/esm/types/logs/WinCCOAErrorHandler.js.map +1 -0
- package/dist/esm/types/logs/WinCCOALogEntry.js +2 -0
- package/dist/esm/types/logs/WinCCOALogEntry.js.map +1 -0
- package/dist/esm/types/logs/WinCCOALogParser.js +176 -0
- package/dist/esm/types/logs/WinCCOALogParser.js.map +1 -0
- package/dist/esm/types/project/CurrentProjectInfo.js +11 -0
- package/dist/esm/types/project/CurrentProjectInfo.js.map +1 -0
- package/dist/esm/types/project/ProjEnv.js +103 -0
- package/dist/esm/types/project/ProjEnv.js.map +1 -0
- package/dist/esm/types/project/ProjEnvErrorHandler.js +8 -0
- package/dist/esm/types/project/ProjEnvErrorHandler.js.map +1 -0
- package/dist/esm/types/project/ProjEnvPmonStatus.js +18 -0
- package/dist/esm/types/project/ProjEnvPmonStatus.js.map +1 -0
- package/dist/esm/types/project/ProjEnvProject.js +1008 -0
- package/dist/esm/types/project/ProjEnvProject.js.map +1 -0
- package/dist/esm/types/project/ProjEnvProjectConfig.js +287 -0
- package/dist/esm/types/project/ProjEnvProjectConfig.js.map +1 -0
- package/dist/esm/types/project/ProjEnvProjectRegistry.js +257 -0
- package/dist/esm/types/project/ProjEnvProjectRegistry.js.map +1 -0
- package/dist/esm/types/status/WinCCOAManager.js +2 -0
- package/dist/esm/types/status/WinCCOAManager.js.map +1 -0
- package/dist/esm/types/version/DetailedVersionInfo.js +5 -0
- package/dist/esm/types/version/DetailedVersionInfo.js.map +1 -0
- package/dist/esm/utils/index.js +9 -0
- package/dist/esm/utils/index.js.map +1 -0
- package/dist/esm/utils/winccoa-components.js +4 -0
- package/dist/esm/utils/winccoa-components.js.map +1 -0
- package/dist/esm/utils/winccoa-localization.js +9 -0
- package/dist/esm/utils/winccoa-localization.js.map +1 -0
- package/dist/esm/utils/winccoa-logging.js +3 -0
- package/dist/esm/utils/winccoa-logging.js.map +1 -0
- package/dist/esm/utils/winccoa-paths.js +184 -0
- package/dist/esm/utils/winccoa-paths.js.map +1 -0
- package/dist/esm/utils/winccoa-project-environment.js +66 -0
- package/dist/esm/utils/winccoa-project-environment.js.map +1 -0
- package/dist/esm/utils/winccoa-version-info.js +20 -0
- package/dist/esm/utils/winccoa-version-info.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/types/components/WinCCOAComponent.d.ts +138 -0
- package/dist/types/components/WinCCOAComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/AlertManagerComponent.d.ts +6 -0
- package/dist/types/components/implementations/AlertManagerComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/AndroidComponent.d.ts +9 -0
- package/dist/types/components/implementations/AndroidComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/ApiComponent.d.ts +6 -0
- package/dist/types/components/implementations/ApiComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/AsciiManagerComponent.d.ts +6 -0
- package/dist/types/components/implementations/AsciiManagerComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/ConfComponent.d.ts +9 -0
- package/dist/types/components/implementations/ConfComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/CtrlComponent.d.ts +10 -0
- package/dist/types/components/implementations/CtrlComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/DNP3Component.d.ts +9 -0
- package/dist/types/components/implementations/DNP3Component.d.ts.map +1 -0
- package/dist/types/components/implementations/DataComponent.d.ts +9 -0
- package/dist/types/components/implementations/DataComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/DbManagerComponent.d.ts +6 -0
- package/dist/types/components/implementations/DbManagerComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/DistComponent.d.ts +6 -0
- package/dist/types/components/implementations/DistComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/DriverComponent.d.ts +6 -0
- package/dist/types/components/implementations/DriverComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/EventComponent.d.ts +9 -0
- package/dist/types/components/implementations/EventComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/HttpComponent.d.ts +6 -0
- package/dist/types/components/implementations/HttpComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/IEC60870Component.d.ts +9 -0
- package/dist/types/components/implementations/IEC60870Component.d.ts.map +1 -0
- package/dist/types/components/implementations/IEC61850Component.d.ts +9 -0
- package/dist/types/components/implementations/IEC61850Component.d.ts.map +1 -0
- package/dist/types/components/implementations/IosComponent.d.ts +9 -0
- package/dist/types/components/implementations/IosComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/JavaComponent.d.ts +9 -0
- package/dist/types/components/implementations/JavaComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/JavaScriptComponent.d.ts +9 -0
- package/dist/types/components/implementations/JavaScriptComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/ModbusComponent.d.ts +9 -0
- package/dist/types/components/implementations/ModbusComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/OpcComponent.d.ts +9 -0
- package/dist/types/components/implementations/OpcComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/OpcDaComponent.d.ts +9 -0
- package/dist/types/components/implementations/OpcDaComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/OpcUaComponent.d.ts +9 -0
- package/dist/types/components/implementations/OpcUaComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/PmonComponent.d.ts +168 -0
- package/dist/types/components/implementations/PmonComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/RdbComponent.d.ts +6 -0
- package/dist/types/components/implementations/RdbComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/ReduComponent.d.ts +6 -0
- package/dist/types/components/implementations/ReduComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/ReportManagerComponent.d.ts +6 -0
- package/dist/types/components/implementations/ReportManagerComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/S7Component.d.ts +9 -0
- package/dist/types/components/implementations/S7Component.d.ts.map +1 -0
- package/dist/types/components/implementations/S7TopSapComponent.d.ts +9 -0
- package/dist/types/components/implementations/S7TopSapComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/SimComponent.d.ts +9 -0
- package/dist/types/components/implementations/SimComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/SplitComponent.d.ts +6 -0
- package/dist/types/components/implementations/SplitComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/UIComponent.d.ts +13 -0
- package/dist/types/components/implementations/UIComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/ValueArchManagerComponent.d.ts +6 -0
- package/dist/types/components/implementations/ValueArchManagerComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/VideoDriverComponent.d.ts +6 -0
- package/dist/types/components/implementations/VideoDriverComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/VisionComponent.d.ts +9 -0
- package/dist/types/components/implementations/VisionComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/WebUIComponent.d.ts +9 -0
- package/dist/types/components/implementations/WebUIComponent.d.ts.map +1 -0
- package/dist/types/components/implementations/index.d.ts +36 -0
- package/dist/types/components/implementations/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/localization/OaLanguage.d.ts +101 -0
- package/dist/types/localization/OaLanguage.d.ts.map +1 -0
- package/dist/types/logs/WinCCOAErrorHandler.d.ts +35 -0
- package/dist/types/logs/WinCCOAErrorHandler.d.ts.map +1 -0
- package/dist/types/logs/WinCCOALogEntry.d.ts +12 -0
- package/dist/types/logs/WinCCOALogEntry.d.ts.map +1 -0
- package/dist/types/logs/WinCCOALogParser.d.ts +53 -0
- package/dist/types/logs/WinCCOALogParser.d.ts.map +1 -0
- package/dist/types/project/CurrentProjectInfo.d.ts +24 -0
- package/dist/types/project/CurrentProjectInfo.d.ts.map +1 -0
- package/dist/types/project/ProjEnv.d.ts +73 -0
- package/dist/types/project/ProjEnv.d.ts.map +1 -0
- package/dist/types/project/ProjEnvErrorHandler.d.ts +6 -0
- package/dist/types/project/ProjEnvErrorHandler.d.ts.map +1 -0
- package/dist/types/project/ProjEnvPmonStatus.d.ts +23 -0
- package/dist/types/project/ProjEnvPmonStatus.d.ts.map +1 -0
- package/dist/types/project/ProjEnvProject.d.ts +475 -0
- package/dist/types/project/ProjEnvProject.d.ts.map +1 -0
- package/dist/types/project/ProjEnvProjectConfig.d.ts +54 -0
- package/dist/types/project/ProjEnvProjectConfig.d.ts.map +1 -0
- package/dist/types/project/ProjEnvProjectRegistry.d.ts +61 -0
- package/dist/types/project/ProjEnvProjectRegistry.d.ts.map +1 -0
- package/dist/types/status/WinCCOAManager.d.ts +15 -0
- package/dist/types/status/WinCCOAManager.d.ts.map +1 -0
- package/dist/types/version/DetailedVersionInfo.d.ts +16 -0
- package/dist/types/version/DetailedVersionInfo.d.ts.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/winccoa-components.d.ts +3 -0
- package/dist/utils/winccoa-components.d.ts.map +1 -0
- package/dist/utils/winccoa-localization.d.ts +7 -0
- package/dist/utils/winccoa-localization.d.ts.map +1 -0
- package/dist/utils/winccoa-logging.d.ts +1 -0
- package/dist/utils/winccoa-logging.d.ts.map +1 -0
- package/dist/utils/winccoa-paths.d.ts +49 -0
- package/dist/utils/winccoa-paths.d.ts.map +1 -0
- package/dist/utils/winccoa-project-environment.d.ts +34 -0
- package/dist/utils/winccoa-project-environment.d.ts.map +1 -0
- package/dist/utils/winccoa-version-info.d.ts +14 -0
- package/dist/utils/winccoa-version-info.d.ts.map +1 -0
- package/package.json +73 -0
|
@@ -0,0 +1,301 @@
|
|
|
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
|
+
parseProjRegistryFile(configPath);
|
|
156
|
+
console.log(`[${new Date().toISOString()}] Project registries reloaded. Current cache size: ${registeredProjectsCache.length}`);
|
|
157
|
+
}, 100);
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
catch (error) {
|
|
162
|
+
// Silently fail if file watching is not supported
|
|
163
|
+
console.warn(`[${new Date().toISOString()}] Could not create file watcher for pvssInst.conf:`, error);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
function parseProjRegistryFile(configPath) {
|
|
168
|
+
console.log(`[${new Date().toISOString()}] Loading project registries from ${configPath}`);
|
|
169
|
+
if (!fs.existsSync(configPath)) {
|
|
170
|
+
throw new Error(`The WinCC OA is probably not installed. The pvssInst.conf file not found at path: ${configPath}`);
|
|
171
|
+
}
|
|
172
|
+
const content = fs.readFileSync(configPath, 'utf-8');
|
|
173
|
+
const lines = content.split('\n');
|
|
174
|
+
const projects = [];
|
|
175
|
+
const products = [];
|
|
176
|
+
let currentProjectSection = {
|
|
177
|
+
currentProject: false,
|
|
178
|
+
id: '',
|
|
179
|
+
installationDir: '',
|
|
180
|
+
notRunnable: true,
|
|
181
|
+
installationDate: '',
|
|
182
|
+
installationVersion: undefined,
|
|
183
|
+
};
|
|
184
|
+
let lastUsedProjectDir = '';
|
|
185
|
+
let currentproject = '';
|
|
186
|
+
let inProductSection = false;
|
|
187
|
+
for (const line of lines) {
|
|
188
|
+
const trimmedLine = line.trim();
|
|
189
|
+
if (trimmedLine.startsWith('[') && trimmedLine.endsWith(']')) {
|
|
190
|
+
// Save previous project if complete
|
|
191
|
+
if (inProductSection) {
|
|
192
|
+
const currentProductRegistry = currentProjectSection;
|
|
193
|
+
currentProductRegistry.lastUsedProjectDir = lastUsedProjectDir;
|
|
194
|
+
currentProductRegistry.currentproject = currentproject;
|
|
195
|
+
currentProductRegistry.notRunnable = true;
|
|
196
|
+
inProductSection = false;
|
|
197
|
+
products.push(currentProductRegistry);
|
|
198
|
+
}
|
|
199
|
+
else if (currentProjectSection.id != '') {
|
|
200
|
+
projects.push(currentProjectSection);
|
|
201
|
+
}
|
|
202
|
+
// Extract content inside the brackets
|
|
203
|
+
// Format: Software\<company>\<product>\Configs\<projectID>
|
|
204
|
+
// or: Software\<company>\<product>\<versionNumber>
|
|
205
|
+
const sectionPath = trimmedLine.slice(1, -1); // Remove [ and ]
|
|
206
|
+
const pathParts = sectionPath.split('\\');
|
|
207
|
+
// Extract project ID or version from the last part of the path
|
|
208
|
+
const projectId = pathParts[pathParts.length - 1] || '';
|
|
209
|
+
// Start new project section
|
|
210
|
+
currentProjectSection = {
|
|
211
|
+
currentProject: false,
|
|
212
|
+
id: projectId,
|
|
213
|
+
installationDir: '',
|
|
214
|
+
notRunnable: true,
|
|
215
|
+
installationDate: '',
|
|
216
|
+
};
|
|
217
|
+
lastUsedProjectDir = '';
|
|
218
|
+
currentproject = '';
|
|
219
|
+
}
|
|
220
|
+
else if (trimmedLine.includes('=')) {
|
|
221
|
+
const [key, value] = trimmedLine.split('=', 2).map((s) => s.trim());
|
|
222
|
+
switch (key.toLowerCase()) {
|
|
223
|
+
case 'firstPAStart':
|
|
224
|
+
inProductSection = true;
|
|
225
|
+
break;
|
|
226
|
+
case 'currentproject':
|
|
227
|
+
currentproject = value.replace(/['"]/g, '');
|
|
228
|
+
inProductSection = true;
|
|
229
|
+
break;
|
|
230
|
+
case 'lastusedprojectdir':
|
|
231
|
+
lastUsedProjectDir = value.replace(/['"]/g, '');
|
|
232
|
+
inProductSection = true;
|
|
233
|
+
break;
|
|
234
|
+
case 'installationdir':
|
|
235
|
+
{
|
|
236
|
+
const entryValue = value.replace(/['"]/g, '');
|
|
237
|
+
const idFromPath = path_1.default.basename(entryValue);
|
|
238
|
+
if (idFromPath && idFromPath !== currentProjectSection.id) {
|
|
239
|
+
currentProjectSection.invalidReason = `Project ID mismatch in registry entry. Expected: ${currentProjectSection.id}, Found in path: ${idFromPath}`;
|
|
240
|
+
break;
|
|
241
|
+
}
|
|
242
|
+
currentProjectSection.installationDir = path_1.default.dirname(entryValue);
|
|
243
|
+
}
|
|
244
|
+
break;
|
|
245
|
+
case 'installationdate':
|
|
246
|
+
currentProjectSection.installationDate = value.replace(/['"]/g, '');
|
|
247
|
+
break;
|
|
248
|
+
case 'installationversion':
|
|
249
|
+
currentProjectSection.installationVersion = value.replace(/['"]/g, '');
|
|
250
|
+
break;
|
|
251
|
+
case 'notrunnable':
|
|
252
|
+
{
|
|
253
|
+
if (value === '0' || value === '"0"') {
|
|
254
|
+
currentProjectSection.notRunnable = false;
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
currentProjectSection.notRunnable = true;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
break;
|
|
261
|
+
case 'company':
|
|
262
|
+
currentProjectSection.company = value.replace(/['"]/g, '');
|
|
263
|
+
break;
|
|
264
|
+
case 'name':
|
|
265
|
+
currentProjectSection.name = value.replace(/['"]/g, '');
|
|
266
|
+
break;
|
|
267
|
+
case 'description':
|
|
268
|
+
currentProjectSection.description = value.replace(/['"]/g, '');
|
|
269
|
+
break;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
// Don't forget the last project
|
|
274
|
+
if (inProductSection) {
|
|
275
|
+
const currentProductRegistry = currentProjectSection;
|
|
276
|
+
currentProductRegistry.lastUsedProjectDir = lastUsedProjectDir;
|
|
277
|
+
currentProductRegistry.currentproject = currentproject;
|
|
278
|
+
currentProductRegistry.notRunnable = true;
|
|
279
|
+
products.push(currentProductRegistry);
|
|
280
|
+
}
|
|
281
|
+
else if (currentProjectSection.id != '') {
|
|
282
|
+
projects.push(currentProjectSection);
|
|
283
|
+
}
|
|
284
|
+
registeredProjectsCache = projects;
|
|
285
|
+
registeredProducts = products;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Gets the platform-specific path to the pvssInst.conf file
|
|
289
|
+
* @returns The full path to the pvssInst.conf file
|
|
290
|
+
*/
|
|
291
|
+
function getPvssInstConfPath() {
|
|
292
|
+
if (os.platform() === 'win32') {
|
|
293
|
+
// Windows path
|
|
294
|
+
return 'C:\\ProgramData\\Siemens\\WinCC_OA\\pvssInst.conf';
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
// Unix/Linux path
|
|
298
|
+
return '/etc/opt/pvss/pvssInst.conf';
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
//# 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,kBAAqC,CAAC;AAE1C;;;GAGG;AACH,IAAI,WAAqC,CAAC;AAE1C;;;GAGG;AACH,IAAI,aAAyC,CAAC;AAE9C;;;;;;GAMG;AACH,SAAgB,qBAAqB;IACjC,qBAAqB,EAAE,CAAC;IACxB,OAAO,uBAAuB,CAAC;AACnC,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,qBAAqB;IACjC,qBAAqB,EAAE,CAAC;IACxB,OAAO,kBAAkB,CAAC;AAC9B,CAAC;AAED;;;;;GAKG;AACH,SAAgB,uBAAuB,CAAC,EAAU;IAC9C,OAAO,qBAAqB,EAAE,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAClF,CAAC;AAED,SAAgB,mBAAmB,CAAC,OAAe;IAC/C,qBAAqB,EAAE,CAAC;IACxB,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,OAAO,C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AI,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 @@
|
|
|
1
|
+
{"version":3,"file":"WinCCOAManager.js","sourceRoot":"","sources":["../../../../src/types/status/WinCCOAManager.ts"],"names":[],"mappings":""}
|
|
@@ -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 @@
|
|
|
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 @@
|
|
|
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,uCAAyB;AACzB,iDAAuD;AACvD,uEAA+D;AAE/D;;;;;;GAMG;AACH,MAAM,sCAAsC,GAAyC,EAAE,CAAC;AAExF;;;;;;;;;;GAUG;AACH,SAAgB,mCAAmC,CAAC,OAAe;IAC/D,oFAAoF;IACpF,IAAI,sCAAsC,CAAC,OAAO,CAAC,KAAK,SAAS,EAAE,CAAC;QAChE,OAAO,sCAAsC,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED,MAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;IAE/B,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QACvB,sCAAsC,CAAC,OAAO,CAAC,GAAG,0BAA0B,CAAC,OAAO,CAAC,CAAC;IAC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