Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/stack/src/bin/commands/init/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ function resolveProvider(flags: Record<string, boolean>): InitProvider {
export async function initCommand(flags: Record<string, boolean>) {
const provider = resolveProvider(flags)

p.intro(`CipherStash Stack Setup`)
p.intro('CipherStash Stack Setup')
p.log.warn(
'This command is a prototype and a sneak peek at what\'s next. It doesn\'t perform any actual setup yet.',
)
p.log.info(provider.introMessage)

let state: InitState = {}
Expand Down
5 changes: 1 addition & 4 deletions packages/stack/src/bin/commands/secrets/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,12 @@ export function getConfig(environment: string): SecretsConfig {
const workspaceCRN = process.env.CS_WORKSPACE_CRN
const clientId = process.env.CS_CLIENT_ID
const clientKey = process.env.CS_CLIENT_KEY
const apiKey = process.env.CS_CLIENT_ACCESS_KEY
const accessKey = process.env.CS_ACCESS_KEY

const missing: string[] = []
if (!workspaceCRN) missing.push('CS_WORKSPACE_CRN')
if (!clientId) missing.push('CS_CLIENT_ID')
if (!clientKey) missing.push('CS_CLIENT_KEY')
if (!apiKey) missing.push('CS_CLIENT_ACCESS_KEY')

if (missing.length > 0) {
console.error(
Expand All @@ -58,15 +56,14 @@ export function getConfig(environment: string): SecretsConfig {
process.exit(1)
}

if (!workspaceCRN || !clientId || !clientKey || !apiKey) {
if (!workspaceCRN || !clientId || !clientKey || !accessKey) {
throw new Error('Missing required configuration')
}

return {
workspaceCRN,
clientId,
clientKey,
apiKey,
accessKey,
environment,
}
Expand Down