@simplysm/sd-cli 12.15.43 → 12.15.49

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.
@@ -31,22 +31,24 @@ export class SdCliAiCommand {
31
31
  const client = new Anthropic({ apiKey: process.env["ANTHROPIC_API_KEY"] });
32
32
  process.stdout.write(`AI를 통해 커밋 메시지 생성중...(${diff.length.toLocaleString()})\n`);
33
33
  const message = await client.messages.create({
34
- model: "claude-3-5-haiku-latest",
34
+ model: "claude-haiku-4-5",
35
35
  max_tokens: 1024,
36
36
  messages: [
37
37
  {
38
38
  role: "user",
39
39
  content: `
40
- 다음 변경된 사항들을 분석하고, 변경된 기능들에 대한 적절한 커밋메시지를 생성해줘
40
+ 다음 변경된 사항들을 분석하고, 변경된 "기능"들에 대한 적절한 커밋메시지를 생성해줘
41
41
 
42
42
  [규칙]
43
43
  - 한국어로 작성 해줘
44
44
  - 첫줄은 변경사항 모두를 아우를 수 있는 하나의 메시지로 작성해줘
45
- - 반드시 커밋메시지만 "\`\`\`"코드블록으로 감싸서 답변해줘.
45
+ - 반드시 커밋메시지만 답변해줘.
46
46
  - 첫줄 아래 한줄을 비우고, 자세한 기능 목록을 "-"로 구분하여 작성해줘.
47
47
  - 자세한 내용에는 모든 변경사항에 대한 설명이 누락 없이 표현되어야해
48
- - 변경사항을 명확하고 간결하게 설명해야해
48
+ - 변경사항을 명확하고 간결하게 요약해야해
49
49
  - 수동적인 표현 대신 능동적 표현을 사용해
50
+ - 가능하면 패키지별로 구분해서 표시되면 좋을것 같아. (여러패키지에 걸친 기능이면 어쩔 수 없고)
51
+ - 파일 하나하나 세부적으로 설명해줄 필요는 없어.
50
52
 
51
53
  [git log -n 3]
52
54
  ${history.trim()}
@@ -62,12 +64,7 @@ ${diff}`,
62
64
  process.stdout.write("\n\n-------------------------\n" +
63
65
  message.content[0].text +
64
66
  "\n-------------------------\n\n");
65
- const messages = message.content[0].text
66
- .replaceAll(/"/g, '\\"')
67
- .matchAll(/```(?:\w*\n)?([\s\S]*?)```/g);
68
- const commitMessage = Array.from(messages)
69
- .map((item) => item[1].trim())
70
- .join("\n\n\n");
67
+ const commitMessage = message.content[0].text.replaceAll(/"/g, '\\"');
71
68
  await SdProcess.spawnAsync("git", ["commit", "-m", commitMessage]);
72
69
  process.stdout.write("커밋이 완료되었습니다. 위 커밋메시지가 맘에들지 않을경우, 직접 커밋을 취소하세요.\n");
73
70
  }
@@ -38,6 +38,7 @@ export declare class SdCliCordova {
38
38
  buildAsync(outPath: string): Promise<void>;
39
39
  private _processBuildOutputAsync;
40
40
  private _copyAndroidBuildOutput;
41
+ /** @deprecated */
41
42
  private _createUpdateZipAsync;
42
43
  private _addFilesToZip;
43
44
  static runWebviewOnDeviceAsync(opt: {
@@ -354,6 +354,7 @@ export class SdCliCordova {
354
354
  // 업데이트파일
355
355
  FsUtils.copy(path.resolve(cordovaPath, "platforms/android/app/build/outputs/apk", buildType, apkFileName), path.resolve(targetOutPath, "updates", `${this._npmConfig.version}.apk`));
356
356
  }
357
+ /** @deprecated */
357
358
  async _createUpdateZipAsync(cordovaPath, outPath, platform) {
358
359
  const zip = new SdZip();
359
360
  const wwwPath = path.resolve(cordovaPath, this._WWW_DIR_NAME);
@@ -1,6 +1,5 @@
1
1
  import { fileURLToPath } from "url";
2
2
  import fs from "fs";
3
- import path from "path";
4
3
  export class SdCliPostInstall {
5
4
  static run() {
6
5
  {
@@ -9,24 +8,35 @@ export class SdCliPostInstall {
9
8
  delete contents.exports;
10
9
  fs.writeFileSync(filePath, JSON.stringify(contents, undefined, 2));
11
10
  }
12
- {
13
- const fortawesomeDirPath = path.resolve(path.dirname(fileURLToPath(import.meta.resolve("@fortawesome/fontawesome-svg-core/package.json"))), "..");
14
- const iconsDirNames = fs
15
- .readdirSync(fortawesomeDirPath)
16
- .filter((item) => item.endsWith("-icons"));
17
- for (const iconsDirName of iconsDirNames) {
18
- const dirPath = path.resolve(fortawesomeDirPath, iconsDirName);
19
- const contents = JSON.parse(fs.readFileSync(path.resolve(dirPath, "package.json")).toString());
20
- contents.exports = {
21
- "./package.json": "./package.json",
22
- "./*": "./*.js",
23
- };
24
- fs.writeFileSync(path.resolve(dirPath, "package.json"), JSON.stringify(contents, undefined, 2));
25
- fs.rmSync(path.resolve(dirPath, "index.d.ts"), { force: true });
26
- fs.rmSync(path.resolve(dirPath, "index.js"), { force: true });
27
- fs.rmSync(path.resolve(dirPath, "index.mjs"), { force: true });
28
- }
29
- }
11
+ /*{
12
+ const fortawesomeDirPath = path.resolve(
13
+ path.dirname(
14
+ fileURLToPath(import.meta.resolve("@fortawesome/fontawesome-svg-core/package.json")),
15
+ ),
16
+ "..",
17
+ );
18
+ const iconsDirNames = fs
19
+ .readdirSync(fortawesomeDirPath)
20
+ .filter((item) => item.endsWith("-icons"));
21
+ for (const iconsDirName of iconsDirNames) {
22
+ const dirPath = path.resolve(fortawesomeDirPath, iconsDirName);
23
+
24
+ const contents = JSON.parse(
25
+ fs.readFileSync(path.resolve(dirPath, "package.json")).toString(),
26
+ );
27
+ contents.exports = {
28
+ "./package.json": "./package.json",
29
+ "./!*": "./!*.js",
30
+ };
31
+ fs.writeFileSync(
32
+ path.resolve(dirPath, "package.json"),
33
+ JSON.stringify(contents, undefined, 2),
34
+ );
35
+ fs.rmSync(path.resolve(dirPath, "index.d.ts"), { force: true });
36
+ fs.rmSync(path.resolve(dirPath, "index.js"), { force: true });
37
+ fs.rmSync(path.resolve(dirPath, "index.mjs"), { force: true });
38
+ }
39
+ }*/
30
40
  {
31
41
  const filePath = fileURLToPath(import.meta.resolve("cordova/bin/cordova"));
32
42
  let contents = fs.readFileSync(filePath).toString();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simplysm/sd-cli",
3
- "version": "12.15.43",
3
+ "version": "12.15.49",
4
4
  "description": "심플리즘 패키지 - CLI",
5
5
  "author": "김석래",
6
6
  "repository": {
@@ -15,15 +15,15 @@
15
15
  "@angular/build": "^20.3.13",
16
16
  "@angular/compiler": "^20.3.15",
17
17
  "@angular/compiler-cli": "^20.3.15",
18
- "@anthropic-ai/sdk": "^0.71.1",
19
- "@electron/rebuild": "^4.0.1",
20
- "@simplysm/sd-core-common": "12.15.43",
21
- "@simplysm/sd-core-node": "12.15.43",
22
- "@simplysm/sd-service-server": "12.15.43",
23
- "@simplysm/sd-storage": "12.15.43",
18
+ "@anthropic-ai/sdk": "^0.71.2",
19
+ "@electron/rebuild": "^4.0.2",
20
+ "@simplysm/sd-core-common": "12.15.49",
21
+ "@simplysm/sd-core-node": "12.15.49",
22
+ "@simplysm/sd-service-server": "12.15.49",
23
+ "@simplysm/sd-storage": "12.15.49",
24
24
  "browserslist": "^4.28.1",
25
25
  "cordova": "^13.0.0",
26
- "electron": "^39.2.5",
26
+ "electron": "^39.2.6",
27
27
  "electron-builder": "26.0.12",
28
28
  "esbuild": "0.25.9",
29
29
  "esbuild-sass-plugin": "^3.3.1",
@@ -31,7 +31,7 @@
31
31
  "glob": "^13.0.0",
32
32
  "node-stdlib-browser": "^1.3.1",
33
33
  "rxjs": "^7.8.2",
34
- "sass-embedded": "^1.93.3",
34
+ "sass-embedded": "^1.95.1",
35
35
  "semver": "^7.7.3",
36
36
  "specifier-resolution-node": "^1.1.4",
37
37
  "ts-morph": "^27.0.2",
@@ -38,22 +38,24 @@ export class SdCliAiCommand {
38
38
 
39
39
  process.stdout.write(`AI를 통해 커밋 메시지 생성중...(${diff.length.toLocaleString()})\n`);
40
40
  const message = await client.messages.create({
41
- model: "claude-3-5-haiku-latest",
41
+ model: "claude-haiku-4-5",
42
42
  max_tokens: 1024,
43
43
  messages: [
44
44
  {
45
45
  role: "user",
46
46
  content: `
47
- 다음 변경된 사항들을 분석하고, 변경된 기능들에 대한 적절한 커밋메시지를 생성해줘
47
+ 다음 변경된 사항들을 분석하고, 변경된 "기능"들에 대한 적절한 커밋메시지를 생성해줘
48
48
 
49
49
  [규칙]
50
50
  - 한국어로 작성 해줘
51
51
  - 첫줄은 변경사항 모두를 아우를 수 있는 하나의 메시지로 작성해줘
52
- - 반드시 커밋메시지만 "\`\`\`"코드블록으로 감싸서 답변해줘.
52
+ - 반드시 커밋메시지만 답변해줘.
53
53
  - 첫줄 아래 한줄을 비우고, 자세한 기능 목록을 "-"로 구분하여 작성해줘.
54
54
  - 자세한 내용에는 모든 변경사항에 대한 설명이 누락 없이 표현되어야해
55
- - 변경사항을 명확하고 간결하게 설명해야해
55
+ - 변경사항을 명확하고 간결하게 요약해야해
56
56
  - 수동적인 표현 대신 능동적 표현을 사용해
57
+ - 가능하면 패키지별로 구분해서 표시되면 좋을것 같아. (여러패키지에 걸친 기능이면 어쩔 수 없고)
58
+ - 파일 하나하나 세부적으로 설명해줄 필요는 없어.
57
59
 
58
60
  [git log -n 3]
59
61
  ${history.trim()}
@@ -73,12 +75,7 @@ ${diff}`,
73
75
  "\n-------------------------\n\n",
74
76
  );
75
77
 
76
- const messages = message.content[0].text
77
- .replaceAll(/"/g, '\\"')
78
- .matchAll(/```(?:\w*\n)?([\s\S]*?)```/g);
79
- const commitMessage = Array.from(messages)
80
- .map((item) => item[1].trim())
81
- .join("\n\n\n");
78
+ const commitMessage = message.content[0].text.replaceAll(/"/g, '\\"');
82
79
 
83
80
  await SdProcess.spawnAsync("git", ["commit", "-m", commitMessage]);
84
81
  process.stdout.write(
@@ -479,6 +479,7 @@ export class SdCliCordova {
479
479
  );
480
480
  }
481
481
 
482
+ /** @deprecated */
482
483
  private async _createUpdateZipAsync(
483
484
  cordovaPath: string,
484
485
  outPath: string,
@@ -1,6 +1,5 @@
1
1
  import { fileURLToPath } from "url";
2
2
  import fs from "fs";
3
- import path from "path";
4
3
 
5
4
  export class SdCliPostInstall {
6
5
  static run() {
@@ -11,7 +10,7 @@ export class SdCliPostInstall {
11
10
  fs.writeFileSync(filePath, JSON.stringify(contents, undefined, 2));
12
11
  }
13
12
 
14
- {
13
+ /*{
15
14
  const fortawesomeDirPath = path.resolve(
16
15
  path.dirname(
17
16
  fileURLToPath(import.meta.resolve("@fortawesome/fontawesome-svg-core/package.json")),
@@ -29,7 +28,7 @@ export class SdCliPostInstall {
29
28
  );
30
29
  contents.exports = {
31
30
  "./package.json": "./package.json",
32
- "./*": "./*.js",
31
+ "./!*": "./!*.js",
33
32
  };
34
33
  fs.writeFileSync(
35
34
  path.resolve(dirPath, "package.json"),
@@ -39,7 +38,7 @@ export class SdCliPostInstall {
39
38
  fs.rmSync(path.resolve(dirPath, "index.js"), { force: true });
40
39
  fs.rmSync(path.resolve(dirPath, "index.mjs"), { force: true });
41
40
  }
42
- }
41
+ }*/
43
42
 
44
43
  {
45
44
  const filePath = fileURLToPath(import.meta.resolve("cordova/bin/cordova"));