@opra/cli 1.24.2 → 1.24.3

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.24.2",
3
+ "version": "1.24.3",
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.24.2",
19
- "@opra/common": "^1.24.2"
18
+ "@opra/client": "^1.24.3",
19
+ "@opra/common": "^1.24.3"
20
20
  },
21
21
  "type": "module",
22
22
  "module": "./index.js",
@@ -115,7 +115,7 @@ export async function _generateTypeCode(currentFile, dataType, codeBlock, intent
115
115
  export async function _generateArrayTypeCode(currentFile, dataType, codeBlock, intent) {
116
116
  if (intent === 'extends')
117
117
  throw new TypeError('Array types can not be extended');
118
- let out = '';
118
+ let out;
119
119
  const x = await this.generateDataType(dataType.type, 'typeDef', currentFile);
120
120
  if (x.kind === 'embedded') {
121
121
  out =
@@ -191,7 +191,7 @@ export async function _generateComplexTypeCode(currentFile, dataType, codeBlock,
191
191
  if (field.readonly)
192
192
  fieldCode.def += 'readonly ';
193
193
  fieldCode.def += `${field.name}${field.required ? '' : '?'}: `;
194
- let typ = '';
194
+ let typ;
195
195
  if (field.fixed) {
196
196
  const t = typeof field.fixed;
197
197
  typ = `${t === 'number' || t === 'boolean' || t === 'bigint' ? field.fixed : "'" + field.fixed + "'"}\n`;
@@ -238,6 +238,7 @@ constructor(client: OpraHttpClient) {`;
238
238
  }
239
239
  /** process header params */
240
240
  if (headerParams.length) {
241
+ // eslint-disable-next-line no-useless-assignment
241
242
  if (argIndex++ > 0)
242
243
  operationBlock.head += ', \n';
243
244
  operationBlock.head +=
@@ -259,7 +260,7 @@ constructor(client: OpraHttpClient) {`;
259
260
  }
260
261
  /* Determine return type */
261
262
  const returnTypes = [];
262
- let typeDef = '';
263
+ let typeDef;
263
264
  for (const resp of operation.responses) {
264
265
  if (!resp.statusCode.find(r => r.intersects(200, 299)))
265
266
  continue;