wad-lab 1.1.4 → 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 +30 -3
- package/package.json +1 -1
- package/templates/vue-axios-basic/src/App.vue +405 -405
- package/templates/vue-axios-pinia/src/App.vue +427 -427
- package/templates/vue-axios-props-emits/src/App.vue +167 -167
- package/templates/vue-axios-props-emits/src/components/DepartmentForm.vue +98 -98
- package/templates/vue-axios-props-emits/src/components/DepartmentList.vue +91 -91
- package/templates/vue-axios-props-emits/src/components/EmployeeForm.vue +128 -128
- package/templates/vue-axios-props-emits/src/components/EmployeeList.vue +94 -94
- package/templates/vue-axios-router/src/App.vue +90 -90
- package/templates/vue-axios-router/src/views/AddEmployeeView.vue +247 -247
- package/templates/vue-axios-router/src/views/DepartmentView.vue +273 -273
- package/templates/vue-axios-router/src/views/EmployeeView.vue +196 -196
- package/templates/vue-axios-router/src/views/HomeDashboardView.vue +263 -263
- package/templates/vue-axios-router-props/src/App.vue +59 -59
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
|
|
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
|
-
|
|
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
|
|