@virmator/frontend 14.36.3 → 14.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
- import {log, logColors} from '@augment-vir/common';
1
+ import {log, logColors, replaceExtension} from '@augment-vir/common';
2
2
  import {alwaysReloadPlugin} from '@virmator/frontend/src/always-reload.vite.js';
3
3
  import {existsSync} from 'node:fs';
4
+ import {readFile} from 'node:fs/promises';
4
5
  import {basename, dirname, join, relative} from 'node:path';
5
6
  import {type UserConfig, type UserConfigExport} from 'vite';
6
7
 
@@ -8,6 +9,18 @@ export const basePlugins = [
8
9
  alwaysReloadPlugin(),
9
10
  ] as const;
10
11
 
12
+ const httpsOptions = process.env.VITE_HTTPS_CERT_PATH
13
+ ? {
14
+ cert: await readFile(process.env.VITE_HTTPS_CERT_PATH),
15
+ key: await readFile(
16
+ replaceExtension({
17
+ path: process.env.VITE_HTTPS_CERT_PATH,
18
+ newExtension: '.key',
19
+ }),
20
+ ),
21
+ }
22
+ : undefined;
23
+
11
24
  export function findGitRepoRoot(dir: string): string {
12
25
  if (existsSync(join(dir, '.git'))) {
13
26
  return dir;
@@ -78,6 +91,11 @@ export function createBaseConfig({forGitHubPages, packageDirPath}: BaseConfigOpt
78
91
  baseConfig: {
79
92
  server: {
80
93
  host: true,
94
+ ...(httpsOptions
95
+ ? {
96
+ https: httpsOptions,
97
+ }
98
+ : {}),
81
99
  watch: {
82
100
  ignored: [
83
101
  '**/node_modules/**',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@virmator/frontend",
3
- "version": "14.36.3",
3
+ "version": "14.37.0",
4
4
  "description": "Default frontend plugin for virmator.",
5
5
  "keywords": [
6
6
  "virmator",
@@ -35,17 +35,17 @@
35
35
  "test:update": "npm test update"
36
36
  },
37
37
  "dependencies": {
38
- "@augment-vir/assert": "^32.2.4",
39
- "@augment-vir/common": "^32.2.4",
40
- "@augment-vir/node": "^32.2.4",
41
- "@virmator/core": "^14.36.3",
38
+ "@augment-vir/assert": "^32.4.1",
39
+ "@augment-vir/common": "^32.4.1",
40
+ "@augment-vir/node": "^32.4.1",
41
+ "@virmator/core": "^14.37.0",
42
42
  "mri": "^1.2.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@augment-vir/test": "^32.2.4",
46
- "@types/node": "^26.4.1",
45
+ "@augment-vir/test": "^32.4.1",
46
+ "@types/node": "^26.6.2",
47
47
  "typescript": "^6.0.3",
48
- "vite": "^8.2.2",
48
+ "vite": "^8.3.0",
49
49
  "vite-tsconfig-paths": "^6.1.1"
50
50
  },
51
51
  "engines": {