Merge branch 'develop' into feat/collapsible-custom-locations

This commit is contained in:
jc21 authored and GitHub committed 2026-08-26 13:00:05 +10:00
commit a7677c18c3
71 files changed
+2176 -1865

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v10 - uses: actions/stale@v11
with: with:
stale-issue-label: 'stale' stale-issue-label: 'stale'
stale-pr-label: 'stale' stale-pr-label: 'stale'
+72 -89
View File
@@ -1,91 +1,74 @@
{ {
"$schema": "https://biomejs.dev/schemas/2.4.15/schema.json", "$schema": "https://biomejs.dev/schemas/2.5.10/schema.json",
"vcs": { "vcs": {
"enabled": true, "enabled": true,
"clientKind": "git", "clientKind": "git",
"useIgnoreFile": true "useIgnoreFile": true
}, },
"files": { "files": {
"ignoreUnknown": false, "ignoreUnknown": false,
"includes": [ "includes": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "!**/dist/**/*"]
"**/*.ts", },
"**/*.tsx", "formatter": {
"**/*.js", "enabled": true,
"**/*.jsx", "indentStyle": "tab",
"!**/dist/**/*" "indentWidth": 4,
] "lineWidth": 120,
}, "formatWithErrors": true
"formatter": { },
"enabled": true, "assist": {
"indentStyle": "tab", "actions": {
"indentWidth": 4, "source": {
"lineWidth": 120, "organizeImports": {
"formatWithErrors": true "level": "on",
}, "options": {
"assist": { "groups": [
"actions": { ":BUN:",
"source": { ":NODE:",
"organizeImports": { ["npm:*", "npm:*/**"],
"level": "on", ":PACKAGE_WITH_PROTOCOL:",
"options": { ":URL:",
"groups": [ ":PACKAGE:",
":BUN:", ["/src/*", "/src/**"],
":NODE:", ["/**"],
[ ["#*", "#*/**"],
"npm:*", ":PATH:"
"npm:*/**" ]
], }
":PACKAGE_WITH_PROTOCOL:", }
":URL:", }
":PACKAGE:", }
[ },
"/src/*", "linter": {
"/src/**" "enabled": true,
], "rules": {
[ "preset": "recommended",
"/**" "correctness": {
], "useUniqueElementIds": "off"
[ },
"#*", "suspicious": {
"#*/**" "noExplicitAny": "off"
], },
":PATH:" "performance": {
] "noDelete": "off"
} },
} "nursery": "off",
} "a11y": {
} "useSemanticElements": "off",
}, "useValidAnchor": "off"
"linter": { },
"enabled": true, "style": {
"rules": { "noParameterAssign": "error",
"recommended": true, "useAsConstAssertion": "error",
"correctness": { "useDefaultParameterLast": "error",
"useUniqueElementIds": "off" "useEnumInitializers": "error",
}, "useSelfClosingElements": "error",
"suspicious": { "useSingleVarDeclarator": "error",
"noExplicitAny": "off" "noUnusedTemplateLiteral": "error",
}, "useNumberNamespace": "error",
"performance": { "noInferrableTypes": "error",
"noDelete": "off" "noUselessElse": "error"
}, }
"nursery": "off", }
"a11y": { }
"useSemanticElements": "off",
"useValidAnchor": "off"
},
"style": {
"noParameterAssign": "error",
"useAsConstAssertion": "error",
"useDefaultParameterLast": "error",
"useEnumInitializers": "error",
"useSelfClosingElements": "error",
"useSingleVarDeclarator": "error",
"noUnusedTemplateLiteral": "error",
"useNumberNamespace": "error",
"noInferrableTypes": "error",
"noUselessElse": "error"
}
}
}
} }
+11 -3
View File
@@ -629,7 +629,7 @@
"full_plugin_name": "dns-tencentcloud", "full_plugin_name": "dns-tencentcloud",
"name": "Tencent Cloud", "name": "Tencent Cloud",
"package_name": "certbot-dns-tencentcloud", "package_name": "certbot-dns-tencentcloud",
"version": "~=2.0.2" "version": "~=2.1.1"
}, },
"timeweb": { "timeweb": {
"credentials": "dns_timeweb_api_key = XXXXXXXXXXXXXXXXXXX", "credentials": "dns_timeweb_api_key = XXXXXXXXXXXXXXXXXXX",
@@ -637,7 +637,7 @@
"full_plugin_name": "dns-timeweb", "full_plugin_name": "dns-timeweb",
"name": "Timeweb Cloud", "name": "Timeweb Cloud",
"package_name": "certbot-dns-timeweb", "package_name": "certbot-dns-timeweb",
"version": "~=1.0.1" "version": "~=2.0.0"
}, },
"transip": { "transip": {
"credentials": "dns_transip_username = my_username\ndns_transip_key_file = /etc/letsencrypt/transip-rsa.key", "credentials": "dns_transip_username = my_username\ndns_transip_key_file = /etc/letsencrypt/transip-rsa.key",
@@ -661,7 +661,7 @@
"full_plugin_name": "dns-websupport", "full_plugin_name": "dns-websupport",
"name": "Websupport.sk", "name": "Websupport.sk",
"package_name": "certbot-dns-websupport", "package_name": "certbot-dns-websupport",
"version": "~=2.0.1" "version": "~=5.0.0"
}, },
"wedos": { "wedos": {
"credentials": "dns_wedos_user = <wedos_registration>\ndns_wedos_auth = <wapi_password>", "credentials": "dns_wedos_user = <wedos_registration>\ndns_wedos_auth = <wapi_password>",
@@ -686,5 +686,13 @@
"name": "RcodeZero", "name": "RcodeZero",
"package_name": "certbot-dns-rcode0", "package_name": "certbot-dns-rcode0",
"version": "~=0.0.0.2" "version": "~=0.0.0.2"
},
"lws": {
"credentials": "dns_lws_login = 123456\ndns_lws_api_key = YOUR_API_KEY",
"dependencies": "",
"full_plugin_name": "dns-lws",
"name": "LWS",
"package_name": "certbot-dns-lws",
"version": "~=1.0.0"
} }
} }
+4 -4
View File
@@ -1,5 +1,5 @@
import knex from "knex"; import knex from "knex";
import {configGet, configHas} from "./lib/config.js"; import { configGet, configHas } from "./lib/config.js";
let instance = null; let instance = null;
@@ -23,8 +23,8 @@ const generateDbConfig = () => {
user: cfg.user, user: cfg.user,
password: cfg.password, password: cfg.password,
database: cfg.name, database: cfg.name,
port: cfg.port, port: cfg.port,
...(cfg.ssl ? { ssl: cfg.ssl } : {}) ...(cfg.ssl ? { ssl: cfg.ssl } : {}),
}, },
migrations: { migrations: {
tableName: "migrations", tableName: "migrations",
@@ -37,6 +37,6 @@ const getInstance = () => {
instance = knex(generateDbConfig()); instance = knex(generateDbConfig());
} }
return instance; return instance;
} };
export default getInstance; export default getInstance;
+7 -11
View File
@@ -161,12 +161,12 @@ const internal2fa = {
} }
const result = await verify({ const result = await verify({
token: code, token: code,
secret: auth.meta.totp_secret, secret: auth.meta.totp_secret,
guardrails: createGuardrails({ guardrails: createGuardrails({
MIN_SECRET_BYTES: 10, MIN_SECRET_BYTES: 10,
}), }),
}); });
if (!result.valid) { if (!result.valid) {
throw new errs.AuthError("Invalid verification code"); throw new errs.AuthError("Invalid verification code");
@@ -288,11 +288,7 @@ const internal2fa = {
}, },
getUserPasswordAuth: async (userId) => { getUserPasswordAuth: async (userId) => {
const auth = await authModel const auth = await authModel.query().where("user_id", userId).andWhere("type", "password").first();
.query()
.where("user_id", userId)
.andWhere("type", "password")
.first();
if (!auth) { if (!auth) {
throw new errs.ItemNotFoundError("Auth not found"); throw new errs.ItemNotFoundError("Auth not found");
+21 -34
View File
@@ -66,7 +66,7 @@ const internalAccessList = {
id: data.id, id: data.id,
expand: ["owner", "items", "clients", "proxy_hosts.access_list.[clients,items]"], expand: ["owner", "items", "clients", "proxy_hosts.access_list.[clients,items]"],
}, },
true // skip masking true, // skip masking
); );
// Audit log // Audit log
@@ -180,10 +180,10 @@ const internalAccessList = {
id: data.id, id: data.id,
expand: ["owner", "items", "clients", "proxy_hosts.[certificate,access_list.[clients,items]]"], expand: ["owner", "items", "clients", "proxy_hosts.[certificate,access_list.[clients,items]]"],
}, },
true // skip masking true, // skip masking
); );
await internalAccessList.build(freshRow) await internalAccessList.build(freshRow);
if (Number.parseInt(freshRow.proxy_host_count, 10)) { if (Number.parseInt(freshRow.proxy_host_count, 10)) {
await internalNginx.bulkGenerateConfigs("proxy_host", freshRow.proxy_hosts); await internalNginx.bulkGenerateConfigs("proxy_host", freshRow.proxy_hosts);
} }
@@ -202,17 +202,13 @@ const internalAccessList = {
*/ */
get: async (access, data, skipMasking) => { get: async (access, data, skipMasking) => {
const thisData = data || {}; const thisData = data || {};
const accessData = await access.can("access_lists:get", thisData.id) const accessData = await access.can("access_lists:get", thisData.id);
const query = accessListModel const query = accessListModel
.query() .query()
.select("access_list.*", accessListModel.raw("COUNT(proxy_host.id) as proxy_host_count")) .select("access_list.*", accessListModel.raw("COUNT(proxy_host.id) as proxy_host_count"))
.leftJoin("proxy_host", function () { .leftJoin("proxy_host", function () {
this.on("proxy_host.access_list_id", "=", "access_list.id").andOn( this.on("proxy_host.access_list_id", "=", "access_list.id").andOn("proxy_host.is_deleted", "=", 0);
"proxy_host.is_deleted",
"=",
0,
);
}) })
.where("access_list.is_deleted", 0) .where("access_list.is_deleted", 0)
.andWhere("access_list.id", thisData.id) .andWhere("access_list.id", thisData.id)
@@ -267,19 +263,13 @@ const internalAccessList = {
// 4. audit log // 4. audit log
// 1. update row to be deleted // 1. update row to be deleted
await accessListModel await accessListModel.query().where("id", row.id).patch({
.query() is_deleted: 1,
.where("id", row.id) });
.patch({
is_deleted: 1,
});
// 2. update any proxy hosts that were using it (ignoring permissions) // 2. update any proxy hosts that were using it (ignoring permissions)
if (row.proxy_hosts) { if (row.proxy_hosts) {
await proxyHostModel await proxyHostModel.query().where("access_list_id", "=", row.id).patch({ access_list_id: 0 });
.query()
.where("access_list_id", "=", row.id)
.patch({ access_list_id: 0 });
// 3. reconfigure those hosts, then reload nginx // 3. reconfigure those hosts, then reload nginx
// set the access_list_id to zero for these items // set the access_list_id to zero for these items
@@ -325,11 +315,7 @@ const internalAccessList = {
.query() .query()
.select("access_list.*", accessListModel.raw("COUNT(proxy_host.id) as proxy_host_count")) .select("access_list.*", accessListModel.raw("COUNT(proxy_host.id) as proxy_host_count"))
.leftJoin("proxy_host", function () { .leftJoin("proxy_host", function () {
this.on("proxy_host.access_list_id", "=", "access_list.id").andOn( this.on("proxy_host.access_list_id", "=", "access_list.id").andOn("proxy_host.is_deleted", "=", 0);
"proxy_host.is_deleted",
"=",
0,
);
}) })
.where("access_list.is_deleted", 0) .where("access_list.is_deleted", 0)
.groupBy("access_list.id") .groupBy("access_list.id")
@@ -371,10 +357,7 @@ const internalAccessList = {
* @returns {Promise} * @returns {Promise}
*/ */
getCount: async (userId, visibility) => { getCount: async (userId, visibility) => {
const query = accessListModel const query = accessListModel.query().count("id as count").where("is_deleted", 0);
.query()
.count("id as count")
.where("is_deleted", 0);
if (visibility !== "all") { if (visibility !== "all") {
query.andWhere("owner_user_id", userId); query.andWhere("owner_user_id", userId);
@@ -436,20 +419,24 @@ const internalAccessList = {
} }
// 2. create empty access file // 2. create empty access file
fs.writeFileSync(htpasswdFile, '', {encoding: 'utf8'}); fs.writeFileSync(htpasswdFile, "", { encoding: "utf8" });
// 3. generate password for each user // 3. generate password for each user
if (list.items.length) { if (list.items.length) {
await new Promise((resolve, reject) => { await new Promise((resolve, reject) => {
batchflow(list.items).sequential() batchflow(list.items)
.sequential()
.each((_i, item, next) => { .each((_i, item, next) => {
if (item.password?.length) { if (item.password?.length) {
logger.info(`Adding: ${item.username}`); logger.info(`Adding: ${item.username}`);
utils.execFile('openssl', ['passwd', '-apr1', item.password]) utils
.execFile("openssl", ["passwd", "-apr1", item.password])
.then((res) => { .then((res) => {
try { try {
fs.appendFileSync(htpasswdFile, `${item.username}:${res}\n`, {encoding: 'utf8'}); fs.appendFileSync(htpasswdFile, `${item.username}:${res}\n`, {
encoding: "utf8",
});
} catch (err) { } catch (err) {
reject(err); reject(err);
} }
@@ -471,7 +458,7 @@ const internalAccessList = {
}); });
}); });
} }
} },
} };
export default internalAccessList; export default internalAccessList;
+1 -6
View File
@@ -3,7 +3,6 @@ import { castJsonIfNeed } from "../lib/helpers.js";
import auditLogModel from "../models/audit-log.js"; import auditLogModel from "../models/audit-log.js";
const internalAuditLog = { const internalAuditLog = {
/** /**
* All logs * All logs
* *
@@ -46,11 +45,7 @@ const internalAuditLog = {
get: async (access, data) => { get: async (access, data) => {
await access.can("auditlog:list"); await access.can("auditlog:list");
const query = auditLogModel const query = auditLogModel.query().andWhere("id", data.id).allowGraph("[user]").first();
.query()
.andWhere("id", data.id)
.allowGraph("[user]")
.first();
if (typeof data.expand !== "undefined" && data.expand !== null) { if (typeof data.expand !== "undefined" && data.expand !== null) {
query.withGraphFetched(`[${data.expand.join(", ")}]`); query.withGraphFetched(`[${data.expand.join(", ")}]`);
+19 -35
View File
@@ -54,9 +54,7 @@ const internalDeadHost = {
thisData.advanced_config = ""; thisData.advanced_config = "";
} }
const row = await deadHostModel.query() const row = await deadHostModel.query().insertAndFetch(thisData).then(utils.omitRow(omissions()));
.insertAndFetch(thisData)
.then(utils.omitRow(omissions()));
// Add to audit log // Add to audit log
await internalAuditLog.add(access, { await internalAuditLog.add(access, {
@@ -153,12 +151,8 @@ const internalDeadHost = {
thisData = internalHost.cleanSslHstsData(thisData, row); thisData = internalHost.cleanSslHstsData(thisData, row);
// do the row update // do the row update
await deadHostModel await deadHostModel.query().where({ id: data.id }).patch(data);
.query()
.where({id: data.id})
.patch(data);
// Add to audit log // Add to audit log
await internalAuditLog.add(access, { await internalAuditLog.add(access, {
@@ -168,11 +162,10 @@ const internalDeadHost = {
meta: thisData, meta: thisData,
}); });
const thisRow = await internalDeadHost const thisRow = await internalDeadHost.get(access, {
.get(access, { id: thisData.id,
id: thisData.id, expand: ["owner", "certificate"],
expand: ["owner", "certificate"], });
});
// Configure nginx // Configure nginx
const newMeta = await internalNginx.configure(deadHostModel, "dead_host", row); const newMeta = await internalNginx.configure(deadHostModel, "dead_host", row);
@@ -224,18 +217,15 @@ const internalDeadHost = {
* @returns {Promise} * @returns {Promise}
*/ */
delete: async (access, data) => { delete: async (access, data) => {
await access.can("dead_hosts:delete", data.id) await access.can("dead_hosts:delete", data.id);
const row = await internalDeadHost.get(access, { id: data.id }); const row = await internalDeadHost.get(access, { id: data.id });
if (!row?.id) { if (!row?.id) {
throw new errs.ItemNotFoundError(data.id); throw new errs.ItemNotFoundError(data.id);
} }
await deadHostModel await deadHostModel.query().where("id", row.id).patch({
.query() is_deleted: 1,
.where("id", row.id) });
.patch({
is_deleted: 1,
});
// Delete Nginx Config // Delete Nginx Config
await internalNginx.deleteConfig("dead_host", row); await internalNginx.deleteConfig("dead_host", row);
@@ -259,7 +249,7 @@ const internalDeadHost = {
* @returns {Promise} * @returns {Promise}
*/ */
enable: async (access, data) => { enable: async (access, data) => {
await access.can("dead_hosts:update", data.id) await access.can("dead_hosts:update", data.id);
const row = await internalDeadHost.get(access, { const row = await internalDeadHost.get(access, {
id: data.id, id: data.id,
expand: ["certificate", "owner"], expand: ["certificate", "owner"],
@@ -273,12 +263,9 @@ const internalDeadHost = {
row.enabled = 1; row.enabled = 1;
await deadHostModel await deadHostModel.query().where("id", row.id).patch({
.query() enabled: 1,
.where("id", row.id) });
.patch({
enabled: 1,
});
// Configure nginx // Configure nginx
await internalNginx.configure(deadHostModel, "dead_host", row); await internalNginx.configure(deadHostModel, "dead_host", row);
@@ -301,7 +288,7 @@ const internalDeadHost = {
* @returns {Promise} * @returns {Promise}
*/ */
disable: async (access, data) => { disable: async (access, data) => {
await access.can("dead_hosts:update", data.id) await access.can("dead_hosts:update", data.id);
const row = await internalDeadHost.get(access, { id: data.id }); const row = await internalDeadHost.get(access, { id: data.id });
if (!row?.id) { if (!row?.id) {
throw new errs.ItemNotFoundError(data.id); throw new errs.ItemNotFoundError(data.id);
@@ -312,12 +299,9 @@ const internalDeadHost = {
row.enabled = 0; row.enabled = 0;
await deadHostModel await deadHostModel.query().where("id", row.id).patch({
.query() enabled: 0,
.where("id", row.id) });
.patch({
enabled: 0,
});
// Delete Nginx Config // Delete Nginx Config
await internalNginx.deleteConfig("dead_host", row); await internalNginx.deleteConfig("dead_host", row);
@@ -342,7 +326,7 @@ const internalDeadHost = {
* @returns {Promise} * @returns {Promise}
*/ */
getAll: async (access, expand, searchQuery) => { getAll: async (access, expand, searchQuery) => {
const accessData = await access.can("dead_hosts:list") const accessData = await access.can("dead_hosts:list");
const query = deadHostModel const query = deadHostModel
.query() .query()
.where("is_deleted", 0) .where("is_deleted", 0)
+4 -1
View File
@@ -217,7 +217,10 @@ const internalNginx = {
} }
// For redirection hosts, if the scheme is not http or https, set it to $scheme // For redirection hosts, if the scheme is not http or https, set it to $scheme
if (nice_host_type === "redirection_host" && ['http', 'https'].indexOf(host.forward_scheme.toLowerCase()) === -1) { if (
nice_host_type === "redirection_host" &&
["http", "https"].indexOf(host.forward_scheme.toLowerCase()) === -1
) {
host.forward_scheme = "$scheme"; host.forward_scheme = "$scheme";
} }
+4 -14
View File
@@ -38,11 +38,7 @@ export default {
throw new errs.AuthError(ERROR_MESSAGE_INVALID_AUTH); throw new errs.AuthError(ERROR_MESSAGE_INVALID_AUTH);
} }
const auth = await authModel const auth = await authModel.query().where("user_id", "=", user.id).where("type", "=", "password").first();
.query()
.where("user_id", "=", user.id)
.where("type", "=", "password")
.first();
if (!auth) { if (!auth) {
throw new errs.AuthError(ERROR_MESSAGE_INVALID_AUTH); throw new errs.AuthError(ERROR_MESSAGE_INVALID_AUTH);
@@ -50,10 +46,7 @@ export default {
const valid = await auth.verifyPassword(data.secret); const valid = await auth.verifyPassword(data.secret);
if (!valid) { if (!valid) {
throw new errs.AuthError( throw new errs.AuthError(ERROR_MESSAGE_INVALID_AUTH, ERROR_MESSAGE_INVALID_AUTH_I18N);
ERROR_MESSAGE_INVALID_AUTH,
ERROR_MESSAGE_INVALID_AUTH_I18N,
);
} }
if (data.scope !== "user" && _.indexOf(user.roles, data.scope) === -1) { if (data.scope !== "user" && _.indexOf(user.roles, data.scope) === -1) {
@@ -171,7 +164,7 @@ export default {
} }
// Check scope // Check scope
if (!tokenData.scope || tokenData.scope[0] !== "2fa-challenge") { if (tokenData.scope?.[0] !== "2fa-challenge") {
throw new errs.AuthError("Invalid challenge token"); throw new errs.AuthError("Invalid challenge token");
} }
@@ -183,10 +176,7 @@ export default {
// Verify 2FA code // Verify 2FA code
const valid = await twoFactor.verifyForLogin(userId, code); const valid = await twoFactor.verifyForLogin(userId, code);
if (!valid) { if (!valid) {
throw new errs.AuthError( throw new errs.AuthError(ERROR_MESSAGE_INVALID_2FA, ERROR_MESSAGE_INVALID_2FA_I18N);
ERROR_MESSAGE_INVALID_2FA,
ERROR_MESSAGE_INVALID_2FA_I18N,
);
} }
// Create full token // Create full token
+3 -5
View File
@@ -257,11 +257,9 @@ const internalUser = {
}, },
deleteAll: async () => { deleteAll: async () => {
await userModel await userModel.query().patch({
.query() is_deleted: 1,
.patch({ });
is_deleted: 1,
});
}, },
/** /**
+11 -11
View File
@@ -1,19 +1,19 @@
module.exports = { module.exports = {
development: { development: {
client: 'mysql2', client: "mysql2",
migrations: { migrations: {
tableName: 'migrations', tableName: "migrations",
stub: 'lib/migrate_template.js', stub: "lib/migrate_template.js",
directory: 'migrations' directory: "migrations",
} },
}, },
production: { production: {
client: 'mysql2', client: "mysql2",
migrations: { migrations: {
tableName: 'migrations', tableName: "migrations",
stub: 'lib/migrate_template.js', stub: "lib/migrate_template.js",
directory: 'migrations' directory: "migrations",
} },
} },
}; };
+2 -5
View File
@@ -119,10 +119,7 @@ export default function (tokenString) {
// Proxy Hosts // Proxy Hosts
case "proxy_hosts": { case "proxy_hosts": {
const query = proxyHostModel const query = proxyHostModel.query().select("id").andWhere("is_deleted", 0);
.query()
.select("id")
.andWhere("is_deleted", 0);
if (permissions.visibility === "user") { if (permissions.visibility === "user") {
query.andWhere("owner_user_id", tokenUserId); query.andWhere("owner_user_id", tokenUserId);
@@ -271,7 +268,7 @@ export default function (tokenString) {
err.permission = permission; err.permission = permission;
err.permission_data = data; err.permission_data = data;
logger.error(permission, data, err.message); logger.error(permission, data, err.message);
throw errs.PermissionError("Permission Denied", err); throw new errs.PermissionError("Permission Denied", err);
} }
}, },
}; };
+37 -17
View File
@@ -2,13 +2,13 @@ import fs from "node:fs";
import NodeRSA from "node-rsa"; import NodeRSA from "node-rsa";
import { global as logger } from "../logger.js"; import { global as logger } from "../logger.js";
const keysFile = '/data/keys.json'; const keysFile = "/data/keys.json";
const mysqlEngine = 'mysql2'; const mysqlEngine = "mysql2";
const postgresEngine = 'pg'; const postgresEngine = "pg";
const sqliteClientName = 'better-sqlite3'; const sqliteClientName = "better-sqlite3";
// Not used for new setups anymore but may exist in legacy setups // Not used for new setups anymore but may exist in legacy setups
const legacySqliteClientName = 'sqlite3'; const legacySqliteClientName = "sqlite3";
let instance = null; let instance = null;
@@ -40,14 +40,20 @@ const configure = () => {
} }
} }
const toBool = (v) => /^(1|true|yes|on)$/i.test((v || '').trim()); const toBool = (v) => /^(1|true|yes|on)$/i.test((v || "").trim());
const envMysqlHost = process.env.DB_MYSQL_HOST || null; const envMysqlHost = process.env.DB_MYSQL_HOST || null;
const envMysqlUser = process.env.DB_MYSQL_USER || null; const envMysqlUser = process.env.DB_MYSQL_USER || null;
const envMysqlName = process.env.DB_MYSQL_NAME || null; const envMysqlName = process.env.DB_MYSQL_NAME || null;
const envMysqlSSL = toBool(process.env.DB_MYSQL_SSL); const envMysqlSSL = toBool(process.env.DB_MYSQL_SSL);
const envMysqlSSLRejectUnauthorized = process.env.DB_MYSQL_SSL_REJECT_UNAUTHORIZED === undefined ? true : toBool(process.env.DB_MYSQL_SSL_REJECT_UNAUTHORIZED); const envMysqlSSLRejectUnauthorized =
const envMysqlSSLVerifyIdentity = process.env.DB_MYSQL_SSL_VERIFY_IDENTITY === undefined ? true : toBool(process.env.DB_MYSQL_SSL_VERIFY_IDENTITY); process.env.DB_MYSQL_SSL_REJECT_UNAUTHORIZED === undefined
? true
: toBool(process.env.DB_MYSQL_SSL_REJECT_UNAUTHORIZED);
const envMysqlSSLVerifyIdentity =
process.env.DB_MYSQL_SSL_VERIFY_IDENTITY === undefined
? true
: toBool(process.env.DB_MYSQL_SSL_VERIFY_IDENTITY);
if (envMysqlHost && envMysqlUser && envMysqlName) { if (envMysqlHost && envMysqlUser && envMysqlName) {
// we have enough mysql creds to go with mysql // we have enough mysql creds to go with mysql
logger.info("Using MySQL configuration"); logger.info("Using MySQL configuration");
@@ -58,8 +64,10 @@ const configure = () => {
port: process.env.DB_MYSQL_PORT || 3306, port: process.env.DB_MYSQL_PORT || 3306,
user: envMysqlUser, user: envMysqlUser,
password: process.env.DB_MYSQL_PASSWORD, password: process.env.DB_MYSQL_PASSWORD,
name: envMysqlName, name: envMysqlName,
ssl: envMysqlSSL ? { rejectUnauthorized: envMysqlSSLRejectUnauthorized, verifyIdentity: envMysqlSSLVerifyIdentity } : false, ssl: envMysqlSSL
? { rejectUnauthorized: envMysqlSSLRejectUnauthorized, verifyIdentity: envMysqlSSLVerifyIdentity }
: false,
}, },
keys: getKeys(), keys: getKeys(),
}; };
@@ -137,7 +145,7 @@ const generateKeys = () => {
// Write keys config // Write keys config
try { try {
fs.writeFileSync(keysFile, JSON.stringify(keys, null, 2)); fs.writeFileSync(keysFile, JSON.stringify(keys, null, 2), { mode: 0o600 });
} catch (err) { } catch (err) {
logger.error(`Could not write JWT key pair to config file: ${keysFile}: ${err.message}`); logger.error(`Could not write JWT key pair to config file: ${keysFile}: ${err.message}`);
process.exit(1); process.exit(1);
@@ -222,7 +230,7 @@ const isDebugMode = () => !!process.env.DEBUG;
* *
* @returns {boolean} * @returns {boolean}
*/ */
const isCI = () => process.env.CI === 'true' && process.env.DEBUG === 'true'; const isCI = () => process.env.CI === "true" && process.env.DEBUG === "true";
/** /**
* Returns a public key * Returns a public key
@@ -259,4 +267,16 @@ const useLetsencryptServer = () => {
return null; return null;
}; };
export { isCI, configHas, configGet, isSqlite, isMysql, isPostgres, isDebugMode, getPrivateKey, getPublicKey, useLetsencryptStaging, useLetsencryptServer }; export {
isCI,
configHas,
configGet,
isSqlite,
isMysql,
isPostgres,
isDebugMode,
getPrivateKey,
getPublicKey,
useLetsencryptStaging,
useLetsencryptServer,
};
+1 -1
View File
@@ -1,4 +1,4 @@
import _ from "lodash"; import _ from "lodash";
export default (default_sort, default_offset, default_limit, max_limit) => { export default (default_sort, default_offset, default_limit, max_limit) => {
/** /**
+2 -2
View File
@@ -1,6 +1,6 @@
export default (req, res, next) => { export default (req, res, next) => {
if (req.params.user_id === 'me' && res.locals.access) { if (req.params.user_id === "me" && res.locals.access) {
req.params.user_id = res.locals.access.token.get('attrs').id; req.params.user_id = res.locals.access.token.get("attrs").id;
} else { } else {
req.params.user_id = Number.parseInt(req.params.user_id, 10); req.params.user_id = Number.parseInt(req.params.user_id, 10);
} }
+1 -5
View File
@@ -24,21 +24,17 @@ const apiValidator = async (schema, payload /*, description*/) => {
throw new errs.ValidationError("Payload is undefined"); throw new errs.ValidationError("Payload is undefined");
} }
const validate = ajv.compile(schema); const validate = ajv.compile(schema);
const valid = validate(payload); const valid = validate(payload);
if (valid && !validate.errors) { if (valid && !validate.errors) {
return payload; return payload;
} }
const message = ajv.errorsText(validate.errors); const message = ajv.errorsText(validate.errors);
const err = new errs.ValidationError(message); const err = new errs.ValidationError(message);
err.debug = {validationErrors: validate.errors, payload}; err.debug = { validationErrors: validate.errors, payload };
throw err; throw err;
}; };
+1 -1
View File
@@ -1,4 +1,4 @@
import Ajv from 'ajv/dist/2020.js'; import Ajv from "ajv/dist/2020.js";
import _ from "lodash"; import _ from "lodash";
import commonDefinitions from "../../schema/common.json" with { type: "json" }; import commonDefinitions from "../../schema/common.json" with { type: "json" };
import errs from "../error.js"; import errs from "../error.js";
@@ -13,13 +13,14 @@ const migrateName = "settings";
const up = (knex) => { const up = (knex) => {
logger.info(`[${migrateName}] Migrating Up...`); logger.info(`[${migrateName}] Migrating Up...`);
return knex.schema.createTable('setting', (table) => { return knex.schema
table.string('id').notNull().primary(); .createTable("setting", (table) => {
table.string('name', 100).notNull(); table.string("id").notNull().primary();
table.string('description', 255).notNull(); table.string("name", 100).notNull();
table.string('value', 255).notNull(); table.string("description", 255).notNull();
table.json('meta').notNull(); table.string("value", 255).notNull();
}) table.json("meta").notNull();
})
.then(() => { .then(() => {
logger.info(`[${migrateName}] setting Table created`); logger.info(`[${migrateName}] setting Table created`);
}); });
@@ -17,9 +17,7 @@ const up = (knex) => {
.table("redirection_host", async (table) => { .table("redirection_host", async (table) => {
// change the column default from $scheme to auto // change the column default from $scheme to auto
await table.string("forward_scheme").notNull().defaultTo("auto").alter(); await table.string("forward_scheme").notNull().defaultTo("auto").alter();
await knex('redirection_host') await knex("redirection_host").where("forward_scheme", "$scheme").update({ forward_scheme: "auto" });
.where('forward_scheme', '$scheme')
.update({ forward_scheme: 'auto' });
}) })
.then(() => { .then(() => {
logger.info(`[${migrateName}] redirection_host Table altered`); logger.info(`[${migrateName}] redirection_host Table altered`);
@@ -38,9 +36,7 @@ const down = (knex) => {
return knex.schema return knex.schema
.table("redirection_host", async (table) => { .table("redirection_host", async (table) => {
await table.string("forward_scheme").notNull().defaultTo("$scheme").alter(); await table.string("forward_scheme").notNull().defaultTo("$scheme").alter();
await knex('redirection_host') await knex("redirection_host").where("forward_scheme", "auto").update({ forward_scheme: "$scheme" });
.where('forward_scheme', 'auto')
.update({ forward_scheme: '$scheme' });
}) })
.then(() => { .then(() => {
logger.info(`[${migrateName}] redirection_host Table altered`); logger.info(`[${migrateName}] redirection_host Table altered`);
@@ -11,15 +11,15 @@ const migrateName = "trust_forwarded_proto";
* @returns {Promise} * @returns {Promise}
*/ */
const up = (knex) => { const up = (knex) => {
logger.info(`[${migrateName}] Migrating Up...`); logger.info(`[${migrateName}] Migrating Up...`);
return knex.schema return knex.schema
.alterTable('proxy_host', (table) => { .alterTable("proxy_host", (table) => {
table.tinyint('trust_forwarded_proto').notNullable().defaultTo(0); table.tinyint("trust_forwarded_proto").notNullable().defaultTo(0);
}) })
.then(() => { .then(() => {
logger.info(`[${migrateName}] proxy_host Table altered`); logger.info(`[${migrateName}] proxy_host Table altered`);
}); });
}; };
/** /**
@@ -29,15 +29,15 @@ const up = (knex) => {
* @returns {Promise} * @returns {Promise}
*/ */
const down = (knex) => { const down = (knex) => {
logger.info(`[${migrateName}] Migrating Down...`); logger.info(`[${migrateName}] Migrating Down...`);
return knex.schema return knex.schema
.alterTable('proxy_host', (table) => { .alterTable("proxy_host", (table) => {
table.dropColumn('trust_forwarded_proto'); table.dropColumn("trust_forwarded_proto");
}) })
.then(() => { .then(() => {
logger.info(`[${migrateName}] proxy_host Table altered`); logger.info(`[${migrateName}] proxy_host Table altered`);
}); });
}; };
export { up, down }; export { up, down };
+8 -8
View File
@@ -7,23 +7,23 @@ import db from "../db.js";
Model.knex(db()); Model.knex(db());
class Setting extends Model { class Setting extends Model {
$beforeInsert () { $beforeInsert() {
// Default for meta // Default for meta
if (typeof this.meta === 'undefined') { if (typeof this.meta === "undefined") {
this.meta = {}; this.meta = {};
} }
} }
static get name () { static get name() {
return 'Setting'; return "Setting";
} }
static get tableName () { static get tableName() {
return 'setting'; return "setting";
} }
static get jsonAttributes () { static get jsonAttributes() {
return ['meta']; return ["meta"];
} }
} }
+7 -7
View File
@@ -8,21 +8,21 @@ import now from "./now_helper.js";
Model.knex(db()); Model.knex(db());
class UserPermission extends Model { class UserPermission extends Model {
$beforeInsert () { $beforeInsert() {
this.created_on = now(); this.created_on = now();
this.modified_on = now(); this.modified_on = now();
} }
$beforeUpdate () { $beforeUpdate() {
this.modified_on = now(); this.modified_on = now();
} }
static get name () { static get name() {
return 'UserPermission'; return "UserPermission";
} }
static get tableName () { static get tableName() {
return 'user_permission'; return "user_permission";
} }
} }
+10 -10
View File
@@ -13,37 +13,37 @@
"regenerate-config": "node scripts/regenerate-config" "regenerate-config": "node scripts/regenerate-config"
}, },
"dependencies": { "dependencies": {
"@apidevtools/json-schema-ref-parser": "^15.3.5", "@apidevtools/json-schema-ref-parser": "^16.0.0",
"ajv": "^8.20.0", "ajv": "^8.20.0",
"archiver": "^8.0.0", "archiver": "^8.0.0",
"batchflow": "^0.4.0", "batchflow": "^0.4.0",
"bcrypt": "^6.0.0", "bcrypt": "^6.0.0",
"better-sqlite3": "^12.10.0", "better-sqlite3": "^13.0.3",
"body-parser": "^2.2.2", "body-parser": "^2.3.0",
"chalk": "5.6.2", "chalk": "5.6.2",
"compression": "^1.8.1", "compression": "^1.8.1",
"express": "^5.2.1", "express": "^5.2.1",
"express-fileupload": "^1.5.2", "express-fileupload": "^1.5.2",
"gravatar": "^1.8.2", "gravatar": "^1.8.2",
"jsonwebtoken": "^9.0.3", "jsonwebtoken": "^9.0.3",
"knex": "3.2.10", "knex": "3.3.0",
"liquidjs": "10.27.0", "liquidjs": "10.29.0",
"lodash": "^4.18.1", "lodash": "^4.18.1",
"moment": "^2.30.1", "moment": "^2.30.1",
"mysql2": "^3.22.3", "mysql2": "^3.23.4",
"node-rsa": "^2.0.0", "node-rsa": "^2.0.0",
"objection": "3.1.5", "objection": "3.1.5",
"otplib": "^13.4.0", "otplib": "^13.5.0",
"path": "^0.12.7", "path": "^0.12.7",
"pg": "^8.21.0", "pg": "^8.23.0",
"proxy-agent": "^8.0.1", "proxy-agent": "^8.0.2",
"signale": "1.4.0", "signale": "1.4.0",
"sqlite3": "^6.0.1", "sqlite3": "^6.0.1",
"temp-write": "^6.0.1" "temp-write": "^6.0.1"
}, },
"devDependencies": { "devDependencies": {
"@apidevtools/swagger-parser": "^12.1.0", "@apidevtools/swagger-parser": "^12.1.0",
"@biomejs/biome": "^2.4.15", "@biomejs/biome": "^2.5.10",
"nodemon": "^3.1.14" "nodemon": "^3.1.14"
}, },
"signale": { "signale": {
+1 -4
View File
@@ -86,10 +86,7 @@ router
}, },
{ {
event_id: req.params.event_id, event_id: req.params.event_id,
expand: expand: typeof req.query.expand === "string" ? req.query.expand.split(",") : null,
typeof req.query.expand === "string"
? req.query.expand.split(",")
: null,
}, },
); );
+7 -29
View File
@@ -44,18 +44,11 @@ router
}, },
}, },
{ {
expand: expand: typeof req.query.expand === "string" ? req.query.expand.split(",") : null,
typeof req.query.expand === "string"
? req.query.expand.split(",")
: null,
query: typeof req.query.query === "string" ? req.query.query : null, query: typeof req.query.query === "string" ? req.query.query : null,
}, },
); );
const rows = await internalCertificate.getAll( const rows = await internalCertificate.getAll(res.locals.access, data.expand, data.query);
res.locals.access,
data.expand,
data.query,
);
res.status(200).send(rows); res.status(200).send(rows);
} catch (err) { } catch (err) {
debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`); debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`);
@@ -70,15 +63,9 @@ router
*/ */
.post(async (req, res, next) => { .post(async (req, res, next) => {
try { try {
const payload = await apiValidator( const payload = await apiValidator(getValidationSchema("/nginx/certificates", "post"), req.body);
getValidationSchema("/nginx/certificates", "post"),
req.body,
);
req.setTimeout(900000); // 15 minutes timeout req.setTimeout(900000); // 15 minutes timeout
const result = await internalCertificate.create( const result = await internalCertificate.create(res.locals.access, payload);
res.locals.access,
payload,
);
res.status(201).send(result); res.status(201).send(result);
} catch (err) { } catch (err) {
debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`); debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`);
@@ -139,16 +126,10 @@ router
*/ */
.post(async (req, res, next) => { .post(async (req, res, next) => {
try { try {
const payload = await apiValidator( const payload = await apiValidator(getValidationSchema("/nginx/certificates/test-http", "post"), req.body);
getValidationSchema("/nginx/certificates/test-http", "post"),
req.body,
);
req.setTimeout(60000); // 1 minute timeout req.setTimeout(60000); // 1 minute timeout
const result = await internalCertificate.testHttpsChallenge( const result = await internalCertificate.testHttpsChallenge(res.locals.access, payload);
res.locals.access,
payload,
);
res.status(200).send(result); res.status(200).send(result);
} catch (err) { } catch (err) {
debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`); debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`);
@@ -224,10 +205,7 @@ router
}, },
{ {
certificate_id: req.params.certificate_id, certificate_id: req.params.certificate_id,
expand: expand: typeof req.query.expand === "string" ? req.query.expand.split(",") : null,
typeof req.query.expand === "string"
? req.query.expand.split(",")
: null,
}, },
); );
const row = await internalCertificate.get(res.locals.access, { const row = await internalCertificate.get(res.locals.access, {
+4 -2
View File
@@ -194,9 +194,11 @@ router
/** /**
* POST /api/nginx/dead-hosts/123/disable * POST /api/nginx/dead-hosts/123/disable
*/ */
.post((req, res, next) => { .post(async (req, res, next) => {
try { try {
const result = internalDeadHost.disable(res.locals.access, { id: Number.parseInt(req.params.host_id, 10) }); const result = await internalDeadHost.disable(res.locals.access, {
id: Number.parseInt(req.params.host_id, 10),
});
res.status(200).send(result); res.status(200).send(result);
} catch (err) { } catch (err) {
debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`); debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`);
+10 -41
View File
@@ -48,18 +48,11 @@ router
}, },
}, },
{ {
expand: expand: typeof req.query.expand === "string" ? req.query.expand.split(",") : null,
typeof req.query.expand === "string"
? req.query.expand.split(",")
: null,
query: typeof req.query.query === "string" ? req.query.query : null, query: typeof req.query.query === "string" ? req.query.query : null,
}, },
); );
const users = await internalUser.getAll( const users = await internalUser.getAll(res.locals.access, data.expand, data.query);
res.locals.access,
data.expand,
data.query,
);
res.status(200).send(users); res.status(200).send(users);
} catch (err) { } catch (err) {
debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`); debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`);
@@ -95,10 +88,7 @@ router
} }
} }
const payload = await apiValidator( const payload = await apiValidator(getValidationSchema("/users", "post"), body);
getValidationSchema("/users", "post"),
body,
);
const user = await internalUser.create(res.locals.access, payload); const user = await internalUser.create(res.locals.access, payload);
res.status(201).send(user); res.status(201).send(user);
} catch (err) { } catch (err) {
@@ -169,20 +159,14 @@ router
}, },
{ {
user_id: req.params.user_id, user_id: req.params.user_id,
expand: expand: typeof req.query.expand === "string" ? req.query.expand.split(",") : null,
typeof req.query.expand === "string"
? req.query.expand.split(",")
: null,
}, },
); );
const user = await internalUser.get(res.locals.access, { const user = await internalUser.get(res.locals.access, {
id: data.user_id, id: data.user_id,
expand: data.expand, expand: data.expand,
omit: internalUser.getUserOmisionsByAccess( omit: internalUser.getUserOmisionsByAccess(res.locals.access, data.user_id),
res.locals.access,
data.user_id,
),
}); });
res.status(200).send(user); res.status(200).send(user);
} catch (err) { } catch (err) {
@@ -198,10 +182,7 @@ router
*/ */
.put(async (req, res, next) => { .put(async (req, res, next) => {
try { try {
const payload = await apiValidator( const payload = await apiValidator(getValidationSchema("/users/{userID}", "put"), req.body);
getValidationSchema("/users/{userID}", "put"),
req.body,
);
payload.id = req.params.user_id; payload.id = req.params.user_id;
const result = await internalUser.update(res.locals.access, payload); const result = await internalUser.update(res.locals.access, payload);
res.status(200).send(result); res.status(200).send(result);
@@ -248,10 +229,7 @@ router
*/ */
.put(async (req, res, next) => { .put(async (req, res, next) => {
try { try {
const payload = await apiValidator( const payload = await apiValidator(getValidationSchema("/users/{userID}/auth", "put"), req.body);
getValidationSchema("/users/{userID}/auth", "put"),
req.body,
);
payload.id = req.params.user_id; payload.id = req.params.user_id;
const result = await internalUser.setPassword(res.locals.access, payload); const result = await internalUser.setPassword(res.locals.access, payload);
res.status(200).send(result); res.status(200).send(result);
@@ -281,15 +259,9 @@ router
*/ */
.put(async (req, res, next) => { .put(async (req, res, next) => {
try { try {
const payload = await apiValidator( const payload = await apiValidator(getValidationSchema("/users/{userID}/permissions", "put"), req.body);
getValidationSchema("/users/{userID}/permissions", "put"),
req.body,
);
payload.id = req.params.user_id; payload.id = req.params.user_id;
const result = await internalUser.setPermissions( const result = await internalUser.setPermissions(res.locals.access, payload);
res.locals.access,
payload,
);
res.status(200).send(result); res.status(200).send(result);
} catch (err) { } catch (err) {
debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`); debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`);
@@ -408,10 +380,7 @@ router
*/ */
.post(async (req, res, next) => { .post(async (req, res, next) => {
try { try {
const { code } = await apiValidator( const { code } = await apiValidator(getValidationSchema("/users/{userID}/2fa/enable", "post"), req.body);
getValidationSchema("/users/{userID}/2fa/enable", "post"),
req.body,
);
const result = await internal2FA.enable(res.locals.access, req.params.user_id, code); const result = await internal2FA.enable(res.locals.access, req.params.user_id, code);
res.status(200).send(result); res.status(200).send(result);
} catch (err) { } catch (err) {
+32 -35
View File
@@ -1,3 +1,4 @@
import fs from "node:fs/promises";
import { installPlugins } from "./lib/certbot.js"; import { installPlugins } from "./lib/certbot.js";
import utils from "./lib/utils.js"; import utils from "./lib/utils.js";
import { setup as logger } from "./logger.js"; import { setup as logger } from "./logger.js";
@@ -6,12 +7,11 @@ import certificateModel from "./models/certificate.js";
import settingModel from "./models/setting.js"; import settingModel from "./models/setting.js";
import userModel from "./models/user.js"; import userModel from "./models/user.js";
import userPermissionModel from "./models/user_permission.js"; import userPermissionModel from "./models/user_permission.js";
import fs from "fs/promises";
export const isSetup = async () => { export const isSetup = async () => {
const row = await userModel.query().select("id").where("is_deleted", 0).first(); const row = await userModel.query().select("id").where("is_deleted", 0).first();
return row?.id > 0; return row?.id > 0;
} };
/** /**
* Creates a default admin users if one doesn't already exist in the database * Creates a default admin users if one doesn't already exist in the database
@@ -45,18 +45,14 @@ const setupDefaultUser = async () => {
roles: ["admin"], roles: ["admin"],
}; };
const user = await userModel const user = await userModel.query().insertAndFetch(data);
.query()
.insertAndFetch(data);
await authModel await authModel.query().insert({
.query() user_id: user.id,
.insert({ type: "password",
user_id: user.id, secret: initialAdminPassword,
type: "password", meta: {},
secret: initialAdminPassword, });
meta: {},
});
await userPermissionModel.query().insert({ await userPermissionModel.query().insert({
user_id: user.id, user_id: user.id,
@@ -78,22 +74,16 @@ const setupDefaultUser = async () => {
* @returns {Promise} * @returns {Promise}
*/ */
const setupDefaultSettings = async () => { const setupDefaultSettings = async () => {
const row = await settingModel const row = await settingModel.query().select("id").where({ id: "default-site" }).first();
.query()
.select("id")
.where({ id: "default-site" })
.first();
if (!row?.id) { if (!row?.id) {
await settingModel await settingModel.query().insert({
.query() id: "default-site",
.insert({ name: "Default Site",
id: "default-site", description: "What to show when Nginx is hit with an unknown Host",
name: "Default Site", value: "congratulations",
description: "What to show when Nginx is hit with an unknown Host", meta: {},
value: "congratulations", });
meta: {},
});
logger.info("Default settings added"); logger.info("Default settings added");
} }
}; };
@@ -104,10 +94,7 @@ const setupDefaultSettings = async () => {
* @returns {Promise} * @returns {Promise}
*/ */
const setupCertbotPlugins = async () => { const setupCertbotPlugins = async () => {
const certificates = await certificateModel const certificates = await certificateModel.query().where("is_deleted", 0).andWhere("provider", "letsencrypt");
.query()
.where("is_deleted", 0)
.andWhere("provider", "letsencrypt");
if (certificates?.length) { if (certificates?.length) {
const plugins = []; const plugins = [];
@@ -122,14 +109,24 @@ const setupCertbotPlugins = async () => {
// Make sure credentials file exists // Make sure credentials file exists
const credentials_loc = `/etc/letsencrypt/credentials/credentials-${certificate.id}`; const credentials_loc = `/etc/letsencrypt/credentials/credentials-${certificate.id}`;
if (typeof certificate.meta.dns_provider_credentials === "string") { if (typeof certificate.meta.dns_provider_credentials === "string") {
promises.push(fs.mkdir("/etc/letsencrypt/credentials", { recursive: true }) promises.push(
.then(() => fs.writeFile(credentials_loc, certificate.meta.dns_provider_credentials, { mode: 0o600, flag: "wx" })) fs
.catch((err) => { if (err.code !== "EEXIST") throw err; })); .mkdir("/etc/letsencrypt/credentials", { recursive: true })
.then(() =>
fs.writeFile(credentials_loc, certificate.meta.dns_provider_credentials, {
mode: 0o600,
flag: "wx",
}),
)
.catch((err) => {
if (err.code !== "EEXIST") throw err;
}),
);
} }
} }
return true; return true;
}); });
await installPlugins(plugins); await installPlugins(plugins);
if (promises.length) { if (promises.length) {
+386 -339
View File
File diff suppressed because it is too large. Load diff
@@ -46,6 +46,12 @@ for loc in "${locations[@]}"; do
chownit "$loc" chownit "$loc"
done done
# Ensure the JWT key file is owned by the runtime user, even when the /data
# directory ownership already matches PUID:PGID (chownit skips recursion then)
if [ -f /data/keys.json ]; then
chown "$PUID:$PGID" /data/keys.json
fi
if [ "$(is_true "${SKIP_CERTBOT_OWNERSHIP:-}")" = '1' ]; then if [ "$(is_true "${SKIP_CERTBOT_OWNERSHIP:-}")" = '1' ]; then
log_info 'Skipping ownership change of certbot directories' log_info 'Skipping ownership change of certbot directories'
else else
+73 -90
View File
@@ -1,92 +1,75 @@
{ {
"$schema": "https://biomejs.dev/schemas/2.4.15/schema.json", "$schema": "https://biomejs.dev/schemas/2.5.10/schema.json",
"vcs": { "vcs": {
"enabled": true, "enabled": true,
"clientKind": "git", "clientKind": "git",
"useIgnoreFile": true "useIgnoreFile": true
}, },
"files": { "files": {
"ignoreUnknown": false, "ignoreUnknown": false,
"includes": [ "includes": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "!**/dist/**/*"]
"**/*.ts", },
"**/*.tsx", "formatter": {
"**/*.js", "enabled": true,
"**/*.jsx", "indentStyle": "tab",
"!**/dist/**/*" "indentWidth": 4,
] "lineWidth": 120,
}, "formatWithErrors": true
"formatter": { },
"enabled": true, "assist": {
"indentStyle": "tab", "actions": {
"indentWidth": 4, "source": {
"lineWidth": 120, "organizeImports": {
"formatWithErrors": true "level": "on",
}, "options": {
"assist": { "groups": [
"actions": { ":BUN:",
"source": { ":NODE:",
"organizeImports": { ["npm:*", "npm:*/**"],
"level": "on", ":PACKAGE_WITH_PROTOCOL:",
"options": { ":URL:",
"groups": [ ":PACKAGE:",
":BUN:", ["/src/*", "/src/**"],
":NODE:", ["/**"],
[ ["#*", "#*/**"],
"npm:*", ":PATH:"
"npm:*/**" ]
], }
":PACKAGE_WITH_PROTOCOL:", }
":URL:", }
":PACKAGE:", }
[ },
"/src/*", "linter": {
"/src/**" "enabled": true,
], "rules": {
[ "preset": "recommended",
"/**" "correctness": {
], "useUniqueElementIds": "off"
[ },
"#*", "suspicious": {
"#*/**" "noExplicitAny": "off",
], "noArrayIndexKey": "off"
":PATH:" },
] "performance": {
} "noDelete": "off"
} },
} "nursery": "off",
} "a11y": {
}, "useSemanticElements": "off",
"linter": { "useValidAnchor": "off"
"enabled": true, },
"rules": { "style": {
"recommended": true, "noParameterAssign": "error",
"correctness": { "useAsConstAssertion": "error",
"useUniqueElementIds": "off" "useDefaultParameterLast": "error",
}, "useEnumInitializers": "error",
"suspicious": { "useSelfClosingElements": "error",
"noExplicitAny": "off", "useSingleVarDeclarator": "error",
"noArrayIndexKey": "off" "noUnusedTemplateLiteral": "error",
}, "useNumberNamespace": "error",
"performance": { "noInferrableTypes": "error",
"noDelete": "off" "noUselessElse": "error"
}, }
"nursery": "off", }
"a11y": { }
"useSemanticElements": "off",
"useValidAnchor": "off"
},
"style": {
"noParameterAssign": "error",
"useAsConstAssertion": "error",
"useDefaultParameterLast": "error",
"useEnumInitializers": "error",
"useSelfClosingElements": "error",
"useSingleVarDeclarator": "error",
"noUnusedTemplateLiteral": "error",
"useNumberNamespace": "error",
"noInferrableTypes": "error",
"noUselessElse": "error"
}
}
}
} }
+26 -25
View File
@@ -17,50 +17,51 @@
}, },
"dependencies": { "dependencies": {
"@tabler/core": "^1.4.0", "@tabler/core": "^1.4.0",
"@tabler/icons-react": "^3.44.0", "@tabler/icons-react": "^3.46.0",
"@tanstack/react-query": "^5.101.0", "@tanstack/react-query": "^5.101.4",
"@tanstack/react-table": "^8.21.3", "@tanstack/react-table": "^9.1.2",
"@uiw/react-textarea-code-editor": "^3.1.1", "@uiw/react-textarea-code-editor": "^3.1.1",
"classnames": "^2.5.1", "classnames": "^2.5.1",
"country-flag-icons": "^1.6.17", "country-flag-icons": "^1.6.20",
"date-fns": "^4.4.0", "date-fns": "^4.4.0",
"ez-modal-react": "^1.0.5", "ez-modal-react": "^1.0.5",
"formik": "^2.4.9", "formik": "^2.4.9",
"generate-password-browser": "^1.1.0", "generate-password-browser": "^1.1.0",
"humps": "^2.0.1", "humps": "^2.0.1",
"query-string": "^9.4.0", "query-string": "^9.5.0",
"react": "^19.2.7", "react": "^19.2.8",
"react-bootstrap": "^2.10.10", "react-bootstrap": "^2.10.10",
"react-dom": "^19.2.7", "react-dom": "^19.2.8",
"react-intl": "^10.1.11", "react-intl": "^10.1.22",
"react-markdown": "^10.1.0", "react-markdown": "^10.1.0",
"react-router-dom": "^7.16.0", "react-qr-code": "^2.2.0",
"react-router-dom": "^7.18.2",
"react-select": "^5.10.2", "react-select": "^5.10.2",
"react-toastify": "^11.1.0", "react-toastify": "^11.1.0",
"rooks": "^9.8.0" "rooks": "^9.9.0"
}, },
"devDependencies": { "devDependencies": {
"@biomejs/biome": "^2.4.15", "@biomejs/biome": "^2.5.10",
"@formatjs/cli": "^6.16.6", "@formatjs/cli": "^6.16.19",
"@tanstack/react-query-devtools": "^5.100.14", "@tanstack/react-query-devtools": "^5.101.4",
"@testing-library/dom": "^10.4.1", "@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.9.1", "@testing-library/jest-dom": "^7.0.1",
"@testing-library/react": "^16.3.2", "@testing-library/react": "^16.3.2",
"@types/country-flag-icons": "^1.2.2", "@types/country-flag-icons": "^1.2.2",
"@types/humps": "^2.0.6", "@types/humps": "^2.0.6",
"@types/node": "^25.9.1", "@types/node": "^26.2.0",
"@types/react": "^19.2.16", "@types/react": "^19.2.18",
"@types/react-dom": "^19.2.3", "@types/react-dom": "^19.2.4",
"@types/react-table": "^7.7.20", "@types/react-table": "^7.7.20",
"@vitejs/plugin-react": "^6.0.2", "@vitejs/plugin-react": "^6.1.0",
"happy-dom": "^20.9.0", "happy-dom": "^20.11.6",
"postcss": "^8.5.15", "postcss": "^8.5.26",
"postcss-simple-vars": "^7.0.1", "postcss-simple-vars": "^7.0.1",
"sass": "^1.100.0", "sass": "^1.103.1",
"tmp": "^0.2.7", "tmp": "^0.2.7",
"typescript": "6.0.3", "typescript": "7.0.2",
"vite": "^8.0.16", "vite": "^8.2.2",
"vite-plugin-checker": "^0.14.1", "vite-plugin-checker": "^0.14.5",
"vitest": "^4.1.8" "vitest": "^4.1.11"
} }
} }
+6 -5
View File
@@ -1,12 +1,13 @@
import type { Table as ReactTable } from "@tanstack/react-table"; import type { Table as ReactTable, RowData } from "@tanstack/react-table";
import cn from "classnames"; import cn from "classnames";
import type { ReactNode } from "react"; import type { ReactNode } from "react";
import { Button, HasPermission } from "src/components"; import { Button, HasPermission } from "src/components";
import type { Features } from "src/components/Table/features";
import { T } from "src/locale"; import { T } from "src/locale";
import { type ADMIN, MANAGE, type Permission, type Section } from "src/modules/Permissions"; import { type ADMIN, MANAGE, type Permission, type Section } from "src/modules/Permissions";
interface Props { interface Props<TData extends RowData> {
tableInstance: ReactTable<any>; tableInstance: ReactTable<Features, TData>;
onNew?: () => void; onNew?: () => void;
isFiltered?: boolean; isFiltered?: boolean;
object: string; object: string;
@@ -16,7 +17,7 @@ interface Props {
permissionSection?: Section | typeof ADMIN; permissionSection?: Section | typeof ADMIN;
permission?: Permission; permission?: Permission;
} }
function EmptyData({ function EmptyData<TData extends RowData>({
tableInstance, tableInstance,
onNew, onNew,
isFiltered, isFiltered,
@@ -26,7 +27,7 @@ function EmptyData({
customAddBtn, customAddBtn,
permissionSection, permissionSection,
permission, permission,
}: Props) { }: Props<TData>) {
return ( return (
<tr> <tr>
<td colSpan={tableInstance.getVisibleFlatColumns().length}> <td colSpan={tableInstance.getVisibleFlatColumns().length}>
@@ -65,8 +65,12 @@ export function AccessClientFields({ initialValues, name = "clients" }: Props) {
value={client.directive} value={client.directive}
onChange={(e) => handleChange(idx, "directive", e.target.value)} onChange={(e) => handleChange(idx, "directive", e.target.value)}
> >
<option value="allow"><T id="action.allow" /></option> <option value="allow">
<option value="deny"><T id="action.deny" /></option> <T id="action.allow" />
</option>
<option value="deny">
<T id="action.deny" />
</option>
</select> </select>
</span> </span>
<input <input
@@ -81,16 +85,13 @@ export function AccessClientFields({ initialValues, name = "clients" }: Props) {
</div> </div>
</div> </div>
<div className="col-1"> <div className="col-1">
<a <button
role="button" type="button"
className="btn btn-ghost btn-danger p-0" className="btn btn-ghost btn-danger p-0"
onClick={(e) => { onClick={() => handleRemove(idx)}
e.preventDefault();
handleRemove(idx);
}}
> >
<IconX size={16} /> <IconX size={16} />
</a> </button>
</div> </div>
</div> </div>
))} ))}
@@ -112,7 +113,9 @@ export function AccessClientFields({ initialValues, name = "clients" }: Props) {
value="deny" value="deny"
disabled disabled
> >
<option value="deny"><T id="action.deny" /></option> <option value="deny">
<T id="action.deny" />
</option>
</select> </select>
</span> </span>
<input <input
@@ -82,16 +82,13 @@ export function BasicAuthFields({ initialValues, name = "items" }: Props) {
/> />
</div> </div>
<div className="col-1"> <div className="col-1">
<a <button
role="button" type="button"
className="btn btn-ghost btn-danger p-0" className="btn btn-ghost btn-danger p-0"
onClick={(e) => { onClick={() => handleRemove(idx)}
e.preventDefault();
handleRemove(idx);
}}
> >
<IconX size={16} /> <IconX size={16} />
</a> </button>
</div> </div>
</div> </div>
))} ))}
@@ -10,7 +10,13 @@ interface Props {
requireDomainNames?: boolean; // used for streams requireDomainNames?: boolean; // used for streams
color?: string; color?: string;
} }
export function SSLOptionsFields({ forHttp = true, forProxyHost = false, forceDNSForNew, requireDomainNames, color = "bg-cyan" }: Props) { export function SSLOptionsFields({
forHttp = true,
forProxyHost = false,
forceDNSForNew,
requireDomainNames,
color = "bg-cyan",
}: Props) {
const { values, setFieldValue } = useFormikContext(); const { values, setFieldValue } = useFormikContext();
const v: any = values || {}; const v: any = values || {};
@@ -116,10 +122,12 @@ export function SSLOptionsFields({ forHttp = true, forProxyHost = false, forceDN
</div> </div>
); );
const getHttpAdvancedOptions = () =>( const getHttpAdvancedOptions = () => (
<div> <div>
<details> <details>
<summary className="mb-1"><T id="domains.advanced" /></summary> <summary className="mb-1">
<T id="domains.advanced" />
</summary>
<div className="row"> <div className="row">
<div className="col-12"> <div className="col-12">
<Field name="trustForwardedProto"> <Field name="trustForwardedProto">
+4 -1
View File
@@ -72,7 +72,10 @@ export function SiteHeader() {
<div className="dropdown-menu dropdown-menu-end dropdown-menu-arrow"> <div className="dropdown-menu dropdown-menu-end dropdown-menu-arrow">
<div className="d-md-none"> <div className="d-md-none">
{/* biome-ignore lint/a11y/noStaticElementInteractions lint/a11y/useKeyWithClickEvents: This div is not interactive. */} {/* biome-ignore lint/a11y/noStaticElementInteractions lint/a11y/useKeyWithClickEvents: This div is not interactive. */}
<div className="p-2 pb-1 pe-1 d-flex align-items-center" onClick={e => e.stopPropagation()}> <div
className="p-2 pb-1 pe-1 d-flex align-items-center"
onClick={(e) => e.stopPropagation()}
>
<div className="ps-2 pe-1 me-auto"> <div className="ps-2 pe-1 me-auto">
<div>{currentUser?.nickname}</div> <div>{currentUser?.nickname}</div>
<div className="mt-1 small text-secondary text-nowrap"> <div className="mt-1 small text-secondary text-nowrap">
+8 -8
View File
@@ -143,7 +143,6 @@ const getMenuDropown = (item: MenuItem, onClick?: () => void) => {
className="nav-link dropdown-toggle" className="nav-link dropdown-toggle"
href={item.to} href={item.to}
data-bs-toggle="dropdown" data-bs-toggle="dropdown"
data-bs-auto-close="outside"
aria-expanded="false" aria-expanded="false"
role="button" role="button"
> >
@@ -176,13 +175,14 @@ const getMenuDropown = (item: MenuItem, onClick?: () => void) => {
}; };
export function SiteMenu() { export function SiteMenu() {
const closeMenu = () => setTimeout(() => { const closeMenu = () =>
const navbarToggler = document.querySelector<HTMLElement>(".navbar-toggler"); setTimeout(() => {
const navbarMenu = document.querySelector("#navbar-menu"); const navbarToggler = document.querySelector<HTMLElement>(".navbar-toggler");
if (navbarToggler && navbarMenu?.classList.contains("show")) { const navbarMenu = document.querySelector("#navbar-menu");
navbarToggler.click(); if (navbarToggler && navbarMenu?.classList.contains("show")) {
} navbarToggler.click();
}, 300); }
}, 300);
return ( return (
<header className="navbar-expand-md"> <header className="navbar-expand-md">
+5 -4
View File
@@ -1,9 +1,10 @@
import type { Table as ReactTable } from "@tanstack/react-table"; import type { Table as ReactTable, RowData } from "@tanstack/react-table";
import type { Features } from "./features";
interface Props { interface Props<TData extends RowData> {
tableInstance: ReactTable<any>; tableInstance: ReactTable<Features, TData>;
} }
function EmptyRow({ tableInstance }: Props) { function EmptyRow<TData extends RowData>({ tableInstance }: Props<TData>) {
return ( return (
<tr> <tr>
<td colSpan={tableInstance.getVisibleFlatColumns().length}> <td colSpan={tableInstance.getVisibleFlatColumns().length}>
+2 -2
View File
@@ -1,8 +1,8 @@
import { flexRender } from "@tanstack/react-table"; import { flexRender, type RowData } from "@tanstack/react-table";
import type { TableLayoutProps } from "src/components"; import type { TableLayoutProps } from "src/components";
import { EmptyRow } from "./EmptyRow"; import { EmptyRow } from "./EmptyRow";
function TableBody<T>(props: TableLayoutProps<T>) { function TableBody<T extends RowData>(props: TableLayoutProps<T>) {
const { tableInstance, extraStyles, emptyState } = props; const { tableInstance, extraStyles, emptyState } = props;
const rows = tableInstance.getRowModel().rows; const rows = tableInstance.getRowModel().rows;
@@ -1,8 +1,8 @@
import { IconArrowsSort, IconChevronDown, IconChevronUp } from "@tabler/icons-react"; import { IconArrowsSort, IconChevronDown, IconChevronUp } from "@tabler/icons-react";
import { flexRender } from "@tanstack/react-table"; import { flexRender, type RowData } from "@tanstack/react-table";
import type { TableLayoutProps } from "src/components"; import type { TableLayoutProps } from "src/components";
function TableHeader<T>(props: TableLayoutProps<T>) { function TableHeader<T extends RowData>(props: TableLayoutProps<T>) {
const { tableInstance } = props; const { tableInstance } = props;
const headerGroups = tableInstance.getHeaderGroups(); const headerGroups = tableInstance.getHeaderGroups();
@@ -61,4 +61,4 @@ const tableEventReducer = (state: any, { type, payload }: any) => {
} }
}; };
export { tableEvents, tableEventReducer }; export { tableEventReducer, tableEvents };
@@ -1,15 +1,16 @@
import type { Table as ReactTable } from "@tanstack/react-table"; import type { Table as ReactTable, RowData } from "@tanstack/react-table";
import type { Features } from "./features";
import { TableBody } from "./TableBody"; import { TableBody } from "./TableBody";
import { TableHeader } from "./TableHeader"; import { TableHeader } from "./TableHeader";
interface TableLayoutProps<TFields> { interface TableLayoutProps<TFields extends RowData> {
tableInstance: ReactTable<TFields>; tableInstance: ReactTable<Features, TFields>;
emptyState?: React.ReactNode; emptyState?: React.ReactNode;
extraStyles?: { extraStyles?: {
row: (rowData: TFields) => any | undefined; row: (rowData: TFields) => any | undefined;
}; };
} }
function TableLayout<TFields>(props: TableLayoutProps<TFields>) { function TableLayout<TFields extends RowData>(props: TableLayoutProps<TFields>) {
const hasRows = props.tableInstance.getRowModel().rows.length > 0; const hasRows = props.tableInstance.getRowModel().rows.length > 0;
return ( return (
<div className="table-responsive"> <div className="table-responsive">
+35
View File
@@ -0,0 +1,35 @@
import {
columnVisibilityFeature,
createSortedRowModel,
metaHelper,
rowSortingFeature,
tableFeatures,
} from "@tanstack/react-table";
interface ColumnMeta {
className?: string;
}
interface TableMeta {
isFetching?: boolean;
}
/**
* Shared TanStack Table v9 feature registration for every table in the app.
* Sorting and column visibility are used (or their APIs are called
* unconditionally, e.g. `getVisibleFlatColumns`/`getVisibleCells`) by the
* shared TableLayout/TableHeader/TableBody/EmptyData components, so every
* table instance must register them even when a particular table doesn't
* wire up controlled sorting state itself.
*/
const features = tableFeatures({
rowSortingFeature,
sortedRowModel: createSortedRowModel(),
columnVisibilityFeature,
columnMeta: metaHelper<ColumnMeta>(),
tableMeta: metaHelper<TableMeta>(),
});
type Features = typeof features;
export { type ColumnMeta, type Features, features, type TableMeta };
+1
View File
@@ -1,4 +1,5 @@
export * from "./Formatter"; export * from "./Formatter";
export * from "./features";
export * from "./TableHeader"; export * from "./TableHeader";
export * from "./TableHelpers"; export * from "./TableHelpers";
export * from "./TableLayout"; export * from "./TableLayout";
+82 -82
View File
@@ -27,73 +27,73 @@ import langList from "./lang/lang-list.json";
// not the country code // not the country code
// Remember when adding to this list, also update check-locales.js script // Remember when adding to this list, also update check-locales.js script
const localeOptions = [ const localeOptions = [
["en", "en-US", langEn], ["en", "en-US", langEn],
["de", "de-DE", langDe], ["de", "de-DE", langDe],
["es", "es-ES", langEs], ["es", "es-ES", langEs],
["et", "et-EE", langEt], ["et", "et-EE", langEt],
["pt", "pt-PT", langPt], ["pt", "pt-PT", langPt],
["fr", "fr-FR", langFr], ["fr", "fr-FR", langFr],
["ga", "ga-IE", langGa], ["ga", "ga-IE", langGa],
["ja", "ja-JP", langJa], ["ja", "ja-JP", langJa],
["it", "it-IT", langIt], ["it", "it-IT", langIt],
["nl", "nl-NL", langNl], ["nl", "nl-NL", langNl],
["pl", "pl-PL", langPl], ["pl", "pl-PL", langPl],
["ru", "ru-RU", langRu], ["ru", "ru-RU", langRu],
["sk", "sk-SK", langSk], ["sk", "sk-SK", langSk],
["cs", "cs-CZ", langCs], ["cs", "cs-CZ", langCs],
["vi", "vi-VN", langVi], ["vi", "vi-VN", langVi],
["zh", "zh-CN", langZh], ["zh", "zh-CN", langZh],
["ko", "ko-KR", langKo], ["ko", "ko-KR", langKo],
["bg", "bg-BG", langBg], ["bg", "bg-BG", langBg],
["id", "id-ID", langId], ["id", "id-ID", langId],
["tr", "tr-TR", langTr], ["tr", "tr-TR", langTr],
["hu", "hu-HU", langHu], ["hu", "hu-HU", langHu],
["no", "no-NO", langNo], ["no", "no-NO", langNo],
]; ];
const loadMessages = (locale?: string): typeof langList & typeof langEn => { const loadMessages = (locale?: string): typeof langList & typeof langEn => {
const thisLocale = (locale || "en").slice(0, 2); const thisLocale = (locale || "en").slice(0, 2);
// ensure this lang exists in localeOptions above, otherwise fallback to en // ensure this lang exists in localeOptions above, otherwise fallback to en
if (thisLocale === "en" || !localeOptions.some(([code]) => code === thisLocale)) { if (thisLocale === "en" || !localeOptions.some(([code]) => code === thisLocale)) {
return Object.assign({}, langList, langEn); return Object.assign({}, langList, langEn);
} }
return Object.assign({}, langList, langEn, localeOptions.find(([code]) => code === thisLocale)?.[2]); return Object.assign({}, langList, langEn, localeOptions.find(([code]) => code === thisLocale)?.[2]);
}; };
const getFlagCodeForLocale = (locale?: string) => { const getFlagCodeForLocale = (locale?: string) => {
const thisLocale = (locale || "en").slice(0, 2); const thisLocale = (locale || "en").slice(0, 2);
// only add to this if your flag is different from the locale code // only add to this if your flag is different from the locale code
const specialCases: Record<string, string> = { const specialCases: Record<string, string> = {
ja: "jp", // Japan ja: "jp", // Japan
zh: "cn", // China zh: "cn", // China
vi: "vn", // Vietnam vi: "vn", // Vietnam
ko: "kr", // Korea ko: "kr", // Korea
cs: "cz", // Czechia cs: "cz", // Czechia
ga: "ie", // Ireland (Irish) ga: "ie", // Ireland (Irish)
}; };
if (specialCases[thisLocale]) { if (specialCases[thisLocale]) {
return specialCases[thisLocale].toUpperCase(); return specialCases[thisLocale].toUpperCase();
} }
return thisLocale.toUpperCase(); return thisLocale.toUpperCase();
}; };
const getLocale = (short = false) => { const getLocale = (short = false) => {
let loc = window.localStorage.getItem("locale"); let loc = window.localStorage.getItem("locale");
if (!loc) { if (!loc) {
loc = document.documentElement.lang; loc = document.documentElement.lang;
} }
if (short) { if (short) {
return loc.slice(0, 2); return loc.slice(0, 2);
} }
// finally, fallback // finally, fallback
if (!loc) { if (!loc) {
loc = "en"; loc = "en";
} }
return loc; return loc;
}; };
const cache = createIntlCache(); const cache = createIntlCache();
@@ -102,41 +102,41 @@ const initialMessages = loadMessages(getLocale());
let intl = createIntl({ locale: getLocale(), messages: initialMessages }, cache); let intl = createIntl({ locale: getLocale(), messages: initialMessages }, cache);
const changeLocale = (locale: string): void => { const changeLocale = (locale: string): void => {
const messages = loadMessages(locale); const messages = loadMessages(locale);
intl = createIntl({ locale, messages }, cache); intl = createIntl({ locale, messages }, cache);
window.localStorage.setItem("locale", locale); window.localStorage.setItem("locale", locale);
document.documentElement.lang = locale; document.documentElement.lang = locale;
}; };
// This is a translation component that wraps the translation in a span with a data // This is a translation component that wraps the translation in a span with a data
// attribute so devs can inspect the element to see the translation ID // attribute so devs can inspect the element to see the translation ID
const T = ({ const T = ({
id, id,
data, data,
tData, tData,
}: { }: {
id: string; id: string;
data?: Record<string, string | number | undefined>; data?: Record<string, string | number | undefined>;
tData?: Record<string, string>; tData?: Record<string, string>;
}) => { }) => {
const translatedData: Record<string, string> = {}; const translatedData: Record<string, string> = {};
if (tData) { if (tData) {
// iterate over tData and translate each value // iterate over tData and translate each value
Object.entries(tData).forEach(([key, value]) => { Object.entries(tData).forEach(([key, value]) => {
translatedData[key] = intl.formatMessage({ id: value }); translatedData[key] = intl.formatMessage({ id: value });
}); });
} }
return ( return (
<span data-translation-id={id}> <span data-translation-id={id}>
{intl.formatMessage( {intl.formatMessage(
{ id }, { id },
{ {
...data, ...data,
...translatedData, ...translatedData,
}, },
)} )}
</span> </span>
); );
}; };
//console.log("L:", localeOptions); //console.log("L:", localeOptions);
+1 -6
View File
@@ -1,9 +1,4 @@
import { import { fromUnixTime, type IntlFormatFormatOptions, intlFormat, parseISO } from "date-fns";
fromUnixTime,
type IntlFormatFormatOptions,
intlFormat,
parseISO,
} from "date-fns";
const isUnixTimestamp = (value: unknown): boolean => { const isUnixTimestamp = (value: unknown): boolean => {
if (typeof value !== "number" && typeof value !== "string") return false; if (typeof value !== "number" && typeof value !== "string") return false;
+1 -1
View File
@@ -3,4 +3,4 @@ export * as Certificates from "./Certificates.md";
export * as DeadHosts from "./DeadHosts.md"; export * as DeadHosts from "./DeadHosts.md";
export * as ProxyHosts from "./ProxyHosts.md"; export * as ProxyHosts from "./ProxyHosts.md";
export * as RedirectionHosts from "./RedirectionHosts.md"; export * as RedirectionHosts from "./RedirectionHosts.md";
export * as Streams from "./Streams.md"; export * as Streams from "./Streams.md";
+8 -9
View File
@@ -22,18 +22,17 @@ import * as hu from "./hu/index";
const items: any = { en, de, pt, es, et, ja, sk, cs, zh, pl, ru, it, vi, nl, bg, ko, ga, id, fr, tr, hu }; const items: any = { en, de, pt, es, et, ja, sk, cs, zh, pl, ru, it, vi, nl, bg, ko, ga, id, fr, tr, hu };
const fallbackLang = "en"; const fallbackLang = "en";
export const getHelpFile = (lang: string, section: string): string => { export const getHelpFile = (lang: string, section: string): string => {
if (typeof items[lang] !== "undefined" && typeof items[lang][section] !== "undefined") { if (typeof items[lang] !== "undefined" && typeof items[lang][section] !== "undefined") {
return items[lang][section].default; return items[lang][section].default;
} }
// Fallback to English // Fallback to English
if (typeof items[fallbackLang] !== "undefined" && typeof items[fallbackLang][section] !== "undefined") { if (typeof items[fallbackLang] !== "undefined" && typeof items[fallbackLang][section] !== "undefined") {
return items[fallbackLang][section].default; return items[fallbackLang][section].default;
} }
throw new Error(`Cannot load help doc for ${lang}-${section}`); throw new Error(`Cannot load help doc for ${lang}-${section}`);
}; };
export default items; export default items;
@@ -4,4 +4,3 @@ export * as DeadHosts from "./DeadHosts.md";
export * as ProxyHosts from "./ProxyHosts.md"; export * as ProxyHosts from "./ProxyHosts.md";
export * as RedirectionHosts from "./RedirectionHosts.md"; export * as RedirectionHosts from "./RedirectionHosts.md";
export * as Streams from "./Streams.md"; export * as Streams from "./Streams.md";
@@ -4,4 +4,3 @@ export * as DeadHosts from "./DeadHosts.md";
export * as ProxyHosts from "./ProxyHosts.md"; export * as ProxyHosts from "./ProxyHosts.md";
export * as RedirectionHosts from "./RedirectionHosts.md"; export * as RedirectionHosts from "./RedirectionHosts.md";
export * as Streams from "./Streams.md"; export * as Streams from "./Streams.md";
+122 -2
View File
@@ -1,4 +1,61 @@
{ {
"2fa.backup-codes-remaining": {
"defaultMessage": "Verbleibende Backup-Codes: {count}"
},
"2fa.backup-warning": {
"defaultMessage": "Bewahre diese Backup-Codes an einem sicheren Ort auf. Jeder Code kann nur einmal verwendet werden."
},
"2fa.disable": {
"defaultMessage": "Zwei-Faktor-Authentifizierung deaktivieren"
},
"2fa.disable-confirm": {
"defaultMessage": "2FA deaktivieren"
},
"2fa.disable-warning": {
"defaultMessage": "Das Deaktivieren der Zwei-Faktor-Authentifizierung macht dein Konto weniger sicher."
},
"2fa.disabled": {
"defaultMessage": "Deaktiviert"
},
"2fa.done": {
"defaultMessage": "Ich habe meine Backup-Codes gespeichert"
},
"2fa.enable": {
"defaultMessage": "Zwei-Faktor-Authentifizierung aktivieren"
},
"2fa.enabled": {
"defaultMessage": "Aktiviert"
},
"2fa.enter-code": {
"defaultMessage": "Verifizierungscode eingeben"
},
"2fa.enter-code-disable": {
"defaultMessage": "Verifizierungscode zum Deaktivieren eingeben"
},
"2fa.regenerate": {
"defaultMessage": "Neu generieren"
},
"2fa.regenerate-backup": {
"defaultMessage": "Backup-Codes neu generieren"
},
"2fa.regenerate-instructions": {
"defaultMessage": "Gib einen Verifizierungscode ein, um neue Backup-Codes zu generieren. Deine alten Codes werden dadurch ungültig."
},
"2fa.secret-key": {
"defaultMessage": "Geheimer Schlüssel"
},
"2fa.setup-instructions": {
"defaultMessage": "Scanne diesen QR-Code mit deiner Authenticator-App oder gib den geheimen Schlüssel manuell ein."
},
"2fa.status": {
"defaultMessage": "Status"
},
"2fa.title": {
"defaultMessage": "Zwei-Faktor-Authentifizierung"
},
"2fa.verify-enable": {
"defaultMessage": "Verifizieren und aktivieren"
},
"access-list": { "access-list": {
"defaultMessage": "Zugriffsliste" "defaultMessage": "Zugriffsliste"
}, },
@@ -23,6 +80,9 @@
"access-list.public.subtitle": { "access-list.public.subtitle": {
"defaultMessage": "Keine Authentifizierung erforderlich" "defaultMessage": "Keine Authentifizierung erforderlich"
}, },
"access-list.rule-source.placeholder": {
"defaultMessage": "192.168.1.100 oder 192.168.1.0/24 oder 2001:0db8::/32"
},
"access-list.satisfy-any": { "access-list.satisfy-any": {
"defaultMessage": "Satisfy Any" "defaultMessage": "Satisfy Any"
}, },
@@ -38,12 +98,18 @@
"action.add-location": { "action.add-location": {
"defaultMessage": "Pfad hinzufügen" "defaultMessage": "Pfad hinzufügen"
}, },
"action.allow": {
"defaultMessage": "Erlauben"
},
"action.close": { "action.close": {
"defaultMessage": "Schließen" "defaultMessage": "Schließen"
}, },
"action.delete": { "action.delete": {
"defaultMessage": "Löschen" "defaultMessage": "Löschen"
}, },
"action.deny": {
"defaultMessage": "Verweigern"
},
"action.disable": { "action.disable": {
"defaultMessage": "Deaktivieren" "defaultMessage": "Deaktivieren"
}, },
@@ -68,6 +134,9 @@
"auditlogs": { "auditlogs": {
"defaultMessage": "Protokolle" "defaultMessage": "Protokolle"
}, },
"auto": {
"defaultMessage": "Automatisch"
},
"cancel": { "cancel": {
"defaultMessage": "Abbrechen" "defaultMessage": "Abbrechen"
}, },
@@ -128,6 +197,9 @@
"certificates.dns.provider": { "certificates.dns.provider": {
"defaultMessage": "DNS Provider" "defaultMessage": "DNS Provider"
}, },
"certificates.dns.provider.placeholder": {
"defaultMessage": "Anbieter auswählen..."
},
"certificates.dns.warning": { "certificates.dns.warning": {
"defaultMessage": "Dieser Abschnitt erfordert einige Kenntnisse über Certbot und seine DNS-Plugins. Bitte konsultieren Sie die jeweilige Plugin-Dokumentation." "defaultMessage": "Dieser Abschnitt erfordert einige Kenntnisse über Certbot und seine DNS-Plugins. Bitte konsultieren Sie die jeweilige Plugin-Dokumentation."
}, },
@@ -275,6 +347,9 @@
"domain-names.wildcards-not-supported": { "domain-names.wildcards-not-supported": {
"defaultMessage": "Wildcards werden für diese Zertifizierungsstelle nicht unterstützt." "defaultMessage": "Wildcards werden für diese Zertifizierungsstelle nicht unterstützt."
}, },
"domains.advanced": {
"defaultMessage": "Erweitert"
},
"domains.force-ssl": { "domains.force-ssl": {
"defaultMessage": "Erzwinge SSL" "defaultMessage": "Erzwinge SSL"
}, },
@@ -287,6 +362,9 @@
"domains.http2-support": { "domains.http2-support": {
"defaultMessage": "HTTP/2 Support" "defaultMessage": "HTTP/2 Support"
}, },
"domains.trust-forwarded-proto": {
"defaultMessage": "Upstream Forwarded-Proto-Header vertrauen"
},
"domains.use-dns": { "domains.use-dns": {
"defaultMessage": "Nutze DNS Challenge" "defaultMessage": "Nutze DNS Challenge"
}, },
@@ -354,7 +432,7 @@
"defaultMessage": "Pfad beibehalten" "defaultMessage": "Pfad beibehalten"
}, },
"host.flags.protocols": { "host.flags.protocols": {
"defaultMessage": "Protokole" "defaultMessage": "Protokolle"
}, },
"host.flags.websockets-upgrade": { "host.flags.websockets-upgrade": {
"defaultMessage": "Websockets Support" "defaultMessage": "Websockets Support"
@@ -383,6 +461,21 @@
"loading": { "loading": {
"defaultMessage": "Laden…" "defaultMessage": "Laden…"
}, },
"login.2fa-code": {
"defaultMessage": "Verifizierungscode"
},
"login.2fa-code-placeholder": {
"defaultMessage": "Code eingeben"
},
"login.2fa-description": {
"defaultMessage": "Gib den Code aus deiner Authenticator-App ein"
},
"login.2fa-title": {
"defaultMessage": "Zwei-Faktor-Authentifizierung"
},
"login.2fa-verify": {
"defaultMessage": "Verifizieren"
},
"login.title": { "login.title": {
"defaultMessage": "Anmelden" "defaultMessage": "Anmelden"
}, },
@@ -530,6 +623,24 @@
"redirection-hosts.count": { "redirection-hosts.count": {
"defaultMessage": "{count} {count, plural, one {Redirection Host} other {Redirection Hosts}}" "defaultMessage": "{count} {count, plural, one {Redirection Host} other {Redirection Hosts}}"
}, },
"redirection-hosts.http-code.300": {
"defaultMessage": "300 Mehrere Auswahlmöglichkeiten"
},
"redirection-hosts.http-code.301": {
"defaultMessage": "301 Dauerhaft verschoben"
},
"redirection-hosts.http-code.302": {
"defaultMessage": "302 Vorübergehend verschoben"
},
"redirection-hosts.http-code.303": {
"defaultMessage": "303 Siehe andere"
},
"redirection-hosts.http-code.307": {
"defaultMessage": "307 Temporäre Umleitung"
},
"redirection-hosts.http-code.308": {
"defaultMessage": "308 Permanente Umleitung"
},
"role.admin": { "role.admin": {
"defaultMessage": "Administrator" "defaultMessage": "Administrator"
}, },
@@ -587,6 +698,9 @@
"stream.forward-host": { "stream.forward-host": {
"defaultMessage": "Forward Host" "defaultMessage": "Forward Host"
}, },
"stream.forward-host.placeholder": {
"defaultMessage": "example.com oder 10.0.0.1 oder 2001:db8:3333:4444:5555:6666:7777:8888"
},
"stream.incoming-port": { "stream.incoming-port": {
"defaultMessage": "Incoming Port" "defaultMessage": "Incoming Port"
}, },
@@ -605,6 +719,9 @@
"test": { "test": {
"defaultMessage": "Test" "defaultMessage": "Test"
}, },
"update-available": {
"defaultMessage": "Update verfügbar: {latestVersion}"
},
"user": { "user": {
"defaultMessage": "User" "defaultMessage": "User"
}, },
@@ -647,10 +764,13 @@
"user.switch-light": { "user.switch-light": {
"defaultMessage": "Zum Light Mode wechseln" "defaultMessage": "Zum Light Mode wechseln"
}, },
"user.two-factor": {
"defaultMessage": "Zwei-Faktor-Auth"
},
"username": { "username": {
"defaultMessage": "Benutzername" "defaultMessage": "Benutzername"
}, },
"users": { "users": {
"defaultMessage": "Benutzer" "defaultMessage": "Benutzer"
} }
} }
+1 -5
View File
@@ -70,11 +70,7 @@ const DNSCertificateModal = EasyModal.create(({ visible, remove }: InnerModalPro
<label htmlFor="keyType" className="form-label"> <label htmlFor="keyType" className="form-label">
<T id="certificates.key-type" /> <T id="certificates.key-type" />
</label> </label>
<select <select id="keyType" className="form-select" {...field}>
id="keyType"
className="form-select"
{...field}
>
<option value="rsa"> <option value="rsa">
<T id="certificates.key-type-rsa" /> <T id="certificates.key-type-rsa" />
</option> </option>
+1 -5
View File
@@ -151,11 +151,7 @@ const HTTPCertificateModal = EasyModal.create(({ visible, remove }: InnerModalPr
<label htmlFor="keyType" className="form-label"> <label htmlFor="keyType" className="form-label">
<T id="certificates.key-type" /> <T id="certificates.key-type" />
</label> </label>
<select <select id="keyType" className="form-select" {...field}>
id="keyType"
className="form-select"
{...field}
>
<option value="rsa"> <option value="rsa">
<T id="certificates.key-type-rsa" /> <T id="certificates.key-type-rsa" />
</option> </option>
+21 -7
View File
@@ -162,7 +162,9 @@ const RedirectionHostModal = EasyModal.create(({ id, visible, remove }: Props) =
required required
{...field} {...field}
> >
<option value="auto"><T id="auto" /></option> <option value="auto">
<T id="auto" />
</option>
<option value="http">http</option> <option value="http">http</option>
<option value="https">https</option> <option value="https">https</option>
</select> </select>
@@ -224,12 +226,24 @@ const RedirectionHostModal = EasyModal.create(({ id, visible, remove }: Props) =
required required
{...field} {...field}
> >
<option value="300"><T id="redirection-hosts.http-code.300" /></option> <option value="300">
<option value="301"><T id="redirection-hosts.http-code.301" /></option> <T id="redirection-hosts.http-code.300" />
<option value="302"><T id="redirection-hosts.http-code.302" /></option> </option>
<option value="303"><T id="redirection-hosts.http-code.303" /></option> <option value="301">
<option value="307"><T id="redirection-hosts.http-code.307" /></option> <T id="redirection-hosts.http-code.301" />
<option value="308"><T id="redirection-hosts.http-code.308" /></option> </option>
<option value="302">
<T id="redirection-hosts.http-code.302" />
</option>
<option value="303">
<T id="redirection-hosts.http-code.303" />
</option>
<option value="307">
<T id="redirection-hosts.http-code.307" />
</option>
<option value="308">
<T id="redirection-hosts.http-code.308" />
</option>
</select> </select>
{form.errors.forwardHttpCode ? ( {form.errors.forwardHttpCode ? (
<div className="invalid-feedback"> <div className="invalid-feedback">
+3 -1
View File
@@ -154,7 +154,9 @@ const StreamModal = EasyModal.create(({ id, visible, remove }: Props) => {
type="text" type="text"
className={`form-control ${form.errors.forwardingHost && form.touched.forwardingHost ? "is-invalid" : ""}`} className={`form-control ${form.errors.forwardingHost && form.touched.forwardingHost ? "is-invalid" : ""}`}
required required
placeholder={intl.formatMessage({ id: "stream.forward-host.placeholder" })} placeholder={intl.formatMessage({
id: "stream.forward-host.placeholder",
})}
{...field} {...field}
/> />
{form.errors.forwardingHost ? ( {form.errors.forwardingHost ? (
@@ -0,0 +1,5 @@
.qrcode {
max-width: "200px";
height: "auto";
border: 6px solid #fff;
}
+5 -19
View File
@@ -3,16 +3,12 @@ import { Field, Form, Formik } from "formik";
import { type ReactNode, useCallback, useEffect, useState } from "react"; import { type ReactNode, useCallback, useEffect, useState } from "react";
import { Alert } from "react-bootstrap"; import { Alert } from "react-bootstrap";
import Modal from "react-bootstrap/Modal"; import Modal from "react-bootstrap/Modal";
import { import QRCode from "react-qr-code";
disable2FA, import { disable2FA, enable2FA, get2FAStatus, regenerateBackupCodes, start2FASetup } from "src/api/backend";
enable2FA,
get2FAStatus,
regenerateBackupCodes,
start2FASetup,
} from "src/api/backend";
import { Button } from "src/components"; import { Button } from "src/components";
import { T } from "src/locale"; import { T } from "src/locale";
import { validateString } from "src/modules/Validations"; import { validateString } from "src/modules/Validations";
import styles from "./TwoFactorModal.module.css";
type Step = "loading" | "status" | "setup" | "verify" | "backup" | "disable"; type Step = "loading" | "status" | "setup" | "verify" | "backup" | "disable";
@@ -137,12 +133,7 @@ const TwoFactorModal = EasyModal.create(({ id, visible, remove }: Props) => {
)} )}
</div> </div>
{!isEnabled ? ( {!isEnabled ? (
<Button <Button fullWidth color="azure" onClick={handleStartSetup} isLoading={isSubmitting}>
fullWidth
color="azure"
onClick={handleStartSetup}
isLoading={isSubmitting}
>
<T id="2fa.enable" /> <T id="2fa.enable" />
</Button> </Button>
) : ( ) : (
@@ -166,12 +157,7 @@ const TwoFactorModal = EasyModal.create(({ id, visible, remove }: Props) => {
<T id="2fa.setup-instructions" /> <T id="2fa.setup-instructions" />
</p> </p>
<div className="text-center mb-3"> <div className="text-center mb-3">
<img <QRCode value={setupData.otpauthUrl} size={200} className={styles.qrcode} />
src={`https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(setupData.otpauthUrl)}`}
alt="QR Code"
className="img-fluid"
style={{ maxWidth: "200px" }}
/>
</div> </div>
<label className="mb-3 d-block"> <label className="mb-3 d-block">
<span className="form-label small text-muted"> <span className="form-label small text-muted">
+5 -5
View File
@@ -1,8 +1,9 @@
import { IconDotsVertical, IconEdit, IconTrash } from "@tabler/icons-react"; import { IconDotsVertical, IconEdit, IconTrash } from "@tabler/icons-react";
import { createColumnHelper, getCoreRowModel, useReactTable } from "@tanstack/react-table"; import { createColumnHelper, useTable } from "@tanstack/react-table";
import { useMemo } from "react"; import { useMemo } from "react";
import type { AccessList } from "src/api/backend"; import type { AccessList } from "src/api/backend";
import { EmptyData, GravatarFormatter, HasPermission, ValueWithDateFormatter } from "src/components"; import { EmptyData, GravatarFormatter, HasPermission, ValueWithDateFormatter } from "src/components";
import { type Features, features } from "src/components/Table/features";
import { TableLayout } from "src/components/Table/TableLayout"; import { TableLayout } from "src/components/Table/TableLayout";
import { intl, T } from "src/locale"; import { intl, T } from "src/locale";
import { ACCESS_LISTS, MANAGE } from "src/modules/Permissions"; import { ACCESS_LISTS, MANAGE } from "src/modules/Permissions";
@@ -16,7 +17,7 @@ interface Props {
onNew?: () => void; onNew?: () => void;
} }
export default function Table({ data, isFetching, isFiltered, onEdit, onDelete, onNew }: Props) { export default function Table({ data, isFetching, isFiltered, onEdit, onDelete, onNew }: Props) {
const columnHelper = createColumnHelper<AccessList>(); const columnHelper = createColumnHelper<Features, AccessList>();
const columns = useMemo( const columns = useMemo(
() => [ () => [
columnHelper.accessor((row: any) => row.owner, { columnHelper.accessor((row: any) => row.owner, {
@@ -114,11 +115,10 @@ export default function Table({ data, isFetching, isFiltered, onEdit, onDelete,
[columnHelper, onEdit, onDelete], [columnHelper, onEdit, onDelete],
); );
const tableInstance = useReactTable<AccessList>({ const tableInstance = useTable({
features,
columns, columns,
data, data,
getCoreRowModel: getCoreRowModel(),
rowCount: data.length,
meta: { meta: {
isFetching, isFetching,
}, },
+7 -7
View File
@@ -1,7 +1,8 @@
import { createColumnHelper, getCoreRowModel, useReactTable } from "@tanstack/react-table"; import { createColumnHelper, useTable } from "@tanstack/react-table";
import { useMemo } from "react"; import { useMemo } from "react";
import type { AuditLog } from "src/api/backend"; import type { AuditLog } from "src/api/backend";
import { EventFormatter, GravatarFormatter } from "src/components"; import { EventFormatter, GravatarFormatter } from "src/components";
import { type Features, features } from "src/components/Table/features";
import { TableLayout } from "src/components/Table/TableLayout"; import { TableLayout } from "src/components/Table/TableLayout";
import { intl, T } from "src/locale"; import { intl, T } from "src/locale";
@@ -11,10 +12,10 @@ interface Props {
onSelectItem?: (id: number) => void; onSelectItem?: (id: number) => void;
} }
export default function Table({ data, isFetching, onSelectItem }: Props) { export default function Table({ data, isFetching, onSelectItem }: Props) {
const columnHelper = createColumnHelper<AuditLog>(); const columnHelper = createColumnHelper<Features, AuditLog>();
const columns = useMemo( const columns = useMemo(
() => [ () => [
columnHelper.accessor((row: AuditLog) => row.user, { columnHelper.accessor((row: any) => row.user, {
id: "user.avatar", id: "user.avatar",
cell: (info: any) => { cell: (info: any) => {
const value = info.getValue(); const value = info.getValue();
@@ -24,7 +25,7 @@ export default function Table({ data, isFetching, onSelectItem }: Props) {
className: "w-1", className: "w-1",
}, },
}), }),
columnHelper.accessor((row: AuditLog) => row, { columnHelper.accessor((row: any) => row, {
id: "objectType", id: "objectType",
header: intl.formatMessage({ id: "column.event" }), header: intl.formatMessage({ id: "column.event" }),
cell: (info: any) => { cell: (info: any) => {
@@ -55,11 +56,10 @@ export default function Table({ data, isFetching, onSelectItem }: Props) {
[columnHelper, onSelectItem], [columnHelper, onSelectItem],
); );
const tableInstance = useReactTable<AuditLog>({ const tableInstance = useTable({
features,
columns, columns,
data, data,
getCoreRowModel: getCoreRowModel(),
rowCount: data.length,
meta: { meta: {
isFetching, isFetching,
}, },
+5 -5
View File
@@ -1,5 +1,5 @@
import { IconDotsVertical, IconDownload, IconRefresh, IconTrash } from "@tabler/icons-react"; import { IconDotsVertical, IconDownload, IconRefresh, IconTrash } from "@tabler/icons-react";
import { createColumnHelper, getCoreRowModel, useReactTable } from "@tanstack/react-table"; import { createColumnHelper, useTable } from "@tanstack/react-table";
import { useMemo } from "react"; import { useMemo } from "react";
import type { Certificate } from "src/api/backend"; import type { Certificate } from "src/api/backend";
import { import {
@@ -10,6 +10,7 @@ import {
GravatarFormatter, GravatarFormatter,
HasPermission, HasPermission,
} from "src/components"; } from "src/components";
import { type Features, features } from "src/components/Table/features";
import { TableLayout } from "src/components/Table/TableLayout"; import { TableLayout } from "src/components/Table/TableLayout";
import { intl, T } from "src/locale"; import { intl, T } from "src/locale";
import { showCustomCertificateModal, showDNSCertificateModal, showHTTPCertificateModal } from "src/modals"; import { showCustomCertificateModal, showDNSCertificateModal, showHTTPCertificateModal } from "src/modals";
@@ -24,7 +25,7 @@ interface Props {
onDownload?: (id: number) => void; onDownload?: (id: number) => void;
} }
export default function Table({ data, isFetching, onDelete, onRenew, onDownload, isFiltered }: Props) { export default function Table({ data, isFetching, onDelete, onRenew, onDownload, isFiltered }: Props) {
const columnHelper = createColumnHelper<Certificate>(); const columnHelper = createColumnHelper<Features, Certificate>();
const columns = useMemo( const columns = useMemo(
() => [ () => [
columnHelper.accessor((row: any) => row.owner, { columnHelper.accessor((row: any) => row.owner, {
@@ -164,11 +165,10 @@ export default function Table({ data, isFetching, onDelete, onRenew, onDownload,
[columnHelper, onDelete, onRenew, onDownload], [columnHelper, onDelete, onRenew, onDownload],
); );
const tableInstance = useReactTable<Certificate>({ const tableInstance = useTable({
features,
columns, columns,
data, data,
getCoreRowModel: getCoreRowModel(),
rowCount: data.length,
meta: { meta: {
isFetching, isFetching,
}, },
+1 -3
View File
@@ -193,9 +193,7 @@ export default function Login() {
</div> </div>
</div> </div>
<div className="card card-md"> <div className="card card-md">
<div className="card-body"> <div className="card-body">{twoFactorChallenge ? <TwoFactorForm /> : <LoginForm />}</div>
{twoFactorChallenge ? <TwoFactorForm /> : <LoginForm />}
</div>
</div> </div>
<div className="text-center text-secondary mt-3">{getVersion()}</div> <div className="text-center text-secondary mt-3">{getVersion()}</div>
</div> </div>
+6 -13
View File
@@ -1,11 +1,5 @@
import { IconDotsVertical, IconEdit, IconPower, IconTrash } from "@tabler/icons-react"; import { IconDotsVertical, IconEdit, IconPower, IconTrash } from "@tabler/icons-react";
import { import { createColumnHelper, type SortingState, useTable } from "@tanstack/react-table";
createColumnHelper,
getCoreRowModel,
getSortedRowModel,
type SortingState,
useReactTable,
} from "@tanstack/react-table";
import { useMemo, useState } from "react"; import { useMemo, useState } from "react";
import type { DeadHost } from "src/api/backend"; import type { DeadHost } from "src/api/backend";
import { import {
@@ -16,6 +10,7 @@ import {
HasPermission, HasPermission,
TrueFalseFormatter, TrueFalseFormatter,
} from "src/components"; } from "src/components";
import { type Features, features } from "src/components/Table/features";
import { TableLayout } from "src/components/Table/TableLayout"; import { TableLayout } from "src/components/Table/TableLayout";
import { intl, T } from "src/locale"; import { intl, T } from "src/locale";
import { DEAD_HOSTS, MANAGE } from "src/modules/Permissions"; import { DEAD_HOSTS, MANAGE } from "src/modules/Permissions";
@@ -30,7 +25,7 @@ interface Props {
onNew?: () => void; onNew?: () => void;
} }
export default function Table({ data, isFetching, onEdit, onDelete, onDisableToggle, onNew, isFiltered }: Props) { export default function Table({ data, isFetching, onEdit, onDelete, onDisableToggle, onNew, isFiltered }: Props) {
const columnHelper = createColumnHelper<DeadHost>(); const columnHelper = createColumnHelper<Features, DeadHost>();
const columns = useMemo( const columns = useMemo(
() => [ () => [
columnHelper.accessor((row: any) => row.owner, { columnHelper.accessor((row: any) => row.owner, {
@@ -47,7 +42,7 @@ export default function Table({ data, isFetching, onEdit, onDelete, onDisableTog
columnHelper.accessor((row: any) => row, { columnHelper.accessor((row: any) => row, {
id: "domainNames", id: "domainNames",
header: intl.formatMessage({ id: "column.source" }), header: intl.formatMessage({ id: "column.source" }),
sortingFn: (a, b) => { sortFn: (a, b) => {
const aVal = a.original.domainNames?.[0] ?? ""; const aVal = a.original.domainNames?.[0] ?? "";
const bVal = b.original.domainNames?.[0] ?? ""; const bVal = b.original.domainNames?.[0] ?? "";
return aVal.localeCompare(bVal); return aVal.localeCompare(bVal);
@@ -143,14 +138,12 @@ export default function Table({ data, isFetching, onEdit, onDelete, onDisableTog
const [sorting, setSorting] = useState<SortingState>([]); const [sorting, setSorting] = useState<SortingState>([]);
const tableInstance = useReactTable<DeadHost>({ const tableInstance = useTable({
features,
columns, columns,
data, data,
state: { sorting }, state: { sorting },
onSortingChange: setSorting, onSortingChange: setSorting,
getCoreRowModel: getCoreRowModel(),
getSortedRowModel: getSortedRowModel(),
rowCount: data.length,
meta: { meta: {
isFetching, isFetching,
}, },
+7 -14
View File
@@ -1,11 +1,5 @@
import { IconDotsVertical, IconEdit, IconPower, IconTrash } from "@tabler/icons-react"; import { IconDotsVertical, IconEdit, IconPower, IconTrash } from "@tabler/icons-react";
import { import { createColumnHelper, type SortingState, useTable } from "@tanstack/react-table";
createColumnHelper,
getCoreRowModel,
getSortedRowModel,
type SortingState,
useReactTable,
} from "@tanstack/react-table";
import { useMemo, useState } from "react"; import { useMemo, useState } from "react";
import type { ProxyHost } from "src/api/backend"; import type { ProxyHost } from "src/api/backend";
import { import {
@@ -17,6 +11,7 @@ import {
HasPermission, HasPermission,
TrueFalseFormatter, TrueFalseFormatter,
} from "src/components"; } from "src/components";
import { type Features, features } from "src/components/Table/features";
import { TableLayout } from "src/components/Table/TableLayout"; import { TableLayout } from "src/components/Table/TableLayout";
import { intl, T } from "src/locale"; import { intl, T } from "src/locale";
import { MANAGE, PROXY_HOSTS } from "src/modules/Permissions"; import { MANAGE, PROXY_HOSTS } from "src/modules/Permissions";
@@ -31,7 +26,7 @@ interface Props {
onNew?: () => void; onNew?: () => void;
} }
export default function Table({ data, isFetching, onEdit, onDelete, onDisableToggle, onNew, isFiltered }: Props) { export default function Table({ data, isFetching, onEdit, onDelete, onDisableToggle, onNew, isFiltered }: Props) {
const columnHelper = createColumnHelper<ProxyHost>(); const columnHelper = createColumnHelper<Features, ProxyHost>();
const columns = useMemo( const columns = useMemo(
() => [ () => [
columnHelper.accessor((row: any) => row.owner, { columnHelper.accessor((row: any) => row.owner, {
@@ -48,7 +43,7 @@ export default function Table({ data, isFetching, onEdit, onDelete, onDisableTog
columnHelper.accessor((row: any) => row, { columnHelper.accessor((row: any) => row, {
id: "domainNames", id: "domainNames",
header: intl.formatMessage({ id: "column.source" }), header: intl.formatMessage({ id: "column.source" }),
sortingFn: (a, b) => { sortFn: (a, b) => {
const aVal = a.original.domainNames?.[0] ?? ""; const aVal = a.original.domainNames?.[0] ?? "";
const bVal = b.original.domainNames?.[0] ?? ""; const bVal = b.original.domainNames?.[0] ?? "";
return aVal.localeCompare(bVal); return aVal.localeCompare(bVal);
@@ -61,7 +56,7 @@ export default function Table({ data, isFetching, onEdit, onDelete, onDisableTog
columnHelper.accessor((row: any) => row, { columnHelper.accessor((row: any) => row, {
id: "forwardHost", id: "forwardHost",
header: intl.formatMessage({ id: "column.destination" }), header: intl.formatMessage({ id: "column.destination" }),
sortingFn: (a, b) => { sortFn: (a, b) => {
const aVal = `${a.original.forwardHost}:${a.original.forwardPort}`; const aVal = `${a.original.forwardHost}:${a.original.forwardPort}`;
const bVal = `${b.original.forwardHost}:${b.original.forwardPort}`; const bVal = `${b.original.forwardHost}:${b.original.forwardPort}`;
return aVal.localeCompare(bVal); return aVal.localeCompare(bVal);
@@ -165,14 +160,12 @@ export default function Table({ data, isFetching, onEdit, onDelete, onDisableTog
const [sorting, setSorting] = useState<SortingState>([]); const [sorting, setSorting] = useState<SortingState>([]);
const tableInstance = useReactTable<ProxyHost>({ const tableInstance = useTable({
features,
columns, columns,
data, data,
state: { sorting }, state: { sorting },
onSortingChange: setSorting, onSortingChange: setSorting,
getCoreRowModel: getCoreRowModel(),
getSortedRowModel: getSortedRowModel(),
rowCount: data.length,
meta: { meta: {
isFetching, isFetching,
}, },
@@ -1,11 +1,5 @@
import { IconDotsVertical, IconEdit, IconPower, IconTrash } from "@tabler/icons-react"; import { IconDotsVertical, IconEdit, IconPower, IconTrash } from "@tabler/icons-react";
import { import { createColumnHelper, type SortingState, useTable } from "@tanstack/react-table";
createColumnHelper,
getCoreRowModel,
getSortedRowModel,
type SortingState,
useReactTable,
} from "@tanstack/react-table";
import { useMemo, useState } from "react"; import { useMemo, useState } from "react";
import type { RedirectionHost } from "src/api/backend"; import type { RedirectionHost } from "src/api/backend";
import { import {
@@ -16,6 +10,7 @@ import {
HasPermission, HasPermission,
TrueFalseFormatter, TrueFalseFormatter,
} from "src/components"; } from "src/components";
import { type Features, features } from "src/components/Table/features";
import { TableLayout } from "src/components/Table/TableLayout"; import { TableLayout } from "src/components/Table/TableLayout";
import { intl, T } from "src/locale"; import { intl, T } from "src/locale";
import { MANAGE, REDIRECTION_HOSTS } from "src/modules/Permissions"; import { MANAGE, REDIRECTION_HOSTS } from "src/modules/Permissions";
@@ -30,7 +25,7 @@ interface Props {
onNew?: () => void; onNew?: () => void;
} }
export default function Table({ data, isFetching, onEdit, onDelete, onDisableToggle, onNew, isFiltered }: Props) { export default function Table({ data, isFetching, onEdit, onDelete, onDisableToggle, onNew, isFiltered }: Props) {
const columnHelper = createColumnHelper<RedirectionHost>(); const columnHelper = createColumnHelper<Features, RedirectionHost>();
const columns = useMemo( const columns = useMemo(
() => [ () => [
columnHelper.accessor((row: any) => row.owner, { columnHelper.accessor((row: any) => row.owner, {
@@ -47,7 +42,7 @@ export default function Table({ data, isFetching, onEdit, onDelete, onDisableTog
columnHelper.accessor((row: any) => row, { columnHelper.accessor((row: any) => row, {
id: "domainNames", id: "domainNames",
header: intl.formatMessage({ id: "column.source" }), header: intl.formatMessage({ id: "column.source" }),
sortingFn: (a, b) => { sortFn: (a, b) => {
const aVal = a.original.domainNames?.[0] ?? ""; const aVal = a.original.domainNames?.[0] ?? "";
const bVal = b.original.domainNames?.[0] ?? ""; const bVal = b.original.domainNames?.[0] ?? "";
return aVal.localeCompare(bVal); return aVal.localeCompare(bVal);
@@ -164,14 +159,12 @@ export default function Table({ data, isFetching, onEdit, onDelete, onDisableTog
const [sorting, setSorting] = useState<SortingState>([]); const [sorting, setSorting] = useState<SortingState>([]);
const tableInstance = useReactTable<RedirectionHost>({ const tableInstance = useTable({
features,
columns, columns,
data, data,
state: { sorting }, state: { sorting },
onSortingChange: setSorting, onSortingChange: setSorting,
getCoreRowModel: getCoreRowModel(),
getSortedRowModel: getSortedRowModel(),
rowCount: data.length,
meta: { meta: {
isFetching, isFetching,
}, },
+7 -14
View File
@@ -1,11 +1,5 @@
import { IconDotsVertical, IconEdit, IconPower, IconTrash } from "@tabler/icons-react"; import { IconDotsVertical, IconEdit, IconPower, IconTrash } from "@tabler/icons-react";
import { import { createColumnHelper, type SortingState, useTable } from "@tanstack/react-table";
createColumnHelper,
getCoreRowModel,
getSortedRowModel,
type SortingState,
useReactTable,
} from "@tanstack/react-table";
import { useMemo, useState } from "react"; import { useMemo, useState } from "react";
import type { Stream } from "src/api/backend"; import type { Stream } from "src/api/backend";
import { import {
@@ -16,6 +10,7 @@ import {
TrueFalseFormatter, TrueFalseFormatter,
ValueWithDateFormatter, ValueWithDateFormatter,
} from "src/components"; } from "src/components";
import { type Features, features } from "src/components/Table/features";
import { TableLayout } from "src/components/Table/TableLayout"; import { TableLayout } from "src/components/Table/TableLayout";
import { intl, T } from "src/locale"; import { intl, T } from "src/locale";
import { MANAGE, STREAMS } from "src/modules/Permissions"; import { MANAGE, STREAMS } from "src/modules/Permissions";
@@ -30,7 +25,7 @@ interface Props {
onNew?: () => void; onNew?: () => void;
} }
export default function Table({ data, isFetching, isFiltered, onEdit, onDelete, onDisableToggle, onNew }: Props) { export default function Table({ data, isFetching, isFiltered, onEdit, onDelete, onDisableToggle, onNew }: Props) {
const columnHelper = createColumnHelper<Stream>(); const columnHelper = createColumnHelper<Features, Stream>();
const columns = useMemo( const columns = useMemo(
() => [ () => [
columnHelper.accessor((row: any) => row.owner, { columnHelper.accessor((row: any) => row.owner, {
@@ -47,7 +42,7 @@ export default function Table({ data, isFetching, isFiltered, onEdit, onDelete,
columnHelper.accessor((row: any) => row, { columnHelper.accessor((row: any) => row, {
id: "incomingPort", id: "incomingPort",
header: intl.formatMessage({ id: "column.incoming-port" }), header: intl.formatMessage({ id: "column.incoming-port" }),
sortingFn: (a, b) => (a.original.incomingPort ?? 0) - (b.original.incomingPort ?? 0), sortFn: (a, b) => (a.original.incomingPort ?? 0) - (b.original.incomingPort ?? 0),
cell: (info: any) => { cell: (info: any) => {
const value = info.getValue(); const value = info.getValue();
return <ValueWithDateFormatter value={value.incomingPort} createdOn={value.createdOn} />; return <ValueWithDateFormatter value={value.incomingPort} createdOn={value.createdOn} />;
@@ -56,7 +51,7 @@ export default function Table({ data, isFetching, isFiltered, onEdit, onDelete,
columnHelper.accessor((row: any) => row, { columnHelper.accessor((row: any) => row, {
id: "forwardHttpCode", id: "forwardHttpCode",
header: intl.formatMessage({ id: "column.destination" }), header: intl.formatMessage({ id: "column.destination" }),
sortingFn: (a, b) => { sortFn: (a, b) => {
const aVal = `${a.original.forwardingHost}:${a.original.forwardingPort}`; const aVal = `${a.original.forwardingHost}:${a.original.forwardingPort}`;
const bVal = `${b.original.forwardingHost}:${b.original.forwardingPort}`; const bVal = `${b.original.forwardingHost}:${b.original.forwardingPort}`;
return aVal.localeCompare(bVal); return aVal.localeCompare(bVal);
@@ -174,14 +169,12 @@ export default function Table({ data, isFetching, isFiltered, onEdit, onDelete,
const [sorting, setSorting] = useState<SortingState>([]); const [sorting, setSorting] = useState<SortingState>([]);
const tableInstance = useReactTable<Stream>({ const tableInstance = useTable({
features,
columns, columns,
data, data,
state: { sorting }, state: { sorting },
onSortingChange: setSorting, onSortingChange: setSorting,
getCoreRowModel: getCoreRowModel(),
getSortedRowModel: getSortedRowModel(),
rowCount: data.length,
meta: { meta: {
isFetching, isFetching,
}, },
+5 -5
View File
@@ -7,7 +7,7 @@ import {
IconShield, IconShield,
IconTrash, IconTrash,
} from "@tabler/icons-react"; } from "@tabler/icons-react";
import { createColumnHelper, getCoreRowModel, useReactTable } from "@tanstack/react-table"; import { createColumnHelper, useTable } from "@tanstack/react-table";
import { useMemo } from "react"; import { useMemo } from "react";
import type { User } from "src/api/backend"; import type { User } from "src/api/backend";
import { import {
@@ -18,6 +18,7 @@ import {
TrueFalseFormatter, TrueFalseFormatter,
ValueWithDateFormatter, ValueWithDateFormatter,
} from "src/components"; } from "src/components";
import { type Features, features } from "src/components/Table/features";
import { TableLayout } from "src/components/Table/TableLayout"; import { TableLayout } from "src/components/Table/TableLayout";
import { intl, T } from "src/locale"; import { intl, T } from "src/locale";
@@ -47,7 +48,7 @@ export default function Table({
onNewUser, onNewUser,
onLoginAs, onLoginAs,
}: Props) { }: Props) {
const columnHelper = createColumnHelper<User>(); const columnHelper = createColumnHelper<Features, User>();
const columns = useMemo( const columns = useMemo(
() => [ () => [
columnHelper.accessor((row: any) => row, { columnHelper.accessor((row: any) => row, {
@@ -216,11 +217,10 @@ export default function Table({
], ],
); );
const tableInstance = useReactTable<User>({ const tableInstance = useTable({
features,
columns, columns,
data, data,
getCoreRowModel: getCoreRowModel(),
rowCount: data.length,
meta: { meta: {
isFetching, isFetching,
}, },
+870 -679
View File
File diff suppressed because it is too large. Load diff
+8 -8
View File
@@ -4,21 +4,21 @@
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@cypress/grep": "^6.0.0", "@cypress/grep": "^6.0.3",
"@jc21/cypress-swagger-validation": "^0.3.2", "@jc21/cypress-swagger-validation": "^0.3.2",
"@quobix/vacuum": "^0.26.4", "@quobix/vacuum": "^0.26.4",
"axios": "^1.16.0", "axios": "^1.19.0",
"chalk": "^5.6.2", "chalk": "^5.6.2",
"cypress": "^15.15.0", "cypress": "^15.21.1",
"cypress-multi-reporters": "^2.0.5", "cypress-multi-reporters": "^2.0.5",
"cypress-wait-until": "^3.0.2", "cypress-wait-until": "^3.0.2",
"eslint": "^10.3.0", "eslint": "^10.9.1",
"eslint-plugin-align-assignments": "^1.1.2", "eslint-plugin-align-assignments": "^1.1.2",
"eslint-plugin-chai-friendly": "^1.2.0", "eslint-plugin-chai-friendly": "^1.2.1",
"eslint-plugin-cypress": "^6.4.1", "eslint-plugin-cypress": "^7.0.1",
"form-data": "^4.0.5", "form-data": "^4.0.6",
"lodash": "^4.18.1", "lodash": "^4.18.1",
"mocha": "^11.7.5", "mocha": "^11.8.0",
"mocha-junit-reporter": "^2.2.1" "mocha-junit-reporter": "^2.2.1"
}, },
"scripts": { "scripts": {
+103 -48
View File
@@ -80,10 +80,10 @@
"@babel/helper-string-parser" "^7.29.7" "@babel/helper-string-parser" "^7.29.7"
"@babel/helper-validator-identifier" "^7.29.7" "@babel/helper-validator-identifier" "^7.29.7"
"@cypress/grep@^6.0.0": "@cypress/grep@^6.0.3":
version "6.0.1" version "6.0.3"
resolved "https://registry.yarnpkg.com/@cypress/grep/-/grep-6.0.1.tgz#33fb03fd860f3cc4d3f4940c54ad2f6426d0dfea" resolved "https://registry.yarnpkg.com/@cypress/grep/-/grep-6.0.3.tgz#c8023bbf996e406fe932e5861674ded0499e8fda"
integrity sha512-nxTBNid7mKeDfM5thNPc4YH6q+1BoDKFwDLcJJLvosNbJ9WcsRZAU9F6gUQyS/BWhKmRWn+st3JdVtokk8aMSw== integrity sha512-9pm3HVlbXHp9K9XU3hrnY7OBXsCGKGeCZ49n7yOrXbBlPv6FdSq3ub1KDJQ0AvtIi6A/3zCzwU0uZzq9skG6Ag==
dependencies: dependencies:
debug "^4.3.4" debug "^4.3.4"
find-test-names "^1.28.18" find-test-names "^1.28.18"
@@ -141,10 +141,10 @@
debug "^4.3.1" debug "^4.3.1"
minimatch "^10.2.4" minimatch "^10.2.4"
"@eslint/config-helpers@^0.6.0": "@eslint/config-helpers@^0.7.0":
version "0.6.0" version "0.7.0"
resolved "https://registry.yarnpkg.com/@eslint/config-helpers/-/config-helpers-0.6.0.tgz#ef9a36881d39dfd5dbeac22b0da997fabfb08b03" resolved "https://registry.yarnpkg.com/@eslint/config-helpers/-/config-helpers-0.7.0.tgz#09ee4aa07b73f059ec2d4c74bf4b2ff02b322377"
integrity sha512-ii6Bw9jJ2zi2cWA2Z+9/QZ/+3DX6kwaV5Q986D/CdP3Lap3w/pgQZ373FV7byY/i7L4IRH/G43I5dz1ClsCbpA== integrity sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==
dependencies: dependencies:
"@eslint/core" "^1.2.1" "@eslint/core" "^1.2.1"
@@ -386,10 +386,10 @@ ansi-styles@^6.1.0, ansi-styles@^6.2.1, ansi-styles@^6.2.3:
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.3.tgz#c044d5dcc521a076413472597a1acb1f103c4041" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.3.tgz#c044d5dcc521a076413472597a1acb1f103c4041"
integrity sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg== integrity sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==
arch@^2.2.0: arch@^3.0.0:
version "2.2.0" version "3.0.0"
resolved "https://registry.yarnpkg.com/arch/-/arch-2.2.0.tgz#1bc47818f305764f23ab3306b0bfc086c5a29d11" resolved "https://registry.yarnpkg.com/arch/-/arch-3.0.0.tgz#a44e7077da4615fc5f1e3da21fbfc201d2c1817c"
integrity sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ== integrity sha512-AmIAC+Wtm2AU8lGfTtHsw0Y9Qtftx2YXEEtiBP10xFUtMOA+sHHx6OAddyL52mUKh1vsXQ6/w1mVDptZCyUt4Q==
argparse@^2.0.1: argparse@^2.0.1:
version "2.0.1" version "2.0.1"
@@ -433,7 +433,17 @@ aws4@^1.8.0:
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.13.2.tgz#0aa167216965ac9474ccfa83892cfb6b3e1e52ef" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.13.2.tgz#0aa167216965ac9474ccfa83892cfb6b3e1e52ef"
integrity sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw== integrity sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==
axios@^1.16.0, axios@^1.7.7: axios@^1.19.0:
version "1.19.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.19.0.tgz#ddf864d4c8233c0e6873746ab59361537d05ad39"
integrity sha512-ht/iuYZXEjFxLH/Hkezgd7m6JKlHHXEUSneaDz8uZe1Gj5QZtCnpyDsckvAiEnT89OEbCLmnte4R4sn7P0EKFw==
dependencies:
follow-redirects "^1.16.0"
form-data "^4.0.6"
https-proxy-agent "^5.0.1"
proxy-from-env "^2.1.0"
axios@^1.7.7:
version "1.16.1" version "1.16.1"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.16.1.tgz#517e29291d19d6e8cf919ff264f4fe157261ba12" resolved "https://registry.yarnpkg.com/axios/-/axios-1.16.1.tgz#517e29291d19d6e8cf919ff264f4fe157261ba12"
integrity sha512-caYkukvroVPO8KrzuJEb50Hm07KwfBZPEC3VeFHTsqWHvKTsy54hjJz9BS/cdaypROE2rH6xvm9mHX4fgWkr3A== integrity sha512-caYkukvroVPO8KrzuJEb50Hm07KwfBZPEC3VeFHTsqWHvKTsy54hjJz9BS/cdaypROE2rH6xvm9mHX4fgWkr3A==
@@ -489,6 +499,13 @@ brace-expansion@^5.0.5:
dependencies: dependencies:
balanced-match "^4.0.2" balanced-match "^4.0.2"
brace-expansion@^5.0.8:
version "5.0.9"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-5.0.9.tgz#7c72438809b5fa5babf54199a1f1c281a6984fcf"
integrity sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==
dependencies:
balanced-match "^4.0.2"
braces@^3.0.3: braces@^3.0.3:
version "3.0.3" version "3.0.3"
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
@@ -580,6 +597,14 @@ chownr@^3.0.0:
resolved "https://registry.yarnpkg.com/chownr/-/chownr-3.0.0.tgz#9855e64ecd240a9cc4267ce8a4aa5d24a1da15e4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-3.0.0.tgz#9855e64ecd240a9cc4267ce8a4aa5d24a1da15e4"
integrity sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g== integrity sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==
chrome-remote-interface@0.33.3:
version "0.33.3"
resolved "https://registry.yarnpkg.com/chrome-remote-interface/-/chrome-remote-interface-0.33.3.tgz#d8b4339f487b460a9461af7355bda98054e8e1a4"
integrity sha512-zNnn0prUL86Teru6UCAZ1yU1XeXljHl3gj7OrfPcarEfU62OUU4IujDPdTDW3dAWwRqN3ZMG/Chhkh2gPL/wiw==
dependencies:
commander "2.11.x"
ws "^7.2.0"
ci-info@^4.1.0: ci-info@^4.1.0:
version "4.4.0" version "4.4.0"
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-4.4.0.tgz#7d54eff9f54b45b62401c26032696eb59c8bd18c" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-4.4.0.tgz#7d54eff9f54b45b62401c26032696eb59c8bd18c"
@@ -647,6 +672,11 @@ combined-stream@^1.0.8, combined-stream@~1.0.6:
dependencies: dependencies:
delayed-stream "~1.0.0" delayed-stream "~1.0.0"
commander@2.11.x:
version "2.11.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563"
integrity sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==
commander@^6.2.1: commander@^6.2.1:
version "6.2.1" version "6.2.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c"
@@ -690,22 +720,23 @@ cypress-wait-until@^3.0.2:
resolved "https://registry.yarnpkg.com/cypress-wait-until/-/cypress-wait-until-3.0.2.tgz#c90dddfa4c46a2c422f5b91d486531c560bae46e" resolved "https://registry.yarnpkg.com/cypress-wait-until/-/cypress-wait-until-3.0.2.tgz#c90dddfa4c46a2c422f5b91d486531c560bae46e"
integrity sha512-iemies796dD5CgjG5kV0MnpEmKSH+s7O83ZoJLVzuVbZmm4lheMsZqAVT73hlMx4QlkwhxbyUzhOBUOZwoOe0w== integrity sha512-iemies796dD5CgjG5kV0MnpEmKSH+s7O83ZoJLVzuVbZmm4lheMsZqAVT73hlMx4QlkwhxbyUzhOBUOZwoOe0w==
cypress@^15.15.0: cypress@^15.21.1:
version "15.16.0" version "15.21.1"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-15.16.0.tgz#482f77e6f85aee98b94a5ad844d36f69dc212c28" resolved "https://registry.yarnpkg.com/cypress/-/cypress-15.21.1.tgz#51653d58fa0e9994a11406aa3df2bee716264f9a"
integrity sha512-fy0M0c9xDLEp4v9y7LLKFeAQhIdDsobxDSKpD3JcZpqQefjy9TSzEyVV3HA0zu7hUi0bGHlSYlI7ASub8wgR9A== integrity sha512-ogHpHMj0XNlZA5MGzjg8SWHf0eMw9lTwVQRKjpcT1GzNTxNUjwnHA8YCG6nOJ8ThU+XZaUxJgpMYZnJ//8aDaw==
dependencies: dependencies:
"@cypress/request" "^4.0.0" "@cypress/request" "^4.0.0"
"@cypress/xvfb" "^1.2.4" "@cypress/xvfb" "^1.2.4"
"@types/sinonjs__fake-timers" "8.1.1" "@types/sinonjs__fake-timers" "8.1.1"
"@types/sizzle" "^2.3.2" "@types/sizzle" "^2.3.2"
"@types/tmp" "^0.2.3" "@types/tmp" "^0.2.3"
arch "^2.2.0" arch "^3.0.0"
blob-util "^2.0.2" blob-util "^2.0.2"
bluebird "^3.7.2" bluebird "^3.7.2"
buffer "^5.7.1" buffer "^5.7.1"
cachedir "^2.4.0" cachedir "^2.4.0"
chalk "^4.1.0" chalk "^4.1.0"
chrome-remote-interface "0.33.3"
ci-info "^4.1.0" ci-info "^4.1.0"
cli-table3 "0.6.1" cli-table3 "0.6.1"
commander "^6.2.1" commander "^6.2.1"
@@ -731,7 +762,6 @@ cypress@^15.15.0:
systeminformation "^5.31.1" systeminformation "^5.31.1"
tmp "~0.2.4" tmp "~0.2.4"
tree-kill "1.2.2" tree-kill "1.2.2"
tslib "1.14.1"
untildify "^4.0.0" untildify "^4.0.0"
yauzl "^3.3.1" yauzl "^3.3.1"
@@ -895,17 +925,17 @@ eslint-plugin-align-assignments@^1.1.2:
resolved "https://registry.yarnpkg.com/eslint-plugin-align-assignments/-/eslint-plugin-align-assignments-1.1.2.tgz#83e1a8a826d4adf29e82b52d0bb39c88b301b576" resolved "https://registry.yarnpkg.com/eslint-plugin-align-assignments/-/eslint-plugin-align-assignments-1.1.2.tgz#83e1a8a826d4adf29e82b52d0bb39c88b301b576"
integrity sha512-I1ZJgk9EjHfGVU9M2Ex8UkVkkjLL5Y9BS6VNnQHq79eHj2H4/Cgxf36lQSUTLgm2ntB03A2NtF+zg9fyi5vChg== integrity sha512-I1ZJgk9EjHfGVU9M2Ex8UkVkkjLL5Y9BS6VNnQHq79eHj2H4/Cgxf36lQSUTLgm2ntB03A2NtF+zg9fyi5vChg==
eslint-plugin-chai-friendly@^1.2.0: eslint-plugin-chai-friendly@^1.2.1:
version "1.2.0" version "1.2.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-chai-friendly/-/eslint-plugin-chai-friendly-1.2.0.tgz#2a54b481bcbc26ab5a581b2b7e7c304465837c15" resolved "https://registry.yarnpkg.com/eslint-plugin-chai-friendly/-/eslint-plugin-chai-friendly-1.2.1.tgz#141392762aa8626ac3d25780a502e625ce74922b"
integrity sha512-um2pBb4ZXNCoTRPRAWiUaXeIaw1dRaPOEZ+G/qcZqfyTdkCXXwOBctnfnbIRbZiQf4AXl3ImV1grt423SlK+mg== integrity sha512-mV3EOJLDr8+L+LS8uCkP711fnNHz+4PsmPyz18xwkvjJwfLRlnx0Eu6CFnb5B+dW5ahoav2jVer2KFYsmIuv3A==
eslint-plugin-cypress@^6.4.1: eslint-plugin-cypress@^7.0.1:
version "6.4.1" version "7.0.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-cypress/-/eslint-plugin-cypress-6.4.1.tgz#2aa64e5a2dcc56b8b916fdf8398a81b31a61c462" resolved "https://registry.yarnpkg.com/eslint-plugin-cypress/-/eslint-plugin-cypress-7.0.1.tgz#eb80500478533204ad5ebd2e49944224b0e47941"
integrity sha512-8mnfR3q0Lr41Fu9SYZGeZ5nbSBgtS44+bbtSs7k0KvfoQ2pPmK43IvaTP6FGTfwBTN6S7w027CpqjrLAd65AYA== integrity sha512-Jn2sV9rt8iiUYZY+iGY8fvV8iseJ6Tl1jngnLeSRyuHvYgxEbDUUFwNhwj1cr9gI4xCzTDh4mgXJ3YY7+dEMVg==
dependencies: dependencies:
globals "^17.6.0" globals "^17.11.0"
eslint-scope@^9.1.2: eslint-scope@^9.1.2:
version "9.1.2" version "9.1.2"
@@ -927,15 +957,15 @@ eslint-visitor-keys@^5.0.1:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz#9e3c9489697824d2d4ce3a8ad12628f91e9f59be" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz#9e3c9489697824d2d4ce3a8ad12628f91e9f59be"
integrity sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA== integrity sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==
eslint@^10.3.0: eslint@^10.9.1:
version "10.4.1" version "10.9.1"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-10.4.1.tgz#f6640b176e0912246d9ddbf8fcfa5e8b7f02445a" resolved "https://registry.yarnpkg.com/eslint/-/eslint-10.9.1.tgz#409da5c41a5536d5a849f8555a18ca7ef1eb963b"
integrity sha512-AyIKhnOBuOAdueD7RB3xB+YeAWScb9jHsJBgH2Hcde8InP5JYhqrRR6iTMHyTEwgENK54Cp44e4v8BwNhsuHuw== integrity sha512-9VaAkDURekixUQJy0oJYl2DcN6oKMfxay7XzaGYAWQwsb6qfKf+x76R2k1L8kb1boc+FyCAaTA9GmiKaaiaF+A==
dependencies: dependencies:
"@eslint-community/eslint-utils" "^4.8.0" "@eslint-community/eslint-utils" "^4.8.0"
"@eslint-community/regexpp" "^4.12.2" "@eslint-community/regexpp" "^4.12.2"
"@eslint/config-array" "^0.23.5" "@eslint/config-array" "^0.23.5"
"@eslint/config-helpers" "^0.6.0" "@eslint/config-helpers" "^0.7.0"
"@eslint/core" "^1.2.1" "@eslint/core" "^1.2.1"
"@eslint/plugin-kit" "^0.7.2" "@eslint/plugin-kit" "^0.7.2"
"@humanfs/node" "^0.16.6" "@humanfs/node" "^0.16.6"
@@ -959,7 +989,7 @@ eslint@^10.3.0:
imurmurhash "^0.1.4" imurmurhash "^0.1.4"
is-glob "^4.0.0" is-glob "^4.0.0"
json-stable-stringify-without-jsonify "^1.0.1" json-stable-stringify-without-jsonify "^1.0.1"
minimatch "^10.2.4" minimatch "^10.2.5"
natural-compare "^1.4.0" natural-compare "^1.4.0"
optionator "^0.9.3" optionator "^0.9.3"
@@ -1185,6 +1215,17 @@ form-data@^4.0.5, form-data@~4.0.4:
hasown "^2.0.2" hasown "^2.0.2"
mime-types "^2.1.12" mime-types "^2.1.12"
form-data@^4.0.6:
version "4.0.6"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.6.tgz#28e864e1b786dbebb68db1f452f9635278665827"
integrity sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.8"
es-set-tostringtag "^2.1.0"
hasown "^2.0.4"
mime-types "^2.1.35"
formdata-polyfill@^4.0.10: formdata-polyfill@^4.0.10:
version "4.0.10" version "4.0.10"
resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423"
@@ -1288,10 +1329,10 @@ global-dirs@^3.0.0:
dependencies: dependencies:
ini "2.0.0" ini "2.0.0"
globals@^17.6.0: globals@^17.11.0:
version "17.6.0" version "17.11.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-17.6.0.tgz#0f0be018d5cca8690e6375ead1f65c4bb96191fc" resolved "https://registry.yarnpkg.com/globals/-/globals-17.11.0.tgz#d643485bb30220d7751e511cf4f68c73d3870d87"
integrity sha512-sepffkT8stwnIYbsMBpoCHJuJM5l98FUF2AnE07hfvE0m/qp3R586hw4jF4uadbhvg1ooIdzuu7CsfD2jzCaNA== integrity sha512-Z2I8hM+PbJDXQDq3Icgpzv+mPdwr68iZUU9d5WW4FuXfDUQfkZaZuvjMv42/5crNyw154+9+VWXbYrUgDXbxNw==
globby@^11.0.4: globby@^11.0.4:
version "11.1.0" version "11.1.0"
@@ -1347,6 +1388,13 @@ hasown@^2.0.2:
dependencies: dependencies:
function-bind "^1.1.2" function-bind "^1.1.2"
hasown@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.4.tgz#8c62d8cb90beb2aad5d0a5b67581ad9854c3f003"
integrity sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==
dependencies:
function-bind "^1.1.2"
he@^1.2.0: he@^1.2.0:
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
@@ -1663,7 +1711,7 @@ mime-db@1.52.0:
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70"
integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==
mime-types@^2.1.12, mime-types@~2.1.19: mime-types@^2.1.12, mime-types@^2.1.35, mime-types@~2.1.19:
version "2.1.35" version "2.1.35"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a"
integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==
@@ -1687,6 +1735,13 @@ minimatch@^10.2.4:
dependencies: dependencies:
brace-expansion "^5.0.5" brace-expansion "^5.0.5"
minimatch@^10.2.5:
version "10.2.6"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-10.2.6.tgz#fd956bbe0b77241e9f15ac5dccb1c638060968ef"
integrity sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==
dependencies:
brace-expansion "^5.0.8"
minimatch@^9.0.4, minimatch@^9.0.5: minimatch@^9.0.4, minimatch@^9.0.5:
version "9.0.5" version "9.0.5"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5"
@@ -1727,10 +1782,10 @@ mocha-junit-reporter@^2.2.1:
strip-ansi "^6.0.1" strip-ansi "^6.0.1"
xml "^1.0.1" xml "^1.0.1"
mocha@^11.7.5: mocha@^11.8.0:
version "11.7.6" version "11.8.0"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-11.7.6.tgz#ebbe22989d04cbb9424a36307320476624c41a33" resolved "https://registry.yarnpkg.com/mocha/-/mocha-11.8.0.tgz#9163cc59600ec26470f6b040e30aa51acc973ed2"
integrity sha512-nS9xOGbw2I3cjCpxwZAEJ9xK9lmJ08vEkQvLtz4du9ZrF9UrjRpeJGiIgl2Z+Qs++pmB4ecDe48Fwsh+j+j7xA== integrity sha512-VyCeUdGN3A9lmCTTgG4yuvY9ixxaDk+xt2R/7/+1AP6EqNG+G9OKkzBwhVtVYoNX8YsxNSgAl8mOv3IAeOpFbw==
dependencies: dependencies:
browser-stdout "^1.3.1" browser-stdout "^1.3.1"
chokidar "^4.0.1" chokidar "^4.0.1"
@@ -2307,11 +2362,6 @@ tree-kill@1.2.2:
resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc"
integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==
tslib@1.14.1:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
tunnel-agent@^0.6.0: tunnel-agent@^0.6.0:
version "0.6.0" version "0.6.0"
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
@@ -2430,6 +2480,11 @@ wrappy@1:
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
ws@^7.2.0:
version "7.5.13"
resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.13.tgz#12aa507eaca76c295c278b1aebf4698ab2c1845f"
integrity sha512-rsKI6xDBFVf4r/x8XyChGK04QR/XHroxs/jUcoWvtEZM8TPU/X/uIY9B1CsSzYws9ZJb/6bbBu7dPhFW00CAoA==
xml@^1.0.1: xml@^1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5"