@darabonba/python-generator 1.2.9 → 1.2.10

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/ChangeLog.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # ChangeLog
2
2
 
3
+ ## 1.2.10 - 2022-05-31
4
+
5
+ * Fix import package for typedef.
6
+
3
7
  ## 1.2.9 - 2022-05-31
4
8
 
5
9
  * Support Typedef.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@darabonba/python-generator",
3
- "version": "1.2.9",
3
+ "version": "1.2.10",
4
4
  "description": "The darabonba generator for Python",
5
5
  "main": "src/generator.js",
6
6
  "directories": {
package/src/generator.js CHANGED
@@ -175,7 +175,7 @@ class Generator {
175
175
  }
176
176
  importsTypedef[aliasId][types].import = moduleTypedef[types].import;
177
177
  importsTypedef[aliasId][types].type = moduleTypedef[types].type;
178
- if (!requirePackage.includes(moduleTypedef[types].package)) {
178
+ if (moduleTypedef[types].package && !requirePackage.includes(moduleTypedef[types].package)) {
179
179
  requirePackage.push(moduleTypedef[types].package);
180
180
  }
181
181
  });
@@ -13,6 +13,11 @@
13
13
  "import": "requests",
14
14
  "type": "Request",
15
15
  "package": "requests:2.21.0"
16
+ },
17
+ "HttpHeader": {
18
+ "import": null,
19
+ "type": "Dict[str, Any]",
20
+ "package": null
16
21
  }
17
22
  }
18
23
  },
@@ -24,6 +29,11 @@
24
29
  "import": "requests",
25
30
  "type": "Request",
26
31
  "package": "requests:2.21.0"
32
+ },
33
+ "HttpHeader": {
34
+ "import": null,
35
+ "type": "Dict[str, Any]",
36
+ "package": null
27
37
  }
28
38
  }
29
39
  }