@fern-api/replay 0.5.0 → 0.6.1
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/dist/cli.cjs +16642 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/index.cjs +2014 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +463 -0
- package/dist/index.d.ts +463 -12
- package/dist/index.js +1968 -10
- package/dist/index.js.map +1 -1
- package/package.json +16 -6
- package/dist/FernignoreMigrator.d.ts +0 -65
- package/dist/FernignoreMigrator.d.ts.map +0 -1
- package/dist/FernignoreMigrator.js +0 -237
- package/dist/FernignoreMigrator.js.map +0 -1
- package/dist/LockfileManager.d.ts +0 -31
- package/dist/LockfileManager.d.ts.map +0 -1
- package/dist/LockfileManager.js +0 -124
- package/dist/LockfileManager.js.map +0 -1
- package/dist/ReplayApplicator.d.ts +0 -62
- package/dist/ReplayApplicator.d.ts.map +0 -1
- package/dist/ReplayApplicator.js +0 -533
- package/dist/ReplayApplicator.js.map +0 -1
- package/dist/ReplayCommitter.d.ts +0 -39
- package/dist/ReplayCommitter.d.ts.map +0 -1
- package/dist/ReplayCommitter.js +0 -84
- package/dist/ReplayCommitter.js.map +0 -1
- package/dist/ReplayDetector.d.ts +0 -27
- package/dist/ReplayDetector.d.ts.map +0 -1
- package/dist/ReplayDetector.js +0 -150
- package/dist/ReplayDetector.js.map +0 -1
- package/dist/ReplayService.d.ts +0 -113
- package/dist/ReplayService.d.ts.map +0 -1
- package/dist/ReplayService.js +0 -579
- package/dist/ReplayService.js.map +0 -1
- package/dist/ThreeWayMerge.d.ts +0 -11
- package/dist/ThreeWayMerge.d.ts.map +0 -1
- package/dist/ThreeWayMerge.js +0 -48
- package/dist/ThreeWayMerge.js.map +0 -1
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -462
- package/dist/cli.js.map +0 -1
- package/dist/commands/bootstrap.d.ts +0 -46
- package/dist/commands/bootstrap.d.ts.map +0 -1
- package/dist/commands/bootstrap.js +0 -262
- package/dist/commands/bootstrap.js.map +0 -1
- package/dist/commands/forget.d.ts +0 -26
- package/dist/commands/forget.d.ts.map +0 -1
- package/dist/commands/forget.js +0 -37
- package/dist/commands/forget.js.map +0 -1
- package/dist/commands/index.d.ts +0 -6
- package/dist/commands/index.d.ts.map +0 -1
- package/dist/commands/index.js +0 -6
- package/dist/commands/index.js.map +0 -1
- package/dist/commands/reset.d.ts +0 -28
- package/dist/commands/reset.d.ts.map +0 -1
- package/dist/commands/reset.js +0 -37
- package/dist/commands/reset.js.map +0 -1
- package/dist/commands/resolve.d.ts +0 -16
- package/dist/commands/resolve.d.ts.map +0 -1
- package/dist/commands/resolve.js +0 -28
- package/dist/commands/resolve.js.map +0 -1
- package/dist/commands/status.d.ts +0 -34
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js +0 -32
- package/dist/commands/status.js.map +0 -1
- package/dist/git/CommitDetection.d.ts +0 -11
- package/dist/git/CommitDetection.d.ts.map +0 -1
- package/dist/git/CommitDetection.js +0 -25
- package/dist/git/CommitDetection.js.map +0 -1
- package/dist/git/GitClient.d.ts +0 -33
- package/dist/git/GitClient.d.ts.map +0 -1
- package/dist/git/GitClient.js +0 -118
- package/dist/git/GitClient.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/types.d.ts +0 -78
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -3
- package/dist/types.js.map +0 -1
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
import { createHash } from "node:crypto";
|
|
2
|
-
import { readFileSync, writeFileSync, existsSync } from "node:fs";
|
|
3
|
-
import { join } from "node:path";
|
|
4
|
-
import { GitClient } from "../git/GitClient.js";
|
|
5
|
-
import { isGenerationCommit, isReplayCommit } from "../git/CommitDetection.js";
|
|
6
|
-
import { LockfileManager } from "../LockfileManager.js";
|
|
7
|
-
import { FernignoreMigrator } from "../FernignoreMigrator.js";
|
|
8
|
-
/**
|
|
9
|
-
* Bootstrap Replay for an existing SDK repository.
|
|
10
|
-
*
|
|
11
|
-
* Scans git history to find all generation commits, identifies
|
|
12
|
-
* user customization patches between them, and creates the initial replay.lock.
|
|
13
|
-
*
|
|
14
|
-
* This is a one-time migration step for SDKs that existed before Replay.
|
|
15
|
-
*/
|
|
16
|
-
export async function bootstrap(outputDir, options) {
|
|
17
|
-
const git = new GitClient(outputDir);
|
|
18
|
-
const lockManager = new LockfileManager(outputDir);
|
|
19
|
-
const maxCommits = options?.maxCommitsToScan ?? 500;
|
|
20
|
-
const warnings = [];
|
|
21
|
-
// Check for existing lockfile
|
|
22
|
-
if (lockManager.exists() && !options?.force) {
|
|
23
|
-
return {
|
|
24
|
-
generationCommit: null,
|
|
25
|
-
patchesDetected: 0,
|
|
26
|
-
patchesCreated: 0,
|
|
27
|
-
patches: [],
|
|
28
|
-
fernignorePatterns: [],
|
|
29
|
-
fernignoreUpdated: false,
|
|
30
|
-
warnings: [
|
|
31
|
-
"Replay lockfile already exists. Use --force to overwrite.",
|
|
32
|
-
],
|
|
33
|
-
staleGenerationsSkipped: 0,
|
|
34
|
-
scannedSinceGeneration: "",
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
// 1. Find ALL generation commits (newest first, excluding replay commits)
|
|
38
|
-
const genCommits = await findAllGenerationCommits(git, maxCommits);
|
|
39
|
-
if (genCommits.length === 0) {
|
|
40
|
-
return {
|
|
41
|
-
generationCommit: null,
|
|
42
|
-
patchesDetected: 0,
|
|
43
|
-
patchesCreated: 0,
|
|
44
|
-
patches: [],
|
|
45
|
-
fernignorePatterns: [],
|
|
46
|
-
fernignoreUpdated: false,
|
|
47
|
-
warnings: [
|
|
48
|
-
"No generation commits found in the last " + maxCommits + " commits. " +
|
|
49
|
-
"Run 'fern generate' first to establish a baseline.",
|
|
50
|
-
],
|
|
51
|
-
staleGenerationsSkipped: 0,
|
|
52
|
-
scannedSinceGeneration: "",
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
const latestGen = genCommits[0];
|
|
56
|
-
// 2. Set up in-memory lockfile (don't write to disk yet — we may be in dry-run mode)
|
|
57
|
-
// For clean start (no importHistory), use HEAD as current_generation so that
|
|
58
|
-
// the next fern generate detects 0 old commits. When importing history, use
|
|
59
|
-
// the actual generation commit as the base for patch detection.
|
|
60
|
-
const anchorSha = options?.importHistory
|
|
61
|
-
? latestGen.sha
|
|
62
|
-
: (await git.exec(["rev-parse", "HEAD"])).trim();
|
|
63
|
-
const treeHash = await git.getTreeHash(anchorSha);
|
|
64
|
-
const genRecord = {
|
|
65
|
-
commit_sha: anchorSha,
|
|
66
|
-
tree_hash: treeHash,
|
|
67
|
-
timestamp: new Date().toISOString(),
|
|
68
|
-
cli_version: "unknown",
|
|
69
|
-
generator_versions: {},
|
|
70
|
-
};
|
|
71
|
-
lockManager.initializeInMemory(genRecord);
|
|
72
|
-
// 3. Scan for user patches (only when importing history)
|
|
73
|
-
const patches = options?.importHistory
|
|
74
|
-
? await findAllUserPatches(git, genCommits)
|
|
75
|
-
: [];
|
|
76
|
-
// 4. Handle .fernignore if present (only when importing history)
|
|
77
|
-
const migrator = new FernignoreMigrator(git, lockManager, outputDir);
|
|
78
|
-
const fernignorePatterns = migrator.readFernignorePatterns();
|
|
79
|
-
let fernignoreAnalysis;
|
|
80
|
-
if (options?.importHistory && migrator.fernignoreExists() && fernignorePatterns.length > 0) {
|
|
81
|
-
fernignoreAnalysis = await migrator.analyzeMigration();
|
|
82
|
-
// Add synthetic patches from .fernignore analysis
|
|
83
|
-
if (fernignoreAnalysis.syntheticPatches.length > 0) {
|
|
84
|
-
patches.push(...fernignoreAnalysis.syntheticPatches);
|
|
85
|
-
}
|
|
86
|
-
if (fernignoreAnalysis.fernignoreOnly.length > 0) {
|
|
87
|
-
for (const file of fernignoreAnalysis.fernignoreOnly) {
|
|
88
|
-
warnings.push(`${file}: in .fernignore but no recent commits found since last generation. ` +
|
|
89
|
-
"File may be stale, matches generated output, or does not exist. No customization to track.");
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
// In dry-run mode, don't persist anything
|
|
94
|
-
if (options?.dryRun) {
|
|
95
|
-
return {
|
|
96
|
-
generationCommit: latestGen,
|
|
97
|
-
patchesDetected: patches.length,
|
|
98
|
-
patchesCreated: 0,
|
|
99
|
-
patches,
|
|
100
|
-
fernignorePatterns,
|
|
101
|
-
fernignoreAnalysis,
|
|
102
|
-
fernignoreUpdated: false,
|
|
103
|
-
warnings,
|
|
104
|
-
staleGenerationsSkipped: genCommits.length - 1,
|
|
105
|
-
scannedSinceGeneration: latestGen.sha,
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
// 5. Persist patches to lockfile
|
|
109
|
-
for (const patch of patches) {
|
|
110
|
-
lockManager.addPatch(patch);
|
|
111
|
-
}
|
|
112
|
-
lockManager.save();
|
|
113
|
-
// 6. Ensure .fernignore protects replay files from generation wipe
|
|
114
|
-
const fernignoreUpdated = ensureFernignoreEntries(outputDir);
|
|
115
|
-
// 7. Handle .fernignore migration
|
|
116
|
-
if (migrator.fernignoreExists() && fernignorePatterns.length > 0) {
|
|
117
|
-
const action = options?.fernignoreAction ?? "skip";
|
|
118
|
-
if (action === "migrate") {
|
|
119
|
-
// Move truly untrackable patterns (no diff from generated) to replay.yml exclude list
|
|
120
|
-
const patternsToExclude = fernignoreAnalysis?.fernignoreOnly ?? [];
|
|
121
|
-
if (patternsToExclude.length > 0) {
|
|
122
|
-
migrator.movePatternsToReplayYml(patternsToExclude);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
return {
|
|
127
|
-
generationCommit: latestGen,
|
|
128
|
-
patchesDetected: patches.length,
|
|
129
|
-
patchesCreated: patches.length,
|
|
130
|
-
patches,
|
|
131
|
-
fernignorePatterns,
|
|
132
|
-
fernignoreAnalysis,
|
|
133
|
-
fernignoreUpdated,
|
|
134
|
-
warnings,
|
|
135
|
-
staleGenerationsSkipped: genCommits.length - 1,
|
|
136
|
-
scannedSinceGeneration: latestGen.sha,
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Find all generation commits in history, newest first.
|
|
141
|
-
* Excludes replay commits (which also match isGenerationCommit).
|
|
142
|
-
*/
|
|
143
|
-
async function findAllGenerationCommits(git, maxCommits) {
|
|
144
|
-
const log = await git.exec([
|
|
145
|
-
"log",
|
|
146
|
-
"--format=%H%x00%an%x00%ae%x00%s",
|
|
147
|
-
`-${maxCommits}`,
|
|
148
|
-
]);
|
|
149
|
-
if (!log.trim()) {
|
|
150
|
-
return [];
|
|
151
|
-
}
|
|
152
|
-
const genCommits = [];
|
|
153
|
-
for (const line of log.trim().split("\n")) {
|
|
154
|
-
if (!line)
|
|
155
|
-
continue;
|
|
156
|
-
const [sha, authorName, authorEmail, message] = line.split("\0");
|
|
157
|
-
const commit = { sha, authorName, authorEmail, message };
|
|
158
|
-
if (isGenerationCommit(commit) && !isReplayCommit(commit)) {
|
|
159
|
-
genCommits.push(commit);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
return genCommits;
|
|
163
|
-
}
|
|
164
|
-
/** Find user patches since the most recent generation to HEAD. Deduplicates by content hash. */
|
|
165
|
-
async function findAllUserPatches(git, genCommits) {
|
|
166
|
-
const patches = [];
|
|
167
|
-
const seenHashes = new Set();
|
|
168
|
-
// Only scan since the LAST (most recent) generation commit to HEAD
|
|
169
|
-
// This ignores "stale" commits that were regenerated over before the customer activated replay
|
|
170
|
-
const latestGen = genCommits[0];
|
|
171
|
-
const recentPatches = await extractUserPatches(git, latestGen.sha, "HEAD", latestGen.sha, seenHashes);
|
|
172
|
-
patches.push(...recentPatches);
|
|
173
|
-
return patches;
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Find user commits in a range (fromSha..toRef) and extract patches.
|
|
177
|
-
* Returns patches in chronological order (oldest first).
|
|
178
|
-
*/
|
|
179
|
-
async function extractUserPatches(git, fromSha, toRef, baseGeneration, seenHashes) {
|
|
180
|
-
const log = await git.exec([
|
|
181
|
-
"log",
|
|
182
|
-
"--format=%H%x00%an%x00%ae%x00%s",
|
|
183
|
-
`${fromSha}..${toRef}`,
|
|
184
|
-
]);
|
|
185
|
-
if (!log.trim()) {
|
|
186
|
-
return [];
|
|
187
|
-
}
|
|
188
|
-
const commits = parseGitLog(log);
|
|
189
|
-
const patches = [];
|
|
190
|
-
// Process in reverse (oldest first) for chronological order
|
|
191
|
-
for (const commit of commits.reverse()) {
|
|
192
|
-
if (isGenerationCommit(commit))
|
|
193
|
-
continue;
|
|
194
|
-
const parents = await git.getCommitParents(commit.sha);
|
|
195
|
-
if (parents.length > 1)
|
|
196
|
-
continue;
|
|
197
|
-
const patchContent = await git.formatPatch(commit.sha);
|
|
198
|
-
const contentHash = computeContentHash(patchContent);
|
|
199
|
-
if (seenHashes.has(contentHash))
|
|
200
|
-
continue;
|
|
201
|
-
seenHashes.add(contentHash);
|
|
202
|
-
const filesOutput = await git.exec([
|
|
203
|
-
"diff-tree", "--no-commit-id", "--name-only", "-r", commit.sha,
|
|
204
|
-
]);
|
|
205
|
-
patches.push({
|
|
206
|
-
id: `patch-${commit.sha.slice(0, 8)}`,
|
|
207
|
-
content_hash: contentHash,
|
|
208
|
-
original_commit: commit.sha,
|
|
209
|
-
original_message: commit.message,
|
|
210
|
-
original_author: `${commit.authorName} <${commit.authorEmail}>`,
|
|
211
|
-
base_generation: baseGeneration,
|
|
212
|
-
files: filesOutput.trim().split("\n").filter(Boolean),
|
|
213
|
-
patch_content: patchContent,
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
return patches;
|
|
217
|
-
}
|
|
218
|
-
function parseGitLog(log) {
|
|
219
|
-
return log
|
|
220
|
-
.trim()
|
|
221
|
-
.split("\n")
|
|
222
|
-
.filter(Boolean)
|
|
223
|
-
.map((line) => {
|
|
224
|
-
const [sha, authorName, authorEmail, message] = line.split("\0");
|
|
225
|
-
return { sha, authorName, authorEmail, message };
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
const REPLAY_FERNIGNORE_ENTRIES = [".fern/replay.lock", ".fern/replay.yml"];
|
|
229
|
-
/** Ensure .fernignore contains replay file entries to survive the gen wipe. */
|
|
230
|
-
function ensureFernignoreEntries(outputDir) {
|
|
231
|
-
const fernignorePath = join(outputDir, ".fernignore");
|
|
232
|
-
let content = "";
|
|
233
|
-
if (existsSync(fernignorePath)) {
|
|
234
|
-
content = readFileSync(fernignorePath, "utf-8");
|
|
235
|
-
}
|
|
236
|
-
const lines = content.split("\n");
|
|
237
|
-
const toAdd = [];
|
|
238
|
-
for (const entry of REPLAY_FERNIGNORE_ENTRIES) {
|
|
239
|
-
if (!lines.some(line => line.trim() === entry)) {
|
|
240
|
-
toAdd.push(entry);
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
if (toAdd.length === 0) {
|
|
244
|
-
return false;
|
|
245
|
-
}
|
|
246
|
-
if (content && !content.endsWith("\n")) {
|
|
247
|
-
content += "\n";
|
|
248
|
-
}
|
|
249
|
-
content += toAdd.join("\n") + "\n";
|
|
250
|
-
writeFileSync(fernignorePath, content, "utf-8");
|
|
251
|
-
return true;
|
|
252
|
-
}
|
|
253
|
-
function computeContentHash(patchContent) {
|
|
254
|
-
const normalized = patchContent
|
|
255
|
-
.split("\n")
|
|
256
|
-
.filter((line) => !line.startsWith("From ") &&
|
|
257
|
-
!line.startsWith("index ") &&
|
|
258
|
-
!line.startsWith("Date: "))
|
|
259
|
-
.join("\n");
|
|
260
|
-
return `sha256:${createHash("sha256").update(normalized).digest("hex")}`;
|
|
261
|
-
}
|
|
262
|
-
//# sourceMappingURL=bootstrap.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../src/commands/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE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;IAChD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,SAAS,kBAAkB,CAAC,YAAoB;IAC5C,MAAM,UAAU,GAAG,YAAY;SAC1B,KAAK,CAAC,IAAI,CAAC;SACX,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CACb,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QACzB,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;QAC1B,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAC7B;SACA,IAAI,CAAC,IAAI,CAAC,CAAC;IAEhB,OAAO,UAAU,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AAC7E,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export interface ForgetOptions {
|
|
2
|
-
/** Don't actually remove, just show what would be removed */
|
|
3
|
-
dryRun?: boolean;
|
|
4
|
-
}
|
|
5
|
-
export interface ForgetResult {
|
|
6
|
-
/** Patches that were (or would be) removed */
|
|
7
|
-
removed: Array<{
|
|
8
|
-
id: string;
|
|
9
|
-
message: string;
|
|
10
|
-
files: string[];
|
|
11
|
-
}>;
|
|
12
|
-
/** True if no patches matched the pattern */
|
|
13
|
-
notFound: boolean;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Remove patches matching a file path or glob pattern.
|
|
17
|
-
*
|
|
18
|
-
* The next regeneration will NOT replay these patches -
|
|
19
|
-
* generated code will replace the user's customizations for those files.
|
|
20
|
-
*
|
|
21
|
-
* @param outputDir - SDK output directory
|
|
22
|
-
* @param filePattern - File path or glob pattern (e.g., "src/utils/retry.ts" or "src/legacy/**")
|
|
23
|
-
* @param options - ForgetOptions
|
|
24
|
-
*/
|
|
25
|
-
export declare function forget(outputDir: string, filePattern: string, options?: ForgetOptions): ForgetResult;
|
|
26
|
-
//# sourceMappingURL=forget.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"forget.d.ts","sourceRoot":"","sources":["../../src/commands/forget.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC1B,6DAA6D;IAC7D,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IACzB,8CAA8C;IAC9C,OAAO,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;IACjE,6CAA6C;IAC7C,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAClB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,aAAa,GACxB,YAAY,CAkCd"}
|
package/dist/commands/forget.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { LockfileManager } from "../LockfileManager.js";
|
|
2
|
-
import { minimatch } from "minimatch";
|
|
3
|
-
/**
|
|
4
|
-
* Remove patches matching a file path or glob pattern.
|
|
5
|
-
*
|
|
6
|
-
* The next regeneration will NOT replay these patches -
|
|
7
|
-
* generated code will replace the user's customizations for those files.
|
|
8
|
-
*
|
|
9
|
-
* @param outputDir - SDK output directory
|
|
10
|
-
* @param filePattern - File path or glob pattern (e.g., "src/utils/retry.ts" or "src/legacy/**")
|
|
11
|
-
* @param options - ForgetOptions
|
|
12
|
-
*/
|
|
13
|
-
export function forget(outputDir, filePattern, options) {
|
|
14
|
-
const lockManager = new LockfileManager(outputDir);
|
|
15
|
-
if (!lockManager.exists()) {
|
|
16
|
-
return { removed: [], notFound: true };
|
|
17
|
-
}
|
|
18
|
-
const lock = lockManager.read();
|
|
19
|
-
// Find patches that match the pattern
|
|
20
|
-
const matchingPatches = lock.patches.filter((patch) => patch.files.some((file) => file === filePattern || minimatch(file, filePattern)));
|
|
21
|
-
if (matchingPatches.length === 0) {
|
|
22
|
-
return { removed: [], notFound: true };
|
|
23
|
-
}
|
|
24
|
-
const removed = matchingPatches.map((p) => ({
|
|
25
|
-
id: p.id,
|
|
26
|
-
message: p.original_message,
|
|
27
|
-
files: p.files,
|
|
28
|
-
}));
|
|
29
|
-
if (!options?.dryRun) {
|
|
30
|
-
for (const patch of matchingPatches) {
|
|
31
|
-
lockManager.removePatch(patch.id);
|
|
32
|
-
}
|
|
33
|
-
lockManager.save();
|
|
34
|
-
}
|
|
35
|
-
return { removed, notFound: false };
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=forget.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"forget.js","sourceRoot":"","sources":["../../src/commands/forget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AActC;;;;;;;;;GASG;AACH,MAAM,UAAU,MAAM,CAClB,SAAiB,EACjB,WAAmB,EACnB,OAAuB;IAEvB,MAAM,WAAW,GAAG,IAAI,eAAe,CAAC,SAAS,CAAC,CAAC;IAEnD,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC;QACxB,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,CAAC;IAED,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC;IAEhC,sCAAsC;IACtC,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAClD,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACtB,IAAI,KAAK,WAAW,IAAI,SAAS,CAAC,IAAI,EAAE,WAAW,CAAC,CACvD,CACJ,CAAC;IAEF,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/B,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,CAAC;IAED,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACxC,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,OAAO,EAAE,CAAC,CAAC,gBAAgB;QAC3B,KAAK,EAAE,CAAC,CAAC,KAAK;KACjB,CAAC,CAAC,CAAC;IAEJ,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;QACnB,KAAK,MAAM,KAAK,IAAI,eAAe,EAAE,CAAC;YAClC,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACtC,CAAC;QACD,WAAW,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AACxC,CAAC"}
|
package/dist/commands/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { bootstrap, type BootstrapOptions, type BootstrapResult } from "./bootstrap.js";
|
|
2
|
-
export { forget, type ForgetOptions, type ForgetResult } from "./forget.js";
|
|
3
|
-
export { reset, type ResetOptions, type ResetResult } from "./reset.js";
|
|
4
|
-
export { resolve, type ResolveOptions, type ResolveResult } from "./resolve.js";
|
|
5
|
-
export { status, type StatusResult, type StatusPatch, type StatusGeneration } from "./status.js";
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACxF,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/commands/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+C,MAAM,gBAAgB,CAAC;AACxF,OAAO,EAAE,MAAM,EAAyC,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAuC,MAAM,YAAY,CAAC;AACxE,OAAO,EAAE,OAAO,EAA2C,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,MAAM,EAA8D,MAAM,aAAa,CAAC"}
|
package/dist/commands/reset.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export interface ResetOptions {
|
|
2
|
-
/** Don't actually delete, just show what would happen */
|
|
3
|
-
dryRun?: boolean;
|
|
4
|
-
}
|
|
5
|
-
export interface ResetResult {
|
|
6
|
-
/** Whether reset was successful (or would be) */
|
|
7
|
-
success: boolean;
|
|
8
|
-
/** Number of patches that were (or would be) removed */
|
|
9
|
-
patchesRemoved: number;
|
|
10
|
-
/** Whether the lockfile was (or would be) deleted */
|
|
11
|
-
lockfileDeleted: boolean;
|
|
12
|
-
/** True if there was nothing to reset */
|
|
13
|
-
nothingToReset: boolean;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Reset Replay - removes replay.lock entirely.
|
|
17
|
-
*
|
|
18
|
-
* User's code changes remain in the repository, but they will NOT be
|
|
19
|
-
* automatically preserved on the next regeneration. The next `fern generate`
|
|
20
|
-
* will overwrite everything.
|
|
21
|
-
*
|
|
22
|
-
* Recovery: Run `fern-replay bootstrap` to re-initialize from git history.
|
|
23
|
-
*
|
|
24
|
-
* @param outputDir - SDK output directory
|
|
25
|
-
* @param options - ResetOptions
|
|
26
|
-
*/
|
|
27
|
-
export declare function reset(outputDir: string, options?: ResetOptions): ResetResult;
|
|
28
|
-
//# sourceMappingURL=reset.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reset.d.ts","sourceRoot":"","sources":["../../src/commands/reset.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IACzB,yDAAyD;IACzD,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IACxB,iDAAiD;IACjD,OAAO,EAAE,OAAO,CAAC;IACjB,wDAAwD;IACxD,cAAc,EAAE,MAAM,CAAC;IACvB,qDAAqD;IACrD,eAAe,EAAE,OAAO,CAAC;IACzB,yCAAyC;IACzC,cAAc,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,WAAW,CAyB5E"}
|
package/dist/commands/reset.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { LockfileManager } from "../LockfileManager.js";
|
|
2
|
-
import { unlinkSync } from "node:fs";
|
|
3
|
-
/**
|
|
4
|
-
* Reset Replay - removes replay.lock entirely.
|
|
5
|
-
*
|
|
6
|
-
* User's code changes remain in the repository, but they will NOT be
|
|
7
|
-
* automatically preserved on the next regeneration. The next `fern generate`
|
|
8
|
-
* will overwrite everything.
|
|
9
|
-
*
|
|
10
|
-
* Recovery: Run `fern-replay bootstrap` to re-initialize from git history.
|
|
11
|
-
*
|
|
12
|
-
* @param outputDir - SDK output directory
|
|
13
|
-
* @param options - ResetOptions
|
|
14
|
-
*/
|
|
15
|
-
export function reset(outputDir, options) {
|
|
16
|
-
const lockManager = new LockfileManager(outputDir);
|
|
17
|
-
if (!lockManager.exists()) {
|
|
18
|
-
return {
|
|
19
|
-
success: true,
|
|
20
|
-
patchesRemoved: 0,
|
|
21
|
-
lockfileDeleted: false,
|
|
22
|
-
nothingToReset: true,
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
const lock = lockManager.read();
|
|
26
|
-
const patchCount = lock.patches.length;
|
|
27
|
-
if (!options?.dryRun) {
|
|
28
|
-
unlinkSync(lockManager.lockfilePath);
|
|
29
|
-
}
|
|
30
|
-
return {
|
|
31
|
-
success: true,
|
|
32
|
-
patchesRemoved: patchCount,
|
|
33
|
-
lockfileDeleted: true,
|
|
34
|
-
nothingToReset: false,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=reset.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reset.js","sourceRoot":"","sources":["../../src/commands/reset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAkBrC;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,KAAK,CAAC,SAAiB,EAAE,OAAsB;IAC3D,MAAM,WAAW,GAAG,IAAI,eAAe,CAAC,SAAS,CAAC,CAAC;IAEnD,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC;QACxB,OAAO;YACH,OAAO,EAAE,IAAI;YACb,cAAc,EAAE,CAAC;YACjB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;SACvB,CAAC;IACN,CAAC;IAED,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC;IAChC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IAEvC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;QACnB,UAAU,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IACzC,CAAC;IAED,OAAO;QACH,OAAO,EAAE,IAAI;QACb,cAAc,EAAE,UAAU;QAC1B,eAAe,EAAE,IAAI;QACrB,cAAc,EAAE,KAAK;KACxB,CAAC;AACN,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export interface ResolveOptions {
|
|
2
|
-
/** Check for remaining conflict markers before committing. Default: true */
|
|
3
|
-
checkMarkers?: boolean;
|
|
4
|
-
}
|
|
5
|
-
export interface ResolveResult {
|
|
6
|
-
/** Whether the resolve succeeded */
|
|
7
|
-
success: boolean;
|
|
8
|
-
/** Commit SHA of the [fern-replay] commit, if created */
|
|
9
|
-
commitSha?: string;
|
|
10
|
-
/** Reason for failure */
|
|
11
|
-
reason?: string;
|
|
12
|
-
/** Files that still have conflict markers */
|
|
13
|
-
unresolvedFiles?: string[];
|
|
14
|
-
}
|
|
15
|
-
export declare function resolve(outputDir: string, options?: ResolveOptions): Promise<ResolveResult>;
|
|
16
|
-
//# sourceMappingURL=resolve.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/commands/resolve.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,cAAc;IAC3B,4EAA4E;IAC5E,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC1B,oCAAoC;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED,wBAAsB,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CA6BjG"}
|
package/dist/commands/resolve.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { GitClient } from "../git/GitClient.js";
|
|
2
|
-
import { LockfileManager } from "../LockfileManager.js";
|
|
3
|
-
import { ReplayCommitter } from "../ReplayCommitter.js";
|
|
4
|
-
export async function resolve(outputDir, options) {
|
|
5
|
-
const lockManager = new LockfileManager(outputDir);
|
|
6
|
-
if (!lockManager.exists()) {
|
|
7
|
-
return { success: false, reason: "no-lockfile" };
|
|
8
|
-
}
|
|
9
|
-
const lock = lockManager.read();
|
|
10
|
-
if (lock.patches.length === 0) {
|
|
11
|
-
return { success: false, reason: "no-patches" };
|
|
12
|
-
}
|
|
13
|
-
const git = new GitClient(outputDir);
|
|
14
|
-
// Check for remaining conflict markers
|
|
15
|
-
if (options?.checkMarkers !== false) {
|
|
16
|
-
const markerFiles = await git.exec(["grep", "-l", "<<<<<<<", "--", "."]).catch(() => "");
|
|
17
|
-
if (markerFiles.trim()) {
|
|
18
|
-
const files = markerFiles.trim().split("\n").filter(Boolean);
|
|
19
|
-
return { success: false, reason: "unresolved-conflicts", unresolvedFiles: files };
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
// Stage all changes and create [fern-replay] commit
|
|
23
|
-
const committer = new ReplayCommitter(git, outputDir);
|
|
24
|
-
await committer.stageAll();
|
|
25
|
-
const commitSha = await committer.commitReplay(lock.patches.length, lock.patches);
|
|
26
|
-
return { success: true, commitSha };
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=resolve.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/commands/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAkBxD,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,SAAiB,EAAE,OAAwB;IACrE,MAAM,WAAW,GAAG,IAAI,eAA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OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AACxC,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export interface StatusResult {
|
|
2
|
-
/** Whether replay is initialized (lockfile exists) */
|
|
3
|
-
initialized: boolean;
|
|
4
|
-
/** Tracked customization patches */
|
|
5
|
-
patches: StatusPatch[];
|
|
6
|
-
/** Last generation info, if available */
|
|
7
|
-
lastGeneration: StatusGeneration | undefined;
|
|
8
|
-
}
|
|
9
|
-
export interface StatusPatch {
|
|
10
|
-
/** Short SHA of the original commit */
|
|
11
|
-
sha: string;
|
|
12
|
-
/** Author name (without email) */
|
|
13
|
-
author: string;
|
|
14
|
-
/** Original commit message */
|
|
15
|
-
message: string;
|
|
16
|
-
/** Files touched by this patch */
|
|
17
|
-
files: string[];
|
|
18
|
-
}
|
|
19
|
-
export interface StatusGeneration {
|
|
20
|
-
/** Full commit SHA */
|
|
21
|
-
sha: string;
|
|
22
|
-
/** Generation timestamp */
|
|
23
|
-
timestamp: string;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Get the current Replay status for an SDK repository.
|
|
27
|
-
*
|
|
28
|
-
* Returns structured info about tracked patches and the last generation.
|
|
29
|
-
* The CLI can format this however it wants.
|
|
30
|
-
*
|
|
31
|
-
* @param outputDir - SDK output directory
|
|
32
|
-
*/
|
|
33
|
-
export declare function status(outputDir: string): StatusResult;
|
|
34
|
-
//# sourceMappingURL=status.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IACzB,sDAAsD;IACtD,WAAW,EAAE,OAAO,CAAC;IACrB,oCAAoC;IACpC,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,yCAAyC;IACzC,cAAc,EAAE,gBAAgB,GAAG,SAAS,CAAC;CAChD;AAED,MAAM,WAAW,WAAW;IACxB,uCAAuC;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,KAAK,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC7B,sBAAsB;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,2BAA2B;IAC3B,SAAS,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,CA0BtD"}
|
package/dist/commands/status.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { LockfileManager } from "../LockfileManager.js";
|
|
2
|
-
/**
|
|
3
|
-
* Get the current Replay status for an SDK repository.
|
|
4
|
-
*
|
|
5
|
-
* Returns structured info about tracked patches and the last generation.
|
|
6
|
-
* The CLI can format this however it wants.
|
|
7
|
-
*
|
|
8
|
-
* @param outputDir - SDK output directory
|
|
9
|
-
*/
|
|
10
|
-
export function status(outputDir) {
|
|
11
|
-
const lockManager = new LockfileManager(outputDir);
|
|
12
|
-
if (!lockManager.exists()) {
|
|
13
|
-
return { initialized: false, patches: [], lastGeneration: undefined };
|
|
14
|
-
}
|
|
15
|
-
const lock = lockManager.read();
|
|
16
|
-
const patches = lock.patches.map((patch) => ({
|
|
17
|
-
sha: patch.original_commit.slice(0, 7),
|
|
18
|
-
author: patch.original_author.split("<")[0]?.trim() ?? "unknown",
|
|
19
|
-
message: patch.original_message,
|
|
20
|
-
files: patch.files,
|
|
21
|
-
}));
|
|
22
|
-
let lastGeneration;
|
|
23
|
-
const lastGen = lock.generations.find((g) => g.commit_sha === lock.current_generation);
|
|
24
|
-
if (lastGen) {
|
|
25
|
-
lastGeneration = {
|
|
26
|
-
sha: lastGen.commit_sha,
|
|
27
|
-
timestamp: lastGen.timestamp,
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
return { initialized: true, patches, lastGeneration };
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=status.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AA6BxD;;;;;;;GAOG;AACH,MAAM,UAAU,MAAM,CAAC,SAAiB;IACpC,MAAM,WAAW,GAAG,IAAI,eAAe,CAAC,SAAS,CAAC,CAAC;IAEnD,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC;QACxB,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC;IAC1E,CAAC;IAED,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC;IAEhC,MAAM,OAAO,GAAkB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACxD,GAAG,EAAE,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;QACtC,MAAM,EAAE,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,SAAS;QAChE,OAAO,EAAE,KAAK,CAAC,gBAAgB;QAC/B,KAAK,EAAE,KAAK,CAAC,KAAK;KACrB,CAAC,CAAC,CAAC;IAEJ,IAAI,cAA4C,CAAC;IACjD,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,KAAK,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACvF,IAAI,OAAO,EAAE,CAAC;QACV,cAAc,GAAG;YACb,GAAG,EAAE,OAAO,CAAC,UAAU;YACvB,SAAS,EAAE,OAAO,CAAC,SAAS;SAC/B,CAAC;IACN,CAAC;IAED,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1D,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { CommitInfo } from "../types.js";
|
|
2
|
-
export declare const FERN_BOT_NAME = "fern-api";
|
|
3
|
-
export declare const FERN_BOT_EMAIL = "115122769+fern-api[bot]@users.noreply.github.com";
|
|
4
|
-
export declare const FERN_BOT_LOGIN = "fern-api[bot]";
|
|
5
|
-
/** Classify a commit as a Fern generation commit via author or message markers. */
|
|
6
|
-
export declare function isGenerationCommit(commit: CommitInfo): boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Determines if a commit is a replay commit (applied customizations).
|
|
9
|
-
*/
|
|
10
|
-
export declare function isReplayCommit(commit: CommitInfo): boolean;
|
|
11
|
-
//# sourceMappingURL=CommitDetection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommitDetection.d.ts","sourceRoot":"","sources":["../../src/git/CommitDetection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,eAAO,MAAM,aAAa,aAAa,CAAC;AACxC,eAAO,MAAM,cAAc,qDAAqD,CAAC;AACjF,eAAO,MAAM,cAAc,kBAAkB,CAAC;AAK9C,mFAAmF;AACnF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAiB9D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAE1D"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// Constants from Fern's PR #11502
|
|
2
|
-
export const FERN_BOT_NAME = "fern-api";
|
|
3
|
-
export const FERN_BOT_EMAIL = "115122769+fern-api[bot]@users.noreply.github.com";
|
|
4
|
-
export const FERN_BOT_LOGIN = "fern-api[bot]";
|
|
5
|
-
// Fern-support commits (via bot account) are excluded from generation detection.
|
|
6
|
-
const FERN_SUPPORT_NAMES = ["fern-support", "Fern Support"];
|
|
7
|
-
/** Classify a commit as a Fern generation commit via author or message markers. */
|
|
8
|
-
export function isGenerationCommit(commit) {
|
|
9
|
-
const isFernSupport = FERN_SUPPORT_NAMES.includes(commit.authorName);
|
|
10
|
-
const isBotAuthor = !isFernSupport && (commit.authorLogin === FERN_BOT_LOGIN ||
|
|
11
|
-
commit.authorEmail === FERN_BOT_EMAIL ||
|
|
12
|
-
commit.authorName === FERN_BOT_NAME);
|
|
13
|
-
const hasGenerationMarker = commit.message.startsWith("[fern-generated]") ||
|
|
14
|
-
commit.message.startsWith("[fern-replay]") ||
|
|
15
|
-
commit.message.includes("Generated by Fern") ||
|
|
16
|
-
commit.message.includes("\u{1F916} Generated with Fern");
|
|
17
|
-
return isBotAuthor || hasGenerationMarker;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Determines if a commit is a replay commit (applied customizations).
|
|
21
|
-
*/
|
|
22
|
-
export function isReplayCommit(commit) {
|
|
23
|
-
return commit.message.startsWith("[fern-replay]");
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=CommitDetection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommitDetection.js","sourceRoot":"","sources":["../../src/git/CommitDetection.ts"],"names":[],"mappings":"AAEA,kCAAkC;AAClC,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAC;AACxC,MAAM,CAAC,MAAM,cAAc,GAAG,kDAAkD,CAAC;AACjF,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAC;AAE9C,iFAAiF;AACjF,MAAM,kBAAkB,GAAG,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;AAE5D,mFAAmF;AACnF,MAAM,UAAU,kBAAkB,CAAC,MAAkB;IACjD,MAAM,aAAa,GAAG,kBAAkB,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAErE,MAAM,WAAW,GACb,CAAC,aAAa,IAAI,CACd,MAAM,CAAC,WAAW,KAAK,cAAc;QACrC,MAAM,CAAC,WAAW,KAAK,cAAc;QACrC,MAAM,CAAC,UAAU,KAAK,aAAa,CACtC,CAAC;IAEN,MAAM,mBAAmB,GACrB,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;QAC7C,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC;QAC1C,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC;QAC5C,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IAE7D,OAAO,WAAW,IAAI,mBAAmB,CAAC;AAC9C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,MAAkB;IAC7C,OAAO,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;AACtD,CAAC"}
|