Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
glennmichael123 committed Sep 26, 2024
1 parent d67add3 commit e4fbb0b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ lib-cov
logs
node_modules
temp
dynamodb-local
18 changes: 8 additions & 10 deletions src/dynamodb.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import process from 'node:process'
import type { Subprocess } from 'bun'
import type { LaunchOptions } from './types'
import * as fs from 'node:fs'
import * as https from 'node:https'
import * as zlib from 'node:zlib'
import * as path from 'node:path'
import process from 'node:process'

import { promisify } from 'node:util'
// eslint-disable-next-line unicorn/prefer-node-protocol
import type { Subprocess } from 'bun'
import * as tar from 'tar'
import * as zlib from 'node:zlib'
import Debug from 'debug'
import { exists } from './utils'
import * as tar from 'tar'
import { config } from './config'
import type { LaunchOptions } from './types'
import { exists } from './utils'

const debug = Debug('dynamodb-local')
const JARNAME = 'DynamoDBLocal.jar'
Expand Down Expand Up @@ -84,9 +84,7 @@ export const dynamoDb = {
if (response.statusCode !== 200)
return reject(new Error(`Failed to download DynamoDB Local: ${response.statusCode}`))

response.pipe(zlib.createUnzip()).pipe(tar.extract({ cwd: config.installPath }))
.on('finish', resolve)
.on('error', reject)
response.pipe(zlib.createUnzip()).pipe(tar.extract({ cwd: config.installPath })).on('finish', resolve).on('error', reject)
}).on('error', reject)
})
},
Expand Down

0 comments on commit e4fbb0b

Please sign in to comment.