Enhance architecture documentation and update project dependencies. Introduce new features for browser recording, page callables, and transform capabilities. Improve build scripts and permissions for better functionality.

This commit is contained in:
go0p
2026-07-23 15:16:50 +08:00
parent 726a97849b
commit c7891a6a9d
125 changed files with 25018 additions and 1675 deletions
@@ -0,0 +1,18 @@
import { describe, expect, it } from 'vitest';
import { parseFunctionParameterNames } from './function-parameters';
describe('deep-capture function parameter parser', () => {
it.each([
['async function buildLoginEnvelope(password, account = "analyst") {}', ['password', 'account']],
['encrypt(value, options = { mode: "CBC", fields: ["a", "b"] }) {}', ['value', 'options']],
['(payload, ...rest) => payload', ['payload', 'rest']],
['async value => value', ['value']],
['function transform({ value }, [key]) {}', ['arg0', 'arg1']],
])('reads runtime source parameters from %s', (source, expected) => {
expect(parseFunctionParameterNames(source)).toEqual(expected);
});
it('keeps the parser bounded', () => {
expect(parseFunctionParameterNames('(a, b, c) => a', 2)).toEqual(['a', 'b']);
});
});