@parmanasystems/governance 1.83.0 → 1.87.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 +7 -7
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# @parmanasystems/governance
|
|
1
|
+
# @parmanasystems/governance
|
|
2
2
|
|
|
3
|
-
Policy lifecycle management
|
|
3
|
+
Policy lifecycle management - create, upgrade, validate, and bundle governance policies.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@parmanasystems/governance)
|
|
6
6
|
|
|
@@ -35,10 +35,10 @@ const dir = createPolicy("loan-approval");
|
|
|
35
35
|
console.log(dir); // "./policies/loan-approval/1.0.0"
|
|
36
36
|
// Edit ./policies/loan-approval/1.0.0/policy.json with your rules
|
|
37
37
|
|
|
38
|
-
// Validate policy files before bundling
|
|
38
|
+
// Validate policy files before bundling - throws on schema errors
|
|
39
39
|
validatePolicy("./policies/loan-approval/1.0.0");
|
|
40
40
|
|
|
41
|
-
// Package into a content-addressed bundle (unsigned
|
|
41
|
+
// Package into a content-addressed bundle (unsigned - safe for development)
|
|
42
42
|
const result = generateBundle(
|
|
43
43
|
"loan-approval",
|
|
44
44
|
"1.0.0",
|
|
@@ -61,7 +61,7 @@ const result = generateBundle(
|
|
|
61
61
|
"loan-approval",
|
|
62
62
|
"1.0.0",
|
|
63
63
|
"./policies/loan-approval/1.0.0",
|
|
64
|
-
{ privateKeyPath: "./trust/root.key" } // optional
|
|
64
|
+
{ privateKeyPath: "./trust/root.key" } // optional - omit for unsigned bundles
|
|
65
65
|
);
|
|
66
66
|
console.log(result.signature_path); // "./policies/loan-approval/1.0.0/bundle.sig"
|
|
67
67
|
```
|
|
@@ -71,7 +71,7 @@ console.log(result.signature_path); // "./policies/loan-approval/1.0.0/bundle.si
|
|
|
71
71
|
```typescript
|
|
72
72
|
import { upgradePolicy } from "@parmanasystems/governance";
|
|
73
73
|
|
|
74
|
-
// Creates ./policies/loan-approval/2.0.0/ as a copy of 1.0.0
|
|
74
|
+
// Creates ./policies/loan-approval/2.0.0/ as a copy of 1.0.0 - edit the new version's rules
|
|
75
75
|
const newDir = upgradePolicy("loan-approval");
|
|
76
76
|
console.log(newDir); // "./policies/loan-approval/2.0.0"
|
|
77
77
|
```
|
|
@@ -93,7 +93,7 @@ console.log(newDir); // "./policies/loan-approval/2.0.0"
|
|
|
93
93
|
|
|
94
94
|
| Export | Description |
|
|
95
95
|
|---|---|
|
|
96
|
-
| `BundleGenerationResult` | Result of `generateBundle`
|
|
96
|
+
| `BundleGenerationResult` | Result of `generateBundle` - `success`, `manifest_path`, `signature_path`, `bundle_hash` |
|
|
97
97
|
| `BundleSigner` | Signer config for `generateBundle`: `{ privateKeyPath: string }` |
|
|
98
98
|
|
|
99
99
|
---
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parmanasystems/governance",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.87.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
],
|
|
19
19
|
"sideEffects": false,
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@parmanasystems/bundle": "^1.
|
|
22
|
-
"@parmanasystems/crypto": "^1.
|
|
23
|
-
"@parmanasystems/contracts": "^1.
|
|
21
|
+
"@parmanasystems/bundle": "^1.87.0",
|
|
22
|
+
"@parmanasystems/crypto": "^1.87.0",
|
|
23
|
+
"@parmanasystems/contracts": "^1.87.0"
|
|
24
24
|
},
|
|
25
25
|
"description": "Deterministic governance lifecycle and policy infrastructure for parmanasystems.",
|
|
26
26
|
"license": "Apache-2.0",
|