@vixoniccom/module-packager 2.13.1-dev.8 → 2.13.2-dev.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/dist/main.js +2 -6
- package/package.json +2 -3
package/dist/main.js
CHANGED
|
@@ -194,14 +194,10 @@ async function pack(callback) {
|
|
|
194
194
|
function installExternals(callback) {
|
|
195
195
|
let externals = options.externals.map((x) => {
|
|
196
196
|
// Validar nombre del paquete
|
|
197
|
-
if (!/^
|
|
197
|
+
if (!/^[@a-z0-9-_./]+$/i.test(x)) {
|
|
198
198
|
throw new Error(`Invalid package name: ${x}`);
|
|
199
199
|
}
|
|
200
|
-
const
|
|
201
|
-
const packageJsonPath = path.resolve(nodeModulesBase, x, 'package.json');
|
|
202
|
-
if (!packageJsonPath.startsWith(nodeModulesBase + path.sep)) {
|
|
203
|
-
throw new Error(`Invalid package path: path traversal detected for package ${x}`);
|
|
204
|
-
}
|
|
200
|
+
const packageJsonPath = sanitizePath(path.resolve(options.src, '..', 'node_modules', x, 'package.json'));
|
|
205
201
|
return `${x}@${JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')).version}`;
|
|
206
202
|
});
|
|
207
203
|
if (externals.length) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vixoniccom/module-packager",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.2-dev.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"bin": {
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
"build:main": "tsc -p tsconfig.json --outDir dist",
|
|
18
18
|
"build:renderer": "webpack --config webpack.config.js --env src=./ --env build=./dist/build --mode production",
|
|
19
19
|
"copy:launcher": "cpy launcher.html dist",
|
|
20
|
-
"build
|
|
21
|
-
"build": "npm run clean && npm-run-all -p build:renderer build:main build:preload && npm run copy:launcher",
|
|
20
|
+
"build": "npm run clean && npm-run-all -p build:renderer build:main && npm run copy:launcher",
|
|
22
21
|
"prerelease-dev": "standard-version --prerelease dev",
|
|
23
22
|
"prerelease-rc": "standard-version --prerelease rc",
|
|
24
23
|
"prerelease-test": "standard-version --prerelease test",
|