Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
chore(spa): upgrade to the latest version of react (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wesley Ford authored Nov 20, 2023
1 parent 3e75b79 commit 29f1a82
Show file tree
Hide file tree
Showing 7 changed files with 1,070 additions and 904 deletions.
27 changes: 14 additions & 13 deletions src/EducationTrail/ClientApp/aspnetcore-https.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
// This script sets up HTTPS for the application using the ASP.NET Core HTTPS certificate
const fs = require('fs');
const spawn = require('child_process').spawn;

const path = require('path');
import fs from 'fs';
import { spawn } from 'child_process';
import path from 'path';

const baseFolder =
process.env.APPDATA !== undefined && process.env.APPDATA !== ''
? `${process.env.APPDATA}/ASP.NET/https`
: `${process.env.HOME}/.aspnet/https`;

const certificateArg = process.argv.map(arg => arg.match(/--name=(?<value>.+)/i)).filter(Boolean)[0];
const certificateName = certificateArg ? certificateArg.groups.value : process.env.npm_package_name;
const certificateArg = process.argv
.map((arg) => arg.match(/--name=(?<value>.+)/i))
.filter(Boolean)[0];
const certificateName = certificateArg
? certificateArg.groups.value
: process.env.npm_package_name;

if (!certificateName) {
console.error('Invalid certificate name. Run this script in the context of an npm/yarn script or pass --name=<<app>> explicitly.')
console.error(
'Invalid certificate name. Run this script in the context of an npm/yarn script or pass --name=<<app>> explicitly.'
);
process.exit(-1);
}

Expand All @@ -30,10 +34,7 @@ if (!fs.existsSync(certFilePath) || !fs.existsSync(keyFilePath)) {
'Pem',
'--no-password',
], { stdio: 'inherit', })
.on('exit', (code) => process.exit(code));
.on('exit', (code) => process.exit(code));
}

module.exports = {
certFilePath,
keyFilePath
}
export { certFilePath, keyFilePath };
Loading

0 comments on commit 29f1a82

Please sign in to comment.