({
uvLockPath = '/path/to/uv.lock' as string | null,
hasCustomCommand = false,
totalBundleSize = 0,
} = {})
| 52 | const ephemeralOversized = LAMBDA_EPHEMERAL_STORAGE_BYTES + 1; |
| 53 | |
| 54 | function createExternalizer({ |
| 55 | uvLockPath = '/path/to/uv.lock' as string | null, |
| 56 | hasCustomCommand = false, |
| 57 | totalBundleSize = 0, |
| 58 | } = {}) { |
| 59 | const ext = new PythonDependencyExternalizer({ |
| 60 | venvPath: '/tmp/venv', |
| 61 | vendorDir: '_vendor', |
| 62 | workPath: '/tmp/work', |
| 63 | uvLockPath, |
| 64 | uvProjectDir: '/tmp/work', |
| 65 | projectName: 'test-project', |
| 66 | pythonMajor: 3, |
| 67 | pythonMinor: 12, |
| 68 | pythonPath: '/usr/bin/python3', |
| 69 | hasCustomCommand, |
| 70 | }); |
| 71 | // Set the private totalBundleSize field for testing |
| 72 | (ext as any).totalBundleSize = totalBundleSize; |
| 73 | return ext; |
| 74 | } |
| 75 | |
| 76 | it('returns true when bundle exceeds threshold and uvLockPath is present', () => { |
| 77 | delete process.env.VERCEL_SUPPORT_LARGE_FUNCTIONS; |
no outgoing calls
no test coverage detected