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