-
Notifications
You must be signed in to change notification settings - Fork 17
feat: add json flag / preview url encoding fixes / auto enable / fix 260 dependencies @W-20141594 #549
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
Conversation
package.json
Outdated
| "@inquirer/prompts": "^5.3.8", | ||
| "@inquirer/select": "^2.4.7", | ||
| "@lwc/lwc-dev-server": "~13.3.0", | ||
| "@lwc/sfdc-lwc-compiler": "~13.2.19", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This got out of sync with CLCO. Need to downgrade and then branch for 260
| ldpServerId: string, | ||
| componentName?: string | ||
| ): string { | ||
| let url = `${instanceUrl}/lwr/application/e/devpreview/ai/localdev-preview?ldpServerUrl=${ldpServerUrl}&ldpServerId=${ldpServerId}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated the path for 260 to local-dev
| @@ -0,0 +1,239 @@ | |||
| /* | |||
| * Copyright 2025, Salesforce, Inc. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating mydomain settings and enabling local dev automatically from vscode
| import { Messages, SfProject, Logger } from '@salesforce/core'; | ||
| import { Platform } from '@salesforce/lwc-dev-mobile-core'; | ||
| import { ComponentUtils } from '../../../shared/componentUtils.js'; | ||
| import { PromptUtils } from '../../../shared/promptUtils.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes are pulling forward the --json changes from 258
| const apiVersion = flags['api-version']; | ||
|
|
||
| // Auto enable local dev | ||
| if (process.env.AUTO_ENABLE_LOCAL_DEV === 'true') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should be auto enabling. Can we make this interactive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can but I probably need to do it from the VSCode side of things. Its awkward to handle sending standard input to a spawned CLI process
| }; | ||
|
|
||
| // Open the browser and navigate to the right page (unless OPEN_BROWSER is set to true) | ||
| if (process.env.OPEN_BROWSER !== 'false') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a command flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can make one, just wanted to review with CLI folks first before we created a flag for this
What does this PR do?
This PR ports functional changes from the 258-patch branch to main, focusing on improvements for IDE-based component preview and VSCode/Code Builder integration.
Key Changes:
metaUtils.tsutility for auto-enabling Lightning Preview in orgslightning dev componentcommand with:--api-versionflag for API version overrideAUTO_ENABLE_LOCAL_DEVenv var)SF_CONTAINER_MODEandVSCODE_PROXY_URIenv vars)ComponentPreviewResultfor better JSON outputgenerateComponentPreviewUrl()helper method in previewUtilslightning-base-componentsdependency from lwc.config.jsonWhat issues does this PR fix or reference?
@W-20141594@