@reliverse/dler 1.7.152 → 1.7.153
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/bin/impl/auth/impl/init.d.ts +2 -2
- package/bin/impl/build/impl.d.ts +7 -1
- package/bin/impl/build/impl.js +161 -1
- package/bin/impl/config/constants.d.ts +1 -1
- package/bin/impl/config/constants.js +1 -1
- package/bin/impl/providers/better-t-stack/types.d.ts +7 -7
- package/bin/impl/pub/impl.d.ts +6 -1
- package/bin/impl/pub/impl.js +176 -2
- package/bin/impl/schema/mod.d.ts +140 -0
- package/bin/impl/schema/mod.js +22 -0
- package/bin/impl/utils/workspace-prompt.d.ts +9 -0
- package/bin/impl/utils/workspace-prompt.js +46 -0
- package/bin/impl/utils/workspace-utils.d.ts +28 -0
- package/bin/impl/utils/workspace-utils.js +127 -0
- package/bin/mod.d.ts +2 -9
- package/bin/mod.js +9 -23
- package/package.json +2 -1
- package/bin/impl/migrate/codemods/anything-bun.d.ts +0 -5
- package/bin/impl/migrate/codemods/anything-bun.js +0 -577
- package/bin/impl/migrate/codemods/commander-rempts.d.ts +0 -4
- package/bin/impl/migrate/codemods/commander-rempts.js +0 -250
- package/bin/impl/migrate/codemods/console-relinka.d.ts +0 -3
- package/bin/impl/migrate/codemods/console-relinka.js +0 -142
- package/bin/impl/migrate/codemods/fs-relifso.d.ts +0 -8
- package/bin/impl/migrate/codemods/fs-relifso.js +0 -156
- package/bin/impl/migrate/codemods/monorepo-catalog.d.ts +0 -96
- package/bin/impl/migrate/codemods/monorepo-catalog.js +0 -517
- package/bin/impl/migrate/codemods/nodenext-bundler.d.ts +0 -10
- package/bin/impl/migrate/codemods/nodenext-bundler.js +0 -222
- package/bin/impl/migrate/codemods/path-pathkit.d.ts +0 -8
- package/bin/impl/migrate/codemods/path-pathkit.js +0 -143
- package/bin/impl/migrate/codemods/readdir-glob.d.ts +0 -8
- package/bin/impl/migrate/codemods/readdir-glob.js +0 -133
package/bin/impl/schema/mod.d.ts
CHANGED
|
@@ -99,6 +99,80 @@ export interface ReliverseConfig {
|
|
|
99
99
|
packages?: string[];
|
|
100
100
|
sharedPackages?: string[];
|
|
101
101
|
};
|
|
102
|
+
/**
|
|
103
|
+
* Configuration for workspace auto-detection and management.
|
|
104
|
+
* Enables automatic discovery and processing of workspace packages.
|
|
105
|
+
*/
|
|
106
|
+
monorepoWorkspaces?: {
|
|
107
|
+
/**
|
|
108
|
+
* When `true`, enables workspace auto-detection for build and publish commands.
|
|
109
|
+
* When `false`, workspace detection is disabled and commands work on the main project only.
|
|
110
|
+
*
|
|
111
|
+
* @default true
|
|
112
|
+
*/
|
|
113
|
+
enabled: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* When `true`, automatically discovers publishable packages from workspace configuration.
|
|
116
|
+
* When `false`, packages must be manually configured in libsList.
|
|
117
|
+
*
|
|
118
|
+
* @default true
|
|
119
|
+
*/
|
|
120
|
+
autoDiscoverPackages: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Controls the order in which packages are processed:
|
|
123
|
+
* - `dependency`: Packages are processed in dependency order (dependencies first)
|
|
124
|
+
* - `parallel`: All packages are processed in parallel (faster but may fail if dependencies aren't met)
|
|
125
|
+
*
|
|
126
|
+
* @default "dependency"
|
|
127
|
+
*/
|
|
128
|
+
buildOrder: "dependency" | "parallel";
|
|
129
|
+
/**
|
|
130
|
+
* Additional glob patterns to include packages beyond workspace configuration.
|
|
131
|
+
* These patterns are merged with the workspace patterns from package.json.
|
|
132
|
+
*
|
|
133
|
+
* @example ["examples/*", "tools/*"]
|
|
134
|
+
* @default []
|
|
135
|
+
*/
|
|
136
|
+
includePatterns: string[];
|
|
137
|
+
/**
|
|
138
|
+
* Glob patterns to exclude packages from processing.
|
|
139
|
+
* Useful for excluding test packages or development tools.
|
|
140
|
+
*
|
|
141
|
+
* @example ["examples/*", "test-*"]
|
|
142
|
+
* @default []
|
|
143
|
+
*/
|
|
144
|
+
excludePatterns: string[];
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* Configuration for monorepo caching features.
|
|
148
|
+
* Enables smart caching to skip rebuilding unchanged packages.
|
|
149
|
+
*/
|
|
150
|
+
monorepoCache?: {
|
|
151
|
+
/**
|
|
152
|
+
* When `true`, enables smart caching for monorepo packages.
|
|
153
|
+
* Packages are only rebuilt if their source files have changed.
|
|
154
|
+
*
|
|
155
|
+
* @default false
|
|
156
|
+
*/
|
|
157
|
+
enabled: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Output directory for cached builds.
|
|
160
|
+
* Each package's build output is cached in a subdirectory.
|
|
161
|
+
*
|
|
162
|
+
* @default "dist"
|
|
163
|
+
*/
|
|
164
|
+
outDir: string;
|
|
165
|
+
/**
|
|
166
|
+
* Glob patterns for files to include in cache hash calculation.
|
|
167
|
+
* Only changes to these files will trigger a rebuild.
|
|
168
|
+
*/
|
|
169
|
+
include: string[];
|
|
170
|
+
/**
|
|
171
|
+
* Glob patterns for files to exclude from cache hash calculation.
|
|
172
|
+
* Changes to these files will not trigger a rebuild.
|
|
173
|
+
*/
|
|
174
|
+
exclude: string[];
|
|
175
|
+
};
|
|
102
176
|
ignoreDependencies?: string[];
|
|
103
177
|
customRules?: Record<string, unknown>;
|
|
104
178
|
multipleRepoCloneMode?: boolean;
|
|
@@ -1118,6 +1192,72 @@ export declare const defineConfig: (userConfig?: Partial<ReliverseConfig>) => {
|
|
|
1118
1192
|
packages?: string[];
|
|
1119
1193
|
sharedPackages?: string[];
|
|
1120
1194
|
};
|
|
1195
|
+
monorepoWorkspaces?: {
|
|
1196
|
+
/**
|
|
1197
|
+
* When `true`, enables workspace auto-detection for build and publish commands.
|
|
1198
|
+
* When `false`, workspace detection is disabled and commands work on the main project only.
|
|
1199
|
+
*
|
|
1200
|
+
* @default true
|
|
1201
|
+
*/
|
|
1202
|
+
enabled: boolean;
|
|
1203
|
+
/**
|
|
1204
|
+
* When `true`, automatically discovers publishable packages from workspace configuration.
|
|
1205
|
+
* When `false`, packages must be manually configured in libsList.
|
|
1206
|
+
*
|
|
1207
|
+
* @default true
|
|
1208
|
+
*/
|
|
1209
|
+
autoDiscoverPackages: boolean;
|
|
1210
|
+
/**
|
|
1211
|
+
* Controls the order in which packages are processed:
|
|
1212
|
+
* - `dependency`: Packages are processed in dependency order (dependencies first)
|
|
1213
|
+
* - `parallel`: All packages are processed in parallel (faster but may fail if dependencies aren't met)
|
|
1214
|
+
*
|
|
1215
|
+
* @default "dependency"
|
|
1216
|
+
*/
|
|
1217
|
+
buildOrder: "dependency" | "parallel";
|
|
1218
|
+
/**
|
|
1219
|
+
* Additional glob patterns to include packages beyond workspace configuration.
|
|
1220
|
+
* These patterns are merged with the workspace patterns from package.json.
|
|
1221
|
+
*
|
|
1222
|
+
* @example ["examples/*", "tools/*"]
|
|
1223
|
+
* @default []
|
|
1224
|
+
*/
|
|
1225
|
+
includePatterns: string[];
|
|
1226
|
+
/**
|
|
1227
|
+
* Glob patterns to exclude packages from processing.
|
|
1228
|
+
* Useful for excluding test packages or development tools.
|
|
1229
|
+
*
|
|
1230
|
+
* @example ["examples/*", "test-*"]
|
|
1231
|
+
* @default []
|
|
1232
|
+
*/
|
|
1233
|
+
excludePatterns: string[];
|
|
1234
|
+
};
|
|
1235
|
+
monorepoCache?: {
|
|
1236
|
+
/**
|
|
1237
|
+
* When `true`, enables smart caching for monorepo packages.
|
|
1238
|
+
* Packages are only rebuilt if their source files have changed.
|
|
1239
|
+
*
|
|
1240
|
+
* @default false
|
|
1241
|
+
*/
|
|
1242
|
+
enabled: boolean;
|
|
1243
|
+
/**
|
|
1244
|
+
* Output directory for cached builds.
|
|
1245
|
+
* Each package's build output is cached in a subdirectory.
|
|
1246
|
+
*
|
|
1247
|
+
* @default "dist"
|
|
1248
|
+
*/
|
|
1249
|
+
outDir: string;
|
|
1250
|
+
/**
|
|
1251
|
+
* Glob patterns for files to include in cache hash calculation.
|
|
1252
|
+
* Only changes to these files will trigger a rebuild.
|
|
1253
|
+
*/
|
|
1254
|
+
include: string[];
|
|
1255
|
+
/**
|
|
1256
|
+
* Glob patterns for files to exclude from cache hash calculation.
|
|
1257
|
+
* Changes to these files will not trigger a rebuild.
|
|
1258
|
+
*/
|
|
1259
|
+
exclude: string[];
|
|
1260
|
+
};
|
|
1121
1261
|
ignoreDependencies?: string[];
|
|
1122
1262
|
customRules?: Record<string, unknown>;
|
|
1123
1263
|
multipleRepoCloneMode?: boolean;
|
package/bin/impl/schema/mod.js
CHANGED
|
@@ -239,6 +239,28 @@ export const DEFAULT_CONFIG_RELIVERSE = {
|
|
|
239
239
|
packages: [],
|
|
240
240
|
sharedPackages: []
|
|
241
241
|
},
|
|
242
|
+
// Monorepo Workspaces Configuration
|
|
243
|
+
monorepoWorkspaces: {
|
|
244
|
+
enabled: true,
|
|
245
|
+
autoDiscoverPackages: true,
|
|
246
|
+
buildOrder: "dependency",
|
|
247
|
+
includePatterns: [],
|
|
248
|
+
excludePatterns: []
|
|
249
|
+
},
|
|
250
|
+
// Monorepo Cache Configuration
|
|
251
|
+
monorepoCache: {
|
|
252
|
+
enabled: false,
|
|
253
|
+
outDir: "dist",
|
|
254
|
+
include: ["src/**/*"],
|
|
255
|
+
exclude: [
|
|
256
|
+
"**/__tests__/**",
|
|
257
|
+
"**/__mocks__/**",
|
|
258
|
+
"**/*.test.*",
|
|
259
|
+
"**/e2e/**",
|
|
260
|
+
"**/dist/**",
|
|
261
|
+
"**/.output/**"
|
|
262
|
+
]
|
|
263
|
+
},
|
|
242
264
|
// List dependencies to exclude from checks
|
|
243
265
|
ignoreDependencies: [],
|
|
244
266
|
// Provide custom rules for Rse AI
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { WorkspacePackage } from "./workspace-utils";
|
|
2
|
+
/**
|
|
3
|
+
* Prompts user to select workspace packages for build or publish operations
|
|
4
|
+
*/
|
|
5
|
+
export declare function promptWorkspacePackages(packages: WorkspacePackage[], command: "build" | "publish", skipPrompt?: boolean): Promise<WorkspacePackage[]>;
|
|
6
|
+
/**
|
|
7
|
+
* Shows a summary of selected packages and their dependency order
|
|
8
|
+
*/
|
|
9
|
+
export declare function showPackageSummary(packages: WorkspacePackage[], command: "build" | "publish"): void;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { re } from "@reliverse/relico";
|
|
2
|
+
import { cancel, isCancel, multiselectPrompt } from "@reliverse/rempts";
|
|
3
|
+
export async function promptWorkspacePackages(packages, command, skipPrompt = false) {
|
|
4
|
+
if (packages.length === 0) {
|
|
5
|
+
return [];
|
|
6
|
+
}
|
|
7
|
+
const sortedPackages = packages.sort((a, b) => {
|
|
8
|
+
if (a.workspaceDependencies.includes(b.name)) return 1;
|
|
9
|
+
if (b.workspaceDependencies.includes(a.name)) return -1;
|
|
10
|
+
return a.name.localeCompare(b.name);
|
|
11
|
+
});
|
|
12
|
+
if (skipPrompt) {
|
|
13
|
+
return sortedPackages;
|
|
14
|
+
}
|
|
15
|
+
const options = sortedPackages.map((pkg) => ({
|
|
16
|
+
label: `${pkg.name} ${re.dim(`(${pkg.version})`)}`,
|
|
17
|
+
value: pkg.name,
|
|
18
|
+
hint: pkg.workspaceDependencies.length > 0 ? `Depends on: ${pkg.workspaceDependencies.join(", ")}` : "No workspace dependencies"
|
|
19
|
+
}));
|
|
20
|
+
const title = command === "build" ? "Select packages to build" : "Select packages to publish";
|
|
21
|
+
const content = command === "build" ? "Choose which workspace packages to build. Packages will be built in dependency order." : "Choose which workspace packages to publish. Packages will be built and published in dependency order.";
|
|
22
|
+
const selectedPackageNames = await multiselectPrompt({
|
|
23
|
+
title,
|
|
24
|
+
content,
|
|
25
|
+
options,
|
|
26
|
+
defaultValue: packages.map((pkg) => pkg.name),
|
|
27
|
+
// Select all by default
|
|
28
|
+
displayInstructions: true
|
|
29
|
+
});
|
|
30
|
+
if (isCancel(selectedPackageNames)) {
|
|
31
|
+
cancel(re.red("Operation cancelled"));
|
|
32
|
+
process.exit(0);
|
|
33
|
+
}
|
|
34
|
+
const selectedPackages = selectedPackageNames.map((name) => packages.find((pkg) => pkg.name === name)).filter((pkg) => pkg !== void 0);
|
|
35
|
+
return selectedPackages;
|
|
36
|
+
}
|
|
37
|
+
export function showPackageSummary(packages, command) {
|
|
38
|
+
const action = command === "build" ? "Building" : "Publishing";
|
|
39
|
+
console.log(`
|
|
40
|
+
${re.cyan(`${action} ${packages.length} package(s) in dependency order:`)}`);
|
|
41
|
+
packages.forEach((pkg, index) => {
|
|
42
|
+
const deps = pkg.workspaceDependencies.length > 0 ? ` ${re.dim(`(depends on: ${pkg.workspaceDependencies.join(", ")})`)}` : "";
|
|
43
|
+
console.log(` ${index + 1}. ${re.green(pkg.name)} ${re.dim(`v${pkg.version}`)}${deps}`);
|
|
44
|
+
});
|
|
45
|
+
console.log();
|
|
46
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface WorkspacePackage {
|
|
2
|
+
name: string;
|
|
3
|
+
path: string;
|
|
4
|
+
packageJsonPath: string;
|
|
5
|
+
version: string;
|
|
6
|
+
private: boolean;
|
|
7
|
+
dependencies: string[];
|
|
8
|
+
workspaceDependencies: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface WorkspaceConfig {
|
|
11
|
+
enabled: boolean;
|
|
12
|
+
autoDiscoverPackages: boolean;
|
|
13
|
+
buildOrder: "dependency" | "parallel";
|
|
14
|
+
includePatterns: string[];
|
|
15
|
+
excludePatterns: string[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Detects if the current directory has workspace configuration and returns publishable packages
|
|
19
|
+
*/
|
|
20
|
+
export declare function detectWorkspaces(cwd: string): Promise<WorkspacePackage[] | null>;
|
|
21
|
+
/**
|
|
22
|
+
* Sorts packages by their dependencies to ensure correct build/publish order
|
|
23
|
+
*/
|
|
24
|
+
export declare function sortPackagesByDependencies(packages: WorkspacePackage[]): WorkspacePackage[];
|
|
25
|
+
/**
|
|
26
|
+
* Filters packages based on include/exclude patterns
|
|
27
|
+
*/
|
|
28
|
+
export declare function filterPackagesByPatterns(packages: WorkspacePackage[], includePatterns: string[], excludePatterns: string[]): WorkspacePackage[];
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import path from "@reliverse/pathkit";
|
|
2
|
+
import fs from "@reliverse/relifso";
|
|
3
|
+
import { relinka } from "@reliverse/relinka";
|
|
4
|
+
import { glob } from "glob";
|
|
5
|
+
import { readPackageJson } from "../monorepo/monorepo-mod.js";
|
|
6
|
+
export async function detectWorkspaces(cwd) {
|
|
7
|
+
const packageJsonPath = path.join(cwd, "package.json");
|
|
8
|
+
if (!await fs.pathExists(packageJsonPath)) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
try {
|
|
12
|
+
const packageJsonContent = await fs.readFile(packageJsonPath, "utf-8");
|
|
13
|
+
const packageJson = JSON.parse(packageJsonContent);
|
|
14
|
+
let workspaceGlobs = [];
|
|
15
|
+
if (packageJson.workspaces) {
|
|
16
|
+
if (Array.isArray(packageJson.workspaces)) {
|
|
17
|
+
workspaceGlobs = packageJson.workspaces;
|
|
18
|
+
} else if (typeof packageJson.workspaces === "object" && packageJson.workspaces.packages) {
|
|
19
|
+
workspaceGlobs = Array.isArray(packageJson.workspaces.packages) ? packageJson.workspaces.packages : [];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (workspaceGlobs.length === 0) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
relinka("verbose", `Found workspace configuration with patterns: ${workspaceGlobs.join(", ")}`);
|
|
26
|
+
const packageJsonPaths = [];
|
|
27
|
+
for (const pattern of workspaceGlobs) {
|
|
28
|
+
const searchPattern = path.join(cwd, pattern, "package.json");
|
|
29
|
+
const matches = await glob(searchPattern, { cwd });
|
|
30
|
+
packageJsonPaths.push(...matches.map((match) => path.resolve(cwd, match)));
|
|
31
|
+
}
|
|
32
|
+
const uniquePackageJsonPaths = [...new Set(packageJsonPaths)];
|
|
33
|
+
relinka("verbose", `Found ${uniquePackageJsonPaths.length} package.json files in workspace`);
|
|
34
|
+
const packages = [];
|
|
35
|
+
for (const packageJsonPath2 of uniquePackageJsonPaths) {
|
|
36
|
+
const pkg = await readPackageJson(packageJsonPath2);
|
|
37
|
+
if (!pkg) {
|
|
38
|
+
relinka("verbose", `Skipping invalid package.json at ${packageJsonPath2}`);
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
try {
|
|
42
|
+
const rawContent = await fs.readFile(packageJsonPath2, "utf-8");
|
|
43
|
+
const rawPkg = JSON.parse(rawContent);
|
|
44
|
+
if (!rawPkg.name || rawPkg.private === true) {
|
|
45
|
+
relinka(
|
|
46
|
+
"verbose",
|
|
47
|
+
`Skipping package ${rawPkg.name || "unnamed"} (${rawPkg.private ? "private" : "no name"})`
|
|
48
|
+
);
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
const workspaceDependencies = [];
|
|
52
|
+
const allDeps = { ...rawPkg.dependencies, ...rawPkg.devDependencies };
|
|
53
|
+
for (const [depName, version] of Object.entries(allDeps)) {
|
|
54
|
+
if (typeof version === "string" && version.startsWith("workspace:")) {
|
|
55
|
+
workspaceDependencies.push(depName);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
packages.push({
|
|
59
|
+
name: rawPkg.name,
|
|
60
|
+
path: path.dirname(packageJsonPath2),
|
|
61
|
+
packageJsonPath: packageJsonPath2,
|
|
62
|
+
version: rawPkg.version || "0.0.0",
|
|
63
|
+
private: rawPkg.private === true,
|
|
64
|
+
dependencies: Object.keys(allDeps),
|
|
65
|
+
workspaceDependencies
|
|
66
|
+
});
|
|
67
|
+
relinka("verbose", `Added package: ${rawPkg.name} (${rawPkg.version})`);
|
|
68
|
+
} catch (error) {
|
|
69
|
+
relinka("warn", `Failed to read package.json at ${packageJsonPath2}: ${error}`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
relinka("verbose", `Found ${packages.length} publishable packages in workspace`);
|
|
73
|
+
return packages.length > 0 ? packages : null;
|
|
74
|
+
} catch (error) {
|
|
75
|
+
relinka("warn", `Failed to detect workspaces: ${error}`);
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
export function sortPackagesByDependencies(packages) {
|
|
80
|
+
const sorted = [];
|
|
81
|
+
const visited = /* @__PURE__ */ new Set();
|
|
82
|
+
const visiting = /* @__PURE__ */ new Set();
|
|
83
|
+
function visit(pkg) {
|
|
84
|
+
if (visiting.has(pkg.name)) {
|
|
85
|
+
relinka("warn", `Circular dependency detected involving package: ${pkg.name}`);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (visited.has(pkg.name)) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
visiting.add(pkg.name);
|
|
92
|
+
for (const depName of pkg.workspaceDependencies) {
|
|
93
|
+
const depPkg = packages.find((p) => p.name === depName);
|
|
94
|
+
if (depPkg) {
|
|
95
|
+
visit(depPkg);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
visiting.delete(pkg.name);
|
|
99
|
+
visited.add(pkg.name);
|
|
100
|
+
sorted.push(pkg);
|
|
101
|
+
}
|
|
102
|
+
for (const pkg of packages) {
|
|
103
|
+
visit(pkg);
|
|
104
|
+
}
|
|
105
|
+
relinka("verbose", `Sorted packages by dependencies: ${sorted.map((p) => p.name).join(" -> ")}`);
|
|
106
|
+
return sorted;
|
|
107
|
+
}
|
|
108
|
+
export function filterPackagesByPatterns(packages, includePatterns, excludePatterns) {
|
|
109
|
+
let filtered = packages;
|
|
110
|
+
if (includePatterns.length > 0) {
|
|
111
|
+
filtered = filtered.filter(
|
|
112
|
+
(pkg) => includePatterns.some((pattern) => {
|
|
113
|
+
const regex = new RegExp(pattern.replace(/\*/g, ".*"));
|
|
114
|
+
return regex.test(pkg.name) || regex.test(pkg.path);
|
|
115
|
+
})
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
if (excludePatterns.length > 0) {
|
|
119
|
+
filtered = filtered.filter(
|
|
120
|
+
(pkg) => !excludePatterns.some((pattern) => {
|
|
121
|
+
const regex = new RegExp(pattern.replace(/\*/g, ".*"));
|
|
122
|
+
return regex.test(pkg.name) || regex.test(pkg.path);
|
|
123
|
+
})
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
return filtered;
|
|
127
|
+
}
|
package/bin/mod.d.ts
CHANGED
|
@@ -191,15 +191,6 @@ export { applyMagicSpells, getAllAvailableRegistries, getFilesWithMagicSpells, p
|
|
|
191
191
|
export type { SpellDirective, SpellEvaluationContext, SpellInfo, SpellOutcome, } from "./impl/magic/magic-spells";
|
|
192
192
|
export { evaluateMagicDirective, getAvailableSpells } from "./impl/magic/magic-spells";
|
|
193
193
|
export { DEFAULT_IGNORES, DEFAULT_SEPARATOR_RAW, normalizeGlobPattern, parseCSV, processSection, unescape, writeFilesPreserveStructure, writeResult, } from "./impl/merge/mod";
|
|
194
|
-
export { migrateAnythingToBun } from "./impl/migrate/codemods/anything-bun";
|
|
195
|
-
export { commanderToRempts } from "./impl/migrate/codemods/commander-rempts";
|
|
196
|
-
export { consoleToRelinka } from "./impl/migrate/codemods/console-relinka";
|
|
197
|
-
export { migrateFsToRelifso } from "./impl/migrate/codemods/fs-relifso";
|
|
198
|
-
export type { CatalogMergeResult, DependencyEntry, MigrationResult, } from "./impl/migrate/codemods/monorepo-catalog";
|
|
199
|
-
export { displayMigrationResults, extractDependencies, mergeToCatalog, migrateFromCatalog, migrateToCatalog, removeCatalogFromRoot, replaceDependenciesWithCatalogRefs, restoreCatalogReferences, shouldSkipDependency, updateRootWithCatalog, } from "./impl/migrate/codemods/monorepo-catalog";
|
|
200
|
-
export { migrateModuleResolution, migrateToBundler, migrateToNodeNext, } from "./impl/migrate/codemods/nodenext-bundler";
|
|
201
|
-
export { migratePathToPathkit } from "./impl/migrate/codemods/path-pathkit";
|
|
202
|
-
export { migrateReaddirToGlob } from "./impl/migrate/codemods/readdir-glob";
|
|
203
194
|
export { type CacheResult, cachePackageOutput, cleanCache, hashPackage, isPackageCached, restorePackageCache, } from "./impl/monorepo/cache-mod";
|
|
204
195
|
export { allCommand, buildCommand, cleanCommand, depsCommand, graphCommand, type MonorepoContext, } from "./impl/monorepo/commands-mod";
|
|
205
196
|
export { DependencyGraph } from "./impl/monorepo/graph-mod";
|
|
@@ -435,3 +426,5 @@ export { regular_createPackageJSON } from "./impl/utils/utils-package-json-regul
|
|
|
435
426
|
export { createPerfTimer, getElapsedPerfTime, pausePerfTimer, resumePerfTimer, } from "./impl/utils/utils-perf";
|
|
436
427
|
export { ALLOWED_FILE_TYPES, checkFileSize, checkPermissions, handleCtxError, sanitizeInput, setFileSizeLimits, validateContent, validateFileExists, validateFileType, validateMergeOperation, validatePath, validateTemplate, } from "./impl/utils/utils-security";
|
|
437
428
|
export { createProjectTSConfig, createTSConfig } from "./impl/utils/utils-tsconfig";
|
|
429
|
+
export { promptWorkspacePackages, showPackageSummary, } from "./impl/utils/workspace-prompt";
|
|
430
|
+
export { detectWorkspaces, filterPackagesByPatterns, sortPackagesByDependencies, type WorkspaceConfig, type WorkspacePackage, } from "./impl/utils/workspace-utils";
|
package/bin/mod.js
CHANGED
|
@@ -476,29 +476,6 @@ export {
|
|
|
476
476
|
writeFilesPreserveStructure,
|
|
477
477
|
writeResult
|
|
478
478
|
} from "./impl/merge/mod.js";
|
|
479
|
-
export { migrateAnythingToBun } from "./impl/migrate/codemods/anything-bun.js";
|
|
480
|
-
export { commanderToRempts } from "./impl/migrate/codemods/commander-rempts.js";
|
|
481
|
-
export { consoleToRelinka } from "./impl/migrate/codemods/console-relinka.js";
|
|
482
|
-
export { migrateFsToRelifso } from "./impl/migrate/codemods/fs-relifso.js";
|
|
483
|
-
export {
|
|
484
|
-
displayMigrationResults,
|
|
485
|
-
extractDependencies,
|
|
486
|
-
mergeToCatalog,
|
|
487
|
-
migrateFromCatalog,
|
|
488
|
-
migrateToCatalog,
|
|
489
|
-
removeCatalogFromRoot,
|
|
490
|
-
replaceDependenciesWithCatalogRefs,
|
|
491
|
-
restoreCatalogReferences,
|
|
492
|
-
shouldSkipDependency,
|
|
493
|
-
updateRootWithCatalog
|
|
494
|
-
} from "./impl/migrate/codemods/monorepo-catalog.js";
|
|
495
|
-
export {
|
|
496
|
-
migrateModuleResolution,
|
|
497
|
-
migrateToBundler,
|
|
498
|
-
migrateToNodeNext
|
|
499
|
-
} from "./impl/migrate/codemods/nodenext-bundler.js";
|
|
500
|
-
export { migratePathToPathkit } from "./impl/migrate/codemods/path-pathkit.js";
|
|
501
|
-
export { migrateReaddirToGlob } from "./impl/migrate/codemods/readdir-glob.js";
|
|
502
479
|
export {
|
|
503
480
|
cachePackageOutput,
|
|
504
481
|
cleanCache,
|
|
@@ -1037,3 +1014,12 @@ export {
|
|
|
1037
1014
|
validateTemplate
|
|
1038
1015
|
} from "./impl/utils/utils-security.js";
|
|
1039
1016
|
export { createProjectTSConfig, createTSConfig } from "./impl/utils/utils-tsconfig.js";
|
|
1017
|
+
export {
|
|
1018
|
+
promptWorkspacePackages,
|
|
1019
|
+
showPackageSummary
|
|
1020
|
+
} from "./impl/utils/workspace-prompt.js";
|
|
1021
|
+
export {
|
|
1022
|
+
detectWorkspaces,
|
|
1023
|
+
filterPackagesByPatterns,
|
|
1024
|
+
sortPackagesByDependencies
|
|
1025
|
+
} from "./impl/utils/workspace-utils.js";
|
package/package.json
CHANGED
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"execa": "^9.6.0",
|
|
56
56
|
"file-type": "^21.0.0",
|
|
57
57
|
"fix-dts-default-cjs-exports": "^1.0.1",
|
|
58
|
+
"glob": "^11.0.3",
|
|
58
59
|
"globby": "^15.0.0",
|
|
59
60
|
"gpt-tokenizer": "^3.2.0",
|
|
60
61
|
"gradient-string": "^3.0.0",
|
|
@@ -123,7 +124,7 @@
|
|
|
123
124
|
"license": "MIT",
|
|
124
125
|
"name": "@reliverse/dler",
|
|
125
126
|
"type": "module",
|
|
126
|
-
"version": "1.7.
|
|
127
|
+
"version": "1.7.153",
|
|
127
128
|
"author": "reliverse",
|
|
128
129
|
"bugs": {
|
|
129
130
|
"email": "blefnk@gmail.com",
|