vite-plus 0.2.3 → 0.2.5
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/README.md +4 -4
- package/binding/index.cjs +53 -52
- package/binding/index.d.cts +17 -26
- package/dist/{agent-D3nZAMGI.js → agent-CTwqJqX_.js} +23 -101
- package/dist/bin.js +8 -5
- package/dist/config/bin.js +2 -2
- package/dist/{constants-CZ7Mnq-C.js → constants-JhDwfMS8.js} +2 -2
- package/dist/create/bin.js +73 -22
- package/dist/{define-config-D2jo1xVA.js → define-config-BRT5X5UW.js} +2 -2
- package/dist/{define-config-Dut6XD42.cjs → define-config-DD3MUyPC.cjs} +2 -2
- package/dist/{define-config-BuMs_LKa.d.ts → define-config-eLQH9us2.d.ts} +2 -3
- package/dist/define-config.cjs +1 -1
- package/dist/define-config.d.ts +1 -1
- package/dist/define-config.js +1 -1
- package/dist/{editor-D1BZiU1h.js → editor-H_E_5XOt.js} +95 -4
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/migration/bin.js +5 -5
- package/dist/{oxlint-plugin-config-BSbv66Qn.js → oxlint-plugin-config-CnUfwCp9.js} +1 -1
- package/dist/oxlint-plugin.js +1 -1
- package/dist/{pack-Ciiho0Tq.d.ts → pack-PvUg_xpv.d.ts} +0 -1
- package/dist/pack-bin.js +1 -1
- package/dist/pack.d.ts +1 -1
- package/dist/{package-Cpo2ei_V.js → package-BILvlUYF.js} +1 -1
- package/dist/{resolve-vite-config-DX2o0SWM.js → resolve-vite-config-BheiDkKa.js} +1 -1
- package/dist/staged/bin.js +47 -17
- package/dist/{tsconfig-D6sTl0dN.js → tsconfig-D2NvUjn3.js} +86 -78
- package/dist/version.js +2 -2
- package/dist/versions.js +6 -6
- package/docs/config/run.md +3 -6
- package/docs/guide/docker.md +46 -2
- package/docs/guide/env.md +12 -0
- package/docs/guide/index.md +2 -0
- package/docs/guide/installer-env-vars.md +195 -0
- package/package.json +31 -34
- package/templates/monorepo/_gitignore +5 -0
- package/templates/monorepo/_yarnrc.yml +1 -1
- package/templates/monorepo/pnpm-workspace.yaml +1 -1
package/dist/migration/bin.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { r as __toESM } from "../rolldown-runtime-C7HZzL1F.js";
|
|
2
|
-
import { d as isForceOverrideMode, l as VITE_PLUS_VERSION } from "../constants-
|
|
3
|
-
import { B as runCommandSilently, D as require_semver, E as PackageManager, F as spinner, N as outro, P as select, R as isCancel, _ as upgradeYarn, d as downloadPackageManager, f as promptGitHooks, g as selectPackageManager, h as runViteInstall, i as hasBaseUrlInTsconfig, j as log, k as confirm, l as cancelAndExit, m as runViteFmt, r as fixBaseUrlInTsconfig, t as confirmBaseUrlFix, u as defaultInteractive } from "../tsconfig-
|
|
2
|
+
import { d as isForceOverrideMode, l as VITE_PLUS_VERSION } from "../constants-JhDwfMS8.js";
|
|
3
|
+
import { B as runCommandSilently, D as require_semver, E as PackageManager, F as spinner, N as outro, P as select, R as isCancel, _ as upgradeYarn, d as downloadPackageManager, f as promptGitHooks, g as selectPackageManager, h as runViteInstall, i as hasBaseUrlInTsconfig, j as log, k as confirm, l as cancelAndExit, m as runViteFmt, r as fixBaseUrlInTsconfig, t as confirmBaseUrlFix, u as defaultInteractive } from "../tsconfig-D2NvUjn3.js";
|
|
4
4
|
import { a as printHeader, i as muted, r as log$1, s as warnMsg, t as accent } from "../terminal-uTv0ZaMr.js";
|
|
5
5
|
import { a as writeJsonFile, i as readJsonFile } from "../json-DiRs8ceZ.js";
|
|
6
6
|
import { t as lib_default } from "../lib-L3DWSRQp.js";
|
|
7
|
-
import { a as readNearestPackageJson, i as hasVitePlusDependency } from "../package-
|
|
8
|
-
import {
|
|
7
|
+
import { a as readNearestPackageJson, i as hasVitePlusDependency } from "../package-BILvlUYF.js";
|
|
8
|
+
import { B as warnPackageLevelEslint, C as injectLintTypeCheckDefaults, D as ensureVitePlusBootstrap, E as detectVitePlusBootstrapPending, F as migrateEslintToOxlint, G as checkVitestVersion, M as confirmEslintMigration, N as detectEslintProject, O as configureYarnNodeModulesMode, P as detectIncompatibleEslintIntegration, R as warnIncompatibleEslintIntegration, T as collectToolchainVersionChanges, W as checkViteVersion, _ as detectLegacyGitHooksMigrationCandidate, b as preflightGitHooksSetup, d as rewriteStandaloneProject, f as detectPendingCoreMigration, h as migrateNodeVersionManagerFile, i as selectAgentTargetPaths, k as detectYarnPnpMode, l as rewriteMonorepo, m as detectNodeVersionManagerFile, n as detectAgentConflicts, p as finalizeCoreMigrationForExistingVitePlus, q as displayRelative, r as detectExistingAgentTargetPaths, s as writeAgentInstructions, w as mergeViteConfigFiles, y as installGitHooks, z as warnLegacyEslintConfig } from "../agent-CTwqJqX_.js";
|
|
9
9
|
import { n as addMigrationWarning, r as createMigrationReport } from "../report-BS7ULx7A.js";
|
|
10
|
-
import { a as writeEditorConfigs,
|
|
10
|
+
import { _ as warnPackageLevelPrettier, a as writeEditorConfigs, d as detectFramework, f as hasFrameworkShim, h as migratePrettierToOxfmt, m as detectPrettierProject, o as detectWorkspace, p as confirmPrettierMigration, r as selectEditor, t as detectEditorConflicts, u as addFrameworkShim } from "../editor-H_E_5XOt.js";
|
|
11
11
|
import { t as renderCliDoc } from "../help-YP84FSEz.js";
|
|
12
12
|
import { t as ROLLDOWN_COMPAT_RESULT_PREFIX } from "../protocol-D99W10Qi.js";
|
|
13
13
|
import path from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as VITE_PLUS_NAME } from "./constants-
|
|
1
|
+
import { s as VITE_PLUS_NAME } from "./constants-JhDwfMS8.js";
|
|
2
2
|
//#region src/oxlint-plugin-config.ts
|
|
3
3
|
const VITE_PLUS_OXLINT_PLUGIN_NAME = VITE_PLUS_NAME;
|
|
4
4
|
const VITE_PLUS_OXLINT_PLUGIN_SPECIFIER = `${VITE_PLUS_NAME}/oxlint-plugin`;
|
package/dist/oxlint-plugin.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as VITE_PLUS_OXLINT_PLUGIN_NAME, t as PREFER_VITE_PLUS_IMPORTS_RULE_NAME } from "./oxlint-plugin-config-
|
|
1
|
+
import { n as VITE_PLUS_OXLINT_PLUGIN_NAME, t as PREFER_VITE_PLUS_IMPORTS_RULE_NAME } from "./oxlint-plugin-config-CnUfwCp9.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import { definePlugin, defineRule } from "@oxlint/plugins";
|
package/dist/pack-bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as resolveViteConfig } from "./resolve-vite-config-
|
|
2
|
+
import { a as resolveViteConfig } from "./resolve-vite-config-BheiDkKa.js";
|
|
3
3
|
import module from "node:module";
|
|
4
4
|
import { buildWithConfigs, enableDebug, globalLogger, resolveUserConfig } from "@voidzero-dev/vite-plus-core/pack";
|
|
5
5
|
//#region ../../node_modules/.pnpm/cac@7.0.0/node_modules/cac/dist/index.js
|
package/dist/pack.d.ts
CHANGED
package/dist/staged/bin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as __toESM, t as __commonJSMin } from "../rolldown-runtime-C7HZzL1F.js";
|
|
2
2
|
import { a as printHeader, n as errorMsg, r as log } from "../terminal-uTv0ZaMr.js";
|
|
3
|
-
import { a as resolveViteConfig } from "../resolve-vite-config-
|
|
3
|
+
import { a as resolveViteConfig } from "../resolve-vite-config-BheiDkKa.js";
|
|
4
4
|
import { t as lib_default } from "../lib-L3DWSRQp.js";
|
|
5
5
|
import { t as renderCliDoc } from "../help-YP84FSEz.js";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
@@ -10,11 +10,11 @@ import { formatWithOptions, inspect, promisify } from "node:util";
|
|
|
10
10
|
import { cwd } from "node:process";
|
|
11
11
|
import l__default from "node:readline";
|
|
12
12
|
import nodeTty from "node:tty";
|
|
13
|
+
import crypto from "node:crypto";
|
|
13
14
|
import { pathToFileURL } from "node:url";
|
|
14
15
|
import { EOL } from "node:os";
|
|
15
16
|
import fsPromises, { constants as constants$1 } from "node:fs/promises";
|
|
16
17
|
import { PassThrough, Writable } from "node:stream";
|
|
17
|
-
import crypto from "node:crypto";
|
|
18
18
|
import { exec, spawn } from "node:child_process";
|
|
19
19
|
import { pipeline } from "node:stream/promises";
|
|
20
20
|
import * as tty from "tty";
|
|
@@ -474,7 +474,8 @@ const execGit = async (cmd, options) => {
|
|
|
474
474
|
return output;
|
|
475
475
|
};
|
|
476
476
|
var eventemitter3_default = (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
477
|
-
var has = Object.prototype.hasOwnProperty
|
|
477
|
+
var has = Object.prototype.hasOwnProperty;
|
|
478
|
+
var prefix = "~";
|
|
478
479
|
/**
|
|
479
480
|
* Constructor to create a storage for our `EE` objects.
|
|
480
481
|
* An `Events` instance is a plain object whose properties are event names.
|
|
@@ -2956,7 +2957,7 @@ const chunkFiles = ({ files, baseDir, maxArgLength = null, relative = false }) =
|
|
|
2956
2957
|
return chunkArray(normalizedFiles, chunkCount);
|
|
2957
2958
|
};
|
|
2958
2959
|
//#endregion
|
|
2959
|
-
//#region ../../node_modules/.pnpm/picomatch@4.0.
|
|
2960
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/constants.js
|
|
2960
2961
|
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2961
2962
|
const WIN_SLASH = "\\\\/";
|
|
2962
2963
|
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
@@ -3125,7 +3126,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3125
3126
|
};
|
|
3126
3127
|
}));
|
|
3127
3128
|
//#endregion
|
|
3128
|
-
//#region ../../node_modules/.pnpm/picomatch@4.0.
|
|
3129
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/utils.js
|
|
3129
3130
|
var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3130
3131
|
const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants();
|
|
3131
3132
|
exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
|
|
@@ -3173,7 +3174,7 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3173
3174
|
};
|
|
3174
3175
|
}));
|
|
3175
3176
|
//#endregion
|
|
3176
|
-
//#region ../../node_modules/.pnpm/picomatch@4.0.
|
|
3177
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/scan.js
|
|
3177
3178
|
var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3178
3179
|
const utils = require_utils();
|
|
3179
3180
|
const { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = require_constants();
|
|
@@ -3460,7 +3461,7 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3460
3461
|
module.exports = scan;
|
|
3461
3462
|
}));
|
|
3462
3463
|
//#endregion
|
|
3463
|
-
//#region ../../node_modules/.pnpm/picomatch@4.0.
|
|
3464
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/parse.js
|
|
3464
3465
|
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3465
3466
|
const constants = require_constants();
|
|
3466
3467
|
const utils = require_utils();
|
|
@@ -3615,7 +3616,10 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3615
3616
|
}
|
|
3616
3617
|
}
|
|
3617
3618
|
};
|
|
3618
|
-
const
|
|
3619
|
+
const buildCharClassStar = (chars) => {
|
|
3620
|
+
return `${chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`}*`;
|
|
3621
|
+
};
|
|
3622
|
+
const getStarExtglobSequenceChars = (pattern) => {
|
|
3619
3623
|
let index = 0;
|
|
3620
3624
|
const chars = [];
|
|
3621
3625
|
while (index < pattern.length) {
|
|
@@ -3629,7 +3633,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3629
3633
|
index += match.end + 1;
|
|
3630
3634
|
}
|
|
3631
3635
|
if (chars.length < 1) return;
|
|
3632
|
-
return
|
|
3636
|
+
return chars;
|
|
3633
3637
|
};
|
|
3634
3638
|
const repeatedExtglobRecursion = (pattern) => {
|
|
3635
3639
|
let depth = 0;
|
|
@@ -3649,14 +3653,28 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3649
3653
|
if (branches.length > 1) {
|
|
3650
3654
|
if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) return { risky: true };
|
|
3651
3655
|
}
|
|
3656
|
+
const safeChars = [];
|
|
3657
|
+
let sawStarSequence = false;
|
|
3658
|
+
let combinable = true;
|
|
3652
3659
|
for (const branch of branches) {
|
|
3653
|
-
const
|
|
3654
|
-
if (
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3660
|
+
const chars = getStarExtglobSequenceChars(branch);
|
|
3661
|
+
if (chars) {
|
|
3662
|
+
sawStarSequence = true;
|
|
3663
|
+
safeChars.push(...chars);
|
|
3664
|
+
continue;
|
|
3665
|
+
}
|
|
3666
|
+
const literal = normalizeSimpleBranch(branch);
|
|
3667
|
+
if (literal && literal.length === 1) {
|
|
3668
|
+
safeChars.push(literal);
|
|
3669
|
+
continue;
|
|
3670
|
+
}
|
|
3671
|
+
combinable = false;
|
|
3658
3672
|
if (repeatedExtglobRecursion(branch) > max) return { risky: true };
|
|
3659
3673
|
}
|
|
3674
|
+
if (sawStarSequence) return combinable ? {
|
|
3675
|
+
risky: true,
|
|
3676
|
+
safeOutput: buildCharClassStar([...new Set(safeChars)])
|
|
3677
|
+
} : { risky: true };
|
|
3660
3678
|
return { risky: false };
|
|
3661
3679
|
};
|
|
3662
3680
|
/**
|
|
@@ -4517,7 +4535,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4517
4535
|
module.exports = parse;
|
|
4518
4536
|
}));
|
|
4519
4537
|
//#endregion
|
|
4520
|
-
//#region ../../node_modules/.pnpm/picomatch@4.0.
|
|
4538
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/picomatch.js
|
|
4521
4539
|
var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4522
4540
|
const scan = require_scan();
|
|
4523
4541
|
const parse = require_parse();
|
|
@@ -4538,6 +4556,18 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4538
4556
|
* const isMatch = picomatch('*.!(*a)');
|
|
4539
4557
|
* console.log(isMatch('a.a')); //=> false
|
|
4540
4558
|
* console.log(isMatch('a.b')); //=> true
|
|
4559
|
+
*
|
|
4560
|
+
* // For environments without `node.js`, `picomatch/posix` provides you a dependency-free matcher, without automatic OS detection.
|
|
4561
|
+
* const picomatch = require('picomatch/posix');
|
|
4562
|
+
* // the same API, defaulting to posix paths
|
|
4563
|
+
* const isMatch = picomatch('a/*');
|
|
4564
|
+
* console.log(isMatch('a\\b')); //=> false
|
|
4565
|
+
* console.log(isMatch('a/b')); //=> true
|
|
4566
|
+
*
|
|
4567
|
+
* // you can still configure the matcher function to accept windows paths
|
|
4568
|
+
* const isMatch = picomatch('a/*', { options: windows });
|
|
4569
|
+
* console.log(isMatch('a\\b')); //=> true
|
|
4570
|
+
* console.log(isMatch('a/b')); //=> true
|
|
4541
4571
|
* ```
|
|
4542
4572
|
* @name picomatch
|
|
4543
4573
|
* @param {String|Array} `globs` One or more glob patterns.
|
|
@@ -4656,8 +4686,8 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4656
4686
|
* @return {Boolean}
|
|
4657
4687
|
* @api public
|
|
4658
4688
|
*/
|
|
4659
|
-
picomatch.matchBase = (input, glob, options) => {
|
|
4660
|
-
return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(utils.basename(input));
|
|
4689
|
+
picomatch.matchBase = (input, glob, options, posix = options && options.windows) => {
|
|
4690
|
+
return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(utils.basename(input, { windows: posix }));
|
|
4661
4691
|
};
|
|
4662
4692
|
/**
|
|
4663
4693
|
* Returns true if **any** of the given glob `patterns` match the specified `string`.
|