@idleberg/vite-plugin-devcert 0.3.1 → 0.3.2

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.
package/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
  > [!IMPORTANT]
12
12
  > This plugin is based on [`@expo/devcert`](https://www.npmjs.com/package/@expo/devcert), an actively maintained fork of `devcert`. Read about [how it works](https://github.com/expo/devcert/#how-it-works) and [its implications on security](https://github.com/expo/devcert/#security-concerns).
13
13
 
14
- ## Installation
14
+ ## Installation đŸ’ŋ
15
15
 
16
16
  On NodeJS or Bun, install from npm:
17
17
 
@@ -28,7 +28,7 @@ deno add jsr:@idleberg/vite-plugin-devcert
28
28
  > [!NOTE]
29
29
  > Unless your package manager is set up to install peer dependencies automatically, you need to install `@expo/devcert` yourself.
30
30
 
31
- ## Usage
31
+ ## Usage 🚀
32
32
 
33
33
  ```javascript
34
34
  import { defineConfig } from "vite";
@@ -39,7 +39,7 @@ export default defineConfig({
39
39
  });
40
40
  ```
41
41
 
42
- ### API
42
+ ### API âš™ī¸
43
43
 
44
44
  `devcert(options?)`
45
45
 
@@ -47,17 +47,17 @@ export default defineConfig({
47
47
 
48
48
  #### `options.skipHostsFile`
49
49
 
50
- If `certutil` is not installed already (for updating NSS databases; e.g. Firefox), do not attempt to install it. [Read the documentation for more](https://github.com/expo/devcert#skiphostsfile).
50
+ If `certutil` is not installed already (for updating NSS databases; e.g. Firefox), do not attempt to install it. [Read the Expo documentation for more](https://github.com/expo/devcert#skiphostsfile).
51
51
 
52
52
  #### `options.skipCertutil`
53
53
 
54
- Do not update your systems host file with the domain name of the certificate. [Read the documentation for more](https://github.com/expo/devcert#skipcertutil).
54
+ Do not update your systems host file with the domain name of the certificate. [Read the Expo documentation for more](https://github.com/expo/devcert#skipcertutil).
55
55
 
56
- ## Related
56
+ ## Related đŸ‘Ģ
57
57
 
58
58
  - [vite-plugin-basic-ssl](https://www.npmjs.com/package/@vitejs/plugin-basic-ssl)
59
59
  - [vite-plugin-mkcert](https://www.npmjs.com/package/vite-plugin-mkcert)
60
60
 
61
- ## License
61
+ ## License ÂŠī¸
62
62
 
63
63
  This work is licensed under [The MIT License](LICENSE).
package/dist/plugin.js CHANGED
@@ -1 +1 @@
1
- import{env as e}from"node:process";import{certificateFor as t}from"@expo/devcert";import n from"boxen";import{cyan as r,underline as i}from"kleur/colors";import a from"log-symbols";function o(e={}){return{name:`@idleberg/vite-plugin-devcert`,config:async(n,{command:o})=>{if(o!==`serve`)return;let{server:c}=n;if(c?.https?.key&&c?.https?.cert)return console.warn(`${a.warning} Skipping devcert, key and cert already provided.`),n;let l=c?.host&&typeof c.host==`string`?c.host:`localhost`;console.info(s([`Generating a certificate for "${r(l)}".`,`You may be prompted to enter your password to allow the creation of a root certificate authority.`,`\n\nFor details, please refer to the documentation at ${i(`https://github.com/expo/devcert#how-it-works`)}.`].join(` `)));let{key:u,cert:d}=await t(l,e);return{...n,server:{...c,https:{...c?.https,key:u??void 0,cert:d??void 0}}}}}}function s(t){return n(t.trim(),{borderColor:e.NO_COLOR?void 0:`blue`,margin:{top:1,bottom:1},padding:1,title:`vite-plugin-devcert`})}export{o as default};
1
+ import{env as e}from"node:process";import{certificateFor as t}from"@expo/devcert";import n from"boxen";import{cyan as r,underline as i}from"kleur/colors";import a from"log-symbols";function o(e={}){let n=!1;return{name:`@idleberg/vite-plugin-devcert`,config:async(o,{command:c})=>{if(c!==`serve`)return;let{server:l}=o;if(l?.https?.key&&l?.https?.cert)return console.warn(`${a.warning} Skipping devcert, key and cert already provided.`),o;let u=l?.host&&typeof l.host==`string`?l.host:`localhost`;n||(console.info(s([`Generating a certificate for "${r(u)}".`,`You may be prompted to enter your password to allow the creation of a root certificate authority.`,`\n\nFor details, please refer to the Expo documentation at ${i(`https://github.com/expo/devcert#how-it-works`)}.`].join(` `))),n=!0);let{key:d,cert:f}=await t(u,e);return{...o,server:{...l,https:{...l?.https,key:d??void 0,cert:f??void 0}}}}}}function s(t){return n(t.trim(),{borderColor:e.NO_COLOR?void 0:`blue`,margin:{top:1,bottom:1},padding:1,title:`vite-plugin-devcert`})}export{o as default};
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@idleberg/vite-plugin-devcert",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "A Vite plugin to generate trusted SSL/TLS certificates for local development",
5
5
  "license": "MIT",
6
6
  "author": "Jan T. Sott",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "https://github.com/idleberg/vite-plugin-devcert"
9
+ "url": "git+https://github.com/idleberg/vite-plugin-devcert.git"
10
10
  },
11
11
  "keywords": [
12
12
  "vite-plugin",
@@ -17,8 +17,8 @@
17
17
  ],
18
18
  "type": "module",
19
19
  "exports": {
20
- "import": "./dist/plugin.js",
21
- "types": "./dist/plugin.d.ts"
20
+ "types": "./dist/plugin.d.ts",
21
+ "import": "./dist/plugin.js"
22
22
  },
23
23
  "types": "./dist/plugin.d.ts",
24
24
  "engines": {
@@ -36,17 +36,17 @@
36
36
  "log-symbols": "^7.0.1"
37
37
  },
38
38
  "devDependencies": {
39
- "@biomejs/biome": "^2.0.6",
39
+ "@biomejs/biome": "^2.2.4",
40
40
  "@commitlint/cli": "^19.8.1",
41
41
  "@commitlint/config-conventional": "^19.8.1",
42
- "@playwright/test": "^1.53.2",
43
- "@types/node": "^22.15.32",
44
- "concurrently": "^9.2.0",
45
- "lefthook": "^1.11.16",
42
+ "@playwright/test": "^1.55.0",
43
+ "@types/node": "^24.4.0",
44
+ "concurrently": "^9.2.1",
45
+ "lefthook": "^1.13.0",
46
46
  "np": "^10.2.0",
47
- "tsdown": "^0.12.9",
48
- "typescript": "^5.8.3",
49
- "vite": "^7.0.2",
47
+ "tsdown": "^0.15.1",
48
+ "typescript": "^5.9.2",
49
+ "vite": "^7.1.5",
50
50
  "vitest": "^3.2.4"
51
51
  },
52
52
  "peerDependencies": {
@@ -64,6 +64,6 @@
64
64
  "server:https": "vite --config e2e/vite.config-https.ts",
65
65
  "test": "concurrently -n 'server,client' -c 'blue,green' 'npm:test:*'",
66
66
  "test:e2e": "playwright test",
67
- "test:unit": "vitest run --dir src"
67
+ "test:unit": "vitest run --exclude e2e"
68
68
  }
69
69
  }