MCPcopy Index your code
hub / github.com/prettydiff/prettydiff / versionGather

Function versionGather

services.ts:1335–1370  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1333 });
1334 },
1335 versionGather = function node_apps_build_libraries_versionGather():void {
1336 node.child(`git log -1 --branches`, function node_apps_build_libraries_versionGather_child(err:Error, stderr:string):void {
1337 if (err !== null) {
1338 apps.errout([err.toString()]);
1339 return;
1340 }
1341 const date:string[] = stderr.slice(stderr.indexOf("Date:") + 12).split(" ");
1342 prettydiff.version.date = `${date[1]} ${date[0]} ${date[3]}`;
1343 node.fs.readFile(`${projectPath}package.json`, "utf8", function node_apps_build_libraries_versionGather_child_readPackage(errp:Error, data:string):void {
1344 if (errp !== null) {
1345 apps.errout([errp.toString()]);
1346 return;
1347 }
1348 prettydiff.version.number = JSON.parse(data).version;
1349 node.fs.readFile(`${projectPath}node_modules${sep}sparser${sep}package.json`, "utf8", function node_apps_build_libraries_versionGather_child_readPackage_readSparser(errf:Error, frameData:string):void {
1350 if (errf !== null) {
1351 apps.errout([errf.toString()]);
1352 return;
1353 }
1354 prettydiff.version.parse = JSON.parse(frameData).version;
1355 // update information for display in current build
1356 defaults = (function node_apps_build_libraries_modifyFile_read_buildDefault():string {
1357 const obj:any = {};
1358 let a:number = 0;
1359 do {
1360 obj[optkeys[a]] = prettydiff.api.optionDef[optkeys[a]].default;
1361 a = a + 1;
1362 } while (a < keyslen);
1363 obj.lexerOptions = {};
1364 return JSON.stringify(obj);
1365 }());
1366 libraryFiles();
1367 });
1368 });
1369 })
1370 };
1371 heading("Building Options");
1372 versionGather();
1373 },

Callers 1

services.tsFile · 0.85

Calls 1

libraryFilesFunction · 0.85

Tested by

no test coverage detected