vite-plus 0.1.12-alpha.1 → 0.1.12-alpha.2

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.
@@ -5,7 +5,7 @@ import path from "node:path";
5
5
  import { stripVTControlCharacters, styleText } from "node:util";
6
6
  import process$1, { stdin, stdout } from "node:process";
7
7
  import * as k from "node:readline";
8
- import c from "node:readline";
8
+ import ot from "node:readline";
9
9
  import { ReadStream } from "node:tty";
10
10
  import color from "picocolors";
11
11
  import fs from "node:fs";
@@ -357,7 +357,7 @@ var B = class {
357
357
  this.state = "cancel", this.close();
358
358
  }, { once: !0 });
359
359
  }
360
- this.rl = c.createInterface({
360
+ this.rl = ot.createInterface({
361
361
  input: this.input,
362
362
  tabSize: 2,
363
363
  prompt: "",
@@ -1919,6 +1919,11 @@ const AGENTS = [
1919
1919
  label: "Claude Code",
1920
1920
  targetPath: "CLAUDE.md"
1921
1921
  },
1922
+ {
1923
+ id: "gemini",
1924
+ label: "Gemini CLI",
1925
+ targetPath: "GEMINI.md"
1926
+ },
1922
1927
  {
1923
1928
  id: "copilot",
1924
1929
  label: "GitHub Copilot",
@@ -2152,7 +2157,16 @@ async function tryLinkTargetToAgents(projectRoot, targetPath, silent = false) {
2152
2157
  }
2153
2158
  await fsPromises.unlink(destinationPath);
2154
2159
  }
2155
- await fsPromises.symlink(symlinkTarget, destinationPath);
2160
+ try {
2161
+ await fsPromises.symlink(symlinkTarget, destinationPath);
2162
+ } catch (err) {
2163
+ if (err.code === "EPERM") {
2164
+ await fsPromises.copyFile(agentsPath, destinationPath);
2165
+ if (!silent) log.success(`Copied ${AGENT_STANDARD_PATH} to ${targetPath}`);
2166
+ return true;
2167
+ }
2168
+ throw err;
2169
+ }
2156
2170
  if (!silent) log.success(`Linked ${targetPath} to ${AGENT_STANDARD_PATH}`);
2157
2171
  return true;
2158
2172
  }
@@ -1,4 +1,4 @@
1
- import { A as note, F as Ct, M as select, O as log, T as cancel, a as hasExistingAgentInstructions, i as getAgentById, n as detectAgents, o as replaceMarkedAgentInstructionsSection, p as promptGitHooks, u as defaultInteractive, y as pkgRoot } from "./agent-CfjeMeKM.js";
1
+ import { A as note, F as Ct, M as select, O as log, T as cancel, a as hasExistingAgentInstructions, i as getAgentById, n as detectAgents, o as replaceMarkedAgentInstructionsSection, p as promptGitHooks, u as defaultInteractive, y as pkgRoot } from "./agent-l4VXJklB.js";
2
2
  import { t as lib_default } from "./lib-DxappLRQ.js";
3
3
  import { i as writeJsonFile, r as readJsonFile, s as VITE_PLUS_NAME } from "./json-BRdVJ52a.js";
4
4
  import { i as log$1, t as renderCliDoc } from "./help-CbTzUdXc.js";
@@ -42,13 +42,17 @@ function pathExists(p) {
42
42
  function linkSkills(root, skillsDir, skills, agentSkillsDir) {
43
43
  const targetDir = join(root, agentSkillsDir);
44
44
  if (!existsSync(targetDir)) mkdirSync(targetDir, { recursive: true });
45
+ const isWindows = process.platform === "win32";
46
+ const symlinkType = isWindows ? "junction" : "dir";
45
47
  let linked = 0;
46
48
  for (const skill of skills) {
47
49
  const linkPath = join(targetDir, skill.dirName);
48
- const relativeTarget = relative(targetDir, join(skillsDir, skill.dirName));
50
+ const sourcePath = join(skillsDir, skill.dirName);
51
+ const relativeTarget = relative(targetDir, sourcePath);
52
+ const symlinkTarget = isWindows ? sourcePath : relativeTarget;
49
53
  if (pathExists(linkPath)) {
50
54
  try {
51
- if (readlinkSync(linkPath) === relativeTarget) {
55
+ if (readlinkSync(linkPath) === symlinkTarget) {
52
56
  log.info(` ${skill.name} — already linked`);
53
57
  continue;
54
58
  }
@@ -62,7 +66,7 @@ function linkSkills(root, skillsDir, skills, agentSkillsDir) {
62
66
  continue;
63
67
  }
64
68
  try {
65
- symlinkSync(relativeTarget, linkPath, "dir");
69
+ symlinkSync(symlinkTarget, linkPath, symlinkType);
66
70
  } catch (err) {
67
71
  log.warn(` ${skill.name} — failed to create symlink: ${err.message}`);
68
72
  continue;
@@ -1,7 +1,7 @@
1
1
  import { i as __toESM, t as __commonJSMin } from "./chunk-CgnkrU7a.js";
2
- import { C as DependencyType, D as intro, E as confirm, F as Ct, M as select, N as spinner, O as log, P as text, T as cancel, c as writeAgentInstructions, d as downloadPackageManager$1, g as selectPackageManager, h as runViteInstall, k as multiselect, m as runViteFmt, p as promptGitHooks, r as detectExistingAgentTargetPaths, s as selectAgentTargetPaths, u as defaultInteractive, v as displayRelative, w as PackageManager, x as templatesDir } from "./agent-CfjeMeKM.js";
2
+ import { C as DependencyType, D as intro, E as confirm, F as Ct, M as select, N as spinner, O as log, P as text, T as cancel, c as writeAgentInstructions, d as downloadPackageManager$1, g as selectPackageManager, h as runViteInstall, k as multiselect, m as runViteFmt, p as promptGitHooks, r as detectExistingAgentTargetPaths, s as selectAgentTargetPaths, u as defaultInteractive, v as displayRelative, w as PackageManager, x as templatesDir } from "./agent-l4VXJklB.js";
3
3
  import { t as lib_default } from "./lib-DxappLRQ.js";
4
- import { _ as rewriteMonorepo, a as detectExistingEditor, f as installGitHooks, n as updatePackageJsonWithDeps, o as selectEditor, r as updateWorkspaceConfig, s as writeEditorConfigs, t as detectWorkspace$1, v as rewriteMonorepoProject, y as rewriteStandaloneProject } from "./workspace-CBvH4W-6.js";
4
+ import { _ as rewriteMonorepo, a as detectExistingEditor, f as installGitHooks, n as updatePackageJsonWithDeps, o as selectEditor, r as updateWorkspaceConfig, s as writeEditorConfigs, t as detectWorkspace$1, v as rewriteMonorepoProject, y as rewriteStandaloneProject } from "./workspace-CshY0VeI.js";
5
5
  import "./browser-CBapUTD0.js";
6
6
  import { r as readJsonFile, t as editJsonFile } from "./json-BRdVJ52a.js";
7
7
  import "./package-YAMvX5PJ.js";
@@ -1,7 +1,7 @@
1
1
  import { i as __toESM } from "./chunk-CgnkrU7a.js";
2
- import { E as confirm, F as Ct, M as select, N as spinner, O as log, _ as upgradeYarn, c as writeAgentInstructions, d as downloadPackageManager$1, g as selectPackageManager, h as runViteInstall, j as outro, l as cancelAndExit, p as promptGitHooks, s as selectAgentTargetPaths, t as detectAgentConflicts, u as defaultInteractive, v as displayRelative, w as PackageManager } from "./agent-CfjeMeKM.js";
2
+ import { E as confirm, F as Ct, M as select, N as spinner, O as log, _ as upgradeYarn, c as writeAgentInstructions, d as downloadPackageManager$1, g as selectPackageManager, h as runViteInstall, j as outro, l as cancelAndExit, p as promptGitHooks, s as selectAgentTargetPaths, t as detectAgentConflicts, u as defaultInteractive, v as displayRelative, w as PackageManager } from "./agent-l4VXJklB.js";
3
3
  import { t as lib_default } from "./lib-DxappLRQ.js";
4
- import { _ as rewriteMonorepo, b as createMigrationReport, c as checkViteVersion, d as detectPrettierProject, f as installGitHooks, g as preflightGitHooksSetup, h as migratePrettierToOxfmt, i as detectEditorConflicts, l as checkVitestVersion, m as migrateEslintToOxlint, o as selectEditor, p as mergeViteConfigFiles, s as writeEditorConfigs, t as detectWorkspace$1, u as detectEslintProject, x as require_semver, y as rewriteStandaloneProject } from "./workspace-CBvH4W-6.js";
4
+ import { _ as rewriteMonorepo, b as createMigrationReport, c as checkViteVersion, d as detectPrettierProject, f as installGitHooks, g as preflightGitHooksSetup, h as migratePrettierToOxfmt, i as detectEditorConflicts, l as checkVitestVersion, m as migrateEslintToOxlint, o as selectEditor, p as mergeViteConfigFiles, s as writeEditorConfigs, t as detectWorkspace$1, u as detectEslintProject, x as require_semver, y as rewriteStandaloneProject } from "./workspace-CshY0VeI.js";
5
5
  import "./browser-CBapUTD0.js";
6
6
  import "./json-BRdVJ52a.js";
7
7
  import { i as readNearestPackageJson, r as hasVitePlusDependency } from "./package-YAMvX5PJ.js";
@@ -4,7 +4,7 @@ import { i as log, r as errorMsg, t as renderCliDoc } from "./help-CbTzUdXc.js";
4
4
  import path, { delimiter, dirname, normalize, resolve } from "node:path";
5
5
  import { formatWithOptions, inspect, promisify } from "node:util";
6
6
  import { cwd } from "node:process";
7
- import c from "node:readline";
7
+ import ot from "node:readline";
8
8
  import nodeTty from "node:tty";
9
9
  import { constants } from "node:fs";
10
10
  import { vitePlusHeader } from "../../binding/index.js";
@@ -656,7 +656,7 @@ var G = class {
656
656
  if (this._streamErr) t.push(this._streamErr);
657
657
  if (this._streamOut) t.push(this._streamOut);
658
658
  const n = w(t);
659
- const r = c.createInterface({ input: n });
659
+ const r = ot.createInterface({ input: n });
660
660
  for await (const e of r) yield e.toString();
661
661
  await this._processClosed;
662
662
  e.removeAllListeners();
@@ -1,5 +1,5 @@
1
1
  import { i as __toESM, t as __commonJSMin } from "./chunk-CgnkrU7a.js";
2
- import { F as Ct, M as select, O as log, S as runCommandSilently, b as rulesDir, f as getSpinner, v as displayRelative, w as PackageManager } from "./agent-CfjeMeKM.js";
2
+ import { F as Ct, M as select, O as log, S as runCommandSilently, b as rulesDir, f as getSpinner, v as displayRelative, w as PackageManager } from "./agent-l4VXJklB.js";
3
3
  import { _ as YAMLMap, g as YAMLSeq, i as parseDocument, n as parse, y as Scalar } from "./browser-CBapUTD0.js";
4
4
  import { a as BASEURL_TSCONFIG_WARNING, c as VITE_PLUS_OVERRIDE_PACKAGES, i as writeJsonFile, l as VITE_PLUS_VERSION, n as isJsonFile, r as readJsonFile, s as VITE_PLUS_NAME, t as editJsonFile } from "./json-BRdVJ52a.js";
5
5
  import { n as getScopeFromPackageName, t as detectPackageMetadata } from "./package-YAMvX5PJ.js";
@@ -25,6 +25,10 @@ export declare const AGENTS: readonly [{
25
25
  readonly id: "claude";
26
26
  readonly label: "Claude Code";
27
27
  readonly targetPath: "CLAUDE.md";
28
+ }, {
29
+ readonly id: "gemini";
30
+ readonly label: "Gemini CLI";
31
+ readonly targetPath: "GEMINI.md";
28
32
  }, {
29
33
  readonly id: "copilot";
30
34
  readonly label: "GitHub Copilot";
@@ -136,6 +136,7 @@ const AGENT_ALIASES = {
136
136
  export const AGENTS = [
137
137
  { id: 'chatgpt-codex', label: 'ChatGPT (Codex)', targetPath: 'AGENTS.md' },
138
138
  { id: 'claude', label: 'Claude Code', targetPath: 'CLAUDE.md' },
139
+ { id: 'gemini', label: 'Gemini CLI', targetPath: 'GEMINI.md' },
139
140
  {
140
141
  id: 'copilot',
141
142
  label: 'GitHub Copilot',
@@ -455,7 +456,21 @@ async function tryLinkTargetToAgents(projectRoot, targetPath, silent = false) {
455
456
  }
456
457
  await fsPromises.unlink(destinationPath);
457
458
  }
458
- await fsPromises.symlink(symlinkTarget, destinationPath);
459
+ try {
460
+ await fsPromises.symlink(symlinkTarget, destinationPath);
461
+ }
462
+ catch (err) {
463
+ if (err.code === 'EPERM') {
464
+ // On Windows, symlinks require admin privileges.
465
+ // Fall back to copying the file instead.
466
+ await fsPromises.copyFile(agentsPath, destinationPath);
467
+ if (!silent) {
468
+ prompts.log.success(`Copied ${AGENT_STANDARD_PATH} to ${targetPath}`);
469
+ }
470
+ return true;
471
+ }
472
+ throw err;
473
+ }
459
474
  if (!silent) {
460
475
  prompts.log.success(`Linked ${targetPath} to ${AGENT_STANDARD_PATH}`);
461
476
  }
@@ -49,15 +49,18 @@ function linkSkills(root, skillsDir, skills, agentSkillsDir) {
49
49
  if (!existsSync(targetDir)) {
50
50
  mkdirSync(targetDir, { recursive: true });
51
51
  }
52
+ const isWindows = process.platform === 'win32';
53
+ const symlinkType = isWindows ? 'junction' : 'dir';
52
54
  let linked = 0;
53
55
  for (const skill of skills) {
54
56
  const linkPath = join(targetDir, skill.dirName);
55
57
  const sourcePath = join(skillsDir, skill.dirName);
56
58
  const relativeTarget = relative(targetDir, sourcePath);
59
+ const symlinkTarget = isWindows ? sourcePath : relativeTarget;
57
60
  if (pathExists(linkPath)) {
58
61
  try {
59
62
  const existing = readlinkSync(linkPath);
60
- if (existing === relativeTarget) {
63
+ if (existing === symlinkTarget) {
61
64
  prompts.log.info(` ${skill.name} — already linked`);
62
65
  continue;
63
66
  }
@@ -72,7 +75,7 @@ function linkSkills(root, skillsDir, skills, agentSkillsDir) {
72
75
  continue;
73
76
  }
74
77
  try {
75
- symlinkSync(relativeTarget, linkPath, 'dir');
78
+ symlinkSync(symlinkTarget, linkPath, symlinkType);
76
79
  }
77
80
  catch (err) {
78
81
  prompts.log.warn(` ${skill.name} — failed to create symlink: ${err.message}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plus",
3
- "version": "0.1.12-alpha.1",
3
+ "version": "0.1.12-alpha.2",
4
4
  "description": "The Unified Toolchain for the Web",
5
5
  "homepage": "https://viteplus.dev/guide",
6
6
  "bugs": {
@@ -314,8 +314,8 @@
314
314
  "oxlint": "=1.55.0",
315
315
  "oxlint-tsgolint": "=0.16.0",
316
316
  "picocolors": "^1.1.1",
317
- "@voidzero-dev/vite-plus-test": "0.1.12-alpha.1",
318
- "@voidzero-dev/vite-plus-core": "0.1.12-alpha.1"
317
+ "@voidzero-dev/vite-plus-core": "0.1.12-alpha.2",
318
+ "@voidzero-dev/vite-plus-test": "0.1.12-alpha.2"
319
319
  },
320
320
  "devDependencies": {
321
321
  "@napi-rs/cli": "^3.4.1",
@@ -338,7 +338,7 @@
338
338
  "yaml": "^2.8.1",
339
339
  "@voidzero-dev/vite-plus-prompts": "0.0.0",
340
340
  "rolldown": "1.0.0-rc.9",
341
- "vite": "npm:@voidzero-dev/vite-plus-core@0.1.12-alpha.1"
341
+ "vite": "npm:@voidzero-dev/vite-plus-core@0.1.12-alpha.2"
342
342
  },
343
343
  "napi": {
344
344
  "binaryName": "vite-plus",
@@ -356,12 +356,12 @@
356
356
  "node": "^20.19.0 || >=22.12.0"
357
357
  },
358
358
  "optionalDependencies": {
359
- "@voidzero-dev/vite-plus-darwin-arm64": "0.1.12-alpha.1",
360
- "@voidzero-dev/vite-plus-darwin-x64": "0.1.12-alpha.1",
361
- "@voidzero-dev/vite-plus-linux-arm64-gnu": "0.1.12-alpha.1",
362
- "@voidzero-dev/vite-plus-linux-x64-gnu": "0.1.12-alpha.1",
363
- "@voidzero-dev/vite-plus-win32-x64-msvc": "0.1.12-alpha.1",
364
- "@voidzero-dev/vite-plus-win32-arm64-msvc": "0.1.12-alpha.1"
359
+ "@voidzero-dev/vite-plus-darwin-arm64": "0.1.12-alpha.2",
360
+ "@voidzero-dev/vite-plus-darwin-x64": "0.1.12-alpha.2",
361
+ "@voidzero-dev/vite-plus-linux-arm64-gnu": "0.1.12-alpha.2",
362
+ "@voidzero-dev/vite-plus-linux-x64-gnu": "0.1.12-alpha.2",
363
+ "@voidzero-dev/vite-plus-win32-x64-msvc": "0.1.12-alpha.2",
364
+ "@voidzero-dev/vite-plus-win32-arm64-msvc": "0.1.12-alpha.2"
365
365
  },
366
366
  "scripts": {
367
367
  "build": "oxnode -C dev ./build.ts",