@bemoje/monorepo 1.1.1 → 1.2.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/MonoRepo.cjs +142 -0
- package/lib/MonoRepo.d.cts +10 -0
- package/lib/MonoRepo.d.ts +10 -0
- package/lib/MonoRepo.js +134 -0
- package/lib/code/AbstractCode.cjs +77 -0
- package/lib/code/AbstractCode.d.cts +30 -0
- package/lib/code/AbstractCode.d.ts +30 -0
- package/lib/code/AbstractCode.js +74 -0
- package/lib/code/CodeBlock.cjs +51 -0
- package/lib/code/CodeBlock.d.cts +22 -0
- package/lib/code/CodeBlock.d.ts +22 -0
- package/lib/code/CodeBlock.js +48 -0
- package/lib/code/TsCode.cjs +90 -0
- package/lib/code/TsCode.d.cts +10 -0
- package/lib/code/TsCode.d.ts +10 -0
- package/lib/code/TsCode.js +87 -0
- package/lib/code/imports/ImportKeywords.cjs +42 -0
- package/lib/code/imports/ImportKeywords.d.cts +10 -0
- package/lib/code/imports/ImportKeywords.d.ts +10 -0
- package/lib/code/imports/ImportKeywords.js +39 -0
- package/lib/code/imports/ImportSpecifiers.cjs +98 -0
- package/lib/code/imports/ImportSpecifiers.d.cts +10 -0
- package/lib/code/imports/ImportSpecifiers.d.ts +10 -0
- package/lib/code/imports/ImportSpecifiers.js +95 -0
- package/lib/code/imports/ImportStatement.cjs +89 -0
- package/lib/code/imports/ImportStatement.d.cts +10 -0
- package/lib/code/imports/ImportStatement.d.ts +10 -0
- package/lib/code/imports/ImportStatement.js +86 -0
- package/lib/code/imports/ModuleSpecifier.cjs +77 -0
- package/lib/code/imports/ModuleSpecifier.d.cts +10 -0
- package/lib/code/imports/ModuleSpecifier.d.ts +10 -0
- package/lib/code/imports/ModuleSpecifier.js +74 -0
- package/lib/common/AbstractBase.cjs +77 -0
- package/lib/common/AbstractBase.d.cts +3 -0
- package/lib/common/AbstractBase.d.ts +3 -0
- package/lib/common/AbstractBase.js +74 -0
- package/lib/file/File.cjs +118 -0
- package/lib/file/File.d.cts +10 -0
- package/lib/file/File.d.ts +10 -0
- package/lib/file/File.js +91 -0
- package/lib/file/TestFile.cjs +42 -0
- package/lib/file/TestFile.d.cts +10 -0
- package/lib/file/TestFile.d.ts +10 -0
- package/lib/file/TestFile.js +39 -0
- package/lib/file/TsFile.cjs +46 -0
- package/lib/file/TsFile.d.cts +10 -0
- package/lib/file/TsFile.d.ts +10 -0
- package/lib/file/TsFile.js +43 -0
- package/lib/index.cjs +215 -0
- package/lib/index.d.cts +26 -0
- package/lib/index.d.ts +26 -0
- package/lib/index.js +30 -0
- package/lib/methods/findWorkspacePackageName.cjs +17 -0
- package/lib/methods/findWorkspacePackageName.d.cts +6 -0
- package/lib/methods/findWorkspacePackageName.d.ts +6 -0
- package/lib/methods/findWorkspacePackageName.js +14 -0
- package/lib/methods/getAllImports.cjs +18 -0
- package/lib/methods/getAllImports.d.cts +17 -0
- package/lib/methods/getAllImports.d.ts +17 -0
- package/lib/methods/getAllImports.js +16 -0
- package/lib/methods/getAllWorkspacePackageJsonPaths.cjs +20 -0
- package/lib/methods/getAllWorkspacePackageJsonPaths.d.cts +6 -0
- package/lib/methods/getAllWorkspacePackageJsonPaths.d.ts +6 -0
- package/lib/methods/getAllWorkspacePackageJsonPaths.js +13 -0
- package/lib/methods/getAllWorkspacePackageJsons.cjs +20 -0
- package/lib/methods/getAllWorkspacePackageJsons.d.cts +6 -0
- package/lib/methods/getAllWorkspacePackageJsons.d.ts +6 -0
- package/lib/methods/getAllWorkspacePackageJsons.js +13 -0
- package/lib/methods/getAllWorkspacePackageNames.cjs +15 -0
- package/lib/methods/getAllWorkspacePackageNames.d.cts +6 -0
- package/lib/methods/getAllWorkspacePackageNames.d.ts +6 -0
- package/lib/methods/getAllWorkspacePackageNames.js +12 -0
- package/lib/methods/getAllWorkspacePaths.cjs +23 -0
- package/lib/methods/getAllWorkspacePaths.d.cts +6 -0
- package/lib/methods/getAllWorkspacePaths.d.ts +6 -0
- package/lib/methods/getAllWorkspacePaths.js +16 -0
- package/lib/methods/getImportsRecursively.cjs +176 -0
- package/lib/methods/getImportsRecursively.d.cts +37 -0
- package/lib/methods/getImportsRecursively.d.ts +37 -0
- package/lib/methods/getImportsRecursively.js +168 -0
- package/lib/methods/getRepoPackageJson.cjs +17 -0
- package/lib/methods/getRepoPackageJson.d.cts +6 -0
- package/lib/methods/getRepoPackageJson.d.ts +6 -0
- package/lib/methods/getRepoPackageJson.js +10 -0
- package/lib/methods/getRepoPackageJsonPath.cjs +17 -0
- package/lib/methods/getRepoPackageJsonPath.d.cts +6 -0
- package/lib/methods/getRepoPackageJsonPath.d.ts +6 -0
- package/lib/methods/getRepoPackageJsonPath.js +10 -0
- package/lib/repo/Workspace.cjs +383 -0
- package/lib/repo/Workspace.d.cts +10 -0
- package/lib/repo/Workspace.d.ts +10 -0
- package/lib/repo/Workspace.js +376 -0
- package/lib/util/SemanticExtnamePrefix.cjs +12 -0
- package/lib/util/SemanticExtnamePrefix.d.cts +14 -0
- package/lib/util/SemanticExtnamePrefix.d.ts +14 -0
- package/lib/util/SemanticExtnamePrefix.js +12 -0
- package/lib/util/SemanticExtnamePrefixDescriptions.cjs +12 -0
- package/lib/util/SemanticExtnamePrefixDescriptions.d.cts +15 -0
- package/lib/util/SemanticExtnamePrefixDescriptions.d.ts +15 -0
- package/lib/util/SemanticExtnamePrefixDescriptions.js +12 -0
- package/lib/util/SemanticExtnamePrefixes.cjs +9 -0
- package/lib/util/SemanticExtnamePrefixes.d.cts +97 -0
- package/lib/util/SemanticExtnamePrefixes.d.ts +97 -0
- package/lib/util/SemanticExtnamePrefixes.js +6 -0
- package/lib/util/getRepoRootDirpath.cjs +30 -0
- package/lib/util/getRepoRootDirpath.d.cts +6 -0
- package/lib/util/getRepoRootDirpath.d.ts +6 -0
- package/lib/util/getRepoRootDirpath.js +21 -0
- package/lib/util/getWorkspaceDirpaths.cjs +27 -0
- package/lib/util/getWorkspaceDirpaths.d.cts +6 -0
- package/lib/util/getWorkspaceDirpaths.d.ts +6 -0
- package/lib/util/getWorkspaceDirpaths.js +19 -0
- package/lib/util/hasExtnamePrefix.cjs +18 -0
- package/lib/util/hasExtnamePrefix.d.cts +38 -0
- package/lib/util/hasExtnamePrefix.d.ts +38 -0
- package/lib/util/hasExtnamePrefix.js +11 -0
- package/lib/util/resolveModuleImportPath.cjs +34 -0
- package/lib/util/resolveModuleImportPath.d.cts +8 -0
- package/lib/util/resolveModuleImportPath.d.ts +8 -0
- package/lib/util/resolveModuleImportPath.js +26 -0
- package/lib/util/semverVersionBump.cjs +28 -0
- package/lib/util/semverVersionBump.d.cts +22 -0
- package/lib/util/semverVersionBump.d.ts +22 -0
- package/lib/util/semverVersionBump.js +26 -0
- package/package.json +464 -32
- package/index.d.ts +0 -636
- package/index.mjs +0 -2321
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var composition = require('@mono/composition');
|
|
4
|
+
var TsCode = require('../code/TsCode');
|
|
5
|
+
var TsFile = require('./TsFile');
|
|
6
|
+
var decorators = require('@mono/decorators');
|
|
7
|
+
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
10
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
11
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
12
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
13
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15
|
+
}
|
|
16
|
+
__name(_ts_decorate, "_ts_decorate");
|
|
17
|
+
function _ts_metadata(k, v) {
|
|
18
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
19
|
+
}
|
|
20
|
+
__name(_ts_metadata, "_ts_metadata");
|
|
21
|
+
class TestFile extends TsFile.TsFile {
|
|
22
|
+
static {
|
|
23
|
+
__name(this, "TestFile");
|
|
24
|
+
}
|
|
25
|
+
static inspector = composition.Inspector.compose(TsFile.TsFile, {});
|
|
26
|
+
get tsCode() {
|
|
27
|
+
return new TsCode.TsCode(this, this.readFile());
|
|
28
|
+
}
|
|
29
|
+
get dependencies() {
|
|
30
|
+
return this.tsCode.dependencies;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
_ts_decorate([
|
|
34
|
+
decorators.lazyProp(5e3),
|
|
35
|
+
_ts_metadata("design:type", typeof TsCode.TsCode === "undefined" ? Object : TsCode.TsCode),
|
|
36
|
+
_ts_metadata("design:paramtypes", [])
|
|
37
|
+
], TestFile.prototype, "tsCode", null);
|
|
38
|
+
TestFile = _ts_decorate([
|
|
39
|
+
composition.Parenting.compose
|
|
40
|
+
], TestFile);
|
|
41
|
+
|
|
42
|
+
exports.TestFile = TestFile;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import '../AbstractBase-J4h6nW8k.cjs';
|
|
2
|
+
export { T as TestFile } from '../MonoRepo-BgdabVzT.cjs';
|
|
3
|
+
import 'util';
|
|
4
|
+
import 'mnemonist';
|
|
5
|
+
import '../is-never.d-CgQ1j0-8.cjs';
|
|
6
|
+
import 'typescript';
|
|
7
|
+
import 'depcheck';
|
|
8
|
+
import '../code/AbstractCode.cjs';
|
|
9
|
+
import '../code/CodeBlock.cjs';
|
|
10
|
+
import 'fs';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import '../AbstractBase-J4h6nW8k.js';
|
|
2
|
+
export { T as TestFile } from '../MonoRepo-BFFUDAYn.js';
|
|
3
|
+
import 'util';
|
|
4
|
+
import 'mnemonist';
|
|
5
|
+
import '../is-never.d-CgQ1j0-8.js';
|
|
6
|
+
import 'typescript';
|
|
7
|
+
import 'depcheck';
|
|
8
|
+
import '../code/AbstractCode.js';
|
|
9
|
+
import '../code/CodeBlock.js';
|
|
10
|
+
import 'fs';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __name } from '../chunk-SHUYVCID.js';
|
|
2
|
+
import { Inspector, Parenting } from '@mono/composition';
|
|
3
|
+
import { TsCode } from '../code/TsCode';
|
|
4
|
+
import { TsFile } from './TsFile';
|
|
5
|
+
import { lazyProp } from '@mono/decorators';
|
|
6
|
+
|
|
7
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
8
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
10
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
11
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12
|
+
}
|
|
13
|
+
__name(_ts_decorate, "_ts_decorate");
|
|
14
|
+
function _ts_metadata(k, v) {
|
|
15
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
16
|
+
}
|
|
17
|
+
__name(_ts_metadata, "_ts_metadata");
|
|
18
|
+
class TestFile extends TsFile {
|
|
19
|
+
static {
|
|
20
|
+
__name(this, "TestFile");
|
|
21
|
+
}
|
|
22
|
+
static inspector = Inspector.compose(TsFile, {});
|
|
23
|
+
get tsCode() {
|
|
24
|
+
return new TsCode(this, this.readFile());
|
|
25
|
+
}
|
|
26
|
+
get dependencies() {
|
|
27
|
+
return this.tsCode.dependencies;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
_ts_decorate([
|
|
31
|
+
lazyProp(5e3),
|
|
32
|
+
_ts_metadata("design:type", typeof TsCode === "undefined" ? Object : TsCode),
|
|
33
|
+
_ts_metadata("design:paramtypes", [])
|
|
34
|
+
], TestFile.prototype, "tsCode", null);
|
|
35
|
+
TestFile = _ts_decorate([
|
|
36
|
+
Parenting.compose
|
|
37
|
+
], TestFile);
|
|
38
|
+
|
|
39
|
+
export { TestFile };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var File = require('./File');
|
|
4
|
+
var composition = require('@mono/composition');
|
|
5
|
+
var TsCode = require('../code/TsCode');
|
|
6
|
+
var decorators = require('@mono/decorators');
|
|
7
|
+
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
10
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
11
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
12
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
13
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15
|
+
}
|
|
16
|
+
__name(_ts_decorate, "_ts_decorate");
|
|
17
|
+
function _ts_metadata(k, v) {
|
|
18
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
19
|
+
}
|
|
20
|
+
__name(_ts_metadata, "_ts_metadata");
|
|
21
|
+
class TsFile extends File.File {
|
|
22
|
+
static {
|
|
23
|
+
__name(this, "TsFile");
|
|
24
|
+
}
|
|
25
|
+
static inspector = composition.Inspector.compose(TsFile, {
|
|
26
|
+
keys: [
|
|
27
|
+
"tsCode"
|
|
28
|
+
]
|
|
29
|
+
});
|
|
30
|
+
get tsCode() {
|
|
31
|
+
return new TsCode.TsCode(this, this.readFile());
|
|
32
|
+
}
|
|
33
|
+
get dependencies() {
|
|
34
|
+
return this.tsCode.dependencies;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
_ts_decorate([
|
|
38
|
+
decorators.lazyProp(5e3),
|
|
39
|
+
_ts_metadata("design:type", typeof TsCode.TsCode === "undefined" ? Object : TsCode.TsCode),
|
|
40
|
+
_ts_metadata("design:paramtypes", [])
|
|
41
|
+
], TsFile.prototype, "tsCode", null);
|
|
42
|
+
TsFile = _ts_decorate([
|
|
43
|
+
composition.Parenting.compose
|
|
44
|
+
], TsFile);
|
|
45
|
+
|
|
46
|
+
exports.TsFile = TsFile;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import '../AbstractBase-J4h6nW8k.cjs';
|
|
2
|
+
export { f as TsFile } from '../MonoRepo-BgdabVzT.cjs';
|
|
3
|
+
import 'util';
|
|
4
|
+
import 'mnemonist';
|
|
5
|
+
import '../is-never.d-CgQ1j0-8.cjs';
|
|
6
|
+
import 'typescript';
|
|
7
|
+
import 'depcheck';
|
|
8
|
+
import '../code/AbstractCode.cjs';
|
|
9
|
+
import '../code/CodeBlock.cjs';
|
|
10
|
+
import 'fs';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import '../AbstractBase-J4h6nW8k.js';
|
|
2
|
+
export { f as TsFile } from '../MonoRepo-BFFUDAYn.js';
|
|
3
|
+
import 'util';
|
|
4
|
+
import 'mnemonist';
|
|
5
|
+
import '../is-never.d-CgQ1j0-8.js';
|
|
6
|
+
import 'typescript';
|
|
7
|
+
import 'depcheck';
|
|
8
|
+
import '../code/AbstractCode.js';
|
|
9
|
+
import '../code/CodeBlock.js';
|
|
10
|
+
import 'fs';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { __name } from '../chunk-SHUYVCID.js';
|
|
2
|
+
import { File } from './File';
|
|
3
|
+
import { Inspector, Parenting } from '@mono/composition';
|
|
4
|
+
import { TsCode } from '../code/TsCode';
|
|
5
|
+
import { lazyProp } from '@mono/decorators';
|
|
6
|
+
|
|
7
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
8
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
10
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
11
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12
|
+
}
|
|
13
|
+
__name(_ts_decorate, "_ts_decorate");
|
|
14
|
+
function _ts_metadata(k, v) {
|
|
15
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
16
|
+
}
|
|
17
|
+
__name(_ts_metadata, "_ts_metadata");
|
|
18
|
+
class TsFile extends File {
|
|
19
|
+
static {
|
|
20
|
+
__name(this, "TsFile");
|
|
21
|
+
}
|
|
22
|
+
static inspector = Inspector.compose(TsFile, {
|
|
23
|
+
keys: [
|
|
24
|
+
"tsCode"
|
|
25
|
+
]
|
|
26
|
+
});
|
|
27
|
+
get tsCode() {
|
|
28
|
+
return new TsCode(this, this.readFile());
|
|
29
|
+
}
|
|
30
|
+
get dependencies() {
|
|
31
|
+
return this.tsCode.dependencies;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
_ts_decorate([
|
|
35
|
+
lazyProp(5e3),
|
|
36
|
+
_ts_metadata("design:type", typeof TsCode === "undefined" ? Object : TsCode),
|
|
37
|
+
_ts_metadata("design:paramtypes", [])
|
|
38
|
+
], TsFile.prototype, "tsCode", null);
|
|
39
|
+
TsFile = _ts_decorate([
|
|
40
|
+
Parenting.compose
|
|
41
|
+
], TsFile);
|
|
42
|
+
|
|
43
|
+
export { TsFile };
|
package/lib/index.cjs
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var MonoRepo = require('./MonoRepo');
|
|
4
|
+
var AbstractCode = require('./code/AbstractCode');
|
|
5
|
+
var CodeBlock = require('./code/CodeBlock');
|
|
6
|
+
var TsCode = require('./code/TsCode');
|
|
7
|
+
var ImportKeywords = require('./code/imports/ImportKeywords');
|
|
8
|
+
var ImportSpecifiers = require('./code/imports/ImportSpecifiers');
|
|
9
|
+
var ImportStatement = require('./code/imports/ImportStatement');
|
|
10
|
+
var ModuleSpecifier = require('./code/imports/ModuleSpecifier');
|
|
11
|
+
var AbstractBase = require('./common/AbstractBase');
|
|
12
|
+
var File = require('./file/File');
|
|
13
|
+
var TestFile = require('./file/TestFile');
|
|
14
|
+
var TsFile = require('./file/TsFile');
|
|
15
|
+
var findWorkspacePackageName = require('./methods/findWorkspacePackageName');
|
|
16
|
+
var getAllImports = require('./methods/getAllImports');
|
|
17
|
+
var getAllWorkspacePackageJsonPaths = require('./methods/getAllWorkspacePackageJsonPaths');
|
|
18
|
+
var getAllWorkspacePackageJsons = require('./methods/getAllWorkspacePackageJsons');
|
|
19
|
+
var getAllWorkspacePackageNames = require('./methods/getAllWorkspacePackageNames');
|
|
20
|
+
var getAllWorkspacePaths = require('./methods/getAllWorkspacePaths');
|
|
21
|
+
var getImportsRecursively = require('./methods/getImportsRecursively');
|
|
22
|
+
var getRepoPackageJson = require('./methods/getRepoPackageJson');
|
|
23
|
+
var getRepoPackageJsonPath = require('./methods/getRepoPackageJsonPath');
|
|
24
|
+
var Workspace = require('./repo/Workspace');
|
|
25
|
+
var SemanticExtnamePrefix = require('./util/SemanticExtnamePrefix');
|
|
26
|
+
var SemanticExtnamePrefixDescriptions = require('./util/SemanticExtnamePrefixDescriptions');
|
|
27
|
+
var SemanticExtnamePrefixes = require('./util/SemanticExtnamePrefixes');
|
|
28
|
+
var getRepoRootDirpath = require('./util/getRepoRootDirpath');
|
|
29
|
+
var getWorkspaceDirpaths = require('./util/getWorkspaceDirpaths');
|
|
30
|
+
var hasExtnamePrefix = require('./util/hasExtnamePrefix');
|
|
31
|
+
var resolveModuleImportPath = require('./util/resolveModuleImportPath');
|
|
32
|
+
var semverVersionBump = require('./util/semverVersionBump');
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
Object.keys(MonoRepo).forEach(function (k) {
|
|
37
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () { return MonoRepo[k]; }
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
Object.keys(AbstractCode).forEach(function (k) {
|
|
43
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () { return AbstractCode[k]; }
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
Object.keys(CodeBlock).forEach(function (k) {
|
|
49
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function () { return CodeBlock[k]; }
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
Object.keys(TsCode).forEach(function (k) {
|
|
55
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function () { return TsCode[k]; }
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
Object.keys(ImportKeywords).forEach(function (k) {
|
|
61
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: function () { return ImportKeywords[k]; }
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
Object.keys(ImportSpecifiers).forEach(function (k) {
|
|
67
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: function () { return ImportSpecifiers[k]; }
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
Object.keys(ImportStatement).forEach(function (k) {
|
|
73
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
get: function () { return ImportStatement[k]; }
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
Object.keys(ModuleSpecifier).forEach(function (k) {
|
|
79
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
80
|
+
enumerable: true,
|
|
81
|
+
get: function () { return ModuleSpecifier[k]; }
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
Object.keys(AbstractBase).forEach(function (k) {
|
|
85
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
86
|
+
enumerable: true,
|
|
87
|
+
get: function () { return AbstractBase[k]; }
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
Object.keys(File).forEach(function (k) {
|
|
91
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
92
|
+
enumerable: true,
|
|
93
|
+
get: function () { return File[k]; }
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
Object.keys(TestFile).forEach(function (k) {
|
|
97
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
98
|
+
enumerable: true,
|
|
99
|
+
get: function () { return TestFile[k]; }
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
Object.keys(TsFile).forEach(function (k) {
|
|
103
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: function () { return TsFile[k]; }
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
Object.keys(findWorkspacePackageName).forEach(function (k) {
|
|
109
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
get: function () { return findWorkspacePackageName[k]; }
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
Object.keys(getAllImports).forEach(function (k) {
|
|
115
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
116
|
+
enumerable: true,
|
|
117
|
+
get: function () { return getAllImports[k]; }
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
Object.keys(getAllWorkspacePackageJsonPaths).forEach(function (k) {
|
|
121
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
122
|
+
enumerable: true,
|
|
123
|
+
get: function () { return getAllWorkspacePackageJsonPaths[k]; }
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
Object.keys(getAllWorkspacePackageJsons).forEach(function (k) {
|
|
127
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
128
|
+
enumerable: true,
|
|
129
|
+
get: function () { return getAllWorkspacePackageJsons[k]; }
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
Object.keys(getAllWorkspacePackageNames).forEach(function (k) {
|
|
133
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
134
|
+
enumerable: true,
|
|
135
|
+
get: function () { return getAllWorkspacePackageNames[k]; }
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
Object.keys(getAllWorkspacePaths).forEach(function (k) {
|
|
139
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
140
|
+
enumerable: true,
|
|
141
|
+
get: function () { return getAllWorkspacePaths[k]; }
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
Object.keys(getImportsRecursively).forEach(function (k) {
|
|
145
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
146
|
+
enumerable: true,
|
|
147
|
+
get: function () { return getImportsRecursively[k]; }
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
Object.keys(getRepoPackageJson).forEach(function (k) {
|
|
151
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
152
|
+
enumerable: true,
|
|
153
|
+
get: function () { return getRepoPackageJson[k]; }
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
Object.keys(getRepoPackageJsonPath).forEach(function (k) {
|
|
157
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
158
|
+
enumerable: true,
|
|
159
|
+
get: function () { return getRepoPackageJsonPath[k]; }
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
Object.keys(Workspace).forEach(function (k) {
|
|
163
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
164
|
+
enumerable: true,
|
|
165
|
+
get: function () { return Workspace[k]; }
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
Object.keys(SemanticExtnamePrefix).forEach(function (k) {
|
|
169
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
170
|
+
enumerable: true,
|
|
171
|
+
get: function () { return SemanticExtnamePrefix[k]; }
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
Object.keys(SemanticExtnamePrefixDescriptions).forEach(function (k) {
|
|
175
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
176
|
+
enumerable: true,
|
|
177
|
+
get: function () { return SemanticExtnamePrefixDescriptions[k]; }
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
Object.keys(SemanticExtnamePrefixes).forEach(function (k) {
|
|
181
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
182
|
+
enumerable: true,
|
|
183
|
+
get: function () { return SemanticExtnamePrefixes[k]; }
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
Object.keys(getRepoRootDirpath).forEach(function (k) {
|
|
187
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
188
|
+
enumerable: true,
|
|
189
|
+
get: function () { return getRepoRootDirpath[k]; }
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
Object.keys(getWorkspaceDirpaths).forEach(function (k) {
|
|
193
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
194
|
+
enumerable: true,
|
|
195
|
+
get: function () { return getWorkspaceDirpaths[k]; }
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
Object.keys(hasExtnamePrefix).forEach(function (k) {
|
|
199
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
200
|
+
enumerable: true,
|
|
201
|
+
get: function () { return hasExtnamePrefix[k]; }
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
Object.keys(resolveModuleImportPath).forEach(function (k) {
|
|
205
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
206
|
+
enumerable: true,
|
|
207
|
+
get: function () { return resolveModuleImportPath[k]; }
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
Object.keys(semverVersionBump).forEach(function (k) {
|
|
211
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
212
|
+
enumerable: true,
|
|
213
|
+
get: function () { return semverVersionBump[k]; }
|
|
214
|
+
});
|
|
215
|
+
});
|
package/lib/index.d.cts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export { F as File, I as ImportKeywords, a as ImportSpecifiers, b as ImportStatement, c as IncorrectlyImportedRepoWorkspace, M as ModuleSpecifier, d as MonoRepo, T as TestFile, e as TsCode, f as TsFile, W as Workspace, g as WorkspaceDependencyProblems } from './MonoRepo-BgdabVzT.cjs';
|
|
2
|
+
export { AbstractCode } from './code/AbstractCode.cjs';
|
|
3
|
+
export { CodeBlock } from './code/CodeBlock.cjs';
|
|
4
|
+
export { A as AbstractBase } from './AbstractBase-J4h6nW8k.cjs';
|
|
5
|
+
export { findWorkspacePackageName } from './methods/findWorkspacePackageName.cjs';
|
|
6
|
+
export { getAllImports } from './methods/getAllImports.cjs';
|
|
7
|
+
export { getAllWorkspacePackageJsonPaths } from './methods/getAllWorkspacePackageJsonPaths.cjs';
|
|
8
|
+
export { getAllWorkspacePackageJsons } from './methods/getAllWorkspacePackageJsons.cjs';
|
|
9
|
+
export { getAllWorkspacePackageNames } from './methods/getAllWorkspacePackageNames.cjs';
|
|
10
|
+
export { getAllWorkspacePaths } from './methods/getAllWorkspacePaths.cjs';
|
|
11
|
+
export { getImportsRecursively } from './methods/getImportsRecursively.cjs';
|
|
12
|
+
export { getRepoPackageJson } from './methods/getRepoPackageJson.cjs';
|
|
13
|
+
export { getRepoPackageJsonPath } from './methods/getRepoPackageJsonPath.cjs';
|
|
14
|
+
export { SemanticExtnamePrefix } from './util/SemanticExtnamePrefix.cjs';
|
|
15
|
+
export { SemanticExtnamePrefixDescriptions } from './util/SemanticExtnamePrefixDescriptions.cjs';
|
|
16
|
+
export { getRepoRootDirpath } from './util/getRepoRootDirpath.cjs';
|
|
17
|
+
export { getWorkspaceDirpaths } from './util/getWorkspaceDirpaths.cjs';
|
|
18
|
+
export { hasExtnamePrefix } from './util/hasExtnamePrefix.cjs';
|
|
19
|
+
export { resolveModuleImportPath } from './util/resolveModuleImportPath.cjs';
|
|
20
|
+
export { semverVersionBump } from './util/semverVersionBump.cjs';
|
|
21
|
+
import './is-never.d-CgQ1j0-8.cjs';
|
|
22
|
+
import 'typescript';
|
|
23
|
+
import 'depcheck';
|
|
24
|
+
import 'fs';
|
|
25
|
+
import 'util';
|
|
26
|
+
import 'mnemonist';
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export { F as File, I as ImportKeywords, a as ImportSpecifiers, b as ImportStatement, c as IncorrectlyImportedRepoWorkspace, M as ModuleSpecifier, d as MonoRepo, T as TestFile, e as TsCode, f as TsFile, W as Workspace, g as WorkspaceDependencyProblems } from './MonoRepo-BFFUDAYn.js';
|
|
2
|
+
export { AbstractCode } from './code/AbstractCode.js';
|
|
3
|
+
export { CodeBlock } from './code/CodeBlock.js';
|
|
4
|
+
export { A as AbstractBase } from './AbstractBase-J4h6nW8k.js';
|
|
5
|
+
export { findWorkspacePackageName } from './methods/findWorkspacePackageName.js';
|
|
6
|
+
export { getAllImports } from './methods/getAllImports.js';
|
|
7
|
+
export { getAllWorkspacePackageJsonPaths } from './methods/getAllWorkspacePackageJsonPaths.js';
|
|
8
|
+
export { getAllWorkspacePackageJsons } from './methods/getAllWorkspacePackageJsons.js';
|
|
9
|
+
export { getAllWorkspacePackageNames } from './methods/getAllWorkspacePackageNames.js';
|
|
10
|
+
export { getAllWorkspacePaths } from './methods/getAllWorkspacePaths.js';
|
|
11
|
+
export { getImportsRecursively } from './methods/getImportsRecursively.js';
|
|
12
|
+
export { getRepoPackageJson } from './methods/getRepoPackageJson.js';
|
|
13
|
+
export { getRepoPackageJsonPath } from './methods/getRepoPackageJsonPath.js';
|
|
14
|
+
export { SemanticExtnamePrefix } from './util/SemanticExtnamePrefix.js';
|
|
15
|
+
export { SemanticExtnamePrefixDescriptions } from './util/SemanticExtnamePrefixDescriptions.js';
|
|
16
|
+
export { getRepoRootDirpath } from './util/getRepoRootDirpath.js';
|
|
17
|
+
export { getWorkspaceDirpaths } from './util/getWorkspaceDirpaths.js';
|
|
18
|
+
export { hasExtnamePrefix } from './util/hasExtnamePrefix.js';
|
|
19
|
+
export { resolveModuleImportPath } from './util/resolveModuleImportPath.js';
|
|
20
|
+
export { semverVersionBump } from './util/semverVersionBump.js';
|
|
21
|
+
import './is-never.d-CgQ1j0-8.js';
|
|
22
|
+
import 'typescript';
|
|
23
|
+
import 'depcheck';
|
|
24
|
+
import 'fs';
|
|
25
|
+
import 'util';
|
|
26
|
+
import 'mnemonist';
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export * from './MonoRepo';
|
|
2
|
+
export * from './code/AbstractCode';
|
|
3
|
+
export * from './code/CodeBlock';
|
|
4
|
+
export * from './code/TsCode';
|
|
5
|
+
export * from './code/imports/ImportKeywords';
|
|
6
|
+
export * from './code/imports/ImportSpecifiers';
|
|
7
|
+
export * from './code/imports/ImportStatement';
|
|
8
|
+
export * from './code/imports/ModuleSpecifier';
|
|
9
|
+
export * from './common/AbstractBase';
|
|
10
|
+
export * from './file/File';
|
|
11
|
+
export * from './file/TestFile';
|
|
12
|
+
export * from './file/TsFile';
|
|
13
|
+
export * from './methods/findWorkspacePackageName';
|
|
14
|
+
export * from './methods/getAllImports';
|
|
15
|
+
export * from './methods/getAllWorkspacePackageJsonPaths';
|
|
16
|
+
export * from './methods/getAllWorkspacePackageJsons';
|
|
17
|
+
export * from './methods/getAllWorkspacePackageNames';
|
|
18
|
+
export * from './methods/getAllWorkspacePaths';
|
|
19
|
+
export * from './methods/getImportsRecursively';
|
|
20
|
+
export * from './methods/getRepoPackageJson';
|
|
21
|
+
export * from './methods/getRepoPackageJsonPath';
|
|
22
|
+
export * from './repo/Workspace';
|
|
23
|
+
export * from './util/SemanticExtnamePrefix';
|
|
24
|
+
export * from './util/SemanticExtnamePrefixDescriptions';
|
|
25
|
+
export * from './util/SemanticExtnamePrefixes';
|
|
26
|
+
export * from './util/getRepoRootDirpath';
|
|
27
|
+
export * from './util/getWorkspaceDirpaths';
|
|
28
|
+
export * from './util/hasExtnamePrefix';
|
|
29
|
+
export * from './util/resolveModuleImportPath';
|
|
30
|
+
export * from './util/semverVersionBump';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var getAllWorkspacePackageNames = require('./getAllWorkspacePackageNames');
|
|
4
|
+
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
async function findWorkspacePackageName(name) {
|
|
8
|
+
const wsPkgNames = await getAllWorkspacePackageNames.getAllWorkspacePackageNames();
|
|
9
|
+
return wsPkgNames.find((n) => {
|
|
10
|
+
return n === name;
|
|
11
|
+
}) || wsPkgNames.find((n) => {
|
|
12
|
+
return n === `@mono/${name}`;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
__name(findWorkspacePackageName, "findWorkspacePackageName");
|
|
16
|
+
|
|
17
|
+
exports.findWorkspacePackageName = findWorkspacePackageName;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { __name } from '../chunk-SHUYVCID.js';
|
|
2
|
+
import { getAllWorkspacePackageNames } from './getAllWorkspacePackageNames';
|
|
3
|
+
|
|
4
|
+
async function findWorkspacePackageName(name) {
|
|
5
|
+
const wsPkgNames = await getAllWorkspacePackageNames();
|
|
6
|
+
return wsPkgNames.find((n) => {
|
|
7
|
+
return n === name;
|
|
8
|
+
}) || wsPkgNames.find((n) => {
|
|
9
|
+
return n === `@mono/${name}`;
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
__name(findWorkspacePackageName, "findWorkspacePackageName");
|
|
13
|
+
|
|
14
|
+
export { findWorkspacePackageName };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
+
function getAllImports(repo) {
|
|
6
|
+
return repo.workspaces.flatMap((ws) => {
|
|
7
|
+
return ws.tsFiles.filter((ts) => {
|
|
8
|
+
return ts.isSourceFile;
|
|
9
|
+
}).flatMap((ts) => {
|
|
10
|
+
return ts.tsCode.imports.flatMap((imp) => {
|
|
11
|
+
return imp;
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
__name(getAllImports, "getAllImports");
|
|
17
|
+
|
|
18
|
+
exports.getAllImports = getAllImports;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { d as MonoRepo, b as ImportStatement, e as TsCode, f as TsFile, W as Workspace } from '../MonoRepo-BgdabVzT.cjs';
|
|
2
|
+
import '../AbstractBase-J4h6nW8k.cjs';
|
|
3
|
+
import '../is-never.d-CgQ1j0-8.cjs';
|
|
4
|
+
import 'typescript';
|
|
5
|
+
import 'depcheck';
|
|
6
|
+
import '../code/AbstractCode.cjs';
|
|
7
|
+
import '../code/CodeBlock.cjs';
|
|
8
|
+
import 'fs';
|
|
9
|
+
import 'util';
|
|
10
|
+
import 'mnemonist';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves all import statements from TypeScript source files across all workspaces in the monorepo.
|
|
14
|
+
*/
|
|
15
|
+
declare function getAllImports(repo: MonoRepo): ImportStatement<TsCode<TsFile<Workspace<MonoRepo<null>>>>>[];
|
|
16
|
+
|
|
17
|
+
export { getAllImports };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { d as MonoRepo, b as ImportStatement, e as TsCode, f as TsFile, W as Workspace } from '../MonoRepo-BFFUDAYn.js';
|
|
2
|
+
import '../AbstractBase-J4h6nW8k.js';
|
|
3
|
+
import '../is-never.d-CgQ1j0-8.js';
|
|
4
|
+
import 'typescript';
|
|
5
|
+
import 'depcheck';
|
|
6
|
+
import '../code/AbstractCode.js';
|
|
7
|
+
import '../code/CodeBlock.js';
|
|
8
|
+
import 'fs';
|
|
9
|
+
import 'util';
|
|
10
|
+
import 'mnemonist';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves all import statements from TypeScript source files across all workspaces in the monorepo.
|
|
14
|
+
*/
|
|
15
|
+
declare function getAllImports(repo: MonoRepo): ImportStatement<TsCode<TsFile<Workspace<MonoRepo<null>>>>>[];
|
|
16
|
+
|
|
17
|
+
export { getAllImports };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { __name } from '../chunk-SHUYVCID.js';
|
|
2
|
+
|
|
3
|
+
function getAllImports(repo) {
|
|
4
|
+
return repo.workspaces.flatMap((ws) => {
|
|
5
|
+
return ws.tsFiles.filter((ts) => {
|
|
6
|
+
return ts.isSourceFile;
|
|
7
|
+
}).flatMap((ts) => {
|
|
8
|
+
return ts.tsCode.imports.flatMap((imp) => {
|
|
9
|
+
return imp;
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
__name(getAllImports, "getAllImports");
|
|
15
|
+
|
|
16
|
+
export { getAllImports };
|