vite 6.0.0-beta.5 → 6.0.0-beta.7
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.
- package/LICENSE.md +4 -300
- package/dist/client/client.mjs +23 -16
- package/dist/node/chunks/{dep-DUrICmHV.js → dep-BLM335V-.js} +13 -13
- package/dist/node/chunks/{dep-jvFrlYpX.js → dep-C35rJP-t.js} +6 -192
- package/dist/node/chunks/{dep-BW_D9zgJ.js → dep-Vd7gFLqj.js} +10123 -23062
- package/dist/node/cli.js +8 -7
- package/dist/node/index.d.ts +131 -265
- package/dist/node/index.js +5 -4
- package/dist/node/module-runner.js +11 -5
- package/dist/node-cjs/publicUtils.cjs +12 -5
- package/package.json +25 -16
- package/types/{cssPreprocessorOptions.d.ts → internal/cssPreprocessorOptions.d.ts} +23 -3
- package/types/internal/lightningcssOptions.d.ts +18 -0
@@ -1,6 +1,5 @@
|
|
1
|
-
import { L as getDefaultExportFromCjs } from './dep-
|
2
|
-
import
|
3
|
-
import require$$0 from 'fs';
|
1
|
+
import { L as getDefaultExportFromCjs } from './dep-Vd7gFLqj.js';
|
2
|
+
import sysPath__default from 'path';
|
4
3
|
import { r as requireLib } from './dep-mtw2NpNs.js';
|
5
4
|
|
6
5
|
import { createRequire as __cjs_createRequire } from 'node:module';
|
@@ -231,171 +230,6 @@ function requireApplyStyles () {
|
|
231
230
|
return applyStyles;
|
232
231
|
}
|
233
232
|
|
234
|
-
var readCache = {exports: {}};
|
235
|
-
|
236
|
-
var pify = {exports: {}};
|
237
|
-
|
238
|
-
var hasRequiredPify;
|
239
|
-
|
240
|
-
function requirePify () {
|
241
|
-
if (hasRequiredPify) return pify.exports;
|
242
|
-
hasRequiredPify = 1;
|
243
|
-
|
244
|
-
var processFn = function (fn, P, opts) {
|
245
|
-
return function () {
|
246
|
-
var that = this;
|
247
|
-
var args = new Array(arguments.length);
|
248
|
-
|
249
|
-
for (var i = 0; i < arguments.length; i++) {
|
250
|
-
args[i] = arguments[i];
|
251
|
-
}
|
252
|
-
|
253
|
-
return new P(function (resolve, reject) {
|
254
|
-
args.push(function (err, result) {
|
255
|
-
if (err) {
|
256
|
-
reject(err);
|
257
|
-
} else if (opts.multiArgs) {
|
258
|
-
var results = new Array(arguments.length - 1);
|
259
|
-
|
260
|
-
for (var i = 1; i < arguments.length; i++) {
|
261
|
-
results[i - 1] = arguments[i];
|
262
|
-
}
|
263
|
-
|
264
|
-
resolve(results);
|
265
|
-
} else {
|
266
|
-
resolve(result);
|
267
|
-
}
|
268
|
-
});
|
269
|
-
|
270
|
-
fn.apply(that, args);
|
271
|
-
});
|
272
|
-
};
|
273
|
-
};
|
274
|
-
|
275
|
-
var pify$1 = pify.exports = function (obj, P, opts) {
|
276
|
-
if (typeof P !== 'function') {
|
277
|
-
opts = P;
|
278
|
-
P = Promise;
|
279
|
-
}
|
280
|
-
|
281
|
-
opts = opts || {};
|
282
|
-
opts.exclude = opts.exclude || [/.+Sync$/];
|
283
|
-
|
284
|
-
var filter = function (key) {
|
285
|
-
var match = function (pattern) {
|
286
|
-
return typeof pattern === 'string' ? key === pattern : pattern.test(key);
|
287
|
-
};
|
288
|
-
|
289
|
-
return opts.include ? opts.include.some(match) : !opts.exclude.some(match);
|
290
|
-
};
|
291
|
-
|
292
|
-
var ret = typeof obj === 'function' ? function () {
|
293
|
-
if (opts.excludeMain) {
|
294
|
-
return obj.apply(this, arguments);
|
295
|
-
}
|
296
|
-
|
297
|
-
return processFn(obj, P, opts).apply(this, arguments);
|
298
|
-
} : {};
|
299
|
-
|
300
|
-
return Object.keys(obj).reduce(function (ret, key) {
|
301
|
-
var x = obj[key];
|
302
|
-
|
303
|
-
ret[key] = typeof x === 'function' && filter(key) ? processFn(x, P, opts) : x;
|
304
|
-
|
305
|
-
return ret;
|
306
|
-
}, ret);
|
307
|
-
};
|
308
|
-
|
309
|
-
pify$1.all = pify$1;
|
310
|
-
return pify.exports;
|
311
|
-
}
|
312
|
-
|
313
|
-
var hasRequiredReadCache;
|
314
|
-
|
315
|
-
function requireReadCache () {
|
316
|
-
if (hasRequiredReadCache) return readCache.exports;
|
317
|
-
hasRequiredReadCache = 1;
|
318
|
-
var fs = require$$0;
|
319
|
-
var path = require$$0$1;
|
320
|
-
var pify = requirePify();
|
321
|
-
|
322
|
-
var stat = pify(fs.stat);
|
323
|
-
var readFile = pify(fs.readFile);
|
324
|
-
var resolve = path.resolve;
|
325
|
-
|
326
|
-
var cache = Object.create(null);
|
327
|
-
|
328
|
-
function convert(content, encoding) {
|
329
|
-
if (Buffer.isEncoding(encoding)) {
|
330
|
-
return content.toString(encoding);
|
331
|
-
}
|
332
|
-
return content;
|
333
|
-
}
|
334
|
-
|
335
|
-
readCache.exports = function (path, encoding) {
|
336
|
-
path = resolve(path);
|
337
|
-
|
338
|
-
return stat(path).then(function (stats) {
|
339
|
-
var item = cache[path];
|
340
|
-
|
341
|
-
if (item && item.mtime.getTime() === stats.mtime.getTime()) {
|
342
|
-
return convert(item.content, encoding);
|
343
|
-
}
|
344
|
-
|
345
|
-
return readFile(path).then(function (data) {
|
346
|
-
cache[path] = {
|
347
|
-
mtime: stats.mtime,
|
348
|
-
content: data
|
349
|
-
};
|
350
|
-
|
351
|
-
return convert(data, encoding);
|
352
|
-
});
|
353
|
-
}).catch(function (err) {
|
354
|
-
cache[path] = null;
|
355
|
-
return Promise.reject(err);
|
356
|
-
});
|
357
|
-
};
|
358
|
-
|
359
|
-
readCache.exports.sync = function (path, encoding) {
|
360
|
-
path = resolve(path);
|
361
|
-
|
362
|
-
try {
|
363
|
-
var stats = fs.statSync(path);
|
364
|
-
var item = cache[path];
|
365
|
-
|
366
|
-
if (item && item.mtime.getTime() === stats.mtime.getTime()) {
|
367
|
-
return convert(item.content, encoding);
|
368
|
-
}
|
369
|
-
|
370
|
-
var data = fs.readFileSync(path);
|
371
|
-
|
372
|
-
cache[path] = {
|
373
|
-
mtime: stats.mtime,
|
374
|
-
content: data
|
375
|
-
};
|
376
|
-
|
377
|
-
return convert(data, encoding);
|
378
|
-
} catch (err) {
|
379
|
-
cache[path] = null;
|
380
|
-
throw err;
|
381
|
-
}
|
382
|
-
|
383
|
-
};
|
384
|
-
|
385
|
-
readCache.exports.get = function (path, encoding) {
|
386
|
-
path = resolve(path);
|
387
|
-
if (cache[path]) {
|
388
|
-
return convert(cache[path].content, encoding);
|
389
|
-
}
|
390
|
-
return null;
|
391
|
-
};
|
392
|
-
|
393
|
-
readCache.exports.clear = function () {
|
394
|
-
cache = Object.create(null);
|
395
|
-
};
|
396
|
-
return readCache.exports;
|
397
|
-
}
|
398
|
-
|
399
233
|
var dataUrl;
|
400
234
|
var hasRequiredDataUrl;
|
401
235
|
|
@@ -433,26 +267,6 @@ function requireDataUrl () {
|
|
433
267
|
return dataUrl;
|
434
268
|
}
|
435
269
|
|
436
|
-
var loadContent;
|
437
|
-
var hasRequiredLoadContent;
|
438
|
-
|
439
|
-
function requireLoadContent () {
|
440
|
-
if (hasRequiredLoadContent) return loadContent;
|
441
|
-
hasRequiredLoadContent = 1;
|
442
|
-
|
443
|
-
const readCache = requireReadCache();
|
444
|
-
const dataURL = requireDataUrl();
|
445
|
-
|
446
|
-
loadContent = function loadContent(filename) {
|
447
|
-
if (dataURL.isValid(filename)) {
|
448
|
-
return dataURL.contents(filename)
|
449
|
-
}
|
450
|
-
|
451
|
-
return readCache(filename, "utf-8")
|
452
|
-
};
|
453
|
-
return loadContent;
|
454
|
-
}
|
455
|
-
|
456
270
|
var parseStatements;
|
457
271
|
var hasRequiredParseStatements;
|
458
272
|
|
@@ -704,7 +518,7 @@ function requireProcessContent () {
|
|
704
518
|
hasRequiredProcessContent = 1;
|
705
519
|
|
706
520
|
// builtin tooling
|
707
|
-
const path =
|
521
|
+
const path = sysPath__default;
|
708
522
|
|
709
523
|
// placeholder tooling
|
710
524
|
let sugarss;
|
@@ -771,7 +585,7 @@ function requireParseStyles () {
|
|
771
585
|
if (hasRequiredParseStyles) return parseStyles_1;
|
772
586
|
hasRequiredParseStyles = 1;
|
773
587
|
|
774
|
-
const path =
|
588
|
+
const path = sysPath__default;
|
775
589
|
|
776
590
|
const dataURL = requireDataUrl();
|
777
591
|
const parseStatements = requireParseStatements();
|
@@ -1017,13 +831,13 @@ function requirePostcssImport () {
|
|
1017
831
|
if (hasRequiredPostcssImport) return postcssImport;
|
1018
832
|
hasRequiredPostcssImport = 1;
|
1019
833
|
// builtin tooling
|
1020
|
-
const path =
|
834
|
+
const path = sysPath__default;
|
1021
835
|
|
1022
836
|
// internal tooling
|
1023
837
|
const applyConditions = requireApplyConditions();
|
1024
838
|
const applyRaws = requireApplyRaws();
|
1025
839
|
const applyStyles = requireApplyStyles();
|
1026
|
-
const loadContent =
|
840
|
+
const loadContent = () => "";
|
1027
841
|
const parseStyles = requireParseStyles();
|
1028
842
|
const resolveId = (id) => id;
|
1029
843
|
|