File tree Expand file tree Collapse file tree 1 file changed +16
-19
lines changed Expand file tree Collapse file tree 1 file changed +16
-19
lines changed Original file line number Diff line number Diff line change 11import type { Config } from './types'
2- import { loadConfig } from 'c12'
2+ import { resolve } from 'node:path'
3+ import { loadConfig } from 'bunfig'
34
4- // Define an async function to load the config
5- async function loadDynamoDBConfig ( ) : Promise < Config > {
6- const { config } = ( await loadConfig ( {
7- name : 'dynamodb' ,
8- defaultConfig : {
9- port : 8000 ,
10- dbPath : '' ,
11- detached : false ,
12- additionalArgs : [ '-sharedDb' ] ,
13- javaOpts : '' ,
14- installPath : 'dynamodb-local' ,
15- downloadUrl : 'https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.tar.gz' ,
16- } ,
17- } ) ) as { config : Config }
18-
19- return config
5+ export const defaultConfig : Config = {
6+ port : 8000 ,
7+ defaultTableName : 'MyOfflineTable' ,
8+ dbPath : '' ,
9+ detached : false ,
10+ additionalArgs : [ '-sharedDb' ] ,
11+ javaOpts : '' ,
12+ installPath : 'dynamodb-local' ,
13+ downloadUrl : 'https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.tar.gz' ,
2014}
2115
22- // Export the config (wrapped in a promise)
2316// eslint-disable-next-line antfu/no-top-level-await
24- export const config : Config = await loadDynamoDBConfig ( )
17+ export const config : Config = await loadConfig ( {
18+ name : 'dynamodb' ,
19+ cwd : resolve ( __dirname , '..' ) ,
20+ defaultConfig,
21+ } )
You can’t perform that action at this time.
0 commit comments