jsii-reflect 1.111.0 → 1.113.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/_memoized.js +2 -3
- package/lib/assembly.js +3 -9
- package/lib/class.js +1 -1
- package/lib/method.js +4 -4
- package/lib/module-like.js +3 -9
- package/lib/optional-value.js +4 -4
- package/lib/reference-type.js +1 -1
- package/lib/source.js +2 -3
- package/lib/type-member.js +5 -5
- package/lib/type-system.js +1 -1
- package/lib/type.js +1 -1
- package/lib/util.js +4 -5
- package/package.json +7 -7
- package/test/__snapshots__/jsii-tree.test.js.snap +75 -4
- package/test/__snapshots__/tree.test.js.snap +51 -2
- package/test/__snapshots__/type-system.test.js.snap +2 -0
- package/test/tree.test.js +6 -1
- package/test/util.js +2 -3
package/lib/_memoized.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.memoized = memoized;
|
|
4
|
+
exports.memoizedWhenLocked = memoizedWhenLocked;
|
|
4
5
|
const CACHE = new WeakMap();
|
|
5
6
|
function memoizedGet(original, propertyKey) {
|
|
6
7
|
return function () {
|
|
@@ -45,7 +46,6 @@ function memoized(_prototype, propertyKey, descriptor) {
|
|
|
45
46
|
const original = descriptor.get;
|
|
46
47
|
descriptor.get = memoizedGet(original, propertyKey);
|
|
47
48
|
}
|
|
48
|
-
exports.memoized = memoized;
|
|
49
49
|
function memoizedWhenLocked(_prototype, propertyKey, descriptor) {
|
|
50
50
|
if (!descriptor.get) {
|
|
51
51
|
throw new Error(`@memoized can only be applied to property getters!`);
|
|
@@ -61,5 +61,4 @@ function memoizedWhenLocked(_prototype, propertyKey, descriptor) {
|
|
|
61
61
|
return original.call(this);
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
exports.memoizedWhenLocked = memoizedWhenLocked;
|
|
65
64
|
//# sourceMappingURL=_memoized.js.map
|
package/lib/assembly.js
CHANGED
|
@@ -148,9 +148,7 @@ class Assembly extends module_like_1.ModuleLike {
|
|
|
148
148
|
* All classes in the assembly and all of its submodules
|
|
149
149
|
*/
|
|
150
150
|
get allClasses() {
|
|
151
|
-
return this.allTypes
|
|
152
|
-
.filter((t) => t instanceof class_1.ClassType)
|
|
153
|
-
.map((t) => t);
|
|
151
|
+
return this.allTypes.filter((t) => t instanceof class_1.ClassType).map((t) => t);
|
|
154
152
|
}
|
|
155
153
|
/**
|
|
156
154
|
* All interfaces in the assembly and all of its submodules
|
|
@@ -164,9 +162,7 @@ class Assembly extends module_like_1.ModuleLike {
|
|
|
164
162
|
* All interfaces in the assembly and all of its submodules
|
|
165
163
|
*/
|
|
166
164
|
get allEnums() {
|
|
167
|
-
return this.allTypes
|
|
168
|
-
.filter((t) => t instanceof enum_1.EnumType)
|
|
169
|
-
.map((t) => t);
|
|
165
|
+
return this.allTypes.filter((t) => t instanceof enum_1.EnumType).map((t) => t);
|
|
170
166
|
}
|
|
171
167
|
findType(fqn) {
|
|
172
168
|
const type = this.tryFindType(fqn);
|
|
@@ -280,9 +276,7 @@ class SubmoduleBuilder {
|
|
|
280
276
|
this.fullName.split('.').length === other.fullName.split('.').length + 1);
|
|
281
277
|
}
|
|
282
278
|
build() {
|
|
283
|
-
|
|
284
|
-
this._built = new submodule_1.Submodule(this.system, this.spec, this.fullName, mapValues(this.findSubmoduleBuilders(), (b) => b.build()), this.types);
|
|
285
|
-
}
|
|
279
|
+
this._built ?? (this._built = new submodule_1.Submodule(this.system, this.spec, this.fullName, mapValues(this.findSubmoduleBuilders(), (b) => b.build()), this.types));
|
|
286
280
|
return this._built;
|
|
287
281
|
}
|
|
288
282
|
/**
|
package/lib/class.js
CHANGED
|
@@ -121,13 +121,13 @@ class ClassType extends reference_type_1.ReferenceType {
|
|
|
121
121
|
return result;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
+
exports.ClassType = ClassType;
|
|
124
125
|
__decorate([
|
|
125
126
|
_memoized_1.memoizedWhenLocked
|
|
126
127
|
], ClassType.prototype, "base", null);
|
|
127
128
|
__decorate([
|
|
128
129
|
_memoized_1.memoizedWhenLocked
|
|
129
130
|
], ClassType.prototype, "ancestors", null);
|
|
130
|
-
exports.ClassType = ClassType;
|
|
131
131
|
function flatten(xs) {
|
|
132
132
|
return Array.prototype.concat([], ...xs);
|
|
133
133
|
}
|
package/lib/method.js
CHANGED
|
@@ -16,15 +16,15 @@ const type_member_1 = require("./type-member");
|
|
|
16
16
|
*/
|
|
17
17
|
exports.INITIALIZER_NAME = '<initializer>';
|
|
18
18
|
class Method extends callable_1.Callable {
|
|
19
|
+
static isMethod(x) {
|
|
20
|
+
return x instanceof Method;
|
|
21
|
+
}
|
|
19
22
|
constructor(system, assembly, parentType, definingType, spec) {
|
|
20
23
|
super(system, assembly, parentType, spec);
|
|
21
24
|
this.definingType = definingType;
|
|
22
25
|
this.spec = spec;
|
|
23
26
|
this.kind = type_member_1.MemberKind.Method;
|
|
24
27
|
}
|
|
25
|
-
static isMethod(x) {
|
|
26
|
-
return x instanceof Method;
|
|
27
|
-
}
|
|
28
28
|
/**
|
|
29
29
|
* The name of the method.
|
|
30
30
|
*/
|
|
@@ -62,8 +62,8 @@ class Method extends callable_1.Callable {
|
|
|
62
62
|
return !!this.spec.static;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
+
exports.Method = Method;
|
|
65
66
|
__decorate([
|
|
66
67
|
_memoized_1.memoizedWhenLocked
|
|
67
68
|
], Method.prototype, "overrides", null);
|
|
68
|
-
exports.Method = Method;
|
|
69
69
|
//# sourceMappingURL=method.js.map
|
package/lib/module-like.js
CHANGED
|
@@ -25,25 +25,19 @@ class ModuleLike {
|
|
|
25
25
|
* All classes in this module/namespace (not submodules)
|
|
26
26
|
*/
|
|
27
27
|
get classes() {
|
|
28
|
-
return this.types
|
|
29
|
-
.filter((t) => t instanceof class_1.ClassType)
|
|
30
|
-
.map((t) => t);
|
|
28
|
+
return this.types.filter((t) => t instanceof class_1.ClassType).map((t) => t);
|
|
31
29
|
}
|
|
32
30
|
/**
|
|
33
31
|
* All interfaces in this module/namespace (not submodules)
|
|
34
32
|
*/
|
|
35
33
|
get interfaces() {
|
|
36
|
-
return this.types
|
|
37
|
-
.filter((t) => t instanceof interface_1.InterfaceType)
|
|
38
|
-
.map((t) => t);
|
|
34
|
+
return this.types.filter((t) => t instanceof interface_1.InterfaceType).map((t) => t);
|
|
39
35
|
}
|
|
40
36
|
/**
|
|
41
37
|
* All enums in this module/namespace (not submodules)
|
|
42
38
|
*/
|
|
43
39
|
get enums() {
|
|
44
|
-
return this.types
|
|
45
|
-
.filter((t) => t instanceof enum_1.EnumType)
|
|
46
|
-
.map((t) => t);
|
|
40
|
+
return this.types.filter((t) => t instanceof enum_1.EnumType).map((t) => t);
|
|
47
41
|
}
|
|
48
42
|
tryFindType(fqn) {
|
|
49
43
|
if (this.typeLocatorCache.has(fqn)) {
|
package/lib/optional-value.js
CHANGED
|
@@ -3,10 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OptionalValue = void 0;
|
|
4
4
|
const type_ref_1 = require("./type-ref");
|
|
5
5
|
class OptionalValue {
|
|
6
|
-
constructor(system, spec) {
|
|
7
|
-
this.system = system;
|
|
8
|
-
this.spec = spec;
|
|
9
|
-
}
|
|
10
6
|
static describe(optionalValue) {
|
|
11
7
|
let description = optionalValue.type.toString();
|
|
12
8
|
if (optionalValue.optional && !optionalValue.type.isAny) {
|
|
@@ -14,6 +10,10 @@ class OptionalValue {
|
|
|
14
10
|
}
|
|
15
11
|
return description;
|
|
16
12
|
}
|
|
13
|
+
constructor(system, spec) {
|
|
14
|
+
this.system = system;
|
|
15
|
+
this.spec = spec;
|
|
16
|
+
}
|
|
17
17
|
toString() {
|
|
18
18
|
return OptionalValue.describe(this);
|
|
19
19
|
}
|
package/lib/reference-type.js
CHANGED
|
@@ -55,6 +55,7 @@ class ReferenceType extends type_1.Type {
|
|
|
55
55
|
return Object.assign(this.getMethods(inherited), this.getProperties(inherited));
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
+
exports.ReferenceType = ReferenceType;
|
|
58
59
|
__decorate([
|
|
59
60
|
_memoized_1.memoized
|
|
60
61
|
], ReferenceType.prototype, "interfaces", null);
|
|
@@ -76,5 +77,4 @@ __decorate([
|
|
|
76
77
|
__decorate([
|
|
77
78
|
_memoized_1.memoized
|
|
78
79
|
], ReferenceType.prototype, "allMembers", null);
|
|
79
|
-
exports.ReferenceType = ReferenceType;
|
|
80
80
|
//# sourceMappingURL=reference-type.js.map
|
package/lib/source.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.locationInRepository = locationInRepository;
|
|
4
|
+
exports.repositoryUrl = repositoryUrl;
|
|
4
5
|
/**
|
|
5
6
|
* Return the repository location for the given API item
|
|
6
7
|
*/
|
|
@@ -18,7 +19,6 @@ function locationInRepository(item) {
|
|
|
18
19
|
line: moduleLoc.line,
|
|
19
20
|
};
|
|
20
21
|
}
|
|
21
|
-
exports.locationInRepository = locationInRepository;
|
|
22
22
|
/**
|
|
23
23
|
* Return a URL for this item into the source repository, if available
|
|
24
24
|
*
|
|
@@ -39,5 +39,4 @@ function repositoryUrl(item, ref = 'master') {
|
|
|
39
39
|
const prefix = repo.url.slice(0, -4);
|
|
40
40
|
return `${prefix}/blob/${ref}/${loc.filename}#L${loc.line}`;
|
|
41
41
|
}
|
|
42
|
-
exports.repositoryUrl = repositoryUrl;
|
|
43
42
|
//# sourceMappingURL=source.js.map
|
package/lib/type-member.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.MemberKind = void 0;
|
|
4
|
+
exports.isInitializer = isInitializer;
|
|
5
|
+
exports.isMethod = isMethod;
|
|
6
|
+
exports.isProperty = isProperty;
|
|
4
7
|
var MemberKind;
|
|
5
8
|
(function (MemberKind) {
|
|
6
9
|
MemberKind["Initializer"] = "initializer";
|
|
7
10
|
MemberKind["Method"] = "method";
|
|
8
11
|
MemberKind["Property"] = "property";
|
|
9
|
-
})(MemberKind
|
|
12
|
+
})(MemberKind || (exports.MemberKind = MemberKind = {}));
|
|
10
13
|
function isInitializer(x) {
|
|
11
14
|
return x.kind === MemberKind.Initializer;
|
|
12
15
|
}
|
|
13
|
-
exports.isInitializer = isInitializer;
|
|
14
16
|
function isMethod(x) {
|
|
15
17
|
return x.kind === MemberKind.Method;
|
|
16
18
|
}
|
|
17
|
-
exports.isMethod = isMethod;
|
|
18
19
|
function isProperty(x) {
|
|
19
20
|
return x.kind === MemberKind.Property;
|
|
20
21
|
}
|
|
21
|
-
exports.isProperty = isProperty;
|
|
22
22
|
//# sourceMappingURL=type-member.js.map
|
package/lib/type-system.js
CHANGED
|
@@ -115,7 +115,7 @@ class TypeSystem {
|
|
|
115
115
|
const root = this.addAssembly(asm, { isRoot });
|
|
116
116
|
// Using || instead of ?? because npmjs.com will alter the package.json file and possibly put `false` in pkg.bundleDependencies.
|
|
117
117
|
// This is actually non compliant to the package.json specification, but that's how it is...
|
|
118
|
-
const bundled = pkg.bundledDependencies
|
|
118
|
+
const bundled = pkg.bundledDependencies ?? pkg.bundleDependencies ?? [];
|
|
119
119
|
for (const name of dependenciesOf(pkg)) {
|
|
120
120
|
if (bundled.includes(name)) {
|
|
121
121
|
continue;
|
package/lib/type.js
CHANGED
|
@@ -141,11 +141,11 @@ class Type {
|
|
|
141
141
|
return (0, source_1.locationInRepository)(this);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
+
exports.Type = Type;
|
|
144
145
|
__decorate([
|
|
145
146
|
_memoized_1.memoized
|
|
146
147
|
], Type.prototype, "nestingParent", null);
|
|
147
148
|
__decorate([
|
|
148
149
|
_memoized_1.memoized
|
|
149
150
|
], Type.prototype, "allImplementations", null);
|
|
150
|
-
exports.Type = Type;
|
|
151
151
|
//# sourceMappingURL=type.js.map
|
package/lib/util.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.findDependencyDirectory = findDependencyDirectory;
|
|
4
|
+
exports.isBuiltinModule = isBuiltinModule;
|
|
5
|
+
exports.findPackageJsonUp = findPackageJsonUp;
|
|
6
|
+
exports.findUp = findUp;
|
|
4
7
|
const fs = require("fs-extra");
|
|
5
8
|
const path = require("path");
|
|
6
9
|
/**
|
|
@@ -23,7 +26,6 @@ async function findDependencyDirectory(dependencyName, searchStart) {
|
|
|
23
26
|
}
|
|
24
27
|
return depPkgJsonPath;
|
|
25
28
|
}
|
|
26
|
-
exports.findDependencyDirectory = findDependencyDirectory;
|
|
27
29
|
/**
|
|
28
30
|
* Whether the given dependency is a built-in
|
|
29
31
|
*
|
|
@@ -35,7 +37,6 @@ function isBuiltinModule(depName) {
|
|
|
35
37
|
const { builtinModules } = require('module');
|
|
36
38
|
return (builtinModules ?? []).includes(depName);
|
|
37
39
|
}
|
|
38
|
-
exports.isBuiltinModule = isBuiltinModule;
|
|
39
40
|
/**
|
|
40
41
|
* Find the package.json for a given package upwards from the given directory
|
|
41
42
|
*
|
|
@@ -49,7 +50,6 @@ async function findPackageJsonUp(packageName, directory) {
|
|
|
49
50
|
(await fs.readJson(pjFile)).name === packageName);
|
|
50
51
|
});
|
|
51
52
|
}
|
|
52
|
-
exports.findPackageJsonUp = findPackageJsonUp;
|
|
53
53
|
/**
|
|
54
54
|
* Find a directory up the tree from a starting directory matching a condition
|
|
55
55
|
*
|
|
@@ -72,5 +72,4 @@ async function findUp(directory, pred) {
|
|
|
72
72
|
directory = parent;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
exports.findUp = findUp;
|
|
76
75
|
//# sourceMappingURL=util.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsii-reflect",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.113.0",
|
|
4
4
|
"description": "strongly-typed reflection library and tools for jsii",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"jsii-tree": "bin/jsii-tree"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
|
-
"build": "tsc --build && chmod +x bin/jsii-tree &&
|
|
28
|
+
"build": "tsc --build && chmod +x bin/jsii-tree && yarn lint",
|
|
29
29
|
"watch": "tsc --build -w",
|
|
30
30
|
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .js,.ts --ignore-path=.gitignore",
|
|
31
31
|
"lint:fix": "yarn lint --fix",
|
|
@@ -34,18 +34,18 @@
|
|
|
34
34
|
"package": "package-js"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@jsii/check-node": "1.
|
|
38
|
-
"@jsii/spec": "^1.
|
|
37
|
+
"@jsii/check-node": "1.113.0",
|
|
38
|
+
"@jsii/spec": "^1.113.0",
|
|
39
39
|
"chalk": "^4",
|
|
40
40
|
"fs-extra": "^10.1.0",
|
|
41
|
-
"oo-ascii-tree": "^1.
|
|
41
|
+
"oo-ascii-tree": "^1.113.0",
|
|
42
42
|
"yargs": "^16.2.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@scope/jsii-calc-lib": "^1.
|
|
45
|
+
"@scope/jsii-calc-lib": "^1.113.0",
|
|
46
46
|
"@types/fs-extra": "^9.0.13",
|
|
47
47
|
"jsii": "^5.8.0",
|
|
48
|
-
"jsii-build-tools": "^1.
|
|
48
|
+
"jsii-build-tools": "^1.113.0",
|
|
49
49
|
"jsii-calc": "^3.20.120"
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -248,6 +248,26 @@ exports[`jsii-tree --all 1`] = `
|
|
|
248
248
|
│ │ │ ├── abstract
|
|
249
249
|
│ │ │ ├── immutable
|
|
250
250
|
│ │ │ └── type: Optional<number>
|
|
251
|
+
│ │ ├─┬ jsii4894
|
|
252
|
+
│ │ │ └─┬ types
|
|
253
|
+
│ │ │ ├─┬ class NonPascalCaseTest (stable)
|
|
254
|
+
│ │ │ │ └─┬ members
|
|
255
|
+
│ │ │ │ ├─┬ <initializer>(props) initializer (stable)
|
|
256
|
+
│ │ │ │ │ └─┬ parameters
|
|
257
|
+
│ │ │ │ │ └─┬ props
|
|
258
|
+
│ │ │ │ │ └── type: jsii-calc.jsii4894.NonPascalCaseTestProps
|
|
259
|
+
│ │ │ │ ├─┬ props property (stable)
|
|
260
|
+
│ │ │ │ │ ├── immutable
|
|
261
|
+
│ │ │ │ │ └── type: jsii-calc.jsii4894.NonPascalCaseTestProps
|
|
262
|
+
│ │ │ │ └─┬ someType property (stable)
|
|
263
|
+
│ │ │ │ ├── immutable
|
|
264
|
+
│ │ │ │ └── type: @scope/jsii-calc-lib.submodule.ClassWithNONPASCALCASEDName.SomeType
|
|
265
|
+
│ │ │ └─┬ interface NonPascalCaseTestProps (stable)
|
|
266
|
+
│ │ │ └─┬ members
|
|
267
|
+
│ │ │ └─┬ someType property (stable)
|
|
268
|
+
│ │ │ ├── abstract
|
|
269
|
+
│ │ │ ├── immutable
|
|
270
|
+
│ │ │ └── type: @scope/jsii-calc-lib.submodule.ClassWithNONPASCALCASEDName.SomeType
|
|
251
271
|
│ │ ├─┬ module2530
|
|
252
272
|
│ │ │ └─┬ types
|
|
253
273
|
│ │ │ └─┬ class MyClass (stable)
|
|
@@ -2204,7 +2224,12 @@ exports[`jsii-tree --all 1`] = `
|
|
|
2204
2224
|
│ │ ├─┬ static method() method (stable)
|
|
2205
2225
|
│ │ │ ├── static
|
|
2206
2226
|
│ │ │ └── returns: void
|
|
2207
|
-
│ │
|
|
2227
|
+
│ │ ├─┬ static property property (stable)
|
|
2228
|
+
│ │ │ ├── immutable
|
|
2229
|
+
│ │ │ ├── static
|
|
2230
|
+
│ │ │ └── type: number
|
|
2231
|
+
│ │ └─┬ static PROPERTY property (stable)
|
|
2232
|
+
│ │ ├── const
|
|
2208
2233
|
│ │ ├── immutable
|
|
2209
2234
|
│ │ ├── static
|
|
2210
2235
|
│ │ └── type: number
|
|
@@ -2214,7 +2239,12 @@ exports[`jsii-tree --all 1`] = `
|
|
|
2214
2239
|
│ │ ├─┬ static method() method (stable)
|
|
2215
2240
|
│ │ │ ├── static
|
|
2216
2241
|
│ │ │ └── returns: void
|
|
2217
|
-
│ │
|
|
2242
|
+
│ │ ├─┬ static property property (stable)
|
|
2243
|
+
│ │ │ ├── immutable
|
|
2244
|
+
│ │ │ ├── static
|
|
2245
|
+
│ │ │ └── type: number
|
|
2246
|
+
│ │ └─┬ static PROPERTY property (stable)
|
|
2247
|
+
│ │ ├── const
|
|
2218
2248
|
│ │ ├── immutable
|
|
2219
2249
|
│ │ ├── static
|
|
2220
2250
|
│ │ └── type: number
|
|
@@ -3526,6 +3556,9 @@ exports[`jsii-tree --all 1`] = `
|
|
|
3526
3556
|
│ │ └── returns: void
|
|
3527
3557
|
│ └─┬ submodule
|
|
3528
3558
|
│ └─┬ types
|
|
3559
|
+
│ ├─┬ class ClassWithNONPASCALCASEDName (deprecated)
|
|
3560
|
+
│ │ └─┬ members
|
|
3561
|
+
│ │ └── <initializer>() initializer (deprecated)
|
|
3529
3562
|
│ ├─┬ class NestingClass (deprecated)
|
|
3530
3563
|
│ │ └── members
|
|
3531
3564
|
│ ├─┬ class NestedClass (deprecated)
|
|
@@ -3542,6 +3575,12 @@ exports[`jsii-tree --all 1`] = `
|
|
|
3542
3575
|
│ │ │ └─┬ reflectable
|
|
3543
3576
|
│ │ │ └── type: @scope/jsii-calc-lib.submodule.IReflectable
|
|
3544
3577
|
│ │ └── returns: Map<string => any>
|
|
3578
|
+
│ ├─┬ interface SomeType (deprecated)
|
|
3579
|
+
│ │ └─┬ members
|
|
3580
|
+
│ │ └─┬ name property (deprecated)
|
|
3581
|
+
│ │ ├── abstract
|
|
3582
|
+
│ │ ├── immutable
|
|
3583
|
+
│ │ └── type: string
|
|
3545
3584
|
│ ├─┬ interface IReflectable (deprecated)
|
|
3546
3585
|
│ │ └─┬ members
|
|
3547
3586
|
│ │ └─┬ entries property (deprecated)
|
|
@@ -3748,6 +3787,10 @@ exports[`jsii-tree --inheritance 1`] = `
|
|
|
3748
3787
|
│ │ │ └─┬ types
|
|
3749
3788
|
│ │ │ ├── class OverrideMe
|
|
3750
3789
|
│ │ │ └── interface ImplementMeOpts
|
|
3790
|
+
│ │ ├─┬ jsii4894
|
|
3791
|
+
│ │ │ └─┬ types
|
|
3792
|
+
│ │ │ ├── class NonPascalCaseTest
|
|
3793
|
+
│ │ │ └── interface NonPascalCaseTestProps
|
|
3751
3794
|
│ │ ├─┬ module2530
|
|
3752
3795
|
│ │ │ └─┬ types
|
|
3753
3796
|
│ │ │ └── class MyClass
|
|
@@ -4196,9 +4239,11 @@ exports[`jsii-tree --inheritance 1`] = `
|
|
|
4196
4239
|
│ │ └── interface IInterface
|
|
4197
4240
|
│ └─┬ submodule
|
|
4198
4241
|
│ └─┬ types
|
|
4242
|
+
│ ├── class ClassWithNONPASCALCASEDName
|
|
4199
4243
|
│ ├── class NestingClass
|
|
4200
4244
|
│ ├── class NestedClass
|
|
4201
4245
|
│ ├── class Reflector
|
|
4246
|
+
│ ├── interface SomeType
|
|
4202
4247
|
│ ├── interface IReflectable
|
|
4203
4248
|
│ ├── interface NestedStruct
|
|
4204
4249
|
│ └── interface ReflectableEntry
|
|
@@ -4354,6 +4399,16 @@ exports[`jsii-tree --members 1`] = `
|
|
|
4354
4399
|
│ │ │ └─┬ members
|
|
4355
4400
|
│ │ │ ├── name property
|
|
4356
4401
|
│ │ │ └── count property
|
|
4402
|
+
│ │ ├─┬ jsii4894
|
|
4403
|
+
│ │ │ └─┬ types
|
|
4404
|
+
│ │ │ ├─┬ class NonPascalCaseTest
|
|
4405
|
+
│ │ │ │ └─┬ members
|
|
4406
|
+
│ │ │ │ ├── <initializer>(props) initializer
|
|
4407
|
+
│ │ │ │ ├── props property
|
|
4408
|
+
│ │ │ │ └── someType property
|
|
4409
|
+
│ │ │ └─┬ interface NonPascalCaseTestProps
|
|
4410
|
+
│ │ │ └─┬ members
|
|
4411
|
+
│ │ │ └── someType property
|
|
4357
4412
|
│ │ ├─┬ module2530
|
|
4358
4413
|
│ │ │ └─┬ types
|
|
4359
4414
|
│ │ │ └─┬ class MyClass
|
|
@@ -5272,12 +5327,14 @@ exports[`jsii-tree --members 1`] = `
|
|
|
5272
5327
|
│ ├─┬ class StaticHelloChild
|
|
5273
5328
|
│ │ └─┬ members
|
|
5274
5329
|
│ │ ├── static method() method
|
|
5275
|
-
│ │
|
|
5330
|
+
│ │ ├── static property property
|
|
5331
|
+
│ │ └── static PROPERTY property
|
|
5276
5332
|
│ ├─┬ class StaticHelloParent
|
|
5277
5333
|
│ │ └─┬ members
|
|
5278
5334
|
│ │ ├── <initializer>() initializer
|
|
5279
5335
|
│ │ ├── static method() method
|
|
5280
|
-
│ │
|
|
5336
|
+
│ │ ├── static property property
|
|
5337
|
+
│ │ └── static PROPERTY property
|
|
5281
5338
|
│ ├─┬ class Statics
|
|
5282
5339
|
│ │ └─┬ members
|
|
5283
5340
|
│ │ ├── <initializer>(value) initializer
|
|
@@ -5827,6 +5884,9 @@ exports[`jsii-tree --members 1`] = `
|
|
|
5827
5884
|
│ │ └── method() method
|
|
5828
5885
|
│ └─┬ submodule
|
|
5829
5886
|
│ └─┬ types
|
|
5887
|
+
│ ├─┬ class ClassWithNONPASCALCASEDName
|
|
5888
|
+
│ │ └─┬ members
|
|
5889
|
+
│ │ └── <initializer>() initializer
|
|
5830
5890
|
│ ├─┬ class NestingClass
|
|
5831
5891
|
│ │ └── members
|
|
5832
5892
|
│ ├─┬ class NestedClass
|
|
@@ -5837,6 +5897,9 @@ exports[`jsii-tree --members 1`] = `
|
|
|
5837
5897
|
│ │ └─┬ members
|
|
5838
5898
|
│ │ ├── <initializer>() initializer
|
|
5839
5899
|
│ │ └── asMap(reflectable) method
|
|
5900
|
+
│ ├─┬ interface SomeType
|
|
5901
|
+
│ │ └─┬ members
|
|
5902
|
+
│ │ └── name property
|
|
5840
5903
|
│ ├─┬ interface IReflectable
|
|
5841
5904
|
│ │ └─┬ members
|
|
5842
5905
|
│ │ └── entries property
|
|
@@ -5922,6 +5985,7 @@ exports[`jsii-tree --signatures 1`] = `
|
|
|
5922
5985
|
│ │ ├── bar
|
|
5923
5986
|
│ │ └── foo
|
|
5924
5987
|
│ ├── jsii3656
|
|
5988
|
+
│ ├── jsii4894
|
|
5925
5989
|
│ ├── module2530
|
|
5926
5990
|
│ ├── module2617
|
|
5927
5991
|
│ ├── module2647
|
|
@@ -6020,6 +6084,10 @@ exports[`jsii-tree --types 1`] = `
|
|
|
6020
6084
|
│ │ │ └─┬ types
|
|
6021
6085
|
│ │ │ ├── class OverrideMe
|
|
6022
6086
|
│ │ │ └── interface ImplementMeOpts
|
|
6087
|
+
│ │ ├─┬ jsii4894
|
|
6088
|
+
│ │ │ └─┬ types
|
|
6089
|
+
│ │ │ ├── class NonPascalCaseTest
|
|
6090
|
+
│ │ │ └── interface NonPascalCaseTestProps
|
|
6023
6091
|
│ │ ├─┬ module2530
|
|
6024
6092
|
│ │ │ └─┬ types
|
|
6025
6093
|
│ │ │ └── class MyClass
|
|
@@ -6372,9 +6440,11 @@ exports[`jsii-tree --types 1`] = `
|
|
|
6372
6440
|
│ │ └── interface IInterface
|
|
6373
6441
|
│ └─┬ submodule
|
|
6374
6442
|
│ └─┬ types
|
|
6443
|
+
│ ├── class ClassWithNONPASCALCASEDName
|
|
6375
6444
|
│ ├── class NestingClass
|
|
6376
6445
|
│ ├── class NestedClass
|
|
6377
6446
|
│ ├── class Reflector
|
|
6447
|
+
│ ├── interface SomeType
|
|
6378
6448
|
│ ├── interface IReflectable
|
|
6379
6449
|
│ ├── interface NestedStruct
|
|
6380
6450
|
│ └── interface ReflectableEntry
|
|
@@ -6414,6 +6484,7 @@ exports[`jsii-tree 1`] = `
|
|
|
6414
6484
|
│ │ ├── bar
|
|
6415
6485
|
│ │ └── foo
|
|
6416
6486
|
│ ├── jsii3656
|
|
6487
|
+
│ ├── jsii4894
|
|
6417
6488
|
│ ├── module2530
|
|
6418
6489
|
│ ├── module2617
|
|
6419
6490
|
│ ├── module2647
|
|
@@ -19,6 +19,7 @@ exports[`defaults 1`] = `
|
|
|
19
19
|
│ │ ├── bar
|
|
20
20
|
│ │ └── foo
|
|
21
21
|
│ ├── jsii3656
|
|
22
|
+
│ ├── jsii4894
|
|
22
23
|
│ ├── module2530
|
|
23
24
|
│ ├── module2617
|
|
24
25
|
│ ├── module2647
|
|
@@ -78,6 +79,7 @@ exports[`inheritance 1`] = `
|
|
|
78
79
|
│ │ ├── bar
|
|
79
80
|
│ │ └── foo
|
|
80
81
|
│ ├── jsii3656
|
|
82
|
+
│ ├── jsii4894
|
|
81
83
|
│ ├── module2530
|
|
82
84
|
│ ├── module2617
|
|
83
85
|
│ ├── module2647
|
|
@@ -137,6 +139,7 @@ exports[`members 1`] = `
|
|
|
137
139
|
│ │ ├── bar
|
|
138
140
|
│ │ └── foo
|
|
139
141
|
│ ├── jsii3656
|
|
142
|
+
│ ├── jsii4894
|
|
140
143
|
│ ├── module2530
|
|
141
144
|
│ ├── module2617
|
|
142
145
|
│ ├── module2647
|
|
@@ -425,6 +428,26 @@ exports[`showAll 1`] = `
|
|
|
425
428
|
│ │ │ ├── abstract
|
|
426
429
|
│ │ │ ├── immutable
|
|
427
430
|
│ │ │ └── type: Optional<number>
|
|
431
|
+
│ │ ├─┬ jsii4894
|
|
432
|
+
│ │ │ └─┬ types
|
|
433
|
+
│ │ │ ├─┬ class NonPascalCaseTest
|
|
434
|
+
│ │ │ │ └─┬ members
|
|
435
|
+
│ │ │ │ ├─┬ <initializer>(props) initializer
|
|
436
|
+
│ │ │ │ │ └─┬ parameters
|
|
437
|
+
│ │ │ │ │ └─┬ props
|
|
438
|
+
│ │ │ │ │ └── type: jsii-calc.jsii4894.NonPascalCaseTestProps
|
|
439
|
+
│ │ │ │ ├─┬ props property
|
|
440
|
+
│ │ │ │ │ ├── immutable
|
|
441
|
+
│ │ │ │ │ └── type: jsii-calc.jsii4894.NonPascalCaseTestProps
|
|
442
|
+
│ │ │ │ └─┬ someType property
|
|
443
|
+
│ │ │ │ ├── immutable
|
|
444
|
+
│ │ │ │ └── type: @scope/jsii-calc-lib.submodule.ClassWithNONPASCALCASEDName.SomeType
|
|
445
|
+
│ │ │ └─┬ interface NonPascalCaseTestProps
|
|
446
|
+
│ │ │ └─┬ members
|
|
447
|
+
│ │ │ └─┬ someType property
|
|
448
|
+
│ │ │ ├── abstract
|
|
449
|
+
│ │ │ ├── immutable
|
|
450
|
+
│ │ │ └── type: @scope/jsii-calc-lib.submodule.ClassWithNONPASCALCASEDName.SomeType
|
|
428
451
|
│ │ ├─┬ module2530
|
|
429
452
|
│ │ │ └─┬ types
|
|
430
453
|
│ │ │ └─┬ class MyClass
|
|
@@ -2381,7 +2404,12 @@ exports[`showAll 1`] = `
|
|
|
2381
2404
|
│ │ ├─┬ static method() method
|
|
2382
2405
|
│ │ │ ├── static
|
|
2383
2406
|
│ │ │ └── returns: void
|
|
2384
|
-
│ │
|
|
2407
|
+
│ │ ├─┬ static property property
|
|
2408
|
+
│ │ │ ├── immutable
|
|
2409
|
+
│ │ │ ├── static
|
|
2410
|
+
│ │ │ └── type: number
|
|
2411
|
+
│ │ └─┬ static PROPERTY property
|
|
2412
|
+
│ │ ├── const
|
|
2385
2413
|
│ │ ├── immutable
|
|
2386
2414
|
│ │ ├── static
|
|
2387
2415
|
│ │ └── type: number
|
|
@@ -2391,7 +2419,12 @@ exports[`showAll 1`] = `
|
|
|
2391
2419
|
│ │ ├─┬ static method() method
|
|
2392
2420
|
│ │ │ ├── static
|
|
2393
2421
|
│ │ │ └── returns: void
|
|
2394
|
-
│ │
|
|
2422
|
+
│ │ ├─┬ static property property
|
|
2423
|
+
│ │ │ ├── immutable
|
|
2424
|
+
│ │ │ ├── static
|
|
2425
|
+
│ │ │ └── type: number
|
|
2426
|
+
│ │ └─┬ static PROPERTY property
|
|
2427
|
+
│ │ ├── const
|
|
2395
2428
|
│ │ ├── immutable
|
|
2396
2429
|
│ │ ├── static
|
|
2397
2430
|
│ │ └── type: number
|
|
@@ -3703,6 +3736,9 @@ exports[`showAll 1`] = `
|
|
|
3703
3736
|
│ │ └── returns: void
|
|
3704
3737
|
│ └─┬ submodule
|
|
3705
3738
|
│ └─┬ types
|
|
3739
|
+
│ ├─┬ class ClassWithNONPASCALCASEDName
|
|
3740
|
+
│ │ └─┬ members
|
|
3741
|
+
│ │ └── <initializer>() initializer
|
|
3706
3742
|
│ ├─┬ class NestingClass
|
|
3707
3743
|
│ │ └── members
|
|
3708
3744
|
│ ├─┬ class NestedClass
|
|
@@ -3719,6 +3755,12 @@ exports[`showAll 1`] = `
|
|
|
3719
3755
|
│ │ │ └─┬ reflectable
|
|
3720
3756
|
│ │ │ └── type: @scope/jsii-calc-lib.submodule.IReflectable
|
|
3721
3757
|
│ │ └── returns: Map<string => any>
|
|
3758
|
+
│ ├─┬ interface SomeType
|
|
3759
|
+
│ │ └─┬ members
|
|
3760
|
+
│ │ └─┬ name property
|
|
3761
|
+
│ │ ├── abstract
|
|
3762
|
+
│ │ ├── immutable
|
|
3763
|
+
│ │ └── type: string
|
|
3722
3764
|
│ ├─┬ interface IReflectable
|
|
3723
3765
|
│ │ └─┬ members
|
|
3724
3766
|
│ │ └─┬ entries property
|
|
@@ -3883,6 +3925,7 @@ exports[`signatures 1`] = `
|
|
|
3883
3925
|
│ │ ├── bar
|
|
3884
3926
|
│ │ └── foo
|
|
3885
3927
|
│ ├── jsii3656
|
|
3928
|
+
│ ├── jsii4894
|
|
3886
3929
|
│ ├── module2530
|
|
3887
3930
|
│ ├── module2617
|
|
3888
3931
|
│ ├── module2647
|
|
@@ -3981,6 +4024,10 @@ exports[`types 1`] = `
|
|
|
3981
4024
|
│ │ │ └─┬ types
|
|
3982
4025
|
│ │ │ ├── class OverrideMe
|
|
3983
4026
|
│ │ │ └── interface ImplementMeOpts
|
|
4027
|
+
│ │ ├─┬ jsii4894
|
|
4028
|
+
│ │ │ └─┬ types
|
|
4029
|
+
│ │ │ ├── class NonPascalCaseTest
|
|
4030
|
+
│ │ │ └── interface NonPascalCaseTestProps
|
|
3984
4031
|
│ │ ├─┬ module2530
|
|
3985
4032
|
│ │ │ └─┬ types
|
|
3986
4033
|
│ │ │ └── class MyClass
|
|
@@ -4333,9 +4380,11 @@ exports[`types 1`] = `
|
|
|
4333
4380
|
│ │ └── interface IInterface
|
|
4334
4381
|
│ └─┬ submodule
|
|
4335
4382
|
│ └─┬ types
|
|
4383
|
+
│ ├── class ClassWithNONPASCALCASEDName
|
|
4336
4384
|
│ ├── class NestingClass
|
|
4337
4385
|
│ ├── class NestedClass
|
|
4338
4386
|
│ ├── class Reflector
|
|
4387
|
+
│ ├── interface SomeType
|
|
4339
4388
|
│ ├── interface IReflectable
|
|
4340
4389
|
│ ├── interface NestedStruct
|
|
4341
4390
|
│ └── interface ReflectableEntry
|
|
@@ -22,6 +22,7 @@ exports[`TypeSystem.classes lists all the classes in the typesystem 1`] = `
|
|
|
22
22
|
"@scope/jsii-calc-lib.Operation",
|
|
23
23
|
"@scope/jsii-calc-lib.deprecationRemoval.InterfaceFactory",
|
|
24
24
|
"@scope/jsii-calc-lib.deprecationRemoval.VisibleBaseClass",
|
|
25
|
+
"@scope/jsii-calc-lib.submodule.ClassWithNONPASCALCASEDName",
|
|
25
26
|
"@scope/jsii-calc-lib.submodule.NestingClass",
|
|
26
27
|
"@scope/jsii-calc-lib.submodule.NestingClass.NestedClass",
|
|
27
28
|
"@scope/jsii-calc-lib.submodule.Reflector",
|
|
@@ -176,6 +177,7 @@ exports[`TypeSystem.classes lists all the classes in the typesystem 1`] = `
|
|
|
176
177
|
"jsii-calc.homonymousForwardReferences.bar.Consumer",
|
|
177
178
|
"jsii-calc.homonymousForwardReferences.foo.Consumer",
|
|
178
179
|
"jsii-calc.jsii3656.OverrideMe",
|
|
180
|
+
"jsii-calc.jsii4894.NonPascalCaseTest",
|
|
179
181
|
"jsii-calc.module2530.MyClass",
|
|
180
182
|
"jsii-calc.module2617.OnlyStatics",
|
|
181
183
|
"jsii-calc.module2647.ExtendAndImplement",
|
package/test/tree.test.js
CHANGED
|
@@ -43,7 +43,12 @@ class StringWriter {
|
|
|
43
43
|
this.buffer = Buffer.alloc(0);
|
|
44
44
|
}
|
|
45
45
|
write(chunk, _encoding, cb) {
|
|
46
|
-
|
|
46
|
+
if (Buffer.isBuffer(chunk)) {
|
|
47
|
+
this.buffer = Buffer.concat([this.buffer, chunk]);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
this.buffer = Buffer.concat([this.buffer, Buffer.from(chunk)]);
|
|
51
|
+
}
|
|
47
52
|
if (cb != null) {
|
|
48
53
|
cb();
|
|
49
54
|
}
|
package/test/util.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.typeSystemFromSource = typeSystemFromSource;
|
|
4
|
+
exports.assemblyFromSource = assemblyFromSource;
|
|
4
5
|
const jsii_1 = require("jsii");
|
|
5
6
|
const lib_1 = require("../lib");
|
|
6
7
|
function typeSystemFromSource(source, cb) {
|
|
7
8
|
const asm = assemblyFromSource(source, cb);
|
|
8
9
|
return asm.system;
|
|
9
10
|
}
|
|
10
|
-
exports.typeSystemFromSource = typeSystemFromSource;
|
|
11
11
|
function assemblyFromSource(source, cb) {
|
|
12
12
|
const ass = (0, jsii_1.sourceToAssemblyHelper)(source, cb);
|
|
13
13
|
const ts = new lib_1.TypeSystem();
|
|
14
14
|
return ts.addAssembly(new lib_1.Assembly(ts, ass));
|
|
15
15
|
}
|
|
16
|
-
exports.assemblyFromSource = assemblyFromSource;
|
|
17
16
|
//# sourceMappingURL=util.js.map
|