@hardlydifficult/repo-processor 1.0.15 → 1.0.17
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/GitYamlStore.d.ts +49 -0
- package/dist/GitYamlStore.d.ts.map +1 -0
- package/dist/GitYamlStore.js +242 -0
- package/dist/GitYamlStore.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -2
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
import type { FileManifest, ProcessorStore } from "./types.js";
|
|
3
|
+
export interface GitYamlStoreConfig {
|
|
4
|
+
/** URL of the git repository to clone/pull. */
|
|
5
|
+
cloneUrl: string;
|
|
6
|
+
/** Local directory to clone the repo into. */
|
|
7
|
+
localPath: string;
|
|
8
|
+
/** Maps (owner, repo) to the subdirectory where results are stored. */
|
|
9
|
+
resultDir: (owner: string, repo: string) => string;
|
|
10
|
+
/** GitHub token for authenticated clone/push. Falls back to GITHUB_TOKEN env. */
|
|
11
|
+
authToken?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A ProcessorStore implementation that persists results as YAML files
|
|
15
|
+
* in a git repository.
|
|
16
|
+
*
|
|
17
|
+
* File results are stored at `<resultDir>/<filePath>.yml`.
|
|
18
|
+
* Directory results are stored at `<resultDir>/<dirPath>/dir.yml`.
|
|
19
|
+
* Each YAML file includes a `sha` field for change detection.
|
|
20
|
+
*/
|
|
21
|
+
export declare class GitYamlStore implements ProcessorStore {
|
|
22
|
+
private readonly localPath;
|
|
23
|
+
private readonly cloneUrl;
|
|
24
|
+
private readonly authToken;
|
|
25
|
+
private readonly resultDir;
|
|
26
|
+
private initialized;
|
|
27
|
+
constructor(config: GitYamlStoreConfig);
|
|
28
|
+
ensureReady(): Promise<void>;
|
|
29
|
+
getFileManifest(owner: string, repo: string): Promise<FileManifest>;
|
|
30
|
+
getDirSha(owner: string, repo: string, dirPath: string): Promise<string | null>;
|
|
31
|
+
writeFileResult(owner: string, repo: string, filePath: string, sha: string, result: unknown): Promise<void>;
|
|
32
|
+
writeDirResult(owner: string, repo: string, dirPath: string, sha: string, result: unknown): Promise<void>;
|
|
33
|
+
deleteFileResult(owner: string, repo: string, filePath: string): Promise<void>;
|
|
34
|
+
commitBatch(owner: string, repo: string, filesChanged: number): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Load a file result, parsed and validated with the given Zod schema.
|
|
37
|
+
* Returns null if the file doesn't exist or fails validation.
|
|
38
|
+
*/
|
|
39
|
+
loadFileResult<T>(owner: string, repo: string, filePath: string, schema: z.ZodType<T>): Promise<T | null>;
|
|
40
|
+
/**
|
|
41
|
+
* Load a directory result, parsed and validated with the given Zod schema.
|
|
42
|
+
* Returns null if the file doesn't exist or fails validation.
|
|
43
|
+
*/
|
|
44
|
+
loadDirResult<T>(owner: string, repo: string, dirPath: string, schema: z.ZodType<T>): Promise<T | null>;
|
|
45
|
+
private getResultDir;
|
|
46
|
+
private getAuthenticatedUrl;
|
|
47
|
+
private walkDir;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=GitYamlStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GitYamlStore.d.ts","sourceRoot":"","sources":["../src/GitYamlStore.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE/D,MAAM,WAAW,kBAAkB;IACjC,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,uEAAuE;IACvE,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACnD,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QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAapB;;;OAGG;IACG,aAAa,CAAC,CAAC,EACnB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAkBpB,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,mBAAmB;YAUb,OAAO;CAoCtB"}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.GitYamlStore = void 0;
|
|
40
|
+
const promises_1 = require("node:fs/promises");
|
|
41
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
42
|
+
const text_1 = require("@hardlydifficult/text");
|
|
43
|
+
const yaml_1 = require("yaml");
|
|
44
|
+
/**
|
|
45
|
+
* A ProcessorStore implementation that persists results as YAML files
|
|
46
|
+
* in a git repository.
|
|
47
|
+
*
|
|
48
|
+
* File results are stored at `<resultDir>/<filePath>.yml`.
|
|
49
|
+
* Directory results are stored at `<resultDir>/<dirPath>/dir.yml`.
|
|
50
|
+
* Each YAML file includes a `sha` field for change detection.
|
|
51
|
+
*/
|
|
52
|
+
class GitYamlStore {
|
|
53
|
+
localPath;
|
|
54
|
+
cloneUrl;
|
|
55
|
+
authToken;
|
|
56
|
+
resultDir;
|
|
57
|
+
initialized = false;
|
|
58
|
+
constructor(config) {
|
|
59
|
+
this.cloneUrl = config.cloneUrl;
|
|
60
|
+
this.localPath = config.localPath;
|
|
61
|
+
this.resultDir = config.resultDir;
|
|
62
|
+
this.authToken = config.authToken ?? process.env.GITHUB_TOKEN;
|
|
63
|
+
}
|
|
64
|
+
// ---------------------------------------------------------------------------
|
|
65
|
+
// ProcessorStore implementation
|
|
66
|
+
// ---------------------------------------------------------------------------
|
|
67
|
+
async ensureReady() {
|
|
68
|
+
if (this.initialized) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const { simpleGit } = await Promise.resolve().then(() => __importStar(require("simple-git")));
|
|
72
|
+
const exists = await (0, promises_1.stat)(node_path_1.default.join(this.localPath, ".git")).catch(() => null);
|
|
73
|
+
if (exists) {
|
|
74
|
+
const git = simpleGit(this.localPath);
|
|
75
|
+
try {
|
|
76
|
+
await git.pull("origin", "main");
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
// Pull failed (e.g. offline), continue with local state
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
await (0, promises_1.mkdir)(node_path_1.default.dirname(this.localPath), { recursive: true });
|
|
84
|
+
const git = simpleGit();
|
|
85
|
+
await git.clone(this.getAuthenticatedUrl(), this.localPath);
|
|
86
|
+
}
|
|
87
|
+
this.initialized = true;
|
|
88
|
+
}
|
|
89
|
+
async getFileManifest(owner, repo) {
|
|
90
|
+
const dir = this.getResultDir(owner, repo);
|
|
91
|
+
const manifest = {};
|
|
92
|
+
try {
|
|
93
|
+
await this.walkDir(dir, dir, manifest);
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
// Directory doesn't exist yet, return empty manifest
|
|
97
|
+
}
|
|
98
|
+
return manifest;
|
|
99
|
+
}
|
|
100
|
+
async getDirSha(owner, repo, dirPath) {
|
|
101
|
+
const filePath = node_path_1.default.join(this.getResultDir(owner, repo), dirPath, "dir.yml");
|
|
102
|
+
try {
|
|
103
|
+
const content = await (0, promises_1.readFile)(filePath, "utf-8");
|
|
104
|
+
const parsed = (0, yaml_1.parse)(content);
|
|
105
|
+
return typeof parsed.sha === "string" ? parsed.sha : null;
|
|
106
|
+
}
|
|
107
|
+
catch {
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
async writeFileResult(owner, repo, filePath, sha, result) {
|
|
112
|
+
const data = { ...result, sha };
|
|
113
|
+
const yamlContent = (0, text_1.formatYaml)(data);
|
|
114
|
+
const fullPath = node_path_1.default.join(this.getResultDir(owner, repo), `${filePath}.yml`);
|
|
115
|
+
await (0, promises_1.mkdir)(node_path_1.default.dirname(fullPath), { recursive: true });
|
|
116
|
+
await (0, promises_1.writeFile)(fullPath, yamlContent, "utf-8");
|
|
117
|
+
}
|
|
118
|
+
async writeDirResult(owner, repo, dirPath, sha, result) {
|
|
119
|
+
const data = { ...result, sha };
|
|
120
|
+
const yamlContent = (0, text_1.formatYaml)(data);
|
|
121
|
+
const fullPath = node_path_1.default.join(this.getResultDir(owner, repo), dirPath, "dir.yml");
|
|
122
|
+
await (0, promises_1.mkdir)(node_path_1.default.dirname(fullPath), { recursive: true });
|
|
123
|
+
await (0, promises_1.writeFile)(fullPath, yamlContent, "utf-8");
|
|
124
|
+
}
|
|
125
|
+
async deleteFileResult(owner, repo, filePath) {
|
|
126
|
+
const fullPath = node_path_1.default.join(this.getResultDir(owner, repo), `${filePath}.yml`);
|
|
127
|
+
await (0, promises_1.rm)(fullPath, { force: true });
|
|
128
|
+
}
|
|
129
|
+
async commitBatch(owner, repo, filesChanged) {
|
|
130
|
+
const { simpleGit } = await Promise.resolve().then(() => __importStar(require("simple-git")));
|
|
131
|
+
const git = simpleGit(this.localPath);
|
|
132
|
+
await git.addConfig("user.email", "ai-bot@users.noreply.github.com");
|
|
133
|
+
await git.addConfig("user.name", "AI Bot");
|
|
134
|
+
const status = await git.status();
|
|
135
|
+
if (status.files.length === 0) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
await git.add("-A");
|
|
139
|
+
const message = `Update results for ${owner}/${repo} (${String(filesChanged)} files)`;
|
|
140
|
+
await git.commit(message);
|
|
141
|
+
for (let attempt = 0; attempt < 3; attempt++) {
|
|
142
|
+
try {
|
|
143
|
+
await git.push("origin", "main");
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
catch (pushError) {
|
|
147
|
+
const errorMsg = pushError instanceof Error ? pushError.message : String(pushError);
|
|
148
|
+
if (errorMsg.includes("rejected") || errorMsg.includes("conflict")) {
|
|
149
|
+
try {
|
|
150
|
+
await git.pull("origin", "main", { "--rebase": null });
|
|
151
|
+
}
|
|
152
|
+
catch {
|
|
153
|
+
await git.rebase({ "--abort": null }).catch(() => undefined);
|
|
154
|
+
await git.pull("origin", "main");
|
|
155
|
+
await git.add("-A");
|
|
156
|
+
await git.commit(message);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
throw pushError;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
throw new Error("Failed to push after 3 attempts");
|
|
165
|
+
}
|
|
166
|
+
// ---------------------------------------------------------------------------
|
|
167
|
+
// Generic typed readers (for callers that need to load results back)
|
|
168
|
+
// ---------------------------------------------------------------------------
|
|
169
|
+
/**
|
|
170
|
+
* Load a file result, parsed and validated with the given Zod schema.
|
|
171
|
+
* Returns null if the file doesn't exist or fails validation.
|
|
172
|
+
*/
|
|
173
|
+
async loadFileResult(owner, repo, filePath, schema) {
|
|
174
|
+
const fullPath = node_path_1.default.join(this.getResultDir(owner, repo), `${filePath}.yml`);
|
|
175
|
+
try {
|
|
176
|
+
const content = await (0, promises_1.readFile)(fullPath, "utf-8");
|
|
177
|
+
return schema.parse((0, yaml_1.parse)(content));
|
|
178
|
+
}
|
|
179
|
+
catch {
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Load a directory result, parsed and validated with the given Zod schema.
|
|
185
|
+
* Returns null if the file doesn't exist or fails validation.
|
|
186
|
+
*/
|
|
187
|
+
async loadDirResult(owner, repo, dirPath, schema) {
|
|
188
|
+
const fullPath = node_path_1.default.join(this.getResultDir(owner, repo), dirPath, "dir.yml");
|
|
189
|
+
try {
|
|
190
|
+
const content = await (0, promises_1.readFile)(fullPath, "utf-8");
|
|
191
|
+
return schema.parse((0, yaml_1.parse)(content));
|
|
192
|
+
}
|
|
193
|
+
catch {
|
|
194
|
+
return null;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
// ---------------------------------------------------------------------------
|
|
198
|
+
// Private helpers
|
|
199
|
+
// ---------------------------------------------------------------------------
|
|
200
|
+
getResultDir(owner, repo) {
|
|
201
|
+
return node_path_1.default.join(this.localPath, this.resultDir(owner, repo));
|
|
202
|
+
}
|
|
203
|
+
getAuthenticatedUrl() {
|
|
204
|
+
if (this.authToken !== undefined && this.authToken !== "") {
|
|
205
|
+
return this.cloneUrl.replace("https://github.com/", `https://${this.authToken}@github.com/`);
|
|
206
|
+
}
|
|
207
|
+
return this.cloneUrl;
|
|
208
|
+
}
|
|
209
|
+
async walkDir(baseDir, currentDir, manifest) {
|
|
210
|
+
let entries;
|
|
211
|
+
try {
|
|
212
|
+
entries = await (0, promises_1.readdir)(currentDir, { withFileTypes: true });
|
|
213
|
+
}
|
|
214
|
+
catch {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
for (const entry of entries) {
|
|
218
|
+
const fullPath = node_path_1.default.join(currentDir, entry.name);
|
|
219
|
+
if (entry.isDirectory()) {
|
|
220
|
+
await this.walkDir(baseDir, fullPath, manifest);
|
|
221
|
+
}
|
|
222
|
+
else if (entry.isFile() &&
|
|
223
|
+
entry.name.endsWith(".yml") &&
|
|
224
|
+
entry.name !== "dir.yml") {
|
|
225
|
+
try {
|
|
226
|
+
const yamlContent = await (0, promises_1.readFile)(fullPath, "utf-8");
|
|
227
|
+
const parsed = (0, yaml_1.parse)(yamlContent);
|
|
228
|
+
if (typeof parsed.sha === "string") {
|
|
229
|
+
const relativePath = node_path_1.default.relative(baseDir, fullPath);
|
|
230
|
+
const repoPath = relativePath.slice(0, -4); // Remove .yml
|
|
231
|
+
manifest[repoPath] = parsed.sha;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
catch {
|
|
235
|
+
// Invalid file, skip
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
exports.GitYamlStore = GitYamlStore;
|
|
242
|
+
//# sourceMappingURL=GitYamlStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GitYamlStore.js","sourceRoot":"","sources":["../src/GitYamlStore.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAO0B;AAC1B,0DAA6B;AAE7B,gDAAmD;AACnD,+BAA0C;AAgB1C;;;;;;;GAOG;AACH,MAAa,YAAY;IACN,SAAS,CAAS;IAClB,QAAQ,CAAS;IACjB,SAAS,CAAqB;IAC9B,SAAS,CAA0C;IAC5D,WAAW,GAAG,KAAK,CAAC;IAE5B,YAAY,MAA0B;QACpC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;IAChE,CAAC;IAED,8EAA8E;IAC9E,gCAAgC;IAChC,8EAA8E;IAE9E,KAAK,CAAC,WAAW;QACf,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,OAAO;QACT,CAAC;QAED,MAAM,EAAE,SAAS,EAAE,GAAG,wDAAa,YAAY,GAAC,CAAC;QACjD,MAAM,MAAM,GAAG,MAAM,IAAA,eAAI,EAAC,mBAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAChE,GAAG,EAAE,CAAC,IAAI,CACX,CAAC;QAEF,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACtC,IAAI,CAAC;gBACH,MAAM,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epoProcessorConfig } from "./RepoProcessor.js";
|
|
3
3
|
export { resolveStaleDirectories } from "./resolveDirectories.js";
|
|
4
|
+
export { GitYamlStore } from "./GitYamlStore.js";
|
|
5
|
+
export type { GitYamlStoreConfig } from "./GitYamlStore.js";
|
|
4
6
|
export type { ProcessorStore, ProcessorCallbacks, FileContext, DirectoryContext, DirectoryChild, ProcessingProgress, ProgressCallback, ProcessingResult, } from "./types.js";
|
|
5
7
|
//# 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,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveStaleDirectories = exports.RepoProcessor = void 0;
|
|
3
|
+
exports.GitYamlStore = exports.resolveStaleDirectories = 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 resolveDirectories_js_1 = require("./resolveDirectories.js");
|
|
7
7
|
Object.defineProperty(exports, "resolveStaleDirectories", { enumerable: true, get: function () { return resolveDirectories_js_1.resolveStaleDirectories; } });
|
|
8
|
+
var GitYamlStore_js_1 = require("./GitYamlStore.js");
|
|
9
|
+
Object.defineProperty(exports, "GitYamlStore", { enumerable: true, get: function () { return GitYamlStore_js_1.GitYamlStore; } });
|
|
8
10
|
//# 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;AAEtB,iEAAkE;AAAzD,gIAAA,uBAAuB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AAA1C,iHAAA,aAAa,OAAA;AAEtB,iEAAkE;AAAzD,gIAAA,uBAAuB,OAAA;AAChC,qDAAiD;AAAxC,+GAAA,YAAY,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hardlydifficult/repo-processor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -17,7 +17,10 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@hardlydifficult/collections": "1.0.4",
|
|
19
19
|
"@hardlydifficult/github": "1.0.26",
|
|
20
|
-
"@hardlydifficult/text": "1.0.19"
|
|
20
|
+
"@hardlydifficult/text": "1.0.19",
|
|
21
|
+
"simple-git": "3.31.1",
|
|
22
|
+
"yaml": "2.8.2",
|
|
23
|
+
"zod": "4.3.6"
|
|
21
24
|
},
|
|
22
25
|
"devDependencies": {
|
|
23
26
|
"@types/node": "25.2.3",
|