mushroom-cli 1.2.1 → 1.2.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 +11 -5
- package/dist/gen/gen-js-driver.js +7 -0
- package/dist/gen/gen-ts-driver.js +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -132,12 +132,18 @@ npx mushroom-cli parameters --no-check-update
|
|
|
132
132
|
|
|
133
133
|
## Version
|
|
134
134
|
|
|
135
|
+
### 1.2.2
|
|
136
|
+
|
|
137
|
+
New features:
|
|
138
|
+
|
|
139
|
+
- gen ts-driver, js-driver: adding binaryResponse to `_raw_http_method_` actions
|
|
140
|
+
|
|
135
141
|
### 1.2.1
|
|
136
142
|
|
|
137
143
|
Improvement/Changes:
|
|
138
144
|
|
|
139
|
-
- gen
|
|
140
|
-
- gen
|
|
145
|
+
- gen docs: fix bugs
|
|
146
|
+
- gen c#-mongo: fix signarute for RegisterCustomViewMethod method
|
|
141
147
|
- init netcore:
|
|
142
148
|
- change: show warning message when replacing content in unexisting file (instead of throwing error)
|
|
143
149
|
|
|
@@ -147,9 +153,9 @@ New features:
|
|
|
147
153
|
|
|
148
154
|
- Support merge command
|
|
149
155
|
- Support type for View result
|
|
150
|
-
- gen
|
|
156
|
+
- gen ts-driver: Support offline mode
|
|
151
157
|
- init netcore: Support some new set-functions: `ToLowerCase`, `ToUpperCase`, `Trim`, `Replace`, `New-RandomNumber`, `New-RandomString`
|
|
152
|
-
- gen
|
|
158
|
+
- gen docs: New gen docs engine v1.2 - deal with very big api docs
|
|
153
159
|
- support minify
|
|
154
160
|
- allow user to add and change API root url
|
|
155
161
|
- add `JavascriptParamModel`, `JavascriptRequestBodyModel`, `JavascriptResultModel` tab in code snippets of custom methods
|
|
@@ -192,7 +198,7 @@ Fixed bugs:
|
|
|
192
198
|
- gen docs
|
|
193
199
|
- Generate wrong required field for view parameter
|
|
194
200
|
- doesn't exclude fields of object in an array
|
|
195
|
-
- gen-
|
|
201
|
+
- gen ts-driver
|
|
196
202
|
- add null value for nullable field type
|
|
197
203
|
|
|
198
204
|
### 1.1.1
|
|
@@ -66,6 +66,7 @@ exports.extensions = extensions;
|
|
|
66
66
|
let clientCache = undefined;
|
|
67
67
|
let includeTotal = undefined;
|
|
68
68
|
let offlineMode = undefined;
|
|
69
|
+
let binaryResponse = undefined;
|
|
69
70
|
if ((actionName === 'findById' || actionName === 'findMany') && entity.actions[actionName]) {
|
|
70
71
|
if (isAllowCache(entity.actions[actionName], true))
|
|
71
72
|
clientCache = true;
|
|
@@ -77,10 +78,16 @@ exports.extensions = extensions;
|
|
|
77
78
|
entity.actions[actionName].some((a) => a.offlineMode === 'allow'))
|
|
78
79
|
offlineMode = 'allow';
|
|
79
80
|
}
|
|
81
|
+
else if (actionName.indexOf('_raw_http_method_') === 0) {
|
|
82
|
+
if (entity.actions[actionName]?.some((action) => action.codeHint?.delegator?.isBinaryResponse)) {
|
|
83
|
+
binaryResponse = true;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
80
86
|
actions[actionName] = {
|
|
81
87
|
clientCache,
|
|
82
88
|
includeTotal,
|
|
83
89
|
offlineMode,
|
|
90
|
+
binaryResponse,
|
|
84
91
|
};
|
|
85
92
|
}
|
|
86
93
|
const views = {};
|
|
@@ -356,6 +356,9 @@ export interface CustomMethodBodyRequest<TBody> extends MushroomRequest {
|
|
|
356
356
|
const customCode = generateCustomMethodCode(entityName, actionName, entity.actions[actionName]);
|
|
357
357
|
customMethodCode += customCode.methodCode;
|
|
358
358
|
code += customCode.classesCode;
|
|
359
|
+
if (entity.actions[actionName]?.some((action) => action.codeHint?.delegator?.isBinaryResponse)) {
|
|
360
|
+
actions[actionName].binaryResponse = true;
|
|
361
|
+
}
|
|
359
362
|
break;
|
|
360
363
|
}
|
|
361
364
|
else {
|