vite-plugin-vue-security 1.3.0 → 1.4.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ereddate
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/index.js CHANGED
@@ -163,7 +163,7 @@ function vueSecurityPlugin(options = {}) {
163
163
  if (config.enableDependencyScanning) {
164
164
  try {
165
165
  console.log('Scanning dependencies for vulnerabilities...');
166
- const dependencyScanner = require('../src/analysis/dependency-scanner');
166
+ const dependencyScanner = require('vue-security-scanner/src/analysis/dependency-scanner');
167
167
  const depScanner = new dependencyScanner({
168
168
  enableNpmAudit: true,
169
169
  enableVulnerabilityDB: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-vue-security",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "A Vite plugin that performs security scans on Vue.js projects during the build process with advanced semantic analysis and enterprise-grade reporting",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -20,7 +20,7 @@
20
20
  "dependency-scanning",
21
21
  "compliance"
22
22
  ],
23
- "author": "Vue Security Team",
23
+ "author": "ereddate",
24
24
  "license": "MIT",
25
25
  "peerDependencies": {
26
26
  "vite": "^4.0.0 || ^5.0.0",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "cheerio": "^1.0.0-rc.12",
31
- "vue-security-scanner": "^1.3.1"
31
+ "vue-security-scanner": "^1.4.0"
32
32
  },
33
33
  "repository": {
34
34
  "type": "git",
Binary file
@@ -1,28 +0,0 @@
1
- // 示例:如何在Vite项目中使用Vue安全插件
2
- // vite.config.js
3
-
4
- import { defineConfig } from 'vite';
5
- import vue from '@vitejs/plugin-vue';
6
- import vueSecurityPlugin from 'vite-plugin-vue-security';
7
-
8
- export default defineConfig({
9
- plugins: [
10
- // 启用Vue安全扫描插件
11
- vueSecurityPlugin({
12
- enabled: true, // 启用安全扫描
13
- failOnError: false, // 发现安全问题时不中断构建
14
- reportLevel: 'warning', // 报告级别:'error', 'warning', 或 'info'
15
- outputFile: './security-report.json', // 安全报告输出文件
16
- exclude: [ // 排除扫描的文件模式
17
- 'node_modules',
18
- 'dist',
19
- 'public'
20
- ]
21
- }),
22
-
23
- // Vue插件
24
- vue()
25
- ],
26
-
27
- // 其他Vite配置...
28
- });