@bemoje/monorepo 1.2.1 → 1.2.2
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/index.cjs +19 -5219
- package/lib/index.d.cts +2765 -26
- package/lib/index.d.ts +2765 -26
- package/lib/index.js +14 -5217
- package/package.json +178 -298
- package/lib/MonoRepo.cjs +0 -7370
- package/lib/MonoRepo.d.cts +0 -10
- package/lib/MonoRepo.d.ts +0 -10
- package/lib/MonoRepo.js +0 -7361
- package/lib/code/AbstractCode.cjs +0 -5568
- package/lib/code/AbstractCode.d.cts +0 -30
- package/lib/code/AbstractCode.d.ts +0 -30
- package/lib/code/AbstractCode.js +0 -5562
- package/lib/code/CodeBlock.cjs +0 -5614
- package/lib/code/CodeBlock.d.cts +0 -22
- package/lib/code/CodeBlock.d.ts +0 -22
- package/lib/code/CodeBlock.js +0 -5608
- package/lib/code/TsCode.cjs +0 -7370
- package/lib/code/TsCode.d.cts +0 -10
- package/lib/code/TsCode.d.ts +0 -10
- package/lib/code/TsCode.js +0 -7361
- package/lib/code/imports/ImportKeywords.cjs +0 -5652
- package/lib/code/imports/ImportKeywords.d.cts +0 -10
- package/lib/code/imports/ImportKeywords.d.ts +0 -10
- package/lib/code/imports/ImportKeywords.js +0 -5646
- package/lib/code/imports/ImportSpecifiers.cjs +0 -5708
- package/lib/code/imports/ImportSpecifiers.d.cts +0 -10
- package/lib/code/imports/ImportSpecifiers.d.ts +0 -10
- package/lib/code/imports/ImportSpecifiers.js +0 -5702
- package/lib/code/imports/ImportStatement.cjs +0 -7372
- package/lib/code/imports/ImportStatement.d.cts +0 -10
- package/lib/code/imports/ImportStatement.d.ts +0 -10
- package/lib/code/imports/ImportStatement.js +0 -7363
- package/lib/code/imports/ModuleSpecifier.cjs +0 -7372
- package/lib/code/imports/ModuleSpecifier.d.cts +0 -10
- package/lib/code/imports/ModuleSpecifier.d.ts +0 -10
- package/lib/code/imports/ModuleSpecifier.js +0 -7363
- package/lib/common/AbstractBase.cjs +0 -638
- package/lib/common/AbstractBase.d.cts +0 -3
- package/lib/common/AbstractBase.d.ts +0 -3
- package/lib/common/AbstractBase.js +0 -634
- package/lib/file/File.cjs +0 -5496
- package/lib/file/File.d.cts +0 -10
- package/lib/file/File.d.ts +0 -10
- package/lib/file/File.js +0 -5490
- package/lib/file/TestFile.cjs +0 -7368
- package/lib/file/TestFile.d.cts +0 -10
- package/lib/file/TestFile.d.ts +0 -10
- package/lib/file/TestFile.js +0 -7359
- package/lib/file/TsFile.cjs +0 -7368
- package/lib/file/TsFile.d.cts +0 -10
- package/lib/file/TsFile.d.ts +0 -10
- package/lib/file/TsFile.js +0 -7359
- package/lib/methods/findWorkspacePackageName.cjs +0 -86
- package/lib/methods/findWorkspacePackageName.d.cts +0 -6
- package/lib/methods/findWorkspacePackageName.d.ts +0 -6
- package/lib/methods/findWorkspacePackageName.js +0 -78
- package/lib/methods/getAllImports.cjs +0 -20
- package/lib/methods/getAllImports.d.cts +0 -17
- package/lib/methods/getAllImports.d.ts +0 -17
- package/lib/methods/getAllImports.js +0 -18
- package/lib/methods/getAllWorkspacePackageJsonPaths.cjs +0 -57
- package/lib/methods/getAllWorkspacePackageJsonPaths.d.cts +0 -6
- package/lib/methods/getAllWorkspacePackageJsonPaths.d.ts +0 -6
- package/lib/methods/getAllWorkspacePackageJsonPaths.js +0 -49
- package/lib/methods/getAllWorkspacePackageJsons.cjs +0 -66
- package/lib/methods/getAllWorkspacePackageJsons.d.cts +0 -6
- package/lib/methods/getAllWorkspacePackageJsons.d.ts +0 -6
- package/lib/methods/getAllWorkspacePackageJsons.js +0 -58
- package/lib/methods/getAllWorkspacePackageNames.cjs +0 -75
- package/lib/methods/getAllWorkspacePackageNames.d.cts +0 -6
- package/lib/methods/getAllWorkspacePackageNames.d.ts +0 -6
- package/lib/methods/getAllWorkspacePackageNames.js +0 -67
- package/lib/methods/getAllWorkspacePaths.cjs +0 -50
- package/lib/methods/getAllWorkspacePaths.d.cts +0 -6
- package/lib/methods/getAllWorkspacePaths.d.ts +0 -6
- package/lib/methods/getAllWorkspacePaths.js +0 -42
- package/lib/methods/getImportsRecursively.cjs +0 -7577
- package/lib/methods/getImportsRecursively.d.cts +0 -37
- package/lib/methods/getImportsRecursively.d.ts +0 -37
- package/lib/methods/getImportsRecursively.js +0 -7566
- package/lib/methods/getRepoPackageJson.cjs +0 -40
- package/lib/methods/getRepoPackageJson.d.cts +0 -6
- package/lib/methods/getRepoPackageJson.d.ts +0 -6
- package/lib/methods/getRepoPackageJson.js +0 -32
- package/lib/methods/getRepoPackageJsonPath.cjs +0 -34
- package/lib/methods/getRepoPackageJsonPath.d.cts +0 -6
- package/lib/methods/getRepoPackageJsonPath.d.ts +0 -6
- package/lib/methods/getRepoPackageJsonPath.js +0 -26
- package/lib/repo/Workspace.cjs +0 -7370
- package/lib/repo/Workspace.d.cts +0 -10
- package/lib/repo/Workspace.d.ts +0 -10
- package/lib/repo/Workspace.js +0 -7361
- package/lib/util/SemanticExtnamePrefix.cjs +0 -13
- package/lib/util/SemanticExtnamePrefix.d.cts +0 -14
- package/lib/util/SemanticExtnamePrefix.d.ts +0 -14
- package/lib/util/SemanticExtnamePrefix.js +0 -11
- package/lib/util/SemanticExtnamePrefixDescriptions.cjs +0 -13
- package/lib/util/SemanticExtnamePrefixDescriptions.d.cts +0 -15
- package/lib/util/SemanticExtnamePrefixDescriptions.d.ts +0 -15
- package/lib/util/SemanticExtnamePrefixDescriptions.js +0 -11
- package/lib/util/SemanticExtnamePrefixes.cjs +0 -18
- package/lib/util/SemanticExtnamePrefixes.d.cts +0 -97
- package/lib/util/SemanticExtnamePrefixes.d.ts +0 -97
- package/lib/util/SemanticExtnamePrefixes.js +0 -14
- package/lib/util/getRepoRootDirpath.cjs +0 -30
- package/lib/util/getRepoRootDirpath.d.cts +0 -6
- package/lib/util/getRepoRootDirpath.d.ts +0 -6
- package/lib/util/getRepoRootDirpath.js +0 -22
- package/lib/util/getWorkspaceDirpaths.cjs +0 -42
- package/lib/util/getWorkspaceDirpaths.d.cts +0 -6
- package/lib/util/getWorkspaceDirpaths.d.ts +0 -6
- package/lib/util/getWorkspaceDirpaths.js +0 -34
- package/lib/util/hasExtnamePrefix.cjs +0 -27
- package/lib/util/hasExtnamePrefix.d.cts +0 -38
- package/lib/util/hasExtnamePrefix.d.ts +0 -38
- package/lib/util/hasExtnamePrefix.js +0 -25
- package/lib/util/resolveModuleImportPath.cjs +0 -51
- package/lib/util/resolveModuleImportPath.d.cts +0 -8
- package/lib/util/resolveModuleImportPath.d.ts +0 -8
- package/lib/util/resolveModuleImportPath.js +0 -42
- package/lib/util/semverVersionBump.cjs +0 -30
- package/lib/util/semverVersionBump.d.cts +0 -22
- package/lib/util/semverVersionBump.d.ts +0 -22
- package/lib/util/semverVersionBump.js +0 -28
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var fs = require('fs-extra');
|
|
4
|
-
var onetime = require('onetime');
|
|
5
|
-
var path = require('upath');
|
|
6
|
-
var glob = require('glob');
|
|
7
|
-
|
|
8
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
|
|
10
|
-
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
11
|
-
var onetime__default = /*#__PURE__*/_interopDefault(onetime);
|
|
12
|
-
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
13
|
-
|
|
14
|
-
var __defProp = Object.defineProperty;
|
|
15
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
16
|
-
var getRepoRootDirpath = onetime__default.default(/* @__PURE__ */ __name(function getRepoRootDirpath2() {
|
|
17
|
-
return (/* @__PURE__ */ __name(function recurse(dirpath = process.cwd()) {
|
|
18
|
-
dirpath = path__default.default.normalizeSafe(dirpath);
|
|
19
|
-
const pkgpath = path__default.default.joinSafe(dirpath, "package.json");
|
|
20
|
-
if (fs__default.default.existsSync(pkgpath) && fs__default.default.readJsonSync(pkgpath)?.workspaces) {
|
|
21
|
-
return dirpath;
|
|
22
|
-
}
|
|
23
|
-
const parent = path__default.default.dirname(dirpath);
|
|
24
|
-
if (parent !== dirpath) {
|
|
25
|
-
return recurse(parent);
|
|
26
|
-
}
|
|
27
|
-
throw new Error(`Could not find repo root from process.cwd(): ${process.cwd()}`);
|
|
28
|
-
}, "recurse"))();
|
|
29
|
-
}, "getRepoRootDirpath"));
|
|
30
|
-
function getRepoPackageJsonPath() {
|
|
31
|
-
return path__default.default.joinSafe(getRepoRootDirpath(), "package.json");
|
|
32
|
-
}
|
|
33
|
-
__name(getRepoPackageJsonPath, "getRepoPackageJsonPath");
|
|
34
|
-
|
|
35
|
-
// src/methods/getRepoPackageJson.ts
|
|
36
|
-
async function getRepoPackageJson() {
|
|
37
|
-
return await fs__default.default.readJson(getRepoPackageJsonPath());
|
|
38
|
-
}
|
|
39
|
-
__name(getRepoPackageJson, "getRepoPackageJson");
|
|
40
|
-
async function getAllWorkspacePaths() {
|
|
41
|
-
const pkg = await getRepoPackageJson();
|
|
42
|
-
return (await Promise.all(pkg.workspaces.map((pattern) => {
|
|
43
|
-
return glob.glob(pattern);
|
|
44
|
-
}))).flat().map((fp) => {
|
|
45
|
-
return path__default.default.normalizeSafe(fp);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
__name(getAllWorkspacePaths, "getAllWorkspacePaths");
|
|
49
|
-
async function getAllWorkspacePackageJsonPaths() {
|
|
50
|
-
const paths = await getAllWorkspacePaths();
|
|
51
|
-
return paths.map((p) => {
|
|
52
|
-
return path__default.default.join(p, "package.json");
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
__name(getAllWorkspacePackageJsonPaths, "getAllWorkspacePackageJsonPaths");
|
|
56
|
-
|
|
57
|
-
// src/methods/getAllWorkspacePackageJsons.ts
|
|
58
|
-
async function getAllWorkspacePackageJsons() {
|
|
59
|
-
const paths = await getAllWorkspacePackageJsonPaths();
|
|
60
|
-
return paths.map((p) => {
|
|
61
|
-
return fs__default.default.readJsonSync(p);
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
__name(getAllWorkspacePackageJsons, "getAllWorkspacePackageJsons");
|
|
65
|
-
|
|
66
|
-
// src/methods/getAllWorkspacePackageNames.ts
|
|
67
|
-
async function getAllWorkspacePackageNames() {
|
|
68
|
-
const pkgs = await getAllWorkspacePackageJsons();
|
|
69
|
-
return pkgs.map((p) => {
|
|
70
|
-
return p.name;
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
__name(getAllWorkspacePackageNames, "getAllWorkspacePackageNames");
|
|
74
|
-
|
|
75
|
-
// src/methods/findWorkspacePackageName.ts
|
|
76
|
-
async function findWorkspacePackageName(name) {
|
|
77
|
-
const wsPkgNames = await getAllWorkspacePackageNames();
|
|
78
|
-
return wsPkgNames.find((n) => {
|
|
79
|
-
return n === name;
|
|
80
|
-
}) || wsPkgNames.find((n) => {
|
|
81
|
-
return n === `@mono/${name}`;
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
__name(findWorkspacePackageName, "findWorkspacePackageName");
|
|
85
|
-
|
|
86
|
-
exports.findWorkspacePackageName = findWorkspacePackageName;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import fs from 'fs-extra';
|
|
2
|
-
import onetime from 'onetime';
|
|
3
|
-
import path from 'upath';
|
|
4
|
-
import { glob } from 'glob';
|
|
5
|
-
|
|
6
|
-
var __defProp = Object.defineProperty;
|
|
7
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
-
var getRepoRootDirpath = onetime(/* @__PURE__ */ __name(function getRepoRootDirpath2() {
|
|
9
|
-
return (/* @__PURE__ */ __name(function recurse(dirpath = process.cwd()) {
|
|
10
|
-
dirpath = path.normalizeSafe(dirpath);
|
|
11
|
-
const pkgpath = path.joinSafe(dirpath, "package.json");
|
|
12
|
-
if (fs.existsSync(pkgpath) && fs.readJsonSync(pkgpath)?.workspaces) {
|
|
13
|
-
return dirpath;
|
|
14
|
-
}
|
|
15
|
-
const parent = path.dirname(dirpath);
|
|
16
|
-
if (parent !== dirpath) {
|
|
17
|
-
return recurse(parent);
|
|
18
|
-
}
|
|
19
|
-
throw new Error(`Could not find repo root from process.cwd(): ${process.cwd()}`);
|
|
20
|
-
}, "recurse"))();
|
|
21
|
-
}, "getRepoRootDirpath"));
|
|
22
|
-
function getRepoPackageJsonPath() {
|
|
23
|
-
return path.joinSafe(getRepoRootDirpath(), "package.json");
|
|
24
|
-
}
|
|
25
|
-
__name(getRepoPackageJsonPath, "getRepoPackageJsonPath");
|
|
26
|
-
|
|
27
|
-
// src/methods/getRepoPackageJson.ts
|
|
28
|
-
async function getRepoPackageJson() {
|
|
29
|
-
return await fs.readJson(getRepoPackageJsonPath());
|
|
30
|
-
}
|
|
31
|
-
__name(getRepoPackageJson, "getRepoPackageJson");
|
|
32
|
-
async function getAllWorkspacePaths() {
|
|
33
|
-
const pkg = await getRepoPackageJson();
|
|
34
|
-
return (await Promise.all(pkg.workspaces.map((pattern) => {
|
|
35
|
-
return glob(pattern);
|
|
36
|
-
}))).flat().map((fp) => {
|
|
37
|
-
return path.normalizeSafe(fp);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
__name(getAllWorkspacePaths, "getAllWorkspacePaths");
|
|
41
|
-
async function getAllWorkspacePackageJsonPaths() {
|
|
42
|
-
const paths = await getAllWorkspacePaths();
|
|
43
|
-
return paths.map((p) => {
|
|
44
|
-
return path.join(p, "package.json");
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
__name(getAllWorkspacePackageJsonPaths, "getAllWorkspacePackageJsonPaths");
|
|
48
|
-
|
|
49
|
-
// src/methods/getAllWorkspacePackageJsons.ts
|
|
50
|
-
async function getAllWorkspacePackageJsons() {
|
|
51
|
-
const paths = await getAllWorkspacePackageJsonPaths();
|
|
52
|
-
return paths.map((p) => {
|
|
53
|
-
return fs.readJsonSync(p);
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
__name(getAllWorkspacePackageJsons, "getAllWorkspacePackageJsons");
|
|
57
|
-
|
|
58
|
-
// src/methods/getAllWorkspacePackageNames.ts
|
|
59
|
-
async function getAllWorkspacePackageNames() {
|
|
60
|
-
const pkgs = await getAllWorkspacePackageJsons();
|
|
61
|
-
return pkgs.map((p) => {
|
|
62
|
-
return p.name;
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
__name(getAllWorkspacePackageNames, "getAllWorkspacePackageNames");
|
|
66
|
-
|
|
67
|
-
// src/methods/findWorkspacePackageName.ts
|
|
68
|
-
async function findWorkspacePackageName(name) {
|
|
69
|
-
const wsPkgNames = await getAllWorkspacePackageNames();
|
|
70
|
-
return wsPkgNames.find((n) => {
|
|
71
|
-
return n === name;
|
|
72
|
-
}) || wsPkgNames.find((n) => {
|
|
73
|
-
return n === `@mono/${name}`;
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
__name(findWorkspacePackageName, "findWorkspacePackageName");
|
|
77
|
-
|
|
78
|
-
export { findWorkspacePackageName };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
-
|
|
6
|
-
// src/methods/getAllImports.ts
|
|
7
|
-
function getAllImports(repo) {
|
|
8
|
-
return repo.workspaces.flatMap((ws) => {
|
|
9
|
-
return ws.tsFiles.filter((ts) => {
|
|
10
|
-
return ts.isSourceFile;
|
|
11
|
-
}).flatMap((ts) => {
|
|
12
|
-
return ts.tsCode.imports.flatMap((imp) => {
|
|
13
|
-
return imp;
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
__name(getAllImports, "getAllImports");
|
|
19
|
-
|
|
20
|
-
exports.getAllImports = getAllImports;
|
|
@@ -1,17 +0,0 @@
|
|
|
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 };
|
|
@@ -1,17 +0,0 @@
|
|
|
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 };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
|
-
// src/methods/getAllImports.ts
|
|
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
|
-
export { getAllImports };
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var fs = require('fs-extra');
|
|
4
|
-
var onetime = require('onetime');
|
|
5
|
-
var path = require('upath');
|
|
6
|
-
var glob = require('glob');
|
|
7
|
-
|
|
8
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
|
|
10
|
-
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
11
|
-
var onetime__default = /*#__PURE__*/_interopDefault(onetime);
|
|
12
|
-
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
13
|
-
|
|
14
|
-
var __defProp = Object.defineProperty;
|
|
15
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
16
|
-
var getRepoRootDirpath = onetime__default.default(/* @__PURE__ */ __name(function getRepoRootDirpath2() {
|
|
17
|
-
return (/* @__PURE__ */ __name(function recurse(dirpath = process.cwd()) {
|
|
18
|
-
dirpath = path__default.default.normalizeSafe(dirpath);
|
|
19
|
-
const pkgpath = path__default.default.joinSafe(dirpath, "package.json");
|
|
20
|
-
if (fs__default.default.existsSync(pkgpath) && fs__default.default.readJsonSync(pkgpath)?.workspaces) {
|
|
21
|
-
return dirpath;
|
|
22
|
-
}
|
|
23
|
-
const parent = path__default.default.dirname(dirpath);
|
|
24
|
-
if (parent !== dirpath) {
|
|
25
|
-
return recurse(parent);
|
|
26
|
-
}
|
|
27
|
-
throw new Error(`Could not find repo root from process.cwd(): ${process.cwd()}`);
|
|
28
|
-
}, "recurse"))();
|
|
29
|
-
}, "getRepoRootDirpath"));
|
|
30
|
-
function getRepoPackageJsonPath() {
|
|
31
|
-
return path__default.default.joinSafe(getRepoRootDirpath(), "package.json");
|
|
32
|
-
}
|
|
33
|
-
__name(getRepoPackageJsonPath, "getRepoPackageJsonPath");
|
|
34
|
-
|
|
35
|
-
// src/methods/getRepoPackageJson.ts
|
|
36
|
-
async function getRepoPackageJson() {
|
|
37
|
-
return await fs__default.default.readJson(getRepoPackageJsonPath());
|
|
38
|
-
}
|
|
39
|
-
__name(getRepoPackageJson, "getRepoPackageJson");
|
|
40
|
-
async function getAllWorkspacePaths() {
|
|
41
|
-
const pkg = await getRepoPackageJson();
|
|
42
|
-
return (await Promise.all(pkg.workspaces.map((pattern) => {
|
|
43
|
-
return glob.glob(pattern);
|
|
44
|
-
}))).flat().map((fp) => {
|
|
45
|
-
return path__default.default.normalizeSafe(fp);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
__name(getAllWorkspacePaths, "getAllWorkspacePaths");
|
|
49
|
-
async function getAllWorkspacePackageJsonPaths() {
|
|
50
|
-
const paths = await getAllWorkspacePaths();
|
|
51
|
-
return paths.map((p) => {
|
|
52
|
-
return path__default.default.join(p, "package.json");
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
__name(getAllWorkspacePackageJsonPaths, "getAllWorkspacePackageJsonPaths");
|
|
56
|
-
|
|
57
|
-
exports.getAllWorkspacePackageJsonPaths = getAllWorkspacePackageJsonPaths;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import fs from 'fs-extra';
|
|
2
|
-
import onetime from 'onetime';
|
|
3
|
-
import path from 'upath';
|
|
4
|
-
import { glob } from 'glob';
|
|
5
|
-
|
|
6
|
-
var __defProp = Object.defineProperty;
|
|
7
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
-
var getRepoRootDirpath = onetime(/* @__PURE__ */ __name(function getRepoRootDirpath2() {
|
|
9
|
-
return (/* @__PURE__ */ __name(function recurse(dirpath = process.cwd()) {
|
|
10
|
-
dirpath = path.normalizeSafe(dirpath);
|
|
11
|
-
const pkgpath = path.joinSafe(dirpath, "package.json");
|
|
12
|
-
if (fs.existsSync(pkgpath) && fs.readJsonSync(pkgpath)?.workspaces) {
|
|
13
|
-
return dirpath;
|
|
14
|
-
}
|
|
15
|
-
const parent = path.dirname(dirpath);
|
|
16
|
-
if (parent !== dirpath) {
|
|
17
|
-
return recurse(parent);
|
|
18
|
-
}
|
|
19
|
-
throw new Error(`Could not find repo root from process.cwd(): ${process.cwd()}`);
|
|
20
|
-
}, "recurse"))();
|
|
21
|
-
}, "getRepoRootDirpath"));
|
|
22
|
-
function getRepoPackageJsonPath() {
|
|
23
|
-
return path.joinSafe(getRepoRootDirpath(), "package.json");
|
|
24
|
-
}
|
|
25
|
-
__name(getRepoPackageJsonPath, "getRepoPackageJsonPath");
|
|
26
|
-
|
|
27
|
-
// src/methods/getRepoPackageJson.ts
|
|
28
|
-
async function getRepoPackageJson() {
|
|
29
|
-
return await fs.readJson(getRepoPackageJsonPath());
|
|
30
|
-
}
|
|
31
|
-
__name(getRepoPackageJson, "getRepoPackageJson");
|
|
32
|
-
async function getAllWorkspacePaths() {
|
|
33
|
-
const pkg = await getRepoPackageJson();
|
|
34
|
-
return (await Promise.all(pkg.workspaces.map((pattern) => {
|
|
35
|
-
return glob(pattern);
|
|
36
|
-
}))).flat().map((fp) => {
|
|
37
|
-
return path.normalizeSafe(fp);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
__name(getAllWorkspacePaths, "getAllWorkspacePaths");
|
|
41
|
-
async function getAllWorkspacePackageJsonPaths() {
|
|
42
|
-
const paths = await getAllWorkspacePaths();
|
|
43
|
-
return paths.map((p) => {
|
|
44
|
-
return path.join(p, "package.json");
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
__name(getAllWorkspacePackageJsonPaths, "getAllWorkspacePackageJsonPaths");
|
|
48
|
-
|
|
49
|
-
export { getAllWorkspacePackageJsonPaths };
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var fs = require('fs-extra');
|
|
4
|
-
var onetime = require('onetime');
|
|
5
|
-
var path = require('upath');
|
|
6
|
-
var glob = require('glob');
|
|
7
|
-
|
|
8
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
|
|
10
|
-
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
11
|
-
var onetime__default = /*#__PURE__*/_interopDefault(onetime);
|
|
12
|
-
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
13
|
-
|
|
14
|
-
var __defProp = Object.defineProperty;
|
|
15
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
16
|
-
var getRepoRootDirpath = onetime__default.default(/* @__PURE__ */ __name(function getRepoRootDirpath2() {
|
|
17
|
-
return (/* @__PURE__ */ __name(function recurse(dirpath = process.cwd()) {
|
|
18
|
-
dirpath = path__default.default.normalizeSafe(dirpath);
|
|
19
|
-
const pkgpath = path__default.default.joinSafe(dirpath, "package.json");
|
|
20
|
-
if (fs__default.default.existsSync(pkgpath) && fs__default.default.readJsonSync(pkgpath)?.workspaces) {
|
|
21
|
-
return dirpath;
|
|
22
|
-
}
|
|
23
|
-
const parent = path__default.default.dirname(dirpath);
|
|
24
|
-
if (parent !== dirpath) {
|
|
25
|
-
return recurse(parent);
|
|
26
|
-
}
|
|
27
|
-
throw new Error(`Could not find repo root from process.cwd(): ${process.cwd()}`);
|
|
28
|
-
}, "recurse"))();
|
|
29
|
-
}, "getRepoRootDirpath"));
|
|
30
|
-
function getRepoPackageJsonPath() {
|
|
31
|
-
return path__default.default.joinSafe(getRepoRootDirpath(), "package.json");
|
|
32
|
-
}
|
|
33
|
-
__name(getRepoPackageJsonPath, "getRepoPackageJsonPath");
|
|
34
|
-
|
|
35
|
-
// src/methods/getRepoPackageJson.ts
|
|
36
|
-
async function getRepoPackageJson() {
|
|
37
|
-
return await fs__default.default.readJson(getRepoPackageJsonPath());
|
|
38
|
-
}
|
|
39
|
-
__name(getRepoPackageJson, "getRepoPackageJson");
|
|
40
|
-
async function getAllWorkspacePaths() {
|
|
41
|
-
const pkg = await getRepoPackageJson();
|
|
42
|
-
return (await Promise.all(pkg.workspaces.map((pattern) => {
|
|
43
|
-
return glob.glob(pattern);
|
|
44
|
-
}))).flat().map((fp) => {
|
|
45
|
-
return path__default.default.normalizeSafe(fp);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
__name(getAllWorkspacePaths, "getAllWorkspacePaths");
|
|
49
|
-
async function getAllWorkspacePackageJsonPaths() {
|
|
50
|
-
const paths = await getAllWorkspacePaths();
|
|
51
|
-
return paths.map((p) => {
|
|
52
|
-
return path__default.default.join(p, "package.json");
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
__name(getAllWorkspacePackageJsonPaths, "getAllWorkspacePackageJsonPaths");
|
|
56
|
-
|
|
57
|
-
// src/methods/getAllWorkspacePackageJsons.ts
|
|
58
|
-
async function getAllWorkspacePackageJsons() {
|
|
59
|
-
const paths = await getAllWorkspacePackageJsonPaths();
|
|
60
|
-
return paths.map((p) => {
|
|
61
|
-
return fs__default.default.readJsonSync(p);
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
__name(getAllWorkspacePackageJsons, "getAllWorkspacePackageJsons");
|
|
65
|
-
|
|
66
|
-
exports.getAllWorkspacePackageJsons = getAllWorkspacePackageJsons;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import fs from 'fs-extra';
|
|
2
|
-
import onetime from 'onetime';
|
|
3
|
-
import path from 'upath';
|
|
4
|
-
import { glob } from 'glob';
|
|
5
|
-
|
|
6
|
-
var __defProp = Object.defineProperty;
|
|
7
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
-
var getRepoRootDirpath = onetime(/* @__PURE__ */ __name(function getRepoRootDirpath2() {
|
|
9
|
-
return (/* @__PURE__ */ __name(function recurse(dirpath = process.cwd()) {
|
|
10
|
-
dirpath = path.normalizeSafe(dirpath);
|
|
11
|
-
const pkgpath = path.joinSafe(dirpath, "package.json");
|
|
12
|
-
if (fs.existsSync(pkgpath) && fs.readJsonSync(pkgpath)?.workspaces) {
|
|
13
|
-
return dirpath;
|
|
14
|
-
}
|
|
15
|
-
const parent = path.dirname(dirpath);
|
|
16
|
-
if (parent !== dirpath) {
|
|
17
|
-
return recurse(parent);
|
|
18
|
-
}
|
|
19
|
-
throw new Error(`Could not find repo root from process.cwd(): ${process.cwd()}`);
|
|
20
|
-
}, "recurse"))();
|
|
21
|
-
}, "getRepoRootDirpath"));
|
|
22
|
-
function getRepoPackageJsonPath() {
|
|
23
|
-
return path.joinSafe(getRepoRootDirpath(), "package.json");
|
|
24
|
-
}
|
|
25
|
-
__name(getRepoPackageJsonPath, "getRepoPackageJsonPath");
|
|
26
|
-
|
|
27
|
-
// src/methods/getRepoPackageJson.ts
|
|
28
|
-
async function getRepoPackageJson() {
|
|
29
|
-
return await fs.readJson(getRepoPackageJsonPath());
|
|
30
|
-
}
|
|
31
|
-
__name(getRepoPackageJson, "getRepoPackageJson");
|
|
32
|
-
async function getAllWorkspacePaths() {
|
|
33
|
-
const pkg = await getRepoPackageJson();
|
|
34
|
-
return (await Promise.all(pkg.workspaces.map((pattern) => {
|
|
35
|
-
return glob(pattern);
|
|
36
|
-
}))).flat().map((fp) => {
|
|
37
|
-
return path.normalizeSafe(fp);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
__name(getAllWorkspacePaths, "getAllWorkspacePaths");
|
|
41
|
-
async function getAllWorkspacePackageJsonPaths() {
|
|
42
|
-
const paths = await getAllWorkspacePaths();
|
|
43
|
-
return paths.map((p) => {
|
|
44
|
-
return path.join(p, "package.json");
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
__name(getAllWorkspacePackageJsonPaths, "getAllWorkspacePackageJsonPaths");
|
|
48
|
-
|
|
49
|
-
// src/methods/getAllWorkspacePackageJsons.ts
|
|
50
|
-
async function getAllWorkspacePackageJsons() {
|
|
51
|
-
const paths = await getAllWorkspacePackageJsonPaths();
|
|
52
|
-
return paths.map((p) => {
|
|
53
|
-
return fs.readJsonSync(p);
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
__name(getAllWorkspacePackageJsons, "getAllWorkspacePackageJsons");
|
|
57
|
-
|
|
58
|
-
export { getAllWorkspacePackageJsons };
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var fs = require('fs-extra');
|
|
4
|
-
var onetime = require('onetime');
|
|
5
|
-
var path = require('upath');
|
|
6
|
-
var glob = require('glob');
|
|
7
|
-
|
|
8
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
|
|
10
|
-
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
11
|
-
var onetime__default = /*#__PURE__*/_interopDefault(onetime);
|
|
12
|
-
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
13
|
-
|
|
14
|
-
var __defProp = Object.defineProperty;
|
|
15
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
16
|
-
var getRepoRootDirpath = onetime__default.default(/* @__PURE__ */ __name(function getRepoRootDirpath2() {
|
|
17
|
-
return (/* @__PURE__ */ __name(function recurse(dirpath = process.cwd()) {
|
|
18
|
-
dirpath = path__default.default.normalizeSafe(dirpath);
|
|
19
|
-
const pkgpath = path__default.default.joinSafe(dirpath, "package.json");
|
|
20
|
-
if (fs__default.default.existsSync(pkgpath) && fs__default.default.readJsonSync(pkgpath)?.workspaces) {
|
|
21
|
-
return dirpath;
|
|
22
|
-
}
|
|
23
|
-
const parent = path__default.default.dirname(dirpath);
|
|
24
|
-
if (parent !== dirpath) {
|
|
25
|
-
return recurse(parent);
|
|
26
|
-
}
|
|
27
|
-
throw new Error(`Could not find repo root from process.cwd(): ${process.cwd()}`);
|
|
28
|
-
}, "recurse"))();
|
|
29
|
-
}, "getRepoRootDirpath"));
|
|
30
|
-
function getRepoPackageJsonPath() {
|
|
31
|
-
return path__default.default.joinSafe(getRepoRootDirpath(), "package.json");
|
|
32
|
-
}
|
|
33
|
-
__name(getRepoPackageJsonPath, "getRepoPackageJsonPath");
|
|
34
|
-
|
|
35
|
-
// src/methods/getRepoPackageJson.ts
|
|
36
|
-
async function getRepoPackageJson() {
|
|
37
|
-
return await fs__default.default.readJson(getRepoPackageJsonPath());
|
|
38
|
-
}
|
|
39
|
-
__name(getRepoPackageJson, "getRepoPackageJson");
|
|
40
|
-
async function getAllWorkspacePaths() {
|
|
41
|
-
const pkg = await getRepoPackageJson();
|
|
42
|
-
return (await Promise.all(pkg.workspaces.map((pattern) => {
|
|
43
|
-
return glob.glob(pattern);
|
|
44
|
-
}))).flat().map((fp) => {
|
|
45
|
-
return path__default.default.normalizeSafe(fp);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
__name(getAllWorkspacePaths, "getAllWorkspacePaths");
|
|
49
|
-
async function getAllWorkspacePackageJsonPaths() {
|
|
50
|
-
const paths = await getAllWorkspacePaths();
|
|
51
|
-
return paths.map((p) => {
|
|
52
|
-
return path__default.default.join(p, "package.json");
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
__name(getAllWorkspacePackageJsonPaths, "getAllWorkspacePackageJsonPaths");
|
|
56
|
-
|
|
57
|
-
// src/methods/getAllWorkspacePackageJsons.ts
|
|
58
|
-
async function getAllWorkspacePackageJsons() {
|
|
59
|
-
const paths = await getAllWorkspacePackageJsonPaths();
|
|
60
|
-
return paths.map((p) => {
|
|
61
|
-
return fs__default.default.readJsonSync(p);
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
__name(getAllWorkspacePackageJsons, "getAllWorkspacePackageJsons");
|
|
65
|
-
|
|
66
|
-
// src/methods/getAllWorkspacePackageNames.ts
|
|
67
|
-
async function getAllWorkspacePackageNames() {
|
|
68
|
-
const pkgs = await getAllWorkspacePackageJsons();
|
|
69
|
-
return pkgs.map((p) => {
|
|
70
|
-
return p.name;
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
__name(getAllWorkspacePackageNames, "getAllWorkspacePackageNames");
|
|
74
|
-
|
|
75
|
-
exports.getAllWorkspacePackageNames = getAllWorkspacePackageNames;
|