mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-30 00:20:07 +00:00
Move the file surface onto the decorators
Six more methods, so the registry owns 30 of 113, and the deps factory is down to 660 lines from 944. Files are the awkward corner of the plugin surface and stay that way on purpose. Reading a file's bytes is a separate grant from reading its metadata, because a passport scan is more sensitive than its filename, and the three writes use three distinct rights instead of one domain action. FILES-RPC-006 pins that by watching which permission each operation actually asks for. This is also the only plugin path that touches disk, so the tests lean on it: the extension blocklist, the size cap checked before the read rather than after, a path that resolves outside the uploads root, and the demo-account upload refusal that mirrors the REST guard.
This commit is contained in:
@@ -54,8 +54,8 @@ describe('plugin RPC coverage ledger', () => {
|
||||
// Update these two numbers in every rollout PR. They make the diff state the size
|
||||
// of the move out loud, which is the number a reviewer wants to see.
|
||||
const total = KNOWN_METHODS.length + UNCONDITIONAL_METHODS.length;
|
||||
expect(fromRegistry.size).toBe(24);
|
||||
expect(legacy.size).toBe(total - 24);
|
||||
expect(fromRegistry.size).toBe(30);
|
||||
expect(legacy.size).toBe(total - 30);
|
||||
});
|
||||
|
||||
it('RPCLEDGER-006 the migrated methods are exactly the ones this PR claims', () => {
|
||||
@@ -65,6 +65,12 @@ describe('plugin RPC coverage ledger', () => {
|
||||
'daynotes.delete',
|
||||
'daynotes.list',
|
||||
'daynotes.update',
|
||||
'files.create',
|
||||
'files.createLink',
|
||||
'files.getContent',
|
||||
'files.list',
|
||||
'files.softDelete',
|
||||
'files.update',
|
||||
'packing.create',
|
||||
'packing.createBag',
|
||||
'packing.delete',
|
||||
|
||||
Reference in New Issue
Block a user