* add profile creation, list endpoints at /archives/<aid>/profiles
* add profile browser creation, get, ping, commit, delete endpoints at /archives/<aid>/profiles/browser
* support creation of profile browser using browsertrix-crawler 'create-login-profile' in docker and k8s
* ensure profile browser expires after set time, k8s job or docker container automatically deleted on exit
* profile browser creation returns temporary browser id, or `{"detail": "waiting_for_browser"}` while waiting for browser container init
* nginx frontend: proxy /loadbrowser/ to port 9223 in browsertrix-crawler, connecting directly to chrome devtools
* profile api auth: use redis for auth
- store browserid->archiveid and browserid->browser ip mapping in redis
- browser apis: ensure profile browser is associated with specified archive
- browser ws: pass arcchiveid and browserid to ws query args, browserid is part of archive, and browserid corresponds to specified ip
* store profiles in /profiles/ directory in default storage, include profileid in profile tar.gz filename
* support profile in crawlconfig:
- add profileid to CrawlConfig, and profileName to CrawlConfigOut
- support resolving profile path via profileid, setting '--profile @{path/to/profile.tar.gz}' for crawler (assuming same storage for profile as output for now) in both docker and k8s setups
- docker: support out_filename, custom wacz output filename missing functionality
|
||
|---|---|---|
| .. | ||
| assets | ||
| src | ||
| xliff | ||
| .dockerignore | ||
| .gitignore | ||
| Dockerfile | ||
| lit-localize.json | ||
| nginx.conf.template | ||
| package.json | ||
| postcss.config.js | ||
| README.md | ||
| sample.env.local | ||
| tailwind.config.js | ||
| tsconfig.json | ||
| web-test-runner.config.mjs | ||
| webpack.config.js | ||
| webpack.dev.js | ||
| webpack.prod.js | ||
| yarn.lock | ||
Browsertrix Cloud frontend
Quickstart
Install dependencies:
yarn
Copy environment variables from the sample file:
cp sample.env.local .env.local
Update API_BASE_URL in .env.local to point to your dev backend API. For example:
API_BASE_URL=http://dev.example.com/api
Start the dev server:
yarn start
This will open localhost:9870 in a new tab in your default browser.
To develop against a local instance of the backend API,
follow instructions for deploying to a local Docker instance. Update API_BASE_URL and then restart the dev server.
Scripts
yarn <name> |
|
|---|---|
start |
runs app in development server, reloading on file changes |
test |
runs tests in chromium with playwright |
build-dev |
bundles app and outputs it in dist directory |
build |
bundles app, optimized for production, and outputs it to dist |
lint |
find and fix auto-fixable javascript errors |
format |
formats js, html and css files |
localize:extract |
generate XLIFF file to be translated |
localize:build |
output a localized version of strings/templates |
Testing
Tests assertions are written in Chai.
To watch for file changes while running tests:
yarn test --watch
To run tests in multiple browsers:
yarn test --browsers chromium firefox webkit
Localization
Wrap text or templates in the msg helper to make them localizable:
// import from @lit/localize:
import { msg } from "@lit/localize";
// later, in the render function:
render() {
return html`
<button>
${msg("Click me")}
</button>
`
}
Entire templates can be wrapped as well:
render() {
return msg(html`
<p>Click the button</p>
<button>Click me</button>
`)
}
See: https://lit.dev/docs/localization/overview/#message-types
To add new languages:
- Add BCP 47 language tag to
targetLocalesinlit-localize.json - Run
yarn localize:extractto generate new .xlf file in/xliff - Provide .xlf file to translation team
- Replace .xlf file once translated
- Run
yarn localize:buildbring translation intosrc
See: https://lit.dev/docs/localization/overview/#extracting-messages