{"id":35357337,"url":"https://github.com/winccoa-tools-pack/npm-winccoa-core","last_synced_at":"2026-05-11T22:05:21.253Z","repository":{"id":326917862,"uuid":"1108711210","full_name":"winccoa-tools-pack/npm-winccoa-core","owner":"winccoa-tools-pack","description":"Core utilities and type definitions for WinCC OA development. This library provides essential functionality for managing WinCC OA projects, components, and system interactions. It includes type definitions, project scaffolding tools, and utility functions to streamline the development process in WinCC OA environments.","archived":false,"fork":false,"pushed_at":"2026-05-09T21:34:43.000Z","size":886,"stargazers_count":0,"open_issues_count":21,"forks_count":2,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2026-05-09T23:35:18.247Z","etag":null,"topics":["automation","etm","hmi","industrial-automation","npm","scada","siemens","wincc-oa","winccoa","winccoa-npm","winccoa-npm-core"],"latest_commit_sha":null,"homepage":"https://github.com/winccoa-tools-pack","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/winccoa-tools-pack.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"buy_me_a_coffee":"mPokornyETM"}},"created_at":"2025-12-02T20:15:51.000Z","updated_at":"2026-05-09T21:31:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/winccoa-tools-pack/npm-winccoa-core","commit_stats":null,"previous_names":["winccoa-tools-pack/npm-shared-library-core","winccoa-tools-pack/npm-winccoa-core"],"tags_count":60,"template":false,"template_full_name":"winccoa-tools-pack/template-npm-shared-library","purl":"pkg:github/winccoa-tools-pack/npm-winccoa-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winccoa-tools-pack%2Fnpm-winccoa-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winccoa-tools-pack%2Fnpm-winccoa-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winccoa-tools-pack%2Fnpm-winccoa-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winccoa-tools-pack%2Fnpm-winccoa-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/winccoa-tools-pack","download_url":"https://codeload.github.com/winccoa-tools-pack/npm-winccoa-core/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winccoa-tools-pack%2Fnpm-winccoa-core/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32914549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-11T17:09:15.040Z","status":"ssl_error","status_checked_at":"2026-05-11T17:08:45.420Z","response_time":120,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","etm","hmi","industrial-automation","npm","scada","siemens","wincc-oa","winccoa","winccoa-npm","winccoa-npm-core"],"created_at":"2026-01-01T23:26:38.778Z","updated_at":"2026-05-11T22:05:21.221Z","avatar_url":"https://github.com/winccoa-tools-pack.png","language":"TypeScript","funding_links":["https://buymeacoffee.com/mPokornyETM"],"categories":[],"sub_categories":[],"readme":"# WinCC OA Core Utils\n\nCore utilities and type definitions for WinCC OA development. This library provides essential functionality for managing WinCC OA projects, components, and system interactions.\n\n## 📦 Installation\n\n```bash\nnpm install @winccoa-tools-pack/npm-winccoa-core\n```\n\n## 🚀 Quick Start\n\n### Working with Projects\n\n```typescript\nimport {\n    getRegisteredProjects,\n    getRunningProjects,\n    getRunnableProjects,\n    getCurrentProjects,\n    findProjectForFile\n} from '@winccoa-tools-pack/npm-winccoa-core';\n\n// Get all registered projects from the system\nconst allProjects = await getRegisteredProjects();\nconsole.log(`Found ${allProjects.length} registered projects`);\n\n// Filter to only running projects\nconst running = await getRunningProjects();\nconsole.log(`${running.length} projects are currently running`);\n\n// Get projects that can be started\nconst runnable = await getRunnableProjects();\n\n// Get the current active project (if any)\nconst current = await getCurrentProjects();\nif (current.length \u003e 0) {\n    console.log(`Current project: ${current[0].getName()}`);\n}\n\n// Find which project a file belongs to\nconst filePath = '/opt/WinCC_OA_Projects/myProject/config/config';\nconst project = await findProjectForFile(filePath);\nif (project) {\n    console.log(`File belongs to project: ${project.getName()}`);\n    console.log(`Project ID: ${project.getId()}`);\n    console.log(`Project is runnable: ${project.isRunnable()}`);\n}\n```\n\n### Managing Individual Projects\n\n```typescript\nimport { ProjEnvProject } from '@winccoa-tools-pack/npm-winccoa-core';\n\n// Create and register a new project\nconst project = new ProjEnvProject();\nproject.setId('myProject');\nproject.setInstallDir('/opt/WinCC_OA_Projects/');\nproject.setVersion('3.21');\nawait project.registerProj();\n\n// Check project status\nif (project.isRegistered()) {\n    console.log('Project successfully registered');\n}\n\n// Unregister when done\nawait project.unregisterProj();\n```\n\n### Working with WinCC OA Installations\n\n```typescript\nimport {\n    getAvailableWinCCOAVersions,\n    getWinCCOAInstallationPathByVersion\n} from '@winccoa-tools-pack/npm-winccoa-core';\n\n// Get all installed WinCC OA versions (sorted highest to lowest)\nconst versions = getAvailableWinCCOAVersions();\nconsole.log('Installed versions:', versions);\n// Example output: ['3.20', '3.19', '3.18']\n\n// Get installation path for a specific version\nconst path = getWinCCOAInstallationPathByVersion('3.20');\nif (path) {\n    console.log(`WinCC OA 3.20 installed at: ${path}`);\n}\n\n// Paths are cached for performance - first lookup queries registry/filesystem,\n// subsequent lookups return cached value immediately\n```\n\n### Working with WinCC OA Components\n\n```typescript\nimport { getAllWinCCOAComponents } from '@winccoa-tools-pack/npm-winccoa-core';\n\n// Returns only components whose executable exists for the given version.\n// Throws if the version is not installed on this host.\nconst components = getAllWinCCOAComponents('3.20');\n\nfor (const c of components) {\n  console.log(`${c.getName()}: ${c.getDescription()}`);\n}\n```\n\n## ✨ Features\n\n### Component Management\n\n- **WinCCOAComponent**: Base class for all WinCC OA components\n  - Automatic executable discovery across installed versions\n  - Process timeout handling for reliable execution\n  - Detached process spawning support\n  - Version-specific component targeting\n  - Stdout/stderr capture with timestamped logging\n\n### Project Management\n\n- **ProjEnvProject**: Complete project lifecycle management\n  - Project registration and unregistration\n  - Project version fallback: reads `proj_version` from config if the registry does not provide a version\n  - Async operations with automatic retry logic\n  - Status polling with proper async/await\n  - Configuration file handling\n\n### Project Registry\n\n- **ProjEnvProjectRegistry**: Automatic project tracking\n  - Real-time file system monitoring (pvssInst.conf)\n  - Debounced cache refresh (100ms) for performance\n  - Automatic invalidation on configuration changes\n\n### Utilities\n\n- Path resolution for WinCC OA installations\n- Version detection and comparison\n- Localization helpers\n- Log parsing and error handling\n\n## 📦 Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Build the library\nnpm run build\n\n# Run all tests\nnpm test\n\n# Run only unit tests. Without WinCC OA instalation\nnpm run test:unit\n\n# Run only integration tests. WinCC OA must be installed.\nnpm run test:integration\n\n# Lint code\nnpm run lint\n\n# Format code\nnpm run format\n\n# Check code style\nnpm run style-check\n```\n\n## 🌳 Git Flow Workflow\n\nThis project uses [Git Flow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) for branch management:\n\n### Branch Structure\n\n- **`main`** - Production-ready code (stable releases)\n- **`develop`** - Integration branch (pre-release features)\n- **`feature/*`** - New features\n- **`release/*`** - Release preparation\n- **`hotfix/*`** - Emergency fixes for production\n\nFor detailed workflow information, see [docs/GITFLOW_WORKFLOW.md](docs/GITFLOW_WORKFLOW.md).\n\n## 📖 Documentation\n\n- [Source Code Overview](src/README.md) - Detailed module documentation\n- [Changelog](CHANGELOG.md) - Version history and updates\n- [Contributing Guide](CONTRIBUTING.md) - How to contribute\n- [Development Docs](docs/dev/README.md) - Development guidelines\n\n## 🔧 Configuration\n\n### Windows EOL (CRLF) Note\n\nThis repository enforces LF line endings for configuration files via `.gitattributes` to avoid spurious diffs.\n\nIf you see CRLF→LF warnings on Windows, normalize the files once:\n\n```powershell\ncd C:\\path\\to\\repo\ngit add --renormalize .\ngit commit -m \"chore: apply eol normalization per .gitattributes\"\n```\n\n## 🏆 Recognition\n\nSpecial thanks to all our [contributors](https://github.com/orgs/winccoa-tools-pack/people) who make this project possible!\n\n### Key Contributors\n\n- **Martin Pokorny** ([@mPokornyETM](https://github.com/mPokornyETM)) - Creator \u0026 Lead Developer\n- And many more amazing contributors!\n\n---\n\n## 📜 License\n\nThis project is licensed under the **MIT License** - see the [LICENSE](https://github.com/winccoa-tools-pack/.github/blob/main/LICENSE) file for details.\n\nNote: Some dependencies may use different license models.\n\n---\n\n## ⚠️ Disclaimer\n\n**WinCC OA** and **Siemens** are trademarks of Siemens AG.\nThis project is not affiliated with, endorsed by, or sponsored by Siemens AG.\nThis is a community-driven open source project created to enhance the development experience for WinCC OA developers.\n\n---\n\n## 🎉 Thank You\n\nThank you for using WinCC OA tools package!\nWe're excited to be part of your development journey.\n**Happy Coding! 🚀**\n\n---\n\n## Quick Links\n\n• [📦 npm package](https://www.npmjs.com/package/@winccoa-tools-pack/npm-winccoa-core)\n• [📚 Documentation](docs/dev/README.md)\n• [🐛 Report Issues](https://github.com/winccoa-tools-pack/npm-winccoa-core/issues)\n\n---\n\n\u003ccenter\u003eMade with ❤️ for and by the WinCC OA community\u003c/center\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinccoa-tools-pack%2Fnpm-winccoa-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwinccoa-tools-pack%2Fnpm-winccoa-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinccoa-tools-pack%2Fnpm-winccoa-core/lists"}