@lenne.tech/cli 1.11.0 → 1.11.1
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/docs/LT-ECOSYSTEM-GUIDE.md +378 -379
- package/docs/VENDOR-MODE-WORKFLOW.md +150 -150
- package/package.json +1 -1
|
@@ -1,90 +1,90 @@
|
|
|
1
1
|
# Vendor-Mode Workflow — Step-by-Step
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Practical guide for converting a lenne.tech fullstack project from **npm mode** to **vendor mode**, updating it, and optionally rolling back.
|
|
4
4
|
|
|
5
|
-
**
|
|
5
|
+
**In short:** In vendor mode the framework code (`@lenne.tech/nest-server`, `@lenne.tech/nuxt-extensions`) is copied directly into the project (`src/core/` and `app/core/`) instead of being installed via npm.
|
|
6
6
|
|
|
7
|
-
> **
|
|
7
|
+
> **Complete reference**: All commands and background information can be found in the [LT-ECOSYSTEM-GUIDE](./LT-ECOSYSTEM-GUIDE.md).
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Table of Contents
|
|
12
12
|
|
|
13
|
-
- [
|
|
14
|
-
- [
|
|
15
|
-
- [
|
|
16
|
-
- [
|
|
13
|
+
- [Prerequisites](#prerequisites)
|
|
14
|
+
- [Part 1: Convert npm → vendor](#part-1-convert-npm--vendor)
|
|
15
|
+
- [Part 2: Update in vendor mode](#part-2-update-in-vendor-mode)
|
|
16
|
+
- [Part 3: Roll back vendor → npm](#part-3-roll-back-vendor--npm)
|
|
17
17
|
- [Troubleshooting](#troubleshooting)
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## Prerequisites
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Before you start, make sure:
|
|
24
24
|
|
|
25
25
|
| Check | Command |
|
|
26
26
|
|-------|---------|
|
|
27
|
-
| lt CLI
|
|
28
|
-
| Claude Code
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
27
|
+
| lt CLI installed | `lt --version` |
|
|
28
|
+
| Claude Code with lt-dev plugin | `/lt-dev:plugin:check` |
|
|
29
|
+
| Project is a fullstack monorepo | Directories `projects/api/` and `projects/app/` exist |
|
|
30
|
+
| Working tree is clean | `git status` shows no uncommitted changes |
|
|
31
|
+
| You are on a feature branch | `git checkout -b feature/vendor-mode` |
|
|
32
32
|
|
|
33
33
|
---
|
|
34
34
|
|
|
35
|
-
##
|
|
35
|
+
## Part 1: Convert npm → vendor
|
|
36
36
|
|
|
37
|
-
###
|
|
37
|
+
### Step 1: Check status
|
|
38
38
|
|
|
39
39
|
**Command:**
|
|
40
40
|
```bash
|
|
41
41
|
lt status
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
**
|
|
44
|
+
**What happens:** Shows the current framework mode for backend and frontend. You expect to see `npm (@lenne.tech/nest-server dependency)` and `npm (@lenne.tech/nuxt-extensions dependency)`.
|
|
45
45
|
|
|
46
46
|
---
|
|
47
47
|
|
|
48
|
-
###
|
|
48
|
+
### Step 2: Dry-run — show plan
|
|
49
49
|
|
|
50
|
-
**Command (
|
|
50
|
+
**Command (from monorepo root):**
|
|
51
51
|
```bash
|
|
52
52
|
lt fullstack convert-mode --to vendor --dry-run
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
**
|
|
56
|
-
-
|
|
57
|
-
- Upstream
|
|
55
|
+
**What happens:** The CLI scans `projects/api/` and `projects/app/`, detects the current modes, and shows **what would happen** without making any changes. Verify the output:
|
|
56
|
+
- Both subprojects as `npm → vendor`
|
|
57
|
+
- Upstream versions are auto-detected from the respective `package.json` files
|
|
58
58
|
|
|
59
59
|
---
|
|
60
60
|
|
|
61
|
-
###
|
|
61
|
+
### Step 3: Run the conversion
|
|
62
62
|
|
|
63
63
|
**Command:**
|
|
64
64
|
```bash
|
|
65
65
|
lt fullstack convert-mode --to vendor --noConfirm
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
**
|
|
69
|
-
1. **Backend**:
|
|
70
|
-
2. **Frontend**:
|
|
68
|
+
**What happens:**
|
|
69
|
+
1. **Backend**: clones `@lenne.tech/nest-server` into `/tmp/`, copies `src/core/` + `src/index.ts` + `src/core.module.ts` + `src/test/` + `src/templates/` + `src/types/` + `LICENSE` into `projects/api/src/core/`, applies the flatten-fix (4 edge-case files), rewrites all consumer imports from `@lenne.tech/nest-server` to relative paths, merges upstream dependencies dynamically into `package.json`, converts `express` value-imports to type-imports (vendor compatibility), creates `src/core/VENDOR.md`, prepends a vendor-notice block to `CLAUDE.md`
|
|
70
|
+
2. **Frontend**: clones `@lenne.tech/nuxt-extensions` into `/tmp/`, copies `src/module.ts` + `src/runtime/` into `projects/app/app/core/`, replaces `'@lenne.tech/nuxt-extensions'` in `nuxt.config.ts` with `'./app/core/module'`, rewrites the 4 explicit consumer imports, removes the npm dependency, creates `app/core/VENDOR.md`
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
The temp directories in `/tmp/` are cleaned up automatically.
|
|
73
73
|
|
|
74
74
|
---
|
|
75
75
|
|
|
76
|
-
###
|
|
76
|
+
### Step 4: Reinstall dependencies
|
|
77
77
|
|
|
78
|
-
**Command (
|
|
78
|
+
**Command (from monorepo root):**
|
|
79
79
|
```bash
|
|
80
80
|
pnpm install
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
-
**
|
|
83
|
+
**What happens:** pnpm installs the newly merged dependencies (that transitively came from the framework) and removes `@lenne.tech/nest-server` and `@lenne.tech/nuxt-extensions` from `node_modules/`.
|
|
84
84
|
|
|
85
85
|
---
|
|
86
86
|
|
|
87
|
-
###
|
|
87
|
+
### Step 5: Validate backend
|
|
88
88
|
|
|
89
89
|
**Commands:**
|
|
90
90
|
```bash
|
|
@@ -95,14 +95,14 @@ pnpm test
|
|
|
95
95
|
cd ..
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
-
**
|
|
99
|
-
- `tsc --noEmit`: TypeScript
|
|
100
|
-
- `pnpm run lint`: oxlint
|
|
101
|
-
- `pnpm test`: vitest e2e
|
|
98
|
+
**What happens:**
|
|
99
|
+
- `tsc --noEmit`: TypeScript check over the entire backend code including the vendored `src/core/`. Expectation: no errors.
|
|
100
|
+
- `pnpm run lint`: oxlint over src/ + tests/. Expectation: 0 errors.
|
|
101
|
+
- `pnpm test`: vitest e2e suite. Expectation: all tests green (initial run may take ~10 min due to TypeScript transform of the vendored core).
|
|
102
102
|
|
|
103
103
|
---
|
|
104
104
|
|
|
105
|
-
###
|
|
105
|
+
### Step 6: Validate frontend
|
|
106
106
|
|
|
107
107
|
**Commands:**
|
|
108
108
|
```bash
|
|
@@ -112,20 +112,20 @@ pnpm run build
|
|
|
112
112
|
cd ..
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
-
**
|
|
116
|
-
- `lint`: oxlint
|
|
117
|
-
- `build`:
|
|
115
|
+
**What happens:**
|
|
116
|
+
- `lint`: oxlint over app/. Expectation: 0 errors.
|
|
117
|
+
- `build`: Nuxt build runs prepare → build → nitro output. Expectation: `✨ Build complete!`
|
|
118
118
|
|
|
119
119
|
---
|
|
120
120
|
|
|
121
|
-
###
|
|
121
|
+
### Step 7: Check status again
|
|
122
122
|
|
|
123
123
|
**Command:**
|
|
124
124
|
```bash
|
|
125
125
|
lt status
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
-
**
|
|
128
|
+
**Expected output:**
|
|
129
129
|
```
|
|
130
130
|
Monorepo Subprojects:
|
|
131
131
|
Backend: projects/api → vendor (src/core/, VENDOR.md)
|
|
@@ -134,7 +134,7 @@ Monorepo Subprojects:
|
|
|
134
134
|
|
|
135
135
|
---
|
|
136
136
|
|
|
137
|
-
###
|
|
137
|
+
### Step 8: Commit changes
|
|
138
138
|
|
|
139
139
|
**Commands:**
|
|
140
140
|
```bash
|
|
@@ -146,112 +146,112 @@ git commit -m "chore: convert fullstack to vendor mode
|
|
|
146
146
|
- Both VENDOR.md files track baseline + sync history"
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
**
|
|
149
|
+
**What happens:** The commit typically contains ~500 new files (vendored core) and modified consumer imports.
|
|
150
150
|
|
|
151
151
|
---
|
|
152
152
|
|
|
153
|
-
##
|
|
153
|
+
## Part 2: Update in vendor mode
|
|
154
154
|
|
|
155
|
-
|
|
155
|
+
After the conversion you still need to keep your project in sync with upstream changes. In vendor mode this happens **curated** via Claude Code agents.
|
|
156
156
|
|
|
157
|
-
### Workflow A:
|
|
157
|
+
### Workflow A: Comprehensive update (recommended)
|
|
158
158
|
|
|
159
159
|
**Command (in Claude Code):**
|
|
160
160
|
```
|
|
161
161
|
/lt-dev:fullstack:update-all
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
-
**
|
|
165
|
-
1. **Phase 1**:
|
|
166
|
-
2. **Phase 2**:
|
|
167
|
-
3. **Phase 3**: Backend
|
|
168
|
-
4. **Phase 4**: Frontend
|
|
169
|
-
5. **Phase 5**: Package
|
|
170
|
-
6. **Phase 6**: `CLAUDE.md
|
|
171
|
-
7. **Phase 7**: Cross-
|
|
172
|
-
8. **Phase 8**: Final
|
|
164
|
+
**What happens:**
|
|
165
|
+
1. **Phase 1**: Detects the modes of both subprojects (vendor in this case)
|
|
166
|
+
2. **Phase 2**: Generates `UPDATE_PLAN.md` with version gaps and waits for your approval
|
|
167
|
+
3. **Phase 3**: Backend sync via `nest-server-core-updater` agent (clone upstream, diff, human review, apply, reapply flatten-fix)
|
|
168
|
+
4. **Phase 4**: Frontend sync via `nuxt-extensions-core-updater` agent (clone upstream, diff, human review, apply)
|
|
169
|
+
5. **Phase 5**: Package maintenance via `npm-package-maintainer` (FULL MODE)
|
|
170
|
+
6. **Phase 6**: `CLAUDE.md` sync from upstream starters
|
|
171
|
+
7. **Phase 7**: Cross-validation (build, lint, tests for both subprojects)
|
|
172
|
+
8. **Phase 8**: Final report
|
|
173
173
|
|
|
174
174
|
---
|
|
175
175
|
|
|
176
|
-
### Workflow B:
|
|
176
|
+
### Workflow B: Update backend only
|
|
177
177
|
|
|
178
178
|
**Command:**
|
|
179
179
|
```
|
|
180
180
|
/lt-dev:backend:update-nest-server-core
|
|
181
181
|
```
|
|
182
182
|
|
|
183
|
-
**
|
|
183
|
+
**What happens:** Same as Phase 3 of Workflow A — syncs `src/core/` with upstream changes.
|
|
184
184
|
|
|
185
185
|
---
|
|
186
186
|
|
|
187
|
-
### Workflow C:
|
|
187
|
+
### Workflow C: Update frontend only
|
|
188
188
|
|
|
189
189
|
**Command:**
|
|
190
190
|
```
|
|
191
191
|
/lt-dev:frontend:update-nuxt-extensions-core
|
|
192
192
|
```
|
|
193
193
|
|
|
194
|
-
**
|
|
194
|
+
**What happens:** Same as Phase 4 of Workflow A — syncs `app/core/` with upstream changes.
|
|
195
195
|
|
|
196
196
|
---
|
|
197
197
|
|
|
198
|
-
### Workflow D: Sync
|
|
198
|
+
### Workflow D: Sync to a specific version
|
|
199
199
|
|
|
200
200
|
**Command:**
|
|
201
201
|
```
|
|
202
202
|
/lt-dev:backend:update-nest-server-core --target 11.25.0
|
|
203
203
|
```
|
|
204
204
|
|
|
205
|
-
**
|
|
205
|
+
**What happens:** Instead of syncing to HEAD, a specific upstream version is pulled. Useful for stable major/minor releases.
|
|
206
206
|
|
|
207
207
|
---
|
|
208
208
|
|
|
209
|
-
### Freshness
|
|
209
|
+
### Freshness check
|
|
210
210
|
|
|
211
|
-
**Command (in
|
|
211
|
+
**Command (available in both subprojects):**
|
|
212
212
|
```bash
|
|
213
|
-
cd projects/api #
|
|
213
|
+
cd projects/api # or projects/app
|
|
214
214
|
pnpm run check:vendor-freshness
|
|
215
215
|
```
|
|
216
216
|
|
|
217
|
-
**
|
|
217
|
+
**What happens:** Reads the baseline version from `VENDOR.md` and compares it with the current version on npm. Non-blocking warning if a newer version exists. Automatically executed by `pnpm run check`.
|
|
218
218
|
|
|
219
219
|
---
|
|
220
220
|
|
|
221
|
-
###
|
|
221
|
+
### After the update: validation
|
|
222
222
|
|
|
223
|
-
**Command (
|
|
223
|
+
**Command (from monorepo root):**
|
|
224
224
|
```bash
|
|
225
225
|
pnpm run check
|
|
226
226
|
```
|
|
227
227
|
|
|
228
|
-
**
|
|
228
|
+
**What happens:** Runs audit + format:check + lint + tests + build + server-start per subproject. Must pass green before you commit the update.
|
|
229
229
|
|
|
230
230
|
---
|
|
231
231
|
|
|
232
|
-
### Upstream
|
|
232
|
+
### Upstream contribution (optional)
|
|
233
233
|
|
|
234
|
-
|
|
234
|
+
If you have made local patches in the vendored core that are **generally useful** (bugfix, new feature, type correction), you can prepare them as upstream PRs:
|
|
235
235
|
|
|
236
|
-
**Backend
|
|
236
|
+
**Backend patches:**
|
|
237
237
|
```
|
|
238
238
|
/lt-dev:backend:contribute-nest-server-core
|
|
239
239
|
```
|
|
240
240
|
|
|
241
|
-
**Frontend
|
|
241
|
+
**Frontend patches:**
|
|
242
242
|
```
|
|
243
243
|
/lt-dev:frontend:contribute-nuxt-extensions-core
|
|
244
244
|
```
|
|
245
245
|
|
|
246
|
-
**
|
|
246
|
+
**What happens:** The agent scans `git log` since the VENDOR.md baseline, filters out cosmetic commits, categorizes substantial commits as `upstream-candidate` or `project-specific`, cherry-picks the candidates onto a fresh upstream branch, generates a PR body draft, and shows you a summary. **The push is done manually by you after review.**
|
|
247
247
|
|
|
248
248
|
---
|
|
249
249
|
|
|
250
|
-
##
|
|
250
|
+
## Part 3: Roll back vendor → npm
|
|
251
251
|
|
|
252
|
-
|
|
252
|
+
In case vendor mode doesn't work for your project or you want to go back to the npm dependency.
|
|
253
253
|
|
|
254
|
-
###
|
|
254
|
+
### Step 1: Check local patches
|
|
255
255
|
|
|
256
256
|
**Command:**
|
|
257
257
|
```bash
|
|
@@ -259,74 +259,74 @@ cat projects/api/src/core/VENDOR.md | grep -A 20 "## Local changes"
|
|
|
259
259
|
cat projects/app/app/core/VENDOR.md | grep -A 20 "## Local changes"
|
|
260
260
|
```
|
|
261
261
|
|
|
262
|
-
**
|
|
262
|
+
**What happens:** Shows the "Local changes" table from both `VENDOR.md` files. **If substantial patches are listed there, they will be lost during the rollback!**
|
|
263
263
|
|
|
264
264
|
---
|
|
265
265
|
|
|
266
|
-
###
|
|
266
|
+
### Step 2: Contribute patches upstream (if any)
|
|
267
267
|
|
|
268
|
-
**
|
|
268
|
+
**Recommendation**: Before rolling back, contribute the local patches:
|
|
269
269
|
|
|
270
270
|
```
|
|
271
271
|
/lt-dev:backend:contribute-nest-server-core
|
|
272
272
|
/lt-dev:frontend:contribute-nuxt-extensions-core
|
|
273
273
|
```
|
|
274
274
|
|
|
275
|
-
**
|
|
275
|
+
**What happens:** See "Upstream contribution" above. After merging the upstream PRs the rollback can happen without data loss.
|
|
276
276
|
|
|
277
277
|
---
|
|
278
278
|
|
|
279
|
-
###
|
|
279
|
+
### Step 3: Dry-run — show plan
|
|
280
280
|
|
|
281
|
-
**Command (
|
|
281
|
+
**Command (from monorepo root):**
|
|
282
282
|
```bash
|
|
283
283
|
lt fullstack convert-mode --to npm --dry-run
|
|
284
284
|
```
|
|
285
285
|
|
|
286
|
-
**
|
|
286
|
+
**What happens:** Shows `vendor → npm` for both subprojects. The versions to install are read from the `VENDOR.md` baselines.
|
|
287
287
|
|
|
288
288
|
---
|
|
289
289
|
|
|
290
|
-
###
|
|
290
|
+
### Step 4: Run the rollback
|
|
291
291
|
|
|
292
292
|
**Command:**
|
|
293
293
|
```bash
|
|
294
294
|
lt fullstack convert-mode --to npm --noConfirm
|
|
295
295
|
```
|
|
296
296
|
|
|
297
|
-
**
|
|
297
|
+
**What happens:**
|
|
298
298
|
1. **Backend**:
|
|
299
|
-
-
|
|
300
|
-
-
|
|
301
|
-
-
|
|
302
|
-
-
|
|
303
|
-
-
|
|
304
|
-
-
|
|
305
|
-
-
|
|
306
|
-
-
|
|
299
|
+
- Reads the baseline version from `src/core/VENDOR.md`
|
|
300
|
+
- Warns about local patches in the "Local changes" table
|
|
301
|
+
- Rewrites all consumer imports from relative paths back to `@lenne.tech/nest-server`
|
|
302
|
+
- Deletes `src/core/`
|
|
303
|
+
- Restores `@lenne.tech/nest-server` in `package.json` (with baseline version)
|
|
304
|
+
- Restores `migrate:*` scripts to `node_modules/.bin/`
|
|
305
|
+
- Removes vendor artifacts: `bin/migrate.js`, `migrations-utils/ts-compiler.js`, `migration-guides/`
|
|
306
|
+
- Removes the vendor marker from `CLAUDE.md`
|
|
307
307
|
2. **Frontend**:
|
|
308
|
-
-
|
|
309
|
-
-
|
|
310
|
-
-
|
|
311
|
-
-
|
|
312
|
-
-
|
|
313
|
-
-
|
|
314
|
-
-
|
|
308
|
+
- Reads the baseline version from `app/core/VENDOR.md`
|
|
309
|
+
- Rewrites the 4 explicit consumer imports back to `@lenne.tech/nuxt-extensions`
|
|
310
|
+
- Deletes `app/core/`
|
|
311
|
+
- Restores `@lenne.tech/nuxt-extensions` in `package.json`
|
|
312
|
+
- Rewrites `nuxt.config.ts`: `'./app/core/module'` → `'@lenne.tech/nuxt-extensions'`
|
|
313
|
+
- Removes the `check:vendor-freshness` script
|
|
314
|
+
- Removes the vendor marker from `CLAUDE.md`
|
|
315
315
|
|
|
316
316
|
---
|
|
317
317
|
|
|
318
|
-
###
|
|
318
|
+
### Step 5: Reinstall dependencies
|
|
319
319
|
|
|
320
320
|
**Command:**
|
|
321
321
|
```bash
|
|
322
322
|
pnpm install
|
|
323
323
|
```
|
|
324
324
|
|
|
325
|
-
**
|
|
325
|
+
**What happens:** pnpm installs `@lenne.tech/nest-server` and `@lenne.tech/nuxt-extensions` freshly from the npm registry.
|
|
326
326
|
|
|
327
327
|
---
|
|
328
328
|
|
|
329
|
-
###
|
|
329
|
+
### Step 6: Validate
|
|
330
330
|
|
|
331
331
|
**Commands:**
|
|
332
332
|
```bash
|
|
@@ -334,18 +334,18 @@ cd projects/api && pnpm exec tsc --noEmit && pnpm run lint && pnpm test && cd ..
|
|
|
334
334
|
cd projects/app && pnpm run lint && pnpm run build && cd ..
|
|
335
335
|
```
|
|
336
336
|
|
|
337
|
-
**
|
|
337
|
+
**What happens:** Makes sure everything still works after the rollback. `tsc` in the backend verifies that the `@lenne.tech/nest-server` types from `node_modules/` are now found. The frontend build verifies that Nuxt loads the module as an npm dependency.
|
|
338
338
|
|
|
339
339
|
---
|
|
340
340
|
|
|
341
|
-
###
|
|
341
|
+
### Step 7: Check status again
|
|
342
342
|
|
|
343
343
|
**Command:**
|
|
344
344
|
```bash
|
|
345
345
|
lt status
|
|
346
346
|
```
|
|
347
347
|
|
|
348
|
-
**
|
|
348
|
+
**Expected output:**
|
|
349
349
|
```
|
|
350
350
|
Monorepo Subprojects:
|
|
351
351
|
Backend: projects/api → npm (@lenne.tech/nest-server dependency)
|
|
@@ -354,7 +354,7 @@ Monorepo Subprojects:
|
|
|
354
354
|
|
|
355
355
|
---
|
|
356
356
|
|
|
357
|
-
###
|
|
357
|
+
### Step 8: Commit changes
|
|
358
358
|
|
|
359
359
|
**Commands:**
|
|
360
360
|
```bash
|
|
@@ -370,11 +370,11 @@ git commit -m "chore: revert fullstack to npm mode
|
|
|
370
370
|
|
|
371
371
|
## Troubleshooting
|
|
372
372
|
|
|
373
|
-
### Problem: `tsc`
|
|
373
|
+
### Problem: `tsc` fails with `new Error('msg', { cause })` error
|
|
374
374
|
|
|
375
|
-
**
|
|
375
|
+
**Cause:** TypeScript target is too old (ES2020 or lower).
|
|
376
376
|
|
|
377
|
-
**Fix:** In `projects/api/tsconfig.json`
|
|
377
|
+
**Fix:** In `projects/api/tsconfig.json` set the target to `"es2022"`:
|
|
378
378
|
```json
|
|
379
379
|
{
|
|
380
380
|
"compilerOptions": {
|
|
@@ -385,87 +385,87 @@ git commit -m "chore: revert fullstack to npm mode
|
|
|
385
385
|
|
|
386
386
|
---
|
|
387
387
|
|
|
388
|
-
### Problem: Vitest
|
|
388
|
+
### Problem: Vitest error `'express' does not provide an export named 'Response'`
|
|
389
389
|
|
|
390
|
-
**
|
|
390
|
+
**Cause:** In vendor mode the TypeScript source of the core is evaluated directly by vitest. Value-imports of TypeScript type-only exports break.
|
|
391
391
|
|
|
392
|
-
**Fix:**
|
|
392
|
+
**Fix:** Should have been fixed automatically by the CLI. If not, update all affected files:
|
|
393
393
|
```typescript
|
|
394
|
-
//
|
|
394
|
+
// Before
|
|
395
395
|
import { Request, Response } from 'express';
|
|
396
396
|
|
|
397
|
-
//
|
|
397
|
+
// After
|
|
398
398
|
import type { Request, Response } from 'express';
|
|
399
399
|
```
|
|
400
400
|
|
|
401
401
|
---
|
|
402
402
|
|
|
403
|
-
### Problem:
|
|
403
|
+
### Problem: Conversion fails with "Destination path already exists"
|
|
404
404
|
|
|
405
|
-
**
|
|
405
|
+
**Cause:** The project already has project-specific `bin/` or `migration-guides/` directories that collide with upstream contents.
|
|
406
406
|
|
|
407
|
-
**Fix:**
|
|
407
|
+
**Fix:** Back up the contents, delete the directories, run the conversion again, copy the contents back.
|
|
408
408
|
|
|
409
409
|
```bash
|
|
410
410
|
cp projects/api/bin/migrate.js /tmp/migrate-backup.js
|
|
411
411
|
cp -r projects/api/migration-guides /tmp/migration-guides-backup
|
|
412
412
|
rm -rf projects/api/bin projects/api/migration-guides
|
|
413
413
|
lt fullstack convert-mode --to vendor --noConfirm
|
|
414
|
-
#
|
|
414
|
+
# After conversion:
|
|
415
415
|
mv /tmp/migration-guides-backup/MY-FILE.md projects/api/migration-guides/
|
|
416
416
|
```
|
|
417
417
|
|
|
418
418
|
---
|
|
419
419
|
|
|
420
|
-
### Problem:
|
|
420
|
+
### Problem: Some consumer imports missing from the rewrite after conversion
|
|
421
421
|
|
|
422
|
-
**Symptom:** `lt fullstack convert-mode`
|
|
422
|
+
**Symptom:** `lt fullstack convert-mode` shows a warning like `X file(s) still contain '@lenne.tech/nest-server' imports`.
|
|
423
423
|
|
|
424
|
-
**Fix:**
|
|
424
|
+
**Fix:** Manually check the reported files and rewrite the imports to relative paths. The warning shows the exact paths.
|
|
425
425
|
|
|
426
426
|
---
|
|
427
427
|
|
|
428
|
-
### Problem: Tests
|
|
428
|
+
### Problem: Tests fail under parallel load (flakiness)
|
|
429
429
|
|
|
430
|
-
**
|
|
430
|
+
**Cause:** TypeScript source loading in vendor mode is slower than pre-compiled `dist/` — this exposes existing timing-sensitive test races.
|
|
431
431
|
|
|
432
|
-
**Fix
|
|
433
|
-
-
|
|
434
|
-
-
|
|
435
|
-
-
|
|
432
|
+
**Fix options:**
|
|
433
|
+
- Make individual flaky tests robust (retry pattern, polling instead of `setTimeout`)
|
|
434
|
+
- As a workaround, `retry: 3` is already active in `vitest-e2e.config.ts`
|
|
435
|
+
- Last resort: `poolOptions.forks.singleFork: true` (makes tests sequential — ~4× slower)
|
|
436
436
|
|
|
437
437
|
---
|
|
438
438
|
|
|
439
|
-
### Problem: Upstream
|
|
439
|
+
### Problem: Upstream sync finds conflicts
|
|
440
440
|
|
|
441
|
-
**Symptom:** `/lt-dev:backend:update-nest-server-core`
|
|
441
|
+
**Symptom:** `/lt-dev:backend:update-nest-server-core` shows conflicts between upstream changes and local patches.
|
|
442
442
|
|
|
443
|
-
**Fix:**
|
|
444
|
-
- `approve all` —
|
|
445
|
-
- `approve clean` —
|
|
446
|
-
- `reject <file>` —
|
|
447
|
-
- `show <file>` —
|
|
448
|
-
- `done` —
|
|
443
|
+
**Fix:** The agent pauses and presents the conflicts. You can:
|
|
444
|
+
- `approve all` — take all upstream picks (local patches overwritten)
|
|
445
|
+
- `approve clean` — only conflict-free picks
|
|
446
|
+
- `reject <file>` — skip a specific file
|
|
447
|
+
- `show <file>` — render the hunk
|
|
448
|
+
- `done` — proceed with current selection
|
|
449
449
|
|
|
450
450
|
---
|
|
451
451
|
|
|
452
|
-
##
|
|
452
|
+
## Quick Reference
|
|
453
453
|
|
|
454
|
-
|
|
|
454
|
+
| Action | Command |
|
|
455
455
|
|--------|---------|
|
|
456
|
-
|
|
|
457
|
-
| Dry-
|
|
456
|
+
| Check status | `lt status` |
|
|
457
|
+
| Dry-run npm→vendor | `lt fullstack convert-mode --to vendor --dry-run` |
|
|
458
458
|
| npm→vendor | `lt fullstack convert-mode --to vendor --noConfirm` |
|
|
459
|
-
| Vendor
|
|
460
|
-
| Backend-only
|
|
461
|
-
| Frontend-only
|
|
462
|
-
| Freshness
|
|
463
|
-
| Full
|
|
464
|
-
| Upstream
|
|
465
|
-
| Upstream
|
|
466
|
-
| Dry-
|
|
459
|
+
| Vendor update | `/lt-dev:fullstack:update-all` |
|
|
460
|
+
| Backend-only update | `/lt-dev:backend:update-nest-server-core` |
|
|
461
|
+
| Frontend-only update | `/lt-dev:frontend:update-nuxt-extensions-core` |
|
|
462
|
+
| Freshness check | `pnpm run check:vendor-freshness` |
|
|
463
|
+
| Full check | `pnpm run check` |
|
|
464
|
+
| Upstream PR (backend) | `/lt-dev:backend:contribute-nest-server-core` |
|
|
465
|
+
| Upstream PR (frontend) | `/lt-dev:frontend:contribute-nuxt-extensions-core` |
|
|
466
|
+
| Dry-run vendor→npm | `lt fullstack convert-mode --to npm --dry-run` |
|
|
467
467
|
| vendor→npm | `lt fullstack convert-mode --to npm --noConfirm` |
|
|
468
468
|
|
|
469
469
|
---
|
|
470
470
|
|
|
471
|
-
> **
|
|
471
|
+
> **Further reading**: Architecture, concepts, and reference for all CLI and plugin functions in the [LT-ECOSYSTEM-GUIDE](./LT-ECOSYSTEM-GUIDE.md).
|