@afix-ci/pcheck-win32-x64 0.1.0-rc.52

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 (3) hide show
  1. package/README.md +60 -0
  2. package/cli.exe +0 -0
  3. package/package.json +18 -0
package/README.md ADDED
@@ -0,0 +1,60 @@
1
+ # pcheck
2
+
3
+ Precompiled pre-commit and pre-push checks for repositories that use `mx`.
4
+
5
+ Run the standalone CLI with `pcheck pre-commit` or `pcheck pre-push`. The same
6
+ commands are available through `mx pcheck`.
7
+
8
+ On first use, pcheck materializes repository policy at
9
+ `.config/pcheck/config.toml`. The configuration controls email and branch
10
+ patterns, package-manifest newline policy, staged-file size limits and
11
+ allowlisting, the slow-task warning threshold, and parallel/sequential host
12
+ commands. Command entries use `CfgBinSpec`: repository-root paths start with
13
+ `/`, config-relative paths contain `/`, and bare command names resolve through
14
+ `PATH`. Pcheck validates both regexes, positive thresholds, and every configured
15
+ command before starting hook checks.
16
+
17
+ During `pre-commit`, pcheck snapshots staged, non-deleted Git paths once and
18
+ writes them as UTF-8, NUL-delimited repository-relative paths. Every configured
19
+ command receives the absolute manifest path in `PCHECK_STAGED_FILES_FILE` and
20
+ an initially empty generated-path manifest in `PCHECK_GENERATED_FILES_FILE`,
21
+ plus the absolute working-tree root in `PCHECK_REPO_ROOT`. Both manifests are
22
+ UTF-8, NUL-delimited repository-relative paths. Paths are passed without shell
23
+ interpolation; a staged path that cannot be represented as UTF-8 is rejected
24
+ before host commands run.
25
+
26
+ Before launching host commands, `pre-commit` validates the effective Git
27
+ `user.email`. When there are no staged paths, it exits without workspace
28
+ discovery or host command startup. Otherwise, it checks the final byte of the
29
+ root and workspace-member
30
+ `package.json` files and checks working-tree sizes for staged, non-deleted
31
+ paths. Missing staged files are ignored, and oversized files are permitted only
32
+ when their repository-relative path matches `file_size_allowlist`. Workspace
33
+ manifests are discovered from tracked Git index entries without parsing their
34
+ contents or walking the worktree; a spinner reports this initial discovery and
35
+ a one-line message reports the repository scan time.
36
+
37
+ For repository-scan profiling, `pre-commit --skip-index-check` bypasses staged
38
+ index discovery, uses a full filesystem walk for workspace-manifest discovery,
39
+ and forces the remaining checks to run with an empty staged manifest.
40
+ `PCHECK_SKIP_INDEX_CHECK=true` provides the same behavior.
41
+
42
+ Package newline and staged-file size checks run alongside every `parallel_cmds`
43
+ entry. After all parallel work settles, `sequential_cmds` run in configured
44
+ order even when an ordinary check failed, allowing formatters to repair files.
45
+ Command construction and process-launch errors stop the remaining sequence.
46
+ After the sequence, pcheck re-stages every originally staged path and each
47
+ validated, deduplicated generated path reported through the generated manifest,
48
+ then persists the Git index once. Generated entries containing absolute paths,
49
+ traversal, or malformed records are rejected.
50
+ Failed command output is buffered and replayed as one block; successful output
51
+ is available at debug verbosity. Every completed task prints a one-line elapsed
52
+ time, records its phase, elapsed time, and staged-file count, and emits a warning
53
+ when it exceeds `slow_task_threshold_ms`.
54
+ Run `cargo bench -p pcheck-cli --bench native_checks` to measure staged-input
55
+ extraction, package-manifest newline checks, and staged-file allowlist matching.
56
+
57
+ During `pre-push`, pcheck reads Git's standard four-field ref update records
58
+ from stdin and validates every non-deleted `refs/heads/*` destination against
59
+ `branch_regex`. Tag updates and branch deletions are ignored. When `TF_BUILD`
60
+ is set, pre-push validation is bypassed for Azure Pipelines.
package/cli.exe ADDED
Binary file
package/package.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "@afix-ci/pcheck-win32-x64",
3
+ "version": "0.1.0-rc.52",
4
+ "license": "MIT",
5
+ "preferUnplugged": true,
6
+ "os": [
7
+ "win32"
8
+ ],
9
+ "cpu": [
10
+ "x64"
11
+ ],
12
+ "files": [
13
+ "cli.exe"
14
+ ],
15
+ "bin": {
16
+ "pcheck": "./cli.exe"
17
+ }
18
+ }