@bobfrankston/npmglobalize 1.0.144 → 1.0.145

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/lib.js +35 -5
  2. package/package.json +9 -9
package/lib.js CHANGED
@@ -3561,8 +3561,22 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
3561
3561
  console.log(colors.green(`✓ Installed globally: ${pkgName}@${pkgVersion}`));
3562
3562
  }
3563
3563
  else {
3564
- console.error(colors.red(`✗ Global install failed`));
3565
- console.error(colors.yellow(` Try running manually: npm install -g ${pkgName}@${pkgVersion}`));
3564
+ // Registry install failed — fall back to local install
3565
+ const auth = checkNpmAuth();
3566
+ if (!auth.authenticated) {
3567
+ console.log(colors.yellow(` Registry install failed (${auth.error || 'auth issue'}) — falling back to local install...`));
3568
+ }
3569
+ else {
3570
+ console.log(colors.yellow(` Registry install failed — falling back to local install...`));
3571
+ }
3572
+ const localFallback = runCommand('npm', ['install', '-g', '.'], { cwd, silent: false, showCommand: true });
3573
+ if (localFallback.success) {
3574
+ console.log(colors.green(`✓ Installed globally from local: ${pkgName}@${pkgVersion}`));
3575
+ }
3576
+ else {
3577
+ console.error(colors.red(`✗ Global install failed`));
3578
+ console.error(colors.yellow(` Try running manually: npm install -g ${pkgName}@${pkgVersion}`));
3579
+ }
3566
3580
  }
3567
3581
  }
3568
3582
  else {
@@ -4266,9 +4280,25 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
4266
4280
  console.log(colors.green(`✓ Installed globally: ${pkgName}@${pkgVersion}`));
4267
4281
  }
4268
4282
  else {
4269
- console.error(colors.red(`✗ Global install failed`));
4270
- console.error(colors.yellow(` Try running manually: npm install -g ${pkgName}@${pkgVersion}`));
4271
- recordBuildIssue(pkgName, 'warning', 'Global install failed');
4283
+ // Registry install failed — may be auth/token issue for private packages.
4284
+ // Fall back to local install which doesn't need registry auth.
4285
+ const auth = checkNpmAuth();
4286
+ if (!auth.authenticated) {
4287
+ console.log(colors.yellow(` Registry install failed (${auth.error || 'auth issue'}) — falling back to local install...`));
4288
+ }
4289
+ else {
4290
+ console.log(colors.yellow(` Registry install failed — falling back to local install...`));
4291
+ }
4292
+ const localFallback = runCommand('npm', ['install', '-g', '.'], { cwd, silent: false, showCommand: true });
4293
+ if (localFallback.success) {
4294
+ globalInstallOk = true;
4295
+ console.log(colors.green(`✓ Installed globally from local: ${pkgName}@${pkgVersion}`));
4296
+ }
4297
+ else {
4298
+ console.error(colors.red(`✗ Global install failed`));
4299
+ console.error(colors.yellow(` Try running manually: npm install -g ${pkgName}@${pkgVersion}`));
4300
+ recordBuildIssue(pkgName, 'warning', 'Global install failed');
4301
+ }
4272
4302
  }
4273
4303
  }
4274
4304
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/npmglobalize",
3
- "version": "1.0.144",
3
+ "version": "1.0.145",
4
4
  "description": "Transform file: dependencies to npm versions for publishing",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -31,10 +31,10 @@
31
31
  "url": "https://github.com/BobFrankston/npmglobalize.git"
32
32
  },
33
33
  "dependencies": {
34
- "@bobfrankston/freezepak": "^0.1.6",
35
- "@bobfrankston/importgen": "^0.1.32",
36
- "@bobfrankston/themecolors": "^0.1.4",
37
- "@bobfrankston/userconfig": "^1.0.6",
34
+ "@bobfrankston/freezepak": "^0.1.7",
35
+ "@bobfrankston/importgen": "^0.1.33",
36
+ "@bobfrankston/themecolors": "^0.1.5",
37
+ "@bobfrankston/userconfig": "^1.0.7",
38
38
  "@npmcli/package-json": "^7.0.4",
39
39
  "json5": "^2.2.3",
40
40
  "libnpmversion": "^8.0.3",
@@ -59,10 +59,10 @@
59
59
  },
60
60
  ".transformedSnapshot": {
61
61
  "dependencies": {
62
- "@bobfrankston/freezepak": "^0.1.6",
63
- "@bobfrankston/importgen": "^0.1.32",
64
- "@bobfrankston/themecolors": "^0.1.4",
65
- "@bobfrankston/userconfig": "^1.0.6",
62
+ "@bobfrankston/freezepak": "^0.1.7",
63
+ "@bobfrankston/importgen": "^0.1.33",
64
+ "@bobfrankston/themecolors": "^0.1.5",
65
+ "@bobfrankston/userconfig": "^1.0.7",
66
66
  "@npmcli/package-json": "^7.0.4",
67
67
  "json5": "^2.2.3",
68
68
  "libnpmversion": "^8.0.3",