@sdlcai/setup 0.2.0 → 0.2.1

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/bin/cli.mjs +15 -0
  2. package/package.json +1 -1
package/bin/cli.mjs CHANGED
@@ -33,6 +33,21 @@ const ok = (cmd, args) => spawnSync(cmd, args, { encoding: 'utf8', shell: WIN })
33
33
 
34
34
  function ensureGh() {
35
35
  if (out('gh', ['--version'])) return;
36
+ info('→ GitHub CLI (gh) not found — attempting auto-install…');
37
+ let attempted = false;
38
+ if (WIN) {
39
+ attempted = true;
40
+ run('winget', ['install', '--id', 'GitHub.cli', '-e',
41
+ '--accept-package-agreements', '--accept-source-agreements']);
42
+ } else if (process.platform === 'darwin') {
43
+ attempted = true;
44
+ run('brew', ['install', 'gh']);
45
+ }
46
+ if (out('gh', ['--version'])) { info('✓ gh installed.'); return; }
47
+ if (attempted) {
48
+ die('gh was installed but is not yet in PATH.\n' +
49
+ ' Close this terminal, reopen it, and re-run the command.');
50
+ }
36
51
  die('GitHub CLI (gh) is required for the secure browser login.\n' +
37
52
  ' Install it — https://cli.github.com — then re-run:\n' +
38
53
  ' Windows: winget install GitHub.cli\n' +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdlcai/setup",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "One-command bootstrap for private Avanade dev-tool assets (AVA agents, mnemo, …): GitHub browser login + Avanade-Region-ICEG access gate + install.",
5
5
  "type": "module",
6
6
  "bin": {