schema-dsl 1.2.3 → 1.2.4
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/.eslintignore +11 -10
- package/index.js +0 -1
- package/index.mjs +38 -8
- package/package.json +1 -1
package/.eslintignore
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
node_modules/
|
|
2
|
-
coverage/
|
|
3
|
-
.nyc_output/
|
|
4
|
-
dist/
|
|
5
|
-
build/
|
|
6
|
-
*.log
|
|
7
|
-
.DS_Store
|
|
8
|
-
.temp/
|
|
9
|
-
reports/
|
|
10
|
-
|
|
1
|
+
node_modules/
|
|
2
|
+
coverage/
|
|
3
|
+
.nyc_output/
|
|
4
|
+
dist/
|
|
5
|
+
build/
|
|
6
|
+
*.log
|
|
7
|
+
.DS_Store
|
|
8
|
+
.temp/
|
|
9
|
+
reports/
|
|
10
|
+
*.d.ts
|
|
11
|
+
|
package/index.js
CHANGED
package/index.mjs
CHANGED
|
@@ -1,30 +1,60 @@
|
|
|
1
1
|
import schemaDsl from './index.js';
|
|
2
2
|
|
|
3
3
|
export const {
|
|
4
|
+
// 统一DSL API
|
|
4
5
|
dsl,
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
DslBuilder,
|
|
7
|
+
|
|
8
|
+
// 配置函数 (v1.0.4+)
|
|
9
|
+
config,
|
|
10
|
+
|
|
11
|
+
// String 扩展控制
|
|
12
|
+
installStringExtensions,
|
|
13
|
+
uninstallStringExtensions,
|
|
14
|
+
|
|
15
|
+
// 核心类
|
|
7
16
|
JSONSchemaCore,
|
|
8
17
|
Validator,
|
|
18
|
+
|
|
19
|
+
// 便捷方法(推荐)
|
|
20
|
+
validate,
|
|
21
|
+
validateAsync,
|
|
22
|
+
getDefaultValidator,
|
|
9
23
|
ErrorFormatter,
|
|
10
24
|
CacheManager,
|
|
11
|
-
|
|
25
|
+
|
|
26
|
+
// 错误类 (v2.1.0 新增)
|
|
27
|
+
ValidationError,
|
|
28
|
+
I18nError,
|
|
29
|
+
|
|
30
|
+
// 错误消息系统
|
|
12
31
|
ErrorCodes,
|
|
13
32
|
MessageTemplate,
|
|
14
33
|
Locale,
|
|
34
|
+
|
|
35
|
+
// 插件系统 (v2.2.0 新增)
|
|
36
|
+
PluginManager,
|
|
37
|
+
|
|
38
|
+
// 导出器
|
|
15
39
|
exporters,
|
|
16
40
|
MongoDBExporter,
|
|
17
41
|
MySQLExporter,
|
|
18
42
|
PostgreSQLExporter,
|
|
43
|
+
MarkdownExporter,
|
|
44
|
+
|
|
45
|
+
// 工具函数
|
|
19
46
|
TypeConverter,
|
|
20
47
|
SchemaHelper,
|
|
21
48
|
SchemaUtils,
|
|
49
|
+
|
|
50
|
+
// 验证器扩展
|
|
22
51
|
CustomKeywords,
|
|
52
|
+
|
|
53
|
+
// 常量
|
|
23
54
|
CONSTANTS,
|
|
24
|
-
VERSION,
|
|
25
|
-
installStringExtensions,
|
|
26
|
-
uninstallStringExtensions
|
|
27
|
-
} = schema-dsl;
|
|
28
55
|
|
|
29
|
-
|
|
56
|
+
// 版本信息
|
|
57
|
+
VERSION
|
|
58
|
+
} = schemaDsl;
|
|
30
59
|
|
|
60
|
+
export default dsl;
|