bpms_site/.svn/pristine/be/beda83c5310dbd3c33b35d19577c6361c06f2b48.svn-base
2025-11-02 16:38:49 +03:30

26 lines
809 B
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getRegistry", {
enumerable: true,
get: function() {
return getRegistry;
}
});
const _child_process = require("child_process");
const _getpkgmanager = require("./get-pkg-manager");
function getRegistry(baseDir = process.cwd()) {
let registry = `https://registry.npmjs.org/`;
try {
const pkgManager = (0, _getpkgmanager.getPkgManager)(baseDir);
const output = (0, _child_process.execSync)(`${pkgManager} config get registry`).toString().trim();
if (output.startsWith("http")) {
registry = output.endsWith("/") ? output : `${output}/`;
}
} finally{
return registry;
}
}
//# sourceMappingURL=get-registry.js.map