@vsceasy/cli 0.1.5 → 0.1.6

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/CHANGELOG.md CHANGED
@@ -5,6 +5,7 @@ All notable changes follow [Keep a Changelog](https://keepachangelog.com/en/1.1.
5
5
  ## [Unreleased]
6
6
 
7
7
  ### Added
8
+ - **`vsceasy create` post-scaffold setup** — after generating the project, `create` now offers to **initialize a git repository** (`git init`) and **install dependencies** (`bun`, falling back to `npm`). Both prompts default to yes in an interactive terminal. New `--git` / `--install` flags (and `--git=false` / `--install=false`) skip the prompts for scripting/CI. Non-interactive runs without the flags skip both, as before.
8
9
  - **`vsceasy job add`** — scaffold recurring / event-triggered jobs into `src/jobs/`. Schedules: `--every "60s"`, `--dailyAt "09:00"`, `--on startup|saveDocument|openDocument|changeActiveEditor|changeConfig`, `--onFile "**/*.md"`. Optional `--minIntervalMs` throttles re-runs via globalState. Runtime (`bootstrap`) auto-registers timers/listeners + cleanup on deactivate, catches errors so they don't crash the host.
9
10
  - **`command add --when <expr>`** — declare VS Code `when` clauses on commands. Auto-written to `contributes.commands[].enablement` and `contributes.menus.commandPalette` by `bun run gen`. Enables context-aware visibility (e.g. `editorTextFocus`, `resourceLangId == typescript`).
10
11
  - **`vsceasy helper add <kind>`** — generate typed runtime wrappers in `src/helpers/`:
package/README.md CHANGED
@@ -20,13 +20,13 @@ vsceasy --version
20
20
 
21
21
  ```bash
22
22
  bunx @vsceasy/cli create my-extension
23
+ # prompts to init git + install deps, then:
23
24
  cd my-extension
24
- bun install
25
25
  bun run dev
26
26
  # press F5 in VS Code to launch the Extension Development Host
27
27
  ```
28
28
 
29
- Or with flags:
29
+ Or with flags — `--git` / `--install` skip the post-scaffold prompts:
30
30
 
31
31
  ```bash
32
32
  bunx @vsceasy/cli create \
@@ -34,7 +34,9 @@ bunx @vsceasy/cli create \
34
34
  --displayName "My Extension" \
35
35
  --description "Does cool things" \
36
36
  --publisher my-publisher \
37
- --ui react
37
+ --ui react \
38
+ --git \
39
+ --install
38
40
  ```
39
41
 
40
42
  ## What you get
package/dist/bin/cli.js CHANGED
@@ -3826,7 +3826,7 @@ var init_scaffold = __esm(() => {
3826
3826
  });
3827
3827
 
3828
3828
  // src/lib/templatesData.ts
3829
- var TEMPLATES_VERSION = "0.1.5", TEMPLATE_FILES;
3829
+ var TEMPLATES_VERSION = "0.1.6", TEMPLATE_FILES;
3830
3830
  var init_templatesData = __esm(() => {
3831
3831
  TEMPLATE_FILES = {
3832
3832
  "_generators/command/command.ts.tpl": `import { defineCommand } from '../shared/vsceasy';
@@ -7692,65 +7692,6 @@ var init_findProject = __esm(() => {
7692
7692
  path3 = __toESM(require("path"));
7693
7693
  });
7694
7694
 
7695
- // src/commands/create.ts
7696
- function toTitle(s) {
7697
- return s.replace(/[-_]+/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
7698
- }
7699
- var import_cli_maker, path4, createCommand, create_default;
7700
- var init_create = __esm(() => {
7701
- init_scaffold();
7702
- init_findProject();
7703
- import_cli_maker = __toESM(require_dist(), 1);
7704
- path4 = __toESM(require("path"));
7705
- createCommand = {
7706
- name: "create",
7707
- description: "Scaffold a new VS Code extension project",
7708
- params: [
7709
- { name: "name", description: "Extension package name (e.g. my-extension or @scope/my-ext)", required: true, type: import_cli_maker.ParamType.Text },
7710
- { name: "displayName", description: "Human-readable extension name", required: false, type: import_cli_maker.ParamType.Text },
7711
- { name: "description", description: "Short description", required: false, type: import_cli_maker.ParamType.Text },
7712
- { name: "publisher", description: "VS Code publisher id", required: false, type: import_cli_maker.ParamType.Text },
7713
- { name: "ui", description: "UI framework", required: false, type: import_cli_maker.ParamType.List, options: ["react"] },
7714
- { name: "preset", description: "Project preset (minimal = empty extension, full = panel + RPC sample)", required: false, type: import_cli_maker.ParamType.List, options: ["minimal", "full"] },
7715
- { name: "dir", description: "Target directory (defaults to ./<name>)", required: false, type: import_cli_maker.ParamType.Text }
7716
- ],
7717
- action: async (args) => {
7718
- const name = args.name;
7719
- const simpleName = name.replace(/^@[^/]+\//, "");
7720
- const ui = args.ui ?? "react";
7721
- const preset = args.preset ?? "full";
7722
- const targetDir = path4.resolve(process.cwd(), args.dir ?? simpleName);
7723
- try {
7724
- await scaffold({
7725
- name,
7726
- displayName: args.displayName ?? toTitle(simpleName),
7727
- description: args.description ?? `${simpleName} VS Code extension`,
7728
- publisher: args.publisher ?? "your-publisher",
7729
- ui,
7730
- preset,
7731
- targetDir,
7732
- templatesRoot: findTemplatesRoot()
7733
- });
7734
- const rel = path4.relative(process.cwd(), targetDir) || ".";
7735
- console.log(`
7736
- ✓ Created ${name} at ${rel}
7737
- `);
7738
- console.log("Next steps:");
7739
- console.log(` cd ${rel}`);
7740
- console.log(" bun install");
7741
- console.log(" bun run launch # builds + opens Extension Development Host");
7742
- console.log(" # or `bun run dev` + F5 inside VS Code for watch mode\n");
7743
- } catch (err) {
7744
- console.error(`
7745
- ✗ Failed to scaffold: ${err.message}
7746
- `);
7747
- process.exitCode = 1;
7748
- }
7749
- }
7750
- };
7751
- create_default = createCommand;
7752
- });
7753
-
7754
7695
  // src/lib/interactive.ts
7755
7696
  function rl() {
7756
7697
  return readline.createInterface({ input: process.stdin, output: process.stdout });
@@ -7758,11 +7699,11 @@ function rl() {
7758
7699
  async function askText(question, defaultValue) {
7759
7700
  const r = rl();
7760
7701
  const hint = defaultValue ? ` ${DIM}[${defaultValue}]${RST}` : "";
7761
- return new Promise((resolve3) => {
7702
+ return new Promise((resolve2) => {
7762
7703
  r.question(`${CYAN}?${RST} ${question}${hint}: `, (ans) => {
7763
7704
  r.close();
7764
7705
  const v = (ans ?? "").trim();
7765
- resolve3(v.length ? v : defaultValue ?? "");
7706
+ resolve2(v.length ? v : defaultValue ?? "");
7766
7707
  });
7767
7708
  });
7768
7709
  }
@@ -7803,7 +7744,7 @@ async function selectArrow(question, options, opts) {
7803
7744
  if (index >= v.length)
7804
7745
  index = Math.max(0, v.length - 1);
7805
7746
  };
7806
- return new Promise((resolve3, reject) => {
7747
+ return new Promise((resolve2, reject) => {
7807
7748
  const stdin = process.stdin;
7808
7749
  const stdout = process.stdout;
7809
7750
  let lastLines = 0;
@@ -7880,7 +7821,7 @@ async function selectArrow(question, options, opts) {
7880
7821
  cleanup();
7881
7822
  stdout.write(`${CYAN}?${RST} ${BOLD}${question}${RST} ${GREEN}${v[index].label}${RST}
7882
7823
  `);
7883
- resolve3(v[index].value);
7824
+ resolve2(v[index].value);
7884
7825
  return;
7885
7826
  }
7886
7827
  if (data === "" || data === "\b") {
@@ -7949,6 +7890,132 @@ var init_interactive = __esm(() => {
7949
7890
  style = { DIM, BOLD, CYAN, GREEN, YELLOW, INV, RST };
7950
7891
  });
7951
7892
 
7893
+ // src/commands/create.ts
7894
+ function toTitle(s) {
7895
+ return s.replace(/[-_]+/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
7896
+ }
7897
+ function toBool(v) {
7898
+ if (v === undefined || v === null || v === "")
7899
+ return;
7900
+ if (typeof v === "boolean")
7901
+ return v;
7902
+ const s = String(v).trim().toLowerCase();
7903
+ if (["true", "1", "yes", "y"].includes(s))
7904
+ return true;
7905
+ if (["false", "0", "no", "n"].includes(s))
7906
+ return false;
7907
+ return;
7908
+ }
7909
+ function which(cmd) {
7910
+ const r = import_child_process.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" });
7911
+ return r.status === 0;
7912
+ }
7913
+ function initGit(cwd) {
7914
+ const r = import_child_process.spawnSync("git", ["init"], { cwd, stdio: "inherit" });
7915
+ if (r.status === 0) {
7916
+ console.log("✓ Initialized git repository");
7917
+ return true;
7918
+ }
7919
+ console.warn("! Could not initialize git repository");
7920
+ return false;
7921
+ }
7922
+ function runInstall(pm, cwd) {
7923
+ console.log(`
7924
+ Installing dependencies with ${pm}...
7925
+ `);
7926
+ const r = import_child_process.spawnSync(pm, ["install"], { cwd, stdio: "inherit" });
7927
+ if (r.status === 0) {
7928
+ console.log(`
7929
+ ✓ Dependencies installed`);
7930
+ return true;
7931
+ }
7932
+ console.warn(`
7933
+ ! ${pm} install failed — run it manually`);
7934
+ return false;
7935
+ }
7936
+ var import_cli_maker, path4, import_child_process, createCommand, create_default;
7937
+ var init_create = __esm(() => {
7938
+ init_scaffold();
7939
+ init_findProject();
7940
+ init_interactive();
7941
+ import_cli_maker = __toESM(require_dist(), 1);
7942
+ path4 = __toESM(require("path"));
7943
+ import_child_process = require("child_process");
7944
+ createCommand = {
7945
+ name: "create",
7946
+ description: "Scaffold a new VS Code extension project",
7947
+ params: [
7948
+ { name: "name", description: "Extension package name (e.g. my-extension or @scope/my-ext)", required: true, type: import_cli_maker.ParamType.Text },
7949
+ { name: "displayName", description: "Human-readable extension name", required: false, type: import_cli_maker.ParamType.Text },
7950
+ { name: "description", description: "Short description", required: false, type: import_cli_maker.ParamType.Text },
7951
+ { name: "publisher", description: "VS Code publisher id", required: false, type: import_cli_maker.ParamType.Text },
7952
+ { name: "ui", description: "UI framework", required: false, type: import_cli_maker.ParamType.List, options: ["react"] },
7953
+ { name: "preset", description: "Project preset (minimal = empty extension, full = panel + RPC sample)", required: false, type: import_cli_maker.ParamType.List, options: ["minimal", "full"] },
7954
+ { name: "dir", description: "Target directory (defaults to ./<name>)", required: false, type: import_cli_maker.ParamType.Text },
7955
+ { name: "git", description: "Initialize a git repository (skips the prompt)", required: false, type: import_cli_maker.ParamType.Boolean },
7956
+ { name: "install", description: "Install dependencies after scaffolding (skips the prompt)", required: false, type: import_cli_maker.ParamType.Boolean }
7957
+ ],
7958
+ action: async (args) => {
7959
+ const name = args.name;
7960
+ const simpleName = name.replace(/^@[^/]+\//, "");
7961
+ const ui = args.ui ?? "react";
7962
+ const preset = args.preset ?? "full";
7963
+ const targetDir = path4.resolve(process.cwd(), args.dir ?? simpleName);
7964
+ try {
7965
+ await scaffold({
7966
+ name,
7967
+ displayName: args.displayName ?? toTitle(simpleName),
7968
+ description: args.description ?? `${simpleName} VS Code extension`,
7969
+ publisher: args.publisher ?? "your-publisher",
7970
+ ui,
7971
+ preset,
7972
+ targetDir,
7973
+ templatesRoot: findTemplatesRoot()
7974
+ });
7975
+ const rel = path4.relative(process.cwd(), targetDir) || ".";
7976
+ console.log(`
7977
+ ✓ Created ${name} at ${rel}
7978
+ `);
7979
+ const interactive = Boolean(process.stdin.isTTY && process.stdout.isTTY);
7980
+ const gitFlag = toBool(args.git);
7981
+ const installFlag = toBool(args.install);
7982
+ const wantGit = gitFlag ?? (interactive ? await confirm("Initialize a git repository?", true) : false);
7983
+ if (wantGit) {
7984
+ if (which("git"))
7985
+ initGit(targetDir);
7986
+ else
7987
+ console.warn("! git not found — skipping repository init");
7988
+ }
7989
+ let pm = null;
7990
+ const wantInstall = installFlag ?? (interactive ? await confirm("Install dependencies?", true) : false);
7991
+ let installed = false;
7992
+ if (wantInstall) {
7993
+ pm = which("bun") ? "bun" : which("npm") ? "npm" : null;
7994
+ if (pm)
7995
+ installed = runInstall(pm, targetDir);
7996
+ else
7997
+ console.warn("! No package manager (bun/npm) found — skipping install");
7998
+ }
7999
+ const run = pm ?? "bun";
8000
+ console.log(`
8001
+ Next steps:`);
8002
+ console.log(` cd ${rel}`);
8003
+ if (!installed)
8004
+ console.log(` ${run} install`);
8005
+ console.log(` ${run} run launch # builds + opens Extension Development Host`);
8006
+ console.log(` # or \`${run} run dev\` + F5 inside VS Code for watch mode
8007
+ `);
8008
+ } catch (err) {
8009
+ console.error(`
8010
+ ✗ Failed to scaffold: ${err.message}
8011
+ `);
8012
+ process.exitCode = 1;
8013
+ }
8014
+ }
8015
+ };
8016
+ create_default = createCommand;
8017
+ });
8018
+
7952
8019
  // src/lib/validate.ts
7953
8020
  function assertId(field, value) {
7954
8021
  const trimmed = (value ?? "").trim();
@@ -8116,18 +8183,18 @@ function appendApi(apiPath, apiName, body, created, modified, skipped) {
8116
8183
  }
8117
8184
  function runGen(cwd) {
8118
8185
  const tryRun = (cmd, args) => {
8119
- const r = import_child_process.spawnSync(cmd, args, { cwd, stdio: "inherit" });
8186
+ const r = import_child_process2.spawnSync(cmd, args, { cwd, stdio: "inherit" });
8120
8187
  return r.status === 0;
8121
8188
  };
8122
- if (which("bun") && tryRun("bun", ["run", "gen"]))
8189
+ if (which2("bun") && tryRun("bun", ["run", "gen"]))
8123
8190
  return true;
8124
- if (which("npm") && tryRun("npm", ["run", "gen"]))
8191
+ if (which2("npm") && tryRun("npm", ["run", "gen"]))
8125
8192
  return true;
8126
8193
  console.warn('\n! Could not run "gen" automatically. Run `bun run gen` (or `npm run gen`) manually to wire up the new panel.\n');
8127
8194
  return false;
8128
8195
  }
8129
- function which(cmd) {
8130
- const r = import_child_process.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" });
8196
+ function which2(cmd) {
8197
+ const r = import_child_process2.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" });
8131
8198
  return r.status === 0;
8132
8199
  }
8133
8200
  function normalizeCamel(s) {
@@ -8136,14 +8203,14 @@ function normalizeCamel(s) {
8136
8203
  return "";
8137
8204
  return cleaned.charAt(0).toLowerCase() + cleaned.slice(1);
8138
8205
  }
8139
- var fs6, path7, import_child_process, PANEL_TEMPLATES, API_BODY, TEMPLATE_VARS;
8206
+ var fs6, path7, import_child_process2, PANEL_TEMPLATES, API_BODY, TEMPLATE_VARS;
8140
8207
  var init_add2 = __esm(() => {
8141
8208
  init_scaffold();
8142
8209
  init_validate();
8143
8210
  init_add();
8144
8211
  fs6 = __toESM(require("fs"));
8145
8212
  path7 = __toESM(require("path"));
8146
- import_child_process = require("child_process");
8213
+ import_child_process2 = require("child_process");
8147
8214
  PANEL_TEMPLATES = ["blank", "form", "list", "dashboard"];
8148
8215
  API_BODY = {
8149
8216
  blank: "",
@@ -8210,18 +8277,18 @@ function editMenu(opts) {
8210
8277
  }
8211
8278
  function runGen2(cwd) {
8212
8279
  const tryRun = (cmd, args) => {
8213
- const r = import_child_process2.spawnSync(cmd, args, { cwd, stdio: "inherit" });
8280
+ const r = import_child_process3.spawnSync(cmd, args, { cwd, stdio: "inherit" });
8214
8281
  return r.status === 0;
8215
8282
  };
8216
- if (which2("bun") && tryRun("bun", ["run", "gen"]))
8283
+ if (which3("bun") && tryRun("bun", ["run", "gen"]))
8217
8284
  return true;
8218
- if (which2("npm") && tryRun("npm", ["run", "gen"]))
8285
+ if (which3("npm") && tryRun("npm", ["run", "gen"]))
8219
8286
  return true;
8220
8287
  console.warn('\n! Could not run "gen" automatically. Run `bun run gen` manually.\n');
8221
8288
  return false;
8222
8289
  }
8223
- function which2(cmd) {
8224
- const r = import_child_process2.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" });
8290
+ function which3(cmd) {
8291
+ const r = import_child_process3.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" });
8225
8292
  return r.status === 0;
8226
8293
  }
8227
8294
  function insertItem(src, item) {
@@ -8393,11 +8460,11 @@ function findMatching(src, openIdx) {
8393
8460
  }
8394
8461
  return -1;
8395
8462
  }
8396
- var fs7, path8, import_child_process2;
8463
+ var fs7, path8, import_child_process3;
8397
8464
  var init_edit = __esm(() => {
8398
8465
  fs7 = __toESM(require("fs"));
8399
8466
  path8 = __toESM(require("path"));
8400
- import_child_process2 = require("child_process");
8467
+ import_child_process3 = require("child_process");
8401
8468
  });
8402
8469
 
8403
8470
  // src/lib/command/add.ts
@@ -8453,18 +8520,18 @@ function addCommand(opts) {
8453
8520
  }
8454
8521
  function runGen3(cwd) {
8455
8522
  const tryRun = (cmd, args) => {
8456
- const r = import_child_process3.spawnSync(cmd, args, { cwd, stdio: "inherit" });
8523
+ const r = import_child_process4.spawnSync(cmd, args, { cwd, stdio: "inherit" });
8457
8524
  return r.status === 0;
8458
8525
  };
8459
- if (which3("bun") && tryRun("bun", ["run", "gen"]))
8526
+ if (which4("bun") && tryRun("bun", ["run", "gen"]))
8460
8527
  return true;
8461
- if (which3("npm") && tryRun("npm", ["run", "gen"]))
8528
+ if (which4("npm") && tryRun("npm", ["run", "gen"]))
8462
8529
  return true;
8463
8530
  console.warn('\n! Could not run "gen" automatically. Run `bun run gen` manually.\n');
8464
8531
  return false;
8465
8532
  }
8466
- function which3(cmd) {
8467
- const r = import_child_process3.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" });
8533
+ function which4(cmd) {
8534
+ const r = import_child_process4.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" });
8468
8535
  return r.status === 0;
8469
8536
  }
8470
8537
  function escapeQuotes(s) {
@@ -8476,7 +8543,7 @@ function normalizeCamel2(s) {
8476
8543
  return "";
8477
8544
  return cleaned.charAt(0).toLowerCase() + cleaned.slice(1);
8478
8545
  }
8479
- var fs8, path9, import_child_process3;
8546
+ var fs8, path9, import_child_process4;
8480
8547
  var init_add3 = __esm(() => {
8481
8548
  init_scaffold();
8482
8549
  init_edit();
@@ -8484,7 +8551,7 @@ var init_add3 = __esm(() => {
8484
8551
  init_config();
8485
8552
  fs8 = __toESM(require("fs"));
8486
8553
  path9 = __toESM(require("path"));
8487
- import_child_process3 = require("child_process");
8554
+ import_child_process4 = require("child_process");
8488
8555
  });
8489
8556
 
8490
8557
  // src/lib/helper/add.ts
@@ -10013,24 +10080,24 @@ function filesEqual(a, b) {
10013
10080
  }
10014
10081
  function runGen4(cwd) {
10015
10082
  const tryRun = (cmd, args) => {
10016
- const r = import_child_process4.spawnSync(cmd, args, { cwd, stdio: "inherit" });
10083
+ const r = import_child_process5.spawnSync(cmd, args, { cwd, stdio: "inherit" });
10017
10084
  return r.status === 0;
10018
10085
  };
10019
- if (which4("bun") && tryRun("bun", ["run", "gen"]))
10086
+ if (which5("bun") && tryRun("bun", ["run", "gen"]))
10020
10087
  return true;
10021
- if (which4("npm") && tryRun("npm", ["run", "gen"]))
10088
+ if (which5("npm") && tryRun("npm", ["run", "gen"]))
10022
10089
  return true;
10023
10090
  return false;
10024
10091
  }
10025
- function which4(cmd) {
10026
- const r = import_child_process4.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" });
10092
+ function which5(cmd) {
10093
+ const r = import_child_process5.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" });
10027
10094
  return r.status === 0;
10028
10095
  }
10029
- var fs13, path15, import_child_process4, SYNC_PATHS;
10096
+ var fs13, path15, import_child_process5, SYNC_PATHS;
10030
10097
  var init_upgrade = __esm(() => {
10031
10098
  fs13 = __toESM(require("fs"));
10032
10099
  path15 = __toESM(require("path"));
10033
- import_child_process4 = require("child_process");
10100
+ import_child_process5 = require("child_process");
10034
10101
  SYNC_PATHS = [
10035
10102
  "src/shared/vsceasy/define.ts",
10036
10103
  "src/shared/vsceasy/bootstrap.ts",
@@ -10257,18 +10324,18 @@ function addMenu(opts) {
10257
10324
  }
10258
10325
  function runGen5(cwd) {
10259
10326
  const tryRun = (cmd, args) => {
10260
- const r = import_child_process5.spawnSync(cmd, args, { cwd, stdio: "inherit" });
10327
+ const r = import_child_process6.spawnSync(cmd, args, { cwd, stdio: "inherit" });
10261
10328
  return r.status === 0;
10262
10329
  };
10263
- if (which5("bun") && tryRun("bun", ["run", "gen"]))
10330
+ if (which6("bun") && tryRun("bun", ["run", "gen"]))
10264
10331
  return true;
10265
- if (which5("npm") && tryRun("npm", ["run", "gen"]))
10332
+ if (which6("npm") && tryRun("npm", ["run", "gen"]))
10266
10333
  return true;
10267
10334
  console.warn('\n! Could not run "gen" automatically. Run `bun run gen` manually.\n');
10268
10335
  return false;
10269
10336
  }
10270
- function which5(cmd) {
10271
- const r = import_child_process5.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" });
10337
+ function which6(cmd) {
10338
+ const r = import_child_process6.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" });
10272
10339
  return r.status === 0;
10273
10340
  }
10274
10341
  function normalizeCamel4(s) {
@@ -10277,14 +10344,14 @@ function normalizeCamel4(s) {
10277
10344
  return "";
10278
10345
  return cleaned.charAt(0).toLowerCase() + cleaned.slice(1);
10279
10346
  }
10280
- var fs14, path17, import_child_process5;
10347
+ var fs14, path17, import_child_process6;
10281
10348
  var init_add7 = __esm(() => {
10282
10349
  init_scaffold();
10283
10350
  init_validate();
10284
10351
  init_config();
10285
10352
  fs14 = __toESM(require("fs"));
10286
10353
  path17 = __toESM(require("path"));
10287
- import_child_process5 = require("child_process");
10354
+ import_child_process6 = require("child_process");
10288
10355
  });
10289
10356
 
10290
10357
  // src/commands/menu/add.ts
@@ -10828,25 +10895,25 @@ function buildSnippet(method, argNames) {
10828
10895
  }
10829
10896
  function runGen6(cwd) {
10830
10897
  const tryRun = (cmd, args) => {
10831
- const r = import_child_process6.spawnSync(cmd, args, { cwd, stdio: "inherit" });
10898
+ const r = import_child_process7.spawnSync(cmd, args, { cwd, stdio: "inherit" });
10832
10899
  return r.status === 0;
10833
10900
  };
10834
- if (which6("bun") && tryRun("bun", ["run", "gen"]))
10901
+ if (which7("bun") && tryRun("bun", ["run", "gen"]))
10835
10902
  return true;
10836
- if (which6("npm") && tryRun("npm", ["run", "gen"]))
10903
+ if (which7("npm") && tryRun("npm", ["run", "gen"]))
10837
10904
  return true;
10838
10905
  return false;
10839
10906
  }
10840
- function which6(cmd) {
10841
- const r = import_child_process6.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" });
10907
+ function which7(cmd) {
10908
+ const r = import_child_process7.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" });
10842
10909
  return r.status === 0;
10843
10910
  }
10844
- var fs17, path21, import_child_process6;
10911
+ var fs17, path21, import_child_process7;
10845
10912
  var init_add10 = __esm(() => {
10846
10913
  init_validate();
10847
10914
  fs17 = __toESM(require("fs"));
10848
10915
  path21 = __toESM(require("path"));
10849
- import_child_process6 = require("child_process");
10916
+ import_child_process7 = require("child_process");
10850
10917
  });
10851
10918
 
10852
10919
  // src/commands/rpc/add.ts
@@ -11001,17 +11068,17 @@ function asBacktickString(s) {
11001
11068
  }
11002
11069
  function runGen7(cwd) {
11003
11070
  const tryRun = (cmd, args) => {
11004
- const r = import_child_process7.spawnSync(cmd, args, { cwd, stdio: "inherit" });
11071
+ const r = import_child_process8.spawnSync(cmd, args, { cwd, stdio: "inherit" });
11005
11072
  return r.status === 0;
11006
11073
  };
11007
- if (which7("bun") && tryRun("bun", ["run", "gen"]))
11074
+ if (which8("bun") && tryRun("bun", ["run", "gen"]))
11008
11075
  return true;
11009
- if (which7("npm") && tryRun("npm", ["run", "gen"]))
11076
+ if (which8("npm") && tryRun("npm", ["run", "gen"]))
11010
11077
  return true;
11011
11078
  return false;
11012
11079
  }
11013
- function which7(cmd) {
11014
- const r = import_child_process7.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" });
11080
+ function which8(cmd) {
11081
+ const r = import_child_process8.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" });
11015
11082
  return r.status === 0;
11016
11083
  }
11017
11084
  function normalizeCamel5(s) {
@@ -11020,14 +11087,14 @@ function normalizeCamel5(s) {
11020
11087
  return "";
11021
11088
  return cleaned.charAt(0).toLowerCase() + cleaned.slice(1);
11022
11089
  }
11023
- var fs18, path23, import_child_process7;
11090
+ var fs18, path23, import_child_process8;
11024
11091
  var init_add12 = __esm(() => {
11025
11092
  init_scaffold();
11026
11093
  init_add3();
11027
11094
  init_validate();
11028
11095
  fs18 = __toESM(require("fs"));
11029
11096
  path23 = __toESM(require("path"));
11030
- import_child_process7 = require("child_process");
11097
+ import_child_process8 = require("child_process");
11031
11098
  });
11032
11099
 
11033
11100
  // src/commands/statusBar/add.ts
@@ -11304,18 +11371,18 @@ function appendApi2(apiPath, apiName, created, modified, skipped) {
11304
11371
  }
11305
11372
  function runGen8(cwd) {
11306
11373
  const tryRun = (cmd, args) => {
11307
- const r = import_child_process8.spawnSync(cmd, args, { cwd, stdio: "inherit" });
11374
+ const r = import_child_process9.spawnSync(cmd, args, { cwd, stdio: "inherit" });
11308
11375
  return r.status === 0;
11309
11376
  };
11310
- if (which8("bun") && tryRun("bun", ["run", "gen"]))
11377
+ if (which9("bun") && tryRun("bun", ["run", "gen"]))
11311
11378
  return true;
11312
- if (which8("npm") && tryRun("npm", ["run", "gen"]))
11379
+ if (which9("npm") && tryRun("npm", ["run", "gen"]))
11313
11380
  return true;
11314
11381
  console.warn('\n! Could not run "gen" automatically. Run `bun run gen` manually.\n');
11315
11382
  return false;
11316
11383
  }
11317
- function which8(cmd) {
11318
- const r = import_child_process8.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" });
11384
+ function which9(cmd) {
11385
+ const r = import_child_process9.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" });
11319
11386
  return r.status === 0;
11320
11387
  }
11321
11388
  function normalizeCamel6(s) {
@@ -11324,13 +11391,13 @@ function normalizeCamel6(s) {
11324
11391
  return "";
11325
11392
  return cleaned.charAt(0).toLowerCase() + cleaned.slice(1);
11326
11393
  }
11327
- var fs19, path25, import_child_process8;
11394
+ var fs19, path25, import_child_process9;
11328
11395
  var init_add14 = __esm(() => {
11329
11396
  init_scaffold();
11330
11397
  init_validate();
11331
11398
  fs19 = __toESM(require("fs"));
11332
11399
  path25 = __toESM(require("path"));
11333
- import_child_process8 = require("child_process");
11400
+ import_child_process9 = require("child_process");
11334
11401
  });
11335
11402
 
11336
11403
  // src/commands/subpanel/add.ts
@@ -11436,16 +11503,16 @@ function addTreeView(opts) {
11436
11503
  return { created: [target], genRan };
11437
11504
  }
11438
11505
  function runGen9(cwd) {
11439
- const tryRun = (cmd, args) => import_child_process9.spawnSync(cmd, args, { cwd, stdio: "inherit" }).status === 0;
11440
- if (which9("bun") && tryRun("bun", ["run", "gen"]))
11506
+ const tryRun = (cmd, args) => import_child_process10.spawnSync(cmd, args, { cwd, stdio: "inherit" }).status === 0;
11507
+ if (which10("bun") && tryRun("bun", ["run", "gen"]))
11441
11508
  return true;
11442
- if (which9("npm") && tryRun("npm", ["run", "gen"]))
11509
+ if (which10("npm") && tryRun("npm", ["run", "gen"]))
11443
11510
  return true;
11444
11511
  console.warn('\n! Could not run "gen" automatically. Run `bun run gen` manually.\n');
11445
11512
  return false;
11446
11513
  }
11447
- function which9(cmd) {
11448
- return import_child_process9.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" }).status === 0;
11514
+ function which10(cmd) {
11515
+ return import_child_process10.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" }).status === 0;
11449
11516
  }
11450
11517
  function normalizeCamel7(s) {
11451
11518
  const cleaned = s.trim().replace(/[^a-zA-Z0-9]+(.)/g, (_m, c) => c.toUpperCase()).replace(/[^a-zA-Z0-9]/g, "");
@@ -11456,13 +11523,13 @@ function normalizeCamel7(s) {
11456
11523
  function pascal3(s) {
11457
11524
  return s.charAt(0).toUpperCase() + s.slice(1);
11458
11525
  }
11459
- var fs20, path27, import_child_process9;
11526
+ var fs20, path27, import_child_process10;
11460
11527
  var init_add16 = __esm(() => {
11461
11528
  init_scaffold();
11462
11529
  init_validate();
11463
11530
  fs20 = __toESM(require("fs"));
11464
11531
  path27 = __toESM(require("path"));
11465
- import_child_process9 = require("child_process");
11532
+ import_child_process10 = require("child_process");
11466
11533
  });
11467
11534
 
11468
11535
  // src/commands/treeView/add.ts
@@ -11674,19 +11741,19 @@ function publishInit(opts) {
11674
11741
  `);
11675
11742
  let dryPackOk = null;
11676
11743
  if (opts.runDryPack !== false) {
11677
- const r = import_child_process10.spawnSync("npx", ["--yes", "@vscode/vsce", "ls"], { cwd: opts.projectRoot, stdio: "inherit" });
11744
+ const r = import_child_process11.spawnSync("npx", ["--yes", "@vscode/vsce", "ls"], { cwd: opts.projectRoot, stdio: "inherit" });
11678
11745
  dryPackOk = r.status === 0;
11679
11746
  if (!dryPackOk)
11680
11747
  warnings.push("`vsce ls` exited non-zero — inspect output above.");
11681
11748
  }
11682
11749
  return { created, pkgUpdated, warnings, dryPackOk };
11683
11750
  }
11684
- var fs22, path31, import_child_process10;
11751
+ var fs22, path31, import_child_process11;
11685
11752
  var init_init2 = __esm(() => {
11686
11753
  init_scaffold();
11687
11754
  fs22 = __toESM(require("fs"));
11688
11755
  path31 = __toESM(require("path"));
11689
- import_child_process10 = require("child_process");
11756
+ import_child_process11 = require("child_process");
11690
11757
  });
11691
11758
 
11692
11759
  // src/commands/publish/init.ts
@@ -11850,16 +11917,16 @@ function escape(s) {
11850
11917
  return s.replace(/\\/g, "\\\\").replace(/'/g, "\\'");
11851
11918
  }
11852
11919
  function runGen10(cwd) {
11853
- const tryRun = (cmd, args) => import_child_process11.spawnSync(cmd, args, { cwd, stdio: "inherit" }).status === 0;
11854
- if (which10("bun") && tryRun("bun", ["run", "gen"]))
11920
+ const tryRun = (cmd, args) => import_child_process12.spawnSync(cmd, args, { cwd, stdio: "inherit" }).status === 0;
11921
+ if (which11("bun") && tryRun("bun", ["run", "gen"]))
11855
11922
  return true;
11856
- if (which10("npm") && tryRun("npm", ["run", "gen"]))
11923
+ if (which11("npm") && tryRun("npm", ["run", "gen"]))
11857
11924
  return true;
11858
11925
  console.warn('\n! Could not run "gen" automatically. Run `bun run gen` manually.\n');
11859
11926
  return false;
11860
11927
  }
11861
- function which10(cmd) {
11862
- return import_child_process11.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" }).status === 0;
11928
+ function which11(cmd) {
11929
+ return import_child_process12.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" }).status === 0;
11863
11930
  }
11864
11931
  function normalizeCamel8(s) {
11865
11932
  const cleaned = s.trim().replace(/[^a-zA-Z0-9]+(.)/g, (_m, c) => c.toUpperCase()).replace(/[^a-zA-Z0-9]/g, "");
@@ -11867,13 +11934,13 @@ function normalizeCamel8(s) {
11867
11934
  return "";
11868
11935
  return cleaned.charAt(0).toLowerCase() + cleaned.slice(1);
11869
11936
  }
11870
- var fs23, path34, import_child_process11;
11937
+ var fs23, path34, import_child_process12;
11871
11938
  var init_add19 = __esm(() => {
11872
11939
  init_scaffold();
11873
11940
  init_validate();
11874
11941
  fs23 = __toESM(require("fs"));
11875
11942
  path34 = __toESM(require("path"));
11876
- import_child_process11 = require("child_process");
11943
+ import_child_process12 = require("child_process");
11877
11944
  });
11878
11945
 
11879
11946
  // src/commands/job/add.ts
@@ -12602,18 +12669,18 @@ function camelLower(s) {
12602
12669
  return s.charAt(0).toLowerCase() + s.slice(1);
12603
12670
  }
12604
12671
  function runGen11(cwd) {
12605
- const tryRun = (cmd, args) => import_child_process12.spawnSync(cmd, args, { cwd, stdio: "inherit" }).status === 0;
12606
- if (which11("bun") && tryRun("bun", ["run", "gen"]))
12672
+ const tryRun = (cmd, args) => import_child_process13.spawnSync(cmd, args, { cwd, stdio: "inherit" }).status === 0;
12673
+ if (which12("bun") && tryRun("bun", ["run", "gen"]))
12607
12674
  return true;
12608
- if (which11("npm") && tryRun("npm", ["run", "gen"]))
12675
+ if (which12("npm") && tryRun("npm", ["run", "gen"]))
12609
12676
  return true;
12610
12677
  console.warn('\n! Could not run "gen" automatically. Run `bun run gen` manually.\n');
12611
12678
  return false;
12612
12679
  }
12613
- function which11(cmd) {
12614
- return import_child_process12.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" }).status === 0;
12680
+ function which12(cmd) {
12681
+ return import_child_process13.spawnSync(process.platform === "win32" ? "where" : "which", [cmd], { stdio: "ignore" }).status === 0;
12615
12682
  }
12616
- var fs27, path41, import_child_process12;
12683
+ var fs27, path41, import_child_process13;
12617
12684
  var init_add22 = __esm(() => {
12618
12685
  init_scaffold();
12619
12686
  init_validate();
@@ -12623,7 +12690,7 @@ var init_add22 = __esm(() => {
12623
12690
  init_edit();
12624
12691
  fs27 = __toESM(require("fs"));
12625
12692
  path41 = __toESM(require("path"));
12626
- import_child_process12 = require("child_process");
12693
+ import_child_process13 = require("child_process");
12627
12694
  });
12628
12695
 
12629
12696
  // src/commands/crud/add.ts
@@ -12835,7 +12902,7 @@ var init_cli = __esm(() => {
12835
12902
  import_cli_maker20 = __toESM(require_dist(), 1);
12836
12903
  cli = new import_cli_maker20.CLI("vsceasy", "Build VS Code extensions fast — React UI + typed RPC bridge + zero-config build.", {
12837
12904
  interactive: true,
12838
- version: "0.1.5",
12905
+ version: "0.1.6",
12839
12906
  introAnimation: {
12840
12907
  enabled: true,
12841
12908
  preset: "retro-space",
package/dist/index.js CHANGED
@@ -2238,7 +2238,7 @@ var init_upgrade = __esm(() => {
2238
2238
  });
2239
2239
 
2240
2240
  // src/lib/templatesData.ts
2241
- var TEMPLATES_VERSION = "0.1.5", TEMPLATE_FILES;
2241
+ var TEMPLATES_VERSION = "0.1.6", TEMPLATE_FILES;
2242
2242
  var init_templatesData = __esm(() => {
2243
2243
  TEMPLATE_FILES = {
2244
2244
  "_generators/command/command.ts.tpl": `import { defineCommand } from '../shared/vsceasy';
@@ -1,2 +1,2 @@
1
- export declare const TEMPLATES_VERSION = "0.1.5";
1
+ export declare const TEMPLATES_VERSION = "0.1.6";
2
2
  export declare const TEMPLATE_FILES: Record<string, string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vsceasy/cli",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Build VS Code extensions fast — React UI + typed RPC bridge between extension and webview + file-based routing for panels, commands, menus, tree views, and subpanels.",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {