@opra/cli 0.28.0 → 0.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.
@@ -130,11 +130,17 @@ async function generateComplexTypeDefinition(file, dataType, forInterface) {
130
130
  // jsDoc += ` * @format ` + field.format + '\n';
131
131
  if (field.exclusive)
132
132
  jsDoc += ` * @exclusive\n`;
133
+ if (field.readonly)
134
+ jsDoc += ` * @readonly\n`;
135
+ if (field.writeonly)
136
+ jsDoc += ` * @writeonly\n`;
133
137
  if (field.deprecated)
134
138
  jsDoc += ` * @deprecated ` + (typeof field.deprecated === 'string' ? field.deprecated : '') + '\n';
135
139
  if (jsDoc)
136
140
  out += `/**\n${jsDoc} */\n`;
137
141
  // Print field name
142
+ if (field.readonly)
143
+ out += 'readonly ';
138
144
  out += `${field.name}${field.required ? '' : '?'}: `;
139
145
  if (field.fixed)
140
146
  out += `${field.fixed}`;
@@ -123,11 +123,17 @@ export async function generateComplexTypeDefinition(file, dataType, forInterface
123
123
  // jsDoc += ` * @format ` + field.format + '\n';
124
124
  if (field.exclusive)
125
125
  jsDoc += ` * @exclusive\n`;
126
+ if (field.readonly)
127
+ jsDoc += ` * @readonly\n`;
128
+ if (field.writeonly)
129
+ jsDoc += ` * @writeonly\n`;
126
130
  if (field.deprecated)
127
131
  jsDoc += ` * @deprecated ` + (typeof field.deprecated === 'string' ? field.deprecated : '') + '\n';
128
132
  if (jsDoc)
129
133
  out += `/**\n${jsDoc} */\n`;
130
134
  // Print field name
135
+ if (field.readonly)
136
+ out += 'readonly ';
131
137
  out += `${field.name}${field.required ? '' : '?'}: `;
132
138
  if (field.fixed)
133
139
  out += `${field.fixed}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opra/cli",
3
- "version": "0.28.0",
3
+ "version": "0.28.1",
4
4
  "description": "Opra CLI tools",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
@@ -28,7 +28,7 @@
28
28
  "clean:cover": "rimraf ../../coverage/client"
29
29
  },
30
30
  "dependencies": {
31
- "@opra/client": "^0.28.0",
31
+ "@opra/client": "^0.28.1",
32
32
  "chalk": "^5.3.0",
33
33
  "commander": "^11.0.0",
34
34
  "js-string-escape": "^1.0.1",