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-08-06 15:11:35 +08:00
committed by go0p
parent 0371a8b802
commit af5a4db694
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']);
});
});