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

fix: add env var to disable link warning #1240

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Conversation

mdonnalley
Copy link
Contributor

@mdonnalley mdonnalley commented Nov 12, 2024

Add OCLIF_DISABLE_LINKED_ESM_WARNING env var to disable warning that displays when using a linked ESM plugin

With env var

~/repos/trailheadapps/dreamhouse-lwc on  main [?] via ⬢ v20.15.0
❯ OCLIF_DISABLE_LINKED_ESM_WARNING=true sf agent create --name My_Agent --job-spec config/agentSpec.json

 ──────────── Creating My_Agent Agent ────────────

 ✔ Parsing config/agentSpec.json 186ms
 ✔ Generating GenAiPlanner metadata 189ms
 ✔ Creating agent in org 4.78s
 ✔ Retrieving agent metadata 2.81s

 Elapsed Time: 8.10s

Successfully created My_Agent in [email protected].
Use sf agent open --agent My_Agent to view the agent in the browser.

Without env var

~/repos/trailheadapps/dreamhouse-lwc on  main [?] via ⬢ v20.15.0 took 10.7s
❯ sf agent create --name My_Agent --job-spec config/agentSpec.json
 ›   Warning: @salesforce/plugin-agent is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used
 ›   instead.

 ──────────── Creating My_Agent Agent ────────────

 ✔ Parsing config/agentSpec.json 191ms
 ✔ Generating GenAiPlanner metadata 191ms
 ✔ Creating agent in org 4.76s
 ✔ Retrieving agent metadata 2.72s

 Elapsed Time: 8.01s

Successfully created My_Agent in [email protected].
Use sf agent open --agent My_Agent to view the agent in the browser.

@mdonnalley mdonnalley added the enhancement New feature or request label Nov 12, 2024
Copy link

git2gus bot commented Nov 12, 2024

This issue has been linked to a new work item: W-17217484

@iowillhoit iowillhoit merged commit c599b42 into main Nov 12, 2024
85 of 86 checks passed
@iowillhoit iowillhoit deleted the mdonnalley/disable-warning branch November 12, 2024 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants