aicm 0.20.1 → 0.20.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -2
- package/dist/api.d.ts +0 -16
- package/dist/api.js +0 -22
- package/dist/bin/aicm.d.ts +0 -2
- package/dist/bin/aicm.js +0 -5
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js +0 -102
- package/dist/commands/clean.d.ts +0 -19
- package/dist/commands/clean.js +0 -385
- package/dist/commands/init.d.ts +0 -1
- package/dist/commands/init.js +0 -49
- package/dist/commands/install-workspaces.d.ts +0 -5
- package/dist/commands/install-workspaces.js +0 -421
- package/dist/commands/install.d.ts +0 -110
- package/dist/commands/install.js +0 -736
- package/dist/commands/list.d.ts +0 -1
- package/dist/commands/list.js +0 -40
- package/dist/utils/config.d.ts +0 -117
- package/dist/utils/config.js +0 -529
- package/dist/utils/hooks.d.ts +0 -50
- package/dist/utils/hooks.js +0 -346
- package/dist/utils/is-ci.d.ts +0 -1
- package/dist/utils/is-ci.js +0 -8
- package/dist/utils/rules-file-writer.d.ts +0 -24
- package/dist/utils/rules-file-writer.js +0 -197
- package/dist/utils/safe-path.d.ts +0 -10
- package/dist/utils/safe-path.js +0 -28
- package/dist/utils/working-directory.d.ts +0 -5
- package/dist/utils/working-directory.js +0 -21
- package/dist/utils/workspace-discovery.d.ts +0 -13
- package/dist/utils/workspace-discovery.js +0 -53
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.withWorkingDirectory = withWorkingDirectory;
|
|
4
|
-
/**
|
|
5
|
-
* Helper function to execute a function within a specific working directory
|
|
6
|
-
* and ensure the original directory is always restored
|
|
7
|
-
*/
|
|
8
|
-
async function withWorkingDirectory(targetDir, fn) {
|
|
9
|
-
const originalCwd = process.cwd();
|
|
10
|
-
if (targetDir !== originalCwd) {
|
|
11
|
-
process.chdir(targetDir);
|
|
12
|
-
}
|
|
13
|
-
try {
|
|
14
|
-
return await fn();
|
|
15
|
-
}
|
|
16
|
-
finally {
|
|
17
|
-
if (targetDir !== originalCwd) {
|
|
18
|
-
process.chdir(originalCwd);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ResolvedConfig } from "./config";
|
|
2
|
-
/**
|
|
3
|
-
* Discover all packages with aicm configurations using git ls-files
|
|
4
|
-
*/
|
|
5
|
-
export declare function findAicmFiles(rootDir: string): string[];
|
|
6
|
-
/**
|
|
7
|
-
* Discover all packages with aicm configurations
|
|
8
|
-
*/
|
|
9
|
-
export declare function discoverPackagesWithAicm(rootDir: string): Promise<Array<{
|
|
10
|
-
relativePath: string;
|
|
11
|
-
absolutePath: string;
|
|
12
|
-
config: ResolvedConfig;
|
|
13
|
-
}>>;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.findAicmFiles = findAicmFiles;
|
|
7
|
-
exports.discoverPackagesWithAicm = discoverPackagesWithAicm;
|
|
8
|
-
const child_process_1 = require("child_process");
|
|
9
|
-
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const config_1 = require("./config");
|
|
11
|
-
/**
|
|
12
|
-
* Discover all packages with aicm configurations using git ls-files
|
|
13
|
-
*/
|
|
14
|
-
function findAicmFiles(rootDir) {
|
|
15
|
-
try {
|
|
16
|
-
const output = (0, child_process_1.execSync)("git ls-files --cached --others --exclude-standard aicm.json **/aicm.json", {
|
|
17
|
-
cwd: rootDir,
|
|
18
|
-
encoding: "utf8",
|
|
19
|
-
});
|
|
20
|
-
return output
|
|
21
|
-
.trim()
|
|
22
|
-
.split("\n")
|
|
23
|
-
.filter(Boolean)
|
|
24
|
-
.map((file) => path_1.default.resolve(rootDir, file));
|
|
25
|
-
}
|
|
26
|
-
catch (_a) {
|
|
27
|
-
// Fallback to manual search if git is not available
|
|
28
|
-
return [];
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Discover all packages with aicm configurations
|
|
33
|
-
*/
|
|
34
|
-
async function discoverPackagesWithAicm(rootDir) {
|
|
35
|
-
const aicmFiles = findAicmFiles(rootDir);
|
|
36
|
-
const packages = [];
|
|
37
|
-
for (const aicmFile of aicmFiles) {
|
|
38
|
-
const packageDir = path_1.default.dirname(aicmFile);
|
|
39
|
-
const relativePath = path_1.default.relative(rootDir, packageDir);
|
|
40
|
-
// Normalize to forward slashes for cross-platform compatibility
|
|
41
|
-
const normalizedRelativePath = relativePath.replace(/\\/g, "/");
|
|
42
|
-
const config = await (0, config_1.loadConfig)(packageDir);
|
|
43
|
-
if (config) {
|
|
44
|
-
packages.push({
|
|
45
|
-
relativePath: normalizedRelativePath || ".",
|
|
46
|
-
absolutePath: packageDir,
|
|
47
|
-
config,
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
// Sort packages by relativePath for deterministic order
|
|
52
|
-
return packages.sort((a, b) => a.relativePath.localeCompare(b.relativePath));
|
|
53
|
-
}
|