@keywaysh/cli 0.0.16 → 0.0.18
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/dist/cli.js +8 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -69,7 +69,7 @@ var INTERNAL_POSTHOG_HOST = "https://eu.i.posthog.com";
|
|
|
69
69
|
// package.json
|
|
70
70
|
var package_default = {
|
|
71
71
|
name: "@keywaysh/cli",
|
|
72
|
-
version: "0.0.
|
|
72
|
+
version: "0.0.18",
|
|
73
73
|
description: "One link to all your secrets",
|
|
74
74
|
type: "module",
|
|
75
75
|
bin: {
|
|
@@ -216,7 +216,10 @@ async function handleResponse(response) {
|
|
|
216
216
|
if (contentType.includes("application/json")) {
|
|
217
217
|
try {
|
|
218
218
|
const error = JSON.parse(text);
|
|
219
|
-
|
|
219
|
+
const errorCode = error.error || error.title || "http_error";
|
|
220
|
+
const errorMessage = error.message || error.detail || `HTTP ${response.status}`;
|
|
221
|
+
const upgradeUrl = error.upgrade_url || error.upgradeUrl;
|
|
222
|
+
throw new APIError(response.status, errorCode, errorMessage, upgradeUrl);
|
|
220
223
|
} catch (e) {
|
|
221
224
|
if (e instanceof APIError) throw e;
|
|
222
225
|
throw new APIError(response.status, "http_error", text || `HTTP ${response.status}`);
|
|
@@ -1991,16 +1994,16 @@ async function executeSyncOperation(accessToken, repoFullName, connectionId, pro
|
|
|
1991
1994
|
|
|
1992
1995
|
// src/cli.ts
|
|
1993
1996
|
var program = new Command();
|
|
1997
|
+
var TAGLINE = "Sync secrets with your team and infra";
|
|
1994
1998
|
var showBanner = () => {
|
|
1995
1999
|
const text = pc9.bold(pc9.cyan("Keyway CLI"));
|
|
1996
|
-
const subtitle = pc9.gray("GitHub-native secrets manager for dev teams");
|
|
1997
2000
|
console.log(`
|
|
1998
2001
|
${text}
|
|
1999
|
-
${
|
|
2002
|
+
${pc9.gray(TAGLINE)}
|
|
2000
2003
|
`);
|
|
2001
2004
|
};
|
|
2002
2005
|
showBanner();
|
|
2003
|
-
program.name("keyway").description(
|
|
2006
|
+
program.name("keyway").description(TAGLINE).version(package_default.version);
|
|
2004
2007
|
program.command("init").description("Initialize a vault for the current repository").option("--no-login-prompt", "Fail instead of prompting to login if unauthenticated").action(async (options) => {
|
|
2005
2008
|
await initCommand(options);
|
|
2006
2009
|
});
|