@anarchitects/governance-cli 0.0.1 → 0.0.3
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 +38 -1
- package/dist/agov-DAHSDNnx.js +1936 -0
- package/dist/agov.d.ts +12 -3
- package/dist/agov.d.ts.map +1 -1
- package/dist/bin/agov.js +2 -791
- package/dist/check.d.ts +1 -1
- package/dist/check.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -2
- package/dist/internal/manual-workspace/capability.d.ts +1 -1
- package/dist/internal/manual-workspace/load-workspace.d.ts +1 -1
- package/dist/internal/metric-engine/aggregate-signals.d.ts +1 -1
- package/dist/internal/metric-engine/calculate-metrics.d.ts +1 -1
- package/dist/internal/profile/load-standalone-profile.d.ts +1 -1
- package/dist/internal/reporting/render-cli.d.ts +1 -1
- package/dist/internal/reporting/render-json.d.ts +1 -1
- package/dist/internal/signal-engine/builders.d.ts +2 -2
- package/dist/render-report.d.ts +1 -1
- package/package.json +3 -3
- package/dist/check-_APXAvpi.js +0 -1568
package/README.md
CHANGED
|
@@ -35,6 +35,14 @@ The public package surface is intentionally small:
|
|
|
35
35
|
|
|
36
36
|
```ts
|
|
37
37
|
import {
|
|
38
|
+
AGOV_EXIT_CONFIGURATION_FAILURE,
|
|
39
|
+
AGOV_EXIT_GOVERNANCE_FAILURE,
|
|
40
|
+
AGOV_EXIT_RUNTIME_FAILURE,
|
|
41
|
+
AGOV_EXIT_SUCCESS,
|
|
42
|
+
loadGenericWorkspace,
|
|
43
|
+
loadStandaloneGovernanceProfile,
|
|
44
|
+
parseAgovCliArgs,
|
|
45
|
+
runAgovCli,
|
|
38
46
|
runAgovCheck,
|
|
39
47
|
type AgovCheckOptions,
|
|
40
48
|
type AgovCheckResult,
|
|
@@ -46,12 +54,25 @@ import {
|
|
|
46
54
|
The root export currently includes:
|
|
47
55
|
|
|
48
56
|
- `runAgovCheck(...)`
|
|
57
|
+
- `runAgovCli(...)`
|
|
58
|
+
- `parseAgovCliArgs(...)`
|
|
59
|
+
- `loadGenericWorkspace(...)`
|
|
60
|
+
- `loadStandaloneGovernanceProfile(...)`
|
|
61
|
+
- stable CLI exit-code constants
|
|
49
62
|
- `AgovCheckOptions`
|
|
50
63
|
- `AgovCheckResult`
|
|
51
64
|
- `AgovCheckWithAdapterOptions`
|
|
52
65
|
- `AgovCheckWithWorkspacePathOptions`
|
|
53
66
|
|
|
54
|
-
|
|
67
|
+
Parity already covered inside this package includes:
|
|
68
|
+
|
|
69
|
+
- standalone `agov` command orchestration
|
|
70
|
+
- manual YAML/JSON workspace loading and validation
|
|
71
|
+
- standalone profile loading and validation
|
|
72
|
+
- adapter-agnostic runtime selection and exit-code behavior
|
|
73
|
+
|
|
74
|
+
That parity is now available as package-root APIs for host tooling and tests
|
|
75
|
+
without introducing any Nx dependency.
|
|
55
76
|
|
|
56
77
|
## Executable Usage
|
|
57
78
|
|
|
@@ -98,6 +119,22 @@ console.log(result.success);
|
|
|
98
119
|
console.log(result.assessment.health.status);
|
|
99
120
|
```
|
|
100
121
|
|
|
122
|
+
Programmatic CLI parsing and exit-code execution are also available:
|
|
123
|
+
|
|
124
|
+
```ts
|
|
125
|
+
import {
|
|
126
|
+
AGOV_EXIT_SUCCESS,
|
|
127
|
+
parseAgovCliArgs,
|
|
128
|
+
runAgovCli,
|
|
129
|
+
} from '@anarchitects/governance-cli';
|
|
130
|
+
|
|
131
|
+
const parsed = parseAgovCliArgs(['check', '--help']);
|
|
132
|
+
const exitCode = await runAgovCli(['check', '--help']);
|
|
133
|
+
|
|
134
|
+
console.log(parsed.kind);
|
|
135
|
+
console.log(exitCode === AGOV_EXIT_SUCCESS);
|
|
136
|
+
```
|
|
137
|
+
|
|
101
138
|
## Adapter Model
|
|
102
139
|
|
|
103
140
|
`@anarchitects/governance-cli` is adapter-agnostic.
|