@liuhange/dsh-gov-data-inspector 3.1.6 → 3.1.8

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/cordis.patch.yml CHANGED
@@ -6,15 +6,15 @@
6
6
  entry:
7
7
  id: "@liuhange/dsh-gov-data-inspector"
8
8
  name: "@liuhange/dsh-gov-data-inspector"
9
- version: "3.1.6"
9
+ version: "3.1.8"
10
10
  - target: loaders.headless
11
11
  action: insert
12
12
  entry:
13
13
  id: "@liuhange/dsh-gov-data-inspector"
14
14
  name: "@liuhange/dsh-gov-data-inspector"
15
- version: "3.1.6"
15
+ version: "3.1.8"
16
16
  - target: tools
17
17
  action: register
18
18
  description: Register plugin tools into Cordis runtime
19
19
  plugin: "@liuhange/dsh-gov-data-inspector"
20
- version: "3.1.6"
20
+ version: "3.1.8"
@@ -8,7 +8,7 @@ describe('cordis.patch.yml 安装阻塞修复', () => {
8
8
  expect(patchContent).toContain('plugin: "@liuhange/dsh-gov-data-inspector"');
9
9
  });
10
10
  it('P0-1: version字段用双引号包裹', () => {
11
- expect(patchContent).toContain('version: "3.1.6"');
11
+ expect(patchContent).toContain('version: "3.1.8"');
12
12
  });
13
13
  it('P0-2: 顶层数组结构(以- target开头)', () => {
14
14
  const lines = patchContent.split('\n').filter((l) => l.trim() && !l.trim().startsWith('#'));
@@ -1,6 +1,6 @@
1
+ import { readFileSync } from 'node:fs';
1
2
  export const EncodingDetector = {
2
3
  detect(filePath) {
3
- const { readFileSync } = require('node:fs');
4
4
  let buffer;
5
5
  try {
6
6
  buffer = readFileSync(filePath);
@@ -1,3 +1,4 @@
1
+ import { existsSync } from 'node:fs';
1
2
  export const EndpointResolver = {
2
3
  resolve(endpoint) {
3
4
  if (!endpoint || typeof endpoint !== 'string')
@@ -8,7 +9,6 @@ export const EndpointResolver = {
8
9
  if (endpoint.startsWith('http://')) {
9
10
  return { kind: 'http', target: endpoint };
10
11
  }
11
- const { existsSync } = require('node:fs');
12
12
  if (existsSync(endpoint)) {
13
13
  return { kind: 'file', target: endpoint };
14
14
  }
@@ -1,3 +1,4 @@
1
+ import { readFileSync } from 'node:fs';
1
2
  import { EndpointResolver } from './endpointResolver.js';
2
3
  const FAILED_RESULT = {
3
4
  data: [],
@@ -34,7 +35,6 @@ export const NationalDataSource = {
34
35
  }
35
36
  try {
36
37
  if (resolved.kind === 'file') {
37
- const { readFileSync } = require('node:fs');
38
38
  const raw = JSON.parse(readFileSync(resolved.target, 'utf-8'));
39
39
  const data = parseOfficialData(raw, 'national');
40
40
  return {
@@ -1,3 +1,4 @@
1
+ import { readFileSync } from 'node:fs';
1
2
  import { EndpointResolver } from './endpointResolver.js';
2
3
  const FAILED_RESULT = {
3
4
  data: [],
@@ -34,7 +35,6 @@ export const ProvincialDataSource = {
34
35
  }
35
36
  try {
36
37
  if (resolved.kind === 'file') {
37
- const { readFileSync } = require('node:fs');
38
38
  const raw = JSON.parse(readFileSync(resolved.target, 'utf-8'));
39
39
  const data = parseOfficialData(raw, 'provincial');
40
40
  return {
@@ -1,3 +1,4 @@
1
+ import { existsSync } from 'node:fs';
1
2
  export const UrlReachabilityChecker = {
2
3
  async check(dataSource) {
3
4
  if (!dataSource || typeof dataSource !== 'string') {
@@ -18,7 +19,6 @@ export const UrlReachabilityChecker = {
18
19
  return { reachable: false, error: `数据源不可达: ${e.message}` };
19
20
  }
20
21
  }
21
- const { existsSync } = require('node:fs');
22
22
  if (existsSync(dataSource)) {
23
23
  return { reachable: true };
24
24
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@liuhange/dsh-gov-data-inspector",
3
- "description": "Government data inspection plugin: service guide quality check and public data asset classification",
4
- "version": "3.1.6",
3
+ "description": "Government data inspection plugin per GB/T 47949-2026 & GB/T 47950-2026: service guide quality check, public data asset classification, semantic & logic detection, compliance audit, data governance for digital government 一网通办",
4
+ "version": "3.1.8",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -67,7 +67,25 @@
67
67
  "data-governance",
68
68
  "data-quality",
69
69
  "plugin",
70
- "open-source"
70
+ "open-source",
71
+ "GB/T 47949-2026",
72
+ "GB/T 47950-2026",
73
+ "政务服务",
74
+ "public-data-asset",
75
+ "government-data",
76
+ "policy-basis",
77
+ "zero-hardcoding",
78
+ "降级模式",
79
+ "语义检测",
80
+ "逻辑检测",
81
+ "格式校验",
82
+ "数据巡检",
83
+ "data-inspection",
84
+ "compliance-audit",
85
+ "数据治理",
86
+ "数字政府",
87
+ "电子政务",
88
+ "一网通办"
71
89
  ],
72
90
  "homepage": "https://github.com/liuhange789/data-asset-inspector#readme"
73
91
  }