UNPKG

@storm-software/git-tools

Version:

Tools for managing Git repositories within a Nx workspace.

1 lines 1.3 kB
{"version":3,"sources":["../../bin/pre-commit.ts"],"names":["getConfig","preCommitHook","exitWithSuccess","writeFatal","exitWithError"],"mappings":";;;;;;;;AAUA,KAAA,CAAM,YAAY;AAChB,EAAA,MAAM,MAAA,GAAS,MAAMA,2BAAA,EAAU;AAC/B,EAAA,IAAI;AACF,IAAA,MAAMC,gCAAc,MAAA,EAAQ,OAAA,CAAQ,IAAA,CAAK,KAAA,CAAM,CAAC,CAAC,CAAA;AAEjD,IAAAC,iCAAA,CAAgB,MAAM,CAAA;AAAA,EACxB,SAAS,KAAA,EAAO;AACd,IAAAC,4BAAA;AAAA,MACE,CAAA,kDAAA,EAAqD,MAAM,OAAO,CAAA,CAAA;AAAA,MAClE;AAAA,KACF;AACA,IAAAC,+BAAA,CAAc,MAAM,CAAA;AACpB,IAAA,OAAA,CAAQ,KAAK,CAAC,CAAA;AAAA,EAChB;AACF,CAAA,GAAG","file":"pre-commit.cjs","sourcesContent":["#!/usr/bin/env node\n\nimport { getConfig } from \"@storm-software/config-tools/get-config\";\nimport { writeFatal } from \"@storm-software/config-tools/logger/console\";\nimport {\n exitWithError,\n exitWithSuccess\n} from \"@storm-software/config-tools/utilities/process-handler\";\nimport { preCommitHook } from \"../src/hooks/pre-commit\";\n\nvoid (async () => {\n const config = await getConfig();\n try {\n await preCommitHook(config, process.argv.slice(2));\n\n exitWithSuccess(config);\n } catch (error) {\n writeFatal(\n `A fatal error occurred while running the program: ${error.message}`,\n config\n );\n exitWithError(config);\n process.exit(1);\n }\n})();\n"]}