json2dart-generator 0.0.1 → 0.0.6
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 +38 -17
- package/main/core/json2dart.js +1 -1
- package/main/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
### 介绍
|
|
4
4
|
|
|
5
|
-
JSON 转 Dart Model
|
|
5
|
+
JSON 转 Dart Model 类,将文件夹中的 json 文件转换为 Dart 对象并导出到指定目录
|
|
6
6
|
|
|
7
7
|
### 安装
|
|
8
8
|
|
|
@@ -16,16 +16,36 @@ npm install json2dart-generator -g
|
|
|
16
16
|
json2dart options
|
|
17
17
|
|
|
18
18
|
Options:
|
|
19
|
-
-d, --dir <dir> json
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
--
|
|
19
|
+
-d, --dir <dir> json文件夹路径,默认 json_models
|
|
20
|
+
-o, --output <dir> dart模型输出路径,默认 lib/models
|
|
21
|
+
-s, --suffix <value> 自定义dart模型类名后缀,如 Entity
|
|
22
|
+
-e, --excludes <value...> 需要排除的json文件,可指定多个文件
|
|
23
|
+
--numparse 是否使用num处理数字类型
|
|
24
|
+
--nullsafety 是否启用空安全
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
- 备注:
|
|
28
|
+
- 根类名为`json`的文件名(首字母自动转为大写,并且蛇形自动转驼峰)。
|
|
29
|
+
- 类的属性名自动蛇形转驼峰,当属性名为`dart关键字`时将在名称前面加`the`。
|
|
30
|
+
- 当`json`的值类型不存在或空时,自动默认处理为`String`类型并控制台输出警告。
|
|
31
|
+
|
|
32
|
+
- 帮助文档
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
json2dart --help
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
- 执行命令
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
json2dart --dir ./json_models -o lib/models --nullsafety
|
|
23
42
|
```
|
|
24
43
|
|
|
25
44
|
### 示例
|
|
26
45
|
|
|
46
|
+
- test.json
|
|
47
|
+
|
|
27
48
|
```json
|
|
28
|
-
// commonLang.json
|
|
29
49
|
{
|
|
30
50
|
"id": "467366309705273344",
|
|
31
51
|
"parentId": "0",
|
|
@@ -45,16 +65,18 @@ Options:
|
|
|
45
65
|
}
|
|
46
66
|
```
|
|
47
67
|
|
|
68
|
+
- test.dart
|
|
69
|
+
|
|
48
70
|
```dart
|
|
49
|
-
class
|
|
71
|
+
class Test {
|
|
50
72
|
String? id;
|
|
51
73
|
String? parentId;
|
|
52
74
|
String? name;
|
|
53
75
|
String? value;
|
|
54
76
|
List<String?>? codes;
|
|
55
|
-
|
|
77
|
+
TestData? data;
|
|
56
78
|
|
|
57
|
-
|
|
79
|
+
Test({
|
|
58
80
|
this.id,
|
|
59
81
|
this.parentId,
|
|
60
82
|
this.name,
|
|
@@ -62,25 +84,25 @@ class CommonLang {
|
|
|
62
84
|
this.codes,
|
|
63
85
|
this.data,
|
|
64
86
|
});
|
|
65
|
-
|
|
87
|
+
Test.fromJson(Map<String, dynamic> json) {
|
|
66
88
|
id = json['id']?.toString();
|
|
67
89
|
parentId = json['parentId']?.toString();
|
|
68
90
|
name = json['name']?.toString();
|
|
69
91
|
value = json['value']?.toString();
|
|
70
|
-
codes =
|
|
71
|
-
data = json['data'] != null ?
|
|
92
|
+
codes = (json['codes'] != null && json['codes'] is List) ? json['codes'].map((e) => e?.toString())?.toList() : null;
|
|
93
|
+
data = (json['data'] != null && json['data'] is Map<String, dynamic>) ? TestData.fromJson(json['data']) : null;
|
|
72
94
|
}
|
|
73
95
|
Map<String, dynamic> toJson() => {
|
|
74
96
|
'id': id,
|
|
75
97
|
'parentId': parentId,
|
|
76
98
|
'name': name,
|
|
77
99
|
'value': value,
|
|
78
|
-
'codes': codes,
|
|
100
|
+
'codes': codes?.map((e) => e)?.toList(),
|
|
79
101
|
'data': data?.toJson(),
|
|
80
102
|
};
|
|
81
103
|
}
|
|
82
104
|
|
|
83
|
-
class
|
|
105
|
+
class TestData {
|
|
84
106
|
String? dicCode;
|
|
85
107
|
String? defaultValue;
|
|
86
108
|
String? groupId;
|
|
@@ -90,7 +112,7 @@ class CommonLangData {
|
|
|
90
112
|
int? showOrder;
|
|
91
113
|
String? dicName;
|
|
92
114
|
|
|
93
|
-
|
|
115
|
+
TestData({
|
|
94
116
|
this.dicCode,
|
|
95
117
|
this.defaultValue,
|
|
96
118
|
this.groupId,
|
|
@@ -100,7 +122,7 @@ class CommonLangData {
|
|
|
100
122
|
this.showOrder,
|
|
101
123
|
this.dicName,
|
|
102
124
|
});
|
|
103
|
-
|
|
125
|
+
TestData.fromJson(Map<String, dynamic> json) {
|
|
104
126
|
dicCode = json['dicCode']?.toString();
|
|
105
127
|
defaultValue = json['defaultValue']?.toString();
|
|
106
128
|
groupId = json['groupId']?.toString();
|
|
@@ -122,5 +144,4 @@ class CommonLangData {
|
|
|
122
144
|
};
|
|
123
145
|
}
|
|
124
146
|
|
|
125
|
-
|
|
126
147
|
```
|
package/main/core/json2dart.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x52467b=a0_0x4acb;(function(_0x1c83f7,_0x1e4c55){const _0x3ff0b9=a0_0x4acb,_0xc11cc2=_0x1c83f7();while(!![]){try{const _0x86e999=-parseInt(_0x3ff0b9(0x161))/0x1+-parseInt(_0x3ff0b9(0x14f))/0x2*(-parseInt(_0x3ff0b9(0x152))/0x3)+-parseInt(_0x3ff0b9(0x126))/0x4+-parseInt(_0x3ff0b9(0x147))/0x5*(parseInt(_0x3ff0b9(0x14e))/0x6)+parseInt(_0x3ff0b9(0x159))/0x7+-parseInt(_0x3ff0b9(0x15e))/0x8+-parseInt(_0x3ff0b9(0x148))/0x9*(-parseInt(_0x3ff0b9(0x104))/0xa);if(_0x86e999===_0x1e4c55)break;else _0xc11cc2['push'](_0xc11cc2['shift']());}catch(_0x39b040){_0xc11cc2['push'](_0xc11cc2['shift']());}}}(a0_0x4cee,0x986fd));function a0_0x4acb(_0x5db2ce,_0x493dc5){const _0x4cee00=a0_0x4cee();return a0_0x4acb=function(_0x4acb32,_0x2de336){_0x4acb32=_0x4acb32-0x100;let _0x4b0c69=_0x4cee00[_0x4acb32];return _0x4b0c69;},a0_0x4acb(_0x5db2ce,_0x493dc5);}Object[a0_0x52467b(0x13b)](exports,a0_0x52467b(0x128),{'value':!![]}),exports['jsonToDart']=jsonToDart;const js_utils_plus_1=require('js-utils-plus');function a0_0x4cee(){const _0x538fa8=['push','int.tryParse(',')?.toList()','library','\x20is\x20List)\x20?\x20','get','json[','-\x20警告!:','uppercaseFirst','import','sync','false','?.toJson()','try','defineProperty','set','?.map((e)\x20=>\x20','typedef','continue','rethrow','break','while','class','switch','new','\x20\x20}','50UbCflv','27zzESxS','default','double','isArray','dynamic','case','630162Xitmjy','559794bmddZq','class\x20','throw','9wdFqeZ','catch','\x20\x20Map<String,\x20dynamic>\x20toJson()\x20=>\x20{\x0a','\x20\x20});','static','\x20is\x20bool\x20?\x20','isObject','5942538Fexmem','log','operator','async','num','3795696gaWpsM','null',')?.toList()\x20:\x20null','298351QFEtLW','show','\x20\x20\x20\x20\x20\x20\x20\x20','.fromJson(','return','interface','isBoolean','finally','extends','covariant','entries','?.toString()','5464670SZWmBo','.fromJson(Map<String,\x20dynamic>\x20json)\x20{\x0a','String','int','\x20=\x20','List','\x20\x20\x20\x20\x20\x20};','({\x0a','deferred','assert','?.toString()\x20??\x20\x27\x27)','yield','this','abstract','final','\x20\x20\x20\x20','\x20类包含值为\x22空\x22的属性,将被默认视为”String“类型','mixin','void','Function','includes','\x20\x20\x20\x20this.','enum','super','await','test','with','\x20:\x20null','implements','isInt','export','join',')\x20:\x20null','else','3522248xhNneZ','num.tryParse(','__esModule','bool','isNumber','snakeToCamel','\x20!=\x20null\x20&&\x20'];a0_0x4cee=function(){return _0x538fa8;};return a0_0x4cee();}function modelTypeGenerator(_0x4ffa5b,_0x3007eb,_0x106883,_0x2a472f){const _0x14765c=a0_0x52467b;if((0x0,js_utils_plus_1[_0x14765c(0x167)])(_0x4ffa5b))return{'type':_0x14765c(0x129),'typeTo':_0x220f1c=>_0x220f1c,'typeFrom':_0x2b3335=>_0x2b3335+_0x14765c(0x157)+_0x2b3335+_0x14765c(0x11f)};if((0x0,js_utils_plus_1['isString'])(_0x4ffa5b))return{'type':_0x14765c(0x106),'typeTo':_0x1ddb22=>_0x1ddb22,'typeFrom':_0x776488=>_0x776488+'?.toString()'};if((0x0,js_utils_plus_1[_0x14765c(0x12a)])(_0x4ffa5b)){if(_0x2a472f)return{'type':_0x14765c(0x15d),'typeTo':_0x267f54=>_0x267f54,'typeFrom':_0x468fa9=>_0x14765c(0x127)+_0x468fa9+'?.toString()\x20??\x20\x27\x27)'};return(0x0,js_utils_plus_1[_0x14765c(0x121)])(_0x4ffa5b)?{'type':_0x14765c(0x107),'typeTo':_0x39c34b=>_0x39c34b,'typeFrom':_0x278f0c=>_0x14765c(0x12e)+_0x278f0c+_0x14765c(0x10e)}:{'type':'double','typeTo':_0x434a3b=>_0x434a3b,'typeFrom':_0x3d465a=>'double.tryParse('+_0x3d465a+_0x14765c(0x10e)};}if((0x0,js_utils_plus_1[_0x14765c(0x158)])(_0x4ffa5b))return{'type':_0x3007eb,'typeTo':_0x181a34=>_0x181a34+_0x14765c(0x139),'typeFrom':_0x3e1254=>'('+_0x3e1254+'\x20!=\x20null\x20&&\x20'+_0x3e1254+'\x20is\x20Map<String,\x20dynamic>)\x20?\x20'+_0x3007eb+_0x14765c(0x164)+_0x3e1254+_0x14765c(0x124),'subLines':jsonToDart(_0x4ffa5b,_0x3007eb,_0x106883,_0x2a472f)};if((0x0,js_utils_plus_1[_0x14765c(0x14b)])(_0x4ffa5b)){const _0x5400f2=_0x4ffa5b[0x0];if(!_0x5400f2)console[_0x14765c(0x15a)](_0x14765c(0x134)+_0x3007eb+_0x14765c(0x114));const {type:_0x1c7982,typeTo:_0x3ea9ab,typeFrom:_0xcaebb6,subLines:_0x5db3e3}=modelTypeGenerator(_0x5400f2||'',_0x3007eb,_0x106883,_0x2a472f);return{'type':'List<'+_0x1c7982+(_0x106883?'?':'')+'>','typeTo':_0x48a8b2=>_0x48a8b2+_0x14765c(0x13d)+_0x3ea9ab('e')+_0x14765c(0x12f),'typeFrom':_0x56ae09=>'('+_0x56ae09+_0x14765c(0x12c)+_0x56ae09+_0x14765c(0x131)+_0x56ae09+'.map((e)\x20=>\x20'+_0xcaebb6('e')+_0x14765c(0x160),'subLines':_0x5db3e3};}return console[_0x14765c(0x15a)](_0x14765c(0x134)+_0x3007eb+_0x14765c(0x114)),{'type':'String','typeTo':_0x58ec2b=>_0x58ec2b,'typeFrom':_0x5693d9=>_0x5693d9+_0x14765c(0x103)};}function modelKeywordDefence(_0x44514d){const _0x4b092d=a0_0x52467b;let _0x533ba1=[_0x4b092d(0x15d),_0x4b092d(0x14a),_0x4b092d(0x107),_0x4b092d(0x106),'bool',_0x4b092d(0x109),_0x4b092d(0x111),_0x4b092d(0x14c),_0x4b092d(0x120),_0x4b092d(0x162),'as',_0x4b092d(0x125),_0x4b092d(0x136),_0x4b092d(0x156),_0x4b092d(0x10d),_0x4b092d(0x11a),'in',_0x4b092d(0x11b),_0x4b092d(0x15c),_0x4b092d(0x122),_0x4b092d(0x166),_0x4b092d(0x144),_0x4b092d(0x11c),_0x4b092d(0x100),'is',_0x4b092d(0x137),_0x4b092d(0x141),'external',_0x4b092d(0x130),_0x4b092d(0x110),_0x4b092d(0x14d),'factory',_0x4b092d(0x115),_0x4b092d(0x151),_0x4b092d(0x153),_0x4b092d(0x138),_0x4b092d(0x145),'true',_0x4b092d(0x143),_0x4b092d(0x112),_0x4b092d(0x15f),_0x4b092d(0x13a),'const',_0x4b092d(0x168),'on',_0x4b092d(0x13e),_0x4b092d(0x13f),'for',_0x4b092d(0x15b),'var',_0x4b092d(0x101),_0x4b092d(0x117),'part',_0x4b092d(0x116),_0x4b092d(0x149),_0x4b092d(0x132),_0x4b092d(0x140),_0x4b092d(0x142),_0x4b092d(0x10c),'hide',_0x4b092d(0x165),_0x4b092d(0x11e),'do','if',_0x4b092d(0x13c),_0x4b092d(0x10f)];if(_0x533ba1[_0x4b092d(0x118)](_0x44514d)||/^\d/[_0x4b092d(0x11d)](_0x44514d))return'the'+(0x0,js_utils_plus_1['uppercaseFirst'])(_0x44514d);return(0x0,js_utils_plus_1[_0x4b092d(0x12b)])(_0x44514d);}function jsonToDart(_0x2798bf,_0x132436,_0x426752,_0x299b75){const _0x5aa1c0=a0_0x52467b;_0x132436=(0x0,js_utils_plus_1['uppercaseFirst'])((0x0,js_utils_plus_1[_0x5aa1c0(0x12b)])(_0x132436));let _0x509d46=[],_0x27d758=[],_0xa86f2d=[],_0x37e486=[],_0xd135e1=[],_0x98791d=[];_0x509d46[_0x5aa1c0(0x12d)](_0x5aa1c0(0x150)+_0x132436+'\x20{'),_0xa86f2d[_0x5aa1c0(0x12d)]('\x20\x20'+_0x132436+_0x5aa1c0(0x10b)),_0x37e486[_0x5aa1c0(0x12d)]('\x20\x20'+_0x132436+_0x5aa1c0(0x105)),_0xd135e1['push'](_0x5aa1c0(0x154));for(const [_0x469320,_0x53b455]of Object[_0x5aa1c0(0x102)](_0x2798bf)){let _0x128a45='\x27'+_0x469320+'\x27',_0x337ef8=modelKeywordDefence(_0x469320);const _0x36508b=''+_0x132436+(0x0,js_utils_plus_1[_0x5aa1c0(0x135)])((0x0,js_utils_plus_1[_0x5aa1c0(0x12b)])(_0x469320)),{type:_0x176f6a,typeTo:_0x5d1cc7,typeFrom:_0x204a13,subLines:_0x50be02}=modelTypeGenerator(_0x53b455,_0x36508b,_0x426752,_0x299b75);if(_0x50be02)_0x98791d[_0x5aa1c0(0x12d)](_0x50be02);_0xa86f2d['push'](_0x5aa1c0(0x119)+_0x337ef8+',\x0a'),_0x27d758['push']('\x20\x20'+_0x176f6a+(_0x426752?'?':'')+'\x20'+_0x337ef8+';\x0a'),_0x37e486['push'](_0x5aa1c0(0x113)+_0x337ef8+_0x5aa1c0(0x108)+_0x204a13(_0x5aa1c0(0x133)+_0x128a45+']')+';\x0a'),_0xd135e1[_0x5aa1c0(0x12d)](_0x5aa1c0(0x163)+_0x128a45+':\x20'+_0x5d1cc7(_0x337ef8)+',\x0a');}return _0xa86f2d[_0x5aa1c0(0x12d)](_0x5aa1c0(0x155)),_0x37e486[_0x5aa1c0(0x12d)](_0x5aa1c0(0x146)),_0xd135e1['push'](_0x5aa1c0(0x10a)),_0x509d46[_0x5aa1c0(0x12d)](_0x27d758[_0x5aa1c0(0x123)]('')),_0x509d46['push'](_0xa86f2d[_0x5aa1c0(0x123)]('')),_0x509d46[_0x5aa1c0(0x12d)](_0x37e486[_0x5aa1c0(0x123)]('')),_0x509d46[_0x5aa1c0(0x12d)](_0xd135e1[_0x5aa1c0(0x123)]('')),_0x509d46['push']('}\x0a'),_0x509d46[_0x5aa1c0(0x12d)](_0x98791d[_0x5aa1c0(0x123)]('')),_0x509d46[_0x5aa1c0(0x123)]('\x0d\x0a');}
|
package/main/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a1_0x1bfc60=a1_0x51e5;function a1_0x363c(){const _0x1439c5=['2286641irinIm','__importDefault','requiredOption','output','.dart','js-utils-plus','--nullsafety','是否使用num处理数字类型,默认使用int和double','-d,\x20--dir\x20<dir>','readFile','json','json文件夹路径,默认\x20json_models','5yugpnY','name','590ZAttIz','option','Command','./core/json2dart','defineProperty','excludes','7546CubzfB','__esModule','483930RDhsWv','numparse','/lib/models/','cwd','join','--numparse','-\x20执行文件:','762004ndRDAm','path','98848uSWrJo','6Gzneja','commander','1awmgtU','suffix','nullsafety','-e,\x20--excludes\x20<value...>','isJsonString','746124wWRkTj','jsonToDart','734794aSQZJc','自定义dart模型类名后缀,如\x20Entity','parse','dart模型输出路径,默认\x20lib/models','readDirFiles','log','default','是否启用空安全','writeFile','144oQQHXI'];a1_0x363c=function(){return _0x1439c5;};return a1_0x363c();}(function(_0x230b0d,_0x12599a){const _0x48bcdb=a1_0x51e5,_0x52b937=_0x230b0d();while(!![]){try{const _0x1edf1a=-parseInt(_0x48bcdb(0x13f))/0x1*(parseInt(_0x48bcdb(0x146))/0x2)+-parseInt(_0x48bcdb(0x166))/0x3+parseInt(_0x48bcdb(0x16d))/0x4*(parseInt(_0x48bcdb(0x15c))/0x5)+-parseInt(_0x48bcdb(0x13d))/0x6*(-parseInt(_0x48bcdb(0x150))/0x7)+parseInt(_0x48bcdb(0x16f))/0x8*(parseInt(_0x48bcdb(0x14f))/0x9)+parseInt(_0x48bcdb(0x15e))/0xa*(-parseInt(_0x48bcdb(0x164))/0xb)+parseInt(_0x48bcdb(0x144))/0xc;if(_0x1edf1a===_0x12599a)break;else _0x52b937['push'](_0x52b937['shift']());}catch(_0xca3255){_0x52b937['push'](_0x52b937['shift']());}}}(a1_0x363c,0x32bf0));function a1_0x51e5(_0x135ce5,_0x36b347){const _0x363c6b=a1_0x363c();return a1_0x51e5=function(_0x51e56e,_0x48fa75){_0x51e56e=_0x51e56e-0x13d;let _0x9ca228=_0x363c6b[_0x51e56e];return _0x9ca228;},a1_0x51e5(_0x135ce5,_0x36b347);}var __importDefault=this&&this[a1_0x1bfc60(0x151)]||function(_0x98b9f7){const _0x3c9ee2=a1_0x1bfc60;return _0x98b9f7&&_0x98b9f7[_0x3c9ee2(0x165)]?_0x98b9f7:{'default':_0x98b9f7};};Object[a1_0x1bfc60(0x162)](exports,a1_0x1bfc60(0x165),{'value':!![]});const json2dart_1=require(a1_0x1bfc60(0x161)),js_utils_plus_1=require(a1_0x1bfc60(0x155)),commander_1=require(a1_0x1bfc60(0x13e)),path_1=__importDefault(require(a1_0x1bfc60(0x16e))),program=new commander_1[(a1_0x1bfc60(0x160))](),_path=process[a1_0x1bfc60(0x169)]();program[a1_0x1bfc60(0x152)](a1_0x1bfc60(0x158),a1_0x1bfc60(0x15b))['option']('-o,\x20--output\x20<dir>',a1_0x1bfc60(0x149))[a1_0x1bfc60(0x15f)]('-s,\x20--suffix\x20<value>',a1_0x1bfc60(0x147))[a1_0x1bfc60(0x15f)](a1_0x1bfc60(0x142),'需要排除的json文件,可指定多个文件')['option'](a1_0x1bfc60(0x16b),a1_0x1bfc60(0x157))['option'](a1_0x1bfc60(0x156),a1_0x1bfc60(0x14d)),program['parse']();const options=program['opts']();function run(){const _0x44f14c=a1_0x1bfc60,_0x345b8f=path_1[_0x44f14c(0x14c)]['join'](_path,options['dir']),_0x4b545e=(0x0,js_utils_plus_1[_0x44f14c(0x14a)])(_0x345b8f,_0x44f14c(0x15a),options[_0x44f14c(0x163)]||[]);console[_0x44f14c(0x14b)](new Array(0x50)['join']('-')),_0x4b545e['forEach'](function(_0x145899){const _0xc31d52=_0x44f14c,_0x9c3190=(0x0,js_utils_plus_1[_0xc31d52(0x159)])(_0x145899);if(!_0x9c3190||!(0x0,js_utils_plus_1[_0xc31d52(0x143)])(_0x9c3190)){console['error'](_0xc31d52(0x16c)+_0x145899);return;}console[_0xc31d52(0x14b)]('-\x20执行文件:'+_0x145899);const _0x2a9c49=JSON[_0xc31d52(0x148)](_0x9c3190),_0x3c20b7=path_1['default'][_0xc31d52(0x148)](_0x145899),_0x8e87b=(0x0,json2dart_1[_0xc31d52(0x145)])(_0x2a9c49,options[_0xc31d52(0x140)]?''+_0x3c20b7[_0xc31d52(0x15d)]+options['suffix']:_0x3c20b7[_0xc31d52(0x15d)],options[_0xc31d52(0x141)],options[_0xc31d52(0x167)]),_0x2c4db4=path_1[_0xc31d52(0x14c)][_0xc31d52(0x16a)](_path,options[_0xc31d52(0x153)]||_0xc31d52(0x168),_0x3c20b7[_0xc31d52(0x15d)]+_0xc31d52(0x154));(0x0,js_utils_plus_1[_0xc31d52(0x14e)])(_0x2c4db4,_0x8e87b);});}run();
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "json2dart-generator",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "json to dart model generator",
|
|
5
5
|
"main": "main/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"json2dart": "main/index.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"test": "tsc --module commonjs && node dist/index.js -d
|
|
10
|
+
"test": "tsc --module commonjs && node dist/index.js -d ./json_models -o ./models -s Entity --nullsafety --numparse",
|
|
11
11
|
"dev": "tsc -w",
|
|
12
12
|
"build": "rimraf dist && rimraf main && tsc && javascript-obfuscator dist --output main"
|
|
13
13
|
},
|