@@ -12,16 +12,15 @@ import {
1212 validateDatabaseOrSecret ,
1313 yargsWithCommonConfigurableQueryOptions ,
1414} from "../lib/command-helpers.mjs" ;
15- import { formatQueryResponse , getSecret } from "../lib/fauna-client.mjs" ;
1615import { clearHistoryStorage , initHistoryStorage } from "../lib/file-util.mjs" ;
1716
1817async function shellCommand ( argv ) {
18+ const { getSecret, isQueryable } = container . resolve ( "faunaClient" ) ;
1919 const { query : v4Query } = container . resolve ( "faunadb" ) ;
2020
2121 validateDatabaseOrSecret ( argv ) ;
2222
2323 // Fast fail if the database is not queryable
24- const isQueryable = container . resolve ( "isQueryable" ) ;
2524 await isQueryable ( { ...argv , secret : await getSecret ( ) } ) ;
2625
2726 const logger = container . resolve ( "logger" ) ;
@@ -146,9 +145,13 @@ const getArgvOrCtx = (key, argv, ctx) => {
146145
147146// caches the logger, client, and performQuery for subsequent shell calls
148147async function buildCustomEval ( argv ) {
149- const formatError = container . resolve ( "formatError" ) ;
150- const formatQueryInfo = container . resolve ( "formatQueryInfo" ) ;
151- const runQueryFromString = container . resolve ( "runQueryFromString" ) ;
148+ const {
149+ formatError,
150+ getSecret,
151+ formatQueryInfo,
152+ formatQueryResponse,
153+ runQueryFromString,
154+ } = container . resolve ( "faunaClient" ) ;
152155
153156 return async ( cmd , ctx , _filename , cb ) => {
154157 try {
0 commit comments