@open-norantec/herbal 2.0.0-alpha.0 → 2.0.0-alpha.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/dist/cli/herbal.js
CHANGED
|
@@ -240,7 +240,7 @@ command
|
|
|
240
240
|
case 1: return [2, _a.sent()];
|
|
241
241
|
case 2:
|
|
242
242
|
error_1 = _a.sent();
|
|
243
|
-
log('error', "Failed to generate client code:", error_1
|
|
243
|
+
log('error', "Failed to generate client code:", error_1 === null || error_1 === void 0 ? void 0 : error_1.message);
|
|
244
244
|
return [2, ''];
|
|
245
245
|
case 3: return [2];
|
|
246
246
|
}
|
|
@@ -210,6 +210,8 @@ var TypeScriptClient = (function (_super) {
|
|
|
210
210
|
return __generator(this, function (_a) {
|
|
211
211
|
switch (_a.label) {
|
|
212
212
|
case 0:
|
|
213
|
+
if (!schema)
|
|
214
|
+
return [2, 'unknown'];
|
|
213
215
|
interfaceName = "Interface".concat(Math.random().toString(36).slice(2));
|
|
214
216
|
return [4, (0, json_schema_to_typescript_1.compile)(schema, interfaceName, {
|
|
215
217
|
format: true,
|
|
@@ -221,6 +223,7 @@ var TypeScriptClient = (function (_super) {
|
|
|
221
223
|
semi: true,
|
|
222
224
|
trailingComma: 'none',
|
|
223
225
|
},
|
|
226
|
+
cwd: process.cwd(),
|
|
224
227
|
}).then(function (code) {
|
|
225
228
|
return code
|
|
226
229
|
.trim()
|
package/dist/core.js
CHANGED
|
@@ -211,7 +211,7 @@ var MethodPool = (function () {
|
|
|
211
211
|
required: true,
|
|
212
212
|
content: {
|
|
213
213
|
'application/json': {
|
|
214
|
-
schema: config.options.inputSchema,
|
|
214
|
+
schema: config.options.inputSchema.toJSONSchema(),
|
|
215
215
|
},
|
|
216
216
|
},
|
|
217
217
|
},
|
|
@@ -219,12 +219,14 @@ var MethodPool = (function () {
|
|
|
219
219
|
'200': {
|
|
220
220
|
description: 'Response for method ' + name,
|
|
221
221
|
content: {
|
|
222
|
-
'application/json':
|
|
223
|
-
.
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
222
|
+
'application/json': {
|
|
223
|
+
schema: utilities_1.z
|
|
224
|
+
.object({
|
|
225
|
+
data: config.options.outputSchema,
|
|
226
|
+
token: utilities_1.z.string().nullable(),
|
|
227
|
+
})
|
|
228
|
+
.toJSONSchema(),
|
|
229
|
+
},
|
|
228
230
|
},
|
|
229
231
|
},
|
|
230
232
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-norantec/herbal",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.2",
|
|
4
4
|
"description": "Herbal is a builder and toolchain for Nest.js applications",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@nestjs/core": "^10.4.19",
|
|
42
42
|
"@nestjs/platform-express": "^10.4.22",
|
|
43
43
|
"@nestjs/sequelize": "^10.0.1",
|
|
44
|
-
"@open-norantec/forge": "^3.0.0-alpha.
|
|
44
|
+
"@open-norantec/forge": "^3.0.0-alpha.4",
|
|
45
45
|
"commander": "^12.1.0",
|
|
46
46
|
"fs-extra": "^11.3.4",
|
|
47
47
|
"json-schema-to-typescript": "^15.0.4",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"uuid": "^11.1.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@open-norantec/utilities": "^2.0.
|
|
61
|
+
"@open-norantec/utilities": "^2.0.4",
|
|
62
62
|
"@types/express": "^5.0.3",
|
|
63
63
|
"@types/fs-extra": "^11.0.4",
|
|
64
64
|
"@types/lodash": "^4.17.16",
|