@opra/cli 1.22.6 → 1.22.8
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.22.
|
|
3
|
+
"version": "1.22.8",
|
|
4
4
|
"description": "Opra CLI tools",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
"commander": "^14.0.2",
|
|
11
11
|
"js-string-escape": "^1.0.1",
|
|
12
12
|
"putil-flattentext": "^2.1.1",
|
|
13
|
-
"putil-varhelpers": "^1.
|
|
13
|
+
"putil-varhelpers": "^1.7.0",
|
|
14
14
|
"tslib": "^2.8.1"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@opra/client": "^1.22.
|
|
18
|
-
"@opra/common": "^1.22.
|
|
17
|
+
"@opra/client": "^1.22.8",
|
|
18
|
+
"@opra/common": "^1.22.8"
|
|
19
19
|
},
|
|
20
20
|
"type": "module",
|
|
21
21
|
"module": "./index.js",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
-
import { ArrayType, ComplexType, EnumType, MappedType, MixinType, SimpleType, UnionType, } from '@opra/common';
|
|
2
|
+
import { ArrayType, ComplexType, EnumType, MappedType, MixinType, OperationResult, SimpleType, UnionType, } from '@opra/common';
|
|
3
3
|
import { CodeBlock } from '../../code-block.js';
|
|
4
4
|
import { wrapJSDocString } from '../utils/string-utils.js';
|
|
5
5
|
const internalTypeNames = [
|
|
@@ -20,6 +20,12 @@ export async function generateDataType(dataType, intent, currentFile) {
|
|
|
20
20
|
try {
|
|
21
21
|
const typeName = dataType.name;
|
|
22
22
|
if (typeName) {
|
|
23
|
+
if (dataType instanceof ComplexType &&
|
|
24
|
+
dataType.ctor === OperationResult) {
|
|
25
|
+
if (currentFile)
|
|
26
|
+
currentFile.addImport('@opra/common', [typeName]);
|
|
27
|
+
return { kind: 'internal', typeName: dataType.name };
|
|
28
|
+
}
|
|
23
29
|
if (internalTypeNames.includes(typeName))
|
|
24
30
|
return { kind: 'internal', typeName: dataType.name };
|
|
25
31
|
let file = this._filesMap.get(dataType);
|