mirror of
https://github.com/sasjs/server.git
synced 2025-12-13 04:14:36 +00:00
Compare commits
7 Commits
v0.7.1
...
testing-ce
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1a02c0da5 | ||
|
|
87dbab98f6 | ||
|
|
1bf122a0a2 | ||
|
|
5d5d6ce326 | ||
|
|
620eddb713 | ||
|
|
3c92034da3 | ||
|
|
f6dc74f16b |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,3 +1,17 @@
|
|||||||
|
## [0.7.3](https://github.com/sasjs/server/compare/v0.7.2...v0.7.3) (2022-06-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* path descriptions and defaults ([5d5d6ce](https://github.com/sasjs/server/commit/5d5d6ce3265a43af2e22bcd38cda54fafaf7b3ef))
|
||||||
|
|
||||||
|
## [0.7.2](https://github.com/sasjs/server/compare/v0.7.1...v0.7.2) (2022-06-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* removing UTF-8 options from commandline. There appears to be no reliable way to enforce ([f6dc74f](https://github.com/sasjs/server/commit/f6dc74f16bddafa1de9c83c2f27671a241abdad4))
|
||||||
|
|
||||||
## [0.7.1](https://github.com/sasjs/server/compare/v0.7.0...v0.7.1) (2022-06-20)
|
## [0.7.1](https://github.com/sasjs/server/compare/v0.7.0...v0.7.1) (2022-06-20)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -99,8 +99,6 @@ ${autoExecContent}`
|
|||||||
session.path,
|
session.path,
|
||||||
'-AUTOEXEC',
|
'-AUTOEXEC',
|
||||||
autoExecPath,
|
autoExecPath,
|
||||||
'-ENCODING',
|
|
||||||
'UTF-8',
|
|
||||||
process.platform === 'win32' ? '-nosplash' : '',
|
process.platform === 'win32' ? '-nosplash' : '',
|
||||||
process.platform === 'win32' ? '-icon' : '',
|
process.platform === 'win32' ? '-icon' : '',
|
||||||
process.platform === 'win32' ? '-nologo' : ''
|
process.platform === 'win32' ? '-nologo' : ''
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ appPromise.then(async (app) => {
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
const { key, cert } = await getCertificates()
|
const { key, cert, ca } = await getCertificates()
|
||||||
|
|
||||||
const httpsServer = createServer({ key, cert }, app)
|
const httpsServer = createServer({ key, cert, ca }, app)
|
||||||
httpsServer.listen(sasJsPort, () => {
|
httpsServer.listen(sasJsPort, () => {
|
||||||
console.log(
|
console.log(
|
||||||
`⚡️[server]: Server is running at https://localhost:${sasJsPort}`
|
`⚡️[server]: Server is running at https://localhost:${sasJsPort}`
|
||||||
|
|||||||
@@ -2,18 +2,21 @@ import path from 'path'
|
|||||||
import { fileExists, getString, readFile } from '@sasjs/utils'
|
import { fileExists, getString, readFile } from '@sasjs/utils'
|
||||||
|
|
||||||
export const getCertificates = async () => {
|
export const getCertificates = async () => {
|
||||||
const { PRIVATE_KEY, FULL_CHAIN } = process.env
|
const { PRIVATE_KEY, FULL_CHAIN, CA } = process.env
|
||||||
|
|
||||||
const keyPath = PRIVATE_KEY ?? (await getFileInput('Private Key (PEM)'))
|
const keyPath = PRIVATE_KEY ?? (await getFileInput('Private Key (PEM)'))
|
||||||
const certPath = FULL_CHAIN ?? (await getFileInput('Full Chain (PEM)'))
|
const certPath = FULL_CHAIN ?? (await getFileInput('Full Chain (PEM)'))
|
||||||
|
const caPath = CA ?? (await getFileInput('Full Chain (PEM)'))
|
||||||
|
|
||||||
console.log('keyPath: ', keyPath)
|
console.log('keyPath: ', keyPath)
|
||||||
console.log('certPath: ', certPath)
|
console.log('certPath: ', certPath)
|
||||||
|
console.log('caPath: ', caPath)
|
||||||
|
|
||||||
const key = await readFile(keyPath)
|
const key = await readFile(keyPath)
|
||||||
const cert = await readFile(certPath)
|
const cert = await readFile(certPath)
|
||||||
|
const ca = await readFile(caPath)
|
||||||
|
|
||||||
return { key, cert }
|
return { key, cert, ca }
|
||||||
}
|
}
|
||||||
|
|
||||||
const getFileInput = async (filename: string): Promise<string> => {
|
const getFileInput = async (filename: string): Promise<string> => {
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ const getSASLocation = async (): Promise<string> => {
|
|||||||
: '/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe/sas'
|
: '/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe/sas'
|
||||||
|
|
||||||
const targetName = await getString(
|
const targetName = await getString(
|
||||||
'Please enter path to SAS executable (absolute path): ',
|
'Please enter full path to a SAS executable with UTF-8 encoding: ',
|
||||||
validator,
|
validator,
|
||||||
defaultLocation
|
defaultLocation
|
||||||
)
|
)
|
||||||
@@ -75,11 +75,11 @@ const getNodeLocation = async (): Promise<string> => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const defaultLocation = isWindows()
|
const defaultLocation = isWindows()
|
||||||
? 'C:\\Program Files\\nodejs\\'
|
? 'C:\\Program Files\\nodejs\\node.exe'
|
||||||
: '/usr/local/nodejs/bin'
|
: '/usr/local/nodejs/bin/node.sh'
|
||||||
|
|
||||||
const targetName = await getString(
|
const targetName = await getString(
|
||||||
'Please enter path to nodejs executable (absolute path): ',
|
'Please enter full path to a NodeJS executable: ',
|
||||||
validator,
|
validator,
|
||||||
defaultLocation
|
defaultLocation
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user