@dsmrt/axiom-cli 0.0.4 → 0.0.5-0

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.
@@ -0,0 +1,17 @@
1
+ import { Credentials as AssumeRoleResponseCreds, AssumeRoleCommandInput } from "@aws-sdk/client-sts";
2
+ import { AwsCredentialIdentity, AwsCredentialIdentityProvider } from "@aws-sdk/types";
3
+ import { AwsConfigs } from "@dsmrt/axiom-config";
4
+ export declare const returnCredentialsFromAssumerole: (creds: AssumeRoleResponseCreds) => {
5
+ accessKeyId: string;
6
+ secretAccessKey: string;
7
+ sessionToken: string;
8
+ };
9
+ declare const CachedCredentialViaProfileAndRegion: (profile: string, region?: string) => Promise<AwsCredentialIdentityProvider>;
10
+ export declare const roleAssumerCallable: (config: {
11
+ region: string;
12
+ cacheKeyName: string;
13
+ }) => (sourceCreds: AwsCredentialIdentity, params: AssumeRoleCommandInput) => Promise<AwsCredentialIdentity>;
14
+ export declare const mfaCodeProvider: (mfaSerial: string) => Promise<any>;
15
+ declare const CachedCredentialProvider: (config: AwsConfigs) => Promise<AwsCredentialIdentityProvider>;
16
+ export default CachedCredentialViaProfileAndRegion;
17
+ export { CachedCredentialProvider };
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,11 @@
1
+ import { CommandModule, ArgumentsCamelCase } from "yargs";
2
+ interface ConfigOptions {
3
+ env: string;
4
+ }
5
+ export declare class Config<U extends ConfigOptions> implements CommandModule<object, U> {
6
+ command: string;
7
+ describe: string;
8
+ handler: (args: ArgumentsCamelCase<U>) => Promise<void>;
9
+ loadConfig: (args: ConfigOptions) => Promise<import("@dsmrt/axiom-config").Config & object>;
10
+ }
11
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./config";
2
+ export * from "./params";
@@ -0,0 +1,10 @@
1
+ import { CommandModule, Argv } from "yargs";
2
+ interface Options {
3
+ }
4
+ export declare class ParamsCommand<U extends Options> implements CommandModule<object, U> {
5
+ command: string;
6
+ describe: string;
7
+ builder: (args: Argv) => Argv<U>;
8
+ handler: () => Promise<void>;
9
+ }
10
+ export {};
@@ -0,0 +1,17 @@
1
+ import { CommandModule, Argv, ArgumentsCamelCase } from "yargs";
2
+ import { Config } from "@dsmrt/axiom-config";
3
+ import { SSMClient } from "@aws-sdk/client-ssm";
4
+ type Path = string;
5
+ export interface DeleteOptions {
6
+ path?: Path;
7
+ force: boolean;
8
+ }
9
+ type config = Config & DeleteOptions;
10
+ export declare class DeleteCommand<U extends config> implements CommandModule<object, U> {
11
+ command: string;
12
+ describe: string;
13
+ protected client: SSMClient | undefined;
14
+ builder: (args: Argv) => Argv<U>;
15
+ handler: (args: ArgumentsCamelCase<U>) => Promise<void>;
16
+ }
17
+ export {};
@@ -0,0 +1,11 @@
1
+ import { CommandModule, Argv, ArgumentsCamelCase } from "yargs";
2
+ export interface GetOptions {
3
+ env: string;
4
+ path: string;
5
+ }
6
+ export declare class GetCommand<U extends GetOptions> implements CommandModule<object, U> {
7
+ command: string;
8
+ describe: string;
9
+ builder: (args: Argv) => Argv<U>;
10
+ handler: (args: ArgumentsCamelCase<U>) => Promise<void>;
11
+ }
@@ -0,0 +1,4 @@
1
+ export * from "./base";
2
+ export * from "./get";
3
+ export * from "./set";
4
+ export * from "./delete";
@@ -0,0 +1,16 @@
1
+ import { CommandModule, Argv, ArgumentsCamelCase } from "yargs";
2
+ import { AwsConfigs } from "@dsmrt/axiom-config";
3
+ export interface SetOptions extends AwsConfigs {
4
+ env: string;
5
+ path: string;
6
+ value: string;
7
+ force: boolean;
8
+ secure: boolean;
9
+ overwrite: boolean;
10
+ }
11
+ export declare class SetCommand<U extends SetOptions> implements CommandModule<object, U> {
12
+ command: string;
13
+ describe: string;
14
+ builder: (args: Argv) => Argv<U>;
15
+ handler: (args: ArgumentsCamelCase<U>) => Promise<void>;
16
+ }
@@ -0,0 +1,2 @@
1
+ import { Config } from "@dsmrt/axiom-config";
2
+ export declare const buildPath: (config: Config, path?: string) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsmrt/axiom-cli",
3
- "version": "0.0.4",
3
+ "version": "0.0.5-0",
4
4
  "description": "axiom cli for managing configs including secrets",
5
5
  "main": "lib/bin/axiom.js",
6
6
  "types": "lib/index.d.ts",
@@ -48,8 +48,8 @@
48
48
  "chalk": "^4.1.2",
49
49
  "inquirer": "^8.0.0",
50
50
  "yargs": "^17.7.2",
51
- "@dsmrt/axiom-config": "^0.0.4",
52
- "@dsmrt/axiom-aws-sdk": "^0.0.4"
51
+ "@dsmrt/axiom-aws-sdk": "^0.0.5-0",
52
+ "@dsmrt/axiom-config": "^0.0.5-0"
53
53
  },
54
54
  "scripts": {
55
55
  "lint": "eslint ./src/ --ext .ts",