jsii-reflect 1.112.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 +2 -6
- 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.js +1 -1
- package/lib/util.js +4 -5
- package/package.json +7 -7
- package/test/__snapshots__/jsii-tree.test.js.snap +59 -0
- package/test/__snapshots__/tree.test.js.snap +39 -0
- package/test/__snapshots__/type-system.test.js.snap +2 -0
- 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);
|
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.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)
|
|
@@ -3536,6 +3556,9 @@ exports[`jsii-tree --all 1`] = `
|
|
|
3536
3556
|
│ │ └── returns: void
|
|
3537
3557
|
│ └─┬ submodule
|
|
3538
3558
|
│ └─┬ types
|
|
3559
|
+
│ ├─┬ class ClassWithNONPASCALCASEDName (deprecated)
|
|
3560
|
+
│ │ └─┬ members
|
|
3561
|
+
│ │ └── <initializer>() initializer (deprecated)
|
|
3539
3562
|
│ ├─┬ class NestingClass (deprecated)
|
|
3540
3563
|
│ │ └── members
|
|
3541
3564
|
│ ├─┬ class NestedClass (deprecated)
|
|
@@ -3552,6 +3575,12 @@ exports[`jsii-tree --all 1`] = `
|
|
|
3552
3575
|
│ │ │ └─┬ reflectable
|
|
3553
3576
|
│ │ │ └── type: @scope/jsii-calc-lib.submodule.IReflectable
|
|
3554
3577
|
│ │ └── returns: Map<string => any>
|
|
3578
|
+
│ ├─┬ interface SomeType (deprecated)
|
|
3579
|
+
│ │ └─┬ members
|
|
3580
|
+
│ │ └─┬ name property (deprecated)
|
|
3581
|
+
│ │ ├── abstract
|
|
3582
|
+
│ │ ├── immutable
|
|
3583
|
+
│ │ └── type: string
|
|
3555
3584
|
│ ├─┬ interface IReflectable (deprecated)
|
|
3556
3585
|
│ │ └─┬ members
|
|
3557
3586
|
│ │ └─┬ entries property (deprecated)
|
|
@@ -3758,6 +3787,10 @@ exports[`jsii-tree --inheritance 1`] = `
|
|
|
3758
3787
|
│ │ │ └─┬ types
|
|
3759
3788
|
│ │ │ ├── class OverrideMe
|
|
3760
3789
|
│ │ │ └── interface ImplementMeOpts
|
|
3790
|
+
│ │ ├─┬ jsii4894
|
|
3791
|
+
│ │ │ └─┬ types
|
|
3792
|
+
│ │ │ ├── class NonPascalCaseTest
|
|
3793
|
+
│ │ │ └── interface NonPascalCaseTestProps
|
|
3761
3794
|
│ │ ├─┬ module2530
|
|
3762
3795
|
│ │ │ └─┬ types
|
|
3763
3796
|
│ │ │ └── class MyClass
|
|
@@ -4206,9 +4239,11 @@ exports[`jsii-tree --inheritance 1`] = `
|
|
|
4206
4239
|
│ │ └── interface IInterface
|
|
4207
4240
|
│ └─┬ submodule
|
|
4208
4241
|
│ └─┬ types
|
|
4242
|
+
│ ├── class ClassWithNONPASCALCASEDName
|
|
4209
4243
|
│ ├── class NestingClass
|
|
4210
4244
|
│ ├── class NestedClass
|
|
4211
4245
|
│ ├── class Reflector
|
|
4246
|
+
│ ├── interface SomeType
|
|
4212
4247
|
│ ├── interface IReflectable
|
|
4213
4248
|
│ ├── interface NestedStruct
|
|
4214
4249
|
│ └── interface ReflectableEntry
|
|
@@ -4364,6 +4399,16 @@ exports[`jsii-tree --members 1`] = `
|
|
|
4364
4399
|
│ │ │ └─┬ members
|
|
4365
4400
|
│ │ │ ├── name property
|
|
4366
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
|
|
4367
4412
|
│ │ ├─┬ module2530
|
|
4368
4413
|
│ │ │ └─┬ types
|
|
4369
4414
|
│ │ │ └─┬ class MyClass
|
|
@@ -5839,6 +5884,9 @@ exports[`jsii-tree --members 1`] = `
|
|
|
5839
5884
|
│ │ └── method() method
|
|
5840
5885
|
│ └─┬ submodule
|
|
5841
5886
|
│ └─┬ types
|
|
5887
|
+
│ ├─┬ class ClassWithNONPASCALCASEDName
|
|
5888
|
+
│ │ └─┬ members
|
|
5889
|
+
│ │ └── <initializer>() initializer
|
|
5842
5890
|
│ ├─┬ class NestingClass
|
|
5843
5891
|
│ │ └── members
|
|
5844
5892
|
│ ├─┬ class NestedClass
|
|
@@ -5849,6 +5897,9 @@ exports[`jsii-tree --members 1`] = `
|
|
|
5849
5897
|
│ │ └─┬ members
|
|
5850
5898
|
│ │ ├── <initializer>() initializer
|
|
5851
5899
|
│ │ └── asMap(reflectable) method
|
|
5900
|
+
│ ├─┬ interface SomeType
|
|
5901
|
+
│ │ └─┬ members
|
|
5902
|
+
│ │ └── name property
|
|
5852
5903
|
│ ├─┬ interface IReflectable
|
|
5853
5904
|
│ │ └─┬ members
|
|
5854
5905
|
│ │ └── entries property
|
|
@@ -5934,6 +5985,7 @@ exports[`jsii-tree --signatures 1`] = `
|
|
|
5934
5985
|
│ │ ├── bar
|
|
5935
5986
|
│ │ └── foo
|
|
5936
5987
|
│ ├── jsii3656
|
|
5988
|
+
│ ├── jsii4894
|
|
5937
5989
|
│ ├── module2530
|
|
5938
5990
|
│ ├── module2617
|
|
5939
5991
|
│ ├── module2647
|
|
@@ -6032,6 +6084,10 @@ exports[`jsii-tree --types 1`] = `
|
|
|
6032
6084
|
│ │ │ └─┬ types
|
|
6033
6085
|
│ │ │ ├── class OverrideMe
|
|
6034
6086
|
│ │ │ └── interface ImplementMeOpts
|
|
6087
|
+
│ │ ├─┬ jsii4894
|
|
6088
|
+
│ │ │ └─┬ types
|
|
6089
|
+
│ │ │ ├── class NonPascalCaseTest
|
|
6090
|
+
│ │ │ └── interface NonPascalCaseTestProps
|
|
6035
6091
|
│ │ ├─┬ module2530
|
|
6036
6092
|
│ │ │ └─┬ types
|
|
6037
6093
|
│ │ │ └── class MyClass
|
|
@@ -6384,9 +6440,11 @@ exports[`jsii-tree --types 1`] = `
|
|
|
6384
6440
|
│ │ └── interface IInterface
|
|
6385
6441
|
│ └─┬ submodule
|
|
6386
6442
|
│ └─┬ types
|
|
6443
|
+
│ ├── class ClassWithNONPASCALCASEDName
|
|
6387
6444
|
│ ├── class NestingClass
|
|
6388
6445
|
│ ├── class NestedClass
|
|
6389
6446
|
│ ├── class Reflector
|
|
6447
|
+
│ ├── interface SomeType
|
|
6390
6448
|
│ ├── interface IReflectable
|
|
6391
6449
|
│ ├── interface NestedStruct
|
|
6392
6450
|
│ └── interface ReflectableEntry
|
|
@@ -6426,6 +6484,7 @@ exports[`jsii-tree 1`] = `
|
|
|
6426
6484
|
│ │ ├── bar
|
|
6427
6485
|
│ │ └── foo
|
|
6428
6486
|
│ ├── jsii3656
|
|
6487
|
+
│ ├── jsii4894
|
|
6429
6488
|
│ ├── module2530
|
|
6430
6489
|
│ ├── module2617
|
|
6431
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
|
|
@@ -3713,6 +3736,9 @@ exports[`showAll 1`] = `
|
|
|
3713
3736
|
│ │ └── returns: void
|
|
3714
3737
|
│ └─┬ submodule
|
|
3715
3738
|
│ └─┬ types
|
|
3739
|
+
│ ├─┬ class ClassWithNONPASCALCASEDName
|
|
3740
|
+
│ │ └─┬ members
|
|
3741
|
+
│ │ └── <initializer>() initializer
|
|
3716
3742
|
│ ├─┬ class NestingClass
|
|
3717
3743
|
│ │ └── members
|
|
3718
3744
|
│ ├─┬ class NestedClass
|
|
@@ -3729,6 +3755,12 @@ exports[`showAll 1`] = `
|
|
|
3729
3755
|
│ │ │ └─┬ reflectable
|
|
3730
3756
|
│ │ │ └── type: @scope/jsii-calc-lib.submodule.IReflectable
|
|
3731
3757
|
│ │ └── returns: Map<string => any>
|
|
3758
|
+
│ ├─┬ interface SomeType
|
|
3759
|
+
│ │ └─┬ members
|
|
3760
|
+
│ │ └─┬ name property
|
|
3761
|
+
│ │ ├── abstract
|
|
3762
|
+
│ │ ├── immutable
|
|
3763
|
+
│ │ └── type: string
|
|
3732
3764
|
│ ├─┬ interface IReflectable
|
|
3733
3765
|
│ │ └─┬ members
|
|
3734
3766
|
│ │ └─┬ entries property
|
|
@@ -3893,6 +3925,7 @@ exports[`signatures 1`] = `
|
|
|
3893
3925
|
│ │ ├── bar
|
|
3894
3926
|
│ │ └── foo
|
|
3895
3927
|
│ ├── jsii3656
|
|
3928
|
+
│ ├── jsii4894
|
|
3896
3929
|
│ ├── module2530
|
|
3897
3930
|
│ ├── module2617
|
|
3898
3931
|
│ ├── module2647
|
|
@@ -3991,6 +4024,10 @@ exports[`types 1`] = `
|
|
|
3991
4024
|
│ │ │ └─┬ types
|
|
3992
4025
|
│ │ │ ├── class OverrideMe
|
|
3993
4026
|
│ │ │ └── interface ImplementMeOpts
|
|
4027
|
+
│ │ ├─┬ jsii4894
|
|
4028
|
+
│ │ │ └─┬ types
|
|
4029
|
+
│ │ │ ├── class NonPascalCaseTest
|
|
4030
|
+
│ │ │ └── interface NonPascalCaseTestProps
|
|
3994
4031
|
│ │ ├─┬ module2530
|
|
3995
4032
|
│ │ │ └─┬ types
|
|
3996
4033
|
│ │ │ └── class MyClass
|
|
@@ -4343,9 +4380,11 @@ exports[`types 1`] = `
|
|
|
4343
4380
|
│ │ └── interface IInterface
|
|
4344
4381
|
│ └─┬ submodule
|
|
4345
4382
|
│ └─┬ types
|
|
4383
|
+
│ ├── class ClassWithNONPASCALCASEDName
|
|
4346
4384
|
│ ├── class NestingClass
|
|
4347
4385
|
│ ├── class NestedClass
|
|
4348
4386
|
│ ├── class Reflector
|
|
4387
|
+
│ ├── interface SomeType
|
|
4349
4388
|
│ ├── interface IReflectable
|
|
4350
4389
|
│ ├── interface NestedStruct
|
|
4351
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/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
|