@ghship/cli 1.0.5 → 1.0.6

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.
package/README.md CHANGED
@@ -11,7 +11,9 @@ persistent CLI, then enters project initialization. `--user-only` stops after us
11
11
  installation. Project workflows need Git and a gh with native Issue relationships.
12
12
  `ghship doctor` provides official tool installation links when missing.
13
13
 
14
- Update/uninstall via external `npx @ghship/cli@latest update|uninstall`. Project lifecycle:
14
+ Run `ghship update` to update an npm installation through the latest published npm
15
+ package. Alternatively use `npx @ghship/cli@latest update`; uninstall with the
16
+ external entry `npx @ghship/cli@latest uninstall`. Project lifecycle:
15
17
  `ghship project install|status|update|uninstall`; custom `.ghship/skill.md` is preserved.
16
18
  Install and update also update a verified standalone installation in place, keeping its
17
19
  channel and paths. To uninstall a standalone installation, use a separate downloaded
package/checksums.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
- "darwin-arm64": "85145a21ef83e15f6998b9fb2c139889231ff532f42468274c1e1e64401cc32e",
3
- "darwin-x64": "dd69399fc83f71421bca28b59729fd78504b854bf6f9aac280a84f22bd1d64a4",
4
- "linux-arm64": "b7ccd53a42d5a3594094ee95624017607fcf77792d65617ea748633df74a4385",
5
- "linux-x64": "8bec5006f24baa2de473f1331b3da435df5a8cf69632780a051a37e54bfb1cc1",
6
- "win32-arm64": "defee9a6703bc638e7ae4c65cd369411638716b930cbd9d08cd5faddbd6ecbbe",
7
- "win32-x64": "96a6f2a3ab7e51b7fb596ab826c7038f95c4d67345a4703784816c7192695705"
2
+ "darwin-arm64": "a9ffebbe427dc1867a51023d6c142caa127ccbb77989478522f5b85fc29a7b44",
3
+ "darwin-x64": "7c3d6922354af64ac113fc38dcfc6a84ac6e725be6fc8fd73df130b853d101cf",
4
+ "linux-arm64": "5959c12a5d261804b814fb766da7a2fbb7a77b438d50e56096ea07b0670403d6",
5
+ "linux-x64": "710e69580294ccf085aa3fa4a7fb788a5f3d2405ebd063bca1bdc24706b7d41c",
6
+ "win32-arm64": "cba4e39365ad2f9097010930d77ac70c118e04bb3b003ba07162bc077e158ed8",
7
+ "win32-x64": "9b3315f65a95e61eb095f70b4ae89fbff84bb48e058ff6ed6e20b4db07c17800"
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghship/cli",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Go CLI and AI skill for native GitHub delivery pipelines",
5
5
  "bin": {
6
6
  "ghship": "run.cjs"
@@ -11,12 +11,12 @@
11
11
  "checksums.json"
12
12
  ],
13
13
  "optionalDependencies": {
14
- "@ghship/cli-darwin-x64": "1.0.5",
15
- "@ghship/cli-darwin-arm64": "1.0.5",
16
- "@ghship/cli-linux-x64": "1.0.5",
17
- "@ghship/cli-linux-arm64": "1.0.5",
18
- "@ghship/cli-win32-x64": "1.0.5",
19
- "@ghship/cli-win32-arm64": "1.0.5"
14
+ "@ghship/cli-darwin-x64": "1.0.6",
15
+ "@ghship/cli-darwin-arm64": "1.0.6",
16
+ "@ghship/cli-linux-x64": "1.0.6",
17
+ "@ghship/cli-linux-arm64": "1.0.6",
18
+ "@ghship/cli-win32-x64": "1.0.6",
19
+ "@ghship/cli-win32-arm64": "1.0.6"
20
20
  },
21
21
  "engines": {
22
22
  "node": ">=18"
package/run.cjs CHANGED
@@ -151,7 +151,14 @@ if(require.main===module) {
151
151
  const executable=binaryPath();if(!fs.existsSync(executable))throw new Error('Package missing Go binary; reinstall the package');
152
152
  const args=process.argv.slice(2);const action=args[0];
153
153
  if(['install','update','uninstall'].includes(action)&&!args.includes('--standalone')&&!args.includes('--skill-only')&&!args.includes('--help')){
154
- if(action!=='install'&&process.env.npm_command!=='exec') {console.error(`Run npx @ghship/cli@latest ${action} from an external npm entry`);process.exitCode=4;}
154
+ if(action==='update'&&process.env.npm_command!=='exec') {
155
+ const [command,base]=npmCommand();
156
+ const result=spawnSync(command,[...base,'exec','--yes','--package','@ghship/cli@latest','--','ghship',...args],{stdio:'inherit'});
157
+ if(result.error)throw new Error('Cannot start npm to update GHShip');
158
+ if(result.signal)process.kill(process.pid,result.signal);
159
+ else process.exitCode=result.status===null?1:result.status;
160
+ }
161
+ else if(action==='uninstall'&&process.env.npm_command!=='exec') {console.error(`Run npx @ghship/cli@latest ${action} from an external npm entry`);process.exitCode=4;}
155
162
  else process.exitCode=lifecycle(executable,args);
156
163
  } else {
157
164
  const child=spawn(executable,args,{stdio:'inherit'});child.on('error',()=>{console.error('Cannot start Go CLI');process.exitCode=1});child.on('exit',(code,signal)=>{if(signal)process.kill(process.pid,signal);else process.exitCode=code===null?1:code});