提交 8673198f 编写于 作者: View Design's avatar View Design

Auto Commit

上级 ca207a2f
run = "npm i && npm run dev" run = "npm i && npm run dev"
language = "node"
[env] [env]
PATH = "/root/${PROJECT_DIR}/.config/npm/node_global/bin:/root/${PROJECT_DIR}/node_modules/.bin:${PATH}" PATH = "/root/${PROJECT_DIR}/.config/npm/node_global/bin:/root/${PROJECT_DIR}/node_modules/.bin:${PATH}"
XDG_CONFIG_HOME = "/root/.config" XDG_CONFIG_HOME = "/root/.config"
npm_config_prefix = "/root/${PROJECT_DIR}/.config/npm/node_global" npm_config_prefix = "/root/${PROJECT_DIR}/.config/npm/node_global"
\ No newline at end of file
[debugger]
program = "main.js"
{"name":"nuxi","version":"3.11.1","files":{"LICENSE":{"checkedAt":1715158492551,"integrity":"sha512-Xxi7X7FVqA9+SoKwU4qJToWGtqDgzbWlYwpMC1FwFXihO57B5xXALXavysMMh8E4uwqkGQJjCika9SXMGSzjyg==","mode":420,"size":1071},"package.json":{"checkedAt":1715158492552,"integrity":"sha512-GcWMOlpDnb8NpNRHLXT/pawieaX1+/S2B1CLlS1CbyH25apLAtBDnoCE6yVMhEhd8CYYmYE3bW3dE7gHfFBjtw==","mode":420,"size":2465},"README.md":{"checkedAt":1715158492551,"integrity":"sha512-e2BJzsmfaPvOS2PUooCkBmBowRN1FfX2b+aSn46VCrfQspBwvVqJCfm7DFZi7IMwpG5mltfAx088ANWUQ61gPw==","mode":420,"size":922},"dist/chunks/add.mjs":{"checkedAt":1715158492553,"integrity":"sha512-dFV50x8iAkGZmuItO1Zyvf0ZPiPx9Jx1tku9d0axsvEPSzOQg5sBmcGiBb5E/BXZQAdVst77uk/uw2QLv67T0A==","mode":420,"size":4964},"dist/chunks/add2.mjs":{"checkedAt":1715158492597,"integrity":"sha512-dKB/UtXdxgMkhhK97yuRLhznBZHzWoBUnZUKuD0edHWbyrmqTqJlmzQgJYbJxZCLYiVXFBA5+HQ/Xb+8qcjABw==","mode":420,"size":889260},"dist/chunks/analyze.mjs":{"checkedAt":1715158492597,"integrity":"sha512-iGo9t2j6fi2yP3bZ7tkQ8GNKa71neFCydQjFSntiOIlxsPw55wlYoz3VfDCdh9zZcdgaehPhwS8eCb485lWxUg==","mode":420,"size":4362},"dist/chunks/build-module.mjs":{"checkedAt":1715158492597,"integrity":"sha512-UVRE5UXWLqfQuolE1js6UwJiEzlD+1GqzT+d8uLTiJHdc9bueuDs9ADElWIxEOSU6eSp1g3ucuFF5EfkzkDhyA==","mode":420,"size":2106},"dist/chunks/build.mjs":{"checkedAt":1715158492597,"integrity":"sha512-Pbf719mlHW3qhuHaedp/FO4ixa8SLGsj2ZKdjW6d2vkhHSJWQN6Gq46DyWDQe5uoEnod4kgQwBu2Xvurv8AUxg==","mode":420,"size":3235},"dist/chunks/cleanup.mjs":{"checkedAt":1715158492597,"integrity":"sha512-JEFbCBSBTEZSQIGbYgKiEMqccRK1qvdEMycQ0XUbZT/dCl0rHjkWRDpj8WWu/eofxdQ2OJX4peusDIIFKktieg==","mode":420,"size":1483},"dist/chunks/dev-child.mjs":{"checkedAt":1715158492597,"integrity":"sha512-wwW+mrE5NMjvCYgy/4VpdZAJ7I4BBJrn5u3Tnhqe73clGsdE99k7VnDLOvR5TP+bkGkNdXOfDaA+BnVxUOgQdw==","mode":420,"size":2937},"dist/chunks/dev.mjs":{"checkedAt":1715158492600,"integrity":"sha512-1aWH8/JQEWPl8EjELRDcZpmC62mDQiG80obt7yuvxVE4Pd4du/8GjXTX6qOR0DsxDwJI1wzibgysR/J8LN1B6g==","mode":420,"size":10090},"dist/chunks/dev2.mjs":{"checkedAt":1715158492606,"integrity":"sha512-qdCtXbOWsT1L8ztlkQnJqaTdB5eYWNI90vqYXxiH7axGIHL5Qj1Y3CpYxxExAdipv3L2kdxO+x6T4mV0WqW0eQ==","mode":420,"size":185516},"dist/chunks/devtools.mjs":{"checkedAt":1715158492606,"integrity":"sha512-HwBRjydqn8kq8v2s9M2k8jUgF33k/jFdF8fZNlHQlT73qWO2FaGA/1GC+fhueRYxlIU/cbXuWZT3XKfwZdFScg==","mode":420,"size":1279},"dist/chunks/generate.mjs":{"checkedAt":1715158492606,"integrity":"sha512-dkOuOfVtMLrtrs0m4xkjl3N+Ug8VCwGX8WcpuODcr04gsW6/Gcerv9lR0yrLZGcffvCwIH24hu179Ws7mGfYdA==","mode":420,"size":1473},"dist/chunks/index.mjs":{"checkedAt":1715158492606,"integrity":"sha512-oP3wGmWQ0SQw9cmaGK+TsN4abdM1LvEa2cdD4eTDygSJreMbMDjXV/gS1+cXWSGdb96TjDExc7YiV4ayO6IcrQ==","mode":420,"size":473},"dist/index.mjs":{"checkedAt":1715158492607,"integrity":"sha512-pBNDCbJJCxGNKTCptfAGeQJ5ldZ1iGdI27/PpLmqZwUqrvXVXnysAUMUtDSAs08jYiFj0YSMhByLlCOppG2PLw==","mode":420,"size":188},"dist/chunks/index2.mjs":{"checkedAt":1715158492641,"integrity":"sha512-PS08FathScChFehwsJeKjNzn0im5CtDEwJM6UvML6sbO639hgx1ntxKOZRzM3PZabtacOyWkvx1/yWJygUz9Fw==","mode":420,"size":902613},"dist/chunks/index3.mjs":{"checkedAt":1715158492643,"integrity":"sha512-pqm5fHGUpr3wmIZzzqA8PE5RI1CeR+3Ps3aYoFkZcbVbsQWqDWKUXWCgQwbQpOyTcFbK6BUWHVBrPTurpqq1MQ==","mode":420,"size":70175},"dist/chunks/index4.mjs":{"checkedAt":1715158492643,"integrity":"sha512-FkihMUJMYTWPps9+30volQ6riEYZUBPzIKJa/M7DHk83BprTnO95yL6VWmjSyo0nHooB1KfljEPloSC4CUDE4w==","mode":420,"size":17660},"dist/chunks/index5.mjs":{"checkedAt":1715158492643,"integrity":"sha512-LDaX+aE9yV5TV7yPJLkA2FXx1GoCkRvteIoCVQqFiBzKBMPgOpUg9gv3x4l+lQCI93oyRZCPTAo46AimIOxQdQ==","mode":420,"size":1489},"dist/chunks/index6.mjs":{"checkedAt":1715158492643,"integrity":"sha512-cy15RybftksjsoOkONGnADxltwz9xdflgsOOT2vbfyL9J9hQcwhRbbDs7HUe9XtcX7RImEY5YLg0a7kfIa9W3g==","mode":420,"size":7304},"dist/chunks/index7.mjs":{"checkedAt":1715158492643,"integrity":"sha512-6t083A0P/ukPzBmuAE9GBXLVDjSCx2x1olLt6xO8spzLRM+tNZ2DQ5iy1VCCUwgPjlgm2+aBio94wtNnfAcNVg==","mode":420,"size":6253},"dist/chunks/info.mjs":{"checkedAt":1715158492646,"integrity":"sha512-9cnZwlV9ma8QP08R8PWjPlSe5VFchSHSLqW8UeiDld8uO3tRYUgjgn8MMXR6k+/M7rHEdJL17SAg/qUzs3Ya6A==","mode":420,"size":5481},"dist/chunks/init.mjs":{"checkedAt":1715158492650,"integrity":"sha512-vzTYDwjm0LkY0uc+3fWQhYiQmrFFSKP/HaD7FAaApsPuzz/upBI5c7c67+twhpMUWlnbg1Ai8MMZhUE5X3Iiaw==","mode":420,"size":193228},"dist/chunks/multipart-parser.mjs":{"checkedAt":1715158492650,"integrity":"sha512-GMOg4R5Jk97NW++eoZfBznwoN0GXrd/iBSWEbLMU+7r3kZ8Pm5C10DfpT6YdgDesAJjgQRoLUvSz+wWCGTyJdw==","mode":420,"size":5242},"dist/chunks/node.mjs":{"checkedAt":1715158492655,"integrity":"sha512-j44zgoHCh5ZYR8B6WYSRHwXUbcUIGHFqBmFF8vDDKq0F6B8bH2u2aWTexyNw+lzUREv3fE7nKgU4621bXDdYyw==","mode":420,"size":126062},"dist/shared/nuxi.0f575f79.mjs":{"checkedAt":1715158492655,"integrity":"sha512-0iDkjJUcWoNbyGd8/XdnLYT5PZqhclvYs20FFtdI5a3F24vCfirVMeQ+PuKh6F1ZVnNwbpy2rhm4V9zldFt4bg==","mode":420,"size":6292},"dist/shared/nuxi.17654120.mjs":{"checkedAt":1715158492657,"integrity":"sha512-o8cZagZZ0jyHbDo1diDM+a3IhHQaFV8Bx0n5/8WIHOLq8NqkDutd6vC4x/L292/xuJi2/CyaxGMK2KoKczYwCQ==","mode":420,"size":778},"dist/shared/nuxi.1902c37d.mjs":{"checkedAt":1715158492672,"integrity":"sha512-xAOPcGhlu1fNtPcHDy5OPazH66PRuBx8pIq6EzZRQd08e6PqvPm7H/wAWsMU0hgqltjKFM0PltHLEX7zmujrtQ==","mode":420,"size":273826},"dist/shared/nuxi.1e36f2d5.mjs":{"checkedAt":1715158492671,"integrity":"sha512-9e1j+ZqJz3L6rKeKkCiDx44/PiroCwg/ROVNbI4rI/yylmQ9n1pvYDVt8tJiTuO1Seyu40/V3ZAJbfhMNCI4rA==","mode":420,"size":17431},"dist/shared/nuxi.1ff5d6e2.mjs":{"checkedAt":1715158492672,"integrity":"sha512-dN+oynjTX43KpMU47ey2kZo+Ibnvvog9d+fcvLkFZHzjkJ4MkTOOLPEfCxjoDaef+QFbYtj129xeB23CvfAgbw==","mode":420,"size":1499},"dist/shared/nuxi.2155838d.mjs":{"checkedAt":1715158492672,"integrity":"sha512-EAN3JrcDYMoPPgJYj9kRfI0W3rv79I52So/z36C10kAa4OjlL7IwgucUd6e6Wz+k9EDFZSk9PTErAFJsJGTQJQ==","mode":420,"size":1035},"dist/shared/nuxi.2509f57e.mjs":{"checkedAt":1715158492672,"integrity":"sha512-S7ClWljw/yrn3Hug6b+gOlmVuXnRrDg4ng3KThe8Xvqb4UTFyYCDhbvpDgARd+PVJyCG5vCcjqeAiFEXn/9Nzw==","mode":420,"size":330},"dist/shared/nuxi.29475410.mjs":{"checkedAt":1715158492672,"integrity":"sha512-qjqJy7bt9OTn+o7wccIMnwTlMxK3GqUILBsKvsYyQjJzY8imgg8fxk0Poi82NGcRCoaq++bq4s7VTfivyBlEuA==","mode":420,"size":15276},"dist/shared/nuxi.349af404.mjs":{"checkedAt":1715158492672,"integrity":"sha512-DIKc2VPM/qrgSOmwH8UL80nh1FZxf2ml/L+uMoIcP9dSZCN3JBZKzMzqVmpATMl5Iq1BNgU1Z3bf9/Sp0cITMQ==","mode":420,"size":1580},"dist/shared/nuxi.34ba5283.mjs":{"checkedAt":1715158492693,"integrity":"sha512-Lc5qacpi4ViMW5+KThTYtkwe9PwlZrWkPa5vW3QyKLkfdpe7KCVNr9yvMUHYU34XUFNEtZ259j20ctw8CJ4V5w==","mode":420,"size":146515},"dist/shared/nuxi.4ac76f59.mjs":{"checkedAt":1715158492693,"integrity":"sha512-EBIW3pPx0TZb22ys+CqLUEhEanuAACWlc4bDRT2dmKncTrQ1xbYbtIZs5FOtIKzF+FQcSARoo/ky1bWZ4Hlf+Q==","mode":420,"size":2085},"dist/shared/nuxi.53f5921c.mjs":{"checkedAt":1715158492694,"integrity":"sha512-xrNnJyyFv1md+t1xQuWDq+oLrNPd3Fy7eD4hVGByUQufEcxAmcrYvNZu4AfTKy858vQmOzxfvZpSy0s916XGag==","mode":420,"size":7021},"dist/shared/nuxi.5aaa4630.mjs":{"checkedAt":1715158492695,"integrity":"sha512-7nT7F3Dbl8IMCj/M/R/NQ2fs4xat/puQvq7MJaHv9HkxvPjqYIqS9ugpaxHv/U352p7i54Q1tocm1vwceAoouw==","mode":420,"size":660},"dist/shared/nuxi.610c92ff.mjs":{"checkedAt":1715158492695,"integrity":"sha512-u5bFXlIervtqaRkB8WK+ZJLBYHxtmxTT0NsQncJDTtZ/WkcOASN9Pg4kHXurvF0Ij24kiuQ/cPFX3vv2dmUgNA==","mode":420,"size":6782},"dist/shared/nuxi.73800aa7.mjs":{"checkedAt":1715158492741,"integrity":"sha512-/k9ztWp6NnBFe0LIYkgpJLIdM4mmeir89Bkc5TpTwyWq0h6D/WNG0atkhBmrLkzr27jPqutloYJcD2g+5U2bTw==","mode":420,"size":1905463},"dist/shared/nuxi.9edf0930.mjs":{"checkedAt":1715158492743,"integrity":"sha512-dTTMP2+SBds4kZpNbrGXgYZjMRxCcJ0pkhQQusm87kvS354AQaCMdjRYQic8sGUT2dwBtpjWo8YE++t7ds4QIg==","mode":420,"size":75206},"dist/shared/nuxi.c282fbf5.mjs":{"checkedAt":1715158492744,"integrity":"sha512-5k2EIpdYdL/YKoHf2p1bhF71eLEoCiUAZzCdZ0yMaVitZ34QKTRM7BwyAshPU6AD+FzEz+MUEwC+ESzwg+byFw==","mode":420,"size":19969},"dist/shared/nuxi.c8477004.mjs":{"checkedAt":1715158492745,"integrity":"sha512-CspyHUXcmdcCc+1IKAwwZ+cpW402HvsO6p6yrrO/oYlcmhP8nbPJQjgjkUATlgIFbMA9rsUaCv028/bxjhrlMA==","mode":420,"size":665},"dist/shared/nuxi.cc8dd4a9.mjs":{"checkedAt":1715158492745,"integrity":"sha512-i4qiduA5Hhxiqj677fc871PKSRQCD2MNVQDzKfo1GAKOy+adtTZyz7sRcHmN/8of75FvMXMyvNhaS146OLGZWQ==","mode":420,"size":8930},"dist/shared/nuxi.d3241ca4.mjs":{"checkedAt":1715158492745,"integrity":"sha512-23rTdZCwH1GvBbYIItyTm13OHY3pZvWWPoiKkT1lQbvZbRAwyF9M0FGbks8+tJsJ9D6/L4hrrkucI7HXsQIZZA==","mode":420,"size":3460},"dist/shared/nuxi.dc1b30dc.mjs":{"checkedAt":1715158492748,"integrity":"sha512-JdzwNWaHq++d8zuZI1oNfPR6Xt8khnIyCSLOyCFst/rBjaKp2x1KU7nuZ9zYSKNmZe7bcnC1paqs2IRGZywZXA==","mode":420,"size":68932},"dist/shared/nuxi.eaa29140.mjs":{"checkedAt":1715158492748,"integrity":"sha512-6QM77w4EVBUZWKRclsMBW7f8PJpLVydgq0T8L+1b+WWe2mBubcgEKCp7SfzGAk96tTJUCSfAyRCDTg9N85qtbQ==","mode":420,"size":1600},"bin/nuxi.mjs":{"checkedAt":1715158492748,"integrity":"sha512-fZWFwXMMjDoOEG9aJaU6jgUJclrX+6e34zfVxHjLllI/I9n6cp6f+ieZrvcE5/T1lklIbBAcmbcMoPWpAWGlvQ==","mode":493,"size":210},"dist/chunks/satisfies.mjs":{"checkedAt":1715158492750,"integrity":"sha512-xnK1t9bcWb6NIYV6NPgR5DIAtQ45nPBY4HbXobOlCvw6nDHAacwxSaRv7dB2x/secI9LSRBKxdR9MAtBkk6YcQ==","mode":420,"size":48907},"dist/chunks/prepare.mjs":{"checkedAt":1715158492752,"integrity":"sha512-4kXg4CIZhwObu4eu8PVifZrBwlVUZWFkzfJgtWVVLtRSDcJrlkxHk76pvBMWPrkVnulfUFR4TO8Un9iHw2iiFA==","mode":420,"size":1875},"dist/chunks/preview.mjs":{"checkedAt":1715158492756,"integrity":"sha512-eVn7m2aetFbXiWZSqY4XBrI0cYUNdFWXij4ueSLUzU8zmM6fupfRMD+iTaCMqxchfvf39Xh/R43MRQnuq4xQ9g==","mode":420,"size":4123},"dist/chunks/prompt.mjs":{"checkedAt":1715158492756,"integrity":"sha512-O/Epnph0tKqH6cQxZEeyQufomoOU+HOh54uyntjMV9cbbc70fLUfUyifooIwroLyzVtY//Oe6ZSMNKCfOBCW3g==","mode":420,"size":44064},"dist/chunks/upgrade.mjs":{"checkedAt":1715158492756,"integrity":"sha512-2rAKD7cbZ7eMDfDmayMooAvp6DQgFEwMEkksr+WJjgNcEeP6rU1B1D4vTEs69QxA+B6xEpt26SQKCtt+1F4HDQ==","mode":420,"size":4765},"dist/chunks/typecheck.mjs":{"checkedAt":1715158492756,"integrity":"sha512-5zIyM/wRThgpGE1RTvEISZD6yvFbT3Lq3N4u0/dDWpvUSy8KweKGT1FejfaxK6KSqcJdFYT6LAAzNg+LVbvO8A==","mode":420,"size":2398},"dist/chunks/search.mjs":{"checkedAt":1715158492756,"integrity":"sha512-KD1m9fQenjfI4m3X1bfUh6eeKGjoC4KqRDKIZXVTKaqasq+EM/DiYOzv60fvE0/yK7v3LTd2SLJ4mplMcksmNw==","mode":420,"size":45221},"dist/chunks/test.mjs":{"checkedAt":1715158492759,"integrity":"sha512-evjrwZ+KiCpv97hVvwJGWAl5xt9IYf4W33WxL87wDzoCwnpX1c0CDT6Gq5giBAJkTMSUkeVH6yBvQ3JNP2CpXg==","mode":420,"size":1596},"dist/chunks/xdg-open.mjs":{"checkedAt":1715158492760,"integrity":"sha512-B8w8NzhEmKEhDmTKTJ4zQfyjjNolXJttrcEaIqc2eKlIRAge8ZH88jk5Ogdy+p+R7UET86jsGCfVxTcIbaBROw==","mode":420,"size":25951},"dist/index.d.mts":{"checkedAt":1715158492762,"integrity":"sha512-bKZ9GYaM6GOK4Kqp5MnPttibrm+SzfQPZK0DYSMJ5AHBC2v2ReDJboYiRzPTvG4F9sd+HTYXnrVVO85UQBdhdg==","mode":420,"size":253},"dist/index.d.ts":{"checkedAt":1715158492762,"integrity":"sha512-bKZ9GYaM6GOK4Kqp5MnPttibrm+SzfQPZK0DYSMJ5AHBC2v2ReDJboYiRzPTvG4F9sd+HTYXnrVVO85UQBdhdg==","mode":420,"size":253}}}
\ No newline at end of file
import { g as gray, a as green, b as bold } from './nuxi.d3241ca4.mjs';
import { t as tryRequireModule } from './nuxi.5aaa4630.mjs';
function showVersions(cwd) {
const getPkgVersion = (pkg) => {
return tryRequireModule(`${pkg}/package.json`, cwd)?.version || "";
};
const nuxtVersion = getPkgVersion("nuxt") || getPkgVersion("nuxt-nightly") || getPkgVersion("nuxt3") || getPkgVersion("nuxt-edge");
const nitroVersion = getPkgVersion("nitropack") || getPkgVersion("nitropack-edge");
console.log(
gray(
green(`Nuxt ${bold(nuxtVersion)}`) + (nitroVersion ? ` with Nitro ${bold(nitroVersion)}` : "")
)
);
}
export { showVersions as s };
const NUMBER_CHAR_RE = /\d/;
const STR_SPLITTERS = ["-", "_", "/", "."];
function isUppercase(char = "") {
if (NUMBER_CHAR_RE.test(char)) {
return void 0;
}
return char !== char.toLowerCase();
}
function splitByCase(str, separators) {
const splitters = separators ?? STR_SPLITTERS;
const parts = [];
if (!str || typeof str !== "string") {
return parts;
}
let buff = "";
let previousUpper;
let previousSplitter;
for (const char of str) {
const isSplitter = splitters.includes(char);
if (isSplitter === true) {
parts.push(buff);
buff = "";
previousUpper = void 0;
continue;
}
const isUpper = isUppercase(char);
if (previousSplitter === false) {
if (previousUpper === false && isUpper === true) {
parts.push(buff);
buff = char;
previousUpper = isUpper;
continue;
}
if (previousUpper === true && isUpper === false && buff.length > 1) {
const lastChar = buff.at(-1);
parts.push(buff.slice(0, Math.max(0, buff.length - 1)));
buff = lastChar + char;
previousUpper = isUpper;
continue;
}
}
buff += char;
previousUpper = isUpper;
previousSplitter = isSplitter;
}
parts.push(buff);
return parts;
}
function upperFirst(str) {
return str ? str[0].toUpperCase() + str.slice(1) : "";
}
function kebabCase(str, joiner) {
return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p) => p.toLowerCase()).join(joiner ?? "-") : "";
}
export { kebabCase as k, splitByCase as s, upperFirst as u };
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
function getDefaultExportFromCjs (x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
}
function getAugmentedNamespace(n) {
if (n.__esModule) return n;
var f = n.default;
if (typeof f == "function") {
var a = function a () {
if (this instanceof a) {
return Reflect.construct(f, arguments, this.constructor);
}
return f.apply(this, arguments);
};
a.prototype = f.prototype;
} else a = {};
Object.defineProperty(a, '__esModule', {value: true});
Object.keys(n).forEach(function (k) {
var d = Object.getOwnPropertyDescriptor(n, k);
Object.defineProperty(a, k, d.get ? d : {
enumerable: true,
get: function () {
return n[k];
}
});
});
return a;
}
export { getAugmentedNamespace as a, commonjsGlobal as c, getDefaultExportFromCjs as g };
const suspectProtoRx = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/;
const suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
const JsonSigRx = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;
function jsonParseTransform(key, value) {
if (key === "__proto__" || key === "constructor" && value && typeof value === "object" && "prototype" in value) {
warnKeyDropped(key);
return;
}
return value;
}
function warnKeyDropped(key) {
console.warn(`[destr] Dropping "${key}" key to prevent prototype pollution.`);
}
function destr(value, options = {}) {
if (typeof value !== "string") {
return value;
}
const _value = value.trim();
if (
// eslint-disable-next-line unicorn/prefer-at
value[0] === '"' && value.endsWith('"') && !value.includes("\\")
) {
return _value.slice(1, -1);
}
if (_value.length <= 9) {
const _lval = _value.toLowerCase();
if (_lval === "true") {
return true;
}
if (_lval === "false") {
return false;
}
if (_lval === "undefined") {
return void 0;
}
if (_lval === "null") {
return null;
}
if (_lval === "nan") {
return Number.NaN;
}
if (_lval === "infinity") {
return Number.POSITIVE_INFINITY;
}
if (_lval === "-infinity") {
return Number.NEGATIVE_INFINITY;
}
}
if (!JsonSigRx.test(value)) {
if (options.strict) {
throw new SyntaxError("[destr] Invalid JSON");
}
return value;
}
try {
if (suspectProtoRx.test(value) || suspectConstructorRx.test(value)) {
if (options.strict) {
throw new Error("[destr] Possible prototype pollution");
}
return JSON.parse(value, jsonParseTransform);
}
return JSON.parse(value);
} catch (error) {
if (options.strict) {
throw error;
}
return value;
}
}
export { destr as d };
import Et from 'node:http';
import https from 'node:https';
import { EventEmitter } from 'node:events';
const upgradeHeader = /(^|,)\s*upgrade\s*($|,)/i;
const isSSL = /^https|wss/;
function setupOutgoing(outgoing, options, req, forward) {
outgoing.port = options[forward || "target"].port || (isSSL.test(options[forward || "target"].protocol) ? 443 : 80);
for (const e of [
"host",
"hostname",
"socketPath",
"pfx",
"key",
"passphrase",
"cert",
"ca",
"ciphers",
"secureProtocol"
]) {
outgoing[e] = options[forward || "target"][e];
}
outgoing.method = options.method || req.method;
outgoing.headers = { ...req.headers };
if (options.headers) {
outgoing.headers = { ...outgoing.headers, ...options.headers };
}
if (options.auth) {
outgoing.auth = options.auth;
}
if (options.ca) {
outgoing.ca = options.ca;
}
if (isSSL.test(options[forward || "target"].protocol)) {
outgoing.rejectUnauthorized = options.secure === void 0 ? true : options.secure;
}
outgoing.agent = options.agent || false;
outgoing.localAddress = options.localAddress;
if (!outgoing.agent) {
outgoing.headers = outgoing.headers || {};
if (typeof outgoing.headers.connection !== "string" || !upgradeHeader.test(outgoing.headers.connection)) {
outgoing.headers.connection = "close";
}
}
const target = options[forward || "target"];
const targetPath = target && options.prependPath !== false ? target.pathname || target.path || "" : "";
const parsed = new URL(req.url, "http://localhost");
let outgoingPath = options.toProxy ? req.url : parsed.pathname + parsed.search || "";
outgoingPath = options.ignorePath ? "" : outgoingPath;
outgoing.path = urlJoin(targetPath, outgoingPath);
if (options.changeOrigin) {
outgoing.headers.host = /* required(outgoing.port, options[forward || "target"].protocol) && TODO: From requires-port */
hasPort(outgoing.host) ? outgoing.host : outgoing.host + ":" + outgoing.port;
}
return outgoing;
}
function setupSocket(socket) {
socket.setTimeout(0);
socket.setNoDelay(true);
socket.setKeepAlive(true, 0);
return socket;
}
function getPort(req) {
const res = req.headers.host ? req.headers.host.match(/:(\d+)/) : "";
if (res) {
return res[1];
}
return hasEncryptedConnection(req) ? "443" : "80";
}
function hasEncryptedConnection(req) {
return Boolean(req.connection.encrypted || req.connection.pair);
}
function urlJoin(...args) {
const lastIndex = args.length - 1;
const last = args[lastIndex];
const lastSegs = last.split("?");
args[lastIndex] = lastSegs.shift();
const retSegs = [
args.filter(Boolean).join("/").replace(/\/+/g, "/").replace("http:/", "http://").replace("https:/", "https://")
];
retSegs.push(...lastSegs);
return retSegs.join("?");
}
function rewriteCookieProperty(header, config, property) {
if (Array.isArray(header)) {
return header.map(function(headerElement) {
return rewriteCookieProperty(headerElement, config, property);
});
}
return header.replace(
new RegExp("(;\\s*" + property + "=)([^;]+)", "i"),
function(match, prefix, previousValue) {
let newValue;
if (previousValue in config) {
newValue = config[previousValue];
} else if ("*" in config) {
newValue = config["*"];
} else {
return match;
}
return newValue ? prefix + newValue : "";
}
);
}
function hasPort(host) {
return !!~host.indexOf(":");
}
function defineProxyMiddleware(m) {
return m;
}
function defineProxyOutgoingMiddleware(m) {
return m;
}
const redirectRegex = /^201|30([1278])$/;
const removeChunked = defineProxyOutgoingMiddleware((req, res, proxyRes) => {
if (req.httpVersion === "1.0") {
delete proxyRes.headers["transfer-encoding"];
}
});
const setConnection = defineProxyOutgoingMiddleware((req, res, proxyRes) => {
if (req.httpVersion === "1.0") {
proxyRes.headers.connection = req.headers.connection || "close";
} else if (req.httpVersion !== "2.0" && !proxyRes.headers.connection) {
proxyRes.headers.connection = req.headers.connection || "keep-alive";
}
});
const setRedirectHostRewrite = defineProxyOutgoingMiddleware(
(req, res, proxyRes, options) => {
if ((options.hostRewrite || options.autoRewrite || options.protocolRewrite) && proxyRes.headers.location && redirectRegex.test(String(proxyRes.statusCode))) {
const target = new URL(options.target);
const u = new URL(proxyRes.headers.location);
if (target.host !== u.host) {
return;
}
if (options.hostRewrite) {
u.host = options.hostRewrite;
} else if (options.autoRewrite) {
u.host = req.headers.host;
}
if (options.protocolRewrite) {
u.protocol = options.protocolRewrite;
}
proxyRes.headers.location = u.toString();
}
}
);
const writeHeaders = defineProxyOutgoingMiddleware(
(req, res, proxyRes, options) => {
let rewriteCookieDomainConfig = options.cookieDomainRewrite;
let rewriteCookiePathConfig = options.cookiePathRewrite;
const preserveHeaderKeyCase = options.preserveHeaderKeyCase;
let rawHeaderKeyMap;
const setHeader = function(key, header) {
if (header === void 0) {
return;
}
if (rewriteCookieDomainConfig && key.toLowerCase() === "set-cookie") {
header = rewriteCookieProperty(
header,
rewriteCookieDomainConfig,
"domain"
);
}
if (rewriteCookiePathConfig && key.toLowerCase() === "set-cookie") {
header = rewriteCookieProperty(header, rewriteCookiePathConfig, "path");
}
res.setHeader(String(key).trim(), header);
};
if (typeof rewriteCookieDomainConfig === "string") {
rewriteCookieDomainConfig = { "*": rewriteCookieDomainConfig };
}
if (typeof rewriteCookiePathConfig === "string") {
rewriteCookiePathConfig = { "*": rewriteCookiePathConfig };
}
if (preserveHeaderKeyCase && proxyRes.rawHeaders !== void 0) {
rawHeaderKeyMap = {};
for (let i = 0; i < proxyRes.rawHeaders.length; i += 2) {
const key = proxyRes.rawHeaders[i];
rawHeaderKeyMap[key.toLowerCase()] = key;
}
}
for (let key of Object.keys(proxyRes.headers)) {
const header = proxyRes.headers[key];
if (preserveHeaderKeyCase && rawHeaderKeyMap) {
key = rawHeaderKeyMap[key] || key;
}
setHeader(key, header);
}
}
);
const writeStatusCode = defineProxyOutgoingMiddleware((req, res, proxyRes) => {
if (proxyRes.statusMessage) {
res.statusCode = proxyRes.statusCode;
res.statusMessage = proxyRes.statusMessage;
} else {
res.statusCode = proxyRes.statusCode;
}
});
const webOutgoingMiddleware = [
removeChunked,
setConnection,
setRedirectHostRewrite,
writeHeaders,
writeStatusCode
];
const nativeAgents = { http: Et, https: https };
const deleteLength = defineProxyMiddleware((req) => {
if ((req.method === "DELETE" || req.method === "OPTIONS") && !req.headers["content-length"]) {
req.headers["content-length"] = "0";
delete req.headers["transfer-encoding"];
}
});
const timeout = defineProxyMiddleware((req, res, options) => {
if (options.timeout) {
req.socket.setTimeout(options.timeout);
}
});
const XHeaders$1 = defineProxyMiddleware((req, res, options) => {
if (!options.xfwd) {
return;
}
const encrypted = req.isSpdy || hasEncryptedConnection(req);
const values = {
for: req.connection.remoteAddress || req.socket.remoteAddress,
port: getPort(req),
proto: encrypted ? "https" : "http"
};
for (const header of ["for", "port", "proto"]) {
req.headers["x-forwarded-" + header] = (req.headers["x-forwarded-" + header] || "") + (req.headers["x-forwarded-" + header] ? "," : "") + values[header];
}
req.headers["x-forwarded-host"] = req.headers["x-forwarded-host"] || req.headers.host || "";
});
const stream$1 = defineProxyMiddleware(
(req, res, options, server, head, callback) => {
server.emit("start", req, res, options.target || options.forward);
const agents = nativeAgents;
const http = agents.http;
const https = agents.https;
if (options.forward) {
const forwardReq = (options.forward.protocol === "https:" ? https : http).request(setupOutgoing(options.ssl || {}, options, req, "forward"));
const forwardError = createErrorHandler(forwardReq, options.forward);
req.on("error", forwardError);
forwardReq.on("error", forwardError);
(options.buffer || req).pipe(forwardReq);
if (!options.target) {
res.end();
return;
}
}
const proxyReq = (options.target.protocol === "https:" ? https : http).request(setupOutgoing(options.ssl || {}, options, req));
proxyReq.on("socket", (socket) => {
if (server && !proxyReq.getHeader("expect")) {
server.emit("proxyReq", proxyReq, req, res, options);
}
});
if (options.proxyTimeout) {
proxyReq.setTimeout(options.proxyTimeout, function() {
proxyReq.abort();
});
}
req.on("aborted", function() {
proxyReq.abort();
});
const proxyError = createErrorHandler(proxyReq, options.target);
req.on("error", proxyError);
proxyReq.on("error", proxyError);
function createErrorHandler(proxyReq2, url) {
return function proxyError2(err) {
if (req.socket.destroyed && err.code === "ECONNRESET") {
server.emit("econnreset", err, req, res, url);
return proxyReq2.abort();
}
if (callback) {
callback(err, req, res, url);
} else {
server.emit("error", err, req, res, url);
}
};
}
(options.buffer || req).pipe(proxyReq);
proxyReq.on("response", function(proxyRes) {
if (server) {
server.emit("proxyRes", proxyRes, req, res);
}
if (!res.headersSent && !options.selfHandleResponse) {
for (const pass of webOutgoingMiddleware) {
if (pass(req, res, proxyRes, options)) {
break;
}
}
}
if (res.finished) {
if (server) {
server.emit("end", req, res, proxyRes);
}
} else {
res.on("close", function() {
proxyRes.destroy();
});
proxyRes.on("end", function() {
if (server) {
server.emit("end", req, res, proxyRes);
}
});
if (!options.selfHandleResponse) {
proxyRes.pipe(res);
}
}
});
}
);
const webIncomingMiddleware = [
deleteLength,
timeout,
XHeaders$1,
stream$1
];
const checkMethodAndHeader = defineProxyMiddleware((req, socket) => {
if (req.method !== "GET" || !req.headers.upgrade) {
socket.destroy();
return true;
}
if (req.headers.upgrade.toLowerCase() !== "websocket") {
socket.destroy();
return true;
}
});
const XHeaders = defineProxyMiddleware((req, socket, options) => {
if (!options.xfwd) {
return;
}
const values = {
for: req.connection.remoteAddress || req.socket.remoteAddress,
port: getPort(req),
proto: hasEncryptedConnection(req) ? "wss" : "ws"
};
for (const header of ["for", "port", "proto"]) {
req.headers["x-forwarded-" + header] = (req.headers["x-forwarded-" + header] || "") + (req.headers["x-forwarded-" + header] ? "," : "") + values[header];
}
});
const stream = defineProxyMiddleware(
(req, socket, options, server, head, callback) => {
const createHttpHeader = function(line, headers) {
return Object.keys(headers).reduce(
function(head2, key) {
const value = headers[key];
if (!Array.isArray(value)) {
head2.push(key + ": " + value);
return head2;
}
for (const element of value) {
head2.push(key + ": " + element);
}
return head2;
},
[line]
).join("\r\n") + "\r\n\r\n";
};
setupSocket(socket);
if (head && head.length > 0) {
socket.unshift(head);
}
const proxyReq = (isSSL.test(options.target.protocol) ? https : Et).request(setupOutgoing(options.ssl || {}, options, req));
if (server) {
server.emit("proxyReqWs", proxyReq, req, socket, options, head);
}
proxyReq.on("error", onOutgoingError);
proxyReq.on("response", function(res) {
if (!res.upgrade) {
socket.write(
createHttpHeader(
"HTTP/" + res.httpVersion + " " + res.statusCode + " " + res.statusMessage,
res.headers
)
);
res.pipe(socket);
}
});
proxyReq.on("upgrade", function(proxyRes, proxySocket, proxyHead) {
proxySocket.on("error", onOutgoingError);
proxySocket.on("end", function() {
server.emit("close", proxyRes, proxySocket, proxyHead);
});
socket.on("error", function() {
proxySocket.end();
});
setupSocket(proxySocket);
if (proxyHead && proxyHead.length > 0) {
proxySocket.unshift(proxyHead);
}
socket.write(
createHttpHeader("HTTP/1.1 101 Switching Protocols", proxyRes.headers)
);
proxySocket.pipe(socket).pipe(proxySocket);
server.emit("open", proxySocket);
server.emit("proxySocket", proxySocket);
});
proxyReq.end();
function onOutgoingError(err) {
if (callback) {
callback(err, req, socket);
} else {
server.emit("error", err, req, socket);
}
socket.end();
}
}
);
const websocketIncomingMiddleware = [
checkMethodAndHeader,
XHeaders,
stream
];
var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => {
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
return value;
};
class ProxyServer extends EventEmitter {
/**
* Creates the proxy server with specified options.
* @param options - Config object passed to the proxy
*/
constructor(options = {}) {
super();
__publicField(this, "_server");
__publicField(this, "_webPasses", [...webIncomingMiddleware]);
__publicField(this, "_wsPasses", [...websocketIncomingMiddleware]);
__publicField(this, "options");
__publicField(this, "web");
__publicField(this, "ws");
this.options = options || {};
this.options.prependPath = options.prependPath !== false;
this.web = _createProxyFn("web", this);
this.ws = _createProxyFn("ws", this);
}
/**
* A function that wraps the object in a webserver, for your convenience
* @param port - Port to listen on
* @param hostname - The hostname to listen on
*/
listen(port, hostname) {
const closure = (req, res) => {
this.web(req, res);
};
this._server = this.options.ssl ? https.createServer(this.options.ssl, closure) : Et.createServer(closure);
if (this.options.ws) {
this._server.on("upgrade", (req, socket, head) => {
this._ws(req, socket, head);
});
}
this._server.listen(port, hostname);
return this;
}
/**
* A function that closes the inner webserver and stops listening on given port
*/
close(callback) {
if (this._server) {
this._server.close((...args) => {
this._server = void 0;
if (callback) {
Reflect.apply(callback, void 0, args);
}
});
}
}
before(type, passName, pass) {
if (type !== "ws" && type !== "web") {
throw new Error("type must be `web` or `ws`");
}
const passes = type === "ws" ? this._wsPasses : this._webPasses;
let i = false;
for (const [idx, v] of passes.entries()) {
if (v.name === passName) {
i = idx;
}
}
if (i === false) {
throw new Error("No such pass");
}
passes.splice(i, 0, pass);
}
after(type, passName, pass) {
if (type !== "ws" && type !== "web") {
throw new Error("type must be `web` or `ws`");
}
const passes = type === "ws" ? this._wsPasses : this._webPasses;
let i = false;
for (const [idx, v] of passes.entries()) {
if (v.name === passName) {
i = idx;
}
}
if (i === false) {
throw new Error("No such pass");
}
passes.splice(i++, 0, pass);
}
}
function createProxyServer(options = {}) {
return new ProxyServer(options);
}
function _createProxyFn(type, server) {
return function(req, res, opts, head) {
const requestOptions = { ...opts, ...server.options };
for (const key of ["target", "forward"]) {
if (typeof requestOptions[key] === "string") {
requestOptions[key] = new URL(requestOptions[key]);
}
}
if (!requestOptions.target && !requestOptions.forward) {
return this.emit(
"error",
new Error("Must provide a proper URL as target")
);
}
let _resolve;
let _reject;
const callbackPromise = new Promise((resolve, reject) => {
_resolve = resolve;
_reject = reject;
});
res.on("close", () => {
_resolve();
});
res.on("error", (error) => {
_reject(error);
});
for (const pass of type === "ws" ? server._wsPasses : server._webPasses) {
const stop = pass(
req,
res,
requestOptions,
server,
head,
(error) => {
_reject(error);
}
);
if (stop) {
_resolve();
break;
}
}
return callbackPromise;
};
}
export { ProxyServer, createProxyServer };
import 'node:fs';
import 'node:path';
import { b as br, B as Bn } from '../shared/nuxi.34ba5283.mjs';
import 'node:http';
import 'node:https';
import 'node:zlib';
import 'node:stream';
import 'node:buffer';
import 'node:util';
import 'node:url';
import 'node:net';
import '../shared/nuxi.4ac76f59.mjs';
import '../shared/nuxi.53f5921c.mjs';
import './satisfies.mjs';
import '../shared/nuxi.2155838d.mjs';
import '../shared/nuxi.cc8dd4a9.mjs';
import '../shared/nuxi.5aaa4630.mjs';
import 'node:module';
import '../shared/nuxi.610c92ff.mjs';
var B=Object.defineProperty;var E=(u,a)=>B(u,"name",{value:a,configurable:!0});let D=0;const t={START_BOUNDARY:D++,HEADER_FIELD_START:D++,HEADER_FIELD:D++,HEADER_VALUE_START:D++,HEADER_VALUE:D++,HEADER_VALUE_ALMOST_DONE:D++,HEADERS_ALMOST_DONE:D++,PART_DATA_START:D++,PART_DATA:D++,END:D++};let w=1;const R={PART_BOUNDARY:w,LAST_BOUNDARY:w*=2},g=10,N=13,x=32,P=45,C=58,I=97,M=122,$=E(u=>u|32,"lower"),m=E(()=>{},"noop"),F=class F{constructor(a){this.index=0,this.flags=0,this.onHeaderEnd=m,this.onHeaderField=m,this.onHeadersEnd=m,this.onHeaderValue=m,this.onPartBegin=m,this.onPartData=m,this.onPartEnd=m,this.boundaryChars={},a=`\r
--`+a;const n=new Uint8Array(a.length);for(let r=0;r<a.length;r++)n[r]=a.charCodeAt(r),this.boundaryChars[n[r]]=!0;this.boundary=n,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=t.START_BOUNDARY;}write(a){let n=0;const r=a.length;let d=this.index,{lookbehind:l,boundary:c,boundaryChars:p,index:e,state:i,flags:A}=this;const H=this.boundary.length,O=H-1,y=a.length;let o,L;const f=E(h=>{this[h+"Mark"]=n;},"mark"),s=E(h=>{delete this[h+"Mark"];},"clear"),T=E((h,S,_,U)=>{(S===void 0||S!==_)&&this[h](U&&U.subarray(S,_));},"callback"),b=E((h,S)=>{const _=h+"Mark";_ in this&&(S?(T(h,this[_],n,a),delete this[_]):(T(h,this[_],a.length,a),this[_]=0));},"dataCallback");for(n=0;n<r;n++)switch(o=a[n],i){case t.START_BOUNDARY:if(e===c.length-2){if(o===P)A|=R.LAST_BOUNDARY;else if(o!==N)return;e++;break}else if(e-1===c.length-2){if(A&R.LAST_BOUNDARY&&o===P)i=t.END,A=0;else if(!(A&R.LAST_BOUNDARY)&&o===g)e=0,T("onPartBegin"),i=t.HEADER_FIELD_START;else return;break}o!==c[e+2]&&(e=-2),o===c[e+2]&&e++;break;case t.HEADER_FIELD_START:i=t.HEADER_FIELD,f("onHeaderField"),e=0;case t.HEADER_FIELD:if(o===N){s("onHeaderField"),i=t.HEADERS_ALMOST_DONE;break}if(e++,o===P)break;if(o===C){if(e===1)return;b("onHeaderField",!0),i=t.HEADER_VALUE_START;break}if(L=$(o),L<I||L>M)return;break;case t.HEADER_VALUE_START:if(o===x)break;f("onHeaderValue"),i=t.HEADER_VALUE;case t.HEADER_VALUE:o===N&&(b("onHeaderValue",!0),T("onHeaderEnd"),i=t.HEADER_VALUE_ALMOST_DONE);break;case t.HEADER_VALUE_ALMOST_DONE:if(o!==g)return;i=t.HEADER_FIELD_START;break;case t.HEADERS_ALMOST_DONE:if(o!==g)return;T("onHeadersEnd"),i=t.PART_DATA_START;break;case t.PART_DATA_START:i=t.PART_DATA,f("onPartData");case t.PART_DATA:if(d=e,e===0){for(n+=O;n<y&&!(a[n]in p);)n+=H;n-=O,o=a[n];}if(e<c.length)c[e]===o?(e===0&&b("onPartData",!0),e++):e=0;else if(e===c.length)e++,o===N?A|=R.PART_BOUNDARY:o===P?A|=R.LAST_BOUNDARY:e=0;else if(e-1===c.length)if(A&R.PART_BOUNDARY){if(e=0,o===g){A&=~R.PART_BOUNDARY,T("onPartEnd"),T("onPartBegin"),i=t.HEADER_FIELD_START;break}}else A&R.LAST_BOUNDARY&&o===P?(T("onPartEnd"),i=t.END,A=0):e=0;if(e>0)l[e-1]=o;else if(d>0){const h=new Uint8Array(l.buffer,l.byteOffset,l.byteLength);T("onPartData",0,d,h),d=0,f("onPartData"),n--;}break;case t.END:break;default:throw new Error(`Unexpected state entered: ${i}`)}b("onHeaderField"),b("onHeaderValue"),b("onPartData"),this.index=e,this.state=i,this.flags=A;}end(){if(this.state===t.HEADER_FIELD_START&&this.index===0||this.state===t.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==t.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}};E(F,"MultipartParser");let k=F;function v(u){const a=u.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!a)return;const n=a[2]||a[3]||"";let r=n.slice(n.lastIndexOf("\\")+1);return r=r.replace(/%22/g,'"'),r=r.replace(/&#(\d{4});/g,(d,l)=>String.fromCharCode(l)),r}E(v,"_fileName");async function Z(u,a){if(!/multipart/i.test(a))throw new TypeError("Failed to fetch");const n=a.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!n)throw new TypeError("no or bad content-type header, no multipart boundary");const r=new k(n[1]||n[2]);let d,l,c,p,e,i;const A=[],H=new br,O=E(s=>{c+=f.decode(s,{stream:!0});},"onPartData"),y=E(s=>{A.push(s);},"appendToFile"),o=E(()=>{const s=new Bn(A,i,{type:e});H.append(p,s);},"appendFileToFormData"),L=E(()=>{H.append(p,c);},"appendEntryToFormData"),f=new TextDecoder("utf-8");f.decode(),r.onPartBegin=function(){r.onPartData=O,r.onPartEnd=L,d="",l="",c="",p="",e="",i=null,A.length=0;},r.onHeaderField=function(s){d+=f.decode(s,{stream:!0});},r.onHeaderValue=function(s){l+=f.decode(s,{stream:!0});},r.onHeaderEnd=function(){if(l+=f.decode(),d=d.toLowerCase(),d==="content-disposition"){const s=l.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);s&&(p=s[2]||s[3]||""),i=v(l),i&&(r.onPartData=y,r.onPartEnd=o);}else d==="content-type"&&(e=l);l="",d="";};for await(const s of u)r.write(s);return r.end(),H}E(Z,"toFormData");
export { Z as toFormData };
{
"name": "nuxi",
"version": "3.11.1",
"description": "⚡️ Nuxt Generation CLI Experience",
"repository": "nuxt/cli",
"license": "MIT",
"type": "module",
"exports": {
".": "./dist/index.mjs",
"./cli": "./bin/nuxi.mjs"
},
"types": "./dist/index.d.ts",
"bin": {
"nuxi": "./bin/nuxi.mjs",
"nuxi-ng": "./bin/nuxi.mjs",
"nuxt": "./bin/nuxi.mjs",
"nuxt-cli": "./bin/nuxi.mjs"
},
"files": [
"bin",
"dist"
],
"scripts": {
"dev:prepare": "unbuild --stub",
"build": "unbuild",
"build:stub": "unbuild --stub",
"dev": "node ./bin/nuxi.mjs dev ./playground",
"dev:bun": "bun --bun ./bin/nuxi.mjs dev ./playground",
"lint": "eslint . && prettier --check src",
"lint:fix": "eslint --fix . && prettier --write src",
"nuxi": "node ./bin/nuxi.mjs",
"nuxi-bun": "bun --bun ./bin/nuxi.mjs",
"prepack": "unbuild",
"release": "pnpm test && changelogen --release && npm publish && git push --follow-tags",
"test": "pnpm lint && pnpm test:types && pnpm build && pnpm test:dist",
"test:dist": "node ./bin/nuxi.mjs info ./playground",
"test:types": "tsc --noEmit"
},
"devDependencies": {
"@nuxt/eslint-config": "^0.2.0",
"@nuxt/kit": "^3.11.1",
"@nuxt/schema": "^3.11.1",
"@nuxt/test-utils": "^3.12.0",
"@types/http-proxy": "^1.17.14",
"@types/node": "^20.11.30",
"@types/semver": "^7.5.8",
"@types/ws": "^8.5.10",
"c12": "^1.10.0",
"changelogen": "^0.5.5",
"chokidar": "^3.6.0",
"citty": "^0.1.6",
"clipboardy": "^4.0.0",
"colorette": "^2.0.20",
"consola": "^3.2.3",
"destr": "^2.0.3",
"eslint": "^8.57.0",
"execa": "^8.0.1",
"fuse.js": "^7.0.0",
"giget": "^1.2.1",
"h3": "^1.11.1",
"httpxy": "^0.1.5",
"jiti": "^1.21.0",
"listhen": "^1.7.2",
"magicast": "^0.3.3",
"mlly": "^1.6.1",
"nuxt": "^3.11.1",
"nypm": "^0.3.8",
"ofetch": "^1.3.3",
"pathe": "^1.1.2",
"perfect-debounce": "^1.0.0",
"pkg-types": "^1.0.3",
"prettier": "^3.2.5",
"scule": "^1.3.0",
"semver": "^7.6.0",
"unbuild": "^2.0.0",
"unws": "^0.2.4",
"vue-tsc": "^2.0.6",
"ws": "^8.16.0"
},
"optionalDependencies": {
"fsevents": "~2.3.3"
},
"resolutions": {
"nitropack": "npm:nitropack-nightly",
"nuxt": "^3.11.1",
"h3": "^1.11.1"
},
"packageManager": "pnpm@8.15.5",
"engines": {
"node": "^16.10.0 || >=18.0.0"
}
}
\ No newline at end of file
import { execa } from './index3.mjs';
import { d as defineCommand } from '../shared/nuxi.9edf0930.mjs';
import { s as sharedArgs, l as legacyRootDirArgs, r as resolve } from '../shared/nuxi.610c92ff.mjs';
import 'node:buffer';
import 'node:path';
import 'node:child_process';
import 'node:process';
import '../shared/nuxi.2155838d.mjs';
import 'child_process';
import 'path';
import 'fs';
import 'node:url';
import 'node:os';
import 'node:fs';
import 'node:timers/promises';
import 'stream';
import 'node:util';
import 'node:tty';
const devtools = defineCommand({
meta: {
name: "devtools",
description: "Enable or disable devtools in a Nuxt project"
},
args: {
...sharedArgs,
command: {
type: "positional",
description: "Command to run",
valueHint: "enable|disable"
},
...legacyRootDirArgs
},
async run(ctx) {
const cwd = resolve(ctx.args.cwd || ctx.args.rootDir || ".");
if (!["enable", "disable"].includes(ctx.args.command)) {
console.error(`Unknown command \`${ctx.args.command}\`.`);
process.exit(1);
}
await execa(
"npx",
["@nuxt/devtools-wizard@latest", ctx.args.command, cwd],
{
stdio: "inherit",
cwd
}
);
}
});
export { devtools as default };
import { c as cleanupNuxtDirs } from '../shared/nuxi.1e36f2d5.mjs';
import { d as defineCommand } from '../shared/nuxi.9edf0930.mjs';
import { s as sharedArgs, l as legacyRootDirArgs, r as resolve } from '../shared/nuxi.610c92ff.mjs';
import { l as loadKit } from '../shared/nuxi.dc1b30dc.mjs';
import 'node:fs';
import 'node:util';
import 'node:path';
import 'node:process';
import 'node:tty';
import '../shared/nuxi.1ff5d6e2.mjs';
import 'node:url';
import '../shared/nuxi.1902c37d.mjs';
import 'node:module';
import '../shared/nuxi.53f5921c.mjs';
import 'node:assert';
import 'node:v8';
import 'node:perf_hooks';
import '../shared/nuxi.eaa29140.mjs';
import './satisfies.mjs';
import '../shared/nuxi.2155838d.mjs';
import '../shared/nuxi.cc8dd4a9.mjs';
import '../shared/nuxi.73800aa7.mjs';
import 'crypto';
import 'fs';
import 'module';
import 'path';
import 'perf_hooks';
import 'os';
import 'vm';
import 'url';
import 'assert';
import 'process';
import 'v8';
import 'util';
import 'tty';
const cleanup = defineCommand({
meta: {
name: "cleanup",
description: "Clean up generated Nuxt files and caches"
},
args: {
...sharedArgs,
...legacyRootDirArgs
},
async run(ctx) {
const cwd = resolve(ctx.args.cwd || ctx.args.rootDir || ".");
const { loadNuxtConfig } = await loadKit(cwd);
const nuxtOptions = await loadNuxtConfig({ cwd });
await cleanupNuxtDirs(nuxtOptions.rootDir, nuxtOptions.buildDir);
}
});
export { cleanup as default };
import { existsSync } from 'node:fs';
import { c as consola } from '../shared/nuxi.9edf0930.mjs';
import 'node:util';
import 'node:path';
import 'node:process';
import 'node:tty';
import 'node:url';
async function startTunnel(opts) {
const {
installCloudflared,
startCloudflaredTunnel,
cloudflaredBinPath,
cloudflaredNotice
} = await import('./index7.mjs');
const url = opts.url || `${opts.protocol || "http"}://${opts.hostname ?? "localhost"}:${opts.port ?? 3e3}`;
consola.start(`Starting cloudflared tunnel to ${url}`);
if (!existsSync(cloudflaredBinPath)) {
consola.log(cloudflaredNotice);
const canInstall = opts.acceptCloudflareNotice || process.env.UNTUN_ACCEPT_CLOUDFLARE_NOTICE || await consola.prompt(
`Do you agree with the above terms and wish to install the binary from GitHub?`,
{
type: "confirm"
}
);
if (!canInstall) {
consola.fail("Skipping tunnel setup.");
return;
}
await installCloudflared();
}
const args = [
["--url", url],
opts.verifyTLS ? void 0 : ["--no-tls-verify", ""]
].filter(Boolean);
const tunnel = await startCloudflaredTunnel(Object.fromEntries(args));
const cleanup = async () => {
await tunnel.stop();
};
for (const signal of ["SIGINT", "SIGUSR1", "SIGUSR2"]) {
process.once(signal, cleanup);
}
return {
getURL: async () => await tunnel.url,
close: async () => {
await cleanup();
}
};
}
export { startTunnel };
const overrideEnv = (targetEnv) => {
const currentEnv = process.env.NODE_ENV;
if (currentEnv && currentEnv !== targetEnv) {
console.warn(
`Changing \`NODE_ENV\` from \`${currentEnv}\` to \`${targetEnv}\`, to avoid unintended behavior.`
);
}
process.env.NODE_ENV = targetEnv;
};
export { overrideEnv as o };
The MIT License (MIT)
Copyright (c) Nuxt Team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
declare const main: any;
declare const runMain: () => Promise<void>;
declare function runCommand(name: string, argv?: string[], data?: {
overrides?: Record<string, any>;
}): Promise<{
result: unknown;
}>;
export { main, runCommand, runMain };
export { m as main, r as runCommand, h as runMain } from './shared/nuxi.9edf0930.mjs';
import 'node:util';
import 'node:path';
import 'node:process';
import 'node:tty';
import 'node:url';
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册