replace debug with obug (#2619)
* patch unenv * replaces debug with obug reverts unenv patch
This commit is contained in:
+1
-1
@@ -72,7 +72,7 @@ RUN update-alternatives --install /usr/sbin/iptables iptables /usr/sbin/iptables
|
|||||||
RUN update-alternatives --install /usr/sbin/ip6tables ip6tables /usr/sbin/ip6tables-legacy 10 --slave /usr/sbin/ip6tables-restore ip6tables-restore /usr/sbin/ip6tables-legacy-restore --slave /usr/sbin/ip6tables-save ip6tables-save /usr/sbin/ip6tables-legacy-save
|
RUN update-alternatives --install /usr/sbin/ip6tables ip6tables /usr/sbin/ip6tables-legacy 10 --slave /usr/sbin/ip6tables-restore ip6tables-restore /usr/sbin/ip6tables-legacy-restore --slave /usr/sbin/ip6tables-save ip6tables-save /usr/sbin/ip6tables-legacy-save
|
||||||
|
|
||||||
# Set Environment
|
# Set Environment
|
||||||
ENV DEBUG=Server,WireGuard,Database,CMD
|
ENV DEBUG=Server,WireGuard,Database,CMD,Firewall
|
||||||
ENV PORT=51821
|
ENV PORT=51821
|
||||||
ENV HOST=0.0.0.0
|
ENV HOST=0.0.0.0
|
||||||
ENV INSECURE=false
|
ENV INSECURE=false
|
||||||
|
|||||||
+1
-1
@@ -24,7 +24,7 @@ RUN update-alternatives --install /usr/sbin/iptables iptables /usr/sbin/iptables
|
|||||||
RUN update-alternatives --install /usr/sbin/ip6tables ip6tables /usr/sbin/ip6tables-legacy 10 --slave /usr/sbin/ip6tables-restore ip6tables-restore /usr/sbin/ip6tables-legacy-restore --slave /usr/sbin/ip6tables-save ip6tables-save /usr/sbin/ip6tables-legacy-save
|
RUN update-alternatives --install /usr/sbin/ip6tables ip6tables /usr/sbin/ip6tables-legacy 10 --slave /usr/sbin/ip6tables-restore ip6tables-restore /usr/sbin/ip6tables-legacy-restore --slave /usr/sbin/ip6tables-save ip6tables-save /usr/sbin/ip6tables-legacy-save
|
||||||
|
|
||||||
# Set Environment
|
# Set Environment
|
||||||
ENV DEBUG=Server,WireGuard,Database,CMD
|
ENV DEBUG=Server,WireGuard,Database,CMD,Firewall
|
||||||
ENV PORT=51821
|
ENV PORT=51821
|
||||||
ENV HOST=0.0.0.0
|
ENV HOST=0.0.0.0
|
||||||
ENV INSECURE=true
|
ENV INSECURE=true
|
||||||
|
|||||||
+1
-2
@@ -37,13 +37,13 @@
|
|||||||
"citty": "^0.2.2",
|
"citty": "^0.2.2",
|
||||||
"consola": "^3.4.2",
|
"consola": "^3.4.2",
|
||||||
"crc-32": "^1.2.2",
|
"crc-32": "^1.2.2",
|
||||||
"debug": "^4.4.3",
|
|
||||||
"drizzle-orm": "^0.45.2",
|
"drizzle-orm": "^0.45.2",
|
||||||
"ip-bigint": "^9.0.4",
|
"ip-bigint": "^9.0.4",
|
||||||
"is-cidr": "^7.0.0",
|
"is-cidr": "^7.0.0",
|
||||||
"is-ip": "^5.0.1",
|
"is-ip": "^5.0.1",
|
||||||
"js-sha256": "^0.11.1",
|
"js-sha256": "^0.11.1",
|
||||||
"nuxt": "^3.21.5",
|
"nuxt": "^3.21.5",
|
||||||
|
"obug": "^2.1.1",
|
||||||
"otpauth": "^9.5.1",
|
"otpauth": "^9.5.1",
|
||||||
"pinia": "^3.0.4",
|
"pinia": "^3.0.4",
|
||||||
"qr": "^0.6.0",
|
"qr": "^0.6.0",
|
||||||
@@ -58,7 +58,6 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nuxt/eslint": "^1.15.2",
|
"@nuxt/eslint": "^1.15.2",
|
||||||
"@nuxt/test-utils": "^4.0.3",
|
"@nuxt/test-utils": "^4.0.3",
|
||||||
"@types/debug": "^4.1.13",
|
|
||||||
"@types/phc__format": "^1.0.1",
|
"@types/phc__format": "^1.0.1",
|
||||||
"@types/semver": "^7.7.1",
|
"@types/semver": "^7.7.1",
|
||||||
"@vitest/coverage-v8": "^4.1.6",
|
"@vitest/coverage-v8": "^4.1.6",
|
||||||
|
|||||||
Generated
+3
-18
@@ -56,9 +56,6 @@ importers:
|
|||||||
crc-32:
|
crc-32:
|
||||||
specifier: ^1.2.2
|
specifier: ^1.2.2
|
||||||
version: 1.2.2
|
version: 1.2.2
|
||||||
debug:
|
|
||||||
specifier: ^4.4.3
|
|
||||||
version: 4.4.3
|
|
||||||
drizzle-orm:
|
drizzle-orm:
|
||||||
specifier: ^0.45.2
|
specifier: ^0.45.2
|
||||||
version: 0.45.2(@libsql/client@0.17.3)
|
version: 0.45.2(@libsql/client@0.17.3)
|
||||||
@@ -77,6 +74,9 @@ importers:
|
|||||||
nuxt:
|
nuxt:
|
||||||
specifier: ^3.21.5
|
specifier: ^3.21.5
|
||||||
version: 3.21.5(@libsql/client@0.17.3)(@parcel/watcher@2.5.6)(@types/node@25.8.0)(@vue/compiler-sfc@3.5.34)(cac@6.7.14)(db0@0.3.4(@libsql/client@0.17.3)(drizzle-orm@0.45.2(@libsql/client@0.17.3)))(drizzle-orm@0.45.2(@libsql/client@0.17.3))(eslint@9.39.4(jiti@1.21.7))(ioredis@5.10.1)(magicast@0.5.3)(optionator@0.9.4)(rollup-plugin-visualizer@7.0.1(rollup@4.60.4))(rollup@4.60.4)(srvx@0.11.15)(terser@5.47.1)(tsx@4.22.1)(typescript@6.0.3)(vite@7.3.3(@types/node@25.8.0)(jiti@1.21.7)(terser@5.47.1)(tsx@4.22.1)(yaml@2.9.0))(vue-tsc@3.2.9(typescript@6.0.3))(yaml@2.9.0)
|
version: 3.21.5(@libsql/client@0.17.3)(@parcel/watcher@2.5.6)(@types/node@25.8.0)(@vue/compiler-sfc@3.5.34)(cac@6.7.14)(db0@0.3.4(@libsql/client@0.17.3)(drizzle-orm@0.45.2(@libsql/client@0.17.3)))(drizzle-orm@0.45.2(@libsql/client@0.17.3))(eslint@9.39.4(jiti@1.21.7))(ioredis@5.10.1)(magicast@0.5.3)(optionator@0.9.4)(rollup-plugin-visualizer@7.0.1(rollup@4.60.4))(rollup@4.60.4)(srvx@0.11.15)(terser@5.47.1)(tsx@4.22.1)(typescript@6.0.3)(vite@7.3.3(@types/node@25.8.0)(jiti@1.21.7)(terser@5.47.1)(tsx@4.22.1)(yaml@2.9.0))(vue-tsc@3.2.9(typescript@6.0.3))(yaml@2.9.0)
|
||||||
|
obug:
|
||||||
|
specifier: ^2.1.1
|
||||||
|
version: 2.1.1
|
||||||
otpauth:
|
otpauth:
|
||||||
specifier: ^9.5.1
|
specifier: ^9.5.1
|
||||||
version: 9.5.1
|
version: 9.5.1
|
||||||
@@ -114,9 +114,6 @@ importers:
|
|||||||
'@nuxt/test-utils':
|
'@nuxt/test-utils':
|
||||||
specifier: ^4.0.3
|
specifier: ^4.0.3
|
||||||
version: 4.0.3(@vitest/ui@4.1.6)(crossws@0.4.5(srvx@0.11.15))(magicast@0.5.3)(typescript@6.0.3)(vite@7.3.3(@types/node@25.8.0)(jiti@1.21.7)(terser@5.47.1)(tsx@4.22.1)(yaml@2.9.0))(vitest@4.1.6)
|
version: 4.0.3(@vitest/ui@4.1.6)(crossws@0.4.5(srvx@0.11.15))(magicast@0.5.3)(typescript@6.0.3)(vite@7.3.3(@types/node@25.8.0)(jiti@1.21.7)(terser@5.47.1)(tsx@4.22.1)(yaml@2.9.0))(vitest@4.1.6)
|
||||||
'@types/debug':
|
|
||||||
specifier: ^4.1.13
|
|
||||||
version: 4.1.13
|
|
||||||
'@types/phc__format':
|
'@types/phc__format':
|
||||||
specifier: ^1.0.1
|
specifier: ^1.0.1
|
||||||
version: 1.0.1
|
version: 1.0.1
|
||||||
@@ -2510,9 +2507,6 @@ packages:
|
|||||||
'@types/chai@5.2.3':
|
'@types/chai@5.2.3':
|
||||||
resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==}
|
resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==}
|
||||||
|
|
||||||
'@types/debug@4.1.13':
|
|
||||||
resolution: {integrity: sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==}
|
|
||||||
|
|
||||||
'@types/deep-eql@4.0.2':
|
'@types/deep-eql@4.0.2':
|
||||||
resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==}
|
resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==}
|
||||||
|
|
||||||
@@ -2531,9 +2525,6 @@ packages:
|
|||||||
'@types/json-schema@7.0.15':
|
'@types/json-schema@7.0.15':
|
||||||
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
|
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
|
||||||
|
|
||||||
'@types/ms@2.1.0':
|
|
||||||
resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==}
|
|
||||||
|
|
||||||
'@types/node@25.8.0':
|
'@types/node@25.8.0':
|
||||||
resolution: {integrity: sha512-TCFSk8IZh+iLX1xtksoBVtdmgL+1IX0fC9BeU4QqFSuNdN/K+HUlhqOzEmSYYpZUVsLYcPqc9KX+60iDuninSQ==}
|
resolution: {integrity: sha512-TCFSk8IZh+iLX1xtksoBVtdmgL+1IX0fC9BeU4QqFSuNdN/K+HUlhqOzEmSYYpZUVsLYcPqc9KX+60iDuninSQ==}
|
||||||
|
|
||||||
@@ -8477,10 +8468,6 @@ snapshots:
|
|||||||
'@types/deep-eql': 4.0.2
|
'@types/deep-eql': 4.0.2
|
||||||
assertion-error: 2.0.1
|
assertion-error: 2.0.1
|
||||||
|
|
||||||
'@types/debug@4.1.13':
|
|
||||||
dependencies:
|
|
||||||
'@types/ms': 2.1.0
|
|
||||||
|
|
||||||
'@types/deep-eql@4.0.2': {}
|
'@types/deep-eql@4.0.2': {}
|
||||||
|
|
||||||
'@types/esrecurse@4.3.1': {}
|
'@types/esrecurse@4.3.1': {}
|
||||||
@@ -8493,8 +8480,6 @@ snapshots:
|
|||||||
|
|
||||||
'@types/json-schema@7.0.15': {}
|
'@types/json-schema@7.0.15': {}
|
||||||
|
|
||||||
'@types/ms@2.1.0': {}
|
|
||||||
|
|
||||||
'@types/node@25.8.0':
|
'@types/node@25.8.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
undici-types: 7.24.6
|
undici-types: 7.24.6
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { drizzle } from 'drizzle-orm/libsql';
|
import { drizzle } from 'drizzle-orm/libsql';
|
||||||
import { migrate as drizzleMigrate } from 'drizzle-orm/libsql/migrator';
|
import { migrate as drizzleMigrate } from 'drizzle-orm/libsql/migrator';
|
||||||
import { createClient } from '@libsql/client';
|
import { createClient } from '@libsql/client';
|
||||||
import debug from 'debug';
|
import { createDebug } from 'obug';
|
||||||
import { eq } from 'drizzle-orm';
|
import { eq } from 'drizzle-orm';
|
||||||
|
|
||||||
import * as schema from './schema';
|
import * as schema from './schema';
|
||||||
@@ -13,7 +13,7 @@ import { InterfaceService } from './repositories/interface/service';
|
|||||||
import { HooksService } from './repositories/hooks/service';
|
import { HooksService } from './repositories/hooks/service';
|
||||||
import { OneTimeLinkService } from './repositories/oneTimeLink/service';
|
import { OneTimeLinkService } from './repositories/oneTimeLink/service';
|
||||||
|
|
||||||
const DB_DEBUG = debug('Database');
|
const DB_DEBUG = createDebug('Database');
|
||||||
|
|
||||||
const client = createClient({ url: 'file:/etc/wireguard/wg-easy.db' });
|
const client = createClient({ url: 'file:/etc/wireguard/wg-easy.db' });
|
||||||
const db = drizzle({ client, schema });
|
const db = drizzle({ client, schema });
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import fs from 'node:fs/promises';
|
import fs from 'node:fs/promises';
|
||||||
import debug from 'debug';
|
import { createDebug } from 'obug';
|
||||||
import type { InterfaceType } from '#db/repositories/interface/types';
|
import type { InterfaceType } from '#db/repositories/interface/types';
|
||||||
|
|
||||||
const WG_DEBUG = debug('WireGuard');
|
const WG_DEBUG = createDebug('WireGuard');
|
||||||
|
|
||||||
const generateRandomHeaderValue = () =>
|
const generateRandomHeaderValue = () =>
|
||||||
Math.floor(Math.random() * 2147483642) + 5;
|
Math.floor(Math.random() * 2147483642) + 5;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import childProcess from 'child_process';
|
import childProcess from 'child_process';
|
||||||
import debug from 'debug';
|
import { createDebug } from 'obug';
|
||||||
|
|
||||||
const CMD_DEBUG = debug('CMD');
|
const CMD_DEBUG = createDebug('CMD');
|
||||||
|
|
||||||
export function exec(
|
export function exec(
|
||||||
cmd: string,
|
cmd: string,
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import debug from 'debug';
|
import { createDebug } from 'obug';
|
||||||
import packageJson from '@@/package.json';
|
import packageJson from '@@/package.json';
|
||||||
|
|
||||||
export const RELEASE = 'v' + packageJson.version;
|
export const RELEASE = 'v' + packageJson.version;
|
||||||
|
|
||||||
export const SERVER_DEBUG = debug('Server');
|
export const SERVER_DEBUG = createDebug('Server');
|
||||||
|
|
||||||
export const OLD_ENV = {
|
export const OLD_ENV = {
|
||||||
/** @deprecated Only for migration purposes */
|
/** @deprecated Only for migration purposes */
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import debug from 'debug';
|
import { createDebug } from 'obug';
|
||||||
import { isIPv6 } from 'is-ip';
|
import { isIPv6 } from 'is-ip';
|
||||||
|
|
||||||
import type { ClientType } from '#db/repositories/client/types';
|
import type { ClientType } from '#db/repositories/client/types';
|
||||||
import type { InterfaceType } from '#db/repositories/interface/types';
|
import type { InterfaceType } from '#db/repositories/interface/types';
|
||||||
import type { UserConfigType } from '#db/repositories/userConfig/types';
|
import type { UserConfigType } from '#db/repositories/userConfig/types';
|
||||||
|
|
||||||
const FW_DEBUG = debug('Firewall');
|
const FW_DEBUG = createDebug('Firewall');
|
||||||
const CHAIN_NAME = 'WG_CLIENTS';
|
const CHAIN_NAME = 'WG_CLIENTS';
|
||||||
|
|
||||||
// Mutex to prevent concurrent rule rebuilds
|
// Mutex to prevent concurrent rule rebuilds
|
||||||
|
|||||||
Reference in New Issue
Block a user