@liuhange/dsh-data-asset-shared 2.0.0 → 2.0.2
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 +2 -2
- package/lib/index.js +9 -415
- package/lib/invariant.js +4 -5
- package/package.json +11 -6
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @liuhange/dsh-data-asset-shared
|
|
2
2
|
|
|
3
3
|
Shared infrastructure for data assetization plugins.
|
|
4
4
|
|
|
@@ -13,7 +13,7 @@ Shared infrastructure for data assetization plugins.
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
import { BusinessRulesLoader, FileFormatAdapter, ReportGenerator, PathValidator, AuditLogger } from '@
|
|
16
|
+
import { BusinessRulesLoader, FileFormatAdapter, ReportGenerator, PathValidator, AuditLogger } from '@liuhange/dsh-data-asset-shared'
|
|
17
17
|
|
|
18
18
|
const loader = new BusinessRulesLoader()
|
|
19
19
|
const { config, status } = loader.load()
|
package/lib/index.js
CHANGED
|
@@ -1,415 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"供应链",
|
|
11
|
-
"销售明细",
|
|
12
|
-
"设备工况",
|
|
13
|
-
"交易流水"
|
|
14
|
-
],
|
|
15
|
-
score: 5,
|
|
16
|
-
label: "★★★★★",
|
|
17
|
-
recommendation: "优先交易,建议入表"
|
|
18
|
-
},
|
|
19
|
-
mediumValue: {
|
|
20
|
-
keywords: [
|
|
21
|
-
"用户行为",
|
|
22
|
-
"产品数据",
|
|
23
|
-
"行业报告"
|
|
24
|
-
],
|
|
25
|
-
score: 3,
|
|
26
|
-
label: "★★★",
|
|
27
|
-
recommendation: "脱敏后交易"
|
|
28
|
-
},
|
|
29
|
-
lowValue: {
|
|
30
|
-
keywords: [
|
|
31
|
-
"日志",
|
|
32
|
-
"备份",
|
|
33
|
-
"临时"
|
|
34
|
-
],
|
|
35
|
-
score: 1,
|
|
36
|
-
label: "★",
|
|
37
|
-
recommendation: "评估处理成本"
|
|
38
|
-
},
|
|
39
|
-
defaultValue: {
|
|
40
|
-
score: 3,
|
|
41
|
-
label: "★★★",
|
|
42
|
-
recommendation: "需进一步评估"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
sensitivePatterns: {
|
|
46
|
-
idCard: {
|
|
47
|
-
pattern: "[1-9]\\d{5}(18|19|20)?\\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])\\d{3}[\\dXx]",
|
|
48
|
-
level: "FULL"
|
|
49
|
-
},
|
|
50
|
-
phone: {
|
|
51
|
-
pattern: "1[3-9]\\d{9}",
|
|
52
|
-
level: "PARTIAL"
|
|
53
|
-
},
|
|
54
|
-
bankCard: {
|
|
55
|
-
pattern: "[1-9]\\d{15,18}",
|
|
56
|
-
level: "PARTIAL"
|
|
57
|
-
},
|
|
58
|
-
email: {
|
|
59
|
-
pattern: "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}",
|
|
60
|
-
level: "PARTIAL"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
maskingLevels: {
|
|
64
|
-
FULL: {
|
|
65
|
-
description: "完全匿名化",
|
|
66
|
-
applyTo: ["idCard"]
|
|
67
|
-
},
|
|
68
|
-
PARTIAL: {
|
|
69
|
-
description: "假名化,保留前3后4",
|
|
70
|
-
applyTo: ["phone", "bankCard"]
|
|
71
|
-
},
|
|
72
|
-
GENERALIZE: {
|
|
73
|
-
description: "泛化处理",
|
|
74
|
-
applyTo: ["email"]
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
cleaningRules: {
|
|
78
|
-
missingValueStrategy: {
|
|
79
|
-
government: "interpolation",
|
|
80
|
-
financial: "manual_review",
|
|
81
|
-
behavior: "mode_fill"
|
|
82
|
-
},
|
|
83
|
-
qualityThreshold: {
|
|
84
|
-
A: {
|
|
85
|
-
missingRate: .05,
|
|
86
|
-
errorRate: .01,
|
|
87
|
-
label: "优秀"
|
|
88
|
-
},
|
|
89
|
-
B: {
|
|
90
|
-
missingRate: .1,
|
|
91
|
-
errorRate: .03,
|
|
92
|
-
label: "良好"
|
|
93
|
-
},
|
|
94
|
-
C: {
|
|
95
|
-
missingRate: .2,
|
|
96
|
-
errorRate: .05,
|
|
97
|
-
label: "合格"
|
|
98
|
-
},
|
|
99
|
-
D: {
|
|
100
|
-
missingRate: .2,
|
|
101
|
-
errorRate: .05,
|
|
102
|
-
label: "不合格",
|
|
103
|
-
action: "不建议交易"
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
compliance: { policies: [
|
|
108
|
-
{
|
|
109
|
-
name: "数据产权登记工作指引",
|
|
110
|
-
doc: "国数综政策〔2026〕35号",
|
|
111
|
-
check: "数据来源可登记"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
name: "数据流通安全治理",
|
|
115
|
-
doc: "发改数据〔2025〕18号",
|
|
116
|
-
check: "来源合法性"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
name: "数据脱敏工具标准",
|
|
120
|
-
doc: "YD/T 6225-2024",
|
|
121
|
-
check: "脱敏效果达标"
|
|
122
|
-
}
|
|
123
|
-
] },
|
|
124
|
-
packaging: {
|
|
125
|
-
complianceStatements: [
|
|
126
|
-
"本数据产品已完成脱敏处理",
|
|
127
|
-
"不包含个人身份信息",
|
|
128
|
-
"数据来源合法",
|
|
129
|
-
"建议交易前完成数据产权登记"
|
|
130
|
-
],
|
|
131
|
-
pricingRules: [
|
|
132
|
-
{
|
|
133
|
-
valueLevel: "★★★★★",
|
|
134
|
-
suggestion: "根据数据质量、稀缺性和应用场景综合定价,建议高价交易"
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
valueLevel: "★★★★",
|
|
138
|
-
suggestion: "根据数据质量和应用场景定价,建议中高价交易"
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
valueLevel: "★★★",
|
|
142
|
-
suggestion: "根据数据质量和应用场景综合定价"
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
valueLevel: "★★",
|
|
146
|
-
suggestion: "建议低价交易或内部使用"
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
valueLevel: "★",
|
|
150
|
-
suggestion: "建议评估处理成本后决定是否交易"
|
|
151
|
-
}
|
|
152
|
-
],
|
|
153
|
-
defaultDescription: "适用于数据分析、模型训练、行业研究等场景",
|
|
154
|
-
version: "V1.0"
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
//#endregion
|
|
158
|
-
//#region lib/types/businessRulesLoader.js
|
|
159
|
-
var BusinessRulesLoader = class {
|
|
160
|
-
cachedResult = null;
|
|
161
|
-
configPath;
|
|
162
|
-
constructor(configPath) {
|
|
163
|
-
this.configPath = configPath ? path.resolve(configPath) : path.resolve(process.cwd(), "config", "business-rules.json");
|
|
164
|
-
}
|
|
165
|
-
load() {
|
|
166
|
-
if (this.cachedResult) return this.cachedResult;
|
|
167
|
-
const result = this.loadInternal();
|
|
168
|
-
this.cachedResult = result;
|
|
169
|
-
return result;
|
|
170
|
-
}
|
|
171
|
-
loadInternal() {
|
|
172
|
-
if (!fs.existsSync(this.configPath)) return this.createDefaultResult("DEFAULT_MISSING");
|
|
173
|
-
let raw;
|
|
174
|
-
try {
|
|
175
|
-
raw = fs.readFileSync(this.configPath, "utf-8");
|
|
176
|
-
} catch {
|
|
177
|
-
return this.createDefaultResult("DEFAULT_PARSE");
|
|
178
|
-
}
|
|
179
|
-
let parsed;
|
|
180
|
-
try {
|
|
181
|
-
parsed = JSON.parse(raw);
|
|
182
|
-
} catch {
|
|
183
|
-
return this.createDefaultResult("DEFAULT_PARSE");
|
|
184
|
-
}
|
|
185
|
-
if (!this.isBusinessRulesConfig(parsed)) return this.createDefaultResult("DEFAULT_PARSE");
|
|
186
|
-
if (!this.isVersionCompatible(parsed.version)) return this.createDefaultResult("DEFAULT_VERSION");
|
|
187
|
-
if (!this.hasRequiredNodes(parsed)) return this.createDefaultResult("DEFAULT_PARTIAL");
|
|
188
|
-
return {
|
|
189
|
-
config: parsed,
|
|
190
|
-
status: "CONFIG_LOADED"
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
createDefaultResult(status) {
|
|
194
|
-
return {
|
|
195
|
-
config: defaultBusinessRules,
|
|
196
|
-
status
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
isBusinessRulesConfig(value) {
|
|
200
|
-
return typeof value === "object" && value !== null && "version" in value && "valueAssessment" in value && "sensitivePatterns" in value && "cleaningRules" in value && "compliance" in value && "packaging" in value;
|
|
201
|
-
}
|
|
202
|
-
isVersionCompatible(version) {
|
|
203
|
-
if (typeof version !== "string") return false;
|
|
204
|
-
return version.startsWith("1.");
|
|
205
|
-
}
|
|
206
|
-
hasRequiredNodes(config) {
|
|
207
|
-
return config.valueAssessment !== void 0 && config.sensitivePatterns !== void 0 && config.maskingLevels !== void 0 && config.cleaningRules !== void 0 && config.compliance !== void 0 && config.packaging !== void 0;
|
|
208
|
-
}
|
|
209
|
-
clearCache() {
|
|
210
|
-
this.cachedResult = null;
|
|
211
|
-
}
|
|
212
|
-
};
|
|
213
|
-
//#endregion
|
|
214
|
-
//#region lib/types/fileFormatAdapter.js
|
|
215
|
-
var FileFormatAdapter = class {
|
|
216
|
-
detectFormat(filePath) {
|
|
217
|
-
const ext = path.extname(filePath).toLowerCase().slice(1);
|
|
218
|
-
if (ext === "csv" || ext === "json" || ext === "txt" || ext === "xlsx") return ext;
|
|
219
|
-
return "unknown";
|
|
220
|
-
}
|
|
221
|
-
async read(filePath) {
|
|
222
|
-
const format = this.detectFormat(filePath);
|
|
223
|
-
const fullPath = path.resolve(filePath);
|
|
224
|
-
if (!fs.existsSync(fullPath)) throw new Error(`错误:文件不存在 - ${fullPath}`);
|
|
225
|
-
const isLargeFile = fs.statSync(fullPath).size >= 10 * 1024 * 1024;
|
|
226
|
-
switch (format) {
|
|
227
|
-
case "csv": return this.readCsv(fullPath);
|
|
228
|
-
case "json": return this.readJson(fullPath);
|
|
229
|
-
case "xlsx": return this.readXlsx(fullPath);
|
|
230
|
-
default: return this.readTxt(fullPath, format, isLargeFile);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
async write(filePath, lines, format) {
|
|
234
|
-
const fullPath = path.resolve(filePath);
|
|
235
|
-
const dir = path.dirname(fullPath);
|
|
236
|
-
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
237
|
-
switch (format) {
|
|
238
|
-
case "csv":
|
|
239
|
-
this.writeCsv(fullPath, lines);
|
|
240
|
-
break;
|
|
241
|
-
case "json":
|
|
242
|
-
this.writeJson(fullPath, lines);
|
|
243
|
-
break;
|
|
244
|
-
case "xlsx":
|
|
245
|
-
this.writeXlsx(fullPath, lines);
|
|
246
|
-
break;
|
|
247
|
-
default:
|
|
248
|
-
fs.writeFileSync(fullPath, lines.join("\n"), "utf-8");
|
|
249
|
-
break;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
readTxt(filePath, format, _isLargeFile) {
|
|
253
|
-
const content = fs.readFileSync(filePath, "utf-8");
|
|
254
|
-
return {
|
|
255
|
-
lines: content.split("\n").filter((line) => line.trim()),
|
|
256
|
-
format,
|
|
257
|
-
raw: content
|
|
258
|
-
};
|
|
259
|
-
}
|
|
260
|
-
readCsv(filePath) {
|
|
261
|
-
const content = fs.readFileSync(filePath, "utf-8");
|
|
262
|
-
return {
|
|
263
|
-
lines: content.split("\n").filter((line) => line.trim()),
|
|
264
|
-
format: "csv",
|
|
265
|
-
raw: content
|
|
266
|
-
};
|
|
267
|
-
}
|
|
268
|
-
readJson(filePath) {
|
|
269
|
-
const content = fs.readFileSync(filePath, "utf-8");
|
|
270
|
-
const parsed = JSON.parse(content);
|
|
271
|
-
if (Array.isArray(parsed)) return {
|
|
272
|
-
lines: parsed.map((item) => JSON.stringify(item)),
|
|
273
|
-
format: "json",
|
|
274
|
-
raw: parsed
|
|
275
|
-
};
|
|
276
|
-
return {
|
|
277
|
-
lines: [JSON.stringify(parsed)],
|
|
278
|
-
format: "json",
|
|
279
|
-
raw: parsed
|
|
280
|
-
};
|
|
281
|
-
}
|
|
282
|
-
readXlsx(filePath) {
|
|
283
|
-
const content = fs.readFileSync(filePath, "utf-8");
|
|
284
|
-
return {
|
|
285
|
-
lines: content.split("\n").filter((line) => line.trim()),
|
|
286
|
-
format: "xlsx",
|
|
287
|
-
raw: content
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
writeCsv(filePath, lines) {
|
|
291
|
-
fs.writeFileSync(filePath, lines.join("\n"), "utf-8");
|
|
292
|
-
}
|
|
293
|
-
writeJson(filePath, lines) {
|
|
294
|
-
const objects = lines.map((line) => {
|
|
295
|
-
try {
|
|
296
|
-
return JSON.parse(line);
|
|
297
|
-
} catch {
|
|
298
|
-
return line;
|
|
299
|
-
}
|
|
300
|
-
});
|
|
301
|
-
fs.writeFileSync(filePath, JSON.stringify(objects, null, 2), "utf-8");
|
|
302
|
-
}
|
|
303
|
-
writeXlsx(filePath, lines) {
|
|
304
|
-
fs.writeFileSync(filePath, lines.join("\n"), "utf-8");
|
|
305
|
-
}
|
|
306
|
-
};
|
|
307
|
-
//#endregion
|
|
308
|
-
//#region lib/types/reportGenerator.js
|
|
309
|
-
var ReportGenerator = class {
|
|
310
|
-
generateMaskingReport(params) {
|
|
311
|
-
const findingsText = Object.keys(params.fieldTypeCounts).length > 0 ? Object.entries(params.fieldTypeCounts).map(([type, count]) => `发现 ${count} 个${type}类型的敏感数据`).join(";") : "无";
|
|
312
|
-
return `【脱敏报告】
|
|
313
|
-
- 处理文件:${params.inputPath}
|
|
314
|
-
- 发现敏感字段:${findingsText}
|
|
315
|
-
- 脱敏策略:${params.strategy}
|
|
316
|
-
- 输出文件:${params.outputPath}
|
|
317
|
-
- 状态:✅ 完成`;
|
|
318
|
-
}
|
|
319
|
-
generateCleaningReport(params) {
|
|
320
|
-
let report = `【数据清洗报告】
|
|
321
|
-
- 文件:${params.inputPath}
|
|
322
|
-
- 原始行数:${params.originalLineCount}
|
|
323
|
-
- 去重后行数:${params.originalLineCount - params.duplicateRemoved}(删除 ${params.duplicateRemoved} 行重复)
|
|
324
|
-
`;
|
|
325
|
-
if (params.standardizeApplied) report += `- 格式标准化:✅ 完成\n`;
|
|
326
|
-
report += `- 异常值检测:发现 ${params.anomalyTotalCount} 个异常\n`;
|
|
327
|
-
if (params.anomalies.length > 0) {
|
|
328
|
-
const anomalyText = params.anomalies.slice(0, 5).map((a) => `行${a.line}: ${a.reason}`).join(";");
|
|
329
|
-
report += ` 异常详情:${anomalyText}`;
|
|
330
|
-
if (params.anomalyTotalCount > 5) report += `...等${params.anomalyTotalCount}项`;
|
|
331
|
-
report += `\n`;
|
|
332
|
-
}
|
|
333
|
-
report += `- 输出文件:${params.outputPath}\n- 状态:✅ 完成`;
|
|
334
|
-
return report;
|
|
335
|
-
}
|
|
336
|
-
generateInventoryReport(params) {
|
|
337
|
-
let report = `【数据资产盘点报告】\n- 目录:${params.directory}\n- 发现数据文件:${params.fileCount} 个\n\n`;
|
|
338
|
-
report += `| 文件名 | 大小 | 类型 | 价值评估 | 说明 |\n`;
|
|
339
|
-
report += `|--------|------|------|----------|------|\n`;
|
|
340
|
-
for (const item of params.assetItems) report += `| ${item.fileName} | ${item.size} | ${item.type} | ${item.valueAssessment} | ${item.description} |\n`;
|
|
341
|
-
report += `\n---\n【建议】\n`;
|
|
342
|
-
report += `1. 高价值数据(★★★★★)建议优先进行清洗和脱敏后交易\n`;
|
|
343
|
-
report += `2. 低价值数据建议评估是否值得投入处理成本\n`;
|
|
344
|
-
report += `3. 所有数据交易前必须完成合规审查\n`;
|
|
345
|
-
return report;
|
|
346
|
-
}
|
|
347
|
-
generatePackagingManual(params) {
|
|
348
|
-
const manual = params.productManual;
|
|
349
|
-
const complianceText = manual.complianceStatements.map((stmt) => `✅ ${stmt}`).join("\n");
|
|
350
|
-
return `========================================
|
|
351
|
-
数据产品说明书
|
|
352
|
-
========================================
|
|
353
|
-
|
|
354
|
-
【产品名称】${manual.productName}
|
|
355
|
-
【版本】${manual.version}
|
|
356
|
-
【生成日期】${manual.generatedDate}
|
|
357
|
-
|
|
358
|
-
【数据概览】
|
|
359
|
-
- 源文件:${manual.dataOverview.sourceFile}
|
|
360
|
-
- 数据量:${manual.dataOverview.recordCount} 条记录
|
|
361
|
-
- 文件大小:${manual.dataOverview.fileSizeKb.toFixed(1)} KB
|
|
362
|
-
- 格式:${manual.dataOverview.format}
|
|
363
|
-
|
|
364
|
-
【数据样例】(前5行)
|
|
365
|
-
${manual.sampleLines.join("\n")}
|
|
366
|
-
|
|
367
|
-
【使用场景】
|
|
368
|
-
${manual.usageScenario}
|
|
369
|
-
|
|
370
|
-
【合规声明】
|
|
371
|
-
${complianceText}
|
|
372
|
-
|
|
373
|
-
【定价建议】
|
|
374
|
-
${manual.pricingSuggestion}
|
|
375
|
-
|
|
376
|
-
--- 本产品由数据资产化工具包自动生成 ---`;
|
|
377
|
-
}
|
|
378
|
-
};
|
|
379
|
-
//#endregion
|
|
380
|
-
//#region lib/types/pathValidator.js
|
|
381
|
-
var PathValidator = class {
|
|
382
|
-
validate(filePath, workingDir) {
|
|
383
|
-
const resolved = path.resolve(filePath);
|
|
384
|
-
if (filePath.includes("..")) throw new Error(`错误:路径不合法 - ${filePath}`);
|
|
385
|
-
const relative = path.relative(workingDir, resolved);
|
|
386
|
-
if (relative.startsWith("..") || path.isAbsolute(relative)) throw new Error(`错误:路径不合法 - ${filePath}`);
|
|
387
|
-
return resolved;
|
|
388
|
-
}
|
|
389
|
-
validateDirectory(dirPath, workingDir) {
|
|
390
|
-
return this.validate(dirPath, workingDir);
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
//#endregion
|
|
394
|
-
//#region lib/types/auditLogger.js
|
|
395
|
-
var AuditLogger = class {
|
|
396
|
-
logDir;
|
|
397
|
-
constructor(logDir) {
|
|
398
|
-
this.logDir = logDir ?? path.resolve(process.cwd(), "logs");
|
|
399
|
-
}
|
|
400
|
-
log(params) {
|
|
401
|
-
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
402
|
-
const operator = params.operator ?? "system";
|
|
403
|
-
const logLine = `[${params.pluginName}] ${timestamp} | 操作: ${params.operation} | 操作人: ${operator} | 输入: ${params.inputPath} | 输出: ${params.outputPath} | 结果: ${params.result}`;
|
|
404
|
-
console.log(logLine);
|
|
405
|
-
if (params.writeToFile) this.writeToFile(logLine);
|
|
406
|
-
}
|
|
407
|
-
writeToFile(logLine) {
|
|
408
|
-
if (!fs.existsSync(this.logDir)) fs.mkdirSync(this.logDir, { recursive: true });
|
|
409
|
-
const date = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
410
|
-
const logFile = path.join(this.logDir, `audit-${date}.log`);
|
|
411
|
-
fs.appendFileSync(logFile, logLine + "\n", "utf-8");
|
|
412
|
-
}
|
|
413
|
-
};
|
|
414
|
-
//#endregion
|
|
415
|
-
export { AuditLogger, BusinessRulesLoader, FileFormatAdapter, PathValidator, ReportGenerator, defaultBusinessRules };
|
|
1
|
+
export * from './types.js';
|
|
2
|
+
export { defaultBusinessRules } from './defaultBusinessRules.js';
|
|
3
|
+
export { defaultQualityScoringConfig, defaultLineageConfig, defaultAdvancedMaskingConfig, defaultVisualizationConfig, defaultSensitivityClassificationConfig, defaultIncrementalSchedulingConfig, } from './defaultBusinessRules.js';
|
|
4
|
+
export { BusinessRulesLoader } from './businessRulesLoader.js';
|
|
5
|
+
export { FileFormatAdapter } from './fileFormatAdapter.js';
|
|
6
|
+
export { ReportGenerator } from './reportGenerator.js';
|
|
7
|
+
export { PathValidator } from './pathValidator.js';
|
|
8
|
+
export { AuditLogger } from './auditLogger.js';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
package/lib/invariant.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#
|
|
5
|
-
export { install, invariant };
|
|
1
|
+
export const invariant = 'data-asset-shared';
|
|
2
|
+
export function install() {
|
|
3
|
+
}
|
|
4
|
+
//# sourceMappingURL=invariant.js.map
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
{
|
|
2
2
|
"name": "@liuhange/dsh-data-asset-shared",
|
|
3
3
|
"description": "Shared infrastructure for data assetization plugins: business rules loader, file format adapter, report generator, path validator, audit logger",
|
|
4
|
-
"version":
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/
|
|
10
|
+
"url": "git+https://github.com/liuhange789/data-asset-inspector.git",
|
|
11
11
|
"directory": "packages/data-asset/data-asset-shared"
|
|
12
12
|
},
|
|
13
13
|
"type": "module",
|
|
@@ -31,12 +31,17 @@
|
|
|
31
31
|
"lib/types/**/*.d.ts"
|
|
32
32
|
],
|
|
33
33
|
"license": "MIT",
|
|
34
|
+
"scripts": {
|
|
35
|
+
"typecheck": "tsc --noEmit",
|
|
36
|
+
"test": "vitest run",
|
|
37
|
+
"build": "tsc"
|
|
38
|
+
},
|
|
34
39
|
"dependencies": {
|
|
35
40
|
"csv-parse": "^5.5.0"
|
|
36
41
|
},
|
|
37
42
|
"peerDependencies": {
|
|
38
|
-
"@deepseek-ai/cordis":
|
|
39
|
-
"@deepseek-ai/dsh-tools":
|
|
40
|
-
"@deepseek-ai/schemastery":
|
|
43
|
+
"@deepseek-ai/cordis": "^4.0.0",
|
|
44
|
+
"@deepseek-ai/dsh-tools": "0.0.1-rc.1",
|
|
45
|
+
"@deepseek-ai/schemastery": "^3.18.0"
|
|
41
46
|
}
|
|
42
47
|
}
|