@mutates/core 2.0.0 → 2.1.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/package.json +8 -4
- package/src/lib/accessors/add-accessors.js +1 -2
- package/src/lib/accessors/add-accessors.js.map +1 -1
- package/src/lib/accessors/get-accessors.js +3 -4
- package/src/lib/accessors/get-accessors.js.map +1 -1
- package/src/lib/arrays/index.js +4 -5
- package/src/lib/arrays/index.js.map +1 -1
- package/src/lib/classes/get-classes.d.ts +4 -2
- package/src/lib/constructors/add-constructors.js +1 -2
- package/src/lib/constructors/add-constructors.js.map +1 -1
- package/src/lib/constructors/get-constructors.js +1 -2
- package/src/lib/constructors/get-constructors.js.map +1 -1
- package/src/lib/decorators/add-decorators.js +1 -2
- package/src/lib/decorators/add-decorators.js.map +1 -1
- package/src/lib/decorators/get-decorators.d.ts +4 -2
- package/src/lib/decorators/get-decorators.js +3 -3
- package/src/lib/decorators/get-decorators.js.map +1 -1
- package/src/lib/enums/get-enums.d.ts +4 -2
- package/src/lib/exports/get-exports.d.ts +4 -2
- package/src/lib/fs/file-system.js +21 -22
- package/src/lib/fs/file-system.js.map +1 -1
- package/src/lib/functions/get-functions.d.ts +4 -2
- package/src/lib/helpers/match.js +1 -2
- package/src/lib/helpers/match.js.map +1 -1
- package/src/lib/imports/get-import-refs.js +2 -2
- package/src/lib/imports/get-import-refs.js.map +1 -1
- package/src/lib/imports/get-imports.d.ts +4 -2
- package/src/lib/imports/get-named-imports.js +1 -2
- package/src/lib/imports/get-named-imports.js.map +1 -1
- package/src/lib/interfaces/get-interfaces.d.ts +4 -2
- package/src/lib/methods/add-methods.js +1 -2
- package/src/lib/methods/add-methods.js.map +1 -1
- package/src/lib/methods/get-methods.js +3 -4
- package/src/lib/methods/get-methods.js.map +1 -1
- package/src/lib/params/add-params.js +1 -2
- package/src/lib/params/add-params.js.map +1 -1
- package/src/lib/params/get-params.js +1 -2
- package/src/lib/params/get-params.js.map +1 -1
- package/src/lib/project/project.d.ts +1 -0
- package/src/lib/project/project.js +7 -7
- package/src/lib/project/project.js.map +1 -1
- package/src/lib/properties/add-class-properties.js +1 -2
- package/src/lib/properties/add-class-properties.js.map +1 -1
- package/src/lib/properties/add-object-property.js +1 -2
- package/src/lib/properties/add-object-property.js.map +1 -1
- package/src/lib/properties/get-class-properties.js +1 -2
- package/src/lib/properties/get-class-properties.js.map +1 -1
- package/src/lib/properties/get-object-properties.js +1 -2
- package/src/lib/properties/get-object-properties.js.map +1 -1
- package/src/lib/source-file/create-source-file.js +1 -2
- package/src/lib/source-file/create-source-file.js.map +1 -1
- package/src/lib/source-file/get-source-files.js +2 -3
- package/src/lib/source-file/get-source-files.js.map +1 -1
- package/src/lib/source-file/move-source-file-paths.js +1 -2
- package/src/lib/source-file/move-source-file-paths.js.map +1 -1
- package/src/lib/testing/index.js +1 -2
- package/src/lib/testing/index.js.map +1 -1
- package/src/lib/type-aliases/get-type-aliases.d.ts +4 -2
- package/src/lib/utils/helpers/coerce-array.js +1 -2
- package/src/lib/utils/helpers/coerce-array.js.map +1 -1
- package/src/lib/utils/helpers/get-declaration-creator.js +1 -2
- package/src/lib/utils/helpers/get-declaration-creator.js.map +1 -1
- package/src/lib/utils/helpers/get-declaration-editor.js +1 -2
- package/src/lib/utils/helpers/get-declaration-editor.js.map +1 -1
- package/src/lib/utils/helpers/get-declaration-getter.d.ts +3 -1
- package/src/lib/utils/helpers/get-declaration-getter.js +6 -5
- package/src/lib/utils/helpers/get-declaration-getter.js.map +1 -1
- package/src/lib/utils/helpers/get-declaration-remover.js +2 -2
- package/src/lib/utils/helpers/get-declaration-remover.js.map +1 -1
- package/src/lib/utils/helpers/match-query.js +1 -2
- package/src/lib/utils/helpers/match-query.js.map +1 -1
- package/src/lib/utils/helpers/pipe.js +1 -2
- package/src/lib/utils/helpers/pipe.js.map +1 -1
- package/src/lib/utils/helpers/throw-file-not-found.js +1 -2
- package/src/lib/utils/helpers/throw-file-not-found.js.map +1 -1
- package/src/lib/variables/get-variables.d.ts +4 -2
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mutates/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"keywords": [
|
|
5
|
-
"typescript",
|
|
6
5
|
"ast",
|
|
6
|
+
"typescript",
|
|
7
7
|
"mutations"
|
|
8
8
|
],
|
|
9
9
|
"homepage": "https://github.com/IKatsuba/mutates",
|
|
@@ -15,14 +15,18 @@
|
|
|
15
15
|
"type": "commonjs",
|
|
16
16
|
"exports": {
|
|
17
17
|
"./package.json": "./package.json",
|
|
18
|
-
".":
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./src/index.d.ts",
|
|
20
|
+
"default": "./src/index.js"
|
|
21
|
+
},
|
|
19
22
|
"./testing": "./src/testing.js"
|
|
20
23
|
},
|
|
21
24
|
"main": "./src/index.js",
|
|
25
|
+
"types": "./src/index.d.ts",
|
|
22
26
|
"typings": "./src/index.d.ts",
|
|
23
27
|
"dependencies": {
|
|
24
28
|
"minimatch": "9.0.3",
|
|
25
|
-
"ts-morph": "^
|
|
29
|
+
"ts-morph": "^25.0.0",
|
|
26
30
|
"tslib": "^2.3.0"
|
|
27
31
|
},
|
|
28
32
|
"publishConfig": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addAccessors =
|
|
3
|
+
exports.addAccessors = addAccessors;
|
|
4
4
|
const ts_morph_1 = require("ts-morph");
|
|
5
5
|
const utils_1 = require("../utils");
|
|
6
6
|
function addAccessors(classes, accessors) {
|
|
@@ -15,5 +15,4 @@ function addAccessors(classes, accessors) {
|
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
-
exports.addAccessors = addAccessors;
|
|
19
18
|
//# sourceMappingURL=add-accessors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-accessors.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/accessors/add-accessors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-accessors.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/accessors/add-accessors.ts"],"names":[],"mappings":";;AAUA,oCAmBC;AA7BD,uCAMkB;AAElB,oCAAuC;AAEvC,SAAgB,YAAY,CAC1B,OAGqD,EACrD,SAGmC;IAEnC,IAAA,mBAAW,EAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACrC,IAAA,mBAAW,EAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;YAC1C,IAAI,oBAAS,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACtC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;YACjC,CAAC;iBAAM,CAAC;gBACN,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;YACjC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getClassAccessors = getClassAccessors;
|
|
4
|
+
exports.getObjectAccessors = getObjectAccessors;
|
|
5
|
+
exports.getAccessors = getAccessors;
|
|
4
6
|
const ts_morph_1 = require("ts-morph");
|
|
5
7
|
const utils_1 = require("../utils");
|
|
6
8
|
function getClassAccessors(classes, query) {
|
|
@@ -9,7 +11,6 @@ function getClassAccessors(classes, query) {
|
|
|
9
11
|
.flat()
|
|
10
12
|
.filter((accessor) => (0, utils_1.matchQuery)(accessor.getStructure(), query));
|
|
11
13
|
}
|
|
12
|
-
exports.getClassAccessors = getClassAccessors;
|
|
13
14
|
function getObjectAccessors(objects, query) {
|
|
14
15
|
const accessors = (0, utils_1.coerceArray)(objects)
|
|
15
16
|
.map((object) => object.getProperties())
|
|
@@ -17,7 +18,6 @@ function getObjectAccessors(objects, query) {
|
|
|
17
18
|
.filter((accessor) => ts_morph_1.Node.isGetAccessorDeclaration(accessor) || ts_morph_1.Node.isSetAccessorDeclaration(accessor));
|
|
18
19
|
return accessors.filter((accessor) => (0, utils_1.matchQuery)(accessor.getStructure(), query));
|
|
19
20
|
}
|
|
20
|
-
exports.getObjectAccessors = getObjectAccessors;
|
|
21
21
|
function getAccessors(classes, query) {
|
|
22
22
|
return (0, utils_1.coerceArray)(classes)
|
|
23
23
|
.map((klass) => {
|
|
@@ -29,5 +29,4 @@ function getAccessors(classes, query) {
|
|
|
29
29
|
.filter(Boolean)
|
|
30
30
|
.flat();
|
|
31
31
|
}
|
|
32
|
-
exports.getAccessors = getAccessors;
|
|
33
32
|
//# sourceMappingURL=get-accessors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-accessors.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/accessors/get-accessors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-accessors.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/accessors/get-accessors.ts"],"names":[],"mappings":";;AAYA,8CAQC;AAED,gDAaC;AAED,oCAiBC;AAtDD,uCAOkB;AAGlB,oCAAmD;AAEnD,SAAgB,iBAAiB,CAC/B,OAA8C,EAC9C,KAAgF;IAEhF,OAAO,IAAA,mBAAW,EAAC,OAAO,CAAC;SACxB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,eAAe,EAAE,EAAE,GAAG,KAAK,CAAC,eAAe,EAAE,CAAC,CAAC;SACxE,IAAI,EAAE;SACN,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAA,kBAAU,EAAC,QAAQ,CAAC,YAAY,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;AACtE,CAAC;AAED,SAAgB,kBAAkB,CAChC,OAA4D,EAC5D,KAAgF;IAEhF,MAAM,SAAS,GAAG,IAAA,mBAAW,EAAC,OAAO,CAAC;SACnC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC;SACvC,IAAI,EAAE;SACN,MAAM,CACL,CAAC,QAAQ,EAAE,EAAE,CACX,eAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,IAAI,eAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,CAC5D,CAAC;IAE7B,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAA,kBAAU,EAAC,QAAQ,CAAC,YAAY,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;AACpF,CAAC;AAED,SAAgB,YAAY,CAC1B,OAGqD,EACrD,KAAgF;IAEhF,OAAO,IAAA,mBAAW,EAAC,OAAO,CAAC;SACxB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACb,IAAI,eAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC;YACnC,OAAO,iBAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACzC,CAAC;QAED,OAAO,kBAAkB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC,CAAC;SACD,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,EAAE,CAAC;AACZ,CAAC"}
|
package/src/lib/arrays/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.pushToArray = pushToArray;
|
|
4
|
+
exports.pushToArrayIfNotExists = pushToArrayIfNotExists;
|
|
5
|
+
exports.arrayIncludes = arrayIncludes;
|
|
6
|
+
exports.removeFromArray = removeFromArray;
|
|
4
7
|
function pushToArray(array, ...items) {
|
|
5
8
|
array.addElements(items);
|
|
6
9
|
}
|
|
7
|
-
exports.pushToArray = pushToArray;
|
|
8
10
|
function pushToArrayIfNotExists(array, ...items) {
|
|
9
11
|
array.addElements(items.filter((item) => !arrayIncludes(array, item)));
|
|
10
12
|
}
|
|
11
|
-
exports.pushToArrayIfNotExists = pushToArrayIfNotExists;
|
|
12
13
|
function arrayIncludes(array, item) {
|
|
13
14
|
return !!array.getElements().find((exp) => exp.getText() === item);
|
|
14
15
|
}
|
|
15
|
-
exports.arrayIncludes = arrayIncludes;
|
|
16
16
|
function removeFromArray(array, ...items) {
|
|
17
17
|
for (const item of items) {
|
|
18
18
|
const index = array.getElements().findIndex((exp) => exp.getText() === item);
|
|
@@ -21,5 +21,4 @@ function removeFromArray(array, ...items) {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
exports.removeFromArray = removeFromArray;
|
|
25
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/arrays/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/arrays/index.ts"],"names":[],"mappings":";;AAEA,kCAEC;AAED,wDAEC;AAED,sCAEC;AAED,0CAQC;AApBD,SAAgB,WAAW,CAAC,KAA6B,EAAE,GAAG,KAAe;IAC3E,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC;AAED,SAAgB,sBAAsB,CAAC,KAA6B,EAAE,GAAG,KAAe;IACtF,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AACzE,CAAC;AAED,SAAgB,aAAa,CAAC,KAA6B,EAAE,IAAY;IACvE,OAAO,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,IAAI,CAAC,CAAC;AACrE,CAAC;AAED,SAAgB,eAAe,CAAC,KAA6B,EAAE,GAAG,KAAe;IAC/E,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,IAAI,CAAC,CAAC;QAE7E,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;YACjB,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ClassDeclaration } from 'ts-morph';
|
|
2
|
-
export declare const getClasses: (
|
|
2
|
+
export declare const getClasses: (query?: (Partial<{
|
|
3
3
|
leadingTrivia?: string | string[] | undefined;
|
|
4
4
|
trailingTrivia?: string | string[] | undefined;
|
|
5
5
|
typeParameters?: string | string[] | undefined;
|
|
@@ -18,4 +18,6 @@ export declare const getClasses: (pattern: import("../utils").Pattern, query?: P
|
|
|
18
18
|
implements?: string | string[] | undefined;
|
|
19
19
|
isExported?: boolean | boolean[] | undefined;
|
|
20
20
|
isDefaultExport?: boolean | boolean[] | undefined;
|
|
21
|
-
}>
|
|
21
|
+
}> & {
|
|
22
|
+
pattern?: import("../utils").Pattern;
|
|
23
|
+
}) | undefined) => ClassDeclaration[];
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addConstructors =
|
|
3
|
+
exports.addConstructors = addConstructors;
|
|
4
4
|
const utils_1 = require("../utils");
|
|
5
5
|
function addConstructors(classes, constructors) {
|
|
6
6
|
(0, utils_1.coerceArray)(classes).forEach((klass) => {
|
|
7
7
|
klass.addConstructors((0, utils_1.coerceArray)(constructors));
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
|
-
exports.addConstructors = addConstructors;
|
|
11
10
|
//# sourceMappingURL=add-constructors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-constructors.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/constructors/add-constructors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-constructors.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/constructors/add-constructors.ts"],"names":[],"mappings":";;AAIA,0CASC;AAXD,oCAAuC;AAEvC,SAAgB,eAAe,CAC7B,OAA8C,EAC9C,YAEiD;IAEjD,IAAA,mBAAW,EAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACrC,KAAK,CAAC,eAAe,CAAC,IAAA,mBAAW,EAAC,YAAY,CAAC,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getConstructors =
|
|
3
|
+
exports.getConstructors = getConstructors;
|
|
4
4
|
const utils_1 = require("../utils");
|
|
5
5
|
function getConstructors(classes, query) {
|
|
6
6
|
return (0, utils_1.coerceArray)(classes)
|
|
@@ -8,5 +8,4 @@ function getConstructors(classes, query) {
|
|
|
8
8
|
.flat()
|
|
9
9
|
.filter((constructor) => !constructor.isOverload() && (0, utils_1.matchQuery)(constructor.getStructure(), query));
|
|
10
10
|
}
|
|
11
|
-
exports.getConstructors = getConstructors;
|
|
12
11
|
//# sourceMappingURL=get-constructors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-constructors.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/constructors/get-constructors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-constructors.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/constructors/get-constructors.ts"],"names":[],"mappings":";;AASA,0CAUC;AAZD,oCAAmD;AAEnD,SAAgB,eAAe,CAC7B,OAA8C,EAC9C,KAA8C;IAE9C,OAAO,IAAA,mBAAW,EAAC,OAAO,CAAC;SACxB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC;SACvC,IAAI,EAAE;SACN,MAAM,CACL,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,UAAU,EAAE,IAAI,IAAA,kBAAU,EAAC,WAAW,CAAC,YAAY,EAAE,EAAE,KAAK,CAAC,CAC5F,CAAC;AACN,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addDecorators =
|
|
3
|
+
exports.addDecorators = addDecorators;
|
|
4
4
|
const utils_1 = require("../utils");
|
|
5
5
|
function addDecorators(nodes, decorators) {
|
|
6
6
|
(0, utils_1.coerceArray)(nodes).forEach((node) => {
|
|
7
7
|
node.addDecorators((0, utils_1.coerceArray)(decorators));
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
|
-
exports.addDecorators = addDecorators;
|
|
11
10
|
//# sourceMappingURL=add-decorators.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-decorators.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/decorators/add-decorators.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-decorators.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/decorators/add-decorators.ts"],"names":[],"mappings":";;AAIA,sCAOC;AATD,oCAAuC;AAEvC,SAAgB,aAAa,CAC3B,KAA0C,EAC1C,UAAsF;IAEtF,IAAA,mBAAW,EAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAClC,IAAI,CAAC,aAAa,CAAC,IAAA,mBAAW,EAAC,UAAU,CAAC,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { DecoratableNode, Decorator, DecoratorStructure } from 'ts-morph';
|
|
2
2
|
import type { Query } from '../utils';
|
|
3
3
|
export declare function getDecorators(declarations: DecoratableNode | DecoratableNode[], query?: Query<DecoratorStructure>): Decorator[];
|
|
4
|
-
export declare const getAllDecorators: (
|
|
4
|
+
export declare const getAllDecorators: (query?: (Partial<{
|
|
5
5
|
leadingTrivia?: string | string[] | undefined;
|
|
6
6
|
trailingTrivia?: string | string[] | undefined;
|
|
7
7
|
name: string | string[];
|
|
8
8
|
arguments?: string | string[] | undefined;
|
|
9
9
|
typeArguments?: string | string[] | undefined;
|
|
10
|
-
}>
|
|
10
|
+
}> & {
|
|
11
|
+
pattern?: import("../utils").Pattern;
|
|
12
|
+
}) | undefined) => Decorator[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAllDecorators =
|
|
3
|
+
exports.getAllDecorators = void 0;
|
|
4
|
+
exports.getDecorators = getDecorators;
|
|
4
5
|
const accessors_1 = require("../accessors");
|
|
5
6
|
const classes_1 = require("../classes");
|
|
6
7
|
const constructors_1 = require("../constructors");
|
|
@@ -14,9 +15,8 @@ function getDecorators(declarations, query) {
|
|
|
14
15
|
.flat()
|
|
15
16
|
.filter((decorator) => (0, utils_1.matchQuery)(decorator.getStructure(), query));
|
|
16
17
|
}
|
|
17
|
-
exports.getDecorators = getDecorators;
|
|
18
18
|
exports.getAllDecorators = (0, utils_1.getDeclarationGetter)((pattern) => {
|
|
19
|
-
const classes = (0, classes_1.getClasses)(pattern);
|
|
19
|
+
const classes = (0, classes_1.getClasses)({ pattern });
|
|
20
20
|
const methods = (0, methods_1.getMethods)(classes);
|
|
21
21
|
const constructors = (0, constructors_1.getConstructors)(classes);
|
|
22
22
|
const properties = (0, properties_1.getClassProperties)(classes);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-decorators.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/decorators/get-decorators.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"get-decorators.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/decorators/get-decorators.ts"],"names":[],"mappings":";;;AAWA,sCAQC;AAjBD,4CAA4C;AAC5C,wCAAwC;AACxC,kDAAkD;AAClD,wCAAwC;AACxC,sCAAsC;AACtC,8CAAmD;AAEnD,oCAAyE;AAEzE,SAAgB,aAAa,CAC3B,YAAiD,EACjD,KAAiC;IAEjC,OAAO,IAAA,mBAAW,EAAC,YAAY,CAAC;SAC7B,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC;SACjD,IAAI,EAAE;SACN,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,IAAA,kBAAU,EAAC,SAAS,CAAC,YAAY,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;AACxE,CAAC;AAEY,QAAA,gBAAgB,GAAG,IAAA,4BAAoB,EAAY,CAAC,OAAO,EAAE,EAAE;IAC1E,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IACxC,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,OAAO,CAAC,CAAC;IACpC,MAAM,YAAY,GAAG,IAAA,8BAAe,EAAC,OAAO,CAAC,CAAC;IAC9C,MAAM,UAAU,GAAG,IAAA,+BAAkB,EAAC,OAAO,CAAC,CAAC;IAC/C,MAAM,iBAAiB,GAAG,IAAA,kBAAS,EAAC,YAAY,CAAC,CAAC;IAClD,MAAM,YAAY,GAAG,IAAA,kBAAS,EAAC,OAAO,CAAC,CAAC;IACxC,MAAM,SAAS,GAAG,IAAA,wBAAY,EAAC,OAAO,CAAC,CAAC;IAExC,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,YAAY,EAAE,SAAS,CAAC;SAC9E,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;SAClD,IAAI,EAAE,CAAC;AACZ,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EnumDeclaration } from 'ts-morph';
|
|
2
|
-
export declare const getEnums: (
|
|
2
|
+
export declare const getEnums: (query?: (Partial<{
|
|
3
3
|
leadingTrivia?: string | string[] | undefined;
|
|
4
4
|
trailingTrivia?: string | string[] | undefined;
|
|
5
5
|
docs?: string | string[] | undefined;
|
|
@@ -9,4 +9,6 @@ export declare const getEnums: (pattern: import("../utils").Pattern, query?: Par
|
|
|
9
9
|
isExported?: boolean | boolean[] | undefined;
|
|
10
10
|
isDefaultExport?: boolean | boolean[] | undefined;
|
|
11
11
|
members?: undefined;
|
|
12
|
-
}>
|
|
12
|
+
}> & {
|
|
13
|
+
pattern?: import("../utils").Pattern;
|
|
14
|
+
}) | undefined) => EnumDeclaration[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExportDeclaration } from 'ts-morph';
|
|
2
|
-
export declare const getExports: (
|
|
2
|
+
export declare const getExports: (query?: (Partial<{
|
|
3
3
|
leadingTrivia?: string | string[] | undefined;
|
|
4
4
|
trailingTrivia?: string | string[] | undefined;
|
|
5
5
|
isTypeOnly?: boolean | boolean[] | undefined;
|
|
@@ -7,4 +7,6 @@ export declare const getExports: (pattern: import("../utils").Pattern, query?: P
|
|
|
7
7
|
namedExports?: string | string[] | undefined;
|
|
8
8
|
moduleSpecifier?: string | string[] | undefined;
|
|
9
9
|
attributes?: undefined;
|
|
10
|
-
}>
|
|
10
|
+
}> & {
|
|
11
|
+
pattern?: import("../utils").Pattern;
|
|
12
|
+
}) | undefined) => ExportDeclaration[];
|
|
@@ -1,93 +1,92 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.fileSystem = fileSystem;
|
|
4
|
+
exports.deleteFile = deleteFile;
|
|
5
|
+
exports.deleteFileSync = deleteFileSync;
|
|
6
|
+
exports.readDir = readDir;
|
|
7
|
+
exports.readDirSync = readDirSync;
|
|
8
|
+
exports.readFile = readFile;
|
|
9
|
+
exports.readFileSync = readFileSync;
|
|
10
|
+
exports.writeFile = writeFile;
|
|
11
|
+
exports.writeFileSync = writeFileSync;
|
|
12
|
+
exports.mkdir = mkdir;
|
|
13
|
+
exports.mkdirSync = mkdirSync;
|
|
14
|
+
exports.move = move;
|
|
15
|
+
exports.moveSync = moveSync;
|
|
16
|
+
exports.copy = copy;
|
|
17
|
+
exports.copySync = copySync;
|
|
18
|
+
exports.fileExists = fileExists;
|
|
19
|
+
exports.fileExistsSync = fileExistsSync;
|
|
20
|
+
exports.directoryExists = directoryExists;
|
|
21
|
+
exports.directoryExistsSync = directoryExistsSync;
|
|
22
|
+
exports.glob = glob;
|
|
23
|
+
exports.globSync = globSync;
|
|
4
24
|
const tslib_1 = require("tslib");
|
|
5
25
|
const project_1 = require("../project");
|
|
6
26
|
const utils_1 = require("../utils");
|
|
7
27
|
function fileSystem() {
|
|
8
28
|
return (0, project_1.getActiveProject)().getFileSystem();
|
|
9
29
|
}
|
|
10
|
-
exports.fileSystem = fileSystem;
|
|
11
30
|
function deleteFile(filePath) {
|
|
12
31
|
return fileSystem().delete(filePath);
|
|
13
32
|
}
|
|
14
|
-
exports.deleteFile = deleteFile;
|
|
15
33
|
function deleteFileSync(filePath) {
|
|
16
34
|
return fileSystem().deleteSync(filePath);
|
|
17
35
|
}
|
|
18
|
-
exports.deleteFileSync = deleteFileSync;
|
|
19
36
|
function readDir(dirPath) {
|
|
20
37
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
21
38
|
return fileSystem().readDirSync(dirPath);
|
|
22
39
|
});
|
|
23
40
|
}
|
|
24
|
-
exports.readDir = readDir;
|
|
25
41
|
function readDirSync(dirPath) {
|
|
26
42
|
return fileSystem().readDirSync(dirPath);
|
|
27
43
|
}
|
|
28
|
-
exports.readDirSync = readDirSync;
|
|
29
44
|
function readFile(filePath, encoding) {
|
|
30
45
|
return fileSystem().readFile(filePath, encoding);
|
|
31
46
|
}
|
|
32
|
-
exports.readFile = readFile;
|
|
33
47
|
function readFileSync(filePath, encoding) {
|
|
34
48
|
return fileSystem().readFileSync(filePath, encoding);
|
|
35
49
|
}
|
|
36
|
-
exports.readFileSync = readFileSync;
|
|
37
50
|
function writeFile(filePath, text) {
|
|
38
51
|
return fileSystem().writeFile(filePath, text);
|
|
39
52
|
}
|
|
40
|
-
exports.writeFile = writeFile;
|
|
41
53
|
function writeFileSync(filePath, text) {
|
|
42
54
|
return fileSystem().writeFileSync(filePath, text);
|
|
43
55
|
}
|
|
44
|
-
exports.writeFileSync = writeFileSync;
|
|
45
56
|
function mkdir(dirPath) {
|
|
46
57
|
return fileSystem().mkdir(dirPath);
|
|
47
58
|
}
|
|
48
|
-
exports.mkdir = mkdir;
|
|
49
59
|
function mkdirSync(dirPath) {
|
|
50
60
|
return fileSystem().mkdirSync(dirPath);
|
|
51
61
|
}
|
|
52
|
-
exports.mkdirSync = mkdirSync;
|
|
53
62
|
function move(oldFilePath, newFilePath) {
|
|
54
63
|
return fileSystem().move(oldFilePath, newFilePath);
|
|
55
64
|
}
|
|
56
|
-
exports.move = move;
|
|
57
65
|
function moveSync(oldFilePath, newFilePath) {
|
|
58
66
|
return fileSystem().moveSync(oldFilePath, newFilePath);
|
|
59
67
|
}
|
|
60
|
-
exports.moveSync = moveSync;
|
|
61
68
|
function copy(oldFilePath, newFilePath) {
|
|
62
69
|
return fileSystem().copy(oldFilePath, newFilePath);
|
|
63
70
|
}
|
|
64
|
-
exports.copy = copy;
|
|
65
71
|
function copySync(oldFilePath, newFilePath) {
|
|
66
72
|
return fileSystem().copySync(oldFilePath, newFilePath);
|
|
67
73
|
}
|
|
68
|
-
exports.copySync = copySync;
|
|
69
74
|
function fileExists(filePath) {
|
|
70
75
|
return fileSystem().fileExists(filePath);
|
|
71
76
|
}
|
|
72
|
-
exports.fileExists = fileExists;
|
|
73
77
|
function fileExistsSync(filePath) {
|
|
74
78
|
return fileSystem().fileExistsSync(filePath);
|
|
75
79
|
}
|
|
76
|
-
exports.fileExistsSync = fileExistsSync;
|
|
77
80
|
function directoryExists(dirPath) {
|
|
78
81
|
return fileSystem().directoryExists(dirPath);
|
|
79
82
|
}
|
|
80
|
-
exports.directoryExists = directoryExists;
|
|
81
83
|
function directoryExistsSync(dirPath) {
|
|
82
84
|
return fileSystem().directoryExistsSync(dirPath);
|
|
83
85
|
}
|
|
84
|
-
exports.directoryExistsSync = directoryExistsSync;
|
|
85
86
|
function glob(pattern) {
|
|
86
87
|
return fileSystem().glob((0, utils_1.coerceArray)(pattern));
|
|
87
88
|
}
|
|
88
|
-
exports.glob = glob;
|
|
89
89
|
function globSync(pattern) {
|
|
90
90
|
return fileSystem().globSync((0, utils_1.coerceArray)(pattern));
|
|
91
91
|
}
|
|
92
|
-
exports.globSync = globSync;
|
|
93
92
|
//# sourceMappingURL=file-system.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-system.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/fs/file-system.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-system.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/fs/file-system.ts"],"names":[],"mappings":";;AAKA,gCAEC;AAED,gCAEC;AAED,wCAEC;AAED,0BAEC;AAED,kCAEC;AAED,4BAEC;AAED,oCAEC;AAED,8BAEC;AAED,sCAEC;AAED,sBAEC;AAED,8BAEC;AAED,oBAEC;AAED,4BAEC;AAED,oBAEC;AAED,4BAEC;AAED,gCAEC;AAED,wCAEC;AAED,0CAEC;AAED,kDAEC;AAED,oBAEC;AAED,4BAEC;;AArFD,wCAA8C;AAC9C,oCAAuC;AAEvC,SAAgB,UAAU;IACxB,OAAO,IAAA,0BAAgB,GAAE,CAAC,aAAa,EAAE,CAAC;AAC5C,CAAC;AAED,SAAgB,UAAU,CAAC,QAAgB;IACzC,OAAO,UAAU,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AACvC,CAAC;AAED,SAAgB,cAAc,CAAC,QAAgB;IAC7C,OAAO,UAAU,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC3C,CAAC;AAED,SAAsB,OAAO,CAAC,OAAe;;QAC3C,OAAO,UAAU,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC;CAAA;AAED,SAAgB,WAAW,CAAC,OAAe;IACzC,OAAO,UAAU,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AAC3C,CAAC;AAED,SAAgB,QAAQ,CAAC,QAAgB,EAAE,QAAiB;IAC1D,OAAO,UAAU,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACnD,CAAC;AAED,SAAgB,YAAY,CAAC,QAAgB,EAAE,QAAiB;IAC9D,OAAO,UAAU,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACvD,CAAC;AAED,SAAgB,SAAS,CAAC,QAAgB,EAAE,IAAY;IACtD,OAAO,UAAU,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAChD,CAAC;AAED,SAAgB,aAAa,CAAC,QAAgB,EAAE,IAAY;IAC1D,OAAO,UAAU,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AACpD,CAAC;AAED,SAAgB,KAAK,CAAC,OAAe;IACnC,OAAO,UAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC;AAED,SAAgB,SAAS,CAAC,OAAe;IACvC,OAAO,UAAU,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AACzC,CAAC;AAED,SAAgB,IAAI,CAAC,WAAmB,EAAE,WAAmB;IAC3D,OAAO,UAAU,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AACrD,CAAC;AAED,SAAgB,QAAQ,CAAC,WAAmB,EAAE,WAAmB;IAC/D,OAAO,UAAU,EAAE,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AACzD,CAAC;AAED,SAAgB,IAAI,CAAC,WAAmB,EAAE,WAAmB;IAC3D,OAAO,UAAU,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AACrD,CAAC;AAED,SAAgB,QAAQ,CAAC,WAAmB,EAAE,WAAmB;IAC/D,OAAO,UAAU,EAAE,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AACzD,CAAC;AAED,SAAgB,UAAU,CAAC,QAAgB;IACzC,OAAO,UAAU,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC3C,CAAC;AAED,SAAgB,cAAc,CAAC,QAAgB;IAC7C,OAAO,UAAU,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;AAC/C,CAAC;AAED,SAAgB,eAAe,CAAC,OAAe;IAC7C,OAAO,UAAU,EAAE,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;AAC/C,CAAC;AAED,SAAgB,mBAAmB,CAAC,OAAe;IACjD,OAAO,UAAU,EAAE,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;AACnD,CAAC;AAED,SAAgB,IAAI,CAAC,OAA0B;IAC7C,OAAO,UAAU,EAAE,CAAC,IAAI,CAAC,IAAA,mBAAW,EAAC,OAAO,CAAC,CAAC,CAAC;AACjD,CAAC;AAED,SAAgB,QAAQ,CAAC,OAA0B;IACjD,OAAO,UAAU,EAAE,CAAC,QAAQ,CAAC,IAAA,mBAAW,EAAC,OAAO,CAAC,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FunctionDeclaration } from 'ts-morph';
|
|
2
|
-
export declare const getFunctions: (
|
|
2
|
+
export declare const getFunctions: (query?: (Partial<{
|
|
3
3
|
leadingTrivia?: string | string[] | undefined;
|
|
4
4
|
trailingTrivia?: string | string[] | undefined;
|
|
5
5
|
statements?: string | string[] | undefined;
|
|
@@ -14,4 +14,6 @@ export declare const getFunctions: (pattern: import("../utils").Pattern, query?:
|
|
|
14
14
|
isGenerator?: boolean | boolean[] | undefined;
|
|
15
15
|
isExported?: boolean | boolean[] | undefined;
|
|
16
16
|
isDefaultExport?: boolean | boolean[] | undefined;
|
|
17
|
-
}>
|
|
17
|
+
}> & {
|
|
18
|
+
pattern?: import("../utils").Pattern;
|
|
19
|
+
}) | undefined) => FunctionDeclaration[];
|
package/src/lib/helpers/match.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* The code was sourced from: https://github.com/sindresorhus/multimatch/blob/main/index.js
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.match =
|
|
19
|
+
exports.match = match;
|
|
20
20
|
const minimatch_1 = require("minimatch");
|
|
21
21
|
function match(list, patterns, options) {
|
|
22
22
|
list = [list].flat();
|
|
@@ -37,5 +37,4 @@ function match(list, patterns, options) {
|
|
|
37
37
|
}
|
|
38
38
|
return result;
|
|
39
39
|
}
|
|
40
|
-
exports.match = match;
|
|
41
40
|
//# sourceMappingURL=match.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/helpers/match.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG
|
|
1
|
+
{"version":3,"file":"match.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/helpers/match.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAIH,sBA2BC;AA7BD,yCAAwD;AAExD,SAAgB,KAAK,CACnB,IAAgC,EAChC,QAAoC,EACpC,OAA0B;IAE1B,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;IACrB,QAAQ,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;IAE7B,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/C,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,IAAI,MAAM,GAAa,EAAE,CAAC;IAC1B,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE,CAAC;QACxB,KAAK,IAAI,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC7B,IAAI,OAAO,GAAG,CAAC,GAAa,EAAE,OAAiB,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAExE,IAAI,OAAO,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;gBACvB,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBAC3B,OAAO,GAAG,CAAC,GAAa,EAAE,OAAiB,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;YAC1F,CAAC;YAED,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,qBAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;QACtE,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getImportRefs =
|
|
3
|
+
exports.getImportRefs = getImportRefs;
|
|
4
4
|
const ts_morph_1 = require("ts-morph");
|
|
5
5
|
const utils_1 = require("../utils");
|
|
6
6
|
function getImportRefs(imports) {
|
|
7
7
|
const importNames = (0, utils_1.coerceArray)(imports).map((imp) => imp.getName());
|
|
8
8
|
return (0, utils_1.coerceArray)(imports)
|
|
9
|
+
.filter((imp) => ts_morph_1.Node.isIdentifier(imp.getNameNode()))
|
|
9
10
|
.flatMap((imp) => imp.getNameNode().findReferencesAsNodes())
|
|
10
11
|
.filter((node) => {
|
|
11
12
|
const parent = node.getParent();
|
|
@@ -15,5 +16,4 @@ function getImportRefs(imports) {
|
|
|
15
16
|
return true;
|
|
16
17
|
});
|
|
17
18
|
}
|
|
18
|
-
exports.getImportRefs = getImportRefs;
|
|
19
19
|
//# sourceMappingURL=get-import-refs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-import-refs.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/imports/get-import-refs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-import-refs.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/imports/get-import-refs.ts"],"names":[],"mappings":";;AAIA,sCAeC;AAnBD,uCAA6D;AAE7D,oCAAuC;AAEvC,SAAgB,aAAa,CAAC,OAA4C;IACxE,MAAM,WAAW,GAAG,IAAA,mBAAW,EAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IAErE,OAAO,IAAA,mBAAW,EAAC,OAAO,CAAC;SACxB,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,eAAI,CAAC,YAAY,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;SACrD,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAE,GAAG,CAAC,WAAW,EAAiB,CAAC,qBAAqB,EAAE,CAAC;SAC3E,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;QACf,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QAEhC,IAAI,MAAM,IAAI,eAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,CAAC;YAC7C,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QACjD,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ImportDeclaration } from 'ts-morph';
|
|
2
|
-
export declare const getImports: (
|
|
2
|
+
export declare const getImports: (query?: (Partial<{
|
|
3
3
|
leadingTrivia?: string | string[] | undefined;
|
|
4
4
|
trailingTrivia?: string | string[] | undefined;
|
|
5
5
|
isTypeOnly?: boolean | boolean[] | undefined;
|
|
@@ -8,4 +8,6 @@ export declare const getImports: (pattern: import("../utils").Pattern, query?: P
|
|
|
8
8
|
defaultImport?: string | string[] | undefined;
|
|
9
9
|
namespaceImport?: string | string[] | undefined;
|
|
10
10
|
namedImports?: string | string[] | undefined;
|
|
11
|
-
}>
|
|
11
|
+
}> & {
|
|
12
|
+
pattern?: import("../utils").Pattern;
|
|
13
|
+
}) | undefined) => ImportDeclaration[];
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getNamedImports =
|
|
3
|
+
exports.getNamedImports = getNamedImports;
|
|
4
4
|
const utils_1 = require("../utils");
|
|
5
5
|
function getNamedImports(imports, query) {
|
|
6
6
|
return (0, utils_1.coerceArray)(imports)
|
|
7
7
|
.flatMap((imp) => imp.getNamedImports())
|
|
8
8
|
.filter((named) => (0, utils_1.matchQuery)(named.getStructure(), query));
|
|
9
9
|
}
|
|
10
|
-
exports.getNamedImports = getNamedImports;
|
|
11
10
|
//# sourceMappingURL=get-named-imports.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-named-imports.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/imports/get-named-imports.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-named-imports.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/imports/get-named-imports.ts"],"names":[],"mappings":";;AAIA,0CAOC;AATD,oCAA+D;AAE/D,SAAgB,eAAe,CAC7B,OAAgD,EAChD,KAAqD;IAErD,OAAO,IAAA,mBAAW,EAAC,OAAO,CAAC;SACxB,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC;SACvC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,kBAAU,EAAC,KAAK,CAAC,YAAY,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InterfaceDeclaration } from 'ts-morph';
|
|
2
|
-
export declare const getInterfaces: (
|
|
2
|
+
export declare const getInterfaces: (query?: (Partial<{
|
|
3
3
|
leadingTrivia?: string | string[] | undefined;
|
|
4
4
|
trailingTrivia?: string | string[] | undefined;
|
|
5
5
|
typeParameters?: string | string[] | undefined;
|
|
@@ -16,4 +16,6 @@ export declare const getInterfaces: (pattern: import("../utils").Pattern, query?
|
|
|
16
16
|
callSignatures?: undefined;
|
|
17
17
|
constructSignatures?: undefined;
|
|
18
18
|
indexSignatures?: undefined;
|
|
19
|
-
}>
|
|
19
|
+
}> & {
|
|
20
|
+
pattern?: import("../utils").Pattern;
|
|
21
|
+
}) | undefined) => InterfaceDeclaration[];
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addMethods =
|
|
3
|
+
exports.addMethods = addMethods;
|
|
4
4
|
const utils_1 = require("../utils");
|
|
5
5
|
function addMethods(classes, methods) {
|
|
6
6
|
(0, utils_1.coerceArray)(classes).forEach((klass) => {
|
|
7
7
|
klass.addMethods((0, utils_1.coerceArray)(methods));
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
|
-
exports.addMethods = addMethods;
|
|
11
10
|
//# sourceMappingURL=add-methods.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-methods.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/methods/add-methods.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-methods.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/methods/add-methods.ts"],"names":[],"mappings":";;AASA,gCAYC;AAdD,oCAAuC;AAEvC,SAAgB,UAAU,CACxB,OAGqD,EACrD,OAE4C;IAE5C,IAAA,mBAAW,EAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACrC,KAAK,CAAC,UAAU,CAAC,IAAA,mBAAW,EAAC,OAAO,CAAC,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getClassMethods = getClassMethods;
|
|
4
|
+
exports.getObjectMethods = getObjectMethods;
|
|
5
|
+
exports.getMethods = getMethods;
|
|
4
6
|
const ts_morph_1 = require("ts-morph");
|
|
5
7
|
const utils_1 = require("../utils");
|
|
6
8
|
function getClassMethods(classes, query) {
|
|
@@ -9,7 +11,6 @@ function getClassMethods(classes, query) {
|
|
|
9
11
|
.flat()
|
|
10
12
|
.filter((method) => !method.isOverload() && (0, utils_1.matchQuery)(method.getStructure(), query));
|
|
11
13
|
}
|
|
12
|
-
exports.getClassMethods = getClassMethods;
|
|
13
14
|
function getObjectMethods(objects, query) {
|
|
14
15
|
const methods = (0, utils_1.coerceArray)(objects)
|
|
15
16
|
.map((object) => object.getProperties())
|
|
@@ -17,7 +18,6 @@ function getObjectMethods(objects, query) {
|
|
|
17
18
|
.filter((accessor) => ts_morph_1.Node.isMethodDeclaration(accessor));
|
|
18
19
|
return methods.filter((method) => !method.isOverload() && (0, utils_1.matchQuery)(method.getStructure(), query));
|
|
19
20
|
}
|
|
20
|
-
exports.getObjectMethods = getObjectMethods;
|
|
21
21
|
function getMethods(classes, query) {
|
|
22
22
|
return (0, utils_1.coerceArray)(classes)
|
|
23
23
|
.map((klass) => {
|
|
@@ -28,5 +28,4 @@ function getMethods(classes, query) {
|
|
|
28
28
|
})
|
|
29
29
|
.flat();
|
|
30
30
|
}
|
|
31
|
-
exports.getMethods = getMethods;
|
|
32
31
|
//# sourceMappingURL=get-methods.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-methods.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/methods/get-methods.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-methods.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/methods/get-methods.ts"],"names":[],"mappings":";;AAWA,0CAQC;AAED,4CAYC;AAED,gCAgBC;AAnDD,uCAMkB;AAGlB,oCAAmD;AAEnD,SAAgB,eAAe,CAC7B,OAA8C,EAC9C,KAAyC;IAEzC,OAAO,IAAA,mBAAW,EAAC,OAAO,CAAC;SACxB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;SAClC,IAAI,EAAE;SACN,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,IAAA,kBAAU,EAAC,MAAM,CAAC,YAAY,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;AAC1F,CAAC;AAED,SAAgB,gBAAgB,CAC9B,OAA4D,EAC5D,KAAyC;IAEzC,MAAM,OAAO,GAAG,IAAA,mBAAW,EAAC,OAAO,CAAC;SACjC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC;SACvC,IAAI,EAAE;SACN,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,eAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAwB,CAAC;IAEnF,OAAO,OAAO,CAAC,MAAM,CACnB,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,IAAA,kBAAU,EAAC,MAAM,CAAC,YAAY,EAAE,EAAE,KAAK,CAAC,CAC7E,CAAC;AACJ,CAAC;AAED,SAAgB,UAAU,CACxB,OAGqD,EACrD,KAAyC;IAEzC,OAAO,IAAA,mBAAW,EAAC,OAAO,CAAC;SACxB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACb,IAAI,eAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC;YACnC,OAAO,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACvC,CAAC;QAED,OAAO,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACxC,CAAC,CAAC;SACD,IAAI,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addParams =
|
|
3
|
+
exports.addParams = addParams;
|
|
4
4
|
const utils_1 = require("../utils");
|
|
5
5
|
function addParams(functionsLike, params) {
|
|
6
6
|
(0, utils_1.coerceArray)(functionsLike).forEach((functionLike) => {
|
|
7
7
|
functionLike.addParameters((0, utils_1.coerceArray)(params));
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
|
-
exports.addParams = addParams;
|
|
11
10
|
//# sourceMappingURL=add-params.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-params.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/params/add-params.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-params.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/params/add-params.ts"],"names":[],"mappings":";;AAQA,8BASC;AAXD,oCAAuC;AAEvC,SAAgB,SAAS,CACvB,aAAkE,EAClE,MAE+C;IAE/C,IAAA,mBAAW,EAAC,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,EAAE;QAClD,YAAY,CAAC,aAAa,CAAC,IAAA,mBAAW,EAAC,MAAM,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getParams =
|
|
3
|
+
exports.getParams = getParams;
|
|
4
4
|
const utils_1 = require("../utils");
|
|
5
5
|
function getParams(functionsLike, query) {
|
|
6
6
|
return (0, utils_1.coerceArray)(functionsLike)
|
|
@@ -8,5 +8,4 @@ function getParams(functionsLike, query) {
|
|
|
8
8
|
.flat()
|
|
9
9
|
.filter((param) => (0, utils_1.matchQuery)(param.getStructure(), query));
|
|
10
10
|
}
|
|
11
|
-
exports.getParams = getParams;
|
|
12
11
|
//# sourceMappingURL=get-params.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-params.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/params/get-params.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-params.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/params/get-params.ts"],"names":[],"mappings":";;AASA,8BAQC;AAVD,oCAAmD;AAEnD,SAAgB,SAAS,CACvB,aAAkE,EAClE,KAA4C;IAE5C,OAAO,IAAA,mBAAW,EAAC,aAAa,CAAC;SAC9B,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,YAAY,CAAC,aAAa,EAAE,CAAC;SACnD,IAAI,EAAE;SACN,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,kBAAU,EAAC,KAAK,CAAC,YAAY,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FileSystemHost, Project, ProjectOptions } from 'ts-morph';
|
|
2
2
|
import { Pattern } from '../utils';
|
|
3
|
+
export declare function setActiveProject(project: Project | null): Project | null;
|
|
3
4
|
export declare function getActiveProject(): Project;
|
|
4
5
|
export declare function resetActiveProject(): Project | null;
|
|
5
6
|
export declare function createProject(fileSystem?: FileSystemHost, options?: Omit<ProjectOptions, 'fileSystem'>): Project;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.setActiveProject = setActiveProject;
|
|
4
|
+
exports.getActiveProject = getActiveProject;
|
|
5
|
+
exports.resetActiveProject = resetActiveProject;
|
|
6
|
+
exports.createProject = createProject;
|
|
7
|
+
exports.saveActiveProjectAsync = saveActiveProjectAsync;
|
|
8
|
+
exports.saveProject = saveProject;
|
|
9
|
+
exports.addSourceFiles = addSourceFiles;
|
|
4
10
|
const tslib_1 = require("tslib");
|
|
5
11
|
const ts_morph_1 = require("ts-morph");
|
|
6
12
|
let prevProject = null;
|
|
@@ -15,29 +21,23 @@ function getActiveProject() {
|
|
|
15
21
|
}
|
|
16
22
|
return prevProject;
|
|
17
23
|
}
|
|
18
|
-
exports.getActiveProject = getActiveProject;
|
|
19
24
|
function resetActiveProject() {
|
|
20
25
|
return setActiveProject(null);
|
|
21
26
|
}
|
|
22
|
-
exports.resetActiveProject = resetActiveProject;
|
|
23
27
|
function createProject(fileSystem, options) {
|
|
24
28
|
const project = new ts_morph_1.Project(Object.assign({ fileSystem }, options));
|
|
25
29
|
setActiveProject(project);
|
|
26
30
|
return project;
|
|
27
31
|
}
|
|
28
|
-
exports.createProject = createProject;
|
|
29
32
|
function saveActiveProjectAsync() {
|
|
30
33
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
31
34
|
yield getActiveProject().save();
|
|
32
35
|
});
|
|
33
36
|
}
|
|
34
|
-
exports.saveActiveProjectAsync = saveActiveProjectAsync;
|
|
35
37
|
function saveProject() {
|
|
36
38
|
getActiveProject().saveSync();
|
|
37
39
|
}
|
|
38
|
-
exports.saveProject = saveProject;
|
|
39
40
|
function addSourceFiles(paths) {
|
|
40
41
|
getActiveProject().addSourceFilesAtPaths(paths);
|
|
41
42
|
}
|
|
42
|
-
exports.addSourceFiles = addSourceFiles;
|
|
43
43
|
//# sourceMappingURL=project.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/project/project.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/project/project.ts"],"names":[],"mappings":";;AAMA,4CAMC;AAED,4CAMC;AAED,gDAEC;AAED,sCASC;AAED,wDAEC;AAED,kCAEC;AAED,wCAEC;;AA/CD,uCAAmE;AAInE,IAAI,WAAW,GAAmB,IAAI,CAAC;AAEvC,SAAgB,gBAAgB,CAAC,OAAuB;IACtD,MAAM,IAAI,GAAG,WAAW,CAAC;IAEzB,WAAW,GAAG,OAAO,CAAC;IAEtB,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,gBAAgB;IAC9B,IAAI,WAAW,KAAK,IAAI,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,SAAgB,kBAAkB;IAChC,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;AAED,SAAgB,aAAa,CAC3B,UAA2B,EAC3B,OAA4C;IAE5C,MAAM,OAAO,GAAG,IAAI,kBAAO,iBAAG,UAAU,IAAK,OAAO,EAAG,CAAC;IAExD,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAE1B,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAsB,sBAAsB;;QAC1C,MAAM,gBAAgB,EAAE,CAAC,IAAI,EAAE,CAAC;IAClC,CAAC;CAAA;AAED,SAAgB,WAAW;IACzB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,CAAC;AAChC,CAAC;AAED,SAAgB,cAAc,CAAC,KAAc;IAC3C,gBAAgB,EAAE,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addClassProperties =
|
|
3
|
+
exports.addClassProperties = addClassProperties;
|
|
4
4
|
const utils_1 = require("../utils");
|
|
5
5
|
function addClassProperties(classes, properties) {
|
|
6
6
|
(0, utils_1.coerceArray)(classes).forEach((klass) => {
|
|
7
7
|
klass.addProperties((0, utils_1.coerceArray)(properties));
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
|
-
exports.addClassProperties = addClassProperties;
|
|
11
10
|
//# sourceMappingURL=add-class-properties.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-class-properties.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/properties/add-class-properties.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-class-properties.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/properties/add-class-properties.ts"],"names":[],"mappings":";;AAIA,gDASC;AAXD,oCAAuC;AAEvC,SAAgB,kBAAkB,CAChC,OAA8C,EAC9C,UAE8C;IAE9C,IAAA,mBAAW,EAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACrC,KAAK,CAAC,aAAa,CAAC,IAAA,mBAAW,EAAC,UAAU,CAAC,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addObjectProperty =
|
|
3
|
+
exports.addObjectProperty = addObjectProperty;
|
|
4
4
|
const ts_morph_1 = require("ts-morph");
|
|
5
5
|
const utils_1 = require("../utils");
|
|
6
6
|
function addObjectProperty(obj, properties) {
|
|
@@ -8,5 +8,4 @@ function addObjectProperty(obj, properties) {
|
|
|
8
8
|
object.addProperties((0, utils_1.coerceArray)(properties).map((property) => (Object.assign(Object.assign({}, property), { kind: ts_morph_1.StructureKind.PropertyAssignment }))));
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
|
-
exports.addObjectProperty = addObjectProperty;
|
|
12
11
|
//# sourceMappingURL=add-object-property.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-object-property.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/properties/add-object-property.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-object-property.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/properties/add-object-property.ts"],"names":[],"mappings":";;AASA,8CAcC;AAvBD,uCAKkB;AAElB,oCAAuC;AAEvC,SAAgB,iBAAiB,CAC/B,GAAwD,EACxD,UAE6C;IAE7C,IAAA,mBAAW,EAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QAClC,MAAM,CAAC,aAAa,CAClB,IAAA,mBAAW,EAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,iCACrC,QAAQ,KACX,IAAI,EAAE,wBAAa,CAAC,kBAAkB,IACtC,CAAC,CACJ,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getClassProperties =
|
|
3
|
+
exports.getClassProperties = getClassProperties;
|
|
4
4
|
const utils_1 = require("../utils");
|
|
5
5
|
function getClassProperties(classes, query) {
|
|
6
6
|
return (0, utils_1.coerceArray)(classes)
|
|
@@ -8,5 +8,4 @@ function getClassProperties(classes, query) {
|
|
|
8
8
|
.flat()
|
|
9
9
|
.filter((method) => (0, utils_1.matchQuery)(method.getStructure(), query));
|
|
10
10
|
}
|
|
11
|
-
exports.getClassProperties = getClassProperties;
|
|
12
11
|
//# sourceMappingURL=get-class-properties.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-class-properties.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/properties/get-class-properties.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-class-properties.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/properties/get-class-properties.ts"],"names":[],"mappings":";;AAKA,gDAQC;AAVD,oCAAmD;AAEnD,SAAgB,kBAAkB,CAChC,OAAgB,EAChB,KAA2C;IAE3C,OAAO,IAAA,mBAAW,EAAC,OAAO,CAAC;SACxB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;SACrC,IAAI,EAAE;SACN,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAA,kBAAU,EAAC,MAAM,CAAC,YAAY,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getObjectProperties =
|
|
3
|
+
exports.getObjectProperties = getObjectProperties;
|
|
4
4
|
const ts_morph_1 = require("ts-morph");
|
|
5
5
|
const utils_1 = require("../utils");
|
|
6
6
|
function getObjectProperties(objs, query) {
|
|
@@ -10,5 +10,4 @@ function getObjectProperties(objs, query) {
|
|
|
10
10
|
.filter((property) => ts_morph_1.Node.isPropertyAssignment(property))
|
|
11
11
|
.filter((method) => (0, utils_1.matchQuery)(method.getStructure(), query));
|
|
12
12
|
}
|
|
13
|
-
exports.getObjectProperties = getObjectProperties;
|
|
14
13
|
//# sourceMappingURL=get-object-properties.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-object-properties.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/properties/get-object-properties.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-object-properties.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/properties/get-object-properties.ts"],"names":[],"mappings":";;AAUA,kDASC;AAnBD,uCAKkB;AAGlB,oCAAmD;AAEnD,SAAgB,mBAAmB,CACjC,IAAa,EACb,KAA0C;IAE1C,OAAO,IAAA,mBAAW,EAAC,IAAI,CAAC;SACrB,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;SACjC,IAAI,EAAE;SACN,MAAM,CAAC,CAAC,QAAQ,EAAkC,EAAE,CAAC,eAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;SACzF,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAA,kBAAU,EAAC,MAAM,CAAC,YAAY,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createSourceFile =
|
|
3
|
+
exports.createSourceFile = createSourceFile;
|
|
4
4
|
const project_1 = require("../project");
|
|
5
5
|
function createSourceFile(filePath, content, { overwrite = false } = {}) {
|
|
6
6
|
return (0, project_1.getActiveProject)().createSourceFile(filePath, content, { overwrite });
|
|
7
7
|
}
|
|
8
|
-
exports.createSourceFile = createSourceFile;
|
|
9
8
|
//# sourceMappingURL=create-source-file.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-source-file.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/source-file/create-source-file.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-source-file.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/source-file/create-source-file.ts"],"names":[],"mappings":";;AAIA,4CAMC;AARD,wCAA8C;AAE9C,SAAgB,gBAAgB,CAC9B,QAAgB,EAChB,OAAgB,EAChB,EAAE,SAAS,GAAG,KAAK,KAA8B,EAAE;IAEnD,OAAO,IAAA,0BAAgB,GAAE,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getSourceFiles = getSourceFiles;
|
|
4
|
+
exports.getSourceFile = getSourceFile;
|
|
4
5
|
const project_1 = require("../project");
|
|
5
6
|
function getSourceFiles(pattern) {
|
|
6
7
|
return (0, project_1.getActiveProject)()
|
|
7
8
|
.getSourceFiles(pattern)
|
|
8
9
|
.filter((file) => !file.isFromExternalLibrary());
|
|
9
10
|
}
|
|
10
|
-
exports.getSourceFiles = getSourceFiles;
|
|
11
11
|
function getSourceFile(filePath) {
|
|
12
12
|
const file = (0, project_1.getActiveProject)().getSourceFile(filePath);
|
|
13
13
|
return file && !file.isFromExternalLibrary() ? file : null;
|
|
14
14
|
}
|
|
15
|
-
exports.getSourceFile = getSourceFile;
|
|
16
15
|
//# sourceMappingURL=get-source-files.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-source-files.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/source-file/get-source-files.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-source-files.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/source-file/get-source-files.ts"],"names":[],"mappings":";;AAKA,wCAIC;AAED,sCAIC;AAbD,wCAA8C;AAG9C,SAAgB,cAAc,CAAC,OAAiB;IAC9C,OAAO,IAAA,0BAAgB,GAAE;SACtB,cAAc,CAAC,OAAiB,CAAC;SACjC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC,CAAC;AACrD,CAAC;AAED,SAAgB,aAAa,CAAC,QAAgB;IAC5C,MAAM,IAAI,GAAG,IAAA,0BAAgB,GAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAExD,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAC7D,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.moveSourceFilePaths =
|
|
3
|
+
exports.moveSourceFilePaths = moveSourceFilePaths;
|
|
4
4
|
function moveSourceFilePaths(files, rename) {
|
|
5
5
|
files.forEach((file) => {
|
|
6
6
|
file.move(rename(file.getFilePath()));
|
|
7
7
|
});
|
|
8
8
|
}
|
|
9
|
-
exports.moveSourceFilePaths = moveSourceFilePaths;
|
|
10
9
|
//# sourceMappingURL=move-source-file-paths.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"move-source-file-paths.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/source-file/move-source-file-paths.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"move-source-file-paths.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/source-file/move-source-file-paths.ts"],"names":[],"mappings":";;AAEA,kDAIC;AAJD,SAAgB,mBAAmB,CAAC,KAAmB,EAAE,MAAgC;IACvF,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACrB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/src/lib/testing/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createTestingProject =
|
|
3
|
+
exports.createTestingProject = createTestingProject;
|
|
4
4
|
const ts_morph_1 = require("ts-morph");
|
|
5
5
|
const project_1 = require("../project");
|
|
6
6
|
function createTestingProject() {
|
|
7
7
|
return (0, project_1.createProject)(new ts_morph_1.InMemoryFileSystemHost());
|
|
8
8
|
}
|
|
9
|
-
exports.createTestingProject = createTestingProject;
|
|
10
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/testing/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/testing/index.ts"],"names":[],"mappings":";;AAIA,oDAEC;AAND,uCAA2D;AAE3D,wCAA2C;AAE3C,SAAgB,oBAAoB;IAClC,OAAO,IAAA,uBAAa,EAAC,IAAI,iCAAsB,EAAE,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TypeAliasDeclaration } from 'ts-morph';
|
|
2
|
-
export declare const getTypeAliases: (
|
|
2
|
+
export declare const getTypeAliases: (query?: (Partial<{
|
|
3
3
|
leadingTrivia?: string | string[] | undefined;
|
|
4
4
|
trailingTrivia?: string | string[] | undefined;
|
|
5
5
|
typeParameters?: string | string[] | undefined;
|
|
@@ -9,4 +9,6 @@ export declare const getTypeAliases: (pattern: import("../utils").Pattern, query
|
|
|
9
9
|
hasDeclareKeyword?: boolean | boolean[] | undefined;
|
|
10
10
|
isExported?: boolean | boolean[] | undefined;
|
|
11
11
|
isDefaultExport?: boolean | boolean[] | undefined;
|
|
12
|
-
}>
|
|
12
|
+
}> & {
|
|
13
|
+
pattern?: import("../utils").Pattern;
|
|
14
|
+
}) | undefined) => TypeAliasDeclaration[];
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.coerceArray =
|
|
3
|
+
exports.coerceArray = coerceArray;
|
|
4
4
|
function coerceArray(value) {
|
|
5
5
|
return Array.isArray(value) ? value : [value];
|
|
6
6
|
}
|
|
7
|
-
exports.coerceArray = coerceArray;
|
|
8
7
|
//# sourceMappingURL=coerce-array.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-array.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/utils/helpers/coerce-array.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"coerce-array.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/utils/helpers/coerce-array.ts"],"names":[],"mappings":";;AAAA,kCAEC;AAFD,SAAgB,WAAW,CAAI,KAAc;IAC3C,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDeclarationCreator =
|
|
3
|
+
exports.getDeclarationCreator = getDeclarationCreator;
|
|
4
4
|
const source_file_1 = require("../../source-file");
|
|
5
5
|
const coerce_array_1 = require("./coerce-array");
|
|
6
6
|
function getDeclarationCreator(common, { position = null } = {}) {
|
|
@@ -17,5 +17,4 @@ function getDeclarationCreator(common, { position = null } = {}) {
|
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
exports.getDeclarationCreator = getDeclarationCreator;
|
|
21
20
|
//# sourceMappingURL=get-declaration-creator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-declaration-creator.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/utils/helpers/get-declaration-creator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-declaration-creator.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/utils/helpers/get-declaration-creator.ts"],"names":[],"mappings":";;AASA,sDA2BC;AAlCD,mDAAmD;AAKnD,iDAA6C;AAE7C,SAAgB,qBAAqB,CAUnC,MAAuB,EAAE,EAAE,QAAQ,GAAG,IAAI,KAAmC,EAAE;IAC/E,OAAO,SAAS,eAAe,CAAC,OAAgB,EAAE,UAAmC;QACnF,MAAM,KAAK,GAAG,IAAA,4BAAc,EAAC,OAAO,CAAC,CAAC;QAEtC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACrB,MAAM,kBAAkB,GAAG,IAAA,0BAAW,EAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,iCACjE,MAAM,GACN,SAAS,EACZ,CAA0B,CAAC;YAE7B,IAAI,QAAQ,KAAK,IAAI,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;gBACtD,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;YACzC,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC;YACtD,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDeclarationEditor =
|
|
3
|
+
exports.getDeclarationEditor = getDeclarationEditor;
|
|
4
4
|
const ts_morph_1 = require("ts-morph");
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
6
|
function getDeclarationEditor() {
|
|
@@ -27,5 +27,4 @@ function getDeclarationEditor() {
|
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
exports.getDeclarationEditor = getDeclarationEditor;
|
|
31
30
|
//# sourceMappingURL=get-declaration-editor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-declaration-editor.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/utils/helpers/get-declaration-editor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-declaration-editor.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/utils/helpers/get-declaration-editor.ts"],"names":[],"mappings":";;AAQA,oDAiCC;AAzCD,uCAA2C;AAG3C,uCAA0C;AAK1C,SAAgB,oBAAoB;IAIlC,OAAO,SAAS,gBAAgB,CAC9B,YAAyC,EACzC,MAA8D;QAE9D,IAAA,mBAAW,EAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE;YAChD,6DAA6D;YAC7D,aAAa;YACb,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,YAAY,EAAE,EAAE,WAAW,CAAC,CAAC;YAE/D,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,OAAO;YACT,CAAC;YAED,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,WAAW,CAAC,YAAY,EAAE,EAAE,MAAM,CAAe,CAAC;YAEzF,4DAA4D;YAC5D,+CAA+C;YAC/C,6DAA6D;YAC7D,mBAAmB;YACnB,IAAI,oBAAS,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,eAAI,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,CAAC;gBACtE,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;gBACtC,6DAA6D;gBAC7D,kBAAkB;gBAClB,OAAO,YAAY,CAAC,IAAI,CAAC;YAC3B,CAAC;YAED,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -2,4 +2,6 @@ import type { Pattern } from '../types/pattern';
|
|
|
2
2
|
import type { StructureType } from '../types/structure-type';
|
|
3
3
|
import type { StructuredStatement } from '../types/structured-statement';
|
|
4
4
|
import type { Query } from './match-query';
|
|
5
|
-
export declare function getDeclarationGetter<Declaration extends StructuredStatement<Declaration>, Structure extends StructureType<Declaration> = StructureType<Declaration>>(getFn: (pattern: Pattern) => Declaration[]): (
|
|
5
|
+
export declare function getDeclarationGetter<Declaration extends StructuredStatement<Declaration>, Structure extends StructureType<Declaration> = StructureType<Declaration>>(getFn: (pattern: Pattern) => Declaration[]): (query?: Query<Omit<Structure, "kind">> & {
|
|
6
|
+
pattern?: Pattern;
|
|
7
|
+
}) => Declaration[];
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDeclarationGetter =
|
|
3
|
+
exports.getDeclarationGetter = getDeclarationGetter;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const match_query_1 = require("./match-query");
|
|
5
6
|
function getDeclarationGetter(getFn) {
|
|
6
|
-
return function getDeclaration(
|
|
7
|
-
|
|
7
|
+
return function getDeclaration(query) {
|
|
8
|
+
const _a = query !== null && query !== void 0 ? query : {}, { pattern } = _a, rest = tslib_1.__rest(_a, ["pattern"]);
|
|
9
|
+
return getFn(pattern !== null && pattern !== void 0 ? pattern : '**/*').filter((declaration) =>
|
|
8
10
|
// TODO: refactor it to support new typings
|
|
9
11
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
10
12
|
// @ts-ignore
|
|
11
|
-
(0, match_query_1.matchQuery)(declaration.getStructure(),
|
|
13
|
+
(0, match_query_1.matchQuery)(declaration.getStructure(), rest));
|
|
12
14
|
};
|
|
13
15
|
}
|
|
14
|
-
exports.getDeclarationGetter = getDeclarationGetter;
|
|
15
16
|
//# sourceMappingURL=get-declaration-getter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-declaration-getter.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/utils/helpers/get-declaration-getter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-declaration-getter.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/utils/helpers/get-declaration-getter.ts"],"names":[],"mappings":";;AAMA,oDAgBC;;AAlBD,+CAA2C;AAE3C,SAAgB,oBAAoB,CAGlC,KAA0C;IAC1C,OAAO,SAAS,cAAc,CAC5B,KAA8D;QAE9D,MAAM,KAAuB,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,EAAlC,EAAE,OAAO,OAAyB,EAApB,IAAI,sBAAlB,WAAoB,CAAc,CAAC;QAEzC,OAAO,KAAK,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,EAAE;QACrD,2CAA2C;QAC3C,6DAA6D;QAC7D,aAAa;QACb,IAAA,wBAAU,EAAC,WAAW,CAAC,YAAY,EAAE,EAAE,IAAI,CAAC,CAC7C,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.removeDeclarations =
|
|
3
|
+
exports.removeDeclarations = void 0;
|
|
4
|
+
exports.getDeclarationRemover = getDeclarationRemover;
|
|
4
5
|
const coerce_array_1 = require("./coerce-array");
|
|
5
6
|
function getDeclarationRemover() {
|
|
6
7
|
// tslint:disable-next-line:no-shadowed-variable
|
|
@@ -10,6 +11,5 @@ function getDeclarationRemover() {
|
|
|
10
11
|
});
|
|
11
12
|
};
|
|
12
13
|
}
|
|
13
|
-
exports.getDeclarationRemover = getDeclarationRemover;
|
|
14
14
|
exports.removeDeclarations = getDeclarationRemover();
|
|
15
15
|
//# sourceMappingURL=get-declaration-remover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-declaration-remover.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/utils/helpers/get-declaration-remover.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"get-declaration-remover.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/utils/helpers/get-declaration-remover.ts"],"names":[],"mappings":";;;AAEA,sDASC;AAXD,iDAA6C;AAE7C,SAAgB,qBAAqB;IAGnC,gDAAgD;IAChD,OAAO,SAAS,kBAAkB,CAAC,YAAqB;QACtD,IAAA,0BAAW,EAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE;YAChD,WAAW,CAAC,MAAM,EAAE,CAAC;QACvB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAEY,QAAA,kBAAkB,GAAG,qBAAqB,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.matchQuery =
|
|
3
|
+
exports.matchQuery = matchQuery;
|
|
4
4
|
const minimatch_1 = require("minimatch");
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
6
|
function isObject(value) {
|
|
@@ -28,5 +28,4 @@ function matchQuery(value, query) {
|
|
|
28
28
|
: patterns.includes(v);
|
|
29
29
|
})));
|
|
30
30
|
}
|
|
31
|
-
exports.matchQuery = matchQuery;
|
|
32
31
|
//# sourceMappingURL=match-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match-query.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/utils/helpers/match-query.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"match-query.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/utils/helpers/match-query.ts"],"names":[],"mappings":";;AAqDA,gCAmBC;AAxED,yCAAsC;AAGtC,uCAA0C;AAsC1C,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC;AACrD,CAAC;AAED,SAAS,UAAU,CAAmB,IAAqB;IACzD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3C,CAAC;AAED,SAAgB,UAAU,CAAsB,KAAQ,EAAE,KAAgB;IACxE,OAAO,CACL,CAAC,KAAK;QACN,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QAC/B,6DAA6D;QAC7D,mBAAmB;QACnB,IAAA,mBAAW,EAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aACpB,GAAG,CAAC,UAAU,CAAC;aACf,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;YACV,6DAA6D;YAC7D,mBAAmB;YACnB,MAAM,QAAQ,GAAG,IAAA,mBAAW,EAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;YAEzC,OAAO,OAAO,CAAC,KAAK,QAAQ;gBAC1B,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,IAAI,IAAA,qBAAS,EAAC,CAAC,EAAE,OAAO,CAAC,CAAC;gBAC9D,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC3B,CAAC,CAAC,CACL,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pipe =
|
|
3
|
+
exports.pipe = pipe;
|
|
4
4
|
function pipe(...fns) {
|
|
5
5
|
return (arg) => fns.reduce((acc, fn) => fn(acc), arg);
|
|
6
6
|
}
|
|
7
|
-
exports.pipe = pipe;
|
|
8
7
|
//# sourceMappingURL=pipe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipe.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/utils/helpers/pipe.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pipe.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/utils/helpers/pipe.ts"],"names":[],"mappings":";;AAgIA,oBAEC;AAFD,SAAgB,IAAI,CAAC,GAAG,GAA6B;IACnD,OAAO,CAAC,GAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;AAC7D,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.throwFileNotFound =
|
|
3
|
+
exports.throwFileNotFound = throwFileNotFound;
|
|
4
4
|
function throwFileNotFound(filePath) {
|
|
5
5
|
throw new Error(`File not found: ${filePath}`);
|
|
6
6
|
}
|
|
7
|
-
exports.throwFileNotFound = throwFileNotFound;
|
|
8
7
|
//# sourceMappingURL=throw-file-not-found.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"throw-file-not-found.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/utils/helpers/throw-file-not-found.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"throw-file-not-found.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/utils/helpers/throw-file-not-found.ts"],"names":[],"mappings":";;AAAA,8CAEC;AAFD,SAAgB,iBAAiB,CAAC,QAAgB;IAChD,MAAM,IAAI,KAAK,CAAC,mBAAmB,QAAQ,EAAE,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { VariableStatement } from 'ts-morph';
|
|
2
|
-
export declare const getVariables: (
|
|
2
|
+
export declare const getVariables: (query?: (Partial<{
|
|
3
3
|
leadingTrivia?: string | string[] | undefined;
|
|
4
4
|
trailingTrivia?: string | string[] | undefined;
|
|
5
5
|
docs?: string | string[] | undefined;
|
|
@@ -8,4 +8,6 @@ export declare const getVariables: (pattern: import("../utils").Pattern, query?:
|
|
|
8
8
|
isDefaultExport?: boolean | boolean[] | undefined;
|
|
9
9
|
declarationKind?: import("ts-morph").VariableDeclarationKind | import("ts-morph").VariableDeclarationKind[] | undefined;
|
|
10
10
|
declarations: never;
|
|
11
|
-
}>
|
|
11
|
+
}> & {
|
|
12
|
+
pattern?: import("../utils").Pattern;
|
|
13
|
+
}) | undefined) => VariableStatement[];
|