gn-provider 1.0.3 → 1.0.4

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 +15 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gn-provider",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "files": [
5
5
  "dist",
6
6
  "scripts",
@@ -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}`);