MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / loadJobFile

Function loadJobFile

src/job-config.ts:186–196  ·  view source on GitHub ↗
(workDir: string)

Source from the content-addressed store, hash-verified

184}
185
186export function loadJobFile(workDir: string): JobFile {
187 const filePath = getJobFilePath(workDir);
188 if (!fs.existsSync(filePath)) {
189 return { jobs: [] };
190 }
191
192 const raw = fs.readFileSync(filePath, "utf-8");
193 const parsed = JSON.parse(raw) as unknown;
194 validateJobFileShape(parsed, filePath);
195 return normalizeJobFile(parsed);
196}
197
198export function saveJobFile(workDir: string, jobFile: JobFile): void {
199 const filePath = getJobFilePath(workDir);

Callers 3

startMethod · 0.85
job-config.test.tsFile · 0.85
scheduler.test.tsFile · 0.85

Calls 4

getJobFilePathFunction · 0.85
validateJobFileShapeFunction · 0.85
normalizeJobFileFunction · 0.85
parseMethod · 0.80

Tested by

no test coverage detected