Utilities for managing Wrangler configurations and test environments for Cloudflare Workers.
bun add @greybox/wrangler-config-helper
- Environment-specific configuration management
- Test environment setup helpers
- Automatic cleanup of temporary files
- TypeScript support
import { WranglerConfigHelper } from '@greybox/wrangler-config-helper';
const configHelper = new WranglerConfigHelper('./wrangler.toml');
const configPath = configHelper.prepareEnvironmentConfig('staging');
// Clean up when done
configHelper.cleanup();
import { WranglerTestSetup } from '@greybox/wrangler-config-helper';
const testSetup = new WranglerTestSetup<MyEnv>(
'./wrangler.toml',
'./src/worker.ts',
{ environment: 'test' }
);
// Setup test environment
const abortController = new AbortController();
await testSetup.setup(abortController.signal);
// Clean up
await testSetup.cleanup();
Full API documentation is available in the source code and type definitions.
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License