Skip to content

cloud-ru-tech/cloudhood

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloudhood

Chrome Web Store Rating Chrome Web Store Users Chrome Web Store Version GitHub Release Date

This extension allows users to control request headers that will be embedded in all requests in Chrome Browser, where each override contains the following properties:

  • Header: Header key.
  • Header Value: The value associated with the header key.

Header overrides are managed in a Chrome extension popup (a simple react app), stored in Chrome local storage, and applied to upstream page requests using the updateDynamicRules function of chrome's declarativeNetRequest dynamic request rules.

Testing

You can get a test build for each pull-request in its comments. Example.

E2E Testing

For E2E tests, always import the test fixtures:

import { expect, test } from './fixtures';

Before running E2E tests for the first time, install the required browsers:

pnpm exec playwright install

Run E2E tests with:

pnpm test:e2e

Local Development

Development Server with Hot Reload

For convenient development with automatic reload, use the following commands:

Chrome Development (with hot reload)

pnpm dev:chrome

Firefox Development (with hot reload)

pnpm dev:firefox

These commands will start a dev server that will automatically update files in the build directory when source code changes.

Start Local Server (legacy method)

  1. Run pnpm install to install the dependencies.
  2. Run pnpm start
  3. Download extension in Chrome:
    • Open chrome://extensions/ in the address bar
    • Turn on Developer mode
    • Click Load unpacked extension
    • Select build directory.

Development for different browsers

Chrome Development

pnpm dev:chrome    # with hot reload (recommended)

Firefox Development

pnpm dev:firefox    # with hot reload (recommended)

Building Extensions

Build Chrome Extension

pnpm build:chromium

The extension will be built in the build/chrome directory.

Build Firefox Extension

pnpm build:firefox

The extension will be built in the build/firefox directory.

Build Firefox Sources Archive

npm run build:firefox-sources

Creates a ZIP archive with source code required for Firefox Add-ons submission. Mozilla requires source code submission for extensions that use build tools or minification.

Build Both Extensions

pnpm build

Releasing

We use GitHub Actions to automate the release process. The workflow:

  1. Bumps version based on commit messages
  2. Builds extensions for Chrome and Firefox
  3. Creates ZIP archives for both platforms
  4. Creates source code archive for Firefox Add-ons submission
  5. Publishes to Chrome Web Store and Firefox Add-ons (with source code)
  6. Creates a GitHub Release with both extension packages

See RELEASE_SETUP.md for details on configuring the release automation.

Packing

After developing your extension, run the command

pnpm run build

Releases

The repository is configured with actions for automatic releases to Github.

License

Apache License 2.0.