Merge branch 'main' of https://github.com/community-scripts/ProxmoxVED
This commit is contained in:
commit
7d9c2ba661
3
.github/workflows/frontend-cicd.yml
vendored
3
.github/workflows/frontend-cicd.yml
vendored
@ -45,6 +45,9 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci --prefer-offline --legacy-peer-deps
|
run: npm ci --prefer-offline --legacy-peer-deps
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: npm run test
|
||||||
|
|
||||||
- name: Configure Next.js for pages
|
- name: Configure Next.js for pages
|
||||||
uses: actions/configure-pages@v5
|
uses: actions/configure-pages@v5
|
||||||
with:
|
with:
|
||||||
|
1
frontend/public/json
Symbolic link
1
frontend/public/json
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../json
|
@ -4,17 +4,7 @@ import path from "path";
|
|||||||
import { ScriptSchema, type Script } from "@/app/json-editor/_schemas/schemas";
|
import { ScriptSchema, type Script } from "@/app/json-editor/_schemas/schemas";
|
||||||
import { Metadata } from "@/lib/types";
|
import { Metadata } from "@/lib/types";
|
||||||
|
|
||||||
const publicJsonPath = path.join(process.cwd(), 'public/json');
|
const jsonDir = "public/json";
|
||||||
const getJsonDirectory = async () => {
|
|
||||||
if (!(await fs.stat(publicJsonPath).catch(() => null))) {
|
|
||||||
throw new Error(`JSON path file not found: ${publicJsonPath}`);
|
|
||||||
}
|
|
||||||
const jsonPath = (await fs.readFile(publicJsonPath, "utf-8")).trim();
|
|
||||||
return path.resolve(process.cwd(), jsonPath);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
const jsonDir = await getJsonDirectory();
|
|
||||||
const metadataFileName = "metadata.json";
|
const metadataFileName = "metadata.json";
|
||||||
const encoding = "utf-8";
|
const encoding = "utf-8";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user