Commit 871e596
authored
fix(core): include plugin dynamic files in manifest (#5922)
## Summary
- Stack on top of PR #5921 / EGG-65 runtime mapping commit because that
dependency is not yet in origin/next.
- Complete generated startup manifests with convention-based plugin
dynamic files (agent, app, app/extend/*, and app/middleware) so bundled
single-mode workers can load files skipped by metadataOnly agent
startup.
- Add a security-like @eggjs/security fixture verifying agent, app,
app/extend/agent, app/extend/application, and app/middleware/securities
are present in the manifest.
## Validation
- pnpm exec vitest run
packages/core/test/loader/manifest_coverage.test.ts
- pnpm exec vitest run packages/core/test/loader/manifest.test.ts
packages/core/test/loader/manifest_roundtrip.test.ts
packages/core/test/loader/manifest_fingerprint.test.ts
packages/core/test/loader/manifest_query.test.ts
packages/core/test/loader/manifest_coverage.test.ts
- pnpm --filter @eggjs/egg-bundler test -- EntryGenerator.test.ts
- pnpm --filter @eggjs/core typecheck
- pnpm --filter @eggjs/egg-bundler typecheck
- pnpm exec oxfmt --check packages/core/src/loader/egg_loader.ts
packages/core/test/loader/manifest_coverage.test.ts
tools/egg-bundler/src/lib/EntryGenerator.ts
tools/egg-bundler/test/EntryGenerator.test.ts
- git diff --check origin/next...HEAD
Notes: targeted oxlint on changed files exits 0 with existing warnings
in pre-existing egg_loader.ts lines outside this patch.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Manifest post-processing now caches convention-based module resolution
and records directory-discovered middleware lists for metadata-only
runs.
* Bundler/runtime treats framework as a package specifier, validates
specifiers, and precomputes output↔original-app aliasing for
deterministic module lookup.
* **Documentation**
* Updated bundler docs, CLI help, and wiki to explain runtime path
mapping, output-dir semantics, and framework-specifier behavior.
* **Tests & Chores**
* Added fixtures and tests for manifest resolve-cache, file discovery,
deterministic worker generation, and framework-specifier validation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 22fc588 commit 871e596
15 files changed
Lines changed: 263 additions & 3 deletions
File tree
- packages/core
- src/loader
- test
- fixtures/manifest-dynamic-plugin
- config
- node_modules/@eggjs/security
- app
- extend
- middleware
- loader
- tools/egg-bundler/src/lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
29 | 36 | | |
30 | 37 | | |
31 | 38 | | |
| |||
1764 | 1771 | | |
1765 | 1772 | | |
1766 | 1773 | | |
1767 | | - | |
| 1774 | + | |
1768 | 1775 | | |
1769 | 1776 | | |
1770 | 1777 | | |
1771 | 1778 | | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
1772 | 1837 | | |
1773 | 1838 | | |
1774 | 1839 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
| |||
73 | 77 | | |
74 | 78 | | |
75 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
76 | 84 | | |
77 | 85 | | |
78 | 86 | | |
| |||
181 | 189 | | |
182 | 190 | | |
183 | 191 | | |
184 | | - | |
| 192 | + | |
185 | 193 | | |
186 | 194 | | |
187 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
214 | 220 | | |
215 | 221 | | |
216 | 222 | | |
| |||
343 | 349 | | |
344 | 350 | | |
345 | 351 | | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
346 | 376 | | |
347 | 377 | | |
348 | 378 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments