mushroom-cli 1.1.2 → 1.2.0-alpha.10

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 CHANGED
@@ -1,91 +1,211 @@
1
- # Mushroom CLI
2
-
3
- ## Init
4
-
5
- Init a mushroom json file
6
-
7
- npx mushroom-cli init json ./api/SampleProject.json [silent]
8
-
9
- Init a DotNet Core project which pre-install Mushroom Server
10
-
11
- npx mushroom-cli init netcore [projectName]
12
-
13
- ## Configure
14
-
15
- Add the mushroom json file into mushroom-config.json
16
-
17
- npx mushroom-cli config add ./api/yourProjectName.json
18
-
19
- Config gen docs api
20
-
21
- npx mushroom-cli config gen projectName docs ./wwwroot/docs.html [alias aliasName] [features file,auth,mail,driver] [roles Admin,User-Contributor]
22
-
23
- Config gen database docs
24
-
25
- npx mushroom-cli config gen projectName db-docs ./wwwroot/db-docs.html [alias aliasName] [features file,auth,mail]
26
-
27
- Config gen javascript driver
28
-
29
- npx mushroom-cli config gen projectName js-driver ./src/api/mushroom.api.js [alias aliasName] [roles Admin,User-Contributor] [tarball tarballName]
30
-
31
- Config gen typescript driver
32
-
33
- npx mushroom-cli config gen projectName ts-driver ./src/api/mushroom.api.ts [alias aliasName] [roles Admin,User-Contributor]
34
-
35
- Config gen entities for Mushroom project in CSharp and using MongoDb
36
-
37
- npx mushroom-cli config gen projectName c#-mongo ./API/Generated.cs [alias aliasName]
38
-
39
- Config gen entities for CSharp project which calls Mushroom API
40
-
41
- npx mushroom-cli config gen projectName c#-driver ./API/Generated.cs [roles Admin,User-Contributor] [alias aliasName] [access-modifier public] [features file,auth,mail]
42
-
43
- ## Genarate
44
-
45
- Generate docs api (html format)
46
-
47
- npx mushroom-cli gen projectName[@aliasName] docs [tmp]
48
-
49
- Generate database docs (html format)
50
-
51
- npx mushroom-cli gen projectName[@aliasName] db-docs [tmp]
52
-
53
- Generate npm package (tarball file)
54
-
55
- npx mushroom-cli gen projectName[@aliasName] js-driver-tarball
56
-
57
- Generate javascript driver
58
-
59
- npx mushroom-cli gen projectName[@aliasName] js-driver
60
-
61
- Generate typescript driver
62
-
63
- npx mushroom-cli gen projectName[@aliasName] ts-driver
64
-
65
- Generate entities for Mushroom project in CSharp and using MongoDb
66
-
67
- npx mushroom-cli gen projectName[@aliasName] c#-mongo
68
-
69
- Generate entities for CSharp project which calls Mushroom API
70
-
71
- npx mushroom-cli gen projectName[@aliasName] c#-driver
72
-
73
- ## Update
74
-
75
- Update ts code
76
-
77
- npx mushroom-cli update ts-code [file-path.ts] [remote-ts-code-url]
78
-
79
- ## Other
80
-
81
- Disable checking for update:
82
-
83
- npx mushroom-cli parameters --no-check-update
84
-
85
- ## Version
86
-
87
- ### 1.1.0
88
-
89
- Support MushroomServer 0.2.25.4 or later
90
-
91
- Support mushroomjs 1.1.0 or later
1
+ # Mushroom CLI
2
+
3
+ ## Init
4
+
5
+ Init a mushroom json file
6
+
7
+ ```bash
8
+ npx mushroom-cli init json ./api/SampleProject.json [silent]
9
+ ```
10
+
11
+ Init a DotNet Core project which pre-install Mushroom Server
12
+
13
+ ```bash
14
+ npx mushroom-cli init netcore [projectName]
15
+ ```
16
+
17
+ ## Configure
18
+
19
+ Add the mushroom json file into mushroom-config.json
20
+
21
+ ```bash
22
+ npx mushroom-cli config add ./api/yourProjectName.json
23
+ ```
24
+
25
+ Config gen docs api
26
+
27
+ ```bash
28
+ npx mushroom-cli config gen projectName docs ./wwwroot/docs.html [alias aliasName] [features file,auth,mail,driver] [roles Admin,User-Contributor]
29
+ ```
30
+
31
+ Config gen database docs
32
+
33
+ ```bash
34
+ npx mushroom-cli config gen projectName "db-docs" ./wwwroot/db-docs.html [alias aliasName] [features file,auth,mail]
35
+ ```
36
+
37
+ Config gen javascript driver
38
+
39
+ ```bash
40
+ npx mushroom-cli config gen projectName "js-driver" ./src/api/mushroom.api.js [alias aliasName] [roles Admin,User-Contributor] [tarball tarballName]
41
+ ```
42
+
43
+ Config gen typescript driver
44
+
45
+ ```bash
46
+ npx mushroom-cli config gen projectName "ts-driver" ./src/api/mushroom.api.ts [alias aliasName] [roles Admin,User-Contributor]
47
+ ```
48
+
49
+ Config gen entities for Mushroom project in CSharp and using MongoDb
50
+
51
+ ```bash
52
+ npx mushroom-cli config gen projectName "c#-mongo" ./API/Generated.cs [alias aliasName]
53
+ ```
54
+
55
+ Config gen entities for CSharp project which calls Mushroom API
56
+
57
+ ```bash
58
+ npx mushroom-cli config gen projectName "c#-driver" ./API/Generated.cs [roles Admin,User-Contributor] [alias aliasName] [access-modifier public] [features file,auth,mail]
59
+ ```
60
+
61
+ ## Genarate
62
+
63
+ Generate docs api (html format)
64
+
65
+ ```bash
66
+ npx mushroom-cli gen projectName[@aliasName] docs [v1] [tmp]
67
+ ```
68
+
69
+ Generate database docs (html format)
70
+
71
+ ```bash
72
+ npx mushroom-cli gen projectName[@aliasName] "db-docs" [tmp]
73
+ ```
74
+
75
+ Generate npm package (tarball file)
76
+
77
+ ```bash
78
+ npx mushroom-cli gen projectName[@aliasName] "js-driver-tarball"
79
+ ```
80
+
81
+ Generate javascript driver
82
+
83
+ ```bash
84
+ npx mushroom-cli gen projectName[@aliasName] "js-driver"
85
+ ```
86
+
87
+ Generate typescript driver
88
+
89
+ ```bash
90
+ npx mushroom-cli gen projectName[@aliasName] "ts-driver"
91
+ ```
92
+
93
+ Generate entities for Mushroom project in CSharp and using MongoDb
94
+
95
+ ```bash
96
+ npx mushroom-cli gen projectName[@aliasName] "c#-mongo"
97
+ ```
98
+
99
+ Generate entities for CSharp project which calls Mushroom API
100
+
101
+ ```bash
102
+ npx mushroom-cli gen projectName[@aliasName] "c#-driver"
103
+ ```
104
+
105
+ ## Merge
106
+
107
+ ```bash
108
+ npx mushroom-cli merge output-path.json
109
+ ```
110
+
111
+ ## Update
112
+
113
+ Update ts code (configuration was stored in mushroom-config.json file)
114
+
115
+ ```bash
116
+ npx mushroom-cli update "ts-code"
117
+ ```
118
+
119
+ Update ts code (simple call)
120
+
121
+ ```bash
122
+ npx mushroom-cli update "ts-code" file-path.ts remote-ts-code-url
123
+ ```
124
+
125
+ ## Other
126
+
127
+ Disable checking for update:
128
+
129
+ ```bash
130
+ npx mushroom-cli parameters --no-check-update
131
+ ```
132
+
133
+ ## Version
134
+
135
+ ### 1.2.0-alpha.10
136
+
137
+ Improvement:
138
+
139
+ * gen-docs: add default-value information of fields
140
+
141
+ ### 1.2.0-alpha.9
142
+
143
+ Improvement:
144
+
145
+ * gen-docs
146
+ * v1.2: minify, fix bug (some fields are not excluded)
147
+
148
+ ### 1.2.0-alpha.8
149
+
150
+ Improvement:
151
+
152
+ * gen-docs
153
+ * v1.2: deal with very big api docs
154
+ * v1: prerender all docs html (need more RAM, less performance)
155
+
156
+ ### 1.2.0-alpha.7
157
+
158
+ New features:
159
+
160
+ * init netcore: Support some new set-functions: `ToLowerCase`, `ToUpperCase`, `Trim`, `Replace`
161
+
162
+ Changes:
163
+
164
+ * init netcore: Operating fail if unknown command or set-function found
165
+
166
+ ### 1.2.0-alpha.6
167
+
168
+ New features:
169
+
170
+ * gen-ts-driver: Support offline mode
171
+
172
+ Changes:
173
+
174
+ * gen-api-docs: Improve generating api-docs
175
+ * gen-csharp: Generate resource classes with `partial`
176
+
177
+ ### 1.2.0-alpha.5
178
+
179
+ New features:
180
+
181
+ * Improve documentation generation: view, custom action.
182
+
183
+ ### 1.2.0-alpha.4
184
+
185
+ Fixed bugs:
186
+
187
+ * Generate api docs: doesn't exclude fields of object in an array
188
+
189
+ ### 1.2.0-alpha.3
190
+
191
+ Fixed bugs:
192
+
193
+ * Generate wrong required field for view parameter
194
+
195
+ ### 1.2.0-alpha.2
196
+
197
+ New features:
198
+
199
+ * Support merge command
200
+
201
+ ### 1.2.0-alpha.1
202
+
203
+ New features:
204
+
205
+ * Support type for View result
206
+
207
+ ### 1.1.0
208
+
209
+ Support MushroomServer 0.2.25.4 or later
210
+
211
+ Support mushroomjs 1.1.0 or later
package/check-update.js CHANGED
@@ -1,9 +1,9 @@
1
- const fetch = require("node-fetch");
2
-
3
- function checkUpdate() {
4
- return fetch("https://registry.npmjs.org/mushroom-cli/").then((res) =>
5
- res.json(),
6
- );
7
- }
8
-
9
- module.exports = checkUpdate;
1
+ const fetch = require('node-fetch');
2
+
3
+
4
+ function checkUpdate() {
5
+ return fetch('https://registry.npmjs.org/mushroom-cli/')
6
+ .then(res => res.json());
7
+ }
8
+
9
+ module.exports = checkUpdate;