wad-lab 1.1.5 → 1.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/bin/index.js CHANGED
@@ -44,7 +44,7 @@ const frontendOptions = [
44
44
  const templates = [
45
45
  { name: 'all (Unpack All 54 Templates)', value: 'all' },
46
46
  { name: 'servlet-voter-eligibility (Name & Age Voting Eligibility Check)', value: 'servlet-voter-eligibility' },
47
- { name: 'fullstack-springboot-vue (Spring Boot Backend + Selectable Vue Frontend)', value: 'fullstack-springboot-vue' },
47
+ { name: 'fullstack-springboot-vue (Spring Boot: 2 Models, 2 Repos, 1 Service, 1 Controller + Selectable Vue 3 Axios Frontend)', value: 'fullstack-springboot-vue' },
48
48
  { name: 'springboot-2model-1controller-api (Spring Boot 1 Service, 1 Controller, 2 Models, 2 Repos)', value: 'springboot-2model-1controller-api' },
49
49
  { name: 'vue-axios-basic (Vue 3 + Axios Direct CRUD)', value: 'vue-axios-basic' },
50
50
  { name: 'vue-axios-props-emits (Vue 3 + Axios + Props & Emits)', value: 'vue-axios-props-emits' },
@@ -99,6 +99,7 @@ const templates = [
99
99
  { name: 'springboot-library-api (Variant 4 — Library Catalog & Analytics API)', value: 'springboot-library-api' }
100
100
  ];
101
101
 
102
+ const PAGE_SIZE = 12;
102
103
  let selectedIndex = 0;
103
104
  const selectedValues = new Set();
104
105
  const templatesRoot = path.join(__dirname, '..', 'templates');
@@ -111,14 +112,40 @@ function renderMenu() {
111
112
  console.log('Press [SPACE] to select / deselect (multi-select supported)');
112
113
  console.log('Press [ENTER] to confirm and proceed\n');
113
114
 
114
- templates.forEach((t, i) => {
115
+ const total = templates.length;
116
+ let start = selectedIndex - Math.floor(PAGE_SIZE / 2);
117
+ if (start < 0) start = 0;
118
+ if (start + PAGE_SIZE > total) {
119
+ start = Math.max(0, total - PAGE_SIZE);
120
+ }
121
+ const end = Math.min(start + PAGE_SIZE, total);
122
+
123
+ if (start > 0) {
124
+ console.log(` ▲ (${start} more above)`);
125
+ } else {
126
+ console.log(' --- Top of list ---');
127
+ }
128
+
129
+ for (let i = start; i < end; i++) {
130
+ const t = templates[i];
115
131
  const isCursor = i === selectedIndex;
116
132
  const isChecked = selectedValues.has(t.value);
117
133
  const box = isChecked ? '[x]' : '[ ]';
118
134
  const prefix = isCursor ? '> ' : ' ';
119
135
  console.log(prefix + box + ' ' + t.name);
120
- });
136
+ }
137
+
138
+ if (end < total) {
139
+ console.log(` ▼ (${total - end} more below)`);
140
+ } else {
141
+ console.log(' --- Bottom of list ---');
142
+ }
121
143
 
144
+ const selectedDisplay = selectedValues.size === 0
145
+ ? templates[selectedIndex].name
146
+ : `${selectedValues.size} template(s) selected: ${Array.from(selectedValues).join(', ')}`;
147
+ console.log(`\n[${selectedIndex + 1}/${total}] Focused: ${templates[selectedIndex].value}`);
148
+ console.log(`Selection: ${selectedDisplay}`);
122
149
  console.log('\nPress Ctrl+C to cancel.');
123
150
  }
124
151
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wad-lab",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "Interactive CLI for WAD Lab starter templates compatible with Node 12+",
5
5
  "bin": {
6
6
  "wad-lab": "./bin/index.js"