@sentry/wizard
Version:
Sentry wizard helping you to configure your project
25 lines • 1.16 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ensureWranglerConfig = void 0;
// @ts-expect-error - clack is ESM and TS complains about that. It works though
const prompts_1 = __importDefault(require("@clack/prompts"));
const chalk_1 = __importDefault(require("chalk"));
const find_wrangler_config_1 = require("./find-wrangler-config");
const create_wrangler_config_1 = require("./create-wrangler-config");
/**
* Ensures a wrangler config exists, creating one if necessary
*/
function ensureWranglerConfig() {
const existingConfig = (0, find_wrangler_config_1.findWranglerConfig)();
if (existingConfig) {
prompts_1.default.log.info(`Found existing Wrangler config: ${chalk_1.default.cyan(existingConfig)}`);
return;
}
prompts_1.default.log.step('No Wrangler configuration file found.');
(0, create_wrangler_config_1.createWranglerConfig)();
}
exports.ensureWranglerConfig = ensureWranglerConfig;
//# sourceMappingURL=ensure-wrangler-config.js.map