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): remove deno serverless & support run .ts serverless in nodejs #935

Merged
merged 8 commits into from
Nov 5, 2024

Conversation

woorui
Copy link
Collaborator

@woorui woorui commented Oct 30, 2024

Description

  1. Support users use TypeScript to write a llm sfn, For an example, refer to example/10-ai/llm-sfn-get-weather-ts.
  2. Add yomo run app.ts command to run the ts sfn.
  3. Remove the default SFN name 'app'. If a name is not provided, the cli will prompt the user to add it.
  4. Remove deno serverless support

Copy link

vercel bot commented Oct 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
yomo ⬜️ Ignored (Inspect) Visit Preview Nov 4, 2024 8:50am

Copy link

codecov bot commented Oct 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (master@b790a89). Learn more about missing BASE report.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #935   +/-   ##
=========================================
  Coverage          ?   78.84%           
=========================================
  Files             ?       51           
  Lines             ?     3725           
  Branches          ?        0           
=========================================
  Hits              ?     2937           
  Misses            ?      617           
  Partials          ?      171           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@woorui woorui marked this pull request as ready for review October 31, 2024 15:13
@woorui woorui requested a review from venjiang as a code owner October 31, 2024 15:13
@woorui woorui self-assigned this Oct 31, 2024
Copy link
Member

@fanweixiao fanweixiao left a comment

Choose a reason for hiding this comment

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

🥰

if err != nil {
return nil, errors.New("[node] command was not found. to run the sfn in ts, you need to install node. For details, visit https://nodejs.org")
}
npmPath, err := exec.LookPath("pnpm")
Copy link
Member

Choose a reason for hiding this comment

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

prefer pnpm


ext := filepath.Ext(entryTSFile)
if ext != ".ts" {
return nil, fmt.Errorf("only support typescript, got: %s", entryTSFile)
Copy link
Member

Choose a reason for hiding this comment

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

support Typescript only in current version

}

// 2. install dependencies
cmd := exec.Command(w.npmPath, "install")
Copy link
Member

Choose a reason for hiding this comment

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

@houjiazong when hosting, usually need npm install --production

return err
}

listener, err := net.ListenUnix("unix", addr)
Copy link
Member

Choose a reason for hiding this comment

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

build and OS

@woorui woorui changed the title feat(cli): support run .ts serverless feat(cli): remove deno serverless & support run .ts serverless in nodejs Nov 1, 2024
@wujunzhuo
Copy link
Collaborator

example-8 needs to be removed

@woorui woorui merged commit 2221a74 into master Nov 5, 2024
7 checks passed
@woorui woorui deleted the feat/run-ts branch November 5, 2024 09:18
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.

3 participants