@microprogram/plugin-router
Advanced tools
+6
-4
@@ -10,3 +10,5 @@ 'use strict' | ||
| function plugin(options) { | ||
| const cwd = process.cwd() | ||
| function plugin(jsonPath) { | ||
| return through.obj(function (chunk, _, cb) { | ||
@@ -45,7 +47,7 @@ if (chunk.isNull()) { | ||
| if (allPath.length > 0) { | ||
| const appPath = path.resolve(chunk.base, options.appPath) | ||
| const appJsonPath = path.resolve(cwd, jsonPath) | ||
| var json = readJsonFile(appPath) || {} | ||
| var json = readJsonFile(appJsonPath) || {} | ||
| json.pages = allPath | ||
| fs.writeFileSync(appPath, JSON.stringify(json, null, 2)) | ||
| fs.writeFileSync(appJsonPath, JSON.stringify(json, null, 2)) | ||
| } | ||
@@ -52,0 +54,0 @@ |
+2
-2
| { | ||
| "name": "@microprogram/plugin-router", | ||
| "version": "1.0.0-beta.4", | ||
| "version": "1.0.0-beta.5", | ||
| "author": "JserWang", | ||
@@ -31,3 +31,3 @@ "files": [ | ||
| }, | ||
| "gitHead": "f8dac6212343e95333d383036a07e4c312a714fe" | ||
| "gitHead": "19e87a829d3a826ff5ab0f5f331856f654649342" | ||
| } |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
3433
0.76%49
2.08%