@griffin-app/griffin-cli 1.0.30 → 1.0.31
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 +3 -15
- package/dist/commands/hub/secrets.js +2 -6
- package/dist/core/secrets.d.ts +2 -13
- package/dist/core/secrets.js +3 -24
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -18,7 +18,7 @@ import { executeLogin } from "./commands/hub/login.js";
|
|
|
18
18
|
import { executeLogout } from "./commands/hub/logout.js";
|
|
19
19
|
import { executeIntegrationsConnect } from "./commands/hub/integrations.js";
|
|
20
20
|
import { executeNotificationsList, executeNotificationsTest, } from "./commands/hub/notifications.js";
|
|
21
|
-
import { executeSecretsList, executeSecretsSet,
|
|
21
|
+
import { executeSecretsList, executeSecretsSet, executeSecretsDelete, } from "./commands/hub/secrets.js";
|
|
22
22
|
import { executeIntegrationsList, executeIntegrationsShow, executeIntegrationsUpdate, executeIntegrationsRemove, } from "./commands/hub/integrations.js";
|
|
23
23
|
import packageInfo from "../package.json" with { type: "json" };
|
|
24
24
|
const program = new Command();
|
|
@@ -128,8 +128,8 @@ program
|
|
|
128
128
|
.option("--monitor <nameOrId>", "Specific monitor name or ID to destroy")
|
|
129
129
|
.option("--auto-approve", "Skip confirmation prompt")
|
|
130
130
|
.option("--dry-run", "Show what would be destroyed without making changes")
|
|
131
|
-
.action(async (
|
|
132
|
-
await executeDestroy({ ...options,
|
|
131
|
+
.action(async (options) => {
|
|
132
|
+
await executeDestroy({ ...options, json: program.opts().json });
|
|
133
133
|
});
|
|
134
134
|
// Auth command group
|
|
135
135
|
const auth = program.command("auth").description("Manage authentication");
|
|
@@ -246,18 +246,6 @@ secrets
|
|
|
246
246
|
json: program.opts().json,
|
|
247
247
|
});
|
|
248
248
|
});
|
|
249
|
-
secrets
|
|
250
|
-
.command("get <name>")
|
|
251
|
-
.description("Show secret metadata")
|
|
252
|
-
.option("--env <name>", "Environment name", "default")
|
|
253
|
-
.option("--json", "Output as JSON")
|
|
254
|
-
.action(async (name, options) => {
|
|
255
|
-
await executeSecretsGet({
|
|
256
|
-
name,
|
|
257
|
-
environment: options.env,
|
|
258
|
-
json: program.opts().json ?? options.json,
|
|
259
|
-
});
|
|
260
|
-
});
|
|
261
249
|
secrets
|
|
262
250
|
.command("delete <name>")
|
|
263
251
|
.description("Delete a secret")
|
|
@@ -28,13 +28,9 @@ export const executeSecretsList = createCommandHandler("secrets list", async (op
|
|
|
28
28
|
}
|
|
29
29
|
output.info(`Secrets (environment: ${env})`);
|
|
30
30
|
output.blank();
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
});
|
|
34
|
-
for (const s of secrets) {
|
|
35
|
-
table.push([s.name]);
|
|
31
|
+
for (const { name } of secrets) {
|
|
32
|
+
output.log(name);
|
|
36
33
|
}
|
|
37
|
-
output.log(table.toString());
|
|
38
34
|
});
|
|
39
35
|
function promptSecret(promptText) {
|
|
40
36
|
return new Promise((resolve) => {
|
package/dist/core/secrets.d.ts
CHANGED
|
@@ -5,20 +5,9 @@
|
|
|
5
5
|
* - `env`: reads secrets from environment variables (local dev, no hub needed)
|
|
6
6
|
* - `hub`: resolves secrets via POST /secrets/resolve on the hub API
|
|
7
7
|
*/
|
|
8
|
-
import { type SecretProvider } from "@griffin-app/griffin-executor";
|
|
9
|
-
|
|
8
|
+
import { HubSecretProvider, type SecretProvider } from "@griffin-app/griffin-executor";
|
|
9
|
+
export { HubSecretProvider };
|
|
10
10
|
/**
|
|
11
11
|
* Create an env-based secret provider for fully-local CLI runs (no hub).
|
|
12
12
|
*/
|
|
13
13
|
export declare function createEnvSecretsProvider(): SecretProvider;
|
|
14
|
-
/**
|
|
15
|
-
* SecretProvider that resolves secrets via the hub's POST /secrets/resolve endpoint.
|
|
16
|
-
* The hub is the sole gateway for AWS Secrets Manager — no credentials leave the hub.
|
|
17
|
-
*/
|
|
18
|
-
export declare class HubSecretProvider implements SecretProvider {
|
|
19
|
-
readonly name = "hub";
|
|
20
|
-
private readonly sdk;
|
|
21
|
-
private readonly environment;
|
|
22
|
-
constructor(sdk: GriffinHubSdk, environment: string);
|
|
23
|
-
resolve(ref: string): Promise<string>;
|
|
24
|
-
}
|
package/dist/core/secrets.js
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
* - `env`: reads secrets from environment variables (local dev, no hub needed)
|
|
6
6
|
* - `hub`: resolves secrets via POST /secrets/resolve on the hub API
|
|
7
7
|
*/
|
|
8
|
-
import { EnvSecretProvider, } from "@griffin-app/griffin-executor";
|
|
8
|
+
import { EnvSecretProvider, HubSecretProvider, } from "@griffin-app/griffin-executor";
|
|
9
|
+
// Re-export so existing imports from this module continue to work
|
|
10
|
+
export { HubSecretProvider };
|
|
9
11
|
/**
|
|
10
12
|
* Environment variable name for selecting the local secrets provider.
|
|
11
13
|
* Only "env" is supported for fully-local runs without a hub.
|
|
@@ -20,26 +22,3 @@ export function createEnvSecretsProvider() {
|
|
|
20
22
|
env: process.env,
|
|
21
23
|
});
|
|
22
24
|
}
|
|
23
|
-
/**
|
|
24
|
-
* SecretProvider that resolves secrets via the hub's POST /secrets/resolve endpoint.
|
|
25
|
-
* The hub is the sole gateway for AWS Secrets Manager — no credentials leave the hub.
|
|
26
|
-
*/
|
|
27
|
-
export class HubSecretProvider {
|
|
28
|
-
name = "hub";
|
|
29
|
-
sdk;
|
|
30
|
-
environment;
|
|
31
|
-
constructor(sdk, environment) {
|
|
32
|
-
this.sdk = sdk;
|
|
33
|
-
this.environment = environment;
|
|
34
|
-
}
|
|
35
|
-
async resolve(ref) {
|
|
36
|
-
const response = await this.sdk.postSecretsResolve({
|
|
37
|
-
body: { name: ref, environment: this.environment },
|
|
38
|
-
});
|
|
39
|
-
const value = response.data?.data?.value;
|
|
40
|
-
if (value === undefined) {
|
|
41
|
-
throw new Error(`Secret "${ref}" not found for environment "${this.environment}"`);
|
|
42
|
-
}
|
|
43
|
-
return value;
|
|
44
|
-
}
|
|
45
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@griffin-app/griffin-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.31",
|
|
4
4
|
"description": "CLI tool for running and managing griffin API tests",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@griffin-app/griffin-hub-sdk": "1.0.27",
|
|
28
|
-
"@griffin-app/griffin-executor": "0.1.
|
|
28
|
+
"@griffin-app/griffin-executor": "0.1.4",
|
|
29
29
|
"@griffin-app/griffin-core": "0.2.2",
|
|
30
30
|
"better-auth": "^1.4.17",
|
|
31
31
|
"cli-table3": "^0.6.5",
|