adminforth 2.4.0-next.46 → 2.4.0-next.48
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/commands/callTsProxy.js
CHANGED
|
@@ -3,18 +3,28 @@ import { spawn } from "child_process";
|
|
|
3
3
|
import path from "path";
|
|
4
4
|
import fs from "fs";
|
|
5
5
|
import chalk from "chalk";
|
|
6
|
+
import dotenv from "dotenv";
|
|
6
7
|
|
|
7
8
|
const currentFilePath = import.meta.url;
|
|
8
9
|
const currentFileFolder = path.dirname(currentFilePath).replace("file:", "");
|
|
9
10
|
|
|
10
11
|
export function callTsProxy(tsCode, silent=false) {
|
|
11
12
|
|
|
13
|
+
const currentDirectory = process.cwd();
|
|
14
|
+
const envPath = path.resolve(currentDirectory, ".env");
|
|
15
|
+
const envLocalPath = path.resolve(currentDirectory, ".env.local");
|
|
16
|
+
if (fs.existsSync(envLocalPath)) {
|
|
17
|
+
dotenv.config({ path: envLocalPath, override: true });
|
|
18
|
+
}
|
|
19
|
+
if (fs.existsSync(envPath)) {
|
|
20
|
+
dotenv.config({ path: envPath, override: true });
|
|
21
|
+
}
|
|
22
|
+
|
|
12
23
|
process.env.HEAVY_DEBUG && console.log("🌐 Calling tsproxy with code:", path.join(currentFileFolder, "proxy.ts"));
|
|
13
24
|
return new Promise((resolve, reject) => {
|
|
14
|
-
const child = spawn("tsx", [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
25
|
+
const child = spawn("tsx", [path.join(currentFileFolder, "proxy.ts")], {
|
|
26
|
+
env: process.env,
|
|
27
|
+
});
|
|
18
28
|
let stdout = "";
|
|
19
29
|
let stderr = "";
|
|
20
30
|
|
|
@@ -3,9 +3,6 @@ import AdminForth from 'adminforth';
|
|
|
3
3
|
import usersResource from "./resources/adminuser.js";
|
|
4
4
|
import { fileURLToPath } from 'url';
|
|
5
5
|
import path from 'path';
|
|
6
|
-
import dotenv from "dotenv";
|
|
7
|
-
dotenv.config({ path: '.env.local', override: true });
|
|
8
|
-
dotenv.config({ path: '.env', override: true });
|
|
9
6
|
|
|
10
7
|
const ADMIN_BASE_URL = '';
|
|
11
8
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
v-for="(column, i) in group.columns"
|
|
20
20
|
:key="column.name"
|
|
21
21
|
v-if="currentValues !== null"
|
|
22
|
-
class="bg-
|
|
22
|
+
class="bg-lightForm dark:bg-gray-800 dark:border-gray-700 block md:table-row"
|
|
23
23
|
:class="{ 'border-b': i !== group.columns.length - 1}"
|
|
24
24
|
>
|
|
25
25
|
<td class="px-6 py-4 flex items-center block md:table-cell pb-0 md:pb-4"
|