create-einja-app 0.2.8 → 0.2.9
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/package.json
CHANGED
package/templates/default/.envrc
CHANGED
|
@@ -1,4 +1,30 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @einja:managed:start
|
|
2
2
|
dotenv_if_exists .env
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
|
|
4
|
+
# メインワークツリーの.env.personalを共有
|
|
5
|
+
get_main_worktree() {
|
|
6
|
+
local current_worktree=""
|
|
7
|
+
while IFS= read -r line; do
|
|
8
|
+
if [[ "$line" == "worktree "* ]]; then
|
|
9
|
+
current_worktree="${line#worktree }"
|
|
10
|
+
elif [[ "$line" == "bare" ]]; then
|
|
11
|
+
current_worktree=""
|
|
12
|
+
elif [[ -z "$line" && -n "$current_worktree" ]]; then
|
|
13
|
+
echo "$current_worktree"
|
|
14
|
+
return
|
|
15
|
+
fi
|
|
16
|
+
done < <(git worktree list --porcelain 2>/dev/null)
|
|
17
|
+
if [[ -n "$current_worktree" ]]; then
|
|
18
|
+
echo "$current_worktree"
|
|
19
|
+
fi
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
MAIN_WORKTREE=$(get_main_worktree)
|
|
23
|
+
if [ -n "$MAIN_WORKTREE" ] && [ -f "$MAIN_WORKTREE/.env.personal" ]; then
|
|
24
|
+
dotenv_if_exists "$MAIN_WORKTREE/.env.personal"
|
|
25
|
+
fi
|
|
26
|
+
# @einja:managed:end
|
|
27
|
+
|
|
28
|
+
# @einja:seed:start id="project-env"
|
|
29
|
+
# プロジェクト固有の環境設定を追加
|
|
30
|
+
# @einja:seed:end
|
|
@@ -410,7 +410,7 @@ export const { handlers, signIn, signOut, auth } = NextAuth(authOptions);
|
|
|
410
410
|
- @docs/einja/memory/decisions.md - 過去の意思決定記録(セッション跨ぎで継承)
|
|
411
411
|
- @docs/einja/memory/patterns.md - 再利用可能なパターン(セッション跨ぎで継承)
|
|
412
412
|
|
|
413
|
-
<!-- @einja:
|
|
413
|
+
<!-- @einja:excluded:start -->
|
|
414
414
|
## このリポジトリ限定の設定
|
|
415
415
|
|
|
416
416
|
このセクションはテンプレート生成時に除外され、CLIで他リポジトリにコピーされません。
|
|
@@ -439,4 +439,4 @@ export const { handlers, signIn, signOut, auth } = NextAuth(authOptions);
|
|
|
439
439
|
| `CLAUDE.md` | `scaffolds/CLAUDE.md.template` | **変換生成** |
|
|
440
440
|
|
|
441
441
|
**コピー先のファイルは直接編集禁止**(ビルド時に上書きされる)
|
|
442
|
-
<!-- @einja:
|
|
442
|
+
<!-- @einja:excluded:end -->
|
|
@@ -168,11 +168,11 @@ function transformImports(content: string): string {
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
/**
|
|
171
|
-
* @einja:
|
|
171
|
+
* @einja:excluded マーカーを除去し、除外後の空行・水平線をクリーンアップ
|
|
172
172
|
*/
|
|
173
173
|
function removeExcludeMarkers(content: string): string {
|
|
174
174
|
const excludePattern =
|
|
175
|
-
/<!-- @einja:
|
|
175
|
+
/<!-- @einja:excluded:start -->[\s\S]*?<!-- @einja:excluded:end -->/g;
|
|
176
176
|
let result = content.replace(excludePattern, "");
|
|
177
177
|
|
|
178
178
|
// 連続する水平線を1つに
|
|
@@ -190,7 +190,7 @@ function removeExcludeMarkers(content: string): string {
|
|
|
190
190
|
function transformFileContent(filePath: string, content: string): string {
|
|
191
191
|
const fileName = filePath.split("/").pop() || "";
|
|
192
192
|
|
|
193
|
-
// ルートREADME.mdの変換(@einja:
|
|
193
|
+
// ルートREADME.mdの変換(@einja:excluded マーカー除去)
|
|
194
194
|
if (filePath === "README.md") {
|
|
195
195
|
return removeExcludeMarkers(content);
|
|
196
196
|
}
|