first commit

This commit is contained in:
2025-03-07 22:27:18 +08:00
commit 912da26042
4457 changed files with 306818 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import { EXIT_CODE_INVALID_CONFIG } from '../constants.mjs';
/** @typedef {Error & { code: number }} ConfigurationError */
/**
* Create configurationError from text and set CLI exit code.
*
* @param {string} text
* @returns {ConfigurationError}
*/
export default function configurationError(text) {
const err = /** @type {ConfigurationError} */ (new Error(text));
err.code = EXIT_CODE_INVALID_CONFIG;
return err;
}