You've already forked tribes-supertest
5a2f3c7aba
Register reusable admin account create/delete, Playwright web-login, and authoritative DNS validation blocks. Add generated admin credential reporting and block coverage.
87 lines
1.7 KiB
Nix
87 lines
1.7 KiB
Nix
{
|
|
pkgs,
|
|
lib,
|
|
inputs,
|
|
...
|
|
}: let
|
|
system = pkgs.stdenv.system;
|
|
pkgs-unstable = inputs.nixpkgs-unstable.legacyPackages.${system};
|
|
hasGlibcLocales = pkgs.stdenv.hostPlatform.isLinux && pkgs.stdenv.hostPlatform.isGnu;
|
|
devLocales =
|
|
if hasGlibcLocales
|
|
then
|
|
pkgs.glibcLocales.override {
|
|
allLocales = false;
|
|
locales = [
|
|
"en_GB.UTF-8/UTF-8"
|
|
"en_US.UTF-8/UTF-8"
|
|
];
|
|
}
|
|
else null;
|
|
in {
|
|
env =
|
|
{
|
|
LANG = "en_GB.UTF-8";
|
|
NODE_ENV = "development";
|
|
# Delay npm dependency resolution to reduce rushed supply-chain updates.
|
|
NPM_CONFIG_MIN_RELEASE_AGE = "7";
|
|
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH = "${pkgs.chromium}/bin/chromium";
|
|
}
|
|
// lib.optionalAttrs hasGlibcLocales {
|
|
LOCALE_ARCHIVE = "${devLocales}/lib/locale/locale-archive";
|
|
};
|
|
|
|
packages = with pkgs; [
|
|
# Code formatting
|
|
prettier
|
|
alejandra
|
|
|
|
# Browser automation
|
|
chromium
|
|
|
|
# Cloud providers
|
|
curl
|
|
hcloud
|
|
ovhcloud-cli
|
|
scaleway-cli
|
|
|
|
# Nostr tooling
|
|
pkgs-unstable.nak
|
|
pkgs-unstable.algia
|
|
];
|
|
|
|
languages.javascript = {
|
|
enable = true;
|
|
package = pkgs.nodejs_24;
|
|
npm.enable = true;
|
|
};
|
|
|
|
dotenv.enable = true;
|
|
devenv.warnOnNewVersion = false;
|
|
|
|
git-hooks.hooks = {
|
|
alejandra.enable = true;
|
|
prettier = {
|
|
enable = true;
|
|
files = "\\.(cjs|js|json|md|mjs|ts|tsx|yaml|yml)$";
|
|
};
|
|
check-added-large-files = {
|
|
enable = true;
|
|
args = ["--maxkb=16384"];
|
|
};
|
|
};
|
|
|
|
enterShell = ''
|
|
echo
|
|
echo -n "Node.js "
|
|
node --version
|
|
echo -n "npm "
|
|
npm --version
|
|
echo
|
|
'';
|
|
|
|
scripts = {
|
|
supertest.exec = ''exec node --import tsx "$DEVENV_ROOT/src/cli.ts" "$@"'';
|
|
};
|
|
}
|