@liuhange/dsh-data-asset-compliance-check 3.0.0 → 3.1.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/lib/index.js +8 -1
- package/lib/pilotPolicyReferenceEmbedder.js +12 -0
- package/package.json +22 -6
package/lib/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { checkCompliance } from './complianceChecker.js';
|
|
2
2
|
import { validateComplianceArgs } from './invariant.js';
|
|
3
|
+
import { embedPilotPolicyReference } from './pilotPolicyReferenceEmbedder.js';
|
|
3
4
|
export const name = '@liuhange/dsh-data-asset-compliance-check';
|
|
4
5
|
export const inject = ['tools'];
|
|
5
6
|
export function apply(ctx) {
|
|
@@ -53,7 +54,13 @@ export function apply(ctx) {
|
|
|
53
54
|
hasPersonalInfo: validated.hasPersonalInfo,
|
|
54
55
|
personalInfoFields: validated.personalInfoFields,
|
|
55
56
|
}, complianceConfig, policyDocuments);
|
|
56
|
-
|
|
57
|
+
const pilotConfig = complianceConfig.pilotPolicyReference;
|
|
58
|
+
const pilotPolicy = pilotConfig ? embedPilotPolicyReference(pilotConfig) : null;
|
|
59
|
+
const enrichedReport = {
|
|
60
|
+
...report,
|
|
61
|
+
pilotPolicyReference: pilotPolicy,
|
|
62
|
+
};
|
|
63
|
+
return JSON.stringify(enrichedReport, null, 2);
|
|
57
64
|
}
|
|
58
65
|
catch (e) {
|
|
59
66
|
const err = e;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function embedPilotPolicyReference(config) {
|
|
2
|
+
if (!config.enabled) {
|
|
3
|
+
return { embedded: false, message: '', policyRef: config.policyRef, keyPoints: [] };
|
|
4
|
+
}
|
|
5
|
+
return {
|
|
6
|
+
embedded: true,
|
|
7
|
+
message: config.embedMessage,
|
|
8
|
+
policyRef: config.policyRef,
|
|
9
|
+
keyPoints: config.keyPoints,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=pilotPolicyReferenceEmbedder.js.map
|
package/package.json
CHANGED
|
@@ -1,18 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liuhange/dsh-data-asset-compliance-check",
|
|
3
3
|
"description": "Data asset compliance check plugin: source + processing + usage three-dimensional compliance audit",
|
|
4
|
-
"version": "3.
|
|
5
|
-
"publishConfig": {
|
|
6
|
-
|
|
4
|
+
"version": "3.1.0",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/liuhange789/data-asset-inspector.git",
|
|
11
|
+
"directory": "packages/data-asset/data-asset-compliance-check"
|
|
12
|
+
},
|
|
7
13
|
"type": "module",
|
|
8
14
|
"main": "lib/index.js",
|
|
9
15
|
"types": "lib/types/index.d.ts",
|
|
10
16
|
"exports": {
|
|
11
|
-
".": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./lib/types/index.d.ts",
|
|
19
|
+
"default": "./lib/index.js"
|
|
20
|
+
},
|
|
12
21
|
"./src/*": "./src/*",
|
|
13
22
|
"./package.json": "./package.json"
|
|
14
23
|
},
|
|
15
|
-
"files": [
|
|
24
|
+
"files": [
|
|
25
|
+
"lib/**/*.js",
|
|
26
|
+
"lib/types/**/*.d.ts"
|
|
27
|
+
],
|
|
16
28
|
"license": "MIT",
|
|
17
29
|
"scripts": {
|
|
18
30
|
"typecheck": "tsc --noEmit",
|
|
@@ -24,5 +36,9 @@
|
|
|
24
36
|
"@deepseek-ai/dsh-tools": "0.0.1-rc.1",
|
|
25
37
|
"@liuhange/dsh-data-asset-shared": "^3.0.0"
|
|
26
38
|
},
|
|
27
|
-
"dsh": {
|
|
39
|
+
"dsh": {
|
|
40
|
+
"bundle": {
|
|
41
|
+
"patch": true
|
|
42
|
+
}
|
|
43
|
+
}
|
|
28
44
|
}
|