Skip to content

Commit

Permalink
fix: script import from cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
rayriffy committed Feb 11, 2024
1 parent 8e75f69 commit 5b2d9b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scraper/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@riffyh/scraper",
"version": "1.0.2",
"version": "1.0.3",
"bin": "dist/index.js",
"publishConfig": {
"access": "public",
Expand Down
6 changes: 5 additions & 1 deletion scraper/src/commands/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ const fetchQueue = new PQueue({
})

export const fetch = async (entryPoint: string) => {
const { default: codes } = (await import(entryPoint)) as {
const { default: codes } = (await import(
path.join(process.cwd(), entryPoint)
)) as {
default: DatabaseCode[]
}

console.log('read ' + codes.length + ' items')

/**
* Step 1: Generate chunks
*/
Expand Down

0 comments on commit 5b2d9b2

Please sign in to comment.