giuseppelt / httpc

Build function-based API with minimal code and end-to-end type safety
https://httpc.dev
MIT License
187 stars 1 forks source link

outputDirectory path is not relative to current directory when create-httpc #2

Open miyamonz opened 1 year ago

miyamonz commented 1 year ago

I tried pnpm create httpc but there is no output file or folder.

According to this log, the outputDirectory is assumed as relative path from node_modules/create-httpc folder

pnpm

%% pnpm create httpc
.../share/pnpm/store/v3/tmp/dlx-53028    |  +33 +++
Packages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: /Users/miyamonz/.local/share/pnpm/store/v3
  Virtual store is at:             ../../../../.local/share/pnpm/store/v3/tmp/dlx-53028/node_modules/.pnpm
.../share/pnpm/store/v3/tmp/dlx-53028    | Progress: resolved 33, reused 33, downloaded 0, added 33, done
✔ Select a template you want to start with › Server blank
✔ Specify the output directory … ./
? Output directory(/Users/miyamonz/.local/share/pnpm/store/v3/tmp/dlx-53028/node_modules/.pnpm/create-httpc@0.1.0/node_modules/create-httpc) not empty, all content will be deleted. Confirm? › (Y/n)

npm

%% npm init httpc
Need to install the following packages:
  create-httpc@0.1.0
Ok to proceed? (y)
✔ Select a template you want to start with › Kit blank
✔ Specify the output directory …
✔ Output directory(/Users/miyamonz/.npm/_npx/fab980724a10a9dd/node_modules/create-httpc) not empty, all content will be deleted. Confirm? … yes

version: 0.1.0

maybe this line is related to this issue. https://github.com/giuseppelt/httpc/blob/74f2013c31e552ba7f319981179fe561ab041c75/packages/create/index.mjs#L12

giuseppelt commented 1 year ago

Thanks for the report I'm out of town. I'll back at you in a couple of days.