UNPKG

@storm-software/git-tools

Version:

Tools for managing Git repositories within a Nx workspace.

32 lines (30 loc) 1.05 kB
#!/usr/bin/env node 'use strict'; var chunkAU5PZKTN_cjs = require('./chunk-AU5PZKTN.cjs'); var chunkZBLIE7F7_cjs = require('./chunk-ZBLIE7F7.cjs'); // bin/pre-commit.ts void (async () => { const config = await chunkZBLIE7F7_cjs.getConfig(); try { chunkZBLIE7F7_cjs.handleProcess(config); chunkZBLIE7F7_cjs.writeInfo("Running pre-commit hook...", config); chunkAU5PZKTN_cjs.checkPackageVersion(process.argv.slice(1)); if (chunkAU5PZKTN_cjs.isPackageVersionChanged(process.argv?.slice(1))) { chunkZBLIE7F7_cjs.writeError( "Please regenerate the package lock file before committing...", config ); chunkZBLIE7F7_cjs.exitWithError(config); } chunkZBLIE7F7_cjs.exitWithSuccess(config); } catch (error) { chunkZBLIE7F7_cjs.writeFatal( `A fatal error occurred while running the program: ${error.message}`, config ); chunkZBLIE7F7_cjs.exitWithError(config); process.exit(1); } })(); //# sourceMappingURL=pre-commit.cjs.map //# sourceMappingURL=pre-commit.cjs.map