vite-plugin-mkcert
Advanced tools
Comparing version 1.6.0 to 1.6.1
{ | ||
"name": "vite-plugin-mkcert", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "Provide certificates for vite's https dev service", | ||
@@ -21,6 +21,20 @@ "repository": { | ||
"homepage": "https://github.com/liuweiGL/vite-plugin-mkcert#readme", | ||
"main": "dist/index", | ||
"engines": { | ||
"node": ">=v16.0.0" | ||
}, | ||
"packageManager": "pnpm@7.0.0+", | ||
"types": "./dist/index.d.ts", | ||
"module": "./dist/mkcert.es.js", | ||
"main": "./dist/mkcert.cjs.js", | ||
"exports": { | ||
".": { | ||
"import": "./dist/mkcert.es.js", | ||
"require": "./dist/mkcert.cjs.js" | ||
} | ||
}, | ||
"scripts": { | ||
"dev": "tsc -w", | ||
"build": "rimraf dist && tsc" | ||
"dev": "vite", | ||
"build": "vite build && tsc -p tsconfig.build.json", | ||
"lint": "tsc -p tsconfig.build.json && eslint \"plugin/**/*.ts\" --color --quiet", | ||
"release": "semantic-release" | ||
}, | ||
@@ -30,9 +44,21 @@ "dependencies": { | ||
"axios": "^0.21.4", | ||
"debug": "^4.3.3", | ||
"picocolors": "^1.0.0" | ||
"debug": "^4.3.4", | ||
"picocolors": "^1.0.0", | ||
"vite": "^2.9.9" | ||
}, | ||
"devDependencies": { | ||
"@semantic-release/changelog": "^6.0.1", | ||
"@semantic-release/git": "^10.0.1", | ||
"@types/debug": "^4.1.7", | ||
"rimraf": "^3.0.2" | ||
"@types/node": "^17.0.35", | ||
"@typescript-eslint/eslint-plugin": "^5.25.0", | ||
"@typescript-eslint/parser": "^5.25.0", | ||
"eslint": "^8.15.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"prettier": "^2.6.2", | ||
"semantic-release": "^19.0.2", | ||
"typescript": "latest" | ||
} | ||
} |
@@ -1,3 +0,87 @@ | ||
## vite-plugin-mkcert | ||
# [ä¸ćć楣](README-zh_CN.md) | ||
See: https://github.com/liuweiGL/vite-plugin-mkcert#readme | ||
# vite-plugin-mkcert | ||
Use mkcert to provide certificate support for vite https development services. | ||
## When should I use this plugin | ||
1. When you want to use `http/2` to solve the concurrency limit of vite http dev server requests, you find that the browser cache is invalid [#2725](https://github.com/vitejs/vite/issues/2725). | ||
2. I have obsessive-compulsive disorder, and I hope that the browser will not show annoying https certificate errors. | ||
## Effect | ||
<details> | ||
<summary>View</summary> | ||
![localhost](docs/assets/screenshot/localhost.png) | ||
![127.0.0.1](docs/assets/screenshot/127.0.0.1.png) | ||
![localhost](docs/assets/screenshot/localip.png) | ||
</details> | ||
## Quick start | ||
1. Installation dependencies | ||
```sh | ||
yarn add vite-plugin-mkcert -D | ||
``` | ||
2. Configure vite | ||
```ts | ||
import {defineConfig} from'vite' | ||
import mkcert from'vite-plugin-mkcert' | ||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
server: { | ||
https: true | ||
}, | ||
plugins: [mkcert()] | ||
}) | ||
``` | ||
## Parameters | ||
### force | ||
Whether to force generate. | ||
### autoUpgrade | ||
Whether to automatically upgrade `mkcert`. | ||
### source | ||
Specify the download source of `mkcert`, domestic users can set it to `coding` to download from the coding.net mirror, or provide a custom [BaseSource](plugin/mkcert/Source.ts). | ||
### mkcertPath | ||
If the network is restricted, you can specify a local `mkcert` file instead of downloading from the network. | ||
### hosts | ||
Custom hosts, default value is `localhost` + `local ip addrs`. | ||
## Display the debugging information of the plug-in | ||
Set the environment variable `DEBUG`=`vite:plugin:mkcert` | ||
## CHANGELOG | ||
[CHANGELOG](CHANGELOG.md) | ||
## Principle | ||
Use [mkcert](https://github.com/FiloSottile/mkcert) to install the local `CA` certificate and generate it for [server.https](https://vitejs.bootcss.com/config/#server-https) Server certificate. | ||
## Friendly reminder | ||
1. `mkcert` save directory: [PLUGIN_DATA_DIR](plugin/lib/constant.ts) | ||
2. Uninstall the `CA` certificate: `mkcert uninstall` | ||
## Thanks | ||
- [mkcert](https://github.com/FiloSottile/mkcert) | ||
- [daquinoaldo/https-localhost](https://github.com/daquinoaldo/https-localhost) |
{ | ||
"compilerOptions": { | ||
"target": "ES6", | ||
"module": "commonjs", | ||
"declaration": true, | ||
"sourceMap": true, | ||
"outDir": "./dist", | ||
"baseUrl": ".", | ||
"target": "ESNext", | ||
"module": "CommonJS", | ||
"moduleResolution": "node", | ||
"noEmit": true, | ||
"strict": true, | ||
"noImplicitAny": true, | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"strict": true, | ||
"moduleResolution": "node", | ||
"esModuleInterop": true, | ||
"skipLibCheck": true, | ||
"forceConsistentCasingInFileNames": true | ||
"lib": [ | ||
"esnext", | ||
"dom" | ||
] | ||
}, | ||
"include": ["src/**/*.ts"] | ||
} | ||
"include": [ | ||
"plugin", | ||
"playground" | ||
], | ||
"references": [ | ||
{ | ||
"path": "./tsconfig.node.json" | ||
} | ||
] | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
276532
87
0
5
13
41
843
+ Addedvite@^2.9.9
+ Added@esbuild/linux-loong64@0.14.54(transitive)
+ Addedesbuild@0.14.54(transitive)
+ Addedesbuild-android-64@0.14.54(transitive)
+ Addedesbuild-android-arm64@0.14.54(transitive)
+ Addedesbuild-darwin-64@0.14.54(transitive)
+ Addedesbuild-darwin-arm64@0.14.54(transitive)
+ Addedesbuild-freebsd-64@0.14.54(transitive)
+ Addedesbuild-freebsd-arm64@0.14.54(transitive)
+ Addedesbuild-linux-32@0.14.54(transitive)
+ Addedesbuild-linux-64@0.14.54(transitive)
+ Addedesbuild-linux-arm@0.14.54(transitive)
+ Addedesbuild-linux-arm64@0.14.54(transitive)
+ Addedesbuild-linux-mips64le@0.14.54(transitive)
+ Addedesbuild-linux-ppc64le@0.14.54(transitive)
+ Addedesbuild-linux-riscv64@0.14.54(transitive)
+ Addedesbuild-linux-s390x@0.14.54(transitive)
+ Addedesbuild-netbsd-64@0.14.54(transitive)
+ Addedesbuild-openbsd-64@0.14.54(transitive)
+ Addedesbuild-sunos-64@0.14.54(transitive)
+ Addedesbuild-windows-32@0.14.54(transitive)
+ Addedesbuild-windows-64@0.14.54(transitive)
+ Addedesbuild-windows-arm64@0.14.54(transitive)
+ Addedfsevents@2.3.3(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedis-core-module@2.15.1(transitive)
+ Addednanoid@3.3.7(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedpostcss@8.4.49(transitive)
+ Addedresolve@1.22.8(transitive)
+ Addedrollup@2.77.3(transitive)
+ Addedsource-map-js@1.2.1(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedvite@2.9.18(transitive)
Updateddebug@^4.3.4