@vsceasy/cli 0.1.3 → 0.1.4
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/dist/bin/cli.js +53 -47
- package/dist/index.js +16 -10
- package/dist/lib/findProject.d.ts +9 -0
- package/dist/lib/wizard/run.d.ts +1 -1
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
|
@@ -3846,16 +3846,22 @@ function findProjectRoot(start = process.cwd()) {
|
|
|
3846
3846
|
dir = path3.dirname(dir);
|
|
3847
3847
|
}
|
|
3848
3848
|
}
|
|
3849
|
-
function findTemplatesRoot(fromFile = __dirname) {
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
if (fs3.existsSync(
|
|
3857
|
-
return
|
|
3858
|
-
|
|
3849
|
+
function findTemplatesRoot(fromFile = process.argv[1] ?? __dirname) {
|
|
3850
|
+
let dir = path3.dirname(path3.resolve(fromFile));
|
|
3851
|
+
const { root } = path3.parse(dir);
|
|
3852
|
+
const tried = [];
|
|
3853
|
+
while (true) {
|
|
3854
|
+
const candidate = path3.join(dir, "templates");
|
|
3855
|
+
tried.push(candidate);
|
|
3856
|
+
if (fs3.existsSync(candidate))
|
|
3857
|
+
return candidate;
|
|
3858
|
+
if (dir === root)
|
|
3859
|
+
break;
|
|
3860
|
+
dir = path3.dirname(dir);
|
|
3861
|
+
}
|
|
3862
|
+
throw new Error(`templates/ directory not found. Looked in:
|
|
3863
|
+
${tried.join(`
|
|
3864
|
+
`)}`);
|
|
3859
3865
|
}
|
|
3860
3866
|
var fs3, path3, __dirname = "/home/runner/work/vsceasy/vsceasy/src/lib";
|
|
3861
3867
|
var init_findProject = __esm(() => {
|
|
@@ -3867,7 +3873,7 @@ var init_findProject = __esm(() => {
|
|
|
3867
3873
|
function toTitle(s) {
|
|
3868
3874
|
return s.replace(/[-_]+/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
3869
3875
|
}
|
|
3870
|
-
var import_cli_maker, path4,
|
|
3876
|
+
var import_cli_maker, path4, createCommand, create_default;
|
|
3871
3877
|
var init_create = __esm(() => {
|
|
3872
3878
|
init_scaffold();
|
|
3873
3879
|
init_findProject();
|
|
@@ -3900,7 +3906,7 @@ var init_create = __esm(() => {
|
|
|
3900
3906
|
ui,
|
|
3901
3907
|
preset,
|
|
3902
3908
|
targetDir,
|
|
3903
|
-
templatesRoot: findTemplatesRoot(
|
|
3909
|
+
templatesRoot: findTemplatesRoot()
|
|
3904
3910
|
});
|
|
3905
3911
|
const rel = path4.relative(process.cwd(), targetDir) || ".";
|
|
3906
3912
|
console.log(`
|
|
@@ -4821,7 +4827,7 @@ function parseFieldLine(raw) {
|
|
|
4821
4827
|
|
|
4822
4828
|
// src/lib/wizard/run.ts
|
|
4823
4829
|
async function runWizard(opts = {}) {
|
|
4824
|
-
const templatesRoot = opts.templatesRoot ?? findTemplatesRoot(
|
|
4830
|
+
const templatesRoot = opts.templatesRoot ?? findTemplatesRoot();
|
|
4825
4831
|
const cwd = opts.cwd ?? process.cwd();
|
|
4826
4832
|
let projectRoot = null;
|
|
4827
4833
|
try {
|
|
@@ -5059,7 +5065,7 @@ function hintGen(genRan) {
|
|
|
5059
5065
|
function toTitle2(s) {
|
|
5060
5066
|
return s.replace(/[-_]+/g, " ").replace(/\b\w/g, (c) => c.toUpperCase()).trim();
|
|
5061
5067
|
}
|
|
5062
|
-
var path13,
|
|
5068
|
+
var path13, GREEN2, DIM2, BOLD2, RST2, CYAN2, YELLOW2;
|
|
5063
5069
|
var init_run = __esm(() => {
|
|
5064
5070
|
init_interactive();
|
|
5065
5071
|
init_findProject();
|
|
@@ -5075,7 +5081,7 @@ var init_run = __esm(() => {
|
|
|
5075
5081
|
});
|
|
5076
5082
|
|
|
5077
5083
|
// src/commands/wizard.ts
|
|
5078
|
-
var
|
|
5084
|
+
var wizardCommand2, wizard_default;
|
|
5079
5085
|
var init_wizard = __esm(() => {
|
|
5080
5086
|
init_run();
|
|
5081
5087
|
init_findProject();
|
|
@@ -5085,7 +5091,7 @@ var init_wizard = __esm(() => {
|
|
|
5085
5091
|
params: [],
|
|
5086
5092
|
action: async () => {
|
|
5087
5093
|
try {
|
|
5088
|
-
await runWizard({ templatesRoot: findTemplatesRoot(
|
|
5094
|
+
await runWizard({ templatesRoot: findTemplatesRoot() });
|
|
5089
5095
|
} catch (err) {
|
|
5090
5096
|
console.error(`
|
|
5091
5097
|
✗ ${err.message}
|
|
@@ -6231,7 +6237,7 @@ function labelFor(status) {
|
|
|
6231
6237
|
return "TEMPLATE MISSING";
|
|
6232
6238
|
}
|
|
6233
6239
|
}
|
|
6234
|
-
var import_cli_maker3,
|
|
6240
|
+
var import_cli_maker3, ICONS2, COLORS2, upgradeCommand, upgrade_default;
|
|
6235
6241
|
var init_upgrade2 = __esm(() => {
|
|
6236
6242
|
init_upgrade();
|
|
6237
6243
|
init_findProject();
|
|
@@ -6280,7 +6286,7 @@ var init_upgrade2 = __esm(() => {
|
|
|
6280
6286
|
action: async (args) => {
|
|
6281
6287
|
try {
|
|
6282
6288
|
const projectRoot = findProjectRoot();
|
|
6283
|
-
const templatesRoot = findTemplatesRoot(
|
|
6289
|
+
const templatesRoot = findTemplatesRoot();
|
|
6284
6290
|
const apply = args.apply === true || args.apply === "true";
|
|
6285
6291
|
const result = upgrade({
|
|
6286
6292
|
projectRoot,
|
|
@@ -6337,7 +6343,7 @@ ${COLORS2.bold}vsceasy upgrade${COLORS2.reset} ${COLORS2.dim}— ${projectRoot}$
|
|
|
6337
6343
|
});
|
|
6338
6344
|
|
|
6339
6345
|
// src/commands/panel/add.ts
|
|
6340
|
-
var import_cli_maker4, path16,
|
|
6346
|
+
var import_cli_maker4, path16, addPanelCommand, add_default;
|
|
6341
6347
|
var init_add6 = __esm(() => {
|
|
6342
6348
|
init_add2();
|
|
6343
6349
|
init_findProject();
|
|
@@ -6367,7 +6373,7 @@ var init_add6 = __esm(() => {
|
|
|
6367
6373
|
action: async (args) => {
|
|
6368
6374
|
try {
|
|
6369
6375
|
const projectRoot = findProjectRoot();
|
|
6370
|
-
const templatesRoot = findTemplatesRoot(
|
|
6376
|
+
const templatesRoot = findTemplatesRoot();
|
|
6371
6377
|
const result = addPanel({
|
|
6372
6378
|
name: args.name,
|
|
6373
6379
|
title: args.title,
|
|
@@ -6464,7 +6470,7 @@ function defaultTitle(name) {
|
|
|
6464
6470
|
return "";
|
|
6465
6471
|
return name.charAt(0).toUpperCase() + name.slice(1);
|
|
6466
6472
|
}
|
|
6467
|
-
var import_cli_maker5, path18,
|
|
6473
|
+
var import_cli_maker5, path18, addMenuCommand, add_default2;
|
|
6468
6474
|
var init_add8 = __esm(() => {
|
|
6469
6475
|
init_add7();
|
|
6470
6476
|
init_findProject();
|
|
@@ -6493,7 +6499,7 @@ var init_add8 = __esm(() => {
|
|
|
6493
6499
|
action: async (args) => {
|
|
6494
6500
|
try {
|
|
6495
6501
|
const projectRoot = findProjectRoot();
|
|
6496
|
-
const templatesRoot = findTemplatesRoot(
|
|
6502
|
+
const templatesRoot = findTemplatesRoot();
|
|
6497
6503
|
const name = String(args.name).trim();
|
|
6498
6504
|
if (!name)
|
|
6499
6505
|
throw new Error("Menu name is required");
|
|
@@ -6702,7 +6708,7 @@ function pascal(s) {
|
|
|
6702
6708
|
return "";
|
|
6703
6709
|
return cleaned.charAt(0).toUpperCase() + cleaned.slice(1);
|
|
6704
6710
|
}
|
|
6705
|
-
var import_cli_maker7, path20, fs16,
|
|
6711
|
+
var import_cli_maker7, path20, fs16, NONE_SENTINEL = "(none)", ROOT_SENTINEL2 = "(root)", WHEN_HELP, addCommandCommand, add_default3;
|
|
6706
6712
|
var init_add9 = __esm(() => {
|
|
6707
6713
|
init_add3();
|
|
6708
6714
|
init_findProject();
|
|
@@ -6795,7 +6801,7 @@ var init_add9 = __esm(() => {
|
|
|
6795
6801
|
action: async (args) => {
|
|
6796
6802
|
try {
|
|
6797
6803
|
const projectRoot = findProjectRoot();
|
|
6798
|
-
const templatesRoot = findTemplatesRoot(
|
|
6804
|
+
const templatesRoot = findTemplatesRoot();
|
|
6799
6805
|
const name = String(args.name).trim();
|
|
6800
6806
|
if (!name)
|
|
6801
6807
|
throw new Error("Command name is required");
|
|
@@ -7202,7 +7208,7 @@ var init_add12 = __esm(() => {
|
|
|
7202
7208
|
});
|
|
7203
7209
|
|
|
7204
7210
|
// src/commands/statusBar/add.ts
|
|
7205
|
-
var import_cli_maker9, path24,
|
|
7211
|
+
var import_cli_maker9, path24, addStatusBarCommand, add_default5;
|
|
7206
7212
|
var init_add13 = __esm(() => {
|
|
7207
7213
|
init_add12();
|
|
7208
7214
|
init_findProject();
|
|
@@ -7340,7 +7346,7 @@ var init_add13 = __esm(() => {
|
|
|
7340
7346
|
action: async (args) => {
|
|
7341
7347
|
try {
|
|
7342
7348
|
const projectRoot = findProjectRoot();
|
|
7343
|
-
const templatesRoot = findTemplatesRoot(
|
|
7349
|
+
const templatesRoot = findTemplatesRoot();
|
|
7344
7350
|
const isNewCmd = args.bindTo === "create new command";
|
|
7345
7351
|
const isPanel = args.bindTo === "panel";
|
|
7346
7352
|
const isMenu = args.bindTo === "menu";
|
|
@@ -7511,7 +7517,7 @@ function pascal2(s) {
|
|
|
7511
7517
|
return "";
|
|
7512
7518
|
return cleaned.charAt(0).toUpperCase() + cleaned.slice(1);
|
|
7513
7519
|
}
|
|
7514
|
-
var import_cli_maker10, path26,
|
|
7520
|
+
var import_cli_maker10, path26, addSubpanelCommand, add_default6;
|
|
7515
7521
|
var init_add15 = __esm(() => {
|
|
7516
7522
|
init_add14();
|
|
7517
7523
|
init_findProject();
|
|
@@ -7554,7 +7560,7 @@ var init_add15 = __esm(() => {
|
|
|
7554
7560
|
action: async (args) => {
|
|
7555
7561
|
try {
|
|
7556
7562
|
const projectRoot = findProjectRoot();
|
|
7557
|
-
const templatesRoot = findTemplatesRoot(
|
|
7563
|
+
const templatesRoot = findTemplatesRoot();
|
|
7558
7564
|
const result = addSubpanel({
|
|
7559
7565
|
name: String(args.name),
|
|
7560
7566
|
title: args.title ? String(args.title) : undefined,
|
|
@@ -7637,7 +7643,7 @@ var init_add16 = __esm(() => {
|
|
|
7637
7643
|
});
|
|
7638
7644
|
|
|
7639
7645
|
// src/commands/treeView/add.ts
|
|
7640
|
-
var import_cli_maker11, path28,
|
|
7646
|
+
var import_cli_maker11, path28, addTreeViewCommand, add_default7;
|
|
7641
7647
|
var init_add17 = __esm(() => {
|
|
7642
7648
|
init_add16();
|
|
7643
7649
|
init_edit();
|
|
@@ -7667,7 +7673,7 @@ var init_add17 = __esm(() => {
|
|
|
7667
7673
|
action: async (args) => {
|
|
7668
7674
|
try {
|
|
7669
7675
|
const projectRoot = findProjectRoot();
|
|
7670
|
-
const templatesRoot = findTemplatesRoot(
|
|
7676
|
+
const templatesRoot = findTemplatesRoot();
|
|
7671
7677
|
const result = addTreeView({
|
|
7672
7678
|
name: String(args.name).trim(),
|
|
7673
7679
|
menu: String(args.menu).trim(),
|
|
@@ -7752,7 +7758,7 @@ var init_testSetup = __esm(() => {
|
|
|
7752
7758
|
});
|
|
7753
7759
|
|
|
7754
7760
|
// src/commands/test/setup.ts
|
|
7755
|
-
var import_cli_maker12, path30,
|
|
7761
|
+
var import_cli_maker12, path30, testSetupCommand, setup_default;
|
|
7756
7762
|
var init_setup = __esm(() => {
|
|
7757
7763
|
init_testSetup();
|
|
7758
7764
|
init_findProject();
|
|
@@ -7767,7 +7773,7 @@ var init_setup = __esm(() => {
|
|
|
7767
7773
|
action: async (args) => {
|
|
7768
7774
|
try {
|
|
7769
7775
|
const projectRoot = findProjectRoot();
|
|
7770
|
-
const templatesRoot = findTemplatesRoot(
|
|
7776
|
+
const templatesRoot = findTemplatesRoot();
|
|
7771
7777
|
const result = setupTests({ projectRoot, templatesRoot, force: !!args.force });
|
|
7772
7778
|
const rel = (p) => path30.relative(projectRoot, p);
|
|
7773
7779
|
console.log(`
|
|
@@ -7861,7 +7867,7 @@ var init_init2 = __esm(() => {
|
|
|
7861
7867
|
});
|
|
7862
7868
|
|
|
7863
7869
|
// src/commands/publish/init.ts
|
|
7864
|
-
var import_cli_maker13, path32,
|
|
7870
|
+
var import_cli_maker13, path32, publishInitCommand, init_default;
|
|
7865
7871
|
var init_init3 = __esm(() => {
|
|
7866
7872
|
init_init2();
|
|
7867
7873
|
init_findProject();
|
|
@@ -7876,7 +7882,7 @@ var init_init3 = __esm(() => {
|
|
|
7876
7882
|
action: async (args) => {
|
|
7877
7883
|
try {
|
|
7878
7884
|
const projectRoot = findProjectRoot();
|
|
7879
|
-
const templatesRoot = findTemplatesRoot(
|
|
7885
|
+
const templatesRoot = findTemplatesRoot();
|
|
7880
7886
|
const result = publishInit({
|
|
7881
7887
|
projectRoot,
|
|
7882
7888
|
templatesRoot,
|
|
@@ -7912,7 +7918,7 @@ var init_init3 = __esm(() => {
|
|
|
7912
7918
|
function capitalize(s) {
|
|
7913
7919
|
return s.charAt(0).toUpperCase() + s.slice(1);
|
|
7914
7920
|
}
|
|
7915
|
-
var import_cli_maker14, path33,
|
|
7921
|
+
var import_cli_maker14, path33, addHelperCommand, add_default8;
|
|
7916
7922
|
var init_add18 = __esm(() => {
|
|
7917
7923
|
init_add4();
|
|
7918
7924
|
init_findProject();
|
|
@@ -7939,7 +7945,7 @@ var init_add18 = __esm(() => {
|
|
|
7939
7945
|
action: async (args) => {
|
|
7940
7946
|
try {
|
|
7941
7947
|
const projectRoot = findProjectRoot();
|
|
7942
|
-
const templatesRoot = findTemplatesRoot(
|
|
7948
|
+
const templatesRoot = findTemplatesRoot();
|
|
7943
7949
|
const result = addHelper({
|
|
7944
7950
|
kind: String(args.kind),
|
|
7945
7951
|
force: !!args.force,
|
|
@@ -8072,7 +8078,7 @@ function resolveTrigger(args) {
|
|
|
8072
8078
|
return { on: String(args.on).trim() };
|
|
8073
8079
|
return { onFile: String(args.onFile).trim() };
|
|
8074
8080
|
}
|
|
8075
|
-
var import_cli_maker15, path35,
|
|
8081
|
+
var import_cli_maker15, path35, JOB_HELP, ON_EVENTS, addJobCommand, add_default9;
|
|
8076
8082
|
var init_add20 = __esm(() => {
|
|
8077
8083
|
init_add19();
|
|
8078
8084
|
init_findProject();
|
|
@@ -8111,7 +8117,7 @@ var init_add20 = __esm(() => {
|
|
|
8111
8117
|
action: async (args) => {
|
|
8112
8118
|
try {
|
|
8113
8119
|
const projectRoot = findProjectRoot();
|
|
8114
|
-
const templatesRoot = findTemplatesRoot(
|
|
8120
|
+
const templatesRoot = findTemplatesRoot();
|
|
8115
8121
|
const trigger = resolveTrigger(args);
|
|
8116
8122
|
const result = addJob({
|
|
8117
8123
|
name: String(args.name).trim(),
|
|
@@ -8195,7 +8201,7 @@ var init_wire = __esm(() => {
|
|
|
8195
8201
|
});
|
|
8196
8202
|
|
|
8197
8203
|
// src/commands/db/init.ts
|
|
8198
|
-
var import_cli_maker16, path37,
|
|
8204
|
+
var import_cli_maker16, path37, dbInitCommand, init_default2;
|
|
8199
8205
|
var init_init4 = __esm(() => {
|
|
8200
8206
|
init_init();
|
|
8201
8207
|
init_wire();
|
|
@@ -8224,7 +8230,7 @@ var init_init4 = __esm(() => {
|
|
|
8224
8230
|
action: async (args) => {
|
|
8225
8231
|
try {
|
|
8226
8232
|
const projectRoot = findProjectRoot();
|
|
8227
|
-
const templatesRoot = findTemplatesRoot(
|
|
8233
|
+
const templatesRoot = findTemplatesRoot();
|
|
8228
8234
|
const result = initDb({
|
|
8229
8235
|
projectRoot,
|
|
8230
8236
|
templatesRoot,
|
|
@@ -8298,7 +8304,7 @@ function pascal4(s) {
|
|
|
8298
8304
|
function plural(s) {
|
|
8299
8305
|
return `${pascal4(s)}s`;
|
|
8300
8306
|
}
|
|
8301
|
-
var import_cli_maker17, path38,
|
|
8307
|
+
var import_cli_maker17, path38, FIELD_HELP, addModelCommand, add_default10;
|
|
8302
8308
|
var init_add21 = __esm(() => {
|
|
8303
8309
|
init_add5();
|
|
8304
8310
|
init_init();
|
|
@@ -8347,7 +8353,7 @@ var init_add21 = __esm(() => {
|
|
|
8347
8353
|
action: async (args) => {
|
|
8348
8354
|
try {
|
|
8349
8355
|
const projectRoot = findProjectRoot();
|
|
8350
|
-
const templatesRoot = findTemplatesRoot(
|
|
8356
|
+
const templatesRoot = findTemplatesRoot();
|
|
8351
8357
|
if (!dbExists(projectRoot)) {
|
|
8352
8358
|
throw new Error("No `src/helpers/db.ts` found. Run `vsceasy db init` first.");
|
|
8353
8359
|
}
|
|
@@ -8798,7 +8804,7 @@ var init_add22 = __esm(() => {
|
|
|
8798
8804
|
});
|
|
8799
8805
|
|
|
8800
8806
|
// src/commands/crud/add.ts
|
|
8801
|
-
var import_cli_maker18, path42, fs28,
|
|
8807
|
+
var import_cli_maker18, path42, fs28, NONE_SENTINEL2 = "(no menu)", NEW_SENTINEL = "(create new menu)", addCrudCommand, add_default11;
|
|
8802
8808
|
var init_add23 = __esm(() => {
|
|
8803
8809
|
init_add22();
|
|
8804
8810
|
init_edit();
|
|
@@ -8849,7 +8855,7 @@ var init_add23 = __esm(() => {
|
|
|
8849
8855
|
action: async (args) => {
|
|
8850
8856
|
try {
|
|
8851
8857
|
const projectRoot = findProjectRoot();
|
|
8852
|
-
const templatesRoot = findTemplatesRoot(
|
|
8858
|
+
const templatesRoot = findTemplatesRoot();
|
|
8853
8859
|
let menuSpec;
|
|
8854
8860
|
const choice = String(args.menu ?? NONE_SENTINEL2);
|
|
8855
8861
|
if (choice === NONE_SENTINEL2) {
|
|
@@ -8894,7 +8900,7 @@ var init_add23 = __esm(() => {
|
|
|
8894
8900
|
});
|
|
8895
8901
|
|
|
8896
8902
|
// src/commands/components/add.ts
|
|
8897
|
-
var import_cli_maker19, path43,
|
|
8903
|
+
var import_cli_maker19, path43, addComponentsCommand, add_default12;
|
|
8898
8904
|
var init_add24 = __esm(() => {
|
|
8899
8905
|
init_add();
|
|
8900
8906
|
init_findProject();
|
|
@@ -8914,7 +8920,7 @@ var init_add24 = __esm(() => {
|
|
|
8914
8920
|
action: async (args) => {
|
|
8915
8921
|
try {
|
|
8916
8922
|
const projectRoot = findProjectRoot();
|
|
8917
|
-
const templatesRoot = findTemplatesRoot(
|
|
8923
|
+
const templatesRoot = findTemplatesRoot();
|
|
8918
8924
|
const result = addComponents({ projectRoot, templatesRoot, force: !!args.force });
|
|
8919
8925
|
const rel = (p) => path43.relative(projectRoot, p);
|
|
8920
8926
|
console.log(`
|
|
@@ -9006,7 +9012,7 @@ var init_cli = __esm(() => {
|
|
|
9006
9012
|
import_cli_maker20 = __toESM(require_dist(), 1);
|
|
9007
9013
|
cli = new import_cli_maker20.CLI("vsceasy", "Build VS Code extensions fast — React UI + typed RPC bridge + zero-config build.", {
|
|
9008
9014
|
interactive: true,
|
|
9009
|
-
version: "0.1.
|
|
9015
|
+
version: "0.1.4",
|
|
9010
9016
|
introAnimation: {
|
|
9011
9017
|
enabled: true,
|
|
9012
9018
|
preset: "retro-space",
|
package/dist/index.js
CHANGED
|
@@ -2258,16 +2258,22 @@ function findProjectRoot(start = process.cwd()) {
|
|
|
2258
2258
|
dir = path14.dirname(dir);
|
|
2259
2259
|
}
|
|
2260
2260
|
}
|
|
2261
|
-
function findTemplatesRoot(fromFile = __dirname) {
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
if (fs14.existsSync(
|
|
2269
|
-
return
|
|
2270
|
-
|
|
2261
|
+
function findTemplatesRoot(fromFile = process.argv[1] ?? __dirname) {
|
|
2262
|
+
let dir = path14.dirname(path14.resolve(fromFile));
|
|
2263
|
+
const { root } = path14.parse(dir);
|
|
2264
|
+
const tried = [];
|
|
2265
|
+
while (true) {
|
|
2266
|
+
const candidate = path14.join(dir, "templates");
|
|
2267
|
+
tried.push(candidate);
|
|
2268
|
+
if (fs14.existsSync(candidate))
|
|
2269
|
+
return candidate;
|
|
2270
|
+
if (dir === root)
|
|
2271
|
+
break;
|
|
2272
|
+
dir = path14.dirname(dir);
|
|
2273
|
+
}
|
|
2274
|
+
throw new Error(`templates/ directory not found. Looked in:
|
|
2275
|
+
${tried.join(`
|
|
2276
|
+
`)}`);
|
|
2271
2277
|
}
|
|
2272
2278
|
var fs14, path14, __dirname = "/home/runner/work/vsceasy/vsceasy/src/lib";
|
|
2273
2279
|
var init_findProject = __esm(() => {
|
|
@@ -7,4 +7,13 @@ export declare function findProjectRoot(start?: string): string;
|
|
|
7
7
|
* Resolves the bundled templates/ directory. Works whether the CLI runs from
|
|
8
8
|
* the source tree (src/) or the compiled dist/.
|
|
9
9
|
*/
|
|
10
|
+
/**
|
|
11
|
+
* Resolves the bundled templates/ directory by walking up from `fromFile`
|
|
12
|
+
* until a directory containing `templates/` is found.
|
|
13
|
+
*
|
|
14
|
+
* Callers must pass a runtime-real path (e.g. `process.argv[1]`, the CLI entry
|
|
15
|
+
* node actually executes). Do NOT pass `__dirname`: the bundler inlines it as
|
|
16
|
+
* the absolute build-machine path (e.g. /home/runner/work/.../src/commands/x),
|
|
17
|
+
* which does not exist on a user's machine.
|
|
18
|
+
*/
|
|
10
19
|
export declare function findTemplatesRoot(fromFile?: string): string;
|
package/dist/lib/wizard/run.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* to the same lib functions the CLI commands use. Anything not wired here is
|
|
5
5
|
* surfaced as the exact `vsceasy …` command to run.
|
|
6
6
|
*
|
|
7
|
-
* Designed for `findTemplatesRoot(
|
|
7
|
+
* Designed for `findTemplatesRoot()` to resolve the bundled templates
|
|
8
8
|
* whether running from src/ or dist/.
|
|
9
9
|
*/
|
|
10
10
|
export declare function runWizard(opts?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vsceasy/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
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": {
|