gn-provider 1.0.3 → 1.0.5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scripts/install.js +16 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gn-provider",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "files": [
5
5
  "dist",
6
6
  "scripts",
@@ -5,7 +5,7 @@ async function install() {
5
5
  try {
6
6
  // 1. Encontrar la ubicación de scrypt-ts
7
7
  const scryptPath = path.dirname(require.resolve('scrypt-ts'));
8
- const targetDir = path.join(scryptPath, 'dist', 'providers');
8
+ const targetDir = path.join(scryptPath, 'providers');
9
9
 
10
10
  // 2. Verificar que existe
11
11
  if (!fs.existsSync(targetDir)) {
@@ -18,11 +18,24 @@ async function install() {
18
18
  path.join(__dirname, '../dist/gn-provider.d.ts')
19
19
  ];
20
20
 
21
- await Promise.all(sourceFiles.map(file => {
21
+ /*await Promise.all(sourceFiles.map(file => {
22
22
  const filename = path.basename(file);
23
23
  const target = path.join(targetDir, filename);
24
24
  return fs.copy(file, target);
25
- }));
25
+ }));*/
26
+
27
+ sourceFiles.forEach(file => {
28
+ const filename = path.basename(file);
29
+ const target = path.join(targetDir, filename);
30
+
31
+ if (fs.existsSync(file)) {
32
+ fs.copyFileSync(file, target);
33
+ console.log(`✅ Copiado: ${filename} → ${target}`);
34
+ } else {
35
+ console.error(`❌ Archivo no encontrado: ${file}`);
36
+ throw new Error(`Archivo de origen no encontrado: ${file}`);
37
+ }
38
+ });
26
39
 
27
40
  console.log('✅ GN Provider instalado exitosamente en scrypt-ts');
28
41
  console.log(`📍 Ubicación: ${targetDir}`);