Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: implement debug logger #569

Merged
merged 8 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/extension/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# VITE_DEBUG_LOG="swap:*"
VITE_DEBUG_LOG=
1 change: 1 addition & 0 deletions packages/extension/configs/vitest.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default defineConfig({
}),
],
define: {
__ENKRYPT_DEBUG_LOG__: process.env.DEBUG_LOG,
// setting __VERSION__ here blows it up for some reason
// __VERSION__: 'testing',
__IS_OPERA__: false,
Expand Down
1 change: 1 addition & 0 deletions packages/extension/src/ui/action/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as filters from './utils/filters';
import Vue3Lottie from 'vue3-lottie';

global.WeakMap = WeakMap;
(globalThis as any).__ENKRYPT_DEBUG_LOG_CONF__ = import.meta.env.VITE_DEBUG_LOG
NickKelly1 marked this conversation as resolved.
Show resolved Hide resolved

const app = createApp(App);

Expand Down
1 change: 1 addition & 0 deletions packages/extension/src/ui/onboard/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import routes from './routes';
import * as filters from '@action/utils/filters';

global.WeakMap = WeakMap;
(globalThis as any).__ENKRYPT_DEBUG_LOG_CONF__ = import.meta.env.VITE_DEBUG_LOG

const router = createRouter({
history: createWebHashHistory(),
Expand Down
1 change: 1 addition & 0 deletions packages/extension/src/ui/provider-pages/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as filters from '@action/utils/filters';
import Vue3Lottie from 'vue3-lottie';

global.WeakMap = WeakMap;
(globalThis as any).__ENKRYPT_DEBUG_LOG_CONF__ = import.meta.env.VITE_DEBUG_LOG
NickKelly1 marked this conversation as resolved.
Show resolved Hide resolved

const router = createRouter({
history: createWebHashHistory(),
Expand Down
1 change: 1 addition & 0 deletions packages/extension/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import assetsRewritePlugin from './configs/vite/assets-rewrite';
import transformManifest from './configs/vite/transform-manifest';
import transformCSInject from './configs/vite/transform-cs-inject';
import { version } from './package.json';
import { } from 'dotenv'

const BROWSER = process.env.BROWSER;

Expand Down
Loading
Loading