@voidzero-dev/vite-plus-core 0.0.2-gd8fe16bf.20260302-1535 → 0.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3195,11 +3195,11 @@ async function resolveEntry(logger, entry, cwd, color, nameLabel) {
|
|
|
3195
3195
|
if (!entry || Object.keys(entry).length === 0) {
|
|
3196
3196
|
const defaultEntry = path.resolve(cwd, "src/index.ts");
|
|
3197
3197
|
if (await fsExists(defaultEntry)) entry = { index: defaultEntry };
|
|
3198
|
-
else throw new Error(`${nameLabel} No input files, try "vp pack <your-file>" or create src/index.ts`);
|
|
3198
|
+
else throw new Error(`${nameLabel ? `${nameLabel} ` : ""}No input files, try "vp pack <your-file>" or create src/index.ts`);
|
|
3199
3199
|
}
|
|
3200
3200
|
const entryMap = await toObjectEntry(entry, cwd);
|
|
3201
3201
|
const entries = Object.values(entryMap);
|
|
3202
|
-
if (entries.length === 0) throw new Error(`${nameLabel} Cannot find entry: ${JSON.stringify(entry)}`);
|
|
3202
|
+
if (entries.length === 0) throw new Error(`${nameLabel ? `${nameLabel} ` : ""}Cannot find entry: ${JSON.stringify(entry)}`);
|
|
3203
3203
|
logger.info(nameLabel, `entry: ${color(entries.map((entry) => path.relative(cwd, entry)).join(", "))}`);
|
|
3204
3204
|
return entryMap;
|
|
3205
3205
|
}
|
|
@@ -224,17 +224,17 @@ function createLogger(level = "info", options = {}) {
|
|
|
224
224
|
if (failOnWarn) return this.error(...msgs);
|
|
225
225
|
const message = format(msgs);
|
|
226
226
|
warnedMessages.add(message);
|
|
227
|
-
output("warn",
|
|
227
|
+
output("warn", `${bold(yellow`warn:`)} ${message}`);
|
|
228
228
|
},
|
|
229
229
|
warnOnce(...msgs) {
|
|
230
230
|
const message = format(msgs);
|
|
231
231
|
if (warnedMessages.has(message)) return;
|
|
232
232
|
if (failOnWarn) return this.error(...msgs);
|
|
233
233
|
warnedMessages.add(message);
|
|
234
|
-
output("warn",
|
|
234
|
+
output("warn", `${bold(yellow`warn:`)} ${message}`);
|
|
235
235
|
},
|
|
236
236
|
error(...msgs) {
|
|
237
|
-
output("error",
|
|
237
|
+
output("error", `${bold(red`error:`)} ${format(msgs).replace(/^([A-Za-z]*Error):\s*/, "")}`);
|
|
238
238
|
process$1.exitCode = 1;
|
|
239
239
|
},
|
|
240
240
|
success(...msgs) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as __require$1, r as __toESM, t as __commonJSMin } from "./chunk.js";
|
|
2
|
-
import { A as OPTIMIZABLE_ENTRY_RE, C as ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, D as JS_TYPES_RE, E as FS_PREFIX,
|
|
2
|
+
import { A as OPTIMIZABLE_ENTRY_RE, C as ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, D as JS_TYPES_RE, E as FS_PREFIX, I as defaultAllowedOrigins, L as loopbackHosts, M as SPECIAL_QUERY_RE, N as VERSION, O as KNOWN_ASSET_TYPES, P as VITE_PACKAGE_DIR, R as wildcardHosts, S as ENV_PUBLIC_PATH, T as ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET, _ as DEFAULT_SERVER_CONDITIONS, a as CLIENT_ENTRY, b as DEV_PROD_CONDITION, c as DEFAULT_ASSETS_INLINE_LIMIT, d as DEFAULT_CLIENT_MAIN_FIELDS, f as DEFAULT_CONFIG_FILES, g as DEFAULT_PREVIEW_PORT, h as DEFAULT_EXTERNAL_CONDITIONS, i as CLIENT_DIR, j as ROLLUP_HOOKS, k as METADATA_FILENAME, l as DEFAULT_ASSETS_RE, m as DEFAULT_EXTENSIONS, n as createLogger, o as CLIENT_PUBLIC_PATH, p as DEFAULT_DEV_PORT, r as printServerUrls, s as CSS_LANGS_RE, t as LogLevels, u as DEFAULT_CLIENT_CONDITIONS, v as DEFAULT_SERVER_MAIN_FIELDS, w as ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, x as ENV_ENTRY, y as DEP_VERSION_RE, z as require_picocolors } from "./logger.js";
|
|
3
3
|
import { builtinModules, createRequire } from "node:module";
|
|
4
4
|
import { parseAst, parseAstAsync } from "@voidzero-dev/vite-plus-core/rolldown/parseAst";
|
|
5
5
|
import { esmExternalRequirePlugin } from "@voidzero-dev/vite-plus-core/rolldown/plugins";
|
|
@@ -4260,6 +4260,7 @@ const groups = [
|
|
|
4260
4260
|
}
|
|
4261
4261
|
];
|
|
4262
4262
|
const COMPRESSIBLE_ASSETS_RE = /\.(?:html|json|svg|txt|xml|xhtml|wasm)$/;
|
|
4263
|
+
const VITE_VERSION_ONLY_LINE_RE = /^vite v\S+$/;
|
|
4263
4264
|
function buildReporterPlugin(config) {
|
|
4264
4265
|
if (config.nativePluginEnabledLevel >= 1) return perEnvironmentPlugin("native:reporter", (env) => {
|
|
4265
4266
|
const tty = process.stdout.isTTY && !process.env.CI;
|
|
@@ -4271,7 +4272,10 @@ function buildReporterPlugin(config) {
|
|
|
4271
4272
|
isLib: !!env.config.build.lib,
|
|
4272
4273
|
assetsDir,
|
|
4273
4274
|
chunkLimit: env.config.build.chunkSizeWarningLimit,
|
|
4274
|
-
logInfo: shouldLogInfo ? (msg) =>
|
|
4275
|
+
logInfo: shouldLogInfo ? (msg) => {
|
|
4276
|
+
if (VITE_VERSION_ONLY_LINE_RE.test(msg.trim())) return;
|
|
4277
|
+
env.logger.info(msg);
|
|
4278
|
+
} : void 0,
|
|
4275
4279
|
reportCompressedSize: env.config.build.reportCompressedSize,
|
|
4276
4280
|
warnLargeChunks: env.config.build.minify && !env.config.build.lib && env.config.consumer === "client"
|
|
4277
4281
|
});
|
|
@@ -38054,7 +38058,7 @@ function resolveRolldownOptions(environment, chunkMetadataMap) {
|
|
|
38054
38058
|
async function buildEnvironment(environment) {
|
|
38055
38059
|
const { logger, config } = environment;
|
|
38056
38060
|
const { root, build: options } = config;
|
|
38057
|
-
logger.info(import_picocolors.default.cyan(`vite
|
|
38061
|
+
logger.info(import_picocolors.default.cyan(`vite v${VERSION} ${import_picocolors.default.green(`building ${environment.name} environment for ${environment.config.mode}...`)}`));
|
|
38058
38062
|
let bundle;
|
|
38059
38063
|
let startTime;
|
|
38060
38064
|
try {
|
package/dist/vite/node/cli.js
CHANGED
|
@@ -589,7 +589,7 @@ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--
|
|
|
589
589
|
const viteStartTime = global.__vite_start_time ?? false;
|
|
590
590
|
const startupDurationString = viteStartTime ? import_picocolors.default.dim(`ready in ${import_picocolors.default.reset(import_picocolors.default.bold(Math.ceil(performance.now() - viteStartTime)))} ms`) : "";
|
|
591
591
|
const hasExistingLogs = process.stdout.bytesWritten > 0 || process.stderr.bytesWritten > 0;
|
|
592
|
-
info(`\n ${import_picocolors.default.
|
|
592
|
+
info(`\n ${import_picocolors.default.blue(`${import_picocolors.default.bold("VITE+")} v${VITE_PLUS_VERSION}`)}${modeString} ${startupDurationString}\n`, { clear: !hasExistingLogs });
|
|
593
593
|
server.printUrls();
|
|
594
594
|
const customShortcuts = [];
|
|
595
595
|
if (profileSession) customShortcuts.push({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voidzero-dev/vite-plus-core",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0-alpha.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"hookable": "^6.0.1",
|
|
107
107
|
"magic-string": "^0.30.21",
|
|
108
108
|
"oxc-parser": "=0.115.0",
|
|
109
|
-
"oxfmt": "^0.
|
|
109
|
+
"oxfmt": "^0.36.0",
|
|
110
110
|
"picocolors": "^1.1.1",
|
|
111
111
|
"picomatch": "^4.0.3",
|
|
112
112
|
"pkg-types": "^2.3.0",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"tree-kill": "^1.2.2",
|
|
119
119
|
"tsdown": "^0.21.0-beta.2",
|
|
120
120
|
"rolldown": "1.0.0-rc.6",
|
|
121
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@0.0
|
|
121
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.1.0-alpha.0"
|
|
122
122
|
},
|
|
123
123
|
"peerDependencies": {
|
|
124
124
|
"@arethetypeswrong/core": "^0.18.1",
|