@@ -2,11 +2,7 @@ import { promises as fs } from 'fs';
22import path from 'path' ;
33import { Command } from 'commander' ;
44
5- import {
6- type DeployEnv ,
7- commands ,
8- getSecretsVault ,
9- } from '@flexion/forms-infra-core' ;
5+ import { commands , getSecretsVault } from '@flexion/forms-infra-core' ;
106import { type Context } from './types.js' ;
117
128export const addSecretCommands = ( ctx : Context , cli : Command ) => {
@@ -79,17 +75,20 @@ export const addSecretCommands = (ctx: Context, cli: Command) => {
7975 . command ( 'set-login-gov-keys' )
8076 . description (
8177 'generate and save login.gov keypair; if it already exists, it is not ' +
82- 'updated (future work might include adding key rotation)' ,
78+ 'updated (future work might include adding key rotation)'
8379 )
84- . argument ( '<deploy-env>' , 'deployment environment (dev, demo)' )
85- . argument ( '<app-key>' , 'application key' )
86- . action ( async ( env : DeployEnv , appKey : string ) => {
80+ . argument (
81+ '<root-key>' ,
82+ 'root key for secrets (e.g., flexion-forms-demo, tts-10x-forms-dev)'
83+ )
84+ . argument ( '<app-key>' , 'application key (e.g., server-doj, server-kansas)' )
85+ . action ( async ( rootKey : string , appKey : string ) => {
8786 const vault = await getSecretsVault ( ctx . file ) ;
8887 const secretsDir = path . resolve ( __dirname , '../../../infra/secrets' ) ;
8988 const loginResult = await commands . setLoginGovSecrets (
9089 { vault, secretsDir } ,
91- env ,
92- appKey ,
90+ rootKey ,
91+ appKey
9392 ) ;
9493 if ( loginResult . preexisting ) {
9594 console . log ( 'Keypair already exists.' ) ;
0 commit comments