@sfdc-webapps/feature-authentication 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -20
- package/feature.ts +1 -10
- package/package.json +1 -1
- package/template/webApp/src/context/AuthContext.tsx +1 -1
- package/template/webApp/webapp.json +0 -12
package/README.md
CHANGED
|
@@ -18,22 +18,6 @@ This feature provides authentication functionality for Salesforce Web Applicatio
|
|
|
18
18
|
### Prerequisites
|
|
19
19
|
|
|
20
20
|
1. **Salesforce CLI (`sf`)** - Must be installed and authenticated to a Salesforce org
|
|
21
|
-
2. **@salesforce/webapps packages** - Required for API proxy functionality (see linking instructions below)
|
|
22
|
-
|
|
23
|
-
### Linking @salesforce/webapps (Required until packages are published)
|
|
24
|
-
|
|
25
|
-
Since `@salesforce/webapps` and `@salesforce/vite-plugin-webapps` are not yet published to npm, you need to link them locally:
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
# Step 1: In the webapps repo - register packages with yarn's link registry
|
|
29
|
-
cd /path/to/webapps/packages/webapps && yarn link
|
|
30
|
-
cd /path/to/webapps/packages/vite-plugin-webapps && yarn link
|
|
31
|
-
|
|
32
|
-
# Step 2: In this repo - link the packages
|
|
33
|
-
cd /path/to/webapps-templates/packages/feature-authentication
|
|
34
|
-
yarn link @salesforce/webapps
|
|
35
|
-
yarn link @salesforce/vite-plugin-webapps
|
|
36
|
-
```
|
|
37
21
|
|
|
38
22
|
### Building and Running
|
|
39
23
|
|
|
@@ -45,10 +29,7 @@ yarn build
|
|
|
45
29
|
yarn dev
|
|
46
30
|
```
|
|
47
31
|
|
|
48
|
-
The `yarn build` command will
|
|
49
|
-
1. Apply feature patches to create the dist directory
|
|
50
|
-
2. Remove the yarn.lock (to avoid resolution conflicts)
|
|
51
|
-
3. Re-link the @salesforce/webapps packages
|
|
32
|
+
The `yarn build` command will apply feature patches to create the dist directory.
|
|
52
33
|
|
|
53
34
|
## Usage
|
|
54
35
|
|
package/feature.ts
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import type { Feature } from '../cli/src/types.js';
|
|
2
2
|
|
|
3
|
-
const feature: Feature = {
|
|
4
|
-
packageJson: {
|
|
5
|
-
dependencies: {
|
|
6
|
-
'@salesforce/webapps': '*',
|
|
7
|
-
},
|
|
8
|
-
devDependencies: {
|
|
9
|
-
'@salesforce/vite-plugin-webapps': '*',
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
};
|
|
3
|
+
const feature: Feature = {};
|
|
13
4
|
|
|
14
5
|
export default feature;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createContext, useContext, useState, useEffect, useCallback, type ReactNode } from 'react';
|
|
2
|
-
import { getCurrentUser, type User } from '@salesforce/
|
|
2
|
+
import { getCurrentUser, type User } from '@salesforce/webapp-experimental/api';
|
|
3
3
|
|
|
4
4
|
interface AuthContextType {
|
|
5
5
|
user: User | null;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "feature-authentication",
|
|
3
|
-
"label": "Feature Authentication",
|
|
4
|
-
"description": "Authentication feature for Salesforce Web Applications",
|
|
5
|
-
"version": "1.0.0",
|
|
6
|
-
"outputDir": "dist",
|
|
7
|
-
"routing": {
|
|
8
|
-
"trailingSlash": "never",
|
|
9
|
-
"fallback": "/index.html"
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|