Skip to content

Commit 374073d

Browse files
committed
update configs
1 parent ec05081 commit 374073d

File tree

3 files changed

+6
-57
lines changed

3 files changed

+6
-57
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ AITDD runs on [Bun](https://bun.sh/), installing AITDD will install latest Bun.
3030
aitdd config set OPENAI_API_KEY <your_api_key>
3131
```
3232

33-
Your api key is stored locally in `~/.aitdd` config file and is not stored anywhere in any other way.
33+
Your api key is stored locally in `~/.aitdd/config` config file and is not stored anywhere in any other way.
3434

3535
4. Set the command to run the tests:
3636

3737
```sh
3838
aitdd config set RUN_TESTS "npm run test"
3939
```
4040

41-
Your api key is stored locally in `~/.aitdd` config file and is not stored anywhere in any other way.
41+
Your api key is stored locally in `~/.aitdd/config` config file and is not stored anywhere in any other way.
4242

4343
## Example
4444

src/commands/config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export type ConfigType = {
8888
[key in CONFIG_KEYS]?: any;
8989
};
9090

91-
const configPath = pathJoin(homedir(), ".aitdd");
91+
const configPath = pathJoin(homedir(), ".aitdd", "config");
9292

9393
export const getConfig = (): ConfigType | null => {
9494
const defaults = {
@@ -133,7 +133,9 @@ export const getConfig = (): ConfigType | null => {
133133
outro(
134134
`'${configKey}' name is invalid, it should be either '${configKey.toUpperCase()}' or it doesn't exist.`
135135
);
136-
outro(`Manually fix the '.env' file or global '~/.aitdd' config file.`);
136+
outro(
137+
`Manually fix the '.env' file or global '~/.aitdd/config' config file.`
138+
);
137139
process.exit(1);
138140
}
139141
}

src/utils/git.ts

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -19,52 +19,6 @@ export const getIsGitRepo = async () => {
1919
}
2020
};
2121

22-
// const excludeBigFilesFromDiff = ['*-lock.*', '*.lock'].map(
23-
// (file) => `:(exclude)${file}`
24-
// );
25-
26-
// export const getAITDDIgnore = (): Ignore => {
27-
// const ig = ignore();
28-
29-
// try {
30-
// ig.add(readFileSync(".aitddignore").toString().split("\n"));
31-
// } catch (e) {}
32-
33-
// return ig;
34-
// };
35-
36-
// export const getCoreHooksPath = async (): Promise<string> => {
37-
// const { stdout } = await execa("git", ["config", "core.hooksPath"]);
38-
39-
// return stdout;
40-
// };
41-
42-
// export const getStagedFiles = async (): Promise<string[]> => {
43-
// const { stdout: gitDir } = await execa("git", [
44-
// "rev-parse",
45-
// "--show-toplevel",
46-
// ]);
47-
48-
// const { stdout: files } = await execa("git", [
49-
// "diff",
50-
// "--name-only",
51-
// "--cached",
52-
// "--relative",
53-
// gitDir,
54-
// ]);
55-
56-
// if (!files) return [];
57-
58-
// const filesList = files.split("\n");
59-
60-
// const ig = getAITDDIgnore();
61-
// const allowedFiles = filesList.filter((file) => !ig.ignores(file));
62-
63-
// if (!allowedFiles) return [];
64-
65-
// return allowedFiles.sort();
66-
// };
67-
6822
export const getChangedFiles = async (): Promise<string[]> => {
6923
await assertGitRepo();
7024

@@ -83,13 +37,6 @@ export const getChangedFiles = async (): Promise<string[]> => {
8337
return files.sort();
8438
};
8539

86-
// export const gitAdd = async ({ files }: { files: string[] }) => {
87-
// const gitAddSpinner = spinner();
88-
// gitAddSpinner.start('Adding files to commit');
89-
// await execa('git', ['add', ...files]);
90-
// gitAddSpinner.stop('Done');
91-
// };
92-
9340
export const getDiff = async ({ files }: { files: string[] }) => {
9441
const lockFiles = files.filter(
9542
(file) =>

0 commit comments

Comments
 (0)