@dataparade/cli 0.0.17 → 0.0.19
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/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dataparade/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"description": "dataPARADE CLI — scan codebases for privacy and security data flows",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"eval:models": "pnpm exec node dist/src/evals/run-model-matrix.js"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@dataparade/scanner": "github:DataParade-io/scanner#
|
|
57
|
+
"@dataparade/scanner": "github:DataParade-io/scanner#e66e1bcaef55b61214d170c617df529bd300fc89",
|
|
58
58
|
"@sentry/node": "^10.38.0",
|
|
59
59
|
"commander": "^12.1.0",
|
|
60
60
|
"dotenv": "^16.4.7",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const langsmith_tracing_1 = require("../../../src/tracing/langsmith-tracing");
|
|
4
|
-
describe(
|
|
4
|
+
describe('tracing/langsmith-tracing', () => {
|
|
5
5
|
const originalEnv = process.env;
|
|
6
6
|
beforeEach(() => {
|
|
7
7
|
process.env = { ...originalEnv };
|
|
@@ -13,27 +13,31 @@ describe("tracing/langsmith-tracing", () => {
|
|
|
13
13
|
afterAll(() => {
|
|
14
14
|
process.env = originalEnv;
|
|
15
15
|
});
|
|
16
|
-
it(
|
|
16
|
+
it('isLangSmithTracingEnabled requires key and tracing flag', () => {
|
|
17
17
|
expect((0, langsmith_tracing_1.isLangSmithTracingEnabled)()).toBe(false);
|
|
18
|
-
process.env.LANGSMITH_API_KEY =
|
|
18
|
+
process.env.LANGSMITH_API_KEY = 'test-key';
|
|
19
19
|
expect((0, langsmith_tracing_1.isLangSmithTracingEnabled)()).toBe(false);
|
|
20
|
-
process.env.LANGCHAIN_TRACING_V2 =
|
|
20
|
+
process.env.LANGCHAIN_TRACING_V2 = 'true';
|
|
21
21
|
expect((0, langsmith_tracing_1.isLangSmithTracingEnabled)()).toBe(true);
|
|
22
22
|
});
|
|
23
|
-
it(
|
|
23
|
+
it('buildLangSmithScanTraceSummary omits full component payloads', () => {
|
|
24
24
|
const result = {
|
|
25
25
|
files: [],
|
|
26
|
-
findings: [
|
|
26
|
+
findings: [
|
|
27
|
+
{ pattern: 'x', name: 'n', confidence: 1, properties: {} },
|
|
28
|
+
],
|
|
29
|
+
occurrences: [],
|
|
30
|
+
dataItems: [],
|
|
27
31
|
scanResult: {
|
|
28
32
|
components: [
|
|
29
33
|
{
|
|
30
|
-
id:
|
|
31
|
-
name:
|
|
32
|
-
type:
|
|
34
|
+
id: 'cmp_1',
|
|
35
|
+
name: 'Payments API',
|
|
36
|
+
type: 'asset',
|
|
33
37
|
confidence: 0.9,
|
|
34
38
|
detectedFrom: [],
|
|
35
39
|
sourceLocations: [],
|
|
36
|
-
properties: { section_id:
|
|
40
|
+
properties: { section_id: 'packages/server' },
|
|
37
41
|
},
|
|
38
42
|
],
|
|
39
43
|
dataFlows: [],
|
|
@@ -41,7 +45,7 @@ describe("tracing/langsmith-tracing", () => {
|
|
|
41
45
|
filesSkipped: 1,
|
|
42
46
|
totalLines: 100,
|
|
43
47
|
scanDurationMs: 500,
|
|
44
|
-
warnings: [
|
|
48
|
+
warnings: ['w1'],
|
|
45
49
|
errors: [],
|
|
46
50
|
aiInferenceSummary: {
|
|
47
51
|
ran: true,
|
|
@@ -57,8 +61,8 @@ describe("tracing/langsmith-tracing", () => {
|
|
|
57
61
|
inputTokens: 10,
|
|
58
62
|
outputTokens: 5,
|
|
59
63
|
totalTokens: 15,
|
|
60
|
-
aiProvider:
|
|
61
|
-
aiModel:
|
|
64
|
+
aiProvider: 'mock',
|
|
65
|
+
aiModel: 'heuristic',
|
|
62
66
|
},
|
|
63
67
|
},
|
|
64
68
|
};
|
|
@@ -66,19 +70,19 @@ describe("tracing/langsmith-tracing", () => {
|
|
|
66
70
|
expect(summary.filesScanned).toBe(42);
|
|
67
71
|
expect(summary.componentCount).toBe(1);
|
|
68
72
|
expect(summary.findingCount).toBe(1);
|
|
69
|
-
expect(summary.sectionIds).toEqual([
|
|
70
|
-
expect(summary).not.toHaveProperty(
|
|
73
|
+
expect(summary.sectionIds).toEqual(['packages/server']);
|
|
74
|
+
expect(summary).not.toHaveProperty('components');
|
|
71
75
|
expect(summary.aiInference.proposalsGenerated).toBe(2);
|
|
72
76
|
});
|
|
73
|
-
it(
|
|
77
|
+
it('buildLangSmithInferencePipelineTraceSummary summarizes pipeline output', () => {
|
|
74
78
|
const summary = (0, langsmith_tracing_1.buildLangSmithInferencePipelineTraceSummary)({
|
|
75
|
-
candidates: [{ id:
|
|
79
|
+
candidates: [{ id: 'c1' }],
|
|
76
80
|
plan: { queues: [], droppedCandidates: [] },
|
|
77
|
-
proposals: [{ id:
|
|
81
|
+
proposals: [{ id: 'p1', proposal: {} }],
|
|
78
82
|
mergeResult: {
|
|
79
83
|
components: [],
|
|
80
84
|
dataFlows: [],
|
|
81
|
-
appliedProposalIds: [
|
|
85
|
+
appliedProposalIds: ['p1'],
|
|
82
86
|
rejectedProposalIds: [],
|
|
83
87
|
provenanceByTarget: {},
|
|
84
88
|
},
|
|
@@ -94,7 +98,7 @@ describe("tracing/langsmith-tracing", () => {
|
|
|
94
98
|
expect(summary.appliedProposalCount).toBe(1);
|
|
95
99
|
expect(summary.usageSummary).toEqual(expect.objectContaining({ providerCalls: 2, totalTokens: 150 }));
|
|
96
100
|
});
|
|
97
|
-
it(
|
|
101
|
+
it('buildLangSmithAiInferenceTraceSummary copies summary counters', () => {
|
|
98
102
|
const summary = (0, langsmith_tracing_1.buildLangSmithAiInferenceTraceSummary)({
|
|
99
103
|
ran: true,
|
|
100
104
|
candidatesConsidered: 5,
|
|
@@ -109,10 +113,10 @@ describe("tracing/langsmith-tracing", () => {
|
|
|
109
113
|
inputTokens: 20,
|
|
110
114
|
outputTokens: 10,
|
|
111
115
|
totalTokens: 30,
|
|
112
|
-
aiProvider:
|
|
113
|
-
aiModel:
|
|
116
|
+
aiProvider: 'openai',
|
|
117
|
+
aiModel: 'gpt-4',
|
|
114
118
|
});
|
|
115
119
|
expect(summary.proposalsGenerated).toBe(4);
|
|
116
|
-
expect(summary.aiProvider).toBe(
|
|
120
|
+
expect(summary.aiProvider).toBe('openai');
|
|
117
121
|
});
|
|
118
122
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dataparade/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"description": "dataPARADE CLI — scan codebases for privacy and security data flows",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"eval:models": "pnpm exec node dist/src/evals/run-model-matrix.js"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@dataparade/scanner": "github:DataParade-io/scanner#
|
|
57
|
+
"@dataparade/scanner": "github:DataParade-io/scanner#e66e1bcaef55b61214d170c617df529bd300fc89",
|
|
58
58
|
"@sentry/node": "^10.38.0",
|
|
59
59
|
"commander": "^12.1.0",
|
|
60
60
|
"dotenv": "^16.4.7",
|