@newlogic-digital/core 0.9.10 → 0.9.11

Sign up to get free protection for your applications and to get access to all the features.
package/modules/Core.js CHANGED
@@ -36,6 +36,7 @@ let Config = {
36
36
  index: "/",
37
37
  mode: "",
38
38
  https: false,
39
+ cert: 'localhost',
39
40
  reload: (file) => (file.endsWith('.php') || file.endsWith('.tpl') || file.endsWith('.latte')) && !file.includes('temp/'),
40
41
  vite: {}
41
42
  },
package/modules/Serve.js CHANGED
@@ -74,12 +74,12 @@ export const Serve = new class {
74
74
  root: process.cwd(),
75
75
  };
76
76
 
77
- if (fs.existsSync(path.join(os.homedir(),'.ssh/localhost.pem')) && Config.serve.https) {
77
+ if (fs.existsSync(path.join(os.homedir(),`.ssh/${Config.serve.cert}.pem`)) && Config.serve.https) {
78
78
  lodash.merge(config, {
79
79
  server: {
80
80
  https: {
81
- key: fs.readFileSync(path.join(os.homedir(),'.ssh/localhost-key.pem')),
82
- cert: fs.readFileSync(path.join(os.homedir(),'.ssh/localhost.pem')),
81
+ key: fs.readFileSync(path.join(os.homedir(),`.ssh/${Config.serve.cert}-key.pem`)),
82
+ cert: fs.readFileSync(path.join(os.homedir(),`.ssh/${Config.serve.cert}.pem`)),
83
83
  },
84
84
  hmr: {
85
85
  host: 'localhost'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@newlogic-digital/core",
3
3
  "type": "module",
4
- "version": "0.9.10",
4
+ "version": "0.9.11",
5
5
  "main": "index.js",
6
6
  "author": "New Logic Studio s.r.o.",
7
7
  "description": "Set of tools that can be used to create modern web applications",