修改npm地址为镜像地址 registry.npmmirror.com
This commit is contained in:
parent
d882d12c64
commit
74a71c69c9
12
dist/pnpm.js
vendored
12
dist/pnpm.js
vendored
@ -13750,7 +13750,7 @@ var require_defaults = __commonJS({
|
||||
"user-agent": "npm/{npm-version} node/{node-version} {platform} {arch}",
|
||||
"read-only": false,
|
||||
"rebuild-bundle": true,
|
||||
registry: "https://registry.npmjs.org/",
|
||||
registry: "https://registry.npmmirror.com/",
|
||||
rollback: true,
|
||||
save: true,
|
||||
"save-bundle": false,
|
||||
@ -14564,7 +14564,7 @@ var require_lib10 = __commonJS({
|
||||
]);
|
||||
pnpmConfig.userAgent = pnpmConfig.rawLocalConfig["user-agent"] ? pnpmConfig.rawLocalConfig["user-agent"] : `${packageManager.name}/${packageManager.version} npm/? node/${process.version} ${process.platform} ${process.arch}`;
|
||||
pnpmConfig.rawConfig = Object.assign.apply(Object, [
|
||||
{ registry: "https://registry.npmjs.org/" },
|
||||
{ registry: "https://registry.npmmirror.com/" },
|
||||
...[...npmConfig.list].reverse(),
|
||||
cliOptions,
|
||||
{ "user-agent": pnpmConfig.userAgent }
|
||||
@ -83470,7 +83470,7 @@ var require_node4 = __commonJS({
|
||||
let wantedNodeVersion = (_a = opts.useNodeVersion) !== null && _a !== void 0 ? _a : (_b = await readNodeVersionsManifest(nodesDir)) === null || _b === void 0 ? void 0 : _b.default;
|
||||
await fs_1.default.promises.mkdir(nodesDir, { recursive: true });
|
||||
if (wantedNodeVersion == null) {
|
||||
const response = await fetch_1.default("https://registry.npmjs.org/node");
|
||||
const response = await fetch_1.default("https://registry.npmmirror.com/node");
|
||||
wantedNodeVersion = (await response.json())["dist-tags"].lts;
|
||||
if (wantedNodeVersion == null) {
|
||||
throw new Error("Could not resolve LTS version of Node.js");
|
||||
@ -85556,7 +85556,7 @@ var require_lib51 = __commonJS({
|
||||
Object.defineProperty(exports2, "__esModule", { value: true });
|
||||
var normalizeRegistry = require_normalize_registry_url();
|
||||
function default_1(pkgName, pkgVersion, opts) {
|
||||
const registry = normalizeRegistry(opts && opts.registry || "https://registry.npmjs.org/");
|
||||
const registry = normalizeRegistry(opts && opts.registry || "https://registry.npmmirror.com/");
|
||||
const scopelessName = getScopelessName(pkgName);
|
||||
return `${registry}${pkgName}/-/${scopelessName}-${removeBuildMetadataFromVersion(pkgVersion)}.tgz`;
|
||||
}
|
||||
@ -90109,7 +90109,7 @@ var require_lib65 = __commonJS({
|
||||
exports2.DEFAULT_REGISTRIES = void 0;
|
||||
var normalize_registry_url_1 = __importDefault(require_normalize_registry_url());
|
||||
exports2.DEFAULT_REGISTRIES = {
|
||||
default: "https://registry.npmjs.org/"
|
||||
default: "https://registry.npmmirror.com/"
|
||||
};
|
||||
function normalizeRegistries(registries) {
|
||||
if (registries == null)
|
||||
@ -130910,7 +130910,7 @@ var require_storeAdd = __commonJS({
|
||||
let hasFailures = false;
|
||||
const prefix = (_a = opts.prefix) !== null && _a !== void 0 ? _a : process.cwd();
|
||||
const registries = (_b = opts.registries) !== null && _b !== void 0 ? _b : {
|
||||
default: "https://registry.npmjs.org/"
|
||||
default: "https://registry.npmmirror.com/"
|
||||
};
|
||||
await Promise.all(deps.map(async (dep) => {
|
||||
var _a2;
|
||||
|
@ -13750,7 +13750,7 @@ var require_defaults = __commonJS({
|
||||
"user-agent": "npm/{npm-version} node/{node-version} {platform} {arch}",
|
||||
"read-only": false,
|
||||
"rebuild-bundle": true,
|
||||
registry: "https://registry.npmjs.org/",
|
||||
registry: "https://registry.npmmirror.com/",
|
||||
rollback: true,
|
||||
save: true,
|
||||
"save-bundle": false,
|
||||
@ -14564,7 +14564,7 @@ var require_lib10 = __commonJS({
|
||||
]);
|
||||
pnpmConfig.userAgent = pnpmConfig.rawLocalConfig["user-agent"] ? pnpmConfig.rawLocalConfig["user-agent"] : `${packageManager.name}/${packageManager.version} npm/? node/${process.version} ${process.platform} ${process.arch}`;
|
||||
pnpmConfig.rawConfig = Object.assign.apply(Object, [
|
||||
{ registry: "https://registry.npmjs.org/" },
|
||||
{ registry: "https://registry.npmmirror.com/" },
|
||||
...[...npmConfig.list].reverse(),
|
||||
cliOptions,
|
||||
{ "user-agent": pnpmConfig.userAgent }
|
||||
@ -83470,7 +83470,7 @@ var require_node4 = __commonJS({
|
||||
let wantedNodeVersion = (_a = opts.useNodeVersion) !== null && _a !== void 0 ? _a : (_b = await readNodeVersionsManifest(nodesDir)) === null || _b === void 0 ? void 0 : _b.default;
|
||||
await fs_1.default.promises.mkdir(nodesDir, { recursive: true });
|
||||
if (wantedNodeVersion == null) {
|
||||
const response = await fetch_1.default("https://registry.npmjs.org/node");
|
||||
const response = await fetch_1.default("https://registry.npmmirror.com/node");
|
||||
wantedNodeVersion = (await response.json())["dist-tags"].lts;
|
||||
if (wantedNodeVersion == null) {
|
||||
throw new Error("Could not resolve LTS version of Node.js");
|
||||
@ -85556,7 +85556,7 @@ var require_lib51 = __commonJS({
|
||||
Object.defineProperty(exports2, "__esModule", { value: true });
|
||||
var normalizeRegistry = require_normalize_registry_url();
|
||||
function default_1(pkgName, pkgVersion, opts) {
|
||||
const registry = normalizeRegistry(opts && opts.registry || "https://registry.npmjs.org/");
|
||||
const registry = normalizeRegistry(opts && opts.registry || "https://registry.npmmirror.com/");
|
||||
const scopelessName = getScopelessName(pkgName);
|
||||
return `${registry}${pkgName}/-/${scopelessName}-${removeBuildMetadataFromVersion(pkgVersion)}.tgz`;
|
||||
}
|
||||
@ -90109,7 +90109,7 @@ var require_lib65 = __commonJS({
|
||||
exports2.DEFAULT_REGISTRIES = void 0;
|
||||
var normalize_registry_url_1 = __importDefault(require_normalize_registry_url());
|
||||
exports2.DEFAULT_REGISTRIES = {
|
||||
default: "https://registry.npmjs.org/"
|
||||
default: "https://registry.npmmirror.com/"
|
||||
};
|
||||
function normalizeRegistries(registries) {
|
||||
if (registries == null)
|
||||
@ -130910,7 +130910,7 @@ var require_storeAdd = __commonJS({
|
||||
let hasFailures = false;
|
||||
const prefix = (_a = opts.prefix) !== null && _a !== void 0 ? _a : process.cwd();
|
||||
const registries = (_b = opts.registries) !== null && _b !== void 0 ? _b : {
|
||||
default: "https://registry.npmjs.org/"
|
||||
default: "https://registry.npmmirror.com/"
|
||||
};
|
||||
await Promise.all(deps.map(async (dep) => {
|
||||
var _a2;
|
||||
|
Loading…
Reference in New Issue
Block a user