update wings
This commit is contained in:
66
build/node_modules/next/dist/lib/helpers/get-cache-directory.js
generated
vendored
66
build/node_modules/next/dist/lib/helpers/get-cache-directory.js
generated
vendored
@@ -1,66 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "getCacheDirectory", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return getCacheDirectory;
|
||||
}
|
||||
});
|
||||
const _os = /*#__PURE__*/ _interop_require_default(require("os"));
|
||||
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
||||
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
||||
function _interop_require_default(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
function getCacheDirectory(fileDirectory, envPath) {
|
||||
let result;
|
||||
if (envPath) {
|
||||
result = envPath;
|
||||
} else {
|
||||
let systemCacheDirectory;
|
||||
if (process.platform === 'linux') {
|
||||
systemCacheDirectory = process.env.XDG_CACHE_HOME || _path.default.join(_os.default.homedir(), '.cache');
|
||||
} else if (process.platform === 'darwin') {
|
||||
systemCacheDirectory = _path.default.join(_os.default.homedir(), 'Library', 'Caches');
|
||||
} else if (process.platform === 'win32') {
|
||||
systemCacheDirectory = process.env.LOCALAPPDATA || _path.default.join(_os.default.homedir(), 'AppData', 'Local');
|
||||
} else {
|
||||
/// Attempt to use generic tmp location for un-handled platform
|
||||
if (!systemCacheDirectory) {
|
||||
for (const dir of [
|
||||
_path.default.join(_os.default.homedir(), '.cache'),
|
||||
_path.default.join(_os.default.tmpdir())
|
||||
]){
|
||||
if (_fs.default.existsSync(dir)) {
|
||||
systemCacheDirectory = dir;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!systemCacheDirectory) {
|
||||
console.error(Object.defineProperty(new Error('Unsupported platform: ' + process.platform), "__NEXT_ERROR_CODE", {
|
||||
value: "E141",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
}));
|
||||
process.exit(0);
|
||||
}
|
||||
}
|
||||
result = _path.default.join(systemCacheDirectory, fileDirectory);
|
||||
}
|
||||
if (!_path.default.isAbsolute(result)) {
|
||||
// It is important to resolve to the absolute path:
|
||||
// - for unzipping to work correctly;
|
||||
// - so that registry directory matches between installation and execution.
|
||||
// INIT_CWD points to the root of `npm/yarn install` and is probably what
|
||||
// the user meant when typing the relative path.
|
||||
result = _path.default.resolve(process.env['INIT_CWD'] || process.cwd(), result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=get-cache-directory.js.map
|
||||
29
build/node_modules/next/dist/lib/helpers/get-npx-command.js
generated
vendored
29
build/node_modules/next/dist/lib/helpers/get-npx-command.js
generated
vendored
@@ -1,29 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "getNpxCommand", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return getNpxCommand;
|
||||
}
|
||||
});
|
||||
const _child_process = require("child_process");
|
||||
const _getpkgmanager = require("./get-pkg-manager");
|
||||
function getNpxCommand(baseDir) {
|
||||
const pkgManager = (0, _getpkgmanager.getPkgManager)(baseDir);
|
||||
let command = 'npx --yes';
|
||||
if (pkgManager === 'pnpm') {
|
||||
command = 'pnpm --silent dlx';
|
||||
} else if (pkgManager === 'yarn') {
|
||||
try {
|
||||
(0, _child_process.execSync)('yarn dlx --help', {
|
||||
stdio: 'ignore'
|
||||
});
|
||||
command = 'yarn --quiet dlx';
|
||||
} catch {}
|
||||
}
|
||||
return command;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=get-npx-command.js.map
|
||||
50
build/node_modules/next/dist/lib/helpers/get-online.js
generated
vendored
50
build/node_modules/next/dist/lib/helpers/get-online.js
generated
vendored
@@ -1,50 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "getOnline", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return getOnline;
|
||||
}
|
||||
});
|
||||
const _child_process = require("child_process");
|
||||
const _promises = /*#__PURE__*/ _interop_require_default(require("dns/promises"));
|
||||
function _interop_require_default(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
function getProxy() {
|
||||
if (process.env.https_proxy) {
|
||||
return process.env.https_proxy;
|
||||
}
|
||||
try {
|
||||
const httpsProxy = (0, _child_process.execSync)('npm config get https-proxy', {
|
||||
encoding: 'utf8'
|
||||
}).trim();
|
||||
return httpsProxy !== 'null' ? httpsProxy : undefined;
|
||||
} catch (e) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
async function getOnline() {
|
||||
try {
|
||||
await _promises.default.lookup('registry.yarnpkg.com');
|
||||
return true;
|
||||
} catch {
|
||||
const proxy = getProxy();
|
||||
if (!proxy) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
const { hostname } = new URL(proxy);
|
||||
await _promises.default.lookup(hostname);
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=get-online.js.map
|
||||
63
build/node_modules/next/dist/lib/helpers/get-pkg-manager.js
generated
vendored
63
build/node_modules/next/dist/lib/helpers/get-pkg-manager.js
generated
vendored
@@ -1,63 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "getPkgManager", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return getPkgManager;
|
||||
}
|
||||
});
|
||||
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
||||
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
||||
const _child_process = require("child_process");
|
||||
function _interop_require_default(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
function getPkgManager(baseDir) {
|
||||
try {
|
||||
for (const { lockFile, packageManager } of [
|
||||
{
|
||||
lockFile: 'yarn.lock',
|
||||
packageManager: 'yarn'
|
||||
},
|
||||
{
|
||||
lockFile: 'pnpm-lock.yaml',
|
||||
packageManager: 'pnpm'
|
||||
},
|
||||
{
|
||||
lockFile: 'package-lock.json',
|
||||
packageManager: 'npm'
|
||||
}
|
||||
]){
|
||||
if (_fs.default.existsSync(_path.default.join(baseDir, lockFile))) {
|
||||
return packageManager;
|
||||
}
|
||||
}
|
||||
const userAgent = process.env.npm_config_user_agent;
|
||||
if (userAgent) {
|
||||
if (userAgent.startsWith('yarn')) {
|
||||
return 'yarn';
|
||||
} else if (userAgent.startsWith('pnpm')) {
|
||||
return 'pnpm';
|
||||
}
|
||||
}
|
||||
try {
|
||||
(0, _child_process.execSync)('yarn --version', {
|
||||
stdio: 'ignore'
|
||||
});
|
||||
return 'yarn';
|
||||
} catch {
|
||||
(0, _child_process.execSync)('pnpm --version', {
|
||||
stdio: 'ignore'
|
||||
});
|
||||
return 'pnpm';
|
||||
}
|
||||
} catch {
|
||||
return 'npm';
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=get-pkg-manager.js.map
|
||||
45
build/node_modules/next/dist/lib/helpers/get-registry.js
generated
vendored
45
build/node_modules/next/dist/lib/helpers/get-registry.js
generated
vendored
@@ -1,45 +0,0 @@
|
||||
"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");
|
||||
const _utils = require("../../server/lib/utils");
|
||||
function getRegistry(baseDir = process.cwd()) {
|
||||
const pkgManager = (0, _getpkgmanager.getPkgManager)(baseDir);
|
||||
// Since `npm config` command fails in npm workspace to prevent workspace config conflicts,
|
||||
// add `--no-workspaces` flag to run under the context of the root project only.
|
||||
// Safe for non-workspace projects as it's equivalent to default `--workspaces=false`.
|
||||
// x-ref: https://github.com/vercel/next.js/issues/47121#issuecomment-1499044345
|
||||
// x-ref: https://github.com/npm/statusboard/issues/371#issue-920669998
|
||||
const resolvedFlags = pkgManager === 'npm' ? '--no-workspaces' : '';
|
||||
let registry = `https://registry.npmjs.org/`;
|
||||
try {
|
||||
const output = (0, _child_process.execSync)(`${pkgManager} config get registry ${resolvedFlags}`, {
|
||||
env: {
|
||||
...process.env,
|
||||
NODE_OPTIONS: (0, _utils.getFormattedNodeOptionsWithoutInspect)()
|
||||
}
|
||||
}).toString().trim();
|
||||
if (output.startsWith('http')) {
|
||||
registry = output.endsWith('/') ? output : `${output}/`;
|
||||
}
|
||||
} catch (err) {
|
||||
throw Object.defineProperty(new Error(`Failed to get registry from "${pkgManager}".`, {
|
||||
cause: err
|
||||
}), "__NEXT_ERROR_CODE", {
|
||||
value: "E508",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
return registry;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=get-registry.js.map
|
||||
116
build/node_modules/next/dist/lib/helpers/get-reserved-port.js
generated
vendored
116
build/node_modules/next/dist/lib/helpers/get-reserved-port.js
generated
vendored
@@ -1,116 +0,0 @@
|
||||
/** https://fetch.spec.whatwg.org/#port-blocking */ "use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
KNOWN_RESERVED_PORTS: null,
|
||||
getReservedPortExplanation: null,
|
||||
isPortIsReserved: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
KNOWN_RESERVED_PORTS: function() {
|
||||
return KNOWN_RESERVED_PORTS;
|
||||
},
|
||||
getReservedPortExplanation: function() {
|
||||
return getReservedPortExplanation;
|
||||
},
|
||||
isPortIsReserved: function() {
|
||||
return isPortIsReserved;
|
||||
}
|
||||
});
|
||||
const KNOWN_RESERVED_PORTS = {
|
||||
1: 'tcpmux',
|
||||
7: 'echo',
|
||||
9: 'discard',
|
||||
11: 'systat',
|
||||
13: 'daytime',
|
||||
15: 'netstat',
|
||||
17: 'qotd',
|
||||
19: 'chargen',
|
||||
20: 'ftp-data',
|
||||
21: 'ftp',
|
||||
22: 'ssh',
|
||||
23: 'telnet',
|
||||
25: 'smtp',
|
||||
37: 'time',
|
||||
42: 'name',
|
||||
43: 'nicname',
|
||||
53: 'domain',
|
||||
69: 'tftp',
|
||||
77: 'rje',
|
||||
79: 'finger',
|
||||
87: 'link',
|
||||
95: 'supdup',
|
||||
101: 'hostname',
|
||||
102: 'iso-tsap',
|
||||
103: 'gppitnp',
|
||||
104: 'acr-nema',
|
||||
109: 'pop2',
|
||||
110: 'pop3',
|
||||
111: 'sunrpc',
|
||||
113: 'auth',
|
||||
115: 'sftp',
|
||||
117: 'uucp-path',
|
||||
119: 'nntp',
|
||||
123: 'ntp',
|
||||
135: 'epmap',
|
||||
137: 'netbios-ns',
|
||||
139: 'netbios-ssn',
|
||||
143: 'imap',
|
||||
161: 'snmp',
|
||||
179: 'bgp',
|
||||
389: 'ldap',
|
||||
427: 'svrloc',
|
||||
465: 'submissions',
|
||||
512: 'exec',
|
||||
513: 'login',
|
||||
514: 'shell',
|
||||
515: 'printer',
|
||||
526: 'tempo',
|
||||
530: 'courier',
|
||||
531: 'chat',
|
||||
532: 'netnews',
|
||||
540: 'uucp',
|
||||
548: 'afp',
|
||||
554: 'rtsp',
|
||||
556: 'remotefs',
|
||||
563: 'nntps',
|
||||
587: 'submission',
|
||||
601: 'syslog-conn',
|
||||
636: 'ldaps',
|
||||
989: 'ftps-data',
|
||||
990: 'ftps',
|
||||
993: 'imaps',
|
||||
995: 'pop3s',
|
||||
1719: 'h323gatestat',
|
||||
1720: 'h323hostcall',
|
||||
1723: 'pptp',
|
||||
2049: 'nfs',
|
||||
3659: 'apple-sasl',
|
||||
4045: 'npp',
|
||||
5060: 'sip',
|
||||
5061: 'sips',
|
||||
6000: 'x11',
|
||||
6566: 'sane-port',
|
||||
6665: 'ircu',
|
||||
6666: 'ircu',
|
||||
6667: 'ircu',
|
||||
6668: 'ircu',
|
||||
6669: 'ircu',
|
||||
6697: 'ircs-u',
|
||||
10080: 'amanda'
|
||||
};
|
||||
function isPortIsReserved(port) {
|
||||
return port in KNOWN_RESERVED_PORTS;
|
||||
}
|
||||
function getReservedPortExplanation(port) {
|
||||
return `Bad port: "${port}" is reserved for ${KNOWN_RESERVED_PORTS[port]}\n` + 'Read more: https://nextjs.org/docs/messages/reserved-port';
|
||||
}
|
||||
|
||||
//# sourceMappingURL=get-reserved-port.js.map
|
||||
83
build/node_modules/next/dist/lib/helpers/install.js
generated
vendored
83
build/node_modules/next/dist/lib/helpers/install.js
generated
vendored
@@ -1,83 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "install", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return install;
|
||||
}
|
||||
});
|
||||
const _picocolors = require("../picocolors");
|
||||
const _crossspawn = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/cross-spawn"));
|
||||
function _interop_require_default(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
function install(root, dependencies, { packageManager, isOnline, devDependencies }) {
|
||||
let args = [];
|
||||
if (dependencies.length > 0) {
|
||||
if (packageManager === 'yarn') {
|
||||
args = [
|
||||
'add',
|
||||
'--exact'
|
||||
];
|
||||
if (devDependencies) args.push('--dev');
|
||||
} else if (packageManager === 'pnpm') {
|
||||
args = [
|
||||
'add',
|
||||
'--save-exact'
|
||||
];
|
||||
args.push(devDependencies ? '--save-dev' : '--save-prod');
|
||||
} else {
|
||||
// npm
|
||||
args = [
|
||||
'install',
|
||||
'--save-exact'
|
||||
];
|
||||
args.push(devDependencies ? '--save-dev' : '--save');
|
||||
}
|
||||
args.push(...dependencies);
|
||||
} else {
|
||||
args = [
|
||||
'install'
|
||||
] // npm, pnpm, and yarn all support `install`
|
||||
;
|
||||
if (!isOnline) {
|
||||
args.push('--offline');
|
||||
console.log((0, _picocolors.yellow)('You appear to be offline.'));
|
||||
if (packageManager !== 'npm') {
|
||||
console.log((0, _picocolors.yellow)(`Falling back to the local ${packageManager} cache.`));
|
||||
}
|
||||
console.log();
|
||||
}
|
||||
}
|
||||
return new Promise((resolve, reject)=>{
|
||||
/**
|
||||
* Spawn the installation process.
|
||||
*/ const child = (0, _crossspawn.default)(packageManager, args, {
|
||||
cwd: root,
|
||||
stdio: 'inherit',
|
||||
env: {
|
||||
...process.env,
|
||||
ADBLOCK: '1',
|
||||
// we set NODE_ENV to development as pnpm skips dev
|
||||
// dependencies when production
|
||||
NODE_ENV: 'development',
|
||||
DISABLE_OPENCOLLECTIVE: '1'
|
||||
}
|
||||
});
|
||||
child.on('close', (code)=>{
|
||||
if (code !== 0) {
|
||||
reject({
|
||||
command: `${packageManager} ${args.join(' ')}`
|
||||
});
|
||||
return;
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
//# sourceMappingURL=install.js.map
|
||||
Reference in New Issue
Block a user