@opra/cli 1.27.4 → 1.28.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opra/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.28.1",
|
|
4
4
|
"description": "Opra CLI tools",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"tslib": "^2.8.1"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"@opra/client": "^1.
|
|
19
|
-
"@opra/common": "^1.
|
|
18
|
+
"@opra/client": "^1.28.1",
|
|
19
|
+
"@opra/common": "^1.28.1"
|
|
20
20
|
},
|
|
21
21
|
"type": "module",
|
|
22
22
|
"module": "./index.js",
|
|
@@ -22,6 +22,7 @@ export async function generateHttpApi(api) {
|
|
|
22
22
|
const httpApiNodeFile = this.addFile('./http-controller-node.ts');
|
|
23
23
|
httpApiNodeFile.code.content = httpControllerNodeScript;
|
|
24
24
|
const classBlock = (file.code[className] = new CodeBlock());
|
|
25
|
+
// Print JSDoc
|
|
25
26
|
classBlock.doc = `/**
|
|
26
27
|
* ${wrapJSDocString(api.description || '')}
|
|
27
28
|
* @class ${className}
|
|
@@ -101,8 +101,11 @@ constructor(client: OpraHttpClient) {`;
|
|
|
101
101
|
`\n * > ${String(prm.name)} - ${prm.description || ''}` +
|
|
102
102
|
`\n * - location: ${prm.location}` +
|
|
103
103
|
`\n * - type: ${locateNamedType(prm.type)?.name || 'any'}${prm.isArray ? '[' + prm.arraySeparator + ']' : ''}` +
|
|
104
|
-
(prm.
|
|
105
|
-
|
|
104
|
+
(prm.default
|
|
105
|
+
? `\n * - default: ${typeof prm.default === 'object' ? 'object' : prm.default}`
|
|
106
|
+
: '') +
|
|
107
|
+
(prm.required ? `\n * - required: ${prm.required}` : '') +
|
|
108
|
+
(prm.deprecated ? `\n * - deprecated: ${prm.deprecated}` : '');
|
|
106
109
|
}
|
|
107
110
|
if (i)
|
|
108
111
|
operationBlock.doc.regExParameters = block;
|