replace debug with obug (#2619)
* patch unenv * replaces debug with obug reverts unenv patch
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { drizzle } from 'drizzle-orm/libsql';
|
||||
import { migrate as drizzleMigrate } from 'drizzle-orm/libsql/migrator';
|
||||
import { createClient } from '@libsql/client';
|
||||
import debug from 'debug';
|
||||
import { createDebug } from 'obug';
|
||||
import { eq } from 'drizzle-orm';
|
||||
|
||||
import * as schema from './schema';
|
||||
@@ -13,7 +13,7 @@ import { InterfaceService } from './repositories/interface/service';
|
||||
import { HooksService } from './repositories/hooks/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 db = drizzle({ client, schema });
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import fs from 'node:fs/promises';
|
||||
import debug from 'debug';
|
||||
import { createDebug } from 'obug';
|
||||
import type { InterfaceType } from '#db/repositories/interface/types';
|
||||
|
||||
const WG_DEBUG = debug('WireGuard');
|
||||
const WG_DEBUG = createDebug('WireGuard');
|
||||
|
||||
const generateRandomHeaderValue = () =>
|
||||
Math.floor(Math.random() * 2147483642) + 5;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
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(
|
||||
cmd: string,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import debug from 'debug';
|
||||
import { createDebug } from 'obug';
|
||||
import packageJson from '@@/package.json';
|
||||
|
||||
export const RELEASE = 'v' + packageJson.version;
|
||||
|
||||
export const SERVER_DEBUG = debug('Server');
|
||||
export const SERVER_DEBUG = createDebug('Server');
|
||||
|
||||
export const OLD_ENV = {
|
||||
/** @deprecated Only for migration purposes */
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import debug from 'debug';
|
||||
import { createDebug } from 'obug';
|
||||
import { isIPv6 } from 'is-ip';
|
||||
|
||||
import type { ClientType } from '#db/repositories/client/types';
|
||||
import type { InterfaceType } from '#db/repositories/interface/types';
|
||||
import type { UserConfigType } from '#db/repositories/userConfig/types';
|
||||
|
||||
const FW_DEBUG = debug('Firewall');
|
||||
const FW_DEBUG = createDebug('Firewall');
|
||||
const CHAIN_NAME = 'WG_CLIENTS';
|
||||
|
||||
// Mutex to prevent concurrent rule rebuilds
|
||||
|
||||
Reference in New Issue
Block a user