@ghship/cli 1.0.0 → 1.0.2
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 +5 -2
- package/bin/darwin-amd64/ghship +0 -0
- package/bin/darwin-arm64/ghship +0 -0
- package/bin/linux-amd64/ghship +0 -0
- package/bin/linux-arm64/ghship +0 -0
- package/bin/windows-amd64/ghship.exe +0 -0
- package/bin/windows-arm64/ghship.exe +0 -0
- package/checksums.json +6 -6
- package/package.json +1 -1
- package/run.cjs +10 -0
package/README.md
CHANGED
|
@@ -10,6 +10,9 @@ installation. Project workflows need Git and a gh with native Issue relationship
|
|
|
10
10
|
|
|
11
11
|
Update/uninstall via external `npx @ghship/cli@latest update|uninstall`. Project lifecycle:
|
|
12
12
|
`ghship project install|status|update|uninstall`; custom `.ghship/skill.md` is preserved.
|
|
13
|
+
Install and update also update a verified standalone installation in place, keeping its
|
|
14
|
+
channel and paths. To uninstall a standalone installation, use a separate downloaded
|
|
15
|
+
executable with `uninstall --standalone`.
|
|
13
16
|
Users: `ghship user add|update|delete|list`; list validates tokens and reports actual
|
|
14
17
|
expiry when GitHub returns it, otherwise unknown. Tokens never belong in projects.
|
|
15
18
|
|
|
@@ -80,7 +83,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
80
83
|
The bundled binaries include the Go runtime and standard library,
|
|
81
84
|
distributed under the following BSD 3-Clause license:
|
|
82
85
|
|
|
83
|
-
Copyright
|
|
86
|
+
Copyright 2009 The Go Authors.
|
|
84
87
|
|
|
85
88
|
Redistribution and use in source and binary forms, with or without
|
|
86
89
|
modification, are permitted provided that the following conditions are
|
|
@@ -92,7 +95,7 @@ notice, this list of conditions and the following disclaimer.
|
|
|
92
95
|
copyright notice, this list of conditions and the following disclaimer
|
|
93
96
|
in the documentation and/or other materials provided with the
|
|
94
97
|
distribution.
|
|
95
|
-
* Neither the name of Google
|
|
98
|
+
* Neither the name of Google LLC nor the names of its
|
|
96
99
|
contributors may be used to endorse or promote products derived from
|
|
97
100
|
this software without specific prior written permission.
|
|
98
101
|
|
package/bin/darwin-amd64/ghship
CHANGED
|
Binary file
|
package/bin/darwin-arm64/ghship
CHANGED
|
Binary file
|
package/bin/linux-amd64/ghship
CHANGED
|
Binary file
|
package/bin/linux-arm64/ghship
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/checksums.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bin/darwin-amd64/ghship": "
|
|
3
|
-
"bin/darwin-arm64/ghship": "
|
|
4
|
-
"bin/linux-amd64/ghship": "
|
|
5
|
-
"bin/linux-arm64/ghship": "
|
|
6
|
-
"bin/windows-amd64/ghship.exe": "
|
|
7
|
-
"bin/windows-arm64/ghship.exe": "
|
|
2
|
+
"bin/darwin-amd64/ghship": "7b19d36ac24a2d5d183060364fffbba7596e1748eb379b9e74590ef375ed4530",
|
|
3
|
+
"bin/darwin-arm64/ghship": "3430a35901869edeca99452186c2360baae6c5df467595d0e9f0835e4fd57a91",
|
|
4
|
+
"bin/linux-amd64/ghship": "2659abe45e6f8fb073f4b258665cf788a00b43c60a31410e824d4233acff7e2e",
|
|
5
|
+
"bin/linux-arm64/ghship": "04d9147c1f8b931b57ddbc5fe80cf9a27feb5bd726e992e42f66941c0b36ab18",
|
|
6
|
+
"bin/windows-amd64/ghship.exe": "78495cfc5d803a3955ffb41440ae2e78f9d75be096595e8ea21a1f37a96eeecc",
|
|
7
|
+
"bin/windows-arm64/ghship.exe": "b43c1717508b2bee79a6732bfc481872814cf06fa7a6310b967412d64c54d95b"
|
|
8
8
|
}
|
package/package.json
CHANGED
package/run.cjs
CHANGED
|
@@ -87,8 +87,18 @@ function lifecycle(executable,args) {
|
|
|
87
87
|
else throw new Error(`Unknown lifecycle option: ${arg}; use ghship help install`);
|
|
88
88
|
}
|
|
89
89
|
const preflight=go(executable,[action,'--skill-only','--check',...lifecycleArgs,'--json'],true);if(preflight.code!==0)return preflight.code;
|
|
90
|
+
const state=JSON.parse(preflight.stdout);
|
|
90
91
|
const installed=JSON.parse(npm(['list','-g',meta.name,'--depth=0','--json'],true));
|
|
91
92
|
const existing=installed.dependencies && installed.dependencies[meta.name];
|
|
93
|
+
if(state.standalone) {
|
|
94
|
+
if(action==='uninstall')throw new Error('Standalone installation exists; uninstall with a separate downloaded executable and --standalone');
|
|
95
|
+
if(existing)throw new Error('Standalone and npm installations both exist; inspect both before updating');
|
|
96
|
+
const args=[action,'--standalone',...lifecycleArgs,...(userOnly?['--user-only']:[]),...initArgs.filter(arg=>arg!=='--json'),'--json'];
|
|
97
|
+
const result=go(executable,args,true,action==='install'&&!userOnly);
|
|
98
|
+
if(action==='install'&&!userOnly) {if(result.stdout)process.stdout.write(result.stdout);return result.code;}
|
|
99
|
+
if(result.code!==0)return result.code;
|
|
100
|
+
console.log(JSON.stringify({userInstalled:true,version:meta.version,projectInitialized:false}));return 0;
|
|
101
|
+
}
|
|
92
102
|
const root=path.resolve(npm(['root','-g'],true).trim());
|
|
93
103
|
const receipt=packageReceipt(root);noLinks(receipt);
|
|
94
104
|
if(!existing&&action!=='uninstall'&&fs.existsSync(receipt))throw new Error('Installation receipt exists without its package; preserved');
|