@leftium/gg 0.0.48 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gg.js +2 -12
- package/package.json +1 -2
package/dist/gg.js
CHANGED
|
@@ -41,18 +41,11 @@ if (isCloudflareWorker()) {
|
|
|
41
41
|
}
|
|
42
42
|
// Lazy-load Node.js modules to avoid top-level await (Safari compatibility).
|
|
43
43
|
// The imports start immediately but don't block module evaluation.
|
|
44
|
-
let dotenvModule = null;
|
|
45
44
|
let httpModule = null;
|
|
46
45
|
function loadServerModules() {
|
|
47
46
|
if (isCloudflareWorker() || BROWSER)
|
|
48
47
|
return Promise.resolve();
|
|
49
48
|
return (async () => {
|
|
50
|
-
try {
|
|
51
|
-
dotenvModule = await import('dotenv');
|
|
52
|
-
}
|
|
53
|
-
catch {
|
|
54
|
-
// dotenv not available — optional dependency
|
|
55
|
-
}
|
|
56
49
|
try {
|
|
57
50
|
httpModule = await import('http');
|
|
58
51
|
}
|
|
@@ -963,7 +956,7 @@ export async function runGgDiagnostics() {
|
|
|
963
956
|
if (!ggConfig.showHints || isCloudflareWorker() || diagnosticsRan)
|
|
964
957
|
return;
|
|
965
958
|
diagnosticsRan = true;
|
|
966
|
-
// Ensure server modules
|
|
959
|
+
// Ensure server modules and debug factory are loaded before diagnostics
|
|
967
960
|
await serverModulesReady;
|
|
968
961
|
await debugReady;
|
|
969
962
|
// Create test debugger for server-side enabled check
|
|
@@ -995,10 +988,7 @@ export async function runGgDiagnostics() {
|
|
|
995
988
|
message(`${checkbox(ggConfig.enabled)} gg enabled: ${ggConfig.enabled}${enableHint}`);
|
|
996
989
|
if (!BROWSER) {
|
|
997
990
|
// Server-side: check DEBUG env var (the only output path on the server)
|
|
998
|
-
const hint = makeHint(!ggLogTest.enabled, ' (Try `DEBUG=gg:* npm run dev`)');
|
|
999
|
-
if (dotenvModule) {
|
|
1000
|
-
dotenvModule.config();
|
|
1001
|
-
}
|
|
991
|
+
const hint = makeHint(!ggLogTest.enabled, ' (Try `DEBUG=gg:* npm run dev` or use --env-file=.env)');
|
|
1002
992
|
message(`${checkbox(ggLogTest.enabled)} DEBUG env variable: ${process?.env?.DEBUG}${hint}`);
|
|
1003
993
|
}
|
|
1004
994
|
// Optional plugin diagnostics
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leftium/gg",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.49",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/Leftium/gg.git"
|
|
@@ -73,7 +73,6 @@
|
|
|
73
73
|
"@tanstack/virtual-core": "^3.13.18",
|
|
74
74
|
"@types/estree": "^1.0.8",
|
|
75
75
|
"acorn": "^8.15.0",
|
|
76
|
-
"dotenv": "^17.2.4",
|
|
77
76
|
"eruda": "^3.4.3",
|
|
78
77
|
"esm-env": "^1.2.2",
|
|
79
78
|
"launch-editor": "^2.12.0"
|