diff --git a/.gitignore b/.gitignore index bb69225ce..846ff58cd 100644 --- a/.gitignore +++ b/.gitignore @@ -63,3 +63,8 @@ stats.* /blob-report/ /playwright/.cache/ .cache-synpress + +# ENV +output_api.env +output.env +output.log \ No newline at end of file diff --git a/api/available-routes.ts b/api/available-routes.ts index 25e381c12..6acefa36f 100644 --- a/api/available-routes.ts +++ b/api/available-routes.ts @@ -1,10 +1,7 @@ import { VercelResponse } from "@vercel/node"; import { object, Infer, optional, string } from "superstruct"; import dotenv from "dotenv"; -import { - validAddress, - positiveIntStr, -} from "./_utils"; +import { validAddress, positiveIntStr } from "./_utils"; import { TypedVercelRequest } from "./_types"; const AvailableRoutesQueryParamsSchema = object({ @@ -17,20 +14,16 @@ const AvailableRoutesQueryParamsSchema = object({ }); dotenv.config({ - path: "../src/output_api.env", + path: "./output_api.env", }); type AvailableRoutesQueryParams = Infer< typeof AvailableRoutesQueryParamsSchema >; -const handler = async ( - _:any, - response: VercelResponse - -) => { +const handler = async (_: any, response: VercelResponse) => { response.status(200).json({ - test: process.env.GIT_ENV_EXPORTED + test: process.env.GIT_ENV_EXPORTED, }); return; }; diff --git a/scripts/pre-build-env.sh b/scripts/pre-build-env.sh index 3e05d7ffc..4d3561ae8 100755 --- a/scripts/pre-build-env.sh +++ b/scripts/pre-build-env.sh @@ -11,8 +11,8 @@ for file in "${files[@]}"; do echo "Downloading $file..." - curl -H "Authorization: token ${GH_TOKEN}" -L "${BASE_URL}${file}" -o "src/$file" - cat src/${file} + curl -H "Authorization: token ${GH_TOKEN}" -L "${BASE_URL}${file}" -o "./${file}" + cat ./${file} done echo "All files downloaded." diff --git a/scripts/pre-build.ts b/scripts/pre-build.ts old mode 100644 new mode 100755