oclif / core

Node.js Open CLI Framework. Built by Salesforce.
https://oclif.io
MIT License
208 stars 71 forks source link

fix: add env var to disable link warning #1240

Closed mdonnalley closed 2 weeks ago

mdonnalley commented 2 weeks ago

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 test-dpowgjdizsnx@example.com.
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 test-dpowgjdizsnx@example.com.
Use sf agent open --agent My_Agent to view the agent in the browser.
git2gus[bot] commented 2 weeks ago

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