create-einja-app 0.3.3 → 0.3.4
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 +1 -1
- package/templates/default/.claude/settings.json +0 -4
- package/templates/default/.claude/skills/_einja-general-context-loader/SKILL.md +258 -0
- package/templates/default/.claude/skills/_einja-output-format/SKILL.md +211 -0
- package/templates/default/.claude/skills/_einja-project-overview/SKILL.md +29 -0
- package/templates/default/.claude/skills/_einja-spec-context-loader/SKILL.md +181 -0
- package/templates/default/.claude/skills/cli-package-specs/SKILL.md +53 -6
- package/templates/default/CLAUDE.md +18 -5
- package/templates/default/docs/plans/glistening-conjuring-cascade.md +42 -0
- package/templates/default/docs/plans/linear-gathering-hejlsberg.md +596 -0
- package/templates/default/docs/plans/todo-glistening-conjuring-cascade.md +20 -0
- package/templates/default/docs/plans/todo-unified-crafting-valiant.md +23 -0
- package/templates/default/docs/plans/unified-crafting-valiant.md +60 -0
- package/templates/default/scripts/ensure-serena.sh +26 -7
- package/templates/default/.claude/hooks/einja/validate-git-commit.sh +0 -239
- package/templates/default/packages/server-core/src/__generated__/fabbrica/index.d.ts +0 -270
- package/templates/default/packages/server-core/src/__generated__/fabbrica/index.js +0 -484
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Plan: ensure-serena.sh の既存インスタンス判定を厳密化
|
|
2
|
+
|
|
3
|
+
## Context
|
|
4
|
+
|
|
5
|
+
`ensure-serena.sh` の既存インスタンスチェック(L11-16)は `.serena-port` に記録されたPIDの生存のみを `kill -0` で確認している。
|
|
6
|
+
しかし以下のケースで **別プロジェクトのSerenaに誤接続** する問題がある:
|
|
7
|
+
|
|
8
|
+
1. 自プロジェクトのSerenaがクラッシュ(PID死亡)
|
|
9
|
+
2. 別プロジェクトのSerenaが同じポートを取得
|
|
10
|
+
3. 次回 `direnv reload` 時、PIDリサイクルで `kill -0` が成功 → 別プロジェクトのSerenaに接続
|
|
11
|
+
|
|
12
|
+
**根本原因**: PID生存だけでは「そのPIDが記録されたポートを実際にLISTENしているか」が判定できない。
|
|
13
|
+
|
|
14
|
+
## 変更内容
|
|
15
|
+
|
|
16
|
+
### TODO-1: 既存インスタンスチェックに PID×ポート検証を追加
|
|
17
|
+
|
|
18
|
+
**ファイル**: `scripts/ensure-serena.sh` L11-16
|
|
19
|
+
|
|
20
|
+
**現在のコード**:
|
|
21
|
+
```bash
|
|
22
|
+
if [ -f "$_SERENA_PORT_FILE" ]; then
|
|
23
|
+
read -r _saved_port _saved_pid < "$_SERENA_PORT_FILE"
|
|
24
|
+
if [ -n "$_saved_pid" ] && kill -0 "$_saved_pid" 2>/dev/null; then
|
|
25
|
+
# PIDが生存 → 自プロジェクトのSerena
|
|
26
|
+
export SERENA_PORT="$_saved_port"
|
|
27
|
+
return 0 2>/dev/null || true
|
|
28
|
+
fi
|
|
29
|
+
# PID死亡 → クリーンアップ
|
|
30
|
+
rm -f "$_SERENA_PORT_FILE"
|
|
31
|
+
fi
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**修正後**:
|
|
35
|
+
```bash
|
|
36
|
+
if [ -f "$_SERENA_PORT_FILE" ]; then
|
|
37
|
+
read -r _saved_port _saved_pid < "$_SERENA_PORT_FILE"
|
|
38
|
+
if [ -n "$_saved_pid" ] && kill -0 "$_saved_pid" 2>/dev/null \
|
|
39
|
+
&& ps -ww -o command= -p "$_saved_pid" 2>/dev/null | grep -q "serena start-mcp-server.*--project ${_SERENA_BASE}"; then
|
|
40
|
+
# PIDが生存 かつ 自プロジェクトのSerenaプロセス → 再利用
|
|
41
|
+
export SERENA_PORT="$_saved_port"
|
|
42
|
+
return 0 2>/dev/null || true
|
|
43
|
+
fi
|
|
44
|
+
# PID死亡 or 別プロセス/別プロジェクトのSerena → クリーンアップ
|
|
45
|
+
rm -f "$_SERENA_PORT_FILE"
|
|
46
|
+
fi
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**判定ロジック**: `kill -0`(PID生存) AND `ps`(そのPIDのコマンドラインに `serena start-mcp-server` + `--project <自プロジェクトパス>` が含まれる)の両方を満たす場合のみ、自プロジェクトのSerenaと判定する。
|
|
50
|
+
|
|
51
|
+
**`lsof` ではなく `ps` を採用した理由**(Codexレビュー指摘):
|
|
52
|
+
- `lsof` はLinuxで未導入のディストロがある。フォールバックが必要になり複雑化する
|
|
53
|
+
- `ps` はPOSIX標準でmacOS/Linux両方で利用可能
|
|
54
|
+
- `ps` ならプロセス名だけでなく `--project` 引数まで確認でき、「自プロジェクトのSerenaか」を厳密に判定できる
|
|
55
|
+
|
|
56
|
+
## 検証
|
|
57
|
+
|
|
58
|
+
1. `source scripts/ensure-serena.sh` で正常起動を確認
|
|
59
|
+
2. 再度 `source` して既存インスタンスが再利用されることを確認
|
|
60
|
+
3. `.serena-port` のPIDを偽の値に書き換え → 再起動が走ることを確認
|
|
@@ -7,15 +7,34 @@ _SERENA_BASE="${1:-$(pwd)}"
|
|
|
7
7
|
_SERENA_PORT_FILE="$_SERENA_BASE/.serena-port"
|
|
8
8
|
_SERENA_DEFAULT_PORT="${SERENA_PORT:-9850}"
|
|
9
9
|
|
|
10
|
-
# ---
|
|
10
|
+
# --- ヘルパー関数 ---
|
|
11
|
+
_is_uint() {
|
|
12
|
+
case "$1" in
|
|
13
|
+
""|0|*[!0-9]*) return 1 ;;
|
|
14
|
+
*) return 0 ;;
|
|
15
|
+
esac
|
|
16
|
+
}
|
|
17
|
+
_escape_ere() {
|
|
18
|
+
printf '%s' "$1" | sed -e 's/[][(){}.^$*+?|\\]/\\&/g'
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
# --- 既存インスタンスチェック(PID×プロセス検証) ---
|
|
11
22
|
if [ -f "$_SERENA_PORT_FILE" ]; then
|
|
12
|
-
read -r _saved_port _saved_pid < "$_SERENA_PORT_FILE"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
23
|
+
IFS=' ' read -r _saved_port _saved_pid _rest < "$_SERENA_PORT_FILE" || true
|
|
24
|
+
|
|
25
|
+
if _is_uint "$_saved_pid" && _is_uint "$_saved_port"; then
|
|
26
|
+
_cmd="$(ps -p "$_saved_pid" -ww -o command= 2>/dev/null || true)"
|
|
27
|
+
_base_ere="$(_escape_ere "$_SERENA_BASE")"
|
|
28
|
+
|
|
29
|
+
if [ -n "$_cmd" ] \
|
|
30
|
+
&& printf '%s\n' "$_cmd" | grep -Eq -- "(^|[[:space:]])--project(=|[[:space:]])${_base_ere}([[:space:]]|$)"; then
|
|
31
|
+
# 自プロジェクトのSerenaプロセス → 再利用
|
|
32
|
+
export SERENA_PORT="$_saved_port"
|
|
33
|
+
return 0 2>/dev/null || true
|
|
34
|
+
fi
|
|
17
35
|
fi
|
|
18
|
-
|
|
36
|
+
|
|
37
|
+
# PID死亡 or 数値不正 or 別プロセス/別プロジェクトのSerena → クリーンアップ
|
|
19
38
|
rm -f "$_SERENA_PORT_FILE"
|
|
20
39
|
fi
|
|
21
40
|
|
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# validate-git-commit.sh - git commitコマンドのメッセージ形式を検証
|
|
3
|
-
#
|
|
4
|
-
# 目的:
|
|
5
|
-
# - git commit実行前にコミットメッセージの形式を検証
|
|
6
|
-
# - 不適切なメッセージ(---、Markdown形式等)をブロック
|
|
7
|
-
# - コミットルール(docs/einja/steering/commit-rules.md)に準拠を強制
|
|
8
|
-
#
|
|
9
|
-
# 使用方法:
|
|
10
|
-
# - PreToolUse hookとして設定
|
|
11
|
-
# - exit code 0: 許可
|
|
12
|
-
# - exit code 2: ブロック(stderrがClaudeに送信される)
|
|
13
|
-
|
|
14
|
-
set -uo pipefail
|
|
15
|
-
|
|
16
|
-
# 標準入力からJSON入力を読み取る
|
|
17
|
-
input=$(cat)
|
|
18
|
-
|
|
19
|
-
# ツール名を取得
|
|
20
|
-
tool_name=$(echo "$input" | jq -r '.tool_name // empty')
|
|
21
|
-
|
|
22
|
-
# Bashツール以外は無視
|
|
23
|
-
if [[ "$tool_name" != "Bash" ]]; then
|
|
24
|
-
exit 0
|
|
25
|
-
fi
|
|
26
|
-
|
|
27
|
-
# コマンドを取得
|
|
28
|
-
command=$(echo "$input" | jq -r '.tool_input.command // empty')
|
|
29
|
-
|
|
30
|
-
# git commitコマンドでない場合はスキップ(volta unset対応で部分マッチ)
|
|
31
|
-
if [[ ! "$command" =~ git[[:space:]]+commit ]]; then
|
|
32
|
-
exit 0
|
|
33
|
-
fi
|
|
34
|
-
|
|
35
|
-
# --amend のみの場合はスキップ(メッセージ変更なし)
|
|
36
|
-
# -m / --message がない場合のみスキップ
|
|
37
|
-
if [[ "$command" =~ --amend ]]; then
|
|
38
|
-
if [[ ! "$command" =~ -m ]] && [[ ! "$command" =~ --message ]]; then
|
|
39
|
-
exit 0
|
|
40
|
-
fi
|
|
41
|
-
fi
|
|
42
|
-
|
|
43
|
-
# -m / --message オプションがない場合はスキップ(インタラクティブエディタ使用)
|
|
44
|
-
if [[ ! "$command" =~ -m ]] && [[ ! "$command" =~ --message ]]; then
|
|
45
|
-
exit 0
|
|
46
|
-
fi
|
|
47
|
-
|
|
48
|
-
# コミットメッセージを抽出
|
|
49
|
-
commit_message=""
|
|
50
|
-
|
|
51
|
-
# パターン1: -m "message" / -m 'message' (スペースあり)
|
|
52
|
-
if [[ "$command" =~ -m[[:space:]]+\"([^\"]+)\" ]]; then
|
|
53
|
-
commit_message="${BASH_REMATCH[1]}"
|
|
54
|
-
elif [[ "$command" =~ -m[[:space:]]+\'([^\']+)\' ]]; then
|
|
55
|
-
commit_message="${BASH_REMATCH[1]}"
|
|
56
|
-
# パターン2: -m"message" / -m'message' (スペースなし)
|
|
57
|
-
elif [[ "$command" =~ -m\"([^\"]+)\" ]]; then
|
|
58
|
-
commit_message="${BASH_REMATCH[1]}"
|
|
59
|
-
elif [[ "$command" =~ -m\'([^\']+)\' ]]; then
|
|
60
|
-
commit_message="${BASH_REMATCH[1]}"
|
|
61
|
-
# パターン3: --message="message" / --message='message'
|
|
62
|
-
elif [[ "$command" =~ --message=\"([^\"]+)\" ]]; then
|
|
63
|
-
commit_message="${BASH_REMATCH[1]}"
|
|
64
|
-
elif [[ "$command" =~ --message=\'([^\']+)\' ]]; then
|
|
65
|
-
commit_message="${BASH_REMATCH[1]}"
|
|
66
|
-
# パターン4: --message "message" / --message 'message' (スペースあり)
|
|
67
|
-
elif [[ "$command" =~ --message[[:space:]]+\"([^\"]+)\" ]]; then
|
|
68
|
-
commit_message="${BASH_REMATCH[1]}"
|
|
69
|
-
elif [[ "$command" =~ --message[[:space:]]+\'([^\']+)\' ]]; then
|
|
70
|
-
commit_message="${BASH_REMATCH[1]}"
|
|
71
|
-
# パターン5: -m="message" / -m='message'
|
|
72
|
-
elif [[ "$command" =~ -m=\"([^\"]+)\" ]]; then
|
|
73
|
-
commit_message="${BASH_REMATCH[1]}"
|
|
74
|
-
elif [[ "$command" =~ -m=\'([^\']+)\' ]]; then
|
|
75
|
-
commit_message="${BASH_REMATCH[1]}"
|
|
76
|
-
# パターン6: HEREDOC形式 -m "$(cat <<'EOF'...EOF)"
|
|
77
|
-
elif [[ "$command" =~ -m[[:space:]]*\"\$\(cat ]]; then
|
|
78
|
-
# HEREDOCからメッセージの最初の行を抽出
|
|
79
|
-
commit_message=$(echo "$command" | sed -n "/<<.*EOF/,/^EOF/p" | sed '1d;$d' | head -1)
|
|
80
|
-
fi
|
|
81
|
-
|
|
82
|
-
# メッセージが取得できない場合は許可(予期しないパターン)
|
|
83
|
-
if [[ -z "$commit_message" ]]; then
|
|
84
|
-
exit 0
|
|
85
|
-
fi
|
|
86
|
-
|
|
87
|
-
# 変数参照の場合はスキップ(実行時まで値が確定しない)
|
|
88
|
-
if [[ "$commit_message" =~ ^\$ ]]; then
|
|
89
|
-
exit 0
|
|
90
|
-
fi
|
|
91
|
-
|
|
92
|
-
# 最初の行(概要行)を取得
|
|
93
|
-
first_line=$(echo "$commit_message" | head -1)
|
|
94
|
-
|
|
95
|
-
# === 検証ルール ===
|
|
96
|
-
|
|
97
|
-
# 有効なプレフィックス一覧
|
|
98
|
-
VALID_PREFIXES="^(feat|fix|docs|style|refactor|test|chore):"
|
|
99
|
-
|
|
100
|
-
# ルール1: プレフィックスの存在確認
|
|
101
|
-
if ! echo "$first_line" | grep -qE "$VALID_PREFIXES"; then
|
|
102
|
-
cat >&2 <<ERRMSG
|
|
103
|
-
|
|
104
|
-
❌ コミットメッセージ形式エラー
|
|
105
|
-
|
|
106
|
-
検出されたメッセージ:
|
|
107
|
-
"$first_line"
|
|
108
|
-
|
|
109
|
-
問題:
|
|
110
|
-
有効なプレフィックスがありません。
|
|
111
|
-
|
|
112
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
113
|
-
⚡ 対処方法: /task-commit Skillを使用してください
|
|
114
|
-
|
|
115
|
-
このSkillはコミットルールに従って:
|
|
116
|
-
- 適切なプレフィックス(feat/fix/docs等)を付与
|
|
117
|
-
- 変更内容に応じたコミット分割を提案
|
|
118
|
-
- 日本語で明確なメッセージを生成
|
|
119
|
-
|
|
120
|
-
実行: Skill("task-commit") を呼び出す
|
|
121
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
122
|
-
|
|
123
|
-
参照: docs/einja/steering/commit-rules.md
|
|
124
|
-
|
|
125
|
-
ERRMSG
|
|
126
|
-
exit 2
|
|
127
|
-
fi
|
|
128
|
-
|
|
129
|
-
# プレフィックス後の説明部分を抽出(禁止パターン検出に使用)
|
|
130
|
-
description=$(echo "$first_line" | sed -E 's/^(feat|fix|docs|style|refactor|test|chore):[[:space:]]*//')
|
|
131
|
-
|
|
132
|
-
# ルール2: プレフィックス後のメッセージが空でないか(3文字以上)
|
|
133
|
-
if [[ -z "$description" ]] || [[ ${#description} -lt 3 ]]; then
|
|
134
|
-
cat >&2 <<ERRMSG
|
|
135
|
-
|
|
136
|
-
❌ コミットメッセージ形式エラー
|
|
137
|
-
|
|
138
|
-
検出されたメッセージ:
|
|
139
|
-
"$first_line"
|
|
140
|
-
|
|
141
|
-
問題:
|
|
142
|
-
プレフィックス後の説明が不足しています。
|
|
143
|
-
具体的な変更内容を記述してください(3文字以上)。
|
|
144
|
-
|
|
145
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
146
|
-
⚡ 対処方法: /task-commit Skillを使用してください
|
|
147
|
-
|
|
148
|
-
このSkillはコミットルールに従って:
|
|
149
|
-
- 適切なプレフィックス(feat/fix/docs等)を付与
|
|
150
|
-
- 変更内容に応じたコミット分割を提案
|
|
151
|
-
- 日本語で明確なメッセージを生成
|
|
152
|
-
|
|
153
|
-
実行: Skill("task-commit") を呼び出す
|
|
154
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
155
|
-
|
|
156
|
-
参照: docs/einja/steering/commit-rules.md
|
|
157
|
-
|
|
158
|
-
ERRMSG
|
|
159
|
-
exit 2
|
|
160
|
-
fi
|
|
161
|
-
|
|
162
|
-
# ルール3: 明らかに不適切なメッセージのパターン検出(説明部分に対して適用)
|
|
163
|
-
INVALID_PATTERNS=(
|
|
164
|
-
"^---$"
|
|
165
|
-
"^\*\*.*\*\*$"
|
|
166
|
-
"^完了しました"
|
|
167
|
-
"^実装完了"
|
|
168
|
-
"^修正完了"
|
|
169
|
-
"^update$"
|
|
170
|
-
"^fix$"
|
|
171
|
-
"^changes$"
|
|
172
|
-
"^wip$"
|
|
173
|
-
)
|
|
174
|
-
|
|
175
|
-
for pattern in "${INVALID_PATTERNS[@]}"; do
|
|
176
|
-
if echo "$description" | grep -qiE "$pattern"; then
|
|
177
|
-
cat >&2 <<ERRMSG
|
|
178
|
-
|
|
179
|
-
❌ コミットメッセージ形式エラー
|
|
180
|
-
|
|
181
|
-
検出されたメッセージ:
|
|
182
|
-
"$first_line"
|
|
183
|
-
|
|
184
|
-
問題:
|
|
185
|
-
コミットメッセージの説明部分が不適切な形式です。
|
|
186
|
-
具体的な変更内容を記述してください。
|
|
187
|
-
|
|
188
|
-
禁止されたパターン: $pattern
|
|
189
|
-
|
|
190
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
191
|
-
⚡ 対処方法: /task-commit Skillを使用してください
|
|
192
|
-
|
|
193
|
-
このSkillはコミットルールに従って:
|
|
194
|
-
- 適切なプレフィックス(feat/fix/docs等)を付与
|
|
195
|
-
- 変更内容に応じたコミット分割を提案
|
|
196
|
-
- 日本語で明確なメッセージを生成
|
|
197
|
-
|
|
198
|
-
実行: Skill("task-commit") を呼び出す
|
|
199
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
200
|
-
|
|
201
|
-
参照: docs/einja/steering/commit-rules.md
|
|
202
|
-
|
|
203
|
-
ERRMSG
|
|
204
|
-
exit 2
|
|
205
|
-
fi
|
|
206
|
-
done
|
|
207
|
-
|
|
208
|
-
# ルール4: メッセージがMarkdown見出し形式でないか
|
|
209
|
-
if echo "$first_line" | grep -qE "^#{1,6}[[:space:]]"; then
|
|
210
|
-
cat >&2 <<ERRMSG
|
|
211
|
-
|
|
212
|
-
❌ コミットメッセージ形式エラー
|
|
213
|
-
|
|
214
|
-
検出されたメッセージ:
|
|
215
|
-
"$first_line"
|
|
216
|
-
|
|
217
|
-
問題:
|
|
218
|
-
Markdownの見出し形式(#)は使用できません。
|
|
219
|
-
プレフィックス形式で記述してください。
|
|
220
|
-
|
|
221
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
222
|
-
⚡ 対処方法: /task-commit Skillを使用してください
|
|
223
|
-
|
|
224
|
-
このSkillはコミットルールに従って:
|
|
225
|
-
- 適切なプレフィックス(feat/fix/docs等)を付与
|
|
226
|
-
- 変更内容に応じたコミット分割を提案
|
|
227
|
-
- 日本語で明確なメッセージを生成
|
|
228
|
-
|
|
229
|
-
実行: Skill("task-commit") を呼び出す
|
|
230
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
231
|
-
|
|
232
|
-
参照: docs/einja/steering/commit-rules.md
|
|
233
|
-
|
|
234
|
-
ERRMSG
|
|
235
|
-
exit 2
|
|
236
|
-
fi
|
|
237
|
-
|
|
238
|
-
# 全ての検証をパス
|
|
239
|
-
exit 0
|
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
import type { User } from "@prisma/client";
|
|
2
|
-
import type { Account } from "@prisma/client";
|
|
3
|
-
import type { Session } from "@prisma/client";
|
|
4
|
-
import type { VerificationToken } from "@prisma/client";
|
|
5
|
-
import type { Authenticator } from "@prisma/client";
|
|
6
|
-
import type { UserStatus } from "@prisma/client";
|
|
7
|
-
import type { UserRole } from "@prisma/client";
|
|
8
|
-
import type { Prisma } from "@prisma/client";
|
|
9
|
-
import type { Resolver } from "@quramy/prisma-fabbrica/lib/internal";
|
|
10
|
-
export { resetSequence, registerScalarFieldValueGenerator, resetScalarFieldValueGenerator } from "@quramy/prisma-fabbrica/lib/internal";
|
|
11
|
-
type BuildDataOptions<TTransients extends Record<string, unknown>> = {
|
|
12
|
-
readonly seq: number;
|
|
13
|
-
} & TTransients;
|
|
14
|
-
type TraitName = string | symbol;
|
|
15
|
-
type CallbackDefineOptions<TCreated, TCreateInput, TTransients extends Record<string, unknown>> = {
|
|
16
|
-
onAfterBuild?: (createInput: TCreateInput, transientFields: TTransients) => void | PromiseLike<void>;
|
|
17
|
-
onBeforeCreate?: (createInput: TCreateInput, transientFields: TTransients) => void | PromiseLike<void>;
|
|
18
|
-
onAfterCreate?: (created: TCreated, transientFields: TTransients) => void | PromiseLike<void>;
|
|
19
|
-
};
|
|
20
|
-
export declare const initialize: (options: import("@quramy/prisma-fabbrica/lib/internal").InitializeOptions) => void;
|
|
21
|
-
type UserFactoryDefineInput = {
|
|
22
|
-
id?: string;
|
|
23
|
-
name?: string | null;
|
|
24
|
-
email?: string;
|
|
25
|
-
emailVerified?: Date | null;
|
|
26
|
-
image?: string | null;
|
|
27
|
-
password?: string | null;
|
|
28
|
-
status?: UserStatus;
|
|
29
|
-
role?: UserRole;
|
|
30
|
-
lastLogin?: Date | null;
|
|
31
|
-
createdAt?: Date;
|
|
32
|
-
updatedAt?: Date;
|
|
33
|
-
accounts?: Prisma.AccountCreateNestedManyWithoutUserInput;
|
|
34
|
-
sessions?: Prisma.SessionCreateNestedManyWithoutUserInput;
|
|
35
|
-
Authenticator?: Prisma.AuthenticatorCreateNestedManyWithoutUserInput;
|
|
36
|
-
};
|
|
37
|
-
type UserTransientFields = Record<string, unknown> & Partial<Record<keyof UserFactoryDefineInput, never>>;
|
|
38
|
-
type UserFactoryTrait<TTransients extends Record<string, unknown>> = {
|
|
39
|
-
data?: Resolver<Partial<UserFactoryDefineInput>, BuildDataOptions<TTransients>>;
|
|
40
|
-
} & CallbackDefineOptions<User, Prisma.UserCreateInput, TTransients>;
|
|
41
|
-
type UserFactoryDefineOptions<TTransients extends Record<string, unknown> = Record<string, unknown>> = {
|
|
42
|
-
defaultData?: Resolver<UserFactoryDefineInput, BuildDataOptions<TTransients>>;
|
|
43
|
-
traits?: {
|
|
44
|
-
[traitName: TraitName]: UserFactoryTrait<TTransients>;
|
|
45
|
-
};
|
|
46
|
-
} & CallbackDefineOptions<User, Prisma.UserCreateInput, TTransients>;
|
|
47
|
-
type UserTraitKeys<TOptions extends UserFactoryDefineOptions<any>> = Exclude<keyof TOptions["traits"], number>;
|
|
48
|
-
export interface UserFactoryInterfaceWithoutTraits<TTransients extends Record<string, unknown>> {
|
|
49
|
-
readonly _factoryFor: "User";
|
|
50
|
-
build(inputData?: Partial<Prisma.UserCreateInput & TTransients>): PromiseLike<Prisma.UserCreateInput>;
|
|
51
|
-
buildCreateInput(inputData?: Partial<Prisma.UserCreateInput & TTransients>): PromiseLike<Prisma.UserCreateInput>;
|
|
52
|
-
buildList(list: readonly Partial<Prisma.UserCreateInput & TTransients>[]): PromiseLike<Prisma.UserCreateInput[]>;
|
|
53
|
-
buildList(count: number, item?: Partial<Prisma.UserCreateInput & TTransients>): PromiseLike<Prisma.UserCreateInput[]>;
|
|
54
|
-
pickForConnect(inputData: User): Pick<User, "id">;
|
|
55
|
-
create(inputData?: Partial<Prisma.UserCreateInput & TTransients>): PromiseLike<User>;
|
|
56
|
-
createList(list: readonly Partial<Prisma.UserCreateInput & TTransients>[]): PromiseLike<User[]>;
|
|
57
|
-
createList(count: number, item?: Partial<Prisma.UserCreateInput & TTransients>): PromiseLike<User[]>;
|
|
58
|
-
createForConnect(inputData?: Partial<Prisma.UserCreateInput & TTransients>): PromiseLike<Pick<User, "id">>;
|
|
59
|
-
}
|
|
60
|
-
export interface UserFactoryInterface<TTransients extends Record<string, unknown> = Record<string, unknown>, TTraitName extends TraitName = TraitName> extends UserFactoryInterfaceWithoutTraits<TTransients> {
|
|
61
|
-
use(name: TTraitName, ...names: readonly TTraitName[]): UserFactoryInterfaceWithoutTraits<TTransients>;
|
|
62
|
-
}
|
|
63
|
-
interface UserFactoryBuilder {
|
|
64
|
-
<TOptions extends UserFactoryDefineOptions>(options?: TOptions): UserFactoryInterface<{}, UserTraitKeys<TOptions>>;
|
|
65
|
-
withTransientFields: <TTransients extends UserTransientFields>(defaultTransientFieldValues: TTransients) => <TOptions extends UserFactoryDefineOptions<TTransients>>(options?: TOptions) => UserFactoryInterface<TTransients, UserTraitKeys<TOptions>>;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Define factory for {@link User} model.
|
|
69
|
-
*
|
|
70
|
-
* @param options
|
|
71
|
-
* @returns factory {@link UserFactoryInterface}
|
|
72
|
-
*/
|
|
73
|
-
export declare const defineUserFactory: UserFactoryBuilder;
|
|
74
|
-
type AccountuserFactory = {
|
|
75
|
-
_factoryFor: "User";
|
|
76
|
-
build: () => PromiseLike<Prisma.UserCreateNestedOneWithoutAccountsInput["create"]>;
|
|
77
|
-
};
|
|
78
|
-
type AccountFactoryDefineInput = {
|
|
79
|
-
type?: string;
|
|
80
|
-
provider?: string;
|
|
81
|
-
providerAccountId?: string;
|
|
82
|
-
refresh_token?: string | null;
|
|
83
|
-
access_token?: string | null;
|
|
84
|
-
expires_at?: number | null;
|
|
85
|
-
token_type?: string | null;
|
|
86
|
-
scope?: string | null;
|
|
87
|
-
id_token?: string | null;
|
|
88
|
-
session_state?: string | null;
|
|
89
|
-
createdAt?: Date;
|
|
90
|
-
updatedAt?: Date;
|
|
91
|
-
user: AccountuserFactory | Prisma.UserCreateNestedOneWithoutAccountsInput;
|
|
92
|
-
};
|
|
93
|
-
type AccountTransientFields = Record<string, unknown> & Partial<Record<keyof AccountFactoryDefineInput, never>>;
|
|
94
|
-
type AccountFactoryTrait<TTransients extends Record<string, unknown>> = {
|
|
95
|
-
data?: Resolver<Partial<AccountFactoryDefineInput>, BuildDataOptions<TTransients>>;
|
|
96
|
-
} & CallbackDefineOptions<Account, Prisma.AccountCreateInput, TTransients>;
|
|
97
|
-
type AccountFactoryDefineOptions<TTransients extends Record<string, unknown> = Record<string, unknown>> = {
|
|
98
|
-
defaultData: Resolver<AccountFactoryDefineInput, BuildDataOptions<TTransients>>;
|
|
99
|
-
traits?: {
|
|
100
|
-
[traitName: string | symbol]: AccountFactoryTrait<TTransients>;
|
|
101
|
-
};
|
|
102
|
-
} & CallbackDefineOptions<Account, Prisma.AccountCreateInput, TTransients>;
|
|
103
|
-
type AccountTraitKeys<TOptions extends AccountFactoryDefineOptions<any>> = Exclude<keyof TOptions["traits"], number>;
|
|
104
|
-
export interface AccountFactoryInterfaceWithoutTraits<TTransients extends Record<string, unknown>> {
|
|
105
|
-
readonly _factoryFor: "Account";
|
|
106
|
-
build(inputData?: Partial<Prisma.AccountCreateInput & TTransients>): PromiseLike<Prisma.AccountCreateInput>;
|
|
107
|
-
buildCreateInput(inputData?: Partial<Prisma.AccountCreateInput & TTransients>): PromiseLike<Prisma.AccountCreateInput>;
|
|
108
|
-
buildList(list: readonly Partial<Prisma.AccountCreateInput & TTransients>[]): PromiseLike<Prisma.AccountCreateInput[]>;
|
|
109
|
-
buildList(count: number, item?: Partial<Prisma.AccountCreateInput & TTransients>): PromiseLike<Prisma.AccountCreateInput[]>;
|
|
110
|
-
pickForConnect(inputData: Account): Pick<Account, "provider" | "providerAccountId">;
|
|
111
|
-
create(inputData?: Partial<Prisma.AccountCreateInput & TTransients>): PromiseLike<Account>;
|
|
112
|
-
createList(list: readonly Partial<Prisma.AccountCreateInput & TTransients>[]): PromiseLike<Account[]>;
|
|
113
|
-
createList(count: number, item?: Partial<Prisma.AccountCreateInput & TTransients>): PromiseLike<Account[]>;
|
|
114
|
-
createForConnect(inputData?: Partial<Prisma.AccountCreateInput & TTransients>): PromiseLike<Pick<Account, "provider" | "providerAccountId">>;
|
|
115
|
-
}
|
|
116
|
-
export interface AccountFactoryInterface<TTransients extends Record<string, unknown> = Record<string, unknown>, TTraitName extends TraitName = TraitName> extends AccountFactoryInterfaceWithoutTraits<TTransients> {
|
|
117
|
-
use(name: TTraitName, ...names: readonly TTraitName[]): AccountFactoryInterfaceWithoutTraits<TTransients>;
|
|
118
|
-
}
|
|
119
|
-
interface AccountFactoryBuilder {
|
|
120
|
-
<TOptions extends AccountFactoryDefineOptions>(options: TOptions): AccountFactoryInterface<{}, AccountTraitKeys<TOptions>>;
|
|
121
|
-
withTransientFields: <TTransients extends AccountTransientFields>(defaultTransientFieldValues: TTransients) => <TOptions extends AccountFactoryDefineOptions<TTransients>>(options: TOptions) => AccountFactoryInterface<TTransients, AccountTraitKeys<TOptions>>;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Define factory for {@link Account} model.
|
|
125
|
-
*
|
|
126
|
-
* @param options
|
|
127
|
-
* @returns factory {@link AccountFactoryInterface}
|
|
128
|
-
*/
|
|
129
|
-
export declare const defineAccountFactory: AccountFactoryBuilder;
|
|
130
|
-
type SessionuserFactory = {
|
|
131
|
-
_factoryFor: "User";
|
|
132
|
-
build: () => PromiseLike<Prisma.UserCreateNestedOneWithoutSessionsInput["create"]>;
|
|
133
|
-
};
|
|
134
|
-
type SessionFactoryDefineInput = {
|
|
135
|
-
sessionToken?: string;
|
|
136
|
-
expires?: Date;
|
|
137
|
-
createdAt?: Date;
|
|
138
|
-
updatedAt?: Date;
|
|
139
|
-
user: SessionuserFactory | Prisma.UserCreateNestedOneWithoutSessionsInput;
|
|
140
|
-
};
|
|
141
|
-
type SessionTransientFields = Record<string, unknown> & Partial<Record<keyof SessionFactoryDefineInput, never>>;
|
|
142
|
-
type SessionFactoryTrait<TTransients extends Record<string, unknown>> = {
|
|
143
|
-
data?: Resolver<Partial<SessionFactoryDefineInput>, BuildDataOptions<TTransients>>;
|
|
144
|
-
} & CallbackDefineOptions<Session, Prisma.SessionCreateInput, TTransients>;
|
|
145
|
-
type SessionFactoryDefineOptions<TTransients extends Record<string, unknown> = Record<string, unknown>> = {
|
|
146
|
-
defaultData: Resolver<SessionFactoryDefineInput, BuildDataOptions<TTransients>>;
|
|
147
|
-
traits?: {
|
|
148
|
-
[traitName: string | symbol]: SessionFactoryTrait<TTransients>;
|
|
149
|
-
};
|
|
150
|
-
} & CallbackDefineOptions<Session, Prisma.SessionCreateInput, TTransients>;
|
|
151
|
-
type SessionTraitKeys<TOptions extends SessionFactoryDefineOptions<any>> = Exclude<keyof TOptions["traits"], number>;
|
|
152
|
-
export interface SessionFactoryInterfaceWithoutTraits<TTransients extends Record<string, unknown>> {
|
|
153
|
-
readonly _factoryFor: "Session";
|
|
154
|
-
build(inputData?: Partial<Prisma.SessionCreateInput & TTransients>): PromiseLike<Prisma.SessionCreateInput>;
|
|
155
|
-
buildCreateInput(inputData?: Partial<Prisma.SessionCreateInput & TTransients>): PromiseLike<Prisma.SessionCreateInput>;
|
|
156
|
-
buildList(list: readonly Partial<Prisma.SessionCreateInput & TTransients>[]): PromiseLike<Prisma.SessionCreateInput[]>;
|
|
157
|
-
buildList(count: number, item?: Partial<Prisma.SessionCreateInput & TTransients>): PromiseLike<Prisma.SessionCreateInput[]>;
|
|
158
|
-
pickForConnect(inputData: Session): Pick<Session, "sessionToken">;
|
|
159
|
-
create(inputData?: Partial<Prisma.SessionCreateInput & TTransients>): PromiseLike<Session>;
|
|
160
|
-
createList(list: readonly Partial<Prisma.SessionCreateInput & TTransients>[]): PromiseLike<Session[]>;
|
|
161
|
-
createList(count: number, item?: Partial<Prisma.SessionCreateInput & TTransients>): PromiseLike<Session[]>;
|
|
162
|
-
createForConnect(inputData?: Partial<Prisma.SessionCreateInput & TTransients>): PromiseLike<Pick<Session, "sessionToken">>;
|
|
163
|
-
}
|
|
164
|
-
export interface SessionFactoryInterface<TTransients extends Record<string, unknown> = Record<string, unknown>, TTraitName extends TraitName = TraitName> extends SessionFactoryInterfaceWithoutTraits<TTransients> {
|
|
165
|
-
use(name: TTraitName, ...names: readonly TTraitName[]): SessionFactoryInterfaceWithoutTraits<TTransients>;
|
|
166
|
-
}
|
|
167
|
-
interface SessionFactoryBuilder {
|
|
168
|
-
<TOptions extends SessionFactoryDefineOptions>(options: TOptions): SessionFactoryInterface<{}, SessionTraitKeys<TOptions>>;
|
|
169
|
-
withTransientFields: <TTransients extends SessionTransientFields>(defaultTransientFieldValues: TTransients) => <TOptions extends SessionFactoryDefineOptions<TTransients>>(options: TOptions) => SessionFactoryInterface<TTransients, SessionTraitKeys<TOptions>>;
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Define factory for {@link Session} model.
|
|
173
|
-
*
|
|
174
|
-
* @param options
|
|
175
|
-
* @returns factory {@link SessionFactoryInterface}
|
|
176
|
-
*/
|
|
177
|
-
export declare const defineSessionFactory: SessionFactoryBuilder;
|
|
178
|
-
type VerificationTokenFactoryDefineInput = {
|
|
179
|
-
identifier?: string;
|
|
180
|
-
token?: string;
|
|
181
|
-
expires?: Date;
|
|
182
|
-
};
|
|
183
|
-
type VerificationTokenTransientFields = Record<string, unknown> & Partial<Record<keyof VerificationTokenFactoryDefineInput, never>>;
|
|
184
|
-
type VerificationTokenFactoryTrait<TTransients extends Record<string, unknown>> = {
|
|
185
|
-
data?: Resolver<Partial<VerificationTokenFactoryDefineInput>, BuildDataOptions<TTransients>>;
|
|
186
|
-
} & CallbackDefineOptions<VerificationToken, Prisma.VerificationTokenCreateInput, TTransients>;
|
|
187
|
-
type VerificationTokenFactoryDefineOptions<TTransients extends Record<string, unknown> = Record<string, unknown>> = {
|
|
188
|
-
defaultData?: Resolver<VerificationTokenFactoryDefineInput, BuildDataOptions<TTransients>>;
|
|
189
|
-
traits?: {
|
|
190
|
-
[traitName: TraitName]: VerificationTokenFactoryTrait<TTransients>;
|
|
191
|
-
};
|
|
192
|
-
} & CallbackDefineOptions<VerificationToken, Prisma.VerificationTokenCreateInput, TTransients>;
|
|
193
|
-
type VerificationTokenTraitKeys<TOptions extends VerificationTokenFactoryDefineOptions<any>> = Exclude<keyof TOptions["traits"], number>;
|
|
194
|
-
export interface VerificationTokenFactoryInterfaceWithoutTraits<TTransients extends Record<string, unknown>> {
|
|
195
|
-
readonly _factoryFor: "VerificationToken";
|
|
196
|
-
build(inputData?: Partial<Prisma.VerificationTokenCreateInput & TTransients>): PromiseLike<Prisma.VerificationTokenCreateInput>;
|
|
197
|
-
buildCreateInput(inputData?: Partial<Prisma.VerificationTokenCreateInput & TTransients>): PromiseLike<Prisma.VerificationTokenCreateInput>;
|
|
198
|
-
buildList(list: readonly Partial<Prisma.VerificationTokenCreateInput & TTransients>[]): PromiseLike<Prisma.VerificationTokenCreateInput[]>;
|
|
199
|
-
buildList(count: number, item?: Partial<Prisma.VerificationTokenCreateInput & TTransients>): PromiseLike<Prisma.VerificationTokenCreateInput[]>;
|
|
200
|
-
pickForConnect(inputData: VerificationToken): Pick<VerificationToken, "identifier" | "token">;
|
|
201
|
-
create(inputData?: Partial<Prisma.VerificationTokenCreateInput & TTransients>): PromiseLike<VerificationToken>;
|
|
202
|
-
createList(list: readonly Partial<Prisma.VerificationTokenCreateInput & TTransients>[]): PromiseLike<VerificationToken[]>;
|
|
203
|
-
createList(count: number, item?: Partial<Prisma.VerificationTokenCreateInput & TTransients>): PromiseLike<VerificationToken[]>;
|
|
204
|
-
createForConnect(inputData?: Partial<Prisma.VerificationTokenCreateInput & TTransients>): PromiseLike<Pick<VerificationToken, "identifier" | "token">>;
|
|
205
|
-
}
|
|
206
|
-
export interface VerificationTokenFactoryInterface<TTransients extends Record<string, unknown> = Record<string, unknown>, TTraitName extends TraitName = TraitName> extends VerificationTokenFactoryInterfaceWithoutTraits<TTransients> {
|
|
207
|
-
use(name: TTraitName, ...names: readonly TTraitName[]): VerificationTokenFactoryInterfaceWithoutTraits<TTransients>;
|
|
208
|
-
}
|
|
209
|
-
interface VerificationTokenFactoryBuilder {
|
|
210
|
-
<TOptions extends VerificationTokenFactoryDefineOptions>(options?: TOptions): VerificationTokenFactoryInterface<{}, VerificationTokenTraitKeys<TOptions>>;
|
|
211
|
-
withTransientFields: <TTransients extends VerificationTokenTransientFields>(defaultTransientFieldValues: TTransients) => <TOptions extends VerificationTokenFactoryDefineOptions<TTransients>>(options?: TOptions) => VerificationTokenFactoryInterface<TTransients, VerificationTokenTraitKeys<TOptions>>;
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Define factory for {@link VerificationToken} model.
|
|
215
|
-
*
|
|
216
|
-
* @param options
|
|
217
|
-
* @returns factory {@link VerificationTokenFactoryInterface}
|
|
218
|
-
*/
|
|
219
|
-
export declare const defineVerificationTokenFactory: VerificationTokenFactoryBuilder;
|
|
220
|
-
type AuthenticatoruserFactory = {
|
|
221
|
-
_factoryFor: "User";
|
|
222
|
-
build: () => PromiseLike<Prisma.UserCreateNestedOneWithoutAuthenticatorInput["create"]>;
|
|
223
|
-
};
|
|
224
|
-
type AuthenticatorFactoryDefineInput = {
|
|
225
|
-
credentialID?: string;
|
|
226
|
-
providerAccountId?: string;
|
|
227
|
-
credentialPublicKey?: string;
|
|
228
|
-
counter?: number;
|
|
229
|
-
credentialDeviceType?: string;
|
|
230
|
-
credentialBackedUp?: boolean;
|
|
231
|
-
transports?: string | null;
|
|
232
|
-
user: AuthenticatoruserFactory | Prisma.UserCreateNestedOneWithoutAuthenticatorInput;
|
|
233
|
-
};
|
|
234
|
-
type AuthenticatorTransientFields = Record<string, unknown> & Partial<Record<keyof AuthenticatorFactoryDefineInput, never>>;
|
|
235
|
-
type AuthenticatorFactoryTrait<TTransients extends Record<string, unknown>> = {
|
|
236
|
-
data?: Resolver<Partial<AuthenticatorFactoryDefineInput>, BuildDataOptions<TTransients>>;
|
|
237
|
-
} & CallbackDefineOptions<Authenticator, Prisma.AuthenticatorCreateInput, TTransients>;
|
|
238
|
-
type AuthenticatorFactoryDefineOptions<TTransients extends Record<string, unknown> = Record<string, unknown>> = {
|
|
239
|
-
defaultData: Resolver<AuthenticatorFactoryDefineInput, BuildDataOptions<TTransients>>;
|
|
240
|
-
traits?: {
|
|
241
|
-
[traitName: string | symbol]: AuthenticatorFactoryTrait<TTransients>;
|
|
242
|
-
};
|
|
243
|
-
} & CallbackDefineOptions<Authenticator, Prisma.AuthenticatorCreateInput, TTransients>;
|
|
244
|
-
type AuthenticatorTraitKeys<TOptions extends AuthenticatorFactoryDefineOptions<any>> = Exclude<keyof TOptions["traits"], number>;
|
|
245
|
-
export interface AuthenticatorFactoryInterfaceWithoutTraits<TTransients extends Record<string, unknown>> {
|
|
246
|
-
readonly _factoryFor: "Authenticator";
|
|
247
|
-
build(inputData?: Partial<Prisma.AuthenticatorCreateInput & TTransients>): PromiseLike<Prisma.AuthenticatorCreateInput>;
|
|
248
|
-
buildCreateInput(inputData?: Partial<Prisma.AuthenticatorCreateInput & TTransients>): PromiseLike<Prisma.AuthenticatorCreateInput>;
|
|
249
|
-
buildList(list: readonly Partial<Prisma.AuthenticatorCreateInput & TTransients>[]): PromiseLike<Prisma.AuthenticatorCreateInput[]>;
|
|
250
|
-
buildList(count: number, item?: Partial<Prisma.AuthenticatorCreateInput & TTransients>): PromiseLike<Prisma.AuthenticatorCreateInput[]>;
|
|
251
|
-
pickForConnect(inputData: Authenticator): Pick<Authenticator, "userId" | "credentialID">;
|
|
252
|
-
create(inputData?: Partial<Prisma.AuthenticatorCreateInput & TTransients>): PromiseLike<Authenticator>;
|
|
253
|
-
createList(list: readonly Partial<Prisma.AuthenticatorCreateInput & TTransients>[]): PromiseLike<Authenticator[]>;
|
|
254
|
-
createList(count: number, item?: Partial<Prisma.AuthenticatorCreateInput & TTransients>): PromiseLike<Authenticator[]>;
|
|
255
|
-
createForConnect(inputData?: Partial<Prisma.AuthenticatorCreateInput & TTransients>): PromiseLike<Pick<Authenticator, "userId" | "credentialID">>;
|
|
256
|
-
}
|
|
257
|
-
export interface AuthenticatorFactoryInterface<TTransients extends Record<string, unknown> = Record<string, unknown>, TTraitName extends TraitName = TraitName> extends AuthenticatorFactoryInterfaceWithoutTraits<TTransients> {
|
|
258
|
-
use(name: TTraitName, ...names: readonly TTraitName[]): AuthenticatorFactoryInterfaceWithoutTraits<TTransients>;
|
|
259
|
-
}
|
|
260
|
-
interface AuthenticatorFactoryBuilder {
|
|
261
|
-
<TOptions extends AuthenticatorFactoryDefineOptions>(options: TOptions): AuthenticatorFactoryInterface<{}, AuthenticatorTraitKeys<TOptions>>;
|
|
262
|
-
withTransientFields: <TTransients extends AuthenticatorTransientFields>(defaultTransientFieldValues: TTransients) => <TOptions extends AuthenticatorFactoryDefineOptions<TTransients>>(options: TOptions) => AuthenticatorFactoryInterface<TTransients, AuthenticatorTraitKeys<TOptions>>;
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
* Define factory for {@link Authenticator} model.
|
|
266
|
-
*
|
|
267
|
-
* @param options
|
|
268
|
-
* @returns factory {@link AuthenticatorFactoryInterface}
|
|
269
|
-
*/
|
|
270
|
-
export declare const defineAuthenticatorFactory: AuthenticatorFactoryBuilder;
|