const require_chunk = require('../chunk-CUT6urMc.cjs');
const node_fs = require_chunk.__toESM(require("node:fs"));
const node_path = require_chunk.__toESM(require("node:path"));
const node_url = require_chunk.__toESM(require("node:url"));

//#region src/deploy/sniffer-hooks.ts
const __filename$1 = (0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href);
const __dirname$1 = (0, node_path.dirname)(__filename$1);
const mjsPath = (0, node_path.join)(__dirname$1, "sniffer-envkit-patch.mjs");
const tsPath = (0, node_path.join)(__dirname$1, "sniffer-envkit-patch.ts");
const patchedEnvkitPath = (0, node_fs.existsSync)(mjsPath) ? mjsPath : tsPath;
/**
* Resolve hook - intercepts module resolution for @geekmidas/envkit
*/
async function resolve(specifier, context, nextResolve) {
	if (specifier === "@geekmidas/envkit") return {
		url: `file://${patchedEnvkitPath}`,
		shortCircuit: true
	};
	return nextResolve(specifier, context);
}

//#endregion
exports.resolve = resolve;
//# sourceMappingURL=sniffer-hooks.cjs.map