File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env node
2+
23import { existsSync } from 'fs' ;
4+
35import { mkdir , writeFile } from 'fs/promises' ;
46import minimist from 'minimist' ;
57import pc from 'picocolors' ;
6- import { DATA_DIR , resolvePath , readFile , pkgVersion } from './src/utils.js' ;
8+
79import { createCertificate } from './src/index.js' ;
10+ import { DATA_DIR , pkgVersion , resolvePath } from './src/utils.js' ;
811
912/**
1013 * Init, read variables and create folders
@@ -93,12 +96,15 @@ if (!writeFiles) {
9396}
9497
9598try {
96- const { cert, key } = await createCertificate ( {
97- force,
98- autoUpgrade,
99- keyFilePath,
100- certFilePath,
101- } ) ;
99+ const { cert, key } = await createCertificate (
100+ {
101+ force,
102+ autoUpgrade,
103+ keyFilePath,
104+ certFilePath,
105+ } ,
106+ hosts
107+ ) ;
102108 await writeFile ( keyFilePath , key , { encoding : 'utf-8' } ) ;
103109 await writeFile ( certFilePath , cert , { encoding : 'utf-8' } ) ;
104110} catch ( /** @type {any }*/ writeErr ) {
You can’t perform that action at this time.
0 commit comments