From 8c454a9629c717c8b7c211b0ea6b0b3cbff0d728 Mon Sep 17 00:00:00 2001 From: Marc Schmidt Date: Sun, 15 Dec 2024 15:49:44 +0100 Subject: [PATCH] build: fix aspnetcore-https script --- src/client/package.json | 1 + src/client/pnpm-lock.yaml | 3 +++ src/client/tools/aspnetcore-https.js | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/client/package.json b/src/client/package.json index a359f82..faeff72 100644 --- a/src/client/package.json +++ b/src/client/package.json @@ -78,6 +78,7 @@ "eslint-plugin-import": "^2.29.1", "eslint-plugin-ng-module-sort": "^1.3.1", "eslint-plugin-unused-imports": "^3.0.0", + "fs-extra": "^11.2.0", "http-server": "^14.1.1", "jest": "^29.7.0", "jest-junit": "^16.0.0", diff --git a/src/client/pnpm-lock.yaml b/src/client/pnpm-lock.yaml index a4ac63c..8c36738 100644 --- a/src/client/pnpm-lock.yaml +++ b/src/client/pnpm-lock.yaml @@ -174,6 +174,9 @@ importers: eslint-plugin-unused-imports: specifier: ^3.0.0 version: 3.2.0(@typescript-eslint/eslint-plugin@7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0) + fs-extra: + specifier: ^11.2.0 + version: 11.2.0 http-server: specifier: ^14.1.1 version: 14.1.1 diff --git a/src/client/tools/aspnetcore-https.js b/src/client/tools/aspnetcore-https.js index d453375..f1780a2 100644 --- a/src/client/tools/aspnetcore-https.js +++ b/src/client/tools/aspnetcore-https.js @@ -1,6 +1,7 @@ // This script sets up HTTPS for the application using the ASP.NET Core HTTPS certificate const spawn = require('child_process').spawn; const path = require('path'); +const fs = require('fs-extra'); const baseFolder = process.env.APPDATA !== undefined && process.env.APPDATA !== '' @@ -19,6 +20,7 @@ if (!certificateName) { process.exit(-1); } +fs.ensureDirSync(baseFolder); const certFilePath = path.join(baseFolder, `${certificateName}.pem`); spawn(