plccheck 2.7.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/bin/plccheck.js +7 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ npx plccheck check ./path/to/project
|
|
|
13
13
|
- `plccheck serve` (LSP server over stdio)
|
|
14
14
|
- `plccheck check <files-or-folders...>`
|
|
15
15
|
- `plccheck emit --target <language> <file>`
|
|
16
|
-
- `plccheck test [--filter <text>] [--events-json] [--coverage-json <file>] [--coverage-lcov <file>]
|
|
16
|
+
- `plccheck test [--filter <text>] [--events-json] [--coverage-json <file>] [--coverage-lcov <file>] <file-or-folder>`
|
|
17
17
|
- `plccheck version`
|
|
18
18
|
|
|
19
19
|
## Testing and Coverage
|
|
@@ -36,13 +36,13 @@ For zero-config discovery in the Coverage Gutters VS Code extension, write the L
|
|
|
36
36
|
npx plccheck test ./my-plc-project --coverage-json coverage.json --coverage-lcov lcov.info
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Note: `--events-json` prints a stream of execution events to stdout, while `--coverage-json` writes a finalized coverage report to a file. Coverage artifacts include statement, function, and branch data where runtime data is available. For AI analysis, use the file artifact from `--coverage-json`.
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
## Telemetry
|
|
42
|
+
|
|
43
|
+
The npm wrapper marks CLI invocations so the Go binary can send minimal operational telemetry: subcommand, outcome, duration, safe option shape, aggregate `check` counts, and bounded diagnostic-code counts. It does not send file paths, PLC root names, source text, diagnostic messages, or raw command arguments.
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
CI invocations include a `ci` tag. Set `PLCCHECK_TELEMETRY=0` or `DO_NOT_TRACK=1` to disable this reporting. Set `PLCCHECK_TELEMETRY_ENDPOINT` to send logs to a different `/v1/logs` endpoint.
|
|
46
46
|
|
|
47
47
|
## Publishing (maintainers)
|
|
48
48
|
|
package/bin/plccheck.js
CHANGED
|
@@ -384,8 +384,14 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
384
384
|
|
|
385
385
|
args = reorderTestArgs(args);
|
|
386
386
|
|
|
387
|
+
const childEnv = {
|
|
388
|
+
...process.env,
|
|
389
|
+
PLCCHECK_INVOCATION_SOURCE: process.env.PLCCHECK_INVOCATION_SOURCE || (binaryPath === 'go' ? 'npm_wrapper_dev' : 'npm_wrapper'),
|
|
390
|
+
PLCCHECK_CLI_VERSION: process.env.PLCCHECK_CLI_VERSION || readOptionalDepVersion(pkg) || '',
|
|
391
|
+
};
|
|
392
|
+
|
|
387
393
|
return new Promise((resolve) => {
|
|
388
|
-
const child = spawn(executable, args, { stdio: 'inherit' });
|
|
394
|
+
const child = spawn(executable, args, { stdio: 'inherit', env: childEnv });
|
|
389
395
|
|
|
390
396
|
child.on('error', (err) => {
|
|
391
397
|
console.error(`plccheck: failed to start binary: ${binaryPath}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "plccheck",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "Siemens PLC language checker + LSP CLI (SCL/ST/LAD/FBD, etc.)",
|
|
5
5
|
"license": "CC-BY-NC-4.0",
|
|
6
6
|
"bin": {
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
"version": "node ../scripts/plccheck-npm-version-hook.mjs"
|
|
15
15
|
},
|
|
16
16
|
"optionalDependencies": {
|
|
17
|
-
"@danielv123/plccheck-win-x64": "2.
|
|
18
|
-
"@danielv123/plccheck-win-arm64": "2.
|
|
19
|
-
"@danielv123/plccheck-linux-x64": "2.
|
|
20
|
-
"@danielv123/plccheck-linux-arm64": "2.
|
|
21
|
-
"@danielv123/plccheck-darwin-x64": "2.
|
|
22
|
-
"@danielv123/plccheck-darwin-arm64": "2.
|
|
17
|
+
"@danielv123/plccheck-win-x64": "2.8.0",
|
|
18
|
+
"@danielv123/plccheck-win-arm64": "2.8.0",
|
|
19
|
+
"@danielv123/plccheck-linux-x64": "2.8.0",
|
|
20
|
+
"@danielv123/plccheck-linux-arm64": "2.8.0",
|
|
21
|
+
"@danielv123/plccheck-darwin-x64": "2.8.0",
|
|
22
|
+
"@danielv123/plccheck-darwin-arm64": "2.8.0"
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|