Skip to content

feat: [sites] local dev authentication #155

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

Merged
merged 7 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ EXAMPLES
$ sf lightning dev app --target-org myOrg --device-type ios --device-id "iPhone 15 Pro Max"
```

_See code: [src/commands/lightning/dev/app.ts](https://github.com/salesforcecli/plugin-lightning-dev/blob/1.1.1/src/commands/lightning/dev/app.ts)_
_See code: [src/commands/lightning/dev/app.ts](https://github.com/salesforcecli/plugin-lightning-dev/blob/1.1.2-alpha.0/src/commands/lightning/dev/app.ts)_

## `sf lightning dev site`

Expand Down Expand Up @@ -244,6 +244,6 @@ EXAMPLES
$ sf lightning dev site --name "Partner Central" --target-org myOrg
```

_See code: [src/commands/lightning/dev/site.ts](https://github.com/salesforcecli/plugin-lightning-dev/blob/1.1.1/src/commands/lightning/dev/site.ts)_
_See code: [src/commands/lightning/dev/site.ts](https://github.com/salesforcecli/plugin-lightning-dev/blob/1.1.2-alpha.0/src/commands/lightning/dev/site.ts)_

<!-- commandsstop -->
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@salesforce/plugin-lightning-dev",
"description": "Lightning development tools for LEX, Mobile, and Experience Sites",
"version": "1.1.1",
"version": "1.1.2-alpha.0",
"author": "Salesforce",
"bugs": "https://github.com/forcedotcom/cli/issues",
"dependencies": {
"@lwrjs/api": "0.14.0",
"@lwrjs/api": "0.14.2",
"@lwc/lwc-dev-server": "^9.4.0",
"@lwc/sfdc-lwc-compiler": "^9.4.0",
"@oclif/core": "^4.0.17",
Expand All @@ -17,17 +17,15 @@
"@inquirer/prompts": "^5.3.8",
"chalk": "^5.3.0",
"lwc": "7.1.3",
"lwr": "0.14.0",
"node-fetch": "^3.3.2",
"tar": "^7.4.3"
"lwr": "0.14.2",
"node-fetch": "^3.3.2"
},
"devDependencies": {
"@oclif/plugin-command-snapshot": "^5.2.12",
"@salesforce/cli-plugins-testkit": "^5.3.25",
"@salesforce/dev-scripts": "^10.2.7",
"@salesforce/plugin-command-reference": "^3.1.13",
"@types/node-fetch": "^2.6.11",
"@types/tar": "^6.1.13",
"eslint-plugin-sf-plugin": "^1.20.1",
"esmock": "^2.6.7",
"oclif": "^4.14.12",
Expand Down
4 changes: 4 additions & 0 deletions src/commands/lightning/dev/site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,12 @@ export default class LightningDevSite extends SfCommand<void> {
}
}

// Pass the org auth token so LWR can make authenticated requests to core
const authToken = org.getConnection().accessToken ?? '';

// Start the dev server
await expDev({
authToken,
open: true,
port: 3000,
logLevel: 'error',
Expand Down
Loading