ziku 0.22.1 → 0.22.2

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.
Files changed (2) hide show
  1. package/dist/index.mjs +14 -20
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -27,7 +27,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
27
27
 
28
28
  //#endregion
29
29
  //#region package.json
30
- var version$2 = "0.22.1";
30
+ var version$2 = "0.22.2";
31
31
 
32
32
  //#endregion
33
33
  //#region src/modules/schemas.ts
@@ -873,7 +873,7 @@ function getEffectivePatterns(_moduleId, modulePatterns, config) {
873
873
  *
874
874
  * 削除条件: ziku が別の UI フレームワーク(ink 等)に移行する場合。
875
875
  */
876
- const version$1 = "0.22.1";
876
+ const version$1 = "0.22.2";
877
877
  /** CLI の開始表示 */
878
878
  function intro(command) {
879
879
  const title = command ? `ziku ${command}` : "ziku";
@@ -2066,7 +2066,7 @@ async function hashFiles(dir, patterns) {
2066
2066
 
2067
2067
  //#endregion
2068
2068
  //#region src/commands/init.ts
2069
- const version = "0.22.1";
2069
+ const version = "0.22.2";
2070
2070
  const initCommand = defineCommand({
2071
2071
  meta: {
2072
2072
  name: "ziku",
@@ -2422,15 +2422,15 @@ function threeWayMerge({ base, local, template, filePath }) {
2422
2422
  };
2423
2423
  if (filePath && isJsonFile(filePath)) {
2424
2424
  const jsonResult = mergeJsonContent(base, local, template);
2425
- if (jsonResult !== null) return jsonResult;
2425
+ if (jsonResult !== null && !jsonResult.hasConflicts) return jsonResult;
2426
2426
  }
2427
2427
  if (filePath && isTomlFile(filePath)) {
2428
2428
  const tomlResult = mergeTomlContent(base, local, template);
2429
- if (tomlResult !== null) return tomlResult;
2429
+ if (tomlResult !== null && !tomlResult.hasConflicts) return tomlResult;
2430
2430
  }
2431
2431
  if (filePath && isYamlFile(filePath)) {
2432
2432
  const yamlResult = mergeYamlContent(base, local, template);
2433
- if (yamlResult !== null) return yamlResult;
2433
+ if (yamlResult !== null && !yamlResult.hasConflicts) return yamlResult;
2434
2434
  }
2435
2435
  return textThreeWayMerge(base, local, template, filePath);
2436
2436
  }
@@ -2964,7 +2964,7 @@ const pullCommand = defineCommand({
2964
2964
  await writeFile(join(targetDir, file), result.content, "utf-8");
2965
2965
  if (result.hasConflicts) {
2966
2966
  unresolvedConflicts.push(file);
2967
- logMergeConflict(file, result);
2967
+ logMergeConflict(file);
2968
2968
  } else log.success(`Auto-merged: ${pc$1.cyan(file)}`);
2969
2969
  }
2970
2970
  if (unresolvedConflicts.length > 0) log.warn("Some files have conflicts. Resolve them, then run `ziku pull --continue`");
@@ -3040,20 +3040,14 @@ async function runContinue(targetDir, config) {
3040
3040
  outro("Pull complete");
3041
3041
  }
3042
3042
  /**
3043
- * 1ファイルのマージ結果をユーザーに報告する。
3043
+ * 1ファイルのマージコンフリクトをユーザーに報告する。
3044
3044
  *
3045
- * 背景: JSON/JSONC の構造マージ(conflictDetails あり)とテキストマージ(conflictMarkers あり)で
3046
- * メッセージが異なるため、このヘルパーに集約する。
3047
- * Step 8 と他の呼び出し元でログ出力のロジックを共有する。
3048
- */
3049
- function logMergeConflict(file, result) {
3050
- if (result.conflictDetails.length > 0) {
3051
- log.warn(`Conflict in ${pc$1.cyan(file)} — review these keys:`);
3052
- for (const detail of result.conflictDetails) {
3053
- const pathStr = detail.path.join(".");
3054
- log.message(` ${pc$1.dim("•")} ${pc$1.yellow(pathStr)} — kept local value`);
3055
- }
3056
- } else log.warn(`Conflict in ${pc$1.cyan(file)} — manual resolution needed`);
3045
+ * 背景: threeWayMerge hasConflicts: true を返す場合、必ずファイル内に
3046
+ * コンフリクトマーカー(<<<<<<< LOCAL / ======= / >>>>>>> TEMPLATE)を挿入する。
3047
+ * ユーザーはマーカーを手動で解決し、`ziku pull --continue` で完了する。
3048
+ */
3049
+ function logMergeConflict(file) {
3050
+ log.warn(`Conflict in ${pc$1.cyan(file)} manual resolution needed`);
3057
3051
  }
3058
3052
  /**
3059
3053
  * インストール済みモジュールの有効パターンを全て取得する。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ziku",
3
- "version": "0.22.1",
3
+ "version": "0.22.2",
4
4
  "description": "Interactive CLI to scaffold development environment templates",
5
5
  "repository": {
6
6
  "type": "git",