vite-plus 1.3.0 → 1.4.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.
Files changed (90) hide show
  1. package/AGENTS.md +4 -0
  2. package/LICENSE +1 -878
  3. package/README.md +1 -1
  4. package/bin/vpx +9 -0
  5. package/binding/index.cjs +59 -54
  6. package/binding/index.d.cts +128 -2
  7. package/dist/{agent-97KmGCyL.js → agent-D8oxxhVR.js} +5 -7
  8. package/dist/bin.js +25 -32
  9. package/dist/{cli-parse-DHE8NrBU.js → cli-parse-aeUeFDlC.js} +2 -3
  10. package/dist/command-TjS_6y9O.js +1 -0
  11. package/dist/{command-CdMBoZFD.js → command-rY79K5NI.js} +28 -30
  12. package/dist/{comparison-CmVirWIW-DUGaiYqF.js → comparison-CmVirWIW-UlEf2maz.js} +1 -2
  13. package/dist/config/bin.js +8 -10
  14. package/dist/{constants-DR55DpRm.js → constants-DRUnJ_Dz.js} +3 -5
  15. package/dist/create/bin.d.ts +4 -8
  16. package/dist/create/bin.js +46 -65
  17. package/dist/{define-config-CvE5pHqB.js → define-config-ChwJcu5e.js} +6 -9
  18. package/dist/{define-config-BxDc_9BK.cjs → define-config-Cv2P6NT2.cjs} +7 -12
  19. package/dist/{define-config-Bexdd6RZ.d.ts → define-config-rPhYIFSn.d.ts} +1 -11
  20. package/dist/define-config.cjs +1 -1
  21. package/dist/define-config.d.ts +1 -1
  22. package/dist/define-config.js +1 -1
  23. package/dist/{dist-DIpm7mot.js → dist-Bs0SObNC.js} +73 -145
  24. package/dist/{dist-Cqz8OtiO.js → dist-CdkMvIiQ.js} +11 -5
  25. package/dist/dist-zDZV5eEc.js +3 -0
  26. package/dist/{documentation-DqcZSthV.js → documentation-cv_y0Auv.js} +1 -2
  27. package/dist/{editor-CtJGQP7C.js → editor-ClL78D8u.js} +1490 -4209
  28. package/dist/{help-BmKpeOP9.js → help-B03t_iQ4.js} +1 -2
  29. package/dist/hooks/bin.js +4 -5
  30. package/dist/{hooks-DhwsWb46.js → hooks-xRcJPc-O.js} +5 -4
  31. package/dist/index.cjs +2 -3
  32. package/dist/index.d.ts +1 -1
  33. package/dist/index.js +1 -1
  34. package/dist/{json-JP24qHUF.js → json-kl84kDyH.js} +9 -18
  35. package/dist/lint-plugins.cjs +1 -1
  36. package/dist/migration/bin.js +719 -184
  37. package/dist/migration/compat/worker.js +4 -6
  38. package/dist/{oxlint-plugin-config-BIzrO2y2.js → oxlint-plugin-config-BVpqYdcC.js} +3 -4
  39. package/dist/oxlint-plugin.d.ts +0 -2
  40. package/dist/oxlint-plugin.js +6 -7
  41. package/dist/{pack-BK38MLVZ.d.ts → pack-ARPFMefW.d.ts} +0 -2
  42. package/dist/pack-bin.d.ts +1 -3
  43. package/dist/pack-bin.js +3 -4
  44. package/dist/pack.d.ts +1 -1
  45. package/dist/{package-CQDXTm6j.js → package-DzsomcUD.js} +10 -95
  46. package/dist/{package-overrides-D1RcXSFl.js → package-overrides-Ci8GXouY.js} +5 -8
  47. package/dist/picomatch-DEUoj81q.js +1916 -0
  48. package/dist/{prompts-1xNz_ne0.js → prompts-GL1vj0wk.js} +30 -50
  49. package/dist/{protocol-D99W10Qi.js → protocol-CkNmY-Mr.js} +1 -2
  50. package/dist/{report-NhQk8VHb.js → report-DLHO30yZ.js} +2 -2
  51. package/dist/{resolve-vite-config-BVr1SUNg.js → resolve-vite-config-Dn5896A4.js} +9 -25
  52. package/dist/resolve-vite-config-QO6cC0SP.js +1 -0
  53. package/dist/{rolldown-runtime-kJ_i4yPo.js → rolldown-runtime-DegdyBIC.js} +1 -2
  54. package/dist/script-esm-hooks.d.ts +8 -0
  55. package/dist/script-esm-hooks.js +24 -0
  56. package/dist/script-hooks-9Fof5UMY.js +176 -0
  57. package/dist/script-preload.cjs +468 -0
  58. package/dist/script-register.d.ts +1 -0
  59. package/dist/script-register.js +22 -0
  60. package/dist/script-watch.d.ts +1 -0
  61. package/dist/script-watch.js +1908 -0
  62. package/dist/staged/bin.js +53 -2011
  63. package/dist/sync-versions/bin.js +26 -48
  64. package/dist/sync-versions/bin.mjs +109 -217
  65. package/dist/{terminal-MKGAuy-p.js → terminal-BcuPUy-j.js} +1 -2
  66. package/dist/toolchain.js +35 -9
  67. package/dist/toolchain.json +35 -9
  68. package/dist/{tsconfig-zWgHiQ3X.js → tsconfig-Do6MAG_f.js} +1 -1
  69. package/dist/{tsconfig-BZu7kl-x.js → tsconfig-LE_mAwe_.js} +8 -10
  70. package/dist/version.d.ts +1 -3
  71. package/dist/version.js +5 -6
  72. package/dist/versions.js +4 -4
  73. package/dist/{vitest-ecosystem-BU0AqZq-.js → vitest-ecosystem-BeEYz-qF.js} +1 -2
  74. package/dist/{vitest-v5-entry-points-DthU1e_O.js → vitest-v5-entry-points-NyJsFeux.js} +1 -2
  75. package/dist/vpx-bin.d.ts +1 -0
  76. package/dist/vpx-bin.js +232 -0
  77. package/dist/vpx-script-EXgV5QOf.js +434 -0
  78. package/docs/config/run.md +4 -0
  79. package/docs/guide/check.md +1 -0
  80. package/docs/guide/ci.md +13 -3
  81. package/docs/guide/env.md +11 -4
  82. package/docs/guide/global-cli.md +52 -0
  83. package/docs/guide/migrate-rules.md +48 -5
  84. package/docs/guide/migrate.md +5 -5
  85. package/docs/guide/package-management.md +1 -1
  86. package/docs/guide/vpx.md +170 -9
  87. package/package.json +20 -17
  88. package/dist/command-DVTILtS-.js +0 -1
  89. package/dist/dist-Dhu07wmN.js +0 -3
  90. package/dist/resolve-vite-config-7WDtXO4G.js +0 -1
@@ -1,27 +1,27 @@
1
- import { r as __toESM, t as __commonJSMin } from "../rolldown-runtime-kJ_i4yPo.js";
2
- import { t as documentationUrl$1 } from "../documentation-DqcZSthV.js";
3
- import { t as renderCliDoc } from "../help-BmKpeOP9.js";
4
- import { a as muted, i as log, o as printHeader, r as formatDuration, s as success, t as accent } from "../terminal-MKGAuy-p.js";
5
- import { d as VITE_PLUS_OVERRIDE_PACKAGES, f as VITE_PLUS_VERSION, u as VITE_PLUS_NAME } from "../constants-DR55DpRm.js";
6
- import { i as readJsonFile, n as editJsonFile } from "../json-JP24qHUF.js";
7
- import { c as getNpmRegistry, r as getScopeFromPackageName, s as fetchNpmResource, t as checkNpmPackageExists } from "../package-CQDXTm6j.js";
8
- import { i as hasViteConfig, o as resolveViteConfig, r as findWorkspaceRoot, t as findViteConfig } from "../resolve-vite-config-BVr1SUNg.js";
9
- import { A as text, E as multiselect, M as isCancel, O as select, S as normalize$1, T as log$1, a as resolveGitInit, c as selectPackageManager, d as readYamlFile, h as resolveApproveBuildTargets, i as promptGitHooks, j as require_picocolors, k as spinner, m as detectGatedBuilds, n as defaultInteractive, o as runViteFmt, p as approveBuilds, r as downloadPackageManager$1, s as runViteInstall, t as cancelAndExit, u as editYamlFile, v as DependencyType, w as intro, y as PackageManager } from "../prompts-1xNz_ne0.js";
10
- import { a as selectAgentTargets, c as writeCopilotSetupWorkflow, d as templatesDir, l as displayRelative, r as detectExistingAgentTargetPaths, s as writeAgentInstructions, t as COPILOT_AGENT_ID } from "../agent-97KmGCyL.js";
11
- import { A as createCatalogDependencyResolver, B as addFrameworkShim, F as updateWorkspaceConfig, H as hasFrameworkShim, K as promptTsupMigration, L as findGitRoot, M as detectWorkspace$1, N as isBingoTemplate, P as updatePackageJsonWithDeps, R as initGitRepository, V as detectFramework, W as detectTsupProject, Y as detectPrettierProject, Z as promptPrettierMigration, _ as installGitHooks, a as selectEditors, b as injectCreateDefaultTemplate, c as rewriteMonorepoProject, et as detectEslintProject, h as setPackageManager, j as supportsCatalog, l as rewriteStandaloneProject, n as detectExistingEditors, o as writeEditorConfigs, rt as promptEslintMigration, s as rewriteMonorepo, y as shouldSkipStagedMigrationForHooks } from "../editor-CtJGQP7C.js";
12
- import { n as runCommandSilently, t as runCommand$1 } from "../command-CdMBoZFD.js";
13
- import { t as require_dist } from "../dist-DIpm7mot.js";
14
- import { t as unwrapCliParseOutcome } from "../cli-parse-DHE8NrBU.js";
1
+ import { r as __toESM, t as __commonJSMin } from "../rolldown-runtime-DegdyBIC.js";
2
+ import { t as documentationUrl$1 } from "../documentation-cv_y0Auv.js";
3
+ import { t as renderCliDoc } from "../help-B03t_iQ4.js";
4
+ import { a as muted, i as log, o as printHeader, r as formatDuration, s as success, t as accent } from "../terminal-BcuPUy-j.js";
5
+ import { d as VITE_PLUS_OVERRIDE_PACKAGES, f as VITE_PLUS_VERSION, u as VITE_PLUS_NAME } from "../constants-DRUnJ_Dz.js";
6
+ import { i as readJsonFile, n as editJsonFile } from "../json-kl84kDyH.js";
7
+ import { c as getNpmRegistry, r as getScopeFromPackageName, s as fetchNpmResource, t as checkNpmPackageExists } from "../package-DzsomcUD.js";
8
+ import { a as resolveViteConfig, r as hasViteConfig, t as findViteConfig } from "../resolve-vite-config-Dn5896A4.js";
9
+ import { A as text, E as multiselect, M as isCancel, O as select, S as normalize$1, T as log$1, a as resolveGitInit, c as selectPackageManager, d as readYamlFile, h as resolveApproveBuildTargets, i as promptGitHooks, j as require_picocolors, k as spinner, m as detectGatedBuilds, n as defaultInteractive, o as runViteFmt, p as approveBuilds, r as downloadPackageManager$1, s as runViteInstall, t as cancelAndExit, u as editYamlFile, v as DependencyType, w as intro, y as PackageManager } from "../prompts-GL1vj0wk.js";
10
+ import { a as selectAgentTargets, c as writeCopilotSetupWorkflow, d as templatesDir, l as displayRelative, r as detectExistingAgentTargetPaths, s as writeAgentInstructions, t as COPILOT_AGENT_ID } from "../agent-D8oxxhVR.js";
11
+ import { $ as promptTsupMigration, B as isBingoTemplate, G as initGitRepository, H as updateWorkspaceConfig, I as createCatalogDependencyResolver, J as detectFramework, L as supportsCatalog, R as detectWorkspace$1, V as updatePackageJsonWithDeps, W as findGitRoot, Y as hasFrameworkShim, Z as detectTsupProject, a as selectEditors, c as rewriteMonorepoProject, h as setPackageManager, it as promptPrettierMigration, l as rewriteStandaloneProject, n as detectExistingEditors, nt as detectPrettierProject, o as writeEditorConfigs, q as addFrameworkShim, s as rewriteMonorepo, st as detectEslintProject, ut as promptEslintMigration, v as installGitHooks, w as injectCreateDefaultTemplate, x as shouldSkipStagedMigrationForHooks, z as discoverWorkspacePackages } from "../editor-ClL78D8u.js";
12
+ import { i as runCommandSilently, r as runCommand$1 } from "../command-rY79K5NI.js";
13
+ import { t as require_dist } from "../dist-Bs0SObNC.js";
14
+ import { t as unwrapCliParseOutcome } from "../cli-parse-aeUeFDlC.js";
15
15
  import path from "node:path";
16
- import { getVpDirs, parseCreateArgs, removeConfigKey, runCommand, upsertJsonConfig, vitePlusHeader } from "../../binding/index.js";
16
+ import { findMonorepoRoot, getVpDirs, parseCreateArgs, removeConfigKey, runCommand, upsertJsonConfig, vitePlusHeader } from "../../binding/index.js";
17
17
  import { promisify, styleText } from "node:util";
18
18
  import fs from "node:fs";
19
- import os from "node:os";
20
19
  import { createHash, randomUUID } from "node:crypto";
20
+ import os from "node:os";
21
21
  import fsPromises from "node:fs/promises";
22
22
  import { gunzip } from "node:zlib";
23
23
  import assert from "node:assert";
24
- //#region src/create/command.ts
24
+ // src/create/command.ts
25
25
  async function runCommandAndDetectProjectDir(options, parentDir) {
26
26
  const cwd = parentDir ? path.join(options.cwd, parentDir) : options.cwd;
27
27
  const existingDirs = /* @__PURE__ */ new Set();
@@ -97,8 +97,7 @@ function prependToPathToEnvs(extraPath, envs) {
97
97
  if (!current.split(delimiter).filter(Boolean).includes(extraPath)) envs[pathKey] = extraPath + (current ? delimiter + current : "");
98
98
  return envs;
99
99
  }
100
- //#endregion
101
- //#region ../../node_modules/.pnpm/nanotar@0.3.0/node_modules/nanotar/dist/index.mjs
100
+ // ../../node_modules/.pnpm/nanotar@0.3.0/node_modules/nanotar/dist/index.mjs
102
101
  const tarItemTypeMap = {
103
102
  "0": "file",
104
103
  "1": "hardLink",
@@ -239,8 +238,7 @@ function _parseExtendedHeaders(data) {
239
238
  }
240
239
  return headers;
241
240
  }
242
- //#endregion
243
- //#region src/create/org-tarball-reader.ts
241
+ // src/create/org-tarball-reader.ts
244
242
  const decompress = promisify(gunzip);
245
243
  const TAR_BLOCK_BYTES = 512;
246
244
  const ORG_TARBALL_LIMITS = {
@@ -311,8 +309,7 @@ async function parseOrgTarball(bytes, limits = ORG_TARBALL_LIMITS) {
311
309
  return true;
312
310
  } });
313
311
  }
314
- //#endregion
315
- //#region src/create/org-tarball.ts
312
+ // src/create/org-tarball.ts
316
313
  function getCacheRoot() {
317
314
  return path.join(getVpDirs().cache, "create-org");
318
315
  }
@@ -545,8 +542,7 @@ function resolveBundledPath(extractedRoot, relativePath) {
545
542
  if (resolvedTarget !== resolvedRoot && !resolvedTarget.startsWith(`${resolvedRoot}${path.sep}`)) throw new Error(`bundled template path escapes the package root: ${relativePath}`);
546
543
  return resolvedTarget;
547
544
  }
548
- //#endregion
549
- //#region src/create/org-manifest.ts
545
+ // src/create/org-manifest.ts
550
546
  /**
551
547
  * Parse the org picker specifier: `@scope` (scope only → picker) or
552
548
  * `@scope:name` (direct manifest-entry selection). Colon mirrors the
@@ -767,8 +763,7 @@ function filterManifestForContext(templates, isMonorepo) {
767
763
  if (!isMonorepo) return [...templates];
768
764
  return templates.filter((entry) => !entry.monorepo);
769
765
  }
770
- //#endregion
771
- //#region src/create/templates/types.ts
766
+ // src/create/templates/types.ts
772
767
  const LibraryTemplateRepo = "github:sxzz/tsdown-templates/vite-plus";
773
768
  const BuiltinTemplate = {
774
769
  generator: "vite:generator",
@@ -782,8 +777,7 @@ const TemplateType = {
782
777
  remote: "remote",
783
778
  bundled: "bundled"
784
779
  };
785
- //#endregion
786
- //#region src/create/discovery.ts
780
+ // src/create/discovery.ts
787
781
  function isGitHubUrl(templateName) {
788
782
  return templateName.startsWith("https://github.com/") || templateName.startsWith("github:") || templateName.includes("github.com/");
789
783
  }
@@ -935,8 +929,7 @@ function inferParentDir(templateName, workspaceInfo, localTemplate = false) {
935
929
  else if (templateName === BuiltinTemplate.generator) rule = /generator|tool/i;
936
930
  for (const parentDir of workspaceInfo.parentDirs) if (rule.test(parentDir)) return parentDir;
937
931
  }
938
- //#endregion
939
- //#region src/create/initial-template-options.ts
932
+ // src/create/initial-template-options.ts
940
933
  function getInitialTemplateOptions(isMonorepo, templates = []) {
941
934
  return [
942
935
  ...!isMonorepo ? [{
@@ -961,8 +954,7 @@ function getInitialTemplateOptions(isMonorepo, templates = []) {
961
954
  })) : []
962
955
  ];
963
956
  }
964
- //#endregion
965
- //#region src/create/org-picker.ts
957
+ // src/create/org-picker.ts
966
958
  const ORG_PICKER_CANCEL = Symbol("org-picker-cancel");
967
959
  const ORG_PICKER_BUILTIN_ESCAPE = Symbol("org-picker-builtin-escape");
968
960
  const ESCAPE_HATCH = Symbol("builtin-escape");
@@ -1027,8 +1019,7 @@ function formatManifestTable(manifest, isMonorepo) {
1027
1019
  filteredCount
1028
1020
  };
1029
1021
  }
1030
- //#endregion
1031
- //#region src/create/org-resolve.ts
1022
+ // src/create/org-resolve.ts
1032
1023
  function printNonInteractiveTable(manifest, orgSpec, isMonorepo) {
1033
1024
  const { lines, filteredCount } = formatManifestTable(manifest, isMonorepo);
1034
1025
  const [firstVisible] = filterManifestForContext(manifest.templates, isMonorepo);
@@ -1115,9 +1106,9 @@ async function resolveOrgManifestForCreate(args) {
1115
1106
  * Read the `create` config (`defaultTemplate` + validated `templates`) from
1116
1107
  * a workspace's `vite.config.ts` in a single config evaluation.
1117
1108
  *
1118
- * By default, walks up from `startDir` via `findWorkspaceRoot` (monorepo
1119
- * markers only — `pnpm-workspace.yaml`, `workspaces` in `package.json`,
1120
- * `lerna.json`) so monorepo invocations from any subdirectory still pick up
1109
+ * By default, walks up from `startDir` via `findMonorepoRoot` (monorepo
1110
+ * markers only — `pnpm-workspace.yaml` or `workspaces` in `package.json`)
1111
+ * so monorepo invocations from any subdirectory still pick up
1121
1112
  * the root config. Pass `walkUp: false` to read `startDir` directly when the
1122
1113
  * caller already holds the exact workspace root.
1123
1114
  *
@@ -1131,7 +1122,7 @@ async function resolveOrgManifestForCreate(args) {
1131
1122
  * instead of swallowed.
1132
1123
  */
1133
1124
  async function getConfiguredCreate(startDir, options) {
1134
- const projectRoot = options?.walkUp === false ? startDir : findWorkspaceRoot(startDir) ?? startDir;
1125
+ const projectRoot = options?.walkUp === false ? startDir : findMonorepoRoot(startDir) ?? startDir;
1135
1126
  if (!hasViteConfig(projectRoot)) return { templates: [] };
1136
1127
  let create;
1137
1128
  try {
@@ -1161,8 +1152,7 @@ async function getConfiguredDefaultTemplate(startDir) {
1161
1152
  return;
1162
1153
  }
1163
1154
  }
1164
- //#endregion
1165
- //#region ../../node_modules/.pnpm/validate-npm-package-name@8.0.0/node_modules/validate-npm-package-name/lib/builtin-modules.json
1155
+ // ../../node_modules/.pnpm/validate-npm-package-name@8.0.0/node_modules/validate-npm-package-name/lib/builtin-modules.json
1166
1156
  var require_builtin_modules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1167
1157
  module.exports = [
1168
1158
  "_http_agent",
@@ -1239,8 +1229,7 @@ var require_builtin_modules = /* @__PURE__ */ __commonJSMin(((exports, module) =
1239
1229
  "node:test/reporters"
1240
1230
  ];
1241
1231
  }));
1242
- //#endregion
1243
- //#region ../../node_modules/.pnpm/@nkzw+safe-word-list@3.1.0/node_modules/@nkzw/safe-word-list/index.js
1232
+ // ../../node_modules/.pnpm/@nkzw+safe-word-list@3.1.0/node_modules/@nkzw/safe-word-list/index.js
1244
1233
  var import_lib = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
1245
1234
  const builtins = require_builtin_modules();
1246
1235
  var scopedPackagePattern = /* @__PURE__ */ new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");
@@ -4031,8 +4020,7 @@ const random = (min, max) => Math.floor(min + Math.random() * (max - min + 1));
4031
4020
  function getRandomWord() {
4032
4021
  return words[random(0, words.length - 1)];
4033
4022
  }
4034
- //#endregion
4035
- //#region src/create/random-name.ts
4023
+ // src/create/random-name.ts
4036
4024
  const isTest = process.env.VP_CLI_TEST === "1";
4037
4025
  function getRandomWords() {
4038
4026
  const first = getRandomWord();
@@ -4047,8 +4035,7 @@ function getRandomProjectName(options = {}) {
4047
4035
  const projectName = isTest && fallbackName ? fallbackName : getRandomWords().join("-");
4048
4036
  return scope ? `${scope}/${projectName}` : projectName;
4049
4037
  }
4050
- //#endregion
4051
- //#region src/create/utils.ts
4038
+ // src/create/utils.ts
4052
4039
  var import_dist = require_dist();
4053
4040
  /** Complete only the managed catalog references of a newly created workspace member.
4054
4041
  * Running the full root migrator here would also change unrelated packages and overrides.
@@ -4268,8 +4255,7 @@ function deriveDefaultPackageName(cwd, scope, fallbackName) {
4268
4255
  fallbackName
4269
4256
  });
4270
4257
  }
4271
- //#endregion
4272
- //#region src/create/prompts.ts
4258
+ // src/create/prompts.ts
4273
4259
  async function promptPackageNameAndTargetDir(defaultPackageName, interactive) {
4274
4260
  let packageName;
4275
4261
  let targetDir;
@@ -4390,8 +4376,7 @@ function validateTargetDir(input, cwd) {
4390
4376
  };
4391
4377
  return { directory: targetDir };
4392
4378
  }
4393
- //#endregion
4394
- //#region src/create/register-template.ts
4379
+ // src/create/register-template.ts
4395
4380
  /**
4396
4381
  * Register a local template into `create.templates` in a monorepo's root
4397
4382
  * `vite.config.ts`. Used after `vp create vite:generator` scaffolds a
@@ -4469,8 +4454,7 @@ function writeCreateBlock(configPath, create) {
4469
4454
  fs.rmSync(tempPath, { force: true });
4470
4455
  }
4471
4456
  }
4472
- //#endregion
4473
- //#region src/create/templates/generator.ts
4457
+ // src/create/templates/generator.ts
4474
4458
  async function executeGeneratorScaffold(workspaceInfo, templateInfo, options) {
4475
4459
  if (!options?.silent) log$1.step("Creating generator scaffold...");
4476
4460
  let description;
@@ -4501,8 +4485,7 @@ async function executeGeneratorScaffold(workspaceInfo, templateInfo, options) {
4501
4485
  projectDir: templateInfo.targetDir
4502
4486
  };
4503
4487
  }
4504
- //#endregion
4505
- //#region src/create/templates/remote.ts
4488
+ // src/create/templates/remote.ts
4506
4489
  var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
4507
4490
  const { gray, yellow } = import_picocolors.default;
4508
4491
  async function executeRemoteTemplate(workspaceInfo, templateInfo, options) {
@@ -4588,8 +4571,7 @@ function autoFixRemoteTemplateCommand(templateInfo, workspaceInfo) {
4588
4571
  else if (packageName === "@tanstack/cli") templateInfo.args.push("--no-git");
4589
4572
  }
4590
4573
  }
4591
- //#endregion
4592
- //#region src/create/templates/monorepo.ts
4574
+ // src/create/templates/monorepo.ts
4593
4575
  const InitialMonorepoAppDir = "apps/website";
4594
4576
  async function executeMonorepoTemplate(workspaceInfo, templateInfo, options) {
4595
4577
  assert(templateInfo.packageName, "packageName is required");
@@ -4739,8 +4721,7 @@ function dropAliasedRuntimeDevDeps(appProjectPath, packageManager) {
4739
4721
  return changed ? pkg : void 0;
4740
4722
  });
4741
4723
  }
4742
- //#endregion
4743
- //#region src/create/templates/builtin.ts
4724
+ // src/create/templates/builtin.ts
4744
4725
  async function executeBuiltinTemplate(workspaceInfo, templateInfo, options) {
4745
4726
  assert(templateInfo.targetDir, "targetDir is required");
4746
4727
  assert(templateInfo.packageName, "packageName is required");
@@ -4773,8 +4754,7 @@ async function executeBuiltinTemplate(workspaceInfo, templateInfo, options) {
4773
4754
  projectDir: templateInfo.targetDir
4774
4755
  };
4775
4756
  }
4776
- //#endregion
4777
- //#region src/create/templates/bundled.ts
4757
+ // src/create/templates/bundled.ts
4778
4758
  /**
4779
4759
  * Scaffold a bundled template by copying the pre-extracted directory at
4780
4760
  * `localPath` into `workspaceInfo.rootDir/targetDir`.
@@ -4799,8 +4779,7 @@ async function executeBundledTemplate(workspaceInfo, templateInfo) {
4799
4779
  projectDir: templateInfo.targetDir
4800
4780
  };
4801
4781
  }
4802
- //#endregion
4803
- //#region src/create/bin.ts
4782
+ // src/create/bin.ts
4804
4783
  const listTemplatesMessage = renderCliDoc({
4805
4784
  usage: "vp create --list",
4806
4785
  summary: "List available builtin and popular project templates.",
@@ -5487,7 +5466,10 @@ Use \`vp create --list\` to list all available templates, or run \`vp create --h
5487
5466
  if (shouldMigrateLintFmtTools) await installAndMigrate(workspaceInfo.rootDir);
5488
5467
  updateCreateProgress("Integrating into monorepo");
5489
5468
  const skipStagedMigration = shouldSkipStagedMigrationForHooks(fullPath, shouldSetupHooks, workspaceInfo.packageManager);
5490
- rewriteMonorepoProject(fullPath, workspaceInfo.packageManager, skipStagedMigration, compactOutput, void 0, workspaceInfo.packageManager === PackageManager.pnpm ? createCatalogDependencyResolver(workspaceInfo.rootDir, workspaceInfo.packageManager) : void 0);
5469
+ rewriteMonorepoProject(fullPath, workspaceInfo.packageManager, skipStagedMigration, compactOutput, void 0, workspaceInfo.packageManager === PackageManager.pnpm ? createCatalogDependencyResolver(workspaceInfo.rootDir, workspaceInfo.packageManager) : void 0, {
5470
+ rootDir: workspaceInfo.rootDir,
5471
+ packages: discoverWorkspacePackages([...workspaceInfo.workspacePatterns, projectDir], workspaceInfo.rootDir)
5472
+ });
5491
5473
  if (workspaceInfo.packageManager === PackageManager.pnpm) ensurePnpmCreateCatalogEntries(workspaceInfo.rootDir, fullPath);
5492
5474
  for (const framework of detectFramework(fullPath)) if (!hasFrameworkShim(fullPath, framework)) addFrameworkShim(fullPath, framework);
5493
5475
  updateCreateProgress("Installing dependencies");
@@ -5545,5 +5527,4 @@ main().catch((err) => {
5545
5527
  console.error(err);
5546
5528
  cancelAndExit(`Failed to generate code: ${err.message}`, 1);
5547
5529
  });
5548
- //#endregion
5549
5530
  export {};
@@ -1,17 +1,16 @@
1
- import { c as VITEST_VERSION, r as CONFIG_METADATA_ENV } from "./constants-DR55DpRm.js";
2
- import { t as VITEST_RESOLVER_PACKAGES } from "./vitest-ecosystem-BU0AqZq-.js";
1
+ import { c as VITEST_VERSION, r as CONFIG_METADATA_ENV } from "./constants-DRUnJ_Dz.js";
2
+ import { t as VITEST_RESOLVER_PACKAGES } from "./vitest-ecosystem-BeEYz-qF.js";
3
3
  import { createRequire } from "node:module";
4
4
  import path, { join, resolve } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
6
6
  import { readFileSync } from "node:fs";
7
7
  import { searchForWorkspaceRoot } from "vite";
8
8
  import { defineConfig, defineProject } from "vitest/config";
9
- //#region ../../node_modules/.pnpm/tsdown@0.23.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.1_@tsdown+exe@0.23.1_@type_1c5668b23b89ab367f1fd43e24d0d72d/node_modules/tsdown/esm-shims.js
9
+ // ../../node_modules/.pnpm/tsdown@0.23.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.1_@tsdown+exe@0.23.1_@type_1cd5eff5b2f775ab43816d8441c9e500/node_modules/tsdown/esm-shims.js
10
10
  const getFilename = () => fileURLToPath(import.meta.url);
11
11
  const getDirname = () => path.dirname(getFilename());
12
12
  const __dirname = /* @__PURE__ */ getDirname();
13
- //#endregion
14
- //#region ../../node_modules/.pnpm/@voidzero-dev+vite-task-client@0.2.0/node_modules/@voidzero-dev/vite-task-client/src/index.js
13
+ // ../../node_modules/.pnpm/@voidzero-dev+vite-task-client@0.2.0/node_modules/@voidzero-dev/vite-task-client/src/index.js
15
14
  /**
16
15
  * @typedef {{ tracked?: boolean }} GetEnvOptions
17
16
  */
@@ -67,8 +66,7 @@ function ignoreInput(path) {
67
66
  function ignoreOutput(path) {
68
67
  load()?.ignoreOutput(path);
69
68
  }
70
- //#endregion
71
- //#region src/define-config.ts
69
+ // src/define-config.ts
72
70
  /**
73
71
  * `require` anchored at THIS module's location so `require.resolve` reaches
74
72
  * the `vitest` / `@vitest/*` family that the `vite-plus` package directly
@@ -553,7 +551,7 @@ const VITE_PLUS_TEST_PLUGIN_NAMES = /* @__PURE__ */ new Set([
553
551
  ]);
554
552
  function withoutVitePlusTestPlugins(plugin) {
555
553
  if (Array.isArray(plugin)) return plugin.filter(keepUserPlugin).map(withoutVitePlusTestPlugins);
556
- if (plugin instanceof Promise) return plugin.then(withoutVitePlusTestPlugins);
554
+ if (plugin instanceof Promise) return plugin;
557
555
  return plugin && VITE_PLUS_TEST_PLUGIN_NAMES.has(plugin.name) ? false : plugin;
558
556
  }
559
557
  function keepUserPlugin(plugin) {
@@ -693,5 +691,4 @@ function lazyPlugins(cb) {
693
691
  if (result instanceof Promise) return [result];
694
692
  return result;
695
693
  }
696
- //#endregion
697
694
  export { defineConfig$1 as a, lazyPlugins as c, computeAutoInlineList as i, resolveCoverageProviderToCheck as l, assertCoverageProviderVersionMatch as n, defineProject$1 as o, checkCoverageProviderVersion as r, isVitestFamilySpecifier as s, AUTO_INLINE_DEPS as t, withConfigMetadataResolution as u };
@@ -1,4 +1,4 @@
1
- //#region \0rolldown/runtime.js
1
+ // \0rolldown/runtime.js
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -31,14 +31,13 @@ var __copyProps = (to, from, except, desc) => {
31
31
  return to;
32
32
  };
33
33
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
- //#endregion
35
34
  let node_fs = require("node:fs");
36
35
  let node_module = require("node:module");
37
36
  let node_path = require("node:path");
38
37
  let node_url = require("node:url");
39
38
  let vite = require("vite");
40
39
  let vitest_config = require("vitest/config");
41
- //#region ../../node_modules/.pnpm/@voidzero-dev+vite-task-client@0.2.0/node_modules/@voidzero-dev/vite-task-client/src/index.js
40
+ // ../../node_modules/.pnpm/@voidzero-dev+vite-task-client@0.2.0/node_modules/@voidzero-dev/vite-task-client/src/index.js
42
41
  function load() {
43
42
  if (addon !== void 0) return addon;
44
43
  try {
@@ -75,9 +74,8 @@ function ignoreOutput(path) {
75
74
  }
76
75
  var addon;
77
76
  var init_src = __esmMin((() => {}));
78
- //#endregion
79
- //#region package.json
80
- var version = "1.3.0", VITE_PLUS_VERSION, VITEST_VERSION, CONFIG_METADATA_ENV;
77
+ // package.json
78
+ var version = "1.4.0", VITE_PLUS_VERSION, VITEST_VERSION, CONFIG_METADATA_ENV;
81
79
  var init_constants = __esmMin((() => {
82
80
  VITE_PLUS_VERSION = process.env.VP_VERSION || version;
83
81
  VITEST_VERSION = "5.0.5";
@@ -86,8 +84,7 @@ var init_constants = __esmMin((() => {
86
84
  process.versions.node, process.release.name;
87
85
  CONFIG_METADATA_ENV = "VP_RESOLVING_CONFIG_METADATA";
88
86
  }));
89
- //#endregion
90
- //#region src/utils/vitest-ecosystem.ts
87
+ // src/utils/vitest-ecosystem.ts
91
88
  var VITEST_EXACT_VERSION_PACKAGES, VITEST_RESOLVER_PACKAGES;
92
89
  var init_vitest_ecosystem = __esmMin((() => {
93
90
  VITEST_EXACT_VERSION_PACKAGES = /* @__PURE__ */ new Set([
@@ -106,8 +103,7 @@ var init_vitest_ecosystem = __esmMin((() => {
106
103
  ]);
107
104
  VITEST_RESOLVER_PACKAGES = /* @__PURE__ */ new Set(["vitest", ...VITEST_EXACT_VERSION_PACKAGES]);
108
105
  }));
109
- //#endregion
110
- //#region src/define-config.ts
106
+ // src/define-config.ts
111
107
  var define_config_exports = /* @__PURE__ */ __exportAll({
112
108
  AUTO_INLINE_DEPS: () => AUTO_INLINE_DEPS,
113
109
  assertCoverageProviderVersionMatch: () => assertCoverageProviderVersionMatch,
@@ -507,7 +503,7 @@ function vitePlusVitestCachePathsPlugin() {
507
503
  }
508
504
  function withoutVitePlusTestPlugins(plugin) {
509
505
  if (Array.isArray(plugin)) return plugin.filter(keepUserPlugin).map(withoutVitePlusTestPlugins);
510
- if (plugin instanceof Promise) return plugin.then(withoutVitePlusTestPlugins);
506
+ if (plugin instanceof Promise) return plugin;
511
507
  return plugin && VITE_PLUS_TEST_PLUGIN_NAMES.has(plugin.name) ? false : plugin;
512
508
  }
513
509
  function keepUserPlugin(plugin) {
@@ -667,7 +663,6 @@ var init_define_config = __esmMin((() => {
667
663
  ]);
668
664
  configMetadataDepth = 0;
669
665
  }));
670
- //#endregion
671
666
  Object.defineProperty(exports, "AUTO_INLINE_DEPS", {
672
667
  enumerable: true,
673
668
  get: function() {
@@ -1,10 +1,9 @@
1
- import { t as PackUserConfig } from "./pack-BK38MLVZ.js";
1
+ import { t as PackUserConfig } from "./pack-ARPFMefW.js";
2
2
  import { PluginOption, UserConfig } from "vite";
3
3
  import { ConfigEnv, UserProjectConfigExport, UserProjectConfigFn, UserWorkspaceConfig } from "vitest/config";
4
4
  import { OxfmtConfig } from "oxfmt";
5
5
  import { OxlintConfig } from "oxlint";
6
6
  import { InlineConfig } from "vitest/node";
7
- //#region src/create/org-manifest.d.ts
8
7
  /**
9
8
  * A single template entry shared by org manifests (`createConfig.templates`)
10
9
  * and local monorepo config (`create.templates` in `vite.config.ts`).
@@ -14,8 +13,6 @@ interface CreateTemplateEntry {
14
13
  description: string;
15
14
  template: string;
16
15
  }
17
- //#endregion
18
- //#region src/run-config.d.ts
19
16
  type AutoTracking = {
20
17
  /**
21
18
  * Enable automatic file tracking for this input or output list.
@@ -156,8 +153,6 @@ type RunConfig = {
156
153
  */
157
154
  enablePrePostScripts?: boolean;
158
155
  };
159
- //#endregion
160
- //#region ../../node_modules/.pnpm/lint-staged@17.6.0/node_modules/lint-staged/lib/config.d.ts
161
156
  /**
162
157
  * A single task that will be spawned
163
158
  *
@@ -223,11 +218,7 @@ type TaskFunction = {
223
218
  };
224
219
  /** An entire `lint-staged` configuration, or a function that returns one */
225
220
  type Configuration = Record<string, SpawnedTask | TaskFunction | GenerateTask | SequentialTasks> | GenerateTask;
226
- //#endregion
227
- //#region src/staged-config.d.ts
228
221
  type StagedConfig = Configuration;
229
- //#endregion
230
- //#region src/define-config.d.ts
231
222
  declare module 'vite' {
232
223
  interface UserConfig {
233
224
  /**
@@ -429,5 +420,4 @@ declare function defineProject$1(config: UserProjectConfigExport): UserProjectCo
429
420
  declare function withConfigMetadataResolution<T>(fn: () => Promise<T>): Promise<T>;
430
421
  declare function lazyPlugins(cb: () => PluginOption[]): PluginOption[] | undefined;
431
422
  declare function lazyPlugins(cb: () => Promise<PluginOption[]>): PluginOption[] | undefined;
432
- //#endregion
433
423
  export { defineConfig$1 as a, lazyPlugins as c, computeAutoInlineList as i, resolveCoverageProviderToCheck as l, assertCoverageProviderVersionMatch as n, defineProject$1 as o, checkCoverageProviderVersion as r, isVitestFamilySpecifier as s, AUTO_INLINE_DEPS as t, withConfigMetadataResolution as u };
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_define_config = require("./define-config-BxDc_9BK.cjs");
2
+ const require_define_config = require("./define-config-Cv2P6NT2.cjs");
3
3
  require_define_config.init_define_config();
4
4
  exports.AUTO_INLINE_DEPS = require_define_config.AUTO_INLINE_DEPS;
5
5
  exports.assertCoverageProviderVersionMatch = require_define_config.assertCoverageProviderVersionMatch;
@@ -1,2 +1,2 @@
1
- import { a as defineConfig, c as lazyPlugins, i as computeAutoInlineList, l as resolveCoverageProviderToCheck, n as assertCoverageProviderVersionMatch, o as defineProject, r as checkCoverageProviderVersion, s as isVitestFamilySpecifier, t as AUTO_INLINE_DEPS, u as withConfigMetadataResolution } from "./define-config-Bexdd6RZ.js";
1
+ import { a as defineConfig, c as lazyPlugins, i as computeAutoInlineList, l as resolveCoverageProviderToCheck, n as assertCoverageProviderVersionMatch, o as defineProject, r as checkCoverageProviderVersion, s as isVitestFamilySpecifier, t as AUTO_INLINE_DEPS, u as withConfigMetadataResolution } from "./define-config-rPhYIFSn.js";
2
2
  export { AUTO_INLINE_DEPS, assertCoverageProviderVersionMatch, checkCoverageProviderVersion, computeAutoInlineList, defineConfig, defineProject, isVitestFamilySpecifier, lazyPlugins, resolveCoverageProviderToCheck, withConfigMetadataResolution };
@@ -1 +1 @@
1
- export { t as AUTO_INLINE_DEPS, n as assertCoverageProviderVersionMatch, r as checkCoverageProviderVersion, i as computeAutoInlineList, a as defineConfig, o as defineProject, s as isVitestFamilySpecifier, c as lazyPlugins, l as resolveCoverageProviderToCheck, u as withConfigMetadataResolution } from "./define-config-CvE5pHqB.js";
1
+ export { t as AUTO_INLINE_DEPS, n as assertCoverageProviderVersionMatch, r as checkCoverageProviderVersion, i as computeAutoInlineList, a as defineConfig, o as defineProject, s as isVitestFamilySpecifier, c as lazyPlugins, l as resolveCoverageProviderToCheck, u as withConfigMetadataResolution } from "./define-config-ChwJcu5e.js";