@bemoje/monorepo 1.2.0 → 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 +2496 -213
- package/lib/index.d.cts +2765 -26
- package/lib/index.d.ts +2765 -26
- package/lib/index.js +2469 -30
- package/package.json +178 -297
- package/lib/MonoRepo.cjs +0 -142
- package/lib/MonoRepo.d.cts +0 -10
- package/lib/MonoRepo.d.ts +0 -10
- package/lib/MonoRepo.js +0 -134
- package/lib/code/AbstractCode.cjs +0 -77
- package/lib/code/AbstractCode.d.cts +0 -30
- package/lib/code/AbstractCode.d.ts +0 -30
- package/lib/code/AbstractCode.js +0 -74
- package/lib/code/CodeBlock.cjs +0 -51
- package/lib/code/CodeBlock.d.cts +0 -22
- package/lib/code/CodeBlock.d.ts +0 -22
- package/lib/code/CodeBlock.js +0 -48
- package/lib/code/TsCode.cjs +0 -90
- package/lib/code/TsCode.d.cts +0 -10
- package/lib/code/TsCode.d.ts +0 -10
- package/lib/code/TsCode.js +0 -87
- package/lib/code/imports/ImportKeywords.cjs +0 -42
- 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 -39
- package/lib/code/imports/ImportSpecifiers.cjs +0 -98
- 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 -95
- package/lib/code/imports/ImportStatement.cjs +0 -89
- 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 -86
- package/lib/code/imports/ModuleSpecifier.cjs +0 -77
- 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 -74
- package/lib/common/AbstractBase.cjs +0 -77
- package/lib/common/AbstractBase.d.cts +0 -3
- package/lib/common/AbstractBase.d.ts +0 -3
- package/lib/common/AbstractBase.js +0 -74
- package/lib/file/File.cjs +0 -118
- package/lib/file/File.d.cts +0 -10
- package/lib/file/File.d.ts +0 -10
- package/lib/file/File.js +0 -91
- package/lib/file/TestFile.cjs +0 -42
- package/lib/file/TestFile.d.cts +0 -10
- package/lib/file/TestFile.d.ts +0 -10
- package/lib/file/TestFile.js +0 -39
- package/lib/file/TsFile.cjs +0 -46
- package/lib/file/TsFile.d.cts +0 -10
- package/lib/file/TsFile.d.ts +0 -10
- package/lib/file/TsFile.js +0 -43
- package/lib/methods/findWorkspacePackageName.cjs +0 -17
- package/lib/methods/findWorkspacePackageName.d.cts +0 -6
- package/lib/methods/findWorkspacePackageName.d.ts +0 -6
- package/lib/methods/findWorkspacePackageName.js +0 -14
- package/lib/methods/getAllImports.cjs +0 -18
- package/lib/methods/getAllImports.d.cts +0 -17
- package/lib/methods/getAllImports.d.ts +0 -17
- package/lib/methods/getAllImports.js +0 -16
- package/lib/methods/getAllWorkspacePackageJsonPaths.cjs +0 -20
- package/lib/methods/getAllWorkspacePackageJsonPaths.d.cts +0 -6
- package/lib/methods/getAllWorkspacePackageJsonPaths.d.ts +0 -6
- package/lib/methods/getAllWorkspacePackageJsonPaths.js +0 -13
- package/lib/methods/getAllWorkspacePackageJsons.cjs +0 -20
- package/lib/methods/getAllWorkspacePackageJsons.d.cts +0 -6
- package/lib/methods/getAllWorkspacePackageJsons.d.ts +0 -6
- package/lib/methods/getAllWorkspacePackageJsons.js +0 -13
- package/lib/methods/getAllWorkspacePackageNames.cjs +0 -15
- package/lib/methods/getAllWorkspacePackageNames.d.cts +0 -6
- package/lib/methods/getAllWorkspacePackageNames.d.ts +0 -6
- package/lib/methods/getAllWorkspacePackageNames.js +0 -12
- package/lib/methods/getAllWorkspacePaths.cjs +0 -23
- package/lib/methods/getAllWorkspacePaths.d.cts +0 -6
- package/lib/methods/getAllWorkspacePaths.d.ts +0 -6
- package/lib/methods/getAllWorkspacePaths.js +0 -16
- package/lib/methods/getImportsRecursively.cjs +0 -176
- package/lib/methods/getImportsRecursively.d.cts +0 -37
- package/lib/methods/getImportsRecursively.d.ts +0 -37
- package/lib/methods/getImportsRecursively.js +0 -168
- package/lib/methods/getRepoPackageJson.cjs +0 -17
- package/lib/methods/getRepoPackageJson.d.cts +0 -6
- package/lib/methods/getRepoPackageJson.d.ts +0 -6
- package/lib/methods/getRepoPackageJson.js +0 -10
- package/lib/methods/getRepoPackageJsonPath.cjs +0 -17
- package/lib/methods/getRepoPackageJsonPath.d.cts +0 -6
- package/lib/methods/getRepoPackageJsonPath.d.ts +0 -6
- package/lib/methods/getRepoPackageJsonPath.js +0 -10
- package/lib/repo/Workspace.cjs +0 -383
- package/lib/repo/Workspace.d.cts +0 -10
- package/lib/repo/Workspace.d.ts +0 -10
- package/lib/repo/Workspace.js +0 -376
- package/lib/util/SemanticExtnamePrefix.cjs +0 -12
- package/lib/util/SemanticExtnamePrefix.d.cts +0 -14
- package/lib/util/SemanticExtnamePrefix.d.ts +0 -14
- package/lib/util/SemanticExtnamePrefix.js +0 -12
- package/lib/util/SemanticExtnamePrefixDescriptions.cjs +0 -12
- package/lib/util/SemanticExtnamePrefixDescriptions.d.cts +0 -15
- package/lib/util/SemanticExtnamePrefixDescriptions.d.ts +0 -15
- package/lib/util/SemanticExtnamePrefixDescriptions.js +0 -12
- package/lib/util/SemanticExtnamePrefixes.cjs +0 -9
- package/lib/util/SemanticExtnamePrefixes.d.cts +0 -97
- package/lib/util/SemanticExtnamePrefixes.d.ts +0 -97
- package/lib/util/SemanticExtnamePrefixes.js +0 -6
- 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 -21
- package/lib/util/getWorkspaceDirpaths.cjs +0 -27
- package/lib/util/getWorkspaceDirpaths.d.cts +0 -6
- package/lib/util/getWorkspaceDirpaths.d.ts +0 -6
- package/lib/util/getWorkspaceDirpaths.js +0 -19
- package/lib/util/hasExtnamePrefix.cjs +0 -18
- package/lib/util/hasExtnamePrefix.d.cts +0 -38
- package/lib/util/hasExtnamePrefix.d.ts +0 -38
- package/lib/util/hasExtnamePrefix.js +0 -11
- package/lib/util/resolveModuleImportPath.cjs +0 -34
- package/lib/util/resolveModuleImportPath.d.cts +0 -8
- package/lib/util/resolveModuleImportPath.d.ts +0 -8
- package/lib/util/resolveModuleImportPath.js +0 -26
- package/lib/util/semverVersionBump.cjs +0 -28
- package/lib/util/semverVersionBump.d.cts +0 -22
- package/lib/util/semverVersionBump.d.ts +0 -22
- package/lib/util/semverVersionBump.js +0 -26
package/lib/MonoRepo.cjs
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var AbstractBase = require('./common/AbstractBase');
|
|
4
|
-
var composition = require('@mono/composition');
|
|
5
|
-
var Workspace = require('./repo/Workspace');
|
|
6
|
-
var fs = require('fs');
|
|
7
|
-
var getRepoRootDirpath = require('./util/getRepoRootDirpath');
|
|
8
|
-
var decorators = require('@mono/decorators');
|
|
9
|
-
var path = require('upath');
|
|
10
|
-
var esm = require('fs-extra/esm');
|
|
11
|
-
|
|
12
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
|
|
14
|
-
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
15
|
-
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
16
|
-
|
|
17
|
-
var __defProp = Object.defineProperty;
|
|
18
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
19
|
-
function _ts_decorate(decorators, target, key, desc) {
|
|
20
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
21
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
22
|
-
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;
|
|
23
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
24
|
-
}
|
|
25
|
-
__name(_ts_decorate, "_ts_decorate");
|
|
26
|
-
function _ts_metadata(k, v) {
|
|
27
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
28
|
-
}
|
|
29
|
-
__name(_ts_metadata, "_ts_metadata");
|
|
30
|
-
class MonoRepo extends AbstractBase.AbstractBase {
|
|
31
|
-
static {
|
|
32
|
-
__name(this, "MonoRepo");
|
|
33
|
-
}
|
|
34
|
-
static inspector = composition.Inspector.compose(MonoRepo, {
|
|
35
|
-
keys: [
|
|
36
|
-
"name",
|
|
37
|
-
"workspaces"
|
|
38
|
-
]
|
|
39
|
-
});
|
|
40
|
-
static instances = /* @__PURE__ */ new Map();
|
|
41
|
-
path;
|
|
42
|
-
constructor() {
|
|
43
|
-
const oPath = getRepoRootDirpath.getRepoRootDirpath();
|
|
44
|
-
if (MonoRepo.instances.has(oPath)) {
|
|
45
|
-
return MonoRepo.instances.get(oPath);
|
|
46
|
-
}
|
|
47
|
-
super(null);
|
|
48
|
-
this.path = oPath;
|
|
49
|
-
MonoRepo.instances.set(this.path, this);
|
|
50
|
-
}
|
|
51
|
-
get monoRepo() {
|
|
52
|
-
return this;
|
|
53
|
-
}
|
|
54
|
-
get packageJsonPath() {
|
|
55
|
-
return path__default.default.join(this.path, "package.json");
|
|
56
|
-
}
|
|
57
|
-
get tsconfigBaseJsonPath() {
|
|
58
|
-
return path__default.default.join(this.path, "tsconfig.json");
|
|
59
|
-
}
|
|
60
|
-
get tsconfigBase() {
|
|
61
|
-
const o = esm.readJsonSync(this.tsconfigBaseJsonPath);
|
|
62
|
-
if (!o.compilerOptions) {
|
|
63
|
-
o.compilerOptions = {};
|
|
64
|
-
}
|
|
65
|
-
o.compilerOptions.paths = o.compilerOptions.paths || this.tsconfigBasePaths;
|
|
66
|
-
return o;
|
|
67
|
-
}
|
|
68
|
-
get tsconfigBasePathsJsonPath() {
|
|
69
|
-
return path__default.default.join(this.path, "tsconfig.paths.json");
|
|
70
|
-
}
|
|
71
|
-
get tsconfigBasePaths() {
|
|
72
|
-
if (!fs__default.default.existsSync(this.tsconfigBasePathsJsonPath)) {
|
|
73
|
-
return {};
|
|
74
|
-
}
|
|
75
|
-
return esm.readJsonSync(this.tsconfigBasePathsJsonPath).compilerOptions?.paths ?? {};
|
|
76
|
-
}
|
|
77
|
-
get packageJson() {
|
|
78
|
-
return esm.readJsonSync(this.packageJsonPath);
|
|
79
|
-
}
|
|
80
|
-
get name() {
|
|
81
|
-
if (!this.packageJson.name) {
|
|
82
|
-
throw new Error(`MonoRepo package.json missing 'name' field: ${this.packageJsonPath}`);
|
|
83
|
-
}
|
|
84
|
-
return this.packageJson.name;
|
|
85
|
-
}
|
|
86
|
-
get workspacesRootPaths() {
|
|
87
|
-
if (!this.packageJson.workspaces) {
|
|
88
|
-
throw new Error(`MonoRepo package.json missing 'workspaces' field: ${this.packageJsonPath}`);
|
|
89
|
-
}
|
|
90
|
-
return this.packageJson.workspaces.map((workspacePath) => {
|
|
91
|
-
return path__default.default.join(this.path, workspacePath.replace(/\*$/, ""));
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
get workspacePaths() {
|
|
95
|
-
return this.workspacesRootPaths.flatMap((workspacePath) => {
|
|
96
|
-
return fs__default.default.readdirSync(workspacePath, {
|
|
97
|
-
withFileTypes: true
|
|
98
|
-
}).filter((dirent) => {
|
|
99
|
-
return dirent.isDirectory();
|
|
100
|
-
}).map((dirent) => {
|
|
101
|
-
return path__default.default.join(workspacePath, dirent.name);
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
get workspaces() {
|
|
106
|
-
return this.workspacePaths.map((dirpath) => {
|
|
107
|
-
return new Workspace.Workspace(this, dirpath);
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
_ts_decorate([
|
|
112
|
-
decorators.lazyProp(5e3),
|
|
113
|
-
_ts_metadata("design:type", void 0),
|
|
114
|
-
_ts_metadata("design:paramtypes", [])
|
|
115
|
-
], MonoRepo.prototype, "tsconfigBase", null);
|
|
116
|
-
_ts_decorate([
|
|
117
|
-
decorators.lazyProp(5e3),
|
|
118
|
-
_ts_metadata("design:type", typeof Record === "undefined" ? Object : Record),
|
|
119
|
-
_ts_metadata("design:paramtypes", [])
|
|
120
|
-
], MonoRepo.prototype, "tsconfigBasePaths", null);
|
|
121
|
-
_ts_decorate([
|
|
122
|
-
decorators.lazyProp(5e3),
|
|
123
|
-
_ts_metadata("design:type", typeof PackageJson === "undefined" ? Object : PackageJson),
|
|
124
|
-
_ts_metadata("design:paramtypes", [])
|
|
125
|
-
], MonoRepo.prototype, "packageJson", null);
|
|
126
|
-
_ts_decorate([
|
|
127
|
-
decorators.lazyProp(5e3),
|
|
128
|
-
_ts_metadata("design:type", void 0),
|
|
129
|
-
_ts_metadata("design:paramtypes", [])
|
|
130
|
-
], MonoRepo.prototype, "workspacePaths", null);
|
|
131
|
-
_ts_decorate([
|
|
132
|
-
decorators.lazyProp,
|
|
133
|
-
_ts_metadata("design:type", Array),
|
|
134
|
-
_ts_metadata("design:paramtypes", [])
|
|
135
|
-
], MonoRepo.prototype, "workspaces", null);
|
|
136
|
-
MonoRepo = _ts_decorate([
|
|
137
|
-
composition.Parenting.compose,
|
|
138
|
-
_ts_metadata("design:type", Function),
|
|
139
|
-
_ts_metadata("design:paramtypes", [])
|
|
140
|
-
], MonoRepo);
|
|
141
|
-
|
|
142
|
-
exports.MonoRepo = MonoRepo;
|
package/lib/MonoRepo.d.cts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { d as MonoRepo } from './MonoRepo-BgdabVzT.cjs';
|
|
2
|
-
import './AbstractBase-J4h6nW8k.cjs';
|
|
3
|
-
import 'typescript';
|
|
4
|
-
import './is-never.d-CgQ1j0-8.cjs';
|
|
5
|
-
import 'depcheck';
|
|
6
|
-
import './code/AbstractCode.cjs';
|
|
7
|
-
import 'util';
|
|
8
|
-
import 'mnemonist';
|
|
9
|
-
import './code/CodeBlock.cjs';
|
|
10
|
-
import 'fs';
|
package/lib/MonoRepo.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { d as MonoRepo } from './MonoRepo-BFFUDAYn.js';
|
|
2
|
-
import './AbstractBase-J4h6nW8k.js';
|
|
3
|
-
import 'typescript';
|
|
4
|
-
import './is-never.d-CgQ1j0-8.js';
|
|
5
|
-
import 'depcheck';
|
|
6
|
-
import './code/AbstractCode.js';
|
|
7
|
-
import 'util';
|
|
8
|
-
import 'mnemonist';
|
|
9
|
-
import './code/CodeBlock.js';
|
|
10
|
-
import 'fs';
|
package/lib/MonoRepo.js
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { __name } from './chunk-SHUYVCID.js';
|
|
2
|
-
import { AbstractBase } from './common/AbstractBase';
|
|
3
|
-
import { Inspector, Parenting } from '@mono/composition';
|
|
4
|
-
import { Workspace } from './repo/Workspace';
|
|
5
|
-
import fs from 'fs';
|
|
6
|
-
import { getRepoRootDirpath } from './util/getRepoRootDirpath';
|
|
7
|
-
import { lazyProp } from '@mono/decorators';
|
|
8
|
-
import path from 'upath';
|
|
9
|
-
import { readJsonSync } from 'fs-extra/esm';
|
|
10
|
-
|
|
11
|
-
function _ts_decorate(decorators, target, key, desc) {
|
|
12
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
13
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
14
|
-
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;
|
|
15
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
16
|
-
}
|
|
17
|
-
__name(_ts_decorate, "_ts_decorate");
|
|
18
|
-
function _ts_metadata(k, v) {
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
20
|
-
}
|
|
21
|
-
__name(_ts_metadata, "_ts_metadata");
|
|
22
|
-
class MonoRepo extends AbstractBase {
|
|
23
|
-
static {
|
|
24
|
-
__name(this, "MonoRepo");
|
|
25
|
-
}
|
|
26
|
-
static inspector = Inspector.compose(MonoRepo, {
|
|
27
|
-
keys: [
|
|
28
|
-
"name",
|
|
29
|
-
"workspaces"
|
|
30
|
-
]
|
|
31
|
-
});
|
|
32
|
-
static instances = /* @__PURE__ */ new Map();
|
|
33
|
-
path;
|
|
34
|
-
constructor() {
|
|
35
|
-
const oPath = getRepoRootDirpath();
|
|
36
|
-
if (MonoRepo.instances.has(oPath)) {
|
|
37
|
-
return MonoRepo.instances.get(oPath);
|
|
38
|
-
}
|
|
39
|
-
super(null);
|
|
40
|
-
this.path = oPath;
|
|
41
|
-
MonoRepo.instances.set(this.path, this);
|
|
42
|
-
}
|
|
43
|
-
get monoRepo() {
|
|
44
|
-
return this;
|
|
45
|
-
}
|
|
46
|
-
get packageJsonPath() {
|
|
47
|
-
return path.join(this.path, "package.json");
|
|
48
|
-
}
|
|
49
|
-
get tsconfigBaseJsonPath() {
|
|
50
|
-
return path.join(this.path, "tsconfig.json");
|
|
51
|
-
}
|
|
52
|
-
get tsconfigBase() {
|
|
53
|
-
const o = readJsonSync(this.tsconfigBaseJsonPath);
|
|
54
|
-
if (!o.compilerOptions) {
|
|
55
|
-
o.compilerOptions = {};
|
|
56
|
-
}
|
|
57
|
-
o.compilerOptions.paths = o.compilerOptions.paths || this.tsconfigBasePaths;
|
|
58
|
-
return o;
|
|
59
|
-
}
|
|
60
|
-
get tsconfigBasePathsJsonPath() {
|
|
61
|
-
return path.join(this.path, "tsconfig.paths.json");
|
|
62
|
-
}
|
|
63
|
-
get tsconfigBasePaths() {
|
|
64
|
-
if (!fs.existsSync(this.tsconfigBasePathsJsonPath)) {
|
|
65
|
-
return {};
|
|
66
|
-
}
|
|
67
|
-
return readJsonSync(this.tsconfigBasePathsJsonPath).compilerOptions?.paths ?? {};
|
|
68
|
-
}
|
|
69
|
-
get packageJson() {
|
|
70
|
-
return readJsonSync(this.packageJsonPath);
|
|
71
|
-
}
|
|
72
|
-
get name() {
|
|
73
|
-
if (!this.packageJson.name) {
|
|
74
|
-
throw new Error(`MonoRepo package.json missing 'name' field: ${this.packageJsonPath}`);
|
|
75
|
-
}
|
|
76
|
-
return this.packageJson.name;
|
|
77
|
-
}
|
|
78
|
-
get workspacesRootPaths() {
|
|
79
|
-
if (!this.packageJson.workspaces) {
|
|
80
|
-
throw new Error(`MonoRepo package.json missing 'workspaces' field: ${this.packageJsonPath}`);
|
|
81
|
-
}
|
|
82
|
-
return this.packageJson.workspaces.map((workspacePath) => {
|
|
83
|
-
return path.join(this.path, workspacePath.replace(/\*$/, ""));
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
get workspacePaths() {
|
|
87
|
-
return this.workspacesRootPaths.flatMap((workspacePath) => {
|
|
88
|
-
return fs.readdirSync(workspacePath, {
|
|
89
|
-
withFileTypes: true
|
|
90
|
-
}).filter((dirent) => {
|
|
91
|
-
return dirent.isDirectory();
|
|
92
|
-
}).map((dirent) => {
|
|
93
|
-
return path.join(workspacePath, dirent.name);
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
get workspaces() {
|
|
98
|
-
return this.workspacePaths.map((dirpath) => {
|
|
99
|
-
return new Workspace(this, dirpath);
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
_ts_decorate([
|
|
104
|
-
lazyProp(5e3),
|
|
105
|
-
_ts_metadata("design:type", void 0),
|
|
106
|
-
_ts_metadata("design:paramtypes", [])
|
|
107
|
-
], MonoRepo.prototype, "tsconfigBase", null);
|
|
108
|
-
_ts_decorate([
|
|
109
|
-
lazyProp(5e3),
|
|
110
|
-
_ts_metadata("design:type", typeof Record === "undefined" ? Object : Record),
|
|
111
|
-
_ts_metadata("design:paramtypes", [])
|
|
112
|
-
], MonoRepo.prototype, "tsconfigBasePaths", null);
|
|
113
|
-
_ts_decorate([
|
|
114
|
-
lazyProp(5e3),
|
|
115
|
-
_ts_metadata("design:type", typeof PackageJson === "undefined" ? Object : PackageJson),
|
|
116
|
-
_ts_metadata("design:paramtypes", [])
|
|
117
|
-
], MonoRepo.prototype, "packageJson", null);
|
|
118
|
-
_ts_decorate([
|
|
119
|
-
lazyProp(5e3),
|
|
120
|
-
_ts_metadata("design:type", void 0),
|
|
121
|
-
_ts_metadata("design:paramtypes", [])
|
|
122
|
-
], MonoRepo.prototype, "workspacePaths", null);
|
|
123
|
-
_ts_decorate([
|
|
124
|
-
lazyProp,
|
|
125
|
-
_ts_metadata("design:type", Array),
|
|
126
|
-
_ts_metadata("design:paramtypes", [])
|
|
127
|
-
], MonoRepo.prototype, "workspaces", null);
|
|
128
|
-
MonoRepo = _ts_decorate([
|
|
129
|
-
Parenting.compose,
|
|
130
|
-
_ts_metadata("design:type", Function),
|
|
131
|
-
_ts_metadata("design:paramtypes", [])
|
|
132
|
-
], MonoRepo);
|
|
133
|
-
|
|
134
|
-
export { MonoRepo };
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var AbstractBase = require('../common/AbstractBase');
|
|
4
|
-
var File = require('../file/File');
|
|
5
|
-
var composition = require('@mono/composition');
|
|
6
|
-
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
-
function _ts_decorate(decorators, target, key, desc) {
|
|
10
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
11
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
12
|
-
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;
|
|
13
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
|
-
}
|
|
15
|
-
__name(_ts_decorate, "_ts_decorate");
|
|
16
|
-
function _ts_metadata(k, v) {
|
|
17
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
18
|
-
}
|
|
19
|
-
__name(_ts_metadata, "_ts_metadata");
|
|
20
|
-
class AbstractCode extends AbstractBase.AbstractBase {
|
|
21
|
-
static {
|
|
22
|
-
__name(this, "AbstractCode");
|
|
23
|
-
}
|
|
24
|
-
static inspector = composition.Inspector.compose(AbstractCode, {
|
|
25
|
-
keys: []
|
|
26
|
-
});
|
|
27
|
-
static codePreviewOptions = {
|
|
28
|
-
maxLines: 10,
|
|
29
|
-
maxLineLength: 90
|
|
30
|
-
};
|
|
31
|
-
constructor(parent) {
|
|
32
|
-
super(parent);
|
|
33
|
-
}
|
|
34
|
-
get path() {
|
|
35
|
-
return this.getParentDeep(File.File).path;
|
|
36
|
-
}
|
|
37
|
-
get code() {
|
|
38
|
-
return this.toString();
|
|
39
|
-
}
|
|
40
|
-
get isMultiLine() {
|
|
41
|
-
return this.code.includes("\n");
|
|
42
|
-
}
|
|
43
|
-
get lines() {
|
|
44
|
-
return this.code.split(/\r*\n/);
|
|
45
|
-
}
|
|
46
|
-
get codePreview() {
|
|
47
|
-
const maxLines = AbstractCode.codePreviewOptions.maxLines;
|
|
48
|
-
const maxLineLength = AbstractCode.codePreviewOptions.maxLineLength;
|
|
49
|
-
const applyMaxLineLength = /* @__PURE__ */ __name((line) => {
|
|
50
|
-
return line.length > maxLineLength ? `${line.substring(0, maxLineLength - 3)}...` : line;
|
|
51
|
-
}, "applyMaxLineLength");
|
|
52
|
-
return this.isMultiLine ? this.lines.slice(0, maxLines).map(applyMaxLineLength) : applyMaxLineLength(this.code);
|
|
53
|
-
}
|
|
54
|
-
codeIndexRangeOf(code) {
|
|
55
|
-
const index = this.code.indexOf(code);
|
|
56
|
-
if (index === -1) {
|
|
57
|
-
throw new Error(`Code not found: ${code}`);
|
|
58
|
-
}
|
|
59
|
-
const lastIndex = index + code.length;
|
|
60
|
-
return {
|
|
61
|
-
index,
|
|
62
|
-
lastIndex
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
getCodeRange(range) {
|
|
66
|
-
return this.code.substring(range.index, range.lastIndex);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
AbstractCode = _ts_decorate([
|
|
70
|
-
composition.Parenting.compose,
|
|
71
|
-
_ts_metadata("design:type", Function),
|
|
72
|
-
_ts_metadata("design:paramtypes", [
|
|
73
|
-
typeof P === "undefined" ? Object : P
|
|
74
|
-
])
|
|
75
|
-
], AbstractCode);
|
|
76
|
-
|
|
77
|
-
exports.AbstractCode = AbstractCode;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { A as AbstractBase, I as InspectorOptions } from '../AbstractBase-J4h6nW8k.cjs';
|
|
2
|
-
import 'util';
|
|
3
|
-
import 'mnemonist';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Abstract base class for representing code structures in the monorepo with inspection and preview capabilities.
|
|
7
|
-
*/
|
|
8
|
-
declare abstract class AbstractCode<P extends AbstractBase = AbstractBase> extends AbstractBase<P> {
|
|
9
|
-
static readonly inspector: InspectorOptions;
|
|
10
|
-
static readonly codePreviewOptions: {
|
|
11
|
-
maxLines: number;
|
|
12
|
-
maxLineLength: number;
|
|
13
|
-
};
|
|
14
|
-
constructor(parent: P);
|
|
15
|
-
get path(): string;
|
|
16
|
-
get code(): string;
|
|
17
|
-
get isMultiLine(): boolean;
|
|
18
|
-
get lines(): string[];
|
|
19
|
-
get codePreview(): string | string[];
|
|
20
|
-
codeIndexRangeOf(code: string): {
|
|
21
|
-
index: number;
|
|
22
|
-
lastIndex: number;
|
|
23
|
-
};
|
|
24
|
-
getCodeRange(range: {
|
|
25
|
-
index: number;
|
|
26
|
-
lastIndex: number;
|
|
27
|
-
}): string;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { AbstractCode };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { A as AbstractBase, I as InspectorOptions } from '../AbstractBase-J4h6nW8k.js';
|
|
2
|
-
import 'util';
|
|
3
|
-
import 'mnemonist';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Abstract base class for representing code structures in the monorepo with inspection and preview capabilities.
|
|
7
|
-
*/
|
|
8
|
-
declare abstract class AbstractCode<P extends AbstractBase = AbstractBase> extends AbstractBase<P> {
|
|
9
|
-
static readonly inspector: InspectorOptions;
|
|
10
|
-
static readonly codePreviewOptions: {
|
|
11
|
-
maxLines: number;
|
|
12
|
-
maxLineLength: number;
|
|
13
|
-
};
|
|
14
|
-
constructor(parent: P);
|
|
15
|
-
get path(): string;
|
|
16
|
-
get code(): string;
|
|
17
|
-
get isMultiLine(): boolean;
|
|
18
|
-
get lines(): string[];
|
|
19
|
-
get codePreview(): string | string[];
|
|
20
|
-
codeIndexRangeOf(code: string): {
|
|
21
|
-
index: number;
|
|
22
|
-
lastIndex: number;
|
|
23
|
-
};
|
|
24
|
-
getCodeRange(range: {
|
|
25
|
-
index: number;
|
|
26
|
-
lastIndex: number;
|
|
27
|
-
}): string;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { AbstractCode };
|
package/lib/code/AbstractCode.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { __name } from '../chunk-SHUYVCID.js';
|
|
2
|
-
import { AbstractBase } from '../common/AbstractBase';
|
|
3
|
-
import { File } from '../file/File';
|
|
4
|
-
import { Inspector, Parenting } from '@mono/composition';
|
|
5
|
-
|
|
6
|
-
function _ts_decorate(decorators, target, key, desc) {
|
|
7
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
9
|
-
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;
|
|
10
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
11
|
-
}
|
|
12
|
-
__name(_ts_decorate, "_ts_decorate");
|
|
13
|
-
function _ts_metadata(k, v) {
|
|
14
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
15
|
-
}
|
|
16
|
-
__name(_ts_metadata, "_ts_metadata");
|
|
17
|
-
class AbstractCode extends AbstractBase {
|
|
18
|
-
static {
|
|
19
|
-
__name(this, "AbstractCode");
|
|
20
|
-
}
|
|
21
|
-
static inspector = Inspector.compose(AbstractCode, {
|
|
22
|
-
keys: []
|
|
23
|
-
});
|
|
24
|
-
static codePreviewOptions = {
|
|
25
|
-
maxLines: 10,
|
|
26
|
-
maxLineLength: 90
|
|
27
|
-
};
|
|
28
|
-
constructor(parent) {
|
|
29
|
-
super(parent);
|
|
30
|
-
}
|
|
31
|
-
get path() {
|
|
32
|
-
return this.getParentDeep(File).path;
|
|
33
|
-
}
|
|
34
|
-
get code() {
|
|
35
|
-
return this.toString();
|
|
36
|
-
}
|
|
37
|
-
get isMultiLine() {
|
|
38
|
-
return this.code.includes("\n");
|
|
39
|
-
}
|
|
40
|
-
get lines() {
|
|
41
|
-
return this.code.split(/\r*\n/);
|
|
42
|
-
}
|
|
43
|
-
get codePreview() {
|
|
44
|
-
const maxLines = AbstractCode.codePreviewOptions.maxLines;
|
|
45
|
-
const maxLineLength = AbstractCode.codePreviewOptions.maxLineLength;
|
|
46
|
-
const applyMaxLineLength = /* @__PURE__ */ __name((line) => {
|
|
47
|
-
return line.length > maxLineLength ? `${line.substring(0, maxLineLength - 3)}...` : line;
|
|
48
|
-
}, "applyMaxLineLength");
|
|
49
|
-
return this.isMultiLine ? this.lines.slice(0, maxLines).map(applyMaxLineLength) : applyMaxLineLength(this.code);
|
|
50
|
-
}
|
|
51
|
-
codeIndexRangeOf(code) {
|
|
52
|
-
const index = this.code.indexOf(code);
|
|
53
|
-
if (index === -1) {
|
|
54
|
-
throw new Error(`Code not found: ${code}`);
|
|
55
|
-
}
|
|
56
|
-
const lastIndex = index + code.length;
|
|
57
|
-
return {
|
|
58
|
-
index,
|
|
59
|
-
lastIndex
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
getCodeRange(range) {
|
|
63
|
-
return this.code.substring(range.index, range.lastIndex);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
AbstractCode = _ts_decorate([
|
|
67
|
-
Parenting.compose,
|
|
68
|
-
_ts_metadata("design:type", Function),
|
|
69
|
-
_ts_metadata("design:paramtypes", [
|
|
70
|
-
typeof P === "undefined" ? Object : P
|
|
71
|
-
])
|
|
72
|
-
], AbstractCode);
|
|
73
|
-
|
|
74
|
-
export { AbstractCode };
|
package/lib/code/CodeBlock.cjs
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var AbstractCode = require('./AbstractCode');
|
|
4
|
-
var composition = require('@mono/composition');
|
|
5
|
-
var decorators = require('@mono/decorators');
|
|
6
|
-
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
-
function _ts_decorate(decorators, target, key, desc) {
|
|
10
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
11
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
12
|
-
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;
|
|
13
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
|
-
}
|
|
15
|
-
__name(_ts_decorate, "_ts_decorate");
|
|
16
|
-
function _ts_metadata(k, v) {
|
|
17
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
18
|
-
}
|
|
19
|
-
__name(_ts_metadata, "_ts_metadata");
|
|
20
|
-
class CodeBlock extends AbstractCode.AbstractCode {
|
|
21
|
-
static {
|
|
22
|
-
__name(this, "CodeBlock");
|
|
23
|
-
}
|
|
24
|
-
static inspector = composition.Inspector.compose(CodeBlock, {
|
|
25
|
-
keys: []
|
|
26
|
-
});
|
|
27
|
-
indexRange;
|
|
28
|
-
constructor(parent, indexRange) {
|
|
29
|
-
super(parent);
|
|
30
|
-
this.indexRange = indexRange;
|
|
31
|
-
}
|
|
32
|
-
toString() {
|
|
33
|
-
return this.parenting.getParent().getCodeRange(this.indexRange);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
_ts_decorate([
|
|
37
|
-
decorators.lazyProp(2500),
|
|
38
|
-
_ts_metadata("design:type", Function),
|
|
39
|
-
_ts_metadata("design:paramtypes", []),
|
|
40
|
-
_ts_metadata("design:returntype", String)
|
|
41
|
-
], CodeBlock.prototype, "toString", null);
|
|
42
|
-
CodeBlock = _ts_decorate([
|
|
43
|
-
composition.Parenting.compose,
|
|
44
|
-
_ts_metadata("design:type", Function),
|
|
45
|
-
_ts_metadata("design:paramtypes", [
|
|
46
|
-
typeof P === "undefined" ? Object : P,
|
|
47
|
-
Object
|
|
48
|
-
])
|
|
49
|
-
], CodeBlock);
|
|
50
|
-
|
|
51
|
-
exports.CodeBlock = CodeBlock;
|
package/lib/code/CodeBlock.d.cts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { I as InspectorOptions } from '../AbstractBase-J4h6nW8k.cjs';
|
|
2
|
-
import { AbstractCode } from './AbstractCode.cjs';
|
|
3
|
-
import 'util';
|
|
4
|
-
import 'mnemonist';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Represents a block of code within a larger code structure, defined by an index range.
|
|
8
|
-
*/
|
|
9
|
-
declare class CodeBlock<P extends AbstractCode = AbstractCode> extends AbstractCode<P> {
|
|
10
|
-
static readonly inspector: InspectorOptions;
|
|
11
|
-
readonly indexRange: {
|
|
12
|
-
index: number;
|
|
13
|
-
lastIndex: number;
|
|
14
|
-
};
|
|
15
|
-
constructor(parent: P, indexRange: {
|
|
16
|
-
index: number;
|
|
17
|
-
lastIndex: number;
|
|
18
|
-
});
|
|
19
|
-
toString(): string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { CodeBlock };
|
package/lib/code/CodeBlock.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { I as InspectorOptions } from '../AbstractBase-J4h6nW8k.js';
|
|
2
|
-
import { AbstractCode } from './AbstractCode.js';
|
|
3
|
-
import 'util';
|
|
4
|
-
import 'mnemonist';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Represents a block of code within a larger code structure, defined by an index range.
|
|
8
|
-
*/
|
|
9
|
-
declare class CodeBlock<P extends AbstractCode = AbstractCode> extends AbstractCode<P> {
|
|
10
|
-
static readonly inspector: InspectorOptions;
|
|
11
|
-
readonly indexRange: {
|
|
12
|
-
index: number;
|
|
13
|
-
lastIndex: number;
|
|
14
|
-
};
|
|
15
|
-
constructor(parent: P, indexRange: {
|
|
16
|
-
index: number;
|
|
17
|
-
lastIndex: number;
|
|
18
|
-
});
|
|
19
|
-
toString(): string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { CodeBlock };
|
package/lib/code/CodeBlock.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { __name } from '../chunk-SHUYVCID.js';
|
|
2
|
-
import { AbstractCode } from './AbstractCode';
|
|
3
|
-
import { Inspector, Parenting } from '@mono/composition';
|
|
4
|
-
import { lazyProp } from '@mono/decorators';
|
|
5
|
-
|
|
6
|
-
function _ts_decorate(decorators, target, key, desc) {
|
|
7
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
9
|
-
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;
|
|
10
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
11
|
-
}
|
|
12
|
-
__name(_ts_decorate, "_ts_decorate");
|
|
13
|
-
function _ts_metadata(k, v) {
|
|
14
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
15
|
-
}
|
|
16
|
-
__name(_ts_metadata, "_ts_metadata");
|
|
17
|
-
class CodeBlock extends AbstractCode {
|
|
18
|
-
static {
|
|
19
|
-
__name(this, "CodeBlock");
|
|
20
|
-
}
|
|
21
|
-
static inspector = Inspector.compose(CodeBlock, {
|
|
22
|
-
keys: []
|
|
23
|
-
});
|
|
24
|
-
indexRange;
|
|
25
|
-
constructor(parent, indexRange) {
|
|
26
|
-
super(parent);
|
|
27
|
-
this.indexRange = indexRange;
|
|
28
|
-
}
|
|
29
|
-
toString() {
|
|
30
|
-
return this.parenting.getParent().getCodeRange(this.indexRange);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
_ts_decorate([
|
|
34
|
-
lazyProp(2500),
|
|
35
|
-
_ts_metadata("design:type", Function),
|
|
36
|
-
_ts_metadata("design:paramtypes", []),
|
|
37
|
-
_ts_metadata("design:returntype", String)
|
|
38
|
-
], CodeBlock.prototype, "toString", null);
|
|
39
|
-
CodeBlock = _ts_decorate([
|
|
40
|
-
Parenting.compose,
|
|
41
|
-
_ts_metadata("design:type", Function),
|
|
42
|
-
_ts_metadata("design:paramtypes", [
|
|
43
|
-
typeof P === "undefined" ? Object : P,
|
|
44
|
-
Object
|
|
45
|
-
])
|
|
46
|
-
], CodeBlock);
|
|
47
|
-
|
|
48
|
-
export { CodeBlock };
|