@hardlydifficult/repo-processor 1.0.140 → 1.0.142
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/README.md +126 -274
- package/dist/GitYamlStore.d.ts +27 -40
- package/dist/GitYamlStore.d.ts.map +1 -1
- package/dist/GitYamlStore.js +155 -142
- package/dist/GitYamlStore.js.map +1 -1
- package/dist/RepoProcessor.d.ts +22 -22
- package/dist/RepoProcessor.d.ts.map +1 -1
- package/dist/RepoProcessor.js +191 -109
- package/dist/RepoProcessor.js.map +1 -1
- package/dist/RepoWatcher.d.ts +19 -62
- package/dist/RepoWatcher.d.ts.map +1 -1
- package/dist/RepoWatcher.js +74 -103
- package/dist/RepoWatcher.js.map +1 -1
- package/dist/index.d.ts +1 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -5
- package/dist/index.js.map +1 -1
- package/dist/internalTypes.d.ts +42 -0
- package/dist/internalTypes.d.ts.map +1 -0
- package/dist/internalTypes.js +3 -0
- package/dist/internalTypes.js.map +1 -0
- package/dist/resolveDirectories.d.ts +3 -12
- package/dist/resolveDirectories.d.ts.map +1 -1
- package/dist/resolveDirectories.js +9 -24
- package/dist/resolveDirectories.js.map +1 -1
- package/dist/types.d.ts +66 -56
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -11
package/dist/RepoWatcher.js
CHANGED
|
@@ -2,146 +2,117 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RepoWatcher = void 0;
|
|
4
4
|
const state_tracker_1 = require("@hardlydifficult/state-tracker");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* prevention, pending SHA re-triggers, and manual triggers. Consumers
|
|
10
|
-
* provide the `run` callback containing domain-specific logic.
|
|
11
|
-
*/
|
|
5
|
+
function getDefaultStateKey(repo) {
|
|
6
|
+
return `repo-processor-${repo.replace(/[^A-Za-z0-9_-]/gu, "-")}`;
|
|
7
|
+
}
|
|
8
|
+
/** Watches for repository updates and schedules processor runs with retries. */
|
|
12
9
|
class RepoWatcher {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
this.maxAttempts = config.maxAttempts ?? 1;
|
|
21
|
-
this.stateTracker = new state_tracker_1.StateTracker({
|
|
22
|
-
key: config.stateKey,
|
|
23
|
-
default: { lastProcessedSha: {} },
|
|
24
|
-
stateDirectory: config.stateDirectory,
|
|
25
|
-
storageAdapter: config.storageAdapter,
|
|
26
|
-
autoSaveMs: config.autoSaveMs ?? 5000,
|
|
27
|
-
onEvent: config.onEvent,
|
|
10
|
+
static async open(processor, options = {}) {
|
|
11
|
+
const stateTracker = await state_tracker_1.StateTracker.open({
|
|
12
|
+
key: options.stateKey ?? getDefaultStateKey(processor.repo),
|
|
13
|
+
default: {},
|
|
14
|
+
stateDirectory: options.stateDirectory,
|
|
15
|
+
autoSaveMs: options.autoSaveMs ?? 5000,
|
|
16
|
+
onEvent: options.onEvent,
|
|
28
17
|
});
|
|
18
|
+
return new RepoWatcher(processor, stateTracker, options);
|
|
29
19
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
20
|
+
processor;
|
|
21
|
+
stateTracker;
|
|
22
|
+
onComplete;
|
|
23
|
+
onError;
|
|
24
|
+
onEvent;
|
|
25
|
+
maxAttempts;
|
|
26
|
+
running = false;
|
|
27
|
+
pendingSha;
|
|
28
|
+
constructor(processor, stateTracker, options) {
|
|
29
|
+
this.processor = processor;
|
|
30
|
+
this.stateTracker = stateTracker;
|
|
31
|
+
this.onComplete = options.onComplete;
|
|
32
|
+
this.onError = options.onError;
|
|
33
|
+
this.onEvent = options.onEvent;
|
|
34
|
+
this.maxAttempts = options.maxAttempts ?? 1;
|
|
33
35
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
* queues processing if changed, stores as pending if already running.
|
|
37
|
-
*/
|
|
38
|
-
handlePush(owner, name, sha) {
|
|
39
|
-
const key = `${owner}/${name}`;
|
|
40
|
-
const lastSha = this.stateTracker.state.lastProcessedSha[key];
|
|
41
|
-
if (lastSha === sha) {
|
|
36
|
+
handlePush(sha) {
|
|
37
|
+
if (this.getLastSha() === sha) {
|
|
42
38
|
return;
|
|
43
39
|
}
|
|
44
|
-
if (this.running
|
|
45
|
-
this.pendingSha
|
|
40
|
+
if (this.running) {
|
|
41
|
+
this.pendingSha = sha;
|
|
46
42
|
return;
|
|
47
43
|
}
|
|
48
|
-
this.queueRun(
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Queue a run unconditionally (no SHA comparison).
|
|
52
|
-
* Skips if already running. Returns false if skipped.
|
|
53
|
-
*/
|
|
54
|
-
trigger(owner, name) {
|
|
55
|
-
const key = `${owner}/${name}`;
|
|
56
|
-
if (this.running.has(key)) {
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
this.queueRun(owner, name, "");
|
|
60
|
-
return true;
|
|
44
|
+
this.queueRun();
|
|
61
45
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
*/
|
|
66
|
-
async triggerManual(owner, name) {
|
|
67
|
-
const key = `${owner}/${name}`;
|
|
68
|
-
if (this.running.has(key)) {
|
|
69
|
-
return {
|
|
70
|
-
success: false,
|
|
71
|
-
reason: `Already running for ${key}`,
|
|
72
|
-
};
|
|
46
|
+
async runNow() {
|
|
47
|
+
if (this.running) {
|
|
48
|
+
throw new Error(`Already running for ${this.processor.repo}`);
|
|
73
49
|
}
|
|
74
|
-
this.running
|
|
50
|
+
this.running = true;
|
|
75
51
|
try {
|
|
76
|
-
const result = await this.executeWithRetry(
|
|
77
|
-
|
|
52
|
+
const result = await this.executeWithRetry();
|
|
53
|
+
this.completeRun(result);
|
|
54
|
+
return result;
|
|
78
55
|
}
|
|
79
56
|
catch (error) {
|
|
80
|
-
this.
|
|
81
|
-
|
|
82
|
-
return { success: false, reason: message };
|
|
57
|
+
this.onError?.(error);
|
|
58
|
+
throw error;
|
|
83
59
|
}
|
|
84
60
|
finally {
|
|
85
|
-
this.running
|
|
61
|
+
this.running = false;
|
|
62
|
+
this.flushPendingRun();
|
|
86
63
|
}
|
|
87
64
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
return this.running.has(`${owner}/${name}`);
|
|
65
|
+
isRunning() {
|
|
66
|
+
return this.running;
|
|
91
67
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
return this.stateTracker.state.lastProcessedSha[key];
|
|
68
|
+
getLastSha() {
|
|
69
|
+
return this.stateTracker.state.lastProcessedSha;
|
|
95
70
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
this.stateTracker.set({
|
|
99
|
-
...this.stateTracker.state,
|
|
100
|
-
lastProcessedSha: {
|
|
101
|
-
...this.stateTracker.state.lastProcessedSha,
|
|
102
|
-
[key]: sha,
|
|
103
|
-
},
|
|
104
|
-
});
|
|
71
|
+
setLastSha(sha) {
|
|
72
|
+
this.stateTracker.set({ lastProcessedSha: sha });
|
|
105
73
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
queueRun(owner, name, sha) {
|
|
110
|
-
const key = `${owner}/${name}`;
|
|
111
|
-
this.running.add(key);
|
|
112
|
-
this.executeWithRetry(owner, name)
|
|
74
|
+
queueRun() {
|
|
75
|
+
this.running = true;
|
|
76
|
+
this.executeWithRetry()
|
|
113
77
|
.then((result) => {
|
|
114
|
-
|
|
115
|
-
this.setLastSha(key, sha);
|
|
116
|
-
}
|
|
117
|
-
this.config.onComplete?.(owner, name, result, sha);
|
|
78
|
+
this.completeRun(result);
|
|
118
79
|
})
|
|
119
80
|
.catch((error) => {
|
|
120
|
-
this.
|
|
81
|
+
this.onError?.(error);
|
|
121
82
|
})
|
|
122
83
|
.finally(() => {
|
|
123
|
-
this.running
|
|
124
|
-
|
|
125
|
-
if (pending !== undefined) {
|
|
126
|
-
this.pendingSha.delete(key);
|
|
127
|
-
this.handlePush(owner, name, pending);
|
|
128
|
-
}
|
|
84
|
+
this.running = false;
|
|
85
|
+
this.flushPendingRun();
|
|
129
86
|
});
|
|
130
87
|
}
|
|
131
|
-
|
|
88
|
+
completeRun(result) {
|
|
89
|
+
this.setLastSha(result.sourceSha);
|
|
90
|
+
this.onComplete?.(result, result.sourceSha);
|
|
91
|
+
}
|
|
92
|
+
flushPendingRun() {
|
|
93
|
+
const { pendingSha } = this;
|
|
94
|
+
this.pendingSha = undefined;
|
|
95
|
+
if (pendingSha === undefined ||
|
|
96
|
+
pendingSha === this.getLastSha() ||
|
|
97
|
+
this.running) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
this.queueRun();
|
|
101
|
+
}
|
|
102
|
+
async executeWithRetry() {
|
|
132
103
|
let lastError;
|
|
133
104
|
for (let attempt = 1; attempt <= this.maxAttempts; attempt++) {
|
|
134
105
|
try {
|
|
135
|
-
return await this.
|
|
106
|
+
return await this.processor.run();
|
|
136
107
|
}
|
|
137
108
|
catch (error) {
|
|
138
109
|
lastError = error;
|
|
139
110
|
if (attempt < this.maxAttempts) {
|
|
140
|
-
this.
|
|
111
|
+
this.onEvent?.({
|
|
141
112
|
level: "warn",
|
|
142
113
|
message: `Run failed (attempt ${String(attempt)}/${String(this.maxAttempts)}), retrying`,
|
|
143
114
|
context: {
|
|
144
|
-
repo:
|
|
115
|
+
repo: this.processor.repo,
|
|
145
116
|
error: error instanceof Error ? error.message : String(error),
|
|
146
117
|
},
|
|
147
118
|
});
|
package/dist/RepoWatcher.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RepoWatcher.js","sourceRoot":"","sources":["../src/RepoWatcher.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"RepoWatcher.js","sourceRoot":"","sources":["../src/RepoWatcher.ts"],"names":[],"mappings":";;;AAAA,kEAA8D;AAS9D,SAAS,kBAAkB,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,OAAO,EAAE;4BACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI;4BACzB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;yBAC9D;qBACF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;QAED,MAAM,SAAS,CAAC;IAClB,CAAC;CACF;AA/ID,kCA+IC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
export { RepoProcessor } from "./RepoProcessor.js";
|
|
2
|
-
export type { RepoProcessorConfig } from "./RepoProcessor.js";
|
|
3
2
|
export { RepoWatcher } from "./RepoWatcher.js";
|
|
4
|
-
export type {
|
|
5
|
-
export { resolveStaleDirectories } from "./resolveDirectories.js";
|
|
6
|
-
export { GitYamlStore } from "./GitYamlStore.js";
|
|
7
|
-
export type { GitYamlStoreConfig } from "./GitYamlStore.js";
|
|
8
|
-
export type { ProcessorStore, ProcessorCallbacks, FileContext, DirectoryContext, DirectoryChild, ProcessingProgress, ProgressCallback, ProcessingResult, } from "./types.js";
|
|
3
|
+
export type { GitIdentity, RepoFileFilterInput, RepoFileInput, RepoDirectoryChild, RepoDirectoryInput, RepoProcessorResultsConfig, RepoProcessorOptions, RepoProcessorProgressCounts, RepoProcessorProgress, RepoProcessorProgressCallback, RepoProcessorRunOptions, RepoProcessorRunResult, RepoWatcherOptions, } from "./types.js";
|
|
9
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,YAAY,EACV,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,0BAA0B,EAC1B,oBAAoB,EACpB,2BAA2B,EAC3B,qBAAqB,EACrB,6BAA6B,EAC7B,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.RepoWatcher = exports.RepoProcessor = void 0;
|
|
4
4
|
var RepoProcessor_js_1 = require("./RepoProcessor.js");
|
|
5
5
|
Object.defineProperty(exports, "RepoProcessor", { enumerable: true, get: function () { return RepoProcessor_js_1.RepoProcessor; } });
|
|
6
6
|
var RepoWatcher_js_1 = require("./RepoWatcher.js");
|
|
7
7
|
Object.defineProperty(exports, "RepoWatcher", { enumerable: true, get: function () { return RepoWatcher_js_1.RepoWatcher; } });
|
|
8
|
-
var resolveDirectories_js_1 = require("./resolveDirectories.js");
|
|
9
|
-
Object.defineProperty(exports, "resolveStaleDirectories", { enumerable: true, get: function () { return resolveDirectories_js_1.resolveStaleDirectories; } });
|
|
10
|
-
var GitYamlStore_js_1 = require("./GitYamlStore.js");
|
|
11
|
-
Object.defineProperty(exports, "GitYamlStore", { enumerable: true, get: function () { return GitYamlStore_js_1.GitYamlStore; } });
|
|
12
8
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AAA1C,iHAAA,aAAa,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AAA1C,iHAAA,aAAa,OAAA;AACtB,mDAA+C;AAAtC,6GAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { FileTreeResult, TreeEntry } from "@hardlydifficult/github";
|
|
2
|
+
import type { z } from "zod";
|
|
3
|
+
import type { RepoDirectoryInput, RepoFileFilterInput, RepoFileInput } from "./types.js";
|
|
4
|
+
export interface BoundRepoRef {
|
|
5
|
+
owner: string;
|
|
6
|
+
name: string;
|
|
7
|
+
fullName: string;
|
|
8
|
+
}
|
|
9
|
+
export type FileManifest = Record<string, string>;
|
|
10
|
+
export interface ResultsStore {
|
|
11
|
+
ensureReady(): Promise<void>;
|
|
12
|
+
getFileManifest(): Promise<FileManifest>;
|
|
13
|
+
getDirSha(dirPath: string): Promise<string | null>;
|
|
14
|
+
writeFileResult(filePath: string, sha: string, result: unknown): Promise<void>;
|
|
15
|
+
writeDirResult(dirPath: string, sha: string, result: unknown): Promise<void>;
|
|
16
|
+
deleteFileResult(filePath: string): Promise<void>;
|
|
17
|
+
commitBatch(sourceRepo: string, count: number): Promise<void>;
|
|
18
|
+
readFileResult<T>(filePath: string, schema: z.ZodType<T>): Promise<T | null>;
|
|
19
|
+
readDirectoryResult<T>(dirPath: string, schema: z.ZodType<T>): Promise<T | null>;
|
|
20
|
+
}
|
|
21
|
+
export interface RepoClientLike {
|
|
22
|
+
getFileTree(ref?: string): Promise<FileTreeResult>;
|
|
23
|
+
getFileContent(filePath: string, ref?: string): Promise<string>;
|
|
24
|
+
}
|
|
25
|
+
export interface RepoProcessorInternals<TFileResult, TDirResult = never> {
|
|
26
|
+
repo: BoundRepoRef;
|
|
27
|
+
repoClient: RepoClientLike;
|
|
28
|
+
store: ResultsStore;
|
|
29
|
+
ref?: string;
|
|
30
|
+
concurrency: number;
|
|
31
|
+
include: (file: RepoFileFilterInput) => boolean;
|
|
32
|
+
processFile(file: RepoFileInput): Promise<TFileResult>;
|
|
33
|
+
processDirectory?: (directory: RepoDirectoryInput) => Promise<TDirResult>;
|
|
34
|
+
}
|
|
35
|
+
export interface ProcessingFailure {
|
|
36
|
+
path: string;
|
|
37
|
+
reason: unknown;
|
|
38
|
+
}
|
|
39
|
+
export type DirectoryTreeEntry = TreeEntry & {
|
|
40
|
+
type: "tree";
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=internalTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internalTypes.d.ts","sourceRoot":"","sources":["../src/internalTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACd,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAElD,MAAM,WAAW,YAAY;IAC3B,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,eAAe,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;IACzC,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACnD,eAAe,CACb,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7E,gBAAgB,CAAC,QA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AkB,GAAG,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internalTypes.js","sourceRoot":"","sources":["../src/internalTypes.ts"],"names":[],"mappings":""}
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import type { TreeEntry } from "@hardlydifficult/github";
|
|
2
|
-
import type {
|
|
3
|
-
/**
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
* Combines two sources:
|
|
7
|
-
* 1. Stale dirs from diffTree (directories with changed/removed children)
|
|
8
|
-
* 2. Any directory whose stored SHA is missing or differs from the current tree SHA
|
|
9
|
-
*
|
|
10
|
-
* The second source handles recovery after partial failures and catches
|
|
11
|
-
* directories whose tree SHA changed without any processable file changes.
|
|
12
|
-
*/
|
|
13
|
-
export declare function resolveStaleDirectories(owner: string, repo: string, staleDirsFromDiff: readonly string[], allFilePaths: readonly string[], tree: readonly TreeEntry[], store: ProcessorStore): Promise<string[]>;
|
|
2
|
+
import type { ResultsStore } from "./internalTypes.js";
|
|
3
|
+
/** Returns directories that are missing results or whose stored SHA is stale. */
|
|
4
|
+
export declare function resolveStaleDirectories(staleDirsFromDiff: readonly string[], allFilePaths: readonly string[], tree: readonly TreeEntry[], store: ResultsStore): Promise<string[]>;
|
|
14
5
|
//# sourceMappingURL=resolveDirectories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveDirectories.d.ts","sourceRoot":"","sources":["../src/resolveDirectories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"resolveDirectories.d.ts","sourceRoot":"","sources":["../src/resolveDirectories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,iFAAiF;AACjF,wBAAsB,uBAAuB,CAC3C,iBAAiB,EAAE,SAAS,MAAM,EAAE,EACpC,YAAY,EAAE,SAAS,MAAM,EAAE,EAC/B,IAAI,EAAE,SAAS,SAAS,EAAE,EAC1B,KAAK,EAAE,YAAY,GAClB,OAAO,CAAC,MAAM,EAAE,CAAC,CAoCnB"}
|
|
@@ -1,50 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolveStaleDirectories = resolveStaleDirectories;
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
* Combines two sources:
|
|
8
|
-
* 1. Stale dirs from diffTree (directories with changed/removed children)
|
|
9
|
-
* 2. Any directory whose stored SHA is missing or differs from the current tree SHA
|
|
10
|
-
*
|
|
11
|
-
* The second source handles recovery after partial failures and catches
|
|
12
|
-
* directories whose tree SHA changed without any processable file changes.
|
|
13
|
-
*/
|
|
14
|
-
async function resolveStaleDirectories(owner, repo, staleDirsFromDiff, allFilePaths, tree, store) {
|
|
15
|
-
// Build map of directory path → current tree SHA
|
|
4
|
+
/** Returns directories that are missing results or whose stored SHA is stale. */
|
|
5
|
+
async function resolveStaleDirectories(staleDirsFromDiff, allFilePaths, tree, store) {
|
|
16
6
|
const treeShaByDir = new Map();
|
|
17
7
|
for (const entry of tree) {
|
|
18
8
|
if (entry.type === "tree") {
|
|
19
9
|
treeShaByDir.set(entry.path, entry.sha);
|
|
20
10
|
}
|
|
21
11
|
}
|
|
22
|
-
// Collect all directories that should be processed (derived from file paths + root)
|
|
23
12
|
const allExpectedDirs = new Set();
|
|
24
13
|
for (const filePath of allFilePaths) {
|
|
25
14
|
const parts = filePath.split("/");
|
|
26
|
-
for (let
|
|
27
|
-
allExpectedDirs.add(parts.slice(0,
|
|
15
|
+
for (let index = 1; index < parts.length; index++) {
|
|
16
|
+
allExpectedDirs.add(parts.slice(0, index).join("/"));
|
|
28
17
|
}
|
|
29
18
|
}
|
|
30
|
-
// Always include root
|
|
31
19
|
allExpectedDirs.add("");
|
|
32
|
-
// Start with stale dirs from diff
|
|
33
20
|
const needed = new Set(staleDirsFromDiff);
|
|
34
|
-
// Check every expected directory for a missing or stale stored SHA
|
|
35
21
|
for (const dirPath of allExpectedDirs) {
|
|
36
22
|
if (needed.has(dirPath)) {
|
|
37
23
|
continue;
|
|
38
24
|
}
|
|
39
|
-
const storedSha = await store.getDirSha(
|
|
25
|
+
const storedSha = await store.getDirSha(dirPath);
|
|
40
26
|
if (storedSha === null) {
|
|
41
27
|
needed.add(dirPath);
|
|
28
|
+
continue;
|
|
42
29
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
needed.add(dirPath);
|
|
47
|
-
}
|
|
30
|
+
const currentSha = treeShaByDir.get(dirPath) ?? "";
|
|
31
|
+
if (storedSha !== currentSha) {
|
|
32
|
+
needed.add(dirPath);
|
|
48
33
|
}
|
|
49
34
|
}
|
|
50
35
|
return [...needed];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveDirectories.js","sourceRoot":"","sources":["../src/resolveDirectories.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"resolveDirectories.js","sourceRoot":"","sources":["../src/resolveDirectories.ts"],"names":[],"mappings":";;AAKA,0DAyCC;AA1CD,iFAAiF;AAC1E,KAAK,UAAU,uBAAuB,CAC3C,iBAAoC,EACpC,YAA+B,EAC/B,IAA0B,EAC1B,KAAmB;IAEnB,MAAM,YAAY,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC/C,KAAK,MAAM,KAAK,IAAI,IAAI,EAAE,CAAC;QACzB,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;YAC1B,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC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
export interface ProcessorStore {
|
|
7
|
-
/** One-time init (e.g. ensure local clone). Optional. */
|
|
8
|
-
ensureReady?(owner: string, repo: string): Promise<void>;
|
|
9
|
-
/** Return manifest of previously processed file SHAs (path → blob SHA). */
|
|
10
|
-
getFileManifest(owner: string, repo: string): Promise<FileManifest>;
|
|
11
|
-
/** Return stored SHA for a directory. Null if not stored. */
|
|
12
|
-
getDirSha(owner: string, repo: string, dirPath: string): Promise<string | null>;
|
|
13
|
-
/** Persist result for a processed file. */
|
|
14
|
-
writeFileResult(owner: string, repo: string, path: string, sha: string, result: unknown): Promise<void>;
|
|
15
|
-
/** Persist result for a processed directory. */
|
|
16
|
-
writeDirResult(owner: string, repo: string, path: string, sha: string, result: unknown): Promise<void>;
|
|
17
|
-
/** Delete stored result for a removed file. */
|
|
18
|
-
deleteFileResult(owner: string, repo: string, path: string): Promise<void>;
|
|
19
|
-
/** Commit current batch of changes. */
|
|
20
|
-
commitBatch(owner: string, repo: string, count: number): Promise<void>;
|
|
1
|
+
import type { StateTrackerEvent } from "@hardlydifficult/state-tracker";
|
|
2
|
+
export interface GitIdentity {
|
|
3
|
+
name: string;
|
|
4
|
+
email: string;
|
|
21
5
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
6
|
+
export interface RepoFileFilterInput {
|
|
7
|
+
path: string;
|
|
8
|
+
sha: string;
|
|
9
|
+
size?: number;
|
|
26
10
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
11
|
+
export interface RepoFileInput {
|
|
12
|
+
repo: string;
|
|
13
|
+
path: string;
|
|
14
|
+
sha: string;
|
|
15
|
+
content: string;
|
|
32
16
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
readonly subtreeFilePaths: readonly string[];
|
|
38
|
-
readonly children: readonly DirectoryChild[];
|
|
39
|
-
readonly tree: readonly TreeEntry[];
|
|
17
|
+
export interface RepoDirectoryChild {
|
|
18
|
+
name: string;
|
|
19
|
+
path: string;
|
|
20
|
+
type: "file" | "directory";
|
|
40
21
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
/** Process a directory after all children. Return value passed to store.writeDirResult. */
|
|
48
|
-
processDirectory(ctx: DirectoryContext): Promise<unknown>;
|
|
22
|
+
export interface RepoDirectoryInput {
|
|
23
|
+
repo: string;
|
|
24
|
+
path: string;
|
|
25
|
+
sha: string;
|
|
26
|
+
files: readonly string[];
|
|
27
|
+
children: readonly RepoDirectoryChild[];
|
|
49
28
|
}
|
|
50
|
-
|
|
51
|
-
|
|
29
|
+
export interface RepoProcessorResultsConfig {
|
|
30
|
+
repo: string;
|
|
31
|
+
directory: string;
|
|
32
|
+
root?: string;
|
|
33
|
+
branch?: string;
|
|
34
|
+
gitUser?: GitIdentity;
|
|
35
|
+
}
|
|
36
|
+
export interface RepoProcessorOptions<TFileResult, TDirResult = never> {
|
|
37
|
+
repo: string;
|
|
38
|
+
githubToken?: string;
|
|
39
|
+
ref?: string;
|
|
40
|
+
concurrency?: number;
|
|
41
|
+
results: RepoProcessorResultsConfig;
|
|
42
|
+
include?: (file: RepoFileFilterInput) => boolean;
|
|
43
|
+
processFile(file: RepoFileInput): Promise<TFileResult>;
|
|
44
|
+
processDirectory?: (directory: RepoDirectoryInput) => Promise<TDirResult>;
|
|
45
|
+
}
|
|
46
|
+
export interface RepoProcessorProgressCounts {
|
|
47
|
+
total: number;
|
|
48
|
+
completed: number;
|
|
49
|
+
}
|
|
50
|
+
export interface RepoProcessorProgress {
|
|
52
51
|
phase: "loading" | "files" | "directories" | "committing";
|
|
53
52
|
message: string;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
files: RepoProcessorProgressCounts;
|
|
54
|
+
directories: RepoProcessorProgressCounts;
|
|
55
|
+
}
|
|
56
|
+
export type RepoProcessorProgressCallback = (progress: RepoProcessorProgress) => void;
|
|
57
|
+
export interface RepoProcessorRunOptions {
|
|
58
|
+
onProgress?: RepoProcessorProgressCallback;
|
|
59
|
+
}
|
|
60
|
+
export interface RepoProcessorRunResult {
|
|
61
|
+
repo: string;
|
|
62
|
+
sourceSha: string;
|
|
63
|
+
processedFiles: number;
|
|
64
|
+
removedFiles: number;
|
|
65
|
+
processedDirectories: number;
|
|
58
66
|
}
|
|
59
|
-
export
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
67
|
+
export interface RepoWatcherOptions {
|
|
68
|
+
stateDirectory?: string;
|
|
69
|
+
stateKey?: string;
|
|
70
|
+
autoSaveMs?: number;
|
|
71
|
+
maxAttempts?: number;
|
|
72
|
+
onComplete?: (result: RepoProcessorRunResult, sha: string) => void;
|
|
73
|
+
onError?: (error: unknown) => void;
|
|
74
|
+
onEvent?: (event: StateTrackerEvent) => void;
|
|
65
75
|
}
|
|
66
76
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAExE,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EA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