jsii-pacmak 1.117.0 → 1.119.0
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/lib/targets/go/types/class.d.ts +1 -0
- package/lib/targets/go/types/class.js +13 -0
- package/lib/targets/go/types/go-type-reference.js +2 -4
- package/lib/targets/go/types/type-member.d.ts +38 -1
- package/lib/targets/go/types/type-member.js +89 -7
- package/lib/targets/go.js +5 -2
- package/lib/targets/python.js +80 -2
- package/lib/toposort.d.ts +1 -1
- package/lib/util.d.ts +1 -0
- package/lib/util.js +6 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +3 -3
- package/package.json +10 -10
|
@@ -51,6 +51,7 @@ export declare class ClassMethod extends GoMethod {
|
|
|
51
51
|
constructor(parent: GoClass, method: Method);
|
|
52
52
|
emit(context: EmitContext): void;
|
|
53
53
|
emitDecl({ code, documenter }: EmitContext): void;
|
|
54
|
+
private get returnTypeForDocs();
|
|
54
55
|
get instanceArg(): string;
|
|
55
56
|
get static(): boolean;
|
|
56
57
|
get specialDependencies(): SpecialDependencies;
|
|
@@ -13,6 +13,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
13
13
|
var _GoClass_parameterValidators, _GoClassConstructor_validator;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.StaticMethod = exports.ClassMethod = exports.GoClassConstructor = exports.GoClass = void 0;
|
|
16
|
+
const jsii_reflect_1 = require("jsii-reflect");
|
|
16
17
|
const naming_util_1 = require("../../../naming-util");
|
|
17
18
|
const comparators = require("../comparators");
|
|
18
19
|
const runtime_1 = require("../runtime");
|
|
@@ -306,8 +307,20 @@ class ClassMethod extends type_member_1.GoMethod {
|
|
|
306
307
|
emitDecl({ code, documenter }) {
|
|
307
308
|
const returnTypeString = this.reference?.void ? '' : ` ${this.returnType}`;
|
|
308
309
|
documenter.emit(this.method.docs, this.apiLocation);
|
|
310
|
+
// Document the actual return type
|
|
311
|
+
if (this.returnTypeForDocs !== this.returnType) {
|
|
312
|
+
documenter.emit(new jsii_reflect_1.Docs(this.method.system, this.method, {
|
|
313
|
+
summary: `Returns \`${this.returnTypeForDocs}\`, use interface conversion if needed`,
|
|
314
|
+
}), this.apiLocation);
|
|
315
|
+
}
|
|
309
316
|
code.line(`${this.name}(${this.paramString()})${returnTypeString}`);
|
|
310
317
|
}
|
|
318
|
+
get returnTypeForDocs() {
|
|
319
|
+
if (jsii_reflect_1.Method.isMethod(this.method) && this.method.returns.type) {
|
|
320
|
+
return new go_type_reference_1.GoTypeRef(this.parent.pkg.root, this.method.returns.type).scopedReference(this.parent.pkg);
|
|
321
|
+
}
|
|
322
|
+
return this.method.toString();
|
|
323
|
+
}
|
|
311
324
|
get instanceArg() {
|
|
312
325
|
return this.parent.name.substring(0, 1).toLowerCase();
|
|
313
326
|
}
|
|
@@ -115,10 +115,8 @@ class GoTypeRef {
|
|
|
115
115
|
}
|
|
116
116
|
break;
|
|
117
117
|
case 'intersection':
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
ret.push(...t.dependencies);
|
|
121
|
-
}
|
|
118
|
+
for (const t of this.typeMap.value) {
|
|
119
|
+
ret.push(...t.dependencies);
|
|
122
120
|
}
|
|
123
121
|
break;
|
|
124
122
|
case 'void':
|
|
@@ -19,12 +19,14 @@ export declare class GoProperty implements GoTypeMember {
|
|
|
19
19
|
readonly setterName: string;
|
|
20
20
|
readonly immutable: boolean;
|
|
21
21
|
protected readonly apiLocation: ApiLocation;
|
|
22
|
+
private _propertyForSignature?;
|
|
22
23
|
constructor(parent: GoType, property: Property);
|
|
23
24
|
get validator(): ParameterValidator | undefined;
|
|
24
25
|
get reference(): GoTypeRef;
|
|
25
26
|
get specialDependencies(): SpecialDependencies;
|
|
26
27
|
get static(): boolean;
|
|
27
28
|
get returnType(): string;
|
|
29
|
+
private get returnTypeForDocs();
|
|
28
30
|
get instanceArg(): string;
|
|
29
31
|
get override(): string;
|
|
30
32
|
emitStructMember({ code, documenter }: EmitContext): void;
|
|
@@ -32,15 +34,33 @@ export declare class GoProperty implements GoTypeMember {
|
|
|
32
34
|
emitSetterDecl({ code, documenter }: EmitContext): void;
|
|
33
35
|
emitGetterProxy(context: EmitContext): void;
|
|
34
36
|
emitSetterProxy(context: EmitContext): void;
|
|
37
|
+
/**
|
|
38
|
+
* Returns the property we're overriding
|
|
39
|
+
*
|
|
40
|
+
* This is necessary because jsii allows classes to make the type of
|
|
41
|
+
* properties in subclasses more specific (this is known as "covariant return
|
|
42
|
+
* types"), but Go doesn't support this feature.
|
|
43
|
+
*
|
|
44
|
+
* If we render the signature of the property itself, and it has changed its
|
|
45
|
+
* return type, Go will see that as two conflicting definitions of the same
|
|
46
|
+
* accessor method.
|
|
47
|
+
*
|
|
48
|
+
* So instead, we will always render the type signature of the topmost method.
|
|
49
|
+
* That is either the same as the current method (in which case it doesn't make
|
|
50
|
+
* a difference), or it is a different signature, but then that's the one
|
|
51
|
+
* we need to render to prevent the method collission.
|
|
52
|
+
*/
|
|
53
|
+
get propertyForSignature(): Property;
|
|
35
54
|
}
|
|
36
55
|
export declare abstract class GoMethod implements GoTypeMember {
|
|
37
56
|
#private;
|
|
38
57
|
readonly parent: GoClass | GoInterface;
|
|
39
58
|
readonly method: Callable;
|
|
40
59
|
readonly name: string;
|
|
41
|
-
readonly parameters: GoParameter[];
|
|
42
60
|
protected readonly apiLocation: ApiLocation;
|
|
61
|
+
private _methodForSignature?;
|
|
43
62
|
constructor(parent: GoClass | GoInterface, method: Callable);
|
|
63
|
+
get parameters(): GoParameter[];
|
|
44
64
|
get validator(): ParameterValidator | undefined;
|
|
45
65
|
abstract emit(context: EmitContext): void;
|
|
46
66
|
abstract get specialDependencies(): SpecialDependencies;
|
|
@@ -51,6 +71,23 @@ export declare abstract class GoMethod implements GoTypeMember {
|
|
|
51
71
|
get override(): string;
|
|
52
72
|
get static(): boolean;
|
|
53
73
|
paramString(): string;
|
|
74
|
+
/**
|
|
75
|
+
* Returns the first method we're overriding
|
|
76
|
+
*
|
|
77
|
+
* This is necessary because jsii allows classes to make the return type of
|
|
78
|
+
* methods in subclasses more specific (this is known as "covariant return
|
|
79
|
+
* types"), but Go doesn't support this feature.
|
|
80
|
+
*
|
|
81
|
+
* If we render the signature of the method itself, and it has changed its
|
|
82
|
+
* return type, Go will see that as two conflicting definitions of the same
|
|
83
|
+
* method.
|
|
84
|
+
*
|
|
85
|
+
* So instead, we will always render the type signature of the topmost method.
|
|
86
|
+
* That is either the same as the current method (in which case it doesn't make
|
|
87
|
+
* a difference), or it is a different signature, but then that's the one
|
|
88
|
+
* we need to render to prevent the method collision.
|
|
89
|
+
*/
|
|
90
|
+
get methodForSignature(): Callable;
|
|
54
91
|
}
|
|
55
92
|
export declare class GoParameter {
|
|
56
93
|
readonly name: string;
|
|
@@ -49,7 +49,7 @@ class GoProperty {
|
|
|
49
49
|
return __classPrivateFieldGet(this, _GoProperty_validator, "f");
|
|
50
50
|
}
|
|
51
51
|
get reference() {
|
|
52
|
-
return new index_1.GoTypeRef(this.parent.pkg.root, this.
|
|
52
|
+
return new index_1.GoTypeRef(this.parent.pkg.root, this.propertyForSignature.type);
|
|
53
53
|
}
|
|
54
54
|
get specialDependencies() {
|
|
55
55
|
return {
|
|
@@ -65,7 +65,10 @@ class GoProperty {
|
|
|
65
65
|
}
|
|
66
66
|
get returnType() {
|
|
67
67
|
return (this.reference?.scopedReference(this.parent.pkg) ??
|
|
68
|
-
this.
|
|
68
|
+
this.propertyForSignature.type.toString());
|
|
69
|
+
}
|
|
70
|
+
get returnTypeForDocs() {
|
|
71
|
+
return (new index_1.GoTypeRef(this.parent.pkg.root, this.property.type).scopedReference(this.parent.pkg) ?? this.property.type.toString());
|
|
69
72
|
}
|
|
70
73
|
get instanceArg() {
|
|
71
74
|
return this.parent.proxyName.substring(0, 1).toLowerCase();
|
|
@@ -78,13 +81,21 @@ class GoProperty {
|
|
|
78
81
|
const memberType = this.reference?.type?.name === this.parent.name
|
|
79
82
|
? `*${this.returnType}`
|
|
80
83
|
: this.returnType;
|
|
81
|
-
const requiredOrOptional = this.
|
|
84
|
+
const requiredOrOptional = this.propertyForSignature.optional
|
|
85
|
+
? 'optional'
|
|
86
|
+
: 'required';
|
|
82
87
|
// Adds json and yaml tags for easy deserialization
|
|
83
88
|
code.line(`${this.name} ${memberType} \`field:"${requiredOrOptional}" json:"${this.property.name}" yaml:"${this.property.name}"\``);
|
|
84
89
|
// TODO add newline if not the last member
|
|
85
90
|
}
|
|
86
91
|
emitGetterDecl({ code, documenter }) {
|
|
87
92
|
documenter.emit(this.property.docs, this.apiLocation);
|
|
93
|
+
// Document the actual return type
|
|
94
|
+
if (this.returnTypeForDocs !== this.returnType) {
|
|
95
|
+
documenter.emit(new jsii_reflect_1.Docs(this.property.system, this.property, {
|
|
96
|
+
summary: `Returns \`${this.returnTypeForDocs}\`, use interface conversion if needed`,
|
|
97
|
+
}), this.apiLocation);
|
|
98
|
+
}
|
|
88
99
|
code.line(`${this.name}() ${this.returnType}`);
|
|
89
100
|
}
|
|
90
101
|
emitSetterDecl({ code, documenter }) {
|
|
@@ -129,6 +140,37 @@ class GoProperty {
|
|
|
129
140
|
code.line();
|
|
130
141
|
}
|
|
131
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* Returns the property we're overriding
|
|
145
|
+
*
|
|
146
|
+
* This is necessary because jsii allows classes to make the type of
|
|
147
|
+
* properties in subclasses more specific (this is known as "covariant return
|
|
148
|
+
* types"), but Go doesn't support this feature.
|
|
149
|
+
*
|
|
150
|
+
* If we render the signature of the property itself, and it has changed its
|
|
151
|
+
* return type, Go will see that as two conflicting definitions of the same
|
|
152
|
+
* accessor method.
|
|
153
|
+
*
|
|
154
|
+
* So instead, we will always render the type signature of the topmost method.
|
|
155
|
+
* That is either the same as the current method (in which case it doesn't make
|
|
156
|
+
* a difference), or it is a different signature, but then that's the one
|
|
157
|
+
* we need to render to prevent the method collission.
|
|
158
|
+
*/
|
|
159
|
+
get propertyForSignature() {
|
|
160
|
+
// Cache for speed
|
|
161
|
+
if (this._propertyForSignature) {
|
|
162
|
+
return this._propertyForSignature;
|
|
163
|
+
}
|
|
164
|
+
let ret = this.property;
|
|
165
|
+
while (true) {
|
|
166
|
+
const next = ret.overriddenProperty;
|
|
167
|
+
if (!next) {
|
|
168
|
+
this._propertyForSignature = ret;
|
|
169
|
+
return ret;
|
|
170
|
+
}
|
|
171
|
+
ret = next;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
132
174
|
}
|
|
133
175
|
exports.GoProperty = GoProperty;
|
|
134
176
|
_GoProperty_validator = new WeakMap();
|
|
@@ -138,12 +180,14 @@ class GoMethod {
|
|
|
138
180
|
this.method = method;
|
|
139
181
|
_GoMethod_validator.set(this, null);
|
|
140
182
|
this.name = (0, naming_util_1.jsiiToPascalCase)(method.name);
|
|
141
|
-
this.parameters = this.method.parameters.map((param) => new GoParameter(parent, param));
|
|
142
183
|
this.apiLocation =
|
|
143
184
|
method.kind === jsii_reflect_1.MemberKind.Initializer
|
|
144
185
|
? { api: 'initializer', fqn: parent.fqn }
|
|
145
186
|
: { api: 'member', fqn: parent.fqn, memberName: method.name };
|
|
146
187
|
}
|
|
188
|
+
get parameters() {
|
|
189
|
+
return this.methodForSignature.parameters.map((param) => new GoParameter(this.parent, param));
|
|
190
|
+
}
|
|
147
191
|
get validator() {
|
|
148
192
|
if (__classPrivateFieldGet(this, _GoMethod_validator, "f") === null) {
|
|
149
193
|
__classPrivateFieldSet(this, _GoMethod_validator, runtime_type_checking_1.ParameterValidator.forMethod(this), "f");
|
|
@@ -151,8 +195,9 @@ class GoMethod {
|
|
|
151
195
|
return __classPrivateFieldGet(this, _GoMethod_validator, "f");
|
|
152
196
|
}
|
|
153
197
|
get reference() {
|
|
154
|
-
|
|
155
|
-
|
|
198
|
+
const sig = this.methodForSignature;
|
|
199
|
+
if (jsii_reflect_1.Method.isMethod(sig) && sig.returns.type) {
|
|
200
|
+
return new index_1.GoTypeRef(this.parent.pkg.root, sig.returns.type);
|
|
156
201
|
}
|
|
157
202
|
return undefined;
|
|
158
203
|
}
|
|
@@ -166,7 +211,8 @@ class GoMethod {
|
|
|
166
211
|
return false;
|
|
167
212
|
}
|
|
168
213
|
get returnType() {
|
|
169
|
-
return (this.reference?.scopedReference(this.parent.pkg) ??
|
|
214
|
+
return (this.reference?.scopedReference(this.parent.pkg) ??
|
|
215
|
+
this.methodForSignature.toString());
|
|
170
216
|
}
|
|
171
217
|
get instanceArg() {
|
|
172
218
|
return this.parent.name.substring(0, 1).toLowerCase();
|
|
@@ -182,6 +228,42 @@ class GoMethod {
|
|
|
182
228
|
? ''
|
|
183
229
|
: this.parameters.map((p) => p.toString()).join(', ');
|
|
184
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* Returns the first method we're overriding
|
|
233
|
+
*
|
|
234
|
+
* This is necessary because jsii allows classes to make the return type of
|
|
235
|
+
* methods in subclasses more specific (this is known as "covariant return
|
|
236
|
+
* types"), but Go doesn't support this feature.
|
|
237
|
+
*
|
|
238
|
+
* If we render the signature of the method itself, and it has changed its
|
|
239
|
+
* return type, Go will see that as two conflicting definitions of the same
|
|
240
|
+
* method.
|
|
241
|
+
*
|
|
242
|
+
* So instead, we will always render the type signature of the topmost method.
|
|
243
|
+
* That is either the same as the current method (in which case it doesn't make
|
|
244
|
+
* a difference), or it is a different signature, but then that's the one
|
|
245
|
+
* we need to render to prevent the method collision.
|
|
246
|
+
*/
|
|
247
|
+
get methodForSignature() {
|
|
248
|
+
// Cache for speed
|
|
249
|
+
if (this._methodForSignature) {
|
|
250
|
+
return this._methodForSignature;
|
|
251
|
+
}
|
|
252
|
+
// Not sure why `this.method :: Callable` and not `this.method :: Method`, but
|
|
253
|
+
// let's be safe.
|
|
254
|
+
if (!(this.method instanceof jsii_reflect_1.Method)) {
|
|
255
|
+
return this.method;
|
|
256
|
+
}
|
|
257
|
+
let ret = this.method;
|
|
258
|
+
while (true) {
|
|
259
|
+
const next = ret.overriddenMethod;
|
|
260
|
+
if (!next) {
|
|
261
|
+
this._methodForSignature = ret;
|
|
262
|
+
return ret;
|
|
263
|
+
}
|
|
264
|
+
ret = next;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
185
267
|
}
|
|
186
268
|
exports.GoMethod = GoMethod;
|
|
187
269
|
_GoMethod_validator = new WeakMap();
|
package/lib/targets/go.js
CHANGED
|
@@ -45,8 +45,11 @@ class Golang extends target_1.Target {
|
|
|
45
45
|
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
|
|
46
46
|
return Promise.reject(e);
|
|
47
47
|
}
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
// This step is taken to ensure that the generated code is compilable
|
|
49
|
+
// Do it by default, because we didn't use to and that was masking a code generation
|
|
50
|
+
// problem.
|
|
51
|
+
const doBuild = !['false', '0', 'no'].includes(process.env.JSII_BUILD_GO ?? '1');
|
|
52
|
+
if (doBuild) {
|
|
50
53
|
await go('build', ['-modfile', localGoMod.path, './...'], {
|
|
51
54
|
cwd: pkgDir,
|
|
52
55
|
});
|
package/lib/targets/python.js
CHANGED
|
@@ -31,6 +31,7 @@ const type_name_1 = require("./python/type-name");
|
|
|
31
31
|
const util_2 = require("./python/util");
|
|
32
32
|
const version_utils_1 = require("./version-utils");
|
|
33
33
|
const rosetta_assembly_1 = require("../rosetta-assembly");
|
|
34
|
+
const toposort_1 = require("../toposort");
|
|
34
35
|
const index_1 = require("./index");
|
|
35
36
|
// eslint-disable-next-line @typescript-eslint/no-var-requires,@typescript-eslint/no-require-imports
|
|
36
37
|
const spdxLicenseList = require('spdx-license-list');
|
|
@@ -318,8 +319,9 @@ class BasePythonClassType {
|
|
|
318
319
|
}
|
|
319
320
|
emit(code, context) {
|
|
320
321
|
context = nestedContext(context, this.fqn);
|
|
321
|
-
|
|
322
|
-
|
|
322
|
+
this.sortBasesForMro();
|
|
323
|
+
const baseClasses = this.getClassParams(context);
|
|
324
|
+
openSignature(code, 'class', this.pythonName, baseClasses);
|
|
323
325
|
this.generator.emitDocString(code, this.apiLocation, this.docs, {
|
|
324
326
|
documentableItem: `class-${this.pythonName}`,
|
|
325
327
|
trailingNewLine: true,
|
|
@@ -343,6 +345,80 @@ class BasePythonClassType {
|
|
|
343
345
|
context.emittedTypes.add(this.fqn);
|
|
344
346
|
}
|
|
345
347
|
}
|
|
348
|
+
/**
|
|
349
|
+
* Sort the this.bases array for proper Python MRO.
|
|
350
|
+
*
|
|
351
|
+
* If we don't do this, there is a chance that a superclass and subclass (or interface)
|
|
352
|
+
* have the parents in different order, which leads to an MRO violation.
|
|
353
|
+
*
|
|
354
|
+
* See: <https://docs.python.org/3/howto/mro.html>
|
|
355
|
+
*
|
|
356
|
+
* The bottom line is: child classes higher up in the hierarchy first.
|
|
357
|
+
* As an example, in the hierarchy:
|
|
358
|
+
*
|
|
359
|
+
* ```
|
|
360
|
+
* ┌─────┐
|
|
361
|
+
* │ A │
|
|
362
|
+
* └─────┘
|
|
363
|
+
* ▲
|
|
364
|
+
* ├─────┐
|
|
365
|
+
* │ ┌─────┐
|
|
366
|
+
* │ │ C │
|
|
367
|
+
* │ └─────┘
|
|
368
|
+
* │ ▲
|
|
369
|
+
* ├─────┘
|
|
370
|
+
* ┌─────┐
|
|
371
|
+
* │ B │
|
|
372
|
+
* └─────┘
|
|
373
|
+
* ```
|
|
374
|
+
*
|
|
375
|
+
* The order should be `class B(C, A)`, and not the other way around.
|
|
376
|
+
*
|
|
377
|
+
* This is yet another instance of topological sort.
|
|
378
|
+
*/
|
|
379
|
+
sortBasesForMro() {
|
|
380
|
+
if (this.bases.length <= 1) {
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
// Record original order
|
|
384
|
+
const originalOrder = new Map();
|
|
385
|
+
for (let i = 0; i < this.bases.length; i++) {
|
|
386
|
+
originalOrder.set(this.bases[i], i);
|
|
387
|
+
}
|
|
388
|
+
// Classify into sortable and non-sortable types
|
|
389
|
+
const sortableBases = [];
|
|
390
|
+
const nonSortableBases = [];
|
|
391
|
+
for (const baseRef of this.bases) {
|
|
392
|
+
if (spec.isNamedTypeReference(baseRef)) {
|
|
393
|
+
sortableBases.push(baseRef);
|
|
394
|
+
}
|
|
395
|
+
else {
|
|
396
|
+
nonSortableBases.push(baseRef);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
// Toposort, in reverse (highest in the tree last)
|
|
400
|
+
const typeSystem = this.generator.reflectAssembly.system;
|
|
401
|
+
const sorted = (0, toposort_1.topologicalSort)(sortableBases, (t) => t.fqn, (d) => typeBaseFqns(typeSystem.findFqn(d.fqn)));
|
|
402
|
+
sorted.reverse();
|
|
403
|
+
// Inside a trance, we keep original sort order in the source declarations.
|
|
404
|
+
for (const tranche of sorted) {
|
|
405
|
+
tranche.sort((a, b) => originalOrder.get(a) - originalOrder.get(b));
|
|
406
|
+
}
|
|
407
|
+
// Replace original bases
|
|
408
|
+
this.bases.splice(0, this.bases.length, ...sorted.flatMap((xs) => xs), ...nonSortableBases);
|
|
409
|
+
function typeBaseFqns(x) {
|
|
410
|
+
if (x.isClassType()) {
|
|
411
|
+
return [
|
|
412
|
+
...(x.base ? [x.base?.fqn] : []),
|
|
413
|
+
...x.getInterfaces().map((i) => i.fqn),
|
|
414
|
+
];
|
|
415
|
+
}
|
|
416
|
+
if (x.isInterfaceType()) {
|
|
417
|
+
return x.getInterfaces().map((i) => i.fqn);
|
|
418
|
+
}
|
|
419
|
+
return [];
|
|
420
|
+
}
|
|
421
|
+
}
|
|
346
422
|
boundResolver(resolver) {
|
|
347
423
|
if (this.fqn == null) {
|
|
348
424
|
return resolver;
|
|
@@ -672,6 +748,7 @@ class BaseProperty {
|
|
|
672
748
|
}
|
|
673
749
|
class Interface extends BasePythonClassType {
|
|
674
750
|
emit(code, context) {
|
|
751
|
+
this.sortBasesForMro();
|
|
675
752
|
context = nestedContext(context, this.fqn);
|
|
676
753
|
emitList(code, '@jsii.interface(', [`jsii_type="${this.fqn}"`], ')');
|
|
677
754
|
// First we do our normal class logic for emitting our members.
|
|
@@ -749,6 +826,7 @@ class Struct extends BasePythonClassType {
|
|
|
749
826
|
this.directMembers.push(member);
|
|
750
827
|
}
|
|
751
828
|
emit(code, context) {
|
|
829
|
+
this.sortBasesForMro();
|
|
752
830
|
context = nestedContext(context, this.fqn);
|
|
753
831
|
const baseInterfaces = this.getClassParams(context);
|
|
754
832
|
code.indent('@jsii.data_type(');
|
package/lib/toposort.d.ts
CHANGED
|
@@ -34,5 +34,5 @@ export declare function topologicalSort<T>(xs: Iterable<T>, keyFn: KeyFunc<T>, d
|
|
|
34
34
|
* We do declare the type `Toposorted<A>` here so that if we ever change
|
|
35
35
|
* the type, we can find all usage sites quickly.
|
|
36
36
|
*/
|
|
37
|
-
export type Toposorted<A> =
|
|
37
|
+
export type Toposorted<A> = A[][];
|
|
38
38
|
//# sourceMappingURL=toposort.d.ts.map
|
package/lib/util.d.ts
CHANGED
|
@@ -132,4 +132,5 @@ export declare function filterAsync<A>(xs: A[], pred: (x: A) => Promise<boolean>
|
|
|
132
132
|
export declare function wait(ms: number): Promise<void>;
|
|
133
133
|
export declare function flatten<A>(xs: readonly A[][]): A[];
|
|
134
134
|
export declare function zip<A, B>(xs: A[], ys: B[]): Array<[A, B]>;
|
|
135
|
+
export declare function setAdd<T>(setA: Set<T>, setB: Iterable<T>): void;
|
|
135
136
|
//# sourceMappingURL=util.d.ts.map
|
package/lib/util.js
CHANGED
|
@@ -14,6 +14,7 @@ exports.filterAsync = filterAsync;
|
|
|
14
14
|
exports.wait = wait;
|
|
15
15
|
exports.flatten = flatten;
|
|
16
16
|
exports.zip = zip;
|
|
17
|
+
exports.setAdd = setAdd;
|
|
17
18
|
const child_process_1 = require("child_process");
|
|
18
19
|
const fs = require("fs-extra");
|
|
19
20
|
const os = require("os");
|
|
@@ -341,4 +342,9 @@ function zip(xs, ys) {
|
|
|
341
342
|
}
|
|
342
343
|
return ret;
|
|
343
344
|
}
|
|
345
|
+
function setAdd(setA, setB) {
|
|
346
|
+
for (const b of setB) {
|
|
347
|
+
setA.add(b);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
344
350
|
//# sourceMappingURL=util.js.map
|
package/lib/version.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The short version number for this jsii-pacmak release (e.g: `X.Y.Z`) */
|
|
2
2
|
export declare const VERSION: string;
|
|
3
3
|
/** The qualified version number for this jsii-pacmak release (e.g: `X.Y.Z (build #######)`) */
|
|
4
|
-
export declare const VERSION_DESC = "1.
|
|
4
|
+
export declare const VERSION_DESC = "1.119.0 (build 1634eac)";
|
|
5
5
|
//# sourceMappingURL=version.d.ts.map
|
package/lib/version.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Generated at 2025-
|
|
2
|
+
// Generated at 2025-11-10T14:25:15Z by generate.sh
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.VERSION_DESC = exports.VERSION = void 0;
|
|
5
5
|
/** The short version number for this jsii-pacmak release (e.g: `X.Y.Z`) */
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
7
|
-
exports.VERSION = '1.
|
|
7
|
+
exports.VERSION = '1.119.0';
|
|
8
8
|
/** The qualified version number for this jsii-pacmak release (e.g: `X.Y.Z (build #######)`) */
|
|
9
|
-
exports.VERSION_DESC = '1.
|
|
9
|
+
exports.VERSION_DESC = '1.119.0 (build 1634eac)';
|
|
10
10
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsii-pacmak",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.119.0",
|
|
4
4
|
"description": "A code generation framework for jsii backend languages",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -37,24 +37,24 @@
|
|
|
37
37
|
"package": "package-js"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@jsii/check-node": "1.
|
|
41
|
-
"@jsii/spec": "1.
|
|
40
|
+
"@jsii/check-node": "1.119.0",
|
|
41
|
+
"@jsii/spec": "1.119.0",
|
|
42
42
|
"clone": "^2.1.2",
|
|
43
|
-
"codemaker": "^1.
|
|
43
|
+
"codemaker": "^1.119.0",
|
|
44
44
|
"commonmark": "^0.31.2",
|
|
45
45
|
"escape-string-regexp": "^4.0.0",
|
|
46
46
|
"fs-extra": "^10.1.0",
|
|
47
|
-
"jsii-reflect": "^1.
|
|
47
|
+
"jsii-reflect": "^1.119.0",
|
|
48
48
|
"semver": "^7.7.2",
|
|
49
49
|
"spdx-license-list": "^6.10.0",
|
|
50
50
|
"xmlbuilder": "^15.1.1",
|
|
51
51
|
"yargs": "^17.7.2"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@jsii/dotnet-runtime": "^1.
|
|
55
|
-
"@jsii/go-runtime": "^1.
|
|
56
|
-
"@jsii/java-runtime": "^1.
|
|
57
|
-
"@scope/jsii-calc-lib": "^1.
|
|
54
|
+
"@jsii/dotnet-runtime": "^1.119.0",
|
|
55
|
+
"@jsii/go-runtime": "^1.119.0",
|
|
56
|
+
"@jsii/java-runtime": "^1.119.0",
|
|
57
|
+
"@scope/jsii-calc-lib": "^1.119.0",
|
|
58
58
|
"@types/clone": "^2.1.4",
|
|
59
59
|
"@types/commonmark": "^0.27.10",
|
|
60
60
|
"@types/diff": "^5.2.3",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@types/yargs": "^17.0.33",
|
|
64
64
|
"diff": "^5.2.0",
|
|
65
65
|
"jsii": "^5.9.10",
|
|
66
|
-
"jsii-build-tools": "^1.
|
|
66
|
+
"jsii-build-tools": "^1.119.0",
|
|
67
67
|
"jsii-calc": "^3.20.120",
|
|
68
68
|
"jsii-rosetta": "~5.9.10",
|
|
69
69
|
"pyright": "^1.1.403"
|