lapeh 3.0.7 ā 3.0.8
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/doc/en/CHANGELOG.md +15 -0
- package/doc/en/INTRODUCTION.md +1 -1
- package/doc/id/CHANGELOG.md +15 -0
- package/doc/id/INTRODUCTION.md +2 -2
- package/package.json +1 -1
- package/scripts/release.js +66 -37
package/doc/en/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
File ini mencatat semua perubahan, pembaruan, dan perbaikan yang dilakukan pada framework Lapeh, diurutkan berdasarkan tanggal.
|
|
4
4
|
|
|
5
|
+
## [2025-12-30] - Tuesday, December 30, 2025 - Documentation & CLI (v3.0.7)
|
|
6
|
+
|
|
7
|
+
### š Documentation
|
|
8
|
+
|
|
9
|
+
- **Project Structure Guide**: Comprehensive update to `STRUCTURE.md` to accurately reflect the No-ORM architecture and Core folder separation.
|
|
10
|
+
- **Scripts Documentation**: Added detailed explanation for `release.js` and `make-module.js` automation scripts.
|
|
11
|
+
|
|
12
|
+
### š ļø CLI Improvements
|
|
13
|
+
|
|
14
|
+
- **Cleanup**: Improved `init` and `upgrade` commands to better handle legacy configuration files.
|
|
15
|
+
|
|
5
16
|
## [2025-12-30] - Tuesday, December 30, 2025 - Major Release v3.0.0 (No-ORM)
|
|
6
17
|
|
|
7
18
|
### ā ļø Breaking Changes
|
|
@@ -18,6 +29,10 @@ File ini mencatat semua perubahan, pembaruan, dan perbaikan yang dilakukan pada
|
|
|
18
29
|
- **Redis Caching**: Redis caching implementation on Pets controller.
|
|
19
30
|
- **Documentation**: Comprehensive update to documentation to reflect database agnostic philosophy.
|
|
20
31
|
|
|
32
|
+
## ā ļø Deprecated Versions
|
|
33
|
+
|
|
34
|
+
Starting from release v3.0.0, all previous versions (v1.x and v2.x) are considered **DEPRECATED**. There will be no further feature updates or bug fixes for these versions unless for critical security issues. Users are strongly advised to migrate to v3.0.0.
|
|
35
|
+
|
|
21
36
|
## [2025-12-29] - Monday, December 29, 2025 - CLI Init Bug Fix (v2.6.7)
|
|
22
37
|
|
|
23
38
|
### š ļø Bug Fixes
|
package/doc/en/INTRODUCTION.md
CHANGED
|
@@ -52,7 +52,7 @@ How does Lapeh handle a single request from a user?
|
|
|
52
52
|
5. **Auth Middleware** (Optional): Check JWT token & Role.
|
|
53
53
|
6. **Validator** (Optional): Validate body/query input.
|
|
54
54
|
7. **Controller**: Main business logic executed.
|
|
55
|
-
- Call Database (
|
|
55
|
+
- Call Database (via `db` adapter).
|
|
56
56
|
- Call Cache (Redis).
|
|
57
57
|
8. **Serializer**: Data formatted & sanitized (e.g., hide password).
|
|
58
58
|
9. **Response**: JSON sent back to user.
|
package/doc/id/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
File ini mencatat semua perubahan, pembaruan, dan perbaikan yang dilakukan pada framework Lapeh, diurutkan berdasarkan tanggal.
|
|
4
4
|
|
|
5
|
+
## [2025-12-30] - Selasa, 30 Desember 2025 - Dokumentasi & CLI (v3.0.7)
|
|
6
|
+
|
|
7
|
+
### š Dokumentasi
|
|
8
|
+
|
|
9
|
+
- **Panduan Struktur Proyek**: Pembaruan komprehensif pada `STRUCTURE.md` untuk mencerminkan arsitektur No-ORM dan pemisahan folder Core.
|
|
10
|
+
- **Dokumentasi Scripts**: Penjelasan mendalam untuk script otomatisasi `release.js` dan `make-module.js`.
|
|
11
|
+
|
|
12
|
+
### š ļø Perbaikan CLI
|
|
13
|
+
|
|
14
|
+
- **Cleanup**: Peningkatan perintah `init` dan `upgrade` untuk menangani file konfigurasi lama dengan lebih baik.
|
|
15
|
+
|
|
5
16
|
## [2025-12-30] - Selasa, 30 Desember 2025 - Major Release v3.0.0 (No-ORM)
|
|
6
17
|
|
|
7
18
|
### ā ļø Perubahan Besar (Breaking Changes)
|
|
@@ -18,6 +29,10 @@ File ini mencatat semua perubahan, pembaruan, dan perbaikan yang dilakukan pada
|
|
|
18
29
|
- **Redis Caching**: Implementasi caching Redis pada Pets controller.
|
|
19
30
|
- **Dokumentasi**: Pembaruan menyeluruh pada dokumentasi untuk mencerminkan filosofi agnostik database.
|
|
20
31
|
|
|
32
|
+
## ā ļø Versi Usang (Deprecated Versions)
|
|
33
|
+
|
|
34
|
+
Mulai dari rilis v3.0.0, semua versi sebelumnya (v1.x dan v2.x) dianggap **DEPRECATED** (usang). Tidak akan ada lagi pembaruan fitur atau perbaikan bug untuk versi-versi tersebut kecuali untuk masalah keamanan kritis. Pengguna sangat disarankan untuk bermigrasi ke v3.0.0.
|
|
35
|
+
|
|
21
36
|
## [2025-12-29] - Senin, 29 Desember 2025 - Perbaikan Bug CLI Init (v2.6.7)
|
|
22
37
|
|
|
23
38
|
### š ļø Perbaikan Bug
|
package/doc/id/INTRODUCTION.md
CHANGED
|
@@ -19,7 +19,7 @@ Di ekosistem Node.js, developer sering mengalami "Decision Fatigue" (Kelelahan m
|
|
|
19
19
|
|
|
20
20
|
Lapeh menjawab semua itu dengan **Opinionated Defaults**:
|
|
21
21
|
|
|
22
|
-
1. **
|
|
22
|
+
1. **Database**: Agnostic (Bebas pilih: Prisma, TypeORM, Drizzle, dll).
|
|
23
23
|
2. **Validasi**: Zod (Validasi skema yang kuat dan mudah dibaca).
|
|
24
24
|
3. **Struktur**: MVC Modular (Controller, Model, Route terpisah tapi kohesif).
|
|
25
25
|
4. **Auth**: JWT + RBAC (Role Based Access Control) siap pakai.
|
|
@@ -52,7 +52,7 @@ Bagaimana Lapeh menangani satu permintaan dari user?
|
|
|
52
52
|
5. **Auth Middleware** (Opsional): Cek token JWT & Role.
|
|
53
53
|
6. **Validator** (Opsional): Validasi input body/query.
|
|
54
54
|
7. **Controller**: Logika bisnis utama dijalankan.
|
|
55
|
-
- Panggil Database (
|
|
55
|
+
- Panggil Database (via `db` adapter).
|
|
56
56
|
- Panggil Cache (Redis).
|
|
57
57
|
8. **Serializer**: Data diformat & disanitasi (misal: hide password).
|
|
58
58
|
9. **Response**: JSON dikirim kembali ke user.
|
package/package.json
CHANGED
package/scripts/release.js
CHANGED
|
@@ -103,6 +103,26 @@ function generateAutoCommitMessage() {
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
// Helper to extract changelog entry
|
|
107
|
+
function extractChangelogEntry(filePath, version) {
|
|
108
|
+
try {
|
|
109
|
+
if (!fs.existsSync(filePath)) return null;
|
|
110
|
+
const content = fs.readFileSync(filePath, 'utf8');
|
|
111
|
+
// Regex to find the section for the version.
|
|
112
|
+
// Matches "## [YYYY-MM-DD] ... vX.X.X ..." until the next "## ["
|
|
113
|
+
// We allow the version to be anywhere in the header line
|
|
114
|
+
const regex = new RegExp(`## \\[.*?\\] - .*?v${version}.*?([\\s\\S]*?)(?=\\n## \\[|$)`, 'i');
|
|
115
|
+
const match = content.match(regex);
|
|
116
|
+
|
|
117
|
+
if (match && match[1]) {
|
|
118
|
+
return match[1].trim();
|
|
119
|
+
}
|
|
120
|
+
return null;
|
|
121
|
+
} catch (e) {
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
106
126
|
async function main() {
|
|
107
127
|
try {
|
|
108
128
|
// 0. Quick Git Update Check
|
|
@@ -158,22 +178,48 @@ async function main() {
|
|
|
158
178
|
let blogTitleEN = '';
|
|
159
179
|
|
|
160
180
|
if (createBlog.toLowerCase() === 'y') {
|
|
161
|
-
console.log('\nš¤ Auto-detecting changes from Git...');
|
|
181
|
+
console.log('\nš¤ Auto-detecting changes from Git & Changelog...');
|
|
162
182
|
const changes = getGitChanges();
|
|
163
183
|
|
|
164
|
-
//
|
|
165
|
-
const
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
184
|
+
// Try to read from CHANGELOG.md first
|
|
185
|
+
const changelogID = extractChangelogEntry(path.join(rootDir, 'doc/id/CHANGELOG.md'), newVersion);
|
|
186
|
+
const changelogEN = extractChangelogEntry(path.join(rootDir, 'doc/en/CHANGELOG.md'), newVersion);
|
|
187
|
+
|
|
188
|
+
let titleID, descriptionID, featuresID, featureListID;
|
|
189
|
+
let titleEN, descriptionEN, featuresEN, featureListEN;
|
|
190
|
+
|
|
191
|
+
if (changelogID) {
|
|
192
|
+
console.log('ā
Found entry in doc/id/CHANGELOG.md');
|
|
193
|
+
// Extract title from first line of changelog entry if possible, or use default
|
|
194
|
+
// Actually usually changelog entry body starts with ### Section.
|
|
195
|
+
// We'll use a generic title and the full body as content.
|
|
196
|
+
titleID = `Update Terbaru v${newVersion}`;
|
|
197
|
+
// Try to find specific sections for description/features is hard without strict parsing.
|
|
198
|
+
// We will treat the entire changelog body as the "Features" section.
|
|
199
|
+
descriptionID = `Rilis versi ${newVersion} hadir dengan berbagai pembaruan dan perbaikan.`;
|
|
200
|
+
featureListID = changelogID;
|
|
201
|
+
} else {
|
|
202
|
+
console.log('ā ļø No entry in doc/id/CHANGELOG.md, using git logs...');
|
|
203
|
+
titleID = changes.length > 0 ? changes[0] : 'Maintenance Release';
|
|
204
|
+
descriptionID = changes.length > 0 ? `Includes: ${changes.slice(0, 2).join(', ')}` : 'Routine maintenance and updates.';
|
|
205
|
+
featureListID = changes.length > 0
|
|
206
|
+
? changes.map(f => `* **${f.trim()}**`).join('\n')
|
|
207
|
+
: '* **Routine maintenance**';
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
if (changelogEN) {
|
|
211
|
+
console.log('ā
Found entry in doc/en/CHANGELOG.md');
|
|
212
|
+
titleEN = `Latest Update v${newVersion}`;
|
|
213
|
+
descriptionEN = `Release version ${newVersion} comes with various updates and improvements.`;
|
|
214
|
+
featureListEN = changelogEN;
|
|
215
|
+
} else {
|
|
216
|
+
console.log('ā ļø No entry in doc/en/CHANGELOG.md, using git logs...');
|
|
217
|
+
titleEN = changes.length > 0 ? changes[0] : 'Maintenance Release';
|
|
218
|
+
descriptionEN = changes.length > 0 ? `Includes: ${changes.slice(0, 2).join(', ')}` : 'Routine maintenance and updates.';
|
|
219
|
+
featureListEN = changes.length > 0
|
|
220
|
+
? changes.map(f => `* **${f.trim()}**`).join('\n')
|
|
221
|
+
: '* **Routine maintenance**';
|
|
222
|
+
}
|
|
177
223
|
|
|
178
224
|
blogTitleEN = titleEN; // Save for commit message
|
|
179
225
|
|
|
@@ -183,33 +229,20 @@ async function main() {
|
|
|
183
229
|
const dateStringEn = new Date().toLocaleDateString('en-US', { month: 'long', day: 'numeric', year: 'numeric' });
|
|
184
230
|
|
|
185
231
|
const blogFileName = `release-v${newVersion}.md`;
|
|
186
|
-
|
|
187
|
-
// Generate list items
|
|
188
|
-
const featureListID = changes.length > 0
|
|
189
|
-
? changes.map(f => `* **${f.trim()}**`).join('\n')
|
|
190
|
-
: '* **Routine maintenance**';
|
|
191
|
-
|
|
192
|
-
const featureListEN = changes.length > 0
|
|
193
|
-
? changes.map(f => `* **${f.trim()}**`).join('\n')
|
|
194
|
-
: '* **Routine maintenance**';
|
|
195
232
|
|
|
196
233
|
// Indonesian Blog Content
|
|
197
234
|
const idContent = `---
|
|
198
|
-
title: "Rilis v${newVersion}
|
|
235
|
+
title: "Rilis v${newVersion}"
|
|
199
236
|
date: ${date}
|
|
200
237
|
author: Tim Lapeh
|
|
201
238
|
description: "${descriptionID.replace(/"/g, '\\"')}"
|
|
202
239
|
---
|
|
203
240
|
|
|
204
|
-
# Rilis v${newVersion}
|
|
205
|
-
|
|
206
|
-
Kami dengan senang hati mengumumkan rilis **Lapeh Framework v${newVersion}**!
|
|
207
|
-
|
|
208
|
-
## Apa yang Baru?
|
|
241
|
+
# Rilis v${newVersion}
|
|
209
242
|
|
|
210
243
|
${descriptionID}
|
|
211
244
|
|
|
212
|
-
|
|
245
|
+
## Rincian Perubahan š
|
|
213
246
|
|
|
214
247
|
${featureListID}
|
|
215
248
|
|
|
@@ -224,21 +257,17 @@ Terima kasih telah menggunakan Lapeh Framework!
|
|
|
224
257
|
|
|
225
258
|
// English Blog Content
|
|
226
259
|
const enContent = `---
|
|
227
|
-
title: "Release v${newVersion}
|
|
260
|
+
title: "Release v${newVersion}"
|
|
228
261
|
date: ${date}
|
|
229
262
|
author: Lapeh Team
|
|
230
263
|
description: "${descriptionEN.replace(/"/g, '\\"')}"
|
|
231
264
|
---
|
|
232
265
|
|
|
233
|
-
# Release v${newVersion}
|
|
234
|
-
|
|
235
|
-
We are excited to announce the release of **Lapeh Framework v${newVersion}**!
|
|
236
|
-
|
|
237
|
-
## What's New?
|
|
266
|
+
# Release v${newVersion}
|
|
238
267
|
|
|
239
268
|
${descriptionEN}
|
|
240
269
|
|
|
241
|
-
|
|
270
|
+
## Change Details š
|
|
242
271
|
|
|
243
272
|
${featureListEN}
|
|
244
273
|
|