Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): new cli #1245

Merged
merged 21 commits into from
Sep 9, 2024
Merged

Conversation

ryoppippi
Copy link
Contributor

@ryoppippi ryoppippi commented Aug 27, 2024

fixes: #1214
fixes: #1186

This PR is re-implementation of typia cli.

Looks beautiful so please check this out

To execute the new cli

pnpm i
pnpm build
pnpm cli 

Copy link

socket-security bot commented Aug 27, 2024

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] None +2 132 kB hirokiosame
npm/[email protected] environment 0 228 kB pi0
npm/[email protected] None 0 27.9 kB antfu
npm/[email protected] Transitive: filesystem +3 252 kB superchupu

View full report↗︎

Copy link

pkg-pr-new bot commented Aug 27, 2024

Open in Stackblitz

npm i https://pkg.pr.new/typia@1245

commit: fe16cc6

@ryoppippi ryoppippi changed the title feat(cli): rename from executable to cli feat(cli): new cli Aug 27, 2024
@@ -18,8 +18,10 @@
"test:bun": "bun run deploy/bun.ts",
"test:template": "npm run --tag test --template",
"-------------------------------------------------": "",
"build": "rimraf lib && tsc && rollup -c",
"build": "rimraf lib && tsc && tsc -p ./tsconfig.cli.json && rollup -c",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in CJS environment, generating declarations fails for the cleye library, so I split the build command

Copy link
Owner

@samchon samchon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any special reason of building ESM for CLI program?

Also, the different between previous CLI program and your PR is detecting which package manager being used. However, reviewing is too much hard for me because everything has been changed. CLI program does not need to consider the tree shaking, but every namespaces are decomposed to individual exported functions.

May I refactor your codes to the previous namespace structure?

@ryoppippi
Copy link
Contributor Author

@samchon

  • the reason I use ESM for bin/typia.mjs is that esm can use top-level await. this is more readable.
  • I'll refactor the code to use namespace import (instead of namespace). give me some times.
    Thank you for reviewing as always

@samchon
Copy link
Owner

samchon commented Aug 28, 2024

Oops, just hope to revive the namespace. Too much change for me.

@ryoppippi
Copy link
Contributor Author

ryoppippi commented Aug 28, 2024

Oh, Okay, so I'll use namespace :)
However, this is a reminder that namespace is becoming less and less recommended, because namespace is a typescript-specific grammer .

@ryoppippi
Copy link
Contributor Author

@samchon
I refactored, but I'm sorry that I am not used to using namespace.
If my code is hard to read for you, please modify it.
And any questions are welcome

@ryoppippi ryoppippi requested a review from samchon August 28, 2024 09:00
Copy link
Owner

@samchon samchon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will merge to a new branch, and publish with LLM function calling schema features as 6.10.0.

it may be two weeks later.

@ryoppippi
Copy link
Contributor Author

Oh you implemented for LLM? thank you

@samchon
Copy link
Owner

samchon commented Aug 28, 2024

Oh you implemented for LLM? thank you

Not yet but soon. It's the reason of 2 weeks later's v6.10 publlishing.

@ryoppippi
Copy link
Contributor Author

@samchon
If you want me to implement this llm modules(or transfer my typiautil implementation into typia), create an issue and assign me!
If you implement it, never mind

@samchon samchon changed the base branch from master to v6.10 September 6, 2024 11:05
@samchon samchon changed the base branch from v6.10 to feature/cli September 9, 2024 14:37
@samchon samchon merged commit 2ec0c74 into samchon:feature/cli Sep 9, 2024
5 checks passed
samchon added a commit that referenced this pull request Sep 9, 2024
Due to the previous PR #1245 had changed too much things, I could not follow it up.

Instead, I've accepted its key feature, package manager detecting.
samchon added a commit to samchon/nestia that referenced this pull request Sep 10, 2024
Contributed feature by @ryoppippi in the `typia` to here `nestia`.
samchon added a commit to samchon/nestia that referenced this pull request Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

package manager auto detection for typia Feedback for “Setup”
2 participants