cloving 0.1.15 → 0.1.17

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/dist/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "cloving",
3
- "version": "0.1.14",
3
+ "version": "0.1.17",
4
+ "packageManager": "yarn@1.22.22",
4
5
  "main": "dist/index.js",
5
6
  "types": "dist/index.d.ts",
6
7
  "scripts": {
@@ -11,9 +12,7 @@
11
12
  "test": "bash -c jest",
12
13
  "prepare": "husky"
13
14
  },
14
- "bin": {
15
- "cloving": "./dist/index.js"
16
- },
15
+ "bin": "./dist/index.js",
17
16
  "files": [
18
17
  "dist",
19
18
  "!**/test/**"
@@ -37,37 +36,37 @@
37
36
  }
38
37
  },
39
38
  "dependencies": {
40
- "axios": "^1.7.2",
39
+ "@inquirer/prompts": "^5.3.6",
40
+ "axios": "^1.7.3",
41
41
  "cli-highlight": "^2.1.11",
42
42
  "commander": "^12.1.0",
43
43
  "copy-paste": "^1.5.3",
44
- "eslint": "^9.6.0",
44
+ "eslint": "^9.8.0",
45
45
  "eslint-config-prettier": "^9.1.0",
46
46
  "eslint-config-raine": "^0.5.0",
47
47
  "eslint-config-standard": "^17.1.0",
48
48
  "eslint-plugin-import": "^2.29.1",
49
- "eslint-plugin-jsdoc": "^48.5.2",
50
- "eslint-plugin-n": "^17.9.0",
51
- "eslint-plugin-promise": "^6.4.0",
49
+ "eslint-plugin-jsdoc": "^48.11.0",
50
+ "eslint-plugin-n": "^17.10.1",
51
+ "eslint-plugin-promise": "^7.0.0",
52
52
  "ignore": "^5.3.1",
53
53
  "ini": "^4.1.3",
54
- "inquirer": "^10.0.1",
55
54
  "nock": "^13.5.4",
56
- "vite": "^5.3.3",
57
- "vite-node": "^2.0.1"
55
+ "vite": "^5.3.5",
56
+ "vite-node": "^2.0.5"
58
57
  },
59
58
  "devDependencies": {
60
59
  "@types/copy-paste": "^1.1.33",
61
60
  "@types/ini": "^4.1.1",
62
61
  "@types/inquirer": "^9.0.7",
63
62
  "@types/jest": "^29.5.12",
64
- "@types/node": "^20.14.10",
65
- "husky": "^9.0.11",
63
+ "@types/node": "^22.1.0",
64
+ "husky": "^9.1.4",
66
65
  "jest": "^29.7.0",
67
66
  "lint-prepush": "^2.2.2",
68
- "lint-staged": "^15.2.7",
69
- "ts-jest": "^29.2.0",
70
- "typescript": "^5.5.3"
67
+ "lint-staged": "^15.2.8",
68
+ "ts-jest": "^29.2.4",
69
+ "typescript": "^5.5.4"
71
70
  },
72
71
  "resolutions": {
73
72
  "eslint": "8.57.0",
@@ -39,7 +39,8 @@ const getConfig = (options) => {
39
39
  primary: true,
40
40
  priority: 10,
41
41
  silent: options.silent || false,
42
- trust: false
42
+ trust: false,
43
+ temperature: options.temperature || 0.2,
43
44
  }
44
45
  }
45
46
  },
@@ -20,7 +20,9 @@ const getGitDiff = async () => {
20
20
  try {
21
21
  const defaultBranchName = await (0, exports.getDefaultBranchName)();
22
22
  const gitDiff = (0, child_process_1.execSync)(`git diff ${defaultBranchName} --`).toString().trim();
23
- return gitDiff;
23
+ // Indent each line by four spaces
24
+ const indentedDiff = gitDiff.split('\n').map(line => ` ${line}`).join('\n');
25
+ return indentedDiff;
24
26
  }
25
27
  catch (error) {
26
28
  console.error('Error getting git diff:', error.message);
@@ -92,6 +92,8 @@ const parseMarkdownInstructions = (input) => {
92
92
  };
93
93
  exports.parseMarkdownInstructions = parseMarkdownInstructions;
94
94
  const extractFilesAndContent = (rawCodeCommand) => {
95
+ if (!rawCodeCommand)
96
+ return [[], {}];
95
97
  const files = [];
96
98
  const fileContents = {};
97
99
  const matches = rawCodeCommand.match(/(\*{2})([^\*]+)(\*{2})/g);
@@ -107,7 +109,7 @@ const extractFilesAndContent = (rawCodeCommand) => {
107
109
  let content = contentMatch[1];
108
110
  // Remove the first word after the opening triple backticks
109
111
  content = content.split('\n').map((line, idx) => idx === 0 ? line.replace(/^\w+\s*/, '') : line).join('\n');
110
- fileContents[fileName] = content;
112
+ fileContents[fileName] = content.trim();
111
113
  }
112
114
  }
113
115
  return [files, fileContents];
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "cloving",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
+ "packageManager": "yarn@1.22.22",
4
5
  "main": "dist/index.js",
5
6
  "types": "dist/index.d.ts",
6
7
  "scripts": {
@@ -11,9 +12,7 @@
11
12
  "test": "bash -c jest",
12
13
  "prepare": "husky"
13
14
  },
14
- "bin": {
15
- "cloving": "./dist/index.js"
16
- },
15
+ "bin": "./dist/index.js",
17
16
  "files": [
18
17
  "dist",
19
18
  "!**/test/**"
@@ -37,37 +36,37 @@
37
36
  }
38
37
  },
39
38
  "dependencies": {
40
- "axios": "^1.7.2",
39
+ "@inquirer/prompts": "^5.3.6",
40
+ "axios": "^1.7.3",
41
41
  "cli-highlight": "^2.1.11",
42
42
  "commander": "^12.1.0",
43
43
  "copy-paste": "^1.5.3",
44
- "eslint": "^9.6.0",
44
+ "eslint": "^9.8.0",
45
45
  "eslint-config-prettier": "^9.1.0",
46
46
  "eslint-config-raine": "^0.5.0",
47
47
  "eslint-config-standard": "^17.1.0",
48
48
  "eslint-plugin-import": "^2.29.1",
49
- "eslint-plugin-jsdoc": "^48.5.2",
50
- "eslint-plugin-n": "^17.9.0",
51
- "eslint-plugin-promise": "^6.4.0",
49
+ "eslint-plugin-jsdoc": "^48.11.0",
50
+ "eslint-plugin-n": "^17.10.1",
51
+ "eslint-plugin-promise": "^7.0.0",
52
52
  "ignore": "^5.3.1",
53
53
  "ini": "^4.1.3",
54
- "inquirer": "^10.0.1",
55
54
  "nock": "^13.5.4",
56
- "vite": "^5.3.3",
57
- "vite-node": "^2.0.1"
55
+ "vite": "^5.3.5",
56
+ "vite-node": "^2.0.5"
58
57
  },
59
58
  "devDependencies": {
60
59
  "@types/copy-paste": "^1.1.33",
61
60
  "@types/ini": "^4.1.1",
62
61
  "@types/inquirer": "^9.0.7",
63
62
  "@types/jest": "^29.5.12",
64
- "@types/node": "^20.14.10",
65
- "husky": "^9.0.11",
63
+ "@types/node": "^22.1.0",
64
+ "husky": "^9.1.4",
66
65
  "jest": "^29.7.0",
67
66
  "lint-prepush": "^2.2.2",
68
- "lint-staged": "^15.2.7",
69
- "ts-jest": "^29.2.0",
70
- "typescript": "^5.5.3"
67
+ "lint-staged": "^15.2.8",
68
+ "ts-jest": "^29.2.4",
69
+ "typescript": "^5.5.4"
71
70
  },
72
71
  "resolutions": {
73
72
  "eslint": "8.57.0",