@simplysm/sd-cli 12.16.6 → 12.16.7

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.
@@ -161,11 +161,10 @@ export class SdCliCapacitor {
161
161
  }
162
162
  }
163
163
  // 새 플러그인 설치
164
- const mainPkgJson = this._npmConfig;
165
164
  const mainDeps = {
166
- ...mainPkgJson.dependencies,
167
- ...mainPkgJson.devDependencies,
168
- ...mainPkgJson.peerDependencies,
165
+ ...this._npmConfig.dependencies,
166
+ ...this._npmConfig.devDependencies,
167
+ ...this._npmConfig.peerDependencies,
169
168
  };
170
169
  for (const plugin of usePlugins) {
171
170
  if (!currentDeps.includes(plugin)) {
@@ -193,12 +192,10 @@ export class SdCliCapacitor {
193
192
  if (this._opt.config.icon != null) {
194
193
  await FsUtils.mkdirsAsync(iconDirPath);
195
194
  const iconSource = path.resolve(this._opt.pkgPath, this._opt.config.icon);
196
- // Adaptive Icon용 여백 추가된 이미지 생성
197
- // 1024x1024 680x680이 safe zone ( 66%)
198
- const paddedIconPath = path.resolve(iconDirPath, "icon-only.png");
199
- await this._createPaddedIconAsync(iconSource, paddedIconPath);
200
- // splash, icon 복사
201
- await FsUtils.copyAsync(iconSource, path.resolve(iconDirPath, "icon.png"));
195
+ // icon.png 자체를 여백 포함으로 생성
196
+ const iconPath = path.resolve(iconDirPath, "icon.png");
197
+ await this._createPaddedIconAsync(iconSource, iconPath);
198
+ // splash는 원본 사용
202
199
  await FsUtils.copyAsync(iconSource, path.resolve(iconDirPath, "splash.png"));
203
200
  try {
204
201
  await SdCliCapacitor._execAsync("npx", ["@capacitor/assets", "generate", "--android"], capacitorPath);
@@ -212,17 +209,21 @@ export class SdCliCapacitor {
212
209
  }
213
210
  }
214
211
  async _createPaddedIconAsync(sourcePath, outputPath) {
215
- const size = 1024;
216
- const iconSize = 680; // safe zone
217
- const padding = Math.floor((size - iconSize) / 2); // 172px
212
+ const outputSize = 1024;
213
+ const iconSize = 680; // safe zone (66%)
214
+ const padding = Math.floor((outputSize - iconSize) / 2); // 172px
215
+ // 원본 크기 상관없이 iconSize로 리사이즈 후 여백 추가
218
216
  await sharp(sourcePath)
219
- .resize(iconSize, iconSize, { fit: "contain", background: { r: 0, g: 0, b: 0, alpha: 0 } })
217
+ .resize(iconSize, iconSize, {
218
+ fit: "contain",
219
+ background: { r: 0, g: 0, b: 0, alpha: 0 },
220
+ })
220
221
  .extend({
221
222
  top: padding,
222
223
  bottom: padding,
223
224
  left: padding,
224
225
  right: padding,
225
- background: { r: 0, g: 0, b: 0, alpha: 0 }, // 투명
226
+ background: { r: 0, g: 0, b: 0, alpha: 0 },
226
227
  })
227
228
  .toFile(outputPath);
228
229
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simplysm/sd-cli",
3
- "version": "12.16.6",
3
+ "version": "12.16.7",
4
4
  "description": "심플리즘 패키지 - CLI",
5
5
  "author": "김석래",
6
6
  "repository": {
@@ -17,17 +17,17 @@
17
17
  "@angular/compiler-cli": "^20.3.15",
18
18
  "@anthropic-ai/sdk": "^0.71.2",
19
19
  "@electron/rebuild": "^4.0.2",
20
- "@simplysm/sd-core-common": "12.16.6",
21
- "@simplysm/sd-core-node": "12.16.6",
22
- "@simplysm/sd-service-server": "12.16.6",
23
- "@simplysm/sd-storage": "12.16.6",
20
+ "@simplysm/sd-core-common": "12.16.7",
21
+ "@simplysm/sd-core-node": "12.16.7",
22
+ "@simplysm/sd-service-server": "12.16.7",
23
+ "@simplysm/sd-storage": "12.16.7",
24
24
  "browserslist": "^4.28.1",
25
25
  "cordova": "^13.0.0",
26
26
  "electron": "^33.4.11",
27
27
  "electron-builder": "^25.1.8",
28
28
  "esbuild": "0.25.9",
29
29
  "esbuild-sass-plugin": "^3.3.1",
30
- "eslint": "^9.39.1",
30
+ "eslint": "^9.39.2",
31
31
  "glob": "^13.0.0",
32
32
  "node-stdlib-browser": "^1.3.1",
33
33
  "rxjs": "^7.8.2",
@@ -220,11 +220,10 @@ export class SdCliCapacitor {
220
220
  }
221
221
 
222
222
  // 새 플러그인 설치
223
- const mainPkgJson = this._npmConfig;
224
223
  const mainDeps = {
225
- ...mainPkgJson.dependencies,
226
- ...mainPkgJson.devDependencies,
227
- ...mainPkgJson.peerDependencies,
224
+ ...this._npmConfig.dependencies,
225
+ ...this._npmConfig.devDependencies,
226
+ ...this._npmConfig.peerDependencies,
228
227
  };
229
228
 
230
229
  for (const plugin of usePlugins) {
@@ -262,13 +261,11 @@ export class SdCliCapacitor {
262
261
 
263
262
  const iconSource = path.resolve(this._opt.pkgPath, this._opt.config.icon);
264
263
 
265
- // Adaptive Icon용 여백 추가된 이미지 생성
266
- // 1024x1024 680x680이 safe zone ( 66%)
267
- const paddedIconPath = path.resolve(iconDirPath, "icon-only.png");
268
- await this._createPaddedIconAsync(iconSource, paddedIconPath);
264
+ // icon.png 자체를 여백 포함으로 생성
265
+ const iconPath = path.resolve(iconDirPath, "icon.png");
266
+ await this._createPaddedIconAsync(iconSource, iconPath);
269
267
 
270
- // splash, icon 복사
271
- await FsUtils.copyAsync(iconSource, path.resolve(iconDirPath, "icon.png"));
268
+ // splash 원본 사용
272
269
  await FsUtils.copyAsync(iconSource, path.resolve(iconDirPath, "splash.png"));
273
270
 
274
271
  try {
@@ -286,18 +283,22 @@ export class SdCliCapacitor {
286
283
  }
287
284
 
288
285
  private async _createPaddedIconAsync(sourcePath: string, outputPath: string): Promise<void> {
289
- const size = 1024;
290
- const iconSize = 680; // safe zone
291
- const padding = Math.floor((size - iconSize) / 2); // 172px
286
+ const outputSize = 1024;
287
+ const iconSize = 680; // safe zone (66%)
288
+ const padding = Math.floor((outputSize - iconSize) / 2); // 172px
292
289
 
290
+ // 원본 크기 상관없이 iconSize로 리사이즈 후 여백 추가
293
291
  await sharp(sourcePath)
294
- .resize(iconSize, iconSize, { fit: "contain", background: { r: 0, g: 0, b: 0, alpha: 0 } })
292
+ .resize(iconSize, iconSize, {
293
+ fit: "contain",
294
+ background: { r: 0, g: 0, b: 0, alpha: 0 },
295
+ })
295
296
  .extend({
296
297
  top: padding,
297
298
  bottom: padding,
298
299
  left: padding,
299
300
  right: padding,
300
- background: { r: 0, g: 0, b: 0, alpha: 0 }, // 투명
301
+ background: { r: 0, g: 0, b: 0, alpha: 0 },
301
302
  })
302
303
  .toFile(outputPath);
303
304
  }