Signed-off-by: ale <ale@manalejandro.com>
Este commit está contenido en:
ale
2025-08-19 04:19:53 +02:00
padre b52ad0d2ea
commit 44ca9ffc30

Ver fichero

@@ -159,14 +159,16 @@ class PackageManager {
let downloadResult;
switch (source) {
case 'git':
case 'git': {
downloadResult = await this.downloadFromGit(parsed);
break;
case 'file':
}
case 'file': {
downloadResult = await this.installFromFile(parsed);
break;
}
case 'registry':
default:
default: {
// Resolve version first
const resolvedVersion = await this.registry.resolveVersion(name, version || 'latest');
@@ -182,6 +184,7 @@ class PackageManager {
version = resolvedVersion;
break;
}
}
packageData = downloadResult.data;
@@ -698,17 +701,17 @@ class PackageManager {
// Extract package name from URL
if (url.includes('github.com/')) {
const match = url.match(/github\.com\/([^\/]+)\/([^\/]+?)(\.git)?$/);
const match = url.match(/github\.com\/([^/]+)\/([^/]+?)(\.git)?$/);
if (match) {
name = match[2].replace('.git', '');
}
} else if (url.includes('gitlab.com/')) {
const match = url.match(/gitlab\.com\/([^\/]+)\/([^\/]+?)(\.git)?$/);
const match = url.match(/gitlab\.com\/([^/]+)\/([^/]+?)(\.git)?$/);
if (match) {
name = match[2].replace('.git', '');
}
} else if (url.includes('bitbucket.org/')) {
const match = url.match(/bitbucket\.org\/([^\/]+)\/([^\/]+?)(\.git)?$/);
const match = url.match(/bitbucket\.org\/([^/]+)\/([^/]+?)(\.git)?$/);
if (match) {
name = match[2].replace('.git', '');
}
@@ -1031,7 +1034,7 @@ class PackageManager {
const { spawn } = require('child_process');
await new Promise((resolve, reject) => {
await new Promise((resolve, _reject) => {
const npmScript = spawn('npm', ['run', 'postinstall'], {
cwd: packageDir,
stdio: 'inherit',
@@ -1061,7 +1064,7 @@ class PackageManager {
const { spawn } = require('child_process');
await new Promise((resolve, reject) => {
await new Promise((resolve, _reject) => {
const npmScript = spawn('npm', ['run', 'install'], {
cwd: packageDir,
stdio: 'inherit',